@[to_additive]
protected theorem aEStronglyMeasurable_on_iff {β : Type*} [TopologicalSpace β]
    [PseudoMetrizableSpace β] (hs : IsFundamentalDomain G s μ) (ht : IsFundamentalDomain G t μ)
    {f : α → β} (hf : ∀ (g : G) (x), f (g • x) = f x) :
    AEStronglyMeasurable f (μ.restrict s) ↔ AEStronglyMeasurable f (μ.restrict t)

[MeasureTheory.SMulInvariantMeasure G α μ]

(hs : MeasureTheory.IsFundamentalDomain G s μ)

(ht : MeasureTheory.IsFundamentalDomain G t μ)

(hf : ∀ (g : G) (x : α), f (g • x) = f x)

MeasureTheory.AEStronglyMeasurable f (μ.restrict s) ↔ MeasureTheory.AEStronglyMeasurable f (μ.restrict t)


@[nontriviality]
theorem Subsingleton.atBot_eq (α) [Subsingleton α] [Preorder α] : (atBot : Filter α) = ⊤

(α : Type u_6)
[Subsingleton α]
[Preorder α]


/-- Spheres are bounded -/
theorem isBounded_sphere : IsBounded (sphere x r)

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


@[to_additive]
theorem smul_set_sdiff : a • (s \ t) = a • s \ a • t

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[AddAction α β]
{s t : Set β}
{a : α}


@[simp] theorem not_indep_iff (hX : X ⊆ M.E := by aesop_mat) : ¬ M.Indep X ↔ M.Dep X

{α : Type u_1}
{M : Matroid α}
{X : Set α}
(hX : X ⊆ M.E := by aesop_mat)


theorem exists_upper_bound_image [Nonempty α] [LinearOrder β] (s : Set α) (f : α → β)
    (h : s.Finite) : ∃ a : α, ∀ b ∈ s, f b ≤ f a

{α : Type u}
{β : Type v}
[Nonempty α]
[LinearOrder β]
(s : Set α)
(f : α → β)
(h : s.Finite)


theorem multiplicity_mul {p m n : ℕ} (hp : p.Prime) :
    multiplicity p (m * n) = multiplicity p m + multiplicity p n


@[simp]
theorem induce_empty : G'.induce ∅ = ⊥

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}


theorem descPochhammer_int_eq_ascFactorial (a b : ℕ) :
    (descPochhammer ℤ b).eval (a + b : ℤ) = (a + 1).ascFactorial b

Polynomial.eval (↑a + ↑b) (descPochhammer ℤ b) = ↑((a + 1).ascFactorial b)


theorem ediam_range [SemilinearIsometryClass 𝓕 σ₁₂ E E₂] (f : 𝓕) :
    EMetric.diam (range f) = EMetric.diam (univ : Set E)

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
{𝓕 : Type u_10}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
[FunLike 𝓕 E E₂]
[SemilinearIsometryClass 𝓕 σ₁₂ E E₂]
(f : 𝓕)

EMetric.diam (Set.range ⇑f) = EMetric.diam Set.univ


@[simp]
theorem decompose_symm_one : (decompose 𝒜).symm 1 = (1 : A)

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


theorem le_total : ∀ a b : α, a ≤ b ∨ b ≤ a


@[simp]
theorem toIsometryEquiv_refl : (refl 𝕜 P).toIsometryEquiv = IsometryEquiv.refl P

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

(AffineIsometryEquiv.refl 𝕜 P).toIsometryEquiv = IsometryEquiv.refl P


theorem le_minimum_of_forall_le {b : WithTop α} (h : ∀ a ∈ l, b ≤ a) : b ≤ l.minimum

{α : Type u_1}
[LinearOrder α]
{l : List α}
{b : WithTop α}
(h : ∀ (a : α), a ∈ l → b ≤ ↑a)


@[simp]
theorem cthickening_closure : cthickening δ (closure s) = cthickening δ s

{α : Type u}
[PseudoEMetricSpace α]
{δ : ℝ}
{s : Set α}

Metric.cthickening δ (closure s) = Metric.cthickening δ s


lemma neg_vecMul_neg [Fintype m] (v : m → α) (A : Matrix m n α) : (-v) ᵥ* (-A) = v ᵥ* A

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocRing α]
[Fintype m]
(v : m → α)
(A : Matrix m n α)


theorem castPred_eq_iff_eq_castSucc (i : Fin (n + 1)) (hi : i ≠ last _) (j : Fin n) :
    castPred i hi = j ↔ i = castSucc j

{n : ℕ}
(i : Fin (n + 1))
(hi : i ≠ Fin.last n)
(j : Fin n)


theorem le_of_mul_le_of_one_le_nonneg_right [MulPosMono α] (h : a * b ≤ c) (ha : 1 ≤ a)
    (hb : 0 ≤ b) : b ≤ c

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


theorem locallyConstant_eq_of_fiber_zero_eq {X : Type*} [TopologicalSpace X]
    (f g : LocallyConstant X (Fin 2)) (h : f ⁻¹' ({0} : Set (Fin 2)) = g ⁻¹' {0}) : f = g

{X : Type u_5}
[TopologicalSpace X]
(f g : LocallyConstant X (Fin 2))
(h : ⇑f ⁻¹' {0} = ⇑g ⁻¹' {0})


theorem setOfIdeal_eq_compl_singleton (I : Ideal C(X, 𝕜)) [hI : I.IsMaximal] :
    ∃ x : X, setOfIdeal I = {x}ᶜ

{X : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
[TopologicalSpace X]
[CompactSpace X]
[T2Space X]
(I : Ideal C(X, 𝕜))
[hI : I.IsMaximal]


lemma of_abv (hf : IsCauSeq abs fun m ↦ ∑ n ∈ range m, abv (f n)) :
    IsCauSeq abv fun m ↦ ∑ n ∈ range m, f n

(hf : IsCauSeq abs fun m => ∑ n ∈ Finset.range m, abv (f n))

IsCauSeq abv fun m => ∑ n ∈ Finset.range m, f n


theorem dotProduct_eq_zero (v : n → R) (h : ∀ w, dotProduct v w = 0) : v = 0

(h : ∀ (w : n → R), Matrix.dotProduct v w = 0)


@[simp]
theorem funCongrLeft_apply (e : m ≃ n) (x : n → M) : funCongrLeft R M e x = funLeft R M e x

(R : Type u_1)
(M : Type u_8)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{m : Type u_17}
{n : Type u_18}
(e : m ≃ n)
(x : n → M)

(LinearEquiv.funCongrLeft R M e) x = (LinearMap.funLeft R M ⇑e) x


@[to_additive]
theorem tprod_congr_set_coe (f : β → α) {s t : Set β} (h : s = t) :
    ∏' x : s, f x = ∏' x : t, f x

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
(f : β → α)
{s t : Set β}
(h : s = t)


@[simp] lemma _root_.EquivLike.self_comp_coe_symm {F} [EquivLike F α β] (e : F) :
    e ∘ (e : α ≃ β).symm = id

{α : Sort u}
{β : Sort v}
{F : Sort u_1}
[EquivLike F α β]
(e : F)


@[to_additive]
theorem closedBall_one_div_singleton : closedBall 1 δ / {x} = closedBall x⁻¹ δ

{E : Type u_1}
[SeminormedCommGroup E]
(δ : ℝ)
(x : E)

Metric.closedBall 1 δ / {x} = Metric.closedBall x⁻¹ δ


/-- Interpreting the legs of a cone as a structured arrow and then forgetting the arrow again does
    nothing. -/
@[simps!]
def Cone.toStructuredArrowCompProj {F : J ⥤ C} (c : Cone F) :
    c.toStructuredArrow ⋙ StructuredArrow.proj _ _ ≅ 𝟭 J

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

c.toStructuredArrowCompProj.hom.app X = CategoryTheory.CategoryStruct.id X


/-- A typeclass for when an `AddAction β α` descends to the quotient `α ⧸ H`. -/
class _root_.AddAction.QuotientAction {α : Type u} (β : Type v) [AddGroup α] [AddMonoid β]
  [AddAction β α] (H : AddSubgroup α) : Prop where
  /-- The action fulfils a normality condition on summands that lie in `H`.
    This ensures that the action descends to an action on the quotient `α ⧸ H`. -/
  inv_mul_mem : ∀ (b : β) {a a' : α}, -a + a' ∈ H → -(b +ᵥ a) + (b +ᵥ a') ∈ H

{α : Type u}
{β : Type v}
[AddGroup α]
[AddMonoid β]
[AddAction β α]
{H : AddSubgroup α}
[self : AddAction.QuotientAction β H]
(b : β)
{a a' : α}


@[simp]
theorem conjTranspose_zero [AddMonoid α] [StarAddMonoid α] : (0 : Matrix m n α)ᴴ = 0

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddMonoid α]
[StarAddMonoid α]


/-- Suppose `F : Homotopy p q`. Then we have a `Homotopy p.symm q.symm` by reversing the second
argument.
-/
@[simps]
def symm₂ {p q : Path x₀ x₁} (F : p.Homotopy q) : p.symm.Homotopy q.symm

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p q : Path x₀ x₁}
(F : p.Homotopy q)
(x : ↑I × ↑I)


@[simp]
theorem diag_preimage_prod (s t : Set α) : (fun x => (x, x)) ⁻¹' s ×ˢ t = s ∩ t


@[simp] theorem none_bind (f : α → Option β) : none.bind f = none

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


@[simp]
theorem sub_self (a : Ordinal) : a - a = 0


theorem BAll.imp_right (H : ∀ x h, P x h → Q x h) (h₁ : ∀ x h, P x h) (x h) : Q x h

(H : ∀ (x : α) (h : p x), P x h → Q x h)


@[to_additive] -- Porting note: simp removed, simpNF says LHS simplifies to itself
theorem ofHom_apply {X Y : Type u} [Semigroup X] [Semigroup Y] (f : X →ₙ* Y) (x : X) :
    ofHom f x = f x


@[simp]
theorem preimage_mul_const_Iio (a : α) {c : α} (h : 0 < c) :
    (fun x => x * c) ⁻¹' Iio a = Iio (a / c)

{α : Type u_1}
[LinearOrderedField α]
(a : α)
{c : α}
(h : 0 < c)

(fun x => x * c) ⁻¹' Set.Iio a = Set.Iio (a / c)


theorem emod_eq_of_lt {a b : Int} (H1 : 0 ≤ a) (H2 : a < b) : a % b = a


/--
A *unital shelf* is a shelf equipped with an element `1` such that, for all elements `x`,
we have both `x ◃ 1` and `1 ◃ x` equal `x`.
-/
class UnitalShelf (α : Type u) extends Shelf α, One α :=
(one_act : ∀ a : α, act 1 a = a)
(act_one : ∀ a : α, act a 1 = a)

{α : Type u}
[self : UnitalShelf α]
(a : α)


@[reassoc (attr := simp)]
lemma liftCycles_comp_cyclesMap {A : C} (k : A ⟶ K.X i) (j : ι) (hj : c.next i = j)
    (hk : k ≫ K.d i j = 0) (φ : K ⟶ L) :
    K.liftCycles k j hj hk ≫ cyclesMap φ i = L.liftCycles (k ≫ φ.f i) j hj
      (by rw [assoc, φ.comm, reassoc_of% hk, zero_comp])

K.liftCycles k j hj hk ≫ HomologicalComplex.cyclesMap φ i = L.liftCycles (k ≫ φ.f i) j hj ⋯


@[simp]
theorem algEquiv_apply (e : α ≃ β) [Semiring β] [Algebra R β] (a : α) : (algEquiv R e) a = e a

{α : Type u}
{β : Type v}
(R : Type u_1)
[CommSemiring R]
(e : α ≃ β)
[Semiring β]
[Algebra R β]
(a : α)


@[to_additive]
theorem one_min (a : α) : min 1 a = 1

{α : Type u}
[CanonicallyLinearOrderedCommMonoid α]
(a : α)


/-- A splitting on a short complex induces splittings on isomorphic short complexes. -/
@[simps]
def ofIso {S₁ S₂ : ShortComplex C} (s : S₁.Splitting) (e : S₁ ≅ S₂) : S₂.Splitting

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(s : S₁.Splitting)
(e : S₁ ≅ S₂)

(s.ofIso e).s = CategoryTheory.CategoryStruct.comp e.inv.τ₃ (CategoryTheory.CategoryStruct.comp s.s e.hom.τ₂)


@[simp]
theorem mem_image (f : α → β) (s : Set α) (y : β) : y ∈ f '' s ↔ ∃ x ∈ s, f x = y

{α : Type u}
{β : Type v}
(f : α → β)
(s : Set α)
(y : β)


lemma two_mul_ediv_two_add_one_of_odd : Odd n → 2 * (n / 2) + 1 = n


theorem RightInverse.comp_eq_id {f : α → β} {g : β → α} (h : RightInverse f g) : g ∘ f = id

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
{g : β → α}
(h : Function.RightInverse f g)


@[simp, norm_cast]
theorem cast_sum (s : Finset ι) (f : ι → ℚ) : ∑ i ∈ s, f i = ∑ i ∈ s, (f i : α)

{ι : Type u_1}
{α : Type u_2}
[DivisionRing α]
[CharZero α]
(s : Finset ι)
(f : ι → ℚ)


/-- Given a map f from α to β, the kernel of f is the unique equivalence relation on α whose
    induced map from the quotient of α to β is injective. -/
theorem ker_eq_lift_of_injective {r : Setoid α} (f : α → β) (H : ∀ x y, r.Rel x y → f x = f y)
    (h : Injective (Quotient.lift f H)) : ker f = r

(H : ∀ (x y : α), r.Rel x y → f x = f y)

(h : Function.Injective (Quotient.lift f H))


@[to_additive]
theorem contMDiffWithinAt_one [One M'] : ContMDiffWithinAt I I' n (1 : M → M') s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{s : Set M}
{x : M}
{n : ℕ∞}
[Zero M']


@[to_additive]
theorem mul_inv_le_inv_mul_iff : a * b⁻¹ ≤ d⁻¹ * c ↔ d * a ≤ c * 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 coe_toAddSubgroup : (s.toAddSubgroup : Set K) = s

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


/-- Given an arbitrary set `s`, then `μ (s ∩ a) / μ a` converges to `1` when `a` shrinks to a
typical point of `s` along a Vitali family. This shows that almost every point of `s` is a
Lebesgue density point for `s`. A stronger version for measurable sets is given
in `ae_tendsto_measure_inter_div_of_measurableSet`. -/
theorem ae_tendsto_measure_inter_div (s : Set α) :
    ∀ᵐ x ∂μ.restrict s, Tendsto (fun a => μ (s ∩ a) / μ a) (v.filterAt x) (𝓝 1)

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


lemma prev_eq_self' (c : ComplexShape ι) (j : ι) (hj : ∀ i, ¬ c.Rel i j) :
    c.prev j = j

{ι : Type u_1}
(c : ComplexShape ι)
(j : ι)
(hj : ∀ (i : ι), ¬c.Rel i j)


@[simp]
lemma imageToKernel_arrow_apply [ConcreteCategory V] (w : f ≫ g = 0)
    (x : (forget V).obj (Subobject.underlying.obj (imageSubobject f))) :
    (kernelSubobject g).arrow (imageToKernel f g w x) =
      (imageSubobject f).arrow x

(x : (CategoryTheory.forget V).obj (CategoryTheory.Subobject.underlying.obj (CategoryTheory.Limits.imageSubobject f)))

(CategoryTheory.Limits.kernelSubobject g).arrow ((imageToKernel f g w) x) =
  (CategoryTheory.Limits.imageSubobject f).arrow x


/-- If `R` is a Jacobson ring, and `P` is a maximal ideal of `R[X]`,
  then `R → R[X]/P` is an integral map. -/
theorem quotient_mk_comp_C_isIntegral_of_jacobson :
    ((Quotient.mk P).comp C : R →+* R[X] ⧸ P).IsIntegral

{R : Type u_1}
[CommRing R]
[Ideal.IsJacobson R]
(P : Ideal (Polynomial R))
[hP : P.IsMaximal]


theorem tendsto_nat_floor_atTop {α : Type*} [LinearOrderedSemiring α] [FloorSemiring α] :
    Tendsto (fun x : α ↦ ⌊x⌋₊) atTop atTop

{α : Type u_4}
[LinearOrderedSemiring α]
[FloorSemiring α]

Filter.Tendsto (fun x => ⌊x⌋₊) Filter.atTop Filter.atTop


theorem ContDiffOn.contDiffAt (h : ContDiffOn 𝕜 n f s) (hx : s ∈ 𝓝 x) :
    ContDiffAt 𝕜 n f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
(h : ContDiffOn 𝕜 n f s)
(hx : s ∈ 𝓝 x)


@[simp]
theorem filter_apply [∀ i, Zero (β i)] (p : ι → Prop) [DecidablePred p] (i : ι) (f : Π₀ i, β i) :
    f.filter p i = if p i then f i else 0

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

(DFinsupp.filter p f) i = if p i then f i else 0


/-- The determinant of an endomorphism independent of basis.

If there is no finite basis on `M`, the result is `1` instead.
-/
protected irreducible_def det : (M →ₗ[A] M) →* A

{M : Type u_7}
[AddCommGroup M]
{A : Type u_8}
[CommRing A]
[Module A M]

LinearMap.det = if H : ∃ s, Nonempty (Basis { x // x ∈ s } A M) then LinearMap.detAux (Trunc.mk ⋯.some) else 1


theorem support_esymm'' (n : ℕ) [DecidableEq σ] [Nontrivial R] :
    (esymm σ R n).support =
      (powersetCard n (univ : Finset σ)).biUnion fun t =>
        (Finsupp.single (∑ i ∈ t, Finsupp.single i 1) (1 : R)).support

(σ : Type u_1)
(R : Type u_2)
[CommSemiring R]
[Fintype σ]
(n : ℕ)
[DecidableEq σ]
[Nontrivial R]

(MvPolynomial.esymm σ R n).support =
  (Finset.powersetCard n Finset.univ).biUnion fun t => (Finsupp.single (∑ i ∈ t, Finsupp.single i 1) 1).support


theorem concaveOn_iff_div {f : E → β} :
    ConcaveOn 𝕜 s f ↔
      Convex 𝕜 s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → 0 < a + b →
        (a / (a + b)) • f x + (b / (a + b)) • f y ≤ f ((a / (a + b)) • x + (b / (a + b)) • y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[LinearOrderedField 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}

ConcaveOn 𝕜 s f ↔
  Convex 𝕜 s ∧
    ∀ ⦃x : E⦄,
      x ∈ s →
        ∀ ⦃y : E⦄,
          y ∈ s →
            ∀ ⦃a b : 𝕜⦄,
              0 ≤ a →
                0 ≤ b →
                  0 < a + b → (a / (a + b)) • f x + (b / (a + b)) • f y ≤ f ((a / (a + b)) • x + (b / (a + b)) • y)


@[simp]
theorem preimage_symm (f : P₁ ≃ᵃL[k] P₂) (s : Set P₁) : f.symm ⁻¹' s = f '' s

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


theorem Ioo_ae_eq_Icc : Ioo a b =ᵐ[μ] Icc a b

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
[PartialOrder α]
{a b : α}


@[simp]
theorem principal_neBot_iff {s : Set α} : NeBot (𝓟 s) ↔ s.Nonempty


@[simp]
theorem mk.eta : ∀ {p : α × β}, (p.1, p.2) = p

{α : Type u_1}
{β : Type u_2}
{p : α × β}


@[simp]
theorem ball_eq_emptyset (p : Seminorm 𝕜 E) {x : E} {r : ℝ} (hr : r ≤ 0) : p.ball x r = ∅

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
{x : E}
{r : ℝ}
(hr : r ≤ 0)


theorem closedBall_add_closedBall_subset (p : Seminorm 𝕜 E) (r₁ r₂ : ℝ) (x₁ x₂ : E) :
    p.closedBall (x₁ : E) r₁ + p.closedBall (x₂ : E) r₂ ⊆ p.closedBall (x₁ + x₂) (r₁ + r₂)

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(p : Seminorm 𝕜 E)
(r₁ r₂ : ℝ)
(x₁ x₂ : E)

p.closedBall x₁ r₁ + p.closedBall x₂ r₂ ⊆ p.closedBall (x₁ + x₂) (r₁ + r₂)


/-- Alternative version of `List.prod_set` when the list is over a group -/
@[to_additive "Alternative version of `List.sum_set` when the list is over a group"]
theorem prod_set' (L : List G) (n : ℕ) (a : G) :
    (L.set n a).prod = L.prod * if hn : n < L.length then (L.get ⟨n, hn⟩)⁻¹ * a else 1

{G : Type u_7}
[CommGroup G]
(L : List G)
(n : ℕ)
(a : G)


/-- If `μ` is an s-finite measure, then for any function `f`
there exists a measurable function `g ≤ f`
that has the same Lebesgue integral over every set.

For the integral over the whole space, the statement is true without extra assumptions,
see `exists_measurable_le_lintegral_eq`.
See also `MeasureTheory.Measure.restrict_toMeasurable_of_sFinite` for a similar result. -/
theorem exists_measurable_le_forall_setLIntegral_eq [SFinite μ] (f : α → ℝ≥0∞) :
    ∃ g : α → ℝ≥0∞, Measurable g ∧ g ≤ f ∧ ∀ s, ∫⁻ a in s, f a ∂μ = ∫⁻ a in s, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ]
(f : α → ℝ≥0∞)

∃ g, Measurable g ∧ g ≤ f ∧ ∀ (s : Set α), ∫⁻ (a : α) in s, f a ∂μ = ∫⁻ (a : α) in s, g a ∂μ


/-- The functor `Comma L R ⥤ Comma L' R'` induced by three functors `F₁`, `F₂`, `F`
and two natural transformations `F₁ ⋙ L' ⟶ L ⋙ F` and `R ⋙ F ⟶ F₂ ⋙ R'`. -/
@[simps]
def map : Comma L R ⥤ Comma L' R'

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
{A' : Type u_1}
{B' : Type u_2}
{T' : Type u_3}
[CategoryTheory.Category.{u_4, u_1} A']
[CategoryTheory.Category.{u_5, u_2} B']
[CategoryTheory.Category.{u_6, u_3} T']
{L : CategoryTheory.Functor A T}
{R : CategoryTheory.Functor B T}
{L' : CategoryTheory.Functor A' T'}
{R' : CategoryTheory.Functor B' T'}
{F₁ : CategoryTheory.Functor A A'}
{F₂ : CategoryTheory.Functor B B'}
{F : CategoryTheory.Functor T T'}
(α : F₁.comp L' ⟶ L.comp F)
(β : R.comp F ⟶ F₂.comp R')
{X Y : CategoryTheory.Comma L R}
(φ : X ⟶ Y)

((CategoryTheory.Comma.map α β).map φ).right = F₂.map φ.right


@[reassoc]
theorem gluedLiftPullbackMap_snd (i j : 𝒰.J) :
    gluedLiftPullbackMap 𝒰 f g s i j ≫ pullback.snd _ _ = pullback.snd _ _ ≫ pullback.snd _ _

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

(s : CategoryTheory.Limits.PullbackCone f g)

AlgebraicGeometry.Scheme.Pullback.gluedLiftPullbackMap 𝒰 f g s i j ≫
    CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map j) =
  CategoryTheory.Limits.pullback.snd ((𝒰.pullbackCover s.fst).map i) ((𝒰.pullbackCover s.fst).map j) ≫
    CategoryTheory.Limits.pullback.snd s.fst (𝒰.map j)


@[simp] theorem take_cons_succ : (a::as).take (i+1) = a :: as.take i

∀ {α : Type u_1} {a : α} {as : List α} {i : Nat}, List.take (i + 1) (a :: as) = a :: List.take i as


@[simp]
theorem smul_zero (a : M) : a • (0 : A) = 0

{M : Type u_1}
{A : Type u_4}
[Zero A]
[SMulZeroClass M A]
(a : M)


lemma LSeries.term_add (f g : ℕ → ℂ) (s : ℂ) : term (f + g) s = term f s + term g s

LSeries.term (f + g) s = LSeries.term f s + LSeries.term g s


theorem getD_append_right (l l' : List α) (d : α) (n : ℕ) (h : l.length ≤ n) :
    (l ++ l').getD n d = l'.getD (n - l.length) d

{α : Type u}
(l l' : List α)
(d : α)
(n : ℕ)
(h : l.length ≤ n)


theorem open_target (he : e ∈ c.atlas) : IsOpen e.target

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
(c : ChartedSpaceCore H M)
{e : PartialEquiv M H}
(he : e ∈ c.atlas)


@[simp]
theorem coe_conj (z : 𝔻) : (z.conj : ℂ) = conj' ↑z


@[simp]
theorem dickson_zero : dickson k a 0 = 3 - k

{R : Type u_1}
[CommRing R]
(k : ℕ)
(a : R)


/-- Auxiliary definition for `bifunctorComp₁₂`. -/
@[simps]
def bifunctorComp₁₂Obj (X₁ : C₁) : C₂ ⥤ C₃ ⥤ C₄

(F₁₂ : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂ C₁₂))

(G : CategoryTheory.Functor C₁₂ (CategoryTheory.Functor C₃ C₄))

((CategoryTheory.bifunctorComp₁₂Obj F₁₂ G X₁).map φ).app X₃ = (G.map ((F₁₂.obj X₁).map φ)).app X₃


theorem imp_or' {a : Sort*} {b c : Prop} : a → b ∨ c ↔ (a → b) ∨ (a → c)


/-- Construct an equivalence of rings from homomorphisms in both directions, which are inverses.
-/
@[simps]
def ofHomInv' {R S F G : Type*} [NonUnitalNonAssocSemiring R] [NonUnitalNonAssocSemiring S]
    [FunLike F R S] [FunLike G S R]
    [NonUnitalRingHomClass F R S] [NonUnitalRingHomClass G S R] (hom : F) (inv : G)
    (hom_inv_id : (inv : S →ₙ+* R).comp (hom : R →ₙ+* S) = NonUnitalRingHom.id R)
    (inv_hom_id : (hom : R →ₙ+* S).comp (inv : S →ₙ+* R) = NonUnitalRingHom.id S) :
    R ≃+* S

(hom_inv_id : (↑inv).comp ↑hom = NonUnitalRingHom.id R)

(inv_hom_id : (↑hom).comp ↑inv = NonUnitalRingHom.id S)

(RingEquiv.ofHomInv' hom inv hom_inv_id inv_hom_id) a = hom a


@[simp]
theorem isOrtho_smul_right {x y : M₄} {a : R₄} (ha : a ≠ 0) :
    IsOrtho G x (a • y) ↔ IsOrtho G x y

{R₄ : Type u_7}
{M₄ : Type u_8}
[CommRing R₄]
[IsDomain R₄]
[AddCommGroup M₄]
[Module R₄ M₄]
{G : LinearMap.BilinForm R₄ M₄}
{x y : M₄}
{a : R₄}
(ha : a ≠ 0)


@[simp]
theorem compl_sup_eq_top : xᶜ ⊔ x = ⊤


/-- `x^n`, `n : ℕ` is strictly convex on `[0, +∞)` for all `n` greater than `2`. -/
theorem strictConvexOn_pow {n : ℕ} (hn : 2 ≤ n) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ n

StrictConvexOn ℝ (Set.Ici 0) fun x => x ^ n


@[to_additive (attr := simp)]
theorem card_inv (s : Finset α) : s⁻¹.card = s.card

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


/-- If a set has the unique differentiability property at a point x, then the image of this set
under a map with onto derivative has also the unique differentiability property at the image point.
-/
theorem HasFDerivWithinAt.uniqueDiffWithinAt {x : E} (h : HasFDerivWithinAt f f' s x)
    (hs : UniqueDiffWithinAt 𝕜 s x) (h' : DenseRange f') : UniqueDiffWithinAt 𝕜 (f '' s) (f x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{s : Set E}
{f' : E →L[𝕜] F}
{x : E}
(h : HasFDerivWithinAt f f' s x)
(hs : UniqueDiffWithinAt 𝕜 s x)
(h' : DenseRange ⇑f')


theorem _root_.Antitone.iInter_nat_add {f : ℕ → Set α} (hf : Antitone f) (k : ℕ) :
    ⋂ n, f (n + k) = ⋂ n, f n

{α : Type u_1}
{f : ℕ → Set α}
(hf : Antitone f)
(k : ℕ)


theorem imp_eq_of_eq_false_right {a b : Prop} (h : b = False) : (a → b) = Not a


/-- The complement to a compact set belongs to a filter `f` if it belongs to each filter
`𝓝 x ⊓ f`, `x ∈ s`. -/
theorem IsCompact.compl_mem_sets (hs : IsCompact s) {f : Filter X} (hf : ∀ x ∈ s, sᶜ ∈ 𝓝 x ⊓ f) :
    sᶜ ∈ f

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : IsCompact s)
{f : Filter X}
(hf : ∀ x ∈ s, sᶜ ∈ 𝓝 x ⊓ f)


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

(CategoryTheory.ShortComplex.HomologyData.ofEpiOfIsIsoOfMono' φ h).right =
  CategoryTheory.ShortComplex.RightHomologyData.ofEpiOfIsIsoOfMono' φ h.right


theorem coeFn_pow (f : α →ₘ[μ] γ) (n : ℕ) : ⇑(f ^ n) =ᵐ[μ] (⇑f) ^ n

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[Monoid γ]
[ContinuousMul γ]
(f : α →ₘ[μ] γ)
(n : ℕ)


theorem mem_ordConnectedComponent_comm :
    y ∈ ordConnectedComponent s x ↔ x ∈ ordConnectedComponent s y

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

y ∈ s.ordConnectedComponent x ↔ x ∈ s.ordConnectedComponent y


@[to_additive]
theorem prod_divisorsAntidiagonal {M : Type*} [CommMonoid M] (f : ℕ → ℕ → M) {n : ℕ} :
    ∏ i ∈ n.divisorsAntidiagonal, f i.1 i.2 = ∏ i ∈ n.divisors, f i (n / i)

{M : Type u_1}
[AddCommMonoid M]
(f : ℕ → ℕ → M)
{n : ℕ}

∑ i ∈ n.divisorsAntidiagonal, f i.1 i.2 = ∑ i ∈ n.divisors, f i (n / i)


theorem neg_zero {R} [Ring R] : -(0 : R) = 0


@[to_additive (attr := simp)]
lemma injective_pow_iff_not_isOfFinOrder : Injective (fun n : ℕ ↦ x ^ n) ↔ ¬IsOfFinOrder x

{G : Type u_1}
[AddLeftCancelMonoid G]
{x : G}

(Function.Injective fun n => n • x) ↔ ¬IsOfFinAddOrder x


/-- **Minkowski inequality**: the `L_p` seminorm of the infinite sum of two vectors is less than or
equal to the infinite sum of the `L_p`-seminorms of the summands, if these infinite sums both
exist. A version for `NNReal`-valued functions. For an alternative version, convenient if the
infinite sums are not already expressed as `p`-th powers, see `Lp_add_le_tsum_of_nonneg`.  -/
theorem Lp_add_le_hasSum {f g : ι → ℝ≥0} {A B : ℝ≥0} {p : ℝ} (hp : 1 ≤ p)
    (hf : HasSum (fun i => f i ^ p) (A ^ p)) (hg : HasSum (fun i => g i ^ p) (B ^ p)) :
    ∃ C, C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p)

∃ C ≤ A + B, HasSum (fun i => (f i + g i) ^ p) (C ^ p)


@[simp] theorem getElem?_replicate_of_lt {n : Nat} {m : Nat} (h : m < n) : (replicate n a)[m]? = some a

∀ {α : Type u_1} {a : α} {n m : Nat}, m < n → (List.replicate n a)[m]? = some a


theorem leibniz_inv (a : K) : D a⁻¹ = -a⁻¹ ^ 2 • D a

{R : Type u_1}
[CommRing R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{K : Type u_4}
[Field K]
[Module K M]
[Algebra R K]
(D : Derivation R K M)
(a : K)


@[simp]
theorem bit_false : bit false = (2 * ·)


theorem Ico_filter_lt_of_right_le [DecidablePred (· < c)] (hbc : b ≤ c) :
    (Ico a b).filter (· < c) = Ico a b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a b c : α}
[DecidablePred fun x => x < c]
(hbc : b ≤ c)

Finset.filter (fun x => x < c) (Finset.Ico a b) = Finset.Ico a b


lemma map_truncatedSup (e : α ≃o β) (s : Finset α) (a : α) :
    e (truncatedSup s a) = truncatedSup (s.map e.toEquiv.toEmbedding) (e a)

{α : Type u_1}
{β : Type u_2}
[SemilatticeSup α]
[OrderTop α]
[DecidableRel fun x x_1 => x ≤ x_1]
[SemilatticeSup β]
[BoundedOrder β]
[DecidableRel fun x x_1 => x ≤ x_1]
(e : α ≃o β)
(s : Finset α)
(a : α)

e (s.truncatedSup a) = (Finset.map e.toEmbedding s).truncatedSup (e a)


@[simp]
theorem zero_smul' [Zero R] [SMulWithZero R V] {x : HahnModule Γ' R V} :
    (0 : HahnSeries Γ R) • x = 0

{Γ : Type u_1}
{Γ' : Type u_2}
{R : Type u_3}
{V : Type u_4}
[PartialOrder Γ]
[PartialOrder Γ']
[VAdd Γ Γ']
[IsOrderedCancelVAdd Γ Γ']
[AddCommMonoid V]
[Zero R]
[SMulWithZero R V]
{x : HahnModule Γ' R V}


lemma mem_dual {x} :
    x ∈ dual A K I ↔ ∀ a ∈ I, traceForm K L x a ∈ (algebraMap A K).range

{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)
{x : L}

x ∈ FractionalIdeal.dual A K I ↔ ∀ a ∈ I, ((Algebra.traceForm K L) x) a ∈ (algebraMap A K).range


@[simp] theorem Bool.not_not (b : Bool) : (!!b) = b


@[to_additive (attr := simp) prod_bot_sup_bot_prod]
theorem prod_bot_sup_bot_prod (s : Submonoid M) (t : Submonoid N) :
    (prod s ⊥) ⊔ (prod ⊥ t) = prod s t

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(s : Submonoid M)
(t : Submonoid N)


@[simp]
theorem ofNat_lt_top (x : ℕ) [x.AtLeastTwo] : (no_index (OfNat.ofNat x : PartENat)) < ⊤


@[simp]
theorem mem_iInf_iff {f : ι → UpperSet α} : (a ∈ ⨅ i, f i) ↔ ∃ i, a ∈ f i

{α : Type u_1}
{ι : Sort u_4}
[LE α]
{a : α}
{f : ι → UpperSet α}


theorem symm_trans (F : HomotopyRel f₀ f₁ S) (G : HomotopyRel f₁ f₂ S) :
    (F.trans G).symm = G.symm.trans F.symm

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ f₂ : C(X, Y)}
{S : Set X}
(F : f₀.HomotopyRel f₁ S)
(G : f₁.HomotopyRel f₂ S)


theorem stream_eq_none_of_fr_eq_zero {ifp_n : IntFractPair K}
    (stream_nth_eq : IntFractPair.stream v n = some ifp_n) (nth_fr_eq_zero : ifp_n.fr = 0) :
    IntFractPair.stream v (n + 1) = none

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

GenContFract.IntFractPair.stream v (n + 1) = none


@[to_additive]
theorem nnnorm_div_le (a b : E) : ‖a / b‖₊ ≤ ‖a‖₊ + ‖b‖₊

{E : Type u_6}
[SeminormedGroup E]
(a b : E)

‖a / b‖₊ ≤ ‖a‖₊ + ‖b‖₊


/-- The two paths coercion can take to an `AddMonoidHom` are equivalent -/
theorem toAddMonoidHom_commutes : e.toLinearMap.toAddMonoidHom = e.toAddEquiv.toAddMonoidHom

{R : Type u_1}
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_S_M₂ : Module S M₂}
{σ : R →+* S}
{σ' : S →+* R}
{re₁ : RingHomInvPair σ σ'}
{re₂ : RingHomInvPair σ' σ}
(e : M ≃ₛₗ[σ] M₂)


theorem Indep.basis_of_forall_insert (hI : M.Indep I) (hIX : I ⊆ X)
    (he : ∀ e ∈ X \ I, M.Dep (insert e I)) : M.Basis I X

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hI : M.Indep I)
(hIX : I ⊆ X)
(he : ∀ e ∈ X \ I, M.Dep (insert e I))


theorem toTopologicalSpace_iInf {ι : Sort*} {u : ι → UniformSpace α} :
    (iInf u).toTopologicalSpace = ⨅ i, (u i).toTopologicalSpace

{α : Type ua}
{ι : Sort u_2}
{u : ι → UniformSpace α}

UniformSpace.toTopologicalSpace = ⨅ i, UniformSpace.toTopologicalSpace


theorem one_def : (1 : E ≃ₗᵢ[R] E) = refl _ _

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]


protected theorem IsBoundedBilinearMap.fderivWithin (h : IsBoundedBilinearMap 𝕜 b) (p : E × F)
    (hxs : UniqueDiffWithinAt 𝕜 u p) : fderivWithin 𝕜 b u 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}
{u : Set (E × F)}
(h : IsBoundedBilinearMap 𝕜 b)
(p : E × F)
(hxs : UniqueDiffWithinAt 𝕜 u p)


/-- Replace `rIn` with another value in the interval `(0, f.rOut)`. -/
@[simps rOut rIn]
def updateRIn (r : ℝ) (hr : r ∈ Ioo 0 f.rOut) : SmoothBumpFunction I c

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(f : SmoothBumpFunction I c)
(r : ℝ)
(hr : r ∈ Set.Ioo 0 f.rOut)


theorem coeff_hermite_succ_succ (n k : ℕ) : coeff (hermite (n + 1)) (k + 1) =
    coeff (hermite n) k - (k + 2) * coeff (hermite n) (k + 2)

(Polynomial.hermite (n + 1)).coeff (k + 1) =
  (Polynomial.hermite n).coeff k - (↑k + 2) * (Polynomial.hermite n).coeff (k + 2)


@[simp] theorem sup_mk [SemilatticeSup α] (a b : α) : s(a, b).sup = a ⊔ b

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


@[simp]
theorem basisDivisor_eq_zero_iff : basisDivisor x y = 0 ↔ x = y


@[simp]
theorem intCast_def (n : ℤ) : (n : ∀ i, π i) = fun _ => ↑n

{ι : Type u_2}
{π : ι → Type u_5}
[(i : ι) → IntCast (π i)]
(n : ℤ)


@[simp]
theorem int_sub_iff : LiouvilleWith p (m - x) ↔ LiouvilleWith p x

LiouvilleWith p (↑m - x) ↔ LiouvilleWith p x


@[simp]
protected theorem isWF [Preorder α] (s : Finset α) : Set.IsWF (↑s : Set α)

{α : Type u_2}
[Preorder α]
(s : Finset α)


theorem eq_of_xn_modEq_lem2 {n} (h : 2 * xn a1 n = xn a1 (n + 1)) : a = 2 ∧ n = 0

(h : 2 * Pell.xn a1 n = Pell.xn a1 (n + 1))


theorem card_eq_one_iff_unique : Nat.card α = 1 ↔ Subsingleton α ∧ Nonempty α


/-- Casting a `HomotopyWith f₀ f₁ P` to a `HomotopyWith g₀ g₁ P` where `f₀ = g₀` and `f₁ = g₁`.
-/
@[simps!]
def cast {f₀ f₁ g₀ g₁ : C(X, Y)} (F : HomotopyWith f₀ f₁ P) (h₀ : f₀ = g₀) (h₁ : f₁ = g₁) :
    HomotopyWith g₀ g₁ P

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{P : C(X, Y) → Prop}
{f₀ f₁ g₀ g₁ : C(X, Y)}
(F : f₀.HomotopyWith f₁ P)
(h₀ : f₀ = g₀)
(h₁ : f₁ = g₁)
(a : ↑I × X)


lemma div_div_cancel_left' (ha : a ≠ 0) : a / b / a = b⁻¹

{G₀ : Type u_3}
[CommGroupWithZero G₀]
{a b : G₀}
(ha : a ≠ 0)


@[simp]
theorem gcd_to_nat : ∀ a b, (gcd a b : ℕ) = Nat.gcd a b


theorem convex_halfspace_ge {f : E → β} (h : IsLinearMap 𝕜 f) (r : β) : Convex 𝕜 { w | r ≤ f w }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[OrderedAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{f : E → β}
(h : IsLinearMap 𝕜 f)
(r : β)


@[simp]
theorem sinh_neg : sinh (-x) = -sinh x


@[simp]
theorem rightUnitor_hom_hom (X : Mon_ C) : (ρ_ X).hom.hom = (ρ_ X.X).hom

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


@[reassoc]
lemma IsComplex.zero' (hS : S.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S.map' i j ≫ S.map' j k = 0

{S : CategoryTheory.ComposableArrows C n}

CategoryTheory.CategoryStruct.comp (S.map' i j ⋯ ⋯) (S.map' j k ⋯ hk) = 0


@[elab_as_elim]
protected theorem InClosure.recOn {C : R → Prop} {x : R} (hx : x ∈ closure s) (h1 : C 1)
    (hneg1 : C (-1)) (hs : ∀ z ∈ s, ∀ n, C n → C (z * n)) (ha : ∀ {x y}, C x → C y → C (x + y)) :
    C x

(hs : ∀ z ∈ s, ∀ (n : R), C n → C (z * n))

(ha : ∀ {x y : R}, C x → C y → C (x + y))


theorem coe_pow (f : M →ₗ[R] M) (n : ℕ) : ⇑(f ^ n) = f^[n]

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(f : M →ₗ[R] M)
(n : ℕ)


@[to_additive (attr := mono, gcongr) nsmul_lt_nsmul_right]
lemma pow_lt_pow_left' (hn : n ≠ 0) {a b : M} (hab : a < b) : a ^ n < b ^ n

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

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


@[simp]
theorem comap_comp {E : Type*} [Groupoid E] (ψ : D ⥤ E) : comap (φ ⋙ ψ) = comap φ ∘ comap ψ

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
{E : Type u_2}
[CategoryTheory.Groupoid E]
(ψ : CategoryTheory.Functor D E)

CategoryTheory.Subgroupoid.comap (φ.comp ψ) = CategoryTheory.Subgroupoid.comap φ ∘ CategoryTheory.Subgroupoid.comap ψ


theorem IsTensorProduct.inductionOn (h : IsTensorProduct f) {C : M → Prop} (m : M) (h0 : C 0)
    (htmul : ∀ x y, C (f x y)) (hadd : ∀ x y, C x → C y → C (x + y)) : C m

(htmul : ∀ (x : M₁) (y : M₂), C ((f x) y))

(hadd : ∀ (x y : M), C x → C y → C (x + y))


@[simp]
theorem coe_toHomeomorph (h : M ≃ₘ^n⟮I, J⟯ N) : ⇑h.toHomeomorph = h

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{G : Type u_7}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_11}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, J⟯ N)


/-- The equivalence between `CompleteLat` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : CompleteLat ≌ CompleteLat


theorem DirectSum.coeLinearMap_eq_finsum [DecidableEq M]
    (x : DirectSum M fun i : M => ↥(weightedHomogeneousSubmodule R w i)) :
    (DirectSum.coeLinearMap fun i : M => weightedHomogeneousSubmodule R w i) x =
      finsum fun m => x m

(x : DirectSum M fun i => ↥(MvPolynomial.weightedHomogeneousSubmodule R w i))

(DirectSum.coeLinearMap fun i => MvPolynomial.weightedHomogeneousSubmodule R w i) x = ∑ᶠ (m : M), ↑(x m)


/-- The equivalence between `PartOrd` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : PartOrd ≌ PartOrd


@[simp]
theorem sub_apply [∀ i j, Sub (α i j)] (M N : DMatrix m n α) (i j) : (M - N) i j = M i j - N i j

{m : Type u_2}
{n : Type u_3}
{α : m → n → Type v}
[(i : m) → (j : n) → Sub (α i j)]
(M N : DMatrix m n α)
(i : m)
(j : n)


protected theorem le_ediv_of_mul_le {a b c : Int} (H1 : 0 < c) (H2 : a * c ≤ b) : a ≤ b / c


theorem sInf_pair {a b : α} : sInf {a, b} = a ⊓ b

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


theorem set_biUnion_singleton (a : α) (s : α → Set β) : ⋃ x ∈ ({a} : Finset α), s x = s a

{α : Type u_2}
{β : Type u_3}
(a : α)
(s : α → Set β)


@[simp] theorem decide_iff_dist (p q : Prop) [dpq : Decidable (p ↔ q)] [dp : Decidable p] [dq : Decidable q] :
    decide (p ↔ q) = (decide p == decide q)


theorem isRadical_bot_of_noZeroDivisors {R} [CommSemiring R] [NoZeroDivisors R] :
    (⊥ : Ideal R).IsRadical

{R : Type u_2}
[CommSemiring R]
[NoZeroDivisors R]


@[simp]
theorem funCongrLeft_id : funCongrLeft R M (Equiv.refl n) = LinearEquiv.refl R (n → M)

(R : Type u_1)
(M : Type u_8)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{n : Type u_18}

LinearEquiv.funCongrLeft R M (Equiv.refl n) = LinearEquiv.refl R (n → M)


@[elab_as_elim]
theorem inductionOn₂ (f : Germ l β) (g : Germ l γ) {p : Germ l β → Germ l γ → Prop}
    (h : ∀ (f : α → β) (g : α → γ), p f g) : p f g

(h : ∀ (f : α → β) (g : α → γ), p ↑f ↑g)


theorem coe_nonneg [LE β] [Zero β] {f : α → β} : 0 ≤ (f : Germ l β) ↔ ∀ᶠ x in l, 0 ≤ f x

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[LE β]
[Zero β]
{f : α → β}


/-- `sinh` is bijective, both injective and surjective. -/
theorem sinh_bijective : Bijective sinh


@[simp] nonrec theorem sub_self_re : a - ↑a.re = a.im


theorem eLpNorm_indicator_eq_restrict {f : α → E} {s : Set α} (hs : MeasurableSet s) :
    eLpNorm (s.indicator f) p μ = eLpNorm f p (μ.restrict s)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{f : α → E}
{s : Set α}
(hs : MeasurableSet s)

MeasureTheory.eLpNorm (s.indicator f) p μ = MeasureTheory.eLpNorm f p (μ.restrict s)


lemma ΨSq_ne_zero [NoZeroDivisors R] {n : ℤ} (h : (n : R) ≠ 0) : W.ΨSq n ≠ 0

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
[NoZeroDivisors R]
{n : ℤ}
(h : ↑n ≠ 0)


theorem OrthogonalFamily.inner_sum (l₁ l₂ : ∀ i, G i) (s : Finset ι) :
    ⟪∑ i ∈ s, V i (l₁ i), ∑ j ∈ s, V j (l₂ j)⟫ = ∑ i ∈ s, ⟪l₁ i, l₂ i⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
{G : ι → Type u_5}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(hV : OrthogonalFamily 𝕜 G V)
(l₁ l₂ : (i : ι) → G i)
(s : Finset ι)

⟪∑ i ∈ s, (V i) (l₁ i), ∑ j ∈ s, (V j) (l₂ j)⟫_𝕜 = ∑ i ∈ s, ⟪l₁ i, l₂ i⟫_𝕜


theorem map_id : ∀ s : Seq1 α, map id s = s


@[simp]
theorem Ico_insert_right (h : a ≤ b) : insert b (Ico a b) = Icc a b

{α : Type u_1}
[PartialOrder α]
{a b : α}
(h : a ≤ b)


theorem trim_eq_trim_iff {m₁ m₂ : OuterMeasure α} :
    m₁.trim = m₂.trim ↔ ∀ s, MeasurableSet s → m₁ s = m₂ s

{α : Type u_1}
[MeasurableSpace α]
{m₁ m₂ : MeasureTheory.OuterMeasure α}

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


theorem DifferentiableAt.rpow (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x)
    (h : f x ≠ 0) : DifferentiableAt ℝ (fun x => f x ^ g x) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : E → ℝ}
{x : E}
(hf : DifferentiableAt ℝ f x)
(hg : DifferentiableAt ℝ g x)
(h : f x ≠ 0)


theorem tendsto_nhds_iff {α : Type*} {l : Filter α} {f : α → Z} {z : Z} (hz : z ∈ e.source) :
    Tendsto f l (𝓝 z) ↔
      Tendsto (proj ∘ f) l (𝓝 (proj z)) ∧ Tendsto (fun x ↦ (e (f x)).2) l (𝓝 (e z).2)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{α : Type u_6}
{l : Filter α}
{f : α → Z}
{z : Z}
(hz : z ∈ e.source)

Filter.Tendsto f l (𝓝 z) ↔
  Filter.Tendsto (proj ∘ f) l (𝓝 (proj z)) ∧ Filter.Tendsto (fun x => (↑e (f x)).2) l (𝓝 (↑e z).2)


theorem zeroLocus_sup_ideal (I J : Ideal A) :
    zeroLocus 𝒜 ((I ⊔ J : Ideal A) : Set A) = zeroLocus _ I ∩ zeroLocus _ J

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(I J : Ideal A)

ProjectiveSpectrum.zeroLocus 𝒜 ↑(I ⊔ J) = ProjectiveSpectrum.zeroLocus 𝒜 ↑I ∩ ProjectiveSpectrum.zeroLocus 𝒜 ↑J


lemma self_mul_conjTranspose_mul_eq_zero (A : Matrix m n R) (B : Matrix m p R) :
    (A * Aᴴ) * B = 0 ↔ Aᴴ * B = 0

{m : Type u_1}
{n : Type u_2}
{p : Type u_3}
{R : Type u_4}
[Fintype m]
[Fintype n]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
(A : Matrix m n R)
(B : Matrix m p R)

A * A.conjTranspose * B = 0 ↔ A.conjTranspose * B = 0


@[simp]
theorem Icc_erase_right (a b : α) : (Icc a b).erase b = Ico a b

{α : Type u_2}
[PartialOrder α]
[LocallyFiniteOrder α]
[DecidableEq α]
(a b : α)

(Finset.Icc a b).erase b = Finset.Ico a b


@[to_additive (attr := simp) const_neg']
theorem const_lt_one : const β a < 1 ↔ a < 1

{α : Type u_3}
{β : Type u_4}
[One α]
[Preorder α]
{a : α}
[Nonempty β]


theorem mk_preimage_tprod :
    ∀ (l : List ι) (t : ∀ i, Set (α i)), TProd.mk l ⁻¹' Set.tprod l t = { i | i ∈ l }.pi t

{ι : Type u}
{α : ι → Type v}
(l : List ι)
(t : (i : ι) → Set (α i))

List.TProd.mk l ⁻¹' Set.tprod l t = {i | i ∈ l}.pi t


theorem divisors_injective : Function.Injective divisors


@[simp]
theorem coe_copy (S : NonUnitalSubring R) (s : Set R) (hs : s = ↑S) : (S.copy s hs : Set R) = s

{R : Type u}
[NonUnitalNonAssocRing R]
(S : NonUnitalSubring R)
(s : Set R)
(hs : s = ↑S)


theorem lim_mul_lim (f g : CauSeq β abv) : lim f * lim g = lim (f * g)

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


@[simp]
lemma mapHomologicalComplex_commShiftIso_hom_app_f (K : CochainComplex C ℤ) (n i : ℤ) :
    (((F.mapHomologicalComplex (ComplexShape.up ℤ)).commShiftIso n).hom.app K).f i = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
[CategoryTheory.Preadditive D]
(F : C ⥤ D)
[F.Additive]
(K : CochainComplex C ℤ)
(n i : ℤ)

(((F.mapHomologicalComplex (ComplexShape.up ℤ)).commShiftIso n).hom.app K).f i =
  𝟙
    (((CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) n ⋙
              F.mapHomologicalComplex (ComplexShape.up ℤ)).obj
          K).X
      i)


theorem IccExtend_of_mem (f : Icc a b → β) (hx : x ∈ Icc a b) : IccExtend h f x = f ⟨x, hx⟩

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a b : α}
(h : a ≤ b)
{x : α}
(f : ↑(Set.Icc a b) → β)
(hx : x ∈ Set.Icc a b)


protected theorem mul_lt_mul_of_pos_left {n m k : Nat} (h : n < m) (hk : k > 0) : k * n < k * m


@[to_additive sum_eq_card_nsmul]
theorem prod_eq_pow_card (l : List M) (m : M) (h : ∀ x ∈ l, x = m) : l.prod = m ^ l.length

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


@[simp]
theorem homIso_hom (h : IsColimit t) {W : C} (f : ULift (t.pt ⟶ W)) :
    (IsColimit.homIso h W).hom f = (t.extend f.down).ι

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{t : CategoryTheory.Limits.Cocone F}
(h : CategoryTheory.Limits.IsColimit t)
{W : C}
(f : ULift.{u₁, v₃} (t.pt ⟶ W))

(h.homIso W).hom f = (t.extend f.down).ι


theorem totalDegree_le_of_support_subset (h : p.support ⊆ q.support) :
    totalDegree p ≤ totalDegree q

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{p q : MvPolynomial σ R}
(h : p.support ⊆ q.support)


@[simp]
theorem Equivalence.toOrderIso_apply (e : X ≌ Y) (x : X) : e.toOrderIso x = e.functor.obj x

{X : Type u}
{Y : Type v}
[PartialOrder X]
[PartialOrder Y]
(e : X ≌ Y)
(x : X)


@[simp]
theorem mk_add_moveRight_inr {xl xr yl yr} {xL xR yL yR} {i} :
    (mk xl xr xL xR + mk yl yr yL yR).moveRight (Sum.inr i) =
      mk xl xr xL xR + (mk yl yr yL yR).moveRight i

{xl xr yl yr : Type u_1}
{xL : xl → SetTheory.PGame}
{xR : xr → SetTheory.PGame}
{yL : yl → SetTheory.PGame}
{yR : yr → SetTheory.PGame}
{i : yr}

(SetTheory.PGame.mk xl xr xL xR + SetTheory.PGame.mk yl yr yL yR).moveRight (Sum.inr i) =
  SetTheory.PGame.mk xl xr xL xR + (SetTheory.PGame.mk yl yr yL yR).moveRight i


@[simp] lemma compl_truncatedInf (s : Finset α) (a : α) :
    (truncatedInf s a)ᶜ = truncatedSup sᶜˢ aᶜ

{α : Type u_1}
[BooleanAlgebra α]
[DecidableRel fun x x_1 => x ≤ x_1]
(s : Finset α)
(a : α)

(s.truncatedInf a)ᶜ = sᶜˢ.truncatedSup aᶜ


theorem toSemiring_injective :
    Function.Injective (@toSemiring R)


@[simp]
theorem coe_coePNatMonoidHom : (coePNatMonoidHom : PrimeMultiset → Multiset ℕ+) = Coe.coe


@[simp, norm_cast]
theorem coe_bot : ((⊥ : WithBot (Box ι)) : Set (ι → ℝ)) = ∅


@[simp]
theorem eLpNormEssSup_measure_zero {f : α → F} : eLpNormEssSup f (0 : Measure α) = 0

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[MeasurableSpace α]
{f : α → F}


theorem smul_left {R : Type*} [Semiring R] [DistribMulAction R M] [ContinuousConstSMul R M] (r : R)
    (h : v ⟂ᵥ w) : r • v ⟂ᵥ w

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[TopologicalSpace M]
[AddCommMonoid N]
[TopologicalSpace N]
{v : MeasureTheory.VectorMeasure α M}
{w : MeasureTheory.VectorMeasure α N}
{R : Type u_6}
[Semiring R]
[DistribMulAction R M]
[ContinuousConstSMul R M]
(r : R)
(h : v ⟂ᵥ w)


@[simp] theorem derivative_inv' {R} [Field R] (f : R⟦X⟧) : d⁄dX R f⁻¹ = -f⁻¹ ^ 2 * d⁄dX R f

{R : Type u_1}
[Field R]
(f : PowerSeries R)

(PowerSeries.derivative R) f⁻¹ = -f⁻¹ ^ 2 * (PowerSeries.derivative R) f


@[simp] theorem all_none : Option.all p none = true

∀ {α : Type u_1} {p : α → Bool}, Option.all p none = true


theorem nhds_basis_Ioo_pos [NoMaxOrder α] (a : α) :
    (𝓝 a).HasBasis (fun ε : α => (0 : α) < ε) fun ε => Ioo (a - ε) (a + ε)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrderedAddCommGroup α]
[OrderTopology α]
[NoMaxOrder α]
(a : α)

(𝓝 a).HasBasis (fun ε => 0 < ε) fun ε => Set.Ioo (a - ε) (a + ε)


@[simp]
theorem coe_refl : ⇑(refl : A ≃⋆+* A) = id


/-- A `Group` is a `Monoid` with an operation `⁻¹` satisfying `a⁻¹ * a = 1`.

There is also a division operation `/` such that `a / b = a * b⁻¹`,
with a default so that `a / b = a * b⁻¹` holds by definition.

Use `Group.ofLeftAxioms` or `Group.ofRightAxioms` to define a group structure
on a type with the minumum proof obligations.
-/
class Group (G : Type u) extends DivInvMonoid G where
  protected mul_left_inv : ∀ a : G, a⁻¹ * a = 1


theorem lift_binop_eq (f : ℚ → ℚ → ℚ) (f₁ : ℤ → ℤ → ℤ → ℤ → ℤ) (f₂ : ℤ → ℤ → ℤ → ℤ → ℤ)
    (fv :
      ∀ {n₁ d₁ h₁ c₁ n₂ d₂ h₂ c₂},
        f ⟨n₁, d₁, h₁, c₁⟩ ⟨n₂, d₂, h₂, c₂⟩ = f₁ n₁ d₁ n₂ d₂ /. f₂ n₁ d₁ n₂ d₂)
    (f0 : ∀ {n₁ d₁ n₂ d₂}, d₁ ≠ 0 → d₂ ≠ 0 → f₂ n₁ d₁ n₂ d₂ ≠ 0) (a b c d : ℤ)
    (b0 : b ≠ 0) (d0 : d ≠ 0)
    (H :
      ∀ {n₁ d₁ n₂ d₂}, a * d₁ = n₁ * b → c * d₂ = n₂ * d →
        f₁ n₁ d₁ n₂ d₂ * f₂ a b c d = f₁ a b c d * f₂ n₁ d₁ n₂ d₂) :
    f (a /. b) (c /. d) = f₁ a b c d /. f₂ a b c d

(f : ℚ → ℚ → ℚ)

(f₁ f₂ : ℤ → ℤ → ℤ → ℤ → ℤ)

(fv :
  ∀ {n₁ : ℤ} {d₁ : ℕ} {h₁ : d₁ ≠ 0} {c₁ : n₁.natAbs.Coprime d₁} {n₂ : ℤ} {d₂ : ℕ} {h₂ : d₂ ≠ 0}
    {c₂ : n₂.natAbs.Coprime d₂},
    f { num := n₁, den := d₁, den_nz := h₁, reduced := c₁ } { num := n₂, den := d₂, den_nz := h₂, reduced := c₂ } =
      Rat.divInt (f₁ n₁ (↑d₁) n₂ ↑d₂) (f₂ n₁ (↑d₁) n₂ ↑d₂))

(f0 : ∀ {n₁ d₁ n₂ d₂ : ℤ}, d₁ ≠ 0 → d₂ ≠ 0 → f₂ n₁ d₁ n₂ d₂ ≠ 0)

(H : ∀ {n₁ d₁ n₂ d₂ : ℤ}, a * d₁ = n₁ * b → c * d₂ = n₂ * d → f₁ n₁ d₁ n₂ d₂ * f₂ a b c d = f₁ a b c d * f₂ n₁ d₁ n₂ d₂)

f (Rat.divInt a b) (Rat.divInt c d) = Rat.divInt (f₁ a b c d) (f₂ a b c d)


theorem le_iterate_pos_iff {x : ℝ} {m : ℤ} {n : ℕ} (hn : 0 < n) :
    x + n * m ≤ f^[n] x ↔ x + m ≤ f x

(f : CircleDeg1Lift)
{x : ℝ}
{m : ℤ}
{n : ℕ}
(hn : 0 < n)


theorem IsCoprime.of_add_mul_left_left (h : IsCoprime (x + y * z) y) : IsCoprime x y

{R : Type u}
[CommSemiring R]
{x y z : R}
(h : IsCoprime (x + y * z) y)


/--
Data showing that the Levenshtein distance from `xs` to `ys`
is bounded below by the minimum Levenshtein distance between some suffix of `xs`
and a particular suffix of `ys`.

This bound is (non-strict) monotone as we take longer suffixes of `ys`.

This is an auxiliary definition for the later `LevenshteinEstimator`:
this variant constructs a lower bound for the pair consisting of
the Levenshtein distance from `xs` to `ys`,
along with the length of `ys`.
-/
structure LevenshteinEstimator' : Type where
  /-- The prefix of `ys` that is not is not involved in the bound, in reverse order. -/
  pre_rev : List β
  /-- The suffix of `ys`, such that the distance from `xs` to `ys` is bounded below
  by the minimum distance from any suffix of `xs` to this suffix. -/
  suff : List β
  /-- Witness that `ys` has been decomposed into a prefix and suffix. -/
  split : pre_rev.reverse ++ suff = ys
  /-- The distances from each suffix of `xs` to `suff`. -/
  distances : {r : List δ // 0 < r.length}
  /-- Witness that `distances` are correct. -/
  distances_eq : distances = suffixLevenshtein C xs suff
  /-- The current bound on the pair (distance from `xs` to `ys`, length of `ys`). -/
  bound : δ × ℕ
  /-- Predicate describing the current bound. -/
  bound_eq : bound = match pre_rev with
    | [] => (distances.1[0]'(distances.2), ys.length)
    | _ => (List.minimum_of_length_pos distances.2, suff.length)

self.distances = suffixLevenshtein C xs self.suff


theorem starConvex_iff_ordConnected [LinearOrderedField 𝕜] {x : 𝕜} {s : Set 𝕜} (hx : x ∈ s) :
    StarConvex 𝕜 x s ↔ s.OrdConnected

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
(hx : x ∈ s)


@[simp] theorem isRight_inr : (inr x : α ⊕ β).isRight = true


@[simp]
theorem coe_restrictScalars' (f : A →ₐ[S] B) : (restrictScalars R f : A → B) = f

(R : Type u)
{S : Type v}
{A : Type w}
{B : Type u₁}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Semiring B]
[Algebra R S]
[Algebra S A]
[Algebra S B]
[Algebra R A]
[Algebra R B]
[IsScalarTower R S A]
[IsScalarTower R S B]
(f : A →ₐ[S] B)


@[simp]
theorem productIso_hom_comp_eval_apply {J : Type v} (F : J → TypeMax.{v, u}) (j : J) (x) :
    ((productIso.{v, u} F).hom x) j = Pi.π F j x

{J : Type v}
(F : J → TypeMax)
(j : J)
(x : ∏ᶜ F)

(CategoryTheory.Limits.Types.productIso F).hom x j = CategoryTheory.Limits.Pi.π F j x


@[to_additive] lemma Monovary.pow_right (hfg : Monovary f g) (n : ℕ) : Monovary f (g ^ n)

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


/-- In a bicategory, we can compose the 1-morphisms `f : a ⟶ b` and `g : b ⟶ c` to obtain
a 1-morphism `f ≫ g : a ⟶ c`. This composition does not need to be strictly associative,
but there is a specified associator, `α_ f g h : (f ≫ g) ≫ h ≅ f ≫ (g ≫ h)`.
There is an identity 1-morphism `𝟙 a : a ⟶ a`, with specified left and right unitor
isomorphisms `λ_ f : 𝟙 a ≫ f ≅ f` and `ρ_ f : f ≫ 𝟙 a ≅ f`.
These associators and unitors satisfy the pentagon and triangle equations.

See https://ncatlab.org/nlab/show/bicategory.
-/
@[nolint checkUnivs]
class Bicategory (B : Type u) extends CategoryStruct.{v} B where
  -- category structure on the collection of 1-morphisms:
  homCategory : ∀ a b : B, Category.{w} (a ⟶ b) := by infer_instance
  -- left whiskering:
  whiskerLeft {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h) : f ≫ g ⟶ f ≫ h
  -- right whiskering:
  whiskerRight {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c) : f ≫ h ⟶ g ≫ h
  -- associator:
  associator {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) : (f ≫ g) ≫ h ≅ f ≫ g ≫ h
  -- left unitor:
  leftUnitor {a b : B} (f : a ⟶ b) : 𝟙 a ≫ f ≅ f
  -- right unitor:
  rightUnitor {a b : B} (f : a ⟶ b) : f ≫ 𝟙 b ≅ f
  -- axioms for left whiskering:
  whiskerLeft_id : ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), whiskerLeft f (𝟙 g) = 𝟙 (f ≫ g) := by
    aesop_cat
  whiskerLeft_comp :
    ∀ {a b c} (f : a ⟶ b) {g h i : b ⟶ c} (η : g ⟶ h) (θ : h ⟶ i),
      whiskerLeft f (η ≫ θ) = whiskerLeft f η ≫ whiskerLeft f θ := by
    aesop_cat
  id_whiskerLeft :
    ∀ {a b} {f g : a ⟶ b} (η : f ⟶ g),
      whiskerLeft (𝟙 a) η = (leftUnitor f).hom ≫ η ≫ (leftUnitor g).inv := by
    aesop_cat
  comp_whiskerLeft :
    ∀ {a b c d} (f : a ⟶ b) (g : b ⟶ c) {h h' : c ⟶ d} (η : h ⟶ h'),
      whiskerLeft (f ≫ g) η =
        (associator f g h).hom ≫ whiskerLeft f (whiskerLeft g η) ≫ (associator f g h').inv := by
    aesop_cat
  -- axioms for right whiskering:
  id_whiskerRight : ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), whiskerRight (𝟙 f) g = 𝟙 (f ≫ g) := by
    aesop_cat
  comp_whiskerRight :
    ∀ {a b c} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h) (i : b ⟶ c),
      whiskerRight (η ≫ θ) i = whiskerRight η i ≫ whiskerRight θ i := by
    aesop_cat
  whiskerRight_id :
    ∀ {a b} {f g : a ⟶ b} (η : f ⟶ g),
      whiskerRight η (𝟙 b) = (rightUnitor f).hom ≫ η ≫ (rightUnitor g).inv := by
    aesop_cat
  whiskerRight_comp :
    ∀ {a b c d} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c) (h : c ⟶ d),
      whiskerRight η (g ≫ h) =
        (associator f g h).inv ≫ whiskerRight (whiskerRight η g) h ≫ (associator f' g h).hom := by
    aesop_cat
  -- associativity of whiskerings:
  whisker_assoc :
    ∀ {a b c d} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g') (h : c ⟶ d),
      whiskerRight (whiskerLeft f η) h =
        (associator f g h).hom ≫ whiskerLeft f (whiskerRight η h) ≫ (associator f g' h).inv := by
    aesop_cat
  -- exchange law of left and right whiskerings:
  whisker_exchange :
    ∀ {a b c} {f g : a ⟶ b} {h i : b ⟶ c} (η : f ⟶ g) (θ : h ⟶ i),
      whiskerLeft f θ ≫ whiskerRight η i = whiskerRight η h ≫ whiskerLeft g θ := by
    aesop_cat
  -- pentagon identity:
  pentagon :
    ∀ {a b c d e} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e),
      whiskerRight (associator f g h).hom i ≫
          (associator f (g ≫ h) i).hom ≫ whiskerLeft f (associator g h i).hom =
        (associator (f ≫ g) h i).hom ≫ (associator f g (h ≫ i)).hom := by
    aesop_cat
  -- triangle identity:
  triangle :
    ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c),
      (associator f (𝟙 b) g).hom ≫ whiskerLeft f (leftUnitor g).hom
      = whiskerRight (rightUnitor f).hom g := by
    aesop_cat

{B : Type u}
[self : CategoryTheory.Bicategory B]
{a b c : B}
(f : a ⟶ b)
(g : b ⟶ c)

CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.CategoryStruct.id g) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.CategoryStruct.comp f g)


/-- Direct products of torsion free groups are torsion free. -/
@[to_additive AddMonoid.IsTorsionFree.prod
      "Direct products of additive torsion free groups are torsion free."]
theorem IsTorsionFree.prod {η : Type*} {Gs : η → Type*} [∀ i, Group (Gs i)]
    (tfGs : ∀ i, IsTorsionFree (Gs i)) : IsTorsionFree <| ∀ i, Gs i

(tfGs : ∀ (i : η), AddMonoid.IsTorsionFree (Gs i))

AddMonoid.IsTorsionFree ((i : η) → Gs i)


/-- A version of `liftPropWithinAt_indep_chart`, only for the source. -/
theorem liftPropWithinAt_indep_chart_source [HasGroupoid M G] (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) :
    LiftPropWithinAt P g s x ↔ LiftPropWithinAt P (g ∘ e.symm) (e.symm ⁻¹' s) (e x)

(he : e ∈ StructureGroupoid.maximalAtlas M G)

ChartedSpace.LiftPropWithinAt P g s x ↔ ChartedSpace.LiftPropWithinAt P (g ∘ ↑e.symm) (↑e.symm ⁻¹' s) (↑e x)


theorem row_mulVec [Fintype n] [NonUnitalNonAssocSemiring α] (M : Matrix m n α) (v : n → α) :
    Matrix.row ι (M *ᵥ v) = (M * Matrix.col ι v)ᵀ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{ι : Type u_6}
[Fintype n]
[NonUnitalNonAssocSemiring α]
(M : Matrix m n α)
(v : n → α)

Matrix.row ι (M.mulVec v) = (M * Matrix.col ι v).transpose


theorem sdiff_union_of_subset {s₁ s₂ : Finset α} (h : s₁ ⊆ s₂) : s₂ \ s₁ ∪ s₁ = s₂

{α : Type u_1}
[DecidableEq α]
{s₁ s₂ : Finset α}
(h : s₁ ⊆ s₂)


theorem eq_false_or_eq_true : (b : Bool) → b = true ∨ b = false


/-- If a type carries two unital binary operations that distribute over each other,
then these operations are equal.

In fact, they give a commutative monoid structure, see `eckmann_hilton.CommMonoid`. -/
theorem mul : m₁ = m₂

(distrib : ∀ (a b c d : X), m₁ (m₂ a b) (m₂ c d) = m₂ (m₁ a c) (m₁ b d))


theorem lift_graph {f : α → β} {a b} : (a, b) ∈ (f : α →. β).graph ↔ f a = b

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


@[simp]
theorem coe_srangeRestrict (f : F) (x : R) : (srangeRestrict f x : S) = f x

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(f : F)
(x : R)

↑((NonUnitalRingHom.srangeRestrict f) x) = f x


theorem Sublist.subset : l₁ <+ l₂ → l₁ ⊆ l₂

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


/-- The functor from the canonical quotient of a path category of a category
to the original category. -/
@[simps!]
def quotientPathsTo : Quotient (pathsHomRel C) ⥤ C

(a : CategoryTheory.Quotient (CategoryTheory.pathsHomRel C))

(CategoryTheory.quotientPathsTo C).obj a = a.as


/-- The analogue of `Quot.inductionOn`: every element of `Quotient s` is of the form `Quotient.mk s a`. -/
@[elab_as_elim]
protected theorem inductionOn {α : Sort u} {s : Setoid α} {motive : Quotient s → Prop}
    (q : Quotient s)
    (h : (a : α) → motive (Quotient.mk s a))
    : motive q

(h : ∀ (a : α), motive (Quotient.mk s a))


@[to_additive]
nonrec lemma orbitRel.Quotient.orbit_nonempty (x : orbitRel.Quotient G α) :
    Set.Nonempty x.orbit

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
(x : MulAction.orbitRel.Quotient G α)


@[to_additive (attr := simp)]
theorem smul_neBot_iff : (f • g).NeBot ↔ f.NeBot ∧ g.NeBot

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


@[to_additive]
theorem pow_smul_eq_iff_period_dvd {n : ℕ} {m : M} {a : α} :
    m ^ n • a = a ↔ period m a ∣ n

{α : Type v}
{M : Type u}
[AddMonoid M]
[AddAction M α]
{n : ℕ}
{m : M}
{a : α}

n • m +ᵥ a = a ↔ AddAction.period m a ∣ n


@[to_additive sum_antidiagonal_choose_succ_nsmul]
theorem prod_antidiagonal_pow_choose_succ {M : Type*} [CommMonoid M] (f : ℕ → ℕ → M) (n : ℕ) :
    (∏ ij ∈ antidiagonal (n + 1), f ij.1 ij.2 ^ (n + 1).choose ij.1) =
      (∏ ij ∈ antidiagonal n, f ij.1 (ij.2 + 1) ^ n.choose ij.1) *
        ∏ ij ∈ antidiagonal n, f (ij.1 + 1) ij.2 ^ n.choose ij.2

{M : Type u_4}
[AddCommMonoid M]
(f : ℕ → ℕ → M)
(n : ℕ)

∑ ij ∈ Finset.antidiagonal (n + 1), (n + 1).choose ij.1 • f ij.1 ij.2 =
  ∑ ij ∈ Finset.antidiagonal n, n.choose ij.1 • f ij.1 (ij.2 + 1) +
    ∑ ij ∈ Finset.antidiagonal n, n.choose ij.2 • f (ij.1 + 1) ij.2


private theorem chainClosure_succ_total (hc₁ : ChainClosure r c₁) (hc₂ : ChainClosure r c₂)
    (h : c₁ ⊆ c₂) : c₂ = c₁ ∨ SuccChain r c₁ ⊆ c₂

{α : Type u_1}
{r : α → α → Prop}
{c₁ c₂ : Set α}
(hc₁ : ChainClosure r c₁)
(hc₂ : ChainClosure r c₂)
(h : c₁ ⊆ c₂)


/-- The power basis given by `x` if `B.gen ∈ adjoin K {x}`. See `PowerBasis.ofGenMemAdjoin'`
for a version over a more general base ring. -/
@[simps!]
noncomputable def PowerBasis.ofGenMemAdjoin {x : S} (B : PowerBasis K S) (hint : IsIntegral K x)
    (hx : B.gen ∈ adjoin K ({x} : Set S)) : PowerBasis K S

{K : Type u_1}
{S : Type u_2}
[Field K]
[CommRing S]
[Algebra K S]
{x : S}
(B : PowerBasis K S)
(hint : IsIntegral K x)
(hx : B.gen ∈ Algebra.adjoin K {x})


@[simp]
theorem leadingCoeff_X_sub_C [Ring S] (r : S) : (X - C r).leadingCoeff = 1

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


@[reassoc (attr := simp)]
lemma inv_hom_id_hom (e : F ≅ G) (n : A) : e.inv.hom n ≫ e.hom.hom n = 𝟙 _

{F G : CategoryTheory.SingleFunctors C D A}

e.inv.hom n ≫ e.hom.hom n = 𝟙 (G.functor n)


theorem negOne_eq_allOnes : -1#w = allOnes w


theorem continuous_selfAdjointPart [ContinuousAdd A] [ContinuousStar A] [ContinuousConstSMul R A] :
    Continuous (selfAdjointPart R (A := A))

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


lemma map_add_left_Ioo (a b c : α) : (Ioo a b).map (c + ·) = Ioo (c + a) (c + b)

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

Multiset.map (fun x => c + x) (Multiset.Ioo a b) = Multiset.Ioo (c + a) (c + b)


@[simp]
lemma toContinuousMap_id {s : Set R} [Zero s] (h0 : ((0 : s) : R) = 0) :
    (ContinuousMapZero.id h0 : C(s, R)) = .restrict s (.id R)

{R : Type u_3}
[Zero R]
[TopologicalSpace R]
{s : Set R}
[Zero ↑s]
(h0 : ↑0 = 0)

↑(ContinuousMapZero.id h0) = ContinuousMap.restrict s (ContinuousMap.id R)


@[simp]
theorem AbsoluteValue.map_units_int_smul (abv : AbsoluteValue R S) (x : ℤˣ) (y : R) :
    abv (x • y) = abv y

{R : Type u_1}
{S : Type u_2}
[Ring R]
[LinearOrderedCommRing S]
(abv : AbsoluteValue R S)
(x : ℤˣ)
(y : R)


@[simp]
theorem augmentTruncate_hom_f_zero (C : ChainComplex V ℕ) :
    (augmentTruncate C).hom.f 0 = 𝟙 (C.X 0)


lemma exists_isTuranMaximal :
    ∃ H : SimpleGraph V, ∃ _ : DecidableRel H.Adj, H.IsTuranMaximal r

{V : Type u_1}
[Fintype V]
[DecidableEq V]
{r : ℕ}
(hr : 0 < r)


theorem Asymptotics.IsBigO.hasFDerivWithinAt {s : Set E} {x₀ : E} {n : ℕ}
    (h : f =O[𝓝[s] x₀] fun x => ‖x - x₀‖ ^ n) (hx₀ : x₀ ∈ s) (hn : 1 < n) :
    HasFDerivWithinAt f (0 : E →L[𝕜] F) s x₀


@[simp]
theorem top_apply (a : α) : (⊤ : InfTopHom α β) a = ⊤

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Top α]
[SemilatticeInf β]
[OrderTop β]
(a : α)


@[to_additive (attr := simp)]
theorem prod_single_index {a : α} {b : M} {h : α → M → N} (h_zero : h a 0 = 1) :
    (single a b).prod h = h a b

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[CommMonoid N]
{a : α}
{b : M}
{h : α → M → N}
(h_zero : h a 0 = 1)


/-- From a natural transformation `α : G → F` we get a functor from
algebras of `F` to algebras of `G`.
-/
@[simps]
def functorOfNatTrans {F G : C ⥤ C} (α : G ⟶ F) : Algebra F ⥤ Algebra G

(A : CategoryTheory.Endofunctor.Algebra F)

((CategoryTheory.Endofunctor.Algebra.functorOfNatTrans α).obj A).a = A.a


/-- **Converse of pons asinorum**, vector angle form. -/
theorem norm_eq_of_angle_sub_eq_angle_sub_rev_of_angle_ne_pi {x y : V}
    (h : angle x (x - y) = angle y (y - x)) (hpi : angle x y ≠ π) : ‖x‖ = ‖y‖

(h : InnerProductGeometry.angle x (x - y) = InnerProductGeometry.angle y (y - x))

(hpi : InnerProductGeometry.angle x y ≠ π)


theorem range_fin_succ {α} (f : Fin (n + 1) → α) :
    Set.range f = insert (f 0) (Set.range (Fin.tail f))

{n : ℕ}
{α : Type u_1}
(f : Fin (n + 1) → α)


theorem set_eventuallyLE_iff_inf_principal_le {s t : Set α} {l : Filter α} :
    s ≤ᶠ[l] t ↔ l ⊓ 𝓟 s ≤ l ⊓ 𝓟 t

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


@[simp] theorem sub_byteIdx (p₁ p₂ : Pos) : (p₁ - p₂).byteIdx = p₁.byteIdx - p₂.byteIdx


@[to_additive]
theorem inv_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [Group G]
    [TopologicalGroup G] {g : G} (hg : g ∈ connectedComponent (1 : G)) :
    g⁻¹ ∈ connectedComponent (1 : G)

{G : Type u_1}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{g : G}
(hg : g ∈ connectedComponent 1)


@[simp]
theorem sup_singleton' [DecidableEq α] (s : Finset α) : s.sup singleton = s

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


/-- For a functor `F : C ⥤ D` and an object `d : D`, we obtain a contravariant functor from the
category of costructured arrows `F.op.obj c ⟶ op d` to the category of structured arrows
`d ⟶ F.obj c`.
-/
@[simps]
def toStructuredArrow' (F : C ⥤ D) (d : D) :
    (CostructuredArrow F.op (op d))ᵒᵖ ⥤ StructuredArrow d F

(X : (CategoryTheory.CostructuredArrow F.op (Opposite.op d))ᵒᵖ)

(CategoryTheory.CostructuredArrow.toStructuredArrow' F d).obj X =
  CategoryTheory.StructuredArrow.mk (Opposite.unop X).hom.unop


theorem MeasurableSet.of_union_cover {s t u : Set α} (hs : MeasurableSet s) (ht : MeasurableSet t)
    (h : univ ⊆ s ∪ t) (hsu : MeasurableSet (((↑) : s → α) ⁻¹' u))
    (htu : MeasurableSet (((↑) : t → α) ⁻¹' u)) : MeasurableSet u

(hsu : MeasurableSet (Subtype.val ⁻¹' u))

(htu : MeasurableSet (Subtype.val ⁻¹' u))


theorem toBialgHom_toAlgHom : ((e : A →ₐc[R] B) : A →ₐ[R] B) = e

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(e : A ≃ₐc[R] B)


@[simp]
theorem inl_neg [Neg R] [AddGroup A] (r : R) : (inl (-r) : Unitization R A) = -inl r

{R : Type u_3}
(A : Type u_4)
[Neg R]
[AddGroup A]
(r : R)

Unitization.inl (-r) = -Unitization.inl r


@[simp, norm_cast]
theorem nnnorm_coe_ennreal (f : Lp E p μ) : (‖f‖₊ : ℝ≥0∞) = eLpNorm f p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(f : ↥(MeasureTheory.Lp E p μ))


@[simp] theorem neg_re : (-a).re = -a.re


/-- Basis vectors are eigenvectors of associated diagonal linear operator. -/
lemma hasEigenvector_toLin_diagonal (d : n → R) (i : n) (b : Basis n R M) :
    HasEigenvector (toLin b b (diagonal d)) (d i) (b i)

{R : Type u_1}
{n : Type u_2}
{M : Type u_3}
[DecidableEq n]
[Fintype n]
[CommRing R]
[Nontrivial R]
[AddCommGroup M]
[Module R M]
(d : n → R)
(i : n)
(b : Basis n R M)

Module.End.HasEigenvector ((Matrix.toLin b b) (Matrix.diagonal d)) (d i) (b i)


@[simp]
theorem mapMatrix_id : (RingHom.id α).mapMatrix = RingHom.id (Matrix m m α)

{m : Type u_2}
{α : Type v}
[Fintype m]
[DecidableEq m]
[NonAssocSemiring α]


theorem star_mul_self_ne_zero_iff (x : E) : x⋆ * x ≠ 0 ↔ x ≠ 0

{E : Type u_2}
[NonUnitalNormedRing E]
[StarRing E]
[CstarRing E]
(x : E)


theorem algebraMap_injective [CommRing R] [Ring A] [Nontrivial A] [Algebra R A]
    [NoZeroSMulDivisors R A] : Function.Injective (algebraMap R A)

(R : Type u_1)
(A : Type u_2)
[CommRing R]
[Ring A]
[Nontrivial A]
[Algebra R A]
[NoZeroSMulDivisors R A]


@[simp] theorem mk_le_mk {i₁ i₂ : Nat} : Pos.mk i₁ ≤ Pos.mk i₂ ↔ i₁ ≤ i₂

{ byteIdx := i₁ } ≤ { byteIdx := i₂ } ↔ i₁ ≤ i₂


/-- Every split epi `f` with a kernel induces a binary bicone with `f` as its `snd` and
the kernel map as its `inl`.
We will show in `binary_bicone_of_is_split_mono_of_cokernel` that this binary bicone is in fact
already a biproduct. -/
@[simps]
def binaryBiconeOfIsSplitEpiOfKernel {X Y : C} {f : X ⟶ Y} [IsSplitEpi f] {c : KernelFork f}
    (i : IsLimit c) : BinaryBicone c.pt Y

{c : CategoryTheory.Limits.KernelFork f}

(CategoryTheory.Limits.binaryBiconeOfIsSplitEpiOfKernel i).inr = CategoryTheory.section_ f


theorem isPiSystem_Ixx_mem {Ixx : α → α → Set α} {p : α → α → Prop}
    (Hne : ∀ {a b}, (Ixx a b).Nonempty → p a b)
    (Hi : ∀ {a₁ b₁ a₂ b₂}, Ixx a₁ b₁ ∩ Ixx a₂ b₂ = Ixx (max a₁ a₂) (min b₁ b₂)) (s t : Set α) :
    IsPiSystem { S | ∃ᵉ (l ∈ s) (u ∈ t), p l u ∧ Ixx l u = S }

(Hne : ∀ {a b : α}, (Ixx a b).Nonempty → p a b)

(Hi : ∀ {a₁ b₁ a₂ b₂ : α}, Ixx a₁ b₁ ∩ Ixx a₂ b₂ = Ixx (max a₁ a₂) (min b₁ b₂))

IsPiSystem {S | ∃ l ∈ s, ∃ u ∈ t, p l u ∧ Ixx l u = S}


/-- The image of a convex set under an affine map is convex. -/
theorem Convex.affine_image (f : E →ᵃ[𝕜] F) (hs : Convex 𝕜 s) : Convex 𝕜 (f '' s)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedRing 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
{s : Set E}
(f : E →ᵃ[𝕜] F)
(hs : Convex 𝕜 s)


@[to_additive]
theorem mul_subset_mul_right : s₁ ⊆ s₂ → s₁ * t ⊆ s₂ * t

{α : Type u_2}
[Mul α]
{s₁ s₂ t : Set α}


/-- If an invariant subspace `p` of an endomorphism `f` is disjoint from the `μ`-eigenspace of `f`,
then the restriction of `f` to `p` has trivial `μ`-eigenspace. -/
theorem eigenspace_restrict_eq_bot {f : End R M} {p : Submodule R M} (hfp : ∀ x ∈ p, f x ∈ p)
    {μ : R} (hμp : Disjoint (f.eigenspace μ) p) : eigenspace (f.restrict hfp) μ = ⊥

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}
{p : Submodule R M}
(hfp : ∀ x ∈ p, f x ∈ p)
{μ : R}
(hμp : Disjoint (f.eigenspace μ) p)

Module.End.eigenspace (LinearMap.restrict f hfp) μ = ⊥


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.smul (hf : ContinuousAt f b) (hg : ContinuousAt g b) :
    ContinuousAt (fun x => f x • g x) b

{M : Type u_1}
{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace M]
[TopologicalSpace X]
[TopologicalSpace Y]
[VAdd M X]
[ContinuousVAdd M X]
{f : Y → M}
{g : Y → X}
{b : Y}
(hf : ContinuousAt f b)
(hg : ContinuousAt g b)


@[trans]
theorem gt_trans : ∀ {a b c : α}, a > b → b > c → a > c


theorem getElem?_of_mem {a} {l : List α} (h : a ∈ l) : ∃ n : Nat, l[n]? = some a

{α : Type u_1}
{a : α}
{l : List α}
(h : a ∈ l)


@[simp]
theorem optionSubtype_symm_apply_apply_some
    [DecidableEq β]
    (x : β)
    (e : α ≃ { y : β // y ≠ x })
    (a : α) : ((optionSubtype x).symm e : Option α ≃ β) (some a) = e a

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
(x : β)
(e : α ≃ { y // y ≠ x })
(a : α)

↑((Equiv.optionSubtype x).symm e) (some a) = ↑(e a)


/-- Implementation of `CommMon_.equivLaxBraidedFunctorPunit`. -/
@[simps]
def commMonToLaxBraided : CommMon_ C ⥤ LaxBraidedFunctor (Discrete PUnit.{u + 1}) C

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

∀ (x x_1 : CategoryTheory.Discrete PUnit.{u + 1}),
  ((CommMon_.EquivLaxBraidedFunctorPUnit.commMonToLaxBraided C).obj A).μ x x_1 = A.mul


lemma iIndepFun_iff_iIndep {β : ι → Type*}
    (m : ∀ x : ι, MeasurableSpace (β x)) (f : ∀ x : ι, Ω → β x) (μ : Measure Ω) :
    iIndepFun m f μ ↔ iIndep (fun x ↦ (m x).comap (f x)) μ

∀ {x : MeasurableSpace Ω} {β : ι → Type u_6} (m : (x : ι) → MeasurableSpace (β x)) (f : (x : ι) → Ω → β x)
  (μ : MeasureTheory.Measure Ω),
  ProbabilityTheory.iIndepFun m f μ ↔ ProbabilityTheory.iIndep (fun x => MeasurableSpace.comap (f x) (m x)) μ


/-- The left_inv direction of the equivalence -/
theorem ofRowLens_to_rowLens_eq_self {μ : YoungDiagram} : ofRowLens _ (rowLens_sorted μ) = μ


theorem Decidable.and_or_imp [Decidable a] : a ∧ b ∨ (a → c) ↔ a → b ∨ c


/-- `ContinuousLinearMap.toLinearMap` as a `RingHom`. -/
@[simps]
def toLinearMapRingHom [ContinuousAdd M₁] : (M₁ →L[R₁] M₁) →+* M₁ →ₗ[R₁] M₁

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

ContinuousLinearMap.toLinearMapRingHom self = ↑self


/-- The L-series of the (convolution) product of two `ℂ`-valued arithmetic functions `f` and `g`
is summable when both L-series are summable. -/
lemma LSeriesSummable_mul {f g : ArithmeticFunction ℂ} {s : ℂ} (hf : LSeriesSummable ↗f s)
    (hg : LSeriesSummable ↗g s) :
    LSeriesSummable ↗(f * g) s

{f g : ArithmeticFunction ℂ}
{s : ℂ}
(hf : LSeriesSummable (fun n => f n) s)
(hg : LSeriesSummable (fun n => g n) s)


@[simp]
theorem range_IciExtend (f : Ici a → β) : range (IciExtend f) = range f

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a : α}
(f : ↑(Set.Ici a) → β)

Set.range (Set.IciExtend f) = Set.range f


theorem add_pow_char_pow [CommSemiring R] {p : ℕ} [Fact p.Prime] [CharP R p] {n : ℕ} (x y : R) :
    (x + y) ^ p ^ n = x ^ p ^ n + y ^ p ^ n

(R : Type u_1)
[CommSemiring R]
{p : ℕ}
[Fact (Nat.Prime p)]
[CharP R p]
{n : ℕ}
(x y : R)


theorem map₂_span_span (f : M →ₗ[R] N →ₗ[R] P) (s : Set M) (t : Set N) :
    map₂ f (span R s) (span R t) = span R (Set.image2 (fun m n => f m n) s t)

(R : Type u_1)
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : M →ₗ[R] N →ₗ[R] P)
(s : Set M)
(t : Set N)

Submodule.map₂ f (Submodule.span R s) (Submodule.span R t) = Submodule.span R (Set.image2 (fun m n => (f m) n) s t)


@[to_additive (attr := simp)]
theorem Homeomorph.coe_mulLeft (a : G) : ⇑(Homeomorph.mulLeft a) = (a * ·)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[ContinuousAdd G]
(a : G)

⇑(Homeomorph.addLeft a) = fun x => a + x


/-- The limit bicone for the biproduct over an index type with exactly one term. -/
@[simps]
def limitBiconeOfUnique : LimitBicone f

(CategoryTheory.Limits.limitBiconeOfUnique f).bicone.pt = f default


theorem encard_diff_le_aux {B₁ B₂ : Set α}
    (exch : ExchangeProperty Base) (hB₁ : Base B₁) (hB₂ : Base B₂) :
    (B₁ \ B₂).encard ≤ (B₂ \ B₁).encard

{α : Type u_1}
{Base : Set α → Prop}
{B₁ B₂ : Set α}
(exch : Matroid.ExchangeProperty Base)
(hB₁ : Base B₁)
(hB₂ : Base B₂)


theorem Commute.zpow_right {A B : M} (h : Commute A B) (m : ℤ) : Commute A (B ^ m)

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
{A B : Matrix n' n' R}
(h : Commute A B)
(m : ℤ)


theorem neg_sqrt_le_of_sq_le (h : x ^ 2 ≤ y) : -√y ≤ x


theorem mem_image_iff_of_inverse {f : α → β} {g : β → α} {b : β} {s : Set α} (h₁ : LeftInverse g f)
    (h₂ : RightInverse g f) : b ∈ f '' s ↔ g b ∈ s

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{g : β → α}
{b : β}
{s : Set α}
(h₁ : Function.LeftInverse g f)
(h₂ : Function.RightInverse g f)


/-- A `StrongFEPair` structure with `f = oddKernel a` and `g = sinKernel a`. -/
@[simps]
def hurwitzOddFEPair (a : UnitAddCircle) : StrongFEPair ℂ

∀ (a_1 : ℝ), (HurwitzZeta.hurwitzOddFEPair a).f a_1 = (Complex.ofReal' ∘ HurwitzZeta.oddKernel a) a_1


@[simp]
theorem dualAnnihilator_top : (⊤ : Submodule R M).dualAnnihilator = ⊥

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]


theorem imageUnopOp_hom_comp_image_ι :
    (imageUnopOp g).hom ≫ image.ι g = (factorThruImage g.unop).op

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{A B : Cᵒᵖ}
(g : A ⟶ B)

CategoryTheory.CategoryStruct.comp (CategoryTheory.imageUnopOp g).hom (CategoryTheory.Limits.image.ι g) =
  (CategoryTheory.Limits.factorThruImage g.unop).op


theorem iterate_derivative_X_pow_eq_C_mul (n k : ℕ) :
    derivative^[k] (X ^ n : R[X]) = C (Nat.descFactorial n k : R) * X ^ (n - k)

(⇑Polynomial.derivative)^[k] (Polynomial.X ^ n) = Polynomial.C ↑(n.descFactorial k) * Polynomial.X ^ (n - k)


theorem essentiallySmall_monoOver_iff_small_subobject (X : C) :
    EssentiallySmall.{v} (MonoOver X) ↔ Small.{v} (Subobject X)

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

CategoryTheory.EssentiallySmall.{v, v, max u₁ v} (CategoryTheory.MonoOver X) ↔
  Small.{v, max u₁ v} (CategoryTheory.Subobject X)


theorem div_pos_iff : 0 < a / b ↔ 0 < a ∧ 0 < b ∨ a < 0 ∧ b < 0

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


theorem smul_mem_finsetIntegerMultiple_span [DecidableEq M] (x : M) (s : Finset M')
    (hx : f x ∈ Submodule.span R s) :
    ∃ (m : S), m • x ∈ Submodule.span R (IsLocalizedModule.finsetIntegerMultiple S f s)

{R : Type u_1}
[CommSemiring R]
(S : Submonoid R)
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{M' : Type u_3}
[AddCommMonoid M']
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
[DecidableEq M]
(x : M)
(s : Finset M')
(hx : f x ∈ Submodule.span R ↑s)

∃ m, m • x ∈ Submodule.span R ↑(IsLocalizedModule.finsetIntegerMultiple S f s)


/-- The inverse of a bijective `MonoidHom` is a `MonoidHom`. -/
@[to_additive (attr := simps)
  "The inverse of a bijective `AddMonoidHom` is an `AddMonoidHom`."]
def MonoidHom.inverse {A B : Type*} [Monoid A] [Monoid B] (f : A →* B) (g : B → A)
    (h₁ : Function.LeftInverse g f) (h₂ : Function.RightInverse g f) : B →* A

{A : Type u_12}
{B : Type u_13}
[Monoid A]
[Monoid B]
(f : A →* B)
(g : B → A)
(h₁ : Function.LeftInverse g ⇑f)
(h₂ : Function.RightInverse g ⇑f)


@[simp] theorem RingHom.comp_id_semiringCat
    {G : SemiRingCat.{u}} {H : Type u} [Semiring H] (f : G →+* H) : f.comp (𝟙 G) = f

{G : SemiRingCat}
{H : Type u}
[Semiring H]
(f : ↑G →+* H)


@[simp]
theorem coe_monoidHom_mk (f : α →* β) (h₁ h₂) : ((⟨f, h₁, h₂⟩ : α →+* β) : α →* β) = f

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} (f : α →* β) (h₁ : (↑f).toFun 0 = 0)
  (h₂ : ∀ (x_2 y : α), (↑f).toFun (x_2 + y) = (↑f).toFun x_2 + (↑f).toFun y),
  ↑{ toMonoidHom := f, map_zero' := h₁, map_add' := h₂ } = f


/-- If a type carries two unital binary operations that distribute over each other,
then these operations are commutative.

In fact, they give a commutative monoid structure, see `eckmann_hilton.CommMonoid`. -/
theorem mul_comm : Std.Commutative m₂

(distrib : ∀ (a b c d : X), m₁ (m₂ a b) (m₂ c d) = m₂ (m₁ a c) (m₁ b d))


theorem one_eq_range : (1 : Submodule R A) = LinearMap.range (Algebra.linearMap R A)

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

1 = LinearMap.range (Algebra.linearMap R A)


/-- To show a property of all powers of `g` it suffices to show it is closed under multiplication
by `g` and `g⁻¹` on the right. For subgroups generated by more than one element, see
`Subgroup.closure_induction_right`. -/
@[to_additive "To show a property of all multiples of `g` it suffices to show it is closed under
addition by `g` and `-g` on the right. For additive subgroups generated by more than one element,
see `AddSubgroup.closure_induction_right`."]
lemma zpow_induction_right {g : G} {P : G → Prop} (h_one : P (1 : G))
    (h_mul : ∀ a, P a → P (a * g)) (h_inv : ∀ a, P a → P (a * g⁻¹)) (n : ℤ) : P (g ^ n)

{G : Type u_3}
[AddGroup G]
{g : G}
{P : G → Prop}
(h_one : P 0)
(h_mul : ∀ (a : G), P a → P (a + g))
(h_inv : ∀ (a : G), P a → P (a + -g))
(n : ℤ)


@[simp]
theorem sumAssoc_symm_apply_inl : (sumAssoc α β γ).symm (inl a) = inl (inl a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[LE α]
[LE β]
[LE γ]
(a : α)

(OrderIso.sumAssoc α β γ).symm (Sum.inl a) = Sum.inl (Sum.inl a)


theorem equiv_of_mem {s t : Computation α} {a} (h1 : a ∈ s) (h2 : a ∈ t) : s ~ t

{α : Type u}
{s t : Computation α}
{a : α}
(h1 : a ∈ s)
(h2 : a ∈ t)


theorem add_rpow_le_rpow_add {p : ℝ} (a b : ℝ≥0∞) (hp1 : 1 ≤ p) : a ^ p + b ^ p ≤ (a + b) ^ p


/-- Porting note (#10618): simp can prove this
@[simp] -/
theorem mk'_eq_iff {m : M} {s : S} {m' : M'} : mk' f m s = m' ↔ f m = s • m'

{R : Type u_1}
[CommSemiring R]
{S : Submonoid R}
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
{f : M →ₗ[R] M'}
[IsLocalizedModule S f]
{m : M}
{s : ↥S}
{m' : M'}

IsLocalizedModule.mk' f m s = m' ↔ f m = s • m'


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

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


@[to_additive]
theorem partialProd_succ (f : Fin n → α) (j : Fin n) :
    partialProd f j.succ = partialProd f (Fin.castSucc j) * f j

{α : Type u_1}
[Monoid α]
{n : ℕ}
(f : Fin n → α)
(j : Fin n)

Fin.partialProd f j.succ = Fin.partialProd f j.castSucc * f j


@[simp]
theorem integralBasis_apply (i : Free.ChooseBasisIndex ℤ (𝓞 K)) :
    integralBasis K i = algebraMap (𝓞 K) K (RingOfIntegers.basis K i)

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

(NumberField.integralBasis K) i = (algebraMap (NumberField.RingOfIntegers K) K) ((NumberField.RingOfIntegers.basis K) i)


theorem symm_bijective : Function.Bijective (Path.symm : Path x y → Path y x)

{X : Type u_1}
[TopologicalSpace X]
{x y : X}


theorem IsSemisimpleRing.ideal_eq_span_idempotent [IsSemisimpleRing R] (I : Ideal R) :
    ∃ e : R, IsIdempotentElem e ∧ I = .span {e}

{R : Type u_2}
[Ring R]
[IsSemisimpleRing R]
(I : Ideal R)

∃ e, IsIdempotentElem e ∧ I = Ideal.span {e}


protected theorem aestronglyMeasurable (f : α →ₘ[μ] β) : AEStronglyMeasurable f μ

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


@[to_additive (attr := simp)] lemma MonoidHom.pow_apply {M N : Type*} [MulOneClass M]
    [CommMonoid N] (f : M →* N) (n : ℕ) (x : M) :
    (f ^ n) x = (f x) ^ n

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddCommMonoid N]
(f : M →+ N)
(n : ℕ)
(x : M)


theorem bind_bind (m : Multiset α) (n : Multiset β) {f : α → β → Multiset γ} :
    ((bind m) fun a => (bind n) fun b => f a b) = (bind n) fun b => (bind m) fun a => f a b

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
(m : Multiset α)
(n : Multiset β)
{f : α → β → Multiset γ}

(m.bind fun a => n.bind fun b => f a b) = n.bind fun b => m.bind fun a => f a b


@[simp, norm_cast]
theorem val_mul (x y : selfAdjoint R) : ↑(x * y) = (x : R) * y

{R : Type u_1}
[NonUnitalCommRing R]
[StarRing R]
(x y : ↥(selfAdjoint R))


/-- The intersection of an indexed set of submonoids of a monoid `M` is a submonoid of `M`. -/
@[to_additive
      "The intersection of an indexed set of `AddSubmonoid`s of an `AddMonoid` `M` is
      an `AddSubmonoid` of `M`."]
theorem IsSubmonoid.iInter {ι : Sort*} {s : ι → Set M} (h : ∀ y : ι, IsSubmonoid (s y)) :
    IsSubmonoid (Set.iInter s)

{M : Type u_1}
[Monoid M]
{ι : Sort u_3}
{s : ι → Set M}
(h : ∀ (y : ι), IsSubmonoid (s y))


theorem smul_le {P : Submodule R M} : I • N ≤ P ↔ ∀ r ∈ I, ∀ n ∈ N, r • n ∈ P

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{I : Ideal R}
{N P : Submodule R M}


theorem smul_const {𝕜' : Type*} [NontriviallyNormedField 𝕜'] [NormedAlgebra 𝕜 𝕜']
    [NormedSpace 𝕜' F] [IsScalarTower 𝕜 𝕜' F] {c : E → 𝕜'} {s : Set E} (hc : DiffContOnCl 𝕜 c s)
    (y : F) : DiffContOnCl 𝕜 (fun x => c x • y) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
{𝕜' : Type u_5}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : E → 𝕜'}
{s : Set E}
(hc : DiffContOnCl 𝕜 c s)
(y : F)


theorem smul_def (x : M) (f : C^∞⟮I, M; 𝕜⟯⟨x⟩) (k : 𝕜) : f • k = f x * k

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
(x : M)
(f : C^⊤⟮I, M; 𝕜⟯⟨x⟩)
(k : 𝕜)


/-- The natural isomorphism `RF ≅ RF'` on right derived functors that is
induced by a natural isomorphism `F ≅ F'`.  -/
@[simps]
noncomputable def rightDerivedNatIso (τ : F ≅ F') :
    RF ≅ RF'

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
(RF RF' : CategoryTheory.Functor D H)
{F F' : CategoryTheory.Functor C H}
{L : CategoryTheory.Functor C D}
(α : F ⟶ L.comp RF)
(α' : F' ⟶ L.comp RF')
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[RF.IsRightDerivedFunctor α W]
[RF'.IsRightDerivedFunctor α' W]
(τ : F ≅ F')

(RF.rightDerivedNatIso RF' α α' W τ).inv = RF'.rightDerivedNatTrans RF α' α W τ.inv


@[to_additive]
theorem eq_of_eqOn_top {f g : M →ₙ* N} (h : Set.EqOn f g (⊤ : Subsemigroup M)) : f = g

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f g : AddHom M N}
(h : Set.EqOn ⇑f ⇑g ↑⊤)


theorem union_eq_iUnion {s₁ s₂ : Set α} : s₁ ∪ s₂ = ⋃ b : Bool, cond b s₁ s₂


theorem mulLeftMap_eq_mulRightMap_of_commute
    {M : Submodule R S} (N : Submodule R S) {ι : Type*} (m : ι → M)
    (hc : ∀ (i : ι) (n : N), Commute (m i).1 n.1) : mulLeftMap N m = mulRightMap N m

(hc : ∀ (i : ι) (n : ↥N), Commute ↑(m i) ↑n)

Submodule.mulLeftMap N m = N.mulRightMap m


protected theorem nontrivial [IsDomain R] (h : degree f ≠ 0) : Nontrivial (AdjoinRoot f)

{R : Type u}
[CommRing R]
(f : R[X])
[IsDomain R]
(h : f.degree ≠ 0)


@[to_additive]
theorem pow_comp [Monoid γ] [ContinuousMul γ] (f : C(β, γ)) (n : ℕ) (g : C(α, β)) :
    (f ^ n).comp g = f.comp g ^ n

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[AddMonoid γ]
[ContinuousAdd γ]
(f : C(β, γ))
(n : ℕ)
(g : C(α, β))


/-- Composition of first-order homomorphisms 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.Equiv M N)
(g : L.Equiv N P)
(h : L.Equiv P Q)


lemma integrable_pow_mul (f : 𝓢(D, V))
    (k : ℕ) : Integrable (fun x ↦ ‖x‖ ^ k * ‖f x‖) μ

{D : Type u_3}
{V : Type u_7}
[NormedAddCommGroup D]
[NormedSpace ℝ D]
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[MeasurableSpace D]
[BorelSpace D]
[SecondCountableTopology D]
(μ : MeasureTheory.Measure D)
[hμ : μ.HasTemperateGrowth]
(f : SchwartzMap D V)
(k : ℕ)

MeasureTheory.Integrable (fun x => ‖x‖ ^ k * ‖f x‖) μ


/-- See note [partially-applied ext lemmas]. -/
@[ext high]
theorem algHom_ext' ⦃φ₁ φ₂ : k[G] →ₐ[k] A⦄
    (h : (φ₁ : k[G] →* A).comp (of k G) = (φ₂ : k[G] →* A).comp (of k G)) :
    φ₁ = φ₂

(h : (↑φ₁).comp (AddMonoidAlgebra.of k G) = (↑φ₂).comp (AddMonoidAlgebra.of k G))


theorem inter_subset_left {l₁ l₂ : List α} : l₁ ∩ l₂ ⊆ l₁

{α : Type u_1}
[DecidableEq α]
{l₁ l₂ : List α}

l₁ ∩ l₂ ⊆ l₁


@[simp]
theorem spanFinset_eq_zero {ι : Type*} {s : Finset ι} {f : ι → K} :
    spanFinset R₁ s f = 0 ↔ ∀ j ∈ s, f j = 0

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

FractionalIdeal.spanFinset R₁ s f = 0 ↔ ∀ j ∈ s, f j = 0


theorem BddBelow.wellFoundedOn_lt : BddBelow s → s.WellFoundedOn (· < ·)

{α : Type u_2}
{s : Set α}
[Preorder α]
[LocallyFiniteOrder α]

BddBelow s → s.WellFoundedOn fun x x_1 => x < x_1


@[simp]
theorem dist_vsub_cancel_left (x y z : P) : dist (x -ᵥ y) (x -ᵥ z) = dist y z

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x y z : P)


@[simp, norm_cast]
theorem coe_inv_unitSphere [NormedDivisionRing 𝕜] (x : sphere (0 : 𝕜) 1) : ↑x⁻¹ = (x⁻¹ : 𝕜)

{𝕜 : Type u_1}
[NormedDivisionRing 𝕜]
(x : ↑(Metric.sphere 0 1))

↑x⁻¹ = (↑x)⁻¹


lemma image_inj {t : Finset α} (hf : Injective f) : s.image f = t.image f ↔ s = t

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α → β}
{s t : Finset α}
(hf : Function.Injective f)

Finset.image f s = Finset.image f t ↔ s = t


@[ext]
lemma ext (W W' : MorphismProperty C) (h : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), W f ↔ W' f) :
    W = W'

(W W' : CategoryTheory.MorphismProperty C)


@[simp]
theorem lift_natCast (n : ℕ) : lift.{u} (n : Cardinal.{v}) = n


theorem contDiffWithinAtProp_self_target {f : H → E'} {s : Set H} {x : H} :
    ContDiffWithinAtProp I 𝓘(𝕜, E') n f s x ↔
      ContDiffWithinAt 𝕜 n (f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{n : ℕ∞}
{f : H → E'}
{s : Set H}
{x : H}

ContDiffWithinAtProp I 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n (f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ Set.range ↑I) (↑I x)


theorem eq_of_homotopy {C D : HomologicalComplex V c} (f g : C ⟶ D) (h : Homotopy f g) :
    (quotient V c).map f = (quotient V c).map g

{ι : Type u_2}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f g : C ⟶ D)
(h : Homotopy f g)

(HomotopyCategory.quotient V c).map f = (HomotopyCategory.quotient V c).map g


theorem independent_def'' :
    Independent t ↔ ∀ i, Disjoint (t i) (sSup { a | ∃ j ≠ i, t j = a })

{α : Type u_1}
{ι : Type u_3}
[CompleteLattice α]
{t : ι → α}

CompleteLattice.Independent t ↔ ∀ (i : ι), Disjoint (t i) (sSup {a | ∃ j, j ≠ i ∧ t j = a})


theorem Memℒp.smul {p q r : ℝ≥0∞} {f : α → E} {φ : α → 𝕜} (hf : Memℒp f r μ) (hφ : Memℒp φ q μ)
    (hpqr : 1 / p = 1 / q + 1 / r) : Memℒp (φ • f) p μ

{𝕜 : Type u_1}
{α : Type u_2}
{E : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedRing 𝕜]
[NormedAddCommGroup E]
[MulActionWithZero 𝕜 E]
[BoundedSMul 𝕜 E]
{p q r : ℝ≥0∞}
{f : α → E}
{φ : α → 𝕜}
(hf : MeasureTheory.Memℒp f r μ)
(hφ : MeasureTheory.Memℒp φ q μ)
(hpqr : 1 / p = 1 / q + 1 / r)


theorem LinearMap.toMatrix'_comp [Fintype l] [DecidableEq l] (f : (n → R) →ₗ[R] m → R)
    (g : (l → R) →ₗ[R] n → R) :
    LinearMap.toMatrix' (f.comp g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g

{R : Type u_1}
[CommSemiring R]
{l : Type u_3}
{m : Type u_4}
{n : Type u_5}
[DecidableEq n]
[Fintype n]
[Fintype l]
[DecidableEq l]
(f : (n → R) →ₗ[R] m → R)
(g : (l → R) →ₗ[R] n → R)

LinearMap.toMatrix' (f ∘ₗ g) = LinearMap.toMatrix' f * LinearMap.toMatrix' g


theorem degree_eq_one_of_irreducible [IsSepClosed k] {p : k[X]}
    (hp : Irreducible p) (hsep : p.Separable) : p.degree = 1

(k : Type u)
[Field k]
[IsSepClosed k]
{p : k[X]}
(hp : Irreducible p)
(hsep : p.Separable)


/-- A `LiftStruct` for a commutative square gives a `LiftStruct` for the
corresponding square in the opposite category. -/
@[simps]
def op {sq : CommSq f i p g} (l : LiftStruct sq) : LiftStruct sq.op

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{A B X Y : C}
{f : A ⟶ X}
{i : A ⟶ B}
{p : X ⟶ Y}
{g : B ⟶ Y}
{sq : CategoryTheory.CommSq f i p g}
(l : sq.LiftStruct)


/-- `Fintype.Skeleton` is a skeleton of `Fintype`. -/
lemma isSkeleton : IsSkeletonOf FintypeCat Skeleton Skeleton.incl

CategoryTheory.IsSkeletonOf FintypeCat FintypeCat.Skeleton FintypeCat.Skeleton.incl


@[simp] theorem findIdx?_nil : ([] : List α).findIdx? p i = none


@[simp]
theorem colimitEquivQuot_apply (j : J) (x : F.obj j) :
    (colimitEquivQuot F) (colimit.ι F j x) = Quot.mk _ ⟨j, x⟩

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

(CategoryTheory.Limits.Types.colimitEquivQuot F) (CategoryTheory.Limits.colimit.ι F j x) =
  Quot.mk (CategoryTheory.Limits.Types.Quot.Rel F) ⟨j, x⟩


/-- The functor which deletes the point of a pointed type. In return, this makes the maps partial.
This is the computable part of the equivalence `PartialFunEquivPointed`. -/
@[simps obj map]
def pointedToPartialFun : Pointed.{u} ⥤ PartialFun

pointedToPartialFun.obj X = { x // x ≠ X.point }


@[to_additive]
theorem map_comap_eq_of_surjective (S : Subsemigroup N) : (S.comap f).map f = S

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

Subsemigroup.map f (Subsemigroup.comap f S) = S


theorem limsup_eq_tendsto_sum_indicator_nat_atTop (s : ℕ → Set α) :
    limsup s atTop = { ω | Tendsto
      (fun n ↦ ∑ k ∈ Finset.range n, (s (k + 1)).indicator (1 : α → ℕ) ω) atTop atTop }

Filter.limsup s Filter.atTop =
  {ω | Filter.Tendsto (fun n => ∑ k ∈ Finset.range n, (s (k + 1)).indicator 1 ω) Filter.atTop Filter.atTop}


theorem dvd_iff {k m : ℕ+} : k ∣ m ↔ (k : ℕ) ∣ (m : ℕ)

k ∣ m ↔ ↑k ∣ ↑m


theorem div_sat' {c : Constraint} {x y} (h : Coeffs.gcd x ≠ 0) (w : c.sat (Coeffs.dot x y)) :
    (c.div (Coeffs.gcd x)).sat' (Coeffs.sdiv x (Coeffs.gcd x)) y

{c : Lean.Omega.Constraint}
{x y : Lean.Omega.Coeffs}
(h : x.gcd ≠ 0)
(w : c.sat (x.dot y) = true)

(c.div x.gcd).sat' (x.sdiv ↑x.gcd) y = true


theorem nnnorm_changeOriginSeries_le_tsum (k l : ℕ) :
    ‖p.changeOriginSeries k l‖₊ ≤
      ∑' _ : { s : Finset (Fin (k + l)) // s.card = l }, ‖p (k + l)‖₊

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
(k l : ℕ)

‖p.changeOriginSeries k l‖₊ ≤ ∑' (x : { s // s.card = l }), ‖p (k + l)‖₊


@[simp]
lemma smul_iso_inv (a : Units ℤ) (e : X ≅ Y) : (a • e).inv = a⁻¹ • e.inv

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X Y : C}
(a : ℤˣ)
(e : X ≅ Y)


/-- If a unit `a` semiconjugates `x` to `y`, then `a⁻¹` semiconjugates `y` to `x`. -/
@[to_additive "If an additive unit `a` semiconjugates `x` to `y`, then `-a` semiconjugates `y` to
`x`."]
theorem units_inv_symm_left {a : Mˣ} {x y : M} (h : SemiconjBy (↑a) x y) : SemiconjBy (↑a⁻¹) y x

{M : Type u_1}
[Monoid M]
{a : Mˣ}
{x y : M}
(h : SemiconjBy (↑a) x y)


lemma piAntidiag_univ_fin_eq_antidiagonalTuple (n k : ℕ) :
    piAntidiag univ n = Nat.antidiagonalTuple k n

Finset.univ.piAntidiag n = Finset.Nat.antidiagonalTuple k n


@[simp]
theorem linearEquiv_coe_comp :
    (e.compDer D : A → N) = (e.toLinearMap : M →ₗ[R] N).comp (D : A →ₗ[R] M)

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M]
[Algebra R A]
[Module A M]
[Module R M]
(D : Derivation R A M)
{N : Type u_5}
[AddCommMonoid N]
[Module A N]
[Module R N]
[IsScalarTower R A M]
[IsScalarTower R A N]
(e : M ≃ₗ[A] N)


@[to_additive]
theorem epic_of_localizationMap {j k : N →* P} (h : ∀ a, j.comp f.toMap a = k.comp f.toMap a) :
    j = k

(h : ∀ (a : M), (j.comp f.toMap) a = (k.comp f.toMap) a)


theorem revAt_add {N O n o : ℕ} (hn : n ≤ N) (ho : o ≤ O) :
    revAt (N + O) (n + o) = revAt N n + revAt O o

(Polynomial.revAt (N + O)) (n + o) = (Polynomial.revAt N) n + (Polynomial.revAt O) o


@[to_additive]
theorem map_list_prod {F : Type*} [FunLike F M N] [MonoidHomClass F M N] (f : F) (l : List M) :
    f l.prod = (l.map f).prod

{M : Type u_4}
{N : Type u_5}
[AddMonoid M]
[AddMonoid N]
{F : Type u_8}
[FunLike F M N]
[AddMonoidHomClass F M N]
(f : F)
(l : List M)


/-- If `p` is a formal multilinear series such that `p m = 0` for `n ≤ m`, then
`p.changeOriginSeriesTerm k l = 0` for `n ≤ k + l`.  -/
lemma changeOriginSeriesTerm_bound (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ}
    (hn : ∀ (m : ℕ), n ≤ m → p m = 0) (k l : ℕ) {s : Finset (Fin (k + l))}
    (hs : s.card = l) (hkl : n ≤ k + l) :
    p.changeOriginSeriesTerm k l s hs = 0

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{n : ℕ}
(hn : ∀ (m : ℕ), n ≤ m → p m = 0)
(k l : ℕ)
{s : Finset (Fin (k + l))}
(hs : s.card = l)
(hkl : n ≤ k + l)


theorem infEdist_eq_top_iff : infEdist x s = ∞ ↔ s = ∅

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


theorem succ_iterate (a : ℕ) : ∀ n, succ^[n] a = a + n


theorem isNoetherian_of_linearEquiv (f : M ≃ₗ[R] P) [IsNoetherian R M] : IsNoetherian R P

{R : Type u_1}
{M : Type u_2}
{P : Type u_3}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid P]
[Module R M]
[Module R P]
(f : M ≃ₗ[R] P)
[IsNoetherian R M]


@[simp] theorem atLeastTwo_true_mid    : atLeastTwo a true c  = (a || c)


@[simp, norm_cast]
theorem star_ratCast [DivisionRing R] [StarRing R] (r : ℚ) : star (r : R) = r

{R : Type u_1}
[DivisionRing R]
[StarRing R]
(r : ℚ)


theorem sum_nat_mod (s : Finset α) (n : ℕ) (f : α → ℕ) :
    (∑ i ∈ s, f i) % n = (∑ i ∈ s, f i % n) % n

{α : Type u_3}
(s : Finset α)
(n : ℕ)
(f : α → ℕ)


/-- A variant on `eqToHom_naturality` that helps Lean identify the families `f` and `g`. -/
-- The simpNF linter incorrectly claims that this will never apply.
-- https://github.com/leanprover-community/mathlib4/issues/5049
@[reassoc (attr := simp, nolint simpNF)]
theorem eqToHom_iso_hom_naturality {f g : β → C} (z : ∀ b, f b ≅ g b) {j j' : β} (w : j = j') :
    (z j).hom ≫ eqToHom (by simp [w]) = eqToHom (by simp [w]) ≫ (z j').hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{β : Sort u_1}
{f g : β → C}
(z : (b : β) → f b ≅ g b)
{j j' : β}
(w : j = j')

CategoryTheory.CategoryStruct.comp (z j).hom (CategoryTheory.eqToHom ⋯) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) (z j').hom


@[simp]
lemma sections_smul_localizations_def
    {U : (Opens (PrimeSpectrum.Top R))ᵒᵖ} (x : U.unop)
    (r : (Spec.structureSheaf R).val.obj U)
    (m : Localizations M ↑x) :
  r • m = r.1 x • m

{U : (TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))ᵒᵖ}

(r : ↑((AlgebraicGeometry.Spec.structureSheaf R).val.obj U))

(m : ModuleCat.Tilde.Localizations M ↑x)


theorem eval₂_assoc (q : S₂ → MvPolynomial σ R) (p : MvPolynomial S₂ R) :
    eval₂ f (fun t => eval₂ f g (q t)) p = eval₂ f g (eval₂ C q p)

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

MvPolynomial.eval₂ f (fun t => MvPolynomial.eval₂ f g (q t)) p =
  MvPolynomial.eval₂ f g (MvPolynomial.eval₂ MvPolynomial.C q p)


/-- Given a homology map data for a morphism `φ`, this is the induced homology
map data for `-φ`. -/
@[simps]
def neg : HomologyMapData (-φ) h₁ h₂

(γ : CategoryTheory.ShortComplex.HomologyMapData φ h₁ h₂)


/-- `Solution'` is a tuple given by a solution to `a ^ 3 + b ^ 3 = u * c ^ 3`,
where `a`, `b`, `c` and `u` are as in `FermatLastTheoremForThreeGen`.
See `Solution` for the actual structure on which we will do the descent. -/
structure Solution' where
  a : 𝓞 K
  b : 𝓞 K
  c : 𝓞 K
  u : (𝓞 K)ˣ
  ha : ¬ λ ∣ a
  hb : ¬ λ ∣ b
  hc : c ≠ 0
  coprime : IsCoprime a b
  hcdvd : λ ∣ c
  H : a ^ 3 + b ^ 3 = u * c ^ 3

(self : FermatLastTheoremForThreeGen.Solution' hζ)


theorem Nodup.append (d₁ : Nodup l₁) (d₂ : Nodup l₂) (dj : Disjoint l₁ l₂) : Nodup (l₁ ++ l₂)

{α : Type u}
{l₁ l₂ : List α}
(d₁ : l₁.Nodup)
(d₂ : l₂.Nodup)
(dj : l₁.Disjoint l₂)


/-- All eigenvalues are generalized eigenvalues. -/
theorem hasGenEigenvalue_of_hasEigenvalue {f : End R M} {μ : R} {k : ℕ} (hk : 0 < k)
    (hμ : f.HasEigenvalue μ) : f.HasGenEigenvalue μ k

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}
{μ : R}
{k : ℕ}
(hk : 0 < k)
(hμ : f.HasEigenvalue μ)


@[to_additive (attr := simp)]
theorem mem_fixedPoints {a : α} : a ∈ fixedPoints M α ↔ ∀ m : M, m • a = a

{M : Type u}
[Monoid M]
{α : Type v}
[MulAction M α]
{a : α}

a ∈ MulAction.fixedPoints M α ↔ ∀ (m : M), m • a = a


@[simp]
theorem fmap_def {s : Finset α} (f : α → β) : f <$> s = s.image f

{α β : Type u}
[(P : Prop) → Decidable P]
{s : Finset α}
(f : α → β)


private theorem eq_of_not_blt_eq_true (h₁ : ¬ (Nat.blt x y = true)) (h₂ : ¬ (Nat.blt y x = true)) : x = y

{x y : Nat}
(h₁ : ¬x.blt y = true)
(h₂ : ¬y.blt x = true)


theorem Decidable.and_not_of_not_imp [Decidable a] (h : ¬(a → b)) : a ∧ ¬b

{a b : Prop}
[Decidable a]
(h : ¬(a → b))


theorem ext_isClosed (c₁ c₂ : ClosureOperator α)
    (h : ∀ x, c₁.IsClosed x ↔ c₂.IsClosed x) : c₁ = c₂

(h : ∀ (x : α), c₁.IsClosed x ↔ c₂.IsClosed x)


theorem generator_maximal_submoduleImage_dvd {N O : Submodule R M} (hNO : N ≤ O) {ϕ : O →ₗ[R] R}
    (hϕ : ∀ ψ : O →ₗ[R] R, ¬ϕ.submoduleImage N < ψ.submoduleImage N)
    [(ϕ.submoduleImage N).IsPrincipal] (y : M) (yN : y ∈ N)
    (ϕy_eq : ϕ ⟨y, hNO yN⟩ = generator (ϕ.submoduleImage N)) (ψ : O →ₗ[R] R) :
    generator (ϕ.submoduleImage N) ∣ ψ ⟨y, hNO yN⟩

(hϕ : ∀ (ψ : ↥O →ₗ[R] R), ¬ϕ.submoduleImage N < ψ.submoduleImage N)

(ϕy_eq : ϕ ⟨y, ⋯⟩ = Submodule.IsPrincipal.generator (ϕ.submoduleImage N))

Submodule.IsPrincipal.generator (ϕ.submoduleImage N) ∣ ψ ⟨y, ⋯⟩


/-- An induction principle for span membership. This is a version of `Submodule.span_induction`
for binary predicates. -/
theorem span_induction₂ {p : M → M → Prop} {a b : M} (ha : a ∈ Submodule.span R s)
    (hb : b ∈ Submodule.span R s) (mem_mem : ∀ x ∈ s, ∀ y ∈ s, p x y)
    (zero_left : ∀ y, p 0 y) (zero_right : ∀ x, p x 0)
    (add_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ + x₂) y)
    (add_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ + y₂))
    (smul_left : ∀ (r : R) x y, p x y → p (r • x) y)
    (smul_right : ∀ (r : R) x y, p x y → p x (r • y)) : p a b

(add_left : ∀ (x₁ x₂ y : M), p x₁ y → p x₂ y → p (x₁ + x₂) y)

(add_right : ∀ (x y₁ y₂ : M), p x y₁ → p x y₂ → p x (y₁ + y₂))

(smul_left : ∀ (r : R) (x y : M), p x y → p (r • x) y)

(smul_right : ∀ (r : R) (x y : M), p x y → p x (r • y))


@[simp]
theorem sup'_le_iff {a : α} : s.sup' H f ≤ a ↔ ∀ b ∈ s, f b ≤ a

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
{s : Finset β}
(H : s.Nonempty)
(f : β → α)
{a : α}