theorem isCompact_of_totallyBounded_isClosed [CompleteSpace α] {s : Set α} (ht : TotallyBounded s)
    (hc : IsClosed s) : IsCompact s

{α : Type u}
[uniformSpace : UniformSpace α]
[CompleteSpace α]
{s : Set α}
(ht : TotallyBounded s)
(hc : IsClosed s)


theorem subset_extentClosure_intentClosure (s : Set α) :
    s ⊆ extentClosure r (intentClosure r s)

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


lemma map_distinguished_op_exact [HasShift C ℤ] [HasZeroObject C] [Preadditive C]
    [∀ (n : ℤ), (shiftFunctor C n).Additive]
    [Pretriangulated C]{A : Type*} [Category A] [Abelian A] (F : Cᵒᵖ ⥤ A)
    [F.IsHomological] (T : Triangle C) (hT : T ∈ distTriang C) :
    ((shortComplexOfDistTriangle T hT).op.map F).Exact

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

((CategoryTheory.Pretriangulated.shortComplexOfDistTriangle T hT).op.map F).Exact


theorem countP_eq_length : countP p l = l.length ↔ ∀ a ∈ l, p a

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

List.countP p l = l.length ↔ ∀ (a : α), a ∈ l → p a = true


theorem lowerCrossingTime_stabilize' (hnm : n ≤ m) (hn : N ≤ lowerCrossingTime a b f N n ω) :
    lowerCrossingTime a b f N m ω = N

{f : ℕ → Ω → ℝ}

(hn : N ≤ MeasureTheory.lowerCrossingTime a b f N n ω)

MeasureTheory.lowerCrossingTime a b f N m ω = N


/-- The identity as a continuous normed group hom. -/
@[simps!]
def id : NormedAddGroupHom V V

(V : Type u_1)
[SeminormedAddCommGroup V]

∀ (a : V), (NormedAddGroupHom.id V) a = a


theorem ennnorm_eq_ofReal (hr : 0 ≤ r) : (‖r‖₊ : ℝ≥0∞) = ENNReal.ofReal r


theorem tangentMapWithin_subset {p : TangentBundle I M} (st : s ⊆ t)
    (hs : UniqueMDiffWithinAt I s p.1) (h : MDifferentiableWithinAt I I' f t p.1) :
    tangentMapWithin I I' f s p = tangentMapWithin I I' f t p

(h : MDifferentiableWithinAt I I' f t p.proj)


private lemma secondRow_exact : (secondRow I M f).Exact

{R : Type u}
[CommRing R]
(I : Ideal R)
(M : Type u)
[AddCommGroup M]
[Module R M]
[IsNoetherianRing R]
{ι : Type}
[Fintype ι]
(f : (ι → R) →ₗ[R] M)
(hf : Function.Surjective ⇑f)


theorem add_sq (x y : R) : (x + y) ^ 2 = x ^ 2 + y ^ 2

{R : Type u_1}
[CommSemiring R]
[CharP R 2]
(x y : R)


/-- The quotient of a second countable space by a group action is second countable. -/
@[to_additive "The quotient of a second countable space by an additive group action is second
countable."]
theorem ContinuousConstSMul.secondCountableTopology [SecondCountableTopology T]
    [ContinuousConstSMul Γ T] : SecondCountableTopology (Quotient (MulAction.orbitRel Γ T))

{Γ : Type u_4}
[Group Γ]
{T : Type u_5}
[TopologicalSpace T]
[MulAction Γ T]
[SecondCountableTopology T]
[ContinuousConstSMul Γ T]


@[to_additive (attr := simp)]
theorem homQuotientZPowOfHom_id : homQuotientZPowOfHom (MonoidHom.id A) n = MonoidHom.id _

QuotientAddGroup.homQuotientZSMulOfHom (AddMonoidHom.id A) n = AddMonoidHom.id (A ⧸ (zsmulAddGroupHom n).range)


@[to_additive (attr := simp)]
theorem map₂_smul : map₂ (· • ·) f g = f • g

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

Filter.map₂ (fun x x_1 => x +ᵥ x_1) f g = f +ᵥ g


@[simp]
theorem condexp_zero : μ[(0 : α → F')|m] = 0

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}


theorem sup_eq_lsub_or_sup_succ_eq_lsub {ι : Type u} (f : ι → Ordinal.{max u v}) :
    sup.{_, v} f = lsub.{_, v} f ∨ succ (sup.{_, v} f) = lsub.{_, v} f

Ordinal.sup f = Ordinal.lsub f ∨ Order.succ (Ordinal.sup f) = Ordinal.lsub f


@[simp]
theorem abs_re_lt_abs {z : ℂ} : |z.re| < Complex.abs z ↔ z.im ≠ 0


theorem tsum_toNNReal_eq {f : α → ℝ≥0∞} (hf : ∀ a, f a ≠ ∞) :
    (∑' a, f a).toNNReal = ∑' a, (f a).toNNReal

{α : Type u_1}
{f : α → ℝ≥0∞}
(hf : ∀ (a : α), f a ≠ ⊤)

(∑' (a : α), f a).toNNReal = ∑' (a : α), (f a).toNNReal


lemma exists_or_forall_not (P : α → Prop) : (∃ a, P a) ∨ ∀ a, ¬ P a


theorem pow_dvd_of_squarefree_of_pow_succ_dvd_mul_right {k : ℕ}
    (hx : Squarefree x) (hp : Prime p) (h : p ^ (k + 1) ∣ x * y) :
    p ^ k ∣ y

{R : Type u_1}
[CancelCommMonoidWithZero R]
{x y p : R}
{k : ℕ}
(hx : Squarefree x)
(hp : Prime p)
(h : p ^ (k + 1) ∣ x * y)


@[to_additive]
theorem le_iff_forall_lt_one_mul_le : a ≤ b ↔ ∀ ε < 1, a * ε ≤ b

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


theorem SupIndep.le_sup_iff (hs : s.SupIndep f) (hts : t ⊆ s) (hi : i ∈ s) (hf : ∀ i, f i ≠ ⊥) :
    f i ≤ t.sup f ↔ i ∈ t

{α : Type u_1}
{ι : Type u_3}
[Lattice α]
[OrderBot α]
{s t : Finset ι}
{f : ι → α}
{i : ι}
(hs : s.SupIndep f)
(hts : t ⊆ s)
(hi : i ∈ s)
(hf : ∀ (i : ι), f i ≠ ⊥)


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

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

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

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

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

LocallyFinite fun i => Function.support ↑(self.toFun i)


theorem exists_SL2_smul_eq_of_apply_zero_one_ne_zero (g : SL(2, ℝ)) (hc : ↑ₘ[ℝ] g 1 0 ≠ 0) :
    ∃ (u : { x : ℝ // 0 < x }) (v w : ℝ),
      (g • · : ℍ → ℍ) =
        (w +ᵥ ·) ∘ (ModularGroup.S • · : ℍ → ℍ) ∘ (v +ᵥ · : ℍ → ℍ) ∘ (u • · : ℍ → ℍ)

∃ u v w, (fun x => g • x) = (fun x => w +ᵥ x) ∘ (fun x => ModularGroup.S • x) ∘ (fun x => v +ᵥ x) ∘ fun x => u • x


theorem all_node3R {P l x m y r} :
    @All α P (node3R l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r

{α : Type u_1}
{P : α → Prop}
{l : Ordnode α}
{x : α}
{m : Ordnode α}
{y : α}
{r : Ordnode α}

Ordnode.All P (l.node3R x m y r) ↔ Ordnode.All P l ∧ P x ∧ Ordnode.All P m ∧ P y ∧ Ordnode.All P r


protected theorem mapsTo : MapsTo e e.source e.target

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)


theorem coinduction :
    ∀ {s₁ s₂ : Seq α},
      head s₁ = head s₂ →
        (∀ (β : Type u) (fr : Seq α → β), fr s₁ = fr s₂ → fr (tail s₁) = fr (tail s₂)) → s₁ = s₂

s₁.head = s₂.head → (∀ (β : Type u) (fr : Stream'.Seq α → β), fr s₁ = fr s₂ → fr s₁.tail = fr s₂.tail) → s₁ = s₂


/-- The canonical map from the type to the free group is an injection. -/
@[to_additive "The canonical map from the type to the additive free group is an injection."]
theorem of_injective : Function.Injective (@of α)


@[to_additive]
theorem mk_eq_mk_iff {a c : M} {b d : S} : mk a b = mk c d ↔ r S ⟨a, b⟩ ⟨c, d⟩

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{a c : M}
{b d : ↥S}

AddLocalization.mk a b = AddLocalization.mk c d ↔ (AddLocalization.r S) (a, b) (c, d)


@[to_additive]
theorem ContMDiffWithinAt.inv {f : M → G} {s : Set M} {x₀ : M}
    (hf : ContMDiffWithinAt I' I n f s x₀) : ContMDiffWithinAt I' I n (fun x => (f x)⁻¹) s x₀

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[AddGroup G]
[LieAddGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{n : ℕ∞}
{f : M → G}
{s : Set M}
{x₀ : M}
(hf : ContMDiffWithinAt I' I n f s x₀)

ContMDiffWithinAt I' I n (fun x => -f x) s x₀


@[simp]
theorem lower_comm (F : MonoOver Y ⥤ MonoOver X) :
    toThinSkeleton _ ⋙ lower F = F ⋙ toThinSkeleton _

(F : CategoryTheory.Functor (CategoryTheory.MonoOver Y) (CategoryTheory.MonoOver X))

(CategoryTheory.toThinSkeleton (CategoryTheory.MonoOver Y)).comp (CategoryTheory.Subobject.lower F) =
  F.comp (CategoryTheory.toThinSkeleton (CategoryTheory.MonoOver X))


protected lemma ext_iff {χ₁ χ₂ : Weight R L M} : χ₁ = χ₂ ↔ (χ₁ : L → R) = χ₂

{R : Type u_2}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{χ₁ χ₂ : LieModule.Weight R L M}

χ₁ = χ₂ ↔ ⇑χ₁ = ⇑χ₂


/-- If values of `f : Y → X` belong to a compact set `s` eventually along a filter `l`
and `y` is a unique `MapClusterPt` for `f` along `l` in `s`,
then `f` tends to `𝓝 y` along `l`. -/
lemma IsCompact.tendsto_nhds_of_unique_mapClusterPt {l : Filter Y} {y : X} {f : Y → X}
    (hs : IsCompact s) (hmem : ∀ᶠ x in l, f x ∈ s) (h : ∀ x ∈ s, MapClusterPt x l f → x = y) :
    Tendsto f l (𝓝 y)


@[simp]
theorem natDegree_pow (p : R[X]) (n : ℕ) : natDegree (p ^ n) = n * natDegree p

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
(p : R[X])
(n : ℕ)


@[to_additive (attr := simp)]
theorem mul_seq {f g : FreeSemigroup (α → β)} {x : FreeSemigroup α} :
    f * g <*> x = (f <*> x) * (g <*> x)

{α β : Type u}
{f g : FreeSemigroup (α → β)}
{x : FreeSemigroup α}

(Seq.seq (f * g) fun x_1 => x) = (Seq.seq f fun x_1 => x) * Seq.seq g fun x_1 => x


theorem isReal_or_isComplex (w : InfinitePlace K) : IsReal w ∨ IsComplex w

{K : Type u_2}
[Field K]
(w : NumberField.InfinitePlace K)


theorem yn_succ_succ (n) : yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)

Pell.yn a1 (n + 2) + Pell.yn a1 n = 2 * a * Pell.yn a1 (n + 1)


theorem ite_id [Decidable c] {α} (t : α) : (if c then t else t) = t

{c : Prop}
[Decidable c]
{α : Sort u_1}
(t : α)


theorem pure_le_principal {s : Set α} (a : α) : pure a ≤ 𝓟 s ↔ a ∈ s


@[to_additive (attr := simp) norm_neg]
theorem norm_inv' (a : E) : ‖a⁻¹‖ = ‖a‖

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


@[simp]
theorem diagonal_map [Zero α] [Zero β] {f : α → β} (h : f 0 = 0) {d : n → α} :
    (diagonal d).map f = diagonal fun m => f (d m)

{n : Type u_3}
{α : Type v}
{β : Type w}
[DecidableEq n]
[Zero α]
[Zero β]
{f : α → β}
(h : f 0 = 0)
{d : n → α}

(Matrix.diagonal d).map f = Matrix.diagonal fun m => f (d m)


@[simp, norm_cast]
theorem pow_apply (f : CauSeq β abv) (n i : ℕ) : (f ^ n) i = f i ^ n

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(f : CauSeq β abv)
(n i : ℕ)


@[simp]
theorem coe_basisSingleOne : (Finsupp.basisSingleOne : ι → ι →₀ R) = fun i => Finsupp.single i 1

{R : Type u_1}
{ι : Type u_3}
[Semiring R]

⇑Finsupp.basisSingleOne = fun i => Finsupp.single i 1


/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGrp)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F

[CategoryTheory.Limits.HasColimit (F ⋙ CategoryTheory.forget₂ (ModuleCat R) AddCommGrp)]

(ModuleCat.HasColimit.colimitCocone F).pt = ModuleCat.mkOfSMul (ModuleCat.HasColimit.coconePointSMul F)


@[simp]
theorem sub (hf : IntervalIntegrable f μ a b) (hg : IntervalIntegrable g μ a b) :
    IntervalIntegrable (fun x => f x - g x) μ a b

{E : Type u_3}
[NormedAddCommGroup E]
{f g : ℝ → E}
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
(hf : IntervalIntegrable f μ a b)
(hg : IntervalIntegrable g μ a b)


lemma oddKernel_undef (a : UnitAddCircle) {x : ℝ} (hx : x ≤ 0) : oddKernel a x = 0


theorem coe_factor_orderIso_map_eq_one_iff {m u : Associates M} {n : Associates N} (hu' : u ≤ m)
    (d : Set.Iic m ≃o Set.Iic n) : (d ⟨u, hu'⟩ : Associates N) = 1 ↔ u = 1

{M : Type u_1}
[CancelCommMonoidWithZero M]
{N : Type u_2}
[CancelCommMonoidWithZero N]
{m u : Associates M}
{n : Associates N}
(hu' : u ≤ m)
(d : ↑(Set.Iic m) ≃o ↑(Set.Iic n))


theorem ordT5Nhd_mem_nhdsSet (hd : Disjoint s (closure t)) : ordT5Nhd s t ∈ 𝓝ˢ s

{X : Type u_1}
[LinearOrder X]
[TopologicalSpace X]
[OrderTopology X]
{s t : Set X}
(hd : Disjoint s (closure t))


theorem isNat_natSucc : {a : ℕ} → {a' c : ℕ} →
    IsNat a a' → Nat.succ a' = c → IsNat (a.succ) c

Mathlib.Meta.NormNum.IsNat a a' → a'.succ = c → Mathlib.Meta.NormNum.IsNat a.succ c


{x y z : ℤ}
(h : PythagoreanTriple x y z)


theorem frontier_preimage_re (s : Set ℝ) : frontier (re ⁻¹' s) = re ⁻¹' frontier s

frontier (Complex.re ⁻¹' s) = Complex.re ⁻¹' frontier s


/-- Let `f` be a local homeomorphism of a nontrivially normed field, let `a` be a point in its
target. if `f` is `n` times continuously differentiable at `f.symm a`, and if the derivative at
`f.symm a` is nonzero, then `f.symm` is `n` times continuously differentiable at the point `a`.

This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem PartialHomeomorph.contDiffAt_symm_deriv [CompleteSpace 𝕜] (f : PartialHomeomorph 𝕜 𝕜)
    {f₀' a : 𝕜} (h₀ : f₀' ≠ 0) (ha : a ∈ f.target) (hf₀' : HasDerivAt f f₀' (f.symm a))
    (hf : ContDiffAt 𝕜 n f (f.symm a)) : ContDiffAt 𝕜 n f.symm a

(hf₀' : HasDerivAt (↑f) f₀' (↑f.symm a))


lemma ContinuousAt.sup' (hf : ContinuousAt f x) (hg : ContinuousAt g x) :
    ContinuousAt (f ⊔ g) x

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
[Sup L]
[ContinuousSup L]
{f g : X → L}
{x : X}
(hf : ContinuousAt f x)
(hg : ContinuousAt g x)


/-- A cone on `F` with cone point `X` is the same as an element of `lim Hom(X, F·)`,
    naturally in `F` and `X`. -/
@[simps!]
noncomputable def whiskeringLimYonedaIsoCones : whiskeringLeft _ _ _ ⋙
    (whiskeringRight _ _ _).obj lim ⋙ (whiskeringLeft _ _ _).obj coyoneda ≅ cones J C

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

∀ (X_1 : Cᵒᵖ) (a : X.cones.obj X_1),
  ((CategoryTheory.Limits.whiskeringLimYonedaIsoCones J C).inv.app X).app X_1 a =
    (CategoryTheory.Limits.Types.limitEquivSections (X ⋙ CategoryTheory.coyoneda.obj X_1)).symm
      ((CategoryTheory.Limits.compCoyonedaSectionsEquiv X (Opposite.unop X_1)).symm a)


lemma ext₂ [ClosedUnderIsomorphisms S.P]
    (T : Triangle C) (hT : T ∈ distTriang C) (h₁ : S.P T.obj₁)
    (h₃ : S.P T.obj₃) : S.P T.obj₂

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

(S : CategoryTheory.Triangulated.Subcategory C)

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


/-- Subgroup closure of a set is monotone in its argument: if `h ⊆ k`,
then `closure h ≤ closure k`. -/
@[to_additive
      "Additive subgroup closure of a set is monotone in its argument: if `h ⊆ k`,
      then `closure h ≤ closure k`"]
theorem closure_mono ⦃h k : Set G⦄ (h' : h ⊆ k) : closure h ≤ closure k

{G : Type u_1}
[AddGroup G]
⦃h k : Set G⦄
(h' : h ⊆ k)

AddSubgroup.closure h ≤ AddSubgroup.closure k


lemma sq_pos_iff {a : R} : 0 < a ^ 2 ↔ a ≠ 0

{R : Type u_3}
[LinearOrderedSemiring R]
[ExistsAddOfLE R]
{a : R}


/-- Convolution is associative. This requires that
* all maps are a.e. strongly measurable w.r.t one of the measures
* `f ⋆[L, ν] g` exists almost everywhere
* `‖g‖ ⋆[μ] ‖k‖` exists almost everywhere
* `‖f‖ ⋆[ν] (‖g‖ ⋆[μ] ‖k‖)` exists at `x₀` -/
theorem convolution_assoc (hL : ∀ (x : E) (y : E') (z : E''), L₂ (L x y) z = L₃ x (L₄ y z)) {x₀ : G}
    (hf : AEStronglyMeasurable f ν) (hg : AEStronglyMeasurable g μ) (hk : AEStronglyMeasurable k μ)
    (hfg : ∀ᵐ y ∂μ, ConvolutionExistsAt f g y L ν)
    (hgk : ∀ᵐ x ∂ν, ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (mul ℝ ℝ) μ)
    (hfgk :
      ConvolutionExistsAt (fun x => ‖f x‖) ((fun x => ‖g x‖) ⋆[mul ℝ ℝ, μ] fun x => ‖k x‖) x₀
        (mul ℝ ℝ) ν) :
    ((f ⋆[L, ν] g) ⋆[L₂, μ] k) x₀ = (f ⋆[L₃, ν] g ⋆[L₄, μ] k) x₀

(hf : MeasureTheory.AEStronglyMeasurable f ν)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

(hk : MeasureTheory.AEStronglyMeasurable k μ)

(hfg : ∀ᵐ (y : G) ∂μ, MeasureTheory.ConvolutionExistsAt f g y L ν)

(hgk :
  ∀ᵐ (x : G) ∂ν, MeasureTheory.ConvolutionExistsAt (fun x => ‖g x‖) (fun x => ‖k x‖) x (ContinuousLinearMap.mul ℝ ℝ) μ)

(hfgk :
  MeasureTheory.ConvolutionExistsAt (fun x => ‖f x‖)
    (MeasureTheory.convolution (fun x => ‖g x‖) (fun x => ‖k x‖) (ContinuousLinearMap.mul ℝ ℝ) μ) x₀
    (ContinuousLinearMap.mul ℝ ℝ) ν)

MeasureTheory.convolution (MeasureTheory.convolution f g L ν) k L₂ μ x₀ =
  MeasureTheory.convolution f (MeasureTheory.convolution g k L₄ μ) L₃ ν x₀


@[scoped simp]
theorem map_sub_nsmul [AddGroup G] [AddGroup H] [AddConstMapClass F G H a b]
    (f : F) (x : G) (n : ℕ) : f (x - n • a) = f x - n • b

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{a : G}
{b : H}
[AddGroup G]
[AddGroup H]
[AddConstMapClass F G H a b]
(f : F)
(x : G)
(n : ℕ)


@[to_additive]
theorem snd_surjective : Surjective (snd : M ∗ N →* N)

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


@[simp]
theorem bot_add (a : WithBot α) : ⊥ + a = ⊥


lemma zsmul_int_int (a b : ℤ) : a • b = a * b


theorem Monic.eq_X_add_C (hm : p.Monic) (hnd : p.natDegree = 1) : p = X + C (p.coeff 0)

{R : Type u}
[Semiring R]
{p : R[X]}
(hm : p.Monic)
(hnd : p.natDegree = 1)

p = Polynomial.X + Polynomial.C (p.coeff 0)


@[reassoc (attr := simp)]
theorem inl_comp_pushoutComparison (f : X ⟶ Y) (g : X ⟶ Z) [HasPushout f g]
    [HasPushout (G.map f) (G.map g)] : pushout.inl _ _ ≫ pushoutComparison G f g =
      G.map (pushout.inl _ _)

[CategoryTheory.Limits.HasPushout (G.map f) (G.map g)]

CategoryTheory.Limits.pushout.inl (G.map f) (G.map g) ≫ CategoryTheory.Limits.pushoutComparison G f g =
  G.map (CategoryTheory.Limits.pushout.inl f g)


@[trans]
protected theorem Resp.Equiv.trans {n} {x y z : Resp n} (h1 : Resp.Equiv x y)
    (h2 : Resp.Equiv y z) : Resp.Equiv x z

{n : ℕ}
{x y z : PSet.Resp n}
(h1 : x.Equiv y)
(h2 : y.Equiv z)


@[simp]
theorem get!_none [Inhabited α] : (none : Option α).get! = default


theorem fourier_coe_apply {n : ℤ} {x : ℝ} :
    fourier n (x : AddCircle T) = Complex.exp (2 * π * Complex.I * n * x / T)

(fourier n) ↑x = Complex.exp (2 * ↑π * Complex.I * ↑n * ↑x / ↑T)


/-- Given two left-invariant measures which are finite on
compacts, they coincide in the following sense: they give the same value to the integral of
continuous compactly supported functions, up to a multiplicative constant. -/
@[to_additive exists_integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport]
lemma exists_integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport (μ' μ : Measure G)
    [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ'] :
    ∃ (c : ℝ≥0), ∀ (f : G → ℝ), Continuous f → HasCompactSupport f →
      ∫ x, f x ∂μ' = ∫ x, f x ∂(c • μ)

∃ c, ∀ (f : G → ℝ), Continuous f → HasCompactSupport f → ∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂c • μ


@[to_additive]
theorem eq_iff_exists (f : LocalizationMap S N) {x y} :
    f.toMap x = f.toMap y ↔ ∃ c : S, ↑c * x = c * y

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
{x y : M}

f.toMap x = f.toMap y ↔ ∃ c, ↑c * x = ↑c * y


lemma analyticAt_id (z : E) : AnalyticAt 𝕜 (id : E → E) z

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


theorem _root_.Nat.sum_divisors {n : ℕ} (hn : n ≠ 0) :
    ∑ d ∈ n.divisors, d = ∏ p ∈ n.primeFactors, ∑ k ∈ .range (n.factorization p + 1), p ^ k

∑ d ∈ n.divisors, d = ∏ p ∈ n.primeFactors, ∑ k ∈ Finset.range (n.factorization p + 1), p ^ k


theorem integral_one_div_one_add_sq :
    (∫ x : ℝ in a..b, ↑1 / (↑1 + x ^ 2)) = arctan b - arctan a

∫ (x : ℝ) in a..b, 1 / (1 + x ^ 2) = Real.arctan b - Real.arctan a


theorem image_eq_preimage_of_inverse {f : α → β} {g : β → α} (h₁ : LeftInverse g f)
    (h₂ : RightInverse g f) : image f = preimage g

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{g : β → α}
(h₁ : Function.LeftInverse g f)
(h₂ : Function.RightInverse g f)


@[to_additive (attr := measurability)]
protected theorem Measurable.leOnePart : Measurable fun x ↦ leOnePart (f x)

{α : Type u_1}
{β : Type u_2}
[Lattice α]
[Group α]
[MeasurableSpace α]
[MeasurableSpace β]
{f : β → α}
(hf : Measurable f)
[MeasurableSup α]
[MeasurableInv α]


@[simp, norm_cast]
theorem coe_comap (f : E →ₗ[𝕜] F) (S : PointedCone 𝕜 F) : (S.comap f : Set E) = f ⁻¹' S

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[AddCommMonoid F]
[Module 𝕜 F]
(f : E →ₗ[𝕜] F)
(S : PointedCone 𝕜 F)


@[simp] lemma isBounded_preimage_ofDual {s : Set α} :
    IsBounded (ofDual ⁻¹' s) ↔ IsBounded s

{α : Type u_2}
[Bornology α]
{s : Set α}

Bornology.IsBounded (⇑OrderDual.ofDual ⁻¹' s) ↔ Bornology.IsBounded s


theorem disjoint_nhds_nhdsSet : Disjoint (𝓝 x) (𝓝ˢ s) ↔ x ∉ closure s

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
{x : X}
{s : Set X}


@[simp]
theorem lookup_insert_of_ne {a a'} {b : β a} (s : Finmap β) (h : a' ≠ a) :
    lookup a' (insert a b s) = lookup a' s

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a a' : α}
{b : β a}
(s : Finmap β)
(h : a' ≠ a)

Finmap.lookup a' (Finmap.insert a b s) = Finmap.lookup a' s


theorem exchange {I J K : D ⥤ E} (α : F ⟶ G) (β : G ⟶ H) (γ : I ⟶ J) (δ : J ⟶ K) :
    (α ≫ β) ◫ (γ ≫ δ) = (α ◫ γ) ≫ β ◫ δ

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{F G H : CategoryTheory.Functor C D}
{I J K : CategoryTheory.Functor D E}
(α : F ⟶ G)
(β : G ⟶ H)
(γ : I ⟶ J)
(δ : J ⟶ K)

CategoryTheory.CategoryStruct.comp α β ◫ CategoryTheory.CategoryStruct.comp γ δ =
  CategoryTheory.CategoryStruct.comp (α ◫ γ) (β ◫ δ)


@[simp] lemma exterior_subset_iff_isOpen : exterior s ⊆ s ↔ IsOpen s

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


theorem iUnion_unpair {α} (f : ℕ → ℕ → Set α) :
    ⋃ n : ℕ, f n.unpair.1 n.unpair.2 = ⋃ (i : ℕ) (j : ℕ), f i j

⋃ n, f (Nat.unpair n).1 (Nat.unpair n).2 = ⋃ i, ⋃ j, f i j


theorem Icc_mem_nhds {a b x : α} (ha : a < x) (hb : x < b) : Icc a b ∈ 𝓝 x

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{a b x : α}
(ha : a < x)
(hb : x < b)


theorem gc_lowerClosure_coe :
    GaloisConnection (lowerClosure : Set α → LowerSet α) (↑)


theorem infs_subset_left : t₁ ⊆ t₂ → s ⊼ t₁ ⊆ s ⊼ t₂

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

t₁ ⊆ t₂ → s ⊼ t₁ ⊆ s ⊼ t₂


/-- This version of Banach-Steinhaus is stated in terms of suprema of `↑‖·‖₊ : ℝ≥0∞`
for convenience. -/
theorem banach_steinhaus_iSup_nnnorm {ι : Type*} [CompleteSpace E] {g : ι → E →SL[σ₁₂] F}
    (h : ∀ x, (⨆ i, ↑‖g i x‖₊) < ∞) : (⨆ i, ↑‖g i‖₊) < ∞

{E : Type u_1}
{F : Type u_2}
{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
{ι : Type u_5}
[CompleteSpace E]
{g : ι → E →SL[σ₁₂] F}
(h : ∀ (x : E), ⨆ i, ↑‖(g i) x‖₊ < ⊤)

⨆ i, ↑‖g i‖₊ < ⊤


/-- A set of nonzero vectors is linearly independent if and only if,
given a point `p₁`, the vectors added to `p₁` and `p₁` itself are
affinely independent. -/
theorem linearIndependent_set_iff_affineIndependent_vadd_union_singleton {s : Set V}
    (hs : ∀ v ∈ s, v ≠ (0 : V)) (p₁ : P) : LinearIndependent k (fun v => v : s → V) ↔
    AffineIndependent k (fun p => p : ({p₁} ∪ (fun v => v +ᵥ p₁) '' s : Set P) → P)

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set V}
(hs : ∀ v ∈ s, v ≠ 0)
(p₁ : P)

(LinearIndependent k fun (v : ↑s) => ↑v) ↔ AffineIndependent k fun p => ↑p


@[simp]
theorem natCast_comp {n : ℕ} : (n : R[X]).comp p = n

{R : Type u}
[Semiring R]
{p : R[X]}
{n : ℕ}


@[simp]
theorem grade_top [OrderTop 𝕆] [OrderTop α] [GradeMaxOrder 𝕆 α] : grade 𝕆 (⊤ : α) = ⊤

{𝕆 : Type u_1}
{α : Type u_3}
[PartialOrder 𝕆]
[Preorder α]
[OrderTop 𝕆]
[OrderTop α]
[GradeMaxOrder 𝕆 α]


theorem integral_deriv_comp_smul_deriv' {f f' : ℝ → ℝ} {g g' : ℝ → E} (hf : ContinuousOn f [[a, b]])
    (hff' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivWithinAt f (f' x) (Ioi x) x)
    (hf' : ContinuousOn f' [[a, b]]) (hg : ContinuousOn g [[f a, f b]])
    (hgg' : ∀ x ∈ Ioo (min (f a) (f b)) (max (f a) (f b)), HasDerivWithinAt g (g' x) (Ioi x) x)
    (hg' : ContinuousOn g' (f '' [[a, b]])) :
    (∫ x in a..b, f' x • (g' ∘ f) x) = (g ∘ f) b - (g ∘ f) a

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

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

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


theorem MapsTo.restrict_inj (h : MapsTo f s t) : Injective (h.restrict f s t) ↔ InjOn f s

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

Function.Injective (Set.MapsTo.restrict f s t h) ↔ Set.InjOn f s


theorem iSup_succ_eq_sup {α} (f : ℕ → α → ℝ≥0∞) (m : ℕ) (a : α) :
    ⨆ (k : ℕ) (_ : k ≤ m + 1), f k a = f m.succ a ⊔ ⨆ (k : ℕ) (_ : k ≤ m), f k a

{α : Sort u_3}
(f : ℕ → α → ℝ≥0∞)
(m : ℕ)
(a : α)

⨆ k, ⨆ (_ : k ≤ m + 1), f k a = f m.succ a ⊔ ⨆ k, ⨆ (_ : k ≤ m), f k a


@[simp]
theorem isWF_min_singleton (a) {hs : IsWF ({a} : Set α)} {hn : ({a} : Set α).Nonempty} :
    hs.min hn = a

{α : Type u_2}
[Preorder α]
(a : α)
{hs : {a}.IsWF}
{hn : {a}.Nonempty}


theorem Filter.Tendsto.cauchy_map {l : Filter β} [NeBot l] {f : β → α} {a : α}
    (h : Tendsto f l (𝓝 a)) : Cauchy (map f l)

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
{l : Filter β}
[l.NeBot]
{f : β → α}
{a : α}
(h : Filter.Tendsto f l (𝓝 a))


/-- A structure is countably generated if it is the closure of a countable subset. -/
class CG : Prop where
  out : (⊤ : L.Substructure M).CG

[self : FirstOrder.Language.Structure.CG L M]


theorem diam_pair : diam ({x, y} : Set α) = dist x y

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


theorem sInter_lift'_sets (hh : Monotone h) : ⋂₀ { s | s ∈ f.lift' h } = ⋂ s ∈ f, h s

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{h : Set α → Set β}
(hh : Monotone h)


theorem extend_source : (f.extend I).source = f.source

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


/-- **Integration by parts for Fréchet derivatives**
Version with a general bilinear form `B`.
If `B f g` is integrable, as well as `B f' g` and `B f g'` where `f'` and `g'` are derivatives
of `f` and `g` in a given direction `v`, then `∫ B f g' = - ∫ B f' g`. -/
theorem integral_bilinear_hasFDerivAt_right_eq_neg_left_of_integrable
    {f : E → F} {f' : E → (E →L[ℝ] F)}
    {g : E → G} {g' : E → (E →L[ℝ] G)} {v : E} {B : F →L[ℝ] G →L[ℝ] W}
    (hf'g : Integrable (fun x ↦ B (f' x v) (g x)) μ)
    (hfg' : Integrable (fun x ↦ B (f x) (g' x v)) μ)
    (hfg : Integrable (fun x ↦ B (f x) (g x)) μ)
    (hf : ∀ x, HasFDerivAt f (f' x) x) (hg : ∀ x, HasFDerivAt g (g' x) x) :
    ∫ x, B (f x) (g' x v) ∂μ = - ∫ x, B (f' x v) (g x) ∂μ

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

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

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

(hf : ∀ (x : E), HasFDerivAt f (f' x) x)

(hg : ∀ (x : E), HasFDerivAt g (g' x) x)


/-- The fully faithful embedding of `CompactlyGenerated` in `TopCat`. -/
@[simps!]
def compactlyGeneratedToTop : CompactlyGenerated.{u, w} ⥤ TopCat.{w}

CompactlyGenerated.compactlyGeneratedToTop.obj self = self.toTop


theorem mk_eq_mk_iff_sub_mem (x y : R) : mk I x = mk I y ↔ x - y ∈ I

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

(Ideal.Quotient.mk I) x = (Ideal.Quotient.mk I) y ↔ x - y ∈ I


theorem span_iUnion₂ {ι} {κ : ι → Sort*} (s : ∀ i, κ i → Set M) :
    span R (⋃ (i) (j), s i j) = ⨆ (i) (j), span R (s i j)

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Sort u_10}
{κ : ι → Sort u_9}
(s : (i : ι) → κ i → Set M)

Submodule.span R (⋃ i, ⋃ j, s i j) = ⨆ i, ⨆ j, Submodule.span R (s i j)


@[simp]
theorem next_reverse_eq_prev' (s : Cycle α) (hs : Nodup s.reverse) (x : α) (hx : x ∈ s.reverse) :
    s.reverse.next hs x hx = s.prev (nodup_reverse_iff.mp hs) x (mem_reverse_iff.mp hx)

{α : Type u_1}
[DecidableEq α]
(s : Cycle α)
(hs : s.reverse.Nodup)
(x : α)
(hx : x ∈ s.reverse)


/-- The first isomorphism theorem for monoids in the case of a homomorphism with right inverse. -/
@[to_additive (attr := simps)
  "The first isomorphism theorem for `AddMonoid`s in the case of a homomorphism
  with right inverse."]
def quotientKerEquivOfRightInverse (f : M →* P) (g : P → M) (hf : Function.RightInverse g f) :
    (ker f).Quotient ≃* P

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
(f : M →* P)
(g : P → M)
(hf : Function.RightInverse g ⇑f)
(a : (Con.ker f).Quotient)

(Con.quotientKerEquivOfRightInverse f g hf) a = (Con.kerLift f) a


theorem liftStar_lift_map {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, Z ⟶ F.obj x)
    (hM : ∀ (x y : C) (f : x ⟶ y), M x ≫ F.map f = M y) (x : C) :
    (liftStar F M hM).hom ≫ (lift F M hM).map (starInitial.to (incl.obj x)) =
      M x ≫ (inclLift F M hM).hom.app x

(hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (M x) (F.map f) = M y)

CategoryTheory.CategoryStruct.comp (CategoryTheory.WithInitial.liftStar F M hM).hom
    ((CategoryTheory.WithInitial.lift F M hM).map
      (CategoryTheory.WithInitial.starInitial.to (CategoryTheory.WithInitial.incl.obj x))) =
  CategoryTheory.CategoryStruct.comp (M x) ((CategoryTheory.WithInitial.inclLift F M hM).hom.app x)


theorem infsep_zero_iff_subsingleton_of_finite [Finite s] : s.infsep = 0 ↔ s.Subsingleton

{α : Type u_1}
[MetricSpace α]
{s : Set α}
[Finite ↑s]


@[simp]
lemma cyclesMap'_add :
    cyclesMap' (φ + φ') h₁ h₂ = cyclesMap' φ h₁ h₂ +
      cyclesMap' φ' h₁ h₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
{φ φ' : S₁ ⟶ S₂}
(h₁ : S₁.LeftHomologyData)
(h₂ : S₂.LeftHomologyData)

CategoryTheory.ShortComplex.cyclesMap' (φ + φ') h₁ h₂ =
  CategoryTheory.ShortComplex.cyclesMap' φ h₁ h₂ + CategoryTheory.ShortComplex.cyclesMap' φ' h₁ h₂


@[simp, norm_cast]
theorem coe_ennreal_eq_one {x : ℝ≥0∞} : (x : EReal) = 1 ↔ x = 1


theorem Ioi_subset_Ioc_union_Ioi : Ioi a ⊆ Ioc a b ∪ Ioi b

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


theorem comp_hom_eq_id (g : X ⟶ Y) [IsIso g] {f : Y ⟶ X} : f ≫ g = 𝟙 Y ↔ f = inv g

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

CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.id Y ↔ f = CategoryTheory.inv g


theorem limit.id_pre (F : J ⥤ C) : limit.pre F (𝟭 _) = lim.map (Functor.leftUnitor F).inv

CategoryTheory.Limits.limit.pre F (𝟭 J) = CategoryTheory.Limits.lim.map F.leftUnitor.inv


theorem henstock_le_mcShane : Henstock ≤ McShane


theorem natTrailingDegree_le_natTrailingDegree (hq : q ≠ 0)
    (hpq : p.trailingDegree ≤ q.trailingDegree) : p.natTrailingDegree ≤ q.natTrailingDegree


theorem natDegree_modByMonic_le (p : Polynomial R) {g : Polynomial R} (hg : g.Monic) :
    natDegree (p %ₘ g) ≤ g.natDegree

{R : Type u}
[Ring R]
(p : R[X])
{g : R[X]}
(hg : g.Monic)


theorem unsym_surjective : Surjective (unsym : αˢʸᵐ → α)


lemma XYIdeal'_eq {x y : F} (h : W.Nonsingular x y) :
    (XYIdeal' h : FractionalIdeal W.CoordinateRing⁰ W.FunctionField) = XYIdeal W x (C y)

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

↑(WeierstrassCurve.Affine.CoordinateRing.XYIdeal' h) =
  ↑(WeierstrassCurve.Affine.CoordinateRing.XYIdeal W x (Polynomial.C y))


theorem IsPath.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
    (cons h p).IsPath → p.IsPath

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
{h : G.Adj u v}
{p : G.Walk v w}

(SimpleGraph.Walk.cons h p).IsPath → p.IsPath


theorem algHom_subsingleton [Algebra R P] : Subsingleton (S →ₐ[R] P)

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
[Algebra R P]


theorem isOpen_induced {s : Set β} (h : IsOpen s) : IsOpen[induced f t] (f ⁻¹' s)

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


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

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

(f.mulIndicator hU) x = U.mulIndicator (⇑f) x


@[simp]
theorem apply_lineMap (f : P1 →ᵃ[k] P2) (p₀ p₁ : P1) (c : k) :
    f (lineMap p₀ p₁ c) = lineMap (f p₀) (f p₁) c

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
(f : P1 →ᵃ[k] P2)
(p₀ p₁ : P1)
(c : k)

f ((AffineMap.lineMap p₀ p₁) c) = (AffineMap.lineMap (f p₀) (f p₁)) c


/-- `∏ i, (f i + g i) = (∏ i, f i) + ∑ i, g i * (∏ j < i, f j + g j) * (∏ j > i, f j)`. -/
theorem prod_add_ordered [LinearOrder ι] [CommSemiring α] (s : Finset ι) (f g : ι → α) :
    ∏ i ∈ s, (f i + g i) =
      (∏ i ∈ s, f i) +
        ∑ i ∈ s,
          g i * (∏ j ∈ s.filter (· < i), (f j + g j)) * ∏ j ∈ s.filter fun j => i < j, f j

{ι : Type u_1}
{α : Type u_2}
[LinearOrder ι]
[CommSemiring α]
(s : Finset ι)
(f g : ι → α)

∏ i ∈ s, (f i + g i) =
  ∏ i ∈ s, f i +
    ∑ i ∈ s, (g i * ∏ j ∈ Finset.filter (fun x => x < i) s, (f j + g j)) * ∏ j ∈ Finset.filter (fun j => i < j) s, f j


/-- **Jensen's inequality**: if a function `g : E → ℝ` is concave and continuous on a convex closed
set `s`, `μ` is a finite non-zero measure on `α`, and `f : α → E` is a function sending
`μ`-a.e. points to `s`, then the average value of `g ∘ f` is less than or equal to the value of `g`
at the average value of `f` provided that both `f` and `g ∘ f` are integrable. See also
`ConcaveOn.le_map_centerMass` for a finite sum version of this lemma. -/
theorem ConcaveOn.le_map_average [IsFiniteMeasure μ] [NeZero μ]
    (hg : ConcaveOn ℝ s g) (hgc : ContinuousOn g s) (hsc : IsClosed s)
    (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) (hgi : Integrable (g ∘ f) μ) :
    (⨍ x, g (f x) ∂μ) ≤ g (⨍ x, f x ∂μ)

(hgi : MeasureTheory.Integrable (g ∘ f) μ)

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


@[simp] theorem diff_append (l₁ l₂ l₃ : List α) : l₁.diff (l₂ ++ l₃) = (l₁.diff l₂).diff l₃

{α : Type u_1}
[BEq α]
[LawfulBEq α]
(l₁ l₂ l₃ : List α)


theorem pushforward_le_bind_of_mem (S : Presieve X) (R : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄, S f → Sieve Y)
    (f : Y ⟶ X) (h : S f) : (R h).pushforward f ≤ bind S R

(R : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S f → CategoryTheory.Sieve Y)

CategoryTheory.Sieve.pushforward f (R h) ≤ CategoryTheory.Sieve.bind S R


theorem Multiplicative.isSubgroup {s : Set A} (hs : IsAddSubgroup s) :
    @IsSubgroup (Multiplicative A) _ s

{A : Type u_3}
[AddGroup A]
{s : Set A}
(hs : IsAddSubgroup s)


lemma restrictPreimage_surjective (hf : Surjective f) : Surjective (t.restrictPreimage f)

{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Function.Surjective f)


@[to_additive] lemma MulDissociated.subset {t : Set α} (hst : s ⊆ t) (ht : MulDissociated t) :
    MulDissociated s

{α : Type u_1}
[AddCommGroup α]
{s t : Set α}
(hst : s ⊆ t)
(ht : AddDissociated t)


@[to_additive]
private lemma card_mul_pow_le (hAB : ∀ A' ⊆ A, (A * B).card * A'.card ≤ (A' * B).card * A.card)
    (n : ℕ) : (A * B ^ n).card ≤ ((A * B).card / A.card : ℚ≥0) ^ n * A.card

(hAB : ∀ A' ⊆ A, (A + B).card * A'.card ≤ (A' + B).card * A.card)

↑(A + n • B).card ≤ (↑(A + B).card / ↑A.card) ^ n * ↑A.card


protected theorem map_add (x y : M) : f (x + y) = f x + f y

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₃ : Type u_12}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₃]
[Module R M]
[Module S M₃]
{σ : R →+* S}
(f : M →ₛₗ[σ] M₃)
(x y : M)


@[to_additive]
lemma ofUnits_iSup₂ {ι : Sort*} {κ : ι → Sort*} (f : (i : ι) → κ i → Subgroup Mˣ) :
    (⨆ (i : ι), ⨆ (j : κ i), f i j).ofUnits = ⨆ (i : ι), ⨆ (j : κ i), (f i j).ofUnits

(f : (i : ι) → κ i → AddSubgroup (AddUnits M))

(⨆ i, ⨆ j, f i j).ofAddUnits = ⨆ i, ⨆ j, (f i j).ofAddUnits


/-- LDU decomposition of a block matrix with an invertible top-left corner, using the
Schur complement. -/
theorem fromBlocks_eq_of_invertible₁₁ (A : Matrix m m α) (B : Matrix m n α) (C : Matrix l m α)
    (D : Matrix l n α) [Invertible A] :
    fromBlocks A B C D =
      fromBlocks 1 0 (C * ⅟ A) 1 * fromBlocks A 0 0 (D - C * ⅟ A * B) *
        fromBlocks 1 (⅟ A * B) 0 1

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{α : Type u_4}
[Fintype l]
[Fintype m]
[Fintype n]
[DecidableEq l]
[DecidableEq m]
[DecidableEq n]
[CommRing α]
(A : Matrix m m α)
(B : Matrix m n α)
(C : Matrix l m α)
(D : Matrix l n α)
[Invertible A]

Matrix.fromBlocks A B C D =
  Matrix.fromBlocks 1 0 (C * ⅟A) 1 * Matrix.fromBlocks A 0 0 (D - C * ⅟A * B) * Matrix.fromBlocks 1 (⅟A * B) 0 1


theorem not_isMin_iff_ne_bot : ¬IsMin a ↔ a ≠ ⊥

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


/--
`HasRankNullity.{u}` is a class of rings satisfying
1. Every `R`-module `M : Type u` has a linear independent subset of cardinality `Module.rank R M`.
2. `rank (M ⧸ N) + rank N = rank M` for every `R`-module `M : Type u` and every `N : Submodule R M`.

Usually such a ring satisfies `HasRankNullity.{w}` for all universes `w`, and the universe
argument is there because of technical limitations to universe polymorphism.

See `DivisionRing.hasRankNullity` and `IsDomain.hasRankNullity`.
-/
@[pp_with_univ]
class HasRankNullity (R : Type v) [inst : Ring R] : Prop where
  exists_set_linearIndependent : ∀ (M : Type u) [AddCommGroup M] [Module R M],
    ∃ s : Set M, #s = Module.rank R M ∧ LinearIndependent (ι := s) R Subtype.val
  rank_quotient_add_rank : ∀ {M : Type u} [AddCommGroup M] [Module R M] (N : Submodule R M),
    Module.rank R (M ⧸ N) + Module.rank R N = Module.rank R M

{R : Type v}
[inst : Ring R]
[self : HasRankNullity.{u, v} R]
{M : Type u}
[AddCommGroup M]
[Module R M]
(N : Submodule R M)

Module.rank R (M ⧸ N) + Module.rank R ↥N = Module.rank R M


theorem deriv_cos : deriv cos x = -sin x


lemma single_mul_left_apply (i j : ι) (a : α i) (f : ∀ i, α i) :
    single i (a * f i) j = single i a j * f j

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → MulZeroClass (α i)]
[DecidableEq ι]
(i j : ι)
(a : α i)
(f : (i : ι) → α i)

Pi.single i (a * f i) j = Pi.single i a j * f j


@[to_additive]
theorem Nonempty.smul : s.Nonempty → t.Nonempty → (s • t).Nonempty

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s : Set α}
{t : Set β}

s.Nonempty → t.Nonempty → (s +ᵥ t).Nonempty


theorem mul_iSup {ι : Sort*} {f : ι → ℝ≥0∞} {a : ℝ≥0∞} : a * iSup f = ⨆ i, a * f i

{ι : Sort u_4}
{f : ι → ℝ≥0∞}
{a : ℝ≥0∞}


@[simp, norm_cast]
theorem cast_eq_zero {n : ℕ} : (n : R) = 0 ↔ n = 0

{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
{n : ℕ}


theorem primeFactorsList_sublist_of_dvd {n k : ℕ} (h : n ∣ k) (h' : k ≠ 0) :
    n.primeFactorsList <+ k.primeFactorsList


theorem continuous_swapTrue  :
    Continuous (SwapTrue o : (I → Bool) → I → Bool)

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
(o : Ordinal.{u})


lemma stdSimplex_fin_two :
    stdSimplex 𝕜 (Fin 2) = ([Pi.single 0 1 -[𝕜] Pi.single 1 1] : Set (Fin 2 → 𝕜))

stdSimplex 𝕜 (Fin 2) = [Pi.single 0 1-[𝕜]Pi.single 1 1]


/--
The bijection allows us to show that `prodComparison L A B` is an isomorphism, where the inverse
is the forward map of the identity morphism.
-/
theorem prodComparison_iso (A B : C) : IsIso (prodComparison (reflector i) A B)

CategoryTheory.IsIso (CategoryTheory.Limits.prodComparison (CategoryTheory.reflector i) A B)


@[simp]
theorem toL1_eq_mk (f : α → β) (hf : Integrable f μ) :
    (hf.toL1 f : α →ₘ[μ] β) = AEEqFun.mk f hf.aestronglyMeasurable

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
(f : α → β)
(hf : MeasureTheory.Integrable f μ)

↑(MeasureTheory.Integrable.toL1 f hf) = MeasureTheory.AEEqFun.mk f ⋯


theorem right_ore_of_pullbacks [Limits.HasPullbacks C] : RightOreCondition C

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


@[to_additive] lemma Left.min_le_max_of_mul_le_mul
    [CovariantClass α α (· * ·) (· < ·)] [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
    (h : a * b ≤ c * d) : min a b ≤ max c d

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

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


@[to_additive even_two_nsmul] lemma IsSquare_sq (a : α) : IsSquare (a ^ 2)


@[to_additive]
protected theorem pow_mem {x : G} (hx : x ∈ K) : ∀ n : ℕ, x ^ n ∈ K

{G : Type u_1}
[AddGroup G]
(K : AddSubgroup G)
{x : G}
(hx : x ∈ K)
(n : ℕ)


@[to_additive]
theorem alternatingProd_cons_cons [DivInvMonoid α] (a b : α) (l : List α) :
    alternatingProd (a :: b :: l) = a / b * alternatingProd l

{α : Type u_2}
[SubNegMonoid α]
(a b : α)
(l : List α)

(a :: b :: l).alternatingSum = a - b + l.alternatingSum


/-- To show a property on elements of `M ^ n` holds, it suffices to show that it holds for scalars,
is closed under addition, and holds for `m * x` where `m ∈ M` and it holds for `x` -/
@[elab_as_elim]
protected theorem pow_induction_on_left {C : A → Prop} (hr : ∀ r : R, C (algebraMap _ _ r))
    (hadd : ∀ x y, C x → C y → C (x + y)) (hmul : ∀ m ∈ M, ∀ (x), C x → C (m * x)) {x : A} {n : ℕ}
    (hx : x ∈ M ^ n) : C x

(hr : ∀ (r : R), C ((algebraMap R A) r))

(hadd : ∀ (x y : A), C x → C y → C (x + y))

(hmul : ∀ m ∈ M, ∀ (x : A), C x → C (m * x))


lemma mul_mul_div (a : G₀) (hb : b ≠ 0) : a = a * b * (1 / b)

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


@[to_additive] lemma threeGPFree_insert :
    ThreeGPFree (insert a s) ↔ ThreeGPFree s ∧
      (∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → a * c = b * b → a = b) ∧
        ∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → b * c = a * a → b = a

{α : Type u_2}
[AddCancelCommMonoid α]
{s : Set α}
{a : α}

ThreeAPFree (insert a s) ↔
  ThreeAPFree s ∧
    (∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a + c = b + b → a = b) ∧
      ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → b + c = a + a → b = a


theorem Monovary.dual : Monovary f g → Monovary (toDual ∘ f) (toDual ∘ g)

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}

Monovary f g → Monovary (⇑OrderDual.toDual ∘ f) (⇑OrderDual.toDual ∘ g)


@[to_additive (attr := simp)] theorem swap_comp_inl : (swap M N).comp inl = inr

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

(Monoid.Coprod.swap M N).comp Monoid.Coprod.inl = Monoid.Coprod.inr


theorem lintegral_mono {f g : α →ₘ[μ] ℝ≥0∞} : f ≤ g → lintegral f ≤ lintegral g

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{f g : α →ₘ[μ] ℝ≥0∞}


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

SimplexCategory.toTop.obj x = TopCat.of ↑x.toTopObj


@[to_additive]
theorem leftCoset_cover_filter_FiniteIndex_aux
    [DecidablePred (FiniteIndex : Subgroup G → Prop)] :
    (⋃ k ∈ s.filter (fun i => (H i).FiniteIndex), g k • (H k : Set G) = Set.univ) ∧
      (1 ≤ ∑ i ∈ s, ((H i).index : ℚ)⁻¹) ∧
      (∑ i ∈ s, ((H i).index : ℚ)⁻¹ = 1 → Set.PairwiseDisjoint
        (s.filter (fun i => (H i).FiniteIndex)) (fun i ↦ g i • (H i : Set G)))

(hcovers : ⋃ i ∈ s, g i • ↑(H i) = Set.univ)

⋃ k ∈ Finset.filter (fun i => (H i).FiniteIndex) s, g k • ↑(H k) = Set.univ ∧
  1 ≤ ∑ i ∈ s, (↑(H i).index)⁻¹ ∧
    (∑ i ∈ s, (↑(H i).index)⁻¹ = 1 →
      (↑(Finset.filter (fun i => (H i).FiniteIndex) s)).PairwiseDisjoint fun i => g i • ↑(H i))


theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).subtype fun n : ℕ => 0 < n

Finset.Ioo a b = Finset.subtype (fun n => 0 < n) (Finset.Ioo ↑a ↑b)


/-- For primes `p`, `choose n k` is congruent to the product of `choose (⌊n / p ^ i⌋ % p)
(⌊k / p ^ i⌋ % p)` over i < a, multiplied by `choose (⌊n / p ^ a⌋) (⌊k / p ^ a⌋)`, modulo `p`. -/
theorem choose_modEq_choose_mul_prod_range_choose (a : ℕ) :
    choose n k ≡ choose (n / p ^ a) (k / p ^ a) *
      ∏ i in range a, choose (n / p ^ i % p) (k / p ^ i % p) [ZMOD p]

{n k p : ℕ}
[Fact (Nat.Prime p)]
(a : ℕ)

↑(n.choose k) ≡
  ↑((n / p ^ a).choose (k / p ^ a)) * ↑(∏ i ∈ Finset.range a, (n / p ^ i % p).choose (k / p ^ i % p)) [ZMOD ↑p]


@[simp]
theorem taylor_C (x : R) : taylor r (C x) = C x

(Polynomial.taylor r) (Polynomial.C x) = Polynomial.C x


@[simp] theorem decomposeLinearEquiv_apply (m : M) :
    decomposeLinearEquiv ℳ m = decompose ℳ m

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
[DecidableEq ι]
[Semiring R]
[AddCommMonoid M]
[Module R M]
(ℳ : ι → Submodule R M)
[DirectSum.Decomposition ℳ]
(m : M)

(DirectSum.decomposeLinearEquiv ℳ) m = (DirectSum.decompose ℳ) m


theorem inducing_pullback_to_prod {X Y Z : TopCat.{u}} (f : X ⟶ Z) (g : Y ⟶ Z) :
    Inducing <| ⇑(prod.lift (pullback.fst f g) (pullback.snd f g))

{X Y Z : TopCat}
(f : X ⟶ Z)
(g : Y ⟶ Z)

Inducing
  ⇑(CategoryTheory.Limits.prod.lift (CategoryTheory.Limits.pullback.fst f g) (CategoryTheory.Limits.pullback.snd f g))


theorem reaches_eval {σ} {f : σ → Option σ} {a b} (ab : Reaches f a b) : eval f a = eval f b

{σ : Type u_1}
{f : σ → Option σ}
{a b : σ}
(ab : Turing.Reaches f a b)


/-- The `n`-th ghost component of `teichmuller p r` is `r ^ p ^ n`. -/
@[simp]
theorem ghostComponent_teichmuller (r : R) (n : ℕ) :
    ghostComponent n (teichmuller p r) = r ^ p ^ n

(p : ℕ)
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
(r : R)
(n : ℕ)

(WittVector.ghostComponent n) ((WittVector.teichmuller p) r) = r ^ p ^ n


@[simp]
theorem center.coe_div (a b : center K) : ((a / b : center K) : K) = (a : K) / (b : K)

{K : Type u}
[DivisionRing K]
(a b : ↥(Subring.center K))


@[simp]
theorem get_append_cons_succ {i : Fin (n + m)} {h} :
    get (append (x ::ᵥ xs) ys) ⟨i+1, h⟩ = get (append xs ys) i

{α : Type u_1}
{m n : ℕ}
(xs : Mathlib.Vector α n)
(ys : Mathlib.Vector α m)
{x : α}
{i : Fin (n + m)}
{h : ↑i + 1 < n.succ + m}

((x ::ᵥ xs).append ys).get ⟨↑i + 1, h⟩ = (xs.append ys).get i


/--
The evaluation functor at `i : I`, sending an `I`-indexed family of objects to the object over `i`.
-/
@[simps]
def eval (i : I) : (∀ i, C i) ⥤ C i

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

(CategoryTheory.Pi.eval C i).obj f = f i


theorem cthickening_eq_iInter_thickening'' (δ : ℝ) (E : Set α) :
    cthickening δ E = ⋂ (ε : ℝ) (_ : max 0 δ < ε), thickening ε E

{α : Type u}
[PseudoEMetricSpace α]
(δ : ℝ)
(E : Set α)

Metric.cthickening δ E = ⋂ ε, ⋂ (_ : max 0 δ < ε), Metric.thickening ε E


/-- The functor taking a monoid to its subgroup of units. -/
@[simps]
def MonCat.units : MonCat.{u} ⥤ Grp.{u}


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

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


lemma borelMarkovFromReal_apply' (Ω : Type*) [Nonempty Ω] [MeasurableSpace Ω] [StandardBorelSpace Ω]
    (η : Kernel α ℝ) (a : α) {s : Set Ω} (hs : MeasurableSet s) :
    borelMarkovFromReal Ω η a s
      = if η a (range (embeddingReal Ω))ᶜ = 0 then η a (embeddingReal Ω '' s)
        else (embeddingReal Ω '' s).indicator 1 (range_nonempty (embeddingReal Ω)).choose

{α : Type u_1}
{mα : MeasurableSpace α}
(Ω : Type u_5)
[Nonempty Ω]
[MeasurableSpace Ω]
[StandardBorelSpace Ω]
(η : ProbabilityTheory.Kernel α ℝ)
(a : α)
{s : Set Ω}
(hs : MeasurableSet s)

((ProbabilityTheory.Kernel.borelMarkovFromReal Ω η) a) s =
  if (η a) (Set.range (MeasureTheory.embeddingReal Ω))ᶜ = 0 then (η a) (MeasureTheory.embeddingReal Ω '' s)
  else (MeasureTheory.embeddingReal Ω '' s).indicator 1 (Exists.choose ⋯)


@[simp]
theorem out_mk {α} (a : α) : (mk a).out = a


theorem mem_facets : s ∈ K.facets ↔ s ∈ K.faces ∧ ∀ t ∈ K.faces, s ⊆ t → s = t

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{K : Geometry.SimplicialComplex 𝕜 E}
{s : Finset E}


@[to_additive]
theorem div_right_comm : a / b / c = a / c / b

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


@[simp] lemma comap_dep_iff :
    (N.comap f).Dep I ↔ N.Dep (f '' I) ∨ (N.Indep (f '' I) ∧ ¬ InjOn f I)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{I : Set α}
{N : Matroid β}

(N.comap f).Dep I ↔ N.Dep (f '' I) ∨ N.Indep (f '' I) ∧ ¬Set.InjOn f I


theorem nonzero_of_invertible [MulZeroOneClass α] (a : α) [Nontrivial α] [Invertible a] : a ≠ 0

{α : Type u}
[MulZeroOneClass α]
(a : α)
[Nontrivial α]
[Invertible a]


theorem conjTranspose_reindex [Star α] (eₘ : m ≃ l) (eₙ : n ≃ o) (M : Matrix m n α) :
    (reindex eₘ eₙ M)ᴴ = reindex eₙ eₘ Mᴴ

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[Star α]
(eₘ : m ≃ l)
(eₙ : n ≃ o)
(M : Matrix m n α)

((Matrix.reindex eₘ eₙ) M)ᴴ = (Matrix.reindex eₙ eₘ) Mᴴ


theorem map_injective (f : R →+* S) (hf : Injective f) : Injective (map f : 𝕎 R → 𝕎 S)

{p : ℕ}
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)
(hf : Function.Injective ⇑f)


@[simp]
theorem subset_singleton_iff {s : Finset α} {a : α} : s ⊆ {a} ↔ s = ∅ ∨ s = {a}


@[simp]
theorem equiv_symm_smul : (WithLp.equiv p V).symm (c • x') = c • (WithLp.equiv p V).symm x'

(p : ℝ≥0∞)
{K : Type uK}
{V : Type uV}
[Semiring K]
[AddCommGroup V]
[Module K V]
(c : K)
(x' : V)


@[to_additive]
theorem lipschitzWith_lipschitz_const_mul_edist [_i : LipschitzMul β] :
    LipschitzWith (LipschitzMul.C β) fun p : β × β => p.1 * p.2

{β : Type u_2}
[PseudoMetricSpace β]
[Monoid β]
[_i : LipschitzMul β]

LipschitzWith (LipschitzMul.C β) fun p => p.1 * p.2


theorem isOpen_extChartAt_preimage' (x : M) {s : Set E} (hs : IsOpen s) :
    IsOpen ((extChartAt I x).source ∩ extChartAt I x ⁻¹' s)

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
(x : M)
{s : Set E}
(hs : IsOpen s)

IsOpen ((extChartAt I x).source ∩ ↑(extChartAt I x) ⁻¹' s)


theorem length_filter_le (p : α → Bool) (l : List α) :
    (l.filter p).length ≤ l.length

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


@[to_additive]
theorem map_mul_left_ae (μ : Measure G) [IsMulLeftInvariant μ] (x : G) :
    Filter.map (fun h => x * h) (ae μ) = ae μ

{G : Type u_2}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd G]
(μ : MeasureTheory.Measure G)
[μ.IsAddLeftInvariant]
(x : G)

Filter.map (fun h => x + h) (MeasureTheory.ae μ) = MeasureTheory.ae μ


private lemma trans_aux (hst : toColex s ≤ toColex t) (htu : toColex t ≤ toColex u)
    (has : a ∈ s) (hat : a ∉ t) : ∃ b, b ∈ u ∧ b ∉ s ∧ a ≤ b

(hst : { ofColex := s } ≤ { ofColex := t })

(htu : { ofColex := t } ≤ { ofColex := u })


@[simp, norm_cast] lemma coe_subtype (L : Sublattice α) : L.subtype = ((↑) : L → α)

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


protected theorem acc (f : r ≼i s) (a : α) : Acc r a ↔ Acc s (f a)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≼i s)
(a : α)


@[ext]
theorem ext {w w' : NormalWord d}
    (h1 : w.head = w'.head) (h2 : w.toList = w'.toList) : w = w'

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


theorem singleton_mem_pure {a : α} : {a} ∈ (pure a : Filter α)


theorem cmp_compares [LinearOrder α] (a b : α) : (cmp a b).Compares a b

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


@[simp]
theorem char_linHom (V W : FDRep k G) (g : G) :
    (of (linHom V.ρ W.ρ)).character g = V.character g⁻¹ * W.character g

{k : Type u}
[Field k]
{G : Type u}
[Group G]
(V W : FDRep k G)
(g : G)

(FDRep.of (Representation.linHom V.ρ W.ρ)).character g = V.character g⁻¹ * W.character g


theorem succ_lt_succ {n m : Nat} : n < m → succ n < succ m


/-- Consider a function `d : X → X → ℝ≥0` such that `d x x = 0` and `d x y = d y x` for all `x`,
`y`. Let `dist` be the largest pseudometric distance such that `dist x y ≤ d x y`, see
`PseudoMetricSpace.ofPreNNDist`. Suppose that `d` satisfies the following triangle-like
inequality: `d x₁ x₄ ≤ 2 * max (d x₁ x₂, d x₂ x₃, d x₃ x₄)`. Then `d x y ≤ 2 * dist x y` for all
`x`, `y`. -/
theorem le_two_mul_dist_ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x)
    (hd : ∀ x₁ x₂ x₃ x₄, d x₁ x₄ ≤ 2 * max (d x₁ x₂) (max (d x₂ x₃) (d x₃ x₄))) (x y : X) :
    ↑(d x y) ≤ 2 * @dist X
      (@PseudoMetricSpace.toDist X (PseudoMetricSpace.ofPreNNDist d dist_self dist_comm)) x y

(dist_comm : ∀ (x y : X), d x y = d y x)

(hd : ∀ (x₁ x₂ x₃ x₄ : X), d x₁ x₄ ≤ 2 * max (d x₁ x₂) (max (d x₂ x₃) (d x₃ x₄)))


theorem wellFoundedOn_sup [IsStrictOrder α r] (s : Finset ι) {f : ι → Set α} :
    (s.sup f).WellFoundedOn r ↔ ∀ i ∈ s, (f i).WellFoundedOn r

{ι : Type u_1}
{α : Type u_2}
{r : α → α → Prop}
[IsStrictOrder α r]
(s : Finset ι)
{f : ι → Set α}


@[simp]
lemma preNormEDS'_three : preNormEDS' b c d 3 = c


/-- Induction step in M. Riesz extension theorem. Given a convex cone `s` in a vector space `E`,
a partially defined linear map `f : f.domain → ℝ`, assume that `f` is nonnegative on `f.domain ∩ p`
and `p + s = E`. If `f` is not defined on the whole `E`, then we can extend it to a larger
submodule without breaking the non-negativity condition. -/
theorem step (nonneg : ∀ x : f.domain, (x : E) ∈ s → 0 ≤ f x)
    (dense : ∀ y, ∃ x : f.domain, (x : E) + y ∈ s) (hdom : f.domain ≠ ⊤) :
    ∃ g, f < g ∧ ∀ x : g.domain, (x : E) ∈ s → 0 ≤ g x

(nonneg : ∀ (x : ↥f.domain), ↑x ∈ s → 0 ≤ ↑f x)

∃ g, f < g ∧ ∀ (x : ↥g.domain), ↑x ∈ s → 0 ≤ ↑g x


/-- A function is partial recursive if and only if there is a code implementing it. Therefore,
`eval` is a **universal partial recursive function**. -/
theorem exists_code {f : ℕ →. ℕ} : Nat.Partrec f ↔ ∃ c : Code, eval c = f


@[simp]
lemma top_toAddSubgroup {R M} [Ring R] [AddCommGroup M] [Module R M] :
    (⊤ : Submodule R M).toAddSubgroup = ⊤

{R : Type u_4}
{M : Type u_5}
[Ring R]
[AddCommGroup M]
[Module R M]


/-- A right homology data for a short complex `S` in the opposite category
induces a left homology data for `S.unop`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : S.RightHomologyData) : S.unop.LeftHomologyData


@[to_additive]
theorem multipliable_mabs_iff [LinearOrderedCommGroup α] [UniformSpace α] [UniformGroup α]
    [CompleteSpace α] {f : ι → α} : (Multipliable fun x ↦ mabs (f x)) ↔ Multipliable f

{ι : Type u_1}
{α : Type u_3}
[LinearOrderedCommGroup α]
[UniformSpace α]
[UniformGroup α]
[CompleteSpace α]
{f : ι → α}

(Multipliable fun x => mabs (f x)) ↔ Multipliable f


lemma update_piecewise_of_not_mem [DecidableEq ι] {i : ι} (hi : i ∉ s) (v : π i) :
    update (s.piecewise f g) i v = s.piecewise f (update g i v)

{ι : Type u_1}
{π : ι → Sort u_2}
(s : Finset ι)
(f g : (i : ι) → π i)
[(j : ι) → Decidable (j ∈ s)]
[DecidableEq ι]
{i : ι}
(hi : i ∉ s)
(v : π i)

Function.update (s.piecewise f g) i v = s.piecewise f (Function.update g i v)


theorem integral_gaussian_complex {b : ℂ} (hb : 0 < re b) :
    ∫ x : ℝ, cexp (-b * (x : ℂ) ^ 2) = (π / b) ^ (1 / 2 : ℂ)


/-- A surjective relation embedding is a relation isomorphism. -/
@[simps! apply]
noncomputable def ofSurjective (f : r ↪r s) (H : Surjective f) : r ≃r s

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ↪r s)
(H : Function.Surjective ⇑f)
(a : α)


theorem IsTheta.pow {f : α → 𝕜} {g : α → 𝕜'} (h : f =Θ[l] g) (n : ℕ) :
    (fun x ↦ f x ^ n) =Θ[l] fun x ↦ g x ^ n

{α : Type u_1}
{𝕜 : Type u_14}
{𝕜' : Type u_15}
[NormedField 𝕜]
[NormedField 𝕜']
{l : Filter α}
{f : α → 𝕜}
{g : α → 𝕜'}
(h : f =Θ[l] g)
(n : ℕ)

(fun x => f x ^ n) =Θ[l] fun x => g x ^ n


@[to_additive]
theorem subgroupOf_bot_eq_top : H.subgroupOf ⊥ = ⊤

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


/-- The `n` weighted homogeneous component of a polynomial is weighted homogeneous of
weighted degree `n`. -/
theorem weightedHomogeneousComponent_isWeightedHomogeneous :
    (weightedHomogeneousComponent w n φ).IsWeightedHomogeneous w n

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
{σ : Type u_3}
[AddCommMonoid M]
{w : σ → M}
(n : M)
(φ : MvPolynomial σ R)

MvPolynomial.IsWeightedHomogeneous w ((MvPolynomial.weightedHomogeneousComponent w n) φ) n


theorem bind_assoc {s : Multiset α} {f : α → Multiset β} {g : β → Multiset γ} :
    (s.bind f).bind g = s.bind fun a => (f a).bind g

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
{s : Multiset α}
{f : α → Multiset β}
{g : β → Multiset γ}


/-- Equivalence of categories is transitive. -/
@[trans, simps]
def trans (e : C ≌ D) (f : D ≌ E) : C ≌ E

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
(e : C ≌ D)
(f : D ≌ E)

(e.trans f).functor = e.functor.comp f.functor


theorem parts_partition {σ : Perm α} :
    σ.partition.parts = σ.cycleType + Multiset.replicate (Fintype.card α - σ.support.card) 1

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{σ : Equiv.Perm α}


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

{G : Type u_1}
[AddGroup G]
{S : Type u_6}
{H : S}
[SetLike S G]
[AddSubgroupClass S G]
{x y : G}
(h : x ∈ H)


@[to_additive eq_addCosets_of_normal]
theorem eq_cosets_of_normal (N : s.Normal) (g : α) : g • (s : Set α) = op g • s

{α : Type u_1}
[Group α]
(s : Subgroup α)
(N : s.Normal)
(g : α)


@[simp, mfld_simps]
theorem refl_trans : (PartialHomeomorph.refl X).trans e = e

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


@[simp]
theorem realize_constantsToVars [L[[α]].Structure M] [(lhomWithConstants L α).IsExpansionOn M]
    {t : L[[α]].Term β} {v : β → M} :
    t.constantsToVars.realize (Sum.elim (fun a => ↑(L.con a)) v) = t.realize v

FirstOrder.Language.Term.realize (Sum.elim (fun a => ↑(L.con a)) v) t.constantsToVars =
  FirstOrder.Language.Term.realize v t


/-- A helper lemma used to prove that the (scalar or usual) product of a function that tends to one
and a bounded function tends to one. This lemma is formulated for any binary operation
`op : E → F → G` with an estimate `‖op x y‖ ≤ A * ‖x‖ * ‖y‖` for some constant A instead of
multiplication so that it can be applied to `(*)`, `flip (*)`, `(•)`, and `flip (•)`. -/
@[to_additive "A helper lemma used to prove that the (scalar or usual) product of a function that
tends to zero and a bounded function tends to zero. This lemma is formulated for any binary
operation `op : E → F → G` with an estimate `‖op x y‖ ≤ A * ‖x‖ * ‖y‖` for some constant A instead
of multiplication so that it can be applied to `(*)`, `flip (*)`, `(•)`, and `flip (•)`."]
lemma Filter.Tendsto.op_one_isBoundedUnder_le' {f : α → E} {g : α → F} {l : Filter α}
    (hf : Tendsto f l (𝓝 1)) (hg : IsBoundedUnder (· ≤ ·) l (Norm.norm ∘ g)) (op : E → F → G)
    (h_op : ∃ A, ∀ x y, ‖op x y‖ ≤ A * ‖x‖ * ‖y‖) : Tendsto (fun x => op (f x) (g x)) l (𝓝 1)

(hg : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ g))

(h_op : ∃ A, ∀ (x : E) (y : F), ‖op x y‖ ≤ A * ‖x‖ * ‖y‖)

Filter.Tendsto (fun x => op (f x) (g x)) l (𝓝 0)


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

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[DivInvMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_7}
[TopologicalSpace M]
[ChartedSpace H' M]
{f : M → G}
{x : M}
{n : ℕ∞}
(c : G)
(hf : ContMDiffAt I' I n f x)


theorem Infinite.ne_real {x : ℝ*} : Infinite x → ∀ r : ℝ, x ≠ r


theorem dedup_sym2 [DecidableEq α] (xs : List α) : xs.sym2.dedup = xs.dedup.sym2

{α : Type u_1}
[DecidableEq α]
(xs : List α)


theorem inv_subst {α} [Field α] {n k e : α} (h2 : e ≠ 0) (h3 : n * e = k) :
    k * (e ⁻¹) = n

{α : Type u_1}
[Field α]
{n k e : α}
(h2 : e ≠ 0)
(h3 : n * e = k)


theorem sin_sub_nat_mul_two_pi (x : ℂ) (n : ℕ) : sin (x - n * (2 * π)) = sin x

Complex.sin (x - ↑n * (2 * ↑Real.pi)) = Complex.sin x


@[simp]
theorem sub_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] [TopologicalAddGroup M₃] (g₁ g₂ : M₂ →SL[σ₂₃] M₃)
    (f : M →SL[σ₁₂] M₂) : (g₁ - g₂).comp f = g₁.comp f - g₂.comp f

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{R₃ : Type u_3}
[Ring R₃]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_5}
[TopologicalSpace M₂]
[AddCommGroup M₂]
{M₃ : Type u_6}
[TopologicalSpace M₃]
[AddCommGroup M₃]
[Module R M]
[Module R₂ M₂]
[Module R₃ M₃]
{σ₁₂ : R →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[TopologicalAddGroup M₃]
(g₁ g₂ : M₂ →SL[σ₂₃] M₃)
(f : M →SL[σ₁₂] M₂)


theorem CHSH_id [CommRing R] {A₀ A₁ B₀ B₁ : R} (A₀_inv : A₀ ^ 2 = 1) (A₁_inv : A₁ ^ 2 = 1)
    (B₀_inv : B₀ ^ 2 = 1) (B₁_inv : B₁ ^ 2 = 1) :
    (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁) =
      4 * (2 - A₀ * B₀ - A₀ * B₁ - A₁ * B₀ + A₁ * B₁)

{R : Type u}
[CommRing R]
{A₀ A₁ B₀ B₁ : R}
(A₀_inv : A₀ ^ 2 = 1)
(A₁_inv : A₁ ^ 2 = 1)
(B₀_inv : B₀ ^ 2 = 1)
(B₁_inv : B₁ ^ 2 = 1)


@[norm_cast]
theorem coe_prod {α} {s : Finset α} {f : α → ℝ≥0} : ↑(∏ a ∈ s, f a) = ∏ a ∈ s, (f a : ℝ)

{α : Type u_1}
{s : Finset α}
{f : α → ℝ≥0}


/-- **Bergelson Intersectivity Lemma**: In a finite measure space, a sequence of events that have
measure at least `r` has an infinite subset whose finite intersections all have positive volume.

TODO: The infinity of `t` should be strengthened to `t` having positive natural density. -/
lemma bergelson' {s : ℕ → Set α} (hs : ∀ n, MeasurableSet (s n)) (hr₀ : r ≠ 0)
    (hr : ∀ n, r ≤ μ (s n)) :
    ∃ t : Set ℕ, t.Infinite ∧ ∀ ⦃u⦄, u ⊆ t → u.Finite → 0 < μ (⋂ n ∈ u, s n)

{α : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
{r : ℝ≥0∞}
{s : ℕ → Set α}
(hs : ∀ (n : ℕ), MeasurableSet (s n))
(hr₀ : r ≠ 0)
(hr : ∀ (n : ℕ), r ≤ μ (s n))

∃ t, t.Infinite ∧ ∀ ⦃u : Set ℕ⦄, u ⊆ t → u.Finite → 0 < μ (⋂ n ∈ u, s n)


@[to_additive (attr := simp)]
lemma min'_one [LinearOrder α] : (1 : Finset α).min' one_nonempty = 1


theorem abs_moebius {n : ℕ} :
    |μ n| = if Squarefree n then 1 else 0

|ArithmeticFunction.moebius n| = if Squarefree n then 1 else 0


theorem ContinuousLinearMap.contDiff (f : E →L[𝕜] F) : ContDiff 𝕜 n f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
(f : E →L[𝕜] F)


@[ext 1100]
theorem hom_ext ⦃f g : FreeCommRing α →+* R⦄ (h : ∀ x, f (of x) = g (of x)) : f = g

(h : ∀ (x : α), f (FreeCommRing.of x) = g (FreeCommRing.of x))


/-- The relation “there exists an element that semiconjugates `a` to `b`” on a monoid (or, more
generally, on `MulOneClass` type) is reflexive. -/
@[to_additive "The relation “there exists an element that semiconjugates `a` to `b`” on an additive
monoid (or, more generally, on an `AddZeroClass` type) is reflexive."]
protected theorem reflexive : Reflexive fun a b : M ↦ ∃ c, SemiconjBy c a b

Reflexive fun a b => ∃ c, AddSemiconjBy c a b


/-- A split monomorphism is a morphism `f : X ⟶ Y` with a given retraction `retraction f : Y ⟶ X`
such that `f ≫ retraction f = 𝟙 X`.

Every split monomorphism is a monomorphism.
-/
/- Porting note(#5171): removed @[nolint has_nonempty_instance] -/
/- Porting note: `@[ext]` used to accept lemmas like this. Now we add an aesop rule -/
@[ext, aesop apply safe (rule_sets := [CategoryTheory])]
structure SplitMono {X Y : C} (f : X ⟶ Y) where
  /-- The map splitting `f` -/
  retraction : Y ⟶ X
  /-- `f` composed with `retraction` is the identity -/
  id : f ≫ retraction = 𝟙 X := by aesop_cat

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

CategoryTheory.CategoryStruct.comp f self.retraction = CategoryTheory.CategoryStruct.id X


theorem recAux_succ {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive n → motive (n+1)) (n) :
    Nat.recAux zero succ (n+1) = succ n (Nat.recAux zero succ n)

(succ : (n : Nat) → motive n → motive (n + 1))

Nat.recAux zero succ (n + 1) = succ n (Nat.recAux zero succ n)


@[to_additive (attr := simp)]
theorem toFun_eq_coe : p.toFun = p

{E : Type u_4}
[Group E]
{p : GroupSeminorm E}


/-- The convolution of two even functions is also even. -/
theorem convolution_neg_of_neg_eq (h1 : ∀ᵐ x ∂μ, f (-x) = f x) (h2 : ∀ᵐ x ∂μ, g (-x) = g x) :
    (f ⋆[L, μ] g) (-x) = (f ⋆[L, μ] g) x

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
{x : G}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
(L : E →L[𝕜] E' →L[𝕜] F)
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[NormedSpace ℝ F]
[AddCommGroup G]
[μ.IsAddLeftInvariant]
[μ.IsNegInvariant]
[MeasurableNeg G]
[MeasurableAdd G]
(h1 : ∀ᵐ (x : G) ∂μ, f (-x) = f x)
(h2 : ∀ᵐ (x : G) ∂μ, g (-x) = g x)

MeasureTheory.convolution f g L μ (-x) = MeasureTheory.convolution f g L μ x


/-- The type of arrows from `star α` to itself is equivalent to the original type `α`. -/
@[simps!]
def toHom : α ≃ (star α ⟶ star α)


@[simp, elementwise]
theorem cokernel_π_cokernelIsoRangeQuotient_hom :
    cokernel.π f ≫ (cokernelIsoRangeQuotient f).hom = f.range.mkQ

{R : Type u}
[Ring R]
{G H : ModuleCat R}
(f : G ⟶ H)

CategoryTheory.Limits.cokernel.π f ≫ (ModuleCat.cokernelIsoRangeQuotient f).hom = (LinearMap.range f).mkQ


@[to_additive (attr := simp, norm_cast)]
theorem val_zpow_eq_zpow_val : ∀ (u : αˣ) (n : ℤ), ((u ^ n : αˣ) : α) = (u : α) ^ n

{α : Type u_1}
[DivisionMonoid α]
(u : αˣ)
(n : ℤ)


/-- Two vector spaces are isomorphic if and only if they have the same dimension. -/
theorem LinearEquiv.nonempty_equiv_iff_rank_eq :
    Nonempty (M ≃ₗ[R] M₁) ↔ Module.rank R M = Module.rank R M₁

{R : Type u}
{M M₁ : Type v}
[Ring R]
[StrongRankCondition R]
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[AddCommGroup M₁]
[Module R M₁]
[Module.Free R M₁]


lemma zero_le_one_elem [Preorder α] [ZeroLEOneClass α] (i j : n) :
    0 ≤ (1 : Matrix n n α) i j

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]
[Preorder α]
[ZeroLEOneClass α]
(i j : n)


theorem isSuccLimit_iff_succ_lt : IsSuccLimit b ↔ ∀ a < b, succ a < b

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{b : α}

Order.IsSuccLimit b ↔ ∀ a < b, Order.succ a < b


theorem isEmpty_of_chromaticNumber_eq_zero (G : SimpleGraph V) [Finite V]
    (h : G.chromaticNumber = 0) : IsEmpty V

{V : Type u}
(G : SimpleGraph V)
[Finite V]
(h : G.chromaticNumber = 0)


theorem prod_ext_iff {f g : M × N₂ →L[R] N₃} :
    f = g ↔ f.comp (inl _ _ _) = g.comp (inl _ _ _) ∧ f.comp (inr _ _ _) = g.comp (inr _ _ _)

{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 g : M × N₂ →L[R] N₃}

f = g ↔
  f.comp (ContinuousLinearMap.inl R M N₂) = g.comp (ContinuousLinearMap.inl R M N₂) ∧
    f.comp (ContinuousLinearMap.inr R M N₂) = g.comp (ContinuousLinearMap.inr R M N₂)


theorem centralizer_le (s t : Set A) (h : s ⊆ t) : centralizer R t ≤ centralizer R s

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(s t : Set A)
(h : s ⊆ t)

NonUnitalSubalgebra.centralizer R t ≤ NonUnitalSubalgebra.centralizer R s


@[to_additive (attr := simp, aesop safe apply (rule_sets := [finsetNonempty]))]
theorem one_nonempty : (1 : Finset α).Nonempty


/-- `log` is analytic away from nonpositive reals -/
theorem AnalyticAt.clog (fa : AnalyticAt ℂ f x) (m : f x ∈ slitPlane) :
    AnalyticAt ℂ (fun z ↦ log (f z)) x

{E : Type}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{x : E}
(fa : AnalyticAt ℂ f x)
(m : f x ∈ Complex.slitPlane)

AnalyticAt ℂ (fun z => Complex.log (f z)) x


theorem ContinuousLinearMap.contMDiffAt (L : E →L[𝕜] F) {x} : ContMDiffAt 𝓘(𝕜, E) 𝓘(𝕜, F) n L x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_8}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
(L : E →L[𝕜] F)
{x : E}


theorem wellFounded_iff_isSupFiniteCompact :
    WellFounded ((· > ·) : α → α → Prop) ↔ IsSupFiniteCompact α

(WellFounded fun x x_1 => x > x_1) ↔ CompleteLattice.IsSupFiniteCompact α


@[simp]
theorem get_map (f : α → β) {o : Option α} (h : isSome (o.map f)) :
    (o.map f).get h = f (o.get (by rwa [← isSome_map]))

{α : Type u_1}
{β : Type u_2}
(f : α → β)
{o : Option α}
(h : (Option.map f o).isSome = true)


lemma map_injective_iff (F : C ⥤ D) [Faithful F] {X Y : C} (f g : X ⟶ Y) :
    F.map f = F.map g ↔ f = g

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


theorem continuousWithinAt_symm {s x} : ContinuousWithinAt I.symm s x

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


@[to_additive]
theorem image_pow_subset_of_coprime (hm : 0 < m) (hmn : n.Coprime m) :
    (fun (y : A) => y ^ m) '' approxOrderOf A n δ ⊆ approxOrderOf A n (m * δ)

{A : Type u_1}
[SeminormedAddCommGroup A]
{m n : ℕ}
(δ : ℝ)
(hm : 0 < m)
(hmn : n.Coprime m)

(fun y => m • y) '' approxAddOrderOf A n δ ⊆ approxAddOrderOf A n (↑m * δ)


theorem card_derangements_invariant {α β : Type*} [Fintype α] [DecidableEq α] [Fintype β]
    [DecidableEq β] (h : card α = card β) : card (derangements α) = card (derangements β)

{α : Type u_2}
{β : Type u_3}
[Fintype α]
[DecidableEq α]
[Fintype β]
[DecidableEq β]
(h : Fintype.card α = Fintype.card β)

Fintype.card ↑(derangements α) = Fintype.card ↑(derangements β)


@[to_additive]
theorem mulIndicator_inv (s : Set α) (f : α → G) :
    (mulIndicator s fun a => (f a)⁻¹) = fun a => (mulIndicator s f a)⁻¹

{α : Type u_1}
{G : Type u_6}
[Group G]
(s : Set α)
(f : α → G)

(s.mulIndicator fun a => (f a)⁻¹) = fun a => (s.mulIndicator f a)⁻¹


@[simp]
theorem sumDualDistrib_symm_inl : (sumDualDistrib α β).symm (inl (toDual a)) = toDual (inl a)

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

(OrderIso.sumDualDistrib α β).symm (Sum.inl (OrderDual.toDual a)) = OrderDual.toDual (Sum.inl a)


theorem support_smul [AddMonoid M] [SMulZeroClass R M] {b : R} {g : α →₀ M} :
    (b • g).support ⊆ g.support

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
[AddMonoid M]
[SMulZeroClass R M]
{b : R}
{g : α →₀ M}


theorem IsRoot.map {f : R →+* S} {x : R} {p : R[X]} (h : IsRoot p x) : IsRoot (p.map f) (f x)

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
{f : R →+* S}
{x : R}
{p : R[X]}
(h : p.IsRoot x)


/-- Let R be an integral domain and f ∈ R[X]. Let s be a finite index set.
Then, a fraction of the form f / ∏ (g i) can be rewritten as q + ∑ (r i) / (g i), where
deg(r i) < deg(g i), provided that the g i are monic and pairwise coprime.
-/
theorem div_eq_quo_add_sum_rem_div (f : R[X]) {ι : Type*} {g : ι → R[X]} {s : Finset ι}
    (hg : ∀ i ∈ s, (g i).Monic) (hcop : Set.Pairwise ↑s fun i j => IsCoprime (g i) (g j)) :
    ∃ (q : R[X]) (r : ι → R[X]),
      (∀ i ∈ s, (r i).degree < (g i).degree) ∧
        ((↑f : K) / ∏ i ∈ s, ↑(g i)) = ↑q + ∑ i ∈ s, (r i : K) / (g i : K)

(hcop : (↑s).Pairwise fun i j => IsCoprime (g i) (g j))

∃ q r, (∀ i ∈ s, (r i).degree < (g i).degree) ∧ ↑f / ∏ i ∈ s, ↑(g i) = ↑q + ∑ i ∈ s, ↑(r i) / ↑(g i)


/-- An open map `f : X ⟶ Y` induces a functor `OpenNhds x ⥤ OpenNhds (f x)`. -/
@[simps]
def functorNhds (h : IsOpenMap f) (x : X) : OpenNhds x ⥤ OpenNhds (f x)

{X Y : TopCat}
{f : X ⟶ Y}
(h : IsOpenMap ⇑f)
(x : ↑X)
(U : TopologicalSpace.OpenNhds x)

((h.functorNhds x).obj U).obj = h.functor.obj U.obj


@[fun_prop]
theorem DifferentiableWithinAt.star (h : DifferentiableWithinAt 𝕜 f s x) :
    DifferentiableWithinAt 𝕜 (fun y => star (f y)) s x

{𝕜 : 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}
{x : E}
{s : Set E}
(h : DifferentiableWithinAt 𝕜 f s x)


/-- If `f` is bounded, then its `LSeries` is summable at `s : ℝ` when `s > 1`. -/
theorem LSeriesSummable_of_bounded_of_one_lt_real {f : ℕ → ℂ} {m : ℝ}
    (h : ∀ n ≠ 0, Complex.abs (f n) ≤ m) {s : ℝ} (hs : 1 < s) :
    LSeriesSummable f s

(h : ∀ (n : ℕ), n ≠ 0 → Complex.abs (f n) ≤ m)


theorem unary_decode_encode_nat : ∀ n, unaryDecodeNat (unaryEncodeNat n) = n

Computability.unaryDecodeNat (Computability.unaryEncodeNat n) = n


theorem IsPrimitive.dvd_of_fraction_map_dvd_fraction_map {p q : R[X]} (hp : p.IsPrimitive)
    (hq : q.IsPrimitive) (h_dvd : p.map (algebraMap R K) ∣ q.map (algebraMap R K)) : p ∣ q

(h_dvd : Polynomial.map (algebraMap R K) p ∣ Polynomial.map (algebraMap R K) q)


@[simp] -- Porting note: added `simp`
theorem isOpen_const {p : Prop} : IsOpen { _x : X | p }

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


/-- Pseudo metric and Metric spaces

A pseudo metric space is endowed with a distance for which the requirement `d(x,y)=0 → x = y` might
not hold. A metric space is a pseudo metric space such that `d(x,y)=0 → x = y`.
Each pseudo metric space induces a canonical `UniformSpace` and hence a canonical
`TopologicalSpace` This is enforced in the type class definition, by extending the `UniformSpace`
structure. When instantiating a `PseudoMetricSpace` structure, the uniformity fields are not
necessary, they will be filled in by default. In the same way, each (pseudo) metric space induces a
(pseudo) emetric space structure. It is included in the structure, but filled in by default.
-/
class PseudoMetricSpace (α : Type u) extends Dist α : Type u where
  dist_self : ∀ x : α, dist x x = 0
  dist_comm : ∀ x y : α, dist x y = dist y x
  dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z
  edist : α → α → ℝ≥0∞ := fun x y => ENNReal.ofNNReal ⟨dist x y, dist_nonneg' _ ‹_› ‹_› ‹_›⟩
  edist_dist : ∀ x y : α, edist x y = ENNReal.ofReal (dist x y) := by
    intros x y; exact ENNReal.coe_nnreal_eq _
  toUniformSpace : UniformSpace α := .ofDist dist dist_self dist_comm dist_triangle
  uniformity_dist : 𝓤 α = ⨅ ε > 0, 𝓟 { p : α × α | dist p.1 p.2 < ε } := by intros; rfl
  toBornology : Bornology α := Bornology.ofDist dist dist_comm dist_triangle
  cobounded_sets : (Bornology.cobounded α).sets =
    { s | ∃ C : ℝ, ∀ x ∈ sᶜ, ∀ y ∈ sᶜ, dist x y ≤ C } := by intros; rfl

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


theorem isOpenMap_toDual : IsOpenMap (toDual : X → Xᵒᵈ)


@[simp]
theorem coe_invFun (h : HomotopyEquiv X Y) : (⇑h.invFun : Y → X) = ⇑h.symm

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₕ Y)


/-- Negating a single basis vector (represented using `units_smul`) negates the corresponding
orientation. -/
@[simp]
theorem orientation_neg_single (e : Basis ι R M) (i : ι) :
    (e.unitsSMul (Function.update 1 i (-1))).orientation = -e.orientation

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_3}
[Fintype ι]
[DecidableEq ι]
(e : Basis ι R M)
(i : ι)


lemma δ_liftCochain (m' : ℤ) (hm' : m + 1 = m') :
    δ n m (liftCochain φ α β h) = -(δ m m' α).comp (inl φ) (by omega) +
      (δ n m β + α.comp (Cochain.ofHom φ) (add_zero m)).comp
        (Cochain.ofHom (inr φ)) (add_zero m)

(α : CochainComplex.HomComplex.Cochain K F m)

(β : CochainComplex.HomComplex.Cochain K G n)

CochainComplex.HomComplex.δ n m (CochainComplex.mappingCone.liftCochain φ α β h) =
  -(CochainComplex.HomComplex.δ m m' α).comp (CochainComplex.mappingCone.inl φ) ⋯ +
    (CochainComplex.HomComplex.δ n m β + α.comp (CochainComplex.HomComplex.Cochain.ofHom φ) ⋯).comp
      (CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.inr φ)) ⋯


@[simp] lemma univ_sups_univ [Fintype α] : (univ : Finset α) ⊻ univ = univ

{α : Type u_2}
[DecidableEq α]
[SemilatticeSup α]
[Fintype α]


/-- `Set.image` as an embedding `Set α ↪ Set β`. -/
@[simps apply]
protected def image {α β} (f : α ↪ β) : Set α ↪ Set β

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


@[simp]
theorem toHamming_zero [∀ i, Zero (β i)] : toHamming (0 : ∀ i, β i) = 0

{ι : Type u_2}
{β : ι → Type u_3}
[(i : ι) → Zero (β i)]


@[to_additive (attr := simp)]
theorem OneHom.coe_mk [One M] [One N] (f : M → N) (h1) : (OneHom.mk f h1 : M → N) = f

{M : Type u_4}
{N : Type u_5}
[One M]
[One N]
(f : M → N)
(h1 : f 1 = 1)


/-- The natural Lie algebra morphism from a Lie algebra to its universal enveloping algebra. -/
@[simps!] -- Porting note (#11445): added
def ι : L →ₗ⁅R⁆ UniversalEnvelopingAlgebra R L

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

∀ (a : L), (UniversalEnvelopingAlgebra.ι R) a = (UniversalEnvelopingAlgebra.mkAlgHom R L) (ιₜ a)


@[reassoc (attr := simp)]
theorem isoIsPullback_hom_fst (h : IsPullback fst snd f g) (h' : IsPullback fst' snd' f g) :
    (h.isoIsPullback h').hom ≫ fst' = fst

(h : CategoryTheory.IsPullback fst snd f g)

(h' : CategoryTheory.IsPullback fst' snd' f g)

(CategoryTheory.IsPullback.isoIsPullback X Y h h').hom ≫ fst' = fst


/-- A group admitting a free group basis is a free group. -/
lemma isFreeGroup (b : FreeGroupBasis ι G) : IsFreeGroup G

{ι : Type u_1}
{G : Type u_3}
[Group G]
(b : FreeGroupBasis ι G)


theorem CliqueFree.anti (h : G ≤ H) : H.CliqueFree n → G.CliqueFree n

{α : Type u_1}
{G H : SimpleGraph α}
{n : ℕ}
(h : G ≤ H)


@[simp]
theorem limsSup_bot : limsSup (⊥ : Filter α) = ⊥


@[simp] theorem self_trans_symm (e : α ≃ β) : e.trans e.symm = Equiv.refl α


theorem take_concat_get (l : List α) (i : Nat) (h : i < l.length) :
    (l.take i).concat l[i] = l.take (i+1)

{α : Type u_1}
(l : List α)
(i : Nat)
(h : i < l.length)

(List.take i l).concat l[i] = List.take (i + 1) l


theorem IsAtom.lt_iff (h : IsAtom a) : x < a ↔ x = ⊥

{α : Type u_2}
[PartialOrder α]
[OrderBot α]
{a x : α}
(h : IsAtom a)


@[simp]
theorem verts_inf (G₁ G₂ : G.Subgraph) : (G₁ ⊓ G₂).verts = G₁.verts ∩ G₂.verts

{V : Type u}
{G : SimpleGraph V}
(G₁ G₂ : G.Subgraph)


@[simp]
theorem zero_symm : (0 : M ≃ₛₗ[σ₁₂] M₂).symm = 0

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[Subsingleton M]
[Subsingleton M₂]


@[simp, norm_cast]
theorem natCast_mul (m n : ℕ) :
    (m * n : ℕ) = (m : EReal) * (n : EReal)


@[deprecated Subarray.stop_le_array_size (since := "2024-04-13")]
theorem Subarray.h₂ (s : Subarray α) : s.stop ≤ s.array.size


theorem InfiniteNeg.not_infinitesimal {x : ℝ*} (h : InfiniteNeg x) : ¬Infinitesimal x


theorem exists_of_isRight_right (h₁ : LiftRel r s x y) (h₂ : y.isRight) :
    ∃ b d, s b d ∧ x = inr b ∧ y = inr d

{α : Type u}
{β : Type v}
{γ : Type u_1}
{δ : Type u_2}
{r : α → γ → Prop}
{s : β → δ → Prop}
{x : α ⊕ β}
{y : γ ⊕ δ}
(h₁ : Sum.LiftRel r s x y)
(h₂ : y.isRight = true)

∃ b d, s b d ∧ x = Sum.inr b ∧ y = Sum.inr d


theorem WCovBy.covBy_of_not_le (h : a ⩿ b) (h2 : ¬b ≤ a) : a ⋖ b

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


/-- If `s` has a greatest lower bound, then it is bounded below. -/
theorem IsGLB.bddBelow (h : IsGLB s a) : BddBelow s

{α : Type u}
[Preorder α]
{s : Set α}
{a : α}
(h : IsGLB s a)


theorem SemilatSupCat_dual_comp_forget_to_partOrd :
    SemilatSupCat.dual ⋙ forget₂ SemilatInfCat PartOrd =
      forget₂ SemilatSupCat PartOrd ⋙ PartOrd.dual

SemilatSupCat.dual ⋙ CategoryTheory.forget₂ SemilatInfCat PartOrd =
  CategoryTheory.forget₂ SemilatSupCat PartOrd ⋙ PartOrd.dual


@[simp]
theorem coe_toHomotopyEquiv (h : X ≃ₜ Y) : (h.toHomotopyEquiv : X → Y) = h

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)


/-- The canonical linear map from cauchy sequences to the completion. -/
@[simps]
def mk : AdicCauchySequence I M →ₗ[R] AdicCompletion I M

(f : AdicCompletion.AdicCauchySequence I M)

↑((AdicCompletion.mk I M) f) n = (I ^ n • ⊤).mkQ (↑f n)


@[to_additive (attr := simp)]
theorem mem_comap {S : Submonoid N} {f : F} {x : M} : x ∈ S.comap f ↔ f x ∈ S

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{S : Submonoid N}
{f : F}
{x : M}


@[simp] theorem getLastD_nil (a) : @getLastD α [] a = a


lemma isOpen_A_with_param {r s : ℝ} (hf : Continuous f.uncurry) (L : E →L[𝕜] F) :
    IsOpen {p : α × E | p.2 ∈ A (f p.1) L r s}

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[LocallyCompactSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{α : Type u_4}
[TopologicalSpace α]
{f : α → E → F}
{r s : ℝ}
(hf : Continuous (Function.uncurry f))
(L : E →L[𝕜] F)

IsOpen {p | p.2 ∈ FDerivMeasurableAux.A (f p.1) L r s}


lemma mono_of_isLocallyInjective [IsLocallyInjective φ] : Mono φ

{J : CategoryTheory.GrothendieckTopology C}


@[simp]
theorem coe_toLinearEquiv_symm (h : ∀ (c : R) (x), e (c • x) = c • e x) :
    ⇑(e.toLinearEquiv h).symm = e.symm

(h : ∀ (c : R) (x : M), e (c • x) = c • e x)


@[simp, norm_cast]
theorem coe_mul (x y : s) : (↑(x * y) : R) = ↑x * ↑y

{R : Type u}
[Ring R]
(s : Subring R)
(x y : ↥s)


/-- A Noetherian scheme has a finite number of irreducible components.

[Stacks, Lemma 0BA8](https://stacks.math.columbia.edu/tag/0BA8) -/
theorem finite_irreducibleComponents_of_isNoetherian [IsNoetherian X] :
    (irreducibleComponents X).Finite

{X : AlgebraicGeometry.Scheme}
[AlgebraicGeometry.IsNoetherian X]


/-- The base map `f : B' → B` lifts to a canonical map on the total spaces. -/
@[simps (config := { attrs := [`mfld_simps] })]
def Pullback.lift (f : B' → B) : TotalSpace F (f *ᵖ E) → TotalSpace F E

{B : Type u_1}
{F : Type u_2}
{E : B → Type u_3}
{B' : Type u_4}
(f : B' → B)

∀ (a : Bundle.TotalSpace F (f *ᵖ E)), (Bundle.Pullback.lift f a).proj = f a.proj


lemma two_not_dvd_two_mul_sub_one : ∀ {n}, 0 < n → ¬2 ∣ 2 * n - 1


@[simp]
theorem xor_self (n : ℕ) : n ^^^ n = 0


theorem nmul_nadd_le₃' {a' b' c' : Ordinal} (ha : a' ≤ a) (hb : b' ≤ b) (hc : c' ≤ c) :
    a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c') ≤
      a ⨳ (b ⨳ c) ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c')

{a b c a' b' c' : Ordinal.{u}}
(ha : a' ≤ a)
(hb : b' ≤ b)
(hc : c' ≤ c)


theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x)


@[simp] lemma unop_one [One α] : unop 1 = (1 : α)


@[simp]
theorem mul_apply (a₁ a₂ : A) (b₁ b₂ : B) :
    mul (a₁ ⊗ₜ[R] b₁) (a₂ ⊗ₜ[R] b₂) = (a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[SMulCommClass R B B]
[IsScalarTower R B B]
(a₁ a₂ : A)
(b₁ b₂ : B)

(Algebra.TensorProduct.mul (a₁ ⊗ₜ[R] b₁)) (a₂ ⊗ₜ[R] b₂) = (a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)


@[to_additive]
theorem inter_smul_subset [DecidableEq α] : (s₁ ∩ s₂) • t ⊆ s₁ • t ∩ s₂ • t

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

(s₁ ∩ s₂) • t ⊆ s₁ • t ∩ s₂ • t


theorem condexpIndSMul_empty {x : G} : condexpIndSMul hm MeasurableSet.empty
    ((measure_empty (μ := μ)).le.trans_lt ENNReal.coe_lt_top).ne x = 0

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

MeasureTheory.condexpIndSMul hm ⋯ ⋯ x = 0


@[to_additive]
theorem absolutelyContinuous_inv : μ ≪ μ.inv

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
[MeasurableNeg G]
[μ.IsAddLeftInvariant]


@[reassoc, simp]
theorem inv_fun_map (e : C ≌ D) (X Y : C) (f : X ⟶ Y) :
    e.inverse.map (e.functor.map f) = e.unitInv.app X ≫ f ≫ e.unit.app Y

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
(X Y : C)
(f : X ⟶ Y)

e.inverse.map (e.functor.map f) =
  CategoryTheory.CategoryStruct.comp (e.unitInv.app X) (CategoryTheory.CategoryStruct.comp f (e.unit.app Y))


@[simp, norm_cast] lemma coe_inf' (L M : Sublattice α) : L ⊓ M = (L : Set α) ∩ M

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


@[to_additive] lemma IsMulFreimanIso.subset (hA : A₁ ⊆ A₂) (hf : IsMulFreimanIso n A₂ B₂ f)
    (hf' : BijOn f A₁ B₁) : IsMulFreimanIso n A₁ B₁ f

{α : Type u_2}
{β : Type u_3}
[AddCommMonoid α]
[AddCommMonoid β]
{A₁ A₂ : Set α}
{B₁ B₂ : Set β}
{f : α → β}
{n : ℕ}
(hA : A₁ ⊆ A₂)
(hf : IsAddFreimanIso n A₂ B₂ f)
(hf' : Set.BijOn f A₁ B₁)


/-- The homotopy equivalence of complexes of `k`-modules between the standard resolution of `k` as
a trivial `G`-representation, and the complex which is `k` at 0 and 0 everywhere else, acts as
`∑ nᵢgᵢ ↦ ∑ nᵢ : k[G¹] → k` at 0. -/
theorem forget₂ToModuleCatHomotopyEquiv_f_0_eq :
    (forget₂ToModuleCatHomotopyEquiv k G).1.f 0 = (forget₂ (Rep k G) _).map (ε k G)

(groupCohomology.resolution.forget₂ToModuleCatHomotopyEquiv k G).hom.f 0 =
  (CategoryTheory.forget₂ (Rep k G) (ModuleCat k)).map (groupCohomology.resolution.ε k G)


@[measurability]
theorem measurable_id {_ : MeasurableSpace α} : Measurable (@id α)

∀ {x : MeasurableSpace α}, Measurable id


@[simp]
theorem inr_zeroCoprodIso_hom (X : C) : coprod.inr ≫ (zeroCoprodIso X).hom = 𝟙 X

CategoryTheory.Limits.coprod.inr ≫ (CategoryTheory.Limits.zeroCoprodIso X).hom = 𝟙 X


/-- The equivalence between β-graded objects and γ-graded objects,
given an equivalence between β and γ.
-/
@[simps]
def comapEquiv {β γ : Type w} (e : β ≃ γ) : GradedObject β C ≌ GradedObject γ C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{β γ : Type w}
(e : β ≃ γ)

(CategoryTheory.GradedObject.comapEquiv C e).inverse = CategoryTheory.GradedObject.comap C ⇑e


@[to_additive]
theorem relindex_comap (f : G' →* G) (K : Subgroup G') :
    relindex (comap f H) K = relindex H (map f K)

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
(H : Subgroup G)
(f : G' →* G)
(K : Subgroup G')

(Subgroup.comap f H).relindex K = H.relindex (Subgroup.map f K)


/-- Auxiliary lemma for tangent spaces: the derivative of a coordinate change between two charts is
  smooth on its source. -/
theorem contDiffOn_fderiv_coord_change (i j : atlas H M) :
    ContDiffOn 𝕜 ∞ (fderivWithin 𝕜 (j.1.extend I ∘ (i.1.extend I).symm) (range I))
      ((i.1.extend I).symm ≫ j.1.extend I).source

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_4}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
(i j : ↑(atlas H M))

ContDiffOn 𝕜 ⊤ (fderivWithin 𝕜 (↑((↑j).extend I) ∘ ↑((↑i).extend I).symm) (Set.range ↑I))
  (((↑i).extend I).symm ≫ (↑j).extend I).source


/-- If `Subsingleton R`, then `M ≃ₗ[R] ι →₀ R` for any type `ι`. -/
@[simps]
def Module.subsingletonEquiv (R M ι : Type*) [Semiring R] [Subsingleton R] [AddCommMonoid M]
    [Module R M] : M ≃ₗ[R] ι →₀ R

(R : Type u_4)
(M : Type u_5)
(ι : Type u_6)
[Semiring R]
[Subsingleton R]
[AddCommMonoid M]
[Module R M]

∀ (x : ι →₀ R), (Module.subsingletonEquiv R M ι).symm x = 0


@[to_additive]
theorem prod_mul_tprod_nat_add [T2Space G] {f : ℕ → G} (k : ℕ) (h : Multipliable f) :
    ((∏ i ∈ range k, f i) * ∏' i, f (i + k)) = ∏' i, f i

{G : Type u_2}
[CommGroup G]
[TopologicalSpace G]
[TopologicalGroup G]
[T2Space G]
{f : ℕ → G}
(k : ℕ)
(h : Multipliable f)

(∏ i ∈ Finset.range k, f i) * ∏' (i : ℕ), f (i + k) = ∏' (i : ℕ), f i


@[simp]
theorem toL1_coeFn (f : α →₁[μ] β) (hf : Integrable f μ) : hf.toL1 f = f

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
(f : ↥(MeasureTheory.Lp β 1 μ))
(hf : MeasureTheory.Integrable (↑↑f) μ)

MeasureTheory.Integrable.toL1 (↑↑f) hf = f


theorem pow_inj (h : IsPrimitiveRoot ζ k) ⦃i j : ℕ⦄ (hi : i < k) (hj : j < k) (H : ζ ^ i = ζ ^ j) :
    i = j

{M : Type u_1}
[CommMonoid M]
{k : ℕ}
{ζ : M}
(h : IsPrimitiveRoot ζ k)
⦃i j : ℕ⦄
(hi : i < k)
(hj : j < k)
(H : ζ ^ i = ζ ^ j)


/-- A presheaf `P` is separated for the Grothendieck topology `J` iff for every covering sieve
    `S` of `J`, the natural cone associated to `P` and `S` admits at most one morphism from every
    cone in the same category. -/
theorem isSeparated_iff_subsingleton :
    (∀ E : A, Presieve.IsSeparated J (P ⋙ coyoneda.obj (op E))) ↔
      ∀ ⦃X : C⦄ (S : Sieve X), S ∈ J X → ∀ c, Subsingleton (c ⟶ P.mapCone S.arrows.cocone.op)

(J : CategoryTheory.GrothendieckTopology C)

(∀ (E : A), CategoryTheory.Presieve.IsSeparated J (P.comp (CategoryTheory.coyoneda.obj (Opposite.op E)))) ↔
  ∀ ⦃X : C⦄,
    ∀ S ∈ J.sieves X,
      ∀ (c : CategoryTheory.Limits.Cone (S.arrows.diagram.op.comp P)), Subsingleton (c ⟶ P.mapCone S.arrows.cocone.op)


/-- The product `F.prod' G` followed by projection on the second component is isomorphic to `G` -/
@[simps!]
def prod'CompSnd (F : A ⥤ B) (G : A ⥤ C) : F.prod' G ⋙ CategoryTheory.Prod.snd B C ≅ G

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
(F : CategoryTheory.Functor A B)
(G : CategoryTheory.Functor A C)
(X : A)

(F.prod'CompSnd G).hom.app X = CategoryTheory.CategoryStruct.id (G.obj X)


@[to_additive]
theorem prod_Ioc_succ_top {a b : ℕ} (hab : a ≤ b) (f : ℕ → M) :
    (∏ k ∈ Ioc a (b + 1), f k) = (∏ k ∈ Ioc a b, f k) * f (b + 1)

{M : Type u_2}
[CommMonoid M]
{a b : ℕ}
(hab : a ≤ b)
(f : ℕ → M)

∏ k ∈ Finset.Ioc a (b + 1), f k = (∏ k ∈ Finset.Ioc a b, f k) * f (b + 1)


theorem sub_coe (a b : ℕ+) : ((a - b : ℕ+) : ℕ) = ite (b < a) (a - b : ℕ) 1


@[simp]
theorem mk_le {f g : CauSeq ℚ abs} : mk f ≤ mk g ↔ f ≤ g


theorem tendsto_prod_swap : Tendsto (Prod.swap : α × β → β × α) (f ×ˢ g) (g ×ˢ f)

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}

Filter.Tendsto Prod.swap (f ×ˢ g) (g ×ˢ f)


@[simp]
theorem Ioc_pred_right (a b : α) : Ioc a (pred b) = Ioo a b

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


@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one_swapped {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.1 / x.2 ∈ U i }

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]
{ι : Sort u_3}
{p : ι → Prop}
{U : ι → Set α}
(h : (𝓝 1).HasBasis p U)

(𝓤 α).HasBasis p fun i => {x | x.1 / x.2 ∈ U i}


@[simp] lemma center_toNonUnitalSubring (R A : Type*) [CommRing R] [NonUnitalRing A]
    [Module R A] [IsScalarTower R A A] [SMulCommClass R A A] :
    (center R A).toNonUnitalSubring = NonUnitalSubring.center A

(R : Type u_3)
(A : Type u_4)
[CommRing R]
[NonUnitalRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]

(NonUnitalSubalgebra.center R A).toNonUnitalSubring = NonUnitalSubring.center A


/-- If `f : X → Y` is a quotient map,
then its restriction to the preimage of an open set is a quotient map too. -/
theorem QuotientMap.restrictPreimage_isOpen {f : X → Y} (hf : QuotientMap f)
    {s : Set Y} (hs : IsOpen s) : QuotientMap (s.restrictPreimage f)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : QuotientMap f)
{s : Set Y}
(hs : IsOpen s)


theorem continuousOn_primitive (h_int : IntegrableOn f (Icc a b) μ) :
    ContinuousOn (fun x => ∫ t in Ioc a x, f t ∂μ) (Icc a b)

(h_int : MeasureTheory.IntegrableOn f (Set.Icc a b) μ)

ContinuousOn (fun x => ∫ (t : ℝ) in Set.Ioc a x, f t ∂μ) (Set.Icc a b)


@[simp] lemma multinomial_singleton (a : α) (f : α → ℕ) : multinomial {a} f = 1


theorem Asymptotics.isLittleO_sum_range_of_tendsto_zero {α : Type*} [NormedAddCommGroup α]
    {f : ℕ → α} (h : Tendsto f atTop (𝓝 0)) :
    (fun n => ∑ i ∈ range n, f i) =o[atTop] fun n => (n : ℝ)

(h : Filter.Tendsto f Filter.atTop (𝓝 0))

(fun n => ∑ i ∈ Finset.range n, f i) =o[Filter.atTop] fun n => ↑n


/-- Abelian groups have nilpotency class at most one -/
theorem CommGroup.nilpotencyClass_le_one {G : Type*} [CommGroup G] :
    Group.nilpotencyClass G ≤ 1


theorem iInf_adj_of_nonempty [Nonempty ι] {f : ι → G.Subgraph} :
    (⨅ i, f i).Adj a b ↔ ∀ i, (f i).Adj a b

{ι : Sort u_1}
{V : Type u}
{G : SimpleGraph V}
{a b : V}
[Nonempty ι]
{f : ι → G.Subgraph}

(⨅ i, f i).Adj a b ↔ ∀ (i : ι), (f i).Adj a b


theorem convexBodySumFun_continuous :
    Continuous (convexBodySumFun : (E K) → ℝ)

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


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

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


theorem volume_preserving_pi {α' β' : ι → Type*} [∀ i, MeasureSpace (α' i)]
    [∀ i, MeasureSpace (β' i)] [∀ i, SigmaFinite (volume : Measure (β' i))]
    {f : (i : ι) → (α' i) → (β' i)} (hf : ∀ i, MeasurePreserving (f i)) :
    MeasurePreserving (fun (a : (i : ι) → α' i) (i : ι) ↦ (f i) (a i))

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

[(i : ι) → MeasureTheory.MeasureSpace (β' i)]

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

(hf : ∀ (i : ι), MeasureTheory.MeasurePreserving (f i) MeasureTheory.volume MeasureTheory.volume)

MeasureTheory.MeasurePreserving (fun a i => f i (a i)) MeasureTheory.volume MeasureTheory.volume


@[simp, norm_cast]
theorem cast_finsupp_sum [CommSemiring R] (g : α → M → ℕ) :
    (↑(f.sum g) : R) = f.sum fun a b => ↑(g a b)

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
[Zero M]
(f : α →₀ M)
[CommSemiring R]
(g : α → M → ℕ)


@[reassoc]
theorem map_on_summand₀' {Δ Δ' : SimplexCategoryᵒᵖ} (A : Splitting.IndexSet Δ) (θ : Δ ⟶ Δ') :
    Sigma.ι (summand K Δ) A ≫ map K θ =
      Termwise.mapMono K (image.ι (θ.unop ≫ A.e)) ≫ Sigma.ι (summand K _) (A.pull θ)

(A : SimplicialObject.Splitting.IndexSet Δ)

(θ : Δ ⟶ Δ')

CategoryTheory.Limits.Sigma.ι (AlgebraicTopology.DoldKan.Γ₀.Obj.summand K Δ) A ≫
    AlgebraicTopology.DoldKan.Γ₀.Obj.map K θ =
  AlgebraicTopology.DoldKan.Γ₀.Obj.Termwise.mapMono K (CategoryTheory.Limits.image.ι (θ.unop ≫ A.e)) ≫
    CategoryTheory.Limits.Sigma.ι (AlgebraicTopology.DoldKan.Γ₀.Obj.summand K Δ') (A.pull θ)


theorem bot_mem_lowerBounds [OrderBot α] (s : Set α) : ⊥ ∈ lowerBounds s

{α : Type u}
[Preorder α]
[OrderBot α]
(s : Set α)


@[simp]
theorem apply_one (x : E) : (1 : AddGroupNorm E) x = if x = 0 then 0 else 1

{E : Type u_4}
[AddGroup E]
[DecidableEq E]
(x : E)


theorem RingHom.PropertyIsLocal.ofLocalizationSpan (hP : RingHom.PropertyIsLocal @P) :
    RingHom.OfLocalizationSpan @P

{P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}


@[simp] lemma coeff_charpolyRev_eq_neg_trace (M : Matrix n n R) :
    coeff M.charpolyRev 1 = - trace M

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)


/-- The finite field `F` has even cardinality iff it has characteristic `2`. -/
theorem even_card_iff_char_two : ringChar F = 2 ↔ Fintype.card F % 2 = 0


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

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

(HNNExtension.NormalWord.ReducedWord.empty G A B).toList = []


@[simp]
theorem _root_.map_finset_inf' [SemilatticeInf β] [FunLike F α β] [InfHomClass F α β]
    (f : F) {s : Finset ι} (hs) (g : ι → α) :
    f (s.inf' hs g) = s.inf' hs (f ∘ g)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
{ι : Type u_5}
[SemilatticeInf α]
[SemilatticeInf β]
[FunLike F α β]
[InfHomClass F α β]
(f : F)
{s : Finset ι}
(hs : s.Nonempty)
(g : ι → α)


@[simp]
theorem forget₂_map (X Y : QuadraticModuleCat R) (f : X ⟶ Y) :
    (forget₂ (QuadraticModuleCat R) (ModuleCat R)).map f = f.toIsometry.toLinearMap

{R : Type u}
[CommRing R]
(X Y : QuadraticModuleCat R)
(f : X ⟶ Y)

(CategoryTheory.forget₂ (QuadraticModuleCat R) (ModuleCat R)).map f = f.toIsometry.toLinearMap


@[simp]
theorem bmod_one_is_zero (x : Int) : Int.bmod x 1 = 0


@[to_additive (attr := simp)]
theorem mul_liftRight_inv {f : M →* N} {g : M → Nˣ} (h : ∀ x, ↑(g x) = f x) (x) :
    f x * ↑(liftRight f g h x)⁻¹ = 1

{M : Type u}
{N : Type v}
[AddMonoid M]
[AddMonoid N]
{f : M →+ N}
{g : M → AddUnits N}
(h : ∀ (x : M), ↑(g x) = f x)
(x : M)

f x + ↑(-(AddUnits.liftRight f g h) x) = 0


protected theorem tsum_coe_eq {f : α → ℝ≥0} (h : HasSum f r) : (∑' a, (f a : ℝ≥0∞)) = r

{α : Type u_1}
{r : ℝ≥0}
{f : α → ℝ≥0}
(h : HasSum f r)


theorem Real.mul_iInf_of_nonpos (ha : r ≤ 0) (f : ι → ℝ) : (r * ⨅ i, f i) = ⨆ i, r * f i

{ι : Sort u_1}
{r : ℝ}
(ha : r ≤ 0)
(f : ι → ℝ)


theorem toPGame_lt {a b : Ordinal} (h : a < b) : a.toPGame < b.toPGame


@[to_additive]
theorem mul_ball_one : s * ball 1 δ = thickening δ s

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(s : Set E)

s + Metric.ball 0 δ = Metric.thickening δ s


lemma cfcHom_le_iff {a : A} (ha : p a) {f g : C(spectrum R a, R)} :
    cfcHom ha f ≤ cfcHom ha g ↔ f ≤ g

[∀ (α : Type u_1) [inst : TopologicalSpace α], StarOrderedRing C(α, R)]


theorem  IsNilpotent.of_pow [MonoidWithZero R] {x : R} {m : ℕ}
    (h : IsNilpotent (x ^ m)) : IsNilpotent x

{R : Type u_1}
[MonoidWithZero R]
{x : R}
{m : ℕ}
(h : IsNilpotent (x ^ m))


theorem evariance_mul (c : ℝ) (X : Ω → ℝ) (μ : Measure Ω) :
    evariance (fun ω => c * X ω) μ = ENNReal.ofReal (c ^ 2) * evariance X μ

{Ω : Type u_1}
{m : MeasurableSpace Ω}
(c : ℝ)
(X : Ω → ℝ)
(μ : MeasureTheory.Measure Ω)

ProbabilityTheory.evariance (fun ω => c * X ω) μ = ENNReal.ofReal (c ^ 2) * ProbabilityTheory.evariance X μ


lemma eLpNorm'_mono_nnnorm_ae {f : α → F} {g : α → G} (hq : 0 ≤ q) (h : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ ‖g x‖₊) :
    eLpNorm' f q μ ≤ eLpNorm' g q μ

{α : Type u_1}
{F : Type u_3}
{G : Type u_4}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
[NormedAddCommGroup G]
{f : α → F}
{g : α → G}
(hq : 0 ≤ q)
(h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ ‖g x‖₊)

MeasureTheory.eLpNorm' f q μ ≤ MeasureTheory.eLpNorm' g q μ


@[to_additive (attr := simp)]
theorem preimage_mul_right_one : (· * b) ⁻¹' 1 = {b⁻¹}