/-- The iterated derivative within a set of the composition with a linear equiv on the right is
obtained by composing the iterated derivative with the linear equiv. -/
theorem ContinuousLinearEquiv.iteratedFDerivWithin_comp_right (g : G ≃L[𝕜] E) (f : E → F)
    (hs : UniqueDiffOn 𝕜 s) {x : G} (hx : g x ∈ s) (i : ℕ) :
    iteratedFDerivWithin 𝕜 i (f ∘ g) (g ⁻¹' s) x =
      (iteratedFDerivWithin 𝕜 i f s (g x)).compContinuousLinearMap fun _ => g

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
(g : G ≃L[𝕜] E)
(f : E → F)
(hs : UniqueDiffOn 𝕜 s)
{x : G}
(hx : g x ∈ s)
(i : ℕ)

iteratedFDerivWithin 𝕜 i (f ∘ ⇑g) (⇑g ⁻¹' s) x =
  (iteratedFDerivWithin 𝕜 i f s (g x)).compContinuousLinearMap fun x => ↑g


@[to_additive]
theorem inv_le_iff_le_inv : f⁻¹ ≤ g ↔ f ≤ g⁻¹

{α : Type u_2}
[InvolutiveNeg α]
{f g : Filter α}


theorem lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le {α : Type u} {β : Type v} {c : Cardinal}
    (f : α → β) (hf : ∀ b : β, lift.{v} #(f ⁻¹' {b}) ≤ c) : lift.{v} #α ≤ lift.{u} #β * c

(hf : ∀ (b : β), Cardinal.lift.{v, u} (Cardinal.mk ↑(f ⁻¹' {b})) ≤ c)

Cardinal.lift.{v, u} (Cardinal.mk α) ≤ Cardinal.lift.{u, v} (Cardinal.mk β) * c


/-- The restriction of `f - μ • 1` to the `k`-fold generalized `μ`-eigenspace is nilpotent. -/
lemma isNilpotent_restrict_sub_algebraMap (f : End R M) (μ : R) (k : ℕ)
    (h : MapsTo (f - algebraMap R (End R M) μ)
      (f.genEigenspace μ k) (f.genEigenspace μ k) :=
      mapsTo_genEigenspace_of_comm (Algebra.mul_sub_algebraMap_commutes f μ) μ k) :
    IsNilpotent ((f - algebraMap R (End R M) μ).restrict h)

(h : Set.MapsTo ⇑(f - (algebraMap R (Module.End R M)) μ) ↑((f.genEigenspace μ) k) ↑((f.genEigenspace μ) k) := ⋯)

IsNilpotent (LinearMap.restrict (f - (algebraMap R (Module.End R M)) μ) h)


theorem mk_eq_zero {x} (h : x ∈ p) : (⟨x, h⟩ : p) = 0 ↔ x = 0

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
(p : Submodule R M)
{x : M}
(h : x ∈ p)


@[simp]
theorem insert_eq_cons (a : α) (s : Multiset α) : insert a s = a ::ₘ s


@[simp] lemma ofENat_eq_one {m : ℕ∞} : (m : Cardinal) = 1 ↔ m = 1


/-- Given a word in `CoprodI`, if every letter is in the transversal and when
we multiply by an element of the base group it still has this property,
then the element of the base group we multiplied by was one.  -/
theorem eq_one_of_smul_normalized (w : CoprodI.Word G) {i : ι} (h : H)
    (hw : ∀ i g, ⟨i, g⟩ ∈ w.toList → g ∈ d.set i)
    (hφw : ∀ j g, ⟨j, g⟩ ∈ (CoprodI.of (φ i h) • w).toList → g ∈ d.set j) :
    h = 1

{d : Monoid.PushoutI.NormalWord.Transversal φ}

(hw : ∀ (i : ι) (g : G i), ⟨i, g⟩ ∈ w.toList → g ∈ d.set i)

(hφw : ∀ (j : ι) (g : G j), ⟨j, g⟩ ∈ (Monoid.CoprodI.of ((φ i) h) • w).toList → g ∈ d.set j)


theorem condIndep_bot_right (m₁ : MeasurableSpace Ω) {m' : MeasurableSpace Ω}
    {mΩ : MeasurableSpace Ω} [StandardBorelSpace Ω] [Nonempty Ω]
    {hm' : m' ≤ mΩ} {μ : Measure Ω} [IsFiniteMeasure μ] :
    CondIndep m' m₁ ⊥ hm' μ

{Ω : Type u_1}
(m₁ : MeasurableSpace Ω)
{m' mΩ : MeasurableSpace Ω}
[StandardBorelSpace Ω]
[Nonempty Ω]
{hm' : m' ≤ mΩ}
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]

ProbabilityTheory.CondIndep m' m₁ ⊥ hm' μ


/-- The units group of `S →ₐ[R] S` is `S ≃ₐ[R] S`.
See `LinearMap.GeneralLinearGroup.generalLinearEquiv` for the linear map version. -/
@[simps]
def algHomUnitsEquiv (R S : Type*) [CommSemiring R] [Semiring S] [Algebra R S] :
    (S →ₐ[R] S)ˣ ≃* (S ≃ₐ[R] S)

(R : Type u_1)
(S : Type u_2)
[CommSemiring R]
[Semiring S]
[Algebra R S]
(f : S ≃ₐ[R] S)

↑((AlgEquiv.algHomUnitsEquiv R S).symm f)⁻¹ = ↑f.symm


theorem any (f) : ∀ {s}, Valid s → s.any f = s.toString.1.any f

s.Valid → s.any f = s.toString.data.any f


@[to_additive mem_prod]
theorem mem_prod {H : Subgroup G} {K : Subgroup N} {p : G × N} : p ∈ H.prod K ↔ p.1 ∈ H ∧ p.2 ∈ K

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{H : AddSubgroup G}
{K : AddSubgroup N}
{p : G × N}


@[simp]
theorem spanSingleton_inv (x : K) : (spanSingleton R₁⁰ x)⁻¹ = spanSingleton _ x⁻¹

(K : Type u_3)
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]
(x : K)

(FractionalIdeal.spanSingleton R₁⁰ x)⁻¹ = FractionalIdeal.spanSingleton R₁⁰ x⁻¹


@[to_additive]
lemma MulAction.IsPretransitive.of_isScalarTower (M : Type*) {N α : Type*} [Monoid N] [SMul M N]
    [MulAction N α] [SMul M α] [IsScalarTower M N α] [IsPretransitive M α] : IsPretransitive N α

(M : Type u_11)
{N : Type u_12}
{α : Type u_13}
[AddMonoid N]
[VAdd M N]
[AddAction N α]
[VAdd M α]
[VAddAssocClass M N α]
[AddAction.IsPretransitive M α]


/-- Restricting `A` to a dense submodule and taking the `LinearPMap.adjoint` is the same
as taking the `ContinuousLinearMap.adjoint` interpreted as a `LinearPMap`. -/
theorem toPMap_adjoint_eq_adjoint_toPMap_of_dense (hp : Dense (p : Set E)) :
    (A.toPMap p).adjoint = A.adjoint.toPMap ⊤

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

((↑A).toPMap p).adjoint = (↑(ContinuousLinearMap.adjoint A)).toPMap ⊤


theorem OrdConnected.inter {s t : Set α} (hs : OrdConnected s) (ht : OrdConnected t) :
    OrdConnected (s ∩ t)

{α : Type u_1}
[Preorder α]
{s t : Set α}
(hs : s.OrdConnected)
(ht : t.OrdConnected)


@[simp]
theorem AffineMap.vectorSpan_image_eq_submodule_map {s : Set P₁} :
    Submodule.map f.linear (vectorSpan k s) = vectorSpan k (f '' s)

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(f : P₁ →ᵃ[k] P₂)
{s : Set P₁}

Submodule.map f.linear (vectorSpan k s) = vectorSpan k (⇑f '' s)


lemma algHomAdjoinIntegralEquiv_symm_apply_gen (h : IsIntegral F α)
    (x : { x // x ∈ (minpoly F α).aroots K }) :
    (algHomAdjoinIntegralEquiv F h).symm x (AdjoinSimple.gen F α) = x

((IntermediateField.algHomAdjoinIntegralEquiv F h).symm x) (IntermediateField.AdjoinSimple.gen F α) = ↑x


@[simp]
theorem cast_symm {i j} (h : i = j) : (cast R M h).symm = cast R M h.symm

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

(TensorPower.cast R M h).symm = TensorPower.cast R M ⋯


@[simp]
theorem sourceHomeomorphBaseSetProd_symm_apply (p : e.baseSet × F) :
    e.sourceHomeomorphBaseSetProd.symm p =
      ⟨e.symm (p.1, p.2), (sourceHomeomorphBaseSetProd_symm_apply.aux e p).2⟩

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

e.sourceHomeomorphBaseSetProd.symm p = ⟨↑e.symm (↑p.1, p.2), ⋯⟩


theorem Poly.mulMon_denote (ctx : Context) (p : Poly) (k : Nat) (m : Mon) : (p.mulMon k m).denote ctx = p.denote ctx * k * m.denote ctx

(ctx : Nat.Linear.Context)
(k : Nat)
(m : Nat.SOM.Mon)
(p acc : Nat.SOM.Poly)

Nat.SOM.Poly.denote ctx (Nat.SOM.Poly.mulMon.go k m p acc) =
  Nat.SOM.Poly.denote ctx acc + Nat.SOM.Poly.denote ctx p * k * Nat.SOM.Mon.denote ctx m


/-- The tangent of an angle in a right-angled triangle as a ratio of sides. -/
theorem tan_oangle_add_right_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    Real.Angle.tan (o.oangle x (x + y)) = ‖y‖ / ‖x‖

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


theorem ae_eq_refl (f : α → β) : f =ᵐ[μ] f

{α : Type u_1}
{β : Type u_2}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
(f : α → β)


/-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
(e : M ≃* N)

e.toSingleObjEquiv.unitIso.hom = CategoryTheory.eqToHom ⋯


@[simp]
theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s) ↔ s = ⊤


/-- The tangent cone of a product contains the tangent cone of its left factor. -/
theorem subset_tangentCone_prod_left {t : Set F} {y : F} (ht : y ∈ closure t) :
    LinearMap.inl 𝕜 E F '' tangentConeAt 𝕜 s x ⊆ tangentConeAt 𝕜 (s ×ˢ t) (x, y)

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

⇑(LinearMap.inl 𝕜 E F) '' tangentConeAt 𝕜 s x ⊆ tangentConeAt 𝕜 (s ×ˢ t) (x, y)


theorem exists_true_of_nonempty {α : Sort u} : Nonempty α → ∃ _ : α, True


/-- A side of a right-angled triangle divided by the sine of the opposite angle equals the
hypotenuse. -/
theorem norm_div_sin_oangle_add_left_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : ‖x‖ / Real.Angle.sin (o.oangle (x + y) y) = ‖x + y‖

‖x‖ / (o.oangle (x + y) y).sin = ‖x + y‖


@[to_additive]
theorem mem_map_of_mem (f : F) {S : Submonoid M} {x : M} (hx : x ∈ S) : f x ∈ S.map f

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


theorem translationNumber_mono : Monotone τ


/-- Not registered as an instance because `R` is an `outParam` in `SMulMemClass S R M`. -/
lemma AddSubmonoidClass.nsmulMemClass {S M : Type*} [AddMonoid M] [SetLike S M]
    [AddSubmonoidClass S M] : SMulMemClass S ℕ M

{S : Type u_1}
{M : Type u_2}
[AddMonoid M]
[SetLike S M]
[AddSubmonoidClass S M]


theorem ofReal_rpow_of_nonneg {x p : ℝ} (hx_nonneg : 0 ≤ x) (hp_nonneg : 0 ≤ p) :
    ENNReal.ofReal x ^ p = ENNReal.ofReal (x ^ p)


@[simp] lemma dvd_div_iff_mul_dvd (hbc : c ∣ b) : a ∣ b / c ↔ c * a ∣ b


theorem summable_cantor_function (f : ℕ → Bool) (h1 : 0 ≤ c) (h2 : c < 1) :
    Summable (cantorFunctionAux c f)

Summable (Cardinal.cantorFunctionAux c f)


nonrec theorem Opens.compl_compl (s : Opens α) : s.compl.compl = s

{α : Type u_2}
[TopologicalSpace α]
(s : TopologicalSpace.Opens α)


theorem dist_birkhoffSum_apply_birkhoffSum (f : α → α) (g : α → E) (n : ℕ) (x : α) :
    dist (birkhoffSum f g n (f x)) (birkhoffSum f g n x) = dist (g (f^[n] x)) (g x)

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
(f : α → α)
(g : α → E)
(n : ℕ)
(x : α)


theorem exists_weightSpace_le_ker_of_isNoetherian [IsNoetherian R M] (χ : L → R) (x : L) :
    ∃ k : ℕ,
      weightSpace M χ ≤ LinearMap.ker ((toEnd R L M x - algebraMap R _ (χ x)) ^ k)

{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]
[IsNoetherian R M]
(χ : L → R)
(x : L)

∃ k,
  ↑(LieModule.weightSpace M χ) ≤ LinearMap.ker (((LieModule.toEnd R L M) x - (algebraMap R (Module.End R M)) (χ x)) ^ k)


@[simp] lemma supIrredLowerSet_apply (a : α) : supIrredLowerSet a = ⟨Iic a, supIrred_Iic _⟩

OrderEmbedding.supIrredLowerSet a = ⟨LowerSet.Iic a, ⋯⟩


theorem map_one_fst_of_isMulTwoCocycle {f : G × G → M} (hf : IsMulTwoCocycle f) (g : G) :
    f (1, g) = f (1, 1)

(hf : groupCohomology.IsMulTwoCocycle f)


@[simp]
theorem const_compTendsto {l : Filter α} (b : β) {lc : Filter γ} {g : γ → α} (hg : Tendsto g lc l) :
    (↑b : Germ l β).compTendsto g hg = ↑b

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{l : Filter α}
(b : β)
{lc : Filter γ}
{g : γ → α}
(hg : Filter.Tendsto g lc l)


@[instance]
theorem ordConnected_Iio {a : α} : OrdConnected (Iio a)


/-- In a Noetherian space, all sets are compact. -/
protected theorem NoetherianSpace.isCompact [NoetherianSpace α] (s : Set α) : IsCompact s

{α : Type u_1}
[TopologicalSpace α]
[TopologicalSpace.NoetherianSpace α]
(s : Set α)


@[to_additive]
theorem mulAntidiagonal_mono_right (h : u ⊆ t) :
    mulAntidiagonal hs hu a ⊆ mulAntidiagonal hs ht a

{α : Type u_1}
[OrderedCancelAddCommMonoid α]
{s t : Set α}
{hs : s.IsPWO}
{ht : t.IsPWO}
{a : α}
{u : Set α}
{hu : u.IsPWO}
(h : u ⊆ t)

Finset.addAntidiagonal hs hu a ⊆ Finset.addAntidiagonal hs ht a


lemma polynomial_eq : W.polynomial =
    Cubic.toPoly
      ⟨0, 1, Cubic.toPoly ⟨0, 0, W.a₁, W.a₃⟩, Cubic.toPoly ⟨-1, -W.a₂, -W.a₄, -W.a₆⟩⟩

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


@[to_additive]
lemma inf_mul (a b c : α) : (a ⊓ b) * c = a * c ⊓ b * c

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


@[simp]
theorem natDegree_of_b_ne_zero' (hb : b ≠ 0) : (toPoly ⟨0, b, c, d⟩).natDegree = 2

{R : Type u_1}
{b c d : R}
[Semiring R]
(hb : b ≠ 0)

{ a := 0, b := b, c := c, d := d }.toPoly.natDegree = 2


theorem nonarchimedean (q r : ℚ_[p]) : ‖q + r‖ ≤ max ‖q‖ ‖r‖

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(q r : ℚ_[p])


theorem ContMDiff.mdifferentiable (hf : ContMDiff I I' n f) (hn : 1 ≤ n) : MDifferentiable I I' f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{n : ℕ∞}
(hf : ContMDiff I I' n f)
(hn : 1 ≤ n)


theorem PiToModule.fromMatrix_apply_single_one [DecidableEq ι] (A : Matrix ι ι R) (j : ι) :
    PiToModule.fromMatrix R b A (Pi.single j 1) = ∑ i : ι, A i j • b i

{ι : Type u_1}
[Fintype ι]
{M : Type u_2}
[AddCommGroup M]
(R : Type u_3)
[CommRing R]
[Module R M]
(b : ι → M)
[DecidableEq ι]
(A : Matrix ι ι R)
(j : ι)

((PiToModule.fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i


/-- The formal concepts of a relation. A concept of `r : α → β → Prop` is a pair of sets `s`, `t`
such that `s` is the set of all elements that are `r`-related to all of `t` and `t` is the set of
all elements that are `r`-related to all of `s`. -/
structure Concept extends Set α × Set β where
  /-- The axiom of a `Concept` stating that the closure of the first set is the second set. -/
  closure_fst : intentClosure r fst = snd
  /-- The axiom of a `Concept` stating that the closure of the second set is the first set. -/
  closure_snd : extentClosure r snd = fst

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
(self : Concept α β r)

extentClosure r self.toProd.2 = self.toProd.1


@[simp]
theorem isLeftInversion_simple_iff_isLeftDescent (w : W) (i : B) :
    cs.IsLeftInversion w (s i) ↔ cs.IsLeftDescent w i

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

cs.IsLeftInversion w (cs.simple i) ↔ cs.IsLeftDescent w i


@[simp]
theorem sin_nat_mul_two_pi_sub (x : ℝ) (n : ℕ) : sin (n * (2 * π) - x) = -sin x

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


theorem IsTheta.mono (h : f =Θ[l] g) (hl : l' ≤ l) : f =Θ[l'] g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{l l' : Filter α}
(h : f =Θ[l] g)
(hl : l' ≤ l)


theorem HeapNode.realSize_toHeap (s : HeapNode α) : s.toHeap.realSize = s.realSize

(s : Batteries.BinomialHeap.Imp.HeapNode α)


@[simp]
theorem linearization_ε_hom : (linearization k G).ε.hom = Finsupp.lsingle PUnit.unit

(Rep.linearization k G).ε.hom = Finsupp.lsingle PUnit.unit


theorem ideal_eq_iInf_comap_map_away {S : Finset R} (hS : Ideal.span (α := R) S = ⊤) (I : Ideal R) :
    I = ⨅ f ∈ S, (I.map (algebraMap R (Localization.Away f))).comap
    (algebraMap R (Localization.Away f))

{R : Type u_1}
[CommRing R]
{S : Finset R}
(hS : Ideal.span ↑S = ⊤)
(I : Ideal R)

I = ⨅ f ∈ S, Ideal.comap (algebraMap R (Localization.Away f)) (Ideal.map (algebraMap R (Localization.Away f)) I)


theorem tendsto_atTop_iSup (h_mono : Monotone f) : Tendsto f atTop (𝓝 (⨆ i, f i))

{α : Type u_1}
{ι : Type u_3}
[Preorder ι]
[TopologicalSpace α]
[CompleteLattice α]
[SupConvergenceClass α]
{f : ι → α}
(h_mono : Monotone f)

Filter.Tendsto f Filter.atTop (𝓝 (⨆ i, f i))


@[simp]
theorem fst_prod_snd : (fst : α × β →o α).prod snd = id

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]

OrderHom.fst.prod OrderHom.snd = OrderHom.id


theorem symm_trans (F : Homotopy p₀ p₁) (G : Homotopy p₁ p₂) :
    (F.trans G).symm = G.symm.trans F.symm

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p₀ p₁ p₂ : Path x₀ x₁}
(F : p₀.Homotopy p₁)
(G : p₁.Homotopy p₂)


/-- A finite-dimensional manifold modelled on a locally compact field
  (such as ℝ, ℂ or the `p`-adic numbers) is locally compact. -/
lemma Manifold.locallyCompact_of_finiteDimensional [LocallyCompactSpace 𝕜]
    [FiniteDimensional 𝕜 E] : LocallyCompactSpace M

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


theorem isSimpleOrder_Ici_iff_isCoatom [PartialOrder α] [OrderTop α] {a : α} :
    IsSimpleOrder (Ici a) ↔ IsCoatom a

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


/-- The results of applying `domDomCongr` to two maps are equal if
and only if those maps are. -/
@[simp]
theorem domDomCongr_eq_iff (σ : ι₁ ≃ ι₂) (f g : MultilinearMap R (fun _ : ι₁ => M₂) M₃) :
    f.domDomCongr σ = g.domDomCongr σ ↔ f = g

(σ : ι₁ ≃ ι₂)

(f g : MultilinearMap R (fun x => M₂) M₃)

MultilinearMap.domDomCongr σ f = MultilinearMap.domDomCongr σ g ↔ f = g


@[simp]
theorem toNonUnitalSubalgebra_subtype :
    NonUnitalSubalgebraClass.subtype S = NonUnitalStarSubalgebraClass.subtype S

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
(S : NonUnitalStarSubalgebra R A)

NonUnitalSubalgebraClass.subtype S = NonUnitalAlgHomClass.toNonUnitalAlgHom (NonUnitalStarSubalgebraClass.subtype S)


theorem NNReal.tendsto_algebraMap_inverse_atTop_nhds_zero_nat (𝕜 : Type*) [Semiring 𝕜]
    [Algebra ℝ≥0 𝕜] [TopologicalSpace 𝕜] [ContinuousSMul ℝ≥0 𝕜] :
    Tendsto (algebraMap ℝ≥0 𝕜 ∘ fun n : ℕ ↦ (n : ℝ≥0)⁻¹) atTop (𝓝 0)

(𝕜 : Type u_4)
[Semiring 𝕜]
[Algebra ℝ≥0 𝕜]
[TopologicalSpace 𝕜]
[ContinuousSMul ℝ≥0 𝕜]

Filter.Tendsto (⇑(algebraMap ℝ≥0 𝕜) ∘ fun n => (↑n)⁻¹) Filter.atTop (𝓝 0)


/-- A special case of `f ∘ id = f`, `f` a Localization map. -/
@[to_additive (attr := simp) "A special case of `f ∘ id = f`, `f` a Localization map."]
theorem ofMulEquivOfDom_id :
    f.ofMulEquivOfDom
        (show S.map (MulEquiv.refl M).toMonoidHom = S from
          Submonoid.ext fun x ↦ ⟨fun ⟨_, hy, h⟩ ↦ h ▸ hy, fun h ↦ ⟨x, h, rfl⟩⟩) = f

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


/-- Given a measurable set `s`, then `μ (s ∩ a) / μ a` converges when `a` shrinks to a typical
point `x` along a Vitali family. The limit is `1` for `x ∈ s` and `0` for `x ∉ s`. This shows that
almost every point of `s` is a Lebesgue density point for `s`. A version for non-measurable sets
holds, but it only gives the first conclusion, see `ae_tendsto_measure_inter_div`. -/
theorem ae_tendsto_measure_inter_div_of_measurableSet {s : Set α} (hs : MeasurableSet s) :
    ∀ᵐ x ∂μ, Tendsto (fun a => μ (s ∩ a) / μ a) (v.filterAt x) (𝓝 (s.indicator 1 x))

∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun a => μ (s ∩ a) / μ a) (v.filterAt x) (𝓝 (s.indicator 1 x))


lemma sup'_image₂_right (g : γ → δ) (h : (image₂ f s t).Nonempty) :
    sup' (image₂ f s t) h g =
      sup' t h.of_image₂_right fun y ↦ sup' s h.of_image₂_left (g <| f · y)

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{δ : Type u_7}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}
[SemilatticeSup δ]
(g : γ → δ)
(h : (Finset.image₂ f s t).Nonempty)

(Finset.image₂ f s t).sup' h g = t.sup' ⋯ fun y => s.sup' ⋯ fun x => g (f x y)


lemma succ_injective : Injective Nat.succ


theorem dist_smul_add_one_sub_smul_le {r : ℝ} {x y : E} (h : r ∈ Icc 0 1) :
    dist (r • x + (1 - r) • y) x ≤ dist y x

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{r : ℝ}
{x y : E}
(h : r ∈ Set.Icc 0 1)


/-- If `f` tends to negative infinity along a nontrivial filter `l`, then
`fun x ↦ f x / r` tends to negative infinity if and only if `0 < r. `-/
lemma tendsto_div_const_atBot_iff_pos [NeBot l] (h : Tendsto f l atBot) :
    Tendsto (fun x ↦ f x / r) l atBot ↔ 0 < r

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]
(h : Filter.Tendsto f l Filter.atBot)

Filter.Tendsto (fun x => f x / r) l Filter.atBot ↔ 0 < r


@[norm_cast] -- @[simp, norm_cast] -- Porting note: not in simpNF
theorem coe_ssubset_coe : (s : Set α) ⊂ t ↔ s < t

{α : Type u_1}
[PartialOrder α]
{s t : NonemptyInterval α}


@[simp]
theorem finrank_range_dualMap_eq_finrank_range (f : V₁ →ₗ[K] V₂) :
    -- Porting note (#11036): broken dot notation lean4#1910
    finrank K (LinearMap.range f.dualMap) = finrank K (LinearMap.range f)

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
{V₂ : Type uV₂}
[AddCommGroup V₁]
[Module K V₁]
[AddCommGroup V₂]
[Module K V₂]
(f : V₁ →ₗ[K] V₂)

FiniteDimensional.finrank K ↥(LinearMap.range f.dualMap) = FiniteDimensional.finrank K ↥(LinearMap.range f)


/-- A continuous function whose support is contained in a compact set is strongly measurable. -/
@[to_additive]
theorem _root_.Continuous.stronglyMeasurable_of_mulSupport_subset_isCompact
    [MeasurableSpace α] [TopologicalSpace α] [OpensMeasurableSpace α] [MeasurableSpace β]
    [TopologicalSpace β] [PseudoMetrizableSpace β] [BorelSpace β] [One β] {f : α → β}
    (hf : Continuous f) {k : Set α} (hk : IsCompact k)
    (h'f : mulSupport f ⊆ k) : StronglyMeasurable f


theorem Disjoint.sdiff_eq_right (h : Disjoint a b) : b \ a = b

{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a b : α}
(h : Disjoint a b)


/-- Condition on `w : TwoSquare T L R B` expressing that it is a Guitart exact square.
It is equivalent to saying that for any `X₃ : C₃`, the induced functor
`CostructuredArrow L X₃ ⥤ CostructuredArrow R (B.obj X₃)` is final (see `guitartExact_iff_final`)
or equivalently that for any `X₂ : C₂`, the induced functor
`StructuredArrow X₂ T ⥤ StructuredArrow (R.obj X₂) B` is initial (see `guitartExact_iff_initial`).
See also  `guitartExact_iff_isConnected_rightwards`, `guitartExact_iff_isConnected_downwards`
for characterizations in terms of the connectedness of auxiliary categories. -/
class GuitartExact : Prop where
  isConnected_rightwards {X₂ : C₂} {X₃ : C₃} (g : R.obj X₂ ⟶ B.obj X₃) :
    IsConnected (w.StructuredArrowRightwards g)

{C₁ : Type u₁}
{C₂ : Type u₂}
{C₃ : Type u₃}
{C₄ : Type u₄}
[CategoryTheory.Category.{v₁, u₁} C₁]
[CategoryTheory.Category.{v₂, u₂} C₂]
[CategoryTheory.Category.{v₃, u₃} C₃]
[CategoryTheory.Category.{v₄, u₄} C₄]
{T : CategoryTheory.Functor C₁ C₂}
{L : CategoryTheory.Functor C₁ C₃}
{R : CategoryTheory.Functor C₂ C₄}
{B : CategoryTheory.Functor C₃ C₄}
{w : CategoryTheory.TwoSquare T L R B}
[self : w.GuitartExact]
{X₂ : C₂}
{X₃ : C₃}
(g : R.obj X₂ ⟶ B.obj X₃)


private theorem gaussSum_mul_aux {χ : MulChar R R'} (hχ : χ ≠ 1) (ψ : AddChar R R')
    (b : R) :
    ∑ a, χ (a * b⁻¹) * ψ (a - b) = ∑ c, χ c * ψ (b * (c - 1))

{R : Type u}
[Field R]
[Fintype R]
{R' : Type v}
[CommRing R']
[IsDomain R']
{χ : MulChar R R'}
(hχ : χ ≠ 1)
(ψ : AddChar R R')
(b : R)


@[to_additive (attr := simp) coe_comp_nnnorm]
theorem coe_comp_nnnorm' : (toReal : ℝ≥0 → ℝ) ∘ (nnnorm : E → ℝ≥0) = norm


@[simp]
theorem norm_mkPiAlgebraFin [NormOneClass A] :
    ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕜 n A‖ = 1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{n : ℕ}
{A : Type u_1}
[NormedRing A]
[NormedAlgebra 𝕜 A]
[NormOneClass A]


@[simp]
theorem dimH_singleton (x : X) : dimH ({x} : Set X) = 0


@[simp]
theorem preimage_image (h : X ≃ₜ Y) (s : Set X) : h ⁻¹' (h '' s) = s

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)
(s : Set X)


@[simp]
theorem volume_apply' (I : Box ι) :
    ((volume : Measure (ι → ℝ)) I).toReal = ∏ i, (I.upper i - I.lower i)

{ι : Type u_1}
[Fintype ι]
(I : BoxIntegral.Box ι)

(MeasureTheory.volume ↑I).toReal = ∏ i : ι, (I.upper i - I.lower i)


/-- The minimal polynomial of an element of `E / F` of exponential characteristic `q` has
separable degree one if and only if the minimal polynomial is of the form
`Polynomial.expand F (q ^ n) (X - C y)` for some `n : ℕ` and `y : F`. -/
theorem natSepDegree_eq_one_iff_eq_expand_X_sub_C : (minpoly F x).natSepDegree = 1 ↔
    ∃ (n : ℕ) (y : F), minpoly F x = expand F (q ^ n) (X - C y)

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[hF : ExpChar F q]
{x : E}

(minpoly F x).natSepDegree = 1 ↔ ∃ n y, minpoly F x = (Polynomial.expand F (q ^ n)) (Polynomial.X - Polynomial.C y)


@[to_additive (attr := simp)]
theorem lift_swap (f : M →* P) (g : N →* P) (x : N ∗ M) : lift f g (swap N M x) = lift g f x

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
[AddMonoid P]
(f : M →+ P)
(g : N →+ P)
(x : AddMonoid.Coprod N M)

(AddMonoid.Coprod.lift f g) ((AddMonoid.Coprod.swap N M) x) = (AddMonoid.Coprod.lift g f) x


theorem dite_dite_distrib_right {a : p → q → α} {b : p → ¬q → α} {c : ¬p → α} :
    dite p (fun hp ↦ dite q (a hp) (b hp)) c =
      dite q (fun hq ↦ dite p (fun hp ↦ a hp hq) c) fun hq ↦ dite p (fun hp ↦ b hp hq) c

{α : Sort u_1}
{p q : Prop}
[Decidable p]
[Decidable q]
{a : p → q → α}
{b : p → ¬q → α}
{c : ¬p → α}

dite p (fun hp => dite q (a hp) (b hp)) c =
  if hq : q then dite p (fun hp => a hp hq) c else dite p (fun hp => b hp hq) c


nonrec theorem IsLocalMin.comp_antitone (hf : IsLocalMin f a) {g : β → γ} (hg : Antitone g) :
    IsLocalMax (g ∘ f) a

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


theorem map_neg₂ (f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P') (x y) : f (-x) y = -f x y

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{R₂ : Type u_3}
[Semiring R₂]
{S₂ : Type u_4}
[Semiring S₂]
{N : Type u_6}
{M' : Type u_13}
{P' : Type u_15}
[AddCommMonoid N]
[AddCommGroup M']
[AddCommGroup P']
[Module S N]
[Module R M']
[Module R₂ P']
[Module S₂ P']
[SMulCommClass S₂ R₂ P']
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
(f : M' →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P')
(x : M')
(y : N)


theorem iSup_lt_iff : iSup f < a ↔ ∃ b, b < a ∧ ∀ i, f i ≤ b

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

iSup f < a ↔ ∃ b < a, ∀ (i : ι), f i ≤ b


theorem boundedBy_caratheodory {m : Set α → ℝ≥0∞} {s : Set α}
    (hs : ∀ t, m (t ∩ s) + m (t \ s) ≤ m t) : MeasurableSet[(boundedBy m).caratheodory] s

(hs : ∀ (t : Set α), m (t ∩ s) + m (t \ s) ≤ m t)


theorem eq_of_toFin_eq : ∀ {x y : BitVec w}, x.toFin = y.toFin → x = y


@[deprecated (since := "2024-06-05")]
theorem tailings_disjoint_tunnel (f : M × N →ₗ[R] M) (i : Injective f) (n : ℕ) :
    Disjoint (tailings f i n) (OrderDual.ofDual (α := Submodule R M) <| tunnel f i (n + 1))

{R : Type u}
{M : Type v}
[Ring R]
{N : Type u_3}
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(f : M × N →ₗ[R] M)
(i : Function.Injective ⇑f)
(n : ℕ)

Disjoint (f.tailings i n) (OrderDual.ofDual ((f.tunnel i) (n + 1)))


theorem Sublist.append (hl : l₁ <+ l₂) (hr : r₁ <+ r₂) : l₁ ++ r₁ <+ l₂ ++ r₂

∀ {α : Type u_1} {l₁ l₂ r₁ r₂ : List α}, l₁ <+ l₂ → r₁ <+ r₂ → l₁ ++ r₁ <+ l₂ ++ r₂


@[simp] lemma prod_zero : μ.prod (0 : FiniteMeasure β) = 0

{α : Type u_1}
[MeasurableSpace α]
{β : Type u_2}
[MeasurableSpace β]
(μ : MeasureTheory.FiniteMeasure α)


theorem UniformSpace.isClosed_ball (x : α) {V : Set (α × α)} (hV : IsClosed V) :
    IsClosed (ball x V)

{α : Type ua}
[UniformSpace α]
(x : α)
{V : Set (α × α)}
(hV : IsClosed V)


@[simp]
theorem whiskerRight_app {F G F' : C ⥤ D} {α : F ⟶ G} {X} :
    (α ▷ F').app X = α.app X ▷ F'.obj X

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


theorem mulMap_comp_map_inclusion {M' N' : Submodule R S} (hM : M' ≤ M) (hN : N' ≤ N) :
    mulMap M N ∘ₗ TensorProduct.map (inclusion hM) (inclusion hN) = mulMap M' N'

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
{M N M' N' : Submodule R S}
(hM : M' ≤ M)
(hN : N' ≤ N)

M.mulMap N ∘ₗ TensorProduct.map (Submodule.inclusion hM) (Submodule.inclusion hN) = M'.mulMap N'


@[to_additive]
theorem one_mem_one : (1 : α) ∈ (1 : Interval α)

{α : Type u_2}
[PartialOrder α]
[Zero α]


theorem wOppSide_smul_vsub_vadd_left {s : AffineSubspace R P} {p₁ p₂ : P} (x : P) (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) {t : R} (ht : t ≤ 0) : s.WOppSide (t • (x -ᵥ p₁) +ᵥ p₂) x

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{p₁ p₂ : P}
(x : P)
(hp₁ : p₁ ∈ s)
(hp₂ : p₂ ∈ s)
{t : R}
(ht : t ≤ 0)


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

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

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


theorem dvd_prime {p m : ℕ} (pp : Prime p) : m ∣ p ↔ m = 1 ∨ m = p


/-- If `f : ℂ → E` is complex differentiable on a closed disc of positive radius, then it is
analytic on the corresponding open disc, and the coefficients of the power series are given by
Cauchy integral formulas. See also
`Complex.hasFPowerSeriesOnBall_of_differentiable_off_countable` for a version of this lemma with
weaker assumptions. -/
protected theorem _root_.DifferentiableOn.hasFPowerSeriesOnBall {R : ℝ≥0} {c : ℂ} {f : ℂ → E}
    (hd : DifferentiableOn ℂ f (closedBall c R)) (hR : 0 < R) :
    HasFPowerSeriesOnBall f (cauchyPowerSeries f c R) c R

(hd : DifferentiableOn ℂ f (Metric.closedBall c ↑R))

HasFPowerSeriesOnBall f (cauchyPowerSeries f c ↑R) c ↑R


theorem continuousWithinAt_iff'_left [TopologicalSpace β] {f : β → α} {b : β} {s : Set β} :
    ContinuousWithinAt f s b ↔ Tendsto (fun x => (f x, f b)) (𝓝[s] b) (𝓤 α)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[TopologicalSpace β]
{f : β → α}
{b : β}
{s : Set β}

ContinuousWithinAt f s b ↔ Filter.Tendsto (fun x => (f x, f b)) (𝓝[s] b) (𝓤 α)


@[simp]
theorem not_infinite {s : Set α} : ¬s.Infinite ↔ s.Finite


@[to_additive]
theorem Monotone.tendsto_mulIndicator {ι} [Preorder ι] [One β] (s : ι → Set α) (hs : Monotone s)
    (f : α → β) (a : α) :
    Tendsto (fun i => mulIndicator (s i) f a) atTop (pure <| mulIndicator (⋃ i, s i) f a)

{α : Type u_1}
{β : Type u_2}
{ι : Type u_5}
[Preorder ι]
[Zero β]
(s : ι → Set α)
(hs : Monotone s)
(f : α → β)
(a : α)

Filter.Tendsto (fun i => (s i).indicator f a) Filter.atTop (pure ((⋃ i, s i).indicator f a))


theorem ediam_image (s : Set P) : EMetric.diam (f '' s) = EMetric.diam s

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


@[simp]
theorem dist_extend_extend (f : α ↪ δ) (g₁ g₂ : α →ᵇ β) (h₁ h₂ : δ →ᵇ β) :
    dist (g₁.extend f h₁) (g₂.extend f h₂) =
      max (dist g₁ g₂) (dist (h₁.restrict (range f)ᶜ) (h₂.restrict (range f)ᶜ))

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{δ : Type u_2}
[TopologicalSpace δ]
[DiscreteTopology δ]
(f : α ↪ δ)
(g₁ g₂ : BoundedContinuousFunction α β)
(h₁ h₂ : BoundedContinuousFunction δ β)

dist (BoundedContinuousFunction.extend f g₁ h₁) (BoundedContinuousFunction.extend f g₂ h₂) =
  max (dist g₁ g₂) (dist (h₁.restrict (Set.range ⇑f)ᶜ) (h₂.restrict (Set.range ⇑f)ᶜ))


@[norm_cast]
theorem WithBot.coe_sInf' [InfSet α] {s : Set α} (hs : BddBelow s) :
    ↑(sInf s) = (sInf ((fun (a : α) ↦ ↑a) '' s) : WithBot α)

{α : Type u_1}
[Preorder α]
[InfSet α]
{s : Set α}
(hs : BddBelow s)


/-- The eigenspaces of a self-adjoint operator on a finite-dimensional inner product space `E` gives
an internal direct sum decomposition of `E`. -/
theorem direct_sum_isInternal : DirectSum.IsInternal fun μ : Eigenvalues T => eigenspace T μ

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

DirectSum.IsInternal fun μ => Module.End.eigenspace T (↑T μ)


@[to_additive tsum_of_nat_of_neg_add_one]
lemma tprod_of_nat_of_neg_add_one [T2Space M] {f : ℤ → M}
    (hf₁ : Multipliable fun n : ℕ ↦ f n) (hf₂ : Multipliable fun n : ℕ ↦ f (-(n + 1))) :
    ∏' n : ℤ, f n = (∏' n : ℕ, f n) * ∏' n : ℕ, f (-(n + 1))

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
[T2Space M]
{f : ℤ → M}
(hf₁ : Summable fun n => f ↑n)
(hf₂ : Summable fun n => f (-(↑n + 1)))


@[simp]
theorem exp_one_rpow (x : ℝ) : exp 1 ^ x = exp x


lemma coherentTopology.isLocallySurjective_iff [Preregular C] [FinitaryExtensive C]
    {F G : Sheaf (coherentTopology C) D} (f : F ⟶ G) [PreservesFiniteProducts (forget D)] :
      IsLocallySurjective f ↔ Presheaf.IsLocallySurjective (regularTopology C) f.val

{F G : CategoryTheory.Sheaf (CategoryTheory.coherentTopology C) D}

CategoryTheory.Sheaf.IsLocallySurjective f ↔
  CategoryTheory.Presheaf.IsLocallySurjective (CategoryTheory.regularTopology C) f.val


lemma eq_zero_of_forall_eval_zero_of_natDegree_lt_card
    (f : R[X]) (hf : ∀ r, f.eval r = 0) (hfR : f.natDegree < #R) : f = 0

(hf : ∀ (r : R), Polynomial.eval r f = 0)


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

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


@[simp]
theorem one_coprime {n : ℕ+} : (1 : ℕ+).Coprime n


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

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


/-- The sum defined in Bessel's inequality is summable. -/
theorem Orthonormal.inner_products_summable (hv : Orthonormal 𝕜 v) :
    Summable fun i => ‖⟪v i, x⟫‖ ^ 2

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
(x : E)
{v : ι → E}
(hv : Orthonormal 𝕜 v)


theorem ContinuousWithinAt.preimage_mem_nhdsWithin''
    {f : α → β} {x : α} {y : β} {s t : Set β}
    (h : ContinuousWithinAt f (f ⁻¹' s) x) (ht : t ∈ 𝓝[s] y) (hxy : y = f x) :
    f ⁻¹' t ∈ 𝓝[f ⁻¹' s] x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{x : α}
{y : β}
{s t : Set β}
(h : ContinuousWithinAt f (f ⁻¹' s) x)
(ht : t ∈ 𝓝[s] y)
(hxy : y = f x)


@[to_additive]
theorem lift_of_eq_id (α) : lift of = MonoidHom.id (FreeGroup α)

FreeGroup.lift FreeGroup.of = MonoidHom.id (FreeGroup α)


/-- Theorem 2.5 in [Gleason, *Projective topological spaces*][gleason1958]:
in the category of compact spaces and continuous maps,
the projective spaces are precisely the extremally disconnected spaces. -/
protected theorem CompactT2.ExtremallyDisconnected.projective [ExtremallyDisconnected A]
    [CompactSpace A] [T2Space A] : CompactT2.Projective A

{A : Type u}
[TopologicalSpace A]
[ExtremallyDisconnected A]
[CompactSpace A]
[T2Space A]


theorem powerlt_mono_left (a) : Monotone fun c => a ^< c


@[to_additive]
theorem mul {U : Set G} : U ∈ B → ∃ V ∈ B, V * V ⊆ U

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


/-- An ordered vector addition is a bi-monotone vector addition. -/
class IsOrderedVAdd (G P : Type*) [LE G] [LE P] [VAdd G P] : Prop where
  protected vadd_le_vadd_left : ∀ a b : P, a ≤ b → ∀ c : G, c +ᵥ a ≤ c +ᵥ b
  protected vadd_le_vadd_right : ∀ c d : G, c ≤ d → ∀ a : P, c +ᵥ a ≤ d +ᵥ a

{G : Type u_3}
{P : Type u_4}
[LE G]
[LE P]
[VAdd G P]
[self : IsOrderedVAdd G P]
(c d : G)


theorem Antiperiodic.div_inv [DivisionSemiring α] [Neg β] (h : Antiperiodic f c) {a : α}
    (ha : a ≠ 0) : Antiperiodic (fun x => f (x / a)) (c * a)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[DivisionSemiring α]
[Neg β]
(h : Function.Antiperiodic f c)
{a : α}
(ha : a ≠ 0)

Function.Antiperiodic (fun x => f (x / a)) (c * a)


@[simp]
theorem op_neg {X Y : C} (f : X ⟶ Y) : (-f).op = -f.op

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


@[simp]
theorem Ioc_succ_singleton : Ioc b (b + 1) = {b + 1}


theorem invOf_eq_right_inv [Monoid α] {a b : α} [Invertible a] (hac : a * b = 1) : ⅟ a = b

{α : Type u}
[Monoid α]
{a b : α}
[Invertible a]
(hac : a * b = 1)


/-- `Finsupp.comapDomain` is an `AddMonoidHom`. -/
@[simps]
def comapDomain.addMonoidHom (hf : Function.Injective f) : (β →₀ M) →+ α →₀ M

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddZeroClass M]
{f : α → β}
(hf : Function.Injective f)
(x : β →₀ M)

(Finsupp.comapDomain.addMonoidHom hf) x = Finsupp.comapDomain f x ⋯


@[simp]
theorem ofDirectSum_of_tprod {n} (x : Fin n → M) :
    ofDirectSum (DirectSum.of _ n (PiTensorProduct.tprod R x)) = tprod R M n x

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{n : ℕ}
(x : Fin n → M)

TensorAlgebra.ofDirectSum ((DirectSum.of (fun n => ⨂[R]^n M) n) ((PiTensorProduct.tprod R) x)) =
  (TensorAlgebra.tprod R M n) x


@[to_additive]
theorem toOrderHom_injective : Injective (toOrderHom : _ → α →o β)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]


protected lemma lt_or_lt_of_ne (h : a ≠ b) : a < b ∨ b < a


theorem normalCore_eq_ker : H.normalCore = (MulAction.toPermHom G (G ⧸ H)).ker

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


@[to_additive]
theorem closure_eq_top_of_mclosure_eq_top {S : Set G} (h : Submonoid.closure S = ⊤) :
    closure S = ⊤

{G : Type u_1}
[Group G]
{S : Set G}
(h : Submonoid.closure S = ⊤)


theorem isPreirreducible_empty : IsPreirreducible (∅ : Set X)


theorem vonMangoldt_le_log : ∀ {n : ℕ}, Λ n ≤ Real.log (n : ℝ)

ArithmeticFunction.vonMangoldt n ≤ Real.log ↑n


theorem comap_mk_uniformity : (𝓤 (SeparationQuotient α)).comap (Prod.map mk mk) = 𝓤 α

Filter.comap (Prod.map SeparationQuotient.mk SeparationQuotient.mk) (𝓤 (SeparationQuotient α)) = 𝓤 α


theorem denom_cocycle (x y : GL(2, ℝ)⁺) (z : ℍ) :
    denom (x * y) z = denom x (smulAux y z) * denom y z

UpperHalfPlane.denom (x * y) z = UpperHalfPlane.denom x (UpperHalfPlane.smulAux y z) * UpperHalfPlane.denom y z


@[to_additive AddSubgroup.IsComplement.card_mul_card]
lemma IsComplement.card_mul_card (h : IsComplement S T) : Nat.card S * Nat.card T = Nat.card G

{G : Type u_1}
[AddGroup G]
{S T : Set G}
(h : AddSubgroup.IsComplement S T)


theorem CauchySeq.subseq_subseq_mem {V : ℕ → Set (α × α)} (hV : ∀ n, V n ∈ 𝓤 α) {u : ℕ → α}
    (hu : CauchySeq u) {f g : ℕ → ℕ} (hf : Tendsto f atTop atTop) (hg : Tendsto g atTop atTop) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ n, ((u ∘ f ∘ φ) n, (u ∘ g ∘ φ) n) ∈ V n

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

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

∃ φ, StrictMono φ ∧ ∀ (n : ℕ), ((u ∘ f ∘ φ) n, (u ∘ g ∘ φ) n) ∈ V n


@[simp]
theorem colimitCurrySwapCompColimIsoColimitCurryCompColim_ι_ι_hom {j} {k} :
    colimit.ι _ j ≫ colimit.ι (curry.obj (Prod.swap K J ⋙ G) ⋙ colim) k ≫
      (colimitCurrySwapCompColimIsoColimitCurryCompColim G).hom =
        (colimit.ι _ k ≫ colimit.ι (curry.obj G ⋙ colim) j : _ ⟶ colimit (curry.obj G⋙ colim))

{J K : Type v}
[CategoryTheory.SmallCategory J]
[CategoryTheory.SmallCategory K]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(G : J × K ⥤ C)
[CategoryTheory.Limits.HasColimits C]
{j : J}
{k : K}

CategoryTheory.Limits.colimit.ι ((CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ G)).obj k) j ≫
    CategoryTheory.Limits.colimit.ι
        (CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ G) ⋙ CategoryTheory.Limits.colim) k ≫
      (CategoryTheory.Limits.colimitCurrySwapCompColimIsoColimitCurryCompColim G).hom =
  CategoryTheory.Limits.colimit.ι ((CategoryTheory.curry.obj G).obj j) k ≫
    CategoryTheory.Limits.colimit.ι (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.colim) j


theorem cof_le_card (o) : cof o ≤ card o


/-- Type class for Hereditarily Lindelöf spaces.  -/
class HereditarilyLindelofSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- In a Hereditarily Lindelöf space, `Set.univ` is a Hereditarily Lindelöf set. -/
  isHereditarilyLindelof_univ : IsHereditarilyLindelof (univ : Set X)

{X : Type u_2}
[TopologicalSpace X]
[self : HereditarilyLindelofSpace X]


theorem nonneg (i : ι) (x : M) : 0 ≤ f i x

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
(f : SmoothPartitionOfUnity ι I M s)
(i : ι)
(x : M)


theorem card_image_of_inj_on {s : Set α} [Fintype s] {f : α → β} [Fintype (f '' s)]
    (H : ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y) : Fintype.card (f '' s) = Fintype.card s

Fintype.card ↑(f '' s) = Fintype.card ↑s


@[simp]
theorem snd_sup [Sup α] [Sup β] (p q : α × β) : (p ⊔ q).snd = p.snd ⊔ q.snd

(α : Type u)
(β : Type v)
[Sup α]
[Sup β]
(p q : α × β)


@[simp]
theorem coprime_add_self_left {m n : ℕ} : Coprime (m + n) n ↔ Coprime m n


@[to_additive]
lemma mul_prod_Ioi_eq_prod_Ici (a : α) : f a * ∏ x ∈ Ioi a, f x = ∏ x ∈ Ici a, f x

{α : Type u_1}
{M : Type u_2}
[PartialOrder α]
[AddCommMonoid M]
{f : α → M}
[LocallyFiniteOrderTop α]
(a : α)

f a + ∑ x ∈ Finset.Ioi a, f x = ∑ x ∈ Finset.Ici a, f x


@[to_additive]
theorem unitsCenterToCenterUnits_injective [Monoid M] :
    Function.Injective (unitsCenterToCenterUnits M)


protected lemma isSelfAdjoint : IsSelfAdjoint f ↔ ∀ i, IsSelfAdjoint (f i)

{ι : Type u_3}
{α : ι → Type u_4}
[(i : ι) → Star (α i)]
{f : (i : ι) → α i}

IsSelfAdjoint f ↔ ∀ (i : ι), IsSelfAdjoint (f i)


@[simp] lemma add_τ₃ (φ φ' : S₁ ⟶ S₂) : (φ + φ').τ₃ = φ.τ₃ + φ'.τ₃

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

(φ + φ').τ₃ = φ.τ₃ + φ'.τ₃


@[to_additive]
theorem nndist_mul_mul_le (a₁ a₂ b₁ b₂ : E) :
    nndist (a₁ * a₂) (b₁ * b₂) ≤ nndist a₁ b₁ + nndist a₂ b₂

{E : Type u_3}
[SeminormedAddCommGroup E]
(a₁ a₂ b₁ b₂ : E)

nndist (a₁ + a₂) (b₁ + b₂) ≤ nndist a₁ b₁ + nndist a₂ b₂


lemma inverseImage_equivalence_inverse_eq_map_functor
    (P : MorphismProperty D) [RespectsIso P] (E : C ≌ D) :
    P.inverseImage E.functor = P.map E.inverse

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
[CategoryTheory.Category.{u_2, u_1} D]
(P : CategoryTheory.MorphismProperty D)
[P.RespectsIso]
(E : C ≌ D)


@[simp]
theorem map_pure (f : α → β) (a) : map f (pure a) = pure (f a)

{α : Type u}
{β : Type v}
(f : α → β)
(a : α)

Computation.map f (Computation.pure a) = Computation.pure (f a)


theorem dimH_preimage_le (hf : AntilipschitzWith K f) (s : Set Y) : dimH (f ⁻¹' s) ≤ dimH s

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
{K : ℝ≥0}
{f : X → Y}
(hf : AntilipschitzWith K f)
(s : Set Y)


/-- The functor `(Square C)ᵒᵖ ⥤ Square Cᵒᵖ`. -/
@[simps]
def opFunctor : (Square C)ᵒᵖ ⥤ Square Cᵒᵖ

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

∀ {X Y : (CategoryTheory.Square C)ᵒᵖ} (φ : X ⟶ Y), (CategoryTheory.Square.opFunctor.map φ).τ₁ = φ.unop.τ₄.op


theorem bind₂_comp_bind₂ (f : R →+* MvPolynomial σ S) (g : S →+* MvPolynomial σ T) :
    (bind₂ g).comp (bind₂ f) = bind₂ ((bind₂ g).comp f)

{σ : Type u_1}
{R : Type u_3}
{S : Type u_4}
{T : Type u_5}
[CommSemiring R]
[CommSemiring S]
[CommSemiring T]
(f : R →+* MvPolynomial σ S)
(g : S →+* MvPolynomial σ T)

(MvPolynomial.bind₂ g).comp (MvPolynomial.bind₂ f) = MvPolynomial.bind₂ ((MvPolynomial.bind₂ g).comp f)


/-- Given a finite-dimensional subspace `K₂`, and a subspace `K₁`
contained in it, the dimensions of `K₁` and the intersection of its
orthogonal subspace with `K₂` add to that of `K₂`. -/
theorem Submodule.finrank_add_inf_finrank_orthogonal' {K₁ K₂ : Submodule 𝕜 E}
    [FiniteDimensional 𝕜 K₂] (h : K₁ ≤ K₂) {n : ℕ} (h_dim : finrank 𝕜 K₁ + n = finrank 𝕜 K₂) :
    finrank 𝕜 (K₁ᗮ ⊓ K₂ : Submodule 𝕜 E) = n

(h_dim : FiniteDimensional.finrank 𝕜 ↥K₁ + n = FiniteDimensional.finrank 𝕜 ↥K₂)

FiniteDimensional.finrank 𝕜 ↥(K₁ᗮ ⊓ K₂) = n


theorem AlgebraicIndependent.restrict_of_comp_subtype {s : Set ι}
    (hs : AlgebraicIndependent R (x ∘ (↑) : s → A)) : AlgebraicIndependent R (s.restrict x)

(hs : AlgebraicIndependent R (x ∘ Subtype.val))


@[to_additive]
theorem unop_iInf (S : ι → Subgroup Gᵐᵒᵖ) : (iInf S).unop = ⨅ i, (S i).unop

{ι : Sort u_1}
{G : Type u_2}
[Group G]
(S : ι → Subgroup Gᵐᵒᵖ)


theorem toNNRat_le_iff_le_coe {p : ℚ≥0} : toNNRat q ≤ p ↔ q ≤ ↑p


/-- An injective and continuous function is proper if and only if it is closed. -/
lemma isProperMap_iff_isClosedMap_of_inj (f_cont : Continuous f) (f_inj : f.Injective) :
    IsProperMap f ↔ IsClosedMap f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(f_cont : Continuous f)
(f_inj : Function.Injective f)


@[simp]
theorem autCongr_symm (ϕ : A₁ ≃ₐ[R] A₂) : (autCongr ϕ).symm = autCongr ϕ.symm

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(ϕ : A₁ ≃ₐ[R] A₂)


lemma image_exp_Ioc_eq_sphere : (fun θ : ℝ ↦ exp (θ * I)) '' Set.Ioc (-π) π = sphere 0 1

(fun θ => Complex.exp (↑θ * Complex.I)) '' Set.Ioc (-π) π = Metric.sphere 0 1


@[simp]
theorem comp_id (f : A →⋆ₐ[R] B) : f.comp (StarAlgHom.id _ _) = f

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Star A]
[Semiring B]
[Algebra R B]
[Star B]
(f : A →⋆ₐ[R] B)


@[simp] lemma map_injective : Injective (PLift.map f) ↔ Injective f

Function.Injective (PLift.map f) ↔ Function.Injective f


theorem Valid'.dual_iff {t : Ordnode α} {o₁ o₂} : Valid' o₁ t o₂ ↔ @Valid' αᵒᵈ _ o₂ (.dual t) o₁

{α : Type u_1}
[Preorder α]
{t : Ordnode α}
{o₁ : WithBot α}
{o₂ : WithTop α}

Ordnode.Valid' o₁ t o₂ ↔ Ordnode.Valid' o₂ t.dual o₁


@[to_additive]
theorem snd_pow : (s ^ n).snd = s.snd ^ n

[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]


protected theorem adapted [LE E] (hf : Submartingale f ℱ μ) : Adapted ℱ f

(hf : MeasureTheory.Submartingale f ℱ μ)


@[to_additive]
theorem prod_subtype {p : α → Prop} {F : Fintype (Subtype p)} (s : Finset α) (h : ∀ x, x ∈ s ↔ p x)
    (f : α → β) : ∏ a ∈ s, f a = ∏ a : Subtype p, f a

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
{p : α → Prop}
{F : Fintype (Subtype p)}
(s : Finset α)
(h : ∀ (x : α), x ∈ s ↔ p x)
(f : α → β)


/-- A `CommRing` `S` which is the localization of a ring `R` without zero divisors at a subset of
non-zero elements does not have zero divisors. -/
theorem noZeroDivisors_of_le_nonZeroDivisors [Algebra A S] {M : Submonoid A} [IsLocalization M S]
    (hM : M ≤ nonZeroDivisors A) : NoZeroDivisors S

{S : Type u_2}
[CommRing S]
(A : Type u_6)
[CommRing A]
[IsDomain A]
[Algebra A S]
{M : Submonoid A}
[IsLocalization M S]
(hM : M ≤ nonZeroDivisors A)


@[simp]
theorem cardQuot_bot [Infinite M] : cardQuot (⊥ : Submodule R M) = 0

(R : Type u_1)
(M : Type u_2)
[Ring R]
[AddCommGroup M]
[Module R M]
[Infinite M]


/-- Composition of `p`-radical ring homomorphisms is also `p`-radical. -/
theorem IsPRadical.trans [IsPRadical i p] [IsPRadical f p] :
    IsPRadical (f.comp i) p

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommSemiring K]
[CommSemiring L]
[CommSemiring M]
(i : K →+* L)
(f : L →+* M)
(p : ℕ)
[IsPRadical i p]
[IsPRadical f p]


@[simp]
theorem pure_prod {a : α} {f : Filter β} : pure a ×ˢ f = map (Prod.mk a) f

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


/-- The **spectral mapping theorem** for the continuous functional calculus. -/
lemma cfcHom_map_spectrum (f : C(spectrum R a, R)) :
    spectrum R (cfcHom ha f) = Set.range f

{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}
(ha : p a)
(f : C(↑(spectrum R a), R))

spectrum R ((cfcHom ha) f) = Set.range ⇑f


@[reassoc (attr := simp)]
lemma limitRightOpIsoOpColimit_hom_comp_ι (F : Iᵒᵖ ⥤ C) [HasColimit F] (i : I) :
    (limitRightOpIsoOpColimit F).hom ≫ (colimit.ι F ⟨i⟩).op = limit.π F.rightOp i

{C : Type u₁}
[CategoryTheory.Category.{u₂, u₁} C]
{I : Type v₁}
[CategoryTheory.Category.{v₂, v₁} I]
(F : CategoryTheory.Functor Iᵒᵖ C)
[CategoryTheory.Limits.HasColimit F]
(i : I)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.limitRightOpIsoOpColimit F).hom
    (CategoryTheory.Limits.colimit.ι F (Opposite.op i)).op =
  CategoryTheory.Limits.limit.π F.rightOp i


@[to_additive]
theorem prod_congr (f g : α → M) (h : ∀ a, f a = g a) : ∏ a, f a = ∏ a, g a

{α : Type u_1}
{M : Type u_4}
[Fintype α]
[CommMonoid M]
(f g : α → M)
(h : ∀ (a : α), f a = g a)


@[simp]
theorem map_bot (f : α → β) : map f ⊥ = ⊥

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


/-- See also `finite_or_infinite`, `fintypeOrInfinite`. -/
protected theorem finite_or_infinite (s : Set α) : s.Finite ∨ s.Infinite


@[simp] lemma inv_lt_zero : a⁻¹ < 0 ↔ a < 0

{α : Type u_1}
[Semifield α]
[LinearOrder α]
[PosMulReflectLT α]
[ZeroLEOneClass α]
{a : α}


@[simp high]
theorem ae_eq_univ : s =ᵐ[μ] (univ : Set α) ↔ μ sᶜ = 0

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


@[simp]
theorem symm_symm (x : I) : σ (σ x) = x

unitInterval.symm (unitInterval.symm x) = x


theorem isIntegral_stableUnderBaseChange : StableUnderBaseChange fun f => f.IsIntegral

RingHom.StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral


@[simp]
theorem coeff_truncate (x : 𝕎 R) (i : Fin n) : (truncate n x).coeff i = x.coeff i

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

TruncatedWittVector.coeff i ((WittVector.truncate n) x) = x.coeff ↑i


theorem isBigO_comp {E : Type*} {g : F → G} (hg : IsBoundedLinearMap 𝕜 g) {f : E → F}
    (l : Filter E) : (fun x' => g (f x')) =O[l] f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{E : Type u_5}
{g : F → G}
(hg : IsBoundedLinearMap 𝕜 g)
{f : E → F}
(l : Filter E)


@[to_additive]
theorem union_smul : (s₁ ∪ s₂) • t = s₁ • t ∪ s₂ • t

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


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

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


/-- If the multiplicative supports of `f` and `g` are finite, then the product of `f i / g i`
equals the product of `f i` divided by the product of `g i`. -/
@[to_additive
      "If the additive supports of `f` and `g` are finite, then the sum of `f i - g i`
      equals the sum of `f i` minus the sum of `g i`."]
theorem finprod_div_distrib [DivisionCommMonoid G] {f g : α → G} (hf : (mulSupport f).Finite)
    (hg : (mulSupport g).Finite) : ∏ᶠ i, f i / g i = (∏ᶠ i, f i) / ∏ᶠ i, g i

{α : Type u_1}
{G : Type u_4}
[DivisionCommMonoid G]
{f g : α → G}
(hf : (Function.mulSupport f).Finite)
(hg : (Function.mulSupport g).Finite)

∏ᶠ (i : α), f i / g i = (∏ᶠ (i : α), f i) / ∏ᶠ (i : α), g i


/-- If `f` is complex differentiable on an open disc of radius `R > 0`, is continuous on its
closure, and its values on the boundary circle of this disc are bounded from above by `C`, then the
norm of its derivative at the center is at most `C / R`. -/
theorem norm_deriv_le_of_forall_mem_sphere_norm_le {c : ℂ} {R C : ℝ} {f : ℂ → F} (hR : 0 < R)
    (hd : DiffContOnCl ℂ f (ball c R)) (hC : ∀ z ∈ sphere c R, ‖f z‖ ≤ C) :
    ‖deriv f c‖ ≤ C / R

(hd : DiffContOnCl ℂ f (Metric.ball c R))

(hC : ∀ z ∈ Metric.sphere c R, ‖f z‖ ≤ C)


/-- A quaternion basis contains the information both sufficient and necessary to construct an
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to `A`; or equivalently, a surjective
`R`-algebra homomorphism from `ℍ[R,c₁,c₂]` to an `R`-subalgebra of `A`.

Note that for definitional convenience, `k` is provided as a field even though `i_mul_j` fully
determines it. -/
structure Basis {R : Type*} (A : Type*) [CommRing R] [Ring A] [Algebra R A] (c₁ c₂ : R) where
  (i j k : A)
  i_mul_i : i * i = c₁ • (1 : A)
  j_mul_j : j * j = c₂ • (1 : A)
  i_mul_j : i * j = k
  j_mul_i : j * i = -k

(self : QuaternionAlgebra.Basis A c₁ c₂)


@[to_additive]
theorem prod_toFinset {M : Type*} [DecidableEq α] [CommMonoid M] (f : α → M) :
    ∀ {l : List α} (_hl : l.Nodup), l.toFinset.prod f = (l.map f).prod

{α : Type u_3}
{M : Type u_6}
[DecidableEq α]
[AddCommMonoid M]
(f : α → M)
{l : List α}
(_hl : l.Nodup)


theorem toReal_inv (a : ℝ≥0∞) : a⁻¹.toReal = a.toReal⁻¹


/-- If the angle between three points is `π`, the first two points are not equal. -/
theorem left_ne_of_oangle_eq_pi {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = π) : p₁ ≠ p₂

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


theorem le_pred_iff_eq_bot : a ≤ pred a ↔ a = ⊥

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a : α}
[OrderBot α]


theorem t2_separation_compact_nhds [LocallyCompactSpace X] [T2Space X] {x y : X} (h : x ≠ y) :
    ∃ u v, u ∈ 𝓝 x ∧ v ∈ 𝓝 y ∧ IsCompact u ∧ IsCompact v ∧ Disjoint u v

{X : Type u_1}
[TopologicalSpace X]
[LocallyCompactSpace X]
[T2Space X]
{x y : X}
(h : x ≠ y)


theorem mem_verticalStrip_iff (A B : ℝ) (z : ℍ) : z ∈ verticalStrip A B ↔ |z.re| ≤ A ∧ B ≤ z.im

z ∈ UpperHalfPlane.verticalStrip A B ↔ |z.re| ≤ A ∧ B ≤ z.im


@[simp]
theorem edist_ofAdd (a b : X) : edist (ofAdd a) (ofAdd b) = edist a b

edist (Multiplicative.ofAdd a) (Multiplicative.ofAdd b) = edist a b


@[simp]
theorem coe_basisOfLinearIndependentOfCardEqFinrank {ι : Type*} [Nonempty ι] [Fintype ι]
    {b : ι → V} (lin_ind : LinearIndependent K b) (card_eq : Fintype.card ι = finrank K V) :
    ⇑(basisOfLinearIndependentOfCardEqFinrank lin_ind card_eq) = b

(card_eq : Fintype.card ι = FiniteDimensional.finrank K V)


/-- A triangulated subcategory of a pretriangulated category `C` consists of
a predicate `P : C → Prop` which contains a zero object, is stable by shifts, and such that
if `X₁ ⟶ X₂ ⟶ X₃ ⟶ X₁⟦1⟧` is a distinguished triangle such that if `X₁` and `X₃` satisfy
`P` then `X₂` is isomorphic to an object satisfying `P`. -/
structure Subcategory where
  /-- the underlying predicate on objects of a triangulated subcategory -/
  P : C → Prop
  zero' : ∃ (Z : C) (_ : IsZero Z), P Z
  shift (X : C) (n : ℤ) : P X → P (X⟦n⟧)
  ext₂' (T : Triangle C) (_ : T ∈ distTriang C) : P T.obj₁ → P T.obj₃ → isoClosure P T.obj₂

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

(self : CategoryTheory.Triangulated.Subcategory C)

(T : CategoryTheory.Pretriangulated.Triangle C)

T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles →
  self.P T.obj₁ → self.P T.obj₃ → CategoryTheory.isoClosure self.P T.obj₂


theorem Function.LeftInverse.isClosed_range [T2Space X] {f : X → Y} {g : Y → X}
    (h : Function.LeftInverse f g) (hf : Continuous f) (hg : Continuous g) : IsClosed (range g)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space X]
{f : X → Y}
{g : Y → X}
(h : Function.LeftInverse f g)
(hf : Continuous f)
(hg : Continuous g)


/-- Used for `field_simp` to deal with inverses of units. This form of the lemma
is essential since `field_simp` likes to use `inv_eq_one_div` to rewrite
`↑u⁻¹ = ↑(1 / u)`.
-/
@[field_simps]
theorem inv_eq_one_divp' (u : αˣ) : ((1 / u : αˣ) : α) = 1 /ₚ u


@[simp]
theorem sSup_snd (S : Set (Concept α β r)) : (sSup S).snd = ⋂ c ∈ S, (c : Concept _ _ _).snd

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


theorem isSheaf_of_isSheaf_comp (s : A ⥤ B) [ReflectsLimitsOfSize.{v₁, max v₁ u₁} s]
    (h : IsSheaf J (P ⋙ s)) : IsSheaf J P

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Limits.ReflectsLimitsOfSize.{v₁, max v₁ u₁, v₂, v₃, u₂, u₃} s]

(h : CategoryTheory.Presheaf.IsSheaf J (P.comp s))


@[simp]
theorem evenOddRec_even {P : ℕ → Sort*} (h0 : P 0) (h_even : ∀ i, P i → P (2 * i))
    (h_odd : ∀ i, P i → P (2 * i + 1)) (H : h_even 0 h0 = h0) (n : ℕ) :
    (2 * n).evenOddRec h0 h_even h_odd = h_even n (evenOddRec h0 h_even h_odd n)

{P : ℕ → Sort u_1}
(h0 : P 0)
(h_even : (i : ℕ) → P i → P (2 * i))
(h_odd : (i : ℕ) → P i → P (2 * i + 1))
(H : h_even 0 h0 = h0)
(n : ℕ)

Nat.evenOddRec h0 h_even h_odd (2 * n) = h_even n (Nat.evenOddRec h0 h_even h_odd n)


@[simp]
theorem coe_comap (s : Subring S) (f : R →+* S) : (s.comap f : Set R) = f ⁻¹' s

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
(s : Subring S)
(f : R →+* S)


@[simp]
theorem smul_units_def (f : A₁ ≃ₐ[R] A₁) (x : A₁ˣ) :
    f • x = Units.map f x

{R : Type uR}
{A₁ : Type uA₁}
[CommSemiring R]
[Semiring A₁]
[Algebra R A₁]
(f : A₁ ≃ₐ[R] A₁)
(x : A₁ˣ)


@[simp]
theorem eval₂_one : (1 : MvPolynomial σ R).eval₂ f g = 1

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


@[simp]
theorem dotProduct_add : u ⬝ᵥ (v + w) = u ⬝ᵥ v + u ⬝ᵥ w

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


lemma mulSupport_one_add [AddLeftCancelMonoid R] (f : ι → R) :
    mulSupport (fun x ↦ 1 + f x) = support f

{ι : Type u_1}
{R : Type u_5}
[One R]
[AddLeftCancelMonoid R]
(f : ι → R)

(Function.mulSupport fun x => 1 + f x) = Function.support f


/-- The map of a Gaussian distribution by addition of a constant is a Gaussian. -/
lemma gaussianReal_map_const_add (y : ℝ) :
    (gaussianReal μ v).map (y + ·) = gaussianReal (μ + y) v

MeasureTheory.Measure.map (fun x => y + x) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (μ + y) v


theorem continuousOn_exp {s : Set ℂ} : ContinuousOn exp s


@[to_additive]
theorem map_surjective_of_surjective : Function.Surjective (map f)

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{f : M →ₙ* N}
(hf : Function.Surjective ⇑f)


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


lemma ContinuousWithinAt.finset_sup_apply
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) :
    ContinuousWithinAt (fun a ↦ s.sup (f · a)) t x

ContinuousWithinAt (fun a => s.sup fun x => f x a) t x


theorem lmarginal_eq_of_subset {f g : (∀ i, π i) → ℝ≥0∞} (hst : s ⊆ t)
    (hf : Measurable f) (hg : Measurable g) (hfg : ∫⋯∫⁻_s, f ∂μ = ∫⋯∫⁻_s, g ∂μ) :
    ∫⋯∫⁻_t, f ∂μ = ∫⋯∫⁻_t, g ∂μ

{μ : (i : δ) → MeasureTheory.Measure (π i)}

[∀ (i : δ), MeasureTheory.SigmaFinite (μ i)]

∫⋯∫⁻_t, f ∂μ = ∫⋯∫⁻_t, g ∂μ


@[simp]
theorem cons_val_succ' {i : ℕ} (h : i.succ < m.succ) (x : α) (u : Fin m → α) :
    vecCons x u ⟨i.succ, h⟩ = u ⟨i, Nat.lt_of_succ_lt_succ h⟩

{α : Type u}
{m i : ℕ}
(h : i.succ < m.succ)
(x : α)
(u : Fin m → α)

Matrix.vecCons x u ⟨i.succ, h⟩ = u ⟨i, ⋯⟩


protected theorem stronglyMeasurable (f : Lp.simpleFunc E p μ) :
    StronglyMeasurable (toSimpleFunc f)

(f : ↥(MeasureTheory.Lp.simpleFunc E p μ))


/-- Multiplicativity of a continuous multilinear map along all coordinates at the same time,
writing `f (fun i ↦ c i • m i)` as `(∏ i, c i) • f m`. -/
theorem map_smul_univ [Fintype ι] (c : ι → R) (m : ∀ i, M₁ i) :
    (f fun i => c i • m i) = (∏ i, c i) • f m

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
[CommSemiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
(f : ContinuousMultilinearMap R M₁ M₂)
[Fintype ι]
(c : ι → R)
(m : (i : ι) → M₁ i)

(f fun i => c i • m i) = (∏ i : ι, c i) • f m


theorem StrictConvexOn.convexOn {s : Set E} {f : E → β} (hf : StrictConvexOn 𝕜 s f) :
    ConvexOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f : E → β}
(hf : StrictConvexOn 𝕜 s f)


/-- A function whose codomain's cardinality is infinite but strictly smaller than its domain's
has an infinite fiber.
-/
theorem exists_infinite_fiber {β α : Type u} (f : β → α) (w : #α < #β) (w' : Infinite α) :
    ∃ a : α, Infinite (f ⁻¹' {a})


theorem coeq₃_condition₃ {j₁ j₂ : C} (f g h : j₁ ⟶ j₂) : f ≫ coeq₃Hom f g h = h ≫ coeq₃Hom f g h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsFilteredOrEmpty C]
{j₁ j₂ : C}
(f g h : j₁ ⟶ j₂)

CategoryTheory.CategoryStruct.comp f (CategoryTheory.IsFiltered.coeq₃Hom f g h) =
  CategoryTheory.CategoryStruct.comp h (CategoryTheory.IsFiltered.coeq₃Hom f g h)


@[to_additive (attr := simp, norm_cast)]
lemma coe_eq_one : (a : WithTop α) = 1 ↔ a = 1


@[to_additive]
theorem map_inv' : f⁻¹.map m = (f.map m)⁻¹

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Group α]
[DivisionMonoid β]
[FunLike F α β]
[MonoidHomClass F α β]
(m : F)
{f : Filter α}

Filter.map (⇑m) f⁻¹ = (Filter.map (⇑m) f)⁻¹


/-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def ofSurjective {vars} (val : vars → S) (h : Function.Surjective (aeval (R := R) val)) :
    Generators R S

(h : Function.Surjective ⇑(MvPolynomial.aeval val))

∀ (a : vars), (Algebra.Generators.ofSurjective val h).val a = val a


@[simp]
theorem zero_mem_polar (s : Set E) : (0 : F) ∈ B.polar s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedCommRing 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
(s : Set E)


@[simp]
theorem inclusionMapIso_inv (x : X) : (inclusionMapIso f x).inv = 𝟙 _

(TopologicalSpace.OpenNhds.inclusionMapIso f x).inv =
  𝟙 (TopologicalSpace.OpenNhds.map f x ⋙ TopologicalSpace.OpenNhds.inclusion x)


@[simp, mfld_simps]
theorem mem_localTrivAt_target (p : B × F) (b : B) :
    p ∈ (Z.localTrivAt b).target ↔ p.1 ∈ (Z.localTrivAt b).baseSet

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(p : B × F)
(b : B)


@[simp]
theorem toRingEquiv_eq_coe : e.toRingEquiv = e

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


theorem inv_zero' : (0 : FractionalIdeal R₁⁰ K)⁻¹ = 0

(K : Type u_3)
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]


/-- The set of all permutations of `Option α` can be constructed by augmenting the set of
permutations of `α` by each element of `Option α` in turn. -/
theorem Finset.univ_perm_option {α : Type*} [DecidableEq α] [Fintype α] :
    @Finset.univ (Perm <| Option α) _ =
      (Finset.univ : Finset <| Option α × Perm α).map Equiv.Perm.decomposeOption.symm.toEmbedding

{α : Type u_1}
[DecidableEq α]
[Fintype α]

Finset.univ = Finset.map Equiv.Perm.decomposeOption.symm.toEmbedding Finset.univ


@[simp]
theorem FGModuleCatEvaluation_apply (f : FGModuleCatDual K V) (x : V) :
    (FGModuleCatEvaluation K V) (f ⊗ₜ x) = f.toFun x

(f : ↑(FGModuleCat.FGModuleCatDual K V))

(FGModuleCat.FGModuleCatEvaluation K V) (f ⊗ₜ[K] x) = f.toFun x


theorem mapDomain.addMonoidHom_comp (f : β → γ) (g : α → β) :
    (mapDomain.addMonoidHom (f ∘ g) : (α →₀ M) →+ γ →₀ M) =
      (mapDomain.addMonoidHom f).comp (mapDomain.addMonoidHom g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{M : Type u_5}
[AddCommMonoid M]
(f : β → γ)
(g : α → β)

Finsupp.mapDomain.addMonoidHom (f ∘ g) = (Finsupp.mapDomain.addMonoidHom f).comp (Finsupp.mapDomain.addMonoidHom g)


@[simp]
theorem one_power {a : Cardinal} : (1 : Cardinal) ^ a = 1


lemma one_mem_range_sumCoeffsExp : 1 ∈ Set.range (fun (p : ℝ) => ∑ i, a i * (b i) ^ p)

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

1 ∈ Set.range fun p => ∑ i : α, a i * b i ^ p


@[to_additive]
theorem norm_div_pos_iff : 0 < ‖a / b‖ ↔ a ≠ b

{E : Type u_6}
[NormedGroup E]
{a b : E}


@[simp]
lemma opcyclesMap'_sub :
    opcyclesMap' (φ - φ') h₁ h₂ = opcyclesMap' φ h₁ h₂ -
      opcyclesMap' φ' h₁ h₂

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

CategoryTheory.ShortComplex.opcyclesMap' (φ - φ') h₁ h₂ =
  CategoryTheory.ShortComplex.opcyclesMap' φ h₁ h₂ - CategoryTheory.ShortComplex.opcyclesMap' φ' h₁ h₂


@[simp]
lemma bodd_add (m n : ℕ) : bodd (m + n) = bxor (bodd m) (bodd n)


@[simp]
theorem _root_.aestronglyMeasurable_iUnion_iff [PseudoMetrizableSpace β] {s : ι → Set α} :
    AEStronglyMeasurable f (μ.restrict (⋃ i, s i)) ↔
      ∀ i, AEStronglyMeasurable f (μ.restrict (s i))

MeasureTheory.AEStronglyMeasurable f (μ.restrict (⋃ i, s i)) ↔
  ∀ (i : ι), MeasureTheory.AEStronglyMeasurable f (μ.restrict (s i))


theorem eraseIdx_eq_take_drop_succ :
    ∀ (l : List α) (i : Nat), l.eraseIdx i = l.take i ++ l.drop (i + 1)

l.eraseIdx i = List.take i l ++ List.drop (i + 1) l


theorem foldl_eq_of_comm' : ∀ a b l, foldl f a (b :: l) = f (foldl f a l) b

{f : α → β → α}

(hf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b)

List.foldl f a (b :: l) = f (List.foldl f a l) b


lemma mul_log_nonneg {x : ℝ} (hx : 1 ≤ x) : 0 ≤ x * log x


theorem ite_eq_mem_stdSimplex (i : ι) : (if i = · then (1 : 𝕜) else 0) ∈ stdSimplex 𝕜 ι

(𝕜 : Type u_1)
{ι : Type u_5}
[OrderedSemiring 𝕜]
[Fintype ι]
[DecidableEq ι]
(i : ι)

(fun x => if i = x then 1 else 0) ∈ stdSimplex 𝕜 ι


/-- `fderiv 𝕜 f` is smooth at `x₀`. -/
theorem ContDiffAt.fderiv_right (hf : ContDiffAt 𝕜 n f x₀) (hmn : (m + 1 : ℕ∞) ≤ n) :
    ContDiffAt 𝕜 m (fderiv 𝕜 f) x₀

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x₀ : E}
{m n : ℕ∞}
(hf : ContDiffAt 𝕜 n f x₀)
(hmn : m + 1 ≤ n)


@[measurability, fun_prop]
theorem measurable_derivWithin_Ici [MeasurableSpace F] [BorelSpace F] :
    Measurable fun x => derivWithin f (Ici x) x

{F : Type u_1}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : ℝ → F)
[CompleteSpace F]
[MeasurableSpace F]
[BorelSpace F]

Measurable fun x => derivWithin f (Set.Ici x) x


@[simp] theorem empty_eq : (∅ : List α) = []


lemma restrict (h : μ ⟂ₘ ν) (s : Set α) : μ.restrict s ⟂ₘ ν

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
(h : μ ⟂ₘ ν)
(s : Set α)


@[simp]
theorem center_eq_top (A : Type*) [NonUnitalCommSemiring A] [Module R A] [IsScalarTower R A A]
    [SMulCommClass R A A] : center R A = ⊤

(R : Type u_1)
[CommSemiring R]
(A : Type u_3)
[NonUnitalCommSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]


@[simp, norm_cast]
theorem cast_le : (m : α) ≤ n ↔ m ≤ n

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

↑m ≤ ↑n ↔ m ≤ n


@[simp]
theorem mem_map {S : StarSubalgebra R A} {f : A →⋆ₐ[R] B} {y : B} :
    y ∈ map f S ↔ ∃ x ∈ S, f x = y

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
{S : StarSubalgebra R A}
{f : A →⋆ₐ[R] B}
{y : B}

y ∈ StarSubalgebra.map f S ↔ ∃ x ∈ S, f x = y


lemma root_X_pow_sub_C_ne_zero' {n : ℕ} {a : K} (hn : 0 < n) (ha : a ≠ 0) :
    (AdjoinRoot.root (X ^ n - C a)) ≠ 0

{K : Type u}
[Field K]
{n : ℕ}
{a : K}
(hn : 0 < n)
(ha : a ≠ 0)

AdjoinRoot.root (Polynomial.X ^ n - Polynomial.C a) ≠ 0


@[to_additive (attr := simp)]
theorem inv_pure : (pure a)⁻¹ = pure a⁻¹

{α : Type u_2}
[OrderedAddCommGroup α]
(a : α)

-NonemptyInterval.pure a = NonemptyInterval.pure (-a)


/-- If an antitone function is continuous at the indexed supremum of a bounded function on
a nonempty `Sort`, then it sends this supremum to the infimum of the composition. -/
theorem Antitone.map_ciSup_of_continuousAt {f : α → β} {g : γ → α} (Cf : ContinuousAt f (⨆ i, g i))
    (Af : Antitone f) (H : BddAbove (range g)) : f (⨆ i, g i) = ⨅ i, f (g i)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
[Nonempty γ]
{f : α → β}
{g : γ → α}
(Cf : ContinuousAt f (⨆ i, g i))
(Af : Antitone f)
(H : BddAbove (Set.range g))


@[simp, deprecated maximum_eq_bot "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem maximum_eq_none {l : List α} : l.maximum = none ↔ l = []

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
{l : List α}


@[simp] lemma univ_filter_card_eq (k : ℕ) :
    (univ : Finset (Finset α)).filter (fun s ↦ s.card = k) = univ.powersetCard k

Finset.filter (fun s => s.card = k) Finset.univ = Finset.powersetCard k Finset.univ


@[mono]
theorem map_mono (h : N ≤ N₂) : N.map f ≤ N₂.map f

{R : Type u}
{L : Type v}
{M : Type w}
{M' : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup M']
[Module R M']
[LieRingModule L M']
{f : M →ₗ⁅R,L⁆ M'}
{N N₂ : LieSubmodule R L M}
(h : N ≤ N₂)

LieSubmodule.map f N ≤ LieSubmodule.map f N₂


@[simp]
theorem coe_vaddConst (p : P) : ⇑(vaddConst 𝕜 p) = fun v => v +ᵥ p

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(p : P)

⇑(AffineIsometryEquiv.vaddConst 𝕜 p) = fun v => v +ᵥ p


@[simp]
theorem isEmpty_prod {α β : Type*} : IsEmpty (α × β) ↔ IsEmpty α ∨ IsEmpty β


@[simp]
theorem leadingCoeff_X_add_C [Semiring S] (r : S) : (X + C r).leadingCoeff = 1

(Polynomial.X + Polynomial.C r).leadingCoeff = 1


@[simp] theorem foldl_append {β : Type _} (f : β → α → β) (b) (l l' : List α) :
    (l ++ l').foldl f b = l'.foldl f (l.foldl f b)

{α : Type u_1}
{β : Type u_2}
(f : β → α → β)
(b : β)
(l l' : List α)

List.foldl f b (l ++ l') = List.foldl f (List.foldl f b l) l'


@[simp]
theorem csInf_univ [ConditionallyCompleteLinearOrder α] [OrderBot α] : sInf (univ : Set α) = ⊥

{α : Type u_1}
[ConditionallyCompleteLinearOrder α]
[OrderBot α]


theorem replaceEquiv_eq_self (e' : PartialEquiv X Y)
    (h : e.toPartialEquiv = e') : e.replaceEquiv e' h = e

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
(e' : PartialEquiv X Y)
(h : e.toPartialEquiv = e')


@[to_additive]
theorem prod_eq_single {s : Finset α} {f : α → β} (a : α) (h₀ : ∀ b ∈ s, b ≠ a → f b = 1)
    (h₁ : a ∉ s → f a = 1) : ∏ x ∈ s, f x = f a

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
{s : Finset α}
{f : α → β}
(a : α)
(h₀ : ∀ b ∈ s, b ≠ a → f b = 0)
(h₁ : a ∉ s → f a = 0)


@[simp] theorem polarBilin_prod (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P) :
    (Q₁.prod Q₂).polarBilin =
      Q₁.polarBilin.compl₁₂ (.fst R M₁ M₂) (.fst R M₁ M₂) +
      Q₂.polarBilin.compl₁₂ (.snd R M₁ M₂) (.snd R M₁ M₂)

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommRing R]
[AddCommGroup M₁]
[AddCommGroup M₂]
[AddCommGroup P]
[Module R M₁]
[Module R M₂]
[Module R P]
(Q₁ : QuadraticMap R M₁ P)
(Q₂ : QuadraticMap R M₂ P)

(Q₁.prod Q₂).polarBilin =
  LinearMap.compl₁₂ Q₁.polarBilin (LinearMap.fst R M₁ M₂) (LinearMap.fst R M₁ M₂) +
    LinearMap.compl₁₂ Q₂.polarBilin (LinearMap.snd R M₁ M₂) (LinearMap.snd R M₁ M₂)


theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0


@[simp]
theorem compl_compl (x : α) : xᶜᶜ = x


theorem fst_surjective_iff : Surjective (fst : (Σ a, β a) → α) ↔ ∀ a, Nonempty (β a)

Function.Surjective Sigma.fst ↔ ∀ (a : α), Nonempty (β a)


@[simp]
theorem lapply_comp_lsingle_of_ne (a a' : α) (h : a ≠ a') :
    lapply a ∘ₗ lsingle a' = (0 : M →ₗ[R] M)

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(a a' : α)
(h : a ≠ a')

Finsupp.lapply a ∘ₗ Finsupp.lsingle a' = 0


theorem Odd.geom_sum_pos [LinearOrderedRing α] (h : Odd n) : 0 < ∑ i ∈ range n, x ^ i

{α : Type u}
{n : ℕ}
{x : α}
[LinearOrderedRing α]
(h : Odd n)


@[simp] lemma supClosed_univ : SupClosed (univ : Set α)


theorem upcrossings_lt_top_iff :
    upcrossings a b f ω < ∞ ↔ ∃ k, ∀ N, upcrossingsBefore a b f N ω ≤ k

{Ω : Type u_1}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{ω : Ω}

MeasureTheory.upcrossings a b f ω < ⊤ ↔ ∃ k, ∀ (N : ℕ), MeasureTheory.upcrossingsBefore a b f N ω ≤ k


lemma CotangentSpace.map_eq_top_iff [IsNoetherianRing R] {M : Submodule R (maximalIdeal R)} :
    M.map (maximalIdeal R).toCotangent = ⊤ ↔ M = ⊤

{M : Submodule R ↥(LocalRing.maximalIdeal R)}

Submodule.map (LocalRing.maximalIdeal R).toCotangent M = ⊤ ↔ M = ⊤


/-- The equivalence of categories `(J → C) ≌ (Discrete J ⥤ C)`. -/
@[simps]
def piEquivalenceFunctorDiscrete (J : Type u₂) (C : Type u₁) [Category.{v₁} C] :
    (J → C) ≌ (Discrete J ⥤ C)

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

(CategoryTheory.piEquivalenceFunctorDiscrete J C).unitIso = CategoryTheory.Iso.refl (CategoryTheory.Functor.id (J → C))


/--
An effective presentation of an object `X` with respect to a functor `F` is the data of an effective
epimorphism of the form `F.obj p ⟶ X`.
-/
structure EffectivePresentation (X : D) where
  /-- The object of `C` giving the source of the effective epi -/
  p : C
  /-- The morphism `F.obj p ⟶ X` -/
  f : F.obj p ⟶ X
  /-- `f` is an effective epi -/
  effectiveEpi : EffectiveEpi f

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F : CategoryTheory.Functor C D}
{X : D}
(self : F.EffectivePresentation X)


/-- Contravariantly associated to each functor `J ⥤ C`, we have the `C`-copresheaf consisting of
cocones with a given cocone point.
-/
@[simps!]
def cocones : (J ⥤ C)ᵒᵖ ⥤ C ⥤ Type max u₁ v₃

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

∀ {X Y : C} (f : X ⟶ Y)
  (a : (CategoryTheory.coyoneda.obj (Opposite.op (Opposite.unop F))).obj ((CategoryTheory.Functor.const J).obj X))
  (X_1 : J), (((CategoryTheory.cocones J C).obj F).map f a).app X_1 = a.app X_1 ≫ f


@[simp]
theorem length_tails (l : List α) : length (tails l) = length l + 1


lemma ringEquivCongr_symm {a b : ℕ} (hab : a = b) :
    (ringEquivCongr hab).symm = ringEquivCongr hab.symm

(ZMod.ringEquivCongr hab).symm = ZMod.ringEquivCongr ⋯


theorem proj_diagonal (i : n) (w : n → R) : (proj i).comp (toLin' (diagonal w)) = w i • proj i

{n : Type u_1}
[Fintype n]
[DecidableEq n]
{R : Type v}
[CommSemiring R]
(i : n)
(w : n → R)

LinearMap.proj i ∘ₗ Matrix.toLin' (Matrix.diagonal w) = w i • LinearMap.proj i


/-- In a preadditive category, we can construct a biproduct for `f : J → C` from
any bicone `b` for `f` satisfying `total : ∑ j : J, b.π j ≫ b.ι j = 𝟙 b.X`.

(That is, such a bicone is a limit cone and a colimit cocone.)
-/
theorem hasBiproduct_of_total {f : J → C} (b : Bicone f)
    (total : ∑ j : J, b.π j ≫ b.ι j = 𝟙 b.pt) : HasBiproduct f


theorem eval₂_one_cyclotomic_prime_pow {R S : Type*} [CommRing R] [Semiring S] (f : R →+* S)
    {p : ℕ} (k : ℕ) [Fact p.Prime] : eval₂ f 1 (cyclotomic (p ^ (k + 1)) R) = p

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Semiring S]
(f : R →+* S)
{p : ℕ}
(k : ℕ)
[Fact (Nat.Prime p)]

Polynomial.eval₂ f 1 (Polynomial.cyclotomic (p ^ (k + 1)) R) = ↑p


@[simp] theorem counit_comp_inr : counit ∘ₗ inr R A B = counit

(R : Type u)
(A : Type v)
(B : Type w)
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[Coalgebra R A]
[Coalgebra R B]

Coalgebra.counit ∘ₗ LinearMap.inr R A B = Coalgebra.counit


theorem IsGLB.mul_right {s : Set α} (ha : 0 ≤ a) (hs : IsGLB s b) :
    IsGLB ((fun b => b * a) '' s) (b * a)

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
{s : Set α}
(ha : 0 ≤ a)
(hs : IsGLB s b)


@[measurability]
theorem measurable_coe_nnreal_ennreal : Measurable ((↑) : ℝ≥0 → ℝ≥0∞)


@[simp]
theorem singleton_join (a) : join ({a} : Multiset (Multiset α)) = a


/-- The equivalence, given by swapping factors, between `C × D` and `D × C`.
-/
@[simps!]
def braiding : C × D ≌ D × C

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

(CategoryTheory.Prod.braiding C D).unitIso.hom.app X =
  (CategoryTheory.CategoryStruct.id X.1, CategoryTheory.CategoryStruct.id X.2)


lemma add_of_Z_eq_zero_left {P Q : Fin 3 → R} (hP : W'.Equation P) (hPz : P z = 0) (hQz : Q z ≠ 0) :
    W'.add P Q = (P x * Q z) • Q

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P Q : Fin 3 → R}
(hP : W'.Equation P)
(hPz : P z = 0)
(hQz : Q z ≠ 0)


lemma hasRightExtension_iff_of_iso₂ : HasRightKanExtension L F ↔ HasRightKanExtension L F'

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_9, u_5} D]
(L : CategoryTheory.Functor C D)
{F F' : CategoryTheory.Functor C H}
(iso₂ : F ≅ F')

L.HasRightKanExtension F ↔ L.HasRightKanExtension F'


protected theorem dvd_add {a b c : Nat} (h₁ : a ∣ b) (h₂ : a ∣ c) : a ∣ b + c


theorem frobenius_def : frobenius R p x = x ^ p

{R : Type u}
[CommSemiring R]
(p : ℕ)
[ExpChar R p]
(x : R)


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


lemma exists_finset_linearIndependent_of_le_rank {n : ℕ} (hn : n ≤ Module.rank R M) :
    ∃ s : Finset M, s.card = n ∧ LinearIndependent R ((↑) : s → M)

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{n : ℕ}
(hn : ↑n ≤ Module.rank R M)

∃ s, s.card = n ∧ LinearIndependent R Subtype.val


theorem natDegree_mul_leadingCoeff_self_inv (p : K[X]) :
    natDegree (p * C (leadingCoeff p)⁻¹) = natDegree p

{K : Type u_1}
[DivisionRing K]
(p : K[X])

(p * Polynomial.C p.leadingCoeff⁻¹).natDegree = p.natDegree


@[simp] -- Porting note: was not a `dsimp` lemma
theorem comap_id (S : ConvexCone 𝕜 E) : S.comap LinearMap.id = S

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(S : ConvexCone 𝕜 E)


theorem sub_half_lt_round (x : α) : x - 1 / 2 < round x

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


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

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

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


theorem id_def (M : Mat_ C) :
    (𝟙 M : Hom M M) = fun i j => if h : i = j then eqToHom (congr_arg M.X h) else 0

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

𝟙 M = fun i j => if h : i = j then CategoryTheory.eqToHom ⋯ else 0


@[simp]
lemma Differentiable.sub_iff_right (hg : Differentiable 𝕜 f) :
    Differentiable 𝕜 (fun y => f y - g y) ↔ Differentiable 𝕜 g

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
(hg : Differentiable 𝕜 f)

(Differentiable 𝕜 fun y => f y - g y) ↔ Differentiable 𝕜 g


/-- A functor `C ⥤ D` induces a functor between the corresponding arrow categories. -/
@[simps]
def mapArrow (F : C ⥤ D) : Arrow C ⥤ Arrow D

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

∀ {X Y : CategoryTheory.Arrow C} (f : X ⟶ Y), (F.mapArrow.map f).right = F.map f.right


/-- A hash is lawful if elements which compare equal under `==` have equal hash. -/
class LawfulHashable (α : Type _) [BEq α] [Hashable α] : Prop where
  /-- Two elements which compare equal under the `BEq` instance have equal hash. -/
  hash_eq {a b : α} : a == b → hash a = hash b

[self : Batteries.HashMap.LawfulHashable α]


@[simp]
theorem add_eq_bot_iff {x y : EReal} : x + y = ⊥ ↔ x = ⊥ ∨ y = ⊥


@[simp] theorem findIdx_nil {α : Type _} (p : α → Bool) : [].findIdx p = 0


theorem add_left_cancel (a) {b c : Ordinal} : a + b = a + c ↔ b = c

(a : Ordinal.{u_4})
{b c : Ordinal.{u_4}}


theorem isEmpty_coe_sort {s : Finset α} : IsEmpty (s : Type _) ↔ s = ∅


theorem cramer_submatrix_equiv (A : Matrix m m α) (e : n ≃ m) (b : n → α) :
    cramer (A.submatrix e e) b = cramer A (b ∘ e.symm) ∘ e

{m : Type u}
{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[DecidableEq m]
[Fintype m]
[CommRing α]
(A : Matrix m m α)
(e : n ≃ m)
(b : n → α)

(A.submatrix ⇑e ⇑e).cramer b = A.cramer (b ∘ ⇑e.symm) ∘ ⇑e


@[to_additive]
theorem lcm_orderOf_dvd_exponent [Fintype G] :
    (Finset.univ : Finset G).lcm orderOf ∣ exponent G

Finset.univ.lcm orderOf ∣ Monoid.exponent G


theorem nonneg_and_nonneg_or_nonpos_and_nonpos_of_mul_nonneg
    [MulPosStrictMono α] [PosMulStrictMono α]
    (hab : 0 ≤ a * b) : 0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0

{α : Type u}
[Semiring α]
[LinearOrder α]
{a b : α}
[MulPosStrictMono α]
[PosMulStrictMono α]
(hab : 0 ≤ a * b)


/-- `Sum.inr` as a relation embedding into `Sum.LiftRel r s`. -/
@[simps]
def sumLiftRelInr (r : α → α → Prop) (s : β → β → Prop) : s ↪r Sum.LiftRel r s

{α : Type u_1}
{β : Type u_2}
(r : α → α → Prop)
(s : β → β → Prop)
(val : β)

(RelEmbedding.sumLiftRelInr r s) val = Sum.inr val


lemma LieAlgebra.ad_pow_lie (x y z : L) (n : ℕ) :
    ((ad R L x) ^ n) ⁅y, z⁆ =
      ∑ ij ∈ antidiagonal n, n.choose ij.1 • ⁅((ad R L x) ^ ij.1) y, ((ad R L x) ^ ij.2) z⁆

(R : Type u)
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(x y z : L)
(n : ℕ)

((LieAlgebra.ad R L) x ^ n) ⁅y, z⁆ =
  ∑ ij ∈ Finset.antidiagonal n, n.choose ij.1 • ⁅((LieAlgebra.ad R L) x ^ ij.1) y, ((LieAlgebra.ad R L) x ^ ij.2) z⁆


/-- Two factorisations through monomorphisms satisfying the universal property
must factor through isomorphic objects. -/
@[simps]
def isoExt {F F' : MonoFactorisation f} (hF : IsImage F) (hF' : IsImage F') :
    F.I ≅ F'.I

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

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


@[simp]
theorem irrational_mul_int_iff : Irrational (x * m) ↔ m ≠ 0 ∧ Irrational x

Irrational (x * ↑m) ↔ m ≠ 0 ∧ Irrational x


theorem tsub_eq_iff_eq_add_of_le (h : b ≤ a) : a - b = c ↔ a = c + b

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

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


@[simp]
theorem ratio_zpow (e : X ≃ᵈ X) (n : ℤ) : ratio (e ^ n) = ratio e ^ n

{X : Type u_1}
[PseudoEMetricSpace X]
(e : X ≃ᵈ X)
(n : ℤ)

Dilation.ratio (e ^ n) = Dilation.ratio e ^ n


theorem HasDerivWithinAt.scomp_hasDerivAt (hg : HasDerivWithinAt g₁ g₁' s' (h x))
    (hh : HasDerivAt h h' x) (hs : ∀ x, h x ∈ s') : HasDerivAt (g₁ ∘ h) (h' • g₁') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{s' : Set 𝕜'}
{h : 𝕜 → 𝕜'}
{h' : 𝕜'}
{g₁ : 𝕜' → F}
{g₁' : F}
(hg : HasDerivWithinAt g₁ g₁' s' (h x))
(hh : HasDerivAt h h' x)
(hs : ∀ (x : 𝕜), h x ∈ s')


theorem vector_tail {n} : Computable (@Vector.tail α n)


@[simp]
theorem rel_mk {s : Con R} {h a b} : RingCon.mk s h a b ↔ s a b

{h : ∀ {w x y z : R}, Setoid.r w x → Setoid.r y z → Setoid.r (w + y) (x + z)}


@[simps]
instance BoolAlg.hasForgetToBoolRing : HasForget₂ BoolAlg BoolRing

(f : BoundedLatticeHom ↑X.toBddDistLat.toBddLat.toLat ↑Y.toBddDistLat.toBddLat.toLat)

CategoryTheory.HasForget₂.forget₂.map f = f.asBoolRing


@[simp]
theorem symmDiff_eq_bot {a b : α} : a ∆ b = ⊥ ↔ a = b

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


/-- When the second map `S.g` is zero, this is the homology data on `S` given by
the chosen `cokernel S.f` -/
@[simps]
noncomputable def ofHasCokernel (hg : S.g = 0) [HasCokernel S.f] :
    S.HomologyData

(CategoryTheory.ShortComplex.HomologyData.ofHasCokernel S hg).iso =
  CategoryTheory.Iso.refl (CategoryTheory.ShortComplex.LeftHomologyData.ofHasCokernel S hg).H


/-- Equivalence between continuous maps into the units of a monoid with continuous multiplication
and the units of the monoid of continuous maps. -/
-- Porting note: `simps` made bad `simp` lemmas (LHS simplifies) so we add them manually below
@[to_additive (attr := simps apply_val_apply symm_apply_apply_val)
"Equivalence between continuous maps into the additive units of an additive monoid with continuous
addition and the additive units of the additive monoid of continuous maps."]
def unitsLift : C(X, Mˣ) ≃ C(X, M)ˣ

{X : Type u_1}
{M : Type u_2}
[TopologicalSpace X]
[AddMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
(f : C(X, AddUnits M))
(x : X)

↑(ContinuousMap.addUnitsLift f) x = ↑(f x)


/-- Whiskering a 1-morphism is a functor. -/
@[simps]
def whiskering {x : B} (h : x ⟶ c) : LeftLift f g ⥤ LeftLift f (h ≫ g)

(t : CategoryTheory.Bicategory.LeftLift f g)

(CategoryTheory.Bicategory.LeftLift.whiskering h).obj t = t.whisker h


/-- A preadditive category with finite products has finite biproducts. -/
theorem HasFiniteBiproducts.of_hasFiniteProducts [HasFiniteProducts C] : HasFiniteBiproducts C


theorem Module.free_of_finite_type_torsion_free [_root_.Finite ι] {s : ι → M}
    (hs : span R (range s) = ⊤) [NoZeroSMulDivisors R M] : Module.Free R M

(hs : Submodule.span R (Set.range s) = ⊤)


theorem map_subtype_embedding_Ico (hp : ∀ ⦃a b x⦄, a ≤ x → x ≤ b → p a → p b → p x):
    (Ico a b).map (Embedding.subtype p) = (Ico a b : Finset α)

(hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x)

Finset.map (Function.Embedding.subtype p) (Finset.Ico a b) = Finset.Ico ↑a ↑b


theorem Integrable.lintegral_lt_top {f : α → ℝ} (hf : Integrable f μ) :
    (∫⁻ x, ENNReal.ofReal (f x) ∂μ) < ∞

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


@[simp]
theorem toFinset_inter (s t : Multiset α) : toFinset (s ∩ t) = toFinset s ∩ toFinset t

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

(s ∩ t).toFinset = s.toFinset ∩ t.toFinset


/-- Bisimulation principle using `LiftR'` to match and relate children of two trees. -/
theorem Cofix.bisim₂ {α : TypeVec n} (r : Cofix F α → Cofix F α → Prop)
    (h : ∀ x y, r x y → LiftR' (RelLast' α r) (Cofix.dest x) (Cofix.dest y)) :
    ∀ x y, r x y → x = y

(r : MvQPF.Cofix F α → MvQPF.Cofix F α → Prop)

(h : ∀ (x y : MvQPF.Cofix F α), r x y → MvFunctor.LiftR' (α.RelLast' r) x.dest y.dest)


lemma tendsto_setIntegral_densityProcess (hκν : fst κ ≤ ν)
    [IsFiniteKernel ν] (a : α) {s : Set β} (hs : MeasurableSet s) (A : Set γ) :
    Tendsto (fun i ↦ ∫ x in A, densityProcess κ ν i a x s ∂(ν a)) atTop
      (𝓝 (∫ x in A, density κ ν a x s ∂(ν a)))

{κ : ProbabilityTheory.Kernel α (γ × β)}

Filter.Tendsto (fun i => ∫ (x : γ) in A, κ.densityProcess ν i a x s ∂ν a) Filter.atTop
  (𝓝 (∫ (x : γ) in A, κ.density ν a x s ∂ν a))


theorem list_prod_ofFn_of_eq_dProd (n : ℕ) (fι : Fin n → ι) (fA : ∀ a, A (fι a)) :
    (List.ofFn fun a => of A (fι a) (fA a)).prod = of A _ ((List.finRange n).dProd fι fA)

{ι : Type u_1}
[DecidableEq ι]
(A : ι → Type u_2)
[(i : ι) → AddCommMonoid (A i)]
[AddMonoid ι]
[DirectSum.GSemiring A]
(n : ℕ)
(fι : Fin n → ι)
(fA : (a : Fin n) → A (fι a))

(List.ofFn fun a => (DirectSum.of A (fι a)) (fA a)).prod =
  (DirectSum.of A ((List.finRange n).dProdIndex fι)) ((List.finRange n).dProd fι fA)


theorem card_Iio_eq_card_Iic_sub_one (a : α) : (Iio a).card = (Iic a).card - 1

{α : Type u_2}
[PartialOrder α]
[LocallyFiniteOrderBot α]
(a : α)

(Finset.Iio a).card = (Finset.Iic a).card - 1


theorem diam_insert : diam (insert x s) = max (⨆ y ∈ s, edist x y) (diam s)

{α : Type u}
[PseudoEMetricSpace α]
{x : α}
{s : Set α}

EMetric.diam (insert x s) = max (⨆ y ∈ s, edist x y) (EMetric.diam s)


theorem sigma_preimage_right {g : ∀ i, β i → α i} :
    (s.sigma fun i ↦ g i ⁻¹' t i) = (fun p : Σ i, β i ↦ Sigma.mk p.1 (g _ p.2)) ⁻¹' s.sigma t

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

(s.sigma fun i => g i ⁻¹' t i) = (fun p => ⟨p.fst, g p.fst p.snd⟩) ⁻¹' s.sigma t


lemma shiftIso_inv_app (n a a' : ℤ) (ha' : n + a = a') (K : CochainComplex C ℤ) :
    (shiftIso C n a a' ha').inv.app K =
      ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').inv.app K)

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.CategoryWithHomology C]
(n a a' : ℤ)
(ha' : n + a = a')
(K : CochainComplex C ℤ)

(CochainComplex.ShiftSequence.shiftIso C n a a' ha').inv.app K =
  CategoryTheory.ShortComplex.homologyMap ((CochainComplex.shiftShortComplexFunctorIso C n a a' ha').inv.app K)


@[simp]
theorem _root_.Set.algebraMap_mem_centralizer {s : Set A} (r : R) :
    algebraMap R A r ∈ s.centralizer

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{s : Set A}
(r : R)


/-- The submonoid generated by a set is contained in any submonoid that contains the set. -/
@[to_additive
      "The `AddSubmonoid` generated by a set is contained in any `AddSubmonoid` that
      contains the set."]
theorem closure_subset {s t : Set M} (ht : IsSubmonoid t) (h : s ⊆ t) : Closure s ⊆ t

{M : Type u_1}
[AddMonoid M]
{s t : Set M}
(ht : IsAddSubmonoid t)
(h : s ⊆ t)


@[simp]
theorem cos_sq_add_sin_sq : cos x ^ 2 + sin x ^ 2 = 1


@[simp]
theorem Equivalence_mk'_unitInv (functor inverse unit_iso counit_iso f) :
    (⟨functor, inverse, unit_iso, counit_iso, f⟩ : C ≌ D).unitInv = unit_iso.inv

(unit_iso : CategoryTheory.Functor.id C ≅ functor.comp inverse)

(counit_iso : inverse.comp functor ≅ CategoryTheory.Functor.id D)

(f :
  ∀ (X : C),
    CategoryTheory.CategoryStruct.comp (functor.map (unit_iso.hom.app X)) (counit_iso.hom.app (functor.obj X)) =
      CategoryTheory.CategoryStruct.id (functor.obj X))

{ functor := functor, inverse := inverse, unitIso := unit_iso, counitIso := counit_iso,
      functor_unitIso_comp := f }.unitInv =
  unit_iso.inv


theorem span.loop_eq_take_drop :
    ∀ l₁ l₂ : List α, span.loop p l₁ l₂ = (l₂.reverse ++ takeWhile p l₁, dropWhile p l₁)

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

List.span.loop p l₁ l₂ = (l₂.reverse ++ List.takeWhile p l₁, List.dropWhile p l₁)


theorem pow_le_choose (r n : ℕ) : ((n + 1 - r : ℕ) ^ r : α) / r ! ≤ n.choose r

{α : Type u_1}
[LinearOrderedSemifield α]
(r n : ℕ)


@[to_additive (attr := simp) abs_zsmul_eq_zero]
lemma zpow_abs_eq_one (a : G) (n : ℤ) : a ^ |n| = 1 ↔ a ^ n = 1

{G : Type u_1}
[Group G]
(a : G)
(n : ℤ)


/-- Suppose `π i` is a family of topological spaces indexed by `i : ι`, and `X` is a type
endowed with a family of maps `f i : X → π i` for every `i : ι`, hence inducing a
map `g : X → Π i, π i`. This lemma shows that infimum of the topologies on `X` induced by
the `f i` as `i : ι` varies is simply the topology on `X` induced by `g : X → Π i, π i`
where `Π i, π i` is endowed with the usual product topology. -/
theorem inducing_iInf_to_pi {X : Type*} (f : ∀ i, X → π i) :
    @Inducing X (∀ i, π i) (⨅ i, induced (f i) inferInstance) _ fun x i => f i x

{ι : Type u_5}
{π : ι → Type u_6}
[T : (i : ι) → TopologicalSpace (π i)]
{X : Type u_8}
(f : (i : ι) → X → π i)


protected theorem eq (h : Semiconj₂ f ga gb) (x y : α) : f (ga x y) = gb (f x) (f y)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{ga : α → α → α}
{gb : β → β → β}
(h : Function.Semiconj₂ f ga gb)
(x y : α)


theorem getElem_eq_data_getElem (a : Array α) (h : i < a.size) : a[i] = a.data[i]

{α : Type u_1}
{i : Nat}
(a : Array α)
(h : i < a.size)


theorem coeFn_inf (f g : α →ₘ[μ] β) : ⇑(f ⊓ g) =ᵐ[μ] fun x => f x ⊓ g x

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


theorem SimpContFract.of_isContFract :
    (SimpContFract.of v).IsContFract

{K : Type u_1}
(v : K)
[LinearOrderedField K]
[FloorRing K]


@[simp]
theorem natSepDegree_X : (X : F[X]).natSepDegree = 1


theorem isLowerSet_iff_forall_lt : IsLowerSet s ↔ ∀ ⦃a b : α⦄, b < a → a ∈ s → b ∈ s

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


theorem eq (i) : s i = { x | hs.index x = i }

{ι : Type u_1}
{α : Type u_2}
{s : ι → Set α}
(hs : IndexedPartition s)
(i : ι)


/-- val_v(1) = 0. -/
theorem count_one : count K v (1 : FractionalIdeal R⁰ K) = 0

(v : IsDedekindDomain.HeightOneSpectrum R)


theorem coe_fn_injective : Injective fun (μ : OuterMeasure α) (s : Set α) => μ s


@[simp]
theorem realize_iSup (s : Finset β) (f : β → L.BoundedFormula α n)
    (v : α → M) (v' : Fin n → M) :
    (iSup s f).Realize v v' ↔ ∃ b ∈ s, (f b).Realize v v'

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{β : Type v'}
{n : ℕ}
(s : Finset β)
(f : β → L.BoundedFormula α n)
(v : α → M)
(v' : Fin n → M)

(FirstOrder.Language.BoundedFormula.iSup s f).Realize v v' ↔ ∃ b ∈ s, (f b).Realize v v'


@[simp]
theorem prodMap_id : (id : M →ₗ[R] M).prodMap (id : M₂ →ₗ[R] M₂) = id

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

LinearMap.id.prodMap LinearMap.id = LinearMap.id


@[simp]
theorem toFunAlgHom_apply (a : A) (m : Matrix n n R) :
    toFunAlgHom R A n (a ⊗ₜ m) = a • m.map (algebraMap R A)

(R : Type u)
[CommSemiring R]
(A : Type v)
[Semiring A]
[Algebra R A]
(n : Type w)
[DecidableEq n]
[Fintype n]
(a : A)
(m : Matrix n n R)

(MatrixEquivTensor.toFunAlgHom R A n) (a ⊗ₜ[R] m) = a • m.map ⇑(algebraMap R A)


@[local simp] theorem emod_self {a : Int} : a % a = 0


/-- A partial homeomorphism is continuous at any point of its source -/
protected theorem continuousAt {x : X} (h : x ∈ e.source) : ContinuousAt e x

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : X}
(h : x ∈ e.source)


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

{R : Type u}
⦃inst₁ inst₂ : NonAssocRing R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_mul : HMul.hMul = HMul.hMul)


lemma isUnramified_iff_stabilizer_eq_bot [IsGalois k K] : IsUnramified k w ↔ Stab w = ⊥

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
{w : NumberField.InfinitePlace K}
[IsGalois k K]

NumberField.InfinitePlace.IsUnramified k w ↔ MulAction.stabilizer (K ≃ₐ[k] K) w = ⊥


theorem sub_congr {w x y z : PGame} (h₁ : w ≈ x) (h₂ : y ≈ z) : w - y ≈ x - z

{w x y z : SetTheory.PGame}
(h₁ : w ≈ x)
(h₂ : y ≈ z)


theorem ascPochhammer_eval_comp {R : Type*} [CommSemiring R] (n : ℕ) (p : R[X]) [Algebra R S]
    (x : S) : ((ascPochhammer S n).comp (p.map (algebraMap R S))).eval x =
    (ascPochhammer S n).eval (p.eval₂ (algebraMap R S) x)

{S : Type u}
[Semiring S]
{R : Type u_1}
[CommSemiring R]
(n : ℕ)
(p : R[X])
[Algebra R S]
(x : S)

Polynomial.eval x ((ascPochhammer S n).comp (Polynomial.map (algebraMap R S) p)) =
  Polynomial.eval (Polynomial.eval₂ (algebraMap R S) x p) (ascPochhammer S n)


/-- Weaker version of the monotone convergence theorem-/
theorem lintegral_iSup_ae {f : ℕ → α → ℝ≥0∞} (hf : ∀ n, Measurable (f n))
    (h_mono : ∀ n, ∀ᵐ a ∂μ, f n a ≤ f n.succ a) : ∫⁻ a, ⨆ n, f n a ∂μ = ⨆ n, ∫⁻ a, f n a ∂μ

{f : ℕ → α → ℝ≥0∞}

(h_mono : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, f n a ≤ f n.succ a)

∫⁻ (a : α), ⨆ n, f n a ∂μ = ⨆ n, ∫⁻ (a : α), f n a ∂μ


@[simp]
theorem tensorDistribEquiv_apply (B : BilinForm R M₁ ⊗ BilinForm R M₂) :
    tensorDistribEquiv R (M₁ := M₁) (M₂ := M₂) B = tensorDistrib R R B

(B : LinearMap.BilinForm R M₁ ⊗[R] LinearMap.BilinForm R M₂)

(LinearMap.BilinMap.tensorDistribEquiv R) B = (LinearMap.BilinMap.tensorDistrib R R) B


theorem tendsto_normalize_testAgainstNN_of_tendsto {γ : Type*} {F : Filter γ}
    {μs : γ → FiniteMeasure Ω} (μs_lim : Tendsto μs F (𝓝 μ)) (nonzero : μ ≠ 0) (f : Ω →ᵇ ℝ≥0) :
    Tendsto (fun i => (μs i).normalize.toFiniteMeasure.testAgainstNN f) F
      (𝓝 (μ.normalize.toFiniteMeasure.testAgainstNN f))

{μs : γ → MeasureTheory.FiniteMeasure Ω}

(f : Ω →ᵇ ℝ≥0)

Filter.Tendsto (fun i => (μs i).normalize.toFiniteMeasure.testAgainstNN f) F
  (𝓝 (μ.normalize.toFiniteMeasure.testAgainstNN f))


theorem Indep.eq_of_basis (hI : M.Indep I) (hJ : M.Basis J I) : J = I

{α : Type u_1}
{M : Matroid α}
{I J : Set α}
(hI : M.Indep I)
(hJ : M.Basis J I)


@[simp]
theorem power_basis_int'_dim [hcycl : IsCyclotomicExtension {p} ℚ K] (hζ : IsPrimitiveRoot ζ p) :
    hζ.integralPowerBasis'.dim = φ p

{p : ℕ+}
{K : Type u}
[Field K]
[CharZero K]
{ζ : K}
[hp : Fact (Nat.Prime ↑p)]
[hcycl : IsCyclotomicExtension {p} ℚ K]
(hζ : IsPrimitiveRoot ζ ↑p)


/-- `val_v(I⁻ⁿ) = -val_v(Iⁿ)` for every `n ∈ ℤ`. -/
theorem count_neg_zpow (n : ℤ) (I : FractionalIdeal R⁰ K) :
    count K v (I ^ (-n)) = - count K v (I ^ n)

FractionalIdeal.count K v (I ^ (-n)) = -FractionalIdeal.count K v (I ^ n)


@[simp]
theorem eqToIso.hom {X Y : C} (p : X = Y) : (eqToIso p).hom = eqToHom p

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

(CategoryTheory.eqToIso p).hom = CategoryTheory.eqToHom p


/-- A function `f : α → ℚ → ℝ` is a (kernel) rational cumulative distribution function if it is
measurable in the first argument and if `f a` satisfies a list of properties for all `a : α`:
monotonicity between 0 at -∞ and 1 at +∞ and a form of continuity.

A function with these properties can be extended to a measurable function `α → StieltjesFunction`.
See `ProbabilityTheory.IsMeasurableRatCDF.stieltjesFunction`.
-/
structure IsMeasurableRatCDF (f : α → ℚ → ℝ) : Prop where
  isRatStieltjesPoint : ∀ a, IsRatStieltjesPoint f a
  measurable : Measurable f

{f : α → ℚ → ℝ}

(self : ProbabilityTheory.IsMeasurableRatCDF f)


theorem ext : {p q : Rat} → p.num = q.num → p.den = q.den → p = q


@[to_additive]
theorem restrict_restrict (h : IsFundamentalDomain G s μ) (g : G) (t : Set α) :
    (μ.restrict t).restrict (g • s) = μ.restrict (g • s ∩ t)

[MeasureTheory.SMulInvariantMeasure G α μ]

(h : MeasureTheory.IsFundamentalDomain G s μ)


@[simp] protected theorem Subtype.sizeOf {α : Sort u_1} {p : α → Prop} (s : Subtype p) : sizeOf s = sizeOf s.val + 1


protected theorem toFinset_union [DecidableEq α] (hs : s.Finite) (ht : t.Finite)
    (h : (s ∪ t).Finite) : h.toFinset = hs.toFinset ∪ ht.toFinset

{α : Type u}
{s t : Set α}
[DecidableEq α]
(hs : s.Finite)
(ht : t.Finite)
(h : (s ∪ t).Finite)


theorem interior_convexHull_nonempty_iff_affineSpan_eq_top [FiniteDimensional ℝ V] {s : Set V} :
    (interior (convexHull ℝ s)).Nonempty ↔ affineSpan ℝ s = ⊤

{V : Type u_1}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[FiniteDimensional ℝ V]
{s : Set V}

(interior ((convexHull ℝ) s)).Nonempty ↔ affineSpan ℝ s = ⊤


theorem span_union (s t : Set α) : span (s ∪ t) = span s ⊔ span t

Ideal.span (s ∪ t) = Ideal.span s ⊔ Ideal.span t


@[simp]
theorem _root_.Basis.toBasis_toOrthonormalBasis (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
    (v.toOrthonormalBasis hv).toBasis = v

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(v : Basis ι 𝕜 E)
(hv : Orthonormal 𝕜 ⇑v)


/-- Construct an isomorphism `H ≅ G.inverse ⋙ F` from an isomorphism `G.functor ⋙ H ≅ F`. -/
@[simps!]
def isoInverseComp {G : C ≌ D} (i : G.functor ⋙ H ≅ F) : H ≅ G.inverse ⋙ F

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{F : CategoryTheory.Functor C E}
{H : CategoryTheory.Functor D E}
{G : C ≌ D}
(i : G.functor.comp H ≅ F)
(X : D)

i.isoInverseComp.inv.app X =
  CategoryTheory.CategoryStruct.comp (i.inv.app (G.inverse.obj X)) (H.map (G.counitIso.hom.app X))