theorem norm_adjoint_comp_self (A : E →L[𝕜] F) :
    ‖ContinuousLinearMap.adjoint A ∘L A‖ = ‖A‖ * ‖A‖

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[CompleteSpace E]
[CompleteSpace F]
(A : E →L[𝕜] F)

‖(ContinuousLinearMap.adjoint A).comp A‖ = ‖A‖ * ‖A‖


theorem map_swap_antidiagonal {n : ℕ} : (antidiagonal n).map Prod.swap = antidiagonal n

Multiset.map Prod.swap (Multiset.Nat.antidiagonal n) = Multiset.Nat.antidiagonal n


theorem gcd_eq_right_iff_dvd {m n : ℕ+} : m ∣ n ↔ n.gcd m = m


@[simp]
theorem coe_bot : ⇑(⊥ : SupBotHom α β) = ⊥

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Bot α]
[SemilatticeSup β]
[OrderBot β]


theorem Set.Subsingleton.isLindelof (hs : s.Subsingleton) : IsLindelof s

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : s.Subsingleton)


theorem StableUnderCobaseChange.mk {P : MorphismProperty C} [HasPushouts C] [RespectsIso P]
    (hP₂ : ∀ (A B A' : C) (f : A ⟶ A') (g : A ⟶ B) (_ : P f), P (pushout.inr f g)) :
    StableUnderCobaseChange P

(hP₂ : ∀ (A B A' : C) (f : A ⟶ A') (g : A ⟶ B), P f → P (CategoryTheory.Limits.pushout.inr f g))


theorem IsGreatest.antichain_iff (hs : IsGreatest s a) : IsAntichain (· ≤ ·) s ↔ s = {a}

{α : Type u_1}
{s : Set α}
{a : α}
[Preorder α]
(hs : IsGreatest s a)

IsAntichain (fun x x_1 => x ≤ x_1) s ↔ s = {a}


theorem image_inter_of_injOn [DecidableEq α] {f : α → β} (s t : Finset α)
    (hf : Set.InjOn f (s ∪ t)) : (s ∩ t).image f = s.image f ∩ t.image f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
[DecidableEq α]
{f : α → β}
(s t : Finset α)
(hf : Set.InjOn f (↑s ∪ ↑t))

Finset.image f (s ∩ t) = Finset.image f s ∩ Finset.image f t


theorem le_log2 (h : n ≠ 0) : k ≤ n.log2 ↔ 2 ^ k ≤ n


/-- The inner product of a linear combination of a set of orthonormal vectors with one of those
vectors picks out the coefficient of that vector. -/
theorem Orthonormal.inner_left_sum {v : ι → E} (hv : Orthonormal 𝕜 v) (l : ι → 𝕜) {s : Finset ι}
    {i : ι} (hi : i ∈ s) : ⟪∑ i ∈ s, l i • v i, v i⟫ = conj (l i)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{v : ι → E}
(hv : Orthonormal 𝕜 v)
(l : ι → 𝕜)
{s : Finset ι}
{i : ι}
(hi : i ∈ s)

⟪∑ i ∈ s, l i • v i, v i⟫_𝕜 = (starRingEnd 𝕜) (l i)


@[simp]
theorem gnpowRec_succ (n : ℕ) (a : GradedMonoid A) :
    (GradedMonoid.mk _ <| gnpowRec n.succ a.snd) = ⟨_, gnpowRec n a.snd⟩ * a

{ι : Type u_1}
{A : ι → Type u_2}
[AddMonoid ι]
[GradedMonoid.GMul A]
[GradedMonoid.GOne A]
(n : ℕ)
(a : GradedMonoid A)

GradedMonoid.mk (n.succ • a.fst) (GradedMonoid.GMonoid.gnpowRec n.succ a.snd) =
  ⟨n • a.fst, GradedMonoid.GMonoid.gnpowRec n a.snd⟩ * a


/-- The morphism `triangleh φ₁ ⟶ triangleh φ₂` that is induced by a square that
is commutative up to homotopy. -/
@[simps]
noncomputable def trianglehMapOfHomotopy :
    triangleh φ₁ ⟶ triangleh φ₂

{φ₁ : K₁ ⟶ L₁}

{φ₂ : K₂ ⟶ L₂}

(CochainComplex.mappingCone.trianglehMapOfHomotopy H).hom₃ =
  (HomotopyCategory.quotient C (ComplexShape.up ℤ)).map (CochainComplex.mappingCone.mapOfHomotopy H)


theorem proj_symm_apply' {b : B} {x : F} (hx : b ∈ e.baseSet) :
    proj (e.toPartialEquiv.symm (b, x)) = b

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e : Pretrivialization F proj)
{b : B}
{x : F}
(hx : b ∈ e.baseSet)


theorem tendsto_iterate_efixedPoint (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞) :
    Tendsto (fun n ↦ f^[n] x) atTop (𝓝 <| efixedPoint f hf x hx)

{α : Type u_1}
[EMetricSpace α]
[cs : CompleteSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x : α}
(hx : edist x (f x) ≠ ⊤)

Filter.Tendsto (fun n => f^[n] x) Filter.atTop (𝓝 (ContractingWith.efixedPoint f hf x hx))


/-- By replacing a measurable set that is almost invariant with the `limsup` of its preimages, we
obtain a measurable set that is almost equal and strictly invariant.

(The `liminf` would work just as well.) -/
theorem exists_preimage_eq_of_preimage_ae {f : α → α} (h : QuasiMeasurePreserving f μ μ)
    (hs : MeasurableSet s) (hs' : f ⁻¹' s =ᵐ[μ] s) :
    ∃ t : Set α, MeasurableSet t ∧ t =ᵐ[μ] s ∧ f ⁻¹' t = t

(h : MeasureTheory.Measure.QuasiMeasurePreserving f μ μ)

∃ t, MeasurableSet t ∧ t =ᵐ[μ] s ∧ f ⁻¹' t = t


lemma tendsto_atTop_sumCoeffsExp : Tendsto (fun (p : ℝ) => ∑ i, a i * (b i) ^ p) atBot atTop

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

Filter.Tendsto (fun p => ∑ i : α, a i * b i ^ p) Filter.atBot Filter.atTop


@[to_additive (attr := simp)]
theorem mulEquivOfLocalizations_symm_apply {k : LocalizationMap S P} {x} :
    (f.mulEquivOfLocalizations k).symm x = k.lift f.map_units x

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{k : S.LocalizationMap P}
{x : P}

(f.addEquivOfLocalizations k).symm x = (k.lift ⋯) x


@[reassoc (attr := simp)]
theorem pullbackComparison_comp_fst (f : X ⟶ Z) (g : Y ⟶ Z) [HasPullback f g]
    [HasPullback (G.map f) (G.map g)] :
    pullbackComparison G f g ≫ pullback.fst _ _ = G.map (pullback.fst f g)

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

CategoryTheory.Limits.pullbackComparison G f g ≫ CategoryTheory.Limits.pullback.fst (G.map f) (G.map g) =
  G.map (CategoryTheory.Limits.pullback.fst f g)


/-- `HasCokernels` represents the existence of cokernels for every morphism. -/
class HasCokernels : Prop where
  has_colimit : ∀ {X Y : C} (f : X ⟶ Y), HasCokernel f := by infer_instance

[self : CategoryTheory.Limits.HasCokernels C]


theorem pow_succ_factorization_not_dvd {n p : ℕ} (hn : n ≠ 0) (hp : p.Prime) :
    ¬p ^ (n.factorization p + 1) ∣ n

{n p : ℕ}
(hn : n ≠ 0)
(hp : Nat.Prime p)


theorem distortion_le_of_mem (h : J ∈ π) : J.distortion ≤ π.distortion

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
[Fintype ι]
(h : J ∈ π)


@[simp]
theorem symm_dual_id :
    BoundedLatticeHom.dual.symm (BoundedLatticeHom.id _) = BoundedLatticeHom.id α

{α : Type u_3}
[Lattice α]
[BoundedOrder α]

BoundedLatticeHom.dual.symm (BoundedLatticeHom.id αᵒᵈ) = BoundedLatticeHom.id α


theorem zorn_nonempty_partialOrder₀ (s : Set α)
    (ih : ∀ c ⊆ s, IsChain (· ≤ ·) c → ∀ y ∈ c, ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub) (x : α)
    (hxs : x ∈ s) : ∃ m ∈ s, x ≤ m ∧ ∀ z ∈ s, m ≤ z → z = m

(ih : ∀ c ⊆ s, IsChain (fun x x_1 => x ≤ x_1) c → ∀ y ∈ c, ∃ ub ∈ s, ∀ z ∈ c, z ≤ ub)


theorem pairwiseDisjoint_insert_of_not_mem {i : ι} (hi : i ∉ s) :
    (insert i s).PairwiseDisjoint f ↔ s.PairwiseDisjoint f ∧ ∀ j ∈ s, Disjoint (f i) (f j)

{α : Type u_1}
{ι : Type u_4}
[PartialOrder α]
[OrderBot α]
{s : Set ι}
{f : ι → α}
{i : ι}
(hi : i ∉ s)


theorem integerNormalization_eval₂_eq_zero (g : S →+* R') (p : S[X]) {x : R'}
    (hx : eval₂ g x p = 0) : eval₂ (g.comp (algebraMap R S)) x (integerNormalization M p) = 0

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
{S : Type u_2}
[CommRing S]
[Algebra R S]
[IsLocalization M S]
{R' : Type u_4}
[CommRing R']
(g : S →+* R')
(p : S[X])
{x : R'}
(hx : Polynomial.eval₂ g x p = 0)

Polynomial.eval₂ (g.comp (algebraMap R S)) x (IsLocalization.integerNormalization M p) = 0


theorem unique {ζ : M} (hk : IsPrimitiveRoot ζ k) (hl : IsPrimitiveRoot ζ l) : k = l

{M : Type u_1}
[CommMonoid M]
{k l : ℕ}
{ζ : M}
(hk : IsPrimitiveRoot ζ k)
(hl : IsPrimitiveRoot ζ l)


@[simp]
theorem mem_sUnion {x y : Class.{u}} : y ∈ ⋃₀ x ↔ ∃ z, z ∈ x ∧ y ∈ z

y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z


@[to_additive]
theorem smul_lt_smul_of_lt_of_le [Preorder G] [Preorder P] [SMul G P] [IsOrderedCancelSMul G P]
    {a b : G} {c d : P} (h₁ : a < b) (h₂ : c ≤ d) : a • c < b • d

{G : Type u_1}
{P : Type u_2}
[Preorder G]
[Preorder P]
[SMul G P]
[IsOrderedCancelSMul G P]
{a b : G}
{c d : P}
(h₁ : a < b)
(h₂ : c ≤ d)


lemma FinitaryPreExtensive.hasPullbacks_of_is_coproduct [FinitaryPreExtensive C] {ι : Type*}
    [Finite ι] {F : Discrete ι ⥤ C} {c : Cocone F} (hc : IsColimit c) (i : Discrete ι) {X : C}
    (g : X ⟶ _) : HasPullback g (c.ι.app i)

{F : CategoryTheory.Functor (CategoryTheory.Discrete ι) C}

(hc : CategoryTheory.Limits.IsColimit c)

(g : X ⟶ ((CategoryTheory.Functor.const (CategoryTheory.Discrete ι)).obj c.pt).obj i)

CategoryTheory.Limits.HasPullback g (c.ι.app i)


theorem fromRel_toRel (s : Set (Sym2 α)) : fromRel (toRel_symmetric s) = s


theorem leftInverse_cast (eq : n = m) : LeftInverse (cast eq.symm) (cast eq)

Function.LeftInverse (Fin.cast ⋯) (Fin.cast eq)


lemma ArithmeticFunction.const_one_eq_zeta {R : Type*} [Semiring R] {n : ℕ} (hn : n ≠ 0) :
    (1 : ℕ → R) n = (ζ ·) n

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

1 n = ↑((fun x => ArithmeticFunction.zeta x) n)


theorem le_of_eq_of_le {a b c : α} [LE α] (h₁ : a = b) (h₂ : b ≤ c) : a ≤ c

{α : Type u}
{a b c : α}
[LE α]
(h₁ : a = b)
(h₂ : b ≤ c)


theorem mk_eq_mk_iff (v w : V) (hv : v ≠ 0) (hw : w ≠ 0) :
    mk K v hv = mk K w hw ↔ ∃ a : Kˣ, a • w = v

(K : Type u_1)
{V : Type u_2}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(v w : V)
(hv : v ≠ 0)
(hw : w ≠ 0)

Projectivization.mk K v hv = Projectivization.mk K w hw ↔ ∃ a, a • w = v


/-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
distance less than `r` from `p`, the third point is strictly between the other two points. -/
theorem Collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ}
    (h : Collinear ℝ ({p₁, p₂, p₃} : Set P)) (hp₁ : dist p₁ p = r) (hp₂ : dist p₂ p < r)
    (hp₃ : dist p₃ p = r) (hp₁p₃ : p₁ ≠ p₃) : Sbtw ℝ p₁ p₂ p₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[StrictConvexSpace ℝ V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{p p₁ p₂ p₃ : P}
{r : ℝ}
(h : Collinear ℝ {p₁, p₂, p₃})
(hp₁ : dist p₁ p = r)
(hp₂ : dist p₂ p < r)
(hp₃ : dist p₃ p = r)
(hp₁p₃ : p₁ ≠ p₃)


@[simp]
theorem PreservesKernel.iso_hom : (PreservesKernel.iso G f).hom = kernelComparison f G

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.parallelPair f 0) G]

(CategoryTheory.Limits.PreservesKernel.iso G f).hom = CategoryTheory.Limits.kernelComparison f G


@[to_additive]
theorem card_inv_le : s⁻¹.card ≤ s.card

{α : Type u_2}
[DecidableEq α]
[Neg α]
{s : Finset α}


@[to_additive]
lemma prod_eq_one (h : ∀ x ∈ s, x = (1 : α)) : s.prod = 1

{α : Type u_3}
[AddCommMonoid α]
{s : Multiset α}
(h : ∀ x ∈ s, x = 0)


@[simp]
theorem prev_singleton (x y : α) (h : x ∈ [y]) : prev [y] x h = y

{α : Type u_1}
[DecidableEq α]
(x y : α)
(h : x ∈ [y])


theorem bind_map (m : Multiset α) (n : β → Multiset γ) (f : α → β) :
    bind (map f m) n = bind m fun a => n (f a)

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
(m : Multiset α)
(n : β → Multiset γ)
(f : α → β)

(Multiset.map f m).bind n = m.bind fun a => n (f a)


/-- An additive functor `C ⥤ D` factors through its lift to `Mat_ C ⥤ D`. -/
@[simps!]
def embeddingLiftIso (F : C ⥤ D) [Functor.Additive F] : embedding C ⋙ lift F ≅ F

(CategoryTheory.Mat_.embeddingLiftIso F).hom.app X = CategoryTheory.Limits.biproduct.desc fun x => 𝟙 (F.obj X)


@[to_additive]
theorem comap_equiv_eq_map_symm (f : N ≃* M) (K : Submonoid M) :
    K.comap f = K.map f.symm

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(f : N ≃* M)
(K : Submonoid M)

Submonoid.comap f K = Submonoid.map f.symm K


theorem IsEquivalent.congr_left {u v w : α → β} {l : Filter α} (huv : u ~[l] v) (huw : u =ᶠ[l] w) :
    w ~[l] v

{α : Type u_1}
{β : Type u_2}
[NormedAddCommGroup β]
{u v w : α → β}
{l : Filter α}
(huv : u ~[l] v)
(huw : u =ᶠ[l] w)


@[simp]
theorem powersetCard_eq_empty {α : Type*} (n : ℕ) {s : Multiset α} (h : card s < n) :
    powersetCard n s = 0

{α : Type u_2}
(n : ℕ)
{s : Multiset α}
(h : Multiset.card s < n)


@[to_additive]
theorem tprod_image {g : γ → β} (f : β → α) {s : Set γ} (hg : Set.InjOn g s) :
    ∏' x : g '' s, f x = ∏' x : s, f (g x)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
{g : γ → β}
(f : β → α)
{s : Set γ}
(hg : Set.InjOn g s)


@[simp, norm_cast] lemma coe_toNatHom : toNatHom = toNat


/-- Restricting a partial homeomorphism `e` to `e.source ∩ interior s`. We use the interior to make
sure that the restriction is well defined whatever the set s, since partial homeomorphisms are by
definition defined on open sets. In applications where `s` is open, this coincides with the
restriction of partial equivalences -/
@[simps! (config := mfld_cfg) apply symm_apply, simps! (config := .lemmasOnly) source target]
protected def restr (s : Set X) : PartialHomeomorph X Y

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


theorem norm_eq_abs (n : ℤ) : ‖n‖ = |(n : ℝ)|


@[to_additive]
theorem nonempty_of_prod_ne_one (h : ∏ x ∈ s, f x ≠ 1) : s.Nonempty

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[AddCommMonoid β]
(h : ∑ x ∈ s, f x ≠ 0)


theorem le_antisymm [LT α] [s : Antisymm (¬ · < · : α → α → Prop)] {as bs : List α} (h₁ : as ≤ bs) (h₂ : bs ≤ as) : as = bs

{α : Type u_1}
[LT α]
[s : Antisymm fun x x_1 => ¬x < x_1]
{as bs : List α}
(h₁ : as ≤ bs)
(h₂ : bs ≤ as)


@[simp] theorem atLeastTwo_false_mid   : atLeastTwo a false c = (a && c)


@[to_additive (attr := simp)]
theorem prod_bind [CommMonoid β] (s : Multiset α) (t : α → Multiset β) :
    (s.bind t).prod = (s.map fun a => (t a).prod).prod

{α : Type u_1}
{β : Type v}
[CommMonoid β]
(s : Multiset α)
(t : α → Multiset β)

(s.bind t).prod = (Multiset.map (fun a => (t a).prod) s).prod


@[simp]
theorem degree_le_natDegree : degree p ≤ natDegree p


/-- The value of `Orientation.map` when the index type has the cardinality of a basis, in terms
of `f.det`. -/
theorem map_orientation_eq_det_inv_smul [Finite ι] (e : Basis ι R M) (x : Orientation R M ι)
    (f : M ≃ₗ[R] M) : Orientation.map ι f x = (LinearEquiv.det f)⁻¹ • x

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_4}
[Finite ι]
(e : Basis ι R M)
(x : Orientation R M ι)
(f : M ≃ₗ[R] M)

(Orientation.map ι f) x = (LinearEquiv.det f)⁻¹ • x


@[simp]
lemma reverse_pow (l : Language α) (n : ℕ) : (l ^ n).reverse = l.reverse ^ n


/-- The embedding of `C` into `Mat_ C` as one-by-one matrices.
(We index the summands by `PUnit`.) -/
@[simps]
def embedding : C ⥤ Mat_ C

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

∀ (x : PUnit.{1}), ((CategoryTheory.Mat_.embedding C).obj X).X x = X


/-- Given an injective `CommMonoid` homomorphism `g : M →* P`, and a submonoid `S ⊆ M`,
the induced monoid homomorphism from the localization of `M` at `S` to the
localization of `P` at `g S`, is injective.
-/
@[to_additive "Given an injective `AddCommMonoid` homomorphism `g : M →+ P`, and a
submonoid `S ⊆ M`, the induced monoid homomorphism from the localization of `M` at `S`
to the localization of `P` at `g S`, is injective. "]
theorem map_injective_of_injective (hg : Injective g) (k : LocalizationMap (S.map g) Q) :
    Injective (map f (apply_coe_mem_map g S) k)

(k : (AddSubmonoid.map g S).LocalizationMap Q)


theorem natDegree_derivative_lt {p : R[X]} (hp : p.natDegree ≠ 0) :
    p.derivative.natDegree < p.natDegree

{R : Type u}
[Semiring R]
{p : R[X]}
(hp : p.natDegree ≠ 0)

(Polynomial.derivative p).natDegree < p.natDegree


@[to_additive]
theorem isometry_smul {M : Type u} (X : Type w) [PseudoEMetricSpace X] [SMul M X]
    [IsometricSMul M X] (c : M) : Isometry (c • · : X → X)

{M : Type u}
(X : Type w)
[PseudoEMetricSpace X]
[VAdd M X]
[IsometricVAdd M X]
(c : M)


lemma cast_mk' (a b h1 h2) : ((⟨a, b, h1, h2⟩ : ℚ) : K) = a / b

{K : Type u_3}
[DivisionRing K]
(a : ℤ)
(b : ℕ)
(h1 : b ≠ 0)
(h2 : a.natAbs.Coprime b)

↑{ num := a, den := b, den_nz := h1, reduced := h2 } = ↑a / ↑b


@[simp]
theorem eval₂_monomial : (monomial s a).eval₂ f g = f a * s.prod fun n e => g n ^ e

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
{a : R}
{s : σ →₀ ℕ}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)
(g : σ → S₁)

MvPolynomial.eval₂ f g ((MvPolynomial.monomial s) a) = f a * s.prod fun n e => g n ^ e


theorem length_dropSlice_lt (i j : ℕ) (hj : 0 < j) (xs : List α) (hi : i < xs.length) :
    (List.dropSlice i j xs).length < xs.length

{α : Type u}
(i j : ℕ)
(hj : 0 < j)
(xs : List α)
(hi : i < xs.length)


theorem closedEmbedding_update {ι : Type*} {β : ι → Type*}
    [DecidableEq ι] [(i : ι) → TopologicalSpace (β i)]
    (x : (i : ι) → β i) (i : ι) [(i : ι) → T1Space (β i)] :
    ClosedEmbedding (update x i)

{ι : Type u_3}
{β : ι → Type u_4}
[DecidableEq ι]
[(i : ι) → TopologicalSpace (β i)]
(x : (i : ι) → β i)
(i : ι)
[∀ (i : ι), T1Space (β i)]


@[simp]
theorem coe_id : ⇑(LatticeHom.id α) = id


theorem coe_sections :
    ∀ l : List (List α),
      Sections (l.map fun l : List α => (l : Multiset α) : Multiset (Multiset α)) =
        (l.sections.map fun l : List α => (l : Multiset α) : Multiset (Multiset α))

(↑(List.map (fun l => ↑l) l)).Sections = ↑(List.map (fun l => ↑l) l.sections)


theorem norm_eq {x : ℝ} : ‖(x : AddCircle p)‖ = |x - round (p⁻¹ * x) * p|


@[simp]
theorem map_eq_bot_iff [LE α] [OrderBot α] [PartialOrder β] [OrderBot β] [OrderIsoClass F α β]
    (f : F) {a : α} : f a = ⊥ ↔ a = ⊥

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[EquivLike F α β]
[LE α]
[OrderBot α]
[PartialOrder β]
[OrderBot β]
[OrderIsoClass F α β]
(f : F)
{a : α}


@[simp] lemma nnnorm_eq_self (x : ℝ≥0) : ‖x‖₊ = x


@[simp]
theorem mem_sep {p : ZFSet.{u} → Prop} {x y : ZFSet.{u}} :
    y ∈ ZFSet.sep p x ↔ y ∈ x ∧ p y


@[simp]
theorem cliqueFreeOn_univ : G.CliqueFreeOn Set.univ n ↔ G.CliqueFree n

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


/-- The `Generators` containing the whole algebra, which induces the canonical map  `R[S] → S`. -/
@[simps]
noncomputable
def self : Generators R S

(R : Type u)
(S : Type v)
[CommRing R]
[CommRing S]
[Algebra R S]
(n : S)

(Algebra.Generators.self R S).σ n = MvPolynomial.X n


@[simp]
lemma cofinite_inf_principal_neBot_iff {s : Set α} : (cofinite ⊓ 𝓟 s).NeBot ↔ s.Infinite

(Filter.cofinite ⊓ 𝓟 s).NeBot ↔ s.Infinite


@[simp]
theorem LinearMap.toMatrix₂Aux_apply (f : M₁ →ₛₗ[σ₁] M₂ →ₛₗ[σ₂] N₂) (b₁ : n → M₁) (b₂ : m → M₂)
    (i : n) (j : m) : LinearMap.toMatrix₂Aux R b₁ b₂ f i j = f (b₁ i) (b₂ j)

(R : Type u_1)
{R₁ : Type u_2}
{S₁ : Type u_3}
{R₂ : Type u_4}
{S₂ : Type u_5}
{M₁ : Type u_7}
{M₂ : Type u_8}
{N₂ : Type u_11}
{n : Type u_12}
{m : Type u_13}
[CommSemiring R]
[Semiring R₁]
[Semiring S₁]
[Semiring R₂]
[Semiring S₂]
[AddCommMonoid M₁]
[Module R₁ M₁]
[AddCommMonoid M₂]
[Module R₂ M₂]
[AddCommMonoid N₂]
[Module R N₂]
[Module S₁ N₂]
[Module S₂ N₂]
[SMulCommClass S₁ R N₂]
[SMulCommClass S₂ R N₂]
[SMulCommClass S₂ S₁ N₂]
{σ₁ : R₁ →+* S₁}
{σ₂ : R₂ →+* S₂}
(f : M₁ →ₛₗ[σ₁] M₂ →ₛₗ[σ₂] N₂)
(b₁ : n → M₁)
(b₂ : m → M₂)
(i : n)
(j : m)

(LinearMap.toMatrix₂Aux R b₁ b₂) f i j = (f (b₁ i)) (b₂ j)


@[simp]
theorem toLinearMap_id : toLinearMap (AlgHom.id R A) = LinearMap.id

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

(AlgHom.id R A).toLinearMap = LinearMap.id


@[to_additive]
theorem prod_range_succ (f : ℕ → β) (n : ℕ) :
    (∏ x ∈ range (n + 1), f x) = (∏ x ∈ range n, f x) * f n

{β : Type u_4}
[AddCommMonoid β]
(f : ℕ → β)
(n : ℕ)

∑ x ∈ Finset.range (n + 1), f x = ∑ x ∈ Finset.range n, f x + f n


@[simp] theorem countP_append (l₁ l₂) : countP p (l₁ ++ l₂) = countP p l₁ + countP p l₂

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

List.countP p (l₁ ++ l₂) = List.countP p l₁ + List.countP p l₂


theorem mk_iUnion_le_sum_mk_lift {α : Type u} {ι : Type v} {f : ι → Set α} :
    lift.{v} #(⋃ i, f i) ≤ sum fun i => #(f i)

Cardinal.lift.{v, u} (Cardinal.mk ↑(⋃ i, f i)) ≤ Cardinal.sum fun i => Cardinal.mk ↑(f i)


@[simp, mfld_simps]
theorem restrOpen_toPartialEquiv (s : Set X) (hs : IsOpen s) :
    (e.restrOpen s hs).toPartialEquiv = e.toPartialEquiv.restr s

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(s : Set X)
(hs : IsOpen s)

(e.restrOpen s hs).toPartialEquiv = e.restr s


/-- If a function `f` is continuous on a convex set `D ⊆ ℝ`, is differentiable on its interior,
and `f'` is monotone on the interior, then `f` is convex on `D`. -/
theorem MonotoneOn.convexOn_of_deriv {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf' : DifferentiableOn ℝ f (interior D))
    (hf'_mono : MonotoneOn (deriv f) (interior D)) : ConvexOn ℝ D f


/-- The adjoint action of a Lie algebra `L` on itself, seen as a morphism of Lie algebras from
`L` to its derivations.
Note the minus sign: this is chosen to so that `ad ⁅x, y⁆ = ⁅ad x, ad y⁆`. -/
@[simps!]
def ad : L →ₗ⁅R⁆ LieDerivation R L L

(R : Type u_1)
(L : Type u_2)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(a : L)

∀ (a_1 : L), ((LieDerivation.ad R L) a) a_1 = ⁅a, a_1⁆


@[simp]
theorem vecMul_intCast (x : ℤ) (v : m → α) : v ᵥ* x = MulOpposite.op (x : α) • v

{m : Type u_2}
{α : Type v}
[NonAssocRing α]
[Fintype m]
[DecidableEq m]
(x : ℤ)
(v : m → α)


/-- A version of `linearIndependent_le_span` for `Finset`. -/
theorem linearIndependent_le_span_finset {ι : Type*} (v : ι → M) (i : LinearIndependent R v)
    (w : Finset M) (s : span R (w : Set M) = ⊤) : #ι ≤ w.card

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
{ι : Type u_1}
(v : ι → M)
(i : LinearIndependent R v)
(w : Finset M)
(s : Submodule.span R ↑w = ⊤)


/-- Twice the angle between two multiples of a vector is 0. -/
@[simp]
theorem two_zsmul_oangle_smul_smul_self (x : V) {r₁ r₂ : ℝ} :
    (2 : ℤ) • o.oangle (r₁ • x) (r₂ • x) = 0

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


theorem mono {p' q' : Set α → Prop} (H : InnerRegularWRT μ p q)
    (h : ∀ s, q' s → q s) (h' : ∀ s, p s → p' s) : InnerRegularWRT μ p' q'

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p q p' q' : Set α → Prop}
(H : μ.InnerRegularWRT p q)
(h : ∀ (s : Set α), q' s → q s)
(h' : ∀ (s : Set α), p s → p' s)


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

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


@[simp]
theorem iterate_zero : f^[0] = id


theorem UniqueFactorizationMonoid.iff_exists_prime_factors [CancelCommMonoidWithZero α] :
    UniqueFactorizationMonoid α ↔
      ∀ a : α, a ≠ 0 → ∃ f : Multiset α, (∀ b ∈ f, Prime b) ∧ f.prod ~ᵤ a

{α : Type u_1}
[CancelCommMonoidWithZero α]

UniqueFactorizationMonoid α ↔ ∀ (a : α), a ≠ 0 → ∃ f, (∀ b ∈ f, Prime b) ∧ f.prod ~ᵤ a


theorem le_iff_eq_or_lt [PartialOrder α] {a b : α} : a ≤ b ↔ a = b ∨ a < b

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


@[to_additive card_sq_le_card_mul_addEnergy]
lemma card_sq_le_card_mul_mulEnergy (s t u : Finset α) :
    ((s ×ˢ t).filter fun (a, b) ↦ a * b ∈ u).card ^ 2 ≤ u.card * Eₘ[s, t]

{α : Type u_1}
[DecidableEq α]
[Mul α]
(s t u : Finset α)

(Finset.filter
        (fun x =>
          match x with
          | (a, b) => a * b ∈ u)
        (s ×ˢ t)).card ^
    2 ≤
  u.card * s.mulEnergy t


theorem isClosed_biInter {s : Set α} {f : α → Set X} (h : ∀ i ∈ s, IsClosed (f i)) :
    IsClosed (⋂ i ∈ s, f i)

{X : Type u}
{α : Type u_1}
[TopologicalSpace X]
{s : Set α}
{f : α → Set X}
(h : ∀ i ∈ s, IsClosed (f i))


/-- One form of **Cramer's rule**. See `Matrix.mulVec_cramer` for a stronger form. -/
@[simp]
theorem det_smul_inv_vecMul_eq_cramer_transpose (A : Matrix n n α) (b : n → α) (h : IsUnit A.det) :
    A.det • b ᵥ* A⁻¹ = cramer Aᵀ b

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(b : n → α)
(h : IsUnit A.det)

A.det • Matrix.vecMul b A⁻¹ = A.transpose.cramer b


/-- A version of `Submodule.map_span_le` that does not require the `RingHomSurjective`
assumption. -/
theorem image_span_subset (f : F) (s : Set M) (N : Submodule R₂ M₂) :
    f '' span R s ⊆ N ↔ ∀ m ∈ s, f m ∈ N

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[AddCommMonoid M₂]
[Module R₂ M₂]
{F : Type u_8}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
(f : F)
(s : Set M)
(N : Submodule R₂ M₂)

⇑f '' ↑(Submodule.span R s) ⊆ ↑N ↔ ∀ m ∈ s, f m ∈ N


@[simp]
theorem ofReal_eq_ofReal_iff {p q : ℝ} (hp : 0 ≤ p) (hq : 0 ≤ q) :
    ENNReal.ofReal p = ENNReal.ofReal q ↔ p = q


theorem IntegrableOn.union (hs : IntegrableOn f s μ) (ht : IntegrableOn f t μ) :
    IntegrableOn f (s ∪ t) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s t : Set α}
{μ : MeasureTheory.Measure α}
(hs : MeasureTheory.IntegrableOn f s μ)
(ht : MeasureTheory.IntegrableOn f t μ)


theorem star_mem_resolventSet_iff {r : R} {a : A} :
    star r ∈ resolventSet R a ↔ r ∈ resolventSet R (star a)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
[InvolutiveStar R]
[StarRing A]
[StarModule R A]
{r : R}
{a : A}


@[simp]
theorem top_toSubsemiring : (⊤ : Subalgebra R A).toSubsemiring = ⊤

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


theorem nat_sub (h : LiouvilleWith p x) (n : ℕ) : LiouvilleWith p (n - x)

{p x : ℝ}
(h : LiouvilleWith p x)
(n : ℕ)


theorem aeval_X_left_apply (p : R[X]) : aeval X p = p

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


theorem pow_le_pow_of_le_left {n m : Nat} (h : n ≤ m) : ∀ (i : Nat), n^i ≤ m^i


@[simp, mfld_simps]
theorem ofSet_symm (s : Set α) : (PartialEquiv.ofSet s).symm = PartialEquiv.ofSet s


/-- The points of a face of a simplex are given by `mono_of_fin`. -/
theorem face_points {n : ℕ} (s : Simplex k P n) {fs : Finset (Fin (n + 1))} {m : ℕ}
    (h : fs.card = m + 1) (i : Fin (m + 1)) :
    (s.face h).points i = s.points (fs.orderEmbOfFin h i)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{n : ℕ}
(s : Affine.Simplex k P n)
{fs : Finset (Fin (n + 1))}
{m : ℕ}
(h : fs.card = m + 1)
(i : Fin (m + 1))

(s.face h).points i = s.points ((fs.orderEmbOfFin h) i)


theorem map_add_of_distinct_val (h : v x ≠ v y) : v (x + y) = max (v x) (v y)

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)
{x y : R}
(h : v x ≠ v y)


protected lemma le_add_iff_sub_le : a ≤ b + c ↔ a - c ≤ b


@[aesop unsafe 10% (rule_sets := [Matroid])]
theorem Base.subset_ground (hB : M.Base B) : B ⊆ M.E

{α : Type u_1}
{M : Matroid α}
{B : Set α}
(hB : M.Base B)


@[to_additive (attr := simp) sub_pos]
theorem one_lt_div' : 1 < a / b ↔ b < a

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


@[to_additive measurePreserving_prod_add_right]
theorem measurePreserving_prod_mul_right [IsMulRightInvariant ν] :
    MeasurePreserving (fun z : G × G => (z.1, z.2 * z.1)) (μ.prod ν) (μ.prod ν)

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

MeasureTheory.MeasurePreserving (fun z => (z.1, z.2 + z.1)) (μ.prod ν) (μ.prod ν)


theorem le_cofinite_iff_compl_singleton_mem : l ≤ cofinite ↔ ∀ x, {x}ᶜ ∈ l

l ≤ Filter.cofinite ↔ ∀ (x : α), {x}ᶜ ∈ l


@[continuity]
theorem truncate_const_continuous_family {a b : X} (γ : Path a b)
    (t : ℝ) : Continuous ↿(γ.truncate t)

{X : Type u_1}
[TopologicalSpace X]
{a b : X}
(γ : Path a b)
(t : ℝ)


@[simp] theorem perpBisector_ne_bot : perpBisector p₁ p₂ ≠ ⊥

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ : P}


@[simp]
theorem snd_mul [Mul R] [Add A] [Mul A] [SMul R A] (x₁ x₂ : Unitization R A) :
    (x₁ * x₂).snd = x₁.fst • x₂.snd + x₂.fst • x₁.snd + x₁.snd * x₂.snd

{R : Type u_1}
{A : Type u_2}
[Mul R]
[Add A]
[Mul A]
[SMul R A]
(x₁ x₂ : Unitization R A)


theorem abs_eq_normalize (z : ℤ) : |z| = normalize z


theorem length_eq_two {l : List α} : l.length = 2 ↔ ∃ a b, l = [a, b]


theorem _root_.lipschitzWith_min : LipschitzWith 1 fun p : ℝ × ℝ => min p.1 p.2


/-- A two-argument function applied to two `ite`s is a `ite` of that two-argument function
applied to each of the branches. -/
theorem apply_ite₂ {α β γ : Sort*} (f : α → β → γ) (P : Prop) [Decidable P] (a b : α) (c d : β) :
    f (ite P a b) (ite P c d) = ite P (f a c) (f b d)

{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
(f : α → β → γ)
(P : Prop)
[Decidable P]
(a b : α)
(c d : β)

f (if P then a else b) (if P then c else d) = if P then f a c else f b d


@[simp] lemma isConj_iff₀ : IsConj a b ↔ ∃ c : α, c ≠ 0 ∧ c * a * c⁻¹ = b

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

IsConj a b ↔ ∃ c, c ≠ 0 ∧ c * a * c⁻¹ = b


theorem ofReal_sub (p : ℝ) {q : ℝ} (hq : 0 ≤ q) :
    ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q


theorem ConvexOn.comp_concaveOn (hg : ConvexOn 𝕜 (f '' s) g) (hf : ConcaveOn 𝕜 s f)
    (hg' : AntitoneOn g (f '' s)) : ConvexOn 𝕜 s (g ∘ f)

{𝕜 : Type u_1}
{E : Type u_2}
{α : Type u_4}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 α]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}
{g : β → α}
(hg : ConvexOn 𝕜 (f '' s) g)
(hf : ConcaveOn 𝕜 s f)
(hg' : AntitoneOn g (f '' s))


@[simp] lemma coe_sum {ι : Type*} (s : Finset ι)
    (f : ι → C(X, R)₀) : ⇑(s.sum f) = s.sum (fun i => ⇑(f i))

{X : Type u_1}
{R : Type u_2}
[Zero X]
[TopologicalSpace X]
[TopologicalSpace R]
[CommSemiring R]
[TopologicalSemiring R]
{ι : Type u_3}
(s : Finset ι)
(f : ι → ContinuousMapZero X R)


theorem support_single_ne_zero (a : α) (hb : b ≠ 0) : (single a b).support = {a}

{α : Type u_1}
{M : Type u_5}
[Zero M]
{b : M}
(a : α)
(hb : b ≠ 0)


/-- If `𝔖 : Set (Set α)` is nonempty and directed and `𝓑` is a filter basis of `𝓤 β`, then the
uniformity of `α →ᵤ[𝔖] β` admits the family `{(f, g) | ∀ x ∈ S, (f x, g x) ∈ V}` for `S ∈ 𝔖` and
`V ∈ 𝓑` as a filter basis. -/
protected theorem hasBasis_uniformity_of_basis (h : 𝔖.Nonempty) (h' : DirectedOn (· ⊆ ·) 𝔖)
    {p : ι → Prop} {s : ι → Set (β × β)} (hb : HasBasis (𝓤 β) p s) :
    (𝓤 (α →ᵤ[𝔖] β)).HasBasis (fun Si : Set α × ι => Si.1 ∈ 𝔖 ∧ p Si.2) fun Si =>
      UniformOnFun.gen 𝔖 Si.1 (s Si.2)

(h' : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖)

(𝓤 (α →ᵤ[𝔖] β)).HasBasis (fun Si => Si.1 ∈ 𝔖 ∧ p Si.2) fun Si => UniformOnFun.gen 𝔖 Si.1 (s Si.2)


/-- In any preadditive category, any binary biproduct satsifies
`biprod.fst ≫ biprod.inl + biprod.snd ≫ biprod.inr = 𝟙 (X ⊞ Y)`.
-/
@[simp]
theorem biprod.total : biprod.fst ≫ biprod.inl + biprod.snd ≫ biprod.inr = 𝟙 (X ⊞ Y)

CategoryTheory.Limits.biprod.fst ≫ CategoryTheory.Limits.biprod.inl +
    CategoryTheory.Limits.biprod.snd ≫ CategoryTheory.Limits.biprod.inr =
  𝟙 (X ⊞ Y)


theorem convexBodySum_volume_eq_zero_of_le_zero {B} (hB : B ≤ 0) :
    volume (convexBodySum K B) = 0

(K : Type u_1)
[Field K]
[NumberField K]
{B : ℝ}
(hB : B ≤ 0)

MeasureTheory.volume (NumberField.mixedEmbedding.convexBodySum K B) = 0


theorem take_prefix (n) (l : List α) : take n l <+: l


@[simp]
theorem foldlm.ofFreeMonoid_comp_of {m} [Monad m] [LawfulMonad m] (f : α → β → m α) :
    foldlM.ofFreeMonoid f ∘ FreeMonoid.of = foldlM.mk ∘ flip f

{α β : Type u}
{m : Type u → Type u}
[Monad m]
[LawfulMonad m]
(f : α → β → m α)

⇑(Monoid.foldlM.ofFreeMonoid f) ∘ FreeMonoid.of = Monoid.foldlM.mk ∘ flip f


@[to_additive (attr := simp) Discrete.addMonoidal_tensorUnit_as]
lemma Discrete.monoidal_tensorUnit_as : (𝟙_ (Discrete M)).as = 1


@[simp]
theorem range_const : ∀ [Nonempty ι] {c : α}, (range fun _ : ι => c) = {c}

{α : Type u_1}
{ι : Sort u_4}
[Nonempty ι]
{c : α}


/-- A "continuous induction principle" for a closed interval: if a set `s` meets `[a, b]`
on a closed subset, contains `a`, and the set `s ∩ [a, b)` has no maximal point, then `b ∈ s`. -/
theorem IsClosed.mem_of_ge_of_forall_exists_gt {a b : α} {s : Set α} (hs : IsClosed (s ∩ Icc a b))
    (ha : a ∈ s) (hab : a ≤ b) (hgt : ∀ x ∈ s ∩ Ico a b, (s ∩ Ioc x b).Nonempty) : b ∈ s

(hgt : ∀ x ∈ s ∩ Set.Ico a b, (s ∩ Set.Ioc x b).Nonempty)


theorem card_image_iff [DecidableEq β] : (s.image f).card = s.card ↔ Set.InjOn f s

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{f : α → β}
[DecidableEq β]

(Finset.image f s).card = s.card ↔ Set.InjOn f ↑s


/-- `NatTrans F G` represents a natural transformation between functors `F` and `G`.

The field `app` provides the components of the natural transformation.

Naturality is expressed by `α.naturality`.
-/
@[ext]
structure NatTrans (F G : C ⥤ D) : Type max u₁ v₂ where
  /-- The component of a natural transformation. -/
  app : ∀ X : C, F.obj X ⟶ G.obj X
  /-- The naturality square for a given morphism. -/
  naturality : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), F.map f ≫ app Y = app X ≫ G.map f := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : CategoryTheory.Functor C D}
(self : CategoryTheory.NatTrans F G)
⦃X Y : C⦄
(f : X ⟶ Y)

CategoryTheory.CategoryStruct.comp (F.map f) (self.app Y) = CategoryTheory.CategoryStruct.comp (self.app X) (G.map f)


lemma mem_essImage_of_counit_isIso (A : D)
    [IsIso (h.counit.app A)] : A ∈ L.essImage

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : C ⥤ D}
{R : D ⥤ C}
(h : L ⊣ R)
(A : D)
[CategoryTheory.IsIso (h.counit.app A)]


lemma shiftFunctorZero_eq :
    CategoryTheory.shiftFunctorZero (CochainComplex C ℤ) ℤ = shiftFunctorZero' C 0 rfl

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

CategoryTheory.shiftFunctorZero (CochainComplex C ℤ) ℤ = CochainComplex.shiftFunctorZero' C 0 ⋯


lemma div_eq_of_eq_mul (hb : b ≠ 0) : a = c * b → a / b = c

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


theorem den_div_natCast_eq_one_iff (m n : ℕ) (hn : n ≠ 0) : ((m : ℚ) / n).den = 1 ↔ n ∣ m


theorem cos_arcsin_nonneg (x : ℝ) : 0 ≤ cos (arcsin x)


theorem ContDiff.sin {n} (h : ContDiff ℝ n f) : ContDiff ℝ n fun x => Real.sin (f x)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{n : ℕ∞}
(h : ContDiff ℝ n f)


theorem Icc_add_Icc (f : α → E) {s : Set α} {a b c : α} (hab : a ≤ b) (hbc : b ≤ c) (hb : b ∈ s) :
    eVariationOn f (s ∩ Icc a b) + eVariationOn f (s ∩ Icc b c) = eVariationOn f (s ∩ Icc a c)

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
{s : Set α}
{a b c : α}
(hab : a ≤ b)
(hbc : b ≤ c)
(hb : b ∈ s)

eVariationOn f (s ∩ Set.Icc a b) + eVariationOn f (s ∩ Set.Icc b c) = eVariationOn f (s ∩ Set.Icc a c)


/-- The coercion to the quotient of a congruence relation commutes with multiplication (by
    definition). -/
@[to_additive (attr := simp) "The coercion to the quotient of an additive congruence relation
commutes with addition (by definition)."]
theorem coe_mul (x y : M) : (↑(x * y) : c.Quotient) = ↑x * ↑y

{M : Type u_1}
[Mul M]
{c : Con M}
(x y : M)


theorem volumeForm_robust' (b : OrthonormalBasis (Fin n) ℝ E) (v : Fin n → E) :
    |o.volumeForm v| = |b.toBasis.det v|

[_i : Fact (FiniteDimensional.finrank ℝ E = n)]


theorem le_floor_add (a b : α) : ⌊a⌋ + ⌊b⌋ ≤ ⌊a + b⌋

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a b : α)

⌊a⌋ + ⌊b⌋ ≤ ⌊a + b⌋


/--
A *semisimple* Lie algebra is one that is a direct sum of non-abelian atomic ideals.
These ideals are simple Lie algebras, by `LieAlgebra.IsSemisimple.isSimple_of_isAtom`.

Note that the label 'semisimple' is apparently not universally agreed
[upon](https://mathoverflow.net/questions/149391/on-radicals-of-a-lie-algebra#comment383669_149391)
for general coefficients.

For example [Seligman, page 15](seligman1967) uses the label for `LieAlgebra.HasTrivialRadical`,
the weakest of the various properties which are all equivalent over a field of characteristic zero.
-/
class IsSemisimple : Prop where
  /-- In a semisimple Lie algebra, the supremum of the atoms is the whole Lie algebra. -/
  sSup_atoms_eq_top : sSup {I : LieIdeal R L | IsAtom I} = ⊤
  /-- In a semisimple Lie algebra, the atoms are independent. -/
  setIndependent_isAtom : CompleteLattice.SetIndependent {I : LieIdeal R L | IsAtom I}
  /-- In a semisimple Lie algebra, the atoms are non-abelian. -/
  non_abelian_of_isAtom : ∀ I : LieIdeal R L, IsAtom I → ¬ IsLieAbelian I

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[self : LieAlgebra.IsSemisimple R L]
(I : LieIdeal R L)


@[simp]
theorem of_zero_mul (a b : A 0) : of _ 0 (a * b) = of _ 0 a * of _ 0 b

(DirectSum.of A 0) (a * b) = (DirectSum.of A 0) a * (DirectSum.of A 0) b


/-- Swap the `ᵐᵒᵖ` on an algebra isomorphism to the opposite side. -/
@[simps!]
def opComm : (A ≃ₐ[R] Bᵐᵒᵖ) ≃ (Aᵐᵒᵖ ≃ₐ[R] B)

{R : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]

∀ (a : A ≃ₐ[R] Bᵐᵒᵖ) (a_1 : B),
  (AlgEquiv.opComm a).symm a_1 = (↑↑AlgEquiv.refl).symm ((↑↑((AlgEquiv.op a).trans (AlgEquiv.opOp R B).symm)).symm a_1)


/-- The composition of `C^∞` functions is `C^∞`. -/
nonrec theorem Smooth.comp {g : M' → M''} (hg : Smooth I' I'' g) (hf : Smooth I I' f) :
    Smooth I I'' (g ∘ f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{g : M' → M''}
(hg : Smooth I' I'' g)
(hf : Smooth I I' f)


lemma RingHom.charP_iff_charP {K L : Type*} [DivisionRing K] [Semiring L] [Nontrivial L]
    (f : K →+* L) (p : ℕ) : CharP K p ↔ CharP L p

{K : Type u_2}
{L : Type u_3}
[DivisionRing K]
[Semiring L]
[Nontrivial L]
(f : K →+* L)
(p : ℕ)


/-- The isomorphism between left extensions induced by a right unitor. -/
@[simps! hom_right inv_right]
def whiskerOfCompIdIsoSelf (t : LeftExtension f g) : (t.whisker (𝟙 c)).ofCompId ≅ t

(t : CategoryTheory.Bicategory.LeftExtension f g)

t.whiskerOfCompIdIsoSelf.hom.right = (CategoryTheory.Bicategory.rightUnitor t.extension).hom


lemma krullDim_nonneg_of_nonempty [Nonempty α] : 0 ≤ krullDim α

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


theorem continuous_iff_lower_upperSemicontinuous {f : α → γ} :
    Continuous f ↔ LowerSemicontinuous f ∧ UpperSemicontinuous f

{α : Type u_1}
[TopologicalSpace α]
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{f : α → γ}


@[simp]
theorem one_le_one_div {I : Submodule R A} : 1 ≤ 1 / I ↔ I ≤ 1

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


@[simp]
theorem coe_toContinuousMap {f : CocompactMap α β} : (f.toContinuousMap : α → β) = f

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : CocompactMap α β}


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

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

∑ k ∈ Finset.Icc a (b + 1), f k = ∑ k ∈ Finset.Icc a b, f k + f (b + 1)


theorem log_of_left_le_one {b : Ordinal} (h : b ≤ 1) : ∀ x, log b x = 0

{b : Ordinal.{u_1}}
(h : b ≤ 1)
(x : Ordinal.{u_1})


theorem A_mono (L : F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{f : ℝ → F}
(L : F)
(r : ℝ)
{ε δ : ℝ}
(h : ε ≤ δ)

RightDerivMeasurableAux.A f L r ε ⊆ RightDerivMeasurableAux.A f L r δ


/-- `TopologicalSpace.Closeds.compl` as an `OrderIso` to the order dual of
`TopologicalSpace.Opens α`. -/
@[simps]
def Closeds.complOrderIso : Closeds α ≃o (Opens α)ᵒᵈ

∀ (a : (TopologicalSpace.Opens α)ᵒᵈ),
  (RelIso.symm (TopologicalSpace.Closeds.complOrderIso α)) a = (TopologicalSpace.Opens.compl ∘ ⇑OrderDual.ofDual) a


theorem map_le_dualAnnihilator_dualAnnihilator (W : Subspace K V) :
    W.map (Module.Dual.eval K V) ≤ W.dualAnnihilator.dualAnnihilator

{K : Type u}
{V : Type v}
[Field K]
[AddCommGroup V]
[Module K V]
(W : Subspace K V)

Submodule.map (Module.Dual.eval K V) W ≤ (Submodule.dualAnnihilator W).dualAnnihilator


/--
Equality is transitive: if `a = b` and `b = c` then `a = c`.

Because this is in the `Eq` namespace, if you have variables or expressions
`h₁ : a = b` and `h₂ : b = c`, you can use `h₁.trans h₂ : a = c` as shorthand
for `Eq.trans h₁ h₂`.

For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality)
-/
theorem Eq.trans {α : Sort u} {a b c : α} (h₁ : Eq a b) (h₂ : Eq b c) : Eq a c


@[to_additive]
theorem uniformContinuous_unop [UniformSpace α] : UniformContinuous (unop : αᵐᵒᵖ → α)


@[to_additive]
protected theorem Inseparable.mul {a b c d : M} (hab : Inseparable a b) (hcd : Inseparable c d) :
    Inseparable (a * c) (b * d)

{M : Type u_3}
[TopologicalSpace M]
[Mul M]
[ContinuousMul M]
{a b c d : M}
(hab : Inseparable a b)
(hcd : Inseparable c d)


theorem id_tensor_π_preserves_coequalizer_inv_colimMap_desc {X Y Z X' Y' Z' : C} (f g : X ⟶ Y)
    (f' g' : X' ⟶ Y') (p : Z ⊗ X ⟶ X') (q : Z ⊗ Y ⟶ Y') (wf : (Z ◁ f) ≫ q = p ≫ f')
    (wg : (Z ◁ g) ≫ q = p ≫ g') (h : Y' ⟶ Z') (wh : f' ≫ h = g' ≫ h) :
    (Z ◁ coequalizer.π f g) ≫
        (PreservesCoequalizer.iso (tensorLeft Z) f g).inv ≫
          colimMap (parallelPairHom (Z ◁ f) (Z ◁ g) f' g' p q wf wg) ≫ coequalizer.desc h wh =
      q ≫ h

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

Z ◁ CategoryTheory.Limits.coequalizer.π f g ≫
    (CategoryTheory.Limits.PreservesCoequalizer.iso (CategoryTheory.MonoidalCategory.tensorLeft Z) f g).inv ≫
      CategoryTheory.Limits.colimMap (CategoryTheory.Limits.parallelPairHom (Z ◁ f) (Z ◁ g) f' g' p q wf wg) ≫
        CategoryTheory.Limits.coequalizer.desc h wh =
  q ≫ h


theorem coe_multilinearMap_mk (f : (ι → M) → N) (h₁ h₂ h₃) :
    ((⟨⟨f, h₁, h₂⟩, h₃⟩ : M [⋀^ι]→ₗ[R] N) : MultilinearMap R (fun _ : ι => M) N) =
      ⟨f, @h₁, @h₂⟩

(h₁ :
  ∀ [inst : DecidableEq ι] (m : ι → M) (i : ι) (x y : M),
    f (Function.update m i (x + y)) = f (Function.update m i x) + f (Function.update m i y))

(h₂ :
  ∀ [inst : DecidableEq ι] (m : ι → M) (i : ι) (c : R) (x : M),
    f (Function.update m i (c • x)) = c • f (Function.update m i x))

(h₃ : ∀ (v : ι → M) (i j : ι), v i = v j → i ≠ j → { toFun := f, map_add' := ⋯, map_smul' := ⋯ }.toFun v = 0)

↑{ toFun := f, map_add' := ⋯, map_smul' := ⋯, map_eq_zero_of_eq' := h₃ } =
  { toFun := f, map_add' := h₁, map_smul' := h₂ }


theorem exists_ne_zero_mem_ringOfIntegers_of_norm_le_mul_sqrt_discr :
    ∃ (a : 𝓞 K), a ≠ 0 ∧
      |Algebra.norm ℚ (a : K)| ≤ (4 / π) ^ NrComplexPlaces K *
        (finrank ℚ K).factorial / (finrank ℚ K) ^ (finrank ℚ K) * Real.sqrt |discr K|

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

∃ a,
  a ≠ 0 ∧
    ↑|(Algebra.norm ℚ) ↑a| ≤
      (4 / Real.pi) ^ NumberField.InfinitePlace.NrComplexPlaces K * ↑(FiniteDimensional.finrank ℚ K).factorial /
          ↑(FiniteDimensional.finrank ℚ K) ^ FiniteDimensional.finrank ℚ K *
        √|↑(NumberField.discr K)|


/-- A left homology data for a short complex `S` induces a right homology data for `S.op`. -/
@[simps]
def op (h : S.LeftHomologyData) : S.op.RightHomologyData


protected theorem Intersecting.insert (hs : s.Intersecting) (ha : a ≠ ⊥)
    (h : ∀ b ∈ s, ¬Disjoint a b) : (insert a s).Intersecting

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{s : Set α}
{a : α}
(hs : s.Intersecting)
(ha : a ≠ ⊥)
(h : ∀ b ∈ s, ¬Disjoint a b)


/-- Weighted generalized mean inequality, version for two elements of `ℝ≥0∞` and real
exponents. -/
theorem rpow_arith_mean_le_arith_mean2_rpow (w₁ w₂ z₁ z₂ : ℝ≥0∞) (hw' : w₁ + w₂ = 1) {p : ℝ}
    (hp : 1 ≤ p) : (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p


@[to_additive]
theorem IsClosed.smul_left_of_isCompact (ht : IsClosed t) (hs : IsCompact s) :
    IsClosed (s • t)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[Group α]
[MulAction α β]
[ContinuousInv α]
[ContinuousSMul α β]
{s : Set α}
{t : Set β}
(ht : IsClosed t)
(hs : IsCompact s)


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

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


@[simp]
lemma toFinset_Ici (a : α) [Fintype (Ici a)] : (Ici a).toFinset = Finset.Ici a

{α : Type u_3}
[Preorder α]
[LocallyFiniteOrderTop α]
(a : α)
[Fintype ↑(Set.Ici a)]


@[to_additive (attr := simp, to_additive) (reorder := 2 3, 5 6) smul_const]
lemma _root_.Function.const_pow [Pow α β] (a : α) (b : β) : const I a ^ b = const I (a ^ b)

{I : Type u}
{β : Type u_2}
{α : Type u_1}
[VAdd β α]
(b : β)
(a : α)

b +ᵥ Function.const I a = Function.const I (b +ᵥ a)


/-- Construct a bundled continuous (semi)linear map from a map `f : E → F` and a proof of the fact
that it belongs to the closure of the image of a bounded set `s : Set (E →SL[σ₁₂] F)` under coercion
to function. Coercion to function of the result is definitionally equal to `f`. -/
@[simps! (config := .asFn) apply]
def ofMemClosureImageCoeBounded (f : E' → F) {s : Set (E' →SL[σ₁₂] F)} (hs : IsBounded s)
    (hf : f ∈ closure (((↑) : (E' →SL[σ₁₂] F) → E' → F) '' s)) : E' →SL[σ₁₂] F

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{F : Type u_6}
[NormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{E' : Type u_11}
[SeminormedAddCommGroup E']
[NormedSpace 𝕜 E']
[RingHomIsometric σ₁₂]
(f : E' → F)
{s : Set (E' →SL[σ₁₂] F)}
(hs : Bornology.IsBounded s)
(hf : f ∈ closure (DFunLike.coe '' s))

⇑(ContinuousLinearMap.ofMemClosureImageCoeBounded f hs hf) = f


theorem hasSum_geometric_of_abs_lt_one {r : ℝ} (h : |r| < 1) :
    HasSum (fun n : ℕ ↦ r ^ n) (1 - r)⁻¹


/-- If the counit of an is an isomorphism, one has an isomorphism `(R ⋙ L ⋙ R) ≅ R`. -/
@[simps!]
noncomputable def whiskerLeftRUnitIsoOfIsIsoCounit [IsIso h.counit] : R ⋙ L ⋙ R ≅ R

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : C ⥤ D}
{R : D ⥤ C}
(h : L ⊣ R)
[CategoryTheory.IsIso h.counit]
(X : D)

h.whiskerLeftRUnitIsoOfIsIsoCounit.inv.app X = h.unit.app (R.obj X)


theorem denom_mul_dvd (x y : RatFunc K) : denom (x * y) ∣ denom x * denom y

{K : Type u}
[Field K]
(x y : RatFunc K)


theorem self_mem_range_succ (n : ℕ) : n ∈ range (n + 1)


theorem isPell_pellZd : ∀ n : ℕ, IsPell (pellZd a1 n)


@[simp]
theorem EMetric.diam_closure (s : Set α) : diam (closure s) = diam s

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

EMetric.diam (closure s) = EMetric.diam s


/-- If `(a,b)` is a kernel pair for `f₁ ≫ f₂` and `f₂` is mono, then `(a,b)` is a kernel pair for
just `f₁`.
The converse of `comp_of_mono`.
-/
theorem cancel_right_of_mono {f₁ : X ⟶ Y} {f₂ : Y ⟶ Z} [Mono f₂]
    (big_k : IsKernelPair (f₁ ≫ f₂) a b) : IsKernelPair f₁ a b

(big_k : CategoryTheory.IsKernelPair (CategoryTheory.CategoryStruct.comp f₁ f₂) a b)


@[simp]
theorem linearEquivAt_symm_apply (e : Trivialization F (π F E)) [e.IsLinear R] (b : B)
    (hb : b ∈ e.baseSet) (v : F) : (e.linearEquivAt R b hb).symm v = e.symm b v

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

(Trivialization.linearEquivAt R e b hb).symm v = e.symm b v


theorem chromaticNumber_le_of_forall_imp {V' : Type*} {G' : SimpleGraph V'}
    (h : ∀ n, G'.Colorable n → G.Colorable n) :
    G.chromaticNumber ≤ G'.chromaticNumber

(h : ∀ (n : ℕ), G'.Colorable n → G.Colorable n)


theorem iUnion_Iic_eq_Iic_iSup {R : Type*} [CompleteLinearOrder R] {f : ι → R}
    (has_greatest_elem : (⨆ i, f i) ∈ range f) : ⋃ i : ι, Iic (f i) = Iic (⨆ i, f i)

(has_greatest_elem : ⨆ i, f i ∈ Set.range f)


@[simp]
theorem pure_def {α} : (pure : α → Finset α) = singleton


@[simp]
theorem val_smul (n : α) : ∀ y : HomogeneousLocalization 𝒜 x, (n • y).val = n • y.val

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
(x : Submonoid A)
{α : Type u_4}
[SMul α R]
[SMul α A]
[IsScalarTower α R A]
[IsScalarTower α A A]
(n : α)
(y : HomogeneousLocalization 𝒜 x)


theorem deriv_rpow_const {x p : ℝ} (h : x ≠ 0 ∨ 1 ≤ p) :
    deriv (fun x : ℝ => x ^ p) x = p * x ^ (p - 1)

deriv (fun x => x ^ p) x = p * x ^ (p - 1)


protected theorem List.norm_prod (l : List α) : ‖l.prod‖ = (l.map norm).prod

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


/-- The scalar multiplication of a constant and a `C^n` on a domain is `C^n`. -/
theorem ContDiffOn.const_smul {s : Set E} {f : E → F} (c : R) (hf : ContDiffOn 𝕜 n f s) :
    ContDiffOn 𝕜 n (fun y => c • f y) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{R : Type u_3}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
{s : Set E}
{f : E → F}
(c : R)
(hf : ContDiffOn 𝕜 n f s)


/-- **Class formula** for a finite group acting on a finite type. -/
@[to_additive "**Class formula** for a finite group acting on a finite type."]
theorem card_eq_sum_card_group_div_card_stabilizer [Fintype α] [Fintype β] [Fintype Ω]
    [∀ b : β, Fintype <| stabilizer α b] :
    Fintype.card β = ∑ ω : Ω, Fintype.card α / Fintype.card (stabilizer α ω.out')

[Fintype (Quotient (MulAction.orbitRel α β))]

[(b : β) → Fintype ↥(MulAction.stabilizer α b)]

Fintype.card β = ∑ ω : Quotient (MulAction.orbitRel α β), Fintype.card α / Fintype.card ↥(MulAction.stabilizer α ω.out')


/-- Let `f : Fin (n + 1) → α` be an `(n + 1)`-tuple `(f₀, …, fₙ)` such that
- `f₀ = ⊥` and `fₙ = ⊤`;
- `fₖ₊₁` weakly covers `fₖ` for all `0 ≤ k < n`;
  this means that `fₖ ≤ fₖ₊₁` and there is no `c` such that `fₖ<c<fₖ₊₁`.
Then the range of `f` is a maximal chain. -/
theorem IsMaxChain.range_fin_of_covBy (h0 : f 0 = ⊥) (hlast : f (.last n) = ⊤)
    (hcovBy : ∀ k : Fin n, f k.castSucc ⩿ f k.succ) :
    IsMaxChain (· ≤ ·) (range f)

(hcovBy : ∀ (k : Fin n), f k.castSucc ⩿ f k.succ)

IsMaxChain (fun x x_1 => x ≤ x_1) (Set.range f)


/-- The canonical isomorphism
`Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b`
when `a + b = n`. -/
@[simps!]
noncomputable def Triangle.shiftFunctorAdd' (a b n : ℤ) (h : a + b = n) :
    Triangle.shiftFunctor C n ≅ Triangle.shiftFunctor C a ⋙ Triangle.shiftFunctor C b

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

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Pretriangulated.Triangle.shiftFunctorAdd' C a b n h).inv.app X).hom₃ =
  (CategoryTheory.shiftFunctorAdd' C a b n h).inv.app X.obj₃


theorem nhds_eq_comap (di : DenseInducing i) : ∀ a : α, 𝓝 a = comap i (𝓝 <| i a)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{i : α → β}
(di : DenseInducing i)
(a : α)


theorem measurableSet_iSup {ι} {m : ι → MeasurableSpace α} {s : Set α} :
    MeasurableSet[iSup m] s ↔ GenerateMeasurable { s : Set α | ∃ i, MeasurableSet[m i] s } s

{α : Type u_1}
{ι : Sort u_7}
{m : ι → MeasurableSpace α}
{s : Set α}

MeasurableSet s ↔ MeasurableSpace.GenerateMeasurable {s | ∃ i, MeasurableSet s} s


@[to_additive]
theorem Submonoid.isClosed_topologicalClosure (s : Submonoid M) :
    IsClosed (s.topologicalClosure : Set M)

{M : Type u_3}
[TopologicalSpace M]
[AddMonoid M]
[ContinuousAdd M]
(s : AddSubmonoid M)


@[to_additive]
theorem Multipliable.compl_add {s : Set β} (hs : Multipliable (f ∘ (↑) : (sᶜ : Set β) → α))
    (hsc : Multipliable (f ∘ (↑) : s → α)) : Multipliable f

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
[ContinuousMul α]
{s : Set β}
(hs : Multipliable (f ∘ Subtype.val))
(hsc : Multipliable (f ∘ Subtype.val))


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

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


theorem trans_right (hab : ReflTransGen r a b) (hbc : TransGen r b c) : TransGen r a c

{α : Type u_1}
{r : α → α → Prop}
{a b c : α}
(hab : Relation.ReflTransGen r a b)
(hbc : Relation.TransGen r b c)


theorem coe_of_h_rat_eq : (↑((of q).h : ℚ) : K) = (of v).h

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
{v : K}
{q : ℚ}
(v_eq_q : v = ↑q)

↑(GenContFract.of q).h = (GenContFract.of v).h


/-- A local homeomorphism is continuous. -/
protected theorem continuous (hf : IsLocalHomeomorph f) : Continuous f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : IsLocalHomeomorph f)


/-- The product of an antitone function and a strictly antitone function is strictly antitone. -/
@[to_additive add_strictAnti "The sum of an antitone function and a strictly antitone function is
strictly antitone."]
theorem Antitone.mul_strictAnti' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : Antitone f)
    (hg : StrictAnti g) :
    StrictAnti fun x => f x * g x

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

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


@[simp] theorem not_liftRel_inr_inl : ¬LiftRel r s (inr b) (inl c)

∀ {α : Type u_1} {γ : Type u_2} {r : α → γ → Prop} {β : Type u_3} {δ : Type u_4} {s : β → δ → Prop} {b : β} {c : γ},
  ¬Sum.LiftRel r s (Sum.inr b) (Sum.inl c)


theorem extend_coord_change_source_mem_nhdsWithin' {x : M} (hxf : x ∈ f.source)
    (hxf' : x ∈ f'.source) :
    ((f.extend I).symm ≫ f'.extend I).source ∈ 𝓝[range I] f.extend I x

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

((f.extend I).symm ≫ f'.extend I).source ∈ 𝓝[Set.range ↑I] ↑(f.extend I) x


/-- For objects `X Y : C`, any natural transformation `α : const X ⟶ const Y` from a connected
category must be constant.
This is the key property of connected categories which we use to establish properties about limits.
-/
theorem nat_trans_from_is_connected [IsPreconnected J] {X Y : C}
    (α : (Functor.const J).obj X ⟶ (Functor.const J).obj Y) :
    ∀ j j' : J, α.app j = (α.app j' : X ⟶ Y)

(α : (CategoryTheory.Functor.const J).obj X ⟶ (CategoryTheory.Functor.const J).obj Y)


theorem orientation_reindex (e : Basis ι R M) (eι : ι ≃ ι') :
    (e.reindex eι).orientation = Orientation.reindex R M eι e.orientation

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_4}
{ι' : Type u_5}
[Fintype ι]
[DecidableEq ι]
[Fintype ι']
[DecidableEq ι']
(e : Basis ι R M)
(eι : ι ≃ ι')

(e.reindex eι).orientation = (Orientation.reindex R M eι) e.orientation


/--
A morphism between open covers `𝓤 ⟶ 𝓥` indicates that `𝓤` is a refinement of `𝓥`.
Since open covers of schemes are indexed, the definition also involves a map on the
indexing types.
-/
structure OpenCover.Hom {X : Scheme.{u}} (𝓤 𝓥 : OpenCover.{v} X) where
  /-- The map on indexing types associated to a morphism of open covers. -/
  idx : 𝓤.J → 𝓥.J
  /-- The morphism between open subsets associated to a morphism of open covers. -/
  app (j : 𝓤.J) : 𝓤.obj j ⟶ 𝓥.obj (idx j)
  isOpen (j : 𝓤.J) : IsOpenImmersion (app j) := by infer_instance
  w (j : 𝓤.J) : app j ≫ 𝓥.map _ = 𝓤.map _ := by aesop_cat

{X : AlgebraicGeometry.Scheme}
{𝓤 𝓥 : X.OpenCover}
(self : 𝓤.Hom 𝓥)
(j : 𝓤.J)


theorem map_le_map_iff_of_injective {S T : L.Substructure M} : S.map f ≤ T.map f ↔ S ≤ T

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

FirstOrder.Language.Substructure.map f S ≤ FirstOrder.Language.Substructure.map f T ↔ S ≤ T


theorem subset_interior_iff_mem_nhdsSet : s ⊆ interior t ↔ t ∈ 𝓝ˢ s

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


theorem get_cyclicPermutations (l : List α) (n : Fin (length (cyclicPermutations l))) :
    (cyclicPermutations l).get n = l.rotate n

{α : Type u}
(l : List α)
(n : Fin l.cyclicPermutations.length)

l.cyclicPermutations.get n = l.rotate ↑n


theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftPPreservation

{n : ℕ}
{F : TypeVec.{u} n → Type u_1}
[q : MvQPF F]


@[to_additive]
theorem UniformCauchySeqOn.div (hf : UniformCauchySeqOn f l s) (hf' : UniformCauchySeqOn f' l s) :
    UniformCauchySeqOn (f / f') l s

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{ι : Type u_3}
{l : Filter ι}
{f f' : ι → β → α}
{s : Set β}
(hf : UniformCauchySeqOn f l s)
(hf' : UniformCauchySeqOn f' l s)


/-- Given a cofork over `∐ I.left ⇉ ∐ I.right`, we may obtain a multicofork. -/
@[simps pt]
noncomputable def ofSigmaCofork (c : Cofork I.fstSigmaMap I.sndSigmaMap) : Multicofork I

(I : CategoryTheory.Limits.MultispanIndex C)

(c : CategoryTheory.Limits.Cofork I.fstSigmaMap I.sndSigmaMap)

(CategoryTheory.Limits.Multicofork.ofSigmaCofork I c).pt = c.pt


protected theorem mul_inv_cancel {x : (Cauchy abv)} : x ≠ 0 → x * x⁻¹ = 1

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[DivisionRing β]
{abv : β → α}
[IsAbsoluteValue abv]
{x : CauSeq.Completion.Cauchy abv}


@[simp]
theorem ofLists_moveRight' {L R : List PGame} (i : (ofLists L R).RightMoves) :
    (ofLists L R).moveRight i = R.get (toOfListsRightMoves.symm i)

(i : (SetTheory.PGame.ofLists L R).RightMoves)

(SetTheory.PGame.ofLists L R).moveRight i = R.get (SetTheory.PGame.toOfListsRightMoves.symm i)


theorem mk'_mul_cancel_right (x : R) (y : M) : mk' S (x * y) y = (algebraMap R S) x

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x : R)
(y : ↥M)

IsLocalization.mk' S (x * ↑y) y = (algebraMap R S) x


protected theorem All.append (hl : l.All p) (hr : r.All p) : (append l r).All p

∀ {α : Type u_1} {l r : Batteries.RBNode α} {p : α → Prop},
  Batteries.RBNode.All p l → Batteries.RBNode.All p r → Batteries.RBNode.All p (l.append r)


theorem LipschitzWith.completion_extension [MetricSpace β] [CompleteSpace β] {f : α → β}
    {K : ℝ≥0} (h : LipschitzWith K f) : LipschitzWith K (Completion.extension f)

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[MetricSpace β]
[CompleteSpace β]
{f : α → β}
{K : ℝ≥0}
(h : LipschitzWith K f)

LipschitzWith K (UniformSpace.Completion.extension f)


protected theorem sub_add_lt_sub (h₁ : m + k ≤ n) (h₂ : 0 < k) : n - (m + k) < n - m

{m k n : Nat}
(h₁ : m + k ≤ n)
(h₂ : 0 < k)


@[to_additive (attr := simp)]
theorem noncommPiCoprod_mulSingle
    {hcomm : Pairwise fun i j : ι => ∀ x y : G, x ∈ H i → y ∈ H j → Commute x y}(i : ι) (y : H i) :
    noncommPiCoprod hcomm (Pi.mulSingle i y) = y

{hcomm : Pairwise fun i j => ∀ (x y : G), x ∈ H i → y ∈ H j → AddCommute x y}

(AddSubgroup.noncommPiCoprod hcomm) (Pi.single i y) = ↑y


theorem SameCycle.eq_of_right (h : SameCycle f x y) (hy : IsFixedPt f y) : x = y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
(h : f.SameCycle x y)
(hy : Function.IsFixedPt (⇑f) y)


/-- A modular lattice is one with a limited associativity between `⊓` and `⊔`. -/
class IsModularLattice (α : Type*) [Lattice α] : Prop where
/-- Whenever `x ≤ z`, then for any `y`, `(x ⊔ y) ⊓ z ≤ x ⊔ (y ⊓ z)`  -/
  sup_inf_le_assoc_of_le : ∀ {x : α} (y : α) {z : α}, x ≤ z → (x ⊔ y) ⊓ z ≤ x ⊔ y ⊓ z

{α : Type u_2}
[Lattice α]
[self : IsModularLattice α]
{x : α}
(y : α)
{z : α}


@[simp] lemma negMulLog_one : negMulLog (1 : ℝ) = 0


theorem birthday_def (x : PGame) :
    birthday x =
      max (lsub.{u, u} fun i => birthday (x.moveLeft i))
        (lsub.{u, u} fun i => birthday (x.moveRight i))

x.birthday = max (Ordinal.lsub fun i => (x.moveLeft i).birthday) (Ordinal.lsub fun i => (x.moveRight i).birthday)


theorem copy_eq (f : M₁ →SL[σ₁₂] M₂) (f' : M₁ → M₂) (h : f' = ⇑f) : f.copy f' h = f

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(f : M₁ →SL[σ₁₂] M₂)
(f' : M₁ → M₂)
(h : f' = ⇑f)


theorem exists_pair_lt (α : Type*) [Nontrivial α] [LinearOrder α] : ∃ x y : α, x < y

(α : Type u_3)
[Nontrivial α]
[LinearOrder α]


@[simp]
theorem iterate_succ (n : ℕ) : f^[n.succ] = f^[n] ∘ f


theorem ofPreimageEquiv_map {α β γ} {f : α → γ} {g : β → γ} (e : ∀ c, f ⁻¹' {c} ≃ g ⁻¹' {c})
    (a : α) : g (ofPreimageEquiv e a) = f a


theorem U_sub_one (n : ℤ) : U R (n - 1) = 2 * X * U R n - U R (n + 1)

Polynomial.Chebyshev.U R (n - 1) = 2 * Polynomial.X * Polynomial.Chebyshev.U R n - Polynomial.Chebyshev.U R (n + 1)


@[simp]
theorem num_one : ((1 : NumDenSameDeg 𝒜 x).num : A) = 1

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[AddCommMonoid ι]
[DecidableEq ι]
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
[GradedAlgebra 𝒜]
(x : Submonoid A)

↑(HomogeneousLocalization.NumDenSameDeg.num 1) = 1


theorem natTrailingDegree_mem_support_of_nonzero : p ≠ 0 → natTrailingDegree p ∈ p.support


/-- This lemma uses `∑ i in` instead of `∑ i :`. -/
theorem gramSchmidt_def (f : ι → E) (n : ι) :
    gramSchmidt 𝕜 f n = f n - ∑ i ∈ Iio n, orthogonalProjection (𝕜 ∙ gramSchmidt 𝕜 f i) (f n)

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_3}
[LinearOrder ι]
[LocallyFiniteOrderBot ι]
[IsWellOrder ι fun x x_1 => x < x_1]
(f : ι → E)
(n : ι)

gramSchmidt 𝕜 f n = f n - ∑ i ∈ Finset.Iio n, ↑((orthogonalProjection (Submodule.span 𝕜 {gramSchmidt 𝕜 f i})) (f n))


theorem card_eq_countP_add_countP (s) : card s = countP p s + countP (fun x => ¬p x) s

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

Multiset.card s = Multiset.countP p s + Multiset.countP (fun x => ¬p x) s


@[simp]
theorem fromBlocks_inj {A : Matrix n l α} {B : Matrix n m α} {C : Matrix o l α} {D : Matrix o m α}
    {A' : Matrix n l α} {B' : Matrix n m α} {C' : Matrix o l α} {D' : Matrix o m α} :
    fromBlocks A B C D = fromBlocks A' B' C' D' ↔ A = A' ∧ B = B' ∧ C = C' ∧ D = D'

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
{A : Matrix n l α}
{B : Matrix n m α}
{C : Matrix o l α}
{D : Matrix o m α}
{A' : Matrix n l α}
{B' : Matrix n m α}
{C' : Matrix o l α}
{D' : Matrix o m α}

Matrix.fromBlocks A B C D = Matrix.fromBlocks A' B' C' D' ↔ A = A' ∧ B = B' ∧ C = C' ∧ D = D'


theorem mem_adjoin_simple_self : α ∈ F⟮α⟯

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


lemma eval₂_eval₂RingHom_apply (f : R →+* S) (x y : S) (p : R[X][Y]) :
    eval₂ (eval₂RingHom f x) y p = (p.map <| mapRingHom f).evalEval x y

{R : Type u_1}
{S : Type u_2}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(x y : S)
(p : R[X][Y])

Polynomial.eval₂ (Polynomial.eval₂RingHom f x) y p =
  Polynomial.evalEval x y (Polynomial.map (Polynomial.mapRingHom f) p)


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

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

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


theorem le_pred_of_lt {a b : α} : a < b → a ≤ pred b

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


theorem Function.Surjective.isEngelian {f : L →ₗ⁅R⁆ L₂} (hf : Function.Surjective f)
    (h : LieAlgebra.IsEngelian.{u₁, u₂, u₄} R L) : LieAlgebra.IsEngelian.{u₁, u₃, u₄} R L₂

{R : Type u₁}
{L : Type u₂}
{L₂ : Type u₃}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L₂]
[LieAlgebra R L₂]
{f : L →ₗ⁅R⁆ L₂}
(hf : Function.Surjective ⇑f)
(h : LieAlgebra.IsEngelian R L)


theorem frequently_lt_of_lt_limsup {α β} [ConditionallyCompleteLinearOrder β] {f : Filter α}
    {u : α → β} {b : β}
    (hu : f.IsCoboundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h : b < limsup u f) : ∃ᶠ x in f, b < u x

(hu : Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)


@[simp]
theorem _root_.MulAut.conjNormal_apply {H : Subgroup G} [H.Normal] (g : G) (h : H) :
    ↑(MulAut.conjNormal g h) = g * h * g⁻¹

{G : Type u_3}
[Group G]
{H : Subgroup G}
[H.Normal]
(g : G)
(h : ↥H)

↑((MulAut.conjNormal g) h) = g * ↑h * g⁻¹


theorem aux_ne_zero (f : (L ≃ₐ[K] L) → Lˣ) : aux f ≠ 0

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
[FiniteDimensional K L]
(f : (L ≃ₐ[K] L) → Lˣ)


private theorem smul_left' (f g : α →₂[μ] E) (r : 𝕜) : ⟪r • f, g⟫ = conj r * inner f g

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_4}
[RCLike 𝕜]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(f g : ↥(MeasureTheory.Lp E 2 μ))
(r : 𝕜)

⟪r • f, g⟫_𝕜 = (starRingEnd 𝕜) r * ⟪f, g⟫_𝕜


/-- A special case for when `a₂` has grade 0. -/
theorem tmul_coe_mul_zero_coe_tmul {j₁ : ι} (a₁ : A) (b₁ : ℬ j₁) (a₂ : 𝒜 0) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) =
      ((a₁ * a₂ : A) ᵍ⊗ₜ (b₁ * b₂ : B))

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
{j₁ : ι}
(a₁ : A)
(b₁ : ↥(ℬ j₁))
(a₂ : ↥(𝒜 0))
(b₂ : B)

a₁ ᵍ⊗ₜ[R] ↑b₁ * ↑a₂ ᵍ⊗ₜ[R] b₂ = (a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)


@[to_additive (attr := simp) add_mem_addCenter]
theorem mul_mem_center {z₁ z₂ : M} (hz₁ : z₁ ∈ Set.center M) (hz₂ : z₂ ∈ Set.center M) :
    z₁ * z₂ ∈ Set.center M

{M : Type u_1}
[Mul M]
{z₁ z₂ : M}
(hz₁ : z₁ ∈ Set.center M)
(hz₂ : z₂ ∈ Set.center M)


/-- The quadratic character is `1` or `-1` on nonzero arguments. -/
theorem quadraticChar_eq_neg_one_iff_not_one {a : F} (ha : a ≠ 0) :
    quadraticChar F a = -1 ↔ ¬quadraticChar F a = 1

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
{a : F}
(ha : a ≠ 0)

(quadraticChar F) a = -1 ↔ ¬(quadraticChar F) a = 1


@[simp]
theorem countP_cons_of_neg {a : α} (s) : ¬p a → countP p (a ::ₘ s) = countP p s

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

¬p a → Multiset.countP p (a ::ₘ s) = Multiset.countP p s


@[to_additive (attr := simp)]
theorem MonoidHom.id_comp [MulOneClass M] [MulOneClass N] (f : M →* N) :
    (MonoidHom.id N).comp f = f

{M : Type u_4}
{N : Type u_5}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)


/-- Composition by continuous linear maps on the left preserves `C^n` functions on domains. -/
theorem ContDiffOn.continuousLinearMap_comp (g : F →L[𝕜] G) (hf : ContDiffOn 𝕜 n f s) :
    ContDiffOn 𝕜 n (g ∘ f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f : E → F}
{n : ℕ∞}
(g : F →L[𝕜] G)
(hf : ContDiffOn 𝕜 n f s)


theorem vecMul_surjective_iff_isUnit {A : Matrix m m R} :
    Function.Surjective A.vecMul ↔ IsUnit A

{m : Type u}
[DecidableEq m]
{R : Type u_2}
[CommRing R]
[Fintype m]
{A : Matrix m m R}

(Function.Surjective fun v => Matrix.vecMul v A) ↔ IsUnit A


theorem IsPrimal.mul {α} [CancelCommMonoidWithZero α] {m n : α}
    (hm : IsPrimal m) (hn : IsPrimal n) : IsPrimal (m * n)

{α : Type u_2}
[CancelCommMonoidWithZero α]
{m n : α}
(hm : IsPrimal m)
(hn : IsPrimal n)


@[to_additive]
theorem finset_prod_singleton {M ι : Type*} [CommMonoid M] (s : Finset ι) (I : ι → M) :
    ∏ i ∈ s, ({I i} : Set M) = {∏ i ∈ s, I i}

{M : Type u_5}
{ι : Type u_6}
[AddCommMonoid M]
(s : Finset ι)
(I : ι → M)


@[reassoc]
lemma restrictionMap_f' {i : ι} {i' : ι'} (hi : e.f i = i') :
    (restrictionMap φ e).f i = (K.restrictionXIso e hi).hom ≫
      φ.f i' ≫ (L.restrictionXIso e hi).inv

(HomologicalComplex.restrictionMap φ e).f i = (K.restrictionXIso e hi).hom ≫ φ.f i' ≫ (L.restrictionXIso e hi).inv


@[simp]
lemma leftUnshift_neg {n' a : ℤ} (γ : Cochain (K⟦a⟧) L n') (n : ℤ) (hn : n + a = n') :
    (-γ).leftUnshift n hn = -γ.leftUnshift n hn

(γ : CochainComplex.HomComplex.Cochain ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj K) L n')


theorem biUnion_le_succ' (u : ℕ → Set α) (n : ℕ) : ⋃ k ≤ n + 1, u k = u 0 ∪ ⋃ k ≤ n, u (k + 1)


theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} :
    p.roots = 0 ↔ p = Polynomial.C (p.coeff 0)

{k : Type u}
[Field k]
[IsAlgClosed k]
{p : k[X]}


@[to_additive]
theorem eq_one_of_mul_right (h : a * b = 1) : a = 1

{α : Type u}
[AddCommMonoid α]
[Subsingleton (AddUnits α)]
{a b : α}
(h : a + b = 0)


theorem add_lt_aleph0_iff {a b : Cardinal} : a + b < ℵ₀ ↔ a < ℵ₀ ∧ b < ℵ₀

a + b < Cardinal.aleph0 ↔ a < Cardinal.aleph0 ∧ b < Cardinal.aleph0


/-- Eigenvalues of a hermitian matrix A are in the ℝ spectrum of A. -/
theorem eigenvalues_mem_spectrum_real (i : n) : hA.eigenvalues i ∈ spectrum ℝ A

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
[DecidableEq n]
(hA : A.IsHermitian)
(i : n)


@[simp]
theorem isUpperSet_preimage_toDual_iff {s : Set αᵒᵈ} : IsUpperSet (toDual ⁻¹' s) ↔ IsLowerSet s

IsUpperSet (⇑OrderDual.toDual ⁻¹' s) ↔ IsLowerSet s


@[simp]
theorem strictMono_comp_ofDual_iff : StrictMono (f ∘ ofDual) ↔ StrictAnti f

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

StrictMono (f ∘ ⇑OrderDual.ofDual) ↔ StrictAnti f


/-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{G : CategoryTheory.Functor D C}
(iso : e.inverse ≅ G)
(X : C)

(e.changeInverse iso).unitIso.hom.app X =
  CategoryTheory.CategoryStruct.comp (e.unitIso.hom.app X) (iso.hom.app (e.functor.obj X))


/-- If `s` and `t` are two fundamental domains of the same action, then their measures are equal. -/
@[to_additive "If `s` and `t` are two fundamental domains of the same action, then their measures
  are equal."]
protected theorem measure_eq (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ) :
    μ s = μ t

[MeasureTheory.SMulInvariantMeasure G α μ]

(hs : MeasureTheory.IsFundamentalDomain G s μ)

(ht : MeasureTheory.IsFundamentalDomain G t μ)


@[simp]
theorem star_add_self (x : R) : IsSelfAdjoint (star x + x)

{R : Type u_1}
[AddCommMonoid R]
[StarAddMonoid R]
(x : R)


theorem isSheafFor_iff_preservesProduct : (ofArrows X c.inj).IsSheafFor F ↔
    Nonempty (PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F)

(F : CategoryTheory.Functor Cᵒᵖ (Type w))

(hF :
  CategoryTheory.Presieve.IsSheafFor F (CategoryTheory.Presieve.ofArrows Empty.elim fun a => instIsEmptyEmpty.elim a))

(hI : CategoryTheory.Limits.IsInitial I)

(hc : CategoryTheory.Limits.IsColimit c)

[∀ (i : α), CategoryTheory.Mono (c.inj i)]

(hd :
  Pairwise fun i j =>
    CategoryTheory.IsPullback (CategoryTheory.Limits.initial.to (X i)) (CategoryTheory.Limits.initial.to (X j))
      (c.inj i) (c.inj j))

CategoryTheory.Presieve.IsSheafFor F (CategoryTheory.Presieve.ofArrows X c.inj) ↔
  Nonempty (CategoryTheory.Limits.PreservesLimit (CategoryTheory.Discrete.functor fun x => Opposite.op (X x)) F)


@[simp]
theorem ofEq_apply {φ' : M → N} (h : φ = φ') (f : X →ₑ[φ] Y) (a : X) :
    (f.ofEq h) a = f a

{M : Type u_2}
{N : Type u_3}
{φ : M → N}
{X : Type u_5}
[SMul M X]
{Y : Type u_6}
[SMul N Y]
{φ' : M → N}
(h : φ = φ')
(f : X →ₑ[φ] Y)
(a : X)


@[simp,nolint simpNF]
theorem SetLike.coe_gMul {S : Type*} [SetLike S R] [Mul R] [Add ι] (A : ι → S)
    [SetLike.GradedMul A] {i j : ι} (x : A i) (y : A j) :
    ↑(@GradedMonoid.GMul.mul _ (fun i => A i) _ _ _ _ x y) = (x * y : R)

{ι : Type u_1}
{R : Type u_2}
{S : Type u_3}
[SetLike S R]
[Mul R]
[Add ι]
(A : ι → S)
[SetLike.GradedMul A]
{i j : ι}
(x : ↥(A i))
(y : ↥(A j))


@[to_additive (attr := measurability)]
protected theorem mul_const [Mul β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ) (c : β) :
    AEStronglyMeasurable (fun x => f x * c) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => f x + c) μ


@[simp]
theorem Differentiable.cos (hc : Differentiable ℝ f) : Differentiable ℝ fun x => Real.cos (f x)

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


@[to_additive (attr := simp) comap_norm_atTop]
lemma comap_norm_atTop' : comap norm atTop = cobounded E

Filter.comap norm Filter.atTop = Bornology.cobounded E


@[to_additive (attr := simp)]
lemma ofHom_apply {X Y : Type u} [CommMonoid X] [CommMonoid Y] (f : X →* Y) (x : X) :
    (ofHom f) x = f x

{X Y : Type u}
[AddCommMonoid X]
[AddCommMonoid Y]
(f : X →+ Y)
(x : X)


theorem prod_unique (f : R →+* S × T) : ((fst S T).comp f).prod ((snd S T).comp f) = f

{R : Type u_3}
{S : Type u_5}
{T : Type u_7}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring T]
(f : R →+* S × T)

((RingHom.fst S T).comp f).prod ((RingHom.snd S T).comp f) = f


@[reassoc (attr := simp)]
theorem pentagon_inv :
    W ◁ (α_ X Y Z).inv ≫ (α_ W (X ⊗ Y) Z).inv ≫ (α_ W X Y).inv ▷ Z =
      (α_ W X (Y ⊗ Z)).inv ≫ (α_ (W ⊗ X) Y Z).inv

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{W X Y Z : C}

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerLeft W (CategoryTheory.MonoidalCategory.associator X Y Z).inv)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.associator W (CategoryTheory.MonoidalCategory.tensorObj X Y) Z).inv
      (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.associator W X Y).inv Z)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.associator W X (CategoryTheory.MonoidalCategory.tensorObj Y Z)).inv
    (CategoryTheory.MonoidalCategory.associator (CategoryTheory.MonoidalCategory.tensorObj W X) Y Z).inv


theorem toNonUnitalRingHom_eq_coe (f : R ≃+* S) : f.toNonUnitalRingHom = ↑f

{R : Type u_4}
{S : Type u_5}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(f : R ≃+* S)


@[simp]
theorem zeta_mul_vonMangoldt : (ζ : ArithmeticFunction ℝ) * Λ = log

↑ArithmeticFunction.zeta * ArithmeticFunction.vonMangoldt = ArithmeticFunction.log


@[to_additive (attr := simp)]
theorem pow_pow (h : Commute a b) (m n : ℕ) : Commute (a ^ m) (b ^ n)

{M : Type u_2}
[AddMonoid M]
{a b : M}
(h : AddCommute a b)
(m n : ℕ)


/-- Auxiliary lemma for `IsCondKernel.apply_of_ne_zero`. -/
private lemma IsCondKernel.apply_of_ne_zero_of_measurableSet [MeasurableSingletonClass α] {x : α}
    (hx : ρ.fst {x} ≠ 0) {s : Set Ω} (hs : MeasurableSet s) :
    ρCond x s = (ρ.fst {x})⁻¹ * ρ ({x} ×ˢ s)

{α : Type u_1}
{Ω : Type u_3}
{mα : MeasurableSpace α}
{mΩ : MeasurableSpace Ω}
(ρ : MeasureTheory.Measure (α × Ω))
[MeasureTheory.IsFiniteMeasure ρ]
(ρCond : ProbabilityTheory.Kernel α Ω)
[ρ.IsCondKernel ρCond]
[MeasurableSingletonClass α]
{x : α}
(hx : ρ.fst {x} ≠ 0)
{s : Set Ω}
(hs : MeasurableSet s)

(ρCond x) s = (ρ.fst {x})⁻¹ * ρ ({x} ×ˢ s)


@[simp] lemma map_apply_of (g : (i : ι) → G i →ₗ[R] G' i)
    (hg : ∀ i j h, g j ∘ₗ f i j h = f' i j h ∘ₗ g i)
    {i : ι} (x : G i) :
    map g hg (of _ _ G f _ x) = of R ι G' f' i (g i x)

{f' : (i j : ι) → i ≤ j → G' i →ₗ[R] G' j}

(hg : ∀ (i j : ι) (h : i ≤ j), g j ∘ₗ f i j h = f' i j h ∘ₗ g i)

(Module.DirectLimit.map g hg) ((Module.DirectLimit.of R ι G f i) x) = (Module.DirectLimit.of R ι G' f' i) ((g i) x)


@[to_additive]
lemma sup_mul (a b c : α) : (a ⊔ b) * c = a * c ⊔ b * c

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


theorem Nonempty.elim_to_inhabited {α : Sort*} [h : Nonempty α] {p : Prop} (f : Inhabited α → p) :
    p

{α : Sort u_3}
[h : Nonempty α]
{p : Prop}
(f : Inhabited α → p)


lemma inverts : W₁.IsInvertedBy (Φ.functor ⋙ L₂)

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)


theorem symm_bijective : Function.Bijective (symm : (A ≃⋆+* B) → B ≃⋆+* A)

{A : Type u_1}
{B : Type u_2}
[Add A]
[Add B]
[Mul A]
[Mul B]
[Star A]
[Star B]


theorem pos_of_gt {M : Type*} [CanonicallyOrderedAddCommMonoid M] {n m : M} (h : n < m) : 0 < m

{M : Type u_1}
[CanonicallyOrderedAddCommMonoid M]
{n m : M}
(h : n < m)


/-- A structure containing informations on the way a space `H` embeds in a
model vector space `E` over the field `𝕜`. This is all what is needed to
define a smooth manifold with model space `H`, and model vector space `E`.
-/
@[ext] -- Porting note(#5171): was nolint has_nonempty_instance
structure ModelWithCorners (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*)
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] (H : Type*) [TopologicalSpace H] extends
    PartialEquiv H E where
  source_eq : source = univ
  unique_diff' : UniqueDiffOn 𝕜 toPartialEquiv.target
  continuous_toFun : Continuous toFun := by continuity
  continuous_invFun : Continuous invFun := by continuity

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


/-- If `L / K` is an integral extension, `K` is a domain, `L` is a field, then any irreducible
polynomial over `L` divides some monic irreducible polynomial over `K`. -/
theorem Irreducible.exists_dvd_monic_irreducible_of_isIntegral {K L : Type*}
    [CommRing K] [IsDomain K] [Field L] [Algebra K L] [Algebra.IsIntegral K L] {f : L[X]}
    (hf : Irreducible f) : ∃ g : K[X], g.Monic ∧ Irreducible g ∧ f ∣ g.map (algebraMap K L)

{K : Type u_1}
{L : Type u_2}
[CommRing K]
[IsDomain K]
[Field L]
[Algebra K L]
[Algebra.IsIntegral K L]
{f : L[X]}
(hf : Irreducible f)

∃ g, g.Monic ∧ Irreducible g ∧ f ∣ Polynomial.map (algebraMap K L) g


/-- The map `pure : α → Ultrafilter α` induces on `α` the discrete topology. -/
theorem induced_topology_pure :
    TopologicalSpace.induced (pure : α → Ultrafilter α) Ultrafilter.topologicalSpace = ⊥

TopologicalSpace.induced pure Ultrafilter.topologicalSpace = ⊥


@[to_additive]
theorem coe_center : ↑(center G) = Set.center G


theorem comap_incl_eq_top : N₂.comap N.incl = ⊤ ↔ N ≤ N₂

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

LieSubmodule.comap N.incl N₂ = ⊤ ↔ N ≤ N₂


@[simp]
theorem quotientEquivOfIsCompl_symm_apply (h : IsCompl p q) (x : q) :
    -- Porting note: type ascriptions needed on the RHS
    (quotientEquivOfIsCompl p q h).symm x = (Quotient.mk (x : E) : E ⧸ p)

{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 : ↥q)

(p.quotientEquivOfIsCompl q h).symm x = Submodule.Quotient.mk ↑x


theorem rel_eq_refl {s : Multiset α} : Rel (· = ·) s s


lemma antivaryOn_iff_forall_mul_nonpos :
    AntivaryOn f g s ↔ ∀ ⦃i⦄, i ∈ s → ∀ ⦃j⦄, j ∈ s → (f j - f i) * (g j - g i) ≤ 0

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{f g : ι → α}
{s : Set ι}

AntivaryOn f g s ↔ ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ s → (f j - f i) * (g j - g i) ≤ 0


@[to_additive (attr := simp)]
theorem prod_map_div : (m.map fun i => f i / g i).prod = (m.map f).prod / (m.map g).prod

{ι : Type u_2}
{α : Type u_3}
[DivisionCommMonoid α]
{m : Multiset ι}
{f g : ι → α}

(Multiset.map (fun i => f i / g i) m).prod = (Multiset.map f m).prod / (Multiset.map g m).prod


theorem continuous_map₂ {δ} [TopologicalSpace δ] {f : α → β → γ} {a : δ → hatα} {b : δ → hatβ}
    (ha : Continuous a) (hb : Continuous b) :
    Continuous fun d : δ => pkg.map₂ pkg' pkg'' f (a d) (b d)

{α : Type u_1}
[UniformSpace α]
(pkg : AbstractCompletion α)
{β : Type u_2}
[UniformSpace β]
(pkg' : AbstractCompletion β)
{γ : Type u_3}
[UniformSpace γ]
(pkg'' : AbstractCompletion γ)
{δ : Type u_4}
[TopologicalSpace δ]
{f : α → β → γ}
{a : δ → pkg.space}
{b : δ → pkg'.space}
(ha : Continuous a)
(hb : Continuous b)

Continuous fun d => pkg.map₂ pkg' pkg'' f (a d) (b d)


/-- A pullback cone on `f` and `g` is determined by morphisms `fst : W ⟶ X` and `snd : W ⟶ Y`
    such that `fst ≫ f = snd ≫ g`. -/
@[simps]
def mk {W : C} (fst : W ⟶ X) (snd : W ⟶ Y) (eq : fst ≫ f = snd ≫ g) : PullbackCone f g

(CategoryTheory.Limits.PullbackCone.mk fst snd eq).π.app j =
  Option.casesOn j (fst ≫ f) fun j' => CategoryTheory.Limits.WalkingPair.casesOn j' fst snd


/-- If `C` is equivalent to `D`, then `C ⥤ E` is equivalent to `D ⥤ E`. -/
@[simps! functor inverse unitIso counitIso]
def congrLeft (e : C ≌ D) : C ⥤ E ≌ D ⥤ E

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

e.congrLeft.counitIso = CategoryTheory.NatIso.ofComponents (fun F => e.invFunIdAssoc F) ⋯


@[simp]
protected lemma comp_neg {n₁ n₂ n₁₂ : ℤ} (z₁ : Cochain F G n₁) (z₂ : Cochain G K n₂)
    (h : n₁ + n₂ = n₁₂) : z₁.comp (-z₂) h = -z₁.comp z₂ h

(z₁ : CochainComplex.HomComplex.Cochain F G n₁)

(z₂ : CochainComplex.HomComplex.Cochain G K n₂)


@[reassoc]
theorem cofan_inj_eq {Δ : SimplexCategoryᵒᵖ} (A : IndexSet Δ) :
    (s.cofan Δ).inj  A = s.ι A.1.unop.len ≫ X.map A.e.op

(A : SimplicialObject.Splitting.IndexSet Δ)

(s.cofan Δ).inj A = s.ι (Opposite.unop A.fst).len ≫ X.map A.e.op


lemma num_inv_of_ne_zero {q : ℚ≥0} (hq : q ≠ 0) : q⁻¹.num = q.den


theorem eventually_inf {f g : Filter α} {p : α → Prop} :
    (∀ᶠ x in f ⊓ g, p x) ↔ ∃ s ∈ f, ∃ t ∈ g, ∀ x ∈ s ∩ t, p x

{α : Type u}
{f g : Filter α}
{p : α → Prop}

(∀ᶠ (x : α) in f ⊓ g, p x) ↔ ∃ s ∈ f, ∃ t ∈ g, ∀ x ∈ s ∩ t, p x


@[to_additive (attr := simp)]
theorem conj_eq_one_iff : a * b * a⁻¹ = 1 ↔ b = 1


@[simp]
theorem sqrt_pos : 0 < √x ↔ 0 < x


@[simp]
theorem rank_eq_one_iff : Module.rank F K = 1 ↔ K = ⊥

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{K : IntermediateField F E}


@[simp]
theorem isLittleO_abs_left : (fun x => |u x|) =o[l] g ↔ u =o[l] g

{α : Type u_1}
{F : Type u_4}
[Norm F]
{g : α → F}
{l : Filter α}
{u : α → ℝ}


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

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


@[to_additive tsum_setProd_singleton_left]
lemma tprod_setProd_singleton_left (b : β) (t : Set γ) (f : β × γ → α) :
    (∏' x : {b} ×ˢ t, f x) = ∏' c : t, f (b, c)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
(b : β)
(t : Set γ)
(f : β × γ → α)

∑' (x : ↑({b} ×ˢ t)), f ↑x = ∑' (c : ↑t), f (b, ↑c)


theorem pointwise_smul_subset_iff {g : G} {S T : ValuationSubring K} : g • S ≤ T ↔ S ≤ g⁻¹ • T

{K : Type u}
[Field K]
{G : Type u_1}
[Group G]
[MulSemiringAction G K]
{g : G}
{S T : ValuationSubring K}

g • S ≤ T ↔ S ≤ g⁻¹ • T


theorem MonovaryOn.comp_right (h : MonovaryOn f g s) (k : ι' → ι) :
    MonovaryOn (f ∘ k) (g ∘ k) (k ⁻¹' s)

{ι : Type u_1}
{ι' : Type u_2}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}
{s : Set ι}
(h : MonovaryOn f g s)
(k : ι' → ι)


@[simp]
theorem lanLiftIsKan_desc [HasLeftKanLift f g] (s : LeftLift f g) :
    (lanLiftIsKan f g).desc s = lanLiftDesc s

(s : CategoryTheory.Bicategory.LeftLift f g)

(CategoryTheory.Bicategory.lanLiftIsKan f g).desc s = CategoryTheory.Bicategory.lanLiftDesc s


@[simp]
lemma mk₀_zero : mk₀ (0 : X ⟶ Y) = 0

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


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

∀ {X₁ X₂ : CategoryTheory.Dial C} (f : X₁ ⟶ X₂) (Y : CategoryTheory.Dial C),
  (CategoryTheory.MonoidalCategory.whiskerRight f Y).f =
    CategoryTheory.Limits.prod.map f.f (CategoryTheory.CategoryStruct.id Y.src)


/-- The equivalence `(Multiplicative ℤ →* α) ≃ α` for any group `α`. -/
@[simps]
def fromMultiplicativeIntEquiv (α : Type u) [Group α] : (Multiplicative ℤ →* α) ≃ α

(α : Type u)
[Group α]
(φ : Multiplicative ℤ →* α)

(MonoidHom.fromMultiplicativeIntEquiv α) φ = φ (Multiplicative.ofAdd 1)


theorem hasBasis_iInf_of_directed {ι : Type*} {ι' : Sort _} [Nonempty ι] {l : ι → Filter α}
    (s : ι → ι' → Set α) (p : ι → ι' → Prop) (hl : ∀ i, (l i).HasBasis (p i) (s i))
    (h : Directed (· ≥ ·) l) :
    (⨅ i, l i).HasBasis (fun ii' : ι × ι' => p ii'.1 ii'.2) fun ii' => s ii'.1 ii'.2

(hl : ∀ (i : ι), (l i).HasBasis (p i) (s i))

(⨅ i, l i).HasBasis (fun ii' => p ii'.1 ii'.2) fun ii' => s ii'.1 ii'.2


theorem mem_target {x : B × F} : x ∈ e.target ↔ x.1 ∈ e.baseSet

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{x : B × F}


/-- The product of a monotone function and a strictly monotone function is strictly monotone. -/
@[to_additive add_strictMono "The sum of a monotone function and a strictly monotone function is
strictly monotone."]
theorem MonotoneOn.mul_strictMono' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : MonotoneOn f s)
    (hg : StrictMonoOn g s) : StrictMonoOn (fun x => f x * g x) s

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

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


@[simp]
protected theorem subsingleton (f : α → E) {s : Set α} (hs : s.Subsingleton) :
    eVariationOn f s = 0

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
{s : Set α}
(hs : s.Subsingleton)


@[simp]
theorem support_finRotate {n : ℕ} : support (finRotate (n + 2)) = Finset.univ

(finRotate (n + 2)).support = Finset.univ


theorem rpow_mul_exp_neg_mul_sq_isLittleO_exp_neg {b : ℝ} (hb : 0 < b) (s : ℝ) :
    (fun x : ℝ => x ^ s * exp (-b * x ^ 2)) =o[atTop] fun x : ℝ => exp (-(1 / 2) * x)

(fun x => x ^ s * rexp (-b * x ^ 2)) =o[Filter.atTop] fun x => rexp (-(1 / 2) * x)


/-- Converse to the mean value inequality: if `f` is line differentiable at `x₀` and `C`-lipschitz
then its line derivative at `x₀` in the direction `v` has norm bounded by `C * ‖v‖`. -/
theorem HasLineDerivAt.le_of_lipschitz
    {f : E → F} {f' : F} {x₀ : E} (hf : HasLineDerivAt 𝕜 f f' x₀ v)
    {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖f'‖ ≤ C * ‖v‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{v : E}
{f : E → F}
{f' : F}
{x₀ : E}
(hf : HasLineDerivAt 𝕜 f f' x₀ v)
{C : ℝ≥0}
(hlip : LipschitzWith C f)

‖f'‖ ≤ ↑C * ‖v‖


lemma IsAntichain.of_monotoneOn_strictAntiOn (hf : MonotoneOn f s) (hf' : StrictAntiOn f s) :
    IsAntichain (· ≤ ·) s

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


/-- (Impl) Prove that the lifted cone is limiting. -/
@[simps]
def liftedConeIsLimit : IsLimit (liftedCone c t)

{D : CategoryTheory.Functor J T.Coalgebra}

(c : CategoryTheory.Limits.Cone (D.comp T.forget))

[CategoryTheory.Limits.PreservesLimit (D.comp T.forget) T.toFunctor]

[CategoryTheory.Limits.PreservesLimit ((D.comp T.forget).comp T.toFunctor) T.toFunctor]

((CategoryTheory.Comonad.ForgetCreatesLimits'.liftedConeIsLimit c t).lift s).f = t.lift (T.forget.mapCone s)


theorem aecover_Ioc [NoMinOrder α] : AECover μ l fun i => Ioc (a i) (b i)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[OpensMeasurableSpace α]
{a b : ι → α}
(ha : Filter.Tendsto a l Filter.atBot)
(hb : Filter.Tendsto b l Filter.atTop)
[NoMinOrder α]

MeasureTheory.AECover μ l fun i => Set.Ioc (a i) (b i)


/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.

This version provides an upper estimate that decreases both in `‖y‖` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ℝ≥0}
    (hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ℝ≥0∞) < r) :
    ∃ a ∈ Ioo (0 : ℝ) 1, ∃ C > 0, ∀ y ∈ Metric.ball (0 : E) r', ∀ n,
      ‖f (x + y) - p.partialSum n y‖ ≤ C * (a * (‖y‖ / r')) ^ n

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{x : E}
{r : ℝ≥0∞}
{r' : ℝ≥0}
(hf : HasFPowerSeriesOnBall f p x r)
(h : ↑r' < r)

∃ a ∈ Set.Ioo 0 1,
  ∃ C > 0, ∀ y ∈ Metric.ball 0 ↑r', ∀ (n : ℕ), ‖f (x + y) - p.partialSum n y‖ ≤ C * (a * (‖y‖ / ↑r')) ^ n


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


theorem monotone_upper : Monotone fun I : Box ι ↦ I.upper


@[ext]
theorem hom_ext {W : C} (i j : multicoequalizer I ⟶ W)
    (h : ∀ b, Multicoequalizer.π I b ≫ i = Multicoequalizer.π I b ≫ j) : i = j

(I : CategoryTheory.Limits.MultispanIndex C)

(i j : CategoryTheory.Limits.multicoequalizer I ⟶ W)

(h :
  ∀ (b : I.R),
    CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Multicoequalizer.π I b) i =
      CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Multicoequalizer.π I b) j)


theorem iInf_split_single (f : β → α) (i₀ : β) : ⨅ i, f i = f i₀ ⊓ ⨅ (i) (_ : i ≠ i₀), f i

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
(f : β → α)
(i₀ : β)

⨅ i, f i = f i₀ ⊓ ⨅ i, ⨅ (_ : i ≠ i₀), f i


theorem eq_symm_apply (h : α ≃ᵢ β) {x : α} {y : β} : x = h.symm y ↔ h x = y

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


@[to_additive (attr := simp)]
theorem snd_inv [Inv G] [Inv H] (p : G × H) : p⁻¹.2 = p.2⁻¹

{G : Type u_3}
{H : Type u_4}
[Inv G]
[Inv H]
(p : G × H)


theorem bind_hcongr {β' : Type v} {m : Multiset α} {f : α → Multiset β} {f' : α → Multiset β'}
    (h : β = β') (hf : ∀ a ∈ m, HEq (f a) (f' a)) : HEq (bind m f) (bind m f')

{α : Type u_1}
{β β' : Type v}
{m : Multiset α}
{f : α → Multiset β}
{f' : α → Multiset β'}
(h : β = β')
(hf : ∀ a ∈ m, HEq (f a) (f' a))


theorem singleton_product_singleton {a : α} {b : β} :
    ({a} ×ˢ {b} : Finset _) = {(a, b)}

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}


/-- A vector is in `(𝕜 ∙ u)ᗮ` iff it is orthogonal to `u`. -/
theorem mem_orthogonal_singleton_iff_inner_right {u v : E} : v ∈ (𝕜 ∙ u)ᗮ ↔ ⟪u, v⟫ = 0

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

v ∈ (Submodule.span 𝕜 {u})ᗮ ↔ ⟪u, v⟫_𝕜 = 0


@[aesop safe apply (rule_sets := [SetLike])]
theorem _root_.algebraMap_mem {S R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]
    [SetLike S A] [OneMemClass S A] [SMulMemClass S R A] (s : S) (r : R) :
    algebraMap R A r ∈ s

{S : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[SetLike S A]
[OneMemClass S A]
[SMulMemClass S R A]
(s : S)
(r : R)


@[simp]
theorem toFinset_cons : toFinset (a :: l) = insert a (toFinset l)

{α : Type u_1}
[DecidableEq α]
{l : List α}
{a : α}


@[to_additive (attr := simp)]
theorem swap_mem_mulAntidiagonal_aux [CommSemigroup α] {s t : Set α} {a : α} {x : α × α} :
    x.snd ∈ s ∧ x.fst ∈ t ∧ x.snd * x.fst = a
      ↔ x ∈ Set.mulAntidiagonal t s a

{α : Type u_1}
[CommSemigroup α]
{s t : Set α}
{a : α}
{x : α × α}

x.2 ∈ s ∧ x.1 ∈ t ∧ x.2 * x.1 = a ↔ x ∈ t.mulAntidiagonal s a


/--
`mapCone` commutes with `postcompose`. In particular, for `F : J ⥤ C`, given a cone `c : Cone F`, a
natural transformation `α : F ⟶ G` and a functor `H : C ⥤ D`, we have two obvious ways of producing
a cone over `G ⋙ H`, and they are both isomorphic.
-/
@[simps!]
def mapConePostcompose {α : F ⟶ G} {c} :
    mapCone H ((Cones.postcompose α).obj c) ≅
      (Cones.postcompose (whiskerRight α H : _)).obj (mapCone H c)

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

H.mapConePostcompose.inv.hom = 𝟙 (H.obj c.pt)


theorem hasTerminal_of_equivalence (e : D ⥤ C) [e.IsEquivalence] [HasTerminal C] : HasTerminal D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : D ⥤ C)
[e.IsEquivalence]
[CategoryTheory.Limits.HasTerminal C]


theorem ext {z w : K} (hre : re z = re w) (him : im z = im w) : z = w

{K : Type u_1}
[RCLike K]
{z w : K}
(hre : RCLike.re z = RCLike.re w)
(him : RCLike.im z = RCLike.im w)


lemma pow_dvd_pow_of_add_pow_eq_zero (hp : n + m ≤ p + 1) (h_comm : Commute x y)
    (h : (x + y) ^ n = 0) : x ^ m ∣ y ^ p

{R : Type u_1}
{x y : R}
{n m p : ℕ}
[Ring R]
(hp : n + m ≤ p + 1)
(h_comm : Commute x y)
(h : (x + y) ^ n = 0)


theorem isEmpty_iff : IsEmpty α ↔ α → False


@[to_additive]
theorem inv_lt_iff_one_lt_mul' : a⁻¹ < b ↔ 1 < a * b

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


protected theorem of_le_add {f : α → ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + dist x y) :
    LipschitzOnWith 1 f s


/-- The composition of `diracProbaEquiv.symm` and `diracProba` is the subtype inclusion. -/
lemma diracProba_comp_diracProbaEquiv_symm_eq_val [T0Space X] :
    diracProba ∘ (diracProbaEquiv (X := X)).symm = fun μ ↦ μ.val

{X : Type u_1}
[MeasurableSpace X]
[TopologicalSpace X]
[OpensMeasurableSpace X]
[T0Space X]

MeasureTheory.diracProba ∘ ⇑MeasureTheory.diracProbaEquiv.symm = fun μ => ↑μ


lemma differentiable_at_Gamma_nat_add_one (n : ℕ) :
    DifferentiableAt ℂ Gamma (n + 1)

DifferentiableAt ℂ Complex.Gamma (↑n + 1)


/-- A subtype `{x // p x}` can be injectively sent to into a subtype `{x // q x}`,
if `p x → q x` for all `x : α`. -/
@[simps]
def Subtype.impEmbedding (p q : α → Prop) (h : ∀ x, p x → q x) : { x // p x } ↪ { x // q x }

{α : Type u_1}
(p q : α → Prop)
(h : ∀ (x : α), p x → q x)
(x : { x // p x })


theorem Equivalence.hasInitial_iff (e : C ≌ D) : HasInitial C ↔ HasInitial D

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

CategoryTheory.Limits.HasInitial C ↔ CategoryTheory.Limits.HasInitial D


/-- If `x ^ n = 1`, then `x ^ m` is the same as `x ^ (m % n)` -/
@[to_additive nsmul_eq_mod_nsmul "If `n • x = 0`, then `m • x` is the same as `(m % n) • x`"]
lemma pow_eq_pow_mod (m : ℕ) (ha : a ^ n = 1) : a ^ m = a ^ (m % n)

{M : Type u_4}
[Monoid M]
{a : M}
{n : ℕ}
(m : ℕ)
(ha : a ^ n = 1)


@[simp]
theorem count_roots [DecidableEq R] (p : R[X]) : p.roots.count a = rootMultiplicity a p

{R : Type u}
{a : R}
[CommRing R]
[IsDomain R]
[DecidableEq R]
(p : Polynomial R)

Multiset.count a p.roots = Polynomial.rootMultiplicity a p


theorem one_le_val_iff (v : Valuation K Γ₀) {x : K} (h : x ≠ 0) : 1 ≤ v x ↔ v x⁻¹ ≤ 1

{K : Type u_1}
[DivisionRing K]
{Γ₀ : Type u_4}
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation K Γ₀)
{x : K}
(h : x ≠ 0)


/-- Note: the assumption `hs` cannot be dropped. For a counterexample, see
  Walter Rudin *Real and Complex Analysis*, example (c) in section 8.9. -/
theorem measure_prod_null {s : Set (α × β)} (hs : MeasurableSet s) :
    μ.prod ν s = 0 ↔ (fun x => ν (Prod.mk x ⁻¹' s)) =ᵐ[μ] 0

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{s : Set (α × β)}
(hs : MeasurableSet s)

(μ.prod ν) s = 0 ↔ (fun x => ν (Prod.mk x ⁻¹' s)) =ᵐ[μ] 0


theorem div_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) (z : ℝ) : (x / y) ^ z = x ^ z / y ^ z


@[to_additive]
theorem comp_closedEmbedding (hf : HasCompactMulSupport f) {g : α' → α}
    (hg : ClosedEmbedding g) : HasCompactMulSupport (f ∘ g)

{α : Type u_2}
{α' : Type u_3}
{β : Type u_4}
[TopologicalSpace α]
[TopologicalSpace α']
[One β]
{f : α → β}
(hf : HasCompactMulSupport f)
{g : α' → α}
(hg : ClosedEmbedding g)


lemma compProd_of_not_sfinite (μ : Measure α) (κ : Kernel α β) (h : ¬ SFinite μ) :
    μ ⊗ₘ κ = 0

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(μ : MeasureTheory.Measure α)
(κ : ProbabilityTheory.Kernel α β)
(h : ¬MeasureTheory.SFinite μ)


@[simp]
theorem fdifferential_comp (g : C^∞⟮I', M'; I'', M''⟯) (f : C^∞⟮I, M; I', M'⟯) (x : M) :
    𝒅 (g.comp f) x = (𝒅 g (f x)).comp (𝒅 f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
(g : C^⊤⟮I', M'; I'', M''⟯)
(f : C^⊤⟮I, M; I', M'⟯)
(x : M)


@[simp, norm_cast]
theorem coe_update [DecidableEq α] : (f.update a b : α → M) = Function.update f a b

{α : Type u_1}
{M : Type u_5}
[Zero M]
(f : α →₀ M)
(a : α)
(b : M)
[DecidableEq α]

⇑(f.update a b) = Function.update (⇑f) a b


/-- Eigenvectors corresponding to distinct eigenvalues of a linear operator are linearly
    independent. (Lemma 5.10 of [axler2015])

    We use the eigenvalues as indexing set to ensure that there is only one eigenvector for each
    eigenvalue in the image of `xs`. -/
theorem eigenvectors_linearIndependent [NoZeroSMulDivisors R M]
    (f : End R M) (μs : Set R) (xs : μs → M)
    (h_eigenvec : ∀ μ : μs, f.HasEigenvector μ (xs μ)) : LinearIndependent R xs

(h_eigenvec : ∀ (μ : ↑μs), f.HasEigenvector (↑μ) (xs μ))


@[to_additive]
theorem lt_div_iff_mul_lt : a < c / b ↔ a * b < c

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


theorem ext_iff {f g : L₁ →ₗ⁅R⁆ L₂} : f = g ↔ ∀ x, f x = g x

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
[LieRing L₂]
[LieAlgebra R L₂]
{f g : L₁ →ₗ⁅R⁆ L₂}


theorem Dense.exists_mem_open (hs : Dense s) {U : Set X} (ho : IsOpen U)
    (hne : U.Nonempty) : ∃ x ∈ s, x ∈ U

{X : Type u}
{s : Set X}
[TopologicalSpace X]
(hs : Dense s)
{U : Set X}
(ho : IsOpen U)
(hne : U.Nonempty)


theorem IsSelfAdjoint.nnnorm_pow_two_pow [NormedRing E] [StarRing E] [CstarRing E] {x : E}
    (hx : IsSelfAdjoint x) (n : ℕ) : ‖x ^ 2 ^ n‖₊ = ‖x‖₊ ^ 2 ^ n

{E : Type u_2}
[NormedRing E]
[StarRing E]
[CstarRing E]
{x : E}
(hx : IsSelfAdjoint x)
(n : ℕ)


theorem wSameSide_vadd_left_iff {s : AffineSubspace R P} {x y : P} {v : V} (hv : v ∈ s.direction) :
    s.WSameSide (v +ᵥ x) y ↔ s.WSameSide x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
{v : V}
(hv : v ∈ s.direction)


theorem degree_gcd_le_right (p) {q : R[X]} (hq : q ≠ 0) : (gcd p q).degree ≤ q.degree

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
(p : Polynomial R)
{q : Polynomial R}
(hq : q ≠ 0)