/-- Equivalence between Young diagrams and weakly decreasing lists of positive natural numbers.
A Young diagram `μ` is equivalent to a list of row lengths. -/
@[simps]
def equivListRowLens : YoungDiagram ≃ { w : List ℕ // w.Sorted (· ≥ ·) ∧ ∀ x ∈ w, 0 < x }

(ww : { w // List.Sorted (fun x x_1 => x ≥ x_1) w ∧ ∀ x ∈ w, 0 < x })

YoungDiagram.equivListRowLens.symm ww = YoungDiagram.ofRowLens ↑ww ⋯


@[to_additive] lemma mul_le_mul_iff_of_ge [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· < ·)] {a₁ a₂ b₁ b₂ : α} (ha : a₁ ≤ a₂) (hb : b₁ ≤ b₂) :
    a₂ * b₂ ≤ a₁ * b₁ ↔ a₁ = a₂ ∧ b₁ = b₂

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

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


@[simp]
theorem updateColumn_subsingleton [Subsingleton n] (A : Matrix m n R) (i : n) (b : m → R) :
    A.updateColumn i b = (col (Fin 1) b).submatrix id (Function.const n 0)

{m : Type u_2}
{n : Type u_3}
{R : Type u_5}
[Subsingleton n]
(A : Matrix m n R)
(i : n)
(b : m → R)

A.updateColumn i b = (Matrix.col (Fin 1) b).submatrix id (Function.const n 0)


theorem indepFun_iff_indepSet_preimage {mβ : MeasurableSpace β} {mβ' : MeasurableSpace β'}
    [IsProbabilityMeasure μ] (hf : Measurable f) (hg : Measurable g) :
    IndepFun f g μ ↔
      ∀ s t, MeasurableSet s → MeasurableSet t → IndepSet (f ⁻¹' s) (g ⁻¹' t) μ

{Ω : Type u_1}
{β : Type u_6}
{β' : Type u_7}
{_mΩ : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
{f : Ω → β}
{g : Ω → β'}
{mβ : MeasurableSpace β}
{mβ' : MeasurableSpace β'}
[MeasureTheory.IsProbabilityMeasure μ]
(hf : Measurable f)
(hg : Measurable g)

ProbabilityTheory.IndepFun f g μ ↔
  ∀ (s : Set β) (t : Set β'), MeasurableSet s → MeasurableSet t → ProbabilityTheory.IndepSet (f ⁻¹' s) (g ⁻¹' t) μ


theorem Subpresheaf.isSheaf_iff (h : Presieve.IsSheaf J F) :
    Presieve.IsSheaf J G.toPresheaf ↔
      ∀ (U) (s : F.obj U), G.sieveOfSection s ∈ J (unop U) → s ∈ G.obj U

{J : CategoryTheory.GrothendieckTopology C}

(G : CategoryTheory.GrothendieckTopology.Subpresheaf F)

(h : CategoryTheory.Presieve.IsSheaf J F)

CategoryTheory.Presieve.IsSheaf J G.toPresheaf ↔
  ∀ (U : Cᵒᵖ) (s : F.obj U), G.sieveOfSection s ∈ J.sieves (Opposite.unop U) → s ∈ G.obj U


theorem ssubset_iff_subset_ne {s t : Finset α} : s ⊂ t ↔ s ⊆ t ∧ s ≠ t


theorem continuous_iff_continuous_comp {q : SeminormFamily 𝕜₂ F ι'} [TopologicalSpace E]
    [TopologicalAddGroup E] [TopologicalSpace F] (hq : WithSeminorms q) (f : E →ₛₗ[σ₁₂] F) :
    Continuous f ↔ ∀ i, Continuous ((q i).comp f)

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

Continuous ⇑f ↔ ∀ (i : ι'), Continuous ⇑((q i).comp f)


/-- Promote a `Fin n` into a larger `Fin m`, as a subtype where the underlying
values are retained.

This is the `Equiv` version of `Fin.castLE`. -/
@[simps apply symm_apply]
def Fin.castLEquiv {n m : ℕ} (h : n ≤ m) : Fin n ≃ { i : Fin m // (i : ℕ) < n }


@[simp]
theorem asIdeal_le_asIdeal (x y : PrimeSpectrum R) : x.asIdeal ≤ y.asIdeal ↔ x ≤ y

{R : Type u}
[CommSemiring R]
(x y : PrimeSpectrum R)


@[simp]
theorem map_expand (f : R →+* S) (p : ℕ) (φ : MvPolynomial σ R) :
    map f (expand p φ) = expand p (map f φ)

{σ : Type u_1}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(p : ℕ)
(φ : MvPolynomial σ R)

(MvPolynomial.map f) ((MvPolynomial.expand p) φ) = (MvPolynomial.expand p) ((MvPolynomial.map f) φ)


lemma measurable_densityProcess (κ : Kernel α (γ × β)) (ν : Kernel α γ) (n : ℕ)
    {s : Set β} (hs : MeasurableSet s) :
    Measurable (fun (p : α × γ) ↦ densityProcess κ ν n p.1 p.2 s)

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

Measurable fun p => κ.densityProcess ν n p.1 p.2 s


/-- Predicate for maps which preserve an addition. -/
structure IsAddHom {α β : Type*} [Add α] [Add β] (f : α → β) : Prop where
  /-- The proposition that `f` preserves addition. -/
  map_add : ∀ x y, f (x + y) = f x + f y

{α : Type u_1}
{β : Type u_2}
[Add α]
[Add β]
{f : α → β}
(self : IsAddHom f)
(x y : α)


theorem natDegree_mul_C (a0 : a ≠ 0) : (p * C a).natDegree = p.natDegree

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p : R[X]}
{a : R}
(a0 : a ≠ 0)

(p * Polynomial.C a).natDegree = p.natDegree


theorem sup_const_le : (s.sup fun _ => a) ≤ a

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
{s : Finset β}
{a : α}


@[to_additive]
theorem alternatingProd_cons_cons' (a b : α) (l : List α) :
    alternatingProd (a :: b :: l) = a * b⁻¹ * alternatingProd l

{α : Type u_2}
[One α]
[Mul α]
[Inv α]
(a b : α)
(l : List α)

(a :: b :: l).alternatingProd = a * b⁻¹ * l.alternatingProd


theorem norm_le_pow_iff_norm_lt_pow_add_one (x : ℤ_[p]) (n : ℤ) :
    ‖x‖ ≤ (p : ℝ) ^ n ↔ ‖x‖ < (p : ℝ) ^ (n + 1)

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


protected theorem IsBoundedBilinearMap.fderiv (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
    fderiv 𝕜 b p = h.deriv p

{𝕜 : 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]
{b : E × F → G}
(h : IsBoundedBilinearMap 𝕜 b)
(p : E × F)


/-- An unbundled description of lax monoidal functors. -/
class LaxMonoidal (F : C → D) [Functorial.{v₁, v₂} F] where
  /-- unit morphism -/
  ε : 𝟙_ D ⟶ F (𝟙_ C)
  /-- tensorator -/
  μ : ∀ X Y : C, F X ⊗ F Y ⟶ F (X ⊗ Y)
  μ_natural_left :
    ∀ {X Y : C} (f : X ⟶ Y) (X' : C),
      map F f ▷ F X' ≫ μ Y X' = μ X X' ≫ map F (f ▷ X') := by
    aesop_cat
  μ_natural_right :
    ∀ {X Y : C} (X' : C) (f : X ⟶ Y) ,
      F X' ◁ map F f ≫ μ X' Y = μ X' X ≫ map F (X' ◁ f) := by
    aesop_cat
  /-- associativity of the tensorator -/
  associativity :
    ∀ X Y Z : C,
      μ X Y ▷ F Z ≫ μ (X ⊗ Y) Z ≫ map F (α_ X Y Z).hom =
        (α_ (F X) (F Y) (F Z)).hom ≫ F X ◁ μ Y Z ≫ μ X (Y ⊗ Z) := by
    aesop_cat
  /-- left unitality -/
  left_unitality : ∀ X : C, (λ_ (F X)).hom = ε ▷ F X ≫ μ (𝟙_ C) X ≫ map F (λ_ X).hom := by
    aesop_cat
  /-- right unitality -/
  right_unitality : ∀ X : C, (ρ_ (F X)).hom = F X ◁ ε ≫ μ X (𝟙_ C) ≫ map F (ρ_ X).hom := by
    aesop_cat

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

CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.LaxMonoidal.μ X Y) (F Z) ≫
    CategoryTheory.LaxMonoidal.μ (CategoryTheory.MonoidalCategory.tensorObj X Y) Z ≫
      CategoryTheory.map F (CategoryTheory.MonoidalCategory.associator X Y Z).hom =
  (CategoryTheory.MonoidalCategory.associator (F X) (F Y) (F Z)).hom ≫
    CategoryTheory.MonoidalCategory.whiskerLeft (F X) (CategoryTheory.LaxMonoidal.μ Y Z) ≫
      CategoryTheory.LaxMonoidal.μ X (CategoryTheory.MonoidalCategory.tensorObj Y Z)


lemma pow_four_le_pow_two_of_pow_two_le (h : a ^ 2 ≤ b) : a ^ 4 ≤ b ^ 2

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
[ExistsAddOfLE R]
(h : a ^ 2 ≤ b)


@[simp]
theorem symmCompOfNondegenerate_left_apply (B₁ : BilinForm K V) {B₂ : BilinForm K V}
    (b₂ : B₂.Nondegenerate) (v w : V) : B₂ (symmCompOfNondegenerate B₁ B₂ b₂ w) v = B₁ w v

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
(B₁ : LinearMap.BilinForm K V)
{B₂ : LinearMap.BilinForm K V}
(b₂ : B₂.Nondegenerate)
(v w : V)

(B₂ ((B₁.symmCompOfNondegenerate B₂ b₂) w)) v = (B₁ w) v


@[to_additive Ici_add_Ioi_subset]
theorem Ici_mul_Ioi_subset' [LocallyFiniteOrderTop α] (a b : α) : Ici a * Ioi b ⊆ Ioi (a * b)

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

[CovariantClass α α (Function.swap HAdd.hAdd) LT.lt]

Finset.Ici a + Finset.Ioi b ⊆ Finset.Ioi (a + b)


/--
Shows that the `n + 1`th integer part `bₙ₊₁` of the stream is smaller or equal than the inverse of
the `n`th fractional part `frₙ` of the stream.
This result is straight-forward as `bₙ₊₁` is defined as the floor of `1 / frₙ`.
-/
theorem succ_nth_stream_b_le_nth_stream_fr_inv {ifp_n ifp_succ_n : IntFractPair K}
    (nth_stream_eq : IntFractPair.stream v n = some ifp_n)
    (succ_nth_stream_eq : IntFractPair.stream v (n + 1) = some ifp_succ_n) :
    (ifp_succ_n.b : K) ≤ ifp_n.fr⁻¹

{ifp_n ifp_succ_n : GenContFract.IntFractPair K}

(nth_stream_eq : GenContFract.IntFractPair.stream v n = some ifp_n)

(succ_nth_stream_eq : GenContFract.IntFractPair.stream v (n + 1) = some ifp_succ_n)


@[to_additive]
theorem closure_union (s t : Set G) : closure (s ∪ t) = closure s ⊔ closure t

Subgroup.closure (s ∪ t) = Subgroup.closure s ⊔ Subgroup.closure t


/-- The pigeonhole principle for finitely many pigeons of different weights, non-strict inequality
version: there is a pigeonhole with the total weight of pigeons in it greater than or equal to `b`
provided that the total number of pigeonholes times `b` is less than or equal to the total weight of
all pigeons. -/
theorem exists_le_sum_fiber_of_nsmul_le_sum [Nonempty β] (hb : card β • b ≤ ∑ x, w x) :
    ∃ y, b ≤ ∑ x ∈ univ.filter fun x => f x = y, w x

(hb : Fintype.card β • b ≤ ∑ x : α, w x)

∃ y, b ≤ ∑ x ∈ Finset.filter (fun x => f x = y) Finset.univ, w x


/-- A topological space is called an R₀ space, if `Specializes` relation is symmetric.

In other words, given two points `x y : X`,
if every neighborhood of `y` contains `x`, then every neighborhood of `x` contains `y`. -/
@[mk_iff]
class R0Space (X : Type u) [TopologicalSpace X] : Prop where
  /-- In an R₀ space, the `Specializes` relation is symmetric. -/
  specializes_symmetric : Symmetric (Specializes : X → X → Prop)


/-- If the vector passed to `secondInter` is given by a subtraction involving the point in
`secondInter`, the result of `secondInter` may be expressed using `lineMap`. -/
theorem Sphere.secondInter_eq_lineMap (s : Sphere P) (p p' : P) :
    s.secondInter p (p' -ᵥ p) =
      AffineMap.lineMap p p' (-2 * ⟪p' -ᵥ p, p -ᵥ s.center⟫ / ⟪p' -ᵥ p, p' -ᵥ p⟫)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s : EuclideanGeometry.Sphere P)
(p p' : P)

s.secondInter p (p' -ᵥ p) = (AffineMap.lineMap p p') (-2 * ⟪p' -ᵥ p, p -ᵥ s.center⟫_ℝ / ⟪p' -ᵥ p, p' -ᵥ p⟫_ℝ)


theorem preimage_map_fst_pullbackDiagonal {f : X → Y} {g : Z → Y} :
    @map_fst X Y Z f g ⁻¹' pullbackDiagonal f = pullbackDiagonal (@snd X Y Z f g)

{X : Type u_2}
{Y : Sort u_3}
{Z : Type u_1}
{f : X → Y}
{g : Z → Y}

Function.PullbackSelf.map_fst ⁻¹' Function.pullbackDiagonal f = Function.pullbackDiagonal Function.Pullback.snd


theorem degree_le_mul_left (p : R[X]) (hq : q ≠ 0) : degree p ≤ degree (p * q)

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{q : R[X]}
(p : R[X])
(hq : q ≠ 0)


theorem restrict_le_restrict_countable_iUnion [Countable β] {f : β → Set α}
    (hf₁ : ∀ b, MeasurableSet (f b)) (hf₂ : ∀ b, v ≤[f b] w) : v ≤[⋃ b, f b] w

(hf₂ : ∀ (b : β), v.restrict (f b) ≤ w.restrict (f b))

v.restrict (⋃ b, f b) ≤ w.restrict (⋃ b, f b)


@[to_additive (attr := simp)]
theorem mk_smul_of_tower_mk (r : M) (x : α) (hx : x ∈ s) :
    r • (⟨x, hx⟩ : s) = ⟨r • x, smul_one_smul N r x ▸ smul_mem _ hx⟩

{S : Type u'}
{M : Type v}
{N : Type u_1}
{α : Type u_2}
[SetLike S α]
[VAdd M N]
[VAdd M α]
[AddMonoid N]
[AddAction N α]
[VAddMemClass S N α]
[VAddAssocClass M N α]
(s : S)
(r : M)
(x : α)
(hx : x ∈ s)


theorem mem_range_embedding (j : Fin n) : j ∈ Set.range (c.embedding (c.index j))

j ∈ Set.range ⇑(c.embedding (c.index j))


/-- The first isomorphism theorem for monoids in the case of a homomorphism with right inverse. -/
@[to_additive (attr := simps)
  "The first isomorphism theorem for `AddMonoid`s in the case of a homomorphism
  with right inverse."]
def quotientKerEquivOfRightInverse (f : M →* P) (g : P → M) (hf : Function.RightInverse g f) :
    (ker f).Quotient ≃* P

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
(f : M →+ P)
(g : P → M)
(hf : Function.RightInverse g ⇑f)

∀ (a : P), (AddCon.quotientKerEquivOfRightInverse f g hf).symm a = (AddCon.toQuotient ∘ g) a


theorem mapIdx_spec (as : Array α) (f : Fin as.size → α → β)
    (p : Fin as.size → β → Prop) (hs : ∀ i, p i (f i as[i])) :
    ∃ eq : (Array.mapIdx as f).size = as.size,
      ∀ i h, p ⟨i, h⟩ ((Array.mapIdx as f)[i])

(hs : ∀ (i : Fin as.size), p i (f i as[i]))

∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ (as.mapIdx f)[i]


theorem isLUB_pair [SemilatticeSup γ] {a b : γ} : IsLUB {a, b} (a ⊔ b)

{γ : Type w}
[SemilatticeSup γ]
{a b : γ}


lemma uniformContinuous_dist : UniformContinuous fun p : α × α => dist p.1 p.2


theorem disjoint_iSup₂_iff {f : ∀ i, κ i → α} :
    Disjoint a (⨆ (i) (j), f i j) ↔ ∀ i j, Disjoint a (f i j)

{α : Type u}
{ι : Sort w}
{κ : ι → Sort w'}
[Order.Frame α]
{a : α}
{f : (i : ι) → κ i → α}

Disjoint a (⨆ i, ⨆ j, f i j) ↔ ∀ (i : ι) (j : κ i), Disjoint a (f i j)


/-- If a function `f` with a densely ordered codomain is strictly monotone on a left neighborhood of
`a` and the closure of the image of this neighborhood under `f` is a left neighborhood of `f a`,
then `f` is continuous at `a` from the left. -/
theorem StrictMonoOn.continuousWithinAt_left_of_closure_image_mem_nhdsWithin [DenselyOrdered β]
    {f : α → β} {s : Set α} {a : α} (h_mono : StrictMonoOn f s) (hs : s ∈ 𝓝[≤] a)
    (hfs : closure (f '' s) ∈ 𝓝[≤] f a) : ContinuousWithinAt f (Iic a) a

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[LinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
[DenselyOrdered β]
{f : α → β}
{s : Set α}
{a : α}
(h_mono : StrictMonoOn f s)
(hs : s ∈ 𝓝[≤] a)
(hfs : closure (f '' s) ∈ 𝓝[≤] f a)


/-- The function `(W.FunctorsInverting D) ⥤ (W.Localization ⥤ D)` induced by
`Construction.lift`. -/
@[simps!]
def inverse : W.FunctorsInverting D ⥤ W.Localization ⥤ D

(a b : CategoryTheory.Quotient (CategoryTheory.Localization.Construction.relations W))

((CategoryTheory.Localization.Construction.WhiskeringLeftEquivalence.inverse W D).obj G).map hf =
  Quot.liftOn hf
    (fun f =>
      CategoryTheory.composePath
        ({ obj := fun X => G.obj.obj X.obj,
              map := fun {X Y} a =>
                Sum.rec (fun val => G.obj.map val) (fun val => CategoryTheory.inv (G.obj.map ↑val)) a }.mapPath
          f))
    ⋯


@[simp]
theorem toList_eq_nil_iff {p : Perm α} {x} : toList p x = [] ↔ x ∉ p.support

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


/-- Composition of first-order embeddings is associative. -/
theorem comp_assoc (f : M ↪[L] N) (g : N ↪[L] P) (h : P ↪[L] Q) :
    (h.comp g).comp f = h.comp (g.comp f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{P : Type u_1}
[L.Structure P]
{Q : Type u_2}
[L.Structure Q]
(f : L.Embedding M N)
(g : L.Embedding N P)
(h : L.Embedding P Q)


theorem Continuous.if {p : α → Prop} {f g : α → β} [∀ a, Decidable (p a)]
    (hp : ∀ a ∈ frontier { x | p x }, f a = g a) (hf : Continuous f) (hg : Continuous g) :
    Continuous fun a => if p a then f a else g a

(hp : ∀ a ∈ frontier {x | p x}, f a = g a)


theorem zero : FinMeasAdditive μ (0 : Set α → β)

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_7}
[AddCommMonoid β]


@[to_additive (attr := norm_cast)] -- Porting note (#10685): dsimp can prove this
theorem coe_zpow (x : H) (n : ℤ) : ((x ^ n : H) : G) = (x : G) ^ n

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
(x : ↥H)
(n : ℤ)


/-- In a finite-dimensional `InnerProductSpace`, any orthonormal subset can be extended to an
orthonormal basis. -/
theorem Orthonormal.exists_orthonormalBasis_extension (hv : Orthonormal 𝕜 ((↑) : v → E)) :
    ∃ (u : Finset E) (b : OrthonormalBasis u 𝕜 E), v ⊆ u ∧ ⇑b = ((↑) : u → E)

{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{v : Set E}
[FiniteDimensional 𝕜 E]
(hv : Orthonormal 𝕜 Subtype.val)


@[nontriviality]
theorem separable_of_subsingleton [Subsingleton R] (f : R[X]) : f.Separable

{R : Type u}
[CommSemiring R]
[Subsingleton R]
(f : R[X])


/-- The coherent topology on a precoherent category is subcanonical. -/
theorem subcanonical : Sheaf.Subcanonical (coherentTopology C)

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Precoherent C]


@[simp]
theorem permutations_nil : permutations ([] : List α) = [[]]


@[to_additive]
theorem inv_apply [Inv Y] (f : LocallyConstant X Y) (x : X) : f⁻¹ x = (f x)⁻¹

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Inv Y]
(f : LocallyConstant X Y)
(x : X)


lemma map_basis_iff {I X : Set α} (f : α → β) (hf) (hI : I ⊆ M.E) (hX : X ⊆ M.E) :
    (M.map f hf).Basis (f '' I) (f '' X) ↔ M.Basis I X

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{I X : Set α}
(f : α → β)
(hf : Set.InjOn f M.E)
(hI : I ⊆ M.E)
(hX : X ⊆ M.E)


@[simp]
theorem zero_nmul (a) : 0 ⨳ a = 0


@[simp]
theorem mapAccumr_mapAccumr₂ (f₁ : γ → σ₁ → σ₁ × ζ) (f₂ : α → β → σ₂ → σ₂ × γ) :
    (mapAccumr f₁ (mapAccumr₂ f₂ xs ys s₂).snd s₁)
    = let m := mapAccumr₂ (fun x y s =>
          let r₂ := f₂ x y s.snd
          let r₁ := f₁ r₂.snd s.fst
          ((r₁.fst, r₂.fst), r₁.snd)
        ) xs ys (s₁, s₂)
      (m.fst.fst, m.snd)

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

Mathlib.Vector.mapAccumr f₁ (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2 s₁ =
  let m :=
    Mathlib.Vector.mapAccumr₂
      (fun x y s =>
        let r₂ := f₂ x y s.2;
        let r₁ := f₁ r₂.2 s.1;
        ((r₁.1, r₂.1), r₁.2))
      xs ys (s₁, s₂);
  (m.1.1, m.2)


@[simp]
theorem toComplex_im (x y : ℤ) : ((⟨x, y⟩ : ℤ[i]) : ℂ).im = y

(GaussianInt.toComplex { re := x, im := y }).im = ↑y


@[simp]
theorem toSubgroupEquiv_neg_apply (u : ℤˣ) (a : toSubgroup A B u) :
    (toSubgroupEquiv φ (-u) (toSubgroupEquiv φ u a) : G) = a

{G : Type u_1}
[Group G]
{A B : Subgroup G}
(φ : ↥A ≃* ↥B)
(u : ℤˣ)
(a : ↥(HNNExtension.toSubgroup A B u))

↑((HNNExtension.toSubgroupEquiv φ (-u)) ((HNNExtension.toSubgroupEquiv φ u) a)) = ↑a


theorem normalize_eq {num den} (den_nz) : normalize num den den_nz =
    { num := num / num.natAbs.gcd den
      den := den / num.natAbs.gcd den
      den_nz := normalize.den_nz den_nz rfl
      reduced := normalize.reduced' den_nz rfl }

{num : Int}
{den : Nat}
(den_nz : den ≠ 0)

Rat.normalize num den den_nz =
  { num := num / ↑(num.natAbs.gcd den), den := den / num.natAbs.gcd den, den_nz := ⋯, reduced := ⋯ }


theorem trace_gen_eq_sum_roots (x : L) (hf : (minpoly K x).Splits (algebraMap K F)) :
    algebraMap K F (trace K K⟮x⟯ (AdjoinSimple.gen K x)) =
      ((minpoly K x).aroots F).sum

(hf : Polynomial.Splits (algebraMap K F) (minpoly K x))

(algebraMap K F) ((Algebra.trace K ↥K⟮x⟯) (IntermediateField.AdjoinSimple.gen K x)) = ((minpoly K x).aroots F).sum


protected theorem le_neg_of_le_neg {a b : Int} (h : a ≤ -b) : b ≤ -a


@[simp] -- Porting note (#10618): was @[simp]
theorem integral_comp_mul_add (hc : c ≠ 0) (d) :
    (∫ x in a..b, f (c * x + d)) = c⁻¹ • ∫ x in c * a + d..c * b + d, f x

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b c : ℝ}
(f : ℝ → E)
(hc : c ≠ 0)
(d : ℝ)

∫ (x : ℝ) in a..b, f (c * x + d) = c⁻¹ • ∫ (x : ℝ) in c * a + d..c * b + d, f x


lemma id_comp : ∀ {X Y : Σi, C i} (f : X ⟶ Y), 𝟙 X ≫ f = f

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id X) f = f


@[simp]
theorem fst_add [Add R] [Add M] (x₁ x₂ : tsze R M) : (x₁ + x₂).fst = x₁.fst + x₂.fst

{R : Type u}
{M : Type v}
[Add R]
[Add M]
(x₁ x₂ : tsze R M)


/-- If `μ` is inner regular for finite measure sets with respect to compact sets,
then any measurable set of finite measure can be approximated by a compact closed subset.
Compared to `MeasurableSet.exists_isCompact_diff_lt`,
this lemma additionally assumes that `α` is an R₁ space with Borel σ-algebra. -/
theorem _root_.MeasurableSet.exists_isCompact_isClosed_diff_lt [BorelSpace α] [R1Space α]
    [InnerRegularCompactLTTop μ] ⦃A : Set α⦄ (hA : MeasurableSet A) (h'A : μ A ≠ ∞)
    {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ K, K ⊆ A ∧ IsCompact K ∧ IsClosed K ∧ μ (A \ K) < ε

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[BorelSpace α]
[R1Space α]
[μ.InnerRegularCompactLTTop]
⦃A : Set α⦄
(hA : MeasurableSet A)
(h'A : μ A ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ K ⊆ A, IsCompact K ∧ IsClosed K ∧ μ (A \ K) < ε


theorem mapClusterPt_iff {ι : Type*} (x : X) (F : Filter ι) (u : ι → X) :
    MapClusterPt x F u ↔ ∀ s ∈ 𝓝 x, ∃ᶠ a in F, u a ∈ s

{X : Type u}
[TopologicalSpace X]
{ι : Type u_3}
(x : X)
(F : Filter ι)
(u : ι → X)

MapClusterPt x F u ↔ ∀ s ∈ 𝓝 x, ∃ᶠ (a : ι) in F, u a ∈ s


theorem le_iff_dvd (hv : Integers v O) {x y : O} :
    v (algebraMap O F x) ≤ v (algebraMap O F y) ↔ y ∣ x

{F : Type u}
{Γ₀ : Type v}
[Field F]
[LinearOrderedCommGroupWithZero Γ₀]
{v : Valuation F Γ₀}
{O : Type w}
[CommRing O]
[Algebra O F]
(hv : v.Integers O)
{x y : O}

v ((algebraMap O F) x) ≤ v ((algebraMap O F) y) ↔ y ∣ x


/-- Computing `sup` in a subtype (closed under `sup`) is the same as computing it in `α`. -/
theorem sup_coe {P : α → Prop} {Pbot : P ⊥} {Psup : ∀ ⦃x y⦄, P x → P y → P (x ⊔ y)} (t : Finset β)
    (f : β → { x : α // P x }) :
    (@sup { x // P x } _ (Subtype.semilatticeSup Psup) (Subtype.orderBot Pbot) t f : α) =
      t.sup fun x => ↑(f x)

{Psup : ∀ ⦃x y : α⦄, P x → P y → P (x ⊔ y)}


/-- The inverse limit of nonempty finite types is nonempty.

See `nonempty_sections_of_finite_cofiltered_system` for a generalization to cofiltered limits.
That version applies in almost all cases, and the only difference is that this version
allows `J` to be empty.

This may be regarded as a generalization of Kőnig's lemma.
To specialize: given a locally finite connected graph, take `Jᵒᵖ` to be `ℕ` and
`F j` to be length-`j` paths that start from an arbitrary fixed vertex.
Elements of `F.sections` can be read off as infinite rays in the graph. -/
theorem nonempty_sections_of_finite_inverse_system {J : Type u} [Preorder J] [IsDirected J (· ≤ ·)]
    (F : Jᵒᵖ ⥤ Type v) [∀ j : Jᵒᵖ, Finite (F.obj j)] [∀ j : Jᵒᵖ, Nonempty (F.obj j)] :
    F.sections.Nonempty

{J : Type u}
[Preorder J]
[IsDirected J fun x x_1 => x ≤ x_1]
(F : Jᵒᵖ ⥤ Type v)
[∀ (j : Jᵒᵖ), Finite (F.obj j)]
[∀ (j : Jᵒᵖ), Nonempty (F.obj j)]


lemma Module.FinitePresentation.exists_lift_of_isLocalizedModule
    [h : Module.FinitePresentation R M] (g : M →ₗ[R] N') :
    ∃ (h : M →ₗ[R] N) (s : S), f ∘ₗ h = s • g

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{N' : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[AddCommGroup N']
[Module R N']
(S : Submonoid R)
(f : N →ₗ[R] N')
[IsLocalizedModule S f]
[h : Module.FinitePresentation R M]
(g : M →ₗ[R] N')


@[to_additive (attr := simp)]
theorem card_one : (1 : Finset α).card = 1


@[norm_cast] lemma coe_ratCast (q : ℚ) : ↑(q : R) = (q : ℍ[R])

{R : Type u_1}
[LinearOrderedField R]
(q : ℚ)


/-- The functor `Square C ⥤ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the left morphism of `sq`
to the right morphism of `sq`. -/
@[simps!]
def toArrowArrowFunctor : Square C ⥤ Arrow (Arrow C)

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

∀ {X Y : CategoryTheory.Square C} (φ : X ⟶ Y), (CategoryTheory.Square.toArrowArrowFunctor.map φ).left.left = φ.τ₁


@[to_additive (attr := simp)]
theorem divRight_symm [IsometricSMul Gᵐᵒᵖ G] (c : G) : (divRight c).symm = mulRight c

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul Gᵐᵒᵖ G]
(c : G)

(IsometryEquiv.divRight c).symm = IsometryEquiv.mulRight c


@[to_additive]
theorem ne_one_of_norm_ne_zero : ‖a‖ ≠ 0 → a ≠ 1

{E : Type u_6}
[SeminormedGroup E]
{a : E}

‖a‖ ≠ 0 → a ≠ 1


@[simp]
theorem coe_neg_sphere {r : ℝ} (v : sphere (0 : E) r) : ↑(-v) = (-v : E)

{E : Type u_1}
[i : SeminormedAddCommGroup E]
{r : ℝ}
(v : ↑(Metric.sphere 0 r))


@[simp] theorem encard_eq_zero : s.encard = 0 ↔ s = ∅


/-- At an invertible element `x` of a normed division algebra `R`, the Fréchet derivative of the
inversion operation is the linear map `fun t ↦ - x⁻¹ * t * x⁻¹`. -/
@[fun_prop]
theorem hasFDerivAt_inv' {x : R} (hx : x ≠ 0) :
    HasFDerivAt Inv.inv (-mulLeftRight 𝕜 R x⁻¹ x⁻¹) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{R : Type u_6}
[NormedDivisionRing R]
[NormedAlgebra 𝕜 R]
[CompleteSpace R]
{x : R}
(hx : x ≠ 0)

HasFDerivAt Inv.inv (-((ContinuousLinearMap.mulLeftRight 𝕜 R) x⁻¹) x⁻¹) x


theorem map_prod_eq_map₂' (m : α × β → γ) (f : Filter α) (g : Filter β) :
    Filter.map m (f ×ˢ g) = map₂ (fun a b => m (a, b)) f g

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
(m : α × β → γ)
(f : Filter α)
(g : Filter β)

Filter.map m (f ×ˢ g) = Filter.map₂ (fun a b => m (a, b)) f g


@[simp]
theorem toLinearIsometryEquiv_apply (li : E₁ →ₗᵢ[R₁] F) (h : finrank R₁ E₁ = finrank R₁ F)
    (x : E₁) : (li.toLinearIsometryEquiv h) x = li x

(h : FiniteDimensional.finrank R₁ E₁ = FiniteDimensional.finrank R₁ F)


theorem Trivialization.contMDiffOn_symm_trans :
    ContMDiffOn (IB.prod 𝓘(𝕜, F)) (IB.prod 𝓘(𝕜, F)) n
      (e.toPartialHomeomorph.symm ≫ₕ e'.toPartialHomeomorph) (e.target ∩ e'.target)

[TopologicalSpace (Bundle.TotalSpace F E)]

(e e' : Trivialization F Bundle.TotalSpace.proj)

ContMDiffOn (IB.prod 𝓘(𝕜, F)) (IB.prod 𝓘(𝕜, F)) n (↑(e.symm ≫ₕ e'.toPartialHomeomorph)) (e.target ∩ e'.target)


lemma isIso₂_of_isIso₁₃ {T T' : Triangle C} (φ : T ⟶ T') (hT : T ∈ distTriang C)
    (hT' : T' ∈ distTriang C) (h₁ : IsIso φ.hom₁) (h₃ : IsIso φ.hom₃) : IsIso φ.hom₂

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

{T T' : CategoryTheory.Pretriangulated.Triangle C}

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(hT' : T' ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


/-- The equivalence of categories from the order dual of a preordered type `X`
to the opposite category of the preorder `X`. -/
@[simps]
def orderDualEquivalence : Xᵒᵈ ≌ Xᵒᵖ

∀ {X_1 Y : Xᵒᵈ} (f : X_1 ⟶ Y), (CategoryTheory.orderDualEquivalence X).functor.map f = (CategoryTheory.homOfLE ⋯).op


theorem exists_rightDescent_of_ne_one {w : W} (hw : w ≠ 1) : ∃ i : B, cs.IsRightDescent w i

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


@[to_additive]
theorem map_iSup {ι : Sort*} (f : F) (s : ι → Submonoid M) : (iSup s).map f = ⨆ i, (s i).map f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{ι : Sort u_5}
(f : F)
(s : ι → Submonoid M)

Submonoid.map f (iSup s) = ⨆ i, Submonoid.map f (s i)


/-- Cancellation of a telescoping product. -/
@[to_additive "Cancellation of a telescoping sum."]
theorem prod_range_div' (n : ℕ) (f : ℕ → G) :
    ((range n).map fun k ↦ f k / f (k + 1)).prod = f 0 / f n

{G : Type u_7}
[Group G]
(n : ℕ)
(f : ℕ → G)

(List.map (fun k => f k / f (k + 1)) (List.range n)).prod = f 0 / f n


@[simp]
theorem ofDual_iInf (f : ι → αᵒᵈ) : ofDual (⨅ i, f i) = ⨆ i, ofDual (f i)

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(f : ι → αᵒᵈ)

OrderDual.ofDual (⨅ i, f i) = ⨆ i, OrderDual.ofDual (f i)


theorem predictablePart_bdd_difference {R : ℝ≥0} {f : ℕ → Ω → ℝ} (ℱ : Filtration ℕ m0)
    (hbdd : ∀ᵐ ω ∂μ, ∀ i, |f (i + 1) ω - f i ω| ≤ R) :
    ∀ᵐ ω ∂μ, ∀ i, |predictablePart f ℱ μ (i + 1) ω - predictablePart f ℱ μ i ω| ≤ R

{f : ℕ → Ω → ℝ}

(hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R)

∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |MeasureTheory.predictablePart f ℱ μ (i + 1) ω - MeasureTheory.predictablePart f ℱ μ i ω| ≤ ↑R


theorem measure_inter_frequently_image_mem_eq (hf : Conservative f μ) (hs : NullMeasurableSet s μ) :
    μ (s ∩ { x | ∃ᶠ n in atTop, f^[n] x ∈ s }) = μ s

(hs : MeasureTheory.NullMeasurableSet s μ)

μ (s ∩ {x | ∃ᶠ (n : ℕ) in Filter.atTop, f^[n] x ∈ s}) = μ s


theorem Finset.attach_eq_univ {s : Finset α} : s.attach = Finset.univ


theorem prod_lift : prod ⟦p₁⟧ ⟦p₂⟧ = ⟦p₁.prod p₂⟧

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{a₁ a₂ : α}
{b₁ b₂ : β}
(p₁ : Path a₁ a₂)
(p₂ : Path b₁ b₂)

Path.Homotopic.prod ⟦p₁⟧ ⟦p₂⟧ = ⟦p₁.prod p₂⟧


theorem inv_invApp (U : Opens X) :
    inv (H.invApp U) =
      f.c.app (op (opensFunctor f |>.obj U)) ≫
        X.presheaf.map
          (eqToHom (by simp [Opens.map, Set.preimage_image_eq _ H.base_open.inj]))

{X Y : AlgebraicGeometry.PresheafedSpace C}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

CategoryTheory.inv (AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.invApp f U) =
  f.c.app (Opposite.op ((AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.opensFunctor f).obj U)) ≫
    X.presheaf.map (CategoryTheory.eqToHom ⋯)


theorem w : forkMap R P ≫ firstMap R P = forkMap R P ≫ secondMap R P

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{A : Type u₂}
[CategoryTheory.Category.{v₂, u₂} A]
{U : C}
(R : CategoryTheory.Presieve U)
(P : CategoryTheory.Functor Cᵒᵖ A)
[CategoryTheory.Limits.HasProducts A]
[CategoryTheory.Limits.HasPullbacks C]

CategoryTheory.CategoryStruct.comp (CategoryTheory.Presheaf.forkMap R P) (CategoryTheory.Presheaf.firstMap R P) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Presheaf.forkMap R P) (CategoryTheory.Presheaf.secondMap R P)


theorem imageSieve_eq_sieveOfSection {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) {U : C} (s : G.obj (op U)) :
    imageSieve f s = (imagePresheaf (whiskerRight f (forget A))).sieveOfSection s

(s : (CategoryTheory.forget A).obj (G.obj (Opposite.op U)))

CategoryTheory.Presheaf.imageSieve f s =
  (CategoryTheory.GrothendieckTopology.imagePresheaf
        (CategoryTheory.whiskerRight f (CategoryTheory.forget A))).sieveOfSection
    s


@[simp]
theorem recOn_cons {C H0 Hs n a v} :
    @Vector3.recOn α (@C) (n + 1) (a :: v) H0 @Hs = Hs a v (@Vector3.recOn α (@C) n v H0 @Hs)

{Hs : {n : ℕ} → (a : α) → (w : Vector3 α n) → C w → C (Vector3.cons a w)}

(Vector3.cons a v).recOn H0 Hs = Hs a v (v.recOn H0 Hs)


theorem powerlt_succ {a b : Cardinal} (h : a ≠ 0) : a ^< succ b = a ^ b


lemma coprime_mul_succ {n m a} (h : n ≤ m) (ha : m - n ∣ a) : Coprime (n * a + 1) (m * a + 1)

{n m a : ℕ}
(h : n ≤ m)
(ha : m - n ∣ a)


/-- The generator of the annihilating ideal is the minimal polynomial. -/
theorem annIdealGenerator_eq_minpoly (a : A) : annIdealGenerator 𝕜 a = minpoly 𝕜 a

(𝕜 : Type u_1)
{A : Type u_2}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
(a : A)

Polynomial.annIdealGenerator 𝕜 a = minpoly 𝕜 a


/-- The splitting of the short complex `S.unop` deduced from a splitting of `S`. -/
@[simps]
def unop {S : ShortComplex Cᵒᵖ} (h : Splitting S) : Splitting S.unop

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex Cᵒᵖ}
(h : S.Splitting)


@[simp]
theorem coe_mk {σ : R →+* S} (f : AddHom M M₃) (h) :
    ((LinearMap.mk f h : M →ₛₗ[σ] M₃) : M → M₃) = f

(h : ∀ (m : R) (x : M), f.toFun (m • x) = σ m • f.toFun x)


/-- Transitivity of cyclotomic extensions. -/
theorem trans (C : Type w) [CommRing C] [Algebra A C] [Algebra B C] [IsScalarTower A B C]
    [hS : IsCyclotomicExtension S A B] [hT : IsCyclotomicExtension T B C]
    (h : Function.Injective (algebraMap B C)) : IsCyclotomicExtension (S ∪ T) A C

(h : Function.Injective ⇑(algebraMap B C))


theorem TransGen.swap (h : TransGen r b a) : TransGen (swap r) a b

{α : Type u_1}
{r : α → α → Prop}
{a b : α}
(h : Relation.TransGen r b a)


lemma ih1_neg_left : IH1 x y → IH1 (-x) y

Surreal.Multiplication.IH1 x y → Surreal.Multiplication.IH1 (-x) y


/-- The supremum of congruence relations `c, d` equals the smallest congruence relation containing
    the binary relation '`x` is related to `y` by `c` or `d`'. -/
@[to_additive sup_eq_addConGen "The supremum of additive congruence relations `c, d` equals the
smallest additive congruence relation containing the binary relation '`x` is related to `y`
by `c` or `d`'."]
theorem sup_eq_conGen (c d : Con M) : c ⊔ d = conGen fun x y => c x y ∨ d x y


@[simp]
theorem empty_vecMulVec (v : Fin 0 → α) (w : n' → α) : vecMulVec v w = ![]

{α : Type u}
{n' : Type uₙ}
[NonUnitalNonAssocSemiring α]
(v : Fin 0 → α)
(w : n' → α)


@[simp]
theorem coe_mul (f g : E →ₗᵢ[R] E) : ⇑(f * g) = f ∘ g

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]
(f g : E →ₗᵢ[R] E)


theorem IsCycle.two_le_card_support (h : IsCycle f) : 2 ≤ f.support.card

{α : Type u_2}
{f : Equiv.Perm α}
[DecidableEq α]
[Fintype α]
(h : f.IsCycle)


theorem natDegree_of_b_eq_zero (ha : P.a = 0) (hb : P.b = 0) : P.toPoly.natDegree ≤ 1

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a = 0)
(hb : P.b = 0)


@[simp]
theorem graph_eq_empty {f : α →₀ M} : f.graph = ∅ ↔ f = 0

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


@[simp]
theorem DifferentiableAt.cos (hc : DifferentiableAt ℝ f x) :
    DifferentiableAt ℝ (fun x => Real.cos (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
(hc : DifferentiableAt ℝ f x)


@[to_additive (attr := simp)]
lemma Commute.units_zpow_right (h : Commute a u) (m : ℤ) : Commute a ↑(u ^ m)

{M : Type u_1}
[Monoid M]
{a : M}
{u : Mˣ}
(h : Commute a ↑u)
(m : ℤ)


theorem hasDerivAt_exp_smul_const_of_mem_ball' (x : 𝔸) (t : 𝕂)
    (htx : t • x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasDerivAt (fun u : 𝕂 => exp 𝕂 (u • x)) (x * exp 𝕂 (t • x)) t

(htx : t • x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

HasDerivAt (fun u => NormedSpace.exp 𝕂 (u • x)) (x * NormedSpace.exp 𝕂 (t • x)) t


theorem laverage_union_mem_openSegment (hd : AEDisjoint μ s t) (ht : NullMeasurableSet t μ)
    (hs₀ : μ s ≠ 0) (ht₀ : μ t ≠ 0) (hsμ : μ s ≠ ∞) (htμ : μ t ≠ ∞) :
    ⨍⁻ x in s ∪ t, f x ∂μ ∈ openSegment ℝ≥0∞ (⨍⁻ x in s, f x ∂μ) (⨍⁻ x in t, f x ∂μ)

{f : α → ℝ≥0∞}

(ht : MeasureTheory.NullMeasurableSet t μ)

⨍⁻ (x : α) in s ∪ t, f x ∂μ ∈ openSegment ℝ≥0∞ (⨍⁻ (x : α) in s, f x ∂μ) (⨍⁻ (x : α) in t, f x ∂μ)


@[to_additive]
theorem one_div_one_div : 1 / (1 / a) = a

{α : Type u_1}
[DivisionMonoid α]
(a : α)


theorem compl_infty : ({∞}ᶜ : Set (OnePoint X)) = range ((↑) : X → OnePoint X)

{OnePoint.infty}ᶜ = Set.range OnePoint.some


theorem MDifferentiableWithinAt.congr_mono (h : MDifferentiableWithinAt I I' f s x)
    (ht : ∀ x ∈ t, f₁ x = f x) (hx : f₁ x = f x) (h₁ : t ⊆ s) :
    MDifferentiableWithinAt I I' f₁ t x


lemma Iic_ne_Iic : Iic a ≠ Iic b ↔ a ≠ b

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


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

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

Pi.mulSingle i '' Set.Icc 1 b = Set.Icc 1 (Pi.mulSingle i b)


theorem card_neighborSet_union_compl_neighborSet [Fintype V] (G : SimpleGraph V) (v : V)
    [Fintype (G.neighborSet v ∪ Gᶜ.neighborSet v : Set V)] :
    (Set.toFinset (G.neighborSet v ∪ Gᶜ.neighborSet v)).card = Fintype.card V - 1

[Fintype ↑(G.neighborSet v ∪ Gᶜ.neighborSet v)]

(G.neighborSet v ∪ Gᶜ.neighborSet v).toFinset.card = Fintype.card V - 1


theorem lt_findIdx_of_not {p : α → Bool} {xs : List α} {i : ℕ} (h : i < xs.length)
    (h2 : ∀ j (hji : j ≤ i), ¬p (xs.get ⟨j, hji.trans_lt h⟩)) : i < xs.findIdx p

(h2 : ∀ (j : ℕ) (hji : j ≤ i), ¬p (xs.get ⟨j, ⋯⟩) = true)


theorem mapAccumr_eq_foldr {σ : Type*} (f : α → σ → σ × β) : ∀ (as : List α) (s : σ),
    mapAccumr f as s = List.foldr (fun a s =>
                                    let r := f a s.1
                                    (r.1, r.2 :: s.2)
                                  ) (s, []) as

{α : Type u_1}
{β : Type u_2}
{σ : Type u_4}
(f : α → σ → σ × β)
(as : List α)
(s : σ)

List.mapAccumr f as s =
  List.foldr
    (fun a s =>
      let r := f a s.1;
      (r.1, r.2 :: s.2))
    (s, []) as


/-- If functions `m₁` and `m₂` are eventually equal at a filter `f`, then
they map this filter to the same filter. -/
theorem map_congr {m₁ m₂ : α → β} {f : Filter α} (h : m₁ =ᶠ[f] m₂) : map m₁ f = map m₂ f

{α : Type u}
{β : Type v}
{m₁ m₂ : α → β}
{f : Filter α}
(h : m₁ =ᶠ[f] m₂)


/-- An element `a` is `M`-regular if and only if a positive power of `a` is `M`-regular. -/
theorem pow_iff {n : ℕ} (n0 : 0 < n) : IsSMulRegular M (a ^ n) ↔ IsSMulRegular M a

{R : Type u_1}
{M : Type u_3}
{a : R}
[Monoid R]
[MulAction R M]
{n : ℕ}
(n0 : 0 < n)


theorem finallySmall_iff_exists_small_weakly_terminal_set [IsFilteredOrEmpty J] :
    FinallySmall.{v} J ↔ ∃ (s : Set J) (_ : Small.{v} s), ∀ i, ∃ j ∈ s, Nonempty (i ⟶ j)

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

CategoryTheory.FinallySmall J ↔ ∃ s, ∃ (_ : Small.{v, u} ↑s), ∀ (i : J), ∃ j ∈ s, Nonempty (i ⟶ j)


theorem add_kronecker [Distrib α] (A₁ A₂ : Matrix l m α) (B : Matrix n p α) :
    (A₁ + A₂) ⊗ₖ B = A₁ ⊗ₖ B + A₂ ⊗ₖ B

{α : Type u_2}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{p : Type u_11}
[Distrib α]
(A₁ A₂ : Matrix l m α)
(B : Matrix n p α)

Matrix.kroneckerMap (fun x x_1 => x * x_1) (A₁ + A₂) B =
  Matrix.kroneckerMap (fun x x_1 => x * x_1) A₁ B + Matrix.kroneckerMap (fun x x_1 => x * x_1) A₂ B


@[simp]
theorem lookup_toFinmap (a : α) (s : AList β) : lookup a ⟦s⟧ = s.lookup a

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


theorem ciSup_le_iff' {f : ι → α} (h : BddAbove (range f)) {a : α} :
    ⨆ i, f i ≤ a ↔ ∀ i, f i ≤ a

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrderBot α]
{f : ι → α}
(h : BddAbove (Set.range f))
{a : α}


theorem decode_ge_two (n) (h : 2 ≤ n) : (decode n : Option Bool) = none


lemma mem_map_equiv {f : α ≃o β} {a : β} : a ∈ L.map f ↔ f.symm a ∈ L

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
{L : Sublattice α}
{f : α ≃o β}
{a : β}

a ∈ Sublattice.map { toFun := ⇑f, map_sup' := ⋯, map_inf' := ⋯ } L ↔ f.symm a ∈ L


theorem eventually_closure_subset_of_isOpen_of_omegaLimit_subset [CompactSpace β] {v : Set β}
    (hv₁ : IsOpen v) (hv₂ : ω f ϕ s ⊆ v) : ∃ u ∈ f, closure (image2 ϕ u s) ⊆ v

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(s : Set α)
[CompactSpace β]
{v : Set β}
(hv₁ : IsOpen v)
(hv₂ : omegaLimit f ϕ s ⊆ v)


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


@[simp]
theorem inf_le_bihimp {a b : α} : a ⊓ b ≤ a ⇔ b

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


lemma coe_dual :
    (dual A K I : Submodule B L) = Iᵛ

(A : Type u_1)
(K : Type u_2)
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsDomain A]
[IsFractionRing A K]
[IsIntegralClosure B A L]
[IsFractionRing B L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed A]
[IsDedekindDomain B]
{I : FractionalIdeal B⁰ L}
(hI : I ≠ 0)

↑(FractionalIdeal.dual A K I) = Submodule.traceDual A K ↑I


@[simp]
theorem arctan_one : arctan 1 = π / 4


theorem Mon_tensor_one_mul (M N : Mon_ C) :
    (((λ_ (𝟙_ C)).inv ≫ (M.one ⊗ N.one)) ▷ (M.X ⊗ N.X)) ≫
        tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
      (λ_ (M.X ⊗ N.X)).hom

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

((λ_ (𝟙_ C)).inv ≫ (M.one ⊗ N.one)) ▷ (M.X ⊗ N.X) ≫ CategoryTheory.tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
  (λ_ (M.X ⊗ N.X)).hom


theorem Set.MapsTo.tendsto {α β} {s : Set α} {t : Set β} {f : α → β} (h : MapsTo f s t) :
    Filter.Tendsto f (𝓟 s) (𝓟 t)

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
(h : Set.MapsTo f s t)


/-- If `f` is a strictly monotone function on a left neighborhood of `a` and the image of this
neighborhood under `f` meets every interval `[b, f a)`, `b < f a`, then `f` is continuous at `a`
from the left.

The assumption `hfs : ∀ b < f a, ∃ c ∈ s, f c ∈ Ico b (f a)` is required because otherwise the
function `f : ℝ → ℝ` given by `f x = if x < 0 then x else x + 1` would be a counter-example at
`a = 0`. -/
theorem StrictMonoOn.continuousWithinAt_left_of_exists_between {f : α → β} {s : Set α} {a : α}
    (h_mono : StrictMonoOn f s) (hs : s ∈ 𝓝[≤] a) (hfs : ∀ b < f a, ∃ c ∈ s, f c ∈ Ico b (f a)) :
    ContinuousWithinAt f (Iic a) a

(hfs : ∀ b < f a, ∃ c ∈ s, f c ∈ Set.Ico b (f a))


theorem dualPairing_nondegenerate : (dualPairing K V₁).Nondegenerate

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
[AddCommGroup V₁]
[Module K V₁]


theorem IsMin.not_lt (h : IsMin a) : ¬b < a

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


/-- The weak form of **Hindman's theorem**: in any finite cover of a nonempty semigroup, one of the
parts contains an FP-set. -/
@[to_additive exists_FS_of_finite_cover
      "The weak form of **Hindman's theorem**: in any finite cover
      of a nonempty additive semigroup, one of the parts contains an FS-set."]
theorem exists_FP_of_finite_cover {M} [Semigroup M] [Nonempty M] (s : Set (Set M)) (sfin : s.Finite)
    (scov : ⊤ ⊆ ⋃₀ s) : ∃ c ∈ s, ∃ a : Stream' M, FP a ⊆ c

{M : Type u_1}
[AddSemigroup M]
[Nonempty M]
(s : Set (Set M))
(sfin : s.Finite)
(scov : ⊤ ⊆ ⋃₀ s)


@[simp]
theorem cons_inj_left (a a' : α) (s : Sym α n) : a ::ₛ s = a' ::ₛ s ↔ a = a'

{α : Type u_1}
{n : ℕ}
(a a' : α)
(s : Sym α n)


/-- If the action of a countable group `G` admits an invariant measure `μ` with a fundamental domain
`s`, then every null-measurable set `t` of measure strictly greater than `μ s` contains two
points `x y` such that `g • x = y` for some `g ≠ 1`. -/
@[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` of measure strictly greater than
  `μ s` contains two points `x y` such that `g +ᵥ x = y` for some `g ≠ 0`."]
theorem exists_ne_one_smul_eq (hs : IsFundamentalDomain G s μ) (htm : NullMeasurableSet t μ)
    (ht : μ s < μ t) : ∃ x ∈ t, ∃ y ∈ t, ∃ g, g ≠ (1 : G) ∧ g • x = y

[MeasureTheory.SMulInvariantMeasure G α μ]

(hs : MeasureTheory.IsFundamentalDomain G s μ)

(htm : MeasureTheory.NullMeasurableSet t μ)

∃ x ∈ t, ∃ y ∈ t, ∃ g, g ≠ 1 ∧ g • x = y


theorem weightedSMul_union' (s t : Set α) (ht : MeasurableSet t) (hs_finite : μ s ≠ ∞)
    (ht_finite : μ t ≠ ∞) (h_inter : s ∩ t = ∅) :
    (weightedSMul μ (s ∪ t) : F →L[ℝ] F) = weightedSMul μ s + weightedSMul μ t

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s t : Set α)
(ht : MeasurableSet t)
(hs_finite : μ s ≠ ⊤)
(ht_finite : μ t ≠ ⊤)
(h_inter : s ∩ t = ∅)

MeasureTheory.weightedSMul μ (s ∪ t) = MeasureTheory.weightedSMul μ s + MeasureTheory.weightedSMul μ t


@[simp] lemma restrictSubtype_indep_iff {I : Set X} :
    (M.restrictSubtype X).Indep I ↔ M.Indep ((↑) '' I)

{α : Type u_1}
{X : Set α}
{M : Matroid α}
{I : Set ↑X}

(M.restrictSubtype X).Indep I ↔ M.Indep ↑I


@[simp]
theorem coe_id_pseudoEpimorphism :
    (EsakiaHom.id α : PseudoEpimorphism α α) = PseudoEpimorphism.id α

(α : Type u_2)
[TopologicalSpace α]
[Preorder α]

{ toOrderHom := ↑(EsakiaHom.id α), exists_map_eq_of_map_le' := ⋯ } = PseudoEpimorphism.id α


@[simp]
theorem map_map {β γ} (f : α → β) (g : β → γ) (m : OuterMeasure α) :
    map g (map f m) = map (g ∘ f) m

{α : Type u_1}
{β : Type u_3}
{γ : Type u_4}
(f : α → β)
(g : β → γ)
(m : MeasureTheory.OuterMeasure α)

(MeasureTheory.OuterMeasure.map g) ((MeasureTheory.OuterMeasure.map f) m) = (MeasureTheory.OuterMeasure.map (g ∘ f)) m


@[simp]
theorem eval₂_root (f : R[X]) : f.eval₂ (of f) (root f) = 0

Polynomial.eval₂ (AdjoinRoot.of f) (AdjoinRoot.root f) f = 0


theorem Convex.combo_eq_smul_sub_add [Module R M] {x y : M} {a b : R} (h : a + b = 1) :
    a • x + b • y = b • (y - x) + x

{R : Type u_2}
{M : Type u_5}
[Semiring R]
[AddCommGroup M]
[Module R M]
{x y : M}
{a b : R}
(h : a + b = 1)


theorem inv_le_of_neg (ha : a < 0) (hb : b < 0) : a⁻¹ ≤ b ↔ b⁻¹ ≤ a

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(ha : a < 0)
(hb : b < 0)

a⁻¹ ≤ b ↔ b⁻¹ ≤ a


@[aesop safe 20 apply (rule_sets := [Measurable])]
protected theorem dist {β : Type*} [PseudoMetricSpace β] {f g : α → β}
    (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
    AEStronglyMeasurable (fun x => dist (f x) (g x)) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEStronglyMeasurable (fun x => dist (f x) (g x)) μ


/-- The definition of convolution where the bilinear operator is scalar multiplication.
Note: it often helps the elaborator to give the type of the convolution explicitly. -/
theorem convolution_lsmul [Sub G] {f : G → 𝕜} {g : G → F} :
    (f ⋆[lsmul 𝕜 𝕜, μ] g : G → F) x = ∫ t, f t • g (x - t) ∂μ

{𝕜 : Type u𝕜}
{G : Type uG}
{F : Type uF}
[NormedAddCommGroup F]
{x : G}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 F]
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[NormedSpace ℝ F]
[Sub G]
{f : G → 𝕜}
{g : G → F}

MeasureTheory.convolution f g (ContinuousLinearMap.lsmul 𝕜 𝕜) μ x = ∫ (t : G), f t • g (x - t) ∂μ


protected theorem max_comm (a b : Int) : max a b = max b a


theorem mem_rootSet {p : T[X]} {S : Type*} [CommRing S] [IsDomain S] [Algebra T S]
    [NoZeroSMulDivisors T S] {a : S} : a ∈ p.rootSet S ↔ p ≠ 0 ∧ aeval a p = 0

{T : Type w}
[CommRing T]
{p : Polynomial T}
{S : Type u_1}
[CommRing S]
[IsDomain S]
[Algebra T S]
[NoZeroSMulDivisors T S]
{a : S}

a ∈ p.rootSet S ↔ p ≠ 0 ∧ (Polynomial.aeval a) p = 0


theorem measurable_of_Ici {f : δ → α} (hf : ∀ x, MeasurableSet (f ⁻¹' Ici x)) : Measurable f

(hf : ∀ (x : α), MeasurableSet (f ⁻¹' Set.Ici x))


theorem pow_multiset_sum_mem_span_pow [DecidableEq α] (s : Multiset α) (n : ℕ) :
    s.sum ^ (Multiset.card s * n + 1) ∈
    span ((s.map fun (x : α) ↦ x ^ (n + 1)).toFinset : Set α)

{α : Type u}
[CommSemiring α]
[DecidableEq α]
(s : Multiset α)
(n : ℕ)

s.sum ^ (Multiset.card s * n + 1) ∈ Ideal.span ↑(Multiset.map (fun x => x ^ (n + 1)) s).toFinset


protected theorem id_traverse : ∀ x : Vector α n, x.traverse (pure : _ → Id _) = x

{n : ℕ}
{α : Type u}
(x : Mathlib.Vector α n)


theorem sub (hφ : IsSymmetric φ) (hψ : IsSymmetric ψ) : IsSymmetric (φ - ψ)

{σ : Type u_1}
{R : Type u_2}
[CommRing R]
{φ ψ : MvPolynomial σ R}
(hφ : φ.IsSymmetric)
(hψ : ψ.IsSymmetric)


theorem mul_def (x y : 𝒜 ᵍ⊗[R] ℬ) : x * y = mulHom 𝒜 ℬ x y

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
(x y : 𝒜 ᵍ⊗[R] ℬ)

x * y = ((GradedTensorProduct.mulHom 𝒜 ℬ) x) y


@[simp]
lemma iso_inv_app (a : A) (X : C) :
    (iso F r hF a).inv.app ((functor r).obj X) =
      (F.commShiftIso a).inv.app X ≫
      (lift r F hF).map (((functor r).commShiftIso a).hom.app X)

(hF : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂)

(CategoryTheory.Quotient.LiftCommShift.iso F r hF a).inv.app ((CategoryTheory.Quotient.functor r).obj X) =
  (F.commShiftIso a).inv.app X ≫
    (CategoryTheory.Quotient.lift r F hF).map (((CategoryTheory.Quotient.functor r).commShiftIso a).hom.app X)


@[to_additive]
theorem prod_disjUnion (h) :
    ∏ x ∈ s₁.disjUnion s₂ h, f x = (∏ x ∈ s₁, f x) * ∏ x ∈ s₂, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[CommMonoid β]
(h : Disjoint s₁ s₂)


protected theorem preimage_kernImage : GaloisConnection (preimage f) (kernImage f)

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

GaloisConnection (Set.preimage f) (Set.kernImage f)


protected theorem find_min' {m : ℕ+} (hm : p m) : PNat.find h ≤ m

{p : ℕ+ → Prop}
[DecidablePred p]
(h : ∃ n, p n)
{m : ℕ+}
(hm : p m)


theorem noAtoms_hausdorff {d : ℝ} (hd : 0 < d) : NoAtoms (hausdorffMeasure d : Measure X)

(X : Type u_2)
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{d : ℝ}
(hd : 0 < d)


theorem mul_sup_eq_of_coprime_left (h : I ⊔ J = ⊤) : I * K ⊔ J = K ⊔ J

{R : Type u}
[CommSemiring R]
{I J K : Ideal R}
(h : I ⊔ J = ⊤)


theorem yz_sub {m n} (h : n ≤ m) : yz a1 (m - n) = xz a1 n * yz a1 m - xz a1 m * yz a1 n

Pell.yz a1 (m - n) = Pell.xz a1 n * Pell.yz a1 m - Pell.xz a1 m * Pell.yz a1 n


/-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X

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

∀ (X_1 : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)),
  ((CategoryTheory.CostructuredArrow.toOver F X).obj X_1).left = F.obj X_1.left


/-- Variant of `le_mul_of_one_le_right` for `a` non-positive instead of non-negative. -/
theorem mul_le_of_one_le_right [ExistsAddOfLE α] [PosMulMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (ha : a ≤ 0) (h : 1 ≤ b) : a * b ≤ a

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

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


/-- The product of `f y` over `y ∈ g '' s` equals the product of `f (g i)` over `s`
provided that `g` is injective on `s ∩ mulSupport (f ∘ g)`. -/
@[to_additive
      "The sum of `f y` over `y ∈ g '' s` equals the sum of `f (g i)` over `s` provided that
      `g` is injective on `s ∩ support (f ∘ g)`."]
theorem finprod_mem_image' {s : Set β} {g : β → α} (hg : (s ∩ mulSupport (f ∘ g)).InjOn g) :
    ∏ᶠ i ∈ g '' s, f i = ∏ᶠ j ∈ s, f (g j)

(hg : Set.InjOn g (s ∩ Function.support (f ∘ g)))


theorem nodupKeys_iff_pairwise {l} : NodupKeys l ↔ Pairwise (fun s s' : Sigma β => s.1 ≠ s'.1) l

{α : Type u}
{β : α → Type v}
{l : List (Sigma β)}

l.NodupKeys ↔ List.Pairwise (fun s s' => s.fst ≠ s'.fst) l


protected lemma codisjoint_iff [SemilatticeSup α] {x y : Iic a} :
    Codisjoint x y ↔ (x : α) ⊔ (y : α) = a

{α : Type u_1}
{a : α}
[SemilatticeSup α]
{x y : ↑(Set.Iic a)}


@[simp]
theorem subtypeDomain_zero : subtypeDomain p (0 : α →₀ M) = 0

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


protected theorem DirectedOn.insert (h : Reflexive r) (a : α) {s : Set α} (hd : DirectedOn r s)
    (ha : ∀ b ∈ s, ∃ c ∈ s, a ≼ c ∧ b ≼ c) : DirectedOn r (insert a s)

{α : Type u}
{r : α → α → Prop}
(h : Reflexive r)
(a : α)
{s : Set α}
(hd : DirectedOn r s)
(ha : ∀ b ∈ s, ∃ c ∈ s, r a c ∧ r b c)


@[to_additive]
theorem mulIndicator_union_eventuallyEq (h : ∀ᶠ a in l, a ∉ s ∩ t) :
    mulIndicator (s ∪ t) f =ᶠ[l] mulIndicator s f * mulIndicator t f

{α : Type u_1}
{M : Type u_3}
[AddMonoid M]
{s t : Set α}
{f : α → M}
{l : Filter α}
(h : ∀ᶠ (a : α) in l, a ∉ s ∩ t)

(s ∪ t).indicator f =ᶠ[l] s.indicator f + t.indicator f


theorem le_last (i : Fin (n + 1)) : i ≤ last n


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

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

(DerivedCategory.triangleOfSES hS).obj₂ = DerivedCategory.Q.obj S.X₂


@[to_additive]
theorem _root_.Commute.list_prod_right (l : List M) (y : M) (h : ∀ x ∈ l, Commute y x) :
    Commute y l.prod

{M : Type u_4}
[Monoid M]
(l : List M)
(y : M)
(h : ∀ x ∈ l, Commute y x)


theorem max_of_nonempty {s : Finset α} (h : s.Nonempty) : ∃ a : α, s.max = a

{α : Type u_2}
[LinearOrder α]
{s : Finset α}
(h : s.Nonempty)


theorem lift_def (F : G →* A) : ⇑(lift k G A F) = liftNC ((algebraMap k A : k →+* A) : k →+ A) F

{k : Type u₁}
{G : Type u₂}
[CommSemiring k]
[Monoid G]
{A : Type u₃}
[Semiring A]
[Algebra k A]
(F : G →* A)

⇑((MonoidAlgebra.lift k G A) F) = ⇑(MonoidAlgebra.liftNC ↑(algebraMap k A) ⇑F)


@[to_additive]
theorem le_of_mul_le_of_one_le_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c : α}
    (h : a * b ≤ c) (hle : 1 ≤ a) :
    b ≤ c

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


theorem opow_dvd_opow_iff {a b c : Ordinal} (a1 : 1 < a) : a ^ b ∣ a ^ c ↔ b ≤ c


/-- An antitone function continuous at the supremum of a nonempty set sends this supremum to
the infimum of the image of this set. -/
theorem Antitone.map_sSup_of_continuousAt' {f : α → β} {A : Set α} (Cf : ContinuousAt f (sSup A))
    (Af : Antitone f) (A_nonemp : A.Nonempty) (A_bdd : BddAbove A := by bddDefault) :
    f (sSup A) = sInf (f '' A)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{f : α → β}
{A : Set α}
(Cf : ContinuousAt f (sSup A))
(Af : Antitone f)
(A_nonemp : A.Nonempty)
(A_bdd : BddAbove A := by bddDefault)


/-- A closed embedding is proper, ie, inverse images of compact sets are contained in compacts.
Moreover, the preimage of a compact set is compact, see `ClosedEmbedding.isCompact_preimage`. -/
theorem ClosedEmbedding.tendsto_cocompact {f : X → Y} (hf : ClosedEmbedding f) :
    Tendsto f (Filter.cocompact X) (Filter.cocompact Y)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : ClosedEmbedding f)

Filter.Tendsto f (Filter.cocompact X) (Filter.cocompact Y)


/-- A subgroup is closed under division. -/
@[to_additive (attr := aesop safe apply (rule_sets := [SetLike]))
  "An additive subgroup is closed under subtraction."]
theorem div_mem {x y : M} (hx : x ∈ H) (hy : y ∈ H) : x / y ∈ H

{M : Type u_5}
{S : Type u_6}
[DivInvMonoid M]
[SetLike S M]
[hSM : SubgroupClass S M]
{H : S}
{x y : M}
(hx : x ∈ H)
(hy : y ∈ H)


/-- A special case of `Set.image_finset_prod_pi` for `Finset.univ`. -/
@[to_additive "A special case of `Set.image_finset_sum_pi` for `Finset.univ`. "]
theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
    (fun f : ι → α => ∏ i, f i) '' univ.pi S = ∏ i, S i

{ι : Type u_1}
{α : Type u_2}
[AddCommMonoid α]
[Fintype ι]
(S : ι → Set α)

(fun f => ∑ i : ι, f i) '' Set.univ.pi S = ∑ i : ι, S i


/-- Every graph homomorphism from a complete graph is injective. -/
theorem injective_of_top_hom (f : (⊤ : SimpleGraph V) →g G') : Function.Injective f

{V : Type u_1}
{W : Type u_2}
{G' : SimpleGraph W}
(f : ⊤ →g G')


theorem tendsto_W_nhds_pi_div_two : Tendsto W atTop (𝓝 <| π / 2)

Filter.Tendsto Real.Wallis.W Filter.atTop (𝓝 (π / 2))


@[simp]
theorem toDistribMulActionHom_eq_coe (f : A →ₛₙₐ[φ] B) : f.toDistribMulActionHom = ↑f

{R : Type u}
{S : Type u₁}
[Monoid R]
[Monoid S]
{φ : R →* S}
{A : Type v}
{B : Type w}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction S B]
(f : A →ₛₙₐ[φ] B)


/-- `rightDual` maps every element `I` to `leftFixedPoints`. -/
theorem rightDual_mem_leftFixedPoint (I : Set β) : R.rightDual I ∈ R.leftFixedPoints

{α : Type u_1}
{β : Type u_2}
(R : Rel α β)
(I : Set β)


/-- A Lie-subalgebra of an Artinian Lie algebra is self-normalizing
if it contains an Engel subalgebra.
See `LieSubalgebra.normalizer_engel` for a proof that Engel subalgebras are self-normalizing,
avoiding the Artinian condition. -/
lemma normalizer_eq_self_of_engel_le [IsArtinian R L]
    (H : LieSubalgebra R L) (x : L) (h : engel R x ≤ H) :
    normalizer H = H

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[IsArtinian R L]
(H : LieSubalgebra R L)
(x : L)
(h : LieSubalgebra.engel R x ≤ H)


/-- The change of variables mapped over a ring homomorphism `φ : R →+* A`. -/
@[simps]
def map : VariableChange A

{R : Type u}
[CommRing R]
{A : Type v}
[CommRing A]
(φ : R →+* A)
(C : WeierstrassCurve.VariableChange R)

(WeierstrassCurve.VariableChange.map φ C).r = φ C.r


@[simp]
theorem sdiff_symmDiff_left : a \ a ∆ b = a ⊓ b

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


@[simp]
theorem refl_apply (x : M) : refl L M x = x

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
(x : M)

(FirstOrder.Language.Equiv.refl L M) x = x


/-- Every self-adjoint operator on an inner product space is symmetric. -/
theorem isSymmetric {A : E →L[𝕜] E} (hA : IsSelfAdjoint A) : (A : E →ₗ[𝕜] E).IsSymmetric

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{A : E →L[𝕜] E}
(hA : IsSelfAdjoint A)


theorem isInt_eq_false [Ring α] [CharZero α] : {a b : α} → {a' b' : ℤ} →
    IsInt a a' → IsInt b b' → decide (a' = b') = false → ¬a = b

{α : Type u_1}
[Ring α]
[CharZero α]
{a b : α}
{a' b' : ℤ}

Mathlib.Meta.NormNum.IsInt a a' → Mathlib.Meta.NormNum.IsInt b b' → decide (a' = b') = false → ¬a = b


theorem diff_diff_cancel_left {s t : Set α} (h : s ⊆ t) : t \ (t \ s) = s


lemma conjExponent_eq : conjExponent p = q


lemma homologyFunctor_shift (n : ℤ) :
    (homologyFunctor C (ComplexShape.up ℤ) 0).shift n =
      homologyFunctor C (ComplexShape.up ℤ) n

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.CategoryWithHomology C]
(n : ℤ)

(HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shift n =
  HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) n


/-- A generalization of `LinearMap.toMatrix_id`. -/
@[simp]
theorem LinearMap.toMatrix_id_eq_basis_toMatrix [Fintype ι] [DecidableEq ι] [Finite ι'] :
    LinearMap.toMatrix b b' id = b'.toMatrix b

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(b' : Basis ι' R M)
[Fintype ι]
[DecidableEq ι]
[Finite ι']

(LinearMap.toMatrix b b') LinearMap.id = b'.toMatrix ⇑b


/-- Shrinking lemma. A point-finite open cover of a closed subset of a normal space can be "shrunk"
to a new open cover so that the closure of each new open set is contained in the corresponding
original open set. -/
theorem exists_iUnion_eq_closure_subset (uo : ∀ i, IsOpen (u i)) (uf : ∀ x, { i | x ∈ u i }.Finite)
    (uU : ⋃ i, u i = univ) :
    ∃ v : ι → Set X, iUnion v = univ ∧ (∀ i, IsOpen (v i)) ∧ ∀ i, closure (v i) ⊆ u i

{ι : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
[NormalSpace X]
{u : ι → Set X}
(uo : ∀ (i : ι), IsOpen (u i))
(uf : ∀ (x : X), {i | x ∈ u i}.Finite)
(uU : ⋃ i, u i = Set.univ)

∃ v, Set.iUnion v = Set.univ ∧ (∀ (i : ι), IsOpen (v i)) ∧ ∀ (i : ι), closure (v i) ⊆ u i


theorem setToFun_measure_zero' (hT : DominatedFinMeasAdditive μ T C)
    (h : ∀ s, MeasurableSet s → μ s < ∞ → μ s = 0) : setToFun μ T hT f = 0

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(h : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → μ s = 0)


theorem invOneSubPow_val_eq_mk_choose_add :
    (invOneSubPow d).val = (mk fun n => Nat.choose (d + n) d : S⟦X⟧)

↑(PowerSeries.invOneSubPow d) = PowerSeries.mk fun n => ↑((d + n).choose d)


@[simp]
lemma commShiftIso_id_inv_app (a : A) (X : C) :
    (commShiftIso (𝟭 C) a).inv.app X = 𝟙 _

{C : Type u_1}
[CategoryTheory.Category.{u_6, u_1} C]
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
(a : A)
(X : C)

((CategoryTheory.Functor.id C).commShiftIso a).inv.app X =
  CategoryTheory.CategoryStruct.id (((CategoryTheory.Functor.id C).comp (CategoryTheory.shiftFunctor C a)).obj X)


@[to_additive (attr := simp)]
theorem mulIndicator_compl_mul_self (s : Set α) (f : α → M) :
    mulIndicator sᶜ f * mulIndicator s f = f

{α : Type u_1}
{M : Type u_4}
[AddZeroClass M]
(s : Set α)
(f : α → M)


/-- A set of points `s` satisfying both `ρ a ≤ c * μ a` and `ρ a ≥ d * μ a` at arbitrarily small
sets in a Vitali family has measure `0` if `c < d`. Indeed, the first inequality should imply
that `ρ s ≤ c * μ s`, and the second one that `ρ s ≥ d * μ s`, a contradiction if `0 < μ s`. -/
theorem null_of_frequently_le_of_frequently_ge {c d : ℝ≥0} (hcd : c < d) (s : Set α)
    (hc : ∀ x ∈ s, ∃ᶠ a in v.filterAt x, ρ a ≤ c * μ a)
    (hd : ∀ x ∈ s, ∃ᶠ a in v.filterAt x, (d : ℝ≥0∞) * μ a ≤ ρ a) : μ s = 0

(hρ : ρ ≪ μ)

(hc : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ↑c * μ a)

(hd : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ↑d * μ a ≤ ρ a)


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

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

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


theorem PairwiseDisjoint.range (g : s → ι) (hg : ∀ i : s, f (g i) ≤ f i)
    (ht : s.PairwiseDisjoint f) : (range g).PairwiseDisjoint f

{α : Type u_1}
{ι : Type u_4}
[PartialOrder α]
[OrderBot α]
{s : Set ι}
{f : ι → α}
(g : ↑s → ι)
(hg : ∀ (i : ↑s), f (g i) ≤ f ↑i)
(ht : s.PairwiseDisjoint f)


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

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{L : Filter 𝕜}
(hL : L ≤ 𝓝 x)
(h : HasDerivAtFilter f f' x L)


@[to_additive]
theorem pow_subset_pow (hst : s ⊆ t) : ∀ n : ℕ, s ^ n ⊆ t ^ n

{α : Type u_2}
[Monoid α]
{s t : Set α}
(hst : s ⊆ t)
(n : ℕ)


/-- `CliffordAlgebra.reverse` as a `LinearEquiv`. -/
@[simps!]
def reverseEquiv : CliffordAlgebra Q ≃ₗ[R] CliffordAlgebra Q

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}

∀ (a : CliffordAlgebra Q), CliffordAlgebra.reverseEquiv a = CliffordAlgebra.reverse a


/-- The digits in the base b expansion of n are all less than b, if b ≥ 2 -/
theorem digits_lt_base {b m d : ℕ} (hb : 1 < b) (hd : d ∈ digits b m) : d < b

{b m d : ℕ}
(hb : 1 < b)
(hd : d ∈ b.digits m)


theorem val_add_eq_ite {n : ℕ} (a b : Fin n) :
    (↑(a + b) : ℕ) = if n ≤ a + b then a + b - n else a + b

↑(a + b) = if n ≤ ↑a + ↑b then ↑a + ↑b - n else ↑a + ↑b


@[simp]
theorem coe_mulLeft₀ (c : α) (hc : c ≠ 0) : ⇑(Homeomorph.mulLeft₀ c hc) = (c * ·)

{α : Type u_1}
[TopologicalSpace α]
[GroupWithZero α]
[ContinuousMul α]
(c : α)
(hc : c ≠ 0)

⇑(Homeomorph.mulLeft₀ c hc) = fun x => c * x


lemma strictMono_smul_right_of_pos [SMulPosStrictMono α β] (hb : 0 < b) :
    StrictMono ((· • b) : α → β)

{α : Type u_1}
{β : Type u_2}
{b : β}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero β]
[SMulPosStrictMono α β]
(hb : 0 < b)


@[simp]
theorem transpose_add [Add α] (M : Matrix m n α) (N : Matrix m n α) : (M + N)ᵀ = Mᵀ + Nᵀ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Add α]
(M N : Matrix m n α)


/-- If `α` is a nontrivial separable dense linear order, then there exists a
countable dense set `s : Set α` that contains neither top nor bottom elements of `α`.
For a dense set containing both bot and top elements, see
`exists_countable_dense_bot_top`. -/
theorem exists_countable_dense_no_bot_top [SeparableSpace α] [Nontrivial α] :
    ∃ s : Set α, s.Countable ∧ Dense s ∧ (∀ x, IsBot x → x ∉ s) ∧ ∀ x, IsTop x → x ∉ s

(α : Type u_1)
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[TopologicalSpace.SeparableSpace α]
[Nontrivial α]

∃ s, s.Countable ∧ Dense s ∧ (∀ (x : α), IsBot x → x ∉ s) ∧ ∀ (x : α), IsTop x → x ∉ s


@[simp]
theorem realize_restrictFreeVar [DecidableEq α] {n : ℕ} {φ : L.BoundedFormula α n} {s : Set α}
    (h : ↑φ.freeVarFinset ⊆ s) {v : α → M} {xs : Fin n → M} :
    (φ.restrictFreeVar (Set.inclusion h)).Realize (v ∘ (↑)) xs ↔ φ.Realize v xs

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
[DecidableEq α]
{n : ℕ}
{φ : L.BoundedFormula α n}
{s : Set α}
(h : ↑φ.freeVarFinset ⊆ s)
{v : α → M}
{xs : Fin n → M}

(φ.restrictFreeVar (Set.inclusion h)).Realize (v ∘ Subtype.val) xs ↔ φ.Realize v xs


protected theorem ind {X : C} (p : Subobject X → Prop)
    (h : ∀ ⦃A : C⦄ (f : A ⟶ X) [Mono f], p (Subobject.mk f)) (P : Subobject X) : p P

(h : ∀ ⦃A : C⦄ (f : A ⟶ X) [inst : CategoryTheory.Mono f], p (CategoryTheory.Subobject.mk f))


@[to_additive]
theorem tendsto_inv_nhdsWithin_Ioi {a : H} : Tendsto Inv.inv (𝓝[>] a) (𝓝[<] a⁻¹)

{H : Type x}
[TopologicalSpace H]
[OrderedCommGroup H]
[ContinuousInv H]
{a : H}

Filter.Tendsto Inv.inv (𝓝[>] a) (𝓝[<] a⁻¹)


@[simp]
theorem abs_exp_ofReal (x : ℝ) : abs (exp x) = Real.exp x

Complex.abs (Complex.exp ↑x) = Real.exp x


/-- Horizontal composition of monoidal natural transformations. -/
@[simps]
def hcomp {F G : LaxMonoidalFunctor C D} {H K : LaxMonoidalFunctor D E} (α : MonoidalNatTrans F G)
    (β : MonoidalNatTrans H K) : MonoidalNatTrans (F ⊗⋙ H) (G ⊗⋙ K)

{F G : CategoryTheory.LaxMonoidalFunctor C D}

{H K : CategoryTheory.LaxMonoidalFunctor D E}

(α : CategoryTheory.MonoidalNatTrans F G)

(β : CategoryTheory.MonoidalNatTrans H K)

(α.hcomp β).toNatTrans = α.toNatTrans ◫ β.toNatTrans


theorem iInf_const [Nonempty ι] : ⨅ _ : ι, a = a

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


/-- A monoid homomorphism `f` induces an injective homomorphism on the quotient by `f`'s kernel. -/
@[to_additive "An `AddMonoid` homomorphism `f` induces an injective homomorphism on the quotient
by `f`'s kernel."]
theorem kerLift_injective (f : M →* P) : Injective (kerLift f)

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
(f : M →* P)


@[simp]
theorem affineSegment_vsub_const_image (x y p : P) :
    (· -ᵥ p) '' affineSegment R x y = affineSegment R (x -ᵥ p) (y -ᵥ p)

(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x y p : P)

(fun x => x -ᵥ p) '' affineSegment R x y = affineSegment R (x -ᵥ p) (y -ᵥ p)


theorem comp_rightInv_aux2 (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) (n : ℕ)
    (v : Fin (n + 2) → F) :
    ∑ c ∈ {c : Composition (n + 2) | 1 < c.length}.toFinset,
        p c.length (applyComposition (fun k : ℕ => ite (k < n + 2) (p.rightInv i k) 0) c v) =
      ∑ c ∈ {c : Composition (n + 2) | 1 < c.length}.toFinset,
        p c.length ((p.rightInv i).applyComposition c v)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(i : E ≃L[𝕜] F)
(n : ℕ)
(v : Fin (n + 2) → F)

∑ c ∈ {c | 1 < c.length}.toFinset,
    (p c.length) (FormalMultilinearSeries.applyComposition (fun k => if k < n + 2 then p.rightInv i k else 0) c v) =
  ∑ c ∈ {c | 1 < c.length}.toFinset, (p c.length) ((p.rightInv i).applyComposition c v)


/-- The colimit cocone exhibiting `⨁ Subtype.restrict pᶜ f` as the cokernel of
`biproduct.fromSubtype f p` -/
@[simps]
def cokernelCoforkBiproductFromSubtype (p : Set K) :
    ColimitCocone (parallelPair (biproduct.fromSubtype f p) 0)

(CategoryTheory.Limits.cokernelCoforkBiproductFromSubtype f p).cocone =
  CategoryTheory.Limits.CokernelCofork.ofπ (CategoryTheory.Limits.biproduct.toSubtype f pᶜ) ⋯


theorem Real.tsum_le_of_sum_range_le {f : ℕ → ℝ} {c : ℝ} (hf : ∀ n, 0 ≤ f n)
    (h : ∀ n, ∑ i ∈ Finset.range n, f i ≤ c) : ∑' n, f n ≤ c

(h : ∀ (n : ℕ), ∑ i ∈ Finset.range n, f i ≤ c)


theorem add_eq_le (a : Nat) {b c : Nat} (h : b ≤ c) : (a + b = c) = (a = c - b)


theorem _root_.Filter.Eventually.trans_isBigO {f : α → E} {g : α → F'} {k : α → G}
    (hfg : ∀ᶠ x in l, ‖f x‖ ≤ ‖g x‖) (hgk : g =O[l] k) : f =O[l] k

{α : Type u_1}
{E : Type u_3}
{G : Type u_5}
{F' : Type u_7}
[Norm E]
[Norm G]
[SeminormedAddCommGroup F']
{l : Filter α}
{f : α → E}
{g : α → F'}
{k : α → G}
(hfg : ∀ᶠ (x : α) in l, ‖f x‖ ≤ ‖g x‖)
(hgk : g =O[l] k)


@[fun_prop]
lemma ContinuousAt.sup (hf : ContinuousAt f x) (hg : ContinuousAt g x) :
    ContinuousAt (fun a ↦ f a ⊔ g a) x

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
[Sup L]
[ContinuousSup L]
{f g : X → L}
{x : X}
(hf : ContinuousAt f x)
(hg : ContinuousAt g x)


@[simp]
theorem ofSubmodules_symm_apply {p : Submodule R M} {q : Submodule R₂ M₂} (h : p.map ↑e = q)
    (x : q) : ↑((e.ofSubmodules p q h).symm x) = e.symm x

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
(e : M ≃ₛₗ[σ₁₂] M₂)
{p : Submodule R M}
{q : Submodule R₂ M₂}
(h : Submodule.map e p = q)
(x : ↥q)

↑((e.ofSubmodules p q h).symm x) = e.symm ↑x


/-- The `Cocone` on `directLimitDiagram` corresponding to
the unbundled `directLimit` of modules.

In `directLimitIsColimit` we show that it is a colimit cocone. -/
@[simps]
def directLimitCocone : Cocone (directLimitDiagram G f)

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

(ModuleCat.directLimitCocone G f).pt = ModuleCat.of R (Module.DirectLimit G f)


@[to_additive]
theorem quot_mk_assoc_left (x y z w : α) :
    Quot.mk (AssocRel α) (x * (y * z * w)) = Quot.mk _ (x * (y * (z * w)))

Quot.mk (AddMagma.AssocRel α) (x + (y + z + w)) = Quot.mk (AddMagma.AssocRel α) (x + (y + (z + w)))


/-- (Implementation) Given the appropriate coproduct and coequalizer cocones,
build the cocone for `F` which is colimiting if the given cocones are also.
-/
@[simps]
def buildColimit
    (hs : ∀ f : Σp : J × J, p.1 ⟶ p.2, c₁.ι.app ⟨f⟩ ≫ s = F.map f.2 ≫ c₂.ι.app ⟨f.1.2⟩)
    (ht : ∀ f : Σp : J × J, p.1 ⟶ p.2, c₁.ι.app ⟨f⟩ ≫ t = c₂.ι.app ⟨f.1.1⟩)
    (i : Cofork s t) : Cocone F

{c₁ : CategoryTheory.Limits.Cofan fun f => F.obj f.fst.1}

{c₂ : CategoryTheory.Limits.Cofan F.obj}

(hs : ∀ (f : (p : J × J) × (p.1 ⟶ p.2)), c₁.ι.app { as := f } ≫ s = F.map f.snd ≫ c₂.ι.app { as := f.fst.2 })

(ht : ∀ (f : (p : J × J) × (p.1 ⟶ p.2)), c₁.ι.app { as := f } ≫ t = c₂.ι.app { as := f.fst.1 })

(CategoryTheory.Limits.HasColimitOfHasCoproductsOfHasCoequalizers.buildColimit s t hs ht i).pt = i.pt


@[simp]
theorem bot_apply (a : α) : (⊥ : sSupHom α β) a = ⊥

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

∀ {x : CompleteLattice β} (a : α), ⊥ a = ⊥


protected theorem tsub_lt_self (ha : AddLECancellable a) (h₁ : 0 < a) (h₂ : 0 < b) : a - b < a


theorem image_mk_openSegment_left (x₁ x₂ : E) (y : F) :
    (fun x => (x, y)) '' openSegment 𝕜 x₁ x₂ = openSegment 𝕜 (x₁, y) (x₂, y)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(x₁ x₂ : E)
(y : F)


@[simp]
theorem functorCategoryMonoidalEquivalence.μIso_inv_app (A B : Action V G) :
    ((functorCategoryMonoidalEquivalence V G).μIso A B).inv.app PUnit.unit = 𝟙 _

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
(G : MonCat)
[CategoryTheory.MonoidalCategory V]
(A B : Action V G)

((Action.functorCategoryMonoidalEquivalence V G).μIso A B).inv.app PUnit.unit =
  𝟙
    (((Action.functorCategoryMonoidalEquivalence V G).obj (CategoryTheory.MonoidalCategory.tensorObj A B)).obj
      PUnit.unit)


theorem eval_eq' [Fintype σ] (X : σ → R) (f : MvPolynomial σ R) :
    eval X f = ∑ d ∈ f.support, f.coeff d * ∏ i, X i ^ d i

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[Fintype σ]
(X : σ → R)
(f : MvPolynomial σ R)

(MvPolynomial.eval X) f = ∑ d ∈ f.support, MvPolynomial.coeff d f * ∏ i : σ, X i ^ d i


lemma le_sdiff : x ≤ y \ z ↔ x ≤ y ∧ Disjoint x z

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]


@[to_additive]
theorem mulSingle_op {g : I → Type*} [∀ i, One (g i)] (op : ∀ i, f i → g i)
    (h : ∀ i, op i 1 = 1) (i : I) (x : f i) :
    mulSingle i (op i x) = fun j => op j (mulSingle i x j)

{I : Type u}
{f : I → Type v₁}
[DecidableEq I]
[(i : I) → Zero (f i)]
{g : I → Type u_4}
[(i : I) → Zero (g i)]
(op : (i : I) → f i → g i)
(h : ∀ (i : I), op i 0 = 0)
(i : I)
(x : f i)

Pi.single i (op i x) = fun j => op j (Pi.single i x j)


@[simp]
theorem single_length {n : ℕ} (h : 0 < n) : (single n h).length = 1


lemma self_natCast_mul_natCast_mul : Commute (m * a) (n * a)

{α : Type u_1}
[Semiring α]
(a : α)
(m n : ℕ)


/-- Flipping a square by switching the top-right and the bottom-left objects. -/
@[simps]
def flip (sq : Square C) : Square C

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


@[to_additive]
theorem smul_of_comm {G' : Type*} [Group G'] [MulAction G' α] [MeasurableSpace G']
    [MeasurableSMul G' α] [SMulInvariantMeasure G' α μ] [SMulCommClass G' G α]
    (h : IsFundamentalDomain G s μ) (g : G') : IsFundamentalDomain G (g • s) μ

[MeasureTheory.VAddInvariantMeasure G' α μ]

(h : MeasureTheory.IsAddFundamentalDomain G s μ)

MeasureTheory.IsAddFundamentalDomain G (g +ᵥ s) μ


@[to_additive]
theorem coe_pow_interval [OrderedCommMonoid α] (s : NonemptyInterval α) (n : ℕ) :
    ↑(s ^ n) = (s : Interval α) ^ n

{α : Type u_2}
[OrderedAddCommMonoid α]
(s : NonemptyInterval α)
(n : ℕ)


theorem le_dualCoannihilator_dualAnnihilator (U : Submodule R (Module.Dual R M)) :
    U ≤ U.dualCoannihilator.dualAnnihilator

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(U : Submodule R (Module.Dual R M))


theorem cmp_eq_gt [OrientedCmp cmp] : cmp x y = .gt ↔ cmp y x = .lt

∀ {α : Sort u_1} {cmp : α → α → Ordering} {x y : α} [inst : Batteries.OrientedCmp cmp],
  cmp x y = Ordering.gt ↔ cmp y x = Ordering.lt


@[to_additive (attr := simp)]
theorem pure_div : pure a / g = g.map (a / ·)

{α : Type u_2}
[Sub α]
{g : Filter α}
{a : α}

pure a - g = Filter.map (fun x => a - x) g


@[reassoc]
theorem braiding_rightUnitor (X : C) : (β_ (𝟙_ C) X).hom ≫ (ρ_ X).hom = (λ_ X).hom

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


/-- A multiplicative isomorphism preserves multiplication (deprecated). -/
@[to_additive "An additive isomorphism preserves addition (deprecated)."]
theorem isMulHom (h : M ≃* N) : IsMulHom h

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(h : M ≃* N)


/-- A nilpotent endomorphism has nilpotent eigenvalues.

See also `LinearMap.isNilpotent_trace_of_isNilpotent`. -/
lemma HasEigenvalue.isNilpotent_of_isNilpotent [NoZeroSMulDivisors R M] {f : End R M}
    (hfn : IsNilpotent f) {μ : R} (hf : f.HasEigenvalue μ) :
    IsNilpotent μ

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
{f : Module.End R M}
(hfn : IsNilpotent f)
{μ : R}
(hf : f.HasEigenvalue μ)


@[simp]
theorem top_sub_coe (a : ℕ) : (⊤ : ℕ∞) - a = ⊤


theorem lt_find_iff (n : ℕ) : (n : PartENat) < find P ↔ ∀ m ≤ n, ¬P m

(P : ℕ → Prop)
[DecidablePred P]
(n : ℕ)


/-- The set of numbers satisfying the Liouville condition with some exponent `p > 2` has Lebesgue
measure zero. -/
@[simp]
theorem volume_iUnion_setOf_liouvilleWith :
    volume (⋃ (p : ℝ) (_hp : 2 < p), { x : ℝ | LiouvilleWith p x }) = 0

MeasureTheory.volume (⋃ p, ⋃ (_ : 2 < p), {x | LiouvilleWith p x}) = 0


theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1)

Polynomial.eval (1 + x) (Polynomial.bernoulli n) = Polynomial.eval x (Polynomial.bernoulli n) + ↑n * x ^ (n - 1)


theorem isTotallyDisconnected_of_totallyDisconnectedSpace [TotallyDisconnectedSpace α] (s : Set α) :
    IsTotallyDisconnected s

{α : Type u}
[TopologicalSpace α]
[TotallyDisconnectedSpace α]
(s : Set α)


theorem linearMapAt_def_of_mem (e : Pretrivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) : e.linearMapAt R b = e.linearEquivAt R b hb

(e : Pretrivialization F Bundle.TotalSpace.proj)

Pretrivialization.linearMapAt R e b = ↑(Pretrivialization.linearEquivAt R e b hb)


@[simp]
theorem mul_X_modMonomial (x : MvPolynomial σ R) (i : σ) :
    x * X i %ᵐᵒⁿᵒᵐⁱᵃˡ Finsupp.single i 1 = 0

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

(x * MvPolynomial.X i).modMonomial (Finsupp.single i 1) = 0


/-- A subfield is closed under negation. -/
protected theorem neg_mem {x : K} : x ∈ s → -x ∈ s

{K : Type u}
[DivisionRing K]
(s : Subfield K)
{x : K}


theorem eLpNorm_congr_ae {f g : α → F} (hfg : f =ᵐ[μ] g) : eLpNorm f p μ = eLpNorm g p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f g : α → F}
(hfg : f =ᵐ[μ] g)

MeasureTheory.eLpNorm f p μ = MeasureTheory.eLpNorm g p μ


theorem prod_left {g : ι → Set Y} (hg : LocallyFinite g) (f : ι → Set X) :
    LocallyFinite (fun i ↦ f i ×ˢ g i)

{ι : Type u_1}
{X : Type u_4}
{Y : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
{g : ι → Set Y}
(hg : LocallyFinite g)
(f : ι → Set X)


/-- The isomorphism between `P⁺ ⋙ F` and `(P ⋙ F)⁺`, functorially in `F`. -/
@[simps! hom_app inv_app]
def plusFunctorWhiskerLeftIso (P : Cᵒᵖ ⥤ D)
    [∀ (F : D ⥤ E) (X : C), PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]
    [∀ (F : D ⥤ E) (X : C) (W : J.Cover X) (P : Cᵒᵖ ⥤ D),
        PreservesLimit (W.index P).multicospan F] :
    (whiskeringLeft _ _ E).obj (J.plusObj P) ≅ (whiskeringLeft _ _ _).obj P ⋙ J.plusFunctor E

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) D]

[∀ (α β : Type (max v u)) (fst snd : β → α),
    CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Limits.WalkingMulticospan fst snd) E]

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

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

[(F : CategoryTheory.Functor D E) → (X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

[(F : CategoryTheory.Functor D E) →
    (X : C) →
      (W : J.Cover X) →
        (P : CategoryTheory.Functor Cᵒᵖ D) → CategoryTheory.Limits.PreservesLimit (W.index P).multicospan F]

(J.plusFunctorWhiskerLeftIso P).inv.app X = (J.plusCompIso X P).inv


protected theorem ne_zero_iff {x : R} : abv x ≠ 0 ↔ x ≠ 0

{R : Type u_5}
{S : Type u_6}
[Semiring R]
[OrderedSemiring S]
(abv : AbsoluteValue R S)
{x : R}


lemma RightHomologyData.mapHomologyIso'_eq [S.HasHomology]
    [(S.map F).HasHomology] [F.PreservesRightHomologyOf S] :
    S.mapHomologyIso' F = (hr.map F).homologyIso ≪≫ F.mapIso hr.homologyIso.symm


@[simp, mfld_simps]
theorem coe_coe_fst (hb : b ∈ e'.baseSet) : (e' y).1 = b

(e' : Pretrivialization F Bundle.TotalSpace.proj)


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


@[to_additive]
lemma prod_fiberwise' [DecidableEq κ] (g : ι → κ) (f : κ → α) :
    ∏ j, ∏ _i : {i // g i = j}, f j = ∏ i, f (g i)

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[Fintype ι]
[Fintype κ]
[CommMonoid α]
[DecidableEq κ]
(g : ι → κ)
(f : κ → α)

∏ j : κ, ∏ _i : { i // g i = j }, f j = ∏ i : ι, f (g i)


@[simp]
theorem dualTensorHomEquivOfBasis_symm_cancel_left (x : Module.Dual R M ⊗[R] N) :
    (dualTensorHomEquivOfBasis (N := N) b).symm (dualTensorHom R M N x) = x

(x : TensorProduct R (Module.Dual R M) N)

(dualTensorHomEquivOfBasis b).symm ((dualTensorHom R M N) x) = x


@[simp]
theorem inr_star [AddMonoid R] [StarAddMonoid R] [Star A] (a : A) :
    ↑(star a) = star (a : Unitization R A)

{R : Type u_1}
{A : Type u_2}
[AddMonoid R]
[StarAddMonoid R]
[Star A]
(a : A)


theorem IsNilpotent.isUnit_add_right_of_commute [Ring R] {r u : R}
    (hnil : IsNilpotent r) (hu : IsUnit u) (h_comm : Commute r u) :
    IsUnit (r + u)

{R : Type u_1}
[Ring R]
{r u : R}
(hnil : IsNilpotent r)
(hu : IsUnit u)
(h_comm : Commute r u)


@[to_additive]
theorem mul_inv_lt_one_iff : b * a⁻¹ < 1 ↔ b < a

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


/-- An `𝕆`-graded order is an order `α` equipped with a strictly monotone function
`grade 𝕆 : α → 𝕆` which preserves order covering (`CovBy`). -/
class GradeOrder (𝕆 α : Type*) [Preorder 𝕆] [Preorder α] where
  /-- The grading function. -/
  protected grade : α → 𝕆
  /-- `grade` is strictly monotonic. -/
  grade_strictMono : StrictMono grade
  /-- `grade` preserves `CovBy`. -/
  covBy_grade ⦃a b : α⦄ : a ⋖ b → grade a ⋖ grade b

{𝕆 : Type u_5}
{α : Type u_6}
[Preorder 𝕆]
[Preorder α]
[self : GradeOrder 𝕆 α]


theorem mem_uniformity {s : Set (CauchyFilter α × CauchyFilter α)} :
    s ∈ 𝓤 (CauchyFilter α) ↔ ∃ t ∈ 𝓤 α, gen t ⊆ s

s ∈ 𝓤 (CauchyFilter α) ↔ ∃ t ∈ 𝓤 α, CauchyFilter.gen t ⊆ s


@[simp]
theorem dom_toSubtype (p : β → Prop) (f : α → β) : (toSubtype p f).Dom = { a | p (f a) }

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

(PFun.toSubtype p f).Dom = {a | p (f a)}


/-- Conditions for an element to be additively central -/
structure IsAddCentral [Add M] (z : M) : Prop where
  /-- addition commutes -/
  comm (a : M) : z + a = a + z
  /-- associative property for left addition -/
  left_assoc (b c : M) : z + (b + c) = (z + b) + c
  /-- middle associative addition property -/
  mid_assoc (a c : M) : (a + z) + c = a + (z + c)
  /-- associative property for right addition -/
  right_assoc (a b : M) : (a + b) + z = a + (b + z)

{M : Type u_1}
[Add M]
{z : M}
(self : IsAddCentral z)
(a b : M)


/-- A conditionally complete linear order is a linear order in which
every nonempty subset which is bounded above has a supremum, and
every nonempty subset which is bounded below has an infimum.
Typical examples are real numbers or natural numbers.

To differentiate the statements from the corresponding statements in (unconditional)
complete linear orders, we prefix sInf and sSup by a c everywhere. The same statements should
hold in both worlds, sometimes with additional assumptions of nonemptiness or
boundedness. -/
class ConditionallyCompleteLinearOrder (α : Type*) extends ConditionallyCompleteLattice α where
  /-- A `ConditionallyCompleteLinearOrder` is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a `ConditionallyCompleteLinearOrder`, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a `ConditionallyCompleteLinearOrder`, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a `ConditionallyCompleteLinearOrder`, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  /-- If a set is not bounded above, its supremum is by convention `sSup ∅`. -/
  csSup_of_not_bddAbove : ∀ s, ¬BddAbove s → sSup s = sSup (∅ : Set α)
  /-- If a set is not bounded below, its infimum is by convention `sInf ∅`. -/
  csInf_of_not_bddBelow : ∀ s, ¬BddBelow s → sInf s = sInf (∅ : Set α)

[self : ConditionallyCompleteLinearOrder α]


theorem max_lt {a b c : α} (h₁ : a < c) (h₂ : b < c) : max a b < c

{α : Type u}
[LinearOrder α]
{a b c : α}
(h₁ : a < c)
(h₂ : b < c)


theorem isLittleO_pow_log_id_atTop {n : ℕ} : (fun x => log x ^ n) =o[atTop] id

(fun x => Real.log x ^ n) =o[Filter.atTop] id


theorem join_eq (ss : List String) : join ss = ⟨(ss.map data).join⟩

String.join ss = { data := (List.map String.data ss).join }


@[nolint unusedHavesSuffices] -- false positive from unfolding String.anyAux
theorem anyAux_of_valid (p : Char → Bool) : ∀ l m r,
    anyAux ⟨l ++ m ++ r⟩ ⟨utf8Len l + utf8Len m⟩ p ⟨utf8Len l⟩ = m.any p

{ data := l ++ m ++ r }.anyAux { byteIdx := String.utf8Len l + String.utf8Len m } p { byteIdx := String.utf8Len l } =
  m.any p


theorem edgeDensity_def (s t : Finset α) :
    G.edgeDensity s t = (G.interedges s t).card / (s.card * t.card)

{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
(s t : Finset α)

G.edgeDensity s t = ↑(G.interedges s t).card / (↑s.card * ↑t.card)


@[to_additive] lemma Antivary.pow_left (hfg : Antivary f g) (n : ℕ) : Antivary (f ^ n) g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[OrderedCommGroup β]
{f : ι → α}
{g : ι → β}
(hfg : Antivary f g)
(n : ℕ)


private theorem lintegral_Lp_add_le_aux {p q : ℝ} (hpq : p.IsConjExponent q) {f g : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) (hf_top : (∫⁻ a, f a ^ p ∂μ) ≠ ⊤) (hg : AEMeasurable g μ)
    (hg_top : (∫⁻ a, g a ^ p ∂μ) ≠ ⊤) (h_add_zero : (∫⁻ a, (f + g) a ^ p ∂μ) ≠ 0)
    (h_add_top : (∫⁻ a, (f + g) a ^ p ∂μ) ≠ ⊤) :
    (∫⁻ a, (f + g) a ^ p ∂μ) ^ (1 / p) ≤
      (∫⁻ a, f a ^ p ∂μ) ^ (1 / p) + (∫⁻ a, g a ^ p ∂μ) ^ (1 / p)

(h_add_zero : ∫⁻ (a : α), (f + g) a ^ p ∂μ ≠ 0)

(h_add_top : ∫⁻ (a : α), (f + g) a ^ p ∂μ ≠ ⊤)


theorem _root_.Continuous.isOpenPosMeasure_map [OpensMeasurableSpace X]
    {Z : Type*} [TopologicalSpace Z] [MeasurableSpace Z] [BorelSpace Z]
    {f : X → Z} (hf : Continuous f) (hf_surj : Function.Surjective f) :
    (Measure.map f μ).IsOpenPosMeasure

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
{μ : MeasureTheory.Measure X}
[μ.IsOpenPosMeasure]
[OpensMeasurableSpace X]
{Z : Type u_3}
[TopologicalSpace Z]
[MeasurableSpace Z]
[BorelSpace Z]
{f : X → Z}
(hf : Continuous f)
(hf_surj : Function.Surjective f)


/-- The pigeonhole principle for finitely many pigeons counted by heads: given a function between
finite sets `s` and `t` and a natural number `b` such that `card t * n ≤ card s`, there exists
`y ∈ t` such that its preimage in `s` has at least `n` elements. See also
`Finset.exists_lt_card_fiber_of_mul_lt_card_of_maps_to` for a stronger statement. -/
theorem exists_le_card_fiber_of_mul_le_card_of_maps_to (hf : ∀ a ∈ s, f a ∈ t) (ht : t.Nonempty)
    (hn : t.card * n ≤ s.card) : ∃ y ∈ t, n ≤ (s.filter fun x => f x = y).card

{α : Type u}
{β : Type v}
[DecidableEq β]
{s : Finset α}
{t : Finset β}
{f : α → β}
{n : ℕ}
(hf : ∀ a ∈ s, f a ∈ t)
(ht : t.Nonempty)
(hn : t.card * n ≤ s.card)

∃ y ∈ t, n ≤ (Finset.filter (fun x => f x = y) s).card


theorem le_pointwise_smul_iff {a : α} {S T : AddSubgroup A} : S ≤ a • T ↔ a⁻¹ • S ≤ T

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[Group α]
[DistribMulAction α A]
{a : α}
{S T : AddSubgroup A}

S ≤ a • T ↔ a⁻¹ • S ≤ T


theorem neg_eq_self_iff {n : ℕ} (a : ZMod n) : -a = a ↔ a = 0 ∨ 2 * a.val = n


@[simp]
theorem vars_one : (1 : MvPolynomial σ R).vars = ∅

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


/-- Congruence relations equal the smallest congruence relation in which they are contained. -/
theorem ringConGen_of_ringCon (c : RingCon R) : ringConGen c = c

{R : Type u_2}
[Add R]
[Mul R]
(c : RingCon R)


theorem IsOpen.lowerSemicontinuousAt_indicator (hs : IsOpen s) (hy : 0 ≤ y) :
    LowerSemicontinuousAt (indicator s fun _x => y) x

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{x : α}
{s : Set α}
{y : β}
[Zero β]
(hs : IsOpen s)
(hy : 0 ≤ y)

LowerSemicontinuousAt (s.indicator fun _x => y) x


/-- **Carathéodory's convexity theorem** -/
theorem convexHull_eq_union : convexHull 𝕜 s =
    ⋃ (t : Finset E) (hss : ↑t ⊆ s) (hai : AffineIndependent 𝕜 ((↑) : t → E)), convexHull 𝕜 ↑t

{𝕜 : Type u_1}
{E : Type u}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}

(convexHull 𝕜) s = ⋃ t, ⋃ (_ : ↑t ⊆ s), ⋃ (_ : AffineIndependent 𝕜 Subtype.val), (convexHull 𝕜) ↑t


lemma toNat_le_toNat {a b : ℤ} (h : a ≤ b) : toNat a ≤ toNat b


theorem inl_apply (x : A) : inl R A B x = (x, 0)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[StarAddMonoid A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[StarAddMonoid B]
(x : A)

(NonUnitalStarAlgHom.inl R A B) x = (x, 0)


@[simp]
theorem symmDiff_le_sup {a b : α} : a ∆ b ≤ a ⊔ b

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


theorem FG.sup {N₁ N₂ : L.Substructure M} (hN₁ : N₁.FG) (hN₂ : N₂.FG) : (N₁ ⊔ N₂).FG

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]
{N₁ N₂ : L.Substructure M}
(hN₁ : N₁.FG)
(hN₂ : N₂.FG)


/-- Double integrals commute with subtraction. This is the version with `(f - g) (x, y)`
  (instead of `f (x, y) - g (x, y)`) in the LHS. -/
theorem integral_integral_sub' ⦃f g : α × β → E⦄ (hf : Integrable f (μ.prod ν))
    (hg : Integrable g (μ.prod ν)) :
    (∫ x, ∫ y, (f - g) (x, y) ∂ν ∂μ) = (∫ x, ∫ y, f (x, y) ∂ν ∂μ) - ∫ x, ∫ y, g (x, y) ∂ν ∂μ

⦃f g : α × β → E⦄

(hf : MeasureTheory.Integrable f (μ.prod ν))

(hg : MeasureTheory.Integrable g (μ.prod ν))

∫ (x : α), ∫ (y : β), (f - g) (x, y) ∂ν ∂μ = ∫ (x : α), ∫ (y : β), f (x, y) ∂ν ∂μ - ∫ (x : α), ∫ (y : β), g (x, y) ∂ν ∂μ


@[simp]
theorem nextFixed_le_iff {x : α} (hx : x ≤ f x) {y : fixedPoints f} :
    f.nextFixed x hx ≤ y ↔ x ≤ y

{α : Type u}
[CompleteLattice α]
(f : α →o α)
{x : α}
(hx : x ≤ f x)
{y : ↑(Function.fixedPoints ⇑f)}


/-- In a category with pullbacks, a morphism `f : X ⟶ Y` induces a functor `Over Y ⥤ Over X`,
by pulling back a morphism along `f`. -/
@[simps! (config := { simpRhs := true}) obj_left obj_hom map_left]
def pullback {X Y : C} (f : X ⟶ Y) : Over Y ⥤ Over X

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasPullbacks C]
{X Y : C}
(f : X ⟶ Y)
(g : CategoryTheory.Over Y)

((CategoryTheory.Over.pullback f).obj g).left = CategoryTheory.Limits.pullback g.hom f


theorem withDensity_tsum [Countable ι] (κ : Kernel α β) [IsSFiniteKernel κ] {f : ι → α → β → ℝ≥0∞}
    (hf : ∀ i, Measurable (Function.uncurry (f i))) :
    withDensity κ (∑' n, f n) = Kernel.sum fun n => withDensity κ (f n)

{f : ι → α → β → ℝ≥0∞}

(hf : ∀ (i : ι), Measurable (Function.uncurry (f i)))

κ.withDensity (∑' (n : ι), f n) = ProbabilityTheory.Kernel.sum fun n => κ.withDensity (f n)


@[to_additive (attr := simp)]
theorem zpowers_eq_bot {g : G} : zpowers g = ⊥ ↔ g = 1


theorem Finset.centerMass_singleton (hw : w i ≠ 0) : ({i} : Finset ι).centerMass w z = z i

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(i : ι)
{w : ι → R}
(z : ι → E)
(hw : w i ≠ 0)


theorem star_eq_iff_star_eq [InvolutiveStar R] {r s : R} : star r = s ↔ star s = r

{R : Type u}
[InvolutiveStar R]
{r s : R}


theorem ofNat_surjective : Surjective (ofNat s)

{s : Set ℕ}
[Infinite ↑s]
[DecidablePred fun x => x ∈ s]


@[simp]
theorem sdiff_inf_self_right (a b : α) : b \ (a ⊓ b) = b \ a

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


@[nontriviality]
theorem ratio_of_subsingleton [Subsingleton α] [DilationClass F α β] (f : F) : ratio f = 1

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[Subsingleton α]
[DilationClass F α β]
(f : F)


theorem inr_injective : Function.Injective (inr : G → N ⋊[φ] G)

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}


theorem norm_p_lt_one : ‖(p : ℚ_[p])‖ < 1


theorem norm_const_smul_le (hp : p ≠ 0) (c : 𝕜) (f : lp E p) : ‖c • f‖ ≤ ‖c‖ * ‖f‖

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{𝕜 : Type u_3}
[NormedRing 𝕜]
[(i : α) → Module 𝕜 (E i)]
[∀ (i : α), BoundedSMul 𝕜 (E i)]
(hp : p ≠ 0)
(c : 𝕜)
(f : ↥(lp E p))

‖c • f‖ ≤ ‖c‖ * ‖f‖


/-- The `DFinsupp` version of `Finsupp.lsum`.

See note [bundled maps over different rings] for why separate `R` and `S` semirings are used. -/
@[simps]
def lsum [Semiring S] [Module S N] [SMulCommClass R S N] :
    (∀ i, M i →ₗ[R] N) ≃ₗ[S] (Π₀ i, M i) →ₗ[R] N

{ι : Type u_1}
{R : Type u_2}
(S : Type u_3)
{M : ι → Type u_4}
{N : Type u_5}
[Semiring R]
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
[AddCommMonoid N]
[Module R N]
[DecidableEq ι]
[Semiring S]
[Module S N]
[SMulCommClass R S N]
(F : (Π₀ (i : ι), M i) →ₗ[R] N)
(i : ι)

(DFinsupp.lsum S).symm F i = F ∘ₗ DFinsupp.lsingle i


@[simp]
theorem comap_iInf [RingHomSurjective σ₁₂] {ι : Sort*} (f : F) (p : ι → Submodule R₂ M₂) :
    comap f (⨅ i, p i) = ⨅ i, comap f (p i)

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
{ι : Sort u_10}
(f : F)
(p : ι → Submodule R₂ M₂)

Submodule.comap f (⨅ i, p i) = ⨅ i, Submodule.comap f (p i)


@[simp]
theorem mapEquiv_refl : mapEquiv σ (RingEquiv.refl R) = RingEquiv.refl _

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

MvPolynomial.mapEquiv σ (RingEquiv.refl R) = RingEquiv.refl (MvPolynomial σ R)


/-- Build a `MulEquiv` from an isomorphism in the category `CommGroup`. -/
@[to_additive (attr := simps!)]
def commGroupIsoToMulEquiv {X Y : CommGrp} (i : X ≅ Y) : X ≃* Y


/-- `m ^ (period m a)` fixes `a`. -/
@[to_additive (attr := simp) "`(period m a) • m` fixes `a`."]
theorem pow_period_smul (m : M) (a : α) : m ^ (period m a) • a = a

{α : Type v}
{M : Type u}
[AddMonoid M]
[AddAction M α]
(m : M)
(a : α)


theorem iInf_principal {ι : Sort w} [Finite ι] (f : ι → Set α) : ⨅ i, 𝓟 (f i) = 𝓟 (⋂ i, f i)

{α : Type u}
{ι : Sort w}
[Finite ι]
(f : ι → Set α)


private lemma lambda_not_dvd_w : ¬ λ ∣ S.w

(S : FermatLastTheoremForThreeGen.Solution hζ)

¬hζ.toInteger - 1 ∣ FermatLastTheoremForThreeGen.Solution.w S


@[simp]
theorem coe_toOrderIso (e : α ≃ β) (h₁ : Monotone e) (h₂ : Monotone e.symm) :
    ⇑(e.toOrderIso h₁ h₂) = e

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(e : α ≃ β)
(h₁ : Monotone ⇑e)
(h₂ : Monotone ⇑e.symm)


theorem exists_seq_strictMono_tendsto [DenselyOrdered α] [NoMinOrder α] [FirstCountableTopology α]
    (x : α) : ∃ u : ℕ → α, StrictMono u ∧ (∀ n, u n < x) ∧ Tendsto u atTop (𝓝 x)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[NoMinOrder α]
[FirstCountableTopology α]
(x : α)

∃ u, StrictMono u ∧ (∀ (n : ℕ), u n < x) ∧ Filter.Tendsto u Filter.atTop (𝓝 x)


theorem natDegree_le_rankOfDiscrBdd (a : 𝓞 K) (h : ℚ⟮(a : K)⟯ = ⊤) :
    natDegree (minpoly ℤ (a : K)) ≤ rankOfDiscrBdd N

{K : Type u_1}
[Field K]
[NumberField K]
{N : ℕ}
(hK : |NumberField.discr K| ≤ ↑N)
(a : NumberField.RingOfIntegers K)
(h : ℚ⟮↑a⟯ = ⊤)

(minpoly ℤ ↑a).natDegree ≤ NumberField.hermiteTheorem.rankOfDiscrBdd N


theorem lt_ack_left (m n : ℕ) : m < ack m n


@[to_additive]
lemma Antivary.div_left (h₁ : Antivary f₁ g) (h₂ : Monovary f₂ g) : Antivary (f₁ / f₂) g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[OrderedCommGroup β]
{f₁ f₂ : ι → α}
{g : ι → β}
(h₁ : Antivary f₁ g)
(h₂ : Monovary f₂ g)


theorem nat_abs_sum_le {ι : Type*} (s : Finset ι) (f : ι → ℤ) :
    (∑ i ∈ s, f i).natAbs ≤ ∑ i ∈ s, (f i).natAbs

{ι : Type u_6}
(s : Finset ι)
(f : ι → ℤ)


theorem toSubmodule_bot : Subalgebra.toSubmodule (⊥ : Subalgebra R A) = 1

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


@[to_additive]
theorem map_iSup_comap_of_surjective (S : ι → Subsemigroup N) :
    (⨆ i, (S i).comap f).map f = iSup S

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

Subsemigroup.map f (⨆ i, Subsemigroup.comap f (S i)) = iSup S


/-- A constructor for bornologies by specifying the bounded sets,
and showing that they satisfy the appropriate conditions. -/
@[simps]
def Bornology.ofBounded {α : Type*} (B : Set (Set α))
    (empty_mem : ∅ ∈ B)
    (subset_mem : ∀ s₁ ∈ B, ∀ s₂ ⊆ s₁, s₂ ∈ B)
    (union_mem : ∀ s₁ ∈ B, ∀ s₂ ∈ B, s₁ ∪ s₂ ∈ B)
    (singleton_mem : ∀ x, {x} ∈ B) : Bornology α

Bornology.cobounded α = Filter.comk (fun x => x ∈ B) empty_mem subset_mem union_mem


theorem SeminormFamily.comp_apply (q : SeminormFamily 𝕜₂ F ι) (i : ι) (f : E →ₛₗ[σ₁₂] F) :
    q.comp f i = (q i).comp f

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_5}
{F : Type u_6}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[NormedField 𝕜₂]
[AddCommGroup F]
[Module 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(q : SeminormFamily 𝕜₂ F ι)
(i : ι)
(f : E →ₛₗ[σ₁₂] F)


@[simp]
theorem measure_union_lt_top_iff : μ (s ∪ t) < ∞ ↔ μ s < ∞ ∧ μ t < ∞

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s t : Set α}

μ (s ∪ t) < ⊤ ↔ μ s < ⊤ ∧ μ t < ⊤


lemma girth_anti {G' : SimpleGraph α} (hab : G ≤ G') (h : ¬ G.IsAcyclic) : G'.girth ≤ G.girth

{α : Type u_1}
{G G' : SimpleGraph α}
(hab : G ≤ G')
(h : ¬G.IsAcyclic)


@[reassoc]
theorem conePointsIsoOfNatIso_inv_comp {F G : J ⥤ C} {s : Cone F} {t : Cone G} (P : IsLimit s)
    (Q : IsLimit t) (w : F ≅ G) (j : J) :
    (conePointsIsoOfNatIso P Q w).inv ≫ s.π.app j = t.π.app j ≫ w.inv.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
{s : CategoryTheory.Limits.Cone F}
{t : CategoryTheory.Limits.Cone G}
(P : CategoryTheory.Limits.IsLimit s)
(Q : CategoryTheory.Limits.IsLimit t)
(w : F ≅ G)
(j : J)

(P.conePointsIsoOfNatIso Q w).inv ≫ s.π.app j = t.π.app j ≫ w.inv.app j


theorem singleton_vsub (a : β) : ({a} : Finset β) -ᵥ t = t.image (a -ᵥ ·)

{α : Type u_2}
{β : Type u_3}
[VSub α β]
[DecidableEq α]
{t : Finset β}
(a : β)

{a} -ᵥ t = Finset.image (fun x => a -ᵥ x) t


/-- The anti-equivalence between simplicial objects and cosimplicial objects. -/
@[simps!]
def simplicialCosimplicialEquiv : (SimplicialObject C)ᵒᵖ ≌ CosimplicialObject Cᵒᵖ

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(F : (SimplexCategoryᵒᵖ ⥤ C)ᵒᵖ)
(X : SimplexCategory)

((CategoryTheory.simplicialCosimplicialEquiv C).functor.obj F).obj X =
  Opposite.op ((Opposite.unop F).obj (Opposite.op X))


@[simp]
theorem toList'_cons (l : List α) (s : WSeq α) (a : α) :
    Computation.corec (fun ⟨l, s⟩ =>
      match Seq.destruct s with
      | none => Sum.inl l.reverse
      | some (none, s') => Sum.inr (l, s')
      | some (some a, s') => Sum.inr (a::l, s')) (l, cons a s) =
      (Computation.corec (fun ⟨l, s⟩ =>
        match Seq.destruct s with
        | none => Sum.inl l.reverse
        | some (none, s') => Sum.inr (l, s')
        | some (some a, s') => Sum.inr (a::l, s')) (a::l, s)).think

{α : Type u}
(l : List α)
(s : Stream'.WSeq α)
(a : α)

Computation.corec
    (fun x =>
      match x with
      | (l, s) =>
        match Stream'.Seq.destruct s with
        | none => Sum.inl l.reverse
        | some (none, s') => Sum.inr (l, s')
        | some (some a, s') => Sum.inr (a :: l, s'))
    (l, Stream'.WSeq.cons a s) =
  (Computation.corec
      (fun x =>
        match x with
        | (l, s) =>
          match Stream'.Seq.destruct s with
          | none => Sum.inl l.reverse
          | some (none, s') => Sum.inr (l, s')
          | some (some a, s') => Sum.inr (a :: l, s'))
      (a :: l, s)).think


/-- Build an isomorphism in the category `QuadraticModuleCat R` from a
`QuadraticForm.IsometryEquiv`. -/
@[simps]
def ofIso (e : Q₁.IsometryEquiv Q₂) : QuadraticModuleCat.of Q₁ ≅ QuadraticModuleCat.of Q₂

{R : Type u}
[CommRing R]
{X Y : Type v}
[AddCommGroup X]
[Module R X]
[AddCommGroup Y]
[Module R Y]
{Q₁ : QuadraticForm R X}
{Q₂ : QuadraticForm R Y}
(e : QuadraticMap.IsometryEquiv Q₁ Q₂)

(QuadraticModuleCat.ofIso e).hom.toIsometry = e.toIsometry


theorem Ioo_eq_filter_ssubsets : Ioo s t = t.ssubsets.filter (s ⊂ ·)

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

Finset.Ioo s t = Finset.filter (fun x => s ⊂ x) t.ssubsets


@[to_additive]
lemma le_stabilizer_smul_left [SMul α β] [IsScalarTower G α β] (a : α) (b : β) :
    stabilizer G a ≤ stabilizer G (a • b)

{G : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddGroup G]
[AddAction G α]
[AddAction G β]
[VAdd α β]
[VAddAssocClass G α β]
(a : α)
(b : β)

AddAction.stabilizer G a ≤ AddAction.stabilizer G (a +ᵥ b)