@[simp]
theorem cast_cast {i j k} (h : i = j) (h' : j = k) (a : ⨂[R]^i M) :
    cast R M h' (cast R M h a) = cast R M (h.trans h') a

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{i j k : ℕ}
(h : i = j)
(h' : j = k)
(a : ⨂[R]^i M)

(TensorPower.cast R M h') ((TensorPower.cast R M h) a) = (TensorPower.cast R M ⋯) a


@[to_additive (attr := simp)]
theorem prod_univ_get [CommMonoid α] (l : List α) : ∏ i : Fin l.length, l[i.1] = l.prod

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


/-- The preimage of a nontrivial set under a surjective map is nontrivial. -/
theorem Nontrivial.preimage {s : Set β} (hs : s.Nontrivial) {f : α → β}
    (hf : Function.Surjective f) : (f ⁻¹' s).Nontrivial

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


@[simp]
lemma piCongrLeft_symm_apply (g : ∀ b, P b) (a : α) :
    (piCongrLeft P e).symm g a = g (e a)

{β : Sort u_1}
{α : Sort u_2}
(P : β → Sort w)
(e : α ≃ β)
(g : (b : β) → P b)
(a : α)

(Equiv.piCongrLeft P e).symm g a = g (e a)


theorem wbtw_smul_vadd_smul_vadd_of_nonneg_of_nonpos (x : P) (v : V) {r₁ r₂ : R} (hr₁ : 0 ≤ r₁)
    (hr₂ : r₂ ≤ 0) : Wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(v : V)
{r₁ r₂ : R}
(hr₁ : 0 ≤ r₁)
(hr₂ : r₂ ≤ 0)


private lemma erase_eq_iff (hs : a ∉ s) : t.erase a = s ↔ t = s ∨ t = insert a s

{α : Type u_1}
[DecidableEq α]
{a : α}
{s t : Finset α}
(hs : a ∉ s)


@[to_additive]
theorem normalizer_eq_top : H.normalizer = ⊤ ↔ H.Normal

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}


theorem mul_eq_right {a b : Cardinal} (hb : ℵ₀ ≤ b) (ha : a ≤ b) (ha' : a ≠ 0) : a * b = b

{a b : Cardinal.{u_1}}
(hb : ℵ₀ ≤ b)
(ha : a ≤ b)
(ha' : a ≠ 0)


@[simp]
theorem tan_neg : tan (-x) = -tan x


theorem plus_hom_ext {P Q : Cᵒᵖ ⥤ D} (η γ : J.plusObj P ⟶ Q) (hQ : Presheaf.IsSheaf J Q)
    (h : J.toPlus P ≫ η = J.toPlus P ≫ γ) : η = γ

(J : CategoryTheory.GrothendieckTopology C)

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

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

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

(hQ : CategoryTheory.Presheaf.IsSheaf J Q)

(h : CategoryTheory.CategoryStruct.comp (J.toPlus P) η = CategoryTheory.CategoryStruct.comp (J.toPlus P) γ)


@[to_additive]
theorem NeBot.smul_filter : f.NeBot → (a • f).NeBot

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


@[simp] theorem getLsb_cons (b : Bool) {n} (x : BitVec n) (i : Nat) :
    getLsb (cons b x) i = if i = n then b else getLsb x i

(b : Bool)
{n : Nat}
(x : BitVec n)
(i : Nat)

(BitVec.cons b x).getLsb i = if i = n then b else x.getLsb i


/-- A normed star group is a normed group with a compatible `star` which is isometric. -/
class NormedStarGroup (E : Type*) [SeminormedAddCommGroup E] [StarAddMonoid E] : Prop where
  norm_star : ∀ x : E, ‖x⋆‖ = ‖x‖

{E : Type u_1}
[SeminormedAddCommGroup E]
[StarAddMonoid E]
[self : NormedStarGroup E]
(x : E)


/-- If a sequence is Cauchy in the `lp E p` topology and pointwise convergent to an element `f` of
`lp E p`, then it converges to `f` in the `lp E p` topology. -/
theorem tendsto_lp_of_tendsto_pi {F : ℕ → lp E p} (hF : CauchySeq F) {f : lp E p}
    (hf : Tendsto (id fun i => F i : ℕ → ∀ a, E a) atTop (𝓝 f)) : Tendsto F atTop (𝓝 f)

(hf : Filter.Tendsto (id fun i => ↑(F i)) Filter.atTop (nhds ↑f))


@[simp]
theorem filter_eq_self {l} : filter p l = l ↔ ∀ a ∈ l, p a

∀ {α : Type u_1} {p : α → Bool} {l : List α}, List.filter p l = l ↔ ∀ (a : α), a ∈ l → p a = true


theorem natDegree_lt_coeff_mul (h : p.natDegree + q.natDegree < m + n) :
    (p * q).coeff (m + n) = 0

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


@[ext] theorem ext ⦃inst₁ inst₂ : NonUnitalNonAssocSemiring R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂


protected theorem Nodup.powersetCard {n : ℕ} {s : Multiset α} (h : Nodup s) :
    Nodup (powersetCard n s)

{α : Type u_1}
{n : ℕ}
{s : Multiset α}
(h : s.Nodup)


lemma WEqualsLocallyBijective.mk' [HasWeakSheafify J A] [(forget A).ReflectsIsomorphisms]
    [J.HasSheafCompose (forget A)]
    [∀ (P : Cᵒᵖ ⥤ A), Presheaf.IsLocallyInjective J (CategoryTheory.toSheafify J P)]
    [∀ (P : Cᵒᵖ ⥤ A), Presheaf.IsLocallySurjective J (CategoryTheory.toSheafify J P)] :
    J.WEqualsLocallyBijective A

[∀ (P : CategoryTheory.Functor Cᵒᵖ A), CategoryTheory.Presheaf.IsLocallyInjective J (CategoryTheory.toSheafify J P)]

[∀ (P : CategoryTheory.Functor Cᵒᵖ A), CategoryTheory.Presheaf.IsLocallySurjective J (CategoryTheory.toSheafify J P)]


theorem latticeBasis_repr_apply (x : K) (i : ChooseBasisIndex ℤ (𝓞 K)) :
    (latticeBasis K).repr (mixedEmbedding K x) i = (integralBasis K).repr x i

(i : Module.Free.ChooseBasisIndex ℤ (NumberField.RingOfIntegers K))

((NumberField.mixedEmbedding.latticeBasis K).repr ((NumberField.mixedEmbedding K) x)) i =
  ↑(((NumberField.integralBasis K).repr x) i)


theorem Prime.factorization_pos_of_dvd {n p : ℕ} (hp : p.Prime) (hn : n ≠ 0) (h : p ∣ n) :
    0 < n.factorization p

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


@[to_additive]
theorem isComplement_singleton_left {g : G} : IsComplement {g} S ↔ S = univ

{G : Type u_1}
[Group G]
{S : Set G}
{g : G}

Subgroup.IsComplement {g} S ↔ S = Set.univ


@[to_additive]
theorem finiteIndex_iInf' {ι : Type*} {s : Finset ι}
    (f : ι → Subgroup G) (hs : ∀ i ∈ s, (f i).FiniteIndex) :
    (⨅ i ∈ s, f i).FiniteIndex

{G : Type u_1}
[AddGroup G]
{ι : Type u_3}
{s : Finset ι}
(f : ι → AddSubgroup G)
(hs : ∀ i ∈ s, (f i).FiniteIndex)


theorem condexpInd_of_measurable (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) (c : G) :
    condexpInd G hm μ s c = indicatorConstLp 1 (hm s hs) hμs c

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(c : G)

(MeasureTheory.condexpInd G hm μ s) c = MeasureTheory.indicatorConstLp 1 ⋯ hμs c


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

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


theorem colimit_sound' {j j' : J} {x : F.obj j} {x' : F.obj j'} {j'' : J}
    (f : j ⟶ j'') (f' : j' ⟶ j'') (w : F.map f x = F.map f' x') :
    colimit.ι F j x = colimit.ι F j' x'

{J : Type v}
[CategoryTheory.Category.{w, v} J]
{F : J ⥤ Type u}
[CategoryTheory.Limits.HasColimit F]
{j j' : J}
{x : F.obj j}
{x' : F.obj j'}
{j'' : J}
(f : j ⟶ j'')
(f' : j' ⟶ j'')
(w : F.map f x = F.map f' x')

CategoryTheory.Limits.colimit.ι F j x = CategoryTheory.Limits.colimit.ι F j' x'


@[simp] theorem rTensor_pow (f : M ≃ₗ[R] M) (n : ℕ) : f.rTensor N ^ n = (f ^ n).rTensor N

{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 : M ≃ₗ[R] M)
(n : ℕ)

LinearEquiv.rTensor N f ^ n = LinearEquiv.rTensor N (f ^ n)


@[simp]
theorem image_symm_image (e : M₁ ≃SL[σ₁₂] M₂) (s : Set M₂) : e '' (e.symm '' s) = s

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(e : M₁ ≃SL[σ₁₂] M₂)
(s : Set M₂)


lemma directedOn_le_Ioc (a b : α) : DirectedOn (· ≤ ·) (Ioc a b)

DirectedOn (fun x x_1 => x ≤ x_1) (Set.Ioc a b)


/-- Construct a bundled `LaxMonoidalFunctor` from the object level function
and `Functorial` and `LaxMonoidal` typeclasses.
-/
@[simps]
def of (F : C → D) [I₁ : Functorial.{v₁, v₂} F] [I₂ : LaxMonoidal.{v₁, v₂} F] :
    LaxMonoidalFunctor.{v₁, v₂} C D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
(F : C → D)
[I₁ : CategoryTheory.Functorial F]
[I₂ : CategoryTheory.LaxMonoidal F]
(X Y : C)

(CategoryTheory.LaxMonoidalFunctor.of F).μ X Y = CategoryTheory.LaxMonoidal.μ X Y


lemma covBy_iff_exists_insert : s ⋖ t ↔ ∃ a ∉ s, insert a s = t

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


theorem norm_compContinuousLinearMapL_le (f : ∀ i, E i →L[𝕜] E₁ i) :
    ‖compContinuousLinearMapL (G := G) f‖ ≤ ∏ i, ‖f i‖

[(i : ι) → SeminormedAddCommGroup (E i)]

[(i : ι) → SeminormedAddCommGroup (E₁ i)]

‖ContinuousMultilinearMap.compContinuousLinearMapL f‖ ≤ ∏ i : ι, ‖f i‖


theorem fundamentalDomain_isBounded [Finite ι] [HasSolidNorm K] :
    IsBounded (fundamentalDomain b)

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
(b : Basis ι K E)
[FloorRing K]
[Finite ι]
[HasSolidNorm K]


lemma coe_id {X : CommRingCat} : (𝟙 X : X → X) = id


/-- An algebra iso `A ≃ₐ[R] B` can equivalently be viewed as an algebra iso `Aᵐᵒᵖ ≃ₐ[R] Bᵐᵒᵖ`.
This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[simps!]
def op : (A ≃ₐ[R] B) ≃ Aᵐᵒᵖ ≃ₐ[R] Bᵐᵒᵖ

{R : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(f : A ≃ₐ[R] B)

∀ (a : Bᵐᵒᵖ), (AlgEquiv.op f).symm a = MulOpposite.op ((↑↑f).symm (MulOpposite.unop a))


theorem cos_nat_mul_two_pi_add_pi (n : ℕ) : cos (n * (2 * π) + π) = -1

Real.cos (↑n * (2 * Real.pi) + Real.pi) = -1


lemma ContextFreeGrammar.reverse_mem_language_of_mem_reverse_language (g : ContextFreeGrammar T)
    {w : List T} (hgw : w ∈ g.reverse.language) :
    w.reverse ∈ g.language

{T : Type uT}
(g : ContextFreeGrammar T)
{w : List T}
(hgw : w ∈ g.reverse.language)


theorem AddMonoidHom.completion_coe (f : α →+ β) (hf : Continuous f) (a : α) :
    AddMonoidHom.completion f hf a = f a

{α : Type u_3}
{β : Type u_4}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
[UniformSpace β]
[AddGroup β]
[UniformAddGroup β]
(f : α →+ β)
(hf : Continuous ⇑f)
(a : α)


/-- The union of an entourage of the diagonal in each set of a disjoint union is again an entourage
of the diagonal. -/
theorem union_mem_uniformity_sum {a : Set (α × α)} (ha : a ∈ 𝓤 α) {b : Set (β × β)} (hb : b ∈ 𝓤 β) :
    Prod.map inl inl '' a ∪ Prod.map inr inr '' b ∈ 𝓤 (α ⊕ β)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[UniformSpace β]
{a : Set (α × α)}
(ha : a ∈ 𝓤 α)
{b : Set (β × β)}
(hb : b ∈ 𝓤 β)

Prod.map Sum.inl Sum.inl '' a ∪ Prod.map Sum.inr Sum.inr '' b ∈ 𝓤 (α ⊕ β)


@[simp] theorem rightInvSeq_nil : ris [] = []

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


theorem mem_append_left {s₁ s₂ : WSeq α} {a : α} : a ∈ s₁ → a ∈ append s₁ s₂

{α : Type u}
{s₁ s₂ : Stream'.WSeq α}
{a : α}


lemma coevaluation_evaluation :
    Y ◁ η_ _ _ ≫ (α_ _ _ _).inv ≫ ε_ X _ ▷ Y = (ρ_ Y).hom ≫ (λ_ Y).inv

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

Y ◁ η_ X Y ≫ (α_ Y X Y).inv ≫ ε_ X Y ▷ Y = (ρ_ Y).hom ≫ (λ_ Y).inv


@[to_additive]
theorem mulIndicator_apply_eq_if (hU : IsClopen U) :
    mulIndicator f hU a = if a ∈ U then f a else 1

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

(f.mulIndicator hU) a = if a ∈ U then f a else 1


/-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of objects
of type `ModuleCat (R.obj X)` for all `X`, and restriction
maps expressed as linear maps to restriction of scalars.
(See the constructor `PresheafOfModules.mk''`.) -/
structure BundledCorePresheafOfModules where
  /-- the datum of a `ModuleCat (R.obj X)` for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : ModuleCat.{v} (R.obj X)
  /-- the restriction maps as linear maps to restriction of scalars -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (obj Y)
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) :
    map (𝟙 X) = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (obj X) := by
      aesop
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = map f ≫ (ModuleCat.restrictScalars (R.map f)).map (map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g))
        (R.map_comp f g)).inv.app (obj Z) := by aesop

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(self : BundledCorePresheafOfModules R)
{X Y Z : Cᵒᵖ}
(f : X ⟶ Y)
(g : Y ⟶ Z)

self.map (f ≫ g) =
  self.map f ≫
    (ModuleCat.restrictScalars (R.map f)).map (self.map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g)) ⋯).inv.app (self.obj Z)


theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius

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


/-- **Darboux's theorem**: the image of a `Set.OrdConnected` set under `f'` is a `Set.OrdConnected`
set, `deriv` version. -/
theorem Set.OrdConnected.image_deriv {s : Set ℝ} (hs : OrdConnected s)
    (hf : ∀ x ∈ s, DifferentiableAt ℝ f x) : OrdConnected (deriv f '' s)

{f : ℝ → ℝ}
{s : Set ℝ}
(hs : s.OrdConnected)
(hf : ∀ x ∈ s, DifferentiableAt ℝ f x)


@[to_additive]
lemma IsOfFinOrder.natCard_powers_le_orderOf (ha : IsOfFinOrder a) :
    Nat.card (powers a : Set G) ≤ orderOf a

{G : Type u_1}
[Monoid G]
{a : G}
(ha : IsOfFinOrder a)

Nat.card ↑↑(Submonoid.powers a) ≤ orderOf a


theorem finset_card_le_finrank [Module.Finite R M]
    {b : Finset M} (h : LinearIndependent R (fun x => x : b → M)) :
    b.card ≤ finrank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Finite R M]
{b : Finset M}
(h : LinearIndependent R fun x => ↑x)


@[simp]
lemma coe_baseChange :
    (N.baseChange A : Submodule A (A ⊗[R] M)) = (N : Submodule R M).baseChange A

(R : Type u_1)
(A : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[CommRing A]
[Algebra R A]
(N : LieSubmodule R L M)

↑(LieSubmodule.baseChange A N) = Submodule.baseChange A ↑N


theorem X_pow_sub_C_irreducible_iff_of_prime {p : ℕ} (hp : p.Prime) {a : K} :
    Irreducible (X ^ p - C a) ↔ ∀ b, b ^ p ≠ a

{K : Type u}
[Field K]
{p : ℕ}
(hp : Nat.Prime p)
{a : K}

Irreducible (Polynomial.X ^ p - Polynomial.C a) ↔ ∀ (b : K), b ^ p ≠ a


@[to_additive Filter.hasBasis_cobounded_norm]
lemma Filter.hasBasis_cobounded_norm' : HasBasis (cobounded E) (fun _ ↦ True) ({x | · ≤ ‖x‖})

(Bornology.cobounded E).HasBasis (fun x => True) fun x => {x_1 | x ≤ ‖x_1‖}


@[simp]
theorem takeD_left (l₁ l₂ : List α) (a : α) : takeD (length l₁) (l₁ ++ l₂) a = l₁


@[simp] protected theorem finrank_top : finrank (⊤ : IntermediateField F E) E = 1

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


@[simp]
theorem down_add (s t : SetSemiring α) : down (s + t) = down s ∪ down t

SetSemiring.down (s + t) = SetSemiring.down s ∪ SetSemiring.down t


/-- We can infer `FiniteDimensional K V` in the presence of `[Fact (finrank K V = n + 1)]`. Declare
this as a local instance where needed. -/
theorem of_fact_finrank_eq_succ (n : ℕ) [hn : Fact (finrank K V = n + 1)] :
    FiniteDimensional K V

[hn : Fact (FiniteDimensional.finrank K V = n + 1)]


/-- Determinant of 3x3 matrix -/
theorem det_fin_three (A : Matrix (Fin 3) (Fin 3) R) :
    det A =
      A 0 0 * A 1 1 * A 2 2 - A 0 0 * A 1 2 * A 2 1
      - A 0 1 * A 1 0 * A 2 2 + A 0 1 * A 1 2 * A 2 0
      + A 0 2 * A 1 0 * A 2 1 - A 0 2 * A 1 1 * A 2 0

{R : Type v}
[CommRing R]
(A : Matrix (Fin 3) (Fin 3) R)


lemma div_mul_cancel {a b : EReal} (h₁ : b ≠ ⊥) (h₂ : b ≠ ⊤) (h₃ : b ≠ 0) : (a / b) * b = a


theorem dual_ordConnectedSection (s : Set α) :
    ordConnectedSection (ofDual ⁻¹' s) = ofDual ⁻¹' ordConnectedSection s

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

(⇑OrderDual.ofDual ⁻¹' s).ordConnectedSection = ⇑OrderDual.ofDual ⁻¹' s.ordConnectedSection


@[simp]
theorem forget_obj {U : Under X} : (forget X).obj U = U.right

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

(CategoryTheory.Under.forget X).obj U = U.right


lemma rnDeriv_mul_rnDeriv {κ : Measure α} [SigmaFinite μ] [SigmaFinite ν] [SigmaFinite κ]
    (hμν : μ ≪ ν) :
    μ.rnDeriv ν * ν.rnDeriv κ =ᵐ[κ] μ.rnDeriv κ

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


@[simp]
theorem add_seq (f g : FreeAbelianGroup (α → β)) (x : FreeAbelianGroup α) :
    f + g <*> x = (f <*> x) + (g <*> x)

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

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


theorem DifferentiableWithinAt.ccos (hf : DifferentiableWithinAt ℂ f s x) :
    DifferentiableWithinAt ℂ (fun x => Complex.cos (f x)) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{x : E}
{s : Set E}
(hf : DifferentiableWithinAt ℂ f s x)


theorem contDiffOn_const {c : F} {s : Set E} : ContDiffOn 𝕜 n (fun _ : E => c) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{c : F}
{s : Set E}


theorem Subsingleton.countable {s : Set α} (hs : s.Subsingleton) : s.Countable

{α : Type u}
{s : Set α}
(hs : s.Subsingleton)


theorem bUnion_mem_nhdsSet {t : X → Set X} (h : ∀ x ∈ s, t x ∈ 𝓝 x) : (⋃ x ∈ s, t x) ∈ 𝓝ˢ s

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
{t : X → Set X}
(h : ∀ x ∈ s, t x ∈ 𝓝 x)


/-- A `C^n` local diffeomorphism at `x` is `C^n` differentiable at `x`. -/
lemma IsLocalDiffeomorphAt.contMDiffAt (hf : IsLocalDiffeomorphAt I J n f x) :
    ContMDiffAt I J n f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_4}
[TopologicalSpace H]
{G : Type u_5}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{f : M → N}
{x : M}
(hf : IsLocalDiffeomorphAt I J n f x)


theorem toLocalizationMap_toMap_apply (x) : (toLocalizationMap M S).toMap x = algebraMap R S x

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

(IsLocalization.toLocalizationMap M S).toMap x = (algebraMap R S) x


theorem FiniteDimensional.of_rank_eq_one (h : Module.rank K V = 1) : FiniteDimensional K V

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


@[simps]
def Triangle.homMk (A B : Triangle C)
    (hom₁ : A.obj₁ ⟶ B.obj₁) (hom₂ : A.obj₂ ⟶ B.obj₂) (hom₃ : A.obj₃ ⟶ B.obj₃)
    (comm₁ : A.mor₁ ≫ hom₂ = hom₁ ≫ B.mor₁ := by aesop_cat)
    (comm₂ : A.mor₂ ≫ hom₃ = hom₂ ≫ B.mor₂ := by aesop_cat)
    (comm₃ : A.mor₃ ≫ hom₁⟦1⟧' = hom₃ ≫ B.mor₃ := by aesop_cat) :
    A ⟶ B

(A B : CategoryTheory.Pretriangulated.Triangle C)

(comm₃ : A.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map hom₁ = hom₃ ≫ B.mor₃ := by aesop_cat)

(A.homMk B hom₁ hom₂ hom₃ comm₁ comm₂ comm₃).hom₁ = hom₁


theorem HasFDerivAtFilter.tendsto_nhds (hL : L ≤ 𝓝 x) (h : HasFDerivAtFilter f f' x L) :
    Tendsto f L (𝓝 (f x))

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{L : Filter E}
(hL : L ≤ 𝓝 x)
(h : HasFDerivAtFilter f f' x L)


theorem unfold_smulg {α} [AddCommGroup α] (n : ℕ) (x y : α)
    (h : smulg (Int.ofNat n) x = y) : (n : ℤ) • x = y

(h : Mathlib.Tactic.Abel.smulg (Int.ofNat n) x = y)


theorem ofIsCompl_eq' (h : IsCompl p q) {φ : p →ₗ[R] F} {ψ : q →ₗ[R] F} {χ : E →ₗ[R] F}
    (hφ : φ = χ.comp p.subtype) (hψ : ψ = χ.comp q.subtype) : ofIsCompl h φ ψ = χ

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{p q : Submodule R E}
(h : IsCompl p q)
{φ : ↥p →ₗ[R] F}
{ψ : ↥q →ₗ[R] F}
{χ : E →ₗ[R] F}
(hφ : φ = χ ∘ₗ p.subtype)
(hψ : ψ = χ ∘ₗ q.subtype)


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

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


@[ext]
theorem ext : ∀ l₁ l₂ : LowerAdjoint u, (l₁ : α → β) = (l₂ : α → β) → l₁ = l₂

{α : Type u_1}
{β : Type u_4}
[Preorder α]
[Preorder β]
{u : β → α}
(l₁ l₂ : LowerAdjoint u)


@[gcongr]
theorem sup_mono (h : s₁ ⊆ s₂) : s₁.sup f ≤ s₂.sup f

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


/-- The angle at the apex of an isosceles triangle is `π` minus twice a base angle, oriented
angle-at-point form. -/
theorem oangle_eq_pi_sub_two_zsmul_oangle_of_dist_eq {p₁ p₂ p₃ : P} (hn : p₂ ≠ p₃)
    (h : dist p₁ p₂ = dist p₁ p₃) : ∡ p₃ p₁ p₂ = π - (2 : ℤ) • ∡ p₁ p₂ p₃

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

∡ p₃ p₁ p₂ = ↑π - 2 • ∡ p₁ p₂ p₃


/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
@[simps]
noncomputable def snakeInput : ShortComplex.SnakeInput C

{S : CategoryTheory.ShortComplex (HomologicalComplex C c)}

(HomologicalComplex.HomologySequence.snakeInput hS i j hij).L₀ =
  (HomologicalComplex.homologyFunctor C c i).mapShortComplex.obj S


@[simp]
theorem coe_mk' (f : A →+* B) (h : ∀ (c : R) (x), f (c • x) = c • f x) : ⇑(mk' f h) = f

(h : ∀ (c : R) (x : A), f (c • x) = c • f x)


theorem decode_ofEquiv {α β} [Encodable α] (e : β ≃ α) (n : ℕ) :
    @decode _ (ofEquiv _ e) n = (decode n).map e.symm

{α : Type u_3}
{β : Type u_4}
[Encodable α]
(e : β ≃ α)
(n : ℕ)

Encodable.decode n = Option.map (⇑e.symm) (Encodable.decode n)


lemma prime_composite_induction {P : ℕ → Prop} (zero : P 0) (one : P 1)
    (prime : ∀ p : ℕ, p.Prime → P p) (composite : ∀ a, 2 ≤ a → P a → ∀ b, 2 ≤ b → P b → P (a * b))
    (n : ℕ) : P n

(composite : ∀ (a : ℕ), 2 ≤ a → P a → ∀ (b : ℕ), 2 ≤ b → P b → P (a * b))


/-- A version of `IsPreconnected.constant_of_mapsTo` that assumes that the codomain is nonempty and
proves that `f` is equal to `const α y` on `S` for some `y ∈ T`. -/
theorem IsPreconnected.eqOn_const_of_mapsTo {S : Set α} (hS : IsPreconnected S)
    {T : Set β} [DiscreteTopology T] {f : α → β} (hc : ContinuousOn f S) (hTm : MapsTo f S T)
    (hne : T.Nonempty) : ∃ y ∈ T, EqOn f (const α y) S

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{S : Set α}
(hS : IsPreconnected S)
{T : Set β}
[DiscreteTopology ↑T]
{f : α → β}
(hc : ContinuousOn f S)
(hTm : Set.MapsTo f S T)
(hne : T.Nonempty)

∃ y ∈ T, Set.EqOn f (Function.const α y) S


theorem unique_quotient_iff_eq_top : Nonempty (Unique (M ⧸ p)) ↔ p = ⊤

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
{p : Submodule R M}


/-- If `H ≤ K`, then `H` as a subgroup of `K` is isomorphic to `H`. -/
@[to_additive (attr := simps) "If `H ≤ K`, then `H` as a subgroup of `K` is isomorphic to `H`."]
def subgroupOfEquivOfLe {G : Type*} [Group G] {H K : Subgroup G} (h : H ≤ K) :
    H.subgroupOf K ≃* H

{G : Type u_7}
[Group G]
{H K : Subgroup G}
(h : H ≤ K)
(g : ↥(H.subgroupOf K))

↑((Subgroup.subgroupOfEquivOfLe h) g) = ↑↑g


theorem independent_pair {i j : ι} (hij : i ≠ j) (huniv : ∀ k, k = i ∨ k = j) :
    Independent t ↔ Disjoint (t i) (t j)

{α : Type u_1}
{ι : Type u_3}
[CompleteLattice α]
{t : ι → α}
{i j : ι}
(hij : i ≠ j)
(huniv : ∀ (k : ι), k = i ∨ k = j)

CompleteLattice.Independent t ↔ Disjoint (t i) (t j)


theorem pointCount_eq_pointCount [Finite P] [Finite L] (l m : L) :
    pointCount P l = pointCount P m

(P : Type u_1)
{L : Type u_2}
[Membership P L]
[Configuration.ProjectivePlane P L]
[Finite P]
[Finite L]
(l m : L)

Configuration.pointCount P l = Configuration.pointCount P m


/-- A set `s` is not bounded above if and only if for each `x` there exists `y ∈ s` that is greater
than `x`. A version for preorders is called `not_bddAbove_iff'`. -/
theorem not_bddAbove_iff {α : Type*} [LinearOrder α] {s : Set α} :
    ¬BddAbove s ↔ ∀ x, ∃ y ∈ s, x < y

{α : Type u_1}
[LinearOrder α]
{s : Set α}


@[measurability]
lemma measurable_gaussianPDF (μ : ℝ) (v : ℝ≥0) : Measurable (gaussianPDF μ v)

Measurable (ProbabilityTheory.gaussianPDF μ v)


/-- This is a trivial application of `IndepFun.comp` but it will come up frequently. -/
theorem IndepFun.exp_mul {X Y : Ω → ℝ} (h_indep : IndepFun X Y μ) (s t : ℝ) :
    IndepFun (fun ω => exp (s * X ω)) (fun ω => exp (t * Y ω)) μ

(h_indep : ProbabilityTheory.IndepFun X Y μ)

ProbabilityTheory.IndepFun (fun ω => rexp (s * X ω)) (fun ω => rexp (t * Y ω)) μ


theorem bijective_iff_existsUnique (f : α → β) : Bijective f ↔ ∀ b : β, ∃! a : α, f a = b

{α : Sort u_1}
{β : Sort u_2}
(f : α → β)

Function.Bijective f ↔ ∀ (b : β), ∃! a, f a = b


@[ext]
theorem ext {f g : CoheytingHom α β} (h : ∀ a, f a = g a) : f = g

{α : Type u_2}
{β : Type u_3}
[CoheytingAlgebra α]
[CoheytingAlgebra β]
{f g : CoheytingHom α β}
(h : ∀ (a : α), f a = g a)


@[to_additive]
theorem sInf_inv (s : Set α) : sInf s⁻¹ = (sSup s)⁻¹

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

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


lemma not_eq_iff : ∀ {a b : Bool}, !a = b ↔ a ≠ b


theorem isSatisfiable_onTheory_iff {L' : Language.{w, w'}} {φ : L →ᴸ L'} (h : φ.Injective) :
    (φ.onTheory T).IsSatisfiable ↔ T.IsSatisfiable

{L : FirstOrder.Language}
{T : L.Theory}
{L' : FirstOrder.Language}
{φ : L →ᴸ L'}
(h : φ.Injective)


theorem ne_bot {b : α} (hb : b ∈ P.parts) : b ≠ ⊥

{α : Type u_1}
[Lattice α]
[OrderBot α]
{a : α}
(P : Finpartition a)
{b : α}
(hb : b ∈ P.parts)


@[simp]
lemma blimsup_not_sup : blimsup u f (¬p ·) ⊔ blimsup u f p = limsup u f

{α : Type u_1}
{β : Type u_2}
[CompleteDistribLattice α]
{f : Filter β}
{p : β → Prop}
{u : β → α}

(Filter.blimsup u f fun x => ¬p x) ⊔ Filter.blimsup u f p = Filter.limsup u f


protected theorem ext_iff {s t : Finmap β} : s = t ↔ s.entries = t.entries

{α : Type u}
{β : α → Type v}
{s t : Finmap β}


/-- Given three points in strict order on the same line, and a fourth point, the angles at the
fourth point between the first and second or first and third points have the same sign. -/
theorem _root_.Sbtw.oangle_sign_eq_left {p₁ p₂ p₃ : P} (p₄ : P) (h : Sbtw ℝ p₁ p₂ p₃) :
    (∡ p₁ p₄ p₂).sign = (∡ p₁ p₄ p₃).sign

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


@[simp] lemma zero_lt_log_iff {x : ℝ≥0∞} : 0 < log x ↔ 1 < x


theorem support_rename_of_injective {p : MvPolynomial σ R} {f : σ → τ} [DecidableEq τ]
    (h : Function.Injective f) :
    (rename f p).support = Finset.image (Finsupp.mapDomain f) p.support

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
{p : MvPolynomial σ R}
{f : σ → τ}
[DecidableEq τ]
(h : Function.Injective f)

((MvPolynomial.rename f) p).support = Finset.image (Finsupp.mapDomain f) p.support


lemma toCocycles_comp_isoTwoCocycles_hom :
    toCocycles A 1 2 ≫ (isoTwoCocycles A).hom =
      (oneCochainsLequiv A).toModuleIso.hom ≫
        ModuleCat.ofHom (shortComplexH2 A).moduleCatToCycles

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

groupCohomology.toCocycles A 1 2 ≫ (groupCohomology.isoTwoCocycles A).hom =
  (groupCohomology.oneCochainsLequiv A).toModuleIso.hom ≫
    ModuleCat.ofHom (groupCohomology.shortComplexH2 A).moduleCatToCycles


/-- As submodules, subalgebras are idempotent. -/
@[simp]
theorem mul_self (S : Subalgebra R A) : (Subalgebra.toSubmodule S) * (Subalgebra.toSubmodule S)
    = (Subalgebra.toSubmodule S)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)

Subalgebra.toSubmodule S * Subalgebra.toSubmodule S = Subalgebra.toSubmodule S


theorem one_lt_rpow_of_pos_of_lt_one_of_neg {x : ℝ≥0} {z : ℝ} (hx1 : 0 < x) (hx2 : x < 1)
    (hz : z < 0) : 1 < x ^ z


theorem det_eq_elem_of_subsingleton [Subsingleton n] (A : Matrix n n R) (k : n) :
    det A = A k k

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
[Subsingleton n]
(A : Matrix n n R)
(k : n)


theorem eq_of_le (h₁ : J₁ ∈ π) (h₂ : J₂ ∈ π) (hle : J₁ ≤ J₂) : J₁ = J₂

{ι : Type u_1}
{I J₁ J₂ : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(h₁ : J₁ ∈ π)
(h₂ : J₂ ∈ π)
(hle : J₁ ≤ J₂)


theorem OpenEmbedding.open_iff_preimage_open (hf : OpenEmbedding f) {s : Set Y}
    (hs : s ⊆ range f) : IsOpen s ↔ IsOpen (f ⁻¹' s)

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : OpenEmbedding f)
{s : Set Y}
(hs : s ⊆ Set.range f)


/-- A "proof" of the fact that `f` eventually reaches `b` when repeatedly evaluated on `a`,
remembering the number of steps it takes. -/
structure EvalsTo {σ : Type*} (f : σ → Option σ) (a : σ) (b : Option σ) where
  /-- number of steps taken -/
  steps : ℕ
  evals_in_steps : (flip bind f)^[steps] a = b

{σ : Type u_1}
{f : σ → Option σ}
{a : σ}
{b : Option σ}
(self : Turing.EvalsTo f a b)


/--
This theorem is a weaker version of `Valuation.val_le_one_or_val_inv_lt_one`, but more symmetric
in `x` and `x⁻¹`.
-/
theorem val_le_one_or_val_inv_le_one (v : Valuation K Γ₀) (x : K) : v x ≤ 1 ∨ v x⁻¹ ≤ 1

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


@[to_additive]
theorem mulSupport_extend_one {f : α → M'} {g : α → N} (hf : f.Injective) :
    mulSupport (f.extend g 1) = f '' mulSupport g

{α : Type u_1}
{M' : Type u_6}
{N : Type u_7}
[One N]
{f : α → M'}
{g : α → N}
(hf : Function.Injective f)

Function.mulSupport (Function.extend f g 1) = f '' Function.mulSupport g


theorem isLocalization_basicOpen :
    IsLocalization.Away f Γ(X, X.basicOpen f)

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)
(f : ↑(X.presheaf.obj (Opposite.op U)))

IsLocalization.Away f ↑(X.presheaf.obj (Opposite.op (X.basicOpen f)))


theorem eq_of_pure_mem {a a' : α} (h : a' ∈ pure a) : a' = a

{α : Type u}
{a a' : α}
(h : a' ∈ Computation.pure a)


@[simp]
theorem cosh_ofReal_re (x : ℝ) : (cosh x).re = Real.cosh x


@[simp]
theorem coe_toLinearMap (f : M →ₑ+[σ.toMonoidHom] M₂) : ((f : M →ₛₗ[σ] M₂) : M → M₂) = f

{R : Type u_1}
{S : Type u_6}
{M : Type u_9}
{M₂ : Type u_11}
[AddCommMonoid M]
[AddCommMonoid M₂]
[Semiring R]
[Module R M]
[Semiring S]
[Module S M₂]
{σ : R →+* S}
(f : M →ₑ+[↑σ] M₂)


lemma AnalyticWithinOn.comp [CompleteSpace F] [CompleteSpace G] {f : F → G} {g : E → F} {s : Set F}
    {t : Set E} (hf : AnalyticWithinOn 𝕜 f s) (hg : AnalyticWithinOn 𝕜 g t) (h : MapsTo g t s) :
    AnalyticWithinOn 𝕜 (f ∘ g) t

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


@[simp]
theorem transpose_empty_rows (A : Matrix m' (Fin 0) α) : Aᵀ = of ![]

{α : Type u}
{m' : Type uₘ}
(A : Matrix m' (Fin 0) α)


/-- If `g : ℝ → ℝ` is periodic with period `T > 0`, then for any `t : ℝ`, the function
`t ↦ ∫ x in 0..t, g x` is bounded below by `t ↦ X + ⌊t/T⌋ • Y` for appropriate constants `X` and
`Y`. -/
theorem sInf_add_zsmul_le_integral_of_pos (hT : 0 < T) (t : ℝ) :
    (sInf ((fun t => ∫ x in (0)..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ x in (0)..T, g x) ≤
      ∫ x in (0)..t, g x

(h_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g MeasureTheory.volume t₁ t₂)

sInf ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Set.Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x ≤ ∫ (x : ℝ) in 0 ..t, g x


@[simp] theorem UInt32.val_val_eq_toNat (x : UInt32) : x.val.val = x.toNat


theorem toFinset.ext : (∀ x, x ∈ l ↔ x ∈ l') → l.toFinset = l'.toFinset

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

(∀ (x : α), x ∈ l ↔ x ∈ l') → l.toFinset = l'.toFinset


theorem Basis.union_basis_union (hIX : M.Basis I X) (hJY : M.Basis J Y) (h : M.Indep (I ∪ J)) :
    M.Basis (I ∪ J) (X ∪ Y)

{α : Type u_1}
{M : Matroid α}
{I J X Y : Set α}
(hIX : M.Basis I X)
(hJY : M.Basis J Y)
(h : M.Indep (I ∪ J))


theorem count_le_count_of_factors_le {a b p : Associates α} (hb : b ≠ 0) (hp : Irreducible p)
    (h : a.factors ≤ b.factors) : p.count a.factors ≤ p.count b.factors

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


@[to_additive]
theorem subset_set_smul_iff : A ⊆ a • B ↔ a⁻¹ • A ⊆ B

{α : Type u_2}
{β : Type u_3}
[Group α]
[MulAction α β]
{A B : Set β}
{a : α}

A ⊆ a • B ↔ a⁻¹ • A ⊆ B


theorem isCompl {f : E →ₗ[R] E} (h : IsProj p f) : IsCompl p (ker f)

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{p : Submodule R E}
{f : E →ₗ[R] E}
(h : LinearMap.IsProj p f)


@[simp]
theorem coe_toComplₗᵢ : ⇑(toComplₗᵢ : E →ₗᵢ[𝕜] Completion E) = ((↑) : E → Completion E)

{𝕜 : Type u_1}
{E : Type u_2}
[NormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]


@[to_additive]
theorem Bornology.IsBounded.of_mul (hst : IsBounded (s * t)) : IsBounded s ∨ IsBounded t

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

Bornology.IsBounded s ∨ Bornology.IsBounded t


@[simp]
theorem nsmul_mk [AddMonoid α] [Preorder α] [CovariantClass α α (· + ·) (· ≤ ·)] (n : ℕ) {x : α}
    (hx : 0 ≤ x) : (n • (⟨x, hx⟩ : { x : α // 0 ≤ x })) = ⟨n • x, nsmul_nonneg hx n⟩

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


@[to_additive]
theorem pow_mem_ball {n : ℕ} (hn : 0 < n) (h : a ∈ ball b r) : a ^ n ∈ ball (b ^ n) (n • r)

{E : Type u_6}
[SeminormedAddCommGroup E]
{a b : E}
{r : ℝ}
{n : ℕ}
(hn : 0 < n)
(h : a ∈ Metric.ball b r)


@[simp, norm_cast]
protected theorem coe_mul (x y : FreeRing α) : ↑(x * y) = (x : FreeCommRing α) * y


@[simp]
theorem nhdsSet_inj_iff [T1Space X] {s t : Set X} : 𝓝ˢ s = 𝓝ˢ t ↔ s = t

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


@[simp]
theorem ndinter_eq_inter {s t : Multiset α} (d : Nodup s) : ndinter s t = s ∩ t

{α : Type u_1}
[DecidableEq α]
{s t : Multiset α}
(d : s.Nodup)


@[simp]
theorem norm_mkPiAlgebra_le [Nonempty ι] : ‖ContinuousMultilinearMap.mkPiAlgebra 𝕜 ι A‖ ≤ 1

{𝕜 : Type u}
{ι : Type v}
[Fintype ι]
[NontriviallyNormedField 𝕜]
{A : Type u_1}
[NormedCommRing A]
[NormedAlgebra 𝕜 A]
[Nonempty ι]


@[simp]
theorem diagonal_one : (diagonal fun _ => 1 : Matrix n n α) = 1

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]


@[simp]
theorem card_support_eq_two {f : Perm α} : f.support.card = 2 ↔ IsSwap f

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


/-- The (open) thickening equals the preimage of an open interval under `EMetric.infEdist`. -/
theorem thickening_eq_preimage_infEdist (δ : ℝ) (E : Set α) :
    thickening δ E = (infEdist · E) ⁻¹' Iio (ENNReal.ofReal δ)

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

Metric.thickening δ E = (fun x => EMetric.infEdist x E) ⁻¹' Set.Iio (ENNReal.ofReal δ)


@[to_additive]
theorem finprod_mem_eq_prod_of_subset (f : α → M) {s : Set α} {t : Finset α}
    (h₁ : s ∩ mulSupport f ⊆ t) (h₂ : ↑t ⊆ s) : ∏ᶠ i ∈ s, f i = ∏ i ∈ t, f i

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(f : α → M)
{s : Set α}
{t : Finset α}
(h₁ : s ∩ Function.mulSupport f ⊆ ↑t)
(h₂ : ↑t ⊆ s)

∏ᶠ (i : α) (_ : i ∈ s), f i = ∏ i ∈ t, f i


@[trans]
theorem IsEquivalent.trans_isLittleO {f g₁ : α → β} {g₂ : α → β₂} (h : f ~[l] g₁)
    (h₂ : g₁ =o[l] g₂) : f =o[l] g₂

{α : Type u_1}
{β : Type u_2}
{β₂ : Type u_3}
[NormedAddCommGroup β]
[Norm β₂]
{l : Filter α}
{f g₁ : α → β}
{g₂ : α → β₂}
(h : f ~[l] g₁)
(h₂ : g₁ =o[l] g₂)


/-- To check that a topologically defined morphism property is local at the target,
we may check the corresponding properties on topological spaces. -/
lemma topologically_isLocalAtTarget
    [(topologically P).RespectsIso]
    (hP₂ : ∀ {α β : Type u} [TopologicalSpace α] [TopologicalSpace β] (f : α → β) (s : Set β),
      P f → P (s.restrictPreimage f))
    (hP₃ : ∀ {α β : Type u} [TopologicalSpace α] [TopologicalSpace β] (f : α → β) {ι : Type u}
      (U : ι → TopologicalSpace.Opens β) (_ : iSup U = ⊤) (_ : Continuous f),
      (∀ i, P ((U i).carrier.restrictPreimage f)) → P f) :
    IsLocalAtTarget (topologically P)

(P : {α β : Type u} → [inst : TopologicalSpace α] → [inst : TopologicalSpace β] → (α → β) → Prop)

[(AlgebraicGeometry.topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => P).RespectsIso]

(hP₂ :
  ∀ {α β : Type u} [inst : TopologicalSpace α] [inst_1 : TopologicalSpace β] (f : α → β) (s : Set β),
    P f → P (s.restrictPreimage f))

(hP₃ :
  ∀ {α β : Type u} [inst : TopologicalSpace α] [inst_1 : TopologicalSpace β] (f : α → β) {ι : Type u}
    (U : ι → TopologicalSpace.Opens β),
    iSup U = ⊤ → Continuous f → (∀ (i : ι), P ((U i).carrier.restrictPreimage f)) → P f)

AlgebraicGeometry.IsLocalAtTarget
  (AlgebraicGeometry.topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => P)


lemma range_toContinuousMap : range ((↑) : C(X, R)₀ → C(X, R)) = {f : C(X, R) | f 0 = 0}

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

Set.range toContinuousMap = {f | f 0 = 0}


@[simp]
theorem mul_same (k : n) (d : α) :
    stdBasisMatrix i j c * stdBasisMatrix j k d = stdBasisMatrix i k (c * d)

{n : Type u_3}
{α : Type u_5}
[DecidableEq n]
[Semiring α]
(i j : n)
(c : α)
[Fintype n]
(k : n)
(d : α)

Matrix.stdBasisMatrix i j c * Matrix.stdBasisMatrix j k d = Matrix.stdBasisMatrix i k (c * d)


@[simp] theorem map_take (f : α → β) :
    ∀ (L : List α) (i : Nat), (L.take i).map f = (L.map f).take i

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(L : List α)
(i : Nat)

List.map f (List.take i L) = List.take i (List.map f L)


theorem le_sup {b : β} (hb : b ∈ s) : f b ≤ s.sup f

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
{s : Finset β}
{f : β → α}
{b : β}
(hb : b ∈ s)


@[deprecated "see `cocompact_eq_atTop` with `import Mathlib.Topology.Instances.Nat`"
  (since := "2024-02-07")]
theorem _root_.Nat.cocompact_eq : cocompact ℕ = atTop


theorem StrictConcaveOn.subset {t : Set E} (hf : StrictConcaveOn 𝕜 t f) (hst : s ⊆ t)
    (hs : Convex 𝕜 s) : StrictConcaveOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Set E}
(hf : StrictConcaveOn 𝕜 t f)
(hst : s ⊆ t)
(hs : Convex 𝕜 s)


/-- A set is dense iff it has non-trivial intersection with all basis sets. -/
theorem IsTopologicalBasis.dense_iff {b : Set (Set α)} (hb : IsTopologicalBasis b) {s : Set α} :
    Dense s ↔ ∀ o ∈ b, Set.Nonempty o → (o ∩ s).Nonempty

(hb : TopologicalSpace.IsTopologicalBasis b)

Dense s ↔ ∀ o ∈ b, o.Nonempty → (o ∩ s).Nonempty


/-- The explicit pullback cone is a limit cone. -/
@[simps! lift]
def pullback.isLimit : Limits.IsLimit (pullback.cone f g)

(s : CategoryTheory.Limits.PullbackCone f g)

(LightProfinite.pullback.isLimit f g).lift s = LightProfinite.pullback.lift f g s.fst s.snd ⋯


protected theorem induction {P : ∀ {a b : Quotient r}, (a ⟶ b) → Prop}
    (h : ∀ {x y : C} (f : x ⟶ y), P ((functor r).map f)) :
    ∀ {a b : Quotient r} (f : a ⟶ b), P f

{P : {a b : CategoryTheory.Quotient r} → (a ⟶ b) → Prop}

(h : ∀ {x y : C} (f : x ⟶ y), P ((CategoryTheory.Quotient.functor r).map f))


@[simp, measurability]
theorem MeasurableSet.empty [MeasurableSpace α] : MeasurableSet (∅ : Set α)


/-- A nonempty `G`-set with transitive `G`-action is connected. -/
theorem Action.isConnected_of_transitive (X : FintypeCat) [MulAction G X]
    [MulAction.IsPretransitive G X] [h : Nonempty X] :
    IsConnected (Action.FintypeCat.ofMulAction G X)

(G : Type u)
[Group G]
(X : FintypeCat)
[MulAction G ↑X]
[MulAction.IsPretransitive G ↑X]
[h : Nonempty ↑X]

CategoryTheory.PreGaloisCategory.IsConnected (Action.FintypeCat.ofMulAction G X)


/-- Turn a ring homomorphism from Boolean rings `α` to `β` into a bounded lattice homomorphism
from `α` to `β` considered as Boolean algebras. -/
@[simps]
protected def RingHom.asBoolAlg (f : α →+* β) : BoundedLatticeHom (AsBoolAlg α) (AsBoolAlg β)

{α : Type u_1}
{β : Type u_2}
[BooleanRing α]
[BooleanRing β]
(f : α →+* β)

∀ (a : AsBoolAlg α), f.asBoolAlg.toSupHom a = (⇑toBoolAlg ∘ ⇑f ∘ ⇑ofBoolAlg) a


lemma UniformConvexOn.neg (hf : UniformConvexOn s φ f) : UniformConcaveOn s φ (-f)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{φ : ℝ → ℝ}
{s : Set E}
{f : E → ℝ}
(hf : UniformConvexOn s φ f)


/-- The complex hyperbolic sine function is everywhere differentiable, with the derivative
`cosh x`. -/
theorem hasDerivAt_sinh (x : ℂ) : HasDerivAt sinh (cosh x) x

HasDerivAt Complex.sinh (Complex.cosh x) x


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

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


@[simp]
theorem codeSupp_cons (f fs k) :
    codeSupp (Code.cons f fs) k =
      trStmts₁ (trNormal (Code.cons f fs) k) ∪ codeSupp f (Cont'.cons₁ fs k)

(f fs : Turing.ToPartrec.Code)
(k : Turing.PartrecToTM2.Cont')

Turing.PartrecToTM2.codeSupp (f.cons fs) k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal (f.cons fs) k) ∪
    Turing.PartrecToTM2.codeSupp f (Turing.PartrecToTM2.Cont'.cons₁ fs k)


@[to_additive (attr := simp)]
theorem coprod_comp_inr : (f.coprod g).comp (inr M N) = g

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddZeroClass M]
[AddZeroClass N]
[AddCommMonoid P]
(f : M →+ P)
(g : N →+ P)

(f.coprod g).comp (AddMonoidHom.inr M N) = g


theorem exp_approx_end (n m : ℕ) (x : ℝ) (e₁ : n + 1 = m) (h : |x| ≤ 1) :
    |exp x - expNear m x 0| ≤ |x| ^ m / m.factorial * ((m + 1) / m)

|Real.exp x - Real.expNear m x 0| ≤ |x| ^ m / ↑m.factorial * ((↑m + 1) / ↑m)


/-- The golden ratio is irrational. -/
theorem gold_irrational : Irrational φ


@[simp]
theorem toDualBotEquiv_top [LE α] : WithTop.toDualBotEquiv (⊤ : WithTop αᵒᵈ) = ⊤


theorem smul_mem_smul {r} {n} (hr : r ∈ I) (hn : n ∈ N) : r • n ∈ I • N

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{I : Ideal R}
{N : Submodule R M}
{r : R}
{n : M}
(hr : r ∈ I)
(hn : n ∈ N)


/-- The sum of two squares is zero iff both elements are zero. -/
lemma mul_self_add_mul_self_eq_zero [IsRightCancelAdd α] [NoZeroDivisors α]
    [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α]
    [CovariantClass α α (· + ·) (· ≤ ·)] [CovariantClass α α (· + ·) (· < ·)] :
    a * a + b * b = 0 ↔ a = 0 ∧ b = 0

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

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


theorem image_closure_of_isCompact [T2Space Y] {s : Set X} (hs : IsCompact (closure s)) {f : X → Y}
    (hf : ContinuousOn f (closure s)) : f '' closure s = closure (f '' s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space Y]
{s : Set X}
(hs : IsCompact (closure s))
{f : X → Y}
(hf : ContinuousOn f (closure s))


lemma associator_inv_app {B C D E : Cat} (F : B ⟶ C) (G : C ⟶ D) (H : D ⟶ E) (X : B) :
    (α_ F G H).inv.app X = eqToHom (by simp)

{B C D E : CategoryTheory.Cat}
(F : B ⟶ C)
(G : C ⟶ D)
(H : D ⟶ E)
(X : ↑B)

(CategoryTheory.Bicategory.associator F G H).inv.app X = CategoryTheory.eqToHom ⋯


@[simp]
lemma cfc_zero : cfc (0 : R → R) a = 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]
(a : A)


theorem incMatrix_apply_eq_one_iff : G.incMatrix R a e = 1 ↔ e ∈ G.incidenceSet a

{R : Type u_1}
{α : Type u_2}
(G : SimpleGraph α)
[MulZeroOneClass R]
{a : α}
{e : Sym2 α}
[Nontrivial R]

SimpleGraph.incMatrix R G a e = 1 ↔ e ∈ G.incidenceSet a


theorem comap_dualAnnihilator_dualAnnihilator (W : Subspace K V) :
    W.dualAnnihilator.dualAnnihilator.comap (Module.Dual.eval K V) = W

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

Submodule.comap (Module.Dual.eval K V) (Submodule.dualAnnihilator W).dualAnnihilator = W


@[to_additive]
theorem G.mk_eq (x y : Σ j, F.obj j)
    (h : ∃ (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k), F.map f x.2 = F.map g y.2) :
    G.mk.{v, u} F x = G.mk F y

(h : ∃ k f g, (F.map f) x.snd = (F.map g) y.snd)

Grp.FilteredColimits.G.mk F x = Grp.FilteredColimits.G.mk F y


@[to_additive le_sum_nonempty_of_subadditive_on_pred]
lemma le_prod_nonempty_of_submultiplicative_on_pred (f : α → β) (p : α → Prop)
    (h_mul : ∀ a b, p a → p b → f (a * b) ≤ f a * f b) (hp_mul : ∀ a b, p a → p b → p (a * b))
    (s : Multiset α) (hs_nonempty : s ≠ ∅) (hs : ∀ a, a ∈ s → p a) : f s.prod ≤ (s.map f).prod

(h_mul : ∀ (a b : α), p a → p b → f (a + b) ≤ f a + f b)

(hp_mul : ∀ (a b : α), p a → p b → p (a + b))


theorem lift'_add (g : M →ₗ[R] M'') (h : ∀ x : S, IsUnit ((algebraMap R (Module.End R M'')) x))
    (x y) :
    LocalizedModule.lift' S g h (x + y) =
      LocalizedModule.lift' S g h x + LocalizedModule.lift' S g h y

(h : ∀ (x : ↥S), IsUnit ((algebraMap R (Module.End R M'')) ↑x))


theorem getD_get? (a : Array α) (i : Nat) (d : α) :
  Option.getD a[i]? d = if p : i < a.size then a[i]'p else d

{α : Type u_1}
(a : Array α)
(i : Nat)
(d : α)

a[i]?.getD d = if p : i < a.size then a[i] else d


/-- Let `E` and `F` be two topological vector spaces over a `NontriviallyNormedField`, and assume
that the topology of `F` is generated by some family of seminorms `q`. For a family `f` of linear
maps from `E` to `F`, the following are equivalent:
* `f` is equicontinuous at `0`.
* `f` is equicontinuous.
* `f` is uniformly equicontinuous.
* For each `q i`, the family of seminorms `k ↦ (q i) ∘ (f k)` is bounded by some continuous
  seminorm `p` on `E`.
* For each `q i`, the seminorm `⊔ k, (q i) ∘ (f k)` is well-defined and continuous.

In particular, if you can determine all continuous seminorms on `E`, that gives you a complete
characterization of equicontinuity for linear maps from `E` to `F`. For example `E` and `F` are
both normed spaces, you get `NormedSpace.equicontinuous_TFAE`. -/
protected theorem _root_.WithSeminorms.equicontinuous_TFAE {κ : Type*}
    {q : SeminormFamily 𝕜₂ F ι'} [UniformSpace E] [UniformAddGroup E] [u : UniformSpace F]
    [hu : UniformAddGroup F] (hq : WithSeminorms q) [ContinuousSMul 𝕜 E]
    (f : κ → E →ₛₗ[σ₁₂] F) : TFAE
    [ EquicontinuousAt ((↑) ∘ f) 0,
      Equicontinuous ((↑) ∘ f),
      UniformEquicontinuous ((↑) ∘ f),
      ∀ i, ∃ p : Seminorm 𝕜 E, Continuous p ∧ ∀ k, (q i).comp (f k) ≤ p,
      ∀ i, BddAbove (range fun k ↦ (q i).comp (f k)) ∧ Continuous (⨆ k, (q i).comp (f k)) ]

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_5}
{F : Type u_6}
{ι' : Type u_9}
[NontriviallyNormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[NontriviallyNormedField 𝕜₂]
[AddCommGroup F]
[Module 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[Nonempty ι']
{κ : Type u_10}
{q : SeminormFamily 𝕜₂ F ι'}
[UniformSpace E]
[UniformAddGroup E]
[u : UniformSpace F]
[hu : UniformAddGroup F]
(hq : WithSeminorms q)
[ContinuousSMul 𝕜 E]
(f : κ → E →ₛₗ[σ₁₂] F)

[EquicontinuousAt (DFunLike.coe ∘ f) 0, Equicontinuous (DFunLike.coe ∘ f), UniformEquicontinuous (DFunLike.coe ∘ f),
    ∀ (i : ι'), ∃ p, Continuous ⇑p ∧ ∀ (k : κ), (q i).comp (f k) ≤ p,
    ∀ (i : ι'), BddAbove (Set.range fun k => (q i).comp (f k)) ∧ Continuous (⨆ k, ⇑((q i).comp (f k)))].TFAE


/-- Given a cone morphism whose object part is an isomorphism, produce an
isomorphism of cones.
-/
theorem cone_iso_of_hom_iso {K : J ⥤ C} {c d : Cone K} (f : c ⟶ d) [i : IsIso f.hom] : IsIso f

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{K : J ⥤ C}
{c d : CategoryTheory.Limits.Cone K}
(f : c ⟶ d)
[i : CategoryTheory.IsIso f.hom]


theorem normalizer_eq_self_iff :
    H.normalizer = H ↔ (LieModule.maxTrivSubmodule R H <| L ⧸ H.toLieSubmodule) = ⊥

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)

H.normalizer = H ↔ LieModule.maxTrivSubmodule R (↥H) (L ⧸ H.toLieSubmodule) = ⊥


theorem hyperoperation_recursion (n m k : ℕ) :
    hyperoperation (n + 1) m (k + 1) = hyperoperation n m (hyperoperation (n + 1) m k)


theorem tendsto_atBot [Preorder β] {m : α → β} {f : Filter α} :
    Tendsto m f atBot ↔ ∀ b, ∀ᶠ a in f, m a ≤ b

{α : Type u_3}
{β : Type u_4}
[Preorder β]
{m : α → β}
{f : Filter α}

Filter.Tendsto m f Filter.atBot ↔ ∀ (b : β), ∀ᶠ (a : α) in f, m a ≤ b


lemma cauchy_ratCast (q : ℚ) : (q : ℝ).cauchy = q


/-- The directed sUnion of a set S of preconnected subsets is preconnected. -/
theorem IsPreconnected.sUnion_directed {S : Set (Set α)} (K : DirectedOn (· ⊆ ·) S)
    (H : ∀ s ∈ S, IsPreconnected s) : IsPreconnected (⋃₀ S)

(K : DirectedOn (fun x x_1 => x ⊆ x_1) S)


/-- A `GroupFilterBasis` on a group is a `FilterBasis` satisfying some additional axioms.
  Example : if `G` is a topological group then the neighbourhoods of the identity are a
  `GroupFilterBasis`. Conversely given a `GroupFilterBasis` one can define a topology
  compatible with the group structure on `G`. -/
class GroupFilterBasis (G : Type u) [Group G] extends FilterBasis G where
  one' : ∀ {U}, U ∈ sets → (1 : G) ∈ U
  mul' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V * V ⊆ U
  inv' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x⁻¹) ⁻¹' U
  conj' : ∀ x₀, ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x₀ * x * x₀⁻¹) ⁻¹' U

{G : Type u}
[Group G]
[self : GroupFilterBasis G]
{U : Set G}

U ∈ GroupFilterBasis.toFilterBasis.sets → ∃ V ∈ GroupFilterBasis.toFilterBasis.sets, V * V ⊆ U


/-- If `g` (semi)conjugates `fa` to `fb`, then it sends fixed points of `fa` to fixed points
of `fb`. -/
protected theorem map {x : α} (hx : IsFixedPt fa x) {g : α → β} (h : Semiconj g fa fb) :
    IsFixedPt fb (g x)

{α : Type u}
{β : Type v}
{fa : α → α}
{fb : β → β}
{x : α}
(hx : Function.IsFixedPt fa x)
{g : α → β}
(h : Function.Semiconj g fa fb)


/-- `single` as an additive monoid/group homomorphism -/
@[simps!]
def single.addMonoidHom (a : Γ) : R →+ HahnSeries Γ R

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddMonoid R]
(a : Γ)
(r : R)
(j : Γ)

((HahnSeries.single.addMonoidHom a) r).coeff j = Pi.single a r j


/-- Composition of morphisms of monoid objects. -/
@[simps]
def comp {M N O : Mon_ C} (f : Hom M N) (g : Hom N O) : Hom M O

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{M N O : Mon_ C}
(f : M.Hom N)
(g : N.Hom O)


theorem Continuous.integrableOn_Ioc [Preorder X] [CompactIccSpace X] [T2Space X]
    (hf : Continuous f) : IntegrableOn f (Ioc a b) μ

MeasureTheory.IntegrableOn f (Set.Ioc a b) μ


{n : Type u_2}
{𝕜 : Type u_4}
[Fintype n]
[RCLike 𝕜]
[DecidableEq n]
{A : Matrix n n 𝕜}
(hA : A.PosSemidef)


@[simp] theorem ofMulDistribMulAction_ρ_apply_apply (g : M) (a : Additive G) :
    (ofMulDistribMulAction M G).ρ g a = Additive.ofMul (g • Additive.toMul a)

(M G : Type)
[Monoid M]
[CommGroup G]
[MulDistribMulAction M G]
(g : M)
(a : Additive G)

((Rep.ofMulDistribMulAction M G).ρ g) a = Additive.ofMul (g • Additive.toMul a)


theorem pred_le_of_le_succ : n ≤ succ m → pred n ≤ m


@[simp] lemma op_tensor_μ {C : Type*} [Category C] [MonoidalCategory C]
    [BraidedCategory C] (X Y W Z : C) :
    (tensor_μ C (X, W) (Y, Z)).op = tensor_μ Cᵒᵖ (op X, op Y) (op W, op Z)

{C : Type u_2}
[CategoryTheory.Category.{u_3, u_2} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.BraidedCategory C]
(X Y W Z : C)

(CategoryTheory.tensor_μ C (X, W) (Y, Z)).op =
  CategoryTheory.tensor_μ Cᵒᵖ (Opposite.op X, Opposite.op Y) (Opposite.op W, Opposite.op Z)


@[simp]
theorem card_le_nat {o} {n : ℕ} : card o ≤ n ↔ o ≤ n


/-- Construct an isomorphism in the comma category given isomorphisms of the objects whose forward
directions give a commutative square.
-/
@[simps]
def isoMk {X Y : Comma L₁ R₁} (l : X.left ≅ Y.left) (r : X.right ≅ Y.right)
    (h : L₁.map l.hom ≫ Y.hom = X.hom ≫ R₁.map r.hom := by aesop_cat) : X ≅ Y

(h :
  CategoryTheory.CategoryStruct.comp (L₁.map l.hom) Y.hom =
    CategoryTheory.CategoryStruct.comp X.hom (R₁.map r.hom) := by
  aesop_cat)

(CategoryTheory.Comma.isoMk l r h).hom.right = r.hom


/-- The counit isomorphism of the equivalence
`ShortComplex.functorEquivalence : ShortComplex (J ⥤ C) ≌ J ⥤ ShortComplex C`. -/
@[simps!]
def counitIso : inverse J C ⋙ functor J C ≅ 𝟭 _

(X : CategoryTheory.Functor J (CategoryTheory.ShortComplex C))

∀ (X_1 : J),
  (((CategoryTheory.ShortComplex.FunctorEquivalence.counitIso J C).hom.app X).app X_1).τ₁ =
    CategoryTheory.CategoryStruct.id (X.obj X_1).X₁


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

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

s * ⋂ i, ⋂ j, t i j ⊆ ⋂ i, ⋂ j, s * t i j


/-- This is a very useful result; it allows us to use the fact that inclusion distributes over the
Lie bracket operation on ideals, subject to the conditions shown. -/
theorem comap_bracket_incl_of_le {I₁ I₂ : LieIdeal R L} (h₁ : I₁ ≤ I) (h₂ : I₂ ≤ I) :
    ⁅comap I.incl I₁, comap I.incl I₂⁆ = comap I.incl ⁅I₁, I₂⁆

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
{I₁ I₂ : LieIdeal R L}
(h₁ : I₁ ≤ I)
(h₂ : I₂ ≤ I)

⁅LieIdeal.comap I.incl I₁, LieIdeal.comap I.incl I₂⁆ = LieIdeal.comap I.incl ⁅I₁, I₂⁆


/-- A split equalizer diagram consists of morphisms

```
      ι   f
    W → X ⇉ Y
          g
```

satisfying `ι ≫ f = ι ≫ g` together with morphisms

```
      r   t
    W ← X ← Y
```

satisfying `ι ≫ r = 𝟙 W`, `g ≫ t = 𝟙 X` and `f ≫ t = r ≫ ι`.

The name "equalizer" is appropriate, since any split equalizer is a equalizer, see
`CategoryTheory.IsSplitEqualizer.isEqualizer`.
Split equalizers are also absolute, since a functor preserves all the structure above.
-/
structure IsSplitEqualizer {W : C} (ι : W ⟶ X) where
  /-- A map from `X` to the equalizer -/
  leftRetraction : X ⟶ W
  /-- A map in the opposite direction to `f` and `g` -/
  rightRetraction : Y ⟶ X
  /-- Composition of `ι` with `f` and with `g` agree -/
  condition : ι ≫ f = ι ≫ g := by aesop_cat
  /-- `leftRetraction` splits `ι` -/
  ι_leftRetraction : ι ≫ leftRetraction = 𝟙 W := by aesop_cat
  /-- `rightRetraction` splits `g` -/
  bottom_rightRetraction : g ≫ rightRetraction = 𝟙 X := by aesop_cat
  /-- `f` composed with `rightRetraction` is `leftRetraction` composed with `ι` -/
  top_rightRetraction : f ≫ rightRetraction = leftRetraction ≫ ι := by aesop_cat

(self : CategoryTheory.IsSplitEqualizer f g ι)

CategoryTheory.CategoryStruct.comp ι f = CategoryTheory.CategoryStruct.comp ι g


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


@[simp] theorem fst_pow [AddMonoid ι] [GMonoid A] (x : GradedMonoid A) (n : ℕ) :
    (x ^ n).fst = n • x.fst

{ι : Type u_1}
(A : ι → Type u_2)
[AddMonoid ι]
[GradedMonoid.GMonoid A]
(x : GradedMonoid A)
(n : ℕ)


theorem inter_eventuallyEq_left {s t : Set α} {l : Filter α} :
    (s ∩ t : Set α) =ᶠ[l] s ↔ ∀ᶠ x in l, x ∈ s → x ∈ t

{α : Type u}
{s t : Set α}
{l : Filter α}

s ∩ t =ᶠ[l] s ↔ ∀ᶠ (x : α) in l, x ∈ s → x ∈ t


/-- An **e-transform**. Turns `(s, t)` into `(s ∪ s • e, t ∩ e⁻¹ • t)`. This reduces the
product of the two sets. -/
@[to_additive (attr := simps) "An **e-transform**.
Turns `(s, t)` into `(s ∪ s +ᵥ e, t ∩ -e +ᵥ t)`. This reduces the sum of the two sets."]
def mulETransformRight : Finset α × Finset α

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

(Finset.addETransformRight e x).2 = x.2 ∩ (-e +ᵥ x.2)


@[to_additive]
theorem op_bijective : Bijective (op : α → αᵐᵒᵖ)


lemma rightHomologyMap'_congr (h : Homotopy φ₁ φ₂) (h₁ : S₁.RightHomologyData)
    (h₂ : S₂.RightHomologyData) : rightHomologyMap' φ₁ h₁ h₂ = rightHomologyMap' φ₂ h₁ h₂

{φ₁ φ₂ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

CategoryTheory.ShortComplex.rightHomologyMap' φ₁ h₁ h₂ = CategoryTheory.ShortComplex.rightHomologyMap' φ₂ h₁ h₂


theorem Submodule.isClosed_topologicalClosure (s : Submodule R M) :
    IsClosed (s.topologicalClosure : Set M)

{R : Type u}
{M : Type v}
[Semiring R]
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
[ContinuousConstSMul R M]
[ContinuousAdd M]
(s : Submodule R M)


theorem IsLeftAdjoint.mk (adj : f ⊣ g) : IsLeftAdjoint f

(adj : CategoryTheory.Bicategory.Adjunction f g)


theorem IsSymmetric.toSelfAdjoint_apply (hT : IsSymmetric T) {x : E} :
    (hT.toSelfAdjoint : E → E) x = T x

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{T : E →ₗ[𝕜] E}
(hT : T.IsSymmetric)
{x : E}


@[simp]
theorem coe_prodComm (α β) : (⇑(prodComm α β) : α × β → β × α) = Prod.swap


theorem sheafification_obj (P : Cᵒᵖ ⥤ D) : (sheafification J D).obj P = sheafify J P

(J : CategoryTheory.GrothendieckTopology C)

(CategoryTheory.sheafification J D).obj P = CategoryTheory.sheafify J P


/--
**Function extensionality** is the statement that if two functions take equal values
every point, then the functions themselves are equal: `(∀ x, f x = g x) → f = g`.
It is called "extensionality" because it talks about how to prove two objects are equal
based on the properties of the object (compare with set extensionality,
which is `(∀ x, x ∈ s ↔ x ∈ t) → s = t`).

This is often an axiom in dependent type theory systems, because it cannot be proved
from the core logic alone. However in lean's type theory this follows from the existence
of quotient types (note the `Quot.sound` in the proof, as well as the `show` line
which makes use of the definitional equality `Quot.lift f h (Quot.mk x) = f x`).
-/
theorem funext {α : Sort u} {β : α → Sort v} {f g : (x : α) → β x}
    (h : ∀ x, f x = g x) : f = g

{α : Sort u}
{β : α → Sort v}
{f g : (x : α) → β x}
(h : ∀ (x : α), f x = g x)


@[simp]
theorem sameCycle_zpow_left {n : ℤ} : SameCycle f ((f ^ n) x) y ↔ SameCycle f x y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
{n : ℤ}

f.SameCycle ((f ^ n) x) y ↔ f.SameCycle x y


@[simp] lemma orderBornology_isBounded : orderBornology.IsBounded s ↔ BddBelow s ∧ BddAbove s

{α : Type u_1}
{s : Set α}
[Lattice α]
[Nonempty α]


/-- Cancellation subtracting the results of two subtractions. -/
@[simp]
theorem vsub_sub_vsub_cancel_right (p₁ p₂ p₃ : P) : p₁ -ᵥ p₃ - (p₂ -ᵥ p₃) = p₁ -ᵥ p₂

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
(p₁ p₂ p₃ : P)


lemma toAddCircle_injective : Function.Injective (toAddCircle : ZMod N → _)


theorem age.is_equiv_invariant (N P : Bundled.{w} L.Structure) (h : Nonempty (N ≃[L] P)) :
    N ∈ L.age M ↔ P ∈ L.age M

(N P : CategoryTheory.Bundled L.Structure)


@[simp]
theorem quotEquivOfEqBot_symm_apply (hp : p = ⊥) (x : M) :
    (p.quotEquivOfEqBot hp).symm x = (Quotient.mk x : M ⧸ p)

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
(hp : p = ⊥)
(x : M)

(p.quotEquivOfEqBot hp).symm x = Submodule.Quotient.mk x


theorem inf_principal_neBot_iff {s : Set α} : NeBot (l ⊓ 𝓟 s) ↔ ∀ U ∈ l, (U ∩ s).Nonempty

{α : Type u_1}
{l : Filter α}
{s : Set α}

(l ⊓ 𝓟 s).NeBot ↔ ∀ U ∈ l, (U ∩ s).Nonempty


theorem not_dvd_index_sylow [hp : Fact p.Prime] [Finite (Sylow p G)] (P : Sylow p G)
    (hP : relindex ↑P (P : Subgroup G).normalizer ≠ 0) : ¬p ∣ (P : Subgroup G).index

(hP : (↑P).relindex (↑P).normalizer ≠ 0)


lemma SMulPosMono.toSMulPosReflectLT [SMulPosMono α β] : SMulPosReflectLT α β

{α : Type u_1}
{β : Type u_2}
[SMul α β]
[LinearOrder α]
[Preorder β]
[Zero β]
[SMulPosMono α β]


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

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(f : N ≃+ M)
(K : AddSubsemigroup M)

AddSubsemigroup.comap (↑f) K = AddSubsemigroup.map (↑f.symm) K


@[to_additive mker_prod_map]
theorem mker_prod_map {M' : Type*} {N' : Type*} [MulOneClass M'] [MulOneClass N'] (f : M →* N)
    (g : M' →* N') : mker (prodMap f g) = f.mker.prod (mker g)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{M' : Type u_6}
{N' : Type u_7}
[MulOneClass M']
[MulOneClass N']
(f : M →* N)
(g : M' →* N')

MonoidHom.mker (f.prodMap g) = (MonoidHom.mker f).prod (MonoidHom.mker g)


theorem prod_range_univ_eq {m₁ : α → γ} :
    range m₁ ×ˢ (univ : Set β) = range fun p : α × β => (m₁ p.1, p.2)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{m₁ : α → γ}

Set.range m₁ ×ˢ Set.univ = Set.range fun p => (m₁ p.1, p.2)


@[simp] theorem getElem?_modifyNth_ne (f : α → α) {m n} (l : List α) (h : m ≠ n) :
    (modifyNth f m l)[n]? = l[n]?

{α : Type u_1}
(f : α → α)
{m n : Nat}
(l : List α)
(h : m ≠ n)


theorem map_congr {x : Option α} (h : ∀ a, a ∈ x → f a = g a) : x.map f = x.map g

∀ {α_1 : Type u_2} {f g : α → α_1} {x : Option α}, (∀ (a : α), a ∈ x → f a = g a) → Option.map f x = Option.map g x


/-- If `x` and `y` are both separable elements, then `x * y` is also a separable element. -/
theorem isSeparable_mul {x y : E} (hx : IsSeparable F x) (hy : IsSeparable F y) :
    IsSeparable F (x * y)

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
{x y : E}
(hx : IsSeparable F x)
(hy : IsSeparable F y)


theorem length_insertNth_le_succ (l : List α) (x : α) (n : ℕ) :
    (insertNth n x l).length ≤ l.length + 1

{α : Type u}
(l : List α)
(x : α)
(n : ℕ)

(List.insertNth n x l).length ≤ l.length + 1


@[to_additive]
theorem comap_mul_comap_le [MulHomClass F α β] (m : F) {f g : Filter β} :
    f.comap m * g.comap m ≤ (f * g).comap m

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[MulOneClass α]
[MulOneClass β]
[FunLike F α β]
[MulHomClass F α β]
(m : F)
{f g : Filter β}

Filter.comap (⇑m) f * Filter.comap (⇑m) g ≤ Filter.comap (⇑m) (f * g)


theorem power_nat_le_max {c : Cardinal.{u}} {n : ℕ} : c ^ (n : Cardinal.{u}) ≤ max c ℵ₀


theorem equicontinuousOn_finite [Finite ι] {F : ι → X → α} {S : Set X} :
    EquicontinuousOn F S ↔ ∀ i, ContinuousOn (F i) S

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

EquicontinuousOn F S ↔ ∀ (i : ι), ContinuousOn (F i) S


protected nonrec -- Porting note: added
theorem Rel.trans (r : α → α → Prop) [IsTrans α r] {s t u : Multiset α} (r1 : Rel r s t)
    (r2 : Rel r t u) : Rel r s u

{α : Type u_1}
(r : α → α → Prop)
[IsTrans α r]
{s t u : Multiset α}
(r1 : Multiset.Rel r s t)
(r2 : Multiset.Rel r t u)


@[simp, norm_cast]
theorem cast_min {α} [LinearOrderedSemiring α] {a b : ℕ} : ((min a b : ℕ) : α) = min (a : α) b

{α : Type u_3}
[LinearOrderedSemiring α]
{a b : ℕ}


lemma dblXYZ_of_Z_ne_zero {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hQz : Q z ≠ 0) (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ W.negY Q * P z ^ 3) :
    W.dblXYZ P = W.dblZ P •
      ![W.toAffine.addX (P x / P z ^ 2) (Q x / Q z ^ 2)
          (W.toAffine.slope (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (Q y / Q z ^ 3)),
        W.toAffine.addY (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3)
          (W.toAffine.slope (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (Q y / Q z ^ 3)),
        1]


theorem Ioo_subset_Ioc_self : Ioo a b ⊆ Ioc a b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}


@[simp] theorem natCast_ne_top (n : ℕ) : (n : ℝ≥0∞) ≠ ∞


theorem succ_natCast_pos (n : ℕ) : 0 < (n : ℤ) + 1


theorem _root_.RingOfIntegers.isPrincipalIdealRing_of_abs_discr_lt
    (h : |discr K| < (2 * (π / 4) ^ NrComplexPlaces K *
      ((finrank ℚ K) ^ (finrank ℚ K) / (finrank ℚ K).factorial)) ^ 2) :
    IsPrincipalIdealRing (𝓞 K)

(h :
  ↑|NumberField.discr K| <
    (2 * (Real.pi / 4) ^ NumberField.InfinitePlace.NrComplexPlaces K *
        (↑(FiniteDimensional.finrank ℚ K) ^ FiniteDimensional.finrank ℚ K /
          ↑(FiniteDimensional.finrank ℚ K).factorial)) ^
      2)


/-- `TrivSqZeroExt.inl` as a continuous linear map. -/
@[simps]
def inlCLM [CommSemiring R] [AddCommMonoid M] [Module R M] : R →L[R] tsze R M

(R : Type u_3)
(M : Type u_4)
[TopologicalSpace R]
[TopologicalSpace M]
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(r : R)

(TrivSqZeroExt.inlCLM R M) r = TrivSqZeroExt.inl r


/-- The `balance1` function repairs the balance invariant when the first argument is red-red. -/
protected theorem RedRed.balance1 {l : RBNode α} {v : α} {r : RBNode α}
    (hl : l.RedRed p n) (hr : r.Balanced c n) : ∃ c, (balance1 l v r).Balanced c (n + 1)

{α : Type u_1}
{p : Prop}
{n : Nat}
{c : Batteries.RBColor}
{l : Batteries.RBNode α}
{v : α}
{r : Batteries.RBNode α}
(hl : Batteries.RBNode.RedRed p l n)
(hr : r.Balanced c n)

∃ c, (l.balance1 v r).Balanced c (n + 1)


protected theorem le_add_of_sub_left_le {a b c : Int} (h : a - b ≤ c) : a ≤ b + c


theorem finite_spans_dense (b : HilbertBasis ι 𝕜 E) :
    (⨆ J : Finset ι, span 𝕜 (J.image b : Set E)).topologicalClosure = ⊤

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(b : HilbertBasis ι 𝕜 E)

(⨆ J, Submodule.span 𝕜 ↑(Finset.image (fun i => b.repr.symm (lp.single 2 i 1)) J)).topologicalClosure = ⊤


theorem Cauchy.comap' [UniformSpace β] {f : Filter β} {m : α → β} (hf : Cauchy f)
    (hm : Filter.comap (fun p : α × α => (m p.1, m p.2)) (𝓤 β) ≤ 𝓤 α)
    (_ : NeBot (Filter.comap m f)) : Cauchy (Filter.comap m f)

(hm : Filter.comap (fun p => (m p.1, m p.2)) (𝓤 β) ≤ 𝓤 α)

(Filter.comap m f).NeBot → Cauchy (Filter.comap m f)


theorem exists_prop_of_false {p : Prop} {q : p → Prop} : ¬p → ¬∃ h' : p, q h'


theorem mem_rootsOfUnity' (k : ℕ+) (ζ : Mˣ) : ζ ∈ rootsOfUnity k M ↔ (ζ : M) ^ (k : ℕ) = 1

{M : Type u_1}
[CommMonoid M]
(k : ℕ+)
(ζ : Mˣ)


/-- Given `F : C ⥤ D` and `X : D`, to upgrade a functor `G : E ⥤ C` to a functor
    `E ⥤ CostructuredArrow F X`, it suffices to provide maps `F.obj (G.obj Y) ⟶ X` for all `Y`
    making the obvious triangles involving all `F.map (G.map g)` commute.

    This is of course the same as providing a cocone over `F ⋙ G` with cocone point `X`, see
    `Functor.toCostructuredArrowIsoToCostructuredArrow`. -/
@[simps]
def toCostructuredArrow (G : E ⥤ C) (F : C ⥤ D) (X : D) (f : (Y : E) → F.obj (G.obj Y) ⟶ X)
    (h : ∀ {Y Z : E} (g : Y ⟶ Z), F.map (G.map g) ≫ f Z = f Y) : E ⥤ CostructuredArrow F X

(h : ∀ {Y Z : E} (g : Y ⟶ Z), CategoryTheory.CategoryStruct.comp (F.map (G.map g)) (f Z) = f Y)

(G.toCostructuredArrow F X f h).obj Y = CategoryTheory.CostructuredArrow.mk (f Y)


lemma generateFrom_countablePartition_le (α : Type*) [m : MeasurableSpace α] [CountablyGenerated α]
    (n : ℕ) :
    generateFrom (countablePartition α n) ≤ m

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

MeasurableSpace.generateFrom (MeasurableSpace.countablePartition α n) ≤ m


@[to_additive]
theorem norm_mk_le : norm (mk L₁) ≤ L₁.length

{α : Type u}
{L₁ : List (α × Bool)}
[DecidableEq α]


/-- If a differentiable function `f` is approximated by a linear map `A` on a set `s`, up to `δ`,
then at almost every `x` in `s` one has `‖f' x - A‖ ≤ δ`. -/
theorem _root_.ApproximatesLinearOn.norm_fderiv_sub_le {A : E →L[ℝ] E} {δ : ℝ≥0}
    (hf : ApproximatesLinearOn f A s δ) (hs : MeasurableSet s) (f' : E → E →L[ℝ] E)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) : ∀ᵐ x ∂μ.restrict s, ‖f' x - A‖₊ ≤ δ

∀ᵐ (x : E) ∂μ.restrict s, ‖f' x - A‖₊ ≤ δ


theorem Dense.exists_ge' {s : Set α} (hs : Dense s) (htop : ∀ x, IsTop x → x ∈ s) (x : α) :
    ∃ y ∈ s, x ≤ y

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{s : Set α}
(hs : Dense s)
(htop : ∀ (x : α), IsTop x → x ∈ s)
(x : α)


/-- The intersection of a preperfect set and an open set is preperfect. -/
theorem Preperfect.open_inter {U : Set α} (hC : Preperfect C) (hU : IsOpen U) :
    Preperfect (U ∩ C)

{α : Type u_1}
[TopologicalSpace α]
{C U : Set α}
(hC : Preperfect C)
(hU : IsOpen U)


@[simp]
theorem ofLinear_symm_apply {h₁ h₂} (x : M₂) : (ofLinear f g h₁ h₂ : M ≃ₛₗ[σ₁₂] M₂).symm x = g x

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
(f : M →ₛₗ[σ₁₂] M₂)
(g : M₂ →ₛₗ[σ₂₁] M)
{h₁ : f.comp g = LinearMap.id}
{h₂ : g.comp f = LinearMap.id}
(x : M₂)

(LinearEquiv.ofLinear f g h₁ h₂).symm x = g x


theorem gal_zero_isSolvable : IsSolvable (0 : F[X]).Gal


@[simp]
theorem Basis.equivFun_apply [Finite ι] (b : Basis ι R M) (u : M) : b.equivFun u = b.repr u

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Finite ι]
(b : Basis ι R M)
(u : M)


theorem colimit_rep_eq_of_exists [HasColimit F] {i j : J} (x : F.obj i) (y : F.obj j)
    (h : ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f x = F.map g y) :
    colimit.ι F i x = colimit.ι F j y

(x : (CategoryTheory.forget C).obj (F.obj i))

(y : (CategoryTheory.forget C).obj (F.obj j))

(h : ∃ k f g, (F.map f) x = (F.map g) y)

(CategoryTheory.Limits.colimit.ι F i) x = (CategoryTheory.Limits.colimit.ι F j) y


/-- This is the **Unfolding Trick**: Given an additive subgroup `Γ'` of an additive group `G'`, the
  integral of a function `f` on `G'` times the lift to `G'` of a function `g` on the quotient
  `G' ⧸ Γ'` with respect to a right-invariant measure `μ` on `G'`, is equal to the integral over
  the quotient of the automorphization of `f` times `g`. -/
lemma QuotientAddGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [NormedField K]
    [NormedSpace ℝ K] [μ'.IsAddRightInvariant] {f : G' → K}
    (f_ℒ_1 : Integrable f μ') {g : G' ⧸ Γ' → K} (hg : AEStronglyMeasurable g μ_𝓕)
    (g_ℒ_infinity : essSup (fun x ↦ (‖g x‖₊ : ℝ≥0∞)) μ_𝓕 ≠ ∞)
    (F_ae_measurable : AEStronglyMeasurable (QuotientAddGroup.automorphize f) μ_𝓕)
    (h𝓕 : IsAddFundamentalDomain Γ'.op 𝓕' μ') :
    ∫ x : G', g (x : G' ⧸ Γ') * (f x) ∂μ'
      = ∫ x : G' ⧸ Γ', g x * (QuotientAddGroup.automorphize f x) ∂μ_𝓕

(hg : MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map QuotientAddGroup.mk (μ'.restrict 𝓕')))

(g_ℒ_infinity : essSup (fun x => ↑‖g x‖₊) (MeasureTheory.Measure.map QuotientAddGroup.mk (μ'.restrict 𝓕')) ≠ ⊤)

(F_ae_measurable :
  MeasureTheory.AEStronglyMeasurable (QuotientAddGroup.automorphize f)
    (MeasureTheory.Measure.map QuotientAddGroup.mk (μ'.restrict 𝓕')))

(h𝓕 : MeasureTheory.IsAddFundamentalDomain (↥Γ'.op) 𝓕' μ')

∫ (x : G'), g ↑x * f x ∂μ' =
  ∫ (x : G' ⧸ Γ'),
    g x * QuotientAddGroup.automorphize f x ∂MeasureTheory.Measure.map QuotientAddGroup.mk (μ'.restrict 𝓕')


/-- `castSucc` commutes with `succAbove`. -/
@[simp]
lemma castSucc_succAbove_castSucc {n : ℕ} {i : Fin (n + 1)} {j : Fin n} :
    i.castSucc.succAbove j.castSucc = (i.succAbove j).castSucc


theorem pointwise_smul_def {a : α} (S : Subgroup G) :
    a • S = S.map (MulDistribMulAction.toMonoidEnd _ _ a)

{α : Type u_1}
{G : Type u_2}
[Group G]
[Monoid α]
[MulDistribMulAction α G]
{a : α}
(S : Subgroup G)

a • S = Subgroup.map ((MulDistribMulAction.toMonoidEnd α G) a) S


@[simp]
theorem ιMulti_zero_apply (v : Fin 0 → M) : ιMulti R 0 v = 1

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
(v : Fin 0 → M)


theorem natDegree_primPart (p : R[X]) : p.primPart.natDegree = p.natDegree

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
(p : Polynomial R)


theorem contDiffAt_rpow_const {x p : ℝ} {n : ℕ} (h : x ≠ 0 ∨ ↑n ≤ p) :
    ContDiffAt ℝ n (fun x : ℝ => x ^ p) x


@[simp]
theorem cthickening_ball (hε : 0 ≤ ε) (hδ : 0 < δ) (x : E) :
    cthickening ε (ball x δ) = closedBall x (ε + δ)

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

Metric.cthickening ε (Metric.ball x δ) = Metric.closedBall x (ε + δ)


theorem totalDegree_finset_prod {ι : Type*} (s : Finset ι) (f : ι → MvPolynomial σ R) :
    (s.prod f).totalDegree ≤ ∑ i ∈ s, (f i).totalDegree

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{ι : Type u_3}
(s : Finset ι)
(f : ι → MvPolynomial σ R)


lemma neg_dotProduct_neg : -v ⬝ᵥ -w = v ⬝ᵥ w

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


@[simp]
theorem cancel_counit_right {X Y : D} (f f' : X ⟶ e.functor.obj (e.inverse.obj Y)) :
    f ≫ e.counit.app Y = f' ≫ e.counit.app Y ↔ f = f'

CategoryTheory.CategoryStruct.comp f (e.counit.app Y) = CategoryTheory.CategoryStruct.comp f' (e.counit.app Y) ↔ f = f'


theorem coe_nhds (s : AbsConvexOpenSets 𝕜 E) : (s : Set E) ∈ 𝓝 (0 : E)

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace E]
[AddCommMonoid E]
[Zero E]
[SeminormedRing 𝕜]
[SMul 𝕜 E]
[SMul ℝ E]
(s : AbsConvexOpenSets 𝕜 E)


@[to_additive]
lemma piFinset_smul [∀ i, SMul (α i) (β i)] (s : ∀ i, Finset (α i)) (t : ∀ i, Finset (β i)) :
    piFinset (fun i ↦ s i • t i) = piFinset s • piFinset t

{ι : Type u_5}
{α : ι → Type u_6}
{β : ι → Type u_7}
[Fintype ι]
[DecidableEq ι]
[(i : ι) → DecidableEq (β i)]
[(i : ι) → SMul (α i) (β i)]
(s : (i : ι) → Finset (α i))
(t : (i : ι) → Finset (β i))

(Fintype.piFinset fun i => s i • t i) = Fintype.piFinset s • Fintype.piFinset t


/-- If `dist (f n) (f (n+1))` is bounded by `(C / 2) / 2^n`, then the distance from
`f 0` to the limit of `f` is bounded above by `C`. -/
theorem dist_le_of_le_geometric_two_of_tendsto₀ {a : α} (ha : Tendsto f atTop (𝓝 a)) :
    dist (f 0) a ≤ C

(ha : Filter.Tendsto f Filter.atTop (𝓝 a))


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

{ι : Type u_1}
{α : ι → Type u_3}
{β : Type u_5}
[CompleteLattice β]
(s : Set ι)
(t : (i : ι) → Set (α i))
(f : (i : ι) → α i → β)

⨆ i ∈ s, ⨆ j ∈ t i, f i j = ⨆ ij ∈ s.sigma t, f ij.fst ij.snd


@[simp]
theorem smul_negPart (r : ℝ≥0) : (r • j).negPart = r • j.negPart

(j : MeasureTheory.JordanDecomposition α)


theorem comap_cofinite_le (f : α → β) : comap f cofinite ≤ cofinite

{α : Type u_2}
{β : Type u_3}
(f : α → β)

Filter.comap f Filter.cofinite ≤ Filter.cofinite


theorem natDegree_add_coeff_mul (f g : R[X]) :
    (f * g).coeff (f.natDegree + g.natDegree) = f.coeff f.natDegree * g.coeff g.natDegree


@[simp] theorem UInt64.toUInt16_toNat (x : UInt64) : x.toUInt16.toNat = x.toNat % 2 ^ 16


/-- Typeclass for finite index subgroups. -/
class _root_.AddSubgroup.FiniteIndex {G : Type*} [AddGroup G] (H : AddSubgroup G) : Prop where
  /-- The additive subgroup has finite index -/
  finiteIndex : H.index ≠ 0

{G : Type u_3}
[AddGroup G]
{H : AddSubgroup G}
[self : H.FiniteIndex]


/-- A Klein four-group is a group of cardinality four and exponent two. -/
@[to_additive existing IsAddKleinFour]
class IsKleinFour (G : Type*) [Group G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : Monoid.exponent G = 2

{G : Type u_1}
[Group G]
[self : IsKleinFour G]


@[sheaf_restrict]
theorem basicOpen_le : X.basicOpen f ≤ U

(X : AlgebraicGeometry.Scheme)
{U : X.Opens}
(f : ↑(X.presheaf.obj (Opposite.op U)))


@[to_additive] theorem toIsCancelMul [UniqueProds G] : IsCancelMul G


theorem OpenEmbedding.open_iff_image_open (hf : OpenEmbedding f) {s : Set X} :
    IsOpen s ↔ IsOpen (f '' s)

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


@[simp, norm_cast]
theorem val_neg (x : s) : (↑(-x) : R) = -↑x

{R : Type u}
[NonUnitalNonAssocRing R]
(s : NonUnitalSubring R)
(x : ↥s)


@[simp]
protected theorem image_symm_apply {α β} (f : α → β) (s : Set α) (H : Injective f) (x : α)
    (h : f x ∈ f '' s) : (Set.image f s H).symm ⟨f x, h⟩ = ⟨x, H.mem_set_image.1 h⟩

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(s : Set α)
(H : Function.Injective f)
(x : α)
(h : f x ∈ f '' s)

(Equiv.Set.image f s H).symm ⟨f x, h⟩ = ⟨x, ⋯⟩


@[simp]
theorem factors_mk (a : α) (h : a ≠ 0) : (Associates.mk a).factors = factors' a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
(a : α)
(h : a ≠ 0)

(Associates.mk a).factors = ↑(Associates.factors' a)


theorem ptendsto'_nhds {f : Y →. X} {l : Filter Y} {x : X} :
    PTendsto' f l (𝓝 x) ↔ ∀ s, IsOpen s → x ∈ s → f.preimage s ∈ l

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{f : Y →. X}
{l : Filter Y}
{x : X}

Filter.PTendsto' f l (𝓝 x) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → f.preimage s ∈ l


@[simp]
theorem inr_zero [Zero R] [Zero A] : ↑(0 : A) = (0 : Unitization R A)

(R : Type u_3)
{A : Type u_4}
[Zero R]
[Zero A]


theorem isCoprime_of_prime_dvd {x y : R} (nonzero : ¬(x = 0 ∧ y = 0))
    (H : ∀ z : R, Prime z → z ∣ x → ¬z ∣ y) : IsCoprime x y

(H : ∀ (z : R), Prime z → z ∣ x → ¬z ∣ y)


@[simp]
theorem equivOfIsometry_symm (e : Q₁.IsometryEquiv Q₂) :
    (equivOfIsometry e).symm = equivOfIsometry e.symm

{R : Type u_1}
[CommRing R]
{M₁ : Type u_4}
{M₂ : Type u_5}
[AddCommGroup M₁]
[AddCommGroup M₂]
[Module R M₁]
[Module R M₂]
{Q₁ : QuadraticForm R M₁}
{Q₂ : QuadraticForm R M₂}
(e : QuadraticMap.IsometryEquiv Q₁ Q₂)

(CliffordAlgebra.equivOfIsometry e).symm = CliffordAlgebra.equivOfIsometry e.symm


theorem encard_lt_encard_iff_encard_diff_lt_encard_diff (h : (s ∩ t).Finite) :
    s.encard < t.encard ↔ (s \ t).encard < (t \ s).encard

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


@[simp]
theorem intrinsicFrontier_empty : intrinsicFrontier 𝕜 (∅ : Set P) = ∅

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


theorem mk_mem_interedges_comm : (a, b) ∈ interedges r s t ↔ (b, a) ∈ interedges r t s

{α : Type u_4}
{r : α → α → Prop}
[DecidableRel r]
{s t : Finset α}
{a b : α}
(hr : Symmetric r)

(a, b) ∈ Rel.interedges r s t ↔ (b, a) ∈ Rel.interedges r t s


theorem of_mul_int (m : ℤ) (h : Irrational (x * m)) : Irrational x

{x : ℝ}
(m : ℤ)
(h : Irrational (x * ↑m))


@[ext 1050]
lemma Sigma.hom_ext {f : β → C} [HasCoproduct f] {X : C} (g₁ g₂ : ∐ f ⟶ X)
    (h : ∀ (b : β), Sigma.ι f b ≫ g₁ = Sigma.ι f b ≫ g₂) : g₁ = g₂

(h : ∀ (b : β), CategoryTheory.Limits.Sigma.ι f b ≫ g₁ = CategoryTheory.Limits.Sigma.ι f b ≫ g₂)


theorem iSup_add {ι : Sort v} [Nonempty ι] (l : ι → Language α) (m : Language α) :
    (⨆ i, l i) + m = ⨆ i, l i + m

{α : Type u_1}
{ι : Sort v}
[Nonempty ι]
(l : ι → Language α)
(m : Language α)


∀ (x x_1 : ℝ),
  Real.mul x x_1 =
    match x, x_1 with
    | { cauchy := a }, { cauchy := b } => { cauchy := a * b }


theorem IsCompact.lt_sInf_iff_of_continuous [ClosedIicTopology α] {f : β → α} {K : Set β}
    (hK : IsCompact K) (h0K : K.Nonempty) (hf : ContinuousOn f K) (y : α) :
    y < sInf (f '' K) ↔ ∀ x ∈ K, y < f x

{α : Type u_2}
{β : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[TopologicalSpace β]
[ClosedIicTopology α]
{f : β → α}
{K : Set β}
(hK : IsCompact K)
(h0K : K.Nonempty)
(hf : ContinuousOn f K)
(y : α)


@[to_additive (attr := simp)]
theorem inv_insert (a : α) (s : Set α) : (insert a s)⁻¹ = insert a⁻¹ s⁻¹

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


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

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

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


@[simp]
theorem comp_toNatTrans {F G H : BraidedFunctor C D} {α : F ⟶ G} {β : G ⟶ H} :
    (α ≫ β).toNatTrans = @CategoryStruct.comp (C ⥤ D) _ _ _ _ α.toNatTrans β.toNatTrans

{F G H : CategoryTheory.BraidedFunctor C D}

(α ≫ β).toNatTrans = α.toNatTrans ≫ β.toNatTrans


/-- If a sequence of functions is uniformly Cauchy on a set, then the values at each point form
a Cauchy sequence. -/
theorem UniformCauchySeqOn.cauchy_map [hp : NeBot p] (hf : UniformCauchySeqOn F p s) (hx : x ∈ s) :
    Cauchy (map (fun i => F i x) p)

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{s : Set α}
{x : α}
{p : Filter ι}
[hp : p.NeBot]
(hf : UniformCauchySeqOn F p s)
(hx : x ∈ s)


@[simp]
theorem map_vsub (p1 p2 : P) : e.linearIsometryEquiv (p1 -ᵥ p2) = e p1 -ᵥ e p2

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


/-- A structure `M` is a Fraïssé limit for a class `K` if it is countably generated,
ultrahomogeneous, and has age `K`. -/
structure IsFraisseLimit [Countable (Σ l, L.Functions l)] [Countable M] : Prop where
  protected ultrahomogeneous : IsUltrahomogeneous L M
  protected age : L.age M = K

{K : Set (CategoryTheory.Bundled L.Structure)}

(self : FirstOrder.Language.IsFraisseLimit K M)


theorem Antitone.comp_monotone (hg : Antitone g) (hf : Monotone f) : Antitone (g ∘ f)

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


/-- `IsIncompTrans X lt` means that for `lt` a binary relation on `X`, the incomparable relation
`fun a b => ¬ lt a b ∧ ¬ lt b a` is transitive. -/
class IsIncompTrans (α : Sort u) (lt : α → α → Prop) : Prop where
  incomp_trans : ∀ a b c, ¬lt a b ∧ ¬lt b a → ¬lt b c ∧ ¬lt c b → ¬lt a c ∧ ¬lt c a

{α : Sort u}
{lt : α → α → Prop}
[self : IsIncompTrans α lt]
(a b c : α)


theorem toIcoMod_periodic (a : α) : Function.Periodic (toIcoMod hp a) p

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a : α)


@[reassoc]
theorem homEquiv_naturality_left_square (f : X' ⟶ X) (g : F.obj X ⟶ Y')
    (h : F.obj X' ⟶ Y) (k : Y ⟶ Y') (w : F.map f ≫ g = h ≫ k) :
    f ≫ (adj.homEquiv X Y') g = (adj.homEquiv X' Y) h ≫ G.map k

(w : CategoryTheory.CategoryStruct.comp (F.map f) g = CategoryTheory.CategoryStruct.comp h k)

CategoryTheory.CategoryStruct.comp f ((adj.homEquiv X Y') g) =
  CategoryTheory.CategoryStruct.comp ((adj.homEquiv X' Y) h) (G.map k)


lemma nonZeroDivisorsLeft_eq_right (M₀ : Type*) [CommMonoidWithZero M₀] :
    nonZeroDivisorsLeft M₀ = nonZeroDivisorsRight M₀


theorem UniformSpace.ball_mem_nhdsWithin {x : α} {S : Set α} ⦃V : Set (α × α)⦄ (x_in : x ∈ S)
    (V_in : V ∈ 𝓤 α ⊓ 𝓟 (S ×ˢ S)) : ball x V ∈ 𝓝[S] x

{α : Type ua}
[UniformSpace α]
{x : α}
{S : Set α}
⦃V : Set (α × α)⦄
(x_in : x ∈ S)
(V_in : V ∈ 𝓤 α ⊓ 𝓟 (S ×ˢ S))


lemma iSup_ucs_le_weightSpace_zero :
    ⨆ k, (⊥ : LieSubmodule R L M).ucs k ≤ weightSpace M (0 : L → R)

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]

⨆ k, LieSubmodule.ucs k ⊥ ≤ LieModule.weightSpace M 0


lemma mem_iff (x : R) : x ∈ I ↔ I.ringCon x 0

{R : Type u_1}
[NonUnitalNonAssocRing R]
(I : TwoSidedIdeal R)
(x : R)


/-- Inclusion of the groupoid of `C^n` local diffeos in the groupoid of `C^m` local diffeos when
`m ≤ n` -/
theorem contDiffGroupoid_le (h : m ≤ n) : contDiffGroupoid n I ≤ contDiffGroupoid m I

{m n : ℕ∞}
{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(h : m ≤ n)


theorem coe_fn_injective : @Function.Injective (A →ₐ[R] B) (A → B) (↑)

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


@[simp] theorem card_eq_zero [IsEmpty α] : card α = 0


theorem gcd_eq_zero_iff (s : Multiset α) : s.gcd = 0 ↔ ∀ x : α, x ∈ s → x = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(s : Multiset α)


/-- The category of cones on a given diagram. -/
@[simps]
instance Cone.category : Category (Cone F)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(B : CategoryTheory.Limits.Cone F)


/-- The distinguished triangle in the derived category associated to a short
exact sequence of cochain complexes. -/
@[simps!]
noncomputable def triangleOfSES : Triangle (DerivedCategory C)

{S : CategoryTheory.ShortComplex (CochainComplex C ℤ)}

(DerivedCategory.triangleOfSES hS).mor₃ = DerivedCategory.triangleOfSESδ hS


@[to_additive]
theorem iUnion_mul_right_image : ⋃ a ∈ t, (· * a) '' s = s * t


@[ext]
theorem ext (h : ∀ m, m ∈ N ↔ m ∈ N') : N = N'

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N N' : LieSubmodule R L M)
(h : ∀ (m : M), m ∈ N ↔ m ∈ N')


/-- To rewrite from right to left, use `Finset.inf'_comp_eq_image`. -/
@[simp]
theorem inf'_image [DecidableEq β] {s : Finset γ} {f : γ → β} (hs : (s.image f).Nonempty)
    (g : β → α)  :
    (s.image f).inf' hs g = s.inf' hs.of_image (g ∘ f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SemilatticeInf α]
[DecidableEq β]
{s : Finset γ}
{f : γ → β}
(hs : (Finset.image f s).Nonempty)
(g : β → α)

(Finset.image f s).inf' hs g = s.inf' ⋯ (g ∘ f)


@[simp] lemma insertNth_removeNth (p : Fin (n + 1)) (x) (f : ∀ j, α j) :
    insertNth p x (removeNth p f) = update f p x

{n : ℕ}
{α : Fin (n + 1) → Type u}
(p : Fin (n + 1))
(x : α p)
(f : (j : Fin (n + 1)) → α j)

p.insertNth x (p.removeNth f) = Function.update f p x


theorem mk_natCast (m : ℕ) : (mk m 1 : Localization M) = m

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
(m : ℕ)


/-- Build an isomorphism in the category `RingCat` from a `RingEquiv` between `RingCat`s. -/
@[simps]
def toRingCatIso [Ring X] [Ring Y] (e : X ≃+* Y) : RingCat.of X ≅ RingCat.of Y

{X Y : Type u}
[Ring X]
[Ring Y]
(e : X ≃+* Y)


theorem integrable_condexp : Integrable (μ[f|m]) μ

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


/-- This is really an auxiliary result en route to `blimsup_cthickening_mul_ae_eq`.

NB: The `: Set α` type ascription is present because of
https://github.com/leanprover-community/mathlib/issues/16932. -/
theorem blimsup_cthickening_ae_le_of_eventually_mul_le (p : ℕ → Prop) {s : ℕ → Set α} {M : ℝ}
    (hM : 0 < M) {r₁ r₂ : ℕ → ℝ} (hr : Tendsto r₁ atTop (𝓝[>] 0))
    (hMr : ∀ᶠ i in atTop, M * r₁ i ≤ r₂ i) :
    (blimsup (fun i => cthickening (r₁ i) (s i)) atTop p : Set α) ≤ᵐ[μ]
      (blimsup (fun i => cthickening (r₂ i) (s i)) atTop p : Set α)

{r₁ r₂ : ℕ → ℝ}

(hr : Filter.Tendsto r₁ Filter.atTop (𝓝[>] 0))

(hMr : ∀ᶠ (i : ℕ) in Filter.atTop, M * r₁ i ≤ r₂ i)

Filter.blimsup (fun i => Metric.cthickening (r₁ i) (s i)) Filter.atTop p ≤ᵐ[μ]
  Filter.blimsup (fun i => Metric.cthickening (r₂ i) (s i)) Filter.atTop p


@[simp]
theorem mulRight_toAddMonoidHom (a : A) : (mulRight R a : A →+ A) = AddMonoidHom.mulRight a

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
(a : A)

↑(LinearMap.mulRight R a) = AddMonoidHom.mulRight a


@[simp, norm_cast]
theorem coe_top : ((⊤ : UpperSet α) : Set α) = ∅


/-- This can be used to prove
```lean
example [AddCommMonoid α] [Mul α] (a₁₁ a₁₂ a₂₁ a₂₂ b₁₁ b₁₂ b₂₁ b₂₂ : α) :
  !![a₁₁, a₁₂;
     a₂₁, a₂₂] * !![b₁₁, b₁₂;
                    b₂₁, b₂₂] =
  !![a₁₁*b₁₁ + a₁₂*b₂₁, a₁₁*b₁₂ + a₁₂*b₂₂;
     a₂₁*b₁₁ + a₂₂*b₂₁, a₂₁*b₁₂ + a₂₂*b₂₂] :=
(mulᵣ_eq _ _).symm
```
-/
@[simp]
theorem mulᵣ_eq [Mul α] [AddCommMonoid α] (A : Matrix (Fin l) (Fin m) α)
    (B : Matrix (Fin m) (Fin n) α) : mulᵣ A B = A * B

{l m n : ℕ}
{α : Type u_1}
[Mul α]
[AddCommMonoid α]
(A : Matrix (Fin l) (Fin m) α)
(B : Matrix (Fin m) (Fin n) α)


@[simp]
theorem fourier_apply {n : ℤ} {x : AddCircle T} : fourier n x = toCircle (n • x :)


protected theorem le_min_of_le_of_le {a b c : Nat} : a ≤ b → a ≤ c → a ≤ min b c


@[to_additive]
theorem ContinuousMul.induced {α : Type*} {β : Type*} {F : Type*} [FunLike F α β] [MulOneClass α]
    [MulOneClass β] [MonoidHomClass F α β] [tβ : TopologicalSpace β] [ContinuousMul β] (f : F) :
    @ContinuousMul α (tβ.induced f) _

{α : Type u_6}
{β : Type u_7}
{F : Type u_8}
[FunLike F α β]
[AddZeroClass α]
[AddZeroClass β]
[AddMonoidHomClass F α β]
[tβ : TopologicalSpace β]
[ContinuousAdd β]
(f : F)


@[aesop norm -10 destruct (rule_sets := [CategoryTheory])]
theorem hom_inr_inl_false {X : C} {Y : D} (f : Sum.inr X ⟶ Sum.inl Y) : False

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
(D : Type u₁)
[CategoryTheory.Category.{v₁, u₁} D]
{X : C}
{Y : D}
(f : Sum.inr X ⟶ Sum.inl Y)


@[simp] protected theorem UInt16.sizeOf (a : UInt16) : sizeOf a = a.toNat + 2


theorem min_le_multiplicity_add {p a b : α} :
    min (multiplicity p a) (multiplicity p b) ≤ multiplicity p (a + b)

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


/-- The weighted sum, added to the base point, is independent of the
base point when the sum of the weights is 1. -/
theorem weightedVSubOfPoint_vadd_eq_of_sum_eq_one (w : ι → k) (p : ι → P) (h : ∑ i ∈ s, w i = 1)
    (b₁ b₂ : P) : s.weightedVSubOfPoint p b₁ w +ᵥ b₁ = s.weightedVSubOfPoint p b₂ w +ᵥ b₂

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p : ι → P)
(h : ∑ i ∈ s, w i = 1)
(b₁ b₂ : P)

(s.weightedVSubOfPoint p b₁) w +ᵥ b₁ = (s.weightedVSubOfPoint p b₂) w +ᵥ b₂


theorem vadd_eq (a : A) (r : R) : r +ᵥ σ a = σ (↑ₐ r + a)

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
(a : A)
(r : R)

r +ᵥ spectrum R a = spectrum R ((algebraMap R A) r + a)


/--
If the image of an element `m : M` in `R[M]` belongs the submodule generated by
the closure of some `S : Set M` then `m ∈ closure S`. -/
theorem mem_closure_of_mem_span_closure [Nontrivial R] {m : M} {S : Set M}
    (h : of' R M m ∈ span R (Submonoid.closure (of' R M '' S) : Set R[M])) :
    m ∈ closure S

(h : AddMonoidAlgebra.of' R M m ∈ Submodule.span R ↑(Submonoid.closure (AddMonoidAlgebra.of' R M '' S)))


@[simp] theorem filterMap_some (l : List α) : filterMap some l = l


theorem nhds_prod_eq {x : X} {y : Y} : 𝓝 (x, y) = 𝓝 x ×ˢ 𝓝 y

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{x : X}
{y : Y}


@[to_additive]
theorem image_mulSingle_Icc (i : ι) (a b : α i) :
    Pi.mulSingle i '' Icc a b = Icc (Pi.mulSingle i a) (Pi.mulSingle i b)

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → Zero (α i)]
(i : ι)
(a b : α i)

Pi.single i '' Set.Icc a b = Set.Icc (Pi.single i a) (Pi.single i b)


theorem mul_right_eq_iff_eq_mul_invOf : a * c = b ↔ a = b * ⅟c

{α : Type u}
[Monoid α]
{a b c : α}
[Invertible c]


theorem exists₂_comm
    {ι₁ ι₂ : Sort*} {κ₁ : ι₁ → Sort*} {κ₂ : ι₂ → Sort*} {p : ∀ i₁, κ₁ i₁ → ∀ i₂, κ₂ i₂ → Prop} :
    (∃ i₁ j₁ i₂ j₂, p i₁ j₁ i₂ j₂) ↔ ∃ i₂ j₂ i₁ j₁, p i₁ j₁ i₂ j₂

{p : (i₁ : ι₁) → κ₁ i₁ → (i₂ : ι₂) → κ₂ i₂ → Prop}


theorem vadd_eq_vadd_iff_neg_add_eq_vsub {v₁ v₂ : G} {p₁ p₂ : P} :
    v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ -v₁ + v₂ = p₁ -ᵥ p₂

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
{v₁ v₂ : G}
{p₁ p₂ : P}


@[continuity, fun_prop]
theorem continuous_cos : Continuous cos


theorem eq_bot_of_generator_maximal_map_eq_zero (b : Basis ι R M) {N : Submodule R M}
    {ϕ : M →ₗ[R] R} (hϕ : ∀ ψ : M →ₗ[R] R, ¬N.map ϕ < N.map ψ) [(N.map ϕ).IsPrincipal]
    (hgen : generator (N.map ϕ) = (0 : R)) : N = ⊥

(hϕ : ∀ (ψ : M →ₗ[R] R), ¬Submodule.map ϕ N < Submodule.map ψ N)

(hgen : Submodule.IsPrincipal.generator (Submodule.map ϕ N) = 0)


theorem rightLim_eq_of_tendsto [TopologicalSpace α] [OrderTopology α] [T2Space β]
    {f : α → β} {a : α} {y : β} (h : 𝓝[>] a ≠ ⊥) (h' : Tendsto f (𝓝[>] a) (𝓝 y)) :
    Function.rightLim f a = y

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace β]
[TopologicalSpace α]
[OrderTopology α]
[T2Space β]
{f : α → β}
{a : α}
{y : β}
(h : 𝓝[>] a ≠ ⊥)
(h' : Filter.Tendsto f (𝓝[>] a) (𝓝 y))


theorem measurable_stoppedValue [MetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
    (hf_prog : ProgMeasurable f u) (hτ : IsStoppingTime f τ) :
    Measurable[hτ.measurableSpace] (stoppedValue u τ)

{u : ι → Ω → β}

(hf_prog : MeasureTheory.ProgMeasurable f u)

Measurable (MeasureTheory.stoppedValue u τ)


@[simp]
theorem coe_one : ((1 : Monoid.End M) : M → M) = id


theorem iInf_iSup_of_monotone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (swap (· ≤ ·))] [Order.Coframe α] {f : ι → ι' → α} (hf : ∀ i, Monotone (f i)) :
    ⨅ j, ⨆ i, f i j = ⨆ i, ⨅ j, f i j

[IsDirected ι' (Function.swap fun x x_1 => x ≤ x_1)]

{f : ι → ι' → α}


@[simp]
theorem fromBlocks_diagonal (d₁ : l → α) (d₂ : m → α) :
    fromBlocks (diagonal d₁) 0 0 (diagonal d₂) = diagonal (Sum.elim d₁ d₂)

{l : Type u_1}
{m : Type u_2}
{α : Type u_12}
[DecidableEq l]
[DecidableEq m]
[Zero α]
(d₁ : l → α)
(d₂ : m → α)

Matrix.fromBlocks (Matrix.diagonal d₁) 0 0 (Matrix.diagonal d₂) = Matrix.diagonal (Sum.elim d₁ d₂)


@[simp]
theorem sup_apply (a : α) : (f ⊔ g) a = f a ⊔ g a

{α : Type u_2}
{β : Type u_3}
[Top α]
[SemilatticeSup β]
[OrderTop β]
(f g : TopHom α β)
(a : α)


@[simp]
theorem toFun_eq_coe (f : Π₀ i, β i) : f.toFun = f

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
(f : Π₀ (i : ι), β i)


/-- Given a topological space `X : TopCat` and a type family `T : X → Type`,
a `P : LocalPredicate T` consists of:
* a family of predicates `P.pred`, one for each `U : Opens X`, of the form `(Π x : U, T x) → Prop`
* a proof that if `f : Π x : V, T x` satisfies the predicate on `V : Opens X`, then
  the restriction of `f` to any open subset `U` also satisfies the predicate, and
* a proof that given some `f : Π x : U, T x`,
  if for every `x : U` we can find an open set `x ∈ V ≤ U`
  so that the restriction of `f` to `V` satisfies the predicate,
  then `f` itself satisfies the predicate.
-/
structure LocalPredicate extends PrelocalPredicate T where
  /-- A local predicate must be local --- provided that it is locally satisfied, it is also globally
    satisfied -/
  locality :
    ∀ {U : Opens X} (f : ∀ x : U, T x)
      (_ : ∀ x : U, ∃ (V : Opens X) (_ : x.1 ∈ V) (i : V ⟶ U),
        pred fun x : V => f (i x : U)), pred f

{X : TopCat}
{T : ↑X → Type v}
(self : TopCat.LocalPredicate T)
{U : TopologicalSpace.Opens ↑X}
(f : (x : ↥U) → T ↑x)

(∀ (x : ↥U), ∃ V, ∃ (_ : ↑x ∈ V), ∃ i, self.pred fun x => f ((fun x => ⟨↑x, ⋯⟩) x)) → self.pred f


theorem arg_le_pi_div_two_iff {z : ℂ} : arg z ≤ π / 2 ↔ 0 ≤ re z ∨ im z < 0


/-- Cauchy–Schwarz inequality for real inner products. -/
theorem real_inner_mul_inner_self_le (x y : F) : ⟪x, y⟫_ℝ * ⟪x, y⟫_ℝ ≤ ⟪x, x⟫_ℝ * ⟪y, y⟫_ℝ

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(x y : F)


/-- The product of two antitone functions is antitone. -/
@[to_additive add "The sum of two antitone functions is antitone."]
theorem Antitone.mul' [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : Antitone f) (hg : Antitone g) :
    Antitone fun x => f x * g x

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

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


theorem pred_top_lt_iff [NoMinOrder α] : pred ⊤ < a ↔ a = ⊤

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a : α}
[OrderTop α]
[NoMinOrder α]


@[to_additive]
lemma comp_eq_one_iff [One β] [One γ] (f : α → β) {g : β → γ} (hg : Injective g) (hg0 : g 1 = 1) :
    g ∘ f = 1 ↔ f = 1

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[One β]
[One γ]
(f : α → β)
{g : β → γ}
(hg : Function.Injective g)
(hg0 : g 1 = 1)


@[to_additive]
theorem card_zpowers_le (a : G) {k : ℕ} (k_pos : k ≠ 0)
    (ha : a ^ k = 1) : Fintype.card (Subgroup.zpowers a) ≤ k

{G : Type u_1}
[AddGroup G]
[Fintype G]
(a : G)
{k : ℕ}
(k_pos : k ≠ 0)
(ha : k • a = 0)

Fintype.card ↥(AddSubgroup.zmultiples a) ≤ k


/-- See `lt_of_tsub_lt_tsub_left_of_le` for a weaker statement in a partial order. -/
theorem lt_of_tsub_lt_tsub_left (h : a - b < a - c) : c < b

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


/-- The category of actions of `G` in the category `V`
is equivalent to the functor category `singleObj G ⥤ V`.
-/
@[simps]
def functorCategoryEquivalence : Action V G ≌ SingleObj G ⥤ V

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

(Action.functorCategoryEquivalence V G).counitIso = Action.FunctorCategoryEquivalence.counitIso


@[to_additive sum_nonneg]
lemma one_le_prod (hf : 1 ≤ f) : 1 ≤ ∏ i, f i

{ι : Type u_1}
{M : Type u_4}
[Fintype ι]
[OrderedAddCommMonoid M]
{f : ι → M}
(hf : 0 ≤ f)


theorem image_congr (h : (s : Set α).EqOn f g) : Finset.image f s = Finset.image g s

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f g : α → β}
{s : Finset α}
(h : Set.EqOn f g ↑s)


@[simp]
lemma toKaroubiCompN₂IsoN₁_hom_app (X : SimplicialObject C) :
    (toKaroubiCompN₂IsoN₁.hom.app X).f = PInfty

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

(AlgebraicTopology.DoldKan.toKaroubiCompN₂IsoN₁.hom.app X).f = AlgebraicTopology.DoldKan.PInfty


@[simp]
lemma verts_coeSubgraph {G' : Subgraph G} (G'' : Subgraph G'.coe) :
    G''.coeSubgraph.verts = (G''.verts : Set V)

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
(G'' : G'.coe.Subgraph)

(SimpleGraph.Subgraph.coeSubgraph G'').verts = Subtype.val '' G''.verts


@[csimp] theorem ofFn_eq_ofFnTR : @ofFn = @ofFnTR


@[simp]
theorem iUnion_Ioi [NoMinOrder α] : ⋃ a : α, Ioi a = univ

{α : Type v}
[Preorder α]
[NoMinOrder α]


theorem top_pow {n : ℕ} (n_pos : 0 < n) : (⊤ : WithTop α) ^ n = ⊤

{α : Type u_1}
[DecidableEq α]
[MonoidWithZero α]
[NoZeroDivisors α]
[Nontrivial α]
{n : ℕ}
(n_pos : 0 < n)


/-- In a commutative Banach-algebra `𝔸` over a normed field `𝕂` of characteristic zero,
`exp 𝕂 (x+y) = (exp 𝕂 x) * (exp 𝕂 y)` for all `x`, `y` in the disk of convergence. -/
theorem exp_add_of_mem_ball [CharZero 𝕂] {x y : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius)
    (hy : y ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : exp 𝕂 (x + y) = exp 𝕂 x * exp 𝕂 y

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

(hy : y ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

NormedSpace.exp 𝕂 (x + y) = NormedSpace.exp 𝕂 x * NormedSpace.exp 𝕂 y


theorem measure_inter_null_of_null_right (S : Set α) {T : Set α} (h : μ T = 0) : μ (S ∩ T) = 0

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
(S : Set α)
{T : Set α}
(h : μ T = 0)