/-- A monoid homomorphism `M →* N` can equivalently be viewed as a monoid homomorphism
`Mᵐᵒᵖ →* Nᵐᵒᵖ`. This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[to_additive (attr := simps)
      "An additive monoid homomorphism `M →+ N` can equivalently be viewed as an
      additive monoid homomorphism `Mᵃᵒᵖ →+ Nᵃᵒᵖ`. This is the action of the (fully faithful)
      `ᵃᵒᵖ`-functor on morphisms."]
def MonoidHom.op {M N} [MulOneClass M] [MulOneClass N] : (M →* N) ≃ (Mᵐᵒᵖ →* Nᵐᵒᵖ)

{M : Type u_2}
{N : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)

∀ (a : Mᵃᵒᵖ), (AddMonoidHom.op f) a = (AddOpposite.op ∘ ⇑f ∘ AddOpposite.unop) a


/-- The `MonoidHom` from a submonoid to its image.
See `MulEquiv.SubmonoidMap` for a variant for `MulEquiv`s. -/
@[to_additive (attr := simps)
      "the `AddMonoidHom` from an additive submonoid to its image. See
      `AddEquiv.AddSubmonoidMap` for a variant for `AddEquiv`s."]
def submonoidMap (f : M →* N) (M' : Submonoid M) : M' →* M'.map f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
(M' : AddSubmonoid M)
(x : ↥M')


theorem pi_apply_single [Fintype ι] [DecidableEq ι]
    (Q : ∀ i, QuadraticMap R (Mᵢ i) P) (i : ι) (m : Mᵢ i) :
    pi Q (Pi.single i m) = Q i m

{ι : Type u_1}
{R : Type u_2}
{P : Type u_7}
{Mᵢ : ι → Type u_8}
[CommSemiring R]
[(i : ι) → AddCommMonoid (Mᵢ i)]
[AddCommMonoid P]
[(i : ι) → Module R (Mᵢ i)]
[Module R P]
[Fintype ι]
[DecidableEq ι]
(Q : (i : ι) → QuadraticMap R (Mᵢ i) P)
(i : ι)
(m : Mᵢ i)

(QuadraticMap.pi Q) (Pi.single i m) = (Q i) m


theorem openEmbedding_coe : OpenEmbedding ((↑) : X → OnePoint X)


/-- Given left homology data `h₁` and `h₂` for two short complexes `S₁` and `S₂`,
a `LeftHomologyMapData` for a morphism `φ : S₁ ⟶ S₂`
consists of a description of the induced morphisms on the `K` (cycles)
and `H` (left homology) fields of `h₁` and `h₂`. -/
structure LeftHomologyMapData where
  /-- the induced map on cycles -/
  φK : h₁.K ⟶ h₂.K
  /-- the induced map on left homology -/
  φH : h₁.H ⟶ h₂.H
  /-- commutation with `i` -/
  commi : φK ≫ h₂.i = h₁.i ≫ φ.τ₂ := by aesop_cat
  /-- commutation with `f'` -/
  commf' : h₁.f' ≫ φK = φ.τ₁ ≫ h₂.f' := by aesop_cat
  /-- commutation with `π` -/
  commπ : h₁.π ≫ φH = φK ≫ h₂.π := by aesop_cat

(self : CategoryTheory.ShortComplex.LeftHomologyMapData φ h₁ h₂)

CategoryTheory.CategoryStruct.comp h₁.f' self.φK = CategoryTheory.CategoryStruct.comp φ.τ₁ h₂.f'


theorem equivalence₂_inverse :
    (equivalence₂ eB hF).inverse = eB.functor ⋙ e'.inverse ⋙ eA.inverse

{A : Type u_1}
{A' : Type u_2}
{B : Type u_3}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_7, u_2} A']
[CategoryTheory.Category.{u_6, u_3} B]
[CategoryTheory.Category.{u_8, u_4} B']
{eA : A ≌ A'}
(eB : B ≌ B')
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)

(AlgebraicTopology.DoldKan.Compatibility.equivalence₂ eB hF).inverse = eB.functor ⋙ e'.inverse ⋙ eA.inverse


@[simp]
theorem comap_top (f : A →ₙₐ[R] B) : (⊤ : NonUnitalSubalgebra R B).comap f = ⊤

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[IsScalarTower R B B]
[SMulCommClass R B B]
(f : A →ₙₐ[R] B)


theorem perm_insert {a} {b : β a} {s₁ s₂ : AList β} (p : s₁.entries ~ s₂.entries) :
    (insert a b s₁).entries ~ (insert a b s₂).entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{b : β a}
{s₁ s₂ : AList β}
(p : s₁.entries ~ s₂.entries)

(AList.insert a b s₁).entries ~ (AList.insert a b s₂).entries


theorem unbounded_of_tendsto_atTop' [Nonempty α] [SemilatticeInf α] [Preorder β] [NoMaxOrder β]
    {f : α → β} (h : Tendsto f atBot atTop) : ¬BddAbove (range f)

(h : Filter.Tendsto f Filter.atBot Filter.atTop)


theorem embeddingPiTangent_ker_mfderiv (x : M) (hx : x ∈ s) :
    LinearMap.ker (mfderiv I 𝓘(ℝ, ι → E × ℝ) f.embeddingPiTangent x) = ⊥

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[T2Space M]
[hi : Fintype ι]
{s : Set M}
(f : SmoothBumpCovering ι I M s)
(x : M)
(hx : x ∈ s)

LinearMap.ker (mfderiv I 𝓘(ℝ, ι → E × ℝ) (⇑f.embeddingPiTangent) x) = ⊥


/-- If you rotate a triangle, you get another triangle.
Given a triangle of the form:
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
applying `rotate` gives a triangle of the form:
```
      g       h        -f⟦1⟧'
  Y  ───> Z  ───>  X⟦1⟧ ───> Y⟦1⟧
```
-/
@[simps!]
def Triangle.rotate (T : Triangle C) : Triangle C

(T : CategoryTheory.Pretriangulated.Triangle C)


@[simp] theorem id_apply {X : C} (x : X) : (𝟙 X : X → X) x = x

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

(CategoryTheory.CategoryStruct.id X) x = x


/-- In a seminormed ring, the right-multiplication `AddMonoidHom` is bounded. -/
theorem mulRight_bound (x : α) : ∀ y : α, ‖AddMonoidHom.mulRight x y‖ ≤ ‖x‖ * ‖y‖

{α : Type u_1}
[NonUnitalSeminormedRing α]
(x y : α)

‖(AddMonoidHom.mulRight x) y‖ ≤ ‖x‖ * ‖y‖


/-- An additive action such that for all `c`, the map `fun x ↦ c +ᵥ x` is uniformly continuous. -/
class UniformContinuousConstVAdd [VAdd M X] : Prop where
  uniformContinuous_const_vadd : ∀ c : M, UniformContinuous (c +ᵥ · : X → X)

{M : Type v}
{X : Type x}
[UniformSpace X]
[VAdd M X]
[self : UniformContinuousConstVAdd M X]
(c : M)


theorem Filter.HasBasis.equicontinuousWithinAt_iff {κ₁ κ₂ : Type*} {p₁ : κ₁ → Prop}
    {s₁ : κ₁ → Set X} {p₂ : κ₂ → Prop} {s₂ : κ₂ → Set (α × α)} {F : ι → X → α} {S : Set X} {x₀ : X}
    (hX : (𝓝[S] x₀).HasBasis p₁ s₁) (hα : (𝓤 α).HasBasis p₂ s₂) :
    EquicontinuousWithinAt F S x₀ ↔
      ∀ k₂, p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ x ∈ s₁ k₁, ∀ i, (F i x₀, F i x) ∈ s₂ k₂

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{κ₁ : Type u_13}
{κ₂ : Type u_14}
{p₁ : κ₁ → Prop}
{s₁ : κ₁ → Set X}
{p₂ : κ₂ → Prop}
{s₂ : κ₂ → Set (α × α)}
{F : ι → X → α}
{S : Set X}
{x₀ : X}
(hX : (nhdsWithin x₀ S).HasBasis p₁ s₁)
(hα : (uniformity α).HasBasis p₂ s₂)

EquicontinuousWithinAt F S x₀ ↔ ∀ (k₂ : κ₂), p₂ k₂ → ∃ k₁, p₁ k₁ ∧ ∀ x ∈ s₁ k₁, ∀ (i : ι), (F i x₀, F i x) ∈ s₂ k₂


/-- Given an integrable function `f` with values in `ℝ≥0`, there exists an upper semicontinuous
function `g ≤ f` with integral arbitrarily close to that of `f`. Formulation in terms of
`lintegral`.
Auxiliary lemma for Vitali-Carathéodory theorem `exists_lt_lower_semicontinuous_integral_lt`. -/
theorem exists_upperSemicontinuous_le_lintegral_le (f : α → ℝ≥0) (int_f : (∫⁻ x, f x ∂μ) ≠ ∞)
    {ε : ℝ≥0∞} (ε0 : ε ≠ 0) :
    ∃ g : α → ℝ≥0, (∀ x, g x ≤ f x) ∧ UpperSemicontinuous g ∧
      (∫⁻ x, f x ∂μ) ≤ (∫⁻ x, g x ∂μ) + ε

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
{μ : MeasureTheory.Measure α}
[μ.WeaklyRegular]
(f : α → ℝ≥0)
(int_f : ∫⁻ (x : α), ↑(f x) ∂μ ≠ ⊤)
{ε : ℝ≥0∞}
(ε0 : ε ≠ 0)

∃ g, (∀ (x : α), g x ≤ f x) ∧ UpperSemicontinuous g ∧ ∫⁻ (x : α), ↑(f x) ∂μ ≤ ∫⁻ (x : α), ↑(g x) ∂μ + ε


theorem tendsto_one_div_atTop_nhds_zero_nat : Tendsto (fun n : ℕ ↦ 1/(n : ℝ)) atTop (𝓝 0)

Filter.Tendsto (fun n => 1 / ↑n) Filter.atTop (𝓝 0)


theorem continuous_def {_ : TopologicalSpace X} {_ : TopologicalSpace Y} {f : X → Y} :
    Continuous f ↔ ∀ s, IsOpen s → IsOpen (f ⁻¹' s)

∀ {x : TopologicalSpace X} {x_1 : TopologicalSpace Y} {f : X → Y},
  Continuous f ↔ ∀ (s : Set Y), IsOpen s → IsOpen (f ⁻¹' s)


@[simp]
theorem toRelIsoLT_ofRelIsoLT {α β} [PartialOrder α] [PartialOrder β]
    (e : ((· < ·) : α → α → Prop) ≃r ((· < ·) : β → β → Prop)) : toRelIsoLT (ofRelIsoLT e) = e


/-- If the distance between consecutive points of a sequence is estimated by a summable series,
then the original sequence is a Cauchy sequence. -/
theorem cauchySeq_of_dist_le_of_summable (d : ℕ → ℝ) (hf : ∀ n, dist (f n) (f n.succ) ≤ d n)
    (hd : Summable d) : CauchySeq f

(hf : ∀ (n : ℕ), dist (f n) (f n.succ) ≤ d n)


@[simp]
theorem sumProdDistrib_apply_left (a : α) (c : γ) :
    sumProdDistrib α β γ (Sum.inl a, c) = Sum.inl (a, c)

{α : Type u_1}
{γ : Type u_2}
{β : Type u_3}
(a : α)
(c : γ)

(Equiv.sumProdDistrib α β γ) (Sum.inl a, c) = Sum.inl (a, c)


theorem Convex.starConvex (hs : Convex 𝕜 s) (hx : x ∈ s) : StarConvex 𝕜 x s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{s : Set E}
{x : E}
(hs : Convex 𝕜 s)
(hx : x ∈ s)


/-- Dual cone of the total space is the convex cone {0}. -/
@[simp]
theorem innerDualCone_univ : (univ : Set H).innerDualCone = 0

{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace ℝ H]


/-- The conditional expectation of a function `f` of the product `(X, Y)` is almost everywhere equal
to the integral of `y ↦ f(X, y)` against the `condDistrib` kernel. -/
theorem condexp_prod_ae_eq_integral_condDistrib₀ [NormedSpace ℝ F] [CompleteSpace F]
    (hX : Measurable X) (hY : AEMeasurable Y μ)
    (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a)))
    (hf_int : Integrable (fun a => f (X a, Y a)) μ) :
    μ[fun a => f (X a, Y a)|mβ.comap X] =ᵐ[μ] fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)

(hf : MeasureTheory.AEStronglyMeasurable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

(hf_int : MeasureTheory.Integrable (fun a => f (X a, Y a)) μ)

μ[fun a => f (X a, Y a)|MeasurableSpace.comap X mβ] =ᵐ[μ] fun a =>
  ∫ (y : Ω), f (X a, y) ∂(ProbabilityTheory.condDistrib Y X μ) (X a)


theorem ultrafilter_extend_extends (f : α → γ) : Ultrafilter.extend f ∘ pure = f

{α : Type u}
{γ : Type u_1}
[TopologicalSpace γ]
[T2Space γ]
(f : α → γ)


/-- Composition of module object morphisms. -/
@[simps]
def comp {M N O : Mod_ A} (f : Hom M N) (g : Hom N O) : Hom M O

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


theorem zipWith_rotate_distrib {β γ : Type*} (f : α → β → γ) (l : List α) (l' : List β) (n : ℕ)
    (h : l.length = l'.length) :
    (zipWith f l l').rotate n = zipWith f (l.rotate n) (l'.rotate n)

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
(f : α → β → γ)
(l : List α)
(l' : List β)
(n : ℕ)
(h : l.length = l'.length)

(List.zipWith f l l').rotate n = List.zipWith f (l.rotate n) (l'.rotate n)


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

Complex.cos x ^ 2 + Complex.sin x ^ 2 = 1


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

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

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


/-- In an R₁ space, a point belongs to the closure of a compact set `K`
if and only if it is topologically inseparable from some point of `K`. -/
theorem IsCompact.mem_closure_iff_exists_inseparable {K : Set X} (hK : IsCompact K) :
    y ∈ closure K ↔ ∃ x ∈ K, Inseparable x y

{X : Type u_1}
[TopologicalSpace X]
[R1Space X]
{y : X}
{K : Set X}
(hK : IsCompact K)


@[simp]
theorem bijective_comp (e : E) (f : β → γ) : Function.Bijective (f ∘ e) ↔ Function.Bijective f

{E : Sort u_1}
{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
[iE : EquivLike E α β]
(e : E)
(f : β → γ)

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


@[ext]
theorem ext (h : ∀ x, e x = e' x) : e = e'

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{e e' : A ≃ₗc[R] B}
(h : ∀ (x : A), e x = e' x)


/-- An inequality of Daykin. Interestingly, any lattice in which this inequality holds is
distributive. -/
lemma Finset.le_card_infs_mul_card_sups [DecidableEq α] (s t : Finset α) :
    s.card * t.card ≤ (s ⊼ t).card * (s ⊻ t).card

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


theorem pow_lt_pow_right_of_lt_one (h₀ : 0 < a) (h₁ : a < 1) (hmn : m < n) : a ^ n < a ^ m

{R : Type u_3}
[StrictOrderedSemiring R]
{a : R}
{n m : ℕ}
(h₀ : 0 < a)
(h₁ : a < 1)
(hmn : m < n)


/-- If `C` has disjoint coproducts, any morphism out of initial is mono. Note it isn't true in
general that `C` has strict initial objects, for instance consider the category of types and
partial functions. -/
theorem initialMonoClass_of_disjoint_coproducts [CoproductsDisjoint C] : InitialMonoClass C


theorem IsPiSystem.singleton {α} (S : Set α) : IsPiSystem ({S} : Set (Set α))


/-- The angle between two vectors is zero if and only if they are
nonzero and one is a positive multiple of the other. -/
theorem angle_eq_zero_iff {x y : V} : angle x y = 0 ↔ x ≠ 0 ∧ ∃ r : ℝ, 0 < r ∧ y = r • x

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}

InnerProductGeometry.angle x y = 0 ↔ x ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • x


/-- A category with binary coproducts has a functorial `sup` operation on over categories. -/
@[simps]
def Over.coprod [HasBinaryCoproducts C] {A : C} : Over A ⥤ Over A ⥤ Over A

CategoryTheory.Over.coprod.obj f = f.coprodObj


@[simp]
theorem support_ofFinsupp (p) : support (⟨p⟩ : R[X]) = p.support


lemma W.mk' {T : Triangle C} (hT : T ∈ distTriang C) (h : S.P T.obj₁) : S.W T.mor₂

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

(S : CategoryTheory.Triangulated.Subcategory C)

{T : CategoryTheory.Pretriangulated.Triangle C}

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


theorem mem_map_of_surjective {y : L'} (h₁ : Function.Surjective f) (h₂ : y ∈ I.map f) :
    ∃ x : I, f x = y

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
{f : L →ₗ⁅R⁆ L'}
{I : LieIdeal R L}
{y : L'}
(h₁ : Function.Surjective ⇑f)
(h₂ : y ∈ LieIdeal.map f I)


theorem encard_image_le (f : α → β) (s : Set α) : (f '' s).encard ≤ s.encard

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


/-- A special case of `integral_Iic_of_hasDerivAt_of_tendsto` where we assume that `f` is C^1 with
compact support. -/
theorem _root_.HasCompactSupport.integral_Iic_deriv_eq (hf : ContDiff ℝ 1 f)
    (h2f : HasCompactSupport f) (b : ℝ) : ∫ x in Iic b, deriv f x = f b

{E : Type u_1}
{f : ℝ → E}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
(hf : ContDiff ℝ 1 f)
(h2f : HasCompactSupport f)
(b : ℝ)


theorem zero_or_exists_apply_eq_finset_sup (p : ι → Seminorm 𝕜 E) (s : Finset ι) (x : E) :
    s.sup p x = 0 ∨ ∃ i ∈ s, s.sup p x = p i x

{𝕜 : Type u_3}
{E : Type u_7}
{ι : Type u_12}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : ι → Seminorm 𝕜 E)
(s : Finset ι)
(x : E)

(s.sup p) x = 0 ∨ ∃ i ∈ s, (s.sup p) x = (p i) x


/-- Pons asinorum, oriented angle-at-point form. -/
theorem oangle_eq_oangle_of_dist_eq {p₁ p₂ p₃ : P} (h : dist p₁ p₂ = dist p₁ p₃) :
    ∡ p₁ p₂ p₃ = ∡ p₂ p₃ p₁

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

∡ p₁ p₂ p₃ = ∡ p₂ p₃ p₁


@[simp]
theorem pow_factors [Nontrivial α] {a : Associates α} {k : ℕ} :
    (a ^ k).factors = k • a.factors

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
[Nontrivial α]
{a : Associates α}
{k : ℕ}


/-- If two cyclic permutations agree on all terms in their intersection,
and that intersection is not empty, then the two cyclic permutations must be equal. -/
theorem IsCycle.eq_on_support_inter_nonempty_congr (hf : IsCycle f) (hg : IsCycle g)
    (h : ∀ x ∈ f.support ∩ g.support, f x = g x)
    (hx : f x = g x) (hx' : x ∈ f.support) : f = g


@[to_additive (attr := simp,norm_cast)]
theorem coe_one : ((1 : UpperSet α) : Set α) = Set.Ici 1


/-- Given an antitone basis `s : ℕ → Set α` of a filter, extract an antitone subbasis `s ∘ φ`,
`φ : ℕ → ℕ`, such that `m < n` implies `r (φ m) (φ n)`. This lemma can be used to extract an
antitone basis with basis sets decreasing "sufficiently fast". -/
theorem HasAntitoneBasis.subbasis_with_rel {f : Filter α} {s : ℕ → Set α}
    (hs : f.HasAntitoneBasis s) {r : ℕ → ℕ → Prop} (hr : ∀ m, ∀ᶠ n in atTop, r m n) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ (∀ ⦃m n⦄, m < n → r (φ m) (φ n)) ∧ f.HasAntitoneBasis (s ∘ φ)

(hr : ∀ (m : ℕ), ∀ᶠ (n : ℕ) in Filter.atTop, r m n)

∃ φ, StrictMono φ ∧ (∀ ⦃m n : ℕ⦄, m < n → r (φ m) (φ n)) ∧ f.HasAntitoneBasis (s ∘ φ)


lemma subtypeEquivRight_symm_apply {p q : α → Prop} (e : ∀ x, p x ↔ q x)
    (z : { x // q x }) : (subtypeEquivRight e).symm z = ⟨z, (e z.1).mpr z.2⟩

{α : Sort u_1}
{p q : α → Prop}
(e : ∀ (x : α), p x ↔ q x)
(z : { x // q x })

(Equiv.subtypeEquivRight e).symm z = ⟨↑z, ⋯⟩


/-- A normed field is a field with a norm satisfying ‖x y‖ = ‖x‖ ‖y‖. -/
class NormedField (α : Type*) extends Norm α, Field α, MetricSpace α where
  /-- The distance is induced by the norm. -/
  dist_eq : ∀ x y, dist x y = norm (x - y)
  /-- The norm is multiplicative. -/
  norm_mul' : ∀ a b, norm (a * b) = norm a * norm b

{α : Type u_5}
[self : NormedField α]
(a b : α)


theorem rpow_pos {p : ℝ} {x : ℝ≥0∞} (hx_pos : 0 < x) (hx_ne_top : x ≠ ⊤) : 0 < x ^ p


theorem subset_closure (s : Set β) : s ⊆ l s

{α : Type u_1}
{β : Type u_4}
[SetLike α β]
(l : LowerAdjoint SetLike.coe)
(s : Set β)


theorem eventually_eq_or_eq_zero_of_isLocalMin_norm {f : E → ℂ} {c : E}
    (hf : ∀ᶠ z in 𝓝 c, DifferentiableAt ℂ f z) (hc : IsLocalMin (norm ∘ f) c) :
    (∀ᶠ z in 𝓝 c, f z = f c) ∨ f c = 0

(hf : ∀ᶠ (z : E) in 𝓝 c, DifferentiableAt ℂ f z)

(∀ᶠ (z : E) in 𝓝 c, f z = f c) ∨ f c = 0


@[simp]
theorem mul_toInvSubmonoid (m : M) : algebraMap R S m * (toInvSubmonoid M S m : S) = 1

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
(S : Type u_2)
[CommRing S]
[Algebra R S]
[IsLocalization M S]
(m : ↥M)

(algebraMap R S) ↑m * ↑((IsLocalization.toInvSubmonoid M S) m) = 1


@[reassoc (attr := simp)]
lemma liftHomology_ι (k : A ⟶ S.opcycles) (hk : k ≫ S.fromOpcycles = 0) :
    S.liftHomology k hk ≫ S.homologyι = k

(hk : CategoryTheory.CategoryStruct.comp k S.fromOpcycles = 0)

CategoryTheory.CategoryStruct.comp (S.liftHomology k hk) S.homologyι = k


theorem norm_eq_one_iff' {d : ℤ} (hd : d ≤ 0) (z : ℤ√d) : z.norm = 1 ↔ IsUnit z


theorem omega_le {o : Ordinal} : ω ≤ o ↔ ∀ n : ℕ, ↑n ≤ o


/-- The cross product of two vectors is perpendicular to the first vector. -/
@[simp 1100] -- Porting note: increase priority so that the LHS doesn't simplify
theorem dot_self_cross (v w : Fin 3 → R) : v ⬝ᵥ v ×₃ w = 0

{R : Type u_1}
[CommRing R]
(v w : Fin 3 → R)


theorem raise_lower : ∀ {l n}, List.Sorted (· ≤ ·) (n :: l) → raise (lower l n) n = l

List.Sorted (fun x x_1 => x ≤ x_1) (n :: l) → Denumerable.raise (Denumerable.lower l n) n = l


@[simp]
theorem curry_apply_cons {n : ℕ} {α} {p : Fin n → Type u} {τ : Type u}
    (f : ((i : Fin (n + 1)) → (vecCons α p) i) → τ) (a : α) :
    curry f a = @curry _ p _ (f ∘' Fin.cons a)

(f : ((i : Fin (n + 1)) → Matrix.vecCons α p i) → τ)

Function.FromTypes.curry f a = Function.FromTypes.curry ((fun {x} => f) ∘' Fin.cons a)


/-- The canonical isomorphism `K.X j ≅ K.opCycles j` when the differential to `j` is zero. -/
@[simps! hom]
noncomputable def pOpcyclesIso : K.X j ≅ K.opcycles j

(K.pOpcyclesIso i j hi h).hom = K.pOpcycles j


@[simp]
theorem sign_trans (f g : Perm α) : sign (f.trans g) = sign g * sign f

{α : Type u}
[DecidableEq α]
[Fintype α]
(f g : Equiv.Perm α)

Equiv.Perm.sign (Equiv.trans f g) = Equiv.Perm.sign g * Equiv.Perm.sign f


@[simp]
theorem piCongrRight_trans {ι : Type*} {R S T : ι → Type*}
    [∀ i, NonUnitalNonAssocSemiring (R i)] [∀ i, NonUnitalNonAssocSemiring (S i)]
    [∀ i, NonUnitalNonAssocSemiring (T i)] (e : ∀ i, R i ≃+* S i) (f : ∀ i, S i ≃+* T i) :
    (piCongrRight e).trans (piCongrRight f) = piCongrRight fun i => (e i).trans (f i)

[(i : ι) → NonUnitalNonAssocSemiring (R i)]

[(i : ι) → NonUnitalNonAssocSemiring (S i)]

[(i : ι) → NonUnitalNonAssocSemiring (T i)]

(RingEquiv.piCongrRight e).trans (RingEquiv.piCongrRight f) = RingEquiv.piCongrRight fun i => (e i).trans (f i)


theorem ContMDiffWithinAt.clm_postcomp {f : M → F₂ →L[𝕜] F₃} {s : Set M} {x : M}
    (hf : ContMDiffWithinAt I 𝓘(𝕜, F₂ →L[𝕜] F₃) n f s x) :
    ContMDiffWithinAt I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) n
      (fun y ↦ (f y).postcomp F₁ : M → (F₁ →L[𝕜] F₂) →L[𝕜] (F₁ →L[𝕜] F₃)) s x

ContMDiffWithinAt I 𝓘(𝕜, (F₁ →L[𝕜] F₂) →L[𝕜] F₁ →L[𝕜] F₃) n (fun y => ContinuousLinearMap.postcomp F₁ (f y)) s x


theorem noncommFoldr_cons (s : Multiset α) (a : α) (h h') (b : β) :
    noncommFoldr f (a ::ₘ s) h b = f a (noncommFoldr f s h' b)

(f : α → β → β)

(h : {x | x ∈ a ::ₘ s}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b))

(h' : {x | x ∈ s}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b))

Multiset.noncommFoldr f (a ::ₘ s) h b = f a (Multiset.noncommFoldr f s h' b)


theorem isTotallyDisconnected_iff :
    S.IsTotallyDisconnected ↔ ∀ c d, (S.arrows c d).Nonempty → c = d

{C : Type u}
[CategoryTheory.Groupoid C]
(S : CategoryTheory.Subgroupoid C)

S.IsTotallyDisconnected ↔ ∀ (c d : C), (S.arrows c d).Nonempty → c = d


@[to_additive]
theorem contMDiffOn_finprod
    (lf : LocallyFinite fun i ↦ Function.mulSupport <| f i) (h : ∀ i, ContMDiffOn I' I n (f i) s) :
    ContMDiffOn I' I n (fun x ↦ ∏ᶠ i, f i x) s

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

(h : ∀ (i : ι), ContMDiffOn I' I n (f i) s)

ContMDiffOn I' I n (fun x => ∏ᶠ (i : ι), f i x) s


theorem map_inf (hf : RightOrdContinuous f) (x y : α) : f (x ⊓ y) = f x ⊓ f y

{α : Type u}
{β : Type v}
[SemilatticeInf α]
[SemilatticeInf β]
{f : α → β}
(hf : RightOrdContinuous f)
(x y : α)


/-- If `r` is a positive constant, `fun x ↦ r * f x` tends to negative infinity along a filter
if and only if `f` tends to negative infinity along the same filter. -/
theorem tendsto_const_mul_atBot_of_pos (hr : 0 < r) :
    Tendsto (fun x => r * f x) l atBot ↔ Tendsto f l atBot

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : 0 < r)

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


/-- The inner product in `L2` of the indicator of a set `indicatorConstLp 2 hs hμs (1 : 𝕜)` and
a real or complex function `f` is equal to the integral of `f` over `s`. -/
theorem inner_indicatorConstLp_one (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (f : Lp 𝕜 2 μ) :
    ⟪indicatorConstLp 2 hs hμs (1 : 𝕜), f⟫ = ∫ x in s, f x ∂μ

{α : Type u_1}
{𝕜 : Type u_4}
[RCLike 𝕜]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(f : ↥(MeasureTheory.Lp 𝕜 2 μ))

⟪MeasureTheory.indicatorConstLp 2 hs hμs 1, f⟫_𝕜 = ∫ (x : α) in s, ↑↑f x ∂μ


theorem bsup_succ_le_blsub {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    succ (bsup.{_, v} o f) ≤ blsub.{_, v} o f ↔ ∃ i hi, f i hi = bsup.{_, v} o f

(f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v})

Order.succ (o.bsup f) ≤ o.blsub f ↔ ∃ i, ∃ (hi : i < o), f i hi = o.bsup f


theorem wOppSide_comm {s : AffineSubspace R P} {x y : P} : s.WOppSide x y ↔ s.WOppSide y x

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}


theorem toLp_eq_mk (f : α →ₛ E) (hf : Memℒp f p μ) :
    (toLp f hf : α →ₘ[μ] E) = AEEqFun.mk f f.aestronglyMeasurable

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
(f : MeasureTheory.SimpleFunc α E)
(hf : MeasureTheory.Memℒp (↑f) p μ)

↑↑(MeasureTheory.Lp.simpleFunc.toLp f hf) = MeasureTheory.AEEqFun.mk ↑f ⋯


theorem associated_isSymm (Q : QuadraticMap R M R) : (associatedHom S Q).IsSymm

(S : Type u_1)
{R : Type u_3}
{M : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[CommSemiring S]
[Algebra S R]
[Invertible 2]
(Q : QuadraticMap R M R)

LinearMap.IsSymm ((QuadraticMap.associatedHom S) Q)


/-- The vanishing polynomial on a multiplicative subgroup is of the form X ^ n - 1. -/
@[simp] theorem nodal_subgroup_eq_X_pow_card_sub_one [IsDomain R]
  (G : Subgroup Rˣ) [Fintype G] :
  nodal (G : Set Rˣ).toFinset ((↑) : Rˣ → R) = X ^ (Fintype.card G) - 1

{R : Type u_1}
[CommRing R]
[IsDomain R]
(G : Subgroup Rˣ)
[Fintype ↥G]

Lagrange.nodal (↑G).toFinset Units.val = Polynomial.X ^ Fintype.card ↥G - 1


/--
`Commutative op` says that `op` is a commutative operation,
i.e. `a ∘ b = b ∘ a`.
-/
class Commutative (op : α → α → α) : Prop where
  /-- A commutative operation satisfies `a ∘ b = b ∘ a`. -/
  comm : (a b : α) → op a b = op b a

{α : Sort u}
{op : α → α → α}
[self : Std.Commutative op]
(a b : α)


theorem lift_smul (r : R) (x : ℍ[R,c₁,c₂]) : q.lift (r • x) = r • q.lift x

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[Ring A]
[Algebra R A]
{c₁ c₂ : R}
(q : QuaternionAlgebra.Basis A c₁ c₂)
(r : R)
(x : ℍ[R,c₁,c₂])


/-- For every universe `w`, `C` is filtered if and only if every finite diagram in `C` with shape
    in `w` admits a cocone. -/
theorem iff_cone_nonempty : IsCofiltered C ↔
    ∀ {J : Type w} [SmallCategory J] [FinCategory J] (F : J ⥤ C), Nonempty (Cone F)

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

CategoryTheory.IsCofiltered C ↔
  ∀ {J : Type w} [inst : CategoryTheory.SmallCategory J] [inst_1 : CategoryTheory.FinCategory J]
    (F : CategoryTheory.Functor J C), Nonempty (CategoryTheory.Limits.Cone F)


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


theorem rank_range_of_surjective (f : M →ₗ[R] M') (h : Surjective f) :
    Module.rank R (LinearMap.range f) = Module.rank R M'

{R : Type u}
{M : Type v}
{M' : Type v'}
[Ring R]
[AddCommGroup M]
[AddCommGroup M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
(h : Function.Surjective ⇑f)

Module.rank R ↥(LinearMap.range f) = Module.rank R M'


/-- The equivalence `Square C ≌ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the top morphism of `sq`
to the bottom morphism of `sq`. -/
@[simps]
def arrowArrowEquivalence' : Square C ≌ Arrow (Arrow C)

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

CategoryTheory.Square.arrowArrowEquivalence'.unitIso =
  CategoryTheory.Iso.refl (CategoryTheory.Functor.id (CategoryTheory.Square C))


lemma exact₂_iff (S : ComposableArrows C 2) (hS : S.IsComplex) :
    S.Exact ↔ (S.sc' hS 0 1 2).Exact

(S : CategoryTheory.ComposableArrows C 2)


lemma numeric_option_mul (ih : ∀ a, ArgsRel a (Args.P1 x y) → P124 a) (h : IsOption x' x) :
    (x' * y).Numeric

(ih :
  ∀ (a : Surreal.Multiplication.Args),
    Surreal.Multiplication.ArgsRel a (Surreal.Multiplication.Args.P1 x y) → Surreal.Multiplication.P124 a)


protected theorem map_multiset_prod (m : Multiset R[X]) : m.prod.map f = (m.map <| map f).prod

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(m : Multiset R[X])

Polynomial.map f m.prod = (Multiset.map (Polynomial.map f) m).prod


@[to_additive (attr := simp)]
theorem singletonOneHom_apply (a : α) : singletonOneHom a = {a}


lemma congr {q : ℕ} (h : p = q) : CharP R q

{R : Type u_1}
[AddMonoidWithOne R]
(p : ℕ)
[CharP R p]
{q : ℕ}
(h : p = q)


theorem IsPoly.map [Fact p.Prime] {f} (hf : IsPoly p f) (g : R →+* S) (x : 𝕎 R) :
    map g (f x) = f (map g x)

{f : ⦃R : Type u⦄ → [inst : CommRing R] → WittVector p R → WittVector p R}

(WittVector.map g) (f x) = f ((WittVector.map g) x)


theorem NF.below_of_lt {e n a b} (H : repr e < b) :
    NF (ONote.oadd e n a) → NFBelow (ONote.oadd e n a) b

{e : ONote}
{n : ℕ+}
{a : ONote}
{b : Ordinal.{0}}
(H : e.repr < b)

(e.oadd n a).NF → (e.oadd n a).NFBelow b


@[simp] theorem sign_mul : ∀ a b, sign (a * b) = sign a * sign b


theorem eq_of_map_eq_withDensity [IsFiniteMeasure ℙ] {X : Ω → E} [HasPDF X ℙ μ] (f : E → ℝ≥0∞)
    (hmf : AEMeasurable f μ) : map X ℙ = μ.withDensity f ↔ pdf X ℙ μ =ᵐ[μ] f

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]
{m : MeasurableSpace Ω}
{ℙ : MeasureTheory.Measure Ω}
{μ : MeasureTheory.Measure E}
[MeasureTheory.IsFiniteMeasure ℙ]
{X : Ω → E}
[MeasureTheory.HasPDF X ℙ μ]
(f : E → ℝ≥0∞)
(hmf : AEMeasurable f μ)

MeasureTheory.Measure.map X ℙ = μ.withDensity f ↔ MeasureTheory.pdf X ℙ μ =ᵐ[μ] f


@[to_additive]
theorem mul_rotate' (a b c : G) : a * (b * c) = b * (c * a)

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


@[simp] theorem totient_pos {n : ℕ} : 0 < φ n ↔ 0 < n


/-- In a space with second countable topology, measurable implies strongly measurable. -/
@[aesop 90% apply (rule_sets := [Measurable])]
theorem _root_.Measurable.stronglyMeasurable [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopology β] [OpensMeasurableSpace β] (hf : Measurable f) :
    StronglyMeasurable f


/-- Given a closed set `s`, a point belongs to `s` iff its infimum distance to this set vanishes -/
theorem _root_.IsClosed.mem_iff_infDist_zero (h : IsClosed s) (hs : s.Nonempty) :
    x ∈ s ↔ infDist x s = 0

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x : α}
(h : IsClosed s)
(hs : s.Nonempty)


theorem Fin.eq_of_val_eq {n} : ∀ {i j : Fin n}, Eq i.val j.val → Eq i j


theorem eventually_curry_prod_iff {α β : Type*} {l : Filter α} {m : Filter β}
    [NeBot l] [NeBot m] (s : Set α) (t : Set β) :
    (∀ᶠ x in l.curry m, x ∈ s ×ˢ t) ↔ s ∈ l ∧ t ∈ m

{α : Type u_4}
{β : Type u_5}
{l : Filter α}
{m : Filter β}
[l.NeBot]
[m.NeBot]
(s : Set α)
(t : Set β)

(∀ᶠ (x : α × β) in l.curry m, x ∈ s ×ˢ t) ↔ s ∈ l ∧ t ∈ m


@[simp]
theorem choose_succ_self_right : ∀ n : ℕ, (n + 1).choose n = n + 1


theorem uniqueDiffWithinAt_univ : UniqueDiffWithinAt 𝕜 univ x

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


theorem exists_simpleFunc_nonneg_ae_eq {f : Lp.simpleFunc G p μ} (hf : 0 ≤ f) :
    ∃ f' : α →ₛ G, 0 ≤ f' ∧ f =ᵐ[μ] f'

{f : ↥(MeasureTheory.Lp.simpleFunc G p μ)}


/-- The Pythagorean theorem, for an orthogonal projection. -/
theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [HasOrthogonalProjection S] :
    ‖x‖ ^ 2 = ‖orthogonalProjection S x‖ ^ 2 + ‖orthogonalProjection Sᗮ x‖ ^ 2

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x : E)
(S : Submodule 𝕜 E)
[HasOrthogonalProjection S]

‖x‖ ^ 2 = ‖(orthogonalProjection S) x‖ ^ 2 + ‖(orthogonalProjection Sᗮ) x‖ ^ 2


theorem comap_map (μ : Measure α) : (map f μ).comap f = μ

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
{m1 : MeasurableSpace β}
{f : α → β}
(hf : MeasurableEmbedding f)
(μ : MeasureTheory.Measure α)

MeasureTheory.Measure.comap f (MeasureTheory.Measure.map f μ) = μ


theorem real_smul_neg (r : ℝ) (hr : r < 0) : r • j = -((-r).toNNReal • j)

(j : MeasureTheory.JordanDecomposition α)


@[reassoc (attr := simp)]
theorem biproduct.matrix_π (m : ∀ j k, f j ⟶ g k) (k : K) :
    biproduct.matrix m ≫ biproduct.π g k = biproduct.desc fun j => m j k

CategoryTheory.Limits.biproduct.matrix m ≫ CategoryTheory.Limits.biproduct.π g k =
  CategoryTheory.Limits.biproduct.desc fun j => m j k


theorem formPerm_apply_get (xs : List α) (h : Nodup xs) (i : Fin xs.length) :
    formPerm xs (xs.get i) =
      xs.get ⟨((i.val + 1) % xs.length), (Nat.mod_lt _ (i.val.zero_le.trans_lt i.isLt))⟩

{α : Type u_1}
[DecidableEq α]
(xs : List α)
(h : xs.Nodup)
(i : Fin xs.length)

xs.formPerm (xs.get i) = xs.get ⟨(↑i + 1) % xs.length, ⋯⟩


@[simp]
theorem one_add_natPred (n : ℕ+) : 1 + n.natPred = n


@[to_additive (attr := simp)]
theorem mrange_swap : MonoidHom.mrange (swap M N) = ⊤

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]

MonoidHom.mrange (Monoid.Coprod.swap M N) = ⊤


lemma isGalois_iff_aux (X : C) [IsConnected X] :
    IsGalois X ↔ Nonempty (IsTerminal <| colimit <| SingleObj.functor <| Aut.toEnd X)

CategoryTheory.PreGaloisCategory.IsGalois X ↔
  Nonempty
    (CategoryTheory.Limits.IsTerminal
      (CategoryTheory.Limits.colimit (CategoryTheory.SingleObj.functor (CategoryTheory.Aut.toEnd X))))


theorem prime_dvd_prime_iff_eq {M : Type*} [CancelCommMonoidWithZero M] [Unique Mˣ] {p q : M}
    (pp : Prime p) (qp : Prime q) : p ∣ q ↔ p = q

{M : Type u_5}
[CancelCommMonoidWithZero M]
[Unique Mˣ]
{p q : M}
(pp : Prime p)
(qp : Prime q)


@[to_additive Monotone.const_nsmul]
theorem Monotone.pow_const {f : β → M} (hf : Monotone f) : ∀ n : ℕ, Monotone fun a => f a ^ n

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


@[simp] lemma spanFinset_coe {ι : Type*} (s : Finset ι) (f : ι → K) :
    (spanFinset R₁ s f : Submodule R₁ K) = Submodule.span R₁ (f '' s)

(R₁ : Type u_3)
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[IsFractionRing R₁ K]
{ι : Type u_5}
(s : Finset ι)
(f : ι → K)

↑(FractionalIdeal.spanFinset R₁ s f) = Submodule.span R₁ (f '' ↑s)


theorem descPochhammer_succ_succ_smeval {R} [NonAssocRing R] [Pow R ℕ] [NatPowAssoc R]
    (r : R) (k : ℕ) : smeval (descPochhammer ℤ (k + 1)) (r + 1) =
    (k + 1) • smeval (descPochhammer ℤ k) r + smeval (descPochhammer ℤ (k + 1)) r

{R : Type u_2}
[NonAssocRing R]
[Pow R ℕ]
[NatPowAssoc R]
(r : R)
(k : ℕ)

(descPochhammer ℤ (k + 1)).smeval (r + 1) =
  (k + 1) • (descPochhammer ℤ k).smeval r + (descPochhammer ℤ (k + 1)).smeval r


theorem Ici_subset_Ioi : Ici a ⊆ Ioi b ↔ b < a


/-- If `m` and `n` are `Fintype`, the rank of `m × n` matrices is `(#m).lift * (#n).lift`. -/
@[simp]
theorem rank_matrix (m : Type v) (n : Type w) [Finite m] [Finite n] :
    Module.rank R (Matrix m n R) =
      Cardinal.lift.{max v w u, v} #m * Cardinal.lift.{max v w u, w} #n

(R : Type u)
[Ring R]
[StrongRankCondition R]
(m : Type v)
(n : Type w)
[Finite m]
[Finite n]


theorem Finite.of_finite_image {s : Set α} {f : α → β} (h : (f '' s).Finite) (hi : Set.InjOn f s) :
    s.Finite

{α : Type u}
{β : Type v}
{s : Set α}
{f : α → β}
(h : (f '' s).Finite)
(hi : Set.InjOn f s)


@[to_additive]
theorem embedProduct_injective (α : Type*) [Monoid α] : Function.Injective (embedProduct α)


theorem kroneckerTMul_smul (r : R) (A : Matrix l m α) (B : Matrix n p α) :
    A ⊗ₖₜ[R] (r • B) = r • A ⊗ₖₜ B

(R : Type u_1)
{α : Type u_2}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{p : Type u_11}
[CommSemiring R]
[AddCommMonoid α]
[Module R α]
(r : R)
(A : Matrix l m α)
(B : Matrix n p α)

Matrix.kroneckerMap (TensorProduct.tmul R) A (r • B) = r • Matrix.kroneckerMap (fun x x_1 => x ⊗ₜ[R] x_1) A B


theorem mem_incidence_iff_neighbor {v w : V} :
    s(v, w) ∈ G.incidenceSet v ↔ w ∈ G.neighborSet v

{V : Type u}
(G : SimpleGraph V)
{v w : V}


theorem const_add (hf : DiffContOnCl 𝕜 f s) (c : F) : DiffContOnCl 𝕜 (fun x => c + f x) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
(hf : DiffContOnCl 𝕜 f s)
(c : F)


/-- The identity braided monoidal functor. -/
@[simps!]
def id : BraidedFunctor C C

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

(CategoryTheory.BraidedFunctor.id C).ε = 𝟙 (𝟙_ C)


/-- The direction of a Monge plane. -/
theorem direction_mongePlane {n : ℕ} (s : Simplex ℝ P (n + 2)) {i₁ i₂ : Fin (n + 3)} :
    (s.mongePlane i₁ i₂).direction =
      (ℝ ∙ s.points i₁ -ᵥ s.points i₂)ᗮ ⊓ vectorSpan ℝ (Set.range s.points)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P (n + 2))
{i₁ i₂ : Fin (n + 3)}

(s.mongePlane i₁ i₂).direction = (Submodule.span ℝ {s.points i₁ -ᵥ s.points i₂})ᗮ ⊓ vectorSpan ℝ (Set.range s.points)


/-- The counit isomorphism of the
equivalence `triangleOpEquivalence C : (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ` . -/
@[simps!]
noncomputable def counitIso : inverse C ⋙ functor C ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle Cᵒᵖ)

((CategoryTheory.Pretriangulated.TriangleOpEquivalence.counitIso C).hom.app X).hom₃ =
  CategoryTheory.CategoryStruct.id X.obj₃


theorem cauchySeq_of_controlled [SemilatticeSup β] [Nonempty β] (U : β → Set (α × α))
    (hU : ∀ s ∈ 𝓤 α, ∃ n, U n ⊆ s) {f : β → α}
    (hf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N) : CauchySeq f


theorem StrictMonoOn.Ici_le_id [PredOrder α] [IsPredArchimedean α] [OrderTop α] {n : α} {φ : α → α}
    (hφ : StrictMonoOn φ (Set.Ici n)) : ∀ m, n ≤ m → φ m ≤ m

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
[IsPredArchimedean α]
[OrderTop α]
{n : α}
{φ : α → α}
(hφ : StrictMonoOn φ (Set.Ici n))
(m : α)

n ≤ m → φ m ≤ m


theorem coe_strictMono : StrictMono ofNNReal


theorem Countable.mono {s₁ s₂ : Set α} (h : s₁ ⊆ s₂) (hs : s₂.Countable) : s₁.Countable

{α : Type u}
{s₁ s₂ : Set α}
(h : s₁ ⊆ s₂)
(hs : s₂.Countable)


/-- Uses `right` co(ntra)variant. -/
@[to_additive (attr := simp) "Uses `right` co(ntra)variant."]
theorem Right.inv_lt_one_iff : a⁻¹ < 1 ↔ 1 < a

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


@[simp, norm_cast]
theorem cast_sub {m n} (h : m ≤ n) : ((n - m : ℕ) : R) = n - m

{R : Type u}
[AddGroupWithOne R]
{m n : ℕ}
(h : m ≤ n)


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

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

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


theorem Module.finite_iff_of_rank_eq_nsmul {W} [AddCommGroup W]
    [Module R W] [Module.Free R W] {n : ℕ} (hn : n ≠ 0)
    (hVW : Module.rank R M = n • Module.rank R W) :
    Module.Finite R M ↔ Module.Finite R W


private lemma expCoeff_rec (m : ℕ) :
    (expCoeff (2 * (m + 3)) =
      expCoeff (m + 2) ^ 2 * expCoeff (m + 3) * expCoeff (m + 5) -
        expCoeff (m + 1) * expCoeff (m + 3) * expCoeff (m + 4) ^ 2) ∧
    (expCoeff (2 * (m + 2) + 1) =
      expCoeff (m + 4) * expCoeff (m + 2) ^ 3 * (if Even m then 4 ^ 2 else 1) -
        expCoeff (m + 1) * expCoeff (m + 3) ^ 3 * (if Even m then 1 else 4 ^ 2))

WeierstrassCurve.expCoeff (2 * (m + 3)) =
    WeierstrassCurve.expCoeff (m + 2) ^ 2 * WeierstrassCurve.expCoeff (m + 3) * WeierstrassCurve.expCoeff (m + 5) -
      WeierstrassCurve.expCoeff (m + 1) * WeierstrassCurve.expCoeff (m + 3) * WeierstrassCurve.expCoeff (m + 4) ^ 2 ∧
  WeierstrassCurve.expCoeff (2 * (m + 2) + 1) =
    (WeierstrassCurve.expCoeff (m + 4) * WeierstrassCurve.expCoeff (m + 2) ^ 3 * if Even m then 4 ^ 2 else 1) -
      WeierstrassCurve.expCoeff (m + 1) * WeierstrassCurve.expCoeff (m + 3) ^ 3 * if Even m then 1 else 4 ^ 2


@[simp]
theorem filter_zero : filter p 0 = 0

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


theorem find_min' {p : Fin n → Prop} [DecidablePred p] {i : Fin n} (h : i ∈ Fin.find p) {j : Fin n}
    (hj : p j) : i ≤ j

{n : ℕ}
{p : Fin n → Prop}
[DecidablePred p]
{i : Fin n}
(h : i ∈ Fin.find p)
{j : Fin n}
(hj : p j)


theorem hasBasis_toFilter (l : IntegrationParams) (I : Box ι) :
    (l.toFilter I).HasBasis (fun r : ℝ≥0 → (ι → ℝ) → Ioi (0 : ℝ) => ∀ c, l.RCond (r c))
      fun r => { π | ∃ c, l.MemBaseSet I c (r c) π }

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

(l.toFilter I).HasBasis (fun r => ∀ (c : ℝ≥0), l.RCond (r c)) fun r => {π | ∃ c, l.MemBaseSet I c (r c) π}


@[to_additive (attr := simp)]
theorem inv_apply [Inv β] [ContinuousInv β] (f : C(α, β)) (x : α) : f⁻¹ x = (f x)⁻¹

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Neg β]
[ContinuousNeg β]
(f : C(α, β))
(x : α)


@[reassoc (attr := simp)]
theorem isoRestrict_inv_ofRestrict : (isoRestrict f).inv ≫ f = Y.ofRestrict _

{X Y : AlgebraicGeometry.LocallyRingedSpace}

[H : AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion f]

(AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.isoRestrict f).inv ≫ f = Y.ofRestrict ⋯


theorem top_prod (s : NonUnitalSubsemiring S) :
    (⊤ : NonUnitalSubsemiring R).prod s = s.comap (NonUnitalRingHom.snd R S)

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(s : NonUnitalSubsemiring S)

⊤.prod s = NonUnitalSubsemiring.comap (NonUnitalRingHom.snd R S) s


theorem coe_center : (center R A : Set A) = Set.center A

(R : Type u)
(A : Type v)
[CommSemiring R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]

↑(NonUnitalStarSubalgebra.center R A) = Set.center A


/-- If a sequence `g` converges to some `b`, then the sequence of constant functions
`fun n ↦ fun a ↦ g n` converges to the constant function `fun a ↦ b` on any set `s` -/
theorem Filter.Tendsto.tendstoUniformlyOnFilter_const {g : ι → β} {b : β} (hg : Tendsto g p (𝓝 b))
    (p' : Filter α) :
    TendstoUniformlyOnFilter (fun n : ι => fun _ : α => g n) (fun _ : α => b) p p'

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{p : Filter ι}
{g : ι → β}
{b : β}
(hg : Filter.Tendsto g p (𝓝 b))
(p' : Filter α)

TendstoUniformlyOnFilter (fun n x => g n) (fun x => b) p p'


theorem castHom_bijective [Fintype R] (h : Fintype.card R = n) :
    Function.Bijective (ZMod.castHom (dvd_refl n) R)

{n : ℕ}
(R : Type u_1)
[Ring R]
[CharP R n]
[Fintype R]
(h : Fintype.card R = n)


/-- If `φ : S₁ ⟶ S₂` is a morphism of short complexes such that `φ.τ₁` is epi, `φ.τ₂` is an iso
and `φ.τ₃` is mono, then a homology data for `S₁` induces a homology data for `S₂`.
The inverse construction is `ofEpiOfIsIsoOfMono'`. -/
@[simps]
noncomputable def ofEpiOfIsIsoOfMono (φ : S₁ ⟶ S₂) (h : HomologyData S₁)
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] : HomologyData S₂

(CategoryTheory.ShortComplex.HomologyData.ofEpiOfIsIsoOfMono φ h).left =
  CategoryTheory.ShortComplex.LeftHomologyData.ofEpiOfIsIsoOfMono φ h.left


/-- Composing a multilinear map twice with a linear map in each argument is
the same as composing with their composition. -/
theorem compLinearMap_assoc (g : MultilinearMap R M₁'' M₂) (f₁ : ∀ i, M₁' i →ₗ[R] M₁'' i)
    (f₂ : ∀ i, M₁ i →ₗ[R] M₁' i) :
    (g.compLinearMap f₁).compLinearMap f₂ = g.compLinearMap fun i => f₁ i ∘ₗ f₂ i

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
{M₁' : ι → Type u_1}
[(i : ι) → AddCommMonoid (M₁' i)]
[(i : ι) → Module R (M₁' i)]
{M₁'' : ι → Type u_2}
[(i : ι) → AddCommMonoid (M₁'' i)]
[(i : ι) → Module R (M₁'' i)]
(g : MultilinearMap R M₁'' M₂)
(f₁ : (i : ι) → M₁' i →ₗ[R] M₁'' i)
(f₂ : (i : ι) → M₁ i →ₗ[R] M₁' i)


@[simp]
theorem cons_coe (a : α) (l : List α) : (a ::ₘ l : Multiset α) = (a :: l : List α)


@[simp]
theorem log_neg_eq_log (x : ℝ) : log (-x) = log x


@[simp]
theorem val_eq_singleton_iff {a : α} {s : Finset α} : s.val = {a} ↔ s = {a}


theorem DifferentiableOn.rpow (hf : DifferentiableOn ℝ f s) (hg : DifferentiableOn ℝ g s)
    (h : ∀ x ∈ s, f x ≠ 0) : DifferentiableOn ℝ (fun x => f x ^ g x) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : E → ℝ}
{s : Set E}
(hf : DifferentiableOn ℝ f s)
(hg : DifferentiableOn ℝ g s)
(h : ∀ x ∈ s, f x ≠ 0)


theorem Filter.Tendsto.min_left {l : Filter β} {a : α} (h : Tendsto f l (𝓝 a)) :
    Tendsto (fun i => min (f i) a) l (𝓝 a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f : β → α}
{l : Filter β}
{a : α}
(h : Filter.Tendsto f l (𝓝 a))

Filter.Tendsto (fun i => min (f i) a) l (𝓝 a)


@[simp]
theorem cyclotomic_two (R : Type*) [Ring R] : cyclotomic 2 R = X + 1

Polynomial.cyclotomic 2 R = Polynomial.X + 1


theorem ofRat_zero : (ofRat 0 : Cauchy abv) = 0

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]


theorem one_add_norm_le_sqrt_two_mul_sqrt (x : E) :
    (1 : ℝ) + ‖x‖ ≤ √2 * √(1 + ‖x‖ ^ 2)

{E : Type u_1}
[NormedAddCommGroup E]
(x : E)


@[simp]
theorem left_sub_midpoint (v₁ v₂ : V) : v₁ - midpoint R v₁ v₂ = (⅟ 2 : R) • (v₁ - v₂)

{R : Type u_1}
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(v₁ v₂ : V)


/-- The yoneda functor that sends a type to a sheaf over the category of types. -/
@[simps]
def yoneda' : Type u ⥤ SheafOfTypes typesGrothendieckTopology

∀ {X Y : Type u} (f : X ⟶ Y), (CategoryTheory.yoneda'.map f).val = CategoryTheory.yoneda.map f


private theorem div_two_le_of_lt_two {m n : Nat} (p : m < 2 ^ succ n) : m / 2 < 2^n


@[simp] lemma cast_nonpos : (n : R) ≤ 0 ↔ n ≤ 0

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

↑n ≤ 0 ↔ n ≤ 0


@[reassoc (attr := simp)]
lemma inrX_desc_f (i : ι) :
    inrX φ i ≫ (desc φ α hα).f i = α.f i

HomologicalComplex.homotopyCofiber.inrX φ i ≫ (HomologicalComplex.homotopyCofiber.desc φ α hα).f i = α.f i


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


@[simp]
theorem range_eq_univ (h : α ≃ᵢ β) : range h = univ

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


@[to_additive]
theorem nhds_one_symm' : map Inv.inv (𝓝 (1 : G)) = 𝓝 (1 : G)

(G : Type w)
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]


lemma coe_chainTop' : (chainTop α β : L → R) = chainTopCoeff α β • α + β

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(α : L → R)
(β : LieModule.Weight R L M)

⇑(LieModule.chainTop α β) = LieModule.chainTopCoeff α β • α + ⇑β


@[simp] lemma disjointSum_basis_iff {h I X} :
    (M.disjointSum N h).Basis I X ↔ M.Basis (I ∩ M.E) (X ∩ M.E) ∧
      N.Basis (I ∩ N.E) (X ∩ N.E) ∧ I ⊆ X ∧ X ⊆ M.E ∪ N.E

{α : Type u_1}
{M N : Matroid α}
{h : Disjoint M.E N.E}
{I X : Set α}


@[to_additive (attr := simp)]
theorem traverse_mul' :
    Function.comp (traverse F) ∘ (HMul.hMul : FreeMagma α → FreeMagma α → FreeMagma α) = fun x y ↦
      (· * ·) <$> traverse F x <*> traverse F y

{α β : Type u}
{m : Type u → Type u}
[Applicative m]
(F : α → m β)

Function.comp (traverse F) ∘ HMul.hMul = fun x y =>
  Seq.seq ((fun x x_1 => x * x_1) <$> traverse F x) fun x => traverse F y


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

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
{L : Filter F}
(hL : L ≤ 𝓝 x)
(h : HasGradientAtFilter f f' x L)


@[ext] protected theorem ext : {a b : Thunk α} → a.get = b.get → a = b


/-- The element of the group of units, corresponding to an element of a monoid which is a unit. As
opposed to `IsUnit.unit`, the inverse is computable and comes from the inversion on `α`. This is
useful to transfer properties of inversion in `Units α` to `α`. See also `toUnits`. -/
@[to_additive (attr := simps val )
"The element of the additive group of additive units, corresponding to an element of
an additive monoid which is an additive unit. As opposed to `IsAddUnit.addUnit`, the negation is
computable and comes from the negation on `α`. This is useful to transfer properties of negation
in `AddUnits α` to `α`. See also `toAddUnits`."]
def unit' (h : IsUnit a) : αˣ

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


/-- Morphism of additive smooth monoids. -/
structure SmoothAddMonoidMorphism (I : ModelWithCorners 𝕜 E H) (I' : ModelWithCorners 𝕜 E' H')
    (G : Type*) [TopologicalSpace G] [ChartedSpace H G] [AddMonoid G] [SmoothAdd I G]
    (G' : Type*) [TopologicalSpace G'] [ChartedSpace H' G'] [AddMonoid G']
    [SmoothAdd I' G'] extends G →+ G' where
  smooth_toFun : Smooth I I' toFun

(self : SmoothAddMonoidMorphism I I' G G')

Smooth I I' (↑self.toAddMonoidHom).toFun


lemma monotone_isoClosure : Monotone (isoClosure (C := C))

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


theorem equiv_comp_equiv_apply_eq_self (x : L) :
    equiv j i p (equiv i j p x) = x

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing L p]
[IsPerfectClosure i p]
[PerfectRing M p]
[IsPerfectClosure j p]
(x : L)

(IsPerfectClosure.equiv j i p) ((IsPerfectClosure.equiv i j p) x) = x


theorem ideal_prod_prime_aux {I : Ideal R} {J : Ideal S} :
    (Ideal.prod I J).IsPrime → I = ⊤ ∨ J = ⊤

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{I : Ideal R}
{J : Ideal S}


/-- If `r` is a negative constant, `fun x ↦ f x / r` tends to infinity along a filter `l`
if and only if `f` tends to negative infinity along `l`. -/
lemma tendsto_div_const_atTop_of_neg (hr : r < 0) :
    Tendsto (fun x ↦ f x / r) l atTop ↔ Tendsto f l atBot

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
(hr : r < 0)

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


theorem dValue_pos (hN₃ : 8 ≤ N) : 0 < dValue N


lemma indicator_smul (s : Set α) (r : α → R) (f : α → M) :
    indicator s (fun a ↦ r a • f a) = fun a ↦ r a • indicator s f a

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero M]
[SMulZeroClass R M]
(s : Set α)
(r : α → R)
(f : α → M)

(s.indicator fun a => r a • f a) = fun a => r a • s.indicator f a


theorem tfae_cons_of_mem {a b} {l : List Prop} (h : b ∈ l) : TFAE (a :: l) ↔ (a ↔ b) ∧ TFAE l

{a b : Prop}
{l : List Prop}
(h : b ∈ l)


/-- Composition by continuous linear equivs on the right respects higher differentiability. -/
theorem ContinuousLinearEquiv.contDiff_comp_iff (e : G ≃L[𝕜] E) :
    ContDiff 𝕜 n (f ∘ e) ↔ ContDiff 𝕜 n f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{n : ℕ∞}
(e : G ≃L[𝕜] E)


/-- The function `seminormFromConst' hf1 hc hpm` is nonarchimedean. -/
theorem seminormFromConst_isNonarchimedean (hna : IsNonarchimedean f) :
    IsNonarchimedean (seminormFromConst' hf1 hc hpm)

{R : Type u_1}
[CommRing R]
{c : R}
{f : RingSeminorm R}
(hf1 : f 1 ≤ 1)
(hc : f c ≠ 0)
(hpm : IsPowMul ⇑f)
(hna : IsNonarchimedean ⇑f)


/-- The category of cones on `F` is just the comma category `(Δ ↓ F)`, where `Δ` is the constant
    functor. -/
@[simps! (config := { notRecursive := [`PLift, `ULift] })]
def Cone.equivCostructuredArrow (F : J ⥤ C) : Cone F ≌ CostructuredArrow (const J) F

(c : CategoryTheory.CostructuredArrow (CategoryTheory.Functor.const J) F)

((CategoryTheory.Limits.Cone.equivCostructuredArrow F).inverse.obj c).pt = c.left


@[simp]
theorem basicOpen_res (i : op U ⟶ op V) : X.basicOpen (X.presheaf.map i f) = V ⊓ X.basicOpen f

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

X.basicOpen ((X.presheaf.map i) f) = V ⊓ X.basicOpen f


@[to_additive]
theorem comp_noncommCoprod {Q : Type*} [Semigroup Q] (h : P →ₙ* Q)
    (comm : ∀ m n, Commute (f m) (g n)) :
    h.comp (f.noncommCoprod g comm) =
      (h.comp f).noncommCoprod (h.comp g) (fun m n ↦ (comm m n).map h)

(comm : ∀ (m : M) (n : N), Commute (f m) (g n))

h.comp (f.noncommCoprod g comm) = (h.comp f).noncommCoprod (h.comp g) ⋯


lemma IsCoatomic.exists_coatom [OrderTop α] [Nontrivial α] [IsCoatomic α] : ∃ a : α, IsCoatom a

(α : Type u_2)
[PartialOrder α]
[OrderTop α]
[Nontrivial α]
[IsCoatomic α]


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

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


/-- Extensionality of the `IsAdjoinRoot` structure itself. See `IsAdjoinRootMonic.ext_elem`
for extensionality of the ring elements. -/
theorem ext_map (h h' : IsAdjoinRoot S f) (eq : ∀ x, h.map x = h'.map x) : h = h'

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
{f : R[X]}
[Algebra R S]
(h h' : IsAdjoinRoot S f)
(eq : ∀ (x : R[X]), h.map x = h'.map x)


@[simp]
theorem exp_nat_mul_two_pi_mul_I (n : ℕ) : exp (n * (2 * π * I)) = 1

Complex.exp (↑n * (2 * ↑Real.pi * Complex.I)) = 1


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

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


@[simp] lemma compls_inter (s t : Finset α) : (s ∩ t)ᶜˢ = sᶜˢ ∩ tᶜˢ

{α : Type u_2}
[DecidableEq α]
[BooleanAlgebra α]
(s t : Finset α)


theorem destruct_dropn : ∀ (s : WSeq α) (n), destruct (drop s n) = destruct s >>= drop.aux n

{α : Type u}
(s : Stream'.WSeq α)
(n : ℕ)

(s.drop n).destruct = s.destruct >>= Stream'.WSeq.drop.aux n


theorem integrable_iff_integrableAtFilter_atBot [LinearOrder X] [OrderTop X] [CompactIccSpace X] :
    Integrable f μ ↔ IntegrableAtFilter f atBot μ ∧ LocallyIntegrable f μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{f : X → E}
{μ : MeasureTheory.Measure X}
[LinearOrder X]
[OrderTop X]
[CompactIccSpace X]

MeasureTheory.Integrable f μ ↔ MeasureTheory.IntegrableAtFilter f Filter.atBot μ ∧ MeasureTheory.LocallyIntegrable f μ


/-- A dilation scales the diameter by `ratio f` in pseudometric spaces. -/
theorem diam_image (s : Set α) : Metric.diam ((f : α → β) '' s) = ratio f * Metric.diam s

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)
(s : Set α)

Metric.diam (⇑f '' s) = ↑(Dilation.ratio f) * Metric.diam s


theorem inv_def (e₁ : AddAut A) : e₁⁻¹ = e₁.symm


theorem of_finiteType [IsNoetherianRing A] {f : A →+* B} : f.FiniteType ↔ f.FinitePresentation

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
[IsNoetherianRing A]
{f : A →+* B}


theorem disjoint_of_disjoint_cons_left {l₁ l₂} : Disjoint (a :: l₁) l₂ → Disjoint l₁ l₂

∀ {α : Type u_1} {a : α} {l₁ l₂ : List α}, (a :: l₁).Disjoint l₂ → l₁.Disjoint l₂


theorem Tendsto.basis_right (H : Tendsto f la lb) (hlb : lb.HasBasis pb sb) :
    ∀ i, pb i → ∀ᶠ x in la, f x ∈ sb i

{α : Type u_1}
{β : Type u_2}
{ι' : Sort u_5}
{la : Filter α}
{lb : Filter β}
{pb : ι' → Prop}
{sb : ι' → Set β}
{f : α → β}
(H : Filter.Tendsto f la lb)
(hlb : lb.HasBasis pb sb)
(i : ι')


theorem tendsto_inf_left {f : α → β} {x₁ x₂ : Filter α} {y : Filter β} (h : Tendsto f x₁ y) :
    Tendsto f (x₁ ⊓ x₂) y

{α : Type u}
{β : Type v}
{f : α → β}
{x₁ x₂ : Filter α}
{y : Filter β}
(h : Filter.Tendsto f x₁ y)


@[simp]
theorem support_single_of_ne (h : r ≠ 0) : support (single a r) = {a}

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{a : Γ}
{r : R}
(h : r ≠ 0)


@[simp, reassoc, elementwise]
theorem imageIsoRange_hom_subtype {G H : ModuleCat.{v} R} (f : G ⟶ H) :
    (imageIsoRange f).hom ≫ ModuleCat.ofHom f.range.subtype = Limits.image.ι f

{R : Type u}
[Ring R]
{G H : ModuleCat R}
(f : G ⟶ H)

(ModuleCat.imageIsoRange f).hom ≫ ModuleCat.ofHom (LinearMap.range f).subtype = CategoryTheory.Limits.image.ι f


protected theorem Embedding.comp (hg : Embedding g) (hf : Embedding f) :
    Embedding (g ∘ f)

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
{f : X → Y}
{g : Y → Z}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(hg : Embedding g)
(hf : Embedding f)


@[to_additive (attr := measurability)]
theorem measurable_mabs : Measurable (mabs : α → α)

{α : Type u_1}
[Lattice α]
[Group α]
[MeasurableSpace α]
[MeasurableInv α]
[MeasurableSup₂ α]


theorem support_pow_le (σ : Perm α) (n : ℕ) : (σ ^ n).support ≤ σ.support

{α : Type u_1}
[DecidableEq α]
[Fintype α]
(σ : Equiv.Perm α)
(n : ℕ)


/-- A monoid is finitely generated if it is finitely generated as a submonoid of itself. -/
class Monoid.FG : Prop where
  out : (⊤ : Submonoid M).FG

{M : Type u_1}
[Monoid M]
[self : Monoid.FG M]


theorem Disjoint.frontier_left (ht : IsOpen t) (hd : Disjoint s t) : Disjoint (frontier s) t

{X : Type u}
{s t : Set X}
[TopologicalSpace X]
(ht : IsOpen t)
(hd : Disjoint s t)


@[simp]
theorem conjTranspose_pow [Semiring α] [StarRing α] [Fintype m] [DecidableEq m] (M : Matrix m m α)
    (k : ℕ) : (M ^ k)ᴴ = Mᴴ ^ k

{m : Type u_2}
{α : Type v}
[Semiring α]
[StarRing α]
[Fintype m]
[DecidableEq m]
(M : Matrix m m α)
(k : ℕ)


theorem multiplicity_eq_multiplicity_span [DecidableRel ((· ∣ ·) : R → R → Prop)]
    [DecidableRel ((· ∣ ·) : Ideal R → Ideal R → Prop)] {a b : R} :
    multiplicity (Ideal.span {a}) (Ideal.span ({b} : Set R)) = multiplicity a b

{R : Type u_1}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
[DecidableRel fun x x_1 => x ∣ x_1]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : R}

multiplicity (Ideal.span {a}) (Ideal.span {b}) = multiplicity a b


protected theorem congr (hs : NullMeasurableSet s μ) (h : s =ᵐ[μ] t) : NullMeasurableSet t μ

(hs : MeasureTheory.NullMeasurableSet s μ)


theorem card_parts_equitabilise_subset_le :
    t ∈ P.parts → (t \ ((P.equitabilise h).parts.filter fun u => u ⊆ t).biUnion id).card ≤ m

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{m a b : ℕ}
(P : Finpartition s)
(h : a * m + b * (m + 1) = s.card)

t ∈ P.parts → (t \ (Finset.filter (fun u => u ⊆ t) (Finpartition.equitabilise h).parts).biUnion id).card ≤ m


/-- If `A` is graded by a canonically ordered add monoid, then the projection map `x ↦ x₀` is a ring
homomorphism.
-/
@[simps]
def GradedRing.projZeroRingHom : A →+* A

{ι : Type u_1}
{A : Type u_3}
{σ : Type u_4}
[Semiring A]
[DecidableEq ι]
[CanonicallyOrderedAddCommMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
[GradedRing 𝒜]
(a : A)

(GradedRing.projZeroRingHom 𝒜) a = ↑(((DirectSum.decompose 𝒜) a) 0)


/-- If `-1` is a square modulo the natural number `n`, then `n` is a sum of two squares. -/
theorem Nat.eq_sq_add_sq_of_isSquare_mod_neg_one {n : ℕ} (h : IsSquare (-1 : ZMod n)) :
    ∃ x y : ℕ, n = x ^ 2 + y ^ 2


@[aesop unsafe apply (rule_sets := [finsetNonempty])]
theorem univ_nonempty [Nonempty α] : (univ : Finset α).Nonempty


/-- Just a computational lemma we need for the next main proof. -/
protected theorem compExactValue_correctness_of_stream_eq_some_aux_comp {a : K} (b c : K)
    (fract_a_ne_zero : Int.fract a ≠ 0) :
    ((⌊a⌋ : K) * b + c) / Int.fract a + b = (b * a + c) / Int.fract a

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
{a : K}
(b c : K)
(fract_a_ne_zero : Int.fract a ≠ 0)

(↑⌊a⌋ * b + c) / Int.fract a + b = (b * a + c) / Int.fract a


/-- The `L_p` seminorm of a vector `f` is the greatest value of the inner product
`∑ i ∈ s, f i * g i` over functions `g` of `L_q` seminorm less than or equal to one. -/
theorem isGreatest_Lp (f : ι → ℝ≥0) {p q : ℝ} (hpq : p.IsConjExponent q) :
    IsGreatest ((fun g : ι → ℝ≥0 => ∑ i ∈ s, f i * g i) '' { g | ∑ i ∈ s, g i ^ q ≤ 1 })
      ((∑ i ∈ s, f i ^ p) ^ (1 / p))

{ι : Type u}
(s : Finset ι)
(f : ι → ℝ≥0)
{p q : ℝ}
(hpq : p.IsConjExponent q)

IsGreatest ((fun g => ∑ i ∈ s, f i * g i) '' {g | ∑ i ∈ s, g i ^ q ≤ 1}) ((∑ i ∈ s, f i ^ p) ^ (1 / p))


@[simps!]
instance : Category (CosimplicialObject C)

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

∀ {X Y Z : SimplexCategory ⥤ C} (α : X ⟶ Y) (β : Y ⟶ Z) (X_1 : SimplexCategory), (α ≫ β).app X_1 = α.app X_1 ≫ β.app X_1


protected theorem quasiMeasurePreserving {f : α → β} (hf : MeasurePreserving f μa μb) :
    QuasiMeasurePreserving f μa μb

(hf : MeasureTheory.MeasurePreserving f μa μb)

MeasureTheory.Measure.QuasiMeasurePreserving f μa μb


theorem fderivWithin.fst (hs : UniqueDiffWithinAt 𝕜 s x) (h : DifferentiableWithinAt 𝕜 f₂ s x) :
    fderivWithin 𝕜 (fun x => (f₂ x).1) s x = (fst 𝕜 F G).comp (fderivWithin 𝕜 f₂ s x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{s : Set E}
{f₂ : E → F × G}
(hs : UniqueDiffWithinAt 𝕜 s x)
(h : DifferentiableWithinAt 𝕜 f₂ s x)

fderivWithin 𝕜 (fun x => (f₂ x).1) s x = (ContinuousLinearMap.fst 𝕜 F G).comp (fderivWithin 𝕜 f₂ s x)


/-- The forgetful functor from `LocallyRingedSpace` to `Top`. -/
@[simps!]
def forgetToTop : LocallyRingedSpace.{u} ⥤ TopCat.{u}

AlgebraicGeometry.LocallyRingedSpace.forgetToTop.obj X =
  (AlgebraicGeometry.SheafedSpace.forget CommRingCat).obj X.toSheafedSpace


@[simp]
theorem frobenius_nnnorm_col (v : n → α) : ‖col ι v‖₊ = ‖(WithLp.equiv 2 _).symm v‖₊

{n : Type u_4}
{α : Type u_5}
{ι : Type u_7}
[Fintype n]
[Unique ι]
[SeminormedAddCommGroup α]
(v : n → α)

‖Matrix.col ι v‖₊ = ‖(WithLp.equiv 2 (n → α)).symm v‖₊


{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
{module_M : Module R M}
(p : Submodule R M)


@[simp]
theorem continuous_projRestrict : Continuous (ProjRestrict C J)

{I : Type u}
(C : Set (I → Bool))
(J : I → Prop)
[(i : I) → Decidable (J i)]

Continuous (Profinite.NobelingProof.ProjRestrict C J)


theorem condexpIndSMul_ae_eq_smul (hm : m ≤ m0) (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (x : G) :
    condexpIndSMul hm hs hμs x =ᵐ[μ] fun a =>
      (condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs 1) : α → ℝ) a • x

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

↑↑(MeasureTheory.condexpIndSMul hm hs hμs x) =ᵐ[μ] fun a =>
  ↑↑↑((MeasureTheory.condexpL2 ℝ ℝ hm) (MeasureTheory.indicatorConstLp 2 hs hμs 1)) a • x


/-- `Unique α` expresses that `α` is a type with a unique term `default`.

This is implemented as a type, rather than a `Prop`-valued predicate,
for good definitional properties of the default term. -/
@[ext]
structure Unique (α : Sort u) extends Inhabited α where
  /-- In a `Unique` type, every term is equal to the default element (from `Inhabited`). -/
  uniq : ∀ a : α, a = default


lemma order_eq_nat_iff (hf : AnalyticAt 𝕜 f z₀) (n : ℕ) : hf.order = ↑n ↔
    ∃ (g : 𝕜 → E), AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧ ∀ᶠ z in 𝓝 z₀, f z = (z - z₀) ^ n • g z

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{z₀ : 𝕜}
(hf : AnalyticAt 𝕜 f z₀)
(n : ℕ)

hf.order = ↑n ↔ ∃ g, AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ n • g z


@[simp]
theorem Iic_disjoint_Ioi (h : a ≤ b) : Disjoint (Iic a) (Ioi b)

{α : Type v}
[Preorder α]
{a b : α}
(h : a ≤ b)


/-- The natural isomorphism `(K⟦n⟧).sc' i j k ≅ K.sc' i' j' k'` when `n + i = i'`,
`n + j = j'` and `n + k = k'`. -/
@[simps!]
def shiftShortComplexFunctor' (n i j k i' j' k' : ℤ)
    (hi : n + i = i') (hj : n + j = j') (hk : n + k = k') :
    (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n) ⋙ shortComplexFunctor' C _ i j k ≅
      shortComplexFunctor' C _ i' j' k'

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(n i j k i' j' k' : ℤ)
(hi : n + i = i')
(hj : n + j = j')
(hk : n + k = k')
(X : CochainComplex C ℤ)

((CochainComplex.shiftShortComplexFunctor' C n i j k i' j' k' hi hj hk).inv.app X).τ₂ =
  (HomologicalComplex.XIsoOfEq X ⋯).inv


@[simp]
theorem diag_apply (A : Matrix n n α) (i) : diag A i = A i i

{n : Type u_3}
{α : Type v}
(A : Matrix n n α)
(i : n)


theorem unbot_le_iff {a : WithBot α} (h : a ≠ ⊥) {b : α} :
    unbot a h ≤ b ↔ a ≤ (b : WithBot α)

{α : Type u_1}
[LE α]
{a : WithBot α}
(h : a ≠ ⊥)
{b : α}


theorem Ico_insert_succ_left (h : a < b) : insert a (Ico a.succ b) = Ico a b

insert a (Finset.Ico a.succ b) = Finset.Ico a b


/-- If `Function.Surjective (algebraMap A B)`, then `IsCyclotomicExtension {1} A B`. -/
theorem singleton_one_of_algebraMap_bijective (h : Function.Surjective (algebraMap A B)) :
    IsCyclotomicExtension {1} A B

(h : Function.Surjective ⇑(algebraMap A B))


theorem eventually_swap_iff {p : α × β → Prop} :
    (∀ᶠ x : α × β in f ×ˢ g, p x) ↔ ∀ᶠ y : β × α in g ×ˢ f, p y.swap

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}
{p : α × β → Prop}

(∀ᶠ (x : α × β) in f ×ˢ g, p x) ↔ ∀ᶠ (y : β × α) in g ×ˢ f, p y.swap


/-- A split mono `f` equalizes `(retraction f ≫ f)` and `(𝟙 Y)`.
Here we build the cone, and show in `isSplitMonoEqualizes` that it is a limit cone.
-/
-- @[simps (config := { rhsMd := semireducible })] Porting note: no semireducible
@[simps!]
noncomputable def coneOfIsSplitMono : Fork (𝟙 Y) (retraction f ≫ f)

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

(CategoryTheory.Limits.coneOfIsSplitMono f).pt = X


theorem primorial_add (m n : ℕ) :
    (m + n)# = m# * ∏ p ∈ filter Nat.Prime (Ico (m + 1) (m + n + 1)), p

(m + n)# = m# * ∏ p ∈ Finset.filter Nat.Prime (Finset.Ico (m + 1) (m + n + 1)), p


@[simp]
theorem intDegree_C (k : K) : intDegree (C k) = 0


@[simp]
theorem star_ratCast_smul [DivisionRing R] [AddCommGroup M] [Module R M] [StarAddMonoid M] (n : ℚ)
    (x : M) : star ((n : R) • x) = (n : R) • star x

{R : Type u_1}
{M : Type u_2}
[DivisionRing R]
[AddCommGroup M]
[Module R M]
[StarAddMonoid M]
(n : ℚ)
(x : M)


/-- The product of an element of the additive closure of a multiplicative subsemigroup `M`
and an element of `M` is contained in the additive closure of `M`. -/
theorem mul_right_mem_add_closure (ha : a ∈ AddSubmonoid.closure (S : Set R)) (hb : b ∈ S) :
    a * b ∈ AddSubmonoid.closure (S : Set R)

{M : Type u_1}
{R : Type u_4}
[NonUnitalNonAssocSemiring R]
[SetLike M R]
[MulMemClass M R]
{S : M}
{a b : R}
(ha : a ∈ AddSubmonoid.closure ↑S)
(hb : b ∈ S)


theorem Nonempty.fst (h : (s ×ˢ t).Nonempty) : s.Nonempty

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : Finset β}
(h : (s ×ˢ t).Nonempty)


theorem nhdsWithin_eq_comap_uniformity_of_mem {x : α} {T : Set α} (hx : x ∈ T) (S : Set α) :
    𝓝[S] x = (𝓤 α ⊓ 𝓟 (T ×ˢ S)).comap (Prod.mk x)

{α : Type ua}
[UniformSpace α]
{x : α}
{T : Set α}
(hx : x ∈ T)
(S : Set α)

𝓝[S] x = Filter.comap (Prod.mk x) (𝓤 α ⊓ 𝓟 (T ×ˢ S))


theorem span_union (s t : Set M) : lieSpan R L (s ∪ t) = lieSpan R L s ⊔ lieSpan R L t

(R : Type u)
(L : Type v)
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(s t : Set M)

LieSubmodule.lieSpan R L (s ∪ t) = LieSubmodule.lieSpan R L s ⊔ LieSubmodule.lieSpan R L t


@[simp, norm_cast]
theorem ofReal_inv (r : ℝ) : ((r⁻¹ : ℝ) : ℂ) = (r : ℂ)⁻¹

↑r⁻¹ = (↑r)⁻¹


theorem gradedComm_algebraMap (r : R) :
    gradedComm R 𝒜 ℬ (algebraMap R _ r) = algebraMap R _ r

(R : Type u_1)
{ι : Type u_2}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
(𝒜 : ι → Type u_5)
(ℬ : ι → Type u_6)
[CommRing R]
[(i : ι) → AddCommGroup (𝒜 i)]
[(i : ι) → AddCommGroup (ℬ i)]
[(i : ι) → Module R (𝒜 i)]
[(i : ι) → Module R (ℬ i)]
[DirectSum.GRing 𝒜]
[DirectSum.GRing ℬ]
[DirectSum.GAlgebra R 𝒜]
[DirectSum.GAlgebra R ℬ]
(r : R)

(TensorProduct.gradedComm R 𝒜 ℬ) ((algebraMap R ((⨁ (i : ι), 𝒜 i) ⊗[R] ⨁ (i : ι), ℬ i)) r) =
  (algebraMap R ((⨁ (i : ι), ℬ i) ⊗[R] ⨁ (i : ι), 𝒜 i)) r


theorem gcd_div {m n k : Nat} (H1 : k ∣ m) (H2 : k ∣ n) :
    gcd (m / k) (n / k) = gcd m n / k


@[simp] theorem reverse_append (as bs : List α) : (as ++ bs).reverse = bs.reverse ++ as.reverse


theorem ext_iff {α : Type*} (x y : ULift α) : x = y ↔ x.down = y.down

{α : Type u_1}
(x y : ULift.{u_2, u_1} α)


lemma inf_sSup_eq : a ⊓ sSup s = ⨆ b ∈ s, a ⊓ b

{α : Type u}
(minAx : Order.Frame.MinimalAxioms α)
{s : Set α}
{a : α}


theorem lt_moveRight {x : PGame} (o : Numeric x) (j) : x < x.moveRight j

{x : SetTheory.PGame}
(o : x.Numeric)
(j : x.RightMoves)


@[simp]
theorem mk_eq_zero {f : CauSeq _ abv} : mk f = 0 ↔ LimZero f

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{f : CauSeq β abv}


@[simp]
theorem biprod.sndKernelFork_ι : Fork.ι (biprod.sndKernelFork X Y) = (biprod.inl : X ⟶ X ⊞ Y)

CategoryTheory.Limits.Fork.ι (CategoryTheory.Limits.biprod.sndKernelFork X Y) = CategoryTheory.Limits.biprod.inl


@[simp]
theorem associated_unit_mul_left_iff {β : Type*} [CommMonoid β] {a b : β} {u : Units β} :
    Associated (↑u * a) b ↔ Associated a b

{β : Type u_5}
[CommMonoid β]
{a b : β}
{u : βˣ}


lemma commShiftIso_add' {a b c : A} (h : a + b = c) :
    F.commShiftIso c = CommShift.isoAdd' h (F.commShiftIso a) (F.commShiftIso b)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_6, u_2} D]
(F : CategoryTheory.Functor C D)
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[F.CommShift A]
{a b c : A}
(h : a + b = c)

F.commShiftIso c = CategoryTheory.Functor.CommShift.isoAdd' h (F.commShiftIso a) (F.commShiftIso b)


/-- **Young's inequality**, `ℝ≥0` version with real conjugate exponents. -/
theorem young_inequality_real (a b : ℝ≥0) {p q : ℝ} (hpq : p.IsConjExponent q) :
    a * b ≤ a ^ p / Real.toNNReal p + b ^ q / Real.toNNReal q

a * b ≤ a ^ p / p.toNNReal + b ^ q / q.toNNReal


theorem infs_infs_infs_comm : s ⊼ t ⊼ (u ⊼ v) = s ⊼ u ⊼ (t ⊼ v)

{α : Type u_2}
[SemilatticeInf α]
(s t u v : Set α)


@[simp]
theorem Perm.subtypeCongr.right_apply {a : ε} (h : ¬p a) : ep.subtypeCongr en a = en ⟨a, h⟩

{ε : Type u_1}
{p : ε → Prop}
[DecidablePred p]
(ep : Equiv.Perm { a // p a })
(en : Equiv.Perm { a // ¬p a })
{a : ε}
(h : ¬p a)


@[simp] lemma mem_killingCompl {x : L} :
    x ∈ I.killingCompl ↔ ∀ y ∈ I, killingForm R L y x = 0

(R : Type u_1)
(L : Type u_3)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
{x : L}

x ∈ LieIdeal.killingCompl R L I ↔ ∀ y ∈ I, ((killingForm R L) y) x = 0


lemma _root_.Antitone.mapsTo_uIcc (hf : Antitone f) : MapsTo f (uIcc a b) (uIcc (f a) (f b))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[Lattice β]
{f : α → β}
{a b : α}
(hf : Antitone f)

Set.MapsTo f (Set.uIcc a b) (Set.uIcc (f a) (f b))


@[simp]
theorem support_erase [DecidableEq α] {a : α} {f : α →₀ M} :
    (f.erase a).support = f.support.erase a

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

(Finsupp.erase a f).support = f.support.erase a


private lemma finite_setOf_bounded (α) [Finite α] (n : ℕ) : Finite {f : α →₀ ℕ | ∀ a, f a ≤ n}


theorem StrictMonoOn.exists_deriv_lt_slope {x y : ℝ} {f : ℝ → ℝ} (hf : ContinuousOn f (Icc x y))
    (hxy : x < y) (hf'_mono : StrictMonoOn (deriv f) (Ioo x y)) :
    ∃ a ∈ Ioo x y, deriv f a < (f y - f x) / (y - x)

(hf'_mono : StrictMonoOn (deriv f) (Set.Ioo x y))

∃ a ∈ Set.Ioo x y, deriv f a < (f y - f x) / (y - x)


theorem piiUnionInter_singleton_left (s : ι → Set α) (S : Set ι) :
    piiUnionInter (fun i => ({s i} : Set (Set α))) S =
      { s' : Set α | ∃ (t : Finset ι) (_ : ↑t ⊆ S), s' = ⋂ i ∈ t, s i }

{α : Type u_1}
{ι : Type u_2}
(s : ι → Set α)
(S : Set ι)

piiUnionInter (fun i => {s i}) S = {s' | ∃ t, ∃ (_ : ↑t ⊆ S), s' = ⋂ i ∈ t, s i}


@[to_additive (attr := simp)]
theorem sSup_one : sSup (1 : Set α) = 1

{α : Type u_1}
[CompleteLattice α]
[One α]


@[simp] lemma neg_τ₃ (φ : S₁ ⟶ S₂) : (-φ).τ₃ = -φ.τ₃

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


/-- A polynomial of degree 2 or 3 is irreducible iff it doesn't have roots. -/
theorem irreducible_iff_roots_eq_zero_of_degree_le_three
    {p : K[X]} (hp2 : 2 ≤ p.natDegree) (hp3 : p.natDegree ≤ 3) : Irreducible p ↔ p.roots = 0

{K : Type u_1}
[Field K]
{p : Polynomial K}
(hp2 : 2 ≤ p.natDegree)
(hp3 : p.natDegree ≤ 3)


/-- **Hölder inequality**: the scalar product of two functions is bounded by the product of their
`L^p` and `L^q` norms when `p` and `q` are conjugate exponents. Version for sums over finite sets,
with real-valued functions. -/
theorem inner_le_Lp_mul_Lq (hpq : IsConjExponent p q) :
    ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) * (∑ i ∈ s, |g i| ^ q) ^ (1 / q)

{ι : Type u}
(s : Finset ι)
(f g : ι → ℝ)
{p q : ℝ}
(hpq : p.IsConjExponent q)


@[simp]
lemma piScalarRightHom_tmul (x : N) (f : ι → R) :
    piScalarRightHom R S N ι (x ⊗ₜ f) = (fun j ↦ f j • x)

(R : Type u_1)
[CommSemiring R]
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
(N : Type u_3)
[AddCommMonoid N]
[Module R N]
[Module S N]
[IsScalarTower R S N]
(ι : Type u_4)
(x : N)
(f : ι → R)

(TensorProduct.piScalarRightHom R S N ι) (x ⊗ₜ[R] f) = fun j => f j • x


/-- The first projection at a point in a product is `C^∞`. -/
theorem contDiffAt_fst {p : E × F} : ContDiffAt 𝕜 n (Prod.fst : E × F → E) p

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{p : E × F}


theorem coe_zeta_mul_apply [Semiring R] {f : ArithmeticFunction R} {x : ℕ} :
    (↑ζ * f) x = ∑ i ∈ divisors x, f i

{R : Type u_1}
[Semiring R]
{f : ArithmeticFunction R}
{x : ℕ}

(↑ArithmeticFunction.zeta * f) x = ∑ i ∈ x.divisors, f i


¬a → b ↔ ¬b → a


theorem symmDiff_right_injective (a : α) : Injective (a ∆ ·)

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


theorem HasFiniteFPowerSeriesOnBall.congr (hf : HasFiniteFPowerSeriesOnBall f p x n r)
    (hg : EqOn f g (EMetric.ball x r)) : HasFiniteFPowerSeriesOnBall g p x n r


@[simp]
theorem fastGrowing_zero : fastGrowing 0 = Nat.succ


theorem conj_nat_cast (n : ℕ) : conj (n : K) = n


@[simp]
theorem ofAdd_le {a b : α} : ofAdd a ≤ ofAdd b ↔ a ≤ b

Multiplicative.ofAdd a ≤ Multiplicative.ofAdd b ↔ a ≤ b


@[to_additive (attr := simp)]
theorem mul_lt_mul_iff_left [CovariantClass α α (· * ·) (· < ·)]
    [ContravariantClass α α (· * ·) (· < ·)] (a : α) {b c : α} :
    a * b < a * c ↔ b < c

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

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


theorem commProb_le_one : commProb M ≤ 1


@[simp]
theorem comp_assoc (f : C →⋆ₙ+* D) (g : B →⋆ₙ+* C) (h : A →⋆ₙ+* B) :
    (f.comp g).comp h = f.comp (g.comp h)

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
{D : Type u_4}
[NonUnitalNonAssocSemiring A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Star B]
[NonUnitalNonAssocSemiring C]
[Star C]
[NonUnitalNonAssocSemiring D]
[Star D]
(f : C →⋆ₙ+* D)
(g : B →⋆ₙ+* C)
(h : A →⋆ₙ+* B)


/-- The tangent of an angle in a right-angled triangle multiplied by the adjacent side equals
the opposite side. -/
theorem tan_oangle_add_right_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.tan (o.oangle x (x + y)) * ‖x‖ = ‖y‖

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


@[deprecated pairwise_iff_forall_sublist (since := "2023-09-18")]
theorem pairwise_of_reflexive_on_dupl_of_forall_ne [DecidableEq α] {l : List α} {r : α → α → Prop}
    (hr : ∀ a, 1 < count a l → r a a) (h : ∀ a ∈ l, ∀ b ∈ l, a ≠ b → r a b) : l.Pairwise r

(hr : ∀ (a : α), 1 < List.count a l → r a a)

(h : ∀ (a : α), a ∈ l → ∀ (b : α), b ∈ l → a ≠ b → r a b)


@[simp]
theorem range_log : range log = univ


@[to_additive]
theorem ContMDiffWithinAt.div {f g : M → G} {s : Set M} {x₀ : M}
    (hf : ContMDiffWithinAt I' I n f s x₀) (hg : ContMDiffWithinAt I' I n g s x₀) :
    ContMDiffWithinAt I' I n (fun x => f x / g x) 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_5}
[TopologicalSpace G]
[ChartedSpace H G]
[AddGroup G]
[LieAddGroup 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]
{n : ℕ∞}
{f g : M → G}
{s : Set M}
{x₀ : M}
(hf : ContMDiffWithinAt I' I n f s x₀)
(hg : ContMDiffWithinAt I' I n g s x₀)

ContMDiffWithinAt I' I n (fun x => f x - g x) s x₀


@[to_additive]
theorem srange_eq_map (f : M →ₙ* N) : f.srange = (⊤ : Subsemigroup M).map f

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(f : M →ₙ* N)


theorem sup_le (K₁ K₂ : Compacts G) : μ (K₁ ⊔ K₂) ≤ μ K₁ + μ K₂

{G : Type w}
[TopologicalSpace G]
(μ : MeasureTheory.Content G)
(K₁ K₂ : TopologicalSpace.Compacts G)

(fun s => ↑(μ.toFun s)) (K₁ ⊔ K₂) ≤ (fun s => ↑(μ.toFun s)) K₁ + (fun s => ↑(μ.toFun s)) K₂


/-- If the action of a countable group `G` admits an invariant measure `μ` with a fundamental domain
`s`, then every null-measurable set `t` such that the sets `g • t ∩ s` are pairwise a.e.-disjoint
has measure at most `μ s`. -/
@[to_additive "If the additive action of a countable group `G` admits an invariant measure `μ` with
  a fundamental domain `s`, then every null-measurable set `t` such that the sets `g +ᵥ t ∩ s` are
  pairwise a.e.-disjoint has measure at most `μ s`."]
theorem measure_le_of_pairwise_disjoint (hs : IsFundamentalDomain G s μ)
    (ht : NullMeasurableSet t μ) (hd : Pairwise (AEDisjoint μ on fun g : G => g • t ∩ s)) :
    μ t ≤ μ s

[MeasureTheory.SMulInvariantMeasure G α μ]

(hs : MeasureTheory.IsFundamentalDomain G s μ)

(ht : MeasureTheory.NullMeasurableSet t μ)

(hd : Pairwise (MeasureTheory.AEDisjoint μ on fun g => g • t ∩ s))


theorem map_inv_natCast_smul [AddCommMonoid M] [AddCommMonoid M₂] {F : Type*} [FunLike F M M₂]
    [AddMonoidHomClass F M M₂] (f : F) (R S : Type*)
    [DivisionSemiring R] [DivisionSemiring S] [Module R M]
    [Module S M₂] (n : ℕ) (x : M) : f ((n⁻¹ : R) • x) = (n⁻¹ : S) • f x

{M : Type u_3}
{M₂ : Type u_4}
[AddCommMonoid M]
[AddCommMonoid M₂]
{F : Type u_5}
[FunLike F M M₂]
[AddMonoidHomClass F M M₂]
(f : F)
(R : Type u_6)
(S : Type u_7)
[DivisionSemiring R]
[DivisionSemiring S]
[Module R M]
[Module S M₂]
(n : ℕ)
(x : M)


@[simps!]
instance category : Category (Square C)

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

(CategoryTheory.CategoryStruct.id sq).τ₄ = CategoryTheory.CategoryStruct.id sq.X₄


@[simp]
theorem augmentTruncate_hom_f_succ (C : ChainComplex V ℕ) (i : ℕ) :
    (augmentTruncate C).hom.f (i + 1) = 𝟙 (C.X (i + 1))

C.augmentTruncate.hom.f (i + 1) = 𝟙 (C.X (i + 1))


/-- Unfold lemma for `detAux`.

See also `detAux_def''` which allows you to vary the basis.
-/
theorem detAux_def' (b : Basis ι A M) (f : M →ₗ[A] M) :
    LinearMap.detAux (Trunc.mk b) f = Matrix.det (LinearMap.toMatrix b b f)

{M : Type u_2}
[AddCommGroup M]
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
{A : Type u_5}
[CommRing A]
[Module A M]
(b : Basis ι A M)
(f : M →ₗ[A] M)

(LinearMap.detAux (Trunc.mk b)) f = ((LinearMap.toMatrix b b) f).det


theorem coe_lpBCFₗᵢ_symm (f : α →ᵇ E) : ((lpBCFₗᵢ E 𝕜).symm f : α → E) = f

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_5}
[TopologicalSpace α]
[DiscreteTopology α]
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(f : BoundedContinuousFunction α E)


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

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

(CategoryTheory.Limits.coneLeftOpOfCocone c).π.app X = (c.ι.app (Opposite.unop X)).unop


theorem Option.comp_traverse {α β γ} (f : β → F γ) (g : α → G β) (x : Option α) :
    Option.traverse (Comp.mk ∘ (f <$> ·) ∘ g) x =
      Comp.mk (Option.traverse f <$> Option.traverse g x)

{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative G]
{α : Type u_1}
{β γ : Type u}
(f : β → F γ)
(g : α → G β)
(x : Option α)

Option.traverse (Functor.Comp.mk ∘ (fun x => f <$> x) ∘ g) x =
  Functor.Comp.mk (Option.traverse f <$> Option.traverse g x)


theorem withDensity_apply_le (f : α → ℝ≥0∞) (s : Set α) :
    ∫⁻ a in s, f a ∂μ ≤ μ.withDensity f s

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

∫⁻ (a : α) in s, f a ∂μ ≤ (μ.withDensity f) s


@[simp]
theorem map_smul {F M X Y : Type*} [SMul M X] [SMul M Y]
    [FunLike F X Y] [MulActionHomClass F M X Y]
    (f : F) (c : M) (x : X) : f (c • x) = c • f x

{F : Type u_8}
{M : Type u_9}
{X : Type u_10}
{Y : Type u_11}
[SMul M X]
[SMul M Y]
[FunLike F X Y]
[MulActionHomClass F M X Y]
(f : F)
(c : M)
(x : X)


@[deprecated (since := "2024-01-14")]
theorem iUnion_null_iff' (m : OuterMeasure α) {ι : Prop} {s : ι → Set α} :
    m (⋃ i, s i) = 0 ↔ ∀ i, m (s i) = 0

{α : Type u_1}
(m : MeasureTheory.OuterMeasure α)
{ι : Prop}
{s : ι → Set α}


@[simp]
theorem coe_mul (f g : M₁ →L[R₁] M₁) : ⇑(f * g) = f ∘ g

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
(f g : M₁ →L[R₁] M₁)


theorem leadingCoeff_of_injective (hf : Injective f) (p : R[X]) :
    leadingCoeff (p.map f) = f (leadingCoeff p)

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
{f : R →+* S}
(hf : Function.Injective ⇑f)
(p : R[X])

(Polynomial.map f p).leadingCoeff = f p.leadingCoeff


lemma nsmul_piAntidiag [DecidableEq (ι → ℕ)] (s : Finset ι) (m : ℕ) {n : ℕ} (hn : n ≠ 0) :
    n •ℕ piAntidiag s m = (piAntidiag s (n * m)).filter fun f : ι → ℕ ↦ ∀ i ∈ s, n ∣ f i

{ι : Type u_1}
[DecidableEq ι]
[DecidableEq (ι → ℕ)]
(s : Finset ι)
(m : ℕ)
{n : ℕ}
(hn : n ≠ 0)

SMul.smul n (s.piAntidiag m) = Finset.filter (fun f => ∀ i ∈ s, n ∣ f i) (s.piAntidiag (n * m))


lemma isIso_opcyclesMap'_of_isIso_of_epi (φ : S₁ ⟶ S₂) (h₂ : IsIso φ.τ₂) (h₁ : Epi φ.τ₁)
    (h₁ : S₁.RightHomologyData) (h₂ : S₂.RightHomologyData) :
    IsIso (opcyclesMap' φ h₁ h₂)

∀ (h₁ : S₁.RightHomologyData) (h₂ : S₂.RightHomologyData),
  CategoryTheory.IsIso (CategoryTheory.ShortComplex.opcyclesMap' φ h₁ h₂)


@[simp]
theorem id_toAffineMap : (id.toAffineMap : P →ᵃ[𝕜] P) = AffineMap.id 𝕜 P

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

AffineIsometry.id.toAffineMap = AffineMap.id 𝕜 P


theorem power_add {a b c : Cardinal} : a ^ (b + c) = a ^ b * a ^ c


protected theorem pairwise_disjoint :
    Pairwise fun C D : G.ComponentCompl K => Disjoint (C : Set V) (D : Set V)

{V : Type u}
{G : SimpleGraph V}
{K : Set V}


/-- Postcomposing `f` with `Prod.fst` is continuous at `x` -/
@[fun_prop]
theorem ContinuousAt.fst {f : X → Y × Z} {x : X} (hf : ContinuousAt f x) :
    ContinuousAt (fun x : X => (f x).1) x

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Y × Z}
{x : X}
(hf : ContinuousAt f x)


/-- Reindexing terms of a dfinsupp.

This is the dfinsupp version of `Equiv.piCongrLeft'`. -/
@[simps apply]
def equivCongrLeft [∀ i, Zero (β i)] (h : ι ≃ κ) : (Π₀ i, β i) ≃ Π₀ k, β (h.symm k)

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

(DFinsupp.equivCongrLeft h) f = DFinsupp.comapDomain' ⇑h.symm ⋯ f


theorem zsmul_comp (n : ℤ) : (n • f) ≫ g = n • f ≫ g

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{P Q R : C}
(f : P ⟶ Q)
(g : Q ⟶ R)
(n : ℤ)


theorem HasFiniteFPowerSeriesOnBall.hasFDerivAt (h : HasFiniteFPowerSeriesOnBall f p x n r)
    {y : E} (hy : (‖y‖₊ : ℝ≥0∞) < r) :
    HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p.changeOrigin y 1)) (x + y)

HasFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p.changeOrigin y 1)) (x + y)


nonrec theorem threeAPFree_sphere : ThreeAPFree (sphere n d k : Set (Fin n → ℕ))


/-- The natural transformation `S.cycles ⟶ S.X₂` for all short complexes `S`. -/
@[simps]
noncomputable def iCyclesNatTrans : cyclesFunctor C ⟶ ShortComplex.π₂

(CategoryTheory.ShortComplex.iCyclesNatTrans C).app S = S.iCycles


@[simp]
theorem equivLT_apply (f : r ≃r s) (g : s ≺i t) (a : α) : (equivLT f g) a = g (f a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
{t : γ → γ → Prop}
(f : r ≃r s)
(g : s ≺i t)
(a : α)

(PrincipalSeg.equivLT f g).toRelEmbedding a = g.toRelEmbedding (f a)


lemma compProd_congr [SFinite μ] [IsSFiniteKernel κ] [IsSFiniteKernel η]
    (h : κ =ᵐ[μ] η) : μ ⊗ₘ κ = μ ⊗ₘ η

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{μ : MeasureTheory.Measure α}
{κ η : ProbabilityTheory.Kernel α β}
[MeasureTheory.SFinite μ]
[ProbabilityTheory.IsSFiniteKernel κ]
[ProbabilityTheory.IsSFiniteKernel η]
(h : ⇑κ =ᵐ[μ] ⇑η)

μ ⊗ₘ κ = μ ⊗ₘ η


lemma imageSieve_mem [G.IsDenseSubsite J K] {U V} (f : G.obj U ⟶ G.obj V) :
    G.imageSieve f ∈ J _

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[CategoryTheory.Functor.IsDenseSubsite J K G]


/-- The kernel of `zmultiplesHom G g` is equal to the additive subgroup generated by
    `addOrderOf g`. -/
theorem zmultiplesHom_ker_eq [AddGroup G] (g : G) :
    (zmultiplesHom G g).ker = zmultiples ↑(addOrderOf g)

((zmultiplesHom G) g).ker = AddSubgroup.zmultiples ↑(addOrderOf g)


/-- A local homeomorphism is an open map. -/
protected theorem isOpenMap (hf : IsLocalHomeomorph f) : IsOpenMap f

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


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

{ι : Type u_1}
{α : ι → Type u_2}
{β : Type u_3}
(s : Finset ι)
(t : (i : ι) → Finset (α i))
(f : (i : ι) → α i → Set β)


theorem iInf_ennreal {α : Type*} [CompleteLattice α] {f : ℝ≥0∞ → α} :
    ⨅ n, f n = (⨅ n : ℝ≥0, f n) ⊓ f ∞

{α : Type u_2}
[CompleteLattice α]
{f : ℝ≥0∞ → α}


theorem GroupFG.iff_add_fg : Group.FG G ↔ AddGroup.FG (Additive G)


theorem mem_iSup {ι : Sort v} {l : ι → Language α} {x : List α} : (x ∈ ⨆ i, l i) ↔ ∃ i, x ∈ l i

{α : Type u_1}
{ι : Sort v}
{l : ι → Language α}
{x : List α}


/-- The sets `primitiveRoots k R` are pairwise disjoint. -/
theorem disjoint {k l : ℕ} (h : k ≠ l) : Disjoint (primitiveRoots k R) (primitiveRoots l R)

{R : Type u_4}
[CommRing R]
[IsDomain R]
{k l : ℕ}
(h : k ≠ l)


/-- The restriction of `f - μ • 1` to the generalized `μ`-eigenspace is nilpotent. -/
lemma isNilpotent_restrict_iSup_sub_algebraMap [IsNoetherian R M] (f : End R M) (μ : R)
    (h : MapsTo (f - algebraMap R (End R M) μ)
      ↑(⨆ k, f.genEigenspace μ k) ↑(⨆ k, f.genEigenspace μ k) :=
      mapsTo_iSup_genEigenspace_of_comm (Algebra.mul_sub_algebraMap_commutes f μ) μ) :
    IsNilpotent ((f - algebraMap R (End R M) μ).restrict h)

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

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


theorem List.Nodup.length_le_card {α : Type*} [Fintype α] {l : List α} (h : l.Nodup) :
    l.length ≤ Fintype.card α

{α : Type u_4}
[Fintype α]
{l : List α}
(h : l.Nodup)


theorem xor_cancel_left (n m : ℕ) : n ^^^ (n ^^^ m) = m


@[reassoc (attr := simp)]
theorem tensor_hom_inv_id' {V W X Y Z : C} (f : V ⟶ W) [IsIso f] (g : X ⟶ Y) (h : Y ⟶ Z) :
    (g ⊗ f) ≫ (h ⊗ inv f) = (g ⊗ 𝟙 V) ≫ (h ⊗ 𝟙 V)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{V W X Y Z : C}
(f : V ⟶ W)
[CategoryTheory.IsIso f]
(g : X ⟶ Y)
(h : Y ⟶ Z)

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom g f)
    (CategoryTheory.MonoidalCategory.tensorHom h (CategoryTheory.inv f)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom g (CategoryTheory.CategoryStruct.id V))
    (CategoryTheory.MonoidalCategory.tensorHom h (CategoryTheory.CategoryStruct.id V))


theorem minimalPeriod_pos_of_mem_periodicPts (hx : x ∈ periodicPts f) : 0 < minimalPeriod f x

{α : Type u_1}
{f : α → α}
{x : α}
(hx : x ∈ Function.periodicPts f)


theorem Multiplicative.isMonoidHom [AddZeroClass α] [AddZeroClass β] {f : α → β}
    (hf : IsAddMonoidHom f) : @IsMonoidHom (Multiplicative α) (Multiplicative β) _ _ f

{α : Type u}
{β : Type v}
[AddZeroClass α]
[AddZeroClass β]
{f : α → β}
(hf : IsAddMonoidHom f)


lemma isDomain_iff_cancelMulZero_and_nontrivial [Semiring α] :
    IsDomain α ↔ IsCancelMulZero α ∧ Nontrivial α


@[to_additive (attr := simp)]
theorem subgroupOf_inj {H₁ H₂ K : Subgroup G} :
    H₁.subgroupOf K = H₂.subgroupOf K ↔ H₁ ⊓ K = H₂ ⊓ K

{G : Type u_1}
[AddGroup G]
{H₁ H₂ K : AddSubgroup G}

H₁.addSubgroupOf K = H₂.addSubgroupOf K ↔ H₁ ⊓ K = H₂ ⊓ K


theorem drop_length_le {l : List α} (h : l.length ≤ i) : drop i l = []

{α : Type u_1}
{i : Nat}
{l : List α}
(h : l.length ≤ i)


lemma IsAlgebraic.invOf {x : S} [Invertible x] (h : IsAlgebraic R x) : IsAlgebraic R (⅟ x)

{R : Type u}
{S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
[Invertible x]
(h : IsAlgebraic R x)


@[simp]
theorem coe_to_continuous_fun (f : α →ᵇ β) : (f.toContinuousMap : α → β) = f

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
(f : BoundedContinuousFunction α β)


theorem det_updateRow_smul (M : Matrix n n R) (j : n) (s : R) (u : n → R) :
    det (updateRow M j <| s • u) = s * det (updateRow M j u)

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(M : Matrix n n R)
(j : n)
(s : R)
(u : n → R)

(M.updateRow j (s • u)).det = s * (M.updateRow j u).det


theorem disjoint_of_le_right {s t u : Multiset α} (h : t ≤ u) : Disjoint s u → Disjoint s t

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


theorem length_pos_of_mem_splitWrtComposition {l l' : List α} {c : Composition l.length}
    (h : l' ∈ l.splitWrtComposition c) : 0 < length l'

{α : Type u_1}
{l l' : List α}
{c : Composition l.length}
(h : l' ∈ l.splitWrtComposition c)


@[to_additive]
theorem hasProd_prod {f : γ → β → α} {a : γ → α} {s : Finset γ} :
    (∀ i ∈ s, HasProd (f i) (a i)) → HasProd (fun b ↦ ∏ i ∈ s, f i b) (∏ i ∈ s, a i)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
[ContinuousAdd α]
{f : γ → β → α}
{a : γ → α}
{s : Finset γ}

(∀ i ∈ s, HasSum (f i) (a i)) → HasSum (fun b => ∑ i ∈ s, f i b) (∑ i ∈ s, a i)


lemma linearMap_apply_apply (ij : ι₂ × ι₁) (k : ι₁) :
    (b₁.linearMap b₂ ij) (b₁ k) = if ij.2 = k then b₂ ij.1 else 0

{R : Type u_1}
{M₁ : Type u_3}
{M₂ : Type u_4}
{ι₁ : Type u_6}
{ι₂ : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
[Fintype ι₁]
[Fintype ι₂]
[DecidableEq ι₁]
(b₁ : Basis ι₁ R M₁)
(b₂ : Basis ι₂ R M₂)
(ij : ι₂ × ι₁)
(k : ι₁)

((b₁.linearMap b₂) ij) (b₁ k) = if ij.2 = k then b₂ ij.1 else 0


/-- We have that `ringChar (ZMod n) = n`. -/
theorem ringChar_zmod_n (n : ℕ) : ringChar (ZMod n) = n


@[to_additive (attr := simp)]
lemma max'_one [LinearOrder α] : (1 : Finset α).max' one_nonempty = 1


/-- If a compact set belongs to a filter and this filter has a unique cluster point `y` in this set,
then the filter is less than or equal to `𝓝 y`. -/
lemma IsCompact.le_nhds_of_unique_clusterPt (hs : IsCompact s) {l : Filter X} {y : X}
    (hmem : s ∈ l) (h : ∀ x ∈ s, ClusterPt x l → x = y) : l ≤ 𝓝 y

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : IsCompact s)
{l : Filter X}
{y : X}
(hmem : s ∈ l)
(h : ∀ x ∈ s, ClusterPt x l → x = y)


theorem card_fintype_Ioo : Fintype.card (Set.Ioo a b) = b - a - 1

Fintype.card ↑(Set.Ioo a b) = ↑b - ↑a - 1


@[continuity, fun_prop]
protected lemma Continuous.dist [TopologicalSpace β] {f g : β → α} (hf : Continuous f)
    (hg : Continuous g) : Continuous fun b => dist (f b) (g b)

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[TopologicalSpace β]
{f g : β → α}
(hf : Continuous f)
(hg : Continuous g)


theorem subset_subalgebra {S R A : Type*} [CommSemiring R] [Ring A] [Algebra R A]
    [SetLike S A] [SubringClass S A] [SMulMemClass S R A] {s : S} (a : s) :
    spectrum R (a : A) ⊆ spectrum R a

{S : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Ring A]
[Algebra R A]
[SetLike S A]
[SubringClass S A]
[SMulMemClass S R A]
{s : S}
(a : ↥s)


theorem mem_of_mem_nhdsWithin {a : α} {s t : Set α} (ha : a ∈ s) (ht : t ∈ 𝓝[s] a) : a ∈ t

{α : Type u_1}
[TopologicalSpace α]
{a : α}
{s t : Set α}
(ha : a ∈ s)
(ht : t ∈ 𝓝[s] a)


/-- `succAbove` is injective at the pivot -/
@[simp] lemma succAbove_left_inj {x y : Fin (n + 1)} : x.succAbove = y.succAbove ↔ x = y


lemma map_id (i : Fin 2) : map f i i (by simp) = 𝟙 _

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X₀ X₁ : C}
(f : X₀ ⟶ X₁)
(i : Fin 2)

CategoryTheory.ComposableArrows.Mk₁.map f i i ⋯ =
  CategoryTheory.CategoryStruct.id (CategoryTheory.ComposableArrows.Mk₁.obj X₀ X₁ i)


/-- If `f : ℝ → ℝ` is strictly convex on `S` and right-differentiable at `x ∈ S`, then the slope of
any secant line with left endpoint at `x` is strictly greater than the right derivative of `f` at
`x`. -/
lemma lt_slope_of_hasDerivWithinAt_Ioi (hfc : StrictConvexOn ℝ S f)
    (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) (hf' : HasDerivWithinAt f f' (Ioi x) x) :
    f' < slope f x y

(hf' : HasDerivWithinAt f f' (Set.Ioi x) x)


theorem findMax'_dual (t) (x : α) : findMax' x (dual t) = findMin' t x

Ordnode.findMax' x t.dual = t.findMin' x


theorem update_le_iff : Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j) (_ : j ≠ i), x j ≤ y j

{ι : Type u_1}
{π : ι → Type u_4}
[DecidableEq ι]
[(i : ι) → Preorder (π i)]
{x y : (i : ι) → π i}
{i : ι}
{a : π i}

Function.update x i a ≤ y ↔ a ≤ y i ∧ ∀ (j : ι), j ≠ i → x j ≤ y j


/-- `χ₈'` takes values in `{0, 1, -1}` -/
theorem isQuadratic_χ₈' : χ₈'.IsQuadratic


@[simp]
theorem rootSpace_comap_eq_weightSpace (χ : H → R) :
    (rootSpace H χ).comap H.incl' = weightSpace H χ

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
[LieAlgebra.IsNilpotent R ↥H]
(χ : ↥H → R)

LieSubmodule.comap H.incl' (LieAlgebra.rootSpace H χ) = LieModule.weightSpace (↥H) χ


theorem invOf_diagonal_eq {α} [Semiring α] (v : n → α) [Invertible v] [Invertible (diagonal v)] :
    ⅟ (diagonal v) = diagonal (⅟ v)

{n : Type u'}
[Fintype n]
[DecidableEq n]
{α : Type u_2}
[Semiring α]
(v : n → α)
[Invertible v]
[Invertible (Matrix.diagonal v)]

⅟(Matrix.diagonal v) = Matrix.diagonal ⅟v


theorem ContMDiff.comp_contMDiffOn {f : M → M'} {g : M' → M''} {s : Set M}
    (hg : ContMDiff I' I'' n g) (hf : ContMDiffOn I I' n f s) : ContMDiffOn I I'' n (g ∘ f) s

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


/-- Another way to coerce a `Multiset` to a type is to go through `m.toEnumFinset` and coerce
that `Finset` to a type. -/
@[simps]
def Multiset.coeEquiv (m : Multiset α) : m ≃ m.toEnumFinset

{α : Type u_1}
[DecidableEq α]
(m : Multiset α)
(x : { x // x ∈ m.toEnumFinset })


theorem of_iso {P Q : C} (i : P ≅ Q) (hP : Injective P) : Injective Q

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{P Q : C}
(i : P ≅ Q)
(hP : CategoryTheory.Injective P)


theorem sub_one_lt_of_le {a b : Int} (H : a ≤ b) : a - 1 < b


@[simp]
theorem birthday_eq_zero {x : PGame} :
    birthday x = 0 ↔ IsEmpty x.LeftMoves ∧ IsEmpty x.RightMoves

x.birthday = 0 ↔ IsEmpty x.LeftMoves ∧ IsEmpty x.RightMoves


theorem smul_def {M : Type*} [MulAction ℝ M] (c : ℝ≥0) (x : M) : c • x = (c : ℝ) • x

{M : Type u_1}
[MulAction ℝ M]
(c : ℝ≥0)
(x : M)


/-- `eval₂` as a `RingHom` for noncommutative rings -/
@[simps]
def eval₂RingHom' (f : R →+* S) (x : S) (hf : ∀ a, Commute (f a) x) : R[X] →+* S

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(f : R →+* S)
(x : S)
(hf : ∀ (a : R), Commute (f a) x)
(p : R[X])

(Polynomial.eval₂RingHom' f x hf) p = Polynomial.eval₂ f x p


lemma comm₁_aux {i₁ i₁' : I₁} (hi₁ : c₁.Rel i₁ i₁') {i₂ i₂' : I₂} (hi₂ : c₂.Rel i₂ i₂') (j : J)
    (hj : ComplexShape.π c₁ c₂ c (i₁', i₂) = j) :
    ComplexShape.ε₁ c₁ c₂ c (i₁, i₂) • (F.map (h₁.hom i₁' i₁)).app (K₂.X i₂) ≫
      (F.obj (L₁.X i₁)).map (f₂.f i₂) ≫
        (((F.mapBifunctorHomologicalComplex c₁ c₂).obj L₁).obj L₂).d₂ c i₁ i₂ j =
    -(((F.mapBifunctorHomologicalComplex c₁ c₂).obj K₁).obj K₂).d₂ c i₁' i₂ (c.next j) ≫
      hom₁ h₁ f₂ F c (c.next j) j

{C₁ : Type u_1}
{C₂ : Type u_2}
{D : Type u_3}
{I₁ : Type u_4}
{I₂ : Type u_5}
{J : Type u_6}
[CategoryTheory.Category.{u_9, u_1} C₁]
[CategoryTheory.Category.{u_8, u_2} C₂]
[CategoryTheory.Category.{u_7, u_3} D]
[CategoryTheory.Preadditive C₁]
[CategoryTheory.Preadditive C₂]
[CategoryTheory.Preadditive D]
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
{K₁ L₁ : HomologicalComplex C₁ c₁}
{f₁ f₁' : K₁ ⟶ L₁}
(h₁ : Homotopy f₁ f₁')
{K₂ L₂ : HomologicalComplex C₂ c₂}
(f₂ : K₂ ⟶ L₂)
(F : C₁ ⥤ C₂ ⥤ D)
[F.Additive]
[∀ (X₁ : C₁), (F.obj X₁).Additive]
(c : ComplexShape J)
[DecidableEq J]
[TotalComplexShape c₁ c₂ c]
[K₁.HasMapBifunctor K₂ F c]
[L₁.HasMapBifunctor L₂ F c]
{i₁ i₁' : I₁}
(hi₁ : c₁.Rel i₁ i₁')
{i₂ i₂' : I₂}
(hi₂ : c₂.Rel i₂ i₂')
(j : J)
(hj : c₁.π c₂ c (i₁', i₂) = j)

c₁.ε₁ c₂ c (i₁, i₂) •
    (F.map (h₁.hom i₁' i₁)).app (K₂.X i₂) ≫
      (F.obj (L₁.X i₁)).map (f₂.f i₂) ≫ (((F.mapBifunctorHomologicalComplex c₁ c₂).obj L₁).obj L₂).d₂ c i₁ i₂ j =
  -(((F.mapBifunctorHomologicalComplex c₁ c₂).obj K₁).obj K₂).d₂ c i₁' i₂ (c.next j) ≫
      HomologicalComplex.mapBifunctorMapHomotopy.hom₁ h₁ f₂ F c (c.next j) j


/-- A dependent version of `Submodule.span_induction`. -/
@[elab_as_elim]
theorem span_induction' {p : ∀ x, x ∈ span R s → Prop}
    (mem : ∀ (x) (h : x ∈ s), p x (subset_span h))
    (zero : p 0 (Submodule.zero_mem _))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (Submodule.add_mem _ ‹_› ‹_›))
    (smul : ∀ (a : R) (x hx), p x hx → p (a • x) (Submodule.smul_mem _ _ ‹_›)) {x}
    (hx : x ∈ span R s) : p x hx

{p : (x : M) → x ∈ Submodule.span R s → Prop}

(add : ∀ (x : M) (hx : x ∈ Submodule.span R s) (y : M) (hy : y ∈ Submodule.span R s), p x hx → p y hy → p (x + y) ⋯)

(smul : ∀ (a : R) (x : M) (hx : x ∈ Submodule.span R s), p x hx → p (a • x) ⋯)


theorem Basis.restrict_base (h : M.Basis I X) : (M ↾ X).Base I

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


@[simp]
theorem id_apply (x : P) : (AffineIsometry.id : P →ᵃⁱ[𝕜] P) x = x

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


@[qify_simps] lemma intCast_le (a b : ℤ) : a ≤ b ↔ (a : ℚ) ≤ (b : ℚ)

a ≤ b ↔ ↑a ≤ ↑b


theorem add_compLp (L L' : E →L[𝕜] F) (f : Lp E p μ) :
    (L + L').compLp f = L.compLp f + L'.compLp f

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
(L L' : E →L[𝕜] F)
(f : ↥(MeasureTheory.Lp E p μ))


@[simp]
theorem edgeSet_fromEdgeSet : (fromEdgeSet s).edgeSet = s \ { e | e.IsDiag }

(SimpleGraph.fromEdgeSet s).edgeSet = s \ {e | e.IsDiag}


theorem Basis.coord_equivFun_symm [Finite ι] (b : Basis ι R M) (i : ι) (f : ι → R) :
    b.coord i (b.equivFun.symm f) = f i

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


@[simp]
theorem toFinset_filter (s : List α) (p : α → Bool) :
    (s.filter p).toFinset = s.toFinset.filter (p ·)

{α : Type u_1}
[DecidableEq α]
(s : List α)
(p : α → Bool)

(List.filter p s).toFinset = Finset.filter (fun x => p x = true) s.toFinset


theorem sum_univ_of [Fintype ι] (x : ⨁ i, β i) :
    ∑ i ∈ Finset.univ, of β i (x i) = x

{ι : Type v}
{β : ι → Type w}
[(i : ι) → AddCommMonoid (β i)]
[DecidableEq ι]
[Fintype ι]
(x : DirectSum ι fun i => β i)


@[simp]
theorem Multiset.card_coe (m : Multiset α) : Fintype.card m = Multiset.card m

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