@[fun_prop]
theorem HasFDerivAt.continuousMultilinear_apply_const (hc : HasFDerivAt c c' x) (u : ∀ i, M i) :
    HasFDerivAt (fun y ↦ (c y) u) (c'.flipMultilinear u) x

{c : E → ContinuousMultilinearMap 𝕜 M H}

{c' : E →L[𝕜] ContinuousMultilinearMap 𝕜 M H}

HasFDerivAt (fun y => (c y) u) (c'.flipMultilinear u) x


theorem integral_apply {H : Type*} [NormedAddCommGroup H] [NormedSpace 𝕜 H] {φ : X → H →L[𝕜] E}
    (φ_int : Integrable φ μ) (v : H) : (∫ x, φ x ∂μ) v = ∫ x, φ x v ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedSpace ℝ E]
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{φ : X → H →L[𝕜] E}
(φ_int : MeasureTheory.Integrable φ μ)
(v : H)

(∫ (x : X), φ x ∂μ) v = ∫ (x : X), (φ x) v ∂μ


theorem ext {f g : α →. β} (H : ∀ a b, b ∈ f a ↔ b ∈ g a) : f = g

(H : ∀ (a : α) (b : β), b ∈ f a ↔ b ∈ g a)


theorem iterateFrobeniusEquiv_symm_add_apply (x : R) : (iterateFrobeniusEquiv R p (m + n)).symm x =
    (iterateFrobeniusEquiv R p m).symm ((iterateFrobeniusEquiv R p n).symm x)

(R : Type u_1)
(p m n : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]
(x : R)


@[simp]
theorem coe_top : (↑(⊤ : Subalgebra R A) : Set A) = Set.univ

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


@[simp]
theorem comp_apply (f : TopHom β γ) (g : TopHom α β) (a : α) : (f.comp g) a = f (g a)

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


theorem initial_of_final_op (F : C ⥤ D) [Final F.op] : Initial F

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


theorem eq_zero_of_forall_dual_eq_zero {x : E} (h : ∀ f : Dual 𝕜 E, f x = (0 : 𝕜)) : x = 0

(h : ∀ (f : NormedSpace.Dual 𝕜 E), f x = 0)


/-- The Yoneda embedding for `R`-linear categories `C`,
sending an object `Y : Cᵒᵖ` to the `Module R`-valued copresheaf on `C`,
with value on `X : C` given by `Module.of R (unop Y ⟶ X)`. -/
@[simps]
def linearCoyoneda : Cᵒᵖ ⥤ C ⥤ ModuleCat R

(R : Type w)
[Ring R]
(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]
(Y : Cᵒᵖ)

∀ {X Y_1 : C} (f : X ⟶ Y_1),
  ((CategoryTheory.linearCoyoneda R C).obj Y).map f =
    ModuleCat.ofHom (CategoryTheory.Linear.rightComp R (Opposite.unop Y) f)


/-- For `x ≤ 0` the defining sum diverges, so the kernel is 0. -/
lemma evenKernel_undef (a : UnitAddCircle) {x : ℝ} (hx : x ≤ 0) : evenKernel a x = 0


theorem image_coe_Iic : (some : α → WithBot α) '' Iic a = Ioc (⊥ : WithBot α) a

WithBot.some '' Set.Iic a = Set.Ioc ⊥ ↑a


/-- The unique isomorphism `X ≅ Y` which induces an isomorphism `F.obj X ≅ F.obj Y`
when `hF : F.FullyFaithful`. -/
@[simps]
def preimageIso {X Y : C} (e : F.obj X ≅ F.obj Y) : X ≅ Y

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
(hF : F.FullyFaithful)
{X Y : C}
(e : F.obj X ≅ F.obj Y)

(hF.preimageIso e).inv = hF.preimage e.inv


/-- A `HomologicalComplex V c` with a "shape" controlled by `c : ComplexShape ι`
has chain groups `X i` (objects in `V`) indexed by `i : ι`,
and a differential `d i j` whenever `c.Rel i j`.

We in fact ask for differentials `d i j` for all `i j : ι`,
but have a field `shape` requiring that these are zero when not allowed by `c`.
This avoids a lot of dependent type theory hell!

The composite of any two differentials `d i j ≫ d j k` must be zero.
-/
structure HomologicalComplex (c : ComplexShape ι) where
  X : ι → V
  d : ∀ i j, X i ⟶ X j
  shape : ∀ i j, ¬c.Rel i j → d i j = 0 := by aesop_cat
  d_comp_d' : ∀ i j k, c.Rel i j → c.Rel j k → d i j ≫ d j k = 0 := by aesop_cat


theorem integrableOn_Ioi_cpow_iff {s : ℂ} {t : ℝ} (ht : 0 < t) :
    IntegrableOn (fun x : ℝ ↦ (x : ℂ) ^ s) (Ioi t) ↔ s.re < -1

MeasureTheory.IntegrableOn (fun x => ↑x ^ s) (Set.Ioi t) MeasureTheory.volume ↔ s.re < -1


theorem NeBot.of_map₂_right (h : (map₂ m f g).NeBot) : g.NeBot

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f : Filter α}
{g : Filter β}
(h : (Filter.map₂ m f g).NeBot)


/-- A seminorm on a group `G` is a function `f : G → ℝ` that sends one to zero, is submultiplicative
and such that `f x⁻¹ = f x` and `f x = 0 → x = 1` for all `x`. -/
@[to_additive]
structure GroupNorm (G : Type*) [Group G] extends GroupSeminorm G where
  /-- If the image under the norm is zero, then the argument is one. -/
  protected eq_one_of_map_eq_zero' : ∀ x, toFun x = 0 → x = 1

{G : Type u_7}
[Group G]
(self : GroupNorm G)
(x : G)


theorem count_edges_takeUntil_le_one {u v w : V} (p : G.Walk v w) (h : u ∈ p.support) (x : V) :
    (p.takeUntil u h).edges.count s(u, x) ≤ 1

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w : V}
(p : G.Walk v w)
(h : u ∈ p.support)
(x : V)

List.count s(u, x) (p.takeUntil u h).edges ≤ 1


/-- A map `f : X → Y` is closed if and only if for all sets `s`, any cluster point of `f '' s` is
the image by `f` of some cluster point of `s`.
If you require this for all filters instead of just principal filters, and also that `f` is
continuous, you get the notion of **proper map**. See `isProperMap_iff_clusterPt`. -/
theorem isClosedMap_iff_clusterPt :
    IsClosedMap f ↔ ∀ s y, MapClusterPt y (𝓟 s) f → ∃ x, f x = y ∧ ClusterPt x (𝓟 s)

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]

IsClosedMap f ↔ ∀ (s : Set X) (y : Y), MapClusterPt y (𝓟 s) f → ∃ x, f x = y ∧ ClusterPt x (𝓟 s)


lemma pointwise_isCentralScalar [DistribMulAction αᵐᵒᵖ A] [IsCentralScalar α A] :
    IsCentralScalar α (AddSubmonoid A)

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Monoid α]
[DistribMulAction α A]
[DistribMulAction αᵐᵒᵖ A]
[IsCentralScalar α A]


theorem Ioo_subset_Ioc_self : Ioo a b ⊆ Ioc a b


/-- `Real.sinh` as a `Homeomorph`. -/
@[simps! (config := .asFn)]
def sinhHomeomorph : ℝ ≃ₜ ℝ


/-- The skew-adjoint part of an element of a star module, as a continuous linear map. -/
@[simps!]
def skewAdjointPartL [ContinuousSub A] [ContinuousStar A] [ContinuousConstSMul R A] :
    A →L[R] skewAdjoint A

(R : Type u_1)
(A : Type u_2)
[Semiring R]
[StarMul R]
[TrivialStar R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid A]
[StarModule R A]
[Invertible 2]
[TopologicalSpace A]
[ContinuousSub A]
[ContinuousStar A]
[ContinuousConstSMul R A]
(x : A)

↑((skewAdjointPartL R A) x) = ⅟2 • (x - star x)


theorem tangentMap_comp_at (p : TangentBundle I M) (hg : MDifferentiableAt I' I'' g (f p.1))
    (hf : MDifferentiableAt I I' f p.1) :
    tangentMap I I'' (g ∘ f) p = tangentMap I' I'' g (tangentMap I I' f p)

[I''s : SmoothManifoldWithCorners I'' M'']

(hg : MDifferentiableAt I' I'' g (f p.proj))


theorem inducedMap_rat (q : ℚ) : inducedMap α β (q : α) = q

LinearOrderedField.inducedMap α β ↑q = ↑q


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


/-- `-1` is a square in `F` iff `#F` is not congruent to `3` mod `4`. -/
theorem FiniteField.isSquare_neg_one_iff : IsSquare (-1 : F) ↔ Fintype.card F % 4 ≠ 3


@[simp]
theorem inv_right [IsIso sq] : (inv sq).right = inv sq.right

{T : Type u}
[CategoryTheory.Category.{v, u} T]
{f g : CategoryTheory.Arrow T}
(sq : f ⟶ g)
[CategoryTheory.IsIso sq]

(CategoryTheory.inv sq).right = CategoryTheory.inv sq.right


theorem IsMinOn.iInf_eq (hx₀ : x₀ ∈ s) (h : IsMinOn f s x₀) : ⨅ x : s, f x = f x₀

{α : Type u}
{β : Type v}
[ConditionallyCompleteLinearOrder α]
{f : β → α}
{s : Set β}
{x₀ : β}
(hx₀ : x₀ ∈ s)
(h : IsMinOn f s x₀)


theorem head_eq_of_cons_eq (H : h₁ :: t₁ = h₂ :: t₂) : h₁ = h₂

∀ {α : Type u_1} {h₁ : α} {t₁ : List α} {h₂ : α} {t₂ : List α}, h₁ :: t₁ = h₂ :: t₂ → h₁ = h₂


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

{α : Type u_2}
{β : Type u_3}
[Bot α]
[SemilatticeSup β]
[OrderBot β]
(f g : BotHom α β)
(a : α)


@[reassoc]
theorem prod.symmetry' (P Q : C) [HasBinaryProduct P Q] [HasBinaryProduct Q P] :
    prod.lift prod.snd prod.fst ≫ prod.lift prod.snd prod.fst = 𝟙 (P ⨯ Q)

CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst ≫
    CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst =
  𝟙 (P ⨯ Q)


theorem countable_univ [Countable α] : (univ : Set α).Countable


/-- The isomorphism between a cone on `F` and an element of the functor `F.cones`. -/
@[simps!]
def equiv (F : J ⥤ C) : Cone F ≅ ΣX, F.cones.obj X

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

((CategoryTheory.Limits.Cone.equiv F).hom c).fst = Opposite.op c.pt


@[to_additive (attr := simp) AddMonoid.exp_eq_one_of_subsingleton]
theorem exp_eq_one_of_subsingleton [hs : Subsingleton G] : exponent G = 1

{G : Type u}
[Monoid G]
[hs : Subsingleton G]


@[simp]
theorem coe_inclusion (x : K) : (inclusion h x : L) = x

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{K K' : LieSubalgebra R L}
(h : K ≤ K')
(x : ↥K)


lemma of_arrow {F : Cᵒᵖ ⥤ Type v} {η : F ⟶ A} {X : C} {s : yoneda.obj X ⟶ A}
    {f : yoneda.obj X ⟶ F} (hf : f ≫ η = s) : MakesOverArrow η s (yonedaEquiv f)

{A F : CategoryTheory.Functor Cᵒᵖ (Type v)}

(hf : CategoryTheory.CategoryStruct.comp f η = s)

CategoryTheory.OverPresheafAux.MakesOverArrow η s (CategoryTheory.yonedaEquiv f)


theorem not_isSuccLimit_iff : ¬IsSuccLimit a ↔ ∃ b, ¬IsMax b ∧ succ b = a

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a : α}

¬Order.IsSuccLimit a ↔ ∃ b, ¬IsMax b ∧ Order.succ b = a


@[simp]
protected theorem ContinuousLinearMap.deriv : deriv e x = e 1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
(e : 𝕜 →L[𝕜] F)


@[to_additive]
nonrec theorem SmoothOn.div {f g : M → G} {s : Set M} (hf : SmoothOn I' I f s)
    (hg : SmoothOn I' I g s) : SmoothOn I' I (f / g) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[Group G]
[LieGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{f g : M → G}
{s : Set M}
(hf : SmoothOn I' I f s)
(hg : SmoothOn I' I g s)


@[simp]
theorem prodComm_symm : (prodComm α β).symm = prodComm β α

(α : Type u)
(β : Type u_1)
[UniformSpace α]
[UniformSpace β]

(UniformEquiv.prodComm α β).symm = UniformEquiv.prodComm β α


/-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Over X`, it suffices to
    provide maps `F.obj Y ⟶ X` for all `Y` making the obvious triangles involving all `F.map g`
    commute. -/
@[simps! obj_left map_left]
def toOver (F : S ⥤ T) (X : T) (f : (Y : S) → F.obj Y ⟶ X)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), F.map g ≫ f Z = f Y) : S ⥤ Over X

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


@[simp, norm_cast]
theorem ofReal_mul (r s : ℝ) : ((r * s : ℝ) : ℂ) = r * s


@[simp, mfld_simps]
theorem coe_fst (ex : x ∈ e.source) : (e x).1 = proj x

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


theorem map_iSup (hf : LeftOrdContinuous f) (g : ι → α) : f (⨆ i, g i) = ⨆ i, f (g i)

{α : Type u}
{β : Type v}
{ι : Sort x}
[CompleteLattice α]
[CompleteLattice β]
{f : α → β}
(hf : LeftOrdContinuous f)
(g : ι → α)


theorem total_total {α β : Type*} (A : α → M) (B : β → α →₀ R) (f : β →₀ R) :
    Finsupp.total α M R A (Finsupp.total β (α →₀ R) R B f) =
      Finsupp.total β M R (fun b => Finsupp.total α M R A (B b)) f

{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_9}
{β : Type u_10}
(A : α → M)
(B : β → α →₀ R)
(f : β →₀ R)

(Finsupp.total α M R A) ((Finsupp.total β (α →₀ R) R B) f) =
  (Finsupp.total β M R fun b => (Finsupp.total α M R A) (B b)) f


lemma Colorable.chromaticNumber_eq_sInf {G : SimpleGraph V} {n} (h : G.Colorable n) :
    G.chromaticNumber = sInf {n' : ℕ | G.Colorable n'}

{V : Type u}
{G : SimpleGraph V}
{n : ℕ}
(h : G.Colorable n)

G.chromaticNumber = ↑(sInf {n' | G.Colorable n'})


theorem zeroLocus_vanishingIdeal_eq_closure (t : Set (ProjectiveSpectrum 𝒜)) :
    zeroLocus 𝒜 (vanishingIdeal t : Set A) = closure t

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(t : Set (ProjectiveSpectrum 𝒜))

ProjectiveSpectrum.zeroLocus 𝒜 ↑(ProjectiveSpectrum.vanishingIdeal t) = closure t


protected theorem add_lt_add_right {n m : Nat} (h : n < m) (k : Nat) : n + k < m + k


theorem units_div_eq_mul (u₁ u₂ : ℤˣ) : u₁ / u₂ = u₁ * u₂


theorem unbounded_ge_inter_gt [LinearOrder α] (a : α) :
    Unbounded (· ≥ ·) (s ∩ { b | b < a }) ↔ Unbounded (· ≥ ·) s

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

Set.Unbounded (fun x x_1 => x ≥ x_1) (s ∩ {b | b < a}) ↔ Set.Unbounded (fun x x_1 => x ≥ x_1) s


@[simp, mfld_simps]
theorem mk_coe (e : PartialEquiv H E) (a b c d) :
    ((ModelWithCorners.mk e a b c d : ModelWithCorners 𝕜 E H) : H → E) = (e : H → E)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(e : PartialEquiv H E)
(a : e.source = Set.univ)
(b : UniqueDiffOn 𝕜 e.target)
(c : Continuous ↑e)
(d : Continuous e.invFun)

↑{ toPartialEquiv := e, source_eq := a, unique_diff' := b, continuous_toFun := c, continuous_invFun := d } = ↑e


/-- The basic open sets for the topology on ultrafilters are also closed. -/
theorem ultrafilter_isClosed_basic (s : Set α) : IsClosed { u : Ultrafilter α | s ∈ u }


theorem cardinal_mk_algHom_le_rank : #(M →ₐ[K] L) ≤ lift.{v} (Module.rank K M)

(K : Type u_1)
(M : Type u_2)
(L : Type v)
[CommRing K]
[Ring M]
[Algebra K M]
[Module.Free K M]
[Module.Finite K M]
[CommRing L]
[IsDomain L]
[Algebra K L]

Cardinal.mk (M →ₐ[K] L) ≤ Cardinal.lift.{v, u_2} (Module.rank K M)


theorem _root_.InitialSeg.ordinal_type_le {α β} {r : α → α → Prop} {s : β → β → Prop}
    [IsWellOrder α r] [IsWellOrder β s] (h : r ≼i s) : type r ≤ type s

{α β : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]
(h : r ≼i s)


@[simp, norm_cast]
theorem one_lt_cast : 1 < (n : α) ↔ 1 < n

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


lemma charpoly_map (M : Matrix n n R) (f : R →+* S) :
    (M.map f).charpoly = M.charpoly.map f

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
{n : Type u_4}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)
(f : R →+* S)

(M.map ⇑f).charpoly = Polynomial.map f M.charpoly


@[to_additive (attr := simp)]
theorem mulRothNumber_map_mul_left :
    mulRothNumber (s.map <| mulLeftEmbedding a) = mulRothNumber s

{α : Type u_2}
[DecidableEq α]
[AddCancelCommMonoid α]
(s : Finset α)
(a : α)

addRothNumber (Finset.map (addLeftEmbedding a) s) = addRothNumber s


theorem destruct_join (S : WSeq (WSeq α)) :
    destruct (join S) = (destruct S).bind destruct_join.aux

{α : Type u}
(S : Stream'.WSeq (Stream'.WSeq α))

S.join.destruct = S.destruct.bind Stream'.WSeq.destruct_join.aux


@[simp]
theorem zero_apply (x : M) : (0 : M →ₛₗ[σ₁₂] M₂) x = 0

{R₁ : Type u_2}
{R₂ : Type u_3}
{M : Type u_9}
{M₂ : Type u_11}
[Semiring R₁]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R₁ M]
[Module R₂ M₂]
{σ₁₂ : R₁ →+* R₂}
(x : M)


@[simp]
theorem sq_sqrt (h : 0 ≤ x) : √x ^ 2 = x


/-- If `f : G → H` is an additive homomorphism between two additive monoids, then
`Finsupp.mapDomain f` is an algebra homomorphism between their add monoid algebras. -/
@[simps!]
def mapDomainAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A] [AddMonoid G]
    {H F : Type*} [AddMonoid H] [FunLike F G H] [AddMonoidHomClass F G H] (f : F) :
    A[G] →ₐ[k] A[H]

{G : Type u₂}
(k : Type u_3)
(A : Type u_4)
[CommSemiring k]
[Semiring A]
[Algebra k A]
[AddMonoid G]
{H : Type u_5}
{F : Type u_6}
[AddMonoid H]
[FunLike F G H]
[AddMonoidHomClass F G H]
(f : F)

∀ (a : G →₀ A), (AddMonoidAlgebra.mapDomainAlgHom k A f) a = Finsupp.mapDomain (⇑f) a


@[simp] lemma lift'_coe (f : α →* β) (x : α) : lift' f (x : WithZero α) = f x

{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulZeroOneClass β]
(f : α →* β)
(x : α)


@[to_additive (attr := simp)]
theorem coe_bot : ((⊥ : Submonoid M) : Set M) = {1}


theorem TendstoInMeasure.exists_seq_tendstoInMeasure_atTop {u : Filter ι} [NeBot u]
    [IsCountablyGenerated u] {f : ι → α → E} {g : α → E} (hfg : TendstoInMeasure μ f u g) :
    ∃ ns : ℕ → ι, TendstoInMeasure μ (fun n => f (ns n)) atTop g

(hfg : MeasureTheory.TendstoInMeasure μ f u g)

∃ ns, MeasureTheory.TendstoInMeasure μ (fun n => f (ns n)) Filter.atTop g


theorem IsMaximal.coprime_of_ne {M M' : Ideal α} (hM : M.IsMaximal) (hM' : M'.IsMaximal)
    (hne : M ≠ M') : M ⊔ M' = ⊤

{α : Type u}
[Semiring α]
{M M' : Ideal α}
(hM : M.IsMaximal)
(hM' : M'.IsMaximal)
(hne : M ≠ M')


@[simp] lemma ofENat_pos {m : ℕ∞} : 0 < (m : Cardinal) ↔ 0 < m


lemma setIntegral_condKernel {s : Set β} (hs : MeasurableSet s)
    {t : Set Ω} (ht : MeasurableSet t) (hf : IntegrableOn f (s ×ˢ t) ρ) :
    ∫ b in s, ∫ ω in t, f (b, ω) ∂(ρ.condKernel b) ∂ρ.fst = ∫ x in s ×ˢ t, f x ∂ρ

(hf : MeasureTheory.IntegrableOn f (s ×ˢ t) ρ)

∫ (b : β) in s, ∫ (ω : Ω) in t, f (b, ω) ∂ρ.condKernel b ∂ρ.fst = ∫ (x : β × Ω) in s ×ˢ t, f x ∂ρ


@[simp]
lemma rightUnitor_hom_app (F : J ⥤ C) (j : J) :
    (ρ_ F).hom.app j = (ρ_ (F.obj j)).hom

{J : Type u_1}
{C : Type u_2}
[CategoryTheory.Category.{u_3, u_1} J]
[CategoryTheory.Category.{u_4, u_2} C]
[CategoryTheory.ChosenFiniteProducts C]
(F : CategoryTheory.Functor J C)
(j : J)

(CategoryTheory.MonoidalCategory.rightUnitor F).hom.app j = (CategoryTheory.MonoidalCategory.rightUnitor (F.obj j)).hom


theorem copy_eq (f : α →ₙ+* β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_2}
{β : Type u_3}
[NonUnitalNonAssocSemiring α]
[NonUnitalNonAssocSemiring β]
(f : α →ₙ+* β)
(f' : α → β)
(h : f' = ⇑f)


theorem trim_trim {m₁ m₂ : MeasurableSpace α} {hm₁₂ : m₁ ≤ m₂} {hm₂ : m₂ ≤ m0} :
    (μ.trim hm₂).trim hm₁₂ = μ.trim (hm₁₂.trans hm₂)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{m₁ m₂ : MeasurableSpace α}
{hm₁₂ : m₁ ≤ m₂}
{hm₂ : m₂ ≤ m0}


theorem compl_image_set_of {p : Set α → Prop} : compl '' { s | p s } = { s | p sᶜ }


/-- The identity of a commutative square. -/
@[simps]
def id (sq : Square C) : Hom sq sq

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

(CategoryTheory.Square.Hom.id sq).τ₃ = CategoryTheory.CategoryStruct.id sq.X₃


@[simp] lemma supClosed_singleton : SupClosed ({a} : Set α)

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


@[simp]
theorem image_add_const_Icc : (fun x => x + a) '' Icc b c = Icc (b + a) (c + a)

{M : Type u_1}
[OrderedCancelAddCommMonoid M]
[ExistsAddOfLE M]
(a b c : M)

(fun x => x + a) '' Set.Icc b c = Set.Icc (b + a) (c + a)


@[simp]
theorem Dart.symm_mk {p : V × V} (h : G.Adj p.1 p.2) : (Dart.mk p h).symm = Dart.mk p.swap h.symm

{V : Type u_1}
{G : SimpleGraph V}
{p : V × V}
(h : G.Adj p.1 p.2)

{ toProd := p, adj := h }.symm = { toProd := p.swap, adj := ⋯ }


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

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

(Fintype.piFinset fun i => a i +ᵥ s i) = a +ᵥ Fintype.piFinset s


theorem nhdsSet_Iic : 𝓝ˢ (Iic a) = 𝓝 a ⊔ 𝓟 (Iio a)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a : α}


theorem cramer_transpose_apply (i : n) : cramer Aᵀ b i = (A.updateRow i b).det

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)
(b : n → α)
(i : n)

A.transpose.cramer b i = (A.updateRow i b).det


@[simp]
theorem integral_zero : integral (0 : α →₁[μ] E) = 0

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


@[to_additive (attr := simp, to_additive) (reorder := 1 2, 4 5) toLex_smul']
theorem pow_toLex [Pow α β] (a : α) (b : β) : a ^ toLex b = a ^ b

{β : Type u_2}
{α : Type u_1}
[SMul β α]
(b : β)
(a : α)


/-- A cone on `F` with cone point `X` is the same as an element of `lim Hom(X, F·)`. -/
@[simps!]
noncomputable def limitCompCoyonedaIsoCone (F : J ⥤ C) (X : C) :
    limit (F ⋙ coyoneda.obj (op X)) ≅ ((const J).obj X ⟶ F)

{J : Type v}
[CategoryTheory.SmallCategory J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : J ⥤ C)
(X : C)

∀ (a : CategoryTheory.Limits.limit (F ⋙ CategoryTheory.coyoneda.obj (Opposite.op X))) (j : J),
  ((CategoryTheory.Limits.limitCompCoyonedaIsoCone F X).hom a).app j =
    CategoryTheory.Limits.limit.π (F ⋙ CategoryTheory.coyoneda.obj (Opposite.op X)) j a


lemma W_of_isIso {X Y : C} (f : X ⟶ Y) [IsIso f] : S.W f

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

(S : CategoryTheory.Triangulated.Subcategory C)


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

(adj : CategoryTheory.Bicategory.Adjunction f g)


lemma isUnit_dblZ_of_Y_ne' {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q) (hPz : P z ≠ 0)
    (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ W.negY Q * P z ^ 3) :
    IsUnit (W.dblZ P)


protected theorem OpenEmbedding.prod {f : X → Y} {g : Z → W} (hf : OpenEmbedding f)
    (hg : OpenEmbedding g) : OpenEmbedding fun x : X × Z => (f x.1, g x.2)

{X : Type u}
{Y : Type v}
{Z : Type u_1}
{W : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[TopologicalSpace W]
{f : X → Y}
{g : Z → W}
(hf : OpenEmbedding f)
(hg : OpenEmbedding g)


@[simp]
theorem differentiableWithinAt_pi :
    DifferentiableWithinAt 𝕜 Φ s x ↔ ∀ i, DifferentiableWithinAt 𝕜 (fun x => Φ x i) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
{Φ : E → (i : ι) → F' i}

DifferentiableWithinAt 𝕜 Φ s x ↔ ∀ (i : ι), DifferentiableWithinAt 𝕜 (fun x => Φ x i) s x


@[simp]
theorem tmulEquiv_apply (a : ι → M) (b : ι₂ → M) :
    tmulEquiv (ι := ι) (ι₂ := ι₂) R M ((⨂ₜ[R] i, a i) ⊗ₜ[R] ⨂ₜ[R] i, b i) =
    ⨂ₜ[R] i, Sum.elim a b i

{ι : Type u_1}
{ι₂ : Type u_2}
(R : Type u_4)
[CommSemiring R]
(M : Type u_8)
[AddCommMonoid M]
[Module R M]
(a : ι → M)
(b : ι₂ → M)

(PiTensorProduct.tmulEquiv R M)
    (((PiTensorProduct.tprod R) fun i => a i) ⊗ₜ[R] (PiTensorProduct.tprod R) fun i => b i) =
  (PiTensorProduct.tprod R) fun i => Sum.elim a b i


lemma isLocallyInjective_iff_injective_of_separated
    (hsep : Presieve.IsSeparated J (F₁ ⋙ forget D)) :
    IsLocallyInjective J φ ↔ ∀ (X : Cᵒᵖ), Function.Injective (φ.app X)

(J : CategoryTheory.GrothendieckTopology C)

(hsep : CategoryTheory.Presieve.IsSeparated J (F₁.comp (CategoryTheory.forget D)))

CategoryTheory.Presheaf.IsLocallyInjective J φ ↔ ∀ (X : Cᵒᵖ), Function.Injective ⇑(φ.app X)


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


theorem card_lt_card {s t : Multiset α} (h : s < t) : card s < card t

{α : Type u_1}
{s t : Multiset α}
(h : s < t)


@[to_additive Icc_add_Ico_subset]
theorem Icc_mul_Ico_subset' [LocallyFiniteOrder α] (a b c d : α) :
    Icc a b * Ico c d ⊆ Ico (a * c) (b * d)

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

[CovariantClass α α (Function.swap HMul.hMul) LT.lt]

Finset.Icc a b * Finset.Ico c d ⊆ Finset.Ico (a * c) (b * d)


theorem normalize_eq_normalize {a b : α} (hab : a ∣ b) (hba : b ∣ a) :
    normalize a = normalize b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
{a b : α}
(hab : a ∣ b)
(hba : b ∣ a)


theorem quotientEquivOfEq_mk (h : s = t) (a : α) :
    quotientEquivOfEq h (QuotientGroup.mk a) = QuotientGroup.mk a

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


/-- Taking sub-families preserves uniform equicontinuity on a subset. -/
theorem UniformEquicontinuousOn.comp {F : ι → β → α} {S : Set β} (h : UniformEquicontinuousOn F S)
    (u : κ → ι) : UniformEquicontinuousOn (F ∘ u) S

{ι : Type u_1}
{κ : Type u_2}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
{F : ι → β → α}
{S : Set β}
(h : UniformEquicontinuousOn F S)
(u : κ → ι)


@[simp]
theorem infIrred_iff_not_isMax : InfIrred a ↔ ¬IsMax a


theorem HasDerivWithinAt.csinh (hf : HasDerivWithinAt f f' s x) :
    HasDerivWithinAt (fun x => Complex.sinh (f x)) (Complex.cosh (f x) * f') s x

{f : ℂ → ℂ}
{f' x : ℂ}
{s : Set ℂ}
(hf : HasDerivWithinAt f f' s x)


theorem complete : ∀ s : CauSeq β abv, ∃ b : β, s ≈ const abv b

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
[CauSeq.IsComplete β abv]
(s : CauSeq β abv)


/-- Updating the last element of a tuple does not change the beginning. -/
@[simp]
theorem init_update_last : init (update q (last n) z) = init q

{n : ℕ}
{α : Fin (n + 1) → Type u}
(q : (i : Fin (n + 1)) → α i)
(z : α (Fin.last n))

Fin.init (Function.update q (Fin.last n) z) = Fin.init q


theorem Associated.mul_mul [CommMonoid α] {a₁ a₂ b₁ b₂ : α}
    (h₁ : a₁ ~ᵤ b₁) (h₂ : a₂ ~ᵤ b₂) : a₁ * a₂ ~ᵤ b₁ * b₂

{α : Type u_1}
[CommMonoid α]
{a₁ a₂ b₁ b₂ : α}
(h₁ : a₁ ~ᵤ b₁)
(h₂ : a₂ ~ᵤ b₂)


@[simp]
theorem sup_add_nat (o : Ordinal) : (sup fun n : ℕ => o + n) = o + ω


/-- A finite set is bounded above. -/
protected theorem Finite.bddAbove (hs : s.Finite) : BddAbove s

{α : Type u}
[Preorder α]
[IsDirected α fun x x_1 => x ≤ x_1]
[Nonempty α]
{s : Set α}
(hs : s.Finite)


@[simp]
theorem mk'_num_den' (x : K) : algebraMap A K (num A x) / algebraMap A K (den A x) = x

(A : Type u_4)
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
{K : Type u_5}
[Field K]
[Algebra A K]
[IsFractionRing A K]
(x : K)

(algebraMap A K) (IsFractionRing.num A x) / (algebraMap A K) ↑(IsFractionRing.den A x) = x


theorem isPrime_carrier : Ideal.IsPrime (carrier x)

(x : ↑((AlgebraicGeometry.Proj.toLocallyRingedSpace 𝒜).restrict ⋯).toTopCat)


theorem rel_of_pairwise_cons (p : (a :: l).Pairwise R) : ∀ {a'}, a' ∈ l → R a a'

∀ {α : Type u_1} {a : α} {l : List α} {R : α → α → Prop}, List.Pairwise R (a :: l) → ∀ {a' : α}, a' ∈ l → R a a'


lemma sup'_apply {ι : Type*} {s : Finset ι} (H : s.Nonempty) (f : ι → C(α, β)) (a : α) :
    s.sup' H f a = s.sup' H fun i ↦ f i a

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[SemilatticeSup β]
[ContinuousSup β]
{ι : Type u_4}
{s : Finset ι}
(H : s.Nonempty)
(f : ι → C(α, β))
(a : α)

(s.sup' H f) a = s.sup' H fun i => (f i) a


theorem forall_mem_dualAnnihilator_apply_eq_zero_iff (W : Subspace K V) (v : V) :
    (∀ φ : Module.Dual K V, φ ∈ W.dualAnnihilator → φ v = 0) ↔ v ∈ W

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

(∀ φ ∈ Submodule.dualAnnihilator W, φ v = 0) ↔ v ∈ W


/-- Given `AddCommMonoid M` and `e : α ≃ β`, `domCongr e` is the corresponding `Equiv` between
`α →₀ M` and `β →₀ M`.

This is `Finsupp.equivCongrLeft` as an `AddEquiv`. -/
@[simps apply]
protected def domCongr [AddCommMonoid M] (e : α ≃ β) : (α →₀ M) ≃+ (β →₀ M)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(e : α ≃ β)
(l : α →₀ M)

(Finsupp.domCongr e) l = Finsupp.equivMapDomain e l


/-- For any function `f` from a normed vector space to a normed vector space, the set of points
`x` such that `f` is continuously polynomial at `x` is open. -/
theorem isOpen_cPolynomialAt : IsOpen { x | CPolynomialAt 𝕜 f x }

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


theorem Ioc_mem_nhdsWithin_Ici (H : b ∈ Ioo a c) : Ioc a c ∈ 𝓝[≥] b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a b c : α}
(H : b ∈ Set.Ioo a c)


theorem completedZeta_eq_tsum_of_one_lt_re {s : ℂ} (hs : 1 < re s) :
    completedRiemannZeta s =
      (π : ℂ) ^ (-s / 2) * Gamma (s / 2) * ∑' n : ℕ, 1 / (n : ℂ) ^ s

completedRiemannZeta s = ↑π ^ (-s / 2) * Complex.Gamma (s / 2) * ∑' (n : ℕ), 1 / ↑n ^ s


theorem Continuous.limUnder_eq [TopologicalSpace Y] {f : Y → X} (h : Continuous f) (y : Y) :
    @limUnder _ _ _ ⟨f y⟩ (𝓝 y) f = f y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T2Space X]
[TopologicalSpace Y]
{f : Y → X}
(h : Continuous f)
(y : Y)


@[simp]
theorem monomial_zero' : (monomial (0 : σ →₀ ℕ) : R → MvPolynomial σ R) = C

{R : Type u}
{σ : Type u_1}
[CommSemiring R]

⇑(MvPolynomial.monomial 0) = ⇑MvPolynomial.C


@[to_additive (attr := simp)]
theorem toWord_eq_nil_iff {x : FreeGroup α} : x.toWord = [] ↔ x = 1

{α : Type u}
[DecidableEq α]
{x : FreeAddGroup α}


@[simp]
lemma negOnePow_two_mul (n : ℤ) : (2 * n).negOnePow = 1


@[to_additive]
lemma BddAbove.range_mul {α : Type*} {f g : α → M} (hf : BddAbove (range f))
    (hg : BddAbove (range g)) : BddAbove (range (fun x => f x * g x))

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

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


theorem Metric.inseparable_iff {x y : α} : Inseparable x y ↔ dist x y = 0

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


theorem memℒp_of_memℒp_trim (hm : m ≤ m0) {f : α → E} (hf : Memℒp f p (μ.trim hm)) : Memℒp f p μ

(hf : MeasureTheory.Memℒp f p (μ.trim hm))


/-- A continuous function from an `OpensMeasurableSpace` to a `BorelSpace`
is measurable. -/
@[fun_prop]
theorem Continuous.measurable {f : α → γ} (hf : Continuous f) : Measurable f

{α : Type u_1}
{γ : Type u_3}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[TopologicalSpace γ]
[MeasurableSpace γ]
[BorelSpace γ]
{f : α → γ}
(hf : Continuous f)


private theorem eLpNorm'_sum_norm_sub_le_tsum_of_cauchy_eLpNorm' {f : ℕ → α → E}
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) {p : ℝ} (hp1 : 1 ≤ p) {B : ℕ → ℝ≥0∞}
    (h_cau : ∀ N n m : ℕ, N ≤ n → N ≤ m → eLpNorm' (f n - f m) p μ < B N) (n : ℕ) :
    eLpNorm' (fun x => ∑ i ∈ Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' i, B i

(hf : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (f n) μ)

{B : ℕ → ℝ≥0∞}

(h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → MeasureTheory.eLpNorm' (f n - f m) p μ < B N)

MeasureTheory.eLpNorm' (fun x => ∑ i ∈ Finset.range (n + 1), ‖f (i + 1) x - f i x‖) p μ ≤ ∑' (i : ℕ), B i


@[to_additive (attr := simp)]
lemma UniformOnFun.toFun_div [Div β] (f g : α →ᵤ[𝔖] β) :
    toFun 𝔖 (f / g) = toFun 𝔖 f / toFun 𝔖 g

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

(UniformOnFun.toFun 𝔖) (f / g) = (UniformOnFun.toFun 𝔖) f / (UniformOnFun.toFun 𝔖) g


@[simp]
theorem compContinuousLinearMap_apply (g : M [⋀^ι]→L[R] N) (f : M' →L[R] M) (m : ι → M') :
    g.compContinuousLinearMap f m = g (f ∘ m)

{R : Type u_1}
{M : Type u_2}
{M' : Type u_3}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid M']
[Module R M']
[TopologicalSpace M']
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(g : M [⋀^ι]→L[R] N)
(f : M' →L[R] M)
(m : ι → M')

(g.compContinuousLinearMap f) m = g (⇑f ∘ m)


theorem RespectsIso.cancel_left_isIso (hP : RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S)
    (g : S ⟶ T) [IsIso f] : P (f ≫ g) ↔ P g

{P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}


@[simp]
theorem relabel_falsum (g : α → β ⊕ (Fin n)) {k} :
    (falsum : L.BoundedFormula α k).relabel g = falsum

{L : FirstOrder.Language}
{α : Type u'}
{β : Type v'}
{n : ℕ}
(g : α → β ⊕ Fin n)
{k : ℕ}

FirstOrder.Language.BoundedFormula.relabel g FirstOrder.Language.BoundedFormula.falsum =
  FirstOrder.Language.BoundedFormula.falsum


/-- The area form is invariant under pullback by a positively-oriented isometric automorphism. -/
theorem areaForm_comp_linearIsometryEquiv (φ : E ≃ₗᵢ[ℝ] E)
    (hφ : 0 < LinearMap.det (φ.toLinearEquiv : E →ₗ[ℝ] E)) (x y : E) :
    o.areaForm (φ x) (φ y) = o.areaForm x y

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

(hφ : 0 < LinearMap.det ↑φ.toLinearEquiv)

(o.areaForm (φ x)) (φ y) = (o.areaForm x) y


theorem norm_contLinear_le : ‖f.contLinear‖ ≤ ‖f‖

{𝕜 : Type u_1}
{V : Type u_3}
{W : Type u_4}
[NormedAddCommGroup V]
[NormedAddCommGroup W]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 V]
[NormedSpace 𝕜 W]
(f : V →ᴬ[𝕜] W)


/-- The cocone at `*` for the stalk functor of `skyscraperPresheaf p₀ A` when `y ∉ closure {p₀}`
-/
@[simps]
def skyscraperPresheafCocone (y : X) :
    Cocone ((OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A)

[(U : TopologicalSpace.Opens ↑X) → Decidable (p₀ ∈ U)]

∀ (x : (TopologicalSpace.OpenNhds y)ᵒᵖ),
  (skyscraperPresheafCocone p₀ A y).ι.app x =
    CategoryTheory.Limits.terminal.from (((TopologicalSpace.OpenNhds.inclusion y).op ⋙ skyscraperPresheaf p₀ A).obj x)


@[to_additive]
theorem preimage_image_mk_eq_iUnion_image (N : Subgroup α) (s : Set α) :
    mk ⁻¹' ((mk : α → α ⧸ N) '' s) = ⋃ x : N, (· * (x : α)) '' s

{α : Type u_1}
[AddGroup α]
(N : AddSubgroup α)
(s : Set α)

QuotientAddGroup.mk ⁻¹' (QuotientAddGroup.mk '' s) = ⋃ x, (fun x_1 => x_1 + ↑x) '' s


@[simp]
theorem coe_sub (f g : ModularForm Γ k) : ⇑(f - g) = f - g

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f g : ModularForm Γ k)


theorem norm_inner_symm (x y : F) : ‖⟪x, y⟫‖ = ‖⟪y, x⟫‖

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
(x y : F)

‖⟪x, y⟫_𝕜‖ = ‖⟪y, x⟫_𝕜‖


@[simp]
theorem quot_add (x y) :
    (by exact Quot.mk Setoid.r (add x y) : ColimitType F) =
      (by exact Quot.mk _ x) + (by exact Quot.mk _ y)

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ RingCat)
(x y : RingCat.Colimits.Prequotient F)

Quot.mk Setoid.r (x.add y) = Quot.mk Setoid.r x + Quot.mk Setoid.r y


@[mono]
theorem card_mono : Monotone (@card α)


theorem trans_iterate {a : ℕ → ℝ} {n : ℕ}
    (hint : ∀ k < n, IntervalIntegrable f μ (a k) (a <| k + 1)) :
    IntervalIntegrable f μ (a 0) (a n)

(hint : ∀ k < n, IntervalIntegrable f μ (a k) (a (k + 1)))


theorem NonlinearRightInverse.bound {f : E →SL[σ] F} (fsymm : NonlinearRightInverse f) (y : F) :
    ‖fsymm y‖ ≤ fsymm.nnnorm * ‖y‖

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
{f : E →SL[σ] F}
(fsymm : f.NonlinearRightInverse)
(y : F)


@[simp] lemma indiscrete_parts {n : ℕ} (hn : n ≠ 0) : (indiscrete n).parts = {n}

(Nat.Partition.indiscrete n).parts = {n}


@[to_additive (attr := simp)]
theorem mem_comap {K : Subgroup N} {f : G →* N} {x : G} : x ∈ K.comap f ↔ f x ∈ K

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{K : AddSubgroup N}
{f : G →+ N}
{x : G}


theorem MeasurableSpace.ext_iff {m₁ m₂ : MeasurableSpace α} :
    m₁ = m₂ ↔ ∀ s : Set α, MeasurableSet[m₁] s ↔ MeasurableSet[m₂] s

{α : Type u_1}
{m₁ m₂ : MeasurableSpace α}

m₁ = m₂ ↔ ∀ (s : Set α), MeasurableSet s ↔ MeasurableSet s


theorem coe_ofBijective (f : E →SL[σ] F) (hinj : ker f = ⊥) (hsurj : LinearMap.range f = ⊤) :
    ↑(ofBijective f hinj hsurj) = f

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
[CompleteSpace F]
[CompleteSpace E]
(f : E →SL[σ] F)
(hinj : LinearMap.ker f = ⊥)
(hsurj : LinearMap.range f = ⊤)

↑(ContinuousLinearEquiv.ofBijective f hinj hsurj) = f


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

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

AddMonCat.FilteredColimits.M.mk F x = AddMonCat.FilteredColimits.M.mk F y


@[simp]
theorem sInf_snd (S : Set (Concept α β r)) :
    (sInf S).snd = intentClosure r (⋂ c ∈ S, (c : Concept _ _ _).fst)

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

(sInf S).toProd.2 = intentClosure r (⋂ c ∈ S, c.toProd.1)


@[simp] lemma ofAdd_mul (a b : ℤ) : ofAdd (a * b) = ofAdd a ^ b

Multiplicative.ofAdd (a * b) = Multiplicative.ofAdd a ^ b


@[to_additive]
theorem topologicalGroup_is_uniform_of_compactSpace [CompactSpace G] : UniformGroup G

(G : Type u_1)
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
[CompactSpace G]


/-- If `s : Set α` is a proper subset of `α` and `f : α → s` is injective, then `α` is infinite. -/
theorem of_injective_to_set {s : Set α} (hs : s ≠ Set.univ) {f : α → s} (hf : Injective f) :
    Infinite α

{α : Type u_1}
{s : Set α}
(hs : s ≠ Set.univ)
{f : α → ↑s}
(hf : Function.Injective f)


@[to_additive (attr := simp)]
theorem nontrivial_iff : Nontrivial (Submonoid M) ↔ Nontrivial M


theorem Trivialization.smoothAt_iff {f : M → TotalSpace F E} {x₀ : M} (he : f x₀ ∈ e.source) :
    SmoothAt IM (IB.prod 𝓘(𝕜, F)) f x₀ ↔
      SmoothAt IM IB (fun x => (f x).proj) x₀ ∧ SmoothAt IM 𝓘(𝕜, F) (fun x ↦ (e (f x)).2) x₀

[TopologicalSpace (Bundle.TotalSpace F E)]

{e : Trivialization F Bundle.TotalSpace.proj}

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


theorem iSup_nat_gt_zero_eq (f : ℕ → α) : ⨆ i > 0, f i = ⨆ i, f (i + 1)

{α : Type u_1}
[CompleteLattice α]
(f : ℕ → α)


@[simp]
theorem replaceHead_head {i j : ι} (x : M i) (hnotone : x ≠ 1) (w : NeWord M i j) :
    (replaceHead x hnotone w).head = x

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
{i j : ι}
(x : M i)
(hnotone : x ≠ 1)
(w : Monoid.CoprodI.NeWord M i j)

(Monoid.CoprodI.NeWord.replaceHead x hnotone w).head = x


@[simp]
theorem coinduced_iSup {ι : Sort w} {t : ι → TopologicalSpace α} :
    (⨆ i, t i).coinduced f = ⨆ i, (t i).coinduced f

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{ι : Sort w}
{t : ι → TopologicalSpace α}

TopologicalSpace.coinduced f (⨆ i, t i) = ⨆ i, TopologicalSpace.coinduced f (t i)


@[simp]
theorem mem_mk (π : Prepartition I) (f h) : J ∈ mk π f h ↔ J ∈ π

(h : ∀ (J : BoxIntegral.Box ι), f J ∈ BoxIntegral.Box.Icc I)

J ∈ { toPrepartition := π, tag := f, tag_mem_Icc := h } ↔ J ∈ π


theorem HasDerivAt.const_cpow (hf : HasDerivAt f f' x) (h0 : c ≠ 0 ∨ f x ≠ 0) :
    HasDerivAt (fun x => c ^ f x) (c ^ f x * Complex.log c * f') x

{f : ℂ → ℂ}
{f' x c : ℂ}
(hf : HasDerivAt f f' x)
(h0 : c ≠ 0 ∨ f x ≠ 0)


/-- `CharacterModule M` is Baer iff `M` is flat. -/
theorem iff_characterModule_baer : Flat R M ↔ Module.Baer R (CharacterModule M)

{R : Type u}
{M : Type v}
[CommRing R]
[AddCommGroup M]
[Module R M]

Module.Flat R M ↔ Module.Baer R (CharacterModule M)


/-- Construct an augmented simplicial object from an augmented cosimplicial
object in the opposite category. -/
@[simps!]
def CosimplicialObject.Augmented.leftOp (X : CosimplicialObject.Augmented Cᵒᵖ) :
    SimplicialObject.Augmented C

(X : CategoryTheory.CosimplicialObject.Augmented Cᵒᵖ)


theorem sum_hadamard_eq : (∑ i : m, ∑ j : n, (A ⊙ B) i j) = trace (A * Bᵀ)

{α : Type u_1}
{m : Type u_4}
{n : Type u_5}
(A B : Matrix m n α)
[Fintype m]
[Fintype n]
[Semiring α]

∑ i : m, ∑ j : n, A.hadamard B i j = (A * B.transpose).trace


theorem LiftR_def (x y : F α) :
    LiftR' R x y ↔
      ∃ u : F (Subtype_ R),
        (TypeVec.prod.fst ⊚ subtypeVal R) <$$> u = x ∧
          (TypeVec.prod.snd ⊚ subtypeVal R) <$$> u = y

{n : ℕ}
{α : TypeVec.{u} n}
{F : TypeVec.{u} n → Type v}
[MvFunctor F]
(R : α ⊗ α ⟹ TypeVec.repeat n Prop)
[LawfulMvFunctor F]
(x y : F α)

MvFunctor.LiftR' R x y ↔
  ∃ u, (TypeVec.prod.fst ⊚ TypeVec.subtypeVal R) <$$> u = x ∧ (TypeVec.prod.snd ⊚ TypeVec.subtypeVal R) <$$> u = y


theorem contDiffOn_succ_of_fderivWithin {n : ℕ} (hf : DifferentiableOn 𝕜 f s)
    (h : ContDiffOn 𝕜 n (fun y => fderivWithin 𝕜 f s y) s) : ContDiffOn 𝕜 (n + 1 : ℕ) f s

(h : ContDiffOn 𝕜 (↑n) (fun y => fderivWithin 𝕜 f s y) s)


theorem contDiff_update [DecidableEq ι] (k : ℕ∞) (x : ∀ i, F' i) (i : ι) :
    ContDiff 𝕜 k (update x i)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{ι : Type u_3}
[Fintype ι]
{F' : ι → Type u_5}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
[DecidableEq ι]
(k : ℕ∞)
(x : (i : ι) → F' i)
(i : ι)


/-- The equivalence between sections of `J : SingleObj M ⥤ Type u` and fixed points of the
induced action on `J.obj (SingleObj.star M)`. -/
@[simps]
def Types.sections.equivFixedPoints :
    J.sections ≃ MulAction.fixedPoints M (J.obj (SingleObj.star M))

(J : CategoryTheory.Functor (CategoryTheory.SingleObj M) (Type u))

(p : ↑(MulAction.fixedPoints M (J.obj (CategoryTheory.SingleObj.star M))))

∀ (x : CategoryTheory.SingleObj M), ↑((CategoryTheory.Limits.SingleObj.Types.sections.equivFixedPoints J).symm p) x = ↑p


/-- If an action is continuous, then composing this action with a continuous homomorphism gives
again a continuous action. -/
@[to_additive]
theorem MulAction.continuousSMul_compHom
    {N : Type*} [TopologicalSpace N] [Monoid N] {f : N →* M} (hf : Continuous f) :
    letI : MulAction N X := MulAction.compHom _ f
    ContinuousSMul N X

{M : Type u_1}
{X : Type u_2}
[TopologicalSpace M]
[TopologicalSpace X]
[AddMonoid M]
[AddAction M X]
[ContinuousVAdd M X]
{N : Type u_5}
[TopologicalSpace N]
[AddMonoid N]
{f : N →+ M}
(hf : Continuous ⇑f)


/-- The short complex `L₀.X₃ ⟶ L₃.X₁ ⟶ L₃.X₂`. -/
@[simps]
noncomputable def L₂' : ShortComplex C

(S : CategoryTheory.ShortComplex.SnakeInput C)


theorem lc_def (e : ι → M) (l : ι →₀ R) : lc e l = Finsupp.total _ _ R e l

{R : Type u_1}
{M : Type u_2}
{ι : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
(e : ι → M)
(l : ι →₀ R)

Module.DualBases.lc e l = (Finsupp.total ι M R e) l


/-- The empty word `[]` only reduces to itself. -/
@[to_additive "The empty word `[]` only reduces to itself."]
theorem nil_iff : Red [] L ↔ L = []


theorem ptendsto'_def (f : α →. β) (l₁ : Filter α) (l₂ : Filter β) :
    PTendsto' f l₁ l₂ ↔ ∀ s ∈ l₂, f.preimage s ∈ l₁

{α : Type u}
{β : Type v}
(f : α →. β)
(l₁ : Filter α)
(l₂ : Filter β)

Filter.PTendsto' f l₁ l₂ ↔ ∀ s ∈ l₂, f.preimage s ∈ l₁


theorem HasAntitoneBasis.comp_mono [SemilatticeSup ι] [Nonempty ι] [Preorder ι'] {l : Filter α}
    {s : ι' → Set α} (hs : l.HasAntitoneBasis s) {φ : ι → ι'} (φ_mono : Monotone φ)
    (hφ : Tendsto φ atTop atTop) : l.HasAntitoneBasis (s ∘ φ)

{φ : ι → ι'}

(hφ : Filter.Tendsto φ Filter.atTop Filter.atTop)


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

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


@[simp]
theorem const_zero (α : Type u) {β : Type u} (b : β) : const α b 0 = b


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

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


@[simp]
theorem coeToMvPowerSeries.ringHom_apply : coeToMvPowerSeries.ringHom φ = φ

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(φ : MvPolynomial σ R)

MvPolynomial.coeToMvPowerSeries.ringHom φ = ↑φ


@[simp]
theorem pow_toProd (n : ℕ) (a : 𝓜(𝕜, A)) : (a ^ n).toProd = a.toProd ^ n

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(n : ℕ)
(a : 𝓜(𝕜, A))


theorem ssubset_or_eq_of_subset [IsAntisymm α (· ⊆ ·)] (h : a ⊆ b) : a ⊂ b ∨ a = b

[IsNonstrictStrictOrder α (fun x x_1 => x ⊆ x_1) fun x x_1 => x ⊂ x_1]


theorem up_surjective : Surjective (@up α)


/-- The forgetful functor from the category of monads to the category of endofunctors.
-/
@[simps!]
def monadToFunctor : Monad C ⥤ C ⥤ C

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

(CategoryTheory.monadToFunctor C).obj T = T.toFunctor


@[simp, reassoc]
lemma comp_val {X Y Z : SheafOfModules.{v} R} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).val = f.val ≫ g.val

{J : CategoryTheory.GrothendieckTopology C}


theorem ACounit_surjective : Surjective (ACounit A B)

(A : Type u_1)
(B : Type u_2)
[CommSemiring A]
[CommSemiring B]
[Algebra A B]

Function.Surjective ⇑(MvPolynomial.ACounit A B)


@[simp]
theorem symm_mk (f : R → S) (g h₁ h₂ h₃ h₄) :
    (mk ⟨f, g, h₁, h₂⟩ h₃ h₄).symm =
      { symm_mk.aux f g h₁ h₂ h₃ h₄ with
        toFun := g
        invFun := f }

(h₃ :
  ∀ (x y : R),
    { toFun := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toFun (x * y) =
      { toFun := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toFun x *
        { toFun := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toFun y)

(h₄ :
  ∀ (x y : R),
    { toFun := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toFun (x + y) =
      { toFun := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toFun x +
        { toFun := f, invFun := g, left_inv := h₁, right_inv := h₂ }.toFun y)

{ toFun := f, invFun := g, left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄ }.symm =
  let __src := RingEquiv.symm_mk.aux f g h₁ h₂ h₃ h₄;
  { toFun := g, invFun := f, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯ }


theorem eLpNorm_inner_lt_top (f g : α →₂[μ] E) : eLpNorm (fun x : α => ⟪f x, g x⟫) 1 μ < ∞

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

MeasureTheory.eLpNorm (fun x => ⟪↑↑f x, ↑↑g x⟫_𝕜) 1 μ < ⊤


/-- **L'Hôpital's rule** for approaching a real, `deriv` version -/
theorem lhopital_zero_nhds (hdf : ∀ᶠ x in 𝓝 a, DifferentiableAt ℝ f x)
    (hg' : ∀ᶠ x in 𝓝 a, deriv g x ≠ 0) (hfa : Tendsto f (𝓝 a) (𝓝 0)) (hga : Tendsto g (𝓝 a) (𝓝 0))
    (hdiv : Tendsto (fun x => (deriv f) x / (deriv g) x) (𝓝 a) l) :
    Tendsto (fun x => f x / g x) (𝓝[≠] a) l

(hdf : ∀ᶠ (x : ℝ) in 𝓝 a, DifferentiableAt ℝ f x)

(hg' : ∀ᶠ (x : ℝ) in 𝓝 a, deriv g x ≠ 0)

(hdiv : Filter.Tendsto (fun x => deriv f x / deriv g x) (𝓝 a) l)

Filter.Tendsto (fun x => f x / g x) (𝓝[≠] a) l


/-- An algebra is finitely presented if and only if it is a quotient of a polynomial ring whose
variables are indexed by a fintype by a finitely generated ideal. -/
theorem iff_quotient_mvPolynomial' :
    FinitePresentation R A ↔
      ∃ (ι : Type*) (_ : Fintype ι) (f : MvPolynomial ι R →ₐ[R] A),
        Surjective f ∧ f.toRingHom.ker.FG

{R : Type w₁}
{A : Type w₂}
[CommRing R]
[CommRing A]
[Algebra R A]

Algebra.FinitePresentation R A ↔ ∃ ι x f, Function.Surjective ⇑f ∧ (RingHom.ker f.toRingHom).FG


theorem IsHermitian.apply {A : Matrix n n α} (h : A.IsHermitian) (i j : n) : star (A j i) = A i j

{α : Type u_1}
{n : Type u_4}
[Star α]
{A : Matrix n n α}
(h : A.IsHermitian)
(i j : n)


@[simp, norm_cast]
theorem coe_sInf (S : Set (Subsemiring R)) : ((sInf S : Subsemiring R) : Set R) = ⋂ s ∈ S, ↑s

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


/-- If `h : X → Y` is a homeomorphism, `h⁻¹(s)` is path-connected iff `s` is. -/
@[simp]
theorem Homeomorph.isPathConnected_preimage {s : Set Y} (h : X ≃ₜ Y) :
    IsPathConnected (h ⁻¹' s) ↔ IsPathConnected s

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

IsPathConnected (⇑h ⁻¹' s) ↔ IsPathConnected s


@[simp]
theorem mem_toPrepartition {π : TaggedPrepartition I} : J ∈ π.toPrepartition ↔ J ∈ π

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
{π : BoxIntegral.TaggedPrepartition I}


lemma differentiableAt_rpow_const_of_ne (p : ℝ) {x : ℝ} (hx : x ≠ 0) :
    DifferentiableAt ℝ (fun x => x ^ p) x


@[simp]
theorem neg_linear (f : P1 →ᵃ[k] V2) : (-f).linear = -f.linear

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
(f : P1 →ᵃ[k] V2)


theorem integral_union (hst : Disjoint s t) (ht : MeasurableSet t) (hfs : IntegrableOn f s μ)
    (hft : IntegrableOn f t μ) : ∫ x in s ∪ t, f x ∂μ = ∫ x in s, f x ∂μ + ∫ x in t, f x ∂μ

(hfs : MeasureTheory.IntegrableOn f s μ)

(hft : MeasureTheory.IntegrableOn f t μ)

∫ (x : X) in s ∪ t, f x ∂μ = ∫ (x : X) in s, f x ∂μ + ∫ (x : X) in t, f x ∂μ


@[simp]
theorem rootsOfUnity_one (M : Type*) [CommMonoid M] : rootsOfUnity 1 M = ⊥


theorem prod_le_iff {p₁ : Submodule R M} {p₂ : Submodule R M₂} {q : Submodule R (M × M₂)} :
    p₁.prod p₂ ≤ q ↔ map (LinearMap.inl R M M₂) p₁ ≤ q ∧ map (LinearMap.inr R M M₂) p₂ ≤ q

(R : Type u)
(M : Type v)
(M₂ : Type w)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
{p₁ : Submodule R M}
{p₂ : Submodule R M₂}
{q : Submodule R (M × M₂)}

p₁.prod p₂ ≤ q ↔ Submodule.map (LinearMap.inl R M M₂) p₁ ≤ q ∧ Submodule.map (LinearMap.inr R M M₂) p₂ ≤ q


theorem _root_.Ideal.annihilator_quotient {I : Ideal R} : Module.annihilator R (R ⧸ I) = I

{R : Type u_1}
[CommRing R]
{I : Ideal R}


theorem contains_iff (s : String) (c : Char) : contains s c ↔ c ∈ s.1


@[simp, norm_cast]
theorem rpow_natCast (x : ℝ≥0∞) (n : ℕ) : x ^ (n : ℝ) = x ^ n


theorem preimage_nhds_within_coinduced {π : α → β} {s : Set β} {t : Set α} {a : α} (h : a ∈ t)
    (ht : IsOpen t)
    (hs : s ∈ @nhds β (.coinduced (fun x : t => π x) inferInstance) (π a)) :
    π ⁻¹' s ∈ 𝓝 a

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{π : α → β}
{s : Set β}
{t : Set α}
{a : α}
(h : a ∈ t)
(ht : IsOpen t)
(hs : s ∈ 𝓝 (π a))

π ⁻¹' s ∈ 𝓝 a


@[deprecated getElem_splitWrtCompositionAux (since := "2024-06-12")]
theorem get_splitWrtCompositionAux (l : List α) (ns : List ℕ) {i : ℕ} (hi) :
    (l.splitWrtCompositionAux ns).get ⟨i, hi⟩  =
      (l.take (ns.take (i + 1)).sum).drop (ns.take i).sum

(hi : i < (l.splitWrtCompositionAux ns).length)

(l.splitWrtCompositionAux ns).get ⟨i, hi⟩ = List.drop (List.take i ns).sum (List.take (List.take (i + 1) ns).sum l)


/-- The sheaf condition
in terms of a limit diagram over all `{ V : Opens X // ∃ i, V ≤ U i }`
is equivalent to the reformulation
in terms of a limit diagram over `U i` and `U i ⊓ U j`.
-/
theorem isSheafOpensLeCover_iff_isSheafPairwiseIntersections :
    F.IsSheafOpensLeCover ↔ F.IsSheafPairwiseIntersections

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X : TopCat}
(F : TopCat.Presheaf C X)


@[simp]
theorem surjective_frobenius : Surjective (frobenius R p)

(R : Type u_1)
(p : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]


theorem toIocDiv_wcovBy_toIcoDiv (a b : α) : toIocDiv hp a b ⩿ toIcoDiv hp a b

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


/--
This is the `AlgHom` version of `toPushforwardStalk`, which is the map `S ⟶ (f∗ 𝒪ₛ)ₚ` for some
algebra `R ⟶ S` and some `p : Spec R`.
-/
@[simps!]
def toPushforwardStalkAlgHom :
    S →ₐ[R] (Spec.topMap (algebraMap R S) _* (structureSheaf S).1).stalk p

(R S : CommRingCat)
(p : PrimeSpectrum ↑R)
[Algebra ↑R ↑S]

∀ (a : ↑S),
  (AlgebraicGeometry.StructureSheaf.toPushforwardStalkAlgHom R S p) a =
    (((TopCat.Presheaf.pushforward CommRingCat (AlgebraicGeometry.Spec.topMap (algebraMap ↑R ↑S))).obj
            (AlgebraicGeometry.Spec.structureSheaf ↑S).val).germ
        ⟨p, trivial⟩)
      ((AlgebraicGeometry.StructureSheaf.toOpen ↑S ⊤) a)


@[mono, gcongr]
theorem inter_subset_inter {x y s t : Finset α} (h : x ⊆ y) (h' : s ⊆ t) : x ∩ s ⊆ y ∩ t

{α : Type u_1}
[DecidableEq α]
{x y s t : Finset α}
(h : x ⊆ y)
(h' : s ⊆ t)


theorem to_of_nat : ∀ n : ℕ, ((n : Num) : ℕ) = n


theorem Transitive.comap (h : Transitive r) (f : α → β) : Transitive (r on f)

{α : Type u_1}
{β : Type u_2}
{r : β → β → Prop}
(h : Transitive r)
(f : α → β)


@[simp]
lemma AlgHom.toKerIsLocalization_apply (f : A →ₐ[R] B) (x : RingHom.ker f) :
    AlgHom.toKerIsLocalization M Rₚ Aₚ Bₚ f x =
      RingHom.toKerIsLocalization Aₚ Bₚ f.toRingHom (algebraMapSubmonoid_le_comap M f) x

[IsLocalization (Algebra.algebraMapSubmonoid A M) Aₚ]

[IsLocalization (Algebra.algebraMapSubmonoid B M) Bₚ]

(AlgHom.toKerIsLocalization M Rₚ Aₚ Bₚ f) x = (RingHom.toKerIsLocalization Aₚ Bₚ f.toRingHom ⋯) x


/-- Binary biproducts are unique up to isomorphism. This already follows because bilimits are
    limits, but in the case of biproducts we can give an isomorphism with particularly nice
    definitional properties, namely that `biprod.lift b.fst b.snd` and `biprod.desc b.inl b.inr`
    are inverses of each other. -/
@[simps]
def biprod.uniqueUpToIso (X Y : C) [HasBinaryBiproduct X Y] {b : BinaryBicone X Y}
    (hb : b.IsBilimit) : b.pt ≅ X ⊞ Y

{b : CategoryTheory.Limits.BinaryBicone X Y}

(CategoryTheory.Limits.biprod.uniqueUpToIso X Y hb).hom = CategoryTheory.Limits.biprod.lift b.fst b.snd


@[simp]
theorem iSup_zero_eq_zero {ι : Sort*} : ⨆ _ : ι, (0 : ℝ≥0∞) = 0


@[to_additive (attr := simp)]
theorem map_top_of_surjective (f : G →* N) (h : Function.Surjective f) : Subgroup.map f ⊤ = ⊤

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)
(h : Function.Surjective ⇑f)


theorem finite_of_finite_generating_set {p : IntermediateField ℚ A → Prop}
    (S : Set {F : IntermediateField ℚ A // p F}) {T : Set A}
    (hT : T.Finite) (h : ∀ F ∈ S, ∃ x ∈ T, F = ℚ⟮x⟯) :
    S.Finite

(A : Type u_2)
[Field A]
[CharZero A]
{p : IntermediateField ℚ A → Prop}
(S : Set { F // p F })
{T : Set A}
(hT : T.Finite)
(h : ∀ F ∈ S, ∃ x ∈ T, ↑F = ℚ⟮x⟯)


theorem filter_eq (l : List α) (a : α) : l.filter (· = a) = replicate (count a l) a

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

List.filter (fun x => decide (x = a)) l = List.replicate (List.count a l) a


theorem pow_card_pow (n : ℕ) (a : K) : a ^ q ^ n = a

{K : Type u_1}
[GroupWithZero K]
[Fintype K]
(n : ℕ)
(a : K)


@[to_additive]
protected lemma div_mul_right (h : IsUnit a) (b : α) : a / (a * b) = 1 / b

{α : Type u}
[SubtractionCommMonoid α]
{a : α}
(h : IsAddUnit a)
(b : α)


theorem setLaverage_eq (f : α → ℝ≥0∞) (s : Set α) :
    ⨍⁻ x in s, f x ∂μ = (∫⁻ x in s, f x ∂μ) / μ s

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
(f : α → ℝ≥0∞)
(s : Set α)

⨍⁻ (x : α) in s, f x ∂μ = (∫⁻ (x : α) in s, f x ∂μ) / μ s


lemma shiftIso_hom_app (n a a' : ℤ) (ha' : n + a = a') (K : CochainComplex C ℤ) :
    (shiftIso C n a a' ha').hom.app K =
      ShortComplex.homologyMap ((shiftShortComplexFunctorIso C n a a' ha').hom.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').hom.app K =
  CategoryTheory.ShortComplex.homologyMap ((CochainComplex.shiftShortComplexFunctorIso C n a a' ha').hom.app K)


/-- The restriction of a Scheme along an open embedding. -/
@[simps! (config := .lemmasOnly) carrier, simps! presheaf_obj]
def Scheme.restrict : Scheme

{f : U ⟶ TopCat.of ↑↑X.toPresheafedSpace}

∀ (X_1 : (TopologicalSpace.Opens ↑U)ᵒᵖ),
  (X.restrict h).presheaf.obj X_1 = X.presheaf.obj (Opposite.op (⋯.functor.obj (Opposite.unop X_1)))


@[simp]
theorem codisjoint_self : Codisjoint a a ↔ a = ⊤

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


/-- Note that this is not quite as useful as it looks because the measure takes values in `ℝ≥0∞`.
Thus the subtraction appearing is the truncated subtraction of `ℝ≥0∞`, rather than the
better-behaved subtraction of `ℝ`. -/
lemma prob_compl_eq_one_sub₀ (h : NullMeasurableSet s μ) : μ sᶜ = 1 - μ s

(h : MeasureTheory.NullMeasurableSet s μ)


@[to_additive] lemma Left.min_le_max_of_mul_le_mul
    [CovariantClass α α (· * ·) (· < ·)] [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
    (h : a * b ≤ c * d) : min a b ≤ max c d

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

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


theorem degree_sub_lt (hd : degree p = degree q) (hp0 : p ≠ 0)
    (hlc : leadingCoeff p = leadingCoeff q) : degree (p - q) < degree p

{R : Type u}
[Ring R]
{p q : R[X]}
(hd : p.degree = q.degree)
(hp0 : p ≠ 0)
(hlc : p.leadingCoeff = q.leadingCoeff)


@[simp]
theorem pi_univ_Ici : (pi univ fun i ↦ Ici (x i)) = Ici x

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Preorder (α i)]
(x : (i : ι) → α i)

(Set.univ.pi fun i => Set.Ici (x i)) = Set.Ici x


@[to_additive (attr := mono)]
theorem tprod_mono (hf : Multipliable f) (hg : Multipliable g) (h : f ≤ g) :
    ∏' n, f n ≤ ∏' n, g n

{ι : Type u_1}
{α : Type u_3}
[OrderedAddCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f g : ι → α}
(hf : Summable f)
(hg : Summable g)
(h : f ≤ g)


protected theorem strictAnti [Subsingleton α] (f : α → β) : StrictAnti f

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


@[simp] theorem truncate_or {x y : BitVec w} :
    (x ||| y).truncate k = x.truncate k ||| y.truncate k

BitVec.truncate k (x ||| y) = BitVec.truncate k x ||| BitVec.truncate k y


/-- An ordered cancellative scalar multiplication is an ordered scalar multiplication that is
  cancellative. -/
@[to_additive]
class IsOrderedCancelSMul (G P : Type*) [LE G] [LE P] [SMul G P] extends
    IsOrderedSMul G P : Prop where
  protected le_of_smul_le_smul_left : ∀ (a : G) (b c : P), a • b ≤ a • c → b ≤ c
  protected le_of_smul_le_smul_right : ∀ (a b : G) (c : P), a • c ≤ b • c → a ≤ b

{G : Type u_3}
{P : Type u_4}
[LE G]
[LE P]
[SMul G P]
[self : IsOrderedCancelSMul G P]
(a b : G)
(c : P)


theorem gcd_eq_right_iff [NormalizedGCDMonoid α] (a b : α) (h : normalize b = b) :
    gcd a b = b ↔ b ∣ a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
(a b : α)
(h : normalize b = b)


protected theorem monotone {p q : ℝ≥0∞} (hpq : q ≤ p) : lp E q ≤ lp E p

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
{p q : ℝ≥0∞}
(hpq : q ≤ p)


theorem principal_mul_iff_mul_left_eq {o : Ordinal} :
    Principal (· * ·) o ↔ ∀ a, 0 < a → a < o → a * o = o

Ordinal.Principal (fun x x_1 => x * x_1) o ↔ ∀ (a : Ordinal.{u_1}), 0 < a → a < o → a * o = o


/-- `MulActionSemiHomClass F φ X Y` states that
  `F` is a type of morphisms which are `φ`-equivariant.

You should extend this class when you extend `MulActionHom`. -/
class MulActionSemiHomClass (F : Type*)
    {M N : outParam Type*} (φ : outParam (M → N))
    (X Y : outParam Type*) [SMul M X] [SMul N Y] [FunLike F X Y] : Prop where
  /-- The proposition that the function preserves the action. -/
  map_smulₛₗ : ∀ (f : F) (c : M) (x : X), f (c • x) = (φ c) • (f x)

{F : Type u_8}
{M : outParam (Type u_9)}
{N : outParam (Type u_10)}
{φ : outParam (M → N)}
{X : outParam (Type u_11)}
{Y : outParam (Type u_12)}
[SMul M X]
[SMul N Y]
[FunLike F X Y]
[self : MulActionSemiHomClass F φ X Y]
(f : F)
(c : M)
(x : X)


@[to_additive Iic_add_Iic_subset]
theorem Iic_mul_Iic_subset' (a b : α) : Iic a * Iic b ⊆ Iic (a * b)

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

[CovariantClass α α (Function.swap HMul.hMul) LE.le]


@[simp, norm_cast]
theorem coe_Ioc (a b : α) : (Ioc a b : Set α) = Set.Ioc a b

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


lemma cfc_sum {ι : Type*} (f : ι → R → R) (a : A) (s : Finset ι)
    (hf : ∀ i ∈ s, ContinuousOn (f i) (spectrum R a) := by cfc_cont_tac) :
    cfc (∑ i in s, f i)  a = ∑ i in s, cfc (f i) a

cfc (∑ i ∈ s, f i) a = ∑ i ∈ s, cfc (f i) a


theorem IsPredLimit.lt_pred_iff (h : IsPredLimit a) : a < pred b ↔ a < b

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}
(h : Order.IsPredLimit a)


@[to_additive (attr := simp)]
theorem orderOf_inv (x : G) : orderOf x⁻¹ = orderOf x


@[to_additive]
theorem ContMDiffWithinAt.div_const (hf : ContMDiffWithinAt I' I n f s x) :
    ContMDiffWithinAt I' I n (fun x ↦ f x / c) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[DivInvMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{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 → G}
{s : Set M}
{x : M}
{n : ℕ∞}
(c : G)
(hf : ContMDiffWithinAt I' I n f s x)

ContMDiffWithinAt I' I n (fun x => f x / c) s x


theorem map_inf_comap_of_surjective (p q : Submodule R₂ M₂) :
    (p.comap f ⊓ q.comap f).map f = p ⊓ q

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
{f : F}
(hf : Function.Surjective ⇑f)
(p q : Submodule R₂ M₂)

Submodule.map f (Submodule.comap f p ⊓ Submodule.comap f q) = p ⊓ q


theorem wSameSide_iff_exists_right {s : AffineSubspace R P} {x y p₂ : P} (h : p₂ ∈ s) :
    s.WSameSide x y ↔ y ∈ s ∨ ∃ p₁ ∈ s, SameRay R (x -ᵥ p₁) (y -ᵥ p₂)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y p₂ : P}
(h : p₂ ∈ s)


theorem ncard_eq_toFinset_card (s : Set α) (hs : s.Finite := by toFinite_tac) :
    s.ncard = hs.toFinset.card

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


theorem offDiag_inter : (s ∩ t).offDiag = s.offDiag ∩ t.offDiag


theorem le_mkMetric (m : ℝ≥0∞ → ℝ≥0∞) (μ : Measure X) (ε : ℝ≥0∞) (h₀ : 0 < ε)
    (h : ∀ s : Set X, diam s ≤ ε → μ s ≤ m (diam s)) : μ ≤ mkMetric m

(m : ℝ≥0∞ → ℝ≥0∞)

(h : ∀ (s : Set X), EMetric.diam s ≤ ε → μ s ≤ m (EMetric.diam s))


theorem pow_left (H : IsRelPrime x y) : IsRelPrime (x ^ m) y

{α : Type u_1}
[CommMonoid α]
[DecompositionMonoid α]
{x y : α}
{m : ℕ}
(H : IsRelPrime x y)


@[simp, nolint simpNF]
theorem lmk_apply (s : Finset ι) (x) : (lmk s : _ →ₗ[R] Π₀ i, M i) x = mk s x

{ι : Type u_1}
{R : Type u_2}
{M : ι → Type u_4}
[Semiring R]
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
[DecidableEq ι]
(s : Finset ι)
(x : (i : ↑↑s) → M ↑i)


theorem _root_.MeasureTheory.Memℒp.variance_eq_of_integral_eq_zero (hX : Memℒp X 2 μ)
    (hXint : μ[X] = 0) : variance X μ = μ[X ^ (2 : Nat)]

{Ω : Type u_1}
{m : MeasurableSpace Ω}
{X : Ω → ℝ}
{μ : MeasureTheory.Measure Ω}
(hX : MeasureTheory.Memℒp X 2 μ)
(hXint : ∫ (x : Ω), X x ∂μ = 0)

ProbabilityTheory.variance X μ = ∫ (x : Ω), (X ^ 2) x ∂μ


@[to_additive]
lemma mem_stabilizer_set' {s : Set α} (hs : s.Finite) :
    a ∈ stabilizer G s ↔ ∀ ⦃b⦄, b ∈ s → a • b ∈ s

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
{a : G}
{s : Set α}
(hs : s.Finite)

a ∈ MulAction.stabilizer G s ↔ ∀ ⦃b : α⦄, b ∈ s → a • b ∈ s


/-- When `Ring.inverse` is continuous at the determinant (such as in a `NormedRing`, or a
topological field), so is `Matrix.inv`. -/
theorem continuousAt_matrix_inv [Fintype n] [DecidableEq n] [CommRing R] [TopologicalRing R]
    (A : Matrix n n R) (h : ContinuousAt Ring.inverse A.det) : ContinuousAt Inv.inv A

{n : Type u_5}
{R : Type u_8}
[TopologicalSpace R]
[Fintype n]
[DecidableEq n]
[CommRing R]
[TopologicalRing R]
(A : Matrix n n R)
(h : ContinuousAt Ring.inverse A.det)


@[csimp] theorem takeList_eq_takeListTR : @takeList = @takeListTR

(α : Type u_1)
(acc : Array (List α))
(ns : List Nat)
(xs : List α)

List.takeListTR.go ns xs acc =
  match xs.takeList ns with
  | (l, r) => (acc.toList ++ l, r)


/-- A topological space is called a *preregular* (a.k.a. R₁) space,
if any two topologically distinguishable points have disjoint neighbourhoods. -/
@[mk_iff r1Space_iff_specializes_or_disjoint_nhds]
class R1Space (X : Type*) [TopologicalSpace X] : Prop where
  specializes_or_disjoint_nhds (x y : X) : Specializes x y ∨ Disjoint (𝓝 x) (𝓝 y)

R1Space X ↔ ∀ (x y : X), x ⤳ y ∨ Disjoint (𝓝 x) (𝓝 y)


/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y

{X Y : AlgebraicGeometry.PresheafedSpace C}

(α : (TopCat.Presheaf.pushforward C H.hom).obj X.presheaf ≅ Y.presheaf)

(AlgebraicGeometry.PresheafedSpace.isoOfComponents H α).hom = { base := H.hom, c := α.inv }


theorem iterate_self (n : ℕ) : Commute f^[n] f


@[to_additive (attr := simp) ite_smul]
lemma pow_ite (p : Prop) [Decidable p] (a : α) (b c : β) :
    a ^ (if p then b else c) = if p then a ^ b else a ^ c

{α : Type u_1}
{β : Type u_2}
[SMul β α]
(p : Prop)
[Decidable p]
(a : α)
(b c : β)

(if p then b else c) • a = if p then b • a else c • a


theorem ofCauchy_sub (a b) : (⟨a - b⟩ : ℝ) = ⟨a⟩ - ⟨b⟩

{ cauchy := a - b } = { cauchy := a } - { cauchy := b }


theorem rotation_apply (θ : Real.Angle) (x : V) :
    o.rotation θ x = Real.Angle.cos θ • x + Real.Angle.sin θ • J x

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

(o.rotation θ) x = θ.cos • x + θ.sin • o.rightAngleRotation x


theorem eq_of_empty [IsEmpty α] (f g : C_c(α, β)) : f = g

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
[IsEmpty α]
(f g : α →C_c β)


lemma nil_iff_length_eq {p : G.Walk v w} : p.Nil ↔ p.length = 0

{V : Type u}
{G : SimpleGraph V}
{v w : V}
{p : G.Walk v w}


/-- The equivalence between `TwoP` and itself induced by `Prod.swap` both ways. -/
@[simps!]
noncomputable def swapEquiv : TwoP ≌ TwoP

∀ (a : ((𝟭 TwoP).obj X).toBipointed.X),
  (TwoP.swapEquiv.unitIso.hom.app X).toFun a =
    (𝟙 (TwoP.swap.obj (TwoP.swap.obj X))).toFun
      (({ toFun := id, map_fst := ⋯, map_snd := ⋯ } ≫
            TwoP.swap.map { toFun := id, map_fst := ⋯, map_snd := ⋯ } ≫
              TwoP.swap.map (TwoP.swap.map { toFun := id, map_fst := ⋯, map_snd := ⋯ })).toFun
        a)


@[to_additive]
theorem range_eq_top_of_cancel {f : A →* B}
    (h : ∀ u v : B →* B ⧸ f.range, u.comp f = v.comp f → u = v) : f.range = ⊤

(h : ∀ (u v : B →* B ⧸ f.range), u.comp f = v.comp f → u = v)


theorem irreducible_iff_prime_of_exists_prime_factors {p : α} : Irreducible p ↔ Prime p

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


theorem support_add [DecidableEq α] {g₁ g₂ : α →₀ M} :
    (g₁ + g₂).support ⊆ g₁.support ∪ g₂.support

{α : Type u_1}
{M : Type u_5}
[AddZeroClass M]
[DecidableEq α]
{g₁ g₂ : α →₀ M}


@[to_additive]
theorem uniformContinuous_inv : UniformContinuous fun x : α => x⁻¹

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]


theorem C_dvd_iff_map_hom_eq_zero (q : R →+* S₁) (r : R) (hr : ∀ r' : R, q r' = 0 ↔ r ∣ r')
    (φ : MvPolynomial σ R) : C r ∣ φ ↔ map q φ = 0

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(q : R →+* S₁)
(r : R)
(hr : ∀ (r' : R), q r' = 0 ↔ r ∣ r')
(φ : MvPolynomial σ R)

MvPolynomial.C r ∣ φ ↔ (MvPolynomial.map q) φ = 0


/-- If all `f i`, `i ∈ s`, are nonnegative and each `f i` is less than or equal to `g i`, then the
product of `f i` is less than or equal to the product of `g i`.

This is a variant (beta-reduced) version of the standard lemma `Finset.prod_le_prod`, convenient
for the `gcongr` tactic. -/
@[gcongr]
lemma _root_.GCongr.prod_le_prod (h0 : ∀ i ∈ s, 0 ≤ f i) (h1 : ∀ i ∈ s, f i ≤ g i) :
    s.prod f ≤ s.prod g

{ι : Type u_1}
{R : Type u_2}
[CommMonoidWithZero R]
[PartialOrder R]
[ZeroLEOneClass R]
[PosMulMono R]
{f g : ι → R}
{s : Finset ι}
(h0 : ∀ i ∈ s, 0 ≤ f i)
(h1 : ∀ i ∈ s, f i ≤ g i)


@[reassoc (attr := simp)]
theorem whiskerLeft_naturality (f : a' ⟶ F.obj b) (g : b ⟶ c) :
    f ◁ F.map g ◁ Γ.app c ≫ f ◁ θ.naturality g = f ◁ η.naturality g ≫ f ◁ Γ.app b ▷ G.map g

(Γ : CategoryTheory.OplaxNatTrans.Modification η θ)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.whiskerLeft (F.map g) (Γ.app c)))
    (CategoryTheory.Bicategory.whiskerLeft f (θ.naturality g)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft f (η.naturality g))
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.whiskerRight (Γ.app b) (G.map g)))


/-- The L-series of the constant sequence `1` equals the Riemann Zeta Function on its
domain of convergence `1 < re s`. -/
lemma LSeries_one_eq_riemannZeta {s : ℂ} (hs : 1 < s.re) : L 1 s = riemannZeta s


theorem preimage_symm (h : α ≃ᵢ β) : preimage h.symm = image h

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


/-- Converting an augmented cosimplicial object to an augmented simplicial
object and back is isomorphic to the given object. -/
@[simps!]
def CosimplicialObject.Augmented.leftOpRightOpIso (X : CosimplicialObject.Augmented Cᵒᵖ) :
    X.leftOp.rightOp ≅ X

(X : CategoryTheory.CosimplicialObject.Augmented Cᵒᵖ)


@[simp] theorem concat_eq_append (as : List α) (a : α) : as.concat a = as ++ [a]


theorem integral_cases (f : ℝ → E) (a b) :
    (∫ x in a..b, f x ∂μ) ∈ ({∫ x in Ι a b, f x ∂μ, -∫ x in Ι a b, f x ∂μ} : Set E)

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure ℝ}
(f : ℝ → E)
(a b : ℝ)

∫ (x : ℝ) in a..b, f x ∂μ ∈ {∫ (x : ℝ) in Ι a b, f x ∂μ, -∫ (x : ℝ) in Ι a b, f x ∂μ}


theorem strongDownwardInduction_eq {p : Multiset α → Sort*} {n : ℕ}
    (H : ∀ t₁, (∀ {t₂ : Multiset α}, card t₂ ≤ n → t₁ < t₂ → p t₂) → card t₁ ≤ n → p t₁)
    (s : Multiset α) :
    strongDownwardInduction H s = H s fun ht _hst => strongDownwardInduction H _ ht

(H : (t₁ : Multiset α) → ({t₂ : Multiset α} → Multiset.card t₂ ≤ n → t₁ < t₂ → p t₂) → Multiset.card t₁ ≤ n → p t₁)

Multiset.strongDownwardInduction H s = H s fun {t₂} ht _hst => Multiset.strongDownwardInduction H t₂ ht


@[to_additive (attr := simp)]
theorem top_subgroupOf : (⊤ : Subgroup G).subgroupOf H = ⊤

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


@[simp]
theorem WithLp.equiv_single (i : ι) (a : 𝕜) :
    WithLp.equiv _ _ (EuclideanSpace.single i a) = Pi.single i a

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[DecidableEq ι]
(i : ι)
(a : 𝕜)

(WithLp.equiv 2 ((i : ι) → (fun x => 𝕜) i)) (EuclideanSpace.single i a) = Pi.single i a


@[simp] lemma shatters_empty : 𝒜.Shatters ∅ ↔ 𝒜.Nonempty

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


protected theorem splits : Splits (algebraMap K (SplittingField f)) f

Polynomial.Splits (algebraMap K f.SplittingField) f


/-- Division `y ↦ y / x` as an `IsometryEquiv`. -/
@[to_additive (attr := simps! apply toEquiv) "Subtraction `y ↦ y - x` as an `IsometryEquiv`."]
def divRight [IsometricSMul Gᵐᵒᵖ G] (c : G) : G ≃ᵢ G

{G : Type v}
[AddGroup G]
[PseudoEMetricSpace G]
[IsometricVAdd Gᵃᵒᵖ G]
(c : G)

(IsometryEquiv.subRight c).toEquiv = Equiv.subRight c


/-- An equivalence of categories induces an equivalences between the respective categories
of homological complex.
-/
@[simps]
def Equivalence.mapHomologicalComplex (e : W₁ ≌ W₂) [e.functor.PreservesZeroMorphisms]
    (c : ComplexShape ι) :
    HomologicalComplex W₁ c ≌ HomologicalComplex W₂ c

(e.mapHomologicalComplex c).inverse = e.inverse.mapHomologicalComplex c


theorem vecMul_injective_of_invertible (A : Matrix m m K) [Invertible A] :
    Function.Injective A.vecMul

{m : Type u}
[DecidableEq m]
{K : Type u_3}
[Field K]
[Fintype m]
(A : Matrix m m K)
[Invertible A]

Function.Injective fun v => Matrix.vecMul v A


@[simp]
theorem inclusion_lt_inclusion [Preorder α] {s t : Set α} (h : s ⊆ t) {x y : s} :
    inclusion h x < inclusion h y ↔ x < y

{α : Type u_1}
[Preorder α]
{s t : Set α}
(h : s ⊆ t)
{x y : ↑s}

Set.inclusion h x < Set.inclusion h y ↔ x < y


theorem pow {p a : α} (hp : Prime p) : ∀ {k : ℕ}, multiplicity p (a ^ k) = k • multiplicity p a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[DecidableRel fun x x_1 => x ∣ x_1]
{p a : α}
(hp : Prime p)
{k : ℕ}


theorem natDegree_mul_le {p q : R[X]} : natDegree (p * q) ≤ natDegree p + natDegree q

(p * q).natDegree ≤ p.natDegree + q.natDegree


theorem norm_setToSimpleFunc_le_sum_mul_norm_of_integrable (T : Set α → E →L[ℝ] F') {C : ℝ}
    (hT_norm : ∀ s, MeasurableSet s → μ s < ∞ → ‖T s‖ ≤ C * (μ s).toReal) (f : α →ₛ E)
    (hf : Integrable f μ) :
    ‖f.setToSimpleFunc T‖ ≤ C * ∑ x ∈ f.range, (μ (f ⁻¹' {x})).toReal * ‖x‖

(hT_norm : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ‖T s‖ ≤ C * (μ s).toReal)

‖MeasureTheory.SimpleFunc.setToSimpleFunc T f‖ ≤ C * ∑ x ∈ f.range, (μ (↑f ⁻¹' {x})).toReal * ‖x‖


theorem algebraMap_apply' (p : MvPolynomial σ R) :
    algebraMap (MvPolynomial σ R) (MvPowerSeries σ A) p = map σ (algebraMap R A) p

{σ : Type u_1}
{R : Type u_2}
(A : Type u_3)
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
(p : MvPolynomial σ R)

(algebraMap (MvPolynomial σ R) (MvPowerSeries σ A)) p = (MvPowerSeries.map σ (algebraMap R A)) ↑p


/-- Representable presheaves are (trivially) ind-objects. -/
@[simps]
def yoneda (X : C) : IndObjectPresentation (yoneda.obj X)

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

(CategoryTheory.Limits.IndObjectPresentation.yoneda X).F = CategoryTheory.Functor.fromPUnit X


lemma baseChange_polynomialY : (W.baseChange B).toAffine.polynomialY =
    (W.baseChange A).toAffine.polynomialY.map (mapRingHom f)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type s}
[CommRing S]
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)

(WeierstrassCurve.baseChange W B).toAffine.polynomialY =
  Polynomial.map (Polynomial.mapRingHom ↑f) (WeierstrassCurve.baseChange W A).toAffine.polynomialY


theorem subtypeDomain_eq_zero_iff' {f : α →₀ M} : f.subtypeDomain p = 0 ↔ ∀ x, p x → f x = 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
{p : α → Prop}
{f : α →₀ M}

Finsupp.subtypeDomain p f = 0 ↔ ∀ (x : α), p x → f x = 0


theorem ext_iff : (∀ i j, M i j = N i j) ↔ M = N

{m : Type u_2}
{n : Type u_3}
{α : m → n → Type v}
{M N : DMatrix m n α}

(∀ (i : m) (j : n), M i j = N i j) ↔ M = N


@[simp]
theorem integral_log_of_pos (ha : 0 < a) (hb : 0 < b) :
    ∫ x in a..b, log x = b * log b - a * log a - b + a

∫ (x : ℝ) in a..b, Real.log x = b * Real.log b - a * Real.log a - b + a


@[simp]
theorem lt_one_iff_zero {c : Cardinal} : c < 1 ↔ c = 0


theorem IsNClique.insert (hs : G.IsNClique n s) (h : ∀ b ∈ s, G.Adj a b) :
    G.IsNClique (n + 1) (insert a s)

{α : Type u_1}
{G : SimpleGraph α}
{n : ℕ}
{s : Finset α}
{a : α}
[DecidableEq α]
(hs : G.IsNClique n s)
(h : ∀ b ∈ s, G.Adj a b)


theorem card_pos_of_affineSpan_eq_top {ι : Type*} [Fintype ι] {p : ι → P}
    (h : affineSpan k (range p) = ⊤) : 0 < Fintype.card ι

(k : Type u_1)
(V : Type u_2)
(P : Type u_3)
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
[Fintype ι]
{p : ι → P}
(h : affineSpan k (Set.range p) = ⊤)


theorem add_coe_eq_bot_iff : a + y = ⊥ ↔ a = ⊥

{α : Type u}
[Add α]
{a : WithBot α}
{y : α}


@[simp]
theorem basicOpen_one : basicOpen (1 : R) = ⊤


@[to_additive, field_simps] -- The attributes are out of order on purpose
theorem inv_eq_one_div (x : G) : x⁻¹ = 1 / x


/--
The double sum of weighted inner products of pairs of vectors from an orthonormal sequence is the
sum of the weights.
-/
theorem Orthonormal.inner_left_right_finset {s : Finset ι} {v : ι → E} (hv : Orthonormal 𝕜 v)
    {a : ι → ι → 𝕜} : (∑ i ∈ s, ∑ j ∈ s, a i j • ⟪v j, v i⟫) = ∑ k ∈ s, a k k

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

∑ i ∈ s, ∑ j ∈ s, a i j • ⟪v j, v i⟫_𝕜 = ∑ k ∈ s, a k k


theorem sub_add_eq (a b c : Nat) : a - (b + c) = a - b - c


@[simp] theorem some_eq_coe' (a : ℝ≥0) : (WithTop.some a : ℝ≥0∞) = (↑a : ℝ≥0∞)


theorem minSqFacAux_has_prop {n : ℕ} (k) (n0 : 0 < n) (i) (e : k = 2 * i + 3)
    (ih : ∀ m, Prime m → m ∣ n → k ≤ m) : MinSqFacProp n (minSqFacAux n k)

(ih : ∀ (m : ℕ), Nat.Prime m → m ∣ n → k ≤ m)


theorem dropn_congr {s t : WSeq α} (h : s ~ʷ t) (n) : drop s n ~ʷ drop t n

{α : Type u}
{s t : Stream'.WSeq α}
(h : s ~ʷ t)
(n : ℕ)


/-- We say that `R` satisfies the strong rank condition if `(Fin n → R) →ₗ[R] (Fin m → R)` injective
    implies `n ≤ m`. -/
@[mk_iff]
class StrongRankCondition : Prop where
  /-- Any injective linear map from `Rⁿ` to `Rᵐ` guarantees `n ≤ m`. -/
  le_of_fin_injective : ∀ {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R), Injective f → n ≤ m

StrongRankCondition R ↔ ∀ {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R), Function.Injective ⇑f → n ≤ m


@[simp] theorem sublist_append_left : ∀ l₁ l₂ : List α, l₁ <+ l₁ ++ l₂


/-- `Finset.cons` version of `Finset.Iio_insert`. -/
theorem Iic_eq_cons_Iio (b : α) : Iic b = (Iio b).cons b not_mem_Iio_self

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

Finset.Iic b = Finset.cons b (Finset.Iio b) ⋯


@[simp]
theorem flip_z : (flip u).z = u.w


theorem preservesEpimorphisms_of_preserves_of_reflects (F : C ⥤ D) (G : D ⥤ E)
    [PreservesEpimorphisms (F ⋙ G)] [ReflectsEpimorphisms G] : PreservesEpimorphisms 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 : C ⥤ D)
(G : D ⥤ E)
[(F ⋙ G).PreservesEpimorphisms]
[G.ReflectsEpimorphisms]


theorem coeToSubmodule_ne_bot {I : FractionalIdeal S P} : ↑I ≠ (⊥ : Submodule R P) ↔ I ≠ 0

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{I : FractionalIdeal S P}

↑I ≠ ⊥ ↔ I ≠ 0


@[simp]
theorem darts_map : (p.map f).darts = p.darts.map f.mapDart

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
(f : G →g G')
{u v : V}
(p : G.Walk u v)

(SimpleGraph.Walk.map f p).darts = List.map f.mapDart p.darts


@[simp, fun_prop]
theorem Differentiable.sum (h : ∀ i ∈ u, Differentiable 𝕜 (A i)) :
    Differentiable 𝕜 fun y => ∑ i ∈ u, A i y

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_6}
{u : Finset ι}
{A : ι → E → F}
(h : ∀ i ∈ u, Differentiable 𝕜 (A i))


@[simp]
theorem symm_trans_self (e : P₁ ≃ᵃL[k] P₂) : e.symm.trans e = refl k P₂

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)

e.symm.trans e = ContinuousAffineEquiv.refl k P₂


theorem comap_comap (S : L.Substructure P) (g : N →[L] P) (f : M →[L] N) :
    (S.comap g).comap f = S.comap (g.comp f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
{P : Type u_2}
[L.Structure M]
[L.Structure N]
[L.Structure P]
(S : L.Substructure P)
(g : L.Hom N P)
(f : L.Hom M N)

FirstOrder.Language.Substructure.comap f (FirstOrder.Language.Substructure.comap g S) =
  FirstOrder.Language.Substructure.comap (g.comp f) S


theorem upperSemicontinuousOn_biInf {p : ι → Prop} {f : ∀ i, p i → α → δ}
    (h : ∀ i hi, UpperSemicontinuousOn (f i hi) s) :
    UpperSemicontinuousOn (fun x' => ⨅ (i) (hi), f i hi x') s

(h : ∀ (i : ι) (hi : p i), UpperSemicontinuousOn (f i hi) s)

UpperSemicontinuousOn (fun x' => ⨅ i, ⨅ (hi : p i), f i hi x') s


@[simp]
theorem one_apply (n : ℕ) : (1 : AdicCauchySequence I R) n = 1

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(n : ℕ)


theorem cons_subset_of_subset_of_mem {a : α} {l m : List α}
    (ainm : a ∈ m) (lsubm : l ⊆ m) : a::l ⊆ m

{α : Type u}
{a : α}
{l m : List α}
(ainm : a ∈ m)
(lsubm : l ⊆ m)


@[simp]
theorem isVonNBounded_insert (x : E) {s : Set E} :
    IsVonNBounded 𝕜 (insert x s) ↔ IsVonNBounded 𝕜 s

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
(x : E)
{s : Set E}

Bornology.IsVonNBounded 𝕜 (insert x s) ↔ Bornology.IsVonNBounded 𝕜 s


/-- If a function and its derivative are integrable on the real line, then the integral of the
derivative is zero. -/
theorem integral_eq_zero_of_hasDerivAt_of_integrable
    (hderiv : ∀ x, HasDerivAt f (f' x) x) (hf' : Integrable f') (hf : Integrable f) :
    ∫ x, f' x = 0

(hderiv : ∀ (x : ℝ), HasDerivAt f (f' x) x)

(hf' : MeasureTheory.Integrable f' MeasureTheory.volume)

(hf : MeasureTheory.Integrable f MeasureTheory.volume)


/-- Affine translations of ample sets are ample. -/
theorem vadd [ContinuousAdd E] {s : Set E} (h : AmpleSet s) {y : E} :
    AmpleSet (y +ᵥ s)

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[ContinuousAdd E]
{s : Set E}
(h : AmpleSet s)
{y : E}


theorem vector_ofFn' {n} : Primrec (@Vector.ofFn α n)


theorem AddValuation.map_mul (x y : ℚ_[p]) :
    addValuationDef (x * y : ℚ_[p]) = addValuationDef x + addValuationDef y

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

(x * y).addValuationDef = x.addValuationDef + y.addValuationDef


/-- A linear map is an isometry if and it preserves the inner product. -/
theorem LinearMap.norm_map_iff_inner_map_map {F : Type*} [FunLike F E E'] [LinearMapClass F 𝕜 E E']
    (f : F) : (∀ x, ‖f x‖ = ‖x‖) ↔ (∀ x y, ⟪f x, f y⟫_𝕜 = ⟪x, y⟫_𝕜)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{E' : Type u_7}
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
{F : Type u_9}
[FunLike F E E']
[LinearMapClass F 𝕜 E E']
(f : F)

(∀ (x : E), ‖f x‖ = ‖x‖) ↔ ∀ (x y : E), ⟪f x, f y⟫_𝕜 = ⟪x, y⟫_𝕜


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

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


@[to_additive (attr := simp)] lemma mabs_mabs (a : α) : |(|a|ₘ)|ₘ = |a|ₘ

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


/-- `Matrix.comp` as `AddEquiv` -/
@[simps!]
def compAddEquiv : Matrix I J (Matrix K L R) ≃+ Matrix (I × K) (J × L) R

(I : Type u_1)
(J : Type u_2)
(K : Type u_3)
(L : Type u_4)
(R : Type u_5)
[AddCommMonoid R]
(n : Matrix (I × K) (J × L) R)
(i : I)
(j : J)
(k : K)
(l : L)

(Matrix.compAddEquiv I J K L R).symm n i j k l = n (i, k) (j, l)


theorem eq_false_of_or_eq_false_left {a b : Prop} (h : (a ∨ b) = False) : a = False


/-- Any element of `ZMod N` has the form `u * d` where `u` is a unit and `d` is a divisor of `N`. -/
lemma eq_unit_mul_divisor {N : ℕ} (a : ZMod N) :
    ∃ d : ℕ, d ∣ N ∧ ∃ (u : ZMod N), IsUnit u ∧ a = u * d


protected theorem isWellOrder [IsWellOrder β (· < ·)] (f : α ↪o β) : IsWellOrder α (· < ·)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[IsWellOrder β fun x x_1 => x < x_1]
(f : α ↪o β)


@[simp]
theorem partENatOfENat_toENat (c : Cardinal) : (toENat c : PartENat) = toPartENat c

↑(Cardinal.toENat c) = Cardinal.toPartENat c


/-- The map `Square Cᵒᵖ → Square C` which switches `X₁` and `X₃`, but
does not move `X₂` and `X₃`. -/
@[simps]
protected def unop (sq : Square Cᵒᵖ) : Square C

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(sq : CategoryTheory.Square Cᵒᵖ)


/-- The exponential characteristic is one iff the characteristic is zero. -/
theorem expChar_one_iff_char_zero (p q : ℕ) [CharP R p] [ExpChar R q] : q = 1 ↔ p = 0

(R : Type u)
[Semiring R]
[Nontrivial R]
(p q : ℕ)
[CharP R p]
[ExpChar R q]


/-- The topology of the Lévy-Prokhorov metric is at least as fine as the topology of convergence in
distribution. -/
theorem levyProkhorov_le_convergenceInDistribution :
    TopologicalSpace.coinduced (LevyProkhorov.toProbabilityMeasure (Ω := Ω)) inferInstance
      ≤ (inferInstance : TopologicalSpace (ProbabilityMeasure Ω))

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoMetricSpace Ω]
[OpensMeasurableSpace Ω]

TopologicalSpace.coinduced MeasureTheory.LevyProkhorov.toProbabilityMeasure inferInstance ≤ inferInstance


theorem total_apply_of_mem_supported {l : α →₀ R} {s : Finset α}
    (hs : l ∈ supported R R (↑s : Set α)) : Finsupp.total α M R v l = s.sum fun i => l i • v i

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{v : α → M}
{l : α →₀ R}
{s : Finset α}
(hs : l ∈ Finsupp.supported R R ↑s)

(Finsupp.total α M R v) l = ∑ i ∈ s, l i • v i


theorem union_pi : (s₁ ∪ s₂).pi t = s₁.pi t ∩ s₂.pi t

{ι : Type u_1}
{α : ι → Type u_2}
{s₁ s₂ : Set ι}
{t : (i : ι) → Set (α i)}


theorem lmarginal_union (f : (∀ i, π i) → ℝ≥0∞) (hf : Measurable f)
    (hst : Disjoint s t) : ∫⋯∫⁻_s ∪ t, f ∂μ = ∫⋯∫⁻_s, ∫⋯∫⁻_t, f ∂μ ∂μ

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

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


/-- Multiplicative equivalence between additive endomorphisms of an `AddZeroClass` `A`
and multiplicative endomorphisms of `Multiplicative A`. -/
@[simps!] def addMonoidEndToMultiplicative (A : Type*) [AddZeroClass A] :
    AddMonoid.End A ≃* Monoid.End (Multiplicative A)

(f : Multiplicative A →* Multiplicative A)

((addMonoidEndToMultiplicative A).symm f) a = Multiplicative.toAdd (f (Multiplicative.ofAdd a))


@[simp]
theorem restrictScalars_self (V : Submodule R M) : V.restrictScalars R = V

{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(V : Submodule R M)


theorem aeSeq_eq_fun_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α}
    (hx : x ∈ aeSeqSet hf p) (i : ι) : aeSeq hf p i x = f i x

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


@[simp]
theorem reindex_apply (i' : ι') : b.reindex e i' = b (e.symm i')

{ι : Type u_1}
{ι' : Type u_2}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
(e : ι ≃ ι')
(i' : ι')


theorem comp₂Measurable_eq_mk (g : β → γ → δ) (hg : Measurable (uncurry g)) (f₁ : α →ₘ[μ] β)
    (f₂ : α →ₘ[μ] γ) :
    comp₂Measurable g hg f₁ f₂ =
      mk (fun a => g (f₁ a) (f₂ a))
        (hg.comp_aemeasurable (f₁.aemeasurable.prod_mk f₂.aemeasurable)).aestronglyMeasurable

(g : β → γ → δ)

(f₁ : α →ₘ[μ] β)

(f₂ : α →ₘ[μ] γ)

MeasureTheory.AEEqFun.comp₂Measurable g hg f₁ f₂ = MeasureTheory.AEEqFun.mk (fun a => g (↑f₁ a) (↑f₂ a)) ⋯


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


@[simp] lemma coe_eq_ofNat (n : ℕ) [n.AtLeastTwo] (m : α) :
    (m : WithBot α) = no_index (OfNat.ofNat n) ↔ m = OfNat.ofNat n

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]
(m : α)


theorem submartingale_of_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
    (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]) :
    Submartingale f ℱ μ

{f : ι → Ω → ℝ}

(hint : ∀ (i : ι), MeasureTheory.Integrable (f i) μ)

(hf : ∀ (i j : ι), i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|↑ℱ i])


theorem Filter.Tendsto.sqrt {f : α → ℝ} {l : Filter α} {x : ℝ} (h : Tendsto f l (𝓝 x)) :
    Tendsto (fun x => √(f x)) l (𝓝 (√x))

{α : Type u_1}
{f : α → ℝ}
{l : Filter α}
{x : ℝ}
(h : Filter.Tendsto f l (𝓝 x))

Filter.Tendsto (fun x => √(f x)) l (𝓝 √x)


theorem eq_bot_or_nonempty (Q : AffineSubspace k P) : Q = ⊥ ∨ (Q : Set P).Nonempty

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
(Q : AffineSubspace k P)


/-- This is a special case of `tsub_zero`, which should be used instead of this.
  This is needed to prove `OrderedSub (Multiset α)`. -/
protected theorem sub_zero (s : Multiset α) : s - 0 = s

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


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
lemma image_nonempty : (s.image f).Nonempty ↔ s.Nonempty

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

(Finset.image f s).Nonempty ↔ s.Nonempty


/-- Note that `smul_inv'` refers to the group case, and `smul_inv` has an additional inverse
on `x`. -/
@[simp]
theorem smul_inv'' [MulSemiringAction M F] (x : M) (m : F) : x • m⁻¹ = (x • m)⁻¹

{M : Type u_1}
[Monoid M]
{F : Type u_2}
[DivisionRing F]
[MulSemiringAction M F]
(x : M)
(m : F)


/-- **Zhu Shijie's identity** aka hockey-stick identity. -/
theorem sum_Icc_choose (n k : ℕ) : ∑ m ∈ Icc k n, m.choose k = (n + 1).choose (k + 1)

∑ m ∈ Finset.Icc k n, m.choose k = (n + 1).choose (k + 1)


@[simp]
theorem ofSigmaCofork_ι_app_right' (c : Cofork I.fstSigmaMap I.sndSigmaMap) (b) :
    π (ofSigmaCofork I c) b = (Sigma.ι I.right b : _) ≫ c.π

(I : CategoryTheory.Limits.MultispanIndex C)

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

(CategoryTheory.Limits.Multicofork.ofSigmaCofork I c).π b =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Sigma.ι I.right b) c.π


theorem tsum_fiberwise (f : β → ℝ≥0∞) (g : β → γ) :
    ∑' x, ∑' b : g ⁻¹' {x}, f b = ∑' i, f i

{β : Type u_2}
{γ : Type u_3}
(f : β → ℝ≥0∞)
(g : β → γ)


theorem mk_eq_two_iff : #α = 2 ↔ ∃ x y : α, x ≠ y ∧ ({x, y} : Set α) = univ

Cardinal.mk α = 2 ↔ ∃ x y, x ≠ y ∧ {x, y} = Set.univ


@[reassoc]
lemma OpenCover.pullbackCoverAffineRefinementObjIso_inv_map (f : X ⟶ Y) (𝒰 : Y.OpenCover) (i) :
    (𝒰.pullbackCoverAffineRefinementObjIso f i).inv ≫
      (𝒰.affineRefinement.openCover.pullbackCover f).map i =
      ((𝒰.obj i.1).affineCover.pullbackCover (𝒰.pullbackHom f i.1)).map i.2 ≫
        (𝒰.pullbackCover f).map i.1

(i : (𝒰.affineRefinement.openCover.pullbackCover f).J)

(AlgebraicGeometry.Scheme.OpenCover.pullbackCoverAffineRefinementObjIso f 𝒰 i).inv ≫
    (𝒰.affineRefinement.openCover.pullbackCover f).map i =
  ((𝒰.obj i.fst).affineCover.pullbackCover (𝒰.pullbackHom f i.fst)).map i.snd ≫ (𝒰.pullbackCover f).map i.fst


theorem mapBiproduct_inv :
    haveI : HasBiproduct fun j => F.obj (f j) := hasBiproduct_of_preserves F f
    (mapBiproduct F f).inv = biproduct.desc fun j => F.map (biproduct.ι f j)

(F.mapBiproduct f).inv = CategoryTheory.Limits.biproduct.desc fun j => F.map (CategoryTheory.Limits.biproduct.ι f j)


theorem opNorm_pi {ι' : Type v'} [Fintype ι'] {E' : ι' → Type wE'}
    [∀ i', SeminormedAddCommGroup (E' i')] [∀ i', NormedSpace 𝕜 (E' i')]
    (f : ∀ i', ContinuousMultilinearMap 𝕜 E (E' i')) :
    ‖pi f‖ = ‖f‖

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

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

(f : (i' : ι') → ContinuousMultilinearMap 𝕜 E (E' i'))


theorem fg_of_ker_bot [IsNoetherian R P] {N : Submodule R M} (f : M →ₗ[R] P)
    (hf : LinearMap.ker f = ⊥) : N.FG

{R : Type u_1}
{M : Type u_2}
{P : Type u_3}
[Ring R]
[AddCommGroup M]
[AddCommGroup P]
[Module R M]
[Module R P]
[IsNoetherian R P]
{N : Submodule R M}
(f : M →ₗ[R] P)
(hf : LinearMap.ker f = ⊥)


theorem le_mul_of_one_le_of_le_of_nonneg [MulPosMono α] (ha : 1 ≤ a) (bc : b ≤ c) (c0 : 0 ≤ c) :
    b ≤ a * c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[MulPosMono α]
(ha : 1 ≤ a)
(bc : b ≤ c)
(c0 : 0 ≤ c)


@[to_additive]
theorem characteristic_iff_le_map : H.Characteristic ↔ ∀ ϕ : G ≃* G, H ≤ H.map ϕ.toMonoidHom

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

H.Characteristic ↔ ∀ (ϕ : G ≃+ G), H ≤ AddSubgroup.map ϕ.toAddMonoidHom H


theorem den_dvd (a b : ℤ) : ((a /. b).den : ℤ) ∣ b


@[simp]
theorem closedBall_diff_ball : closedBall x ε \ ball x ε = sphere x ε

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ}

Metric.closedBall x ε \ Metric.ball x ε = Metric.sphere x ε


theorem StrongMono.mk' {f : P ⟶ Q} [Mono f]
    (hf : ∀ (X Y : C) (z : X ⟶ Y) (_ : Epi z) (u : X ⟶ P)
      (v : Y ⟶ Q) (sq : CommSq u z f v), sq.HasLift) : StrongMono f

(hf :
  ∀ (X Y : C) (z : X ⟶ Y),
    CategoryTheory.Epi z → ∀ (u : X ⟶ P) (v : Y ⟶ Q) (sq : CategoryTheory.CommSq u z f v), sq.HasLift)


protected theorem isCompact :
    IsCompact (U : Set X)

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : AlgebraicGeometry.IsAffineOpen U)


theorem isArtinian_of_le {s t : Submodule R M} [IsArtinian R t] (h : s ≤ t) : IsArtinian R s

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
{s t : Submodule R M}
[IsArtinian R ↥t]
(h : s ≤ t)


theorem DifferentiableWithinAt.rpow_const (hf : DifferentiableWithinAt ℝ f s x)
    (h : f x ≠ 0 ∨ 1 ≤ p) : DifferentiableWithinAt ℝ (fun x => f x ^ p) s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
{p : ℝ}
(hf : DifferentiableWithinAt ℝ f s x)
(h : f x ≠ 0 ∨ 1 ≤ p)


protected theorem right_distrib (n m k : Nat) : (n + m) * k = n * k + m * k


@[mono]
theorem derivedSeriesOfIdeal_le {I J : LieIdeal R L} {k l : ℕ} (h₁ : I ≤ J) (h₂ : l ≤ k) :
    D k I ≤ D l J

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

LieAlgebra.derivedSeriesOfIdeal R L k I ≤ LieAlgebra.derivedSeriesOfIdeal R L l J


/-- A real function which is monotone on a set is differentiable Lebesgue-almost everywhere on
this set. This version does not assume that `s` is measurable. For a formulation with
`volume.restrict s` assuming that `s` is measurable, see `MonotoneOn.ae_differentiableWithinAt`.
-/
theorem MonotoneOn.ae_differentiableWithinAt_of_mem {f : ℝ → ℝ} {s : Set ℝ} (hf : MonotoneOn f s) :
    ∀ᵐ x, x ∈ s → DifferentiableWithinAt ℝ f s x

∀ᵐ (x : ℝ), x ∈ s → DifferentiableWithinAt ℝ f s x


theorem infinite_iff (h : M ≅[L] N) : Infinite M ↔ Infinite N

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(h : L.ElementarilyEquivalent M N)


theorem StrictConvex.preimage_smul (hs : StrictConvex 𝕜 s) (c : 𝕜) :
    StrictConvex 𝕜 ((fun z => c • z) ⁻¹' s)

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedCommSemiring 𝕜]
[TopologicalSpace E]
[AddCommGroup E]
[Module 𝕜 E]
[NoZeroSMulDivisors 𝕜 E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : StrictConvex 𝕜 s)
(c : 𝕜)


@[simp]
protected theorem «exists» {q : { a // p a } → Prop} : (∃ x, q x) ↔ ∃ a b, q ⟨a, b⟩

{α : Sort u_1}
{p : α → Prop}
{q : { a // p a } → Prop}


@[simp]
theorem functor_map {I : Type u₁} (F : I → C) {i : Discrete I} (f : i ⟶ i) :
    (Discrete.functor F).map f = 𝟙 (F i.as)

{C : Type u₂}
[CategoryTheory.Category.{v₂, u₂} C]
{I : Type u₁}
(F : I → C)
{i : CategoryTheory.Discrete I}
(f : i ⟶ i)

(CategoryTheory.Discrete.functor F).map f = CategoryTheory.CategoryStruct.id (F i.as)


theorem isExtreme_biInter {F : Set (Set E)} (hF : F.Nonempty) (hA : ∀ B ∈ F, IsExtreme 𝕜 A B) :
    IsExtreme 𝕜 A (⋂ B ∈ F, B)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{A : Set E}
{F : Set (Set E)}
(hF : F.Nonempty)
(hA : ∀ B ∈ F, IsExtreme 𝕜 A B)


/-- Universe polymorphic version of the reverse implication of `mem_convexHull_iff_exists_fintype`.
-/
lemma mem_convexHull_of_exists_fintype {s : Set E} {x : E} [Fintype ι] (w : ι → R) (z : ι → E)
    (hw₀ : ∀ i, 0 ≤ w i) (hw₁ : ∑ i, w i = 1) (hz : ∀ i, z i ∈ s) (hx : ∑ i, w i • z i = x) :
    x ∈ convexHull R s

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{s : Set E}
{x : E}
[Fintype ι]
(w : ι → R)
(z : ι → E)
(hw₀ : ∀ (i : ι), 0 ≤ w i)
(hw₁ : ∑ i : ι, w i = 1)
(hz : ∀ (i : ι), z i ∈ s)
(hx : ∑ i : ι, w i • z i = x)


theorem associated_generator_span_self [IsPrincipalIdealRing R] [IsDomain R] (r : R) :
    Associated (generator <| Ideal.span {r}) r

{R : Type u}
[CommRing R]
[IsPrincipalIdealRing R]
[IsDomain R]
(r : R)

Associated (Submodule.IsPrincipal.generator (Ideal.span {r})) r


theorem rmap_sets (r : Rel α β) (l : Filter α) : (l.rmap r).sets = r.core ⁻¹' l.sets

{α : Type u}
{β : Type v}
(r : Rel α β)
(l : Filter α)

(Filter.rmap r l).sets = r.core ⁻¹' l.sets


theorem not_infPrime_top : ¬InfPrime (⊤ : α)

{α : Type u_2}
[SemilatticeInf α]
[OrderTop α]


@[simp]
protected theorem map_zero : (0 : R[X]).map f = 0

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


theorem Periodic.nat_mul_eq [Semiring α] (h : Periodic f c) (n : ℕ) : f (n * c) = f 0

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[Semiring α]
(h : Function.Periodic f c)
(n : ℕ)


/-- The volume form on an oriented real inner product space can be evaluated as the determinant with
respect to any orthonormal basis of the space compatible with the orientation. -/
theorem volumeForm_robust_neg (b : OrthonormalBasis (Fin n) ℝ E) (hb : b.toBasis.orientation ≠ o) :
    o.volumeForm = -b.toBasis.det

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


@[simp]
theorem deriv_mul_zero : deriv (HMul.hMul 0) = id


/-- `log` is analytic away from nonpositive reals -/
theorem AnalyticOn.clog (fs : AnalyticOn ℂ f s) (m : ∀ z ∈ s, f z ∈ slitPlane) :
    AnalyticOn ℂ (fun z ↦ log (f z)) s

{E : Type}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{s : Set E}
(fs : AnalyticOn ℂ f s)
(m : ∀ z ∈ s, f z ∈ Complex.slitPlane)

AnalyticOn ℂ (fun z => Complex.log (f z)) s


@[simp, mfld_simps]
theorem coe_chartAt_fst (p q : TM) : ((chartAt (ModelProd H E) q) p).1 = chartAt H q.1 p.1

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_4}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u_6)
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
(p q : TangentBundle I M)

(↑(chartAt (ModelProd H E) q) p).1 = ↑(chartAt H q.proj) p.proj


@[simp]
theorem coe_maxTrivLinearMapEquivLieModuleHom (f : maxTrivSubmodule R L (M →ₗ[R] N)) :
    (maxTrivLinearMapEquivLieModuleHom f : M → N) = f

(f : ↥(LieModule.maxTrivSubmodule R L (M →ₗ[R] N)))

⇑(LieModule.maxTrivLinearMapEquivLieModuleHom f) = ⇑↑f


@[simp] theorem neg_eval (lc : LinearCombo) (v : Coeffs) : (-lc).eval v = - lc.eval v

(lc : Lean.Omega.LinearCombo)
(v : Lean.Omega.Coeffs)


theorem definable_iff_finitely_definable :
    A.Definable L s ↔ ∃ (A0 : Finset M), (A0 : Set M) ⊆ A ∧
      (A0 : Set M).Definable L s

{M : Type w}
{A : Set M}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{s : Set (α → M)}

A.Definable L s ↔ ∃ A0, ↑A0 ⊆ A ∧ (↑A0).Definable L s


@[to_additive (attr := simp)]
theorem div_mul_cancel_left (a b : G) : a / (a * b) = b⁻¹


/-- The number of times an irreducible factor `p` appears in `normalizedFactors x` is defined by
the number of times it divides `x`.

See also `multiplicity_eq_count_normalizedFactors` if `n` is given by `multiplicity p x`.
-/
theorem count_normalizedFactors_eq [DecidableEq R] {p x : R} (hp : Irreducible p)
    (hnorm : normalize p = p) {n : ℕ} (hle : p ^ n ∣ x) (hlt : ¬p ^ (n + 1) ∣ x) :
    (normalizedFactors x).count p = n

{R : Type u_2}
[CancelCommMonoidWithZero R]
[UniqueFactorizationMonoid R]
[NormalizationMonoid R]
[DecidableEq R]
{p x : R}
(hp : Irreducible p)
(hnorm : normalize p = p)
{n : ℕ}
(hle : p ^ n ∣ x)
(hlt : ¬p ^ (n + 1) ∣ x)

Multiset.count p (UniqueFactorizationMonoid.normalizedFactors x) = n


theorem directed_distinctConstantsTheory :
    Directed (· ⊆ ·) (L.distinctConstantsTheory : Set α → L[[α]].Theory)

Directed (fun x x_1 => x ⊆ x_1) L.distinctConstantsTheory


theorem comap_map_eq (f : A →ₐ[R] B) (S : Subalgebra R A) :
    (S.map f).comap f = S ⊔ Algebra.adjoin R (f ⁻¹' {0})

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Ring A]
[Algebra R A]
[Ring B]
[Algebra R B]
(f : A →ₐ[R] B)
(S : Subalgebra R A)

Subalgebra.comap f (Subalgebra.map f S) = S ⊔ Algebra.adjoin R (⇑f ⁻¹' {0})