lemma mem_closedBall_iff {x y: X} {r : ℝ} :
    y ∈ closedBall x r ↔ x ∈ closedBall y r

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

y ∈ Metric.closedBall x r ↔ x ∈ Metric.closedBall y r


theorem FiniteDimensional.of_rank_eq_zero (h : Module.rank K V = 0) : FiniteDimensional K V

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(h : Module.rank K V = 0)


theorem nfp_lt_ord {f : Ordinal → Ordinal} {c} (hc : ℵ₀ < cof c) (hf : ∀ i < c, f i < c) {a} :
    a < c → nfp f a < c

{f : Ordinal.{u_2} → Ordinal.{u_2}}
{c : Ordinal.{u_2}}
(hc : ℵ₀ < c.cof)
(hf : ∀ i < c, f i < c)
{a : Ordinal.{u_2}}


/-- If `K` is a field with `F ⊆ K` and `S ⊆ K` then `adjoin F S ≤ K`. -/
theorem adjoin_le_subfield {K : Subfield E} (HF : Set.range (algebraMap F E) ⊆ K) (HS : S ⊆ K) :
    (adjoin F S).toSubfield ≤ K

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(S : Set E)
{K : Subfield E}
(HF : Set.range ⇑(algebraMap F E) ⊆ ↑K)
(HS : S ⊆ ↑K)

(IntermediateField.adjoin F S).toSubfield ≤ K


@[to_additive (attr := simp)]
lemma stabilizer_univ : stabilizer G (Set.univ : Set α) = ⊤

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]


theorem monotone_projIci : Monotone (projIci a)


theorem le_map_iff {f : Filter α} {m : α → β} {g : Filter β} : g ≤ f.map m ↔ ∀ s ∈ f, m '' s ∈ g

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

g ≤ Filter.map m f ↔ ∀ s ∈ f, m '' s ∈ g


/-- Equivalences between finite types are the same as isomorphisms in `FintypeCat`. -/
@[simps]
def equivEquivIso {A B : FintypeCat} : A ≃ B ≃ (A ≅ B)

{A B : FintypeCat}
(e : ↑A ≃ ↑B)
(a : ↑B)

(FintypeCat.equivEquivIso e).inv a = e.symm a


theorem expand_pow (f : R[X]) : expand R (p ^ q) f = (expand R p)^[q] f

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

(Polynomial.expand R (p ^ q)) f = (⇑(Polynomial.expand R p))^[q] f


@[simp]
lemma comp_zero_cochain_v (z₁ : Cochain F G n) (z₂ : Cochain G K 0) (p q : ℤ) (hpq : p + n = q) :
    (z₁.comp z₂ (add_zero n)).v p q hpq = z₁.v p q hpq ≫ z₂.v q q (add_zero q)

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

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

(z₁.comp z₂ ⋯).v p q hpq = z₁.v p q hpq ≫ z₂.v q q ⋯


/-- If an element `a` divides another element `b` in a ring, `a` divides the difference of `b` and
another element `c` iff `a` divides `c`. -/
theorem dvd_sub_right (h : a ∣ b) : a ∣ b - c ↔ a ∣ c

{α : Type u_1}
[NonUnitalRing α]
{a b c : α}
(h : a ∣ b)


theorem preimage_iUnionLift (t : Set β) :
    iUnionLift S f hf T hT ⁻¹' t =
      inclusion hT ⁻¹' (⋃ i, inclusion (subset_iUnion S i) '' (f i ⁻¹' t))

{hf : ∀ (i j : ι) (x : α) (hxi : x ∈ S i) (hxj : x ∈ S j), f i ⟨x, hxi⟩ = f j ⟨x, hxj⟩}

Set.iUnionLift S f hf T hT ⁻¹' t = Set.inclusion hT ⁻¹' ⋃ i, Set.inclusion ⋯ '' (f i ⁻¹' t)


@[simp]
theorem zero_eq_dist {x y : γ} : 0 = dist x y ↔ x = y


lemma smul_fin3_ext (P : Fin 3 → R) (u : R) :
    (u • P) x = u ^ 2 * P x ∧ (u • P) y = u ^ 3 * P y ∧ (u • P) z = u * P z

{R : Type u}
[CommRing R]
(P : Fin 3 → R)
(u : R)


theorem ContDiffWithinAt.csinh {n} (hf : ContDiffWithinAt ℂ n f s x) :
    ContDiffWithinAt ℂ n (fun x => Complex.sinh (f x)) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{x : E}
{s : Set E}
{n : ℕ∞}
(hf : ContDiffWithinAt ℂ n f s x)


/-- The bijection of `Fork.IsLimit.homIso` is natural in `Z`. -/
theorem Fork.IsLimit.homIso_natural {X Y : C} {f g : X ⟶ Y} {t : Fork f g} (ht : IsLimit t)
    {Z Z' : C} (q : Z' ⟶ Z) (k : Z ⟶ t.pt) :
    (Fork.IsLimit.homIso ht _ (q ≫ k) : Z' ⟶ X) = q ≫ (Fork.IsLimit.homIso ht _ k : Z ⟶ X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f g : X ⟶ Y}
{t : CategoryTheory.Limits.Fork f g}
(ht : CategoryTheory.Limits.IsLimit t)
{Z Z' : C}
(q : Z' ⟶ Z)
(k : Z ⟶ t.pt)

↑((CategoryTheory.Limits.Fork.IsLimit.homIso ht Z') (CategoryTheory.CategoryStruct.comp q k)) =
  CategoryTheory.CategoryStruct.comp q ↑((CategoryTheory.Limits.Fork.IsLimit.homIso ht Z) k)


theorem univ_prod {t : Set β} : (univ : Set α) ×ˢ t = Prod.snd ⁻¹' t

{α : Type u_1}
{β : Type u_2}
{t : Set β}


theorem Right.neg_of_mul_neg_left [MulPosMono α] (h : a * b < 0) (b0 : 0 ≤ b) : a < 0

{α : Type u_1}
{a b : α}
[MulZeroClass α]
[LinearOrder α]
[MulPosMono α]
(h : a * b < 0)
(b0 : 0 ≤ b)


theorem eq_zero (hx : ¬IsIntegral A x) : minpoly A x = 0

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[Ring B]
[Algebra A B]
{x : B}
(hx : ¬IsIntegral A x)


theorem HasDerivWithinAt.log (hf : HasDerivWithinAt f f' s x) (hx : f x ≠ 0) :
    HasDerivWithinAt (fun y => log (f y)) (f' / f x) s x

{f : ℝ → ℝ}
{x f' : ℝ}
{s : Set ℝ}
(hf : HasDerivWithinAt f f' s x)
(hx : f x ≠ 0)

HasDerivWithinAt (fun y => Real.log (f y)) (f' / f x) s x


/-- `Equiv.Perm.subtypeCongr` as a `MonoidHom`. -/
@[simps]
def subtypeCongrHom (p : α → Prop) [DecidablePred p] :
    Perm { a // p a } × Perm { a // ¬p a } →* Perm α

(pair : Equiv.Perm { a // p a } × Equiv.Perm { a // ¬p a })

(Equiv.Perm.subtypeCongrHom p) pair = pair.1.subtypeCongr pair.2


@[to_additive sum_mono_set_of_nonneg]
theorem prod_mono_set_of_one_le' (hf : ∀ x, 1 ≤ f x) : Monotone fun s ↦ ∏ x ∈ s, f x

{ι : Type u_1}
{N : Type u_5}
[OrderedAddCommMonoid N]
{f : ι → N}
(hf : ∀ (x : ι), 0 ≤ f x)


/-- **Krull's theorem**: if `I` is an ideal that is not the whole ring, then it is included in some
    maximal ideal. -/
theorem exists_le_maximal (I : Ideal α) (hI : I ≠ ⊤) : ∃ M : Ideal α, M.IsMaximal ∧ I ≤ M

{α : Type u}
[Semiring α]
(I : Ideal α)
(hI : I ≠ ⊤)


@[simp]
theorem map₂_bot_right (f : M →ₗ[R] N →ₗ[R] P) (p : Submodule R M) : map₂ f p ⊥ = ⊥

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : M →ₗ[R] N →ₗ[R] P)
(p : Submodule R M)


theorem dif_pos {c : Prop} {h : Decidable c} (hc : c) {α : Sort u} {t : c → α} {e : ¬ c → α} : (dite c t e) = t hc

{c : Prop}
{h : Decidable c}
(hc : c)
{α : Sort u}
{t : c → α}
{e : ¬c → α}


@[to_additive (attr := simp)] lemma antivary_inv_right : Antivary f g⁻¹ ↔ Monovary f g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[OrderedCommGroup β]
{f : ι → α}
{g : ι → β}


@[simp]
theorem ofList_cons (a : α) (l) : ofList (a::l) = cons a (ofList l)


theorem Function.monotone_eval {ι : Type u} {α : ι → Type v} [∀ i, Preorder (α i)] (i : ι) :
    Monotone (Function.eval i : (∀ i, α i) → α i)

{ι : Type u}
{α : ι → Type v}
[(i : ι) → Preorder (α i)]
(i : ι)


theorem mem_source : x ∈ e.source ↔ proj x ∈ 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 : Z}


@[simp]
theorem dirac_apply_of_mem {a : α} (h : a ∈ s) : dirac a s = 1

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
{a : α}
(h : a ∈ s)


theorem linearMapAt_def_of_not_mem (e : Pretrivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∉ e.baseSet) : e.linearMapAt R b = 0

(e : Pretrivialization F Bundle.TotalSpace.proj)


/-- The angle at a point is at most π. -/
nonrec theorem angle_le_pi (p1 p2 p3 : P) : ∠ p1 p2 p3 ≤ π

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(p1 p2 p3 : P)


@[simp]
theorem mapIso_trans (F : C ⥤ D) {X Y Z : C} (i : X ≅ Y) (j : Y ≅ Z) :
    F.mapIso (i ≪≫ j) = F.mapIso i ≪≫ F.mapIso j

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X Y Z : C}
(i : X ≅ Y)
(j : Y ≅ Z)


@[local simp] theorem neg_ofNat_succ (n : Nat) : -(succ n : Int) = -[n+1]


theorem gcd_assoc [NormalizedGCDMonoid α] (m n k : α) : gcd (gcd m n) k = gcd m (gcd n k)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(m n k : α)


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

QuotientGroup.homQuotientZPowOfHom (MonoidHom.id A) n = MonoidHom.id (A ⧸ (zpowGroupHom n).range)


theorem cast_mul [Ring α] (m n) : ((m * n : ZNum) : α) = m * n


theorem zipWith_append (f : α → β → γ) (l la : List α) (l' lb : List β)
    (h : l.length = l'.length) :
    zipWith f (l ++ la) (l' ++ lb) = zipWith f l l' ++ zipWith f la lb

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β → γ)
(l la : List α)
(l' lb : List β)
(h : l.length = l'.length)

List.zipWith f (l ++ la) (l' ++ lb) = List.zipWith f l l' ++ List.zipWith f la lb


theorem mapAccumr₂_flip (f : α → β → σ → σ × γ) :
    mapAccumr₂ f xs ys s = mapAccumr₂ (flip f) ys xs s

{α : Type}
{n : ℕ}
{β : Type}
(xs : Mathlib.Vector α n)
(ys : Mathlib.Vector β n)
{σ γ : Type}
{s : σ}
(f : α → β → σ → σ × γ)

Mathlib.Vector.mapAccumr₂ f xs ys s = Mathlib.Vector.mapAccumr₂ (flip f) ys xs s


lemma Exact.mono_g (hS : S.Exact) (hf : S.f = 0) : Mono S.g

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


theorem id_app (F : Sheaf C X) (t) : (𝟙 F : F ⟶ F).1.app t = 𝟙 _

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(X : TopCat)
(F : TopCat.Sheaf C X)
(t : (TopologicalSpace.Opens ↑X)ᵒᵖ)


theorem add_coeff (x y : 𝕎 R) (n : ℕ) :
    (x + y).coeff n = peval (wittAdd p n) ![x.coeff, y.coeff]

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

(x + y).coeff n = WittVector.peval (WittVector.wittAdd p n) ![x.coeff, y.coeff]


theorem isoExt_inv_m : (isoExt hF hF').inv ≫ F.m = F'.m

{F F' : CategoryTheory.Limits.MonoFactorisation f}

(hF' : CategoryTheory.Limits.IsImage F')


theorem eq {p : M} (h : IsIdempotentElem p) : p * p = p

{M : Type u_1}
[Mul M]
{p : M}
(h : IsIdempotentElem p)


theorem mem_filter_iff (B : FilterBasis α) {U : Set α} : U ∈ B.filter ↔ ∃ s ∈ B, s ⊆ U

{α : Type u_1}
(B : FilterBasis α)
{U : Set α}


theorem GammaAux_recurrence1 (s : ℂ) (n : ℕ) (h1 : -s.re < ↑n) :
    GammaAux n s = GammaAux n (s + 1) / s

Complex.GammaAux n s = Complex.GammaAux n (s + 1) / s


theorem list_succ (n) : list (n+1) = 0 :: (list n).map Fin.succ

Fin.list (n + 1) = 0 :: List.map Fin.succ (Fin.list n)


/-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`y ∈ S`, `(f y)⁻¹` is unique. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `y ∈ S`, `- (f y)` is unique."]
theorem inv_unique {f : M →* N} (h : ∀ y : S, IsUnit (f y)) {y : S} {z : N} (H : f y * z = 1) :
    (IsUnit.liftRight (f.restrict S) h y)⁻¹ = z

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{f : M →+ N}
(h : ∀ (y : ↥S), IsAddUnit (f ↑y))
{y : ↥S}
{z : N}
(H : f ↑y + z = 0)

↑(-(IsAddUnit.liftRight (f.restrict S) h) y) = z


theorem X_pow_card_sub_X_ne_zero (hp : 1 < p) : (X ^ p - X : K'[X]) ≠ 0

(K' : Type u_3)
[Field K']
{p : ℕ}
(hp : 1 < p)


/-- The proposition that a morphism `φ : a ⟶ b` in `𝒳` lying over `f : R ⟶ S` in `𝒮` is a
strongly cartesian morphism.

See <https://stacks.math.columbia.edu/tag/02XK> -/
class IsStronglyCartesian extends IsHomLift p f φ : Prop where
  universal_property' {a' : 𝒳} (g : p.obj a' ⟶ R) (φ' : a' ⟶ b) [IsHomLift p (g ≫ f) φ'] :
      ∃! χ : a' ⟶ a, IsHomLift p g χ ∧ χ ≫ φ = φ'

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
[CategoryTheory.Category.{v₂, u₂} 𝒳]
{p : 𝒳 ⥤ 𝒮}
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
{φ : a ⟶ b}
[self : p.IsStronglyCartesian f φ]
{a' : 𝒳}
(g : p.obj a' ⟶ R)
(φ' : a' ⟶ b)
[p.IsHomLift (g ≫ f) φ']


@[simp]
theorem decompose_add (x y : M) : decompose ℳ (x + y) = decompose ℳ x + decompose ℳ y

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
(x y : M)

(DirectSum.decompose ℳ) (x + y) = (DirectSum.decompose ℳ) x + (DirectSum.decompose ℳ) y


lemma Infinite.exists_not_mem_finset (hs : s.Infinite) (t : Finset α) : ∃ a ∈ s, a ∉ t

{α : Type u}
{s : Set α}
(hs : s.Infinite)
(t : Finset α)


lemma IsUpperSet.isLowerSet_preimage_coe (hs : IsUpperSet s) :
    IsLowerSet ((↑) ⁻¹' t : Set s) ↔ ∀ b ∈ s, ∀ c ∈ t, b ≤ c → b ∈ t

{α : Type u_1}
[LE α]
{s t : Set α}
(hs : IsUpperSet s)

IsLowerSet (Subtype.val ⁻¹' t) ↔ ∀ b ∈ s, ∀ c ∈ t, b ≤ c → b ∈ t


@[to_additive]
theorem smul_inter_subset : s • (t₁ ∩ t₂) ⊆ s • t₁ ∩ s • t₂

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

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


@[simp]
theorem rightAngleRotation_trans_neg_orientation :
    (-o).rightAngleRotation = o.rightAngleRotation.trans (LinearIsometryEquiv.neg ℝ)

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


/-- Pushforward a `RightDistribClass` instance along a surjective function. -/
theorem rightDistribClass [Mul α] [Add α] [RightDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
    (mul : ∀ x y, f (x * y) = f x * f y) : RightDistribClass β

(add : ∀ (x y : α), f (x + y) = f x + f y)

(mul : ∀ (x y : α), f (x * y) = f x * f y)


theorem smoothOn_smoothCoordChange (he : e ∈ a.pretrivializationAtlas)
    (he' : e' ∈ a.pretrivializationAtlas) :
    SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (a.smoothCoordChange IB he he') (e.baseSet ∩ e'.baseSet)

{e e' : Pretrivialization F Bundle.TotalSpace.proj}

SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (VectorPrebundle.smoothCoordChange IB a he he') (e.baseSet ∩ e'.baseSet)


theorem pow_def {N : Type*} [Pow β N] (n : N) (x : α) :
    letI := e.pow N
    x ^ n = e.symm (e x ^ n)

{α : Type u}
{β : Type v}
(e : α ≃ β)
{N : Type u_1}
[Pow β N]
(n : N)
(x : α)


@[reassoc (attr := simp)]
lemma leftDerivedZeroIsoSelf_hom_inv_id :
    F.fromLeftDerivedZero ≫ F.leftDerivedZeroIsoSelf.inv = 𝟙 _

CategoryTheory.CategoryStruct.comp F.fromLeftDerivedZero F.leftDerivedZeroIsoSelf.inv =
  CategoryTheory.CategoryStruct.id (F.leftDerived 0)


@[to_additive (attr := simp)]
theorem swap_inj {x y : M ∗ N} : swap M N x = swap M N y ↔ x = y

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{x y : Monoid.Coprod M N}

(Monoid.Coprod.swap M N) x = (Monoid.Coprod.swap M N) y ↔ x = y


theorem measurableSet_range_inl [MeasurableSpace α] :
    MeasurableSet (range Sum.inl : Set (α ⊕ β))

{α : Type u_1}
{β : Type u_2}
{mβ : MeasurableSpace β}
[MeasurableSpace α]


@[to_additive]
theorem _root_.measurableEmbedding_mulRight (g : G) : MeasurableEmbedding fun x => x * g

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


@[to_additive]
theorem subset_interior_smul : interior s • interior t ⊆ interior (s • t)

{α : Type u}
{β : Type v}
[TopologicalSpace β]
[AddGroup α]
[AddAction α β]
[ContinuousConstVAdd α β]
{s : Set α}
{t : Set β}
[TopologicalSpace α]

interior s +ᵥ interior t ⊆ interior (s +ᵥ t)


@[simp] lemma surjective_piEquiv_apply_iff (v : ι → M) :
    Surjective (piEquiv ι R M v) ↔ span R (range v) = ⊤

(ι : Type u_1)
(R : Type u_2)
(M : Type u_3)
[Finite ι]
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(v : ι → M)

Function.Surjective ⇑((Module.piEquiv ι R M) v) ↔ Submodule.span R (Set.range v) = ⊤


theorem card_of_subtype {p : α → Prop} (s : Finset α) (H : ∀ x : α, x ∈ s ↔ p x)
    [Fintype { x // p x }] : card { x // p x } = s.card

{α : Type u_1}
{p : α → Prop}
(s : Finset α)
(H : ∀ (x : α), x ∈ s ↔ p x)
[Fintype { x // p x }]


theorem forall_mem_map_iff {f : α → β} {l : List α} {P : β → Prop} :
    (∀ (i) (_ : i ∈ l.map f), P i) ↔ ∀ (j) (_ : j ∈ l), P (f j)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{l : List α}
{P : β → Prop}

(∀ (i : β), i ∈ List.map f l → P i) ↔ ∀ (j : α), j ∈ l → P (f j)


theorem reverse_rotate (l : List α) (n : ℕ) :
    (l.rotate n).reverse = l.reverse.rotate (l.length - n % l.length)


theorem toZ_iterate_succ_of_not_isMax (n : ℕ) (hn : ¬IsMax (succ^[n] i0)) :
    toZ i0 (succ^[n] i0) = n

{ι : Type u_1}
[LinearOrder ι]
[SuccOrder ι]
[IsSuccArchimedean ι]
[PredOrder ι]
{i0 : ι}
(n : ℕ)
(hn : ¬IsMax (Order.succ^[n] i0))


@[simp]
theorem orderEmbeddingToFun_apply {f : ι →₀ α} {i : ι} : orderEmbeddingToFun f i = f i

{ι : Type u_1}
{α : Type u_2}
[Zero α]
[LE α]
{f : ι →₀ α}
{i : ι}


lemma adjoin_eq_span (s : Set A) :
    (adjoin R s).toSubmodule = Submodule.span R (Subsemigroup.closure (s ∪ star s))

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
(s : Set A)

(NonUnitalStarAlgebra.adjoin R s).toSubmodule = Submodule.span R ↑(Subsemigroup.closure (s ∪ star s))


/-- We can turn any colimit cocone over a pair into a bicone. -/
@[simps]
def BinaryBicone.ofColimitCocone {X Y : C} {t : Cocone (pair X Y)} (ht : IsColimit t) :
    BinaryBicone X Y

{t : CategoryTheory.Limits.Cocone (CategoryTheory.Limits.pair X Y)}

(ht : CategoryTheory.Limits.IsColimit t)

(CategoryTheory.Limits.BinaryBicone.ofColimitCocone ht).fst = ht.desc (CategoryTheory.Limits.BinaryCofan.mk (𝟙 X) 0)


/-- Pullback a `LeftDistribClass` instance along an injective function. -/
theorem leftDistribClass [Mul α] [Add α] [LeftDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
    (mul : ∀ x y, f (x * y) = f x * f y) : LeftDistribClass β

(add : ∀ (x y : β), f (x + y) = f x + f y)

(mul : ∀ (x y : β), f (x * y) = f x * f y)


@[simp]
lemma add_inv_app_obj (a b : A) (X : C) :
    (add F s i a b).inv.app (F.obj X) =
      (s b).map ((i a).hom.app X) ≫ (i b).hom.app ((shiftFunctor C a).obj X) ≫
        F.map ((shiftFunctorAdd C a b).inv.app X) ≫ (i (a + b)).inv.app X

(i : (a : A) → F.comp (s a) ≅ (CategoryTheory.shiftFunctor C a).comp F)

[((CategoryTheory.whiskeringLeft C D D).obj F).Full]

[((CategoryTheory.whiskeringLeft C D D).obj F).Faithful]

(CategoryTheory.HasShift.Induced.add F s i a b).inv.app (F.obj X) =
  CategoryTheory.CategoryStruct.comp ((s b).map ((i a).hom.app X))
    (CategoryTheory.CategoryStruct.comp ((i b).hom.app ((CategoryTheory.shiftFunctor C a).obj X))
      (CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.shiftFunctorAdd C a b).inv.app X))
        ((i (a + b)).inv.app X)))


theorem support_C_mul_X_pow (n : ℕ) {c : R} (h : c ≠ 0) :
    Polynomial.support (C c * X ^ n) = singleton n

{R : Type u}
[Semiring R]
(n : ℕ)
{c : R}
(h : c ≠ 0)

(Polynomial.C c * Polynomial.X ^ n).support = {n}


theorem gcd_eq {x y : PUnit} : gcd x y = unit


theorem nhds_top_basis_Ici [TopologicalSpace α] [LinearOrder α] [OrderTop α] [OrderTopology α]
    [Nontrivial α] [DenselyOrdered α] : (𝓝 ⊤).HasBasis (fun a : α => a < ⊤) Ici

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTop α]
[OrderTopology α]
[Nontrivial α]
[DenselyOrdered α]


theorem sqrt_eq_zero_of_nonpos (h : x ≤ 0) : sqrt x = 0


theorem le_card_iff_exists_subset_card : n ≤ s.card ↔ ∃ t ⊆ s, t.card = n


@[to_additive (attr := simp)]
lemma UniformOnFun.ofFun_mul [Mul β] (f g : α → β) : ofFun 𝔖 (f * g) = ofFun 𝔖 f * ofFun 𝔖 g

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
[Mul β]
(f g : α → β)

(UniformOnFun.ofFun 𝔖) (f * g) = (UniformOnFun.ofFun 𝔖) f * (UniformOnFun.ofFun 𝔖) g


theorem sign_two_zsmul_eq_sign_iff {θ : Angle} :
    ((2 : ℤ) • θ).sign = θ.sign ↔ θ = π ∨ |θ.toReal| < π / 2

(2 • θ).sign = θ.sign ↔ θ = ↑π ∨ |θ.toReal| < π / 2


/-- Uniform converence implies pointwise convergence. -/
theorem TendstoUniformlyOnFilter.tendsto_at (h : TendstoUniformlyOnFilter F f p p')
    (hx : 𝓟 {x} ≤ p') : Tendsto (fun n => F n x) p <| 𝓝 (f x)

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{x : α}
{p : Filter ι}
{p' : Filter α}
(h : TendstoUniformlyOnFilter F f p p')
(hx : 𝓟 {x} ≤ p')

Filter.Tendsto (fun n => F n x) p (𝓝 (f x))


theorem span_singleton_sup_ker_eq_top (f : V →ₗ[K] K) {x : V} (hx : f x ≠ 0) :
    (K ∙ x) ⊔ ker f = ⊤

{K : Type u_3}
{V : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
(f : V →ₗ[K] K)
{x : V}
(hx : f x ≠ 0)

Submodule.span K {x} ⊔ LinearMap.ker f = ⊤


lemma StrictMono.mapsTo_Iio (h : StrictMono f) : MapsTo f (Iio b) (Iio (f b))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : StrictMono f)

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


@[to_additive (attr := elab_as_elim)]
theorem induction_on {C : α ⧸ s → Prop} (x : α ⧸ s) (H : ∀ z, C (QuotientGroup.mk z)) : C x

{α : Type u_1}
[Group α]
{s : Subgroup α}
{C : α ⧸ s → Prop}
(x : α ⧸ s)
(H : ∀ (z : α), C ↑z)


/-- Bialgebra equivalences are transitive. -/
@[trans, simps!]
def trans (e₁₂ : A ≃ₐc[R] B) (e₂₃ : B ≃ₐc[R] C) : A ≃ₐc[R] C

{R : Type u}
{A : Type v}
{B : Type w}
{C : Type u₁}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Semiring C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[CoalgebraStruct R C]
(e₁₂ : A ≃ₐc[R] B)
(e₂₃ : B ≃ₐc[R] C)

∀ (a : C), (e₁₂.trans e₂₃).invFun a = (↑↑e₁₂).symm ((↑↑e₂₃).symm a)


theorem wittStructureInt_existsUnique (Φ : MvPolynomial idx ℤ) :
    ∃! φ : ℕ → MvPolynomial (idx × ℕ) ℤ,
      ∀ n : ℕ,
        bind₁ φ (wittPolynomial p ℤ n) = bind₁ (fun i : idx => rename (Prod.mk i) (W_ ℤ n)) Φ

(p : ℕ)
{idx : Type u_2}
[hp : Fact (Nat.Prime p)]
(Φ : MvPolynomial idx ℤ)

∃! φ,
  ∀ (n : ℕ),
    (MvPolynomial.bind₁ φ) (W_ ℤ n) = (MvPolynomial.bind₁ fun i => (MvPolynomial.rename (Prod.mk i)) (W_ ℤ n)) Φ


@[ext]
protected theorem ext {s t : Seq α} (h : ∀ n : ℕ, s.get? n = t.get? n) : s = t

{α : Type u}
{s t : Stream'.Seq α}
(h : ∀ (n : ℕ), s.get? n = t.get? n)


@[measurability, fun_prop]
theorem Measurable.nnreal_tsum {ι} [Countable ι] {f : ι → α → ℝ≥0} (h : ∀ i, Measurable (f i)) :
    Measurable fun x => ∑' i, f i x

{α : Type u_1}
[MeasurableSpace α]
{ι : Type u_5}
[Countable ι]
{f : ι → α → ℝ≥0}
(h : ∀ (i : ι), Measurable (f i))


lemma ltByCases_not_gt (h : ¬ y < x) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P}
    (p : ¬ x < y → x = y := fun h' => (le_antisymm (le_of_not_gt h) (le_of_not_gt h'))) :
    ltByCases x y h₁ h₂ h₃ = if h' : x < y then h₁ h' else h₂ (p h')

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
(h : ¬y < x)
{h₁ : x < y → P}
{h₂ : x = y → P}
{h₃ : y < x → P}
(p : ¬x < y → x = y := ⋯)

ltByCases x y h₁ h₂ h₃ = if h' : x < y then h₁ h' else h₂ ⋯


lemma exists_smul_eq_of_comap_eq [Algebra k K] [IsGalois k K] {w w' : InfinitePlace K}
    (h : w.comap (algebraMap k K) = w'.comap (algebraMap k K)) : ∃ σ : K ≃ₐ[k] K, σ • w = w'


/-- A continuous family of functions `α → β → γ` tends uniformly to its value at `x`
if `α` is weakly locally compact and `β` is compact. -/
theorem Continuous.tendstoUniformly [WeaklyLocallyCompactSpace α] [CompactSpace β] [UniformSpace γ]
    (f : α → β → γ) (h : Continuous ↿f) (x : α) : TendstoUniformly f (f x) (𝓝 x)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[UniformSpace α]
[UniformSpace β]
[WeaklyLocallyCompactSpace α]
[CompactSpace β]
[UniformSpace γ]
(f : α → β → γ)
(h : Continuous ↿f)
(x : α)


/-- Two uncountable algebraically closed fields are isomorphic
if they have the same cardinality and the same characteristic. -/
theorem ringEquivOfCardinalEqOfCharEq (p : ℕ) [CharP K p] [CharP L p] (hK : ℵ₀ < #K)
    (hKL : #K = #L) : Nonempty (K ≃+* L)

{K L : Type}
[Field K]
[Field L]
[IsAlgClosed K]
[IsAlgClosed L]
(p : ℕ)
[CharP K p]
[CharP L p]
(hK : ℵ₀ < #K)
(hKL : #K = #L)


/-- Any theory with an infinite model has arbitrarily large models. -/
theorem exists_large_model_of_infinite_model (T : L.Theory) (κ : Cardinal.{w}) (M : Type w')
    [L.Structure M] [M ⊨ T] [Infinite M] :
    ∃ N : ModelType.{_, _, max u v w} T, Cardinal.lift.{max u v w} κ ≤ #N

{L : FirstOrder.Language}
(T : L.Theory)
(κ : Cardinal.{w})
(M : Type w')
[L.Structure M]
[M ⊨ T]
[Infinite M]

∃ N, Cardinal.lift.{max u v w, w} κ ≤ #↑N


/-- To every monoid object in `C ⥤ C` we associate a `Monad C`. -/
@[simps η μ]
def ofMon (M : Mon_ (C ⥤ C)) : Monad C

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

(CategoryTheory.Monad.ofMon M).η = M.one


@[simp]
lemma opMap_id : opMap (𝟙 S) = 𝟙 S.op

CategoryTheory.ShortComplex.opMap (CategoryTheory.CategoryStruct.id S) = CategoryTheory.CategoryStruct.id S.op


theorem _root_.Function.Commute.filter_comap {f g : α → α} (h : Function.Commute f g) :
    Function.Commute (comap f) (comap g)

{α : Type u}
{f g : α → α}
(h : Function.Commute f g)

Function.Commute (Filter.comap f) (Filter.comap g)


theorem lex_wf (ha : WellFounded r) (hb : WellFounded s) : WellFounded (Lex r s)

∀ {α : Type u_1} {r : α → α → Prop} {α_1 : Type u_2} {s : α_1 → α_1 → Prop},
  WellFounded r → WellFounded s → WellFounded (Sum.Lex r s)


@[simp]
theorem pi_inf_principal_pi_eq_bot [∀ i, NeBot (f i)] {I : Set ι} :
    pi f ⊓ 𝓟 (Set.pi I s) = ⊥ ↔ ∃ i ∈ I, f i ⊓ 𝓟 (s i) = ⊥

{ι : Type u_1}
{α : ι → Type u_2}
{f : (i : ι) → Filter (α i)}
{s : (i : ι) → Set (α i)}
[∀ (i : ι), (f i).NeBot]
{I : Set ι}

Filter.pi f ⊓ 𝓟 (I.pi s) = ⊥ ↔ ∃ i ∈ I, f i ⊓ 𝓟 (s i) = ⊥


/-- Mapping a set of reals along a line segment scales the measure by the length of a segment.

This is an auxiliary result used to prove `hausdorffMeasure_affineSegment`. -/
theorem hausdorffMeasure_lineMap_image (x y : P) (s : Set ℝ) :
    μH[1] (AffineMap.lineMap x y '' s) = nndist x y • μH[1] s

{E : Type u_5}
{P : Type u_6}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace P]
[MetricSpace P]
[NormedAddTorsor E P]
[BorelSpace P]
(x y : P)
(s : Set ℝ)

μH[1] (⇑(AffineMap.lineMap x y) '' s) = nndist x y • μH[1] s


/-- The **Gagliardo-Nirenberg-Sobolev inequality**.  Let `u` be a continuously differentiable
compactly-supported function `u` on a normed space `E` of finite dimension `n ≥ 2`, equipped
with Haar measure. Then the `Lᵖ` norm of `u`, where `p := n / (n - 1)`, is bounded above by
a constant times the `L¹` norm of the Fréchet derivative of `u`. -/
theorem eLpNorm_le_eLpNorm_fderiv_one  {u : E → F} (hu : ContDiff ℝ 1 u) (h2u : HasCompactSupport u)
    {p : ℝ≥0} (hp : NNReal.IsConjExponent (finrank ℝ E) p) :
    eLpNorm u p μ ≤ eLpNormLESNormFDerivOneConst μ p * eLpNorm (fderiv ℝ u) 1 μ

(hp : (↑(FiniteDimensional.finrank ℝ E)).IsConjExponent p)

MeasureTheory.eLpNorm u (↑p) μ ≤
  ↑(MeasureTheory.eLpNormLESNormFDerivOneConst μ ↑p) * MeasureTheory.eLpNorm (fderiv ℝ u) 1 μ


theorem eq_of_cmp_eq : ∀ {o₁ o₂}, cmp o₁ o₂ = Ordering.eq → o₁ = o₂


theorem div_lt_floor {x : ℝ} (hx : 2 / (1 - 2 / exp 1) ≤ x) : x / exp 1 < (⌊x / 2⌋₊ : ℝ)


lemma measurable_countableFiltration_countablePartitionSet (α : Type*)
    [MeasurableSpace α] [CountablyGenerated α] (n : ℕ) :
    Measurable[countableFiltration α n] (countablePartitionSet n)

(α : Type u_2)
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]
(n : ℕ)


@[simp]
theorem domDomCongr_smul {S : Type*} [Monoid S] [DistribMulAction S N] [SMulCommClass R S N]
    (σ : ι ≃ ι') (c : S) (f : M [⋀^ι]→ₗ[R] N) :
    (c • f).domDomCongr σ = c • f.domDomCongr σ

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
{ι' : Type u_8}
{S : Type u_12}
[Monoid S]
[DistribMulAction S N]
[SMulCommClass R S N]
(σ : ι ≃ ι')
(c : S)
(f : M [⋀^ι]→ₗ[R] N)

AlternatingMap.domDomCongr σ (c • f) = c • AlternatingMap.domDomCongr σ f


@[simp] theorem castAdd_castLT (m : Nat) (i : Fin (n + m)) (hi : i.val < n) :
    castAdd m (castLT i hi) = i

{n : Nat}
(m : Nat)
(i : Fin (n + m))
(hi : ↑i < n)


theorem fderiv_inner_apply (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) (y : G) :
    fderiv ℝ (fun t => ⟪f t, g t⟫) x y = ⟪f x, fderiv ℝ g x y⟫ + ⟪fderiv ℝ f x y, g x⟫

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
{x : G}
(hf : DifferentiableAt ℝ f x)
(hg : DifferentiableAt ℝ g x)
(y : G)

(fderiv ℝ (fun t => ⟪f t, g t⟫_𝕜) x) y = ⟪f x, (fderiv ℝ g x) y⟫_𝕜 + ⟪(fderiv ℝ f x) y, g x⟫_𝕜


/-- See also `finprod_mem_finset_product'`. -/
@[to_additive "See also `finsum_mem_finset_product'`."]
theorem finprod_mem_finset_product (s : Finset (α × β)) (f : α × β → M) :
    (∏ᶠ (ab) (_ : ab ∈ s), f ab) = ∏ᶠ (a) (b) (_ : (a, b) ∈ s), f (a, b)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[CommMonoid M]
(s : Finset (α × β))
(f : α × β → M)

∏ᶠ (ab : α × β) (_ : ab ∈ s), f ab = ∏ᶠ (a : α) (b : β) (_ : (a, b) ∈ s), f (a, b)


@[simp] theorem eq_true_or_eq_false_self : ∀(b : Bool), (b = true ∨ b = false) ↔ True


theorem NoMaxOrder.not_acc [LT α] [NoMaxOrder α] (a : α) : ¬Acc (· > ·) a

{α : Type u_1}
[LT α]
[NoMaxOrder α]
(a : α)


/-- To prove a function to a `T1Space` is continuous at some point `x`, it suffices to prove that
`f` admits *some* limit at `x`. -/
theorem continuousAt_of_tendsto_nhds [TopologicalSpace Y] [T1Space Y] {f : X → Y} {x : X} {y : Y}
    (h : Tendsto f (𝓝 x) (𝓝 y)) : ContinuousAt f x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T1Space Y]
{f : X → Y}
{x : X}
{y : Y}
(h : Filter.Tendsto f (𝓝 x) (𝓝 y))


@[to_additive (attr := continuity)]
theorem continuous_mul_left (a : M) : Continuous fun b : M => a * b

{M : Type u_3}
[TopologicalSpace M]
[Add M]
[ContinuousAdd M]
(a : M)


theorem Odd.neg_zpow (h : Odd n) (a : α) : (-a) ^ n = -a ^ n

{α : Type u_1}
[DivisionRing α]
{n : ℤ}
(h : Odd n)
(a : α)


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

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

BoundedContinuousFunction.mkOfCompact (-f) = -BoundedContinuousFunction.mkOfCompact f


theorem map_unique (j : S →+* Q) (hj : ∀ x : R, j (algebraMap R S x) = algebraMap P Q (g x)) :
    map Q g hy = j

(hj : ∀ (x : R), j ((algebraMap R S) x) = (algebraMap P Q) (g x))


@[simp] lemma box_succ_union_prod (n : ℕ) :
    box (n + 1) ∪ Icc (-n : α) n = Icc (-n.succ : α) n.succ

{α : Type u_1}
[OrderedRing α]
[LocallyFiniteOrder α]
[DecidableEq α]
(n : ℕ)

Finset.box (n + 1) ∪ Finset.Icc (-↑n) ↑n = Finset.Icc (-↑n.succ) ↑n.succ


/--
The closure of a singleton `{a}` in the upper set topology is the right-closed left-infinite
interval (-∞,a].
-/
@[simp] lemma closure_singleton {a : α} : closure {a} = Iic a

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpperSet α]
{a : α}


/-- Assumes right covariance.
The lemma assuming left covariance is `Left.mul_lt_one'`. -/
@[to_additive "Assumes right covariance.
The lemma assuming left covariance is `Left.add_neg'`."]
theorem Right.mul_lt_one' [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b : α} (ha : a < 1)
    (hb : b < 1) :
    a * b < 1

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


lemma castAdd_injective (m n : ℕ) : Injective (@Fin.castAdd m n)


theorem thickenedIndicator_mono {δ₁ δ₂ : ℝ} (δ₁_pos : 0 < δ₁) (δ₂_pos : 0 < δ₂) (hle : δ₁ ≤ δ₂)
    (E : Set α) : ⇑(thickenedIndicator δ₁_pos E) ≤ thickenedIndicator δ₂_pos E

{α : Type u_1}
[PseudoEMetricSpace α]
{δ₁ δ₂ : ℝ}
(δ₁_pos : 0 < δ₁)
(δ₂_pos : 0 < δ₂)
(hle : δ₁ ≤ δ₂)
(E : Set α)

⇑(thickenedIndicator δ₁_pos E) ≤ ⇑(thickenedIndicator δ₂_pos E)


theorem false_of_true_eq_false  (h : True = False) : False


@[simp, mfld_simps]
theorem univ_inter (a : Set α) : univ ∩ a = a


/-- Left-composition gives a functor `(C ⥤ D) ⥤ ((D ⥤ E) ⥤ (C ⥤ E))`.

`(whiskeringLeft.obj F).obj G` is `F ⋙ G`, and
`(whiskeringLeft.obj F).map α` is `whiskerLeft F α`.
-/
@[simps]
def whiskeringLeft : (C ⥤ D) ⥤ (D ⥤ E) ⥤ C ⥤ E

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

∀ {X Y : CategoryTheory.Functor C D} (τ : X ⟶ Y) (H : CategoryTheory.Functor D E) (c : C),
  (((CategoryTheory.whiskeringLeft C D E).map τ).app H).app c = H.map (τ.app c)


theorem le_sum_apply (f : ι → Measure α) (s : Set α) : ∑' i, f i s ≤ sum f s

{α : Type u_1}
{ι : Type u_5}
{m0 : MeasurableSpace α}
(f : ι → MeasureTheory.Measure α)
(s : Set α)

∑' (i : ι), (f i) s ≤ (MeasureTheory.Measure.sum f) s


@[to_additive]
theorem orderOf_dvd_of_mem_zpowers (h : y ∈ Subgroup.zpowers x) : orderOf y ∣ orderOf x

{G : Type u_1}
[AddGroup G]
{x y : G}
(h : y ∈ AddSubgroup.zmultiples x)


@[simp]
theorem transpose_mem_iff : Aᵀ ∈ symplecticGroup l R ↔ A ∈ symplecticGroup l R

{l : Type u_1}
{R : Type u_2}
[DecidableEq l]
[Fintype l]
[CommRing R]
{A : Matrix (l ⊕ l) (l ⊕ l) R}

Aᵀ ∈ Matrix.symplecticGroup l R ↔ A ∈ Matrix.symplecticGroup l R


lemma FactorsThrough.extend_comp {g : α → γ} (e' : β → γ) (hf : FactorsThrough g f) :
    extend f g e' ∘ f = g

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β}
{g : α → γ}
(e' : β → γ)
(hf : Function.FactorsThrough g f)


protected theorem congr_arg (φ : A →ₗc[R] B) {x y : A} (h : x = y) : φ x = φ y

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(φ : A →ₗc[R] B)
{x y : A}
(h : x = y)


theorem countable_pi {π : α → Type*} [Finite α] {s : ∀ a, Set (π a)} (hs : ∀ a, (s a).Countable) :
    { f : ∀ a, π a | ∀ a, f a ∈ s a }.Countable

{α : Type u}
{π : α → Type u_1}
[Finite α]
{s : (a : α) → Set (π a)}
(hs : ∀ (a : α), (s a).Countable)


/-- The `(n+1)`th convergent of `ξ` is the `n`th convergent of `1/(fract ξ)`. -/
@[simp]
theorem convergent_succ (ξ : ℝ) (n : ℕ) :
    ξ.convergent (n + 1) = ⌊ξ⌋ + ((fract ξ)⁻¹.convergent n)⁻¹

ξ.convergent (n + 1) = ↑⌊ξ⌋ + ((Int.fract ξ)⁻¹.convergent n)⁻¹


@[to_additive]
protected theorem Inseparable.inv {x y : G} (h : Inseparable x y) : Inseparable (x⁻¹) (y⁻¹)

{G : Type w}
[TopologicalSpace G]
[Inv G]
[ContinuousInv G]
{x y : G}
(h : Inseparable x y)


@[simp]
theorem mem_coe_iff {a : α} {l : List α} : a ∈ (↑l : Cycle α) ↔ a ∈ l

a ∈ ↑l ↔ a ∈ l


@[simp]
theorem IsSymm.transpose {A : Matrix n n α} (h : A.IsSymm) : Aᵀ.IsSymm

{α : Type u_1}
{n : Type u_3}
{A : Matrix n n α}
(h : A.IsSymm)


@[simp]
theorem taylor_monomial (i : ℕ) (k : R) : taylor r (monomial i k) = C k * (X + C r) ^ i

{R : Type u_1}
[Semiring R]
(r : R)
(i : ℕ)
(k : R)

(Polynomial.taylor r) ((Polynomial.monomial i) k) = Polynomial.C k * (Polynomial.X + Polynomial.C r) ^ i


theorem zero_addString_eq (s : String) : (0 : Pos) + s = ⟨s.utf8ByteSize⟩


/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries 𝕜 E F) (n : ℕ) :
    Continuous (p.partialSum n)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[Ring 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalAddGroup E]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 E]
[ContinuousConstSMul 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(n : ℕ)


theorem uniformEmbedding_subtype_val {p : α → Prop} :
    UniformEmbedding (Subtype.val : Subtype p → α)

{α : Type u}
[UniformSpace α]
{p : α → Prop}


/-- A cone `t` on `F` is a limit cone if each cone on `F` admits a unique
cone morphism to `t`.

See <https://stacks.math.columbia.edu/tag/002E>.
  -/
-- porting note (#5171): removed @[nolint has_nonempty_instance]
structure IsLimit (t : Cone F) where
  /-- There is a morphism from any cone point to `t.pt` -/
  lift : ∀ s : Cone F, s.pt ⟶ t.pt
  /-- The map makes the triangle with the two natural transformations commute -/
  fac : ∀ (s : Cone F) (j : J), lift s ≫ t.π.app j = s.π.app j := by aesop_cat
  /-- It is the unique such map to do this -/
  uniq : ∀ (s : Cone F) (m : s.pt ⟶ t.pt) (_ : ∀ j : J, m ≫ t.π.app j = s.π.app j), m = lift s := by
    aesop_cat

(self : CategoryTheory.Limits.IsLimit t)


theorem getLast_digit_ne_zero (b : ℕ) {m : ℕ} (hm : m ≠ 0) :
    (digits b m).getLast (digits_ne_nil_iff_ne_zero.mpr hm) ≠ 0


@[simp]
theorem sin_add_two_pi (x : ℝ) : sin (x + 2 * π) = sin x


@[simp]
theorem homothety_one (c : P1) : homothety c (1 : k) = id k P1

{k : Type u_2}
{V1 : Type u_3}
{P1 : Type u_4}
[CommRing k]
[AddCommGroup V1]
[AffineSpace V1 P1]
[Module k V1]
(c : P1)

AffineMap.homothety c 1 = AffineMap.id k P1


theorem map_eq_cons {f : α → β} {l : List α} :
    map f l = b :: l₂ ↔ l.head?.map f = some b ∧ l.tail?.map (map f) = some l₂

{α : Type u_1}
{β : Type u_2}
{b : β}
{l₂ : List β}
{f : α → β}
{l : List α}

List.map f l = b :: l₂ ↔ Option.map f l.head? = some b ∧ Option.map (List.map f) l.tail? = some l₂


theorem ι_mul_ι_comm_of_isOrtho {a b : M} (h : Q.IsOrtho a b) :
    ι Q a * ι Q b = -(ι Q b * ι Q a)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{a b : M}
(h : QuadraticMap.IsOrtho Q a b)

(CliffordAlgebra.ι Q) a * (CliffordAlgebra.ι Q) b = -((CliffordAlgebra.ι Q) b * (CliffordAlgebra.ι Q) a)


@[to_additive]
theorem exists_compact_iff_hasCompactMulSupport [R1Space α] :
    (∃ K : Set α, IsCompact K ∧ ∀ x, x ∉ K → f x = 1) ↔ HasCompactMulSupport f

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[One β]
{f : α → β}
[R1Space α]

(∃ K, IsCompact K ∧ ∀ x ∉ K, f x = 1) ↔ HasCompactMulSupport f


@[to_additive lt_max_of_two_nsmul_lt_add]
theorem lt_max_of_sq_lt_mul {a b c : M} (h : a ^ 2 < b * c) : a < max b c

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

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


/-- A ring is a `ℚ`-algebra iff it has equal characteristic zero. -/
theorem nonempty_algebraRat_iff :
    Nonempty (Algebra ℚ R) ↔ ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)

Nonempty (Algebra ℚ R) ↔ ∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I)


/-- `R` is a Noetherian ring if and only if `Spec R` is a Noetherian scheme. -/
theorem isNoetherian_Spec {R : CommRingCat} :
    IsNoetherian (Spec R) ↔ IsNoetherianRing R

AlgebraicGeometry.IsNoetherian (AlgebraicGeometry.Spec R) ↔ IsNoetherianRing ↑R


theorem insertNth_eraseIdx_of_ge :
    ∀ n m as,
      n < length as → n ≤ m → insertNth m a (as.eraseIdx n) = (as.insertNth (m + 1) a).eraseIdx n

{α : Type u}
{a : α}
(n m : ℕ)
(as : List α)

n < as.length → n ≤ m → List.insertNth m a (as.eraseIdx n) = (List.insertNth (m + 1) a as).eraseIdx n


@[simp] lemma cast_eq_id : Rat.cast = id


theorem frontier_thickening_disjoint (A : Set α) :
    Pairwise (Disjoint on fun r : ℝ => frontier (thickening r A))

{α : Type u}
[PseudoEMetricSpace α]
(A : Set α)

Pairwise (Disjoint on fun r => frontier (Metric.thickening r A))


theorem unpair₂ {n f} (hf : @Primrec' n f) : @Primrec' n fun v => (f v).unpair.2

{n : ℕ}
{f : Mathlib.Vector ℕ n → ℕ}
(hf : Nat.Primrec' f)

Nat.Primrec' fun v => (Nat.unpair (f v)).2


theorem exists_of_findSome?_eq_some {l : List α} {f : α → Option β} (w : l.findSome? f = some b) :
    ∃ a, a ∈ l ∧ f a = b

{α : Type u_1}
{β : Type u_2}
{b : β}
{l : List α}
{f : α → Option β}
(w : List.findSome? f l = some b)


theorem smul_mem_smul_iff {a : A} {s : R} {r : Rˣ} : r • s ∈ σ (r • a) ↔ s ∈ σ a

{R : Type u}
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
{a : A}
{s : R}
{r : Rˣ}

r • s ∈ spectrum R (r • a) ↔ s ∈ spectrum R a


/--
The main theorem of this file: Given a coverage `K` on `C`,
a `Type*`-valued presheaf on `C` is a sheaf for `K` if and only if it is a sheaf for
the associated Grothendieck topology.
-/
theorem isSheaf_coverage (K : Coverage C) (P : Cᵒᵖ ⥤ Type*) :
    Presieve.IsSheaf (toGrothendieck _ K) P ↔
    (∀ {X : C} (R : Presieve X), R ∈ K X → Presieve.IsSheafFor P R)

(P : CategoryTheory.Functor Cᵒᵖ (Type u_1))

CategoryTheory.Presieve.IsSheaf (CategoryTheory.Coverage.toGrothendieck C K) P ↔
  ∀ {X : C}, ∀ R ∈ K.covering X, CategoryTheory.Presieve.IsSheafFor P R


@[to_additive]
theorem eq_inv_iff_mul_eq_one : a = b⁻¹ ↔ a * b = 1


theorem prod_antidiagonal_succ' {n : ℕ} {f : ℕ × ℕ → M} : (∏ p ∈ antidiagonal (n + 1), f p) =
    f (n + 1, 0) * ∏ p ∈ antidiagonal n, f (p.1, p.2 + 1)

{M : Type u_1}
[CommMonoid M]
{n : ℕ}
{f : ℕ × ℕ → M}

∏ p ∈ Finset.antidiagonal (n + 1), f p = f (n + 1, 0) * ∏ p ∈ Finset.antidiagonal n, f (p.1, p.2 + 1)


theorem prodIsoProd_hom_apply {X Y : TopCat.{u}} (x : ↑ (X ⨯ Y)) :
    (prodIsoProd X Y).hom x = ((Limits.prod.fst : X ⨯ Y ⟶ _) x,
    (Limits.prod.snd : X ⨯ Y ⟶ _) x)

(X.prodIsoProd Y).hom x = (CategoryTheory.Limits.prod.fst x, CategoryTheory.Limits.prod.snd x)


@[simp]
theorem ULower.down_computable {α} [Primcodable α] : (ULower.equiv α).Computable


theorem Trivialization.contMDiffOn_iff {f : M → TotalSpace F E} {s : Set M}
    (he : MapsTo f s e.source) :
    ContMDiffOn IM (IB.prod 𝓘(𝕜, F)) n f s ↔
      ContMDiffOn IM IB n (fun x => (f x).proj) s ∧
      ContMDiffOn IM 𝓘(𝕜, F) n (fun x ↦ (e (f x)).2) s

[TopologicalSpace (Bundle.TotalSpace F E)]

{e : Trivialization F Bundle.TotalSpace.proj}

ContMDiffOn IM (IB.prod 𝓘(𝕜, F)) n f s ↔
  ContMDiffOn IM IB n (fun x => (f x).proj) s ∧ ContMDiffOn IM 𝓘(𝕜, F) n (fun x => (↑e (f x)).2) s


theorem prod_right (α) [Finite (α × β)] [Nonempty α] : Finite β

{β : Type u_2}
(α : Type u_4)
[Finite (α × β)]
[Nonempty α]


@[simp]
theorem lift_comp_coe : ZMod.lift n f ∘ ((↑) : ℤ → _) = f

(n : ℕ)
{A : Type u_2}
[AddGroup A]
(f : { f // f ↑n = 0 })


theorem hasDerivAt_tan {x : ℝ} (h : cos x ≠ 0) : HasDerivAt tan (1 / cos x ^ 2) x

HasDerivAt Real.tan (1 / Real.cos x ^ 2) x


/-- A version of `Finset.sup'_mono` acceptable for `@[gcongr]`.
Instead of deducing `s₂.Nonempty` from `s₁.Nonempty` and `s₁ ⊆ s₂`,
this version takes it as an argument. -/
@[gcongr]
lemma _root_.GCongr.finset_sup'_le {s₁ s₂ : Finset β} (h : s₁ ⊆ s₂)
    {h₁ : s₁.Nonempty} {h₂ : s₂.Nonempty} : s₁.sup' h₁ f ≤ s₂.sup' h₂ f

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
(f : β → α)
{s₁ s₂ : Finset β}
(h : s₁ ⊆ s₂)
{h₁ : s₁.Nonempty}
{h₂ : s₂.Nonempty}


theorem differentiableAt_cosh : DifferentiableAt ℝ cosh x


@[simp]
theorem _root_.Prefunctor.map_reverse (φ : U ⥤q V) [φ.MapReverse]
    {u v : U} (e : u ⟶ v) : φ.map (reverse e) = reverse (φ.map e)

{U : Type u_1}
{V : Type u_2}
[Quiver U]
[Quiver V]
[Quiver.HasReverse U]
[Quiver.HasReverse V]
(φ : U ⥤q V)
[φ.MapReverse]
{u v : U}
(e : u ⟶ v)

φ.map (Quiver.reverse e) = Quiver.reverse (φ.map e)


@[rify_simps] lemma ratCast_eq (a b : ℚ) : a = b ↔ (a : ℝ) = (b : ℝ)


/-- Invertibility on either side of a monoid hom with a left-inverse is equivalent. -/
@[simps]
def invertibleEquivOfLeftInverse {R : Type*} {S : Type*} {F G : Type*} [Monoid R] [Monoid S]
    [FunLike F R S] [MonoidHomClass F R S] [FunLike G S R] [MonoidHomClass G S R]
    (f : F) (g : G) (r : R) (h : Function.LeftInverse g f) : Invertible (f r) ≃ Invertible r

{R : Type u_1}
{S : Type u_2}
{F : Type u_3}
{G : Type u_4}
[Monoid R]
[Monoid S]
[FunLike F R S]
[MonoidHomClass F R S]
[FunLike G S R]
[MonoidHomClass G S R]
(f : F)
(g : G)
(r : R)
(h : Function.LeftInverse ⇑g ⇑f)

∀ (x : Invertible (f r)), (invertibleEquivOfLeftInverse f g r h) x = Invertible.ofLeftInverse (⇑f) g r h


theorem dotProduct_comm [AddCommMonoid α] [CommSemigroup α] (v w : m → α) : v ⬝ᵥ w = w ⬝ᵥ v

{m : Type u_2}
{α : Type v}
[Fintype m]
[AddCommMonoid α]
[CommSemigroup α]
(v w : m → α)


@[to_additive]
theorem finprod_emb_domain (f : α ↪ β) [DecidablePred (· ∈ Set.range f)] (g : α → M) :
    (∏ᶠ b : β, if h : b ∈ Set.range f then g (Classical.choose h) else 1) = ∏ᶠ a : α, g a

[DecidablePred fun x => x ∈ Set.range ⇑f]

(∏ᶠ (b : β), if h : b ∈ Set.range ⇑f then g (Classical.choose h) else 1) = ∏ᶠ (a : α), g a


lemma isIso_fromOpcycles (hS : S.Exact) [Epi S.g] [S.HasRightHomology] :
    IsIso S.fromOpcycles

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Balanced C]
(hS : S.Exact)
[CategoryTheory.Epi S.g]
[S.HasRightHomology]


@[to_additive (attr := simp)]
theorem toLex_div [Div α] (a b : α) : toLex (a / b) = toLex a / toLex b


theorem det_ne_zero_of_right_inverse [Nontrivial α] (h : A * B = 1) : A.det ≠ 0

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
{A B : Matrix n n α}
[Nontrivial α]
(h : A * B = 1)


theorem exists_pos_left_iff_sameRay (hx : x ≠ 0) (hy : y ≠ 0) :
    (∃ r : R, 0 < r ∧ r • x = y) ↔ SameRay R x y

{R : Type u_1}
[LinearOrderedField R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}
(hx : x ≠ 0)
(hy : y ≠ 0)

(∃ r, 0 < r ∧ r • x = y) ↔ SameRay R x y


@[to_additive]
theorem prod_filter_mul_prod_filter_not
    (s : Finset α) (p : α → Prop) [DecidablePred p] [∀ x, Decidable (¬p x)] (f : α → β) :
    (∏ x ∈ s.filter p, f x) * ∏ x ∈ s.filter fun x => ¬p x, f x = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
(s : Finset α)
(p : α → Prop)
[DecidablePred p]
[(x : α) → Decidable ¬p x]
(f : α → β)

∑ x ∈ Finset.filter p s, f x + ∑ x ∈ Finset.filter (fun x => ¬p x) s, f x = ∑ x ∈ s, f x


@[simp] theorem inf_biUnion [DecidableEq β] (s : Finset γ) (t : γ → Finset β) :
    (s.biUnion t).inf f = s.inf fun x => (t x).inf f

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SemilatticeInf α]
[OrderTop α]
{f : β → α}
[DecidableEq β]
(s : Finset γ)
(t : γ → Finset β)


@[simp]
theorem coeff_exp : coeff A n (exp A) = algebraMap ℚ A (1 / n !)

{A : Type u_1}
[Ring A]
[Algebra ℚ A]
(n : ℕ)

(PowerSeries.coeff A n) (PowerSeries.exp A) = (algebraMap ℚ A) (1 / ↑n.factorial)


@[simp]
theorem pullbackIsoPullback_inv_snd_apply (x : (Types.pullbackCone f g).pt) :
    (pullback.snd f g) ((pullbackIsoPullback f g).inv x) = (fun p => (p.1 : X × Y).snd) x

(x : (CategoryTheory.Limits.Types.pullbackCone f g).pt)

CategoryTheory.Limits.pullback.snd f g ((CategoryTheory.Limits.Types.pullbackIsoPullback f g).inv x) =
  (fun p => (↑p).2) x


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

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


/-- Change a cocone on `F.rightOp : J ⥤ Cᵒᵖ` to a cone on `F : Jᵒᵖ ⥤ C`. -/
@[simps]
def coneOfCoconeRightOp (c : Cocone F.rightOp) : Cone F

(c : CategoryTheory.Limits.Cocone F.rightOp)

(CategoryTheory.Limits.coneOfCoconeRightOp c).π = CategoryTheory.NatTrans.removeRightOp c.ι


theorem image_subtype_ne_univ_eq_image_erase [Fintype α] [DecidableEq β] (k : β) (b : α → β) :
    image (fun i : { a // b a ≠ k } => b ↑i) univ = (image b univ).erase k

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
(k : β)
(b : α → β)

Finset.image (fun i => b ↑i) Finset.univ = (Finset.image b Finset.univ).erase k


theorem removeZero_of_pos (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ} (h : 0 < n) :
    p.removeZero n = p n

{𝕜 : Type u}
{E : Type v}
{F : Type w}
[Ring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{n : ℕ}
(h : 0 < n)


theorem card_le_of_surjective (f : α → β) (h : Function.Surjective f) : card β ≤ card α

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(f : α → β)
(h : Function.Surjective f)


/-- For `x : A` which is invertible in `A`, the inverse lies in any unital C⋆-subalgebra `S`
containing `x`. -/
theorem StarSubalgebra.isUnit_coe_inv_mem {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A))
    {x : A} (h : IsUnit x) (hxS : x ∈ S) : ↑h.unit⁻¹ ∈ S

{A : Type u_1}
[NormedRing A]
[NormedAlgebra ℂ A]
[StarRing A]
[CstarRing A]
[StarModule ℂ A]
[CompleteSpace A]
{S : StarSubalgebra ℂ A}
(hS : IsClosed ↑S)
{x : A}
(h : IsUnit x)
(hxS : x ∈ S)


@[ext]
theorem ext {p q : MulRingSeminorm R} : (∀ x, p x = q x) → p = q

{R : Type u_2}
[NonAssocRing R]
{p q : MulRingSeminorm R}


@[simp]
theorem constantCoeff_X : constantCoeff R X = 0

(PowerSeries.constantCoeff R) PowerSeries.X = 0


lemma boundaryGE {i' : ι'} {j : ι} (hj : c'.Rel i' (e.f j)) (hi' : ∀ i, e.f i ≠ i') :
    e.BoundaryGE j

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
{i' : ι'}
{j : ι}
(hj : c'.Rel i' (e.f j))
(hi' : ∀ (i : ι), e.f i ≠ i')


@[simp] lemma compAddMonoidHom_apply (ψ : AddChar B M) (f : A →+ B)
    (a : A) : ψ.compAddMonoidHom f a = ψ (f a)

{A : Type u_1}
{B : Type u_2}
{M : Type u_3}
[AddMonoid A]
[AddMonoid B]
[Monoid M]
(ψ : AddChar B M)
(f : A →+ B)
(a : A)


@[to_additive]
theorem prod_eq_multiset_prod [CommMonoid β] (s : Finset α) (f : α → β) :
    ∏ x ∈ s, f x = (s.1.map f).prod

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

∑ x ∈ s, f x = (Multiset.map f s.val).sum


theorem AECover.iSup_lintegral_eq_of_countably_generated [Nonempty ι] [l.NeBot]
    [l.IsCountablyGenerated] {φ : ι → Set α} (hφ : AECover μ l φ) {f : α → ℝ≥0∞}
    (hfm : AEMeasurable f μ) : ⨆ i : ι, ∫⁻ x in φ i, f x ∂μ = ∫⁻ x, f x ∂μ

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[Nonempty ι]
[l.NeBot]
[l.IsCountablyGenerated]
{φ : ι → Set α}
(hφ : MeasureTheory.AECover μ l φ)
{f : α → ℝ≥0∞}
(hfm : AEMeasurable f μ)

⨆ i, ∫⁻ (x : α) in φ i, f x ∂μ = ∫⁻ (x : α), f x ∂μ


@[to_additive]
theorem ae_measure_preimage_mul_right_lt_top (hμs : μ' s ≠ ∞) :
    ∀ᵐ x ∂μ', ν' ((· * x) ⁻¹' s) < ∞

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
{s : Set G}
[MeasurableNeg G]
(μ' ν' : MeasureTheory.Measure G)
[MeasureTheory.SigmaFinite μ']
[MeasureTheory.SigmaFinite ν']
[μ'.IsAddLeftInvariant]
[ν'.IsAddLeftInvariant]
(hμs : μ' s ≠ ⊤)


theorem map_iInf₂ [InfSet α] [InfSet β] [sInfHomClass F α β] (f : F) (g : ∀ i, κ i → α) :
    f (⨅ (i) (j), g i j) = ⨅ (i) (j), f (g i j)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
{ι : Sort u_6}
{κ : ι → Sort u_7}
[FunLike F α β]
[InfSet α]
[InfSet β]
[sInfHomClass F α β]
(f : F)
(g : (i : ι) → κ i → α)

f (⨅ i, ⨅ j, g i j) = ⨅ i, ⨅ j, f (g i j)


theorem opow_pos {a : Ordinal} (b : Ordinal) (a0 : 0 < a) : 0 < a ^ b


@[simp] lemma coe_zero [Zero R] : ⇑(0 : C(X, R)₀) = 0

{X : Type u_1}
{R : Type u_2}
[Zero X]
[TopologicalSpace X]
[TopologicalSpace R]
[Zero R]


@[gcongr]
theorem ceil_le_ceil : ∀ x y : α, x ≤ y → ⌈x⌉ ≤ ⌈y⌉

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(x y : α)

x ≤ y → ⌈x⌉ ≤ ⌈y⌉


@[simp]
theorem comp_injective {F : Sort*} [FunLike F β γ] [EmbeddingLike F β γ] (f : α → β) (e : F) :
    Function.Injective (e ∘ f) ↔ Function.Injective f

{α : Sort u_2}
{β : Sort u_3}
{γ : Sort u_4}
{F : Sort u_5}
[FunLike F β γ]
[EmbeddingLike F β γ]
(f : α → β)
(e : F)

Function.Injective (⇑e ∘ f) ↔ Function.Injective f


lemma le_induce_top_verts : G' ≤ (⊤ : G.Subgraph).induce G'.verts

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}


@[simp]
theorem shiftRight_negSucc (m n : ℕ) : -[m+1] >>> (n : ℤ) = -[m >>> n+1]

Int.negSucc m >>> ↑n = Int.negSucc (m >>> n)


@[csimp] theorem inits_eq_initsTR : @inits = @initsTR


@[to_additive (attr := simp, norm_cast)]
theorem const_div [Div M] (a b : M) : (↑(a / b) : Germ l M) = ↑a / ↑b

{α : Type u_1}
{l : Filter α}
{M : Type u_5}
[Sub M]
(a b : M)


theorem LE.le.codisjoint_hnot_right (h : b ≤ a) : Codisjoint a (￢b)

{α : Type u_2}
[CoheytingAlgebra α]
{a b : α}
(h : b ≤ a)


theorem Smooth.fst {f : N → M × M'} (hf : Smooth J (I.prod I') f) : Smooth J I fun x => (f x).1

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{f : N → M × M'}
(hf : Smooth J (I.prod I') f)


theorem getLast_cons' {a : α} {l : List α} : ∀ (h₁ : a :: l ≠ nil) (h₂ : l ≠ nil),
  getLast (a :: l) h₁ = getLast l h₂

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


@[to_additive (attr := simp)]
theorem orbit.coe_smul {a : α} {m : M} {a' : orbit M a} : ↑(m • a') = m • (a' : α)

{M : Type u}
[Monoid M]
{α : Type v}
[MulAction M α]
{a : α}
{m : M}
{a' : ↑(MulAction.orbit M a)}


@[simp]
theorem adjunctionToTypes_counit_app_val {G : Type max v₁ u₁ ⥤ D} (adj : G ⊣ forget D)
    (X : Sheaf J D) :
    ((adjunctionToTypes J adj).counit.app X).val =
      sheafifyLift J ((Functor.associator _ _ _).hom ≫ (adj.whiskerRight _).counit.app _) X.2

(J : CategoryTheory.GrothendieckTopology C)

{G : CategoryTheory.Functor (Type (max v₁ u₁)) D}

((CategoryTheory.Sheaf.adjunctionToTypes J adj).counit.app X).val =
  CategoryTheory.sheafifyLift J
    (CategoryTheory.CategoryStruct.comp (X.1.associator (CategoryTheory.forget D) G).hom
      ((CategoryTheory.Adjunction.whiskerRight Cᵒᵖ adj).counit.app X.1))
    ⋯


theorem Nodup.nontrivial_iff {s : Cycle α} (h : Nodup s) : Nontrivial s ↔ ¬Subsingleton s

{α : Type u_1}
{s : Cycle α}
(h : s.Nodup)


theorem mirror_mul_of_domain : (p * q).mirror = p.mirror * q.mirror

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


@[simp] lemma ofEpiOfIsIsoOfMono'_ι : (ofEpiOfIsIsoOfMono' φ h).ι = h.ι

(CategoryTheory.ShortComplex.RightHomologyData.ofEpiOfIsIsoOfMono' φ h).ι = h.ι


@[simp]
theorem destruct_think (s : WSeq α) : destruct (think s) = (destruct s).think


@[simp]
theorem map_obj_right : ((map f).obj U).right = U.right

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X Y : T}
{f : X ⟶ Y}
{U : CategoryTheory.Under Y}

((CategoryTheory.Under.map f).obj U).right = U.right


@[to_additive (attr := simp)]
theorem eqLocus_same (f : G →* N) : f.eqLocus f = ⊤

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)


@[simp, norm_cast]
theorem coe_le_coe {x y : ℝ} : (x : ℝ*) ≤ y ↔ x ≤ y

↑x ≤ ↑y ↔ x ≤ y


theorem Ioc_subset_Ioo_union_Icc : Ioc a c ⊆ Ioo a b ∪ Icc b c

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


theorem BinaryCofan.IsColimit.hom_ext {W X Y : C} {s : BinaryCofan X Y} (h : IsColimit s)
    {f g : s.pt ⟶ W} (h₁ : s.inl ≫ f = s.inl ≫ g) (h₂ : s.inr ≫ f = s.inr ≫ g) : f = g

{s : CategoryTheory.Limits.BinaryCofan X Y}


@[to_additive]
theorem mem_sSup_of_mem {S : Set (Subgroup G)} {s : Subgroup G} (hs : s ∈ S) :
    ∀ {x : G}, x ∈ s → x ∈ sSup S

{G : Type u_1}
[Group G]
{S : Set (Subgroup G)}
{s : Subgroup G}
(hs : s ∈ S)
{x : G}


/-- Bulk of the proof under strengthened hypotheses. Invoked from `tendsto_Lp_of_tendsto_ae`. -/
private theorem tendsto_Lp_of_tendsto_ae_of_meas (hp : 1 ≤ p) (hp' : p ≠ ∞)
    {f : ℕ → α → β} {g : α → β} (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g)
    (hg' : Memℒp g p μ) (hui : UnifIntegrable f p μ) (hut : UnifTight f p μ)
    (hfg : ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))) :
    Tendsto (fun n => eLpNorm (f n - g) p μ) atTop (𝓝 0)

{f : ℕ → α → β}

(hf : ∀ (n : ℕ), MeasureTheory.StronglyMeasurable (f n))

(hg : MeasureTheory.StronglyMeasurable g)

(hui : MeasureTheory.UnifIntegrable f p μ)

(hfg : ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => f n x) Filter.atTop (nhds (g x)))

Filter.Tendsto (fun n => MeasureTheory.eLpNorm (f n - g) p μ) Filter.atTop (nhds 0)


theorem tensor_add {W X Y Z : C} (f : W ⟶ X) (g h : Y ⟶ Z) : f ⊗ (g + h) = f ⊗ g + f ⊗ h

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.MonoidalPreadditive C]
{W X Y Z : C}
(f : W ⟶ X)
(g h : Y ⟶ Z)

CategoryTheory.MonoidalCategory.tensorHom f (g + h) =
  CategoryTheory.MonoidalCategory.tensorHom f g + CategoryTheory.MonoidalCategory.tensorHom f h


@[to_additive]
lemma comp_right_injective (e : M ≃* N) : Injective fun f : P →* M ↦ (e : M →* N).comp f

{M : Type u_6}
{N : Type u_7}
{P : Type u_8}
[MulOneClass M]
[MulOneClass N]
[MulOneClass P]
(e : M ≃* N)


@[simp]
theorem inr_eq_smul_eps [MulZeroOneClass R] (r : R) : inr r = (r • ε : R[ε])

{R : Type u_1}
[MulZeroOneClass R]
(r : R)


theorem inl_eq_prod : inl R M M₂ = prod LinearMap.id 0

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

LinearMap.inl R M M₂ = LinearMap.id.prod 0


@[simp]
theorem iff_eq_one {p : G} : IsIdempotentElem p ↔ p = 1


theorem mem_cons_self (a : α) (l : List α) : a ∈ a :: l


lemma _root_.CovBy.exists_finset_erase (h : s ⋖ t) : ∃ a ∈ t, t.erase a = s

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


theorem IsSemisimple.of_mem_adjoin_pair {a : End K M} (ha : a ∈ Algebra.adjoin K {f, g}) :
    a.IsSemisimple

{M : Type u_2}
[AddCommGroup M]
{K : Type u_3}
[Field K]
[Module K M]
{f g : Module.End K M}
[FiniteDimensional K M]
[PerfectField K]
(comm : Commute f g)
(hf : f.IsSemisimple)
(hg : g.IsSemisimple)
{a : Module.End K M}
(ha : a ∈ Algebra.adjoin K {f, g})


theorem eq_re_of_eq_coe {a : ℍ[R]} {x : R} (h : a = x) : a = a.re

{R : Type u_3}
[CommRing R]
{a : ℍ[R]}
{x : R}
(h : a = ↑x)


theorem or_congr_left' {c a b : Prop} (h : ¬c → (a ↔ b)) : a ∨ c ↔ b ∨ c


theorem isConnected_range [TopologicalSpace β] [ConnectedSpace α] {f : α → β} (h : Continuous f) :
    IsConnected (range f)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[ConnectedSpace α]
{f : α → β}
(h : Continuous f)


theorem not_beq_of_ne {α : Type*} [BEq α] [LawfulBEq α] {a b : α} (ne : a ≠ b) : ¬(a == b)

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{a b : α}
(ne : a ≠ b)


@[to_additive]
theorem of_injective_mulHom (f : H →ₙ* G) (hf : Function.Injective f) (_ : UniqueProds G) :
    UniqueProds H

{G : Type u}
{H : Type v}
[Mul G]
[Mul H]
(f : H →ₙ* G)
(hf : Function.Injective ⇑f)


@[to_additive (attr := simp)]
theorem piCongrRight_symm {η : Type*} {Ms Ns : η → Type*} [∀ j, Mul (Ms j)] [∀ j, Mul (Ns j)]
    (es : ∀ j, Ms j ≃* Ns j) : (piCongrRight es).symm = piCongrRight fun i => (es i).symm

{η : Type u_12}
{Ms : η → Type u_13}
{Ns : η → Type u_14}
[(j : η) → Mul (Ms j)]
[(j : η) → Mul (Ns j)]
(es : (j : η) → Ms j ≃* Ns j)

(MulEquiv.piCongrRight es).symm = MulEquiv.piCongrRight fun i => (es i).symm


@[simp]
theorem finSumEquivOfFinset_inr (hm : s.card = m) (hn : sᶜ.card = n) (i : Fin n) :
    finSumEquivOfFinset hm hn (Sum.inr i) = sᶜ.orderEmbOfFin hn i

{α : Type u_1}
[DecidableEq α]
[Fintype α]
[LinearOrder α]
{m n : ℕ}
{s : Finset α}
(hm : s.card = m)
(hn : sᶜ.card = n)
(i : Fin n)

(finSumEquivOfFinset hm hn) (Sum.inr i) = (sᶜ.orderEmbOfFin hn) i


lemma strongConvexOn_iff_convex :
    StrongConvexOn s m f ↔ ConvexOn ℝ s fun x ↦ f x - m / (2 : ℝ) * ‖x‖ ^ 2

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{s : Set E}
{m : ℝ}
{f : E → ℝ}

StrongConvexOn s m f ↔ ConvexOn ℝ s fun x => f x - m / 2 * ‖x‖ ^ 2


/-- In a pseudometric space, the extended distance is always finite-/
theorem edist_ne_top (x y : α) : edist x y ≠ ⊤

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


theorem Coindep.exists_base_subset_compl (h : M.Coindep X) : ∃ B, M.Base B ∧ B ⊆ M.E \ X

{α : Type u_1}
{M : Matroid α}
{X : Set α}
(h : M.Coindep X)


theorem maximals_antichain : IsAntichain r (maximals r s)

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


/-- A standard Borel space is a measurable space arising as the Borel sets of some Polish topology.
This is useful in situations where a space has no natural topology or
the natural topology in a space is non-Polish.

To endow a standard Borel space `α` with a compatible Polish topology, use
`letI := upgradeStandardBorel α`. One can then use `eq_borel_upgradeStandardBorel α` to
rewrite the `MeasurableSpace α` instance to `borel α t`, where `t` is the new topology. -/
class StandardBorelSpace [MeasurableSpace α] : Prop where
  /-- There exists a compatible Polish topology. -/
  polish : ∃ _ : TopologicalSpace α, BorelSpace α ∧ PolishSpace α

{α : Type u_1}
[MeasurableSpace α]
[self : StandardBorelSpace α]


@[simp]
theorem neLocus_neg_neg : neLocus (-f) (-g) = f.neLocus g

{α : Type u_1}
{N : Type u_3}
[DecidableEq α]
[DecidableEq N]
[AddGroup N]
(f g : α →₀ N)


theorem singleton_smul (a : A) (M : Submodule R A) :
    Set.up ({a} : Set A) • M = M.map (LinearMap.mulLeft R a)

{R : Type u}
[CommSemiring R]
{A : Type v}
[CommSemiring A]
[Algebra R A]
(a : A)
(M : Submodule R A)

Set.up {a} • M = Submodule.map (LinearMap.mulLeft R a) M


/--
The well formedness predicate for a `FindMin` value.
This is not actually a predicate, as it contains an additional data value
`rank` corresponding to the rank of the returned node, which is omitted from `findMin`.
-/
structure FindMin.WF (le : α → α → Bool) (res : FindMin α) where
  /-- The rank of the minimum element -/
  rank : Nat
  /-- `before` is a difference list which can be appended to a binomial heap
  with ranks at least `rank` to produce another well formed heap. -/
  before : ∀ {s}, s.WF le rank → (res.before s).WF le 0
  /-- `node` is a well formed forest of rank `rank` with `val` at the root. -/
  node : res.node.WF le res.val rank
  /-- `next` is a binomial heap with ranks above `rank + 1`. -/
  next : res.next.WF le (rank + 1)

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

(self : Batteries.BinomialHeap.Imp.FindMin.WF le res)

Batteries.BinomialHeap.Imp.Heap.WF le self.rank s → Batteries.BinomialHeap.Imp.Heap.WF le 0 (res.before s)


theorem Tendsto.prod_atBot [SemilatticeInf α] [SemilatticeInf γ] {f g : α → γ}
    (hf : Tendsto f atBot atBot) (hg : Tendsto g atBot atBot) :
    Tendsto (Prod.map f g) atBot atBot

(hf : Filter.Tendsto f Filter.atBot Filter.atBot)

(hg : Filter.Tendsto g Filter.atBot Filter.atBot)

Filter.Tendsto (Prod.map f g) Filter.atBot Filter.atBot


@[measurability]
protected theorem MeasurableSet.iUnion [Countable ι] ⦃f : ι → Set α⦄
    (h : ∀ b, MeasurableSet (f b)) : MeasurableSet (⋃ b, f b)

{α : Type u_1}
{ι : Sort u_6}
{m : MeasurableSpace α}
[Countable ι]
⦃f : ι → Set α⦄
(h : ∀ (b : ι), MeasurableSet (f b))


theorem Filter.EventuallyEq.isLocalMin_iff {f g : α → β} {a : α} (heq : f =ᶠ[𝓝 a] g) :
    IsLocalMin f a ↔ IsLocalMin g a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f g : α → β}
{a : α}
(heq : f =ᶠ[𝓝 a] g)


@[to_additive]
theorem continuous_finprod_cond {f : ι → X → M} {p : ι → Prop} (hc : ∀ i, p i → Continuous (f i))
    (hf : LocallyFinite fun i => mulSupport (f i)) :
    Continuous fun x => ∏ᶠ (i) (_ : p i), f i x

(hc : ∀ (i : ι), p i → Continuous (f i))

(hf : LocallyFinite fun i => Function.mulSupport (f i))

Continuous fun x => ∏ᶠ (i : ι) (_ : p i), f i x


/-- A module `M` over a linearly ordered commutative ring has precisely two "orientations" with
respect to an empty index type. (Note that these are only orientations of `M` of in the conventional
mathematical sense if `M` is zero-dimensional.) -/
theorem eq_or_eq_neg_of_isEmpty [IsEmpty ι] (o : Orientation R M ι) :
    o = positiveOrientation ∨ o = -positiveOrientation

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_3}
[IsEmpty ι]
(o : Orientation R M ι)


/-- A constructor for morphisms in `ShortComplex C` when the commutativity conditions
are not obvious. -/
@[simps]
def homMk {S₁ S₂ : ShortComplex C} (τ₁ : S₁.X₁ ⟶ S₂.X₁) (τ₂ : S₁.X₂ ⟶ S₂.X₂)
    (τ₃ : S₁.X₃ ⟶ S₂.X₃) (comm₁₂ : τ₁ ≫ S₂.f = S₁.f ≫ τ₂)
    (comm₂₃ : τ₂ ≫ S₂.g = S₁.g ≫ τ₃) : S₁ ⟶ S₂

(comm₁₂ : CategoryTheory.CategoryStruct.comp τ₁ S₂.f = CategoryTheory.CategoryStruct.comp S₁.f τ₂)

(comm₂₃ : CategoryTheory.CategoryStruct.comp τ₂ S₂.g = CategoryTheory.CategoryStruct.comp S₁.g τ₃)

(CategoryTheory.ShortComplex.homMk τ₁ τ₂ τ₃ comm₁₂ comm₂₃).τ₃ = τ₃


@[simp]
lemma shiftFunctor_obj_X' (K : CochainComplex C ℤ) (n p : ℤ) :
    ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj K).X p = K.X (p + n)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K : CochainComplex C ℤ)
(n p : ℤ)


@[local instance] theorem isAlgClosure : IsAlgClosure k (AlgebraicClosureAux k)


theorem IsBaseChange.equiv_symm_apply (m : M) : h.equiv.symm (f m) = 1 ⊗ₜ m

{R : Type u_1}
{M : Type v₁}
{N : Type v₂}
{S : Type v₃}
[AddCommMonoid M]
[AddCommMonoid N]
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Module R M]
[Module R N]
[Module S N]
[IsScalarTower R S N]
{f : M →ₗ[R] N}
(h : IsBaseChange S f)
(m : M)


theorem diam_range : Metric.diam (range f) = Metric.diam (univ : Set P)

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[𝕜] P₂)

Metric.diam (Set.range ⇑f) = Metric.diam Set.univ


/-- If the bottom-left element of a block matrix is invertible, then the whole matrix is invertible
iff the corresponding schur complement is. -/
theorem isUnit_fromBlocks_iff_of_invertible₂₂ {A : Matrix m m α} {B : Matrix m n α}
    {C : Matrix n m α} {D : Matrix n n α} [Invertible D] :
    IsUnit (fromBlocks A B C D) ↔ IsUnit (A - B * ⅟ D * C)

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

IsUnit (Matrix.fromBlocks A B C D) ↔ IsUnit (A - B * ⅟D * C)


theorem FG.of_map_embedding {N : Type*} [L.Structure N] (f : M ↪[L] N) {s : L.Substructure M}
    (hs : (s.map f.toHom).FG) : s.FG

(hs : (FirstOrder.Language.Substructure.map f.toHom s).FG)


lemma pullbackShiftFunctorAdd'_hom_app :
    (shiftFunctorAdd' _ a₁ a₂ a₃ h).hom.app X =
      (pullbackShiftIso C φ a₃ b₃ h₃).hom.app X ≫
      (shiftFunctorAdd' C b₁ b₂ b₃ (by rw [h₁, h₂, h₃, ← h, φ.map_add])).hom.app X ≫
      (pullbackShiftIso C φ a₂ b₂ h₂).inv.app _ ≫
      (shiftFunctor (PullbackShift C φ) a₂).map ((pullbackShiftIso C φ a₁ b₁ h₁).inv.app X)

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
{A : Type u_2}
{B : Type u_3}
[AddMonoid A]
[AddMonoid B]
(φ : A →+ B)
[CategoryTheory.HasShift C B]
(X : CategoryTheory.PullbackShift C φ)
(a₁ a₂ a₃ : A)
(h : a₁ + a₂ = a₃)
(b₁ b₂ b₃ : B)
(h₁ : b₁ = φ a₁)
(h₂ : b₂ = φ a₂)
(h₃ : b₃ = φ a₃)

(CategoryTheory.shiftFunctorAdd' (CategoryTheory.PullbackShift C φ) a₁ a₂ a₃ h).hom.app X =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.pullbackShiftIso C φ a₃ b₃ h₃).hom.app X)
    (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctorAdd' C b₁ b₂ b₃ ⋯).hom.app X)
      (CategoryTheory.CategoryStruct.comp
        ((CategoryTheory.pullbackShiftIso C φ a₂ b₂ h₂).inv.app ((CategoryTheory.shiftFunctor C b₁).obj X))
        ((CategoryTheory.shiftFunctor (CategoryTheory.PullbackShift C φ) a₂).map
          ((CategoryTheory.pullbackShiftIso C φ a₁ b₁ h₁).inv.app X))))


theorem isBounded_prod_of_nonempty (hne : Set.Nonempty (s ×ˢ t)) :
    IsBounded (s ×ˢ t) ↔ IsBounded s ∧ IsBounded t

{α : Type u_1}
{β : Type u_2}
[Bornology α]
[Bornology β]
{s : Set α}
{t : Set β}
(hne : (s ×ˢ t).Nonempty)

Bornology.IsBounded (s ×ˢ t) ↔ Bornology.IsBounded s ∧ Bornology.IsBounded t


/-- The image under a monoid hom of the submonoid generated by a set equals the submonoid generated
    by the image of the set under the monoid hom. -/
@[to_additive
      "The image under an `AddMonoid` hom of the `AddSubmonoid` generated by a set equals
      the `AddSubmonoid` generated by the image of the set under the `AddMonoid` hom."]
theorem image_closure {A : Type*} [Monoid A] {f : M → A} (hf : IsMonoidHom f) (s : Set M) :
    f '' Closure s = Closure (f '' s)

{M : Type u_1}
[AddMonoid M]
{A : Type u_3}
[AddMonoid A]
{f : M → A}
(hf : IsAddMonoidHom f)
(s : Set M)

f '' AddMonoid.Closure s = AddMonoid.Closure (f '' s)


protected theorem mdifferentiableAt (s : Cₛ^∞⟮I; F, V⟯) {x} :
    MDifferentiableAt I (I.prod 𝓘(𝕜, F)) (fun x => TotalSpace.mk' F x (s x : V x)) x

[TopologicalSpace (Bundle.TotalSpace F V)]

MDifferentiableAt I (I.prod 𝓘(𝕜, F)) (fun x => Bundle.TotalSpace.mk' F x (s x)) x


theorem differentiable_rpow_const {p : ℝ} (hp : 1 ≤ p) : Differentiable ℝ fun x : ℝ => x ^ p


/-- Rectangles of countably spanning sets are countably spanning. -/
theorem IsCountablySpanning.prod {C : Set (Set α)} {D : Set (Set β)} (hC : IsCountablySpanning C)
    (hD : IsCountablySpanning D) : IsCountablySpanning (image2 (· ×ˢ ·) C D)

{α : Type u_1}
{β : Type u_3}
{C : Set (Set α)}
{D : Set (Set β)}
(hC : IsCountablySpanning C)
(hD : IsCountablySpanning D)

IsCountablySpanning (Set.image2 (fun x x_1 => x ×ˢ x_1) C D)


/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains.

See note [bundled maps over different rings] for why separate `R` and `S` semirings are used. -/
@[simps]
def prodEquiv [Module S M₂] [Module S M₃] [SMulCommClass R S M₂] [SMulCommClass R S M₃] :
    ((M →ₗ[R] M₂) × (M →ₗ[R] M₃)) ≃ₗ[S] M →ₗ[R] M₂ × M₃

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
(S : Type u_3)
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
[Module S M₂]
[Module S M₃]
[SMulCommClass R S M₂]
[SMulCommClass R S M₃]
(f : (M →ₗ[R] M₂) × (M →ₗ[R] M₃))

(LinearMap.prodEquiv S) f = f.1.prod f.2


/-- An implication of predicates `P → P'` induces a braided functor between full braided
subcategories. -/
@[simps!]
def fullBraidedSubcategory.map (h : ∀ ⦃X⦄, P X → P' X) :
    BraidedFunctor (FullSubcategory P) (FullSubcategory P')

∀ {X Y : CategoryTheory.FullSubcategory P} (f : X ⟶ Y),
  (CategoryTheory.MonoidalCategory.fullBraidedSubcategory.map h).map f = f


theorem gaugeRescale_def (s t : Set E) (x : E) :
    gaugeRescale s t x = (gauge s x / gauge t x) • x

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
(s t : Set E)
(x : E)


protected theorem le_total : ∀ (x y : Bool), x ≤ y ∨ y ≤ x


/-- An injective morphism of Lie modules embeds the lattice of submodules of the domain into that
of the target. -/
@[simps] def mapOrderEmbedding {f : M →ₗ⁅R,L⁆ M'} (hf : Function.Injective f) :
  LieSubmodule R L M ↪o LieSubmodule R L M'

{R : Type u}
{L : Type v}
{M : Type w}
{M' : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup M']
[Module R M']
[LieRingModule L M']
{f : M →ₗ⁅R,L⁆ M'}
(hf : Function.Injective ⇑f)
(N : LieSubmodule R L M)

(LieSubmodule.mapOrderEmbedding hf) N = LieSubmodule.map f N


@[simp, norm_cast]
theorem coe_iInf [@DecidableRel α (· ≤ ·)] (f : ι → Interval α) :
    ↑(⨅ i, f i) = ⋂ i, (f i : Set α)

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
[DecidableRel fun x x_1 => x ≤ x_1]
(f : ι → Interval α)


/-- Variant of `homMk'` where both objects are applications of `mk`. -/
@[simps]
def mkPrecomp (f : S.obj Y ⟶ T) (g : Y' ⟶ Y) : mk (S.map g ≫ f) ⟶ mk f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{T : D}
{Y Y' : C}
{S : CategoryTheory.Functor C D}
(f : S.obj Y ⟶ T)
(g : Y' ⟶ Y)

(CategoryTheory.CostructuredArrow.mkPrecomp f g).right =
  CategoryTheory.CategoryStruct.id
    (CategoryTheory.CostructuredArrow.mk (CategoryTheory.CategoryStruct.comp (S.map g) f)).right


theorem cons_equiv_eq_equiv_cons (α : Type*) (n : ℕ) (a : α) (s : Sym α n) :
    (a::symEquivSym' s) = symEquivSym' (a ::ₛ s)

(α : Type u_3)
(n : ℕ)
(a : α)
(s : Sym α n)

Sym.cons' a (Sym.symEquivSym' s) = Sym.symEquivSym' (a ::ₛ s)


theorem aemeasurable_biInf {ι} {μ : Measure δ} (s : Set ι) {f : ι → δ → α} (hs : s.Countable)
    (hf : ∀ i ∈ s, AEMeasurable (f i) μ) : AEMeasurable (fun b => ⨅ i ∈ s, f i b) μ

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[MeasurableSpace δ]
[ConditionallyCompleteLinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
{ι : Type u_5}
{μ : MeasureTheory.Measure δ}
(s : Set ι)
{f : ι → δ → α}
(hs : s.Countable)
(hf : ∀ i ∈ s, AEMeasurable (f i) μ)


@[reassoc]
lemma InjectiveResolution.isoRightDerivedObj_inv_naturality
    {X Y : C} (f : X ⟶ Y) (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0)
    (F : C ⥤ D) [F.Additive] (n : ℕ) :
    (I.isoRightDerivedObj F n).inv ≫ (F.rightDerived n).map f =
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map φ ≫
          (J.isoRightDerivedObj F n).inv

(I : CategoryTheory.InjectiveResolution X)

(J : CategoryTheory.InjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (I.ι.f 0) (φ.f 0) = CategoryTheory.CategoryStruct.comp f (J.ι.f 0))

CategoryTheory.CategoryStruct.comp (I.isoRightDerivedObj F n).inv ((F.rightDerived n).map f) =
  CategoryTheory.CategoryStruct.comp
    (((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp
          (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n)).map
      φ)
    (J.isoRightDerivedObj F n).inv


theorem Eventually.lt_top_iff_ne_top [PartialOrder β] [OrderTop β] {l : Filter α} {f : α → β} :
    (∀ᶠ x in l, f x < ⊤) ↔ ∀ᶠ x in l, f x ≠ ⊤

{α : Type u}
{β : Type v}
[PartialOrder β]
[OrderTop β]
{l : Filter α}
{f : α → β}

(∀ᶠ (x : α) in l, f x < ⊤) ↔ ∀ᶠ (x : α) in l, f x ≠ ⊤


theorem hom_trans (C : G.ComponentCompl L) (h : K ⊆ L) (h' : M ⊆ K) :
    C.hom (h'.trans h) = (C.hom h).hom h'

{V : Type u}
{G : SimpleGraph V}
{K L M : Set V}
(C : G.ComponentCompl L)
(h : K ⊆ L)
(h' : M ⊆ K)

SimpleGraph.ComponentCompl.hom ⋯ C = SimpleGraph.ComponentCompl.hom h' (SimpleGraph.ComponentCompl.hom h C)


@[to_additive]
lemma mulIndicator_le_mulIndicator (h : f a ≤ g a) : mulIndicator s f a ≤ mulIndicator s g a

{α : Type u_2}
{M : Type u_4}
[Preorder M]
[Zero M]
{s : Set α}
{f g : α → M}
{a : α}
(h : f a ≤ g a)


/-- Assemble an `I`-indexed family of natural isomorphisms into a single natural isomorphism.
-/
@[simps]
def pi' {E : Type*} [Category E] {F G : E ⥤ ∀ i, C i}
    (e : ∀ i, F ⋙ Pi.eval C i ≅ G ⋙ Pi.eval C i) : F ≅ G

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

{F G : CategoryTheory.Functor E ((i : I) → C i)}

(e : (i : I) → F.comp (CategoryTheory.Pi.eval C i) ≅ G.comp (CategoryTheory.Pi.eval C i))

(CategoryTheory.NatIso.pi' e).inv = CategoryTheory.NatTrans.pi' fun i => (e i).inv


/-- The elements of `A.nonunits` are those of the maximal ideal of `A` after coercion to `K`.

See also `mem_nonunits_iff_exists_mem_maximalIdeal`, which gets rid of the coercion to `K`,
at the expense of a more complicated right hand side.
 -/
theorem coe_mem_nonunits_iff {a : A} : (a : K) ∈ A.nonunits ↔ a ∈ LocalRing.maximalIdeal A

{K : Type u}
[Field K]
{A : ValuationSubring K}
{a : ↥A}

↑a ∈ A.nonunits ↔ a ∈ LocalRing.maximalIdeal ↥A


/-- The orbits of a normal subgroup form a block system -/
theorem IsBlockSystem.of_normal {N : Subgroup G} [N.Normal] :
    IsBlockSystem G (Set.range fun a : X => orbit N a)

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
{N : Subgroup G}
[N.Normal]

MulAction.IsBlockSystem G (Set.range fun a => MulAction.orbit (↥N) a)


theorem card_support_binomial {k m : ℕ} (h : k ≠ m) {x y : R} (hx : x ≠ 0) (hy : y ≠ 0) :
    card (support (C x * X ^ k + C y * X ^ m)) = 2

{R : Type u}
[Semiring R]
{k m : ℕ}
(h : k ≠ m)
{x y : R}
(hx : x ≠ 0)
(hy : y ≠ 0)

(Polynomial.C x * Polynomial.X ^ k + Polynomial.C y * Polynomial.X ^ m).support.card = 2


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

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


@[simp]
lemma fromColumns_fromRows_eq_fromBlocks (B₁₁ : Matrix m₁ n₁ R) (B₁₂ : Matrix m₁ n₂ R)
    (B₂₁ : Matrix m₂ n₁ R) (B₂₂ : Matrix m₂ n₂ R) :
    fromColumns (fromRows B₁₁ B₂₁) (fromRows B₁₂ B₂₂) = fromBlocks B₁₁ B₁₂ B₂₁ B₂₂

{R : Type u_1}
{m₁ : Type u_3}
{m₂ : Type u_4}
{n₁ : Type u_6}
{n₂ : Type u_7}
(B₁₁ : Matrix m₁ n₁ R)
(B₁₂ : Matrix m₁ n₂ R)
(B₂₁ : Matrix m₂ n₁ R)
(B₂₂ : Matrix m₂ n₂ R)

(B₁₁.fromRows B₂₁).fromColumns (B₁₂.fromRows B₂₂) = Matrix.fromBlocks B₁₁ B₁₂ B₂₁ B₂₂


theorem toTopologicalSpace_mono {u₁ u₂ : UniformSpace α} (h : u₁ ≤ u₂) :
    @UniformSpace.toTopologicalSpace _ u₁ ≤ @UniformSpace.toTopologicalSpace _ u₂

{α : Type ua}
{u₁ u₂ : UniformSpace α}
(h : u₁ ≤ u₂)


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


@[to_additive]
theorem smoothWithinAt_finset_prod (h : ∀ i ∈ t, SmoothWithinAt I' I (f i) s x) :
    SmoothWithinAt I' I (fun x => ∏ i ∈ t, f i x) s x

SmoothWithinAt I' I (fun x => ∑ i ∈ t, f i x) s x


theorem hasDerivAt_update (x : ι → 𝕜) (i : ι) (y : 𝕜) :
    HasDerivAt (Function.update x i) (Pi.single i (1 : 𝕜)) y

{𝕜 : Type u_1}
{ι : Type u_2}
[DecidableEq ι]
[Fintype ι]
[NontriviallyNormedField 𝕜]
(x : ι → 𝕜)
(i : ι)
(y : 𝕜)

HasDerivAt (Function.update x i) (Pi.single i 1) y


theorem degree_mono [Semiring S] {f : R[X]} {g : S[X]} (h : f.support ⊆ g.support) :
    f.degree ≤ g.degree

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R[X]}
{g : S[X]}
(h : f.support ⊆ g.support)


@[simp]
theorem le_neg_one_iff {a : SignType} : a ≤ -1 ↔ a = -1


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


@[to_additive]
theorem uniformity_mulOpposite [UniformSpace α] :
    𝓤 αᵐᵒᵖ = comap (fun q : αᵐᵒᵖ × αᵐᵒᵖ => (q.1.unop, q.2.unop)) (𝓤 α)

𝓤 αᵃᵒᵖ = Filter.comap (fun q => (AddOpposite.unop q.1, AddOpposite.unop q.2)) (𝓤 α)


theorem decide_eq_true_iff (p : Prop) [Decidable p] : (decide p = true) ↔ p


theorem eLpNorm_const_lt_top_iff {p : ℝ≥0∞} {c : F} (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞) :
    eLpNorm (fun _ : α => c) p μ < ∞ ↔ c = 0 ∨ μ Set.univ < ∞

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

MeasureTheory.eLpNorm (fun x => c) p μ < ⊤ ↔ c = 0 ∨ μ Set.univ < ⊤


theorem mapDomain_injOn (S : Set α) {f : α → β} (hf : Set.InjOn f S) :
    Set.InjOn (mapDomain f : (α →₀ M) → β →₀ M) { w | (w.support : Set α) ⊆ S }

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(S : Set α)
{f : α → β}
(hf : Set.InjOn f S)

Set.InjOn (Finsupp.mapDomain f) {w | ↑w.support ⊆ S}


protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀ b, LipschitzWith Kα fun a => f a b)
    (hβ : ∀ a, LipschitzWith Kβ (f a)) : LipschitzWith (Kα + Kβ) (Function.uncurry f)

{f : α → β → γ}

(hα : ∀ (b : β), LipschitzWith Kα fun a => f a b)

(hβ : ∀ (a : α), LipschitzWith Kβ (f a))


/-- If `f' : ℂ → E` is a derivative of a complex differentiable function on the circle
`Metric.sphere c R`, then `∮ z in C(c, R), f' z = 0`. -/
theorem integral_eq_zero_of_hasDerivWithinAt {f f' : ℂ → E} {c : ℂ} {R : ℝ} (hR : 0 ≤ R)
    (h : ∀ z ∈ sphere c R, HasDerivWithinAt f (f' z) (sphere c R) z) : (∮ z in C(c, R), f' z) = 0

(h : ∀ z ∈ Metric.sphere c R, HasDerivWithinAt f (f' z) (Metric.sphere c R) z)


theorem subtype_mk (h : AEMeasurable f μ) {s : Set β} {hfs : ∀ x, f x ∈ s} :
    AEMeasurable (codRestrict f s hfs) μ

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
(h : AEMeasurable f μ)
{s : Set β}
{hfs : ∀ (x : α), f x ∈ s}

AEMeasurable (Set.codRestrict f s hfs) μ


@[simp]
theorem comap_exp_nhdsWithin_Ioi_zero : comap exp (𝓝[>] 0) = atBot

Filter.comap Real.exp (𝓝[>] 0) = Filter.atBot


theorem WellFounded.finite_ne_bot_of_independent (hwf : WellFounded ((· > ·) : α → α → Prop))
    {ι : Type*} {t : ι → α} (ht : Independent t) : Set.Finite {i | t i ≠ ⊥}

(hwf : WellFounded fun x x_1 => x > x_1)


theorem fromOpenSubsetsGlue_openEmbedding : OpenEmbedding (fromOpenSubsetsGlue U)

{α : Type u}
[TopologicalSpace α]
{J : Type u}
(U : J → TopologicalSpace.Opens α)


theorem span_singleton_group_smul_eq {G} [Group G] [SMul G R] [MulAction G M] [IsScalarTower G R M]
    (g : G) (x : M) : (R ∙ g • x) = R ∙ x

(R : Type u_1)
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{G : Type u_9}
[Group G]
[SMul G R]
[MulAction G M]
[IsScalarTower G R M]
(g : G)
(x : M)

Submodule.span R {g • x} = Submodule.span R {x}


@[simp]
theorem braiding_hom_apply {M N : ModuleCat.{u} R} (m : M) (n : N) :
    ((β_ M N).hom : M ⊗ N ⟶ N ⊗ M) (m ⊗ₜ n) = n ⊗ₜ m

{R : Type u}
[CommRing R]
{M N : ModuleCat R}
(m : ↑M)
(n : ↑N)


theorem pi_Iic_mem_nhds (ha : ∀ i, x i < a i) : Iic a ∈ 𝓝 x

{ι : Type u_1}
{π : ι → Type u_2}
[Finite ι]
[(i : ι) → LinearOrder (π i)]
[(i : ι) → TopologicalSpace (π i)]
[∀ (i : ι), OrderTopology (π i)]
{a x : (i : ι) → π i}
(ha : ∀ (i : ι), x i < a i)


@[simp]
lemma algebraTensorAlgEquiv_symm_X (s : σ) :
    (algebraTensorAlgEquiv R A).symm (X s) = 1 ⊗ₜ X s

(R : Type u)
[CommSemiring R]
{σ : Type u_1}
(A : Type u_3)
[CommSemiring A]
[Algebra R A]
(s : σ)

(MvPolynomial.algebraTensorAlgEquiv R A).symm (MvPolynomial.X s) = 1 ⊗ₜ[R] MvPolynomial.X s


@[simp]
theorem aroots_C [CommRing S] [IsDomain S] [Algebra T S] (a : T) : (C a).aroots S = 0

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]
(a : T)


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

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


theorem liftInclusion_of {i : ι} (x : S i) :
    (liftInclusion S) (of L ι _ (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) i x)
    = Substructure.subtype (S i) x

{L : FirstOrder.Language}
{ι : Type v}
[Preorder ι]
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{M : Type u_1}
[L.Structure M]
(S : ι →o L.Substructure M)
{i : ι}
(x : ↥(S i))

(FirstOrder.Language.DirectLimit.liftInclusion S)
    ((FirstOrder.Language.DirectLimit.of L ι (fun x => ↥(S x))
        (fun x x_1 h => FirstOrder.Language.Substructure.inclusion ⋯) i)
      x) =
  (S i).subtype x


/-- In a field `F`, `X ^ n - 1` is separable iff `↑n ≠ 0`. -/
theorem X_pow_sub_one_separable_iff {n : ℕ} : (X ^ n - 1 : F[X]).Separable ↔ (n : F) ≠ 0

(Polynomial.X ^ n - 1).Separable ↔ ↑n ≠ 0


@[simp]
theorem bsup_zero (f : ∀ a < (0 : Ordinal), Ordinal) : bsup 0 f = 0

(f : (a : Ordinal.{u_4}) → a < 0 → Ordinal.{max u_4 u_5})


theorem f_nat_eq (hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + log y) (hn : n ≠ 0) :
    f n = f 1 + log (n - 1)!

(hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + Real.log y)


/-- A *tree* is a connected acyclic graph. -/
@[mk_iff]
structure IsTree : Prop where
  /-- Graph is connected. -/
  protected isConnected : G.Connected
  /-- Graph is acyclic. -/
  protected IsAcyclic : G.IsAcyclic

{V : Type u}
{G : SimpleGraph V}
(self : G.IsTree)


/-- `padicValRat p 1` is `0` for any `p`. -/
@[simp]
protected theorem one : padicValRat p 1 = 0


theorem IsCoprime.of_mul_right_right (H : IsCoprime x (y * z)) : IsCoprime x z

{R : Type u}
[CommSemiring R]
{x y z : R}
(H : IsCoprime x (y * z))


theorem continuousWithinAt_setToFun_of_dominated (hT : DominatedFinMeasAdditive μ T C)
    {fs : X → α → E} {x₀ : X} {bound : α → ℝ} {s : Set X}
    (hfs_meas : ∀ᶠ x in 𝓝[s] x₀, AEStronglyMeasurable (fs x) μ)
    (h_bound : ∀ᶠ x in 𝓝[s] x₀, ∀ᵐ a ∂μ, ‖fs x a‖ ≤ bound a) (bound_integrable : Integrable bound μ)
    (h_cont : ∀ᵐ a ∂μ, ContinuousWithinAt (fun x => fs x a) s x₀) :
    ContinuousWithinAt (fun x => setToFun μ T hT (fs x)) s x₀

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hfs_meas : ∀ᶠ (x : X) in 𝓝[s] x₀, MeasureTheory.AEStronglyMeasurable (fs x) μ)

(h_bound : ∀ᶠ (x : X) in 𝓝[s] x₀, ∀ᵐ (a : α) ∂μ, ‖fs x a‖ ≤ bound a)

(bound_integrable : MeasureTheory.Integrable bound μ)

(h_cont : ∀ᵐ (a : α) ∂μ, ContinuousWithinAt (fun x => fs x a) s x₀)

ContinuousWithinAt (fun x => MeasureTheory.setToFun μ T hT (fs x)) s x₀


/-- Extract the functor `J ⥤ C` consisting of the cocone points and the maps between them,
from a `DiagramOfCocones`.
-/
@[simps]
def DiagramOfCocones.coconePoints (D : DiagramOfCocones F) : J ⥤ C

(D : CategoryTheory.Limits.DiagramOfCocones F)

∀ {X Y : J} (f : X ⟶ Y), D.coconePoints.map f = (D.map f).hom


/-- An ideal `I` is prime if its complement is a filter.
-/
@[mk_iff]
class IsPrime [Preorder P] (I : Ideal P) extends IsProper I : Prop where
  compl_filter : IsPFilter (I : Set P)ᶜ

{P : Type u_1}
[Preorder P]
(I : Order.Ideal P)

I.IsPrime ↔ I.IsProper ∧ Order.IsPFilter (↑I)ᶜ


/-- **Maximum modulus principle** on a closed ball: if `f : E → F` is continuous on a closed ball,
is complex differentiable on the corresponding open ball, and the norm `‖f w‖` takes its maximum
value on the open ball at its center, then the norm `‖f w‖` is constant on the closed ball.  -/
theorem norm_eqOn_closedBall_of_isMaxOn {f : E → F} {z : E} {r : ℝ}
    (hd : DiffContOnCl ℂ f (ball z r)) (hz : IsMaxOn (norm ∘ f) (ball z r) z) :
    EqOn (norm ∘ f) (const E ‖f z‖) (closedBall z r)

(hd : DiffContOnCl ℂ f (Metric.ball z r))

(hz : IsMaxOn (norm ∘ f) (Metric.ball z r) z)

Set.EqOn (norm ∘ f) (Function.const E ‖f z‖) (Metric.closedBall z r)


/-- Let `V` be a real topological vector space. A subset of `V` is a convex body if and only if
it is convex, compact, and nonempty.
-/
structure ConvexBody (V : Type*) [TopologicalSpace V] [AddCommMonoid V] [SMul ℝ V] where
  /-- The **carrier set** underlying a convex body: the set of points contained in it -/
  carrier : Set V
  /-- A convex body has convex carrier set -/
  convex' : Convex ℝ carrier
  /-- A convex body has compact carrier set -/
  isCompact' : IsCompact carrier
  /-- A convex body has non-empty carrier set -/
  nonempty' : carrier.Nonempty

{V : Type u_2}
[TopologicalSpace V]
[AddCommMonoid V]
[SMul ℝ V]
(self : ConvexBody V)


@[to_additive]
theorem mul_ne_mul_left (a : G) {b c : G} : b * a ≠ c * a ↔ b ≠ c

{G : Type u_3}
[Mul G]
[IsRightCancelMul G]
(a : G)
{b c : G}


theorem IsBoundedLinearMap.fderivWithin (h : IsBoundedLinearMap 𝕜 f)
    (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 f s x = h.toContinuousLinearMap

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s : Set E}
(h : IsBoundedLinearMap 𝕜 f)
(hxs : UniqueDiffWithinAt 𝕜 s x)


@[simp]
theorem coe_inclusion {S T : L.Substructure M} (h : S ≤ T) :
    (inclusion h : S → T) = Set.inclusion h

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

⇑(FirstOrder.Language.Substructure.inclusion h) = Set.inclusion h


theorem exists_basis (M : Matroid α) (X : Set α) (hX : X ⊆ M.E := by aesop_mat) :
    ∃ I, M.Basis I X

{α : Type u_1}
(M : Matroid α)
(X : Set α)
(hX : X ⊆ M.E := by aesop_mat)


lemma rnDeriv_gaussianReal (μ : ℝ) (v : ℝ≥0) :
    ∂(gaussianReal μ v)/∂volume =ₐₛ gaussianPDF μ v

(ProbabilityTheory.gaussianReal μ v).rnDeriv MeasureTheory.volume =ᵐ[MeasureTheory.volume]
  ProbabilityTheory.gaussianPDF μ v


theorem measurable (hf : ∀ i, AEMeasurable (f i) μ) (p : α → (ι → β) → Prop) (i : ι) :
    Measurable (aeSeq hf p i)

{ι : Sort u_1}
{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{f : ι → α → β}
{μ : MeasureTheory.Measure α}
(hf : ∀ (i : ι), AEMeasurable (f i) μ)
(p : α → (ι → β) → Prop)
(i : ι)


theorem orbit_eq_carrier_conjClasses (g : G) :
    orbit (ConjAct G) g = (ConjClasses.mk g).carrier

MulAction.orbit (ConjAct G) g = (ConjClasses.mk g).carrier


/-- The *Euler Product* for multiplicative (on coprime arguments) functions.

If `f : ℕ → R`, where `R` is a complete normed commutative ring, `f 0 = 0`, `f 1 = 1`, `f` is
multiplicative on coprime arguments, and `‖f ·‖` is summable, then
`∏' p : Nat.Primes, ∑' e, f (p ^ e) = ∑' n, f n`. This version is stated using `HasProd`. -/
theorem eulerProduct_hasProd (hsum : Summable (‖f ·‖)) (hf₀ : f 0 = 0) :
    HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)

(hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n)

HasProd (fun p => ∑' (e : ℕ), f (↑p ^ e)) (∑' (n : ℕ), f n)


theorem StrictAnti.injective (hf : StrictAnti f) : Injective f

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


/-- Every finitely generated substructure of the direct limit corresponds to some
substructure in some component of the directed system. -/
theorem exists_fg_substructure_in_Sigma (S : L.Substructure (DirectLimit G f)) (S_fg : S.FG) :
    ∃ i, ∃ T : L.Substructure (G i), T.map (of L ι G f i).toHom = S

[DirectedSystem G fun i j h => ⇑(f i j h)]

(S : L.Substructure (FirstOrder.Language.DirectLimit G f))

∃ i T, FirstOrder.Language.Substructure.map (FirstOrder.Language.DirectLimit.of L ι G f i).toHom T = S


@[simp] lemma cfc_apply_zero {f : R → R} : cfc f (0 : A) = algebraMap R A (f 0)

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
{f : R → R}


/-- The inner product of a nonzero vector with a positive multiple of
itself, divided by the product of their norms, has value 1. -/
theorem real_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_pos_mul {x : F} {r : ℝ} (hx : x ≠ 0)
    (hr : 0 < r) : ⟪x, r • x⟫_ℝ / (‖x‖ * ‖r • x‖) = 1

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{x : F}
{r : ℝ}
(hx : x ≠ 0)
(hr : 0 < r)


theorem count_mul_of_coprime [DecidableEq (Associates α)] {a : Associates α} {b : Associates α}
    (hb : b ≠ 0) {p : Associates α} (hp : Irreducible p) (hab : ∀ d, d ∣ a → d ∣ b → ¬Prime d) :
    count p a.factors = 0 ∨ count p a.factors = count p (a * b).factors

[(p : Associates α) → Decidable (Irreducible p)]

(hab : ∀ (d : Associates α), d ∣ a → d ∣ b → ¬Prime d)

p.count a.factors = 0 ∨ p.count a.factors = p.count (a * b).factors


/-- The property of being a sheaf is preserved by isomorphism. -/
theorem isSheaf_iso {P' : Cᵒᵖ ⥤ Type w} (i : P ≅ P') (h : IsSheaf J P) : IsSheaf J P'

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

(J : CategoryTheory.GrothendieckTopology C)

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

(h : CategoryTheory.Presieve.IsSheaf J P)


@[to_additive]
theorem finprod_of_infinite_mulSupport {f : α → M} (hf : (mulSupport f).Infinite) :
    ∏ᶠ i, f i = 1

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
(hf : (Function.mulSupport f).Infinite)


@[simp]
theorem lie_zero : ⁅x, 0⁆ = (0 : M)

{L : Type v}
{M : Type w}
[LieRing L]
[AddCommGroup M]
[LieRingModule L M]
(x : L)


/-- A flat cone is always pointed (contains `0`). -/
theorem Flat.pointed {S : ConvexCone 𝕜 E} (hS : S.Flat) : S.Pointed

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
{S : ConvexCone 𝕜 E}
(hS : S.Flat)


theorem support_rangeIcc_subset [DecidableEq ι] [∀ i, DecidableEq (α i)] :
    (f.rangeIcc g).support ⊆ f.support ∪ g.support

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
{f g : Π₀ (i : ι), α i}
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]


@[to_additive]
theorem mem_normalizer_iff'' {g : G} : g ∈ H.normalizer ↔ ∀ h : G, h ∈ H ↔ g⁻¹ * h * g ∈ H

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

g ∈ H.normalizer ↔ ∀ (h : G), h ∈ H ↔ g⁻¹ * h * g ∈ H


theorem rTensor_mul (f g : Module.End R N) : (f * g).rTensor M = f.rTensor M * g.rTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f g : Module.End R N)

LinearMap.rTensor M (f * g) = LinearMap.rTensor M f * LinearMap.rTensor M g


lemma filter_comm (q) [DecidablePred q] (s : Multiset α) :
    filter p (filter q s) = filter q (filter p s)

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

Multiset.filter p (Multiset.filter q s) = Multiset.filter q (Multiset.filter p s)


/-- The backward direction for `functorProdFunctorEquiv` -/
@[simps]
def functorProdToProdFunctor : (A ⥤ B × C) ⥤ (A ⥤ B) × (A ⥤ C)

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

∀ {X Y : CategoryTheory.Functor A (B × C)} (α : X ⟶ Y),
  (CategoryTheory.functorProdToProdFunctor A B C).map α =
    ({ app := fun X_1 => (α.app X_1).1, naturality := ⋯ }, { app := fun X_1 => (α.app X_1).2, naturality := ⋯ })


/-- Taking the product under `h` is an additive-to-multiplicative homomorphism of finsupps,
if `h` is an additive-to-multiplicative homomorphism.
This is a more specialized version of `Finsupp.prod_add_index` with simpler hypotheses. -/
@[to_additive
      "Taking the sum under `h` is an additive homomorphism of finsupps,if `h` is an additive
      homomorphism. This is a more specific version of `Finsupp.sum_add_index` with simpler
      hypotheses."]
theorem prod_add_index' [AddZeroClass M] [CommMonoid N] {f g : α →₀ M} {h : α → M → N}
    (h_zero : ∀ a, h a 0 = 1) (h_add : ∀ a b₁ b₂, h a (b₁ + b₂) = h a b₁ * h a b₂) :
    (f + g).prod h = f.prod h * g.prod h

(h_add : ∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ * h a b₂)


lemma CovBy.of_le_of_lt (hac : a ⋖ c) (hab : a ≤ b) (hbc : b < c) : b ⋖ c

{α : Type u_1}
[Preorder α]
{a b c : α}
(hac : a ⋖ c)
(hab : a ≤ b)
(hbc : b < c)


theorem mem_closure_iff_exists_list {R} [Semiring R] {s : Set R} {x} :
    x ∈ closure s ↔ ∃ L : List (List R), (∀ t ∈ L, ∀ y ∈ t, y ∈ s) ∧ (L.map List.prod).sum = x

{R : Type u_1}
[Semiring R]
{s : Set R}
{x : R}

x ∈ Subsemiring.closure s ↔ ∃ L, (∀ t ∈ L, ∀ y ∈ t, y ∈ s) ∧ (List.map List.prod L).sum = x


@[simp] theorem le_compl_self : a ≤ aᶜ ↔ a = ⊥

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

a ≤ aᶜ ↔ a = ⊥


@[simp] lemma lift_bot : lift (⊥ : α) = ⊥

{α : Type u_1}
[GeneralizedBooleanAlgebra α]


theorem map_sub₂ (f : M →SL[ρ₁₂] F →SL[σ₁₂] G') (x x' : M) (y : F) :
    f (x - x') y = f x y - f x' y

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{R : Type u_5}
{𝕜₂ : Type u_6}
{𝕜' : Type u_7}
[NontriviallyNormedField 𝕜']
[NontriviallyNormedField 𝕜₂]
{M : Type u_8}
[TopologicalSpace M]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{G' : Type u_9}
[NormedAddCommGroup G']
[NormedSpace 𝕜₂ G']
[NormedSpace 𝕜' G']
[SMulCommClass 𝕜₂ 𝕜' G']
[Ring R]
[AddCommGroup M]
[Module R M]
{ρ₁₂ : R →+* 𝕜'}
(f : M →SL[ρ₁₂] F →SL[σ₁₂] G')
(x x' : M)
(y : F)


@[simp] theorem dist_toDual (a b : X) : dist (toDual a) (toDual b) = dist a b

dist (OrderDual.toDual a) (OrderDual.toDual b) = dist a b


@[to_additive]
theorem OneHomClass.bound_of_antilipschitz [OneHomClass 𝓕 E F] (f : 𝓕) {K : ℝ≥0}
    (h : AntilipschitzWith K f) (x) : ‖x‖ ≤ K * ‖f x‖

{𝓕 : Type u_1}
{E : Type u_3}
{F : Type u_4}
[SeminormedGroup E]
[SeminormedGroup F]
[FunLike 𝓕 E F]
[OneHomClass 𝓕 E F]
(f : 𝓕)
{K : ℝ≥0}
(h : AntilipschitzWith K ⇑f)
(x : E)

‖x‖ ≤ ↑K * ‖f x‖


/-- If `A` is a family of enough low-degree polynomials over a finite ring,
there is a pair of elements in `A` (with different indices but not necessarily
distinct), such that their difference has small degree. -/
theorem exists_approx_polynomial_aux [Ring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
    (b : Fq[X]) (A : Fin m.succ → Fq[X]) (hA : ∀ i, degree (A i) < degree b) :
    ∃ i₀ i₁, i₀ ≠ i₁ ∧ degree (A i₁ - A i₀) < ↑(natDegree b - d)

(hA : ∀ (i : Fin m.succ), (A i).degree < b.degree)

∃ i₀ i₁, i₀ ≠ i₁ ∧ (A i₁ - A i₀).degree < ↑(b.natDegree - d)


theorem iInf_lt_iff {f : ι → α} : iInf f < a ↔ ∃ i, f i < a

{α : Type u_1}
{ι : Sort u_5}
[CompleteLinearOrder α]
{a : α}
{f : ι → α}


/-- Identity map as a `DilationEquiv`. -/
@[simps! (config := .asFn) apply]
def refl (X : Type*) [PseudoEMetricSpace X] : X ≃ᵈ X


theorem abs_sum_of_nonneg' {G : Type*} [LinearOrderedAddCommGroup G] {f : ι → G} {s : Finset ι}
    (hf : ∀ i, 0 ≤ f i) : |∑ i ∈ s, f i| = ∑ i ∈ s, f i

{ι : Type u_1}
{G : Type u_9}
[LinearOrderedAddCommGroup G]
{f : ι → G}
{s : Finset ι}
(hf : ∀ (i : ι), 0 ≤ f i)


@[integral_simps]
theorem integral_sub (f g : α →₁[μ] E) : integral (f - g) = integral f - integral g

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]
[CompleteSpace E]
(f g : ↥(MeasureTheory.Lp E 1 μ))

MeasureTheory.L1.integral (f - g) = MeasureTheory.L1.integral f - MeasureTheory.L1.integral g


@[simp]
theorem map_zero [Nonempty ι] : f 0 = 0

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


theorem exact' {a b : α} :
    (Quotient.mk'' a : Quotient s₁) = Quotient.mk'' b → @Setoid.r _ s₁ a b

{α : Sort u_1}
{s₁ : Setoid α}
{a b : α}

Quotient.mk'' a = Quotient.mk'' b → Setoid.r a b


theorem finset_inf_arrow_factors {I : Type*} {B : C} (s : Finset I) (P : I → Subobject B) (i : I)
    (m : i ∈ s) : (P i).Factors (s.inf P).arrow

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{I : Type u_1}
{B : C}
(s : Finset I)
(P : I → CategoryTheory.Subobject B)
(i : I)
(m : i ∈ s)


@[reassoc (attr := simp)]
theorem pullbackAssoc_inv_snd [HasPullback ((pullback.snd _ _ : Z₁ ⟶ X₂) ≫ f₃) f₄]
    [HasPullback f₁ ((pullback.fst _ _ : Z₂ ⟶ X₂) ≫ f₂)] :
    (pullbackAssoc f₁ f₂ f₃ f₄).inv ≫ pullback.snd _ _ = pullback.snd _ _ ≫ pullback.snd _ _

[CategoryTheory.Limits.HasPullback (CategoryTheory.Limits.pullback.snd f₁ f₂ ≫ f₃) f₄]

[CategoryTheory.Limits.HasPullback f₁ (CategoryTheory.Limits.pullback.fst f₃ f₄ ≫ f₂)]

(CategoryTheory.Limits.pullbackAssoc f₁ f₂ f₃ f₄).inv ≫
    CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.snd f₁ f₂ ≫ f₃) f₄ =
  CategoryTheory.Limits.pullback.snd f₁ (CategoryTheory.Limits.pullback.fst f₃ f₄ ≫ f₂) ≫
    CategoryTheory.Limits.pullback.snd f₃ f₄


@[simp] lemma smul_mk (φ : K →+* ℂ) : σ • mk φ = mk (φ.comp σ.symm)

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
(σ : K ≃ₐ[k] K)
(φ : K →+* ℂ)

σ • NumberField.InfinitePlace.mk φ = NumberField.InfinitePlace.mk (φ.comp ↑σ.symm)


/-- `RingInvoClass F R` states that `F` is a type of ring involutions.
You should extend this class when you extend `RingInvo`. -/
class RingInvoClass (F R : Type*) [Semiring R] [EquivLike F R Rᵐᵒᵖ]
  extends RingEquivClass F R Rᵐᵒᵖ : Prop where
  /-- Every ring involution must be its own inverse -/
  involution : ∀ (f : F) (x), (f (f x).unop).unop = x

{F : Type u_3}
{R : Type u_4}
[Semiring R]
[EquivLike F R Rᵐᵒᵖ]
[self : RingInvoClass F R]
(f : F)
(x : R)

MulOpposite.unop (f (MulOpposite.unop (f x))) = x


theorem norm_rpow_eq_tsum (hp : 0 < p.toReal) (f : lp E p) :
    ‖f‖ ^ p.toReal = ∑' i, ‖f i‖ ^ p.toReal

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
(hp : 0 < p.toReal)
(f : ↥(lp E p))

‖f‖ ^ p.toReal = ∑' (i : α), ‖↑f i‖ ^ p.toReal


@[simp]
theorem deriv_inv' : (deriv fun x : 𝕜 => x⁻¹) = fun x => -(x ^ 2)⁻¹

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]

(deriv fun x => x⁻¹) = fun x => -(x ^ 2)⁻¹


@[to_additive]
theorem trivial_normal : IsNormalSubgroup (trivial G)


theorem adjointifyCounit_left_triangle (η : 𝟙 a ≅ f ≫ g) (ε : g ≫ f ≅ 𝟙 b) :
    leftZigzagIso η (adjointifyCounit η ε) = λ_ f ≪≫ (ρ_ f).symm

(η : CategoryTheory.CategoryStruct.id a ≅ CategoryTheory.CategoryStruct.comp f g)

(ε : CategoryTheory.CategoryStruct.comp g f ≅ CategoryTheory.CategoryStruct.id b)

CategoryTheory.Bicategory.leftZigzagIso η (CategoryTheory.Bicategory.adjointifyCounit η ε) =
  CategoryTheory.Bicategory.leftUnitor f ≪≫ (CategoryTheory.Bicategory.rightUnitor f).symm


@[simp]
theorem normalCore_eq_self (H : Subgroup G) [H.Normal] : H.normalCore = H

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


{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
{cs : CoxeterSystem M W}
{t : W}
(ht : cs.IsReflection t)