/-- `IsNormalSubgroup (s : Set G)` expresses the fact that `s` is a normal subgroup
of the group `G`. Important: the preferred way to say this in Lean is via bundled
subgroups `S : Subgroup G` and not via this structure. -/
@[to_additive]
structure IsNormalSubgroup [Group G] (s : Set G) extends IsSubgroup s : Prop where
  /-- The proposition that `s` is closed under conjugation. -/
  normal : ∀ n ∈ s, ∀ g : G, g * n * g⁻¹ ∈ s

{G : Type u_1}
[Group G]
{s : Set G}
(self : IsNormalSubgroup s)
(n : G)


@[simp]
theorem Quotient.mk_smul_mk_quotient_map_quotient (x : R) (y : S) :
    Quotient.mk p x • Quotient.mk (map f p) y = Quotient.mk (map f p) (f x * y)

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
{f : R →+* S}
{p : Ideal R}
(x : R)
(y : S)

(Ideal.Quotient.mk p) x • (Ideal.Quotient.mk (Ideal.map f p)) y = (Ideal.Quotient.mk (Ideal.map f p)) (f x * y)


theorem le_of_forall_le [Preorder α] {a b : α} (H : ∀ c, c ≤ a → c ≤ b) : a ≤ b

{α : Type u_2}
[Preorder α]
{a b : α}
(H : ∀ (c : α), c ≤ a → c ≤ b)


@[simp]
theorem memberSubfamily_memberSubfamily : (𝒜.memberSubfamily a).memberSubfamily a = ∅

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

Finset.memberSubfamily a (Finset.memberSubfamily a 𝒜) = ∅


theorem Ideal.mul_homogeneous_element_mem_of_mem {I : Ideal A} (r x : A) (hx₁ : Homogeneous 𝒜 x)
    (hx₂ : x ∈ I) (j : ι) : GradedRing.proj 𝒜 j (r * x) ∈ I

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
[DecidableEq ι]
[AddMonoid ι]
[GradedRing 𝒜]
{I : Ideal A}
(r x : A)
(hx₁ : SetLike.Homogeneous 𝒜 x)
(hx₂ : x ∈ I)
(j : ι)


@[simp]
theorem Algebra.pushoutDesc_right [H : Algebra.IsPushout R S R' S'] {A : Type*} [Semiring A]
    [Algebra R A] (f : S →ₐ[R] A) (g : R' →ₐ[R] A) (H) (x : R') :
    Algebra.pushoutDesc S' f g H (algebraMap R' S' x) = g x

{R : Type u_1}
{S : Type v₃}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
{R' : Type u_6}
(S' : Type u_7)
[CommSemiring R']
[CommSemiring S']
[Algebra R R']
[Algebra S S']
[Algebra R' S']
[Algebra R S']
[IsScalarTower R R' S']
[IsScalarTower R S S']
[H : Algebra.IsPushout R S R' S']
{A : Type u_8}
[Semiring A]
[Algebra R A]
(f : S →ₐ[R] A)
(g : R' →ₐ[R] A)

∀ (H_1 : ∀ (x : S) (y : R'), f x * g y = g y * f x) (x : R'),
  (Algebra.pushoutDesc S' f g H_1) ((algebraMap R' S') x) = g x


theorem left_dom_of_sdiff_dom [SDiff α] {a b : Part α} (hab : Dom (a \ b)) : a.Dom

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


@[ext] theorem ext {a b : Fin n} (h : (a : Nat) = b) : a = b


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

{R : Type u}
[NonAssocSemiring R]
{p p' : Subsemiring R}
{x : R}


theorem map_rel_iff {a b : α} (f : r ≼i s) : s (f a) (f b) ↔ r a b

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


theorem isBigO_zero : (fun _x => (0 : E')) =O[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
(g : α → F)
(l : Filter α)


theorem ext_iff {f f' : ContinuousMultilinearMap R M₁ M₂} : f = f' ↔ ∀ x, f x = f' x

f = f' ↔ ∀ (x : (i : ι) → M₁ i), f x = f' x


theorem le_sub_of_add_le_left (ha : a ≠ ∞) : a + b ≤ c → b ≤ c - a


/-- A singleton set is a Lindelof set. -/
@[simp]
theorem isLindelof_singleton {x : X} : IsLindelof ({x} : Set X)

{X : Type u}
[TopologicalSpace X]
{x : X}


theorem toReal_top_mul (a : ℝ≥0∞) : ENNReal.toReal (∞ * a) = 0


@[simp] lemma latticeClosure_prod (s : Set α) (t : Set β) :
    latticeClosure (s ×ˢ t) = latticeClosure s ×ˢ latticeClosure t

{α : Type u_2}
{β : Type u_3}
[DistribLattice α]
[DistribLattice β]
(s : Set α)
(t : Set β)


/-- A left homology data for a short complex `S` consists of morphisms `i : K ⟶ S.X₂` and
`π : K ⟶ H` such that `i` identifies `K` to the kernel of `g : S.X₂ ⟶ S.X₃`,
and that `π` identifies `H` to the cokernel of the induced map `f' : S.X₁ ⟶ K` -/
structure LeftHomologyData where
  /-- a choice of kernel of `S.g : S.X₂ ⟶ S.X₃`-/
  K : C
  /-- a choice of cokernel of the induced morphism `S.f' : S.X₁ ⟶ K`-/
  H : C
  /-- the inclusion of cycles in `S.X₂` -/
  i : K ⟶ S.X₂
  /-- the projection from cycles to the (left) homology -/
  π : K ⟶ H
  /-- the kernel condition for `i` -/
  wi : i ≫ S.g = 0
  /-- `i : K ⟶ S.X₂` is a kernel of `g : S.X₂ ⟶ S.X₃` -/
  hi : IsLimit (KernelFork.ofι i wi)
  /-- the cokernel condition for `π` -/
  wπ : hi.lift (KernelFork.ofι _ S.zero) ≫ π = 0
  /-- `π : K ⟶ H` is a cokernel of the induced morphism `S.f' : S.X₁ ⟶ K` -/
  hπ : IsColimit (CokernelCofork.ofπ π wπ)

CategoryTheory.CategoryStruct.comp (self.hi.lift (CategoryTheory.Limits.KernelFork.ofι S.f ⋯)) self.π = 0


@[simp]
lemma eval_lift (f : ∀ (n : ℕ), M →ₗ[R] N ⧸ (I ^ n • ⊤ : Submodule R N))
    (h : ∀ {m n : ℕ} (hle : m ≤ n), transitionMap I N hle ∘ₗ f n = f m)
    (n : ℕ) : eval I N n ∘ₗ lift I f h = f n

(h : ∀ {m n : ℕ} (hle : m ≤ n), AdicCompletion.transitionMap I N hle ∘ₗ f n = f m)

AdicCompletion.eval I N n ∘ₗ AdicCompletion.lift I f ⋯ = f n


theorem mirror_smul (a : R) : (a • p).mirror = a • p.mirror

{R : Type u_1}
[Ring R]
(p : Polynomial R)
[NoZeroDivisors R]
(a : R)


theorem uniformContinuousOn_iff_le [PseudoMetricSpace β] {f : α → β} {s : Set α} :
    UniformContinuousOn f s ↔
      ∀ ε > 0, ∃ δ > 0, ∀ x ∈ s, ∀ y ∈ s, dist x y ≤ δ → dist (f x) (f y) ≤ ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{f : α → β}
{s : Set α}


/-- The `n`th convergent of the `GenContFract.of ξ` agrees with `ξ.convergent n`. -/
theorem convs_eq_convergent (ξ : ℝ) (n : ℕ) :
    (GenContFract.of ξ).convs n = ξ.convergent n

(GenContFract.of ξ).convs n = ↑(ξ.convergent n)


@[simp]
theorem det_coe' {g : SL(2, ℤ)} : det (Units.val <| Subtype.val <| coe' g) = 1


/-- If `H` is a subgroup of `G` of cardinality `p ^ n`,
  then `H` is contained in a subgroup of cardinality `p ^ m`
  if `n ≤ m` and `p ^ m` divides the cardinality of `G` -/
theorem exists_subgroup_card_pow_prime_le [Finite G] (p : ℕ) :
    ∀ {n m : ℕ} [_hp : Fact p.Prime] (_hdvd : p ^ m ∣ Nat.card G) (H : Subgroup G)
      (_hH : Nat.card H = p ^ n) (_hnm : n ≤ m), ∃ K : Subgroup G, Nat.card K = p ^ m ∧ H ≤ K

{G : Type u}
[Group G]
[Finite G]
(p : ℕ)
{n m : ℕ}
[_hp : Fact (Nat.Prime p)]
(_hdvd : p ^ m ∣ Nat.card G)
(H : Subgroup G)
(_hH : Nat.card ↥H = p ^ n)
(_hnm : n ≤ m)


@[simp]
theorem map_valEmbedding_Ico : (Ico a b).map Fin.valEmbedding = Ico ↑a ↑b

Finset.map Fin.valEmbedding (Finset.Ico a b) = Finset.Ico ↑a ↑b


@[simp]
theorem mk_cons {s : Multiset α} (h : (a ::ₘ s).Nodup) :
    (⟨a ::ₘ s, h⟩ : Finset α) = cons a ⟨s, (nodup_cons.1 h).2⟩ (nodup_cons.1 h).1

{α : Type u_1}
{a : α}
{s : Multiset α}
(h : (a ::ₘ s).Nodup)

{ val := a ::ₘ s, nodup := h } = Finset.cons a { val := s, nodup := ⋯ } ⋯


theorem isComplement'_stabilizer {α : Type*} [MulAction G α] (a : α)
    (h1 : ∀ h : H, h • a = a → h = 1) (h2 : ∀ g : G, ∃ h : H, h • g • a = a) :
    IsComplement' H (MulAction.stabilizer G a)

{G : Type u_1}
[Group G]
{H : Subgroup G}
{α : Type u_2}
[MulAction G α]
(a : α)
(h1 : ∀ (h : ↥H), h • a = a → h = 1)
(h2 : ∀ (g : G), ∃ h, h • g • a = a)

H.IsComplement' (MulAction.stabilizer G a)


@[simp]
theorem cast_natAdd (n : Nat) {m : Nat} (i : Fin m) :
    cast (Nat.add_comm ..) (natAdd n i) = addNat i n

Fin.cast ⋯ (Fin.natAdd n i) = i.addNat n


protected theorem ContinuousWithinAt.abs (h : ContinuousWithinAt f s a) :
    ContinuousWithinAt (fun x => |f x|) s a

{α : Type u_1}
{G : Type u_2}
[TopologicalSpace G]
[LinearOrderedAddCommGroup G]
[OrderTopology G]
{f : α → G}
[TopologicalSpace α]
{a : α}
{s : Set α}
(h : ContinuousWithinAt f s a)


@[simp]
theorem r_mul_r (i j : ZMod n) : r i * r j = r (i + j)

DihedralGroup.r i * DihedralGroup.r j = DihedralGroup.r (i + j)


/-- A space is totally disconnected if all of its connected components are singletons. -/
@[mk_iff]
class TotallyDisconnectedSpace (α : Type u) [TopologicalSpace α] : Prop where
  /-- The universal set `Set.univ` in a totally disconnected space is totally disconnected. -/
  isTotallyDisconnected_univ : IsTotallyDisconnected (univ : Set α)

TotallyDisconnectedSpace α ↔ IsTotallyDisconnected Set.univ


@[simp]
lemma _root_.CanonicallyOrderedCommSemiring.multiset_prod_pos [CanonicallyOrderedCommSemiring R]
    [Nontrivial R] {m : Multiset R} : 0 < m.prod ↔ ∀ x ∈ m, 0 < x

{R : Type u_1}
[CanonicallyOrderedCommSemiring R]
[Nontrivial R]
{m : Multiset R}


theorem dist_integralSum_integral_le_of_memBaseSet (h : Integrable I l f vol) (h₀ : 0 < ε)
    (hπ : l.MemBaseSet I c (h.convergenceR ε c) π) (hπp : π.IsPartition) :
    dist (integralSum f vol π) (integral I l f vol) ≤ ε

dist (BoxIntegral.integralSum f vol π) (BoxIntegral.integral I l f vol) ≤ ε


/-- The norm of `jacobiTheta τ - 1` decays exponentially as `im τ → ∞`. -/
theorem isBigO_at_im_infty_jacobiTheta_sub_one :
    (fun τ => jacobiTheta τ - 1) =O[comap im atTop] fun τ => rexp (-π * τ.im)

(fun τ => jacobiTheta τ - 1) =O[Filter.comap Complex.im Filter.atTop] fun τ => rexp (-π * τ.im)


@[fun_prop]
protected theorem differentiableOn : DifferentiableOn 𝕜 iso s

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


theorem eq_of_mem_maximals (ha : a ∈ maximals r s) (hb : b ∈ s) (h : r a b) : a = b

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{a b : α}
[IsAntisymm α r]
(ha : a ∈ maximals r s)
(hb : b ∈ s)
(h : r a b)


/-- If `α` is a separable topological space with a partial order, then there exists a countable
dense set `s : Set α` that contains those of both bottom and top elements of `α` that actually
exist. For a dense set containing neither bot nor top elements, see
`exists_countable_dense_no_bot_top`. -/
theorem exists_countable_dense_bot_top (α : Type*) [TopologicalSpace α] [SeparableSpace α]
    [PartialOrder α] :
    ∃ s : Set α, s.Countable ∧ Dense s ∧ (∀ x, IsBot x → x ∈ s) ∧ ∀ x, IsTop x → x ∈ s

(α : Type u_1)
[TopologicalSpace α]
[TopologicalSpace.SeparableSpace α]
[PartialOrder α]

∃ s, s.Countable ∧ Dense s ∧ (∀ (x : α), IsBot x → x ∈ s) ∧ ∀ (x : α), IsTop x → x ∈ s


@[measurability]
theorem Measurable.inf_const (hf : Measurable f) (c : M) : Measurable fun x => f x ⊓ c

{M : Type u_1}
[MeasurableSpace M]
{α : Type u_2}
{m : MeasurableSpace α}
{f : α → M}
[Inf M]
[MeasurableInf M]
(hf : Measurable f)
(c : M)


theorem HasDerivAtFilter.const_add (c : F) (hf : HasDerivAtFilter f f' x L) :
    HasDerivAtFilter (fun y => c + f y) f' x L

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


theorem algebraMap_eq_apply (f : A →ₐ[R] B) {y : R} {x : A} (h : algebraMap R A y = x) :
    algebraMap R B y = f x

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)
{y : R}
{x : A}
(h : (algebraMap R A) y = x)


@[simp]
theorem re_conj (z : 𝔻) : z.conj.re = z.re


@[to_additive (attr := simp)]
theorem coeSubtype : ⇑ H.subtype = ((↑) : H → G)

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


@[to_additive]
theorem submonoid_closure (hpos : ∀ x : α, x ∈ s → 1 ≤ x) (h : s.IsPWO) :
    IsPWO (Submonoid.closure s : Set α)

{α : Type u_1}
[OrderedCancelAddCommMonoid α]
{s : Set α}
(hpos : ∀ x ∈ s, 0 ≤ x)
(h : s.IsPWO)


theorem integral_eq_integral_pos_part_sub_integral_neg_part {f : α → ℝ} (hf : Integrable f μ) :
    ∫ a, f a ∂μ = ∫ a, (Real.toNNReal (f a) : ℝ) ∂μ - ∫ a, (Real.toNNReal (-f a) : ℝ) ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : MeasureTheory.Integrable f μ)

∫ (a : α), f a ∂μ = ∫ (a : α), ↑(f a).toNNReal ∂μ - ∫ (a : α), ↑(-f a).toNNReal ∂μ


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

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


@[to_additive]
theorem comap_iInf_map_of_injective (S : ι → Submonoid M) : (⨅ i, (S i).map f).comap f = iInf S

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{ι : Type u_5}
{f : F}
(hf : Function.Injective ⇑f)
(S : ι → AddSubmonoid M)

AddSubmonoid.comap f (⨅ i, AddSubmonoid.map f (S i)) = iInf S


/-- The function `sinKernel a` has exponential decay at `+∞`, for any `a`. -/
lemma isBigO_atTop_sinKernel (a : UnitAddCircle) :
    ∃ p, 0 < p ∧ IsBigO atTop (sinKernel a) (fun x ↦ Real.exp (-p * x))

∃ p, 0 < p ∧ HurwitzZeta.sinKernel a =O[Filter.atTop] fun x => rexp (-p * x)


@[to_additive]
theorem ContinuousWithinAt.mul {f g : X → M} {s : Set X} {x : X} (hf : ContinuousWithinAt f s x)
    (hg : ContinuousWithinAt g s x) : ContinuousWithinAt (fun x => f x * g x) s x

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[Mul M]
[ContinuousMul M]
{f g : X → M}
{s : Set X}
{x : X}
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g s x)


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

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

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


@[to_additive]
theorem pairwise_disjoint_Ioo_mul_zpow :
    Pairwise (Disjoint on fun n : ℤ => Ioo (a * b ^ n) (a * b ^ (n + 1)))

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

Pairwise (Disjoint on fun n => Set.Ioo (a * b ^ n) (a * b ^ (n + 1)))


lemma liminf_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    liminf (s.piecewise u v) f = bliminf u f (· ∈ s) ⊓ bliminf v f (· ∉ s)

{α : Type u_1}
{β : Type u_2}
[CompleteDistribLattice α]
{f : Filter β}
{u : β → α}
{s : Set β}
[DecidablePred fun x => x ∈ s]
{v : β → α}

Filter.liminf (s.piecewise u v) f = (Filter.bliminf u f fun x => x ∈ s) ⊓ Filter.bliminf v f fun x => x ∉ s


@[to_additive]
theorem orbit_subgroup_eq_rightCoset (a : α) : MulAction.orbit s a = op a • s

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

MulAction.orbit (↥s) a = MulOpposite.op a • ↑s


@[simp]
theorem leftUnitor_hom_app {F : C ⥤ D} {X} :
    ((λ_ F).hom : 𝟙_ _ ⊗ F ⟶ F).app X = (λ_ (F.obj X)).hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
{F : C ⥤ D}
{X : C}


@[simp, nolint simpNF]
theorem mem_carrier {x : M} : x ∈ N.carrier ↔ x ∈ (N : Set M)

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


theorem differentiableOn_arccos : DifferentiableOn ℝ arccos {-1, 1}ᶜ


lemma map_addY (x₁ x₂ y₁ L : R) :
    (W.map f).toAffine.addY (f x₁) (f x₂) (f y₁) (f L) = f (W.toAffine.addY x₁ x₂ y₁ L)

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type v}
[CommRing S]
(f : R →+* S)
(x₁ x₂ y₁ L : R)

(WeierstrassCurve.map W f).toAffine.addY (f x₁) (f x₂) (f y₁) (f L) = f ((WeierstrassCurve.toAffine W).addY x₁ x₂ y₁ L)


theorem core_restrict (f : α → β) (s : Set β) : (f : α →. β).core s = s.preimage f

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


/-- The braiding isomorphism which swaps a binary biproduct. -/
@[simps]
def biprod.braiding (P Q : C) : P ⊞ Q ≅ Q ⊞ P

(CategoryTheory.Limits.biprod.braiding P Q).inv =
  CategoryTheory.Limits.biprod.lift CategoryTheory.Limits.biprod.snd CategoryTheory.Limits.biprod.fst


lemma isNilpotent_charpoly_sub_pow_of_isNilpotent (hM : IsNilpotent M) :
    IsNilpotent (M.charpoly - X ^ (Fintype.card n))

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

IsNilpotent (M.charpoly - Polynomial.X ^ Fintype.card n)


@[to_additive]
lemma Group.isUnit [Group α] (a : α) : IsUnit a


theorem iUnion_def : π.iUnion = ⋃ J ∈ π, ↑J

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)


/-- The product of two sets of unique differentiability at points `x` and `y` has unique
differentiability at `(x, y)`. -/
theorem UniqueDiffWithinAt.prod {t : Set F} {y : F} (hs : UniqueDiffWithinAt 𝕜 s x)
    (ht : UniqueDiffWithinAt 𝕜 t y) : UniqueDiffWithinAt 𝕜 (s ×ˢ t) (x, y)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{s : Set E}
{t : Set F}
{y : F}
(hs : UniqueDiffWithinAt 𝕜 s x)
(ht : UniqueDiffWithinAt 𝕜 t y)


@[simp]
theorem blockDiagonal_conjTranspose {α : Type*} [AddMonoid α] [StarAddMonoid α]
    (M : o → Matrix m n α) : (blockDiagonal M)ᴴ = blockDiagonal fun k => (M k)ᴴ

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
[DecidableEq o]
{α : Type u_14}
[AddMonoid α]
[StarAddMonoid α]
(M : o → Matrix m n α)

(Matrix.blockDiagonal M)ᴴ = Matrix.blockDiagonal fun k => (M k)ᴴ


@[simp]
theorem lift_is_succ {o : Ordinal.{v}} : (∃ a, lift.{u} o = succ a) ↔ ∃ a, o = succ a

(∃ a, Ordinal.lift.{u, v} o = Order.succ a) ↔ ∃ a, o = Order.succ a


@[simp]
theorem mem_iSup_of_chain (a : ℕ →o Submodule R M) (m : M) : (m ∈ ⨆ k, a k) ↔ ∃ k, m ∈ a k

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(a : ℕ →o Submodule R M)
(m : M)


theorem addHaar_closedBall_mul (x : E) {r : ℝ} (hr : 0 ≤ r) {s : ℝ} (hs : 0 ≤ s) :
    μ (closedBall x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * μ (closedBall 0 s)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(x : E)
{r : ℝ}
(hr : 0 ≤ r)
{s : ℝ}
(hs : 0 ≤ s)

μ (Metric.closedBall x (r * s)) = ENNReal.ofReal (r ^ FiniteDimensional.finrank ℝ E) * μ (Metric.closedBall 0 s)


@[simp] lemma map_negAddY : negAddY (W'.map f) (f ∘ P) (f ∘ Q) = f (W'.negAddY P Q)

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{S : Type u_1}
[CommRing S]
(f : R →+* S)
(P Q : Fin 3 → R)

WeierstrassCurve.Jacobian.negAddY (WeierstrassCurve.map W' f) (⇑f ∘ P) (⇑f ∘ Q) = f (W'.negAddY P Q)


/-- The indexed supremum of two functions are comparable if the functions are pointwise comparable-/
theorem ciSup_mono {f g : ι → α} (B : BddAbove (range g)) (H : ∀ x, f x ≤ g x) :
    iSup f ≤ iSup g

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
{f g : ι → α}
(B : BddAbove (Set.range g))
(H : ∀ (x : ι), f x ≤ g x)


theorem InjOn.invFunOn_image [Nonempty α] (h : InjOn f s₂) (ht : s₁ ⊆ s₂) :
    invFunOn f s₂ '' (f '' s₁) = s₁

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{f : α → β}
[Nonempty α]
(h : Set.InjOn f s₂)
(ht : s₁ ⊆ s₂)

Function.invFunOn f s₂ '' (f '' s₁) = s₁


theorem Pairwise.chain' : ∀ {l : List α}, Pairwise R l → Chain' R l

{α : Type u}
{R : α → α → Prop}
{l : List α}


@[to_additive (attr := simp)]
theorem coprodAssoc_apply_inl_inl (x : M) : coprodAssoc M N P (inl (inl x)) = inl x

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddMonoid M]
[AddMonoid N]
[AddMonoid P]
(x : M)

(AddMonoid.MulEquiv.coprodAssoc M N P) (AddMonoid.Coprod.inl (AddMonoid.Coprod.inl x)) = AddMonoid.Coprod.inl x


lemma SurjOn.image_preimage (h : Set.SurjOn f s t) (ht : t₁ ⊆ t) : f '' (f ⁻¹' t₁) = t₁

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t t₁ : Set β}
{f : α → β}
(h : Set.SurjOn f s t)
(ht : t₁ ⊆ t)


@[simp] theorem nil_eq_append : [] = a ++ b ↔ a = [] ∧ b = []

∀ {α : Type u_1} {a b : List α}, [] = a ++ b ↔ a = [] ∧ b = []


protected theorem decide_coe (b : Bool) [Decidable (b = true)] : decide (b = true) = b


theorem add_def (a b : Rat) :
    a + b = normalize (a.num * b.den + b.num * a.den) (a.den * b.den)
      (Nat.mul_ne_zero a.den_nz b.den_nz)

a + b = Rat.normalize (a.num * ↑b.den + b.num * ↑a.den) (a.den * b.den) ⋯


lemma Real.dist_left_le_of_mem_uIcc {x y z : ℝ} (h : y ∈ uIcc x z) : dist x y ≤ dist x z


theorem coord_repr_symm (b : Basis ι R M) (i : ι) (f : ι →₀ R) :
    b.coord i (b.repr.symm f) = f i

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(i : ι)
(f : ι →₀ R)


/-- Path composition commutes with products -/
theorem trans_pi_eq_pi_trans (γ₀ : ∀ i, Path (as i) (bs i)) (γ₁ : ∀ i, Path (bs i) (cs i)) :
    (Path.pi γ₀).trans (Path.pi γ₁) = Path.pi fun i => (γ₀ i).trans (γ₁ i)

{ι : Type u_3}
{χ : ι → Type u_4}
[(i : ι) → TopologicalSpace (χ i)]
{as bs cs : (i : ι) → χ i}
(γ₀ : (i : ι) → Path (as i) (bs i))
(γ₁ : (i : ι) → Path (bs i) (cs i))


private theorem calc_deriv_dist {z z' z1 : ℤ_[p]} (hz' : z' = z - z1)
    (hz1 : ‖z1‖ = ‖F.eval z‖ / ‖F.derivative.eval a‖) {n} (hz : ih n z) :
    ‖F.derivative.eval z' - F.derivative.eval z‖ < ‖F.derivative.eval a‖

(hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2)

(hz1 : ‖z1‖ = ‖Polynomial.eval z F‖ / ‖Polynomial.eval a (Polynomial.derivative F)‖)

‖Polynomial.eval z' (Polynomial.derivative F) - Polynomial.eval z (Polynomial.derivative F)‖ <
  ‖Polynomial.eval a (Polynomial.derivative F)‖


theorem toSubalgebra_iSup_of_directed (dir : Directed (· ≤ ·) t) :
    (iSup t).toSubalgebra = ⨆ i, (t i).toSubalgebra

(dir : Directed (fun x x_1 => x ≤ x_1) t)


theorem ContinuousWithinAt.prod {f : α → β} {g : α → γ} {s : Set α} {x : α}
    (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) :
    ContinuousWithinAt (fun x => (f x, g x)) s x

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{f : α → β}
{g : α → γ}
{s : Set α}
{x : α}
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g s x)


@[to_additive]
theorem mk'_mul_eq_mk'_of_mul (x₁ x₂) (y : S) : f.mk' x₂ y * f.toMap x₁ = f.mk' (x₁ * x₂) y

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


theorem isTopologicalBasis_isClopen : IsTopologicalBasis { s : Set X | IsClopen s }

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
[CompactSpace X]
[TotallyDisconnectedSpace X]

TopologicalSpace.IsTopologicalBasis {s | IsClopen s}


@[to_additive]
theorem le_mul_self : a ≤ b * a

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a b : α}


@[to_additive]
theorem op_le_iff {S₁ : Submonoid M} {S₂ : Submonoid Mᵐᵒᵖ} : S₁.op ≤ S₂ ↔ S₁ ≤ S₂.unop

{M : Type u_2}
[MulOneClass M]
{S₁ : Submonoid M}
{S₂ : Submonoid Mᵐᵒᵖ}


/-- Let `f : α → α` be a (pre)ergodic map.
Let `g : α → X` be a measurable function from `α` to a nonempty measurable space
with a countable family of measurable sets separating the points of `X`.
If `g` is invariant under `f`, then `g` is a.e. constant. -/
theorem PreErgodic.ae_eq_const_of_ae_eq_comp (h : PreErgodic f μ) (hgm : Measurable g)
    (hg_eq : g ∘ f = g) : ∃ c, g =ᵐ[μ] const α c

{α : Type u_1}
{X : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[Nonempty X]
[MeasurableSpace X]
[MeasurableSpace.CountablySeparated X]
{f : α → α}
{g : α → X}
(h : PreErgodic f μ)
(hgm : Measurable g)
(hg_eq : g ∘ f = g)


theorem formPerm_eq_one_iff (hl : Nodup l) : formPerm l = 1 ↔ l.length ≤ 1

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


lemma base_nonempty {n : ℕ} (hn : 0 < n) : (Finset.Ico (⌊b (min_bi b) / 2 * n⌋₊) n).Nonempty

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)
{n : ℕ}
(hn : 0 < n)

(Finset.Ico ⌊b (AkraBazziRecurrence.min_bi b) / 2 * ↑n⌋₊ n).Nonempty


{α : Type u_2}
[HeytingAlgebra α]
{a : α}


@[simp]
theorem vecMul_cons (v : Fin n.succ → α) (w : o' → α) (B : Fin n → o' → α) :
    v ᵥ* of (vecCons w B) = vecHead v • w + vecTail v ᵥ* of B

{α : Type u}
{n : ℕ}
{o' : Type uₒ}
[NonUnitalNonAssocSemiring α]
(v : Fin n.succ → α)
(w : o' → α)
(B : Fin n → o' → α)

Matrix.vecMul v (Matrix.of (Matrix.vecCons w B)) = Matrix.vecHead v • w + Matrix.vecMul (Matrix.vecTail v) (Matrix.of B)


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

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

((CategoryTheory.Idempotents.karoubiCochainComplexEquivalence C α).unitIso.hom.app P).f.f n = P.p.f n


/-- A prefunctor induces a map of `Quiver.Costar` at every vertex. -/
@[simps]
def Prefunctor.costar (u : U) : Quiver.Costar u → Quiver.Costar (φ.obj u)

{U : Type u_1}
[Quiver U]
{V : Type u_2}
[Quiver V]
(φ : U ⥤q V)
(u : U)

∀ (a : Quiver.Costar u), (φ.costar u a).snd = φ.map a.snd


@[simp]
lemma Algebra.algebraMap_intNorm_fractionRing (x : B) :
    algebraMap A (FractionRing A) (Algebra.intNorm A B x) =
      Algebra.norm (FractionRing A) (algebraMap B (FractionRing B) x)

[Algebra.IsSeparable (FractionRing A) (FractionRing B)]

(algebraMap A (FractionRing A)) ((Algebra.intNorm A B) x) =
  (Algebra.norm (FractionRing A)) ((algebraMap B (FractionRing B)) x)


@[reassoc]
lemma mapMap_D₂ (i₁₂ i₁₂' : I₁₂) :
    GradedObject.mapMap (toGradedObjectMap φ) _ i₁₂ ≫ L.D₂ c₁₂ i₁₂ i₁₂' =
      K.D₂ c₁₂ i₁₂ i₁₂' ≫ GradedObject.mapMap (toGradedObjectMap φ) _ i₁₂'

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
{K L : HomologicalComplex₂ C c₁ c₂}
(φ : K ⟶ L)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
[L.HasTotal c₁₂]
(i₁₂ i₁₂' : I₁₂)

CategoryTheory.GradedObject.mapMap (HomologicalComplex₂.toGradedObjectMap φ) (c₁.π c₂ c₁₂) i₁₂ ≫ L.D₂ c₁₂ i₁₂ i₁₂' =
  K.D₂ c₁₂ i₁₂ i₁₂' ≫ CategoryTheory.GradedObject.mapMap (HomologicalComplex₂.toGradedObjectMap φ) (c₁.π c₂ c₁₂) i₁₂'


/-- A multiplicative morphism between commutative monoids gives a braided functor between
the corresponding discrete braided monoidal categories.
-/
@[simps!]
def Discrete.braidedFunctor (F : M →* N) : BraidedFunctor (Discrete M) (Discrete N)

{M : Type u}
[CommMonoid M]
{N : Type u}
[CommMonoid N]
(F : M →* N)
(X : CategoryTheory.Discrete M)

((CategoryTheory.Discrete.braidedFunctor F).obj X).as = F X.as


/-- The fully faithful embedding of `CompHausLike P` in `TopCat`. -/
@[simps!]
def compHausLikeToTop : CompHausLike.{u} P ⥤ TopCat.{u}

∀ {X Y : CategoryTheory.InducedCategory TopCat CompHausLike.toTop} (f : X ⟶ Y),
  (CompHausLike.compHausLikeToTop P).map f = f


theorem ωSup_le_iff (c : Chain α) (x : α) : ωSup c ≤ x ↔ ∀ i, c i ≤ x

{α : Type u}
[OmegaCompletePartialOrder α]
(c : OmegaCompletePartialOrder.Chain α)
(x : α)

OmegaCompletePartialOrder.ωSup c ≤ x ↔ ∀ (i : ℕ), c i ≤ x


@[simp] theorem refl_symm : (Equiv.refl α).symm = Equiv.refl α


/-- The generators of `FreeGroup α` generate `FreeGroup α`. That is, the subgroup closure of the
set of generators equals `⊤`. -/
@[to_additive (attr := simp)]
theorem closure_range_of (α) :
    Subgroup.closure (Set.range (FreeGroup.of : α → FreeGroup α)) = ⊤

Subgroup.closure (Set.range FreeGroup.of) = ⊤


/-- `φ`, `ψ` and `ψ.comp φ` form a `MonoidHom.CompTriple`

  (to be used with care, because no simplification is done)-/
theorem comp {φ : M →* N} {ψ : N →* P} :
    CompTriple φ ψ (ψ.comp φ)

{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[Monoid M]
[Monoid N]
[Monoid P]
{φ : M →* N}
{ψ : N →* P}


theorem integrable_mk {f : α → β} (hf : AEStronglyMeasurable f μ) :
    Integrable (mk f hf : α →ₘ[μ] β) ↔ MeasureTheory.Integrable f μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(MeasureTheory.AEEqFun.mk f hf).Integrable ↔ MeasureTheory.Integrable f μ


@[simp, norm_cast]
theorem intCast_re (z : ℤ) : (z : ℍ[R]).re = z


@[simp]
theorem nonempty_mk_iff {x : PSet} : (mk x).Nonempty ↔ x.Nonempty


theorem add_le_max (a b : Cardinal) : a + b ≤ max (max a b) ℵ₀


{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{a : α}


theorem subset_compl_right (h : IsMetricSeparated s t) : s ⊆ tᶜ

{X : Type u_1}
[EMetricSpace X]
{s t : Set X}
(h : IsMetricSeparated s t)


theorem neg_equiv_self (G : PGame) [h : G.Impartial] : G ≈ -G


@[to_additive (attr := simp, norm_cast) coe_nonneg]
theorem one_le_coe [LE α] : 1 ≤ (a : WithBot α) ↔ 1 ≤ a

1 ≤ ↑a ↔ 1 ≤ a


@[simp]
theorem ofReal_eq_coe (r : ℝ) : ofReal r = r


@[simp]
theorem zipWith_single_single (f : ∀ i, β₁ i → β₂ i → β i) (hf : ∀ i, f i 0 0 = 0)
    {i} (b₁ : β₁ i) (b₂ : β₂ i) :
    zipWith f hf (single i b₁) (single i b₂) = single i (f i b₁ b₂)

{ι : Type u}
{β : ι → Type v}
{β₁ : ι → Type v₁}
{β₂ : ι → Type v₂}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
[(i : ι) → Zero (β₁ i)]
[(i : ι) → Zero (β₂ i)]
(f : (i : ι) → β₁ i → β₂ i → β i)
(hf : ∀ (i : ι), f i 0 0 = 0)
{i : ι}
(b₁ : β₁ i)
(b₂ : β₂ i)

DFinsupp.zipWith f hf (DFinsupp.single i b₁) (DFinsupp.single i b₂) = DFinsupp.single i (f i b₁ b₂)


@[simp]
theorem ι_comp_lift (f : X → A) : (lift R f : FreeAlgebra R X → A) ∘ ι R = f

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}
{A : Type u_3}
[Semiring A]
[Algebra R A]
(f : X → A)

⇑((FreeAlgebra.lift R) f) ∘ FreeAlgebra.ι R = f


nonrec theorem IsLocalMinOn.comp_antitone (hf : IsLocalMinOn f s a) {g : β → γ} (hg : Antitone g) :
    IsLocalMaxOn (g ∘ f) s a

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[Preorder β]
[Preorder γ]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsLocalMinOn f s a)
{g : β → γ}
(hg : Antitone g)


/-- The first projection `Triangle C ⥤ C`. -/
@[simps]
def π₁ : Triangle C ⥤ C

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

∀ {X Y : CategoryTheory.Pretriangulated.Triangle C} (f : X ⟶ Y),
  CategoryTheory.Pretriangulated.Triangle.π₁.map f = f.hom₁


theorem integral_eq_lintegral_of_nonneg_ae {f : α → ℝ} (hf : 0 ≤ᵐ[μ] f)
    (hfm : AEStronglyMeasurable f μ) :
    ∫ a, f a ∂μ = ENNReal.toReal (∫⁻ a, ENNReal.ofReal (f a) ∂μ)

(hfm : MeasureTheory.AEStronglyMeasurable f μ)

∫ (a : α), f a ∂μ = (∫⁻ (a : α), ENNReal.ofReal (f a) ∂μ).toReal


theorem coe_toGL (A : SpecialLinearGroup n R) : SpecialLinearGroup.toGL A = A.toLin'.toLinearMap

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

↑(Matrix.SpecialLinearGroup.toGL A) = ↑(Matrix.SpecialLinearGroup.toLin' A)


/-- Given a point `x` in the convex hull of `s` and a point `y` in the convex hull of `t`,
there exist points `x' ∈ s` and `y' ∈ t` at distance at least `dist x y`. -/
theorem convexHull_exists_dist_ge2 {s t : Set E} {x y : E} (hx : x ∈ convexHull ℝ s)
    (hy : y ∈ convexHull ℝ t) : ∃ x' ∈ s, ∃ y' ∈ t, dist x y ≤ dist x' y'

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{s t : Set E}
{x y : E}
(hx : x ∈ (convexHull ℝ) s)
(hy : y ∈ (convexHull ℝ) t)


theorem support_smul [∀ (i : ι) (x : M i), Decidable (x ≠ 0)] (c : R) (v : ⨁ i, M i) :
    (c • v).support ⊆ v.support

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

DFinsupp.support (c • v) ⊆ DFinsupp.support v


theorem setToFun_neg (hT : DominatedFinMeasAdditive μ T C) (f : α → E) :
    setToFun μ T hT (-f) = -setToFun μ T hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

MeasureTheory.setToFun μ T hT (-f) = -MeasureTheory.setToFun μ T hT f


/-- This relies on `default ℕ = 0`. -/
theorem headI_add_tail_sum (L : List ℕ) : L.headI + L.tail.sum = L.sum


theorem ContDiffAt.cos {n} (hf : ContDiffAt ℝ n f x) : ContDiffAt ℝ n (fun x => Real.cos (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{n : ℕ∞}
(hf : ContDiffAt ℝ n f x)


/-- The union of two Gδ sets is a Gδ set. -/
theorem IsGδ.union {s t : Set X} (hs : IsGδ s) (ht : IsGδ t) : IsGδ (s ∪ t)

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}
(hs : IsGδ s)
(ht : IsGδ t)


@[simp]
theorem id_apply (a : α) : ContinuousMap.id α a = a

{α : Type u_1}
[TopologicalSpace α]
(a : α)


lemma StrictMonoOn.mapsTo_Iio (h : StrictMonoOn f (Iic b)) : MapsTo f (Iio b) (Iio (f b))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : StrictMonoOn f (Set.Iic b))

Set.MapsTo f (Set.Iio b) (Set.Iio (f b))


/-- Also see `LinearIndependent.pair_iff` for the version over arbitrary rings. -/
theorem LinearIndependent.pair_iff' {x y : V} (hx : x ≠ 0) :
    LinearIndependent K ![x, y] ↔ ∀ a : K, a • x ≠ y

{K : Type u_3}
{V : Type u}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{x y : V}
(hx : x ≠ 0)

LinearIndependent K ![x, y] ↔ ∀ (a : K), a • x ≠ y


theorem strictConcaveOn_log_Iio : StrictConcaveOn ℝ (Iio 0) log


@[to_additive (attr := simp)]
theorem noncommProd_cons (s : Finset α) (a : α) (f : α → β)
    (ha : a ∉ s) (comm) :
    noncommProd (cons a s ha) f comm =
      f a * noncommProd s f (comm.mono fun _ => Finset.mem_cons.2 ∘ .inr)

(comm : (↑(Finset.cons a s ha)).Pairwise fun a b => Commute (f a) (f b))

(Finset.cons a s ha).noncommProd f comm = f a * s.noncommProd f ⋯


theorem atBot_basis' [SemilatticeInf α] (a : α) : (@atBot α _).HasBasis (fun x => x ≤ a) Iic

{α : Type u_3}
[SemilatticeInf α]
(a : α)

Filter.atBot.HasBasis (fun x => x ≤ a) Set.Iic


@[simp] theorem lid_toLinearEquiv :
    (TensorProduct.lid R A).toLinearEquiv = _root_.TensorProduct.lid R A

(R : Type uR)
(A : Type uA)
[CommSemiring R]
[Semiring A]
[Algebra R A]

(Algebra.TensorProduct.lid R A).toLinearEquiv = TensorProduct.lid R A


theorem monomial_zero_eq_C_apply (a : R) : monomial R 0 a = C R a

(PowerSeries.monomial R 0) a = (PowerSeries.C R) a


/-- To every `S : J.Cover X` and presheaf `P`, associate a `MulticospanIndex`. -/
@[simps]
def index {D : Type u₁} [Category.{v₁} D] (S : J.Cover X) (P : Cᵒᵖ ⥤ D) :
    Limits.MulticospanIndex D

{J : CategoryTheory.GrothendieckTopology C}


/-- See also the strictly more general `final_comp` below. -/
theorem final_comp_equivalence [Final F] [IsEquivalence G] : Final (F ⋙ G)

{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 : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
[F.Final]
[G.IsEquivalence]


/-- Alias for `Equiv.image_eq_preimage` -/
theorem _root_.Set.image_equiv_eq_preimage_symm {α β} (S : Set α) (f : α ≃ β) :
    f '' S = f.symm ⁻¹' S

{α : Type u_1}
{β : Type u_2}
(S : Set α)
(f : α ≃ β)


@[simp]
theorem length_pmap {p : α → Prop} {f : ∀ a, p a → β} {l H} : length (pmap f l H) = length l

{α : Type u}
{β : Type v}
{p : α → Prop}
{f : (a : α) → p a → β}
{l : List α}
{H : ∀ (a : α), a ∈ l → p a}


@[simp]
theorem cons_append {u v w x : V} (h : G.Adj u v) (p : G.Walk v w) (q : G.Walk w x) :
    (cons h p).append q = cons h (p.append q)

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

(SimpleGraph.Walk.cons h p).append q = SimpleGraph.Walk.cons h (p.append q)


theorem topDualPairing_apply (v : E →L[𝕜] 𝕜) (x : E) : topDualPairing 𝕜 E v x = v x

{𝕜 : Type u_2}
{E : Type u_5}
[CommSemiring 𝕜]
[TopologicalSpace 𝕜]
[ContinuousAdd 𝕜]
[ContinuousConstSMul 𝕜 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[TopologicalSpace E]
(v : E →L[𝕜] 𝕜)
(x : E)


/-- Construct a bundled linear map from a pointwise limit of linear maps -/
@[simps! (config := .asFn)]
def linearMapOfTendsto (f : M₁ → M₂) (g : α → M₁ →ₛₗ[σ] M₂) [l.NeBot]
    (h : Tendsto (fun a x => g a x) l (𝓝 f)) : M₁ →ₛₗ[σ] M₂

(g : α → M₁ →ₛₗ[σ] M₂)

(h : Filter.Tendsto (fun a x => (g a) x) l (𝓝 f))


theorem comp_add_le (p : Seminorm 𝕜₂ E₂) (f g : E →ₛₗ[σ₁₂] E₂) :
    p.comp (f + g) ≤ p.comp f + p.comp g

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


@[simp]
theorem ceil_add_ofNat (a : α) (n : ℕ) [n.AtLeastTwo] :
    ⌈a + (no_index (OfNat.ofNat n))⌉ = ⌈a⌉ + OfNat.ofNat n

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)
(n : ℕ)
[n.AtLeastTwo]

⌈a + OfNat.ofNat n⌉ = ⌈a⌉ + OfNat.ofNat n


/-- `ℚ`-algebra implies equal characteristic. -/
theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)

(R : Type u_1)
[CommRing R]
[Algebra ℚ R]
(I : Ideal R)


protected theorem image (h : IsGenericPoint x S) {f : α → β} (hf : Continuous f) :
    IsGenericPoint (f x) (closure (f '' S))

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{x : α}
{S : Set α}
(h : IsGenericPoint x S)
{f : α → β}
(hf : Continuous f)


theorem normalize_dvd_iff {a b : α} : normalize a ∣ b ↔ a ∣ b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
{a b : α}


theorem Finset.card_eq_iff_eq_univ [Fintype α] (s : Finset α) :
    s.card = Fintype.card α ↔ s = Finset.univ

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


theorem isLUB_of_u_image [Preorder α] [Preorder β] (gi : GaloisInsertion l u) {s : Set β} {a : α}
    (hs : IsLUB (u '' s) a) : IsLUB s (l a)

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[Preorder α]
[Preorder β]
(gi : GaloisInsertion l u)
{s : Set β}
{a : α}
(hs : IsLUB (u '' s) a)


/-- Let `p` be a seminorm on a vector space over a `NormedField`.
If there is a scalar `c` with `‖c‖>1`, then any `x` such that `p x ≠ 0` can be
moved by scalar multiplication to any `p`-shell of width `‖c‖`. Also recap information on the
value of `p` on the rescaling element that shows up in applications. -/
lemma rescale_to_shell (p : Seminorm 𝕜 E) {c : 𝕜} (hc : 1 < ‖c‖) {ε : ℝ} (εpos : 0 < ε) {x : E}
    (hx : p x ≠ 0) :
    ∃d : 𝕜, d ≠ 0 ∧ p (d • x) < ε ∧ (ε/‖c‖ ≤ p (d • x)) ∧ (‖d‖⁻¹ ≤ ε⁻¹ * ‖c‖ * p x)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
{c : 𝕜}
(hc : 1 < ‖c‖)
{ε : ℝ}
(εpos : 0 < ε)
{x : E}
(hx : p x ≠ 0)

∃ d, d ≠ 0 ∧ p (d • x) < ε ∧ ε / ‖c‖ ≤ p (d • x) ∧ ‖d‖⁻¹ ≤ ε⁻¹ * ‖c‖ * p x


@[reassoc (attr := simp)]
theorem pullbackDiagonalMapIso_hom_fst :
    (pullbackDiagonalMapIso f i i₁ i₂).hom ≫ pullback.fst _ _ =
      pullback.snd _ _ ≫ pullback.fst _ _

(i₁ : V₁ ⟶ CategoryTheory.Limits.pullback f i)

(i₂ : V₂ ⟶ CategoryTheory.Limits.pullback f i)

(CategoryTheory.Limits.pullbackDiagonalMapIso f i i₁ i₂).hom ≫ CategoryTheory.Limits.pullback.fst i₁ i₂ =
  CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.diagonal f)
      (CategoryTheory.Limits.pullback.map (i₁ ≫ CategoryTheory.Limits.pullback.snd f i)
        (i₂ ≫ CategoryTheory.Limits.pullback.snd f i) f f (i₁ ≫ CategoryTheory.Limits.pullback.fst f i)
        (i₂ ≫ CategoryTheory.Limits.pullback.fst f i) i ⋯ ⋯) ≫
    CategoryTheory.Limits.pullback.fst (i₁ ≫ CategoryTheory.Limits.pullback.snd f i)
      (i₂ ≫ CategoryTheory.Limits.pullback.snd f i)


theorem exists_lower_bound_image [Nonempty α] [LinearOrder β] (s : Set α) (f : α → β)
    (h : s.Finite) : ∃ a : α, ∀ b ∈ s, f a ≤ f b

{α : Type u}
{β : Type v}
[Nonempty α]
[LinearOrder β]
(s : Set α)
(f : α → β)
(h : s.Finite)


/-- The reverse direction of `PiLp.volume_preserving_measurableEquiv`, since
`MeasurePreserving.symm` only works for `MeasurableEquiv`s. -/
theorem PiLp.volume_preserving_equiv_symm : MeasurePreserving (WithLp.equiv 2 (ι → ℝ)).symm

MeasureTheory.MeasurePreserving (⇑(WithLp.equiv 2 (ι → ℝ)).symm) MeasureTheory.volume MeasureTheory.volume


@[simp]
theorem coe_val (f : α → β) (a : α) : (f : α →. β) a = Part.some (f a)

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


theorem ConcaveOn.left_le_of_le_right'' (hf : ConcaveOn 𝕜 s f) (hx : x ∈ s) (hz : z ∈ s)
    (hxy : x ≤ y) (hyz : y < z) (h : f y ≤ f z) : f x ≤ f y

{𝕜 : Type u_1}
{β : Type u_5}
[LinearOrderedField 𝕜]
[LinearOrderedCancelAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{x y z : 𝕜}
{s : Set 𝕜}
{f : 𝕜 → β}
(hf : ConcaveOn 𝕜 s f)
(hx : x ∈ s)
(hz : z ∈ s)
(hxy : x ≤ y)
(hyz : y < z)
(h : f y ≤ f z)


theorem prod_top (s : Subsemiring R) : s.prod (⊤ : Subsemiring S) = s.comap (RingHom.fst R S)

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
(s : Subsemiring R)

s.prod ⊤ = Subsemiring.comap (RingHom.fst R S) s


@[simp]
theorem inter_nil (l : List α) : [] ∩ l = []

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


@[simp]
theorem mem_cons_iff {a b : α} {s : Seq α} : a ∈ cons b s ↔ a = b ∨ a ∈ s

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

a ∈ Stream'.Seq.cons b s ↔ a = b ∨ a ∈ s


theorem card_sym_fin_eq_multichoose : ∀ n k : ℕ, card (Sym (Fin n) k) = multichoose n k

Fintype.card (Sym (Fin n) k) = n.multichoose k


/-- A continuous function with compact support on a product space can be uniformly approximated by
simple functions. The subtlety is that we do not assume that the spaces are separable, so the
product of the Borel sigma algebras might not contain all open sets, but still it contains enough
of them to approximate compactly supported continuous functions. -/
lemma HasCompactSupport.exists_simpleFunc_approx_of_prod [PseudoMetricSpace α]
    {f : X × Y → α} (hf : Continuous f) (h'f : HasCompactSupport f)
    {ε : ℝ} (hε : 0 < ε) :
    ∃ (g : SimpleFunc (X × Y) α), ∀ x, dist (f x) (g x) < ε

{X : Type u_7}
{Y : Type u_8}
{α : Type u_9}
[Zero α]
[TopologicalSpace X]
[TopologicalSpace Y]
[MeasurableSpace X]
[MeasurableSpace Y]
[OpensMeasurableSpace X]
[OpensMeasurableSpace Y]
[PseudoMetricSpace α]
{f : X × Y → α}
(hf : Continuous f)
(h'f : HasCompactSupport f)
{ε : ℝ}
(hε : 0 < ε)

∃ g, ∀ (x : X × Y), dist (f x) (↑g x) < ε


@[to_additive]
theorem isLUB_hasProd' (hf : HasProd f a) : IsLUB (Set.range fun s ↦ ∏ i ∈ s, f i) a

{ι : Type u_1}
{α : Type u_3}
[CanonicallyOrderedAddCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
{a : α}
(hf : HasSum f a)

IsLUB (Set.range fun s => ∑ i ∈ s, f i) a


lemma smul_nonneg_iff_pos_imp_nonneg : 0 ≤ a • b ↔ (0 < a → 0 ≤ b) ∧ (0 < b → 0 ≤ a)

{α : Type u_1}
{β : Type u_2}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[PosSMulStrictMono α β]
{a : α}
{b : β}


theorem Filter.cocompact_neBot_iff : NeBot (Filter.cocompact X) ↔ NoncompactSpace X

(Filter.cocompact X).NeBot ↔ NoncompactSpace X


/-- (Impl) A preliminary definition to avoid timeouts. -/
@[simps]
def conesEquivInverse (B : C) {J : Type w} (F : Discrete J ⥤ Over B) :
    Cone F ⥤ Cone (widePullbackDiagramOfDiagramOver B F)

(F : CategoryTheory.Discrete J ⥤ CategoryTheory.Over B)

∀ {X Y : CategoryTheory.Limits.Cone F} (f : X ⟶ Y),
  ((CategoryTheory.Over.ConstructProducts.conesEquivInverse B F).map f).hom = f.hom.left


@[to_additive]
theorem comap_iSup_map_of_injective (S : ι → Submonoid M) : (⨆ i, (S i).map f).comap f = iSup S

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{ι : Type u_5}
{f : F}
(hf : Function.Injective ⇑f)
(S : ι → AddSubmonoid M)

AddSubmonoid.comap f (⨆ i, AddSubmonoid.map f (S i)) = iSup S


@[simp]
theorem _root_.AlgHom.map_algebraMap (f : A →ₐ[S] B) (r : R) :
    f (algebraMap R A r) = algebraMap R B r

{R : Type u}
{S : Type v}
{A : Type w}
{B : Type u₁}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Semiring B]
[Algebra R S]
[Algebra S A]
[Algebra S B]
[Algebra R A]
[Algebra R B]
[IsScalarTower R S A]
[IsScalarTower R S B]
(f : A →ₐ[S] B)
(r : R)

f ((algebraMap R A) r) = (algebraMap R B) r


theorem natCast_zmod_surjective [NeZero n] : Function.Surjective ((↑) : ℕ → ZMod n)


/-- Assume that, for any `a < b`, a sequence can not be infinitely many times below `a` and
above `b`. If it is also ultimately bounded above and below, then it has to converge. This even
works if `a` and `b` are restricted to a dense subset.
-/
theorem tendsto_of_no_upcrossings [DenselyOrdered α] {f : Filter β} {u : β → α} {s : Set α}
    (hs : Dense s) (H : ∀ a ∈ s, ∀ b ∈ s, a < b → ¬((∃ᶠ n in f, u n < a) ∧ ∃ᶠ n in f, b < u n))
    (h : f.IsBoundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h' : f.IsBoundedUnder (· ≥ ·) u := by isBoundedDefault) :
    ∃ c : α, Tendsto u f (𝓝 c)

(H : ∀ a ∈ s, ∀ b ∈ s, a < b → ¬((∃ᶠ (n : β) in f, u n < a) ∧ ∃ᶠ (n : β) in f, b < u n))

(h : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)

(h' : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u := by isBoundedDefault)


/-- Euler's product formula for the totient function. -/
theorem totient_eq_prod_factorization {n : ℕ} (hn : n ≠ 0) :
    φ n = n.factorization.prod fun p k => p ^ (k - 1) * (p - 1)

n.totient = n.factorization.prod fun p k => p ^ (k - 1) * (p - 1)


@[simp, norm_cast]
protected theorem coe_one : ↑(1 : FreeRing α) = (1 : FreeCommRing α)


@[to_additive]
theorem mk_eq_mk_iff' : mk a₁ a₂ = mk b₁ b₂ ↔ ↑b₂ * a₁ = a₂ * b₁

{α : Type u_1}
[CancelCommMonoid α]
{s : Submonoid α}
{a₁ b₁ : α}
{a₂ b₂ : ↥s}

Localization.mk a₁ a₂ = Localization.mk b₁ b₂ ↔ ↑b₂ * a₁ = ↑a₂ * b₁


/-- If `u` is a sequence which is unbounded above,
then it `Frequently` reaches a value strictly greater than all previous values.
-/
theorem frequently_high_scores [LinearOrder β] [NoMaxOrder β] {u : ℕ → β}
    (hu : Tendsto u atTop atTop) : ∃ᶠ n in atTop, ∀ k < n, u k < u n

(hu : Filter.Tendsto u Filter.atTop Filter.atTop)

∃ᶠ (n : ℕ) in Filter.atTop, ∀ k < n, u k < u n


@[to_additive]
theorem Submonoid.isSubmonoid (S : Submonoid M) : IsSubmonoid (S : Set M)

{M : Type u_1}
[Monoid M]
(S : Submonoid M)


@[simp]
theorem isClique_bot_iff : (⊥ : SimpleGraph α).IsClique s ↔ (s : Set α).Subsingleton


/-- Any element in `Rˣ` is `M`-regular. -/
theorem Units.isSMulRegular (a : Rˣ) : IsSMulRegular M (a : R)

{R : Type u_1}
(M : Type u_3)
[Monoid R]
[MulAction R M]
(a : Rˣ)


theorem embedding_of_embedding_compose
    (hf : Continuous f) (hg : Continuous g) (hgf : Embedding (g ∘ f)) : Embedding f

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
{f : X → Y}
{g : Y → Z}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(hf : Continuous f)
(hg : Continuous g)
(hgf : Embedding (g ∘ f))


/-- The functor from a groupoid `C` to its opposite sending every morphism to its inverse. -/
@[simps]
noncomputable def Groupoid.invFunctor : C ⥤ Cᵒᵖ

(C : Type u)
[CategoryTheory.Groupoid C]
(unop : C)

(CategoryTheory.Groupoid.invFunctor C).obj unop = Opposite.op unop


theorem ncard_union_eq (h : Disjoint s t) (hs : s.Finite := by toFinite_tac)
    (ht : t.Finite := by toFinite_tac) : (s ∪ t).ncard = s.ncard + t.ncard

{α : Type u_1}
{s t : Set α}
(h : Disjoint s t)
(hs : s.Finite := by toFinite_tac)
(ht : t.Finite := by toFinite_tac)


theorem superpolynomialDecay_iff_superpolynomialDecay_norm :
    SuperpolynomialDecay l k f ↔ SuperpolynomialDecay l (fun a => ‖k a‖) fun a => ‖f a‖

{α : Type u_1}
{β : Type u_2}
(l : Filter α)
(k f : α → β)
[NormedLinearOrderedField β]

Asymptotics.SuperpolynomialDecay l k f ↔ Asymptotics.SuperpolynomialDecay l (fun a => ‖k a‖) fun a => ‖f a‖


/-- The order of the monomial `a*X^n` is `n` if `a ≠ 0`. -/
theorem order_monomial_of_ne_zero (n : ℕ) (a : R) (h : a ≠ 0) : order (monomial R n a) = n

{R : Type u_1}
[Semiring R]
(n : ℕ)
(a : R)
(h : a ≠ 0)

((PowerSeries.monomial R n) a).order = ↑n


@[simp]
theorem Basis.tensorProduct_repr_tmul_apply (b : Basis ι S M) (c : Basis κ R N) (m : M) (n : N)
    (i : ι) (j : κ) :
    (Basis.tensorProduct b c).repr (m ⊗ₜ n) (i, j) = c.repr n j • b.repr m i

{R : Type u_1}
{S : Type u_2}
{M : Type u_3}
{N : Type u_4}
{ι : Type u_5}
{κ : Type u_6}
[CommSemiring R]
[Semiring S]
[Algebra R S]
[AddCommMonoid M]
[Module R M]
[Module S M]
[IsScalarTower R S M]
[AddCommMonoid N]
[Module R N]
(b : Basis ι S M)
(c : Basis κ R N)
(m : M)
(n : N)
(i : ι)
(j : κ)

((b.tensorProduct c).repr (m ⊗ₜ[R] n)) (i, j) = (c.repr n) j • (b.repr m) i


lemma doset_eq_image2 (a : α) (s t : Set α) : doset a s t = Set.image2 (· * a * ·) s t

{α : Type u_2}
[Mul α]
(a : α)
(s t : Set α)

Doset.doset a s t = Set.image2 (fun x x_1 => x * a * x_1) s t


theorem lt_of_add_one_le {n m : Nat} (h : n + 1 ≤ m) : n < m


/-- For a family of functions between (pseudo) metric spaces, a convenient way to prove
equicontinuity is to show that all of the functions share a common *global* continuity modulus. -/
theorem equicontinuous_of_continuity_modulus {ι : Type*} [PseudoMetricSpace β] (b : ℝ → ℝ)
    (b_lim : Tendsto b (𝓝 0) (𝓝 0)) (F : ι → β → α)
    (H : ∀ (x y : β) (i), dist (F i x) (F i y) ≤ b (dist x y)) : Equicontinuous F

(F : ι → β → α)

(H : ∀ (x y : β) (i : ι), dist (F i x) (F i y) ≤ b (dist x y))


@[simp]
theorem comap_map_eq (h : ↑(map f I) = f '' I) : comap f (map f I) = I ⊔ f.ker

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
{f : L →ₗ⁅R⁆ L'}
{I : LieIdeal R L}
(h : ↑(LieIdeal.map f I) = ⇑f '' ↑I)

LieIdeal.comap f (LieIdeal.map f I) = I ⊔ f.ker


theorem DenseEmbedding.mk' [TopologicalSpace α] [TopologicalSpace β] (e : α → β) (c : Continuous e)
    (dense : DenseRange e) (inj : Function.Injective e)
    (H : ∀ (a : α), ∀ s ∈ 𝓝 a, ∃ t ∈ 𝓝 (e a), ∀ b, e b ∈ t → b ∈ s) : DenseEmbedding e

(H : ∀ (a : α), ∀ s ∈ 𝓝 a, ∃ t ∈ 𝓝 (e a), ∀ (b : α), e b ∈ t → b ∈ s)


@[to_additive]
theorem map_eq_one_iff [OneHomClass F M N] (f : F) (hf : Function.Injective f)
    {x : M} :
    f x = 1 ↔ x = 1

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[Zero M]
[Zero N]
[FunLike F M N]
[ZeroHomClass F M N]
(f : F)
(hf : Function.Injective ⇑f)
{x : M}


@[simp]
theorem coeff_zero_X : coeff R 0 (X : R⟦X⟧) = 0

(PowerSeries.coeff R 0) PowerSeries.X = 0


@[simp]
lemma decomposeAddEquiv_symm_apply (a : ⨁ i, ℳ i) :
    (decomposeAddEquiv ℳ).symm a = (decompose ℳ).symm a

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
(a : ⨁ (i : ι), ↥(ℳ i))

(DirectSum.decomposeAddEquiv ℳ).symm a = (DirectSum.decompose ℳ).symm a


protected theorem continuousWithinAt {s x} : ContinuousWithinAt e s x

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(e : P ≃ᵃⁱ[𝕜] P₂)
{s : Set P}
{x : P}


/-- The height one prime spectrum of a Dedekind domain `R` is the type of nonzero prime ideals of
`R`. Note that this equals the maximal spectrum if `R` has Krull dimension 1. -/
-- Porting note(#5171): removed `has_nonempty_instance`, linter doesn't exist yet
@[ext, nolint unusedArguments]
structure HeightOneSpectrum where
  asIdeal : Ideal R
  isPrime : asIdeal.IsPrime
  ne_bot : asIdeal ≠ ⊥

(self : IsDedekindDomain.HeightOneSpectrum R)


protected lemma div_pos_iff (hb : b ≠ 0) : 0 < a / b ↔ b ≤ a


{R : Type u_3}
[CommRing R]
(r : R)
(a : ℍ[R])


theorem get_natCast {x : ℕ} : get (x : PartENat) (dom_natCast x) = x


theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) : exp 𝕂 (z • A) = exp 𝕂 A ^ z

(𝕂 : Type u_1)
{m : Type u_2}
{𝔸 : Type u_6}
[RCLike 𝕂]
[Fintype m]
[DecidableEq m]
[NormedCommRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(z : ℤ)
(A : Matrix m m 𝔸)

NormedSpace.exp 𝕂 (z • A) = NormedSpace.exp 𝕂 A ^ z


@[simp]
theorem acc_lift₂_iff [Setoid α] {r : α → α → Prop}
    {H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂} {a} :
    Acc (Quotient.lift₂ r H) ⟦a⟧ ↔ Acc r a


@[measurability]
theorem measurable_intCast [IntCast α] (n : ℤ) : Measurable (n : β → α)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
[IntCast α]
(n : ℤ)


@[simp]
theorem isEmpty_sum {α β} : IsEmpty (α ⊕ β) ↔ IsEmpty α ∧ IsEmpty β


@[simp]
theorem fromBlocks_zero [Zero α] : fromBlocks (0 : Matrix n l α) 0 0 (0 : Matrix o m α) = 0

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[Zero α]


theorem ConcaveOn.sub_strictConvexOn (hf : ConcaveOn 𝕜 s f) (hg : StrictConvexOn 𝕜 s g) :
    StrictConcaveOn 𝕜 s (f - g)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommGroup β]
[SMul 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f g : E → β}
(hf : ConcaveOn 𝕜 s f)
(hg : StrictConvexOn 𝕜 s g)


theorem HeapNode.WF.toHeap {s : HeapNode α} (h : s.WF le a n) : s.toHeap.WF le 0

{res : Batteries.BinomialHeap.Imp.Heap α}

{s : Batteries.BinomialHeap.Imp.HeapNode α}

Batteries.BinomialHeap.Imp.HeapNode.WF le a s n →
  Batteries.BinomialHeap.Imp.Heap.WF le s.rank res →
    Batteries.BinomialHeap.Imp.Heap.WF le 0 (Batteries.BinomialHeap.Imp.HeapNode.toHeap.go s s.rank res)


@[to_additive (attr := simp)]
theorem one_comp [MulOneClass M] [MulOneClass N] [MulOneClass P] (f : M →* N) :
    (1 : N →* P).comp f = 1

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


theorem Finset.countable_toSet (s : Finset α) : Set.Countable (↑s : Set α)


/-- `evalEval x y` as a ring homomorphism. -/
@[simps!] abbrev evalEvalRingHom (x y : R) : R[X][Y] →+* R

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

∀ (a : R[X][Y]), (Polynomial.evalEvalRingHom x y) a = Polynomial.eval x (Polynomial.eval (Polynomial.C y) a)


theorem unbounded_lt_univ [Preorder α] [NoTopOrder α] : Unbounded (· < ·) (@Set.univ α)

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

Set.Unbounded (fun x x_1 => x < x_1) Set.univ


theorem hasSum_geometric_of_lt_one {r : ℝ} (h₁ : 0 ≤ r) (h₂ : r < 1) :
    HasSum (fun n : ℕ ↦ r ^ n) (1 - r)⁻¹


theorem IsPreconnected.intermediate_value_Iii {s : Set X} (hs : IsPreconnected s) {l₁ l₂ : Filter X}
    [NeBot l₁] [NeBot l₂] (hl₁ : l₁ ≤ 𝓟 s) (hl₂ : l₂ ≤ 𝓟 s) {f : X → α} (hf : ContinuousOn f s)
    (ht₁ : Tendsto f l₁ atBot) (ht₂ : Tendsto f l₂ atTop) : univ ⊆ f '' s

(ht₁ : Filter.Tendsto f l₁ Filter.atBot)

(ht₂ : Filter.Tendsto f l₂ Filter.atTop)


/-- `DFunLike.coe` as a linear map. -/
@[simps!] def coeFnₗ (R : Type*) [Semiring R] [AddCommMonoid Y]
    [Module R Y] : LocallyConstant X Y →ₗ[R] X → Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
(R : Type u_6)
[Semiring R]
[AddCommMonoid Y]
[Module R Y]

∀ (a : LocallyConstant X Y) (a_1 : X), (LocallyConstant.coeFnₗ R) a a_1 = a a_1


theorem fract_div_mul_self_mem_Ico (a b : k) (ha : 0 < a) : fract (b / a) * a ∈ Ico 0 a

{k : Type u_4}
[LinearOrderedField k]
[FloorRing k]
(a b : k)
(ha : 0 < a)


theorem convexBodySumFun_nonneg (x : E K) :
    0 ≤ convexBodySumFun x

(x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

0 ≤ NumberField.mixedEmbedding.convexBodySumFun x


lemma card_mono (ht : t.Finite) (h : s ⊆ t) : Nat.card s ≤ Nat.card t

{α : Type u_1}
{s t : Set α}
(ht : t.Finite)
(h : s ⊆ t)


lemma Algebra.trace_eq_of_algEquiv {A B C : Type*} [CommRing A] [CommRing B] [CommRing C]
    [Algebra A B] [Algebra A C] (e : B ≃ₐ[A] C) (x) :
    Algebra.trace A C (e x) = Algebra.trace A B x

{A : Type u_7}
{B : Type u_8}
{C : Type u_9}
[CommRing A]
[CommRing B]
[CommRing C]
[Algebra A B]
[Algebra A C]
(e : B ≃ₐ[A] C)
(x : B)

(Algebra.trace A C) (e x) = (Algebra.trace A B) x


@[to_additive]
protected theorem mul_inv (s s' : S) : ((s : R) /ₒ s') * ((s' : R) /ₒ s) = 1

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
(s s' : ↥S)


@[simp]
theorem thickening_ball (hε : 0 < ε) (hδ : 0 < δ) (x : E) :
    thickening ε (ball x δ) = ball x (ε + δ)

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{δ ε : ℝ}
(hε : 0 < ε)
(hδ : 0 < δ)
(x : E)

Metric.thickening ε (Metric.ball x δ) = Metric.ball x (ε + δ)


theorem max'_eq_sup' : s.max' H = s.sup' H id

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


theorem div_lt_one_iff : a / b < 1 ↔ 0 < b ∧ a < b ∨ b = 0 ∨ b < 0 ∧ b < a

{α : Type u_2}
[LinearOrderedField α]
{a b : α}


lemma epi_homologyMap_mor₂_iff :
    Epi ((homologyFunctor C n₀).map T.mor₂) ↔ δ T n₀ n₁ h = 0

(T : CategoryTheory.Pretriangulated.Triangle (DerivedCategory C))

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.Epi ((DerivedCategory.homologyFunctor C n₀).map T.mor₂) ↔
  DerivedCategory.HomologySequence.δ T n₀ n₁ h = 0


theorem liftPropOn_chart_symm [HasGroupoid M G] (hG : G.LocalInvariantProp G Q)
    (hQ : ∀ y, Q id univ y) : LiftPropOn Q (chartAt (H := H) x).symm (chartAt H x).target

{H : Type u_1}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{G : StructureGroupoid H}
{x : M}
{Q : (H → H) → Set H → H → Prop}
[HasGroupoid M G]
(hG : G.LocalInvariantProp G Q)
(hQ : ∀ (y : H), Q id Set.univ y)

ChartedSpace.LiftPropOn Q (↑(chartAt H x).symm) (chartAt H x).target


/-- If `P` is a family of generators of `S` over `R` and `T` is an `R`-algebra, we
obtain a natural family of generators of `T ⊗[R] S` over `T`. -/
@[simps! val, simps! (config := .lemmasOnly) vars]
noncomputable
def baseChange {T} [CommRing T] [Algebra R T] (P : Generators R S) : Generators T (T ⊗[R] S)

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


@[simp]
lemma ofENat_toENat_eq_self {a : Cardinal} : toENat a = a ↔ a ≤ ℵ₀

↑(Cardinal.toENat a) = a ↔ a ≤ Cardinal.aleph0


theorem pow_arith_mean_le_arith_mean_pow_of_even (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i)
    (hw' : ∑ i ∈ s, w i = 1) {n : ℕ} (hn : Even n) :
    (∑ i ∈ s, w i * z i) ^ n ≤ ∑ i ∈ s, w i * z i ^ n

{ι : Type u}
(s : Finset ι)
(w z : ι → ℝ)
(hw : ∀ i ∈ s, 0 ≤ w i)
(hw' : ∑ i ∈ s, w i = 1)
{n : ℕ}
(hn : Even n)


theorem logb_nonneg_iff_of_base_lt_one (hx : 0 < x) : 0 ≤ logb b x ↔ x ≤ 1


lemma natDegree_Ψ₂Sq_le : W.Ψ₂Sq.natDegree ≤ 3

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


/-- `charpoly f` is the characteristic polynomial of the matrix of `f` in any basis. -/
@[simp]
theorem charpoly_toMatrix {ι : Type w} [DecidableEq ι] [Fintype ι] (b : Basis ι R M) :
    (toMatrix b b f).charpoly = f.charpoly

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[Nontrivial R]
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[Module.Finite R M]
(f : M →ₗ[R] M)
{ι : Type w}
[DecidableEq ι]
[Fintype ι]
(b : Basis ι R M)

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


protected theorem Antitone.antivary (hf : Antitone f) (hg : Monotone g) : Antivary f g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}
[LinearOrder ι]
(hf : Antitone f)
(hg : Monotone g)


@[simp]
theorem enumOrd_range {f : Ordinal → Ordinal} (hf : StrictMono f) : enumOrd (range f) = f

{f : Ordinal.{u_1} → Ordinal.{u_1}}
(hf : StrictMono f)


/-- The minimal polynomial of a primitive `n`-th root of unity `μ` divides `cyclotomic n ℤ`. -/
theorem _root_.IsPrimitiveRoot.minpoly_dvd_cyclotomic {n : ℕ} {K : Type*} [Field K] {μ : K}
    (h : IsPrimitiveRoot μ n) (hpos : 0 < n) [CharZero K] : minpoly ℤ μ ∣ cyclotomic n ℤ

{n : ℕ}
{K : Type u_2}
[Field K]
{μ : K}
(h : IsPrimitiveRoot μ n)
(hpos : 0 < n)
[CharZero K]


theorem mono (h : SeparatedNhds s₂ t₂) (hs : s₁ ⊆ s₂) (ht : t₁ ⊆ t₂) : SeparatedNhds s₁ t₁

{X : Type u_1}
[TopologicalSpace X]
{s₁ s₂ t₁ t₂ : Set X}
(h : SeparatedNhds s₂ t₂)
(hs : s₁ ⊆ s₂)
(ht : t₁ ⊆ t₂)


@[simp] lemma down_id {X : C} : down (𝟙 (of X)) = 𝟙 X

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

CategoryTheory.WithTerminal.down (CategoryTheory.CategoryStruct.id (CategoryTheory.WithTerminal.of X)) =
  CategoryTheory.CategoryStruct.id X


@[simp] lemma unop_g' {S : ShortComplex Cᵒᵖ} (h : S.LeftHomologyData) :
    h.unop.g' = h.f'.unop


theorem set_support_inv_eq : { x | p⁻¹ x ≠ x } = { x | p x ≠ x }


theorem Coloring.not_adj_of_mem_colorClass {c : α} {v w : V} (hv : v ∈ C.colorClass c)
    (hw : w ∈ C.colorClass c) : ¬G.Adj v w

{V : Type u}
{G : SimpleGraph V}
{α : Type u_1}
(C : G.Coloring α)
{c : α}
{v w : V}
(hv : v ∈ C.colorClass c)
(hw : w ∈ C.colorClass c)


@[simp]
theorem monomial_pow (n : ℕ) (r : R) (k : ℕ) : monomial n r ^ k = monomial (n * k) (r ^ k)

{R : Type u}
[Semiring R]
(n : ℕ)
(r : R)
(k : ℕ)

(Polynomial.monomial n) r ^ k = (Polynomial.monomial (n * k)) (r ^ k)


@[deprecated (since := "2024-05-05")] theorem Forall₂.nthLe {x y} (h : Forall₂ R x y) ⦃i : ℕ⦄
    (hx : i < x.length) (hy : i < y.length) : R (x.nthLe i hx) (y.nthLe i hy)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
{x : List α}
{y : List β}
(h : List.Forall₂ R x y)
⦃i : ℕ⦄
(hx : i < x.length)
(hy : i < y.length)


@[simp]
theorem foldr_add (f : α → β → β) (H b s t) : foldr f H b (s + t) = foldr f H (foldr f H b t) s

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

Multiset.foldr f H b (s + t) = Multiset.foldr f H (Multiset.foldr f H b t) s


theorem valid : ∀ {s}, ValidFor l m r s → Valid s


@[simp]
lemma castHom_self : ZMod.castHom dvd_rfl (ZMod n) = RingHom.id (ZMod n)

ZMod.castHom ⋯ (ZMod n) = RingHom.id (ZMod n)


theorem LiftRel.mono_right (hs : ∀ a b, s₁ a b → s₂ a b) (h : LiftRel r s₁ x y) :
    LiftRel r s₂ x y

∀ {β : Type u_1} {β_1 : Type u_2} {s₁ s₂ : β → β_1 → Prop} {α : Type u_3} {α_1 : Type u_4} {r : α → α_1 → Prop}
  {x : α ⊕ β} {y : α_1 ⊕ β_1}, (∀ (a : β) (b : β_1), s₁ a b → s₂ a b) → Sum.LiftRel r s₁ x y → Sum.LiftRel r s₂ x y


@[simp]
lemma log_ofReal (x : ℝ) : log (ENNReal.ofReal x) = if x ≤ 0 then ⊥ else ↑(Real.log x)

(ENNReal.ofReal x).log = if x ≤ 0 then ⊥ else ↑(Real.log x)


@[simp]
theorem coe_linearMap_equivRange (f : E →SL[σ] F) (hinj : Injective f) (hclo : IsClosed (range f)) :
    f.equivRange hinj hclo = f.rangeRestrict

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

↑(f.equivRange hinj hclo) = f.rangeRestrict


@[simp]
theorem PreservesLimitPair.iso_inv_snd :
    (PreservesLimitPair.iso G X Y).inv ≫ G.map prod.snd = prod.snd

[CategoryTheory.Limits.HasBinaryProduct (G.obj X) (G.obj Y)]

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.pair X Y) G]

(CategoryTheory.Limits.PreservesLimitPair.iso G X Y).inv ≫ G.map CategoryTheory.Limits.prod.snd =
  CategoryTheory.Limits.prod.snd


theorem biUnion_sigma' (s : Set ι) (t : ∀ i, Set (α i)) (f : ∀ i, α i → Set β) :
    ⋃ i ∈ s, ⋃ j ∈ t i, f i j = ⋃ ij ∈ s.sigma t, f ij.fst ij.snd

{ι : Type u_1}
{α : ι → Type u_3}
{β : Type u_6}
(s : Set ι)
(t : (i : ι) → Set (α i))
(f : (i : ι) → α i → Set β)


theorem Fintype.card_subtype [Fintype α] (p : α → Prop) [DecidablePred p] :
    Fintype.card { x // p x } = ((Finset.univ : Finset α).filter p).card

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

Fintype.card { x // p x } = (Finset.filter p Finset.univ).card


@[simp]
theorem measure_symmDiff_eq_zero_iff {s t : Set α} : μ (s ∆ t) = 0 ↔ s =ᵐ[μ] t

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


/-- Equivalences (between types in the same universe) are the same as (isomorphic to) isomorphisms
of types. -/
@[simps]
def equivIsoIso {X Y : Type u} : X ≃ Y ≅ X ≅ Y


theorem gcd_eq_left {a b : R} : gcd a b = a ↔ a ∣ b

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{a b : R}


/-- The standard case of the layer cake formula / Cavalieri's principle / tail probability formula:

For a nonnegative function `f` on a measure space, the Lebesgue integral of `f` can
be written (roughly speaking) as: `∫⁻ f ∂μ = ∫⁻ t in 0..∞, μ {ω | f(ω) ≥ t}`.

See `MeasureTheory.lintegral_eq_lintegral_meas_lt` for a version with sets of the form
`{ω | f(ω) > t}` instead. -/
theorem lintegral_eq_lintegral_meas_le (μ : Measure α) (f_nn : 0 ≤ᵐ[μ] f)
    (f_mble : AEMeasurable f μ) :
    ∫⁻ ω, ENNReal.ofReal (f ω) ∂μ = ∫⁻ t in Ioi 0, μ {a : α | t ≤ f a}

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ}
(μ : MeasureTheory.Measure α)
(f_nn : 0 ≤ᵐ[μ] f)
(f_mble : AEMeasurable f μ)

∫⁻ (ω : α), ENNReal.ofReal (f ω) ∂μ = ∫⁻ (t : ℝ) in Set.Ioi 0, μ {a | t ≤ f a}


theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source

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

(e.trans e').source = e.source ∩ ↑e ⁻¹' e'.source


theorem eLpNormEssSup_le_of_ae_bound {f : α → F} {C : ℝ} (hfC : ∀ᵐ x ∂μ, ‖f x‖ ≤ C) :
    eLpNormEssSup f μ ≤ ENNReal.ofReal C

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}
{C : ℝ}
(hfC : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C)

MeasureTheory.eLpNormEssSup f μ ≤ ENNReal.ofReal C


theorem exists_eq_T_zpow_of_c_eq_zero (hc : (↑ₘg) 1 0 = 0) :
    ∃ n : ℤ, ∀ z : ℍ, g • z = T ^ n • z

∃ n, ∀ (z : ℍ), g • z = ModularGroup.T ^ n • z


theorem ContDiffOn.continuousOn_deriv_of_isOpen (h : ContDiffOn 𝕜 n f₂ s₂) (hs : IsOpen s₂)
    (hn : 1 ≤ n) : ContinuousOn (deriv f₂) s₂

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{f₂ : 𝕜 → F}
{s₂ : Set 𝕜}
(h : ContDiffOn 𝕜 n f₂ s₂)
(hs : IsOpen s₂)
(hn : 1 ≤ n)


@[simp]
lemma _root_.IsometryEquiv.toDilationEquiv_ratio (e : X ≃ᵢ Y) : ratio e.toDilationEquiv = 1

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


/-- Angles in a vector space are translation invariant -/
@[simp]
theorem angle_add_const (v₁ v₂ v₃ : V) (v : V) : ∠ (v₁ + v) (v₂ + v) (v₃ + v) = ∠ v₁ v₂ v₃

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
(v₁ v₂ v₃ v : V)

EuclideanGeometry.angle (v₁ + v) (v₂ + v) (v₃ + v) = EuclideanGeometry.angle v₁ v₂ v₃


/-- Right inverse to a continuous map from a homeomorphism, mirroring `Equiv.self_comp_symm`. -/
@[simp]
theorem toContinuousMap_comp_symm :
    (f : C(α, β)).comp (f.symm : C(β, α)) = ContinuousMap.id β

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : α ≃ₜ β)

f.toContinuousMap.comp f.symm.toContinuousMap = ContinuousMap.id β


@[to_additive (attr := simp)]
theorem pow_mod_period_smul (n : ℕ) {m : M} {a : α} :
    m ^ (n % period m a) • a = m ^ n • a

{α : Type v}
{M : Type u}
[AddMonoid M]
[AddAction M α]
(n : ℕ)
{m : M}
{a : α}

(n % AddAction.period m a) • m +ᵥ a = n • m +ᵥ a


@[simp]
lemma equicontinuousAt_empty [h : IsEmpty ι] (F : ι → X → α) (x₀ : X) :
    EquicontinuousAt F x₀

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
[h : IsEmpty ι]
(F : ι → X → α)
(x₀ : X)


@[simp]
theorem normalizedFactors_zero : normalizedFactors (0 : α) = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
[UniqueFactorizationMonoid α]

UniqueFactorizationMonoid.normalizedFactors 0 = 0


private lemma Icc_neg_mono : Monotone fun n : ℕ ↦ Icc (-n : α) n

{α : Type u_1}
[OrderedRing α]
[LocallyFiniteOrder α]


theorem sum_ofWithBot {M : Type*} [AddCommMonoid M] (boxes : Finset (WithBot (Box ι)))
    (le_of_mem : ∀ J ∈ boxes, (J : WithBot (Box ι)) ≤ I)
    (pairwise_disjoint : Set.Pairwise (boxes : Set (WithBot (Box ι))) Disjoint) (f : Box ι → M) :
    (∑ J ∈ (ofWithBot boxes le_of_mem pairwise_disjoint).boxes, f J) =
      ∑ J ∈ boxes, Option.elim' 0 f J

(boxes : Finset (WithBot (BoxIntegral.Box ι)))

(pairwise_disjoint : (↑boxes).Pairwise Disjoint)

∑ J ∈ (BoxIntegral.Prepartition.ofWithBot boxes le_of_mem pairwise_disjoint).boxes, f J =
  ∑ J ∈ boxes, Option.elim' 0 f J


@[simp]
theorem arctan_eq_zero_iff {x : ℝ} : arctan x = 0 ↔ x = 0


theorem associated_iff_normalizedFactors_eq_normalizedFactors {x y : α} (hx : x ≠ 0) (hy : y ≠ 0) :
    x ~ᵤ y ↔ normalizedFactors x = normalizedFactors y

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

x ~ᵤ y ↔ UniqueFactorizationMonoid.normalizedFactors x = UniqueFactorizationMonoid.normalizedFactors y


@[simp] lemma preimage_subtype_val_Icc (a b : {x // p x}) : (↑) ⁻¹' (Icc a.1 b) = Icc a b

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a b : { x // p x })

Subtype.val ⁻¹' Set.Icc ↑a ↑b = Set.Icc a b


theorem erase_subset_iff_of_mem (h : a ∈ t) : s.erase a ⊆ t ↔ s ⊆ t

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{a : α}
(h : a ∈ t)


/-- The split mono which appears in the factorisation `decompId P`. -/
@[simps]
def decompId_i (P : Karoubi C) : P ⟶ P.X

(P : CategoryTheory.Idempotents.Karoubi C)


@[to_additive]
theorem pow_pow_self (a : M) (m n : ℕ) : Commute (a ^ m) (a ^ n)

{M : Type u_2}
[Monoid M]
(a : M)
(m n : ℕ)


@[to_additive]
theorem image_mul_product : ((s ×ˢ t).image fun x : α × α => x.fst * x.snd) = s * t

{α : Type u_2}
[DecidableEq α]
[Mul α]
{s t : Finset α}

Finset.image (fun x => x.1 * x.2) (s ×ˢ t) = s * t


theorem tendsto_approxOn_range_Lp_eLpNorm [BorelSpace E] {f : β → E} (hp_ne_top : p ≠ ∞)
    {μ : Measure β} (fmeas : Measurable f) [SeparableSpace (range f ∪ {0} : Set E)]
    (hf : eLpNorm f p μ < ∞) :
    Tendsto (fun n => eLpNorm (⇑(approxOn f fmeas (range f ∪ {0}) 0 (by simp) n) - f) p μ)
      atTop (𝓝 0)

[TopologicalSpace.SeparableSpace ↑(Set.range f ∪ {0})]

Filter.Tendsto
  (fun n => MeasureTheory.eLpNorm (↑(MeasureTheory.SimpleFunc.approxOn f fmeas (Set.range f ∪ {0}) 0 ⋯ n) - f) p μ)
  Filter.atTop (𝓝 0)


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

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul G]
(g : G)

⇑(MeasurableEquiv.mulLeft g) = fun x => g * x


theorem traceMatrix_eq_embeddingsMatrixReindex_mul_trans [Fintype κ] (e : κ ≃ (L →ₐ[K] E)) :
    (traceMatrix K b).map (algebraMap K E) =
      embeddingsMatrixReindex K E b e * (embeddingsMatrixReindex K E b e)ᵀ

(K : Type u_4)
{L : Type u_5}
[Field K]
[Field L]
[Algebra K L]
{κ : Type w}
(E : Type z)
[Field E]
[Algebra K E]
[Module.Finite K L]
[Algebra.IsSeparable K L]
[IsAlgClosed E]
(b : κ → L)
[Fintype κ]
(e : κ ≃ (L →ₐ[K] E))

(Algebra.traceMatrix K b).map ⇑(algebraMap K E) =
  Algebra.embeddingsMatrixReindex K E b e * (Algebra.embeddingsMatrixReindex K E b e)ᵀ


theorem subset_union_left {s₁ s₂ : Finset α} : s₁ ⊆ s₁ ∪ s₂

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

s₁ ⊆ s₁ ∪ s₂


theorem arccos_of_le_neg_one {x : ℝ} (hx : x ≤ -1) : arccos x = π


@[simp]
theorem sum_toMatrix_smul_self [Fintype ι] : ∑ i : ι, e.toMatrix v i j • e i = v j

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(e : Basis ι R M)
(v : ι' → M)
(j : ι')
[Fintype ι]


@[simp]
theorem sameRay_smul_left_iff {v : M} {r : R} : SameRay R (r • v) v ↔ 0 ≤ r ∨ v = 0

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{v : M}
{r : R}


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

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


@[simp] lemma dens_eq_zero : dens s = 0 ↔ s = ∅

{α : Type u_2}
[Fintype α]
{s : Finset α}


theorem Set.restrictPreimage_inducing (s : Set β) (h : Inducing f) :
    Inducing (s.restrictPreimage f)

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


@[simp]
theorem lift.isLift_hom (X : C) : (lift.isLift r F H).hom.app X = 𝟙 (F.obj X)

(H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂)

(CategoryTheory.Quotient.lift.isLift r F H).hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)


@[simp]
theorem areaForm_apply_self (x : E) : ω x x = 0

[Fact (FiniteDimensional.finrank ℝ E = 2)]


@[simp]
theorem convexHull_nonempty_iff : (convexHull 𝕜 s).Nonempty ↔ s.Nonempty

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s : Set E}

((convexHull 𝕜) s).Nonempty ↔ s.Nonempty


@[symm]
theorem symm (h : IsMetricSeparated s t) : IsMetricSeparated t s

{X : Type u_1}
[EMetricSpace X]
{s t : Set X}
(h : IsMetricSeparated s t)


theorem eq_zero_of_bot_submodule : ∀ b : (⊥ : Submodule R M), b = 0

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : ↥⊥)


theorem FiniteDimensional.finrank_of_not_finite
    (h : ¬Module.Finite R M) :
    finrank R M = 0

{R : Type u}
{M : Type v}
[Ring R]
[StrongRankCondition R]
[AddCommGroup M]
[Module R M]
[Module.Free R M]
(h : ¬Module.Finite R M)


theorem subset_pointwise_smul_iff {a : α} {S T : Submonoid M} : S ≤ a • T ↔ a⁻¹ • S ≤ T

{α : Type u_1}
{M : Type u_3}
[Monoid M]
[Group α]
[MulDistribMulAction α M]
{a : α}
{S T : Submonoid M}

S ≤ a • T ↔ a⁻¹ • S ≤ T


/-- `P⁺⁺` is always a sheaf. -/
theorem isSheaf_plus_plus (P : Cᵒᵖ ⥤ D) : Presheaf.IsSheaf J (J.plusObj (J.plusObj P))

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ (CategoryTheory.forget D)]

CategoryTheory.Presheaf.IsSheaf J (J.plusObj (J.plusObj P))


theorem ContinuousWithinAt.mem_closure_image {f : α → β} {s : Set α} {x : α}
    (h : ContinuousWithinAt f s x) (hx : x ∈ closure s) : f x ∈ closure (f '' s)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
{x : α}
(h : ContinuousWithinAt f s x)
(hx : x ∈ closure s)


/-- The equivalence between `FinBddDistLat` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : FinBddDistLat ≌ FinBddDistLat


theorem countable_countableBasis [SecondCountableTopology α] : (countableBasis α).Countable

(α : Type u)
[t : TopologicalSpace α]
[SecondCountableTopology α]


/-- If each `f₀ i : C(X, Y i)` is homotopic to `f₁ i : C(X, Y i)`, then `ContinuousMap.pi f₀` is
homotopic to `ContinuousMap.pi f₁`. -/
protected theorem piMap {X Y : ι → Type*} [∀ i, TopologicalSpace (X i)]
    [∀ i, TopologicalSpace (Y i)] {f₀ f₁ : ∀ i, C(X i, Y i)} (F : ∀ i, Homotopic (f₀ i) (f₁ i)) :
    Homotopic (.piMap f₀) (.piMap f₁)

(F : ∀ (i : ι), (f₀ i).Homotopic (f₁ i))

(ContinuousMap.piMap f₀).Homotopic (ContinuousMap.piMap f₁)


theorem adjoin_le {S : Subalgebra R A} (H : s ⊆ S) : adjoin R s ≤ S

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{s : Set A}
{S : Subalgebra R A}
(H : s ⊆ ↑S)


/-- The functor `(W.Localization ⥤ D) ⥤ (W.FunctorsInverting D)` induced by the
composition with `W.Q : C ⥤ W.Localization`. -/
@[simps!]
def functor : (W.Localization ⥤ D) ⥤ W.FunctorsInverting D

(X : CategoryTheory.Functor W.Localization D)

∀ (X_1 : C),
  ((CategoryTheory.Localization.Construction.WhiskeringLeftEquivalence.functor W D).obj X).obj.obj X_1 =
    X.obj (W.Q.obj X_1)


theorem sSup_def {s : Set ℕ} (h : ∃ n, ∀ a ∈ s, a ≤ n) :
    sSup s = @Nat.find (fun n ↦ ∀ a ∈ s, a ≤ n) _ h


@[reassoc (attr := simp)]
lemma ι_additiveObjIsoBiproduct_inv (F : Mat_ C ⥤ D) [Functor.Additive F] (M : Mat_ C) (i : M.ι) :
    biproduct.ι _ i ≫ (additiveObjIsoBiproduct F M).inv =
      F.map (biproduct.ι _ i ≫ M.isoBiproductEmbedding.inv)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
[CategoryTheory.Preadditive D]
(F : CategoryTheory.Mat_ C ⥤ D)
[F.Additive]
(M : CategoryTheory.Mat_ C)
(i : M.ι)

CategoryTheory.Limits.biproduct.ι (fun i => F.obj ((CategoryTheory.Mat_.embedding C).obj (M.X i))) i ≫
    (CategoryTheory.Mat_.additiveObjIsoBiproduct F M).inv =
  F.map
    (CategoryTheory.Limits.biproduct.ι (fun i => (CategoryTheory.Mat_.embedding C).obj (M.X i)) i ≫
      M.isoBiproductEmbedding.inv)


theorem subset_erase {a : α} {s t : Finset α} : s ⊆ t.erase a ↔ s ⊆ t ∧ a ∉ s

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


/-- The ring isomorphism between multivariable polynomials in no variables
and the ground ring. -/
@[simps!]
def isEmptyRingEquiv [IsEmpty σ] : MvPolynomial σ R ≃+* R

(R : Type u)
(σ : Type u_1)
[CommSemiring R]
[IsEmpty σ]
(a : R)

((MvPolynomial.isEmptyRingEquiv R σ).symm a).support = if a = 0 then ∅ else {0}


nonrec theorem exp_add_of_commute (A B : Matrix m m 𝔸) (h : Commute A B) :
    exp 𝕂 (A + B) = exp 𝕂 A * exp 𝕂 B

(𝕂 : Type u_1)
{m : Type u_2}
{𝔸 : Type u_6}
[RCLike 𝕂]
[Fintype m]
[DecidableEq m]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(A B : Matrix m m 𝔸)
(h : Commute A B)

NormedSpace.exp 𝕂 (A + B) = NormedSpace.exp 𝕂 A * NormedSpace.exp 𝕂 B


/-- If a property holds for all points in balls of arbitrarily large radii, then it holds for all
points. -/
theorem forall_of_forall_mem_ball (p : α → Prop) (x : α)
    (H : ∃ᶠ R : ℝ in atTop, ∀ y ∈ ball x R, p y) (y : α) : p y

(H : ∃ᶠ (R : ℝ) in Filter.atTop, ∀ y ∈ Metric.ball x R, p y)


@[simp]
theorem toReal_zero : (0 : Angle).toReal = 0


/-- `liminf (xᵢ - c) = (liminf xᵢ) - c`. -/
lemma liminf_sub_const (F : Filter ι) [NeBot F] [AddCommSemigroup R] [Sub R] [ContinuousSub R]
    [OrderedSub R] (f : ι → R) (c : R)
    (cobdd : F.IsCoboundedUnder (· ≥ ·) f) (bdd_below : F.IsBoundedUnder (· ≥ ·) f) :
    Filter.liminf (fun i ↦ f i - c) F = Filter.liminf f F - c

(cobdd : Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) F f)

(bdd_below : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) F f)

Filter.liminf (fun i => f i - c) F = Filter.liminf f F - c


@[simp]
theorem of_d (j : α) : (of X d sq).d (j + 1) j = d j

(ChainComplex.of X d sq).d (j + 1) j = d j


theorem apply_mem {s : S} (hs : s ∈ spectrum S a) : f s ∈ spectrum R a

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[Semifield R]
[Semifield S]
[Ring A]
[Algebra R S]
[Algebra R A]
[Algebra S A]
{a : A}
{f : S → R}
[IsScalarTower R S A]
(h : SpectrumRestricts a f)
{s : S}
(hs : s ∈ spectrum S a)


theorem infs_left_comm : s ⊼ (t ⊼ u) = t ⊼ (s ⊼ u)

{α : Type u_2}
[SemilatticeInf α]
(s t u : Set α)


theorem dual (h : IsCompl x y) : IsCompl (toDual x) (toDual y)

{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]
{x y : α}
(h : IsCompl x y)

IsCompl (OrderDual.toDual x) (OrderDual.toDual y)


@[simp]
theorem coe_inf [T2Space α] (s t : Compacts α) : (↑(s ⊓ t) : Set α) = ↑s ∩ ↑t

{α : Type u_1}
[TopologicalSpace α]
[T2Space α]
(s t : TopologicalSpace.Compacts α)


@[simp]
theorem linear_mk' (e : P₁ ≃ P₂) (e' : V₁ ≃ₗ[k] V₂) (p h) : (mk' e e' p h).linear = e'

(AffineEquiv.mk' (⇑e) e' p h).linear = e'


theorem strictMono_iff_map_neg : StrictMono (f : α → β) ↔ ∀ a < 0, f a < 0

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

StrictMono ⇑f ↔ ∀ (a : α), a < 0 → f a < 0


/-- Given two composable morphisms `f : X₁ ⟶ X₂` and `g : X₂ ⟶ X₃` in the category
of cochain complexes, this is the canonical triangle
`mappingCone f ⟶ mappingCone (f ≫ g) ⟶ mappingCone g ⟶ (mappingCone f)⟦1⟧`. -/
@[simps! mor₁ mor₂ mor₃ obj₁ obj₂ obj₃]
noncomputable def mappingConeCompTriangle : Triangle (CochainComplex C ℤ)

(CochainComplex.mappingConeCompTriangle f g).mor₁ = CochainComplex.mappingCone.map f (f ≫ g) (𝟙 X₁) g ⋯


@[to_additive] lemma mabs_of_one_lt (h : 1 < a) : |a|ₘ = a

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


@[simp]
theorem canonicalEquiv_spanSingleton {P'} [CommRing P'] [Algebra R P'] [IsLocalization S P']
    (x : P) :
    canonicalEquiv S P P' (spanSingleton S x) =
      spanSingleton S
        (IsLocalization.map P' (RingHom.id R)
          (fun y (hy : y ∈ S) => show RingHom.id R y ∈ S from hy) x)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
{P' : Type u_5}
[CommRing P']
[Algebra R P']
[IsLocalization S P']
(x : P)

(FractionalIdeal.canonicalEquiv S P P') (FractionalIdeal.spanSingleton S x) =
  FractionalIdeal.spanSingleton S ((IsLocalization.map P' (RingHom.id R) ⋯) x)


/-- `triangleRotateShortComplex φ` is a degreewise split short exact sequence of
cochain complexes. -/
@[simps]
noncomputable def triangleRotateShortComplexSplitting (n : ℤ) :
    ((triangleRotateShortComplex φ).map (eval _ _ n)).Splitting

(CochainComplex.mappingCone.triangleRotateShortComplexSplitting φ n).r = (CochainComplex.mappingCone.snd φ).v n n ⋯


@[simp]
theorem toReal_coe_ennreal : ∀ {x : ℝ≥0∞}, toReal (x : EReal) = ENNReal.toReal x


/-- A regular element is an element `c` such that multiplication by `c` both on the left and
on the right is injective. -/
structure IsRegular (c : R) : Prop where
  /-- A regular element `c` is left-regular -/
  left : IsLeftRegular c
  /-- A regular element `c` is right-regular -/
  right : IsRightRegular c

{R : Type u_1}
[Mul R]
{c : R}
(self : IsRegular c)


theorem linearProjOfIsCompl_idempotent (h : IsCompl p q) (x : E) :
    linearProjOfIsCompl p q h (linearProjOfIsCompl p q h x) = linearProjOfIsCompl p q h x

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{p q : Submodule R E}
(h : IsCompl p q)
(x : E)

(p.linearProjOfIsCompl q h) ↑((p.linearProjOfIsCompl q h) x) = (p.linearProjOfIsCompl q h) x


/-- Semilinear maps `M →ₛₗ[f] N` identify to
morphisms `M ⟶ (ModuleCat.restrictScalars f).obj N`. -/
@[simps]
def semilinearMapAddEquiv {R : Type u₁} {S : Type u₂} [Ring R] [Ring S] (f : R →+* S)
    (M : ModuleCat.{v} R) (N : ModuleCat.{v} S) :
    (M →ₛₗ[f] N) ≃+ (M ⟶ (ModuleCat.restrictScalars f).obj N)

(g : M ⟶ (ModuleCat.restrictScalars f).obj N)

((ModuleCat.semilinearMapAddEquiv f M N).symm g) a = g a


@[simp] lemma toUpperSet_specializes_toUpperSet {a b : α} :
    toUpperSet a ⤳ toUpperSet b ↔ b ≤ a

Topology.WithUpperSet.toUpperSet a ⤳ Topology.WithUpperSet.toUpperSet b ↔ b ≤ a


/-- `prod C D` gives the cartesian product of two categories.

See <https://stacks.math.columbia.edu/tag/001K>.
-/
@[simps (config := { notRecursive := [] }) Hom id_fst id_snd comp_fst comp_snd]
instance prod : Category.{max v₁ v₂} (C × D)

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


/-- Natural division is the floor of field division. -/
theorem floor_div_eq_div (m n : ℕ) : ⌊(m : α) / n⌋₊ = m / n

{α : Type u_2}
[LinearOrderedSemifield α]
[FloorSemiring α]
(m n : ℕ)


@[simp]
theorem rotate_nil (n : ℕ) : ([] : List α).rotate n = []


@[simp]
theorem pi_apply [Fintype ι] (Q : ∀ i, QuadraticMap R (Mᵢ i) P) (x : ∀ i, Mᵢ i) :
    pi Q x = ∑ i, Q i (x i)

{ι : Type u_1}
{R : Type u_2}
{P : Type u_7}
{Mᵢ : ι → Type u_8}
[CommSemiring R]
[(i : ι) → AddCommMonoid (Mᵢ i)]
[AddCommMonoid P]
[(i : ι) → Module R (Mᵢ i)]
[Module R P]
[Fintype ι]
(Q : (i : ι) → QuadraticMap R (Mᵢ i) P)
(x : (i : ι) → Mᵢ i)

(QuadraticMap.pi Q) x = ∑ i : ι, (Q i) (x i)


theorem extend_iUnion_le_tsum_nat : ∀ s : ℕ → Set α,
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i)

{m : (s : Set α) → MeasurableSet s → ℝ≥0∞}

(mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), MeasurableSet (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯)

MeasureTheory.extend m (⋃ i, s i) ≤ ∑' (i : ℕ), MeasureTheory.extend m (s i)


@[simp]
theorem sliceRight_coe [TopologicalSpace Y] {y : Y} (f : X × Y → Z) :
    (↑f : Germ (𝓝 (x, y)) Z).sliceRight = fun y' ↦ f (x, y')

{X : Type u_3}
{Y : Type u_4}
{Z : Type u_5}
[TopologicalSpace X]
{x : X}
[TopologicalSpace Y]
{y : Y}
(f : X × Y → Z)


theorem Monotone.quasiconvexOn (hf : Monotone f) : QuasiconvexOn 𝕜 univ f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{f : E → β}
(hf : Monotone f)


/-- If `E` is a vector space over two division rings `R` and `S`, then scalar multiplications
agree on inverses of integer numbers in `R` and `S`. -/
theorem inv_intCast_smul_eq {E : Type*} (R S : Type*) [AddCommGroup E] [DivisionRing R]
    [DivisionRing S] [Module R E] [Module S E] (n : ℤ) (x : E) : (n⁻¹ : R) • x = (n⁻¹ : S) • x

{E : Type u_5}
(R : Type u_6)
(S : Type u_7)
[AddCommGroup E]
[DivisionRing R]
[DivisionRing S]
[Module R E]
[Module S E]
(n : ℤ)
(x : E)


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

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


@[simp]
theorem eLpNorm'_exponent_zero {f : α → F} : eLpNorm' f 0 μ = 1

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}


theorem Filter.EventuallyEq.lineDifferentiableWithinAt_iff_of_mem
    (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : x ∈ s) :
    LineDifferentiableWithinAt 𝕜 f₀ s x v ↔ LineDifferentiableWithinAt 𝕜 f₁ s x v

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


protected lemma isCompl_iff [Lattice α] [BoundedOrder α] {x y : Iic a} :
    IsCompl x y ↔ Disjoint (x : α) (y : α) ∧ (x : α) ⊔ (y : α) = a

{α : Type u_1}
{a : α}
[Lattice α]
[BoundedOrder α]
{x y : ↑(Set.Iic a)}

IsCompl x y ↔ Disjoint ↑x ↑y ∧ ↑x ⊔ ↑y = a


theorem subset_sInf_of_not_bddBelow [Inhabited s] {t : Set s} (ht : ¬BddBelow t) :
    sInf t = default

{α : Type u_2}
(s : Set α)
[Preorder α]
[InfSet α]
[Inhabited ↑s]
{t : Set ↑s}
(ht : ¬BddBelow t)


theorem support_update_ne_zero (p : R[X]) (n : ℕ) {a : R} (ha : a ≠ 0) :
    support (p.update n a) = insert n p.support

{R : Type u}
[Semiring R]
(p : R[X])
(n : ℕ)
{a : R}
(ha : a ≠ 0)

(p.update n a).support = insert n p.support


/-- The exponential characteristic is one if the characteristic is zero. -/
theorem expChar_one_of_char_zero (q : ℕ) [hp : CharP R 0] [hq : ExpChar R q] : q = 1

(R : Type u)
[Semiring R]
(q : ℕ)
[hp : CharP R 0]
[hq : ExpChar R q]


@[simp]
theorem «exists» {p : PLift α → Prop} : (∃ x, p x) ↔ ∃ x : α, p (PLift.up x)


theorem natDegree_add_eq_right_of_natDegree_lt (h : natDegree p < natDegree q) :
    natDegree (p + q) = natDegree q

{R : Type u}
[Semiring R]
{p q : R[X]}
(h : p.natDegree < q.natDegree)


/-- An additive semigroup is a type with an associative `(+)`. -/
@[ext]
class AddSemigroup (G : Type u) extends Add G where
  /-- Addition is associative -/
  protected add_assoc : ∀ a b c : G, a + b + c = a + (b + c)

{G : Type u}
[self : AddSemigroup G]
(a b c : G)


protected theorem eq_inv_of_mul_eq_one_left (h : a * b = 1) : a = b⁻¹


theorem isSheaf_of_iso_iff {P P' : Cᵒᵖ ⥤ A} (e : P ≅ P') : IsSheaf J P ↔ IsSheaf J P'

{J : CategoryTheory.GrothendieckTopology C}

CategoryTheory.Presheaf.IsSheaf J P ↔ CategoryTheory.Presheaf.IsSheaf J P'


theorem chromaticNumber_bddBelow : BddBelow { n : ℕ | G.Colorable n }


@[simp]
theorem kernelSubobjectIsoComp_hom_arrow {X' : C} (f : X' ⟶ X) [IsIso f] (g : X ⟶ Y) [HasKernel g] :
    (kernelSubobjectIsoComp f g).hom ≫ (kernelSubobject g).arrow =
      (kernelSubobject (f ≫ g)).arrow ≫ f

(CategoryTheory.Limits.kernelSubobjectIsoComp f g).hom ≫ (CategoryTheory.Limits.kernelSubobject g).arrow =
  (CategoryTheory.Limits.kernelSubobject (f ≫ g)).arrow ≫ f


@[simp]
theorem dedup_nsmul {s : Multiset α} {n : ℕ} (h0 : n ≠ 0) : (n • s).dedup = s.dedup

{α : Type u_1}
[DecidableEq α]
{s : Multiset α}
{n : ℕ}
(h0 : n ≠ 0)


@[to_additive]
theorem nnnorm_le_nnnorm_add_nnnorm_div (a b : E) : ‖b‖₊ ≤ ‖a‖₊ + ‖a / b‖₊

{E : Type u_6}
[SeminormedAddGroup E]
(a b : E)

‖b‖₊ ≤ ‖a‖₊ + ‖a - b‖₊


theorem finite_dist_eq (x y : e.finiteSubspace) : dist x y = (e (x - y)).toReal

{𝕜 : Type u_1}
{V : Type u_2}
[NormedField 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
(e : ENorm 𝕜 V)
(x y : ↥e.finiteSubspace)


theorem equicontinuous_unique [Unique ι] {F : ι → X → α} :
    Equicontinuous F ↔ Continuous (F default)

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
[Unique ι]
{F : ι → X → α}


/-- Interpret an `Equiv` as a `PartialEquiv` by restricting it to `s` in the domain
and to `t` in the codomain. -/
@[simps (config := .asFn)]
def _root_.Equiv.toPartialEquivOfImageEq (e : α ≃ β) (s : Set α) (t : Set β) (h : e '' s = t) :
    PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)
(s : Set α)
(t : Set β)
(h : ⇑e '' s = t)

↑(e.toPartialEquivOfImageEq s t h).symm = ⇑e.symm


theorem StrictAnti.apply_eq_bot_iff (hf : StrictAnti f) : f a = f ⊥ ↔ a = ⊥

{α : Type u}
{β : Type v}
[PartialOrder α]
[OrderBot α]
[Preorder β]
{f : α → β}
{a : α}
(hf : StrictAnti f)


/-- Let `M` be a smooth σ-compact manifold with a metric. Let `K : ι → Set M` be a locally finite
family of closed sets, let `U : ι → Set M` be a family of open sets such that `K i ⊆ U i` for all
`i`. Then there exists a positive smooth function `δ : M → ℝ≥0` such that for any `i` and `x ∈ K i`,
we have `Metric.closedBall x (δ x) ⊆ U i`. -/
theorem Metric.exists_smooth_forall_closedBall_subset {M} [MetricSpace M] [ChartedSpace H M]
    [SmoothManifoldWithCorners I M] [SigmaCompactSpace M] {K : ι → Set M} {U : ι → Set M}
    (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i)
    (hfin : LocallyFinite K) :
    ∃ δ : C^∞⟮I, M; 𝓘(ℝ, ℝ), ℝ⟯,
      (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, Metric.closedBall x (δ x) ⊆ U i

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
(I : ModelWithCorners ℝ E H)
{M : Type u_1}
[MetricSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[SigmaCompactSpace M]
{K U : ι → Set M}
(hK : ∀ (i : ι), IsClosed (K i))
(hU : ∀ (i : ι), IsOpen (U i))
(hKU : ∀ (i : ι), K i ⊆ U i)
(hfin : LocallyFinite K)

∃ δ, (∀ (x : M), 0 < δ x) ∧ ∀ (i : ι), ∀ x ∈ K i, Metric.closedBall x (δ x) ⊆ U i


/-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(self : AkraBazziRecurrence T g a b r)


theorem inclusion_inj_on_objects {S T : Subgroupoid C} (h : S ≤ T) :
    Function.Injective (inclusion h).obj

{C : Type u}
[CategoryTheory.Groupoid C]
{S T : CategoryTheory.Subgroupoid C}
(h : S ≤ T)


theorem encdec : Primrec fun n => encode (@decode α _ n)

Primrec fun n => Encodable.encode (Encodable.decode n)


lemma map_mk (g : A →+* B)
    (comap_le : P ≤ Q.comap g) (hg : ∀ i, ∀ a ∈ 𝒜 i, g a ∈ ℬ i) (x) :
    map 𝒜 ℬ g comap_le hg (mk x) =
    mk ⟨x.1, ⟨_, hg _ _ x.2.2⟩, ⟨_, hg _ _ x.3.2⟩, comap_le x.4⟩

(x : HomogeneousLocalization.NumDenSameDeg 𝒜 P)

(HomogeneousLocalization.map 𝒜 ℬ g comap_le hg) (HomogeneousLocalization.mk x) =
  HomogeneousLocalization.mk { deg := x.deg, num := ⟨g ↑x.num, ⋯⟩, den := ⟨g ↑x.den, ⋯⟩, den_mem := ⋯ }


theorem tails_eq (s : Stream' α) : tails s = tail s::tails (tail s)

s.tails = Stream'.cons s.tail s.tail.tails


theorem set_support_zpow_subset (n : ℤ) : { x | (p ^ n) x ≠ x } ⊆ { x | p x ≠ x }

{α : Type u_1}
(p : Equiv.Perm α)
(n : ℤ)


@[simp]
theorem iUnion_Ioo_right [NoMaxOrder α] (a : α) : ⋃ b, Ioo a b = Ioi a

{α : Type v}
[Preorder α]
[NoMaxOrder α]
(a : α)


@[to_additive] lemma ne_iff_ne_of_mul_eq_mul (h : a * b = c * d) : a ≠ c ↔ b ≠ d

{α : Type u_1}
[AddCancelCommMonoid α]
{a b c d : α}
(h : a + b = c + d)


lemma isCorner_image (hf : IsAddFreimanIso 2 s t f) (hAs : A ⊆ s ×ˢ s)
    (hx₁ : x₁ ∈ s) (hy₁ : y₁ ∈ s) (hx₂ : x₂ ∈ s) (hy₂ : y₂ ∈ s) :
    IsCorner (Prod.map f f '' A) (f x₁) (f y₁) (f x₂) (f y₂) ↔ IsCorner A x₁ y₁ x₂ y₂

{G : Type u_1}
{H : Type u_2}
[AddCommMonoid G]
[AddCommMonoid H]
{A : Set (G × G)}
{s : Set G}
{t : Set H}
{f : G → H}
{x₁ y₁ x₂ y₂ : G}
(hf : IsAddFreimanIso 2 s t f)
(hAs : A ⊆ s ×ˢ s)
(hx₁ : x₁ ∈ s)
(hy₁ : y₁ ∈ s)
(hx₂ : x₂ ∈ s)
(hy₂ : y₂ ∈ s)


theorem iSup_range_stdBasis_le_iInf_ker_proj (I J : Set ι) (h : Disjoint I J) :
    ⨆ i ∈ I, range (stdBasis R φ i) ≤ ⨅ i ∈ J, ker (proj i : (∀ i, φ i) →ₗ[R] φ i)

(R : Type u_1)
{ι : Type u_2}
[Semiring R]
(φ : ι → Type u_3)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
[DecidableEq ι]
(I J : Set ι)
(h : Disjoint I J)

⨆ i ∈ I, LinearMap.range (LinearMap.stdBasis R φ i) ≤ ⨅ i ∈ J, LinearMap.ker (LinearMap.proj i)


theorem ContinuousOn.image_closure {f : α → β} {s : Set α} (hf : ContinuousOn f (closure s)) :
    f '' closure s ⊆ closure (f '' s)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
(hf : ContinuousOn f (closure s))


theorem vsub_subset_vsub_left : t₁ ⊆ t₂ → s -ᵥ t₁ ⊆ s -ᵥ t₂

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{s t₁ t₂ : Set β}

t₁ ⊆ t₂ → s -ᵥ t₁ ⊆ s -ᵥ t₂


theorem nnnorm_indicatorConstLp_le :
    ‖indicatorConstLp p hs hμs c‖₊ ≤ ‖c‖₊ * (μ s).toNNReal ^ (1 / p.toReal)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s : Set α}
{hs : MeasurableSet s}
{hμs : μ s ≠ ⊤}
{c : E}

‖MeasureTheory.indicatorConstLp p hs hμs c‖₊ ≤ ‖c‖₊ * (μ s).toNNReal ^ (1 / p.toReal)


/-- The functor `HomologicalComplex (Karoubi C) c ⥤ Karoubi (HomologicalComplex C c)`,
on morphisms -/
@[simps]
def map {K L : HomologicalComplex (Karoubi C) c} (f : K ⟶ L) : obj K ⟶ obj L

{K L : HomologicalComplex (CategoryTheory.Idempotents.Karoubi C) c}

(CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Inverse.map f).f.f n = (f.f n).f


@[simp]
theorem order_zero : (0 : FormalMultilinearSeries 𝕜 E F).order = 0

{𝕜 : Type u}
{E : Type v}
{F : Type w}
[Ring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]


/-- The functor `SimplicialObject.Split C ⥤ SimplicialObject C` which forgets
the splitting. -/
@[simps]
def forget : Split C ⥤ SimplicialObject C

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

∀ {X Y : SimplicialObject.Split C} (Φ : X ⟶ Y), (SimplicialObject.Split.forget C).map Φ = Φ.F


theorem linearIndependent_biUnion_of_directed {η} {s : Set η} {t : η → Set M}
    (hs : DirectedOn (t ⁻¹'o (· ⊆ ·)) s) (h : ∀ a ∈ s, LinearIndependent R (fun x => x : t a → M)) :
    LinearIndependent R (fun x => x : (⋃ a ∈ s, t a) → M)

(hs : DirectedOn (t ⁻¹'o fun x x_1 => x ⊆ x_1) s)

(h : ∀ a ∈ s, LinearIndependent R fun (x : ↑(t a)) => ↑x)

LinearIndependent R fun (x : ↑(⋃ a ∈ s, t a)) => ↑x


theorem mem_Lp_of_ae_le_mul {c : ℝ} {f : α →ₘ[μ] E} {g : Lp F p μ}
    (h : ∀ᵐ x ∂μ, ‖f x‖ ≤ c * ‖g x‖) : f ∈ Lp E p μ

(h : ∀ᵐ (x : α) ∂μ, ‖↑f x‖ ≤ c * ‖↑↑g x‖)


theorem NeBot.of_map : NeBot (f.map m) → NeBot f

{α : Type u}
{β : Type v}
{f : Filter α}
{m : α → β}


@[simp] theorem reverse_data (a : Array α) : a.reverse.data = a.data.reverse

(H : ∀ (k : Nat), as.data.get? k = if i ≤ k ∧ k ≤ j then a.data.get? k else a.data.reverse.get? k)

(Array.reverse.loop as i ⟨j, hj⟩).data.get? k = a.data.reverse.get? k


@[simp]
lemma slope_of_Y_ne {x₁ x₂ y₁ y₂ : F} (hx : x₁ = x₂) (hy : y₁ ≠ W.negY x₂ y₂) :
    W.slope x₁ x₂ y₁ y₂ =
      (3 * x₁ ^ 2 + 2 * W.a₂ * x₁ + W.a₄ - W.a₁ * y₁) / (y₁ - W.negY x₁ y₁)

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


/-- The points with `v.limRatioMeas hρ x = ∞` have measure `0` for `μ`. -/
theorem measure_limRatioMeas_top : μ {x | v.limRatioMeas hρ x = ∞} = 0

(hρ : ρ ≪ μ)


@[simp]
theorem inv_zetaUnit : ((zetaUnit⁻¹ : (ArithmeticFunction R)ˣ) : ArithmeticFunction R) = μ


theorem toGerm_eq (f : α →ₘ[μ] β) : f.toGerm = (f : α → β)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
(f : α →ₘ[μ] β)


@[simp]
theorem integral_const (c : E) : ∫ _ in a..b, c = (b - a) • c

{E : Type u_3}
[NormedAddCommGroup E]
[CompleteSpace E]
[NormedSpace ℝ E]
{a b : ℝ}
(c : E)


@[to_additive VAddAntidiagonal.fst_eq_fst_iff_snd_eq_snd]
theorem fst_eq_fst_iff_snd_eq_snd :
    (x : G × P).1 = (y : G × P).1 ↔ (x : G × P).2 = (y : G × P).2

{G : Type u_1}
{P : Type u_2}
{s : Set G}
{t : Set P}
{a : P}
[VAdd G P]
[IsCancelVAdd G P]
{x y : ↑(s.vaddAntidiagonal t a)}


theorem mulVec_smul_assoc [Fintype n] (A : Matrix m n α) (b : n → α) (a : α) :
    A *ᵥ (a • b) = a • A *ᵥ b

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[CommSemiring α]
[Fintype n]
(A : Matrix m n α)
(b : n → α)
(a : α)


theorem nhds_nhds_eq_uniformity_uniformity_prod {a b : α} :
    𝓝 a ×ˢ 𝓝 b = (𝓤 α).lift fun s : Set (α × α) =>
      (𝓤 α).lift' fun t => { y : α | (y, a) ∈ s } ×ˢ { y : α | (b, y) ∈ t }

{α : Type ua}
[UniformSpace α]
{a b : α}

𝓝 a ×ˢ 𝓝 b = (𝓤 α).lift fun s => (𝓤 α).lift' fun t => {y | (y, a) ∈ s} ×ˢ {y | (b, y) ∈ t}


/-- Working in continuous functions into a topological field,
a subalgebra of functions that separates points also separates points strongly.

By the hypothesis, we can find a function `f` so `f x ≠ f y`.
By an affine transformation in the field we can arrange so that `f x = a` and `f x = b`.
-/
theorem Subalgebra.SeparatesPoints.strongly {s : Subalgebra 𝕜 C(α, 𝕜)} (h : s.SeparatesPoints) :
    (s : Set C(α, 𝕜)).SeparatesPointsStrongly

{α : Type u_1}
[TopologicalSpace α]
{𝕜 : Type u_5}
[TopologicalSpace 𝕜]
[Field 𝕜]
[TopologicalRing 𝕜]
{s : Subalgebra 𝕜 C(α, 𝕜)}
(h : s.SeparatesPoints)


theorem idealRange_eq_map : f.idealRange = LieIdeal.map f ⊤

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


theorem right_mem_Ioo : b ∈ Ioo a b ↔ False


/-- A natural isomorphism `R₁ ≅ R₂` induces an equivalence of categories
    `Comma L R₁ ≌ Comma L R₂`. -/
@[simps!]
def mapRightIso (i : R₁ ≅ R₂) : Comma L R₁ ≌ Comma L R₂

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(L : CategoryTheory.Functor A T)
{R₁ R₂ : CategoryTheory.Functor B T}
(i : R₁ ≅ R₂)
(X : CategoryTheory.Comma L R₂)

((CategoryTheory.Comma.mapRightIso L i).inverse.obj X).right = X.right


@[simp] theorem getRight?_eq_none_iff {x : α ⊕ β} : x.getRight? = none ↔ x.isLeft

{α : Type u_1}
{β : Type u_2}
{x : α ⊕ β}


@[simp]
theorem cardinal_mk_eq_max_lift [Nonempty σ] [Nontrivial R] :
    #(MvPolynomial σ R) = max (max (Cardinal.lift.{u} #R) <| Cardinal.lift.{v} #σ) ℵ₀

{σ : Type u}
{R : Type v}
[CommSemiring R]
[Nonempty σ]
[Nontrivial R]

#(MvPolynomial σ R) = max (max (Cardinal.lift.{u, v} #R) (Cardinal.lift.{v, u} #σ)) ℵ₀


protected theorem coe_sub (x y : p) : (↑(x - y) : M) = ↑x - ↑y

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
{module_M : Module R M}
(p : Submodule R M)
(x y : ↥p)


@[simp]
theorem ofNat_add_aleph0 {n : ℕ} [Nat.AtLeastTwo n] : no_index (OfNat.ofNat n) + ℵ₀ = ℵ₀

OfNat.ofNat n + Cardinal.aleph0 = Cardinal.aleph0


@[to_additive (attr := norm_cast, simp)]
theorem coe_mul [Mul β] [ContinuousMul β] (f g : C(α, β)) : ⇑(f * g) = f * g

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Add β]
[ContinuousAdd β]
(f g : C(α, β))