theorem length_pos_of_head_eq_head_of_last_eq_last_of_length_pos {s₁ s₂ : CompositionSeries X}
    (hb : s₁.head = s₂.head) (ht : s₁.last = s₂.last) : 0 < s₁.length → 0 < s₂.length

(hb : RelSeries.head s₁ = RelSeries.head s₂)

(ht : RelSeries.last s₁ = RelSeries.last s₂)


theorem Results.mem {s : Computation α} {a n} : Results s a n → a ∈ s

{α : Type u}
{s : Computation α}
{a : α}
{n : ℕ}


/-- Reformulation of `ZetaAsymptotics.term_tsum_of_lt` which is useful for some computations
below. -/
lemma zeta_limit_aux1 {s : ℝ} (hs : 1 < s) :
    (∑' n : ℕ, 1 / (n + 1 : ℝ) ^ s) - 1 / (s - 1) = 1 - s * term_tsum s

∑' (n : ℕ), 1 / (↑n + 1) ^ s - 1 / (s - 1) = 1 - s * ZetaAsymptotics.term_tsum s


@[to_additive]
theorem HasProd.nat_mul_neg {f : ℤ → M} (hf : HasProd f m) :
    HasProd (fun n : ℕ ↦ f n * f (-n)) (m * f 0)

{M : Type u_1}
[CommMonoid M]
[TopologicalSpace M]
{m : M}
[ContinuousMul M]
{f : ℤ → M}
(hf : HasProd f m)

HasProd (fun n => f ↑n * f (-↑n)) (m * f 0)


theorem fderiv_sub_const (c : F) : fderiv 𝕜 (fun y => f y - c) x = fderiv 𝕜 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}
{x : E}
(c : F)


@[simp] lemma unop_inv_rightUnitor (X : Cᵒᵖ) : (ρ_ X).inv.unop = (ρ_ (unop X)).hom

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

(CategoryTheory.MonoidalCategory.rightUnitor X).inv.unop =
  (CategoryTheory.MonoidalCategory.rightUnitor (Opposite.unop X)).hom


protected lemma Directed.le_iSup (hf : Directed (· ≤ ·) f) (i : ι) : f i ≤ ⨆ j, f j

(hf : Directed (fun x x_1 => x ≤ x_1) f)


lemma StrictAntiOn.mapsTo_Ioc (h : StrictAntiOn f (Icc a b)) :
    MapsTo f (Ioc a b) (Ico (f b) (f a))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[PartialOrder α]
[Preorder β]
{a b : α}
(h : StrictAntiOn f (Set.Icc a b))

Set.MapsTo f (Set.Ioc a b) (Set.Ico (f b) (f a))


@[simp]
lemma residueFieldMap_comp {Z : LocallyRingedSpace.{u}} (g : Y ⟶ Z) (x : X) :
    residueFieldMap (f ≫ g) x = residueFieldMap g (f.val.base x) ≫ residueFieldMap f x

{X Y : AlgebraicGeometry.LocallyRingedSpace}

AlgebraicGeometry.LocallyRingedSpace.residueFieldMap (f ≫ g) x =
  AlgebraicGeometry.LocallyRingedSpace.residueFieldMap g (f.val.base x) ≫
    AlgebraicGeometry.LocallyRingedSpace.residueFieldMap f x


@[simp]
theorem coe_toWeakDualBCNN (μ : FiniteMeasure Ω) : ⇑μ.toWeakDualBCNN = μ.testAgainstNN

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
[OpensMeasurableSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)


theorem ae_restrict_mem₀ (hs : NullMeasurableSet s μ) : ∀ᵐ x ∂μ.restrict s, x ∈ s

(hs : MeasureTheory.NullMeasurableSet s μ)


/-- We give an expression of the `LSeries.term` of the convolution of two functions
in terms of a sum over `Nat.divisorsAntidiagonal`. -/
lemma term_convolution (f g : ℕ → ℂ) (s : ℂ) (n : ℕ) :
    term (f ⍟ g) s n = ∑ p ∈ n.divisorsAntidiagonal, term f s p.1 * term g s p.2

LSeries.term (f ⍟ g) s n = ∑ p ∈ n.divisorsAntidiagonal, LSeries.term f s p.1 * LSeries.term g s p.2


@[to_additive] lemma mulEnergy_mono_left (hs : s₁ ⊆ s₂) : Eₘ[s₁, t] ≤ Eₘ[s₂, t]

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


@[simp]
theorem mk_toPartENat_of_infinite [h : Infinite α] : toPartENat #α = ⊤


theorem IsInternal.collectedBasis_repr_of_mem_ne (h : IsInternal A) {α : ι → Type*}
    (v : ∀ i, Basis (α i) R (A i)) {x : M} {i j : ι} (hij : i ≠ j) {a : α j} (hx : x ∈ A i) :
    (h.collectedBasis v).repr x ⟨j, a⟩ = 0

{R : Type u}
[Semiring R]
{ι : Type v}
[dec_ι : DecidableEq ι]
{M : Type u_1}
[AddCommMonoid M]
[Module R M]
{A : ι → Submodule R M}
(h : DirectSum.IsInternal A)
{α : ι → Type u_2}
(v : (i : ι) → Basis (α i) R ↥(A i))
{x : M}
{i j : ι}
(hij : i ≠ j)
{a : α j}
(hx : x ∈ A i)

((h.collectedBasis v).repr x) ⟨j, a⟩ = 0


/-- A heavily unfolded version of the definition of multiplication -/
theorem mul_eq_sum_support_ghas_mul [∀ (i : ι) (x : A i), Decidable (x ≠ 0)] (a a' : ⨁ i, A i) :
    a * a' =
      ∑ ij ∈ DFinsupp.support a ×ˢ DFinsupp.support a',
        DirectSum.of _ _ (GradedMonoid.GMul.mul (a ij.fst) (a' ij.snd))

[(i : ι) → (x : A i) → Decidable (x ≠ 0)]

a * a' =
  ∑ ij ∈ DFinsupp.support a ×ˢ DFinsupp.support a',
    (DirectSum.of A (ij.1 + ij.2)) (GradedMonoid.GMul.mul (a ij.1) (a' ij.2))


lemma mem_of_egauge_lt_one (hs : Balanced 𝕜 s) (hx : egauge 𝕜 s x < 1) : x ∈ s

{𝕜 : Type u_1}
[NormedDivisionRing 𝕜]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
{x : E}
(hs : Balanced 𝕜 s)
(hx : egauge 𝕜 s x < 1)


@[to_additive]
theorem mk_one_eq_monoidOf_mk (x) : mk x 1 = (monoidOf S).toMap x

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
(x : M)

AddLocalization.mk x 0 = (AddLocalization.addMonoidOf S).toMap x


/-- A corollary of Liouville's theorem where the function tends to a finite value at infinity
(i.e., along `Filter.cocompact`, which in proper spaces coincides with `Bornology.cobounded`). -/
theorem apply_eq_of_tendsto_cocompact [Nontrivial E] {f : E → F} (hf : Differentiable ℂ f) {c : F}
    (x : E) (hb : Tendsto f (cocompact E) (𝓝 c)) : f x = c

(hb : Filter.Tendsto f (Filter.cocompact E) (𝓝 c))


@[simp] theorem natAbs_div (a b : Int) : natAbs (a.div b) = (natAbs a).div (natAbs b)

(a.div b).natAbs = a.natAbs.div b.natAbs


theorem lookup_cons [BEq α] {k : α} :
    ((k,b)::es).lookup a = match a == k with | true => some b | false => es.lookup a

∀ {β : Type u_1} {b : β} {es : List (α × β)} {a : α} [inst : BEq α] {k : α},
  List.lookup a ({ fst := k, snd := b } :: es) =
    match a == k with
    | true => some b
    | false => List.lookup a es


/-- Reinterpret a bounded lattice homomorphism as a bounded lattice homomorphism between the dual
bounded lattices. -/
@[simps]
protected def dual : BoundedLatticeHom α β ≃ BoundedLatticeHom αᵒᵈ βᵒᵈ

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[BoundedOrder α]
[Lattice β]
[BoundedOrder β]
(f : BoundedLatticeHom α β)

(BoundedLatticeHom.dual f).toLatticeHom = LatticeHom.dual f.toLatticeHom


/-- In a preadditive category, if all binary products exist, then all binary biproducts exist. -/
theorem HasBinaryBiproducts.of_hasBinaryProducts [HasBinaryProducts C] : HasBinaryBiproducts C


@[simp]
theorem bracket_tmul (s t : A) (x : L) (y : M) : ⁅s ⊗ₜ[R] x, t ⊗ₜ[R] y⁆ = (s * t) ⊗ₜ ⁅x, y⁆

(R : Type u_1)
(A : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[CommRing A]
[Algebra R A]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(s t : A)
(x : L)
(y : M)

⁅s ⊗ₜ[R] x, t ⊗ₜ[R] y⁆ = (s * t) ⊗ₜ[R] ⁅x, y⁆


theorem measurableSet_Ioo : MeasurableSet (Box.Ioo I)

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


theorem contract_expand {f : R[X]} (hp : p ≠ 0) : contract p (expand R p f) = f

{R : Type u}
[CommSemiring R]
(p : ℕ)
{f : R[X]}
(hp : p ≠ 0)

Polynomial.contract p ((Polynomial.expand R p) f) = f


@[simp]
theorem _root_.Cardinal.natCast_le_toPartENat_iff {n : ℕ} {c : Cardinal} :
    ↑n ≤ toPartENat c ↔ ↑n ≤ c


@[simp]
theorem revAt_le {N i : ℕ} (H : i ≤ N) : revAt N i = N - i


/-- `stdSimplex ℝ ι` is closed. -/
theorem isClosed_stdSimplex : IsClosed (stdSimplex ℝ ι)


@[simps]
instance : MonoidalCategoryStruct (FullSubcategory P)

(𝟙_ (CategoryTheory.FullSubcategory P)).obj = 𝟙_ C


theorem div_re (z w : K) : re (z / w) = re z * re w / normSq w + im z * im w / normSq w

RCLike.re (z / w) = RCLike.re z * RCLike.re w / RCLike.normSq w + RCLike.im z * RCLike.im w / RCLike.normSq w


theorem eq_ones_iff_le_length {c : Composition n} : c = ones n ↔ n ≤ c.length


@[simp] theorem ratio_one : ratio (1 : α →ᵈ α) = 1


/-- If the zero root subalgebra of a nilpotent Lie subalgebra `H` is just `H` then `H` is a Cartan
subalgebra.

When `L` is Noetherian, it follows from Engel's theorem that the converse holds. See
`LieAlgebra.zeroRootSubalgebra_eq_iff_is_cartan` -/
theorem is_cartan_of_zeroRootSubalgebra_eq (h : zeroRootSubalgebra R L H = H) :
    H.IsCartanSubalgebra

(h : LieAlgebra.zeroRootSubalgebra R L H = H)


theorem Balanced.neg_mem_iff [NormOneClass 𝕜] (h : Balanced 𝕜 s) {x : E} : -x ∈ s ↔ x ∈ s

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
[NormOneClass 𝕜]
(h : Balanced 𝕜 s)
{x : E}


theorem fst_iInf [InfSet α] [InfSet β] (f : ι → α × β) : (iInf f).fst = ⨅ i, (f i).fst

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[InfSet α]
[InfSet β]
(f : ι → α × β)


theorem suppPreservation_iff_liftpPreservation : q.SuppPreservation ↔ q.LiftpPreservation


theorem rpow_le_one_of_one_le_of_nonpos {x z : ℝ} (hx : 1 ≤ x) (hz : z ≤ 0) : x ^ z ≤ 1


theorem Equiv.age_eq_age (MN : M ≃[L] N) : L.age M = L.age N

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{N : Type w}
[L.Structure N]
(MN : M ≃[L] N)


@[simp]
theorem prod_snd : (p.prod q).snd = (p.snd, q.snd)

{α : Type u_1}
{β : Type u_2}
(p : TwoPointing α)
(q : TwoPointing β)


@[to_additive]
theorem smul_diff_smul (g : G) : diff ϕ (g • S) (g • T) = diff ϕ S T

{G : Type u_1}
[Group G]
{H : Subgroup G}
{A : Type u_2}
[CommGroup A]
(ϕ : ↥H →* A)
(S T : ↑(Subgroup.leftTransversals ↑H))
[H.FiniteIndex]
(g : G)

Subgroup.leftTransversals.diff ϕ (g • S) (g • T) = Subgroup.leftTransversals.diff ϕ S T


/-- `has_image f` means that there exists an image factorisation of `f`. -/
class HasImage (f : X ⟶ Y) : Prop where mk' ::
  exists_image : Nonempty (ImageFactorisation f)

[self : CategoryTheory.Limits.HasImage f]


lemma logb_self_eq_one_iff : logb b b = 1 ↔ b ≠ 0 ∧ b ≠ 1 ∧ b ≠ -1

Real.logb b b = 1 ↔ b ≠ 0 ∧ b ≠ 1 ∧ b ≠ -1


/-- The obvious triangle `X₁ ⟶ X₁ ⊞ X₂ ⟶ X₂ ⟶ X₁⟦1⟧`. -/
@[simps!]
def binaryBiproductTriangle (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryBiproduct X₁ X₂] :
    Triangle C

(CategoryTheory.Pretriangulated.binaryBiproductTriangle X₁ X₂).mor₂ = CategoryTheory.Limits.biprod.snd


theorem max_eq_sup_withBot (s : Finset α) : s.max = sup s (↑)

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


theorem piecewise_insert_self {j : α} [∀ i, Decidable (i ∈ insert j s)] :
    (insert j s).piecewise f g j = f j

{α : Type u_1}
{δ : α → Sort u_6}
(s : Set α)
(f g : (i : α) → δ i)
{j : α}
[(i : α) → Decidable (i ∈ insert j s)]


theorem Perm.permutations {s t : List α} (h : s ~ t) : permutations s ~ permutations t

{α : Type u_1}
{s t : List α}
(h : s.Perm t)


@[to_additive]
theorem Equiv.tprod_eq_tprod_of_mulSupport {f : β → α} {g : γ → α}
    (e : mulSupport f ≃ mulSupport g) (he : ∀ x, g (e x) = f x) :
    ∏' x, f x = ∏' y, g y

(e : ↑(Function.mulSupport f) ≃ ↑(Function.mulSupport g))

(he : ∀ (x : ↑(Function.mulSupport f)), g ↑(e x) = f ↑x)


lemma add_self (P : Fin 3 → R) : W'.add P P = W'.dblXYZ P

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
(P : Fin 3 → R)


theorem nextCoeff_map (hf : Injective f) (p : R[X]) : (p.map f).nextCoeff = f p.nextCoeff

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

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


/-- A version of `uniformContinuous_sInf_dom` for binary functions -/
theorem uniformContinuous_sInf_dom₂ {α β γ} {f : α → β → γ} {uas : Set (UniformSpace α)}
    {ubs : Set (UniformSpace β)} {ua : UniformSpace α} {ub : UniformSpace β} {uc : UniformSpace γ}
    (ha : ua ∈ uas) (hb : ub ∈ ubs) (hf : UniformContinuous fun p : α × β => f p.1 p.2) : by
      haveI := sInf uas; haveI := sInf ubs
      exact @UniformContinuous _ _ _ uc fun p : α × β => f p.1 p.2

{f : α → β → γ}

(hf : UniformContinuous fun p => f p.1 p.2)


theorem dist_of_re_eq {z w : ℂ} (h : z.re = w.re) : dist z w = dist z.im w.im


theorem totalDegree_pow (a : MvPolynomial σ R) (n : ℕ) :
    (a ^ n).totalDegree ≤ n * a.totalDegree

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(a : MvPolynomial σ R)
(n : ℕ)


@[simp]
theorem reduceOption_map {l : List (Option α)} {f : α → β} :
    reduceOption (map (Option.map f) l) = map f (reduceOption l)

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

(List.map (Option.map f) l).reduceOption = List.map f l.reduceOption


/-- Converting a bundled algebra to a monoid object in `ModuleCat R`.
-/
@[simps]
def inverse : AlgebraCat.{u} R ⥤ Mon_ (ModuleCat.{u} R)

∀ {X Y : AlgebraCat R} (f : X ⟶ Y), (ModuleCat.MonModuleEquivalenceAlgebra.inverse.map f).hom = AlgHom.toLinearMap f


lemma mem_prev [e.IsTruncLE] {i' : ι'} {j : ι} (h : c'.Rel i' (e.f j)) : ∃ i, e.f i = i'

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(e : c.Embedding c')
[e.IsTruncLE]
{i' : ι'}
{j : ι}
(h : c'.Rel i' (e.f j))


theorem inducing_toProd : Inducing (TotalSpace.toProd B F)

(B : Type u_1)
(F : Type u_2)
[TopologicalSpace B]
[TopologicalSpace F]

Inducing ⇑(Bundle.TotalSpace.toProd B F)


@[to_additive]
theorem smul_mem_smul : a ∈ s → b ∈ t → a • b ∈ s • t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{s : Finset α}
{t : Finset β}
{a : α}
{b : β}


theorem iterateFrobeniusEquiv_def (x : R) : iterateFrobeniusEquiv R p n x = x ^ p ^ n

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

(iterateFrobeniusEquiv R p n) x = x ^ p ^ n


@[simp]
theorem order_mul {Γ} [LinearOrderedCancelAddCommMonoid Γ] [NonUnitalNonAssocSemiring R]
    [NoZeroDivisors R] {x y : HahnSeries Γ R} (hx : x ≠ 0) (hy : y ≠ 0) :
    (x * y).order = x.order + y.order

{R : Type u_3}
{Γ : Type u_5}
[LinearOrderedCancelAddCommMonoid Γ]
[NonUnitalNonAssocSemiring R]
[NoZeroDivisors R]
{x y : HahnSeries Γ R}
(hx : x ≠ 0)
(hy : y ≠ 0)


theorem Antitone.mul_const [MulPosMono α]
    (hf : Antitone f) (ha : 0 ≤ a) : Antitone fun x => f x * a

{α : Type u}
{β : Type u_1}
[Semiring α]
[Preorder α]
{a : α}
[Preorder β]
{f : β → α}
[MulPosMono α]
(hf : Antitone f)
(ha : 0 ≤ a)


@[simp]
theorem append_take_drop : ∀ (n : ℕ) (s : Stream' α),
    appendStream' (take n s) (drop n s) = s

Stream'.take n s ++ₛ Stream'.drop n s = s


/-- If `a` is the greatest lower bound of `s` and `b` is the greatest lower bound of `t`,
then `a ⊓ b` is the greatest lower bound of `s ∪ t`. -/
theorem IsGLB.union [SemilatticeInf γ] {a₁ a₂ : γ} {s t : Set γ} (hs : IsGLB s a₁)
    (ht : IsGLB t a₂) : IsGLB (s ∪ t) (a₁ ⊓ a₂)

{γ : Type w}
[SemilatticeInf γ]
{a₁ a₂ : γ}
{s t : Set γ}
(hs : IsGLB s a₁)
(ht : IsGLB t a₂)


@[to_additive (attr := simp)]
theorem inf_apply : (p ⊓ q) x = ⨅ y, p y + q (x / y)

{E : Type u_4}
[AddCommGroup E]
(p q : AddGroupSeminorm E)
(x : E)


@[to_additive (attr := simp)]
theorem isBoundedUnder_ge_inv [OrderedCommGroup α] {l : Filter β} {u : β → α} :
    (IsBoundedUnder (· ≥ ·) l fun x => (u x)⁻¹) ↔ IsBoundedUnder (· ≤ ·) l u

{α : Type u_1}
{β : Type u_2}
[OrderedAddCommGroup α]
{l : Filter β}
{u : β → α}

(Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) l fun x => -u x) ↔ Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l u


/-- The argument of `1 + z` for `z` in the open unit disc is always in `(-π / 2, π / 2)`. -/
lemma arg_one_add_mem_Ioo {z : ℂ} (hz : ‖z‖ < 1) : (1 + z).arg ∈ Set.Ioo (-(π / 2)) (π / 2)

(1 + z).arg ∈ Set.Ioo (-(Real.pi / 2)) (Real.pi / 2)


theorem unbounded_ge_of_forall_exists_gt [Preorder α] (h : ∀ a, ∃ b ∈ s, b < a) :
    Unbounded (· ≥ ·) s

{α : Type u_1}
{s : Set α}
[Preorder α]
(h : ∀ (a : α), ∃ b ∈ s, b < a)


protected theorem surjective (e : α ≃ᵐ β) : Surjective e

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
(e : α ≃ᵐ β)


theorem heq_rec_iff_heq {C : α → Sort*} {x : β} {y : C a} {e : a = b} :
    HEq x (e ▸ y) ↔ HEq x y

{α : Sort u_2}
{β : Sort u_1}
{a b : α}
{C : α → Sort u_1}
{x : β}
{y : C a}
{e : a = b}


theorem StrictConvexOn.secant_strict_mono_aux1 (hf : StrictConvexOn 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s)
    (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (z - x) * f y < (z - y) * f x + (y - x) * f z

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
(hf : StrictConvexOn 𝕜 s f)
{x y z : 𝕜}
(hx : x ∈ s)
(hz : z ∈ s)
(hxy : x < y)
(hyz : y < z)


@[simps tensorObj_X tensorHom_hom]
instance monMonoidalStruct : MonoidalCategoryStruct (Mon_ C)

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

∀ {X₁ Y₁ X₂ Y₂ : Mon_ C} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂), (f ⊗ g).hom = f.hom ⊗ g.hom


@[to_additive]
lemma sup_div (a b c : α) : (a ⊔ b) / c = a / c ⊔ b / c

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


private lemma mul_le_mul_of_nonneg_left {R : Type*} [CommSemiring R] [PartialOrder R]
    [StarRing R] [StarOrderedRing R] {a b c : R} (hab : a ≤ b) (hc : 0 ≤ c) : c * a ≤ c * b

{R : Type u_1}
[CommSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{a b c : R}
(hab : a ≤ b)
(hc : 0 ≤ c)


theorem ne_zero_and_ne_zero_of_mul (h : a * b ≠ 0) : a ≠ 0 ∧ b ≠ 0

{M₀ : Type u_2}
[MulZeroClass M₀]
{a b : M₀}
(h : a * b ≠ 0)


/-- Copy a unit, adjusting definition equalities. -/
@[to_additive (attr := simps) "Copy an `AddUnit`, adjusting definitional equalities."]
def copy (u : αˣ) (val : α) (hv : val = u) (inv : α) (hi : inv = ↑u⁻¹) : αˣ

{α : Type u}
[AddMonoid α]
(u : AddUnits α)
(val : α)
(hv : val = ↑u)
(inv : α)
(hi : inv = ↑(-u))


@[mono]
theorem toSubmonoid_strictMono : StrictMono (toSubmonoid : Subsemiring R → Submonoid R)


lemma zeckendorf_sum_fib : ∀ {l}, IsZeckendorfRep l → zeckendorf (l.map fib).sum = l

l.IsZeckendorfRep → (List.map Nat.fib l).sum.zeckendorf = l


@[simp]
theorem neg_top : -(⊤ : EReal) = ⊥


theorem Memℒp.norm {f : α → E} (h : Memℒp f p μ) : Memℒp (fun x => ‖f x‖) p μ

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

MeasureTheory.Memℒp (fun x => ‖f x‖) p μ


@[simp, norm_cast]
theorem measurable_coe_nnreal_real_iff {f : α → ℝ≥0} :
    Measurable (fun x => f x : α → ℝ) ↔ Measurable f

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ≥0}

(Measurable fun x => ↑(f x)) ↔ Measurable f


@[simp] theorem rid_toLinearEquiv :
    (TensorProduct.rid R S A).toLinearEquiv = AlgebraTensorModule.rid R S A

(R : Type uR)
(S : Type uS)
(A : Type uA)
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]

(Algebra.TensorProduct.rid R S A).toLinearEquiv = TensorProduct.AlgebraTensorModule.rid R S A


@[simp]
theorem curryFinFinset_symm_apply_const {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k)
    (hl : sᶜ.card = l)
    (f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
    (x : M') : ((curryFinFinset R M₂ M' hk hl).symm f fun _ => x) = f (fun _ => x) fun _ => x

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

(((MultilinearMap.curryFinFinset R M₂ M' hk hl).symm f) fun x_1 => x) = (f fun x_1 => x) fun x_1 => x


/-- An embedding of a complex shape `c : ComplexShape ι` into a complex shape
`c' : ComplexShape ι'` consists of a injective map `f : ι → ι'` which satisfies
a compatiblity with respect to the relations `c.Rel` and `c'.Rel`. -/
structure Embedding where
  /-- the map between the underlying types of indices -/
  f : ι → ι'
  injective_f : Function.Injective f
  rel {i₁ i₂ : ι} (h : c.Rel i₁ i₂) : c'.Rel (f i₁) (f i₂)

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
(self : c.Embedding c')
{i₁ i₂ : ι}
(h : c.Rel i₁ i₂)


theorem IsLittleO.sub (h₁ : f₁ =o[l] g) (h₂ : f₂ =o[l] g) : (fun x => f₁ x - f₂ x) =o[l] g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{g : α → F}
{l : Filter α}
{f₁ f₂ : α → E'}
(h₁ : f₁ =o[l] g)
(h₂ : f₂ =o[l] g)


theorem restrict_restrict {X : TopCat} {C : Type*} [Category C] [ConcreteCategory C]
    {F : X.Presheaf C} {U V W : Opens X} (e₁ : U ≤ V) (e₂ : V ≤ W) (x : F.obj (op W)) :
    x |_ V |_ U = x |_ U

(x : (CategoryTheory.forget C).obj (F.obj (Opposite.op W)))

TopCat.Presheaf.restrictOpen (TopCat.Presheaf.restrictOpen x V e₂) U e₁ = TopCat.Presheaf.restrictOpen x U ⋯


@[reassoc (attr := simp)]
theorem diagramCompIso_hom_ι (X : C) (W : (J.Cover X)ᵒᵖ) (i : W.unop.Arrow) :
    (J.diagramCompIso F P X).hom.app W ≫ Multiequalizer.ι ((unop W).index (P ⋙ F)) i =
  F.map (Multiequalizer.ι _ _)

(J : CategoryTheory.GrothendieckTopology C)

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

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

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

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

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

CategoryTheory.CategoryStruct.comp ((J.diagramCompIso F P X).hom.app W)
    (CategoryTheory.Limits.Multiequalizer.ι ((Opposite.unop W).index (P.comp F)) i) =
  F.map (CategoryTheory.Limits.Multiequalizer.ι ((Opposite.unop W).index P) i)


/-- The functor `(C ⥤ D) ⥤ (Arrow C ⥤ Arrow D)` which sends
a functor `F : C ⥤ D` to `F.mapArrow`. -/
@[simps]
def mapArrowFunctor : (C ⥤ D) ⥤ (Arrow C ⥤ Arrow D)

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

(CategoryTheory.Functor.mapArrowFunctor C D).obj F = F.mapArrow


@[simp]
lemma whiskerLeftIso_symm (W : C) {X Y : C} (f : X ≅ Y) :
    (whiskerLeftIso W f).symm = whiskerLeftIso W f.symm

{C : Type u}
[𝒞 : CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
(W : C)
{X Y : C}
(f : X ≅ Y)

(CategoryTheory.MonoidalCategory.whiskerLeftIso W f).symm = CategoryTheory.MonoidalCategory.whiskerLeftIso W f.symm


@[to_additive (attr := simp)]
lemma univ_div_univ : (univ / univ : Set α) = univ


theorem eleven_dvd_iff :
    11 ∣ n ↔ (11 : ℤ) ∣ ((digits 10 n).map fun n : ℕ => (n : ℤ)).alternatingSum

11 ∣ n ↔ 11 ∣ (List.map (fun n => ↑n) (Nat.digits 10 n)).alternatingSum


@[simp, norm_cast]
theorem ofReal_div (r s : ℝ) : ((r / s : ℝ) : ℂ) = r / s


lemma nhdsWithin_compl_singleton_le [T1Space X] (x y : X) : 𝓝[{x}ᶜ] x ≤ 𝓝[{y}ᶜ] x

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
(x y : X)


@[simp] theorem natAdd_mk (n i : Nat) (hi : i < m) :
    natAdd n ⟨i, hi⟩ = ⟨n + i, Nat.add_lt_add_left hi n⟩


@[to_additive addIndex_pos]
theorem index_pos (K : PositiveCompacts G) {V : Set G} (hV : (interior V).Nonempty) :
    0 < index (K : Set G) V

(K : TopologicalSpace.PositiveCompacts G)

0 < MeasureTheory.Measure.haar.addIndex (↑K) V


theorem commutator_le_right [h : H₂.Normal] : ⁅H₁, H₂⁆ ≤ H₂

{G : Type u_1}
[Group G]
(H₁ H₂ : Subgroup G)
[h : H₂.Normal]

⁅H₁, H₂⁆ ≤ H₂


theorem nil_subperm {l : List α} : [] <+~ l


@[simp]
lemma filter_univ_mem (s : Finset α) : univ.filter (· ∈ s) = s

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

Finset.filter (fun x => x ∈ s) Finset.univ = s


/-- **Spectral permanence.** The spectrum of an element is invariant of the (closed)
`StarSubalgebra` in which it is contained. -/
theorem StarSubalgebra.spectrum_eq {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A)) (x : S) :
    spectrum ℂ x = spectrum ℂ (x : A)

{A : Type u_1}
[NormedRing A]
[NormedAlgebra ℂ A]
[StarRing A]
[CstarRing A]
[StarModule ℂ A]
[CompleteSpace A]
{S : StarSubalgebra ℂ A}
(hS : IsClosed ↑S)
(x : ↥S)


private theorem sq_le_two_pow_add_one_minus_three (n : ℕ) : n ^ 2 ≤ 2 ^ (n + 1) - 3


@[simp]
theorem reverse_nil : nil.reverse = @nil α


lemma negMap_of_Z_ne_zero {P : Fin 3 → F} (hPz : P z ≠ 0) :
    W.negMap ⟦P⟧ = ⟦![P x / P z ^ 2, W.toAffine.negY (P x / P z ^ 2) (P y / P z ^ 3), 1]⟧

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hPz : P z ≠ 0)


/-- Forward map of `Trivialization.continuousLinearEquivAt` (only propositionally equal),
  defined everywhere (`0` outside domain). -/
@[simps (config := .asFn) apply]
def continuousLinearMapAt (e : Trivialization F (π F E)) [e.IsLinear R] (b : B) : E b →L[R] F

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

⇑(Trivialization.continuousLinearMapAt R e b) = ⇑(Trivialization.linearMapAt R e b)


theorem coeff_X_pow_self (n : ℕ) : coeff (X ^ n : R[X]) n = 1


theorem _root_.MeasureTheory.Integrable.compProd_mk_left_ae ⦃f : β × γ → E⦄
    (hf : Integrable f ((κ ⊗ₖ η) a)) : ∀ᵐ x ∂κ a, Integrable (fun y => f (x, y)) (η (a, x))

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

⦃f : β × γ → E⦄

(hf : MeasureTheory.Integrable f ((κ ⊗ₖ η) a))

∀ᵐ (x : β) ∂κ a, MeasureTheory.Integrable (fun y => f (x, y)) (η (a, x))


@[to_additive (attr := simp)] lemma isSquare_inv : IsSquare a⁻¹ ↔ IsSquare a

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


theorem derivWithin_cos (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    derivWithin (fun x => Real.cos (f x)) s x = -Real.sin (f x) * derivWithin f s x

{f : ℝ → ℝ}
{x : ℝ}
{s : Set ℝ}
(hf : DifferentiableWithinAt ℝ f s x)
(hxs : UniqueDiffWithinAt ℝ s x)


theorem eval_basisDivisor_left_of_ne (hxy : x ≠ y) : eval x (basisDivisor x y) = 1

{F : Type u_1}
[Field F]
{x y : F}
(hxy : x ≠ y)

Polynomial.eval x (Lagrange.basisDivisor x y) = 1


theorem mapsTo_interior (hf : IsOpenMap f) {s : Set X} {t : Set Y} (h : MapsTo f s t) :
    MapsTo f (interior s) (interior t)

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : IsOpenMap f)
{s : Set X}
{t : Set Y}
(h : Set.MapsTo f s t)


/-- A projection from the product of a family of triangles. -/
@[simps]
def productTriangle.π (j : J) :
    productTriangle T ⟶ T j

(T : J → CategoryTheory.Pretriangulated.Triangle C)

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₁]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₂]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₃]

[CategoryTheory.Limits.HasProduct fun j => (CategoryTheory.shiftFunctor C 1).obj (T j).obj₁]

(CategoryTheory.Pretriangulated.productTriangle.π T j).hom₁ = CategoryTheory.Limits.Pi.π (fun j => (T j).obj₁) j


@[simp] theorem imageFactorization_injective_iff : Injective (s.imageFactorization f) ↔ InjOn f s

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

Function.Injective (Set.imageFactorization f s) ↔ Set.InjOn f s


@[to_additive (attr := simp, norm_cast)]
theorem toSubgroup_comap (H : OpenSubgroup N) (f : G →* N) (hf : Continuous f) :
    (H.comap f hf : Subgroup G) = (H : Subgroup N).comap f

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
{N : Type u_2}
[AddGroup N]
[TopologicalSpace N]
(H : OpenAddSubgroup N)
(f : G →+ N)
(hf : Continuous ⇑f)

↑(OpenAddSubgroup.comap f hf H) = AddSubgroup.comap f ↑H


@[simp] lemma evalEquiv_toLinearMap : evalEquiv R M = Dual.eval R M

(R : Type u_1)
(M : Type u_2)
[CommRing R]
[AddCommGroup M]
[Module R M]
[Module.IsReflexive R M]

↑(Module.evalEquiv R M) = Module.Dual.eval R M


theorem lie_mem_weightSpace_of_mem_weightSpace {χ₁ χ₂ : H → R} {x : L} {m : M}
    (hx : x ∈ rootSpace H χ₁) (hm : m ∈ weightSpace M χ₂) : ⁅x, m⁆ ∈ weightSpace M (χ₁ + χ₂)

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{H : LieSubalgebra R L}
[LieAlgebra.IsNilpotent R ↥H]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{χ₁ χ₂ : ↥H → R}
{x : L}
{m : M}
(hx : x ∈ LieAlgebra.rootSpace H χ₁)
(hm : m ∈ LieModule.weightSpace M χ₂)

⁅x, m⁆ ∈ LieModule.weightSpace M (χ₁ + χ₂)


lemma add_two_le_iff_lt_of_even_sub {m n : ℤ} (even : Even (n - m)) : m + 2 ≤ n ↔ m < n


/-- If `f : 𝕜 → 𝕜` is strictly convex, then for any three points `x < y < z` the slope of the
secant line of `f` on `[x, y]` is strictly less than the slope of the secant line of `f` on
`[y, z]`. -/
theorem StrictConvexOn.slope_strict_mono_adjacent (hf : StrictConvexOn 𝕜 s f) {x y z : 𝕜}
    (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) :
    (f y - f x) / (y - x) < (f z - f y) / (z - y)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
(hf : StrictConvexOn 𝕜 s f)
{x y z : 𝕜}
(hx : x ∈ s)
(hz : z ∈ s)
(hxy : x < y)
(hyz : y < z)


theorem map_expand {p : ℕ} {f : R →+* S} {q : R[X]} :
    map f (expand R p q) = expand S p (map f q)

{R : Type u}
[CommSemiring R]
{S : Type v}
[CommSemiring S]
{p : ℕ}
{f : R →+* S}
{q : R[X]}

Polynomial.map f ((Polynomial.expand R p) q) = (Polynomial.expand S p) (Polynomial.map f q)


theorem tendstoLocallyUniformly_iff_filter :
    TendstoLocallyUniformly F f p ↔ ∀ x, TendstoUniformlyOnFilter F f p (𝓝 x)

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{p : Filter ι}
[TopologicalSpace α]

TendstoLocallyUniformly F f p ↔ ∀ (x : α), TendstoUniformlyOnFilter F f p (𝓝 x)


/-- A complete linear order is a linear order whose lattice structure is complete. -/
class CompleteLinearOrder (α : Type*) extends CompleteLattice α, BiheytingAlgebra α where
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE

{α : Type u_9}
[self : CompleteLinearOrder α]
(a b : α)


@[simp]
theorem symm_trans_self : e.symm.trans e = refl 𝕜 P₂

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

e.symm.trans e = AffineIsometryEquiv.refl 𝕜 P₂


/-- **Rolle's Theorem**, a version for a function on an open interval: if `f` has the same limit
`l` at `𝓝[>] a` and `𝓝[<] b`, then `deriv f c = 0` for some `c ∈ (a, b)`. This version
does not require differentiability of `f` because we define `deriv f c = 0` whenever `f` is not
differentiable at `c`. -/
theorem exists_deriv_eq_zero' (hab : a < b) (hfa : Tendsto f (𝓝[>] a) (𝓝 l))
    (hfb : Tendsto f (𝓝[<] b) (𝓝 l)) : ∃ c ∈ Ioo a b, deriv f c = 0

{f : ℝ → ℝ}
{a b l : ℝ}
(hab : a < b)
(hfa : Filter.Tendsto f (𝓝[>] a) (𝓝 l))
(hfb : Filter.Tendsto f (𝓝[<] b) (𝓝 l))


theorem bijection_natural (A B : C) (X X' : D) (f : (reflector i).obj (A ⨯ B) ⟶ X) (g : X ⟶ X') :
    bijection i _ _ _ (f ≫ g) = bijection i _ _ _ f ≫ g

(f : (CategoryTheory.reflector i).obj (A ⨯ B) ⟶ X)

(CategoryTheory.bijection i A B X') (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.bijection i A B X) f) g


theorem gcd_comm (i j : ℤ) : gcd i j = gcd j i


theorem inter_congr_left (ht : s ∩ u ⊆ t) (hu : s ∩ t ⊆ u) : s ∩ t = s ∩ u

{α : Type u}
{s t u : Set α}
(ht : s ∩ u ⊆ t)
(hu : s ∩ t ⊆ u)


/-- If `F` is cofinal,
the category of cocones on `F ⋙ G` is equivalent to the category of cocones on `G`,
for any `G : D ⥤ E`.
-/
@[simps]
def coconesEquiv : Cocone (F ⋙ G) ≌ Cocone G

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

(CategoryTheory.Functor.Final.coconesEquiv F G).functor = CategoryTheory.Functor.Final.extendCocone


@[to_additive]
theorem infEdist_inv (x : E) (s : Set E) : infEdist x⁻¹ s = infEdist x s⁻¹

{E : Type u_1}
[SeminormedCommGroup E]
(x : E)
(s : Set E)

EMetric.infEdist x⁻¹ s = EMetric.infEdist x s⁻¹


theorem of_boundedUnder_abs_im (hre : Tendsto re l atTop)
    (him : IsBoundedUnder (· ≤ ·) l fun z => |z.im|) : IsExpCmpFilter l

(hre : Filter.Tendsto Complex.re l Filter.atTop)

(him : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun z => |z.im|)


@[simp]
theorem concat_cons {u v w x : V} (h : G.Adj u v) (p : G.Walk v w) (h' : G.Adj w x) :
    (cons h p).concat h' = cons h (p.concat h')

{V : Type u}
{G : SimpleGraph V}
{u v w x : V}
(h : G.Adj u v)
(p : G.Walk v w)
(h' : G.Adj w x)

(SimpleGraph.Walk.cons h p).concat h' = SimpleGraph.Walk.cons h (p.concat h')


@[simp]
theorem ofReal_toReal {a : ℝ≥0∞} (h : a ≠ ∞) : ENNReal.ofReal a.toReal = a


theorem take_set_of_lt (a : α) {n m : Nat} (l : List α) (h : m < n) :
    (l.set n a).take m = l.take m

{α : Type u_1}
(a : α)
{n m : Nat}
(l : List α)
(h : m < n)


@[simp]
theorem zero_rightMoves : RightMoves 0 = PEmpty

SetTheory.PGame.RightMoves 0 = PEmpty.{u_1 + 1}


/-- The Schnirelmann density of any finite set is `0`. -/
lemma schnirelmannDensity_finite {A : Set ℕ} [DecidablePred (· ∈ A)] (hA : A.Finite) :
    schnirelmannDensity A = 0

{A : Set ℕ}
[DecidablePred fun x => x ∈ A]
(hA : A.Finite)


theorem eraseLead_ne_zero (f0 : 2 ≤ f.support.card) : eraseLead f ≠ 0

{R : Type u_1}
[Semiring R]
{f : R[X]}
(f0 : 2 ≤ f.support.card)


lemma mono_iff_fst_eq_snd (hc : IsLimit c) : Mono f ↔ c.fst = c.snd

{c : CategoryTheory.Limits.PullbackCone f f}


@[to_additive]
theorem Submonoid.top_closure_mul_self_subset (s : Submonoid M) :
    _root_.closure (s : Set M) * _root_.closure s ⊆ _root_.closure s

{M : Type u_3}
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
(s : Submonoid M)


/-- If the angle between two vectors is `π / 2`, the vectors are not equal. -/
theorem ne_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = (π / 2 : ℝ)) : x ≠ y

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


@[reassoc (attr := simp)]
lemma ι_mapBifunctorMapObjDesc {X : GradedObject I C₁} {Y : GradedObject J C₂} {A : C₃} {k : K}
    [HasMap (((mapBifunctor F I J).obj X).obj Y) p]
    (f : ∀ (i : I) (j : J) (_ : p ⟨i, j⟩ = k), (F.obj (X i)).obj (Y j) ⟶ A)
    (i : I) (j : J) (hij : p ⟨i, j⟩ = k) :
    ιMapBifunctorMapObj F p X Y i j k hij ≫ mapBifunctorMapObjDesc f = f i j hij

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

[(((CategoryTheory.GradedObject.mapBifunctor F I J).obj X).obj Y).HasMap p]

(f : (i : I) → (j : J) → p (i, j) = k → ((F.obj (X i)).obj (Y j) ⟶ A))

CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.ιMapBifunctorMapObj F p X Y i j k hij)
    (CategoryTheory.GradedObject.mapBifunctorMapObjDesc f) =
  f i j hij


/-- Given Localization maps `f : M →* N, k : P →* Q` for Submonoids `S, T` respectively, if a
`CommMonoid` homomorphism `g : M →* P` induces a `f.map hy k : N →* Q`, then for all `z : N`,
`u : Q`, we have `f.map hy k z = u ↔ k (g x) = k (g y) * u` where `x : M, y ∈ S` are such that
`z * f y = f x`. -/
@[to_additive
    "Given Localization maps `f : M →+ N, k : P →+ Q` for Submonoids `S, T` respectively, if an
`AddCommMonoid` homomorphism `g : M →+ P` induces a `f.map hy k : N →+ Q`, then for all `z : N`,
`u : Q`, we have `f.map hy k z = u ↔ k (g x) = k (g y) + u` where `x : M, y ∈ S` are such that
`z + f y = f x`."]
theorem map_spec (z u) : f.map hy k z = u ↔ k.toMap (g (f.sec z).1) = k.toMap (g (f.sec z).2) * u

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{g : M →* P}
{T : Submonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[CommMonoid Q]
{k : T.LocalizationMap Q}
(z : N)
(u : Q)

(f.map hy k) z = u ↔ k.toMap (g (f.sec z).1) = k.toMap (g ↑(f.sec z).2) * u


theorem le_mul_left {a b : Associates α} : a ≤ b * a

{α : Type u_1}
[CommMonoid α]
{a b : Associates α}


@[simp]
theorem pi_neBot : NeBot (pi f) ↔ ∀ i, NeBot (f i)

{ι : Type u_1}
{α : ι → Type u_2}
{f : (i : ι) → Filter (α i)}

(Filter.pi f).NeBot ↔ ∀ (i : ι), (f i).NeBot


@[simp]
theorem equivToOpposite_coe : (equivToOpposite : α → αᵒᵖ) = op


theorem spanSingleton_eq_zero_iff {y : P} : spanSingleton S y = 0 ↔ y = 0

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
{y : P}

FractionalIdeal.spanSingleton S y = 0 ↔ y = 0


lemma Ico_inl_inl :
    Ico (inlₗ a₁ : α ⊕ₗ β) (inlₗ a₂) = (Ico a₁ a₂).map (Embedding.inl.trans toLex.toEmbedding)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[OrderTop α]
[OrderBot β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a₁ a₂ : α)

Finset.Ico (Sum.inlₗ a₁) (Sum.inlₗ a₂) = Finset.map (Function.Embedding.inl.trans toLex.toEmbedding) (Finset.Ico a₁ a₂)


@[simp] theorem cond_eq_false_distrib : ∀(c t f : Bool),
    (cond c t f = false) = ite (c = true) (t = false) (f = false)

((bif c then t else f) = false) = if c = true then t = false else f = false


theorem assoc_aux_1 (a₁ a₂ : A) (b₁ b₂ : B) (c₁ c₂ : C) :
    (TensorProduct.assoc R A B C) (((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) ⊗ₜ[R] (c₁ * c₂)) =
      (TensorProduct.assoc R A B C) ((a₁ ⊗ₜ[R] b₁) ⊗ₜ[R] c₁) *
        (TensorProduct.assoc R A B C) ((a₂ ⊗ₜ[R] b₂) ⊗ₜ[R] c₂)

{R : Type uR}
{A : Type uA}
{B : Type uB}
{C : Type uC}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[Semiring C]
[Algebra R C]
(a₁ a₂ : A)
(b₁ b₂ : B)
(c₁ c₂ : C)


@[simp]
theorem coe_inverse (f : A →ₙₐ[R] B₁) (g : B₁ → A) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : (inverse f g h₁ h₂ : B₁ → A) = g

{R : Type u}
[Monoid R]
{A : Type v}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
{B₁ : Type u_2}
[NonUnitalNonAssocSemiring B₁]
[DistribMulAction R B₁]
(f : A →ₙₐ[R] B₁)
(g : B₁ → A)
(h₁ : Function.LeftInverse g ⇑f)
(h₂ : Function.RightInverse g ⇑f)


@[simp]
theorem count_pos_iff_mem {a : α} {l : List α} : 0 < count a l ↔ a ∈ l

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


@[simps]
instance subgraphInhabited : Inhabited (Subgraph G)


@[simp]
theorem single_le_iff {i : ι} {x : α} {f : ι →₀ α} : single i x ≤ f ↔ x ≤ f i

{ι : Type u_1}
{α : Type u_2}
[CanonicallyOrderedAddCommMonoid α]
{i : ι}
{x : α}
{f : ι →₀ α}


/-- The determinant of `conjLIE`, as a linear equiv. -/
@[simp]
theorem linearEquiv_det_conjLIE : LinearEquiv.det conjLIE.toLinearEquiv = -1

LinearEquiv.det Complex.conjLIE.toLinearEquiv = -1


theorem map_comap_eq_self
    {f : R →+* S} {t : Subsemiring S} (h : t ≤ f.rangeS) : (t.comap f).map f = t

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{f : R →+* S}
{t : Subsemiring S}
(h : t ≤ f.rangeS)

Subsemiring.map f (Subsemiring.comap f t) = t


/-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithInitial C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithInitial C)

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

(CategoryTheory.WithInitial.mapId C).inv.app X =
  (match X with
    | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of x)
    | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).inv


theorem pullback_fst_range {X Y S : TopCat} (f : X ⟶ S) (g : Y ⟶ S) :
    Set.range (pullback.fst f g) = { x : X | ∃ y : Y, f x = g y }

Set.range ⇑(CategoryTheory.Limits.pullback.fst f g) = {x | ∃ y, f x = g y}


/-- Vertical composition of oplax natural transformations. -/
@[simps]
def vcomp (η : OplaxNatTrans F G) (θ : OplaxNatTrans G H) : OplaxNatTrans F H

{F G H : CategoryTheory.OplaxFunctor B C}

(η.vcomp θ).app a = CategoryTheory.CategoryStruct.comp (η.app a) (θ.app a)


@[simp]
theorem coe_eq_bot_iff [OrderBot α] [OrderBot (Subtype p)] (hbot : p ⊥) {x : { x // p x }} :
    (x : α) = ⊥ ↔ x = ⊥

{α : Type u}
{p : α → Prop}
[PartialOrder α]
[OrderBot α]
[OrderBot (Subtype p)]
(hbot : p ⊥)
{x : { x // p x }}

↑x = ⊥ ↔ x = ⊥


/-- First version of the limit formula, with a limit over real numbers tending to 1 from above. -/
lemma tendsto_riemannZeta_sub_one_div_nhds_right :
    Tendsto (fun s : ℝ ↦ riemannZeta s - 1 / (s - 1)) (𝓝[>] 1) (𝓝 γ)

Filter.Tendsto (fun s => riemannZeta ↑s - 1 / (↑s - 1)) (𝓝[>] 1) (𝓝 ↑γ)


lemma tendsto_eulerMascheroniSeq' :
    Tendsto eulerMascheroniSeq' atTop (𝓝 eulerMascheroniConstant)

Filter.Tendsto Real.eulerMascheroniSeq' Filter.atTop (𝓝 Real.eulerMascheroniConstant)


@[simp]
theorem formPerm_singleton (x : α) : formPerm [x] = 1


@[simp]
theorem intrinsicInterior_empty : intrinsicInterior 𝕜 (∅ : Set P) = ∅

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_5}
[Ring 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
[TopologicalSpace P]
[AddTorsor V P]


@[simp]
theorem bernoulli_one : bernoulli 1 = -1 / 2


@[simp]
theorem floor_add_fract (a : α) : (⌊a⌋ : α) + fract a = a

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)


@[simp]
theorem toFinite_toFinset (s : Set α) [Fintype s] : s.toFinite.toFinset = s.toFinset


@[to_additive]
theorem eq_inv_mul_iff_mul_eq : a = b⁻¹ * c ↔ b * a = c


theorem comp_eq (x y z : FundamentalGroupoid X) (p : x ⟶ y) (q : y ⟶ z) : p ≫ q = p.comp q

{X : Type u}
[TopologicalSpace X]
(x y z : FundamentalGroupoid X)
(p : x ⟶ y)
(q : y ⟶ z)

p ≫ q = Path.Homotopic.Quotient.comp p q


/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The internal hom functor `F ⟶[C] -` -/
@[simps!]
def closedIhom (F : D ⥤ C) : (D ⥤ C) ⥤ D ⥤ C

{D : Type u_1}
{C : Type u_2}
[CategoryTheory.Groupoid D]
[CategoryTheory.Category.{u_4, u_2} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.MonoidalClosed C]
(F Y : D ⥤ C)

∀ {X Y_1 : D} (f : X ⟶ Y_1),
  (F.closedIhom.obj Y).map f =
    (CategoryTheory.MonoidalClosed.pre (CategoryTheory.inv (F.map f))).app (Y.obj X) ≫
      (CategoryTheory.ihom (F.obj Y_1)).map (Y.map f)


/-- Over the reals or the complexes, a continuously differentiable function is strictly
differentiable. -/
theorem hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt
    (hder : ∀ᶠ y in 𝓝 x, HasFDerivAt f (f' y) y) (hcont : ContinuousAt f' x) :
    HasStrictFDerivAt f (f' x) x

(hder : ∀ᶠ (y : G) in 𝓝 x, HasFDerivAt f (f' y) y)


theorem getD_eq_getD_get? (n : ℕ) : l.getD n d = (l.get? n).getD d

{α : Type u}
(l : List α)
(d : α)
(n : ℕ)


lemma CompactIccSpace.mk'' [TopologicalSpace α] [PartialOrder α]
    (h : ∀ {a b : α}, a < b → IsCompact (Icc a b)) : CompactIccSpace α

(h : ∀ {a b : α}, a < b → IsCompact (Set.Icc a b))


theorem Nodup.erase_eq_filter [DecidableEq α] (a : α) {s} :
    Nodup s → s.erase a = Multiset.filter (· ≠ a) s

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

s.Nodup → s.erase a = Multiset.filter (fun x => x ≠ a) s


/-- Fully faithful functors are stable by composition. -/
@[simps]
def comp {G : D ⥤ E} (hG : G.FullyFaithful) : (F ⋙ G).FullyFaithful

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u_1}
[CategoryTheory.Category.{u_2, u_1} E]
{F : CategoryTheory.Functor C D}
(hF : F.FullyFaithful)
{G : CategoryTheory.Functor D E}
(hG : G.FullyFaithful)

∀ {X Y : C} (f : (F.comp G).obj X ⟶ (F.comp G).obj Y), (hF.comp hG).preimage f = hF.preimage (hG.preimage f)


@[to_additive (attr := simp)]
theorem units_inv_mem_center {a : Mˣ} (ha : ↑a ∈ Set.center M) : ↑a⁻¹ ∈ Set.center M

{M : Type u_1}
[Monoid M]
{a : Mˣ}
(ha : ↑a ∈ Set.center M)


theorem eq_snd (F : HomotopyRel f₀ f₁ S) (t : I) {x : X} (hx : x ∈ S) : F (t, x) = f₁ x

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
{S : Set X}
(F : f₀.HomotopyRel f₁ S)
(t : ↑I)
{x : X}
(hx : x ∈ S)


/-- A side of a right-angled triangle divided by the sine of the opposite angle equals the
hypotenuse. -/
theorem norm_div_sin_angle_add_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) (h0 : x = 0 ∨ y ≠ 0) :
    ‖y‖ / Real.sin (angle x (x + y)) = ‖x + y‖

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(h : ⟪x, y⟫_ℝ = 0)
(h0 : x = 0 ∨ y ≠ 0)

‖y‖ / Real.sin (InnerProductGeometry.angle x (x + y)) = ‖x + y‖


@[simp]
theorem comp_hom {R S T : CommMon_ C} (f : R ⟶ S) (g : S ⟶ T) :
    Mon_.Hom.hom (f ≫ g) = f.hom ≫ g.hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.BraidedCategory C]
{R S T : CommMon_ C}
(f : R ⟶ S)
(g : S ⟶ T)


@[aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_span : s ⊆ span R s

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set M}


@[to_additive]
lemma prod_erase_of_comm [DecidableEq M] (ha : a ∈ l) (comm : ∀ x ∈ l, ∀ y ∈ l, x * y = y * x) :
    a * (l.erase a).prod = l.prod


@[simp]
theorem Derivation.liftKaehlerDifferential_comp_D (D' : Derivation R S M) (x : S) :
    D'.liftKaehlerDifferential (KaehlerDifferential.D R S x) = D' x

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{M : Type u_1}
[AddCommGroup M]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(D' : Derivation R S M)
(x : S)

D'.liftKaehlerDifferential ((KaehlerDifferential.D R S) x) = D' x


@[mono]
theorem monotone_mapOfLE (R S : ValuationSubring K) (h : R ≤ S) : Monotone (R.mapOfLE S h)

{K : Type u}
[Field K]
(R S : ValuationSubring K)
(h : R ≤ S)


/-- `P` is a sheaf for `S`, iff the fork given by `w` is an equalizer. -/
theorem equalizer_sheaf_condition :
    Presieve.IsSheafFor P (S : Presieve X) ↔ Nonempty (IsLimit (Fork.ofι _ (w P S)))

(P : CategoryTheory.Functor Cᵒᵖ (Type (max v u)))

CategoryTheory.Presieve.IsSheafFor P S.arrows ↔
  Nonempty
    (CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι (CategoryTheory.Equalizer.forkMap P S.arrows) ⋯))


@[simp]
theorem mapEquiv_trans [CommSemiring S₁] [CommSemiring S₂] [CommSemiring S₃] (e : S₁ ≃+* S₂)
    (f : S₂ ≃+* S₃) : (mapEquiv σ e).trans (mapEquiv σ f) = mapEquiv σ (e.trans f)

{S₁ : Type v}
{S₂ : Type w}
{S₃ : Type x}
(σ : Type u_1)
[CommSemiring S₁]
[CommSemiring S₂]
[CommSemiring S₃]
(e : S₁ ≃+* S₂)
(f : S₂ ≃+* S₃)

(MvPolynomial.mapEquiv σ e).trans (MvPolynomial.mapEquiv σ f) = MvPolynomial.mapEquiv σ (e.trans f)


@[simp]
theorem mul_mul_right [Fintype n] (M : Matrix m n α) (N : Matrix n o α) (a : α) :
    (M * of fun i j => a * N i j) = a • (M * N)

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[CommSemiring α]
[Fintype n]
(M : Matrix m n α)
(N : Matrix n o α)
(a : α)

(M * Matrix.of fun i j => a * N i j) = a • (M * N)


theorem lift_cardinal_mk_eq_lift_cardinal_mk_field_pow_lift_rank [Module.Free K V]
    [Module.Finite K V] : lift.{u} #V = lift.{v} #K ^ lift.{u} (Module.rank K V)

(K : Type u)
(V : Type v)
[Ring K]
[StrongRankCondition K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]
[Module.Finite K V]

Cardinal.lift.{u, v} #V = Cardinal.lift.{v, u} #K ^ Cardinal.lift.{u, v} (Module.rank K V)


/-- The definition of `x < y` on numeric pre-games, in terms of `<` two moves later. -/
theorem lt_def {x y : PGame} (ox : x.Numeric) (oy : y.Numeric) :
    x < y ↔
      (∃ i, (∀ i', x.moveLeft i' < y.moveLeft i) ∧ ∀ j, x < (y.moveLeft i).moveRight j) ∨
        ∃ j, (∀ i, (x.moveRight j).moveLeft i < y) ∧ ∀ j', x.moveRight j < y.moveRight j'

{x y : SetTheory.PGame}
(ox : x.Numeric)
(oy : y.Numeric)

x < y ↔
  (∃ i,
      (∀ (i' : x.LeftMoves), x.moveLeft i' < y.moveLeft i) ∧
        ∀ (j : (y.moveLeft i).RightMoves), x < (y.moveLeft i).moveRight j) ∨
    ∃ j,
      (∀ (i : (x.moveRight j).LeftMoves), (x.moveRight j).moveLeft i < y) ∧
        ∀ (j' : y.RightMoves), x.moveRight j < y.moveRight j'


theorem transitionMap_comp_reduceModIdeal (f : M →ₗ[R] N) {m n : ℕ}
    (hmn : m ≤ n) : transitionMap I N hmn ∘ₗ f.reduceModIdeal (I ^ n) =
      (f.reduceModIdeal (I ^ m) : _ →ₗ[R] _) ∘ₗ transitionMap I M hmn

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{N : Type u_3}
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] N)
{m n : ℕ}
(hmn : m ≤ n)

AdicCompletion.transitionMap I N hmn ∘ₗ ↑R (LinearMap.reduceModIdeal (I ^ n) f) =
  ↑R (LinearMap.reduceModIdeal (I ^ m) f) ∘ₗ AdicCompletion.transitionMap I M hmn


@[gcongr] protected theorem sub_right (c : ℤ) (h : a ≡ b [ZMOD n]) : a - c ≡ b - c [ZMOD n]

{n a b : ℤ}
(c : ℤ)
(h : a ≡ b [ZMOD n])


/-- The binary cofan whose point is `coprod F G`. -/
@[simps!]
def binaryCoproductCocone : BinaryCofan F G

(F G : CategoryTheory.Functor C (Type w))

(CategoryTheory.FunctorToTypes.binaryCoproductCocone F G).pt.obj a = (F.obj a ⊕ G.obj a)


/-- The tensor product bifunctor `C ⥤ C ⥤ C` of a monoidal category. -/
@[simps]
def curriedTensor : C ⥤ C ⥤ C

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

∀ {X_1 Y : C} (g : X_1 ⟶ Y),
  ((CategoryTheory.MonoidalCategory.curriedTensor C).obj X).map g = CategoryTheory.MonoidalCategory.whiskerLeft X g


theorem Antiperiodic.sub_const [AddCommGroup α] [Neg β] (h : Antiperiodic f c) (a : α) :
    Antiperiodic (fun x => f (x - a)) c

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

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


theorem map_unique {f : α → β} (hf : UniformContinuous f)
    {g : SeparationQuotient α → SeparationQuotient β} (comm : mk ∘ f = g ∘ mk) : map f = g

(comm : SeparationQuotient.mk ∘ f = g ∘ SeparationQuotient.mk)


@[simp, norm_cast]
protected theorem coe_zero : ↑(0 : FreeRing α) = (0 : FreeCommRing α)


@[simp]
theorem chromaticNumber_top [Fintype V] : (⊤ : SimpleGraph V).chromaticNumber = Fintype.card V


theorem IsHermitian.inv [Fintype m] [DecidableEq m] {A : Matrix m m α} (hA : A.IsHermitian) :
    A⁻¹.IsHermitian

{α : Type u_1}
{m : Type u_3}
[CommRing α]
[StarRing α]
[Fintype m]
[DecidableEq m]
{A : Matrix m m α}
(hA : A.IsHermitian)


@[reassoc]
theorem tensor_right_unitality (X₁ X₂ : C) :
    (ρ_ (X₁ ⊗ X₂)).hom =
      ((X₁ ⊗ X₂) ◁ (λ_ (𝟙_ C)).inv) ≫
        tensor_μ C (X₁, X₂) (𝟙_ C, 𝟙_ C) ≫ ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)

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

(ρ_ (X₁ ⊗ X₂)).hom =
  (X₁ ⊗ X₂) ◁ (λ_ (𝟙_ C)).inv ≫ CategoryTheory.tensor_μ C (X₁, X₂) (𝟙_ C, 𝟙_ C) ≫ ((ρ_ X₁).hom ⊗ (ρ_ X₂).hom)


@[continuity]
theorem Continuous.matrix_map [TopologicalSpace S] {A : X → Matrix m n S} {f : S → R}
    (hA : Continuous A) (hf : Continuous f) : Continuous fun x => (A x).map f

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{S : Type u_7}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[TopologicalSpace S]
{A : X → Matrix m n S}
{f : S → R}
(hA : Continuous A)
(hf : Continuous f)


theorem congr_comp (e : M ≃ₗ[R] M') (B : BilinForm R M) (l r : M'' →ₗ[R] M') :
    (congr e B).comp l r =
      B.comp (LinearMap.comp (e.symm : M' →ₗ[R] M) l)
        (LinearMap.comp (e.symm : M' →ₗ[R] M) r)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type u_7}
{M'' : Type u_8}
[AddCommMonoid M']
[AddCommMonoid M'']
[Module R M']
[Module R M'']
(e : M ≃ₗ[R] M')
(B : LinearMap.BilinForm R M)
(l r : M'' →ₗ[R] M')

((LinearMap.BilinForm.congr e) B).comp l r = B.comp (↑e.symm ∘ₗ l) (↑e.symm ∘ₗ r)


theorem smeval_comp : (p.comp q).smeval x  = p.smeval (q.smeval x)

(R : Type u_1)
[Semiring R]
(p q : Polynomial R)
{S : Type u_2}
[NonAssocSemiring S]
[Module R S]
[IsScalarTower R S S]
[SMulCommClass R S S]
[Pow S ℕ]
[NatPowAssoc S]
(x : S)


/-- The identity functor induces the identity functor on matrix categories.
-/
@[simps!]
def mapMatId : (𝟭 C).mapMat_ ≅ 𝟭 (Mat_ C)

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

CategoryTheory.Functor.mapMatId.inv.app X = 𝟙 ((𝟭 C).mapMat_.obj X)


/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
`{a} × univ` for `a : α` from a dense set. Suppose that it is Lipschitz continuous on each
“horizontal section” `univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is
continuous.

The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
instead of continuity of `f` on subsets of the product space. -/
theorem continuous_prod_of_dense_continuous_lipschitzWith [PseudoEMetricSpace α]
    [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) {s : Set α}
    (hs : Dense s) (ha : ∀ a ∈ s, Continuous fun y => f (a, y))
    (hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f

(f : α × β → γ)

(hb : ∀ (b : β), LipschitzWith K fun x => f (x, b))


theorem Monotone.partialSups_eq {f : ℕ → α} (hf : Monotone f) : (partialSups f : ℕ → α) = f

{α : Type u_1}
[SemilatticeSup α]
{f : ℕ → α}
(hf : Monotone f)


theorem iInf_le_iff {s : ι → α} : iInf s ≤ a ↔ ∀ b, (∀ i, b ≤ s i) → b ≤ a

{α : Type u_1}
{ι : Sort u_5}
[CompleteSemilatticeInf α]
{a : α}
{s : ι → α}

iInf s ≤ a ↔ ∀ (b : α), (∀ (i : ι), b ≤ s i) → b ≤ a


theorem toFun_spec' (g : L ≃+* L) {n : ℕ+} {t : Lˣ} (ht : t ∈ rootsOfUnity n L) :
    g t = t ^ (χ₀ n g).val

{L : Type u}
[CommRing L]
[IsDomain L]
(g : L ≃+* L)
{n : ℕ+}
{t : Lˣ}
(ht : t ∈ rootsOfUnity n L)

g ↑t = ↑t ^ (ModularCyclotomicCharacter.toFun n g).val


@[to_additive]
theorem smooth_pow : ∀ n : ℕ, Smooth I I fun a : G => a ^ n

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[AddMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothAdd I G]
(n : ℕ)


/-- An angle in a right-angled triangle expressed using `arctan`. -/
theorem oangle_right_eq_arctan_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
    ∡ p₂ p₃ p₁ = Real.arctan (dist p₁ p₂ / dist p₃ p₂)

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

∡ p₂ p₃ p₁ = ↑(Real.arctan (dist p₁ p₂ / dist p₃ p₂))


/-- A `JordanHolderLattice` is the class for which the Jordan Hölder theorem is proved. A
Jordan Hölder lattice is a lattice equipped with a notion of maximality, `IsMaximal`, and a notion
of isomorphism of pairs `Iso`. In the example of subgroups of a group, `IsMaximal H K` means that
`H` is a maximal normal subgroup of `K`, and `Iso (H₁, K₁) (H₂, K₂)` means that the quotient
`H₁ / K₁` is isomorphic to the quotient `H₂ / K₂`. `Iso` must be symmetric and transitive and must
satisfy the second isomorphism theorem `Iso (H, H ⊔ K) (H ⊓ K, K)`.
Examples include `Subgroup G` if `G` is a group, and `Submodule R M` if `M` is an `R`-module.
-/
class JordanHolderLattice (X : Type u) [Lattice X] where
  IsMaximal : X → X → Prop
  lt_of_isMaximal : ∀ {x y}, IsMaximal x y → x < y
  sup_eq_of_isMaximal : ∀ {x y z}, IsMaximal x z → IsMaximal y z → x ≠ y → x ⊔ y = z
  isMaximal_inf_left_of_isMaximal_sup :
    ∀ {x y}, IsMaximal x (x ⊔ y) → IsMaximal y (x ⊔ y) → IsMaximal (x ⊓ y) x
  Iso : X × X → X × X → Prop
  iso_symm : ∀ {x y}, Iso x y → Iso y x
  iso_trans : ∀ {x y z}, Iso x y → Iso y z → Iso x z
  second_iso : ∀ {x y}, IsMaximal x (x ⊔ y) → Iso (x, x ⊔ y) (x ⊓ y, y)

{X : Type u}
[Lattice X]
[self : JordanHolderLattice X]
{x y z : X × X}

JordanHolderLattice.Iso x y → JordanHolderLattice.Iso y z → JordanHolderLattice.Iso x z


theorem conj_tsum (f : α → ℂ) : conj (∑' a, f a) = ∑' a, conj (f a)

(starRingEnd ℂ) (∑' (a : α), f a) = ∑' (a : α), (starRingEnd ℂ) (f a)


@[simp]
theorem genericPoint_eq_bot_of_affine (R : CommRingCat) [IsDomain R] :
    genericPoint (Spec R) = (⊥ : PrimeSpectrum R)

genericPoint ↑↑(AlgebraicGeometry.Spec R).toPresheafedSpace = ⊥


@[simp] theorem coe_mul (e e' : X ≃ᵈ X) : ⇑(e * e') = e ∘ e'

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


@[simp]
theorem stereographic_apply_neg (v : sphere (0 : E) 1) :
    stereographic (norm_eq_of_mem_sphere v) (-v) = 0

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
(v : ↑(Metric.sphere 0 1))


@[fun_prop]
theorem IsBoundedBilinearMap.differentiableWithinAt (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
    DifferentiableWithinAt 𝕜 b u 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)


theorem add_apply : (D1 + D2) a = D1 a + D2 a

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{D1 D2 : LieDerivation R L M}
(a : L)


/-- The `ComplexShape` allowing differentials from `X (j+a)` to `X j`.
(For example when `a = 1`, a homology theory indexed by `ℕ` or `ℤ`)
-/
@[simps]
def down' {α : Type*} [AddRightCancelSemigroup α] (a : α) : ComplexShape α

{α : Type u_2}
[AddRightCancelSemigroup α]
(a i j : α)

(ComplexShape.down' a).Rel i j = (j + a = i)


/-- The sup of the directions of two affine subspaces is less than or equal to the direction of
their sup. -/
theorem sup_direction_le (s1 s2 : AffineSubspace k P) :
    s1.direction ⊔ s2.direction ≤ (s1 ⊔ s2).direction

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


theorem length_eq_reduceOption_length_add_filter_none {l : List (Option α)} :
    l.length = l.reduceOption.length + (l.filter Option.isNone).length

l.length = l.reduceOption.length + (List.filter Option.isNone l).length


theorem fst_lt_of_mem_enum {x : ℕ × α} {l : List α} (h : x ∈ enum l) : x.1 < length l

{α : Type u_1}
{x : ℕ × α}
{l : List α}
(h : x ∈ l.enum)


lemma divNat_mul_left {a : ℕ} (ha : a ≠ 0) (n d : ℕ) : divNat (a * n) (a * d) = divNat n d

NNRat.divNat (a * n) (a * d) = NNRat.divNat n d


theorem sqrt_le_left (hy : 0 ≤ y) : √x ≤ y ↔ x ≤ y ^ 2


/-- The predistance on the disjoint union `Σ n, X n` can be computed in any `X k` for large
enough `k`. -/
theorem inductiveLimitDist_eq_dist (I : ∀ n, Isometry (f n)) (x y : Σn, X n) :
    ∀ m (hx : x.1 ≤ m) (hy : y.1 ≤ m), inductiveLimitDist f x y =
      dist (leRecOn hx (f _) x.2 : X m) (leRecOn hy (f _) y.2 : X m)

{X : ℕ → Type u}
[(n : ℕ) → MetricSpace (X n)]
{f : (n : ℕ) → X n → X (n + 1)}
(I : ∀ (n : ℕ), Isometry (f n))
(x y : (n : ℕ) × X n)
(m : ℕ)
(hx : x.fst ≤ m)
(hy : y.fst ≤ m)

Metric.inductiveLimitDist f x y = dist (Nat.leRecOn hx (fun {k} => f k) x.snd) (Nat.leRecOn hy (fun {k} => f k) y.snd)


theorem sle_eq_not_slt (x y : BitVec w) : x.sle y = !y.slt x


theorem not_decide_mod_two_eq_one (x : Nat)
    : (!decide (x % 2 = 1)) = decide (x % 2 = 0)


/-- The orbit of the fixing subgroup of `sᶜ` (ie. the moving subgroup of `s`) is a subset of `s` -/
theorem orbit_fixingSubgroup_compl_subset {s : Set α} {a : α} (a_in_s : a ∈ s) :
    MulAction.orbit (fixingSubgroup M sᶜ) a ⊆ s

(M : Type u_1)
(α : Type u_2)
[Group M]
[MulAction M α]
{s : Set α}
{a : α}
(a_in_s : a ∈ s)

MulAction.orbit (↥(fixingSubgroup M sᶜ)) a ⊆ s


@[simp]
theorem bihimp_hnot_self : a ⇔ aᶜ = ⊥

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


theorem realize_mapTermRel_add_castLe [L'.Structure M] {k : ℕ}
    {ft : ∀ n, L.Term (α ⊕ (Fin n)) → L'.Term (β ⊕ (Fin (k + n)))}
    {fr : ∀ n, L.Relations n → L'.Relations n} {n} {φ : L.BoundedFormula α n}
    (v : ∀ {n}, (Fin (k + n) → M) → α → M) {v' : β → M} (xs : Fin (k + n) → M)
    (h1 :
      ∀ (n) (t : L.Term (α ⊕ (Fin n))) (xs' : Fin (k + n) → M),
        (ft n t).realize (Sum.elim v' xs') = t.realize (Sum.elim (v xs') (xs' ∘ Fin.natAdd _)))
    (h2 : ∀ (n) (R : L.Relations n) (x : Fin n → M), RelMap (fr n R) x = RelMap R x)
    (hv : ∀ (n) (xs : Fin (k + n) → M) (x : M), @v (n + 1) (snoc xs x : Fin _ → M) = v xs) :
    (φ.mapTermRel ft fr fun n => castLE (add_assoc _ _ _).symm.le).Realize v' xs ↔
      φ.Realize (v xs) (xs ∘ Fin.natAdd _)

{ft : (n : ℕ) → L.Term (α ⊕ Fin n) → L'.Term (β ⊕ Fin (k + n))}

{fr : (n : ℕ) → L.Relations n → L'.Relations n}

(v : {n : ℕ} → (Fin (k + n) → M) → α → M)

(h1 :
  ∀ (n : ℕ) (t : L.Term (α ⊕ Fin n)) (xs' : Fin (k + n) → M),
    FirstOrder.Language.Term.realize (Sum.elim v' xs') (ft n t) =
      FirstOrder.Language.Term.realize (Sum.elim (v xs') (xs' ∘ Fin.natAdd k)) t)

(h2 :
  ∀ (n : ℕ) (R : L.Relations n) (x : Fin n → M),
    FirstOrder.Language.Structure.RelMap (fr n R) x = FirstOrder.Language.Structure.RelMap R x)

(hv : ∀ (n : ℕ) (xs : Fin (k + n) → M) (x : M), v (Fin.snoc xs x) = v xs)

(FirstOrder.Language.BoundedFormula.mapTermRel ft fr (fun n => FirstOrder.Language.BoundedFormula.castLE ⋯) φ).Realize
    v' xs ↔
  φ.Realize (v xs) (xs ∘ Fin.natAdd k)


theorem pushforward_eq' {X Y : TopCat.{w}} {f g : X ⟶ Y} (h : f = g) (ℱ : X.Presheaf C) :
    f _* ℱ = g _* ℱ

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : TopCat}
{f g : X ⟶ Y}
(h : f = g)
(ℱ : TopCat.Presheaf C X)

(TopCat.Presheaf.pushforward C f).obj ℱ = (TopCat.Presheaf.pushforward C g).obj ℱ


@[to_additive]
theorem one_apply [One Y] (x : X) : (1 : LocallyConstant X Y) x = 1

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Zero Y]
(x : X)


@[simp]
theorem support_updateRIn {r : ℝ} (hr : r ∈ Ioo 0 f.rOut) :
    support (f.updateRIn r hr) = support f

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

Function.support ↑(f.updateRIn r hr) = Function.support ↑f


@[simp] lemma update_eq_self_iff : update f a b = f ↔ b = f a

{α : Sort u}
{β : α → Sort v}
[DecidableEq α]
{f : (a : α) → β a}
{a : α}
{b : β a}


@[simp]
theorem mem_inits : ∀ s t : List α, s ∈ inits t ↔ s <+: t


/-- The canonical bijection between objects in a category and its
localization with respect to a morphism_property `W` -/
@[simps]
def objEquiv : C ≃ W.Localization

{C : Type uC}
[CategoryTheory.Category.{uC', uC} C]
(W : CategoryTheory.MorphismProperty C)
(X : W.Localization)

(CategoryTheory.Localization.Construction.objEquiv W).symm X = X.as.obj


@[simp]
theorem bliminf_sup_le_and_aux_right : bliminf u f q ≤ bliminf u f fun x => p x ∧ q x

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : Filter β}
{p q : β → Prop}
{u : β → α}

Filter.bliminf u f q ≤ Filter.bliminf u f fun x => p x ∧ q x


theorem l_sSup (gc : GaloisConnection l u) {s : Set α} : l (sSup s) = ⨆ a ∈ s, l a

{α : Type u}
{β : Type v}
[CompleteLattice α]
[CompleteLattice β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{s : Set α}


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

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


theorem forall₂_imp {p q : ∀ a, β a → Prop} (h : ∀ a b, p a b → q a b) :
    (∀ a b, p a b) → ∀ a b, q a b

(h : ∀ (a : α) (b : β a), p a b → q a b)

(∀ (a : α) (b : β a), p a b) → ∀ (a : α) (b : β a), q a b


/-- We say that `P : AffineTargetMorphismProperty` is a local property if
1. `P` respects isomorphisms.
2. If `P` holds for `f : X ⟶ Y`, then `P` holds for `f ∣_ Y.basicOpen r` for any
  global section `r`.
3. If `P` holds for `f ∣_ Y.basicOpen r` for all `r` in a spanning set of the global sections,
  then `P` holds for `f`.
-/
class IsLocal (P : AffineTargetMorphismProperty) : Prop where
  /-- `P` as a morphism property respects isomorphisms -/
  respectsIso : P.toProperty.RespectsIso
  /-- `P` is stable under restriction to basic open set of global sections. -/
  to_basicOpen :
    ∀ {X Y : Scheme} [IsAffine Y] (f : X ⟶ Y) (r : Γ(Y, ⊤)), P f → P (f ∣_ Y.basicOpen r)
  /-- `P` for `f` if `P` holds for `f` restricted to basic sets of a spanning set of the global
    sections -/
  of_basicOpenCover :
    ∀ {X Y : Scheme} [IsAffine Y] (f : X ⟶ Y) (s : Finset Γ(Y, ⊤))
      (_ : Ideal.span (s : Set Γ(Y, ⊤)) = ⊤), (∀ r : s, P (f ∣_ Y.basicOpen r.1)) → P f


/-- If the composition of two continuous functions `g ∘ f` is proper and `g` is injective,
then `f` is proper. -/
lemma isProperMap_of_comp_of_inj {f : X → Y} {g : Y → Z} (hf : Continuous f) (hg : Continuous g)
    (hgf : IsProperMap (g ∘ f)) (g_inj : g.Injective) : IsProperMap f

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Y}
{g : Y → Z}
(hf : Continuous f)
(hg : Continuous g)
(hgf : IsProperMap (g ∘ f))
(g_inj : Function.Injective g)


@[simp]
theorem log_one_left : ∀ b, log 1 b = 0


@[simp]
theorem map_map₂ (f₁ : γ → ζ) (f₂ : α → β → γ) :
    map f₁ (map₂ f₂ xs ys) = map₂ (fun x y => f₁ <| f₂ x y) xs ys

{α : Type u_3}
{n : ℕ}
{β : Type u_4}
(xs : Mathlib.Vector α n)
(ys : Mathlib.Vector β n)
{γ : Type u_1}
{ζ : Type u_2}
(f₁ : γ → ζ)
(f₂ : α → β → γ)

Mathlib.Vector.map f₁ (Mathlib.Vector.map₂ f₂ xs ys) = Mathlib.Vector.map₂ (fun x y => f₁ (f₂ x y)) xs ys


theorem natDegree_comp : natDegree (p.comp q) = natDegree p * natDegree q

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p q : R[X]}

(p.comp q).natDegree = p.natDegree * q.natDegree


@[to_additive]
theorem OrderedCommMonoid.toCovariantClassRight (M : Type*) [OrderedCommMonoid M] :
    CovariantClass M M (swap (· * ·)) (· ≤ ·)

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


private theorem norm_eq_of_equiv_aux {f g : PadicSeq p} (hf : ¬f ≈ 0) (hg : ¬g ≈ 0) (hfg : f ≈ g)
    (h : padicNorm p (f (stationaryPoint hf)) ≠ padicNorm p (g (stationaryPoint hg)))
    (hlt : padicNorm p (g (stationaryPoint hg)) < padicNorm p (f (stationaryPoint hf))) :
    False

(h : padicNorm p (↑f (PadicSeq.stationaryPoint hf)) ≠ padicNorm p (↑g (PadicSeq.stationaryPoint hg)))

(hlt : padicNorm p (↑g (PadicSeq.stationaryPoint hg)) < padicNorm p (↑f (PadicSeq.stationaryPoint hf)))


theorem support_mul [DecidableEq G] [Add G] (a b : k[G]) :
    (a * b).support ⊆ a.support + b.support

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[DecidableEq G]
[Add G]
(a b : AddMonoidAlgebra k G)


theorem SuperpolynomialDecay.param_pow_mul (hf : SuperpolynomialDecay l k f) (n : ℕ) :
    SuperpolynomialDecay l k (k ^ n * f)

(hf : Asymptotics.SuperpolynomialDecay l k f)

Asymptotics.SuperpolynomialDecay l k (k ^ n * f)


/-- Any self-map commutes with the identity map. -/
theorem id_right : Commute f id


/-- A group homomorphism is a monoid homomorphism. -/
@[to_additive "An additive group homomorphism is an additive monoid homomorphism."]
theorem to_isMonoidHom : IsMonoidHom f

{α : Type u}
{β : Type v}
[AddGroup α]
[AddGroup β]
{f : α → β}
(hf : IsAddGroupHom f)


theorem dotProduct_mulVec_degMatrix [CommRing R] (x : V → R) :
    x ⬝ᵥ (G.degMatrix R *ᵥ x) = ∑ i : V, G.degree i * x i * x i

{V : Type u_1}
{R : Type u_2}
[Fintype V]
[DecidableEq V]
(G : SimpleGraph V)
[DecidableRel G.Adj]
[CommRing R]
(x : V → R)

x ⬝ᵥ SimpleGraph.degMatrix R G *ᵥ x = ∑ i : V, ↑(G.degree i) * x i * x i


theorem sum_add_sum {ι : Type*} (μ ν : ι → Measure α) : sum μ + sum ν = sum fun n => μ n + ν n

{α : Type u_1}
{m0 : MeasurableSpace α}
{ι : Type u_8}
(μ ν : ι → MeasureTheory.Measure α)

MeasureTheory.Measure.sum μ + MeasureTheory.Measure.sum ν = MeasureTheory.Measure.sum fun n => μ n + ν n


protected theorem apply {x : α} (hx : IsFixedPt f x) : IsFixedPt f (f x)

{α : Type u}
{f : α → α}
{x : α}
(hx : Function.IsFixedPt f x)


theorem seq_is_cauchySeq : CauchySeq <| seq hf U_mem

{α : Type u}
[uniformSpace : UniformSpace α]
{f : Filter α}
(hf : Cauchy f)
{U : ℕ → Set (α × α)}
(U_mem : ∀ (n : ℕ), U n ∈ 𝓤 α)
(U_le : ∀ s ∈ 𝓤 α, ∃ n, U n ⊆ s)

CauchySeq (SequentiallyComplete.seq hf U_mem)


lemma equation_smul_iff (P : Fin 3 → R) (u : Rˣ) : W.Equation (u • P) ↔ W.Equation P

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Projective R)
(P : Fin 3 → R)
(u : Rˣ)


@[simp]
theorem pi_inj [∀ i, NeBot (f₁ i)] : pi f₁ = pi f₂ ↔ f₁ = f₂

{ι : Type u_1}
{α : ι → Type u_2}
{f₁ f₂ : (i : ι) → Filter (α i)}
[∀ (i : ι), (f₁ i).NeBot]


/-- On a set with unique derivatives, a `C^n` function has derivatives less than `n` which are
differentiable. -/
theorem ContDiffOn.differentiableOn_iteratedDerivWithin {n : ℕ∞} {m : ℕ} (h : ContDiffOn 𝕜 n f s)
    (hmn : (m : ℕ∞) < n) (hs : UniqueDiffOn 𝕜 s) :
    DifferentiableOn 𝕜 (iteratedDerivWithin m f s) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{s : Set 𝕜}
{n : ℕ∞}
{m : ℕ}
(h : ContDiffOn 𝕜 n f s)
(hmn : ↑m < n)
(hs : UniqueDiffOn 𝕜 s)


@[simp]
theorem toContinuousLinearMap_inj {f g : E →ₛₗᵢ[σ₁₂] E₂} :
    f.toContinuousLinearMap = g.toContinuousLinearMap ↔ f = g

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
{f g : E →ₛₗᵢ[σ₁₂] E₂}


theorem image2_subset_map₂ (f : M →ₗ[R] N →ₗ[R] P) (p : Submodule R M) (q : Submodule R N) :
    Set.image2 (fun m n => f m n) (↑p : Set M) (↑q : Set N) ⊆ (↑(map₂ f p q) : Set P)

{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)
(p : Submodule R M)
(q : Submodule R N)

Set.image2 (fun m n => (f m) n) ↑p ↑q ⊆ ↑(Submodule.map₂ f p q)


theorem one_lt_ack_succ_left : ∀ m n, 1 < ack (m + 1) n


@[simp]
theorem zpow_neg_one (A : M) : A ^ (-1 : ℤ) = A⁻¹

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
(A : Matrix n' n' R)


@[simp]
theorem compl_iUnion (s : ι → Set β) : (⋃ i, s i)ᶜ = ⋂ i, (s i)ᶜ

{β : Type u_2}
{ι : Sort u_4}
(s : ι → Set β)


theorem LinearMap.dualMap_comp_dualMap {M₃ : Type*} [AddCommGroup M₃] [Module R M₃]
    (f : M₁ →ₗ[R] M₂) (g : M₂ →ₗ[R] M₃) : f.dualMap.comp g.dualMap = (g.comp f).dualMap

{R : Type u}
[CommSemiring R]
{M₁ : Type v}
{M₂ : Type v'}
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
{M₃ : Type u_1}
[AddCommGroup M₃]
[Module R M₃]
(f : M₁ →ₗ[R] M₂)
(g : M₂ →ₗ[R] M₃)

f.dualMap ∘ₗ g.dualMap = (g ∘ₗ f).dualMap


lemma cast_inv_le_one : ∀ n : ℕ, (n⁻¹ : α) ≤ 1

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


theorem convexHull_sub (s t : Set E) : convexHull R (s - t) = convexHull R s - convexHull R t

{R : Type u_1}
{E : Type u_3}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(s t : Set E)

(convexHull R) (s - t) = (convexHull R) s - (convexHull R) t


@[simp]
theorem id_left (f : Arrow T) : CommaMorphism.left (𝟙 f) = 𝟙 f.left

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

(CategoryTheory.CategoryStruct.id f).left = CategoryTheory.CategoryStruct.id f.left


@[simp]
theorem ae_sum_eq [Countable ι] (μ : ι → Measure α) : ae (sum μ) = ⨆ i, ae (μ i)

{α : Type u_1}
{ι : Type u_5}
{m0 : MeasurableSpace α}
[Countable ι]
(μ : ι → MeasureTheory.Measure α)

MeasureTheory.ae (MeasureTheory.Measure.sum μ) = ⨆ i, MeasureTheory.ae (μ i)


@[simp]
theorem toIdeal_iSup {κ : Sort*} (s : κ → HomogeneousIdeal 𝒜) :
    (⨆ i, s i).toIdeal = ⨆ i, (s i).toIdeal

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
{κ : Sort u_5}
(s : κ → HomogeneousIdeal 𝒜)


/-- If the `S`-multiples of `a` are contained in some `R`-span, then `Frac(S)`-multiples of `a`
are contained in the equivalent `Frac(R)`-span. -/
theorem ideal_span_singleton_map_subset {L : Type*} [IsDomain R] [IsDomain S] [Field K] [Field L]
    [Algebra R K] [Algebra R L] [Algebra S L] [IsIntegralClosure S R L] [IsFractionRing S L]
    [Algebra K L] [IsScalarTower R S L] [IsScalarTower R K L] {a : S} {b : Set S}
    [Algebra.IsAlgebraic R L] (inj : Function.Injective (algebraMap R L))
    (h : (Ideal.span ({a} : Set S) : Set S) ⊆ Submodule.span R b) :
    (Ideal.span ({algebraMap S L a} : Set L) : Set L) ⊆ Submodule.span K (algebraMap S L '' b)

(inj : Function.Injective ⇑(algebraMap R L))

(h : ↑(Ideal.span {a}) ⊆ ↑(Submodule.span R b))

↑(Ideal.span {(algebraMap S L) a}) ⊆ ↑(Submodule.span K (⇑(algebraMap S L) '' b))


@[to_additive]
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {K : ι → Subgroup G} (hK : Directed (· ≤ ·) K)
    {x : G} : x ∈ (iSup K : Subgroup G) ↔ ∃ i, x ∈ K i

(hK : Directed (fun x x_1 => x ≤ x_1) K)


/-- **First moment method**. The maximum of a measurable function is greater than its mean, while
avoiding a null set. -/
theorem exists_not_mem_null_laverage_le (hμ : μ ≠ 0) (hint : ∫⁻ a : α, f a ∂μ ≠ ∞) (hN : μ N = 0) :
    ∃ x, x ∉ N ∧ ⨍⁻ a, f a ∂μ ≤ f x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{N : Set α}
{f : α → ℝ≥0∞}
(hμ : μ ≠ 0)
(hint : ∫⁻ (a : α), f a ∂μ ≠ ⊤)
(hN : μ N = 0)


/-- Continuity from above: the measure of the intersection of a decreasing sequence of measurable
sets is the limit of the measures. -/
theorem tendsto_measure_iInter [Countable ι] [Preorder ι] [IsDirected ι (· ≤ ·)] {s : ι → Set α}
    (hs : ∀ n, MeasurableSet (s n)) (hm : Antitone s) (hf : ∃ i, μ (s i) ≠ ∞) :
    Tendsto (μ ∘ s) atTop (𝓝 (μ (⋂ n, s n)))

{α : Type u_1}
{ι : Type u_5}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[Countable ι]
[Preorder ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{s : ι → Set α}
(hs : ∀ (n : ι), MeasurableSet (s n))
(hm : Antitone s)
(hf : ∃ i, μ (s i) ≠ ⊤)

Filter.Tendsto (⇑μ ∘ s) Filter.atTop (nhds (μ (⋂ n, s n)))


theorem floor_eq_iff (ha : 0 ≤ a) : ⌊a⌋₊ = n ↔ ↑n ≤ a ∧ a < ↑n + 1

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
{n : ℕ}
(ha : 0 ≤ a)


theorem tan_eq_of_two_zsmul_eq {θ ψ : Angle} (h : (2 : ℤ) • θ = (2 : ℤ) • ψ) : tan θ = tan ψ


theorem of_subset_range_algebraMap (hf : f.LeftInverse (algebraMap R S))
    (h : spectrum S a ⊆ Set.range (algebraMap R S)) : SpectrumRestricts a f

(hf : Function.LeftInverse f ⇑(algebraMap R S))

(h : spectrum S a ⊆ Set.range ⇑(algebraMap R S))


theorem WF.alter {t : RBNode α}
    (H : ∀ {x t' p}, t.zoom cut = (t', p) → f t'.root? = some x →
      p.RootOrdered cmp x ∧ t'.OnRoot (cmpEq cmp x))
    (h : WF cmp t) : WF cmp (alter cut f t)

(H :
  ∀ {x : α} {t' : Batteries.RBNode α} {p : Batteries.RBNode.Path α},
    Batteries.RBNode.zoom cut t = (t', p) →
      f t'.root? = some x →
        Batteries.RBNode.Path.RootOrdered cmp p x ∧ Batteries.RBNode.OnRoot (Batteries.RBNode.cmpEq cmp x) t')

Batteries.RBNode.WF cmp (Batteries.RBNode.alter cut f t)


@[simp] theorem bit_lt_two_pow_succ_iff {b x n} : bit b x < 2 ^ (n + 1) ↔ x < 2 ^ n


@[to_additive (attr := simp)]
theorem dist_div_left [Group G] [PseudoMetricSpace G] [IsometricSMul G G]
    [IsometricSMul Gᵐᵒᵖ G] (a b c : G) : dist (a / b) (a / c) = dist b c

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


theorem mk'_mem_incidenceSet_left_iff : s(a, b) ∈ G.incidenceSet a ↔ G.Adj a b

{V : Type u}
(G : SimpleGraph V)
{a b : V}


@[to_additive]
theorem div_eq_div_iff_comm : a / b = c / d ↔ b / a = d / c

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


theorem pow_quot {a} {n : ℕ} : (⟨Quot.mk _ a⟩ ^ n : RingQuot r) = ⟨Quot.mk _ (a ^ n)⟩

{R : Type uR}
[Semiring R]
(r : R → R → Prop)
{a : R}
{n : ℕ}

{ toQuot := Quot.mk (RingQuot.Rel r) a } ^ n = { toQuot := Quot.mk (RingQuot.Rel r) (a ^ n) }


theorem volume_closedBall {x : AddCircle T} (ε : ℝ) :
    volume (Metric.closedBall x ε) = ENNReal.ofReal (min T (2 * ε))

(T : ℝ)
[hT : Fact (0 < T)]
{x : AddCircle T}
(ε : ℝ)

MeasureTheory.volume (Metric.closedBall x ε) = ENNReal.ofReal (min T (2 * ε))


theorem hurwitzZetaOdd_neg_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc (0 : ℝ) 1) :
    hurwitzZetaOdd x (-(2 * k)) =
    -1 / (2 * k + 1) * ((Polynomial.bernoulli (2 * k + 1)).map (algebraMap ℚ ℂ)).eval (x : ℂ)

{k : ℕ}
{x : ℝ}
(hk : k ≠ 0)
(hx : x ∈ Set.Icc 0 1)

HurwitzZeta.hurwitzZetaOdd (↑x) (-(2 * ↑k)) =
  -1 / (2 * ↑k + 1) * Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (2 * k + 1)))


/-- The Cauchy product formula for the product of two infinite sums indexed by `ℕ`,
    expressed by summing on `Finset.range`.
    See also `tsum_mul_tsum_eq_tsum_sum_range` if `f` and `g` are
    *not* absolutely summable. -/
theorem tsum_mul_tsum_eq_tsum_sum_range_of_summable_norm [CompleteSpace R] {f g : ℕ → R}
    (hf : Summable fun x => ‖f x‖) (hg : Summable fun x => ‖g x‖) :
    ((∑' n, f n) * ∑' n, g n) = ∑' n, ∑ k ∈ range (n + 1), f k * g (n - k)

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
{f g : ℕ → R}
(hf : Summable fun x => ‖f x‖)
(hg : Summable fun x => ‖g x‖)

(∑' (n : ℕ), f n) * ∑' (n : ℕ), g n = ∑' (n : ℕ), ∑ k ∈ Finset.range (n + 1), f k * g (n - k)


@[simp]
theorem bot_himp (a : α) : ⊥ ⇨ a = ⊤

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


theorem add_one_eq {a : Cardinal} (ha : ℵ₀ ≤ a) : a + 1 = a


theorem mul_sup : I * (J ⊔ K) = I * J ⊔ I * K

{R : Type u}
[CommSemiring R]
(I J K : Ideal R)


@[simp]
theorem zero_left [MulZeroClass G₀] (x y : G₀) : SemiconjBy 0 x y

{G₀ : Type u_3}
[MulZeroClass G₀]
(x y : G₀)


theorem Duplicate.mem_cons_self (h : x ∈+ x :: l) : x ∈ l

{α : Type u_1}
{l : List α}
{x : α}
(h : List.Duplicate x (x :: l))


/-- Averaging with respect to a finite measure is the same as integrating against
`MeasureTheory.FiniteMeasure.normalize`. -/
theorem average_eq_integral_normalize {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    (nonzero : μ ≠ 0) (f : Ω → E) :
    average (μ : Measure Ω) f = ∫ ω, f ω ∂(μ.normalize : Measure Ω)

{Ω : Type u_1}
[Nonempty Ω]
{m0 : MeasurableSpace Ω}
(μ : MeasureTheory.FiniteMeasure Ω)
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(nonzero : μ ≠ 0)
(f : Ω → E)

MeasureTheory.average (↑μ) f = ∫ (ω : Ω), f ω ∂↑μ.normalize


/-- A polynomial over the integers is divisible by `n : ℕ`
if and only if it is zero over `ZMod n`. -/
theorem C_dvd_iff_zmod (n : ℕ) (φ : MvPolynomial σ ℤ) :
    C (n : ℤ) ∣ φ ↔ map (Int.castRingHom (ZMod n)) φ = 0

{σ : Type u_1}
(n : ℕ)
(φ : MvPolynomial σ ℤ)

MvPolynomial.C ↑n ∣ φ ↔ (MvPolynomial.map (Int.castRingHom (ZMod n))) φ = 0


/-- The inverse of a bijective `DistribMulActionHom` is a `DistribMulActionHom`. -/
@[simps]
def inverse (f : A →+[M] B₁) (g : B₁ → A) (h₁ : Function.LeftInverse g f)
    (h₂ : Function.RightInverse g f) : B₁ →+[M] A

{M : Type u_1}
[Monoid M]
{A : Type u_4}
[AddMonoid A]
[DistribMulAction M A]
{B₁ : Type u_6}
[AddMonoid B₁]
[DistribMulAction M B₁]
(f : A →+[M] B₁)
(g : B₁ → A)
(h₁ : Function.LeftInverse g ⇑f)
(h₂ : Function.RightInverse g ⇑f)


@[simp]
theorem coe_copy (f : α →CO β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
(f : α →CO β)
(f' : α → β)
(h : f' = ⇑f)


@[to_additive]
theorem div_toGerm (f g : α →ₘ[μ] γ) : (f / g).toGerm = f.toGerm / g.toGerm

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
[AddGroup γ]
[TopologicalAddGroup γ]
(f g : α →ₘ[μ] γ)


@[simp]
theorem algebraMap_smul (r : R) (m : M) : (algebraMap R A) r • m = r • m

{R : Type u_1}
[CommSemiring R]
(A : Type u_2)
[Semiring A]
[Algebra R A]
{M : Type u_3}
[AddCommMonoid M]
[Module A M]
[Module R M]
[IsScalarTower R A M]
(r : R)
(m : M)


@[to_additive exists_addOrderOf_eq_prime_pow_iff]
theorem exists_orderOf_eq_prime_pow_iff :
    (∃ k : ℕ, orderOf x = p ^ k) ↔ ∃ m : ℕ, x ^ (p : ℕ) ^ m = 1

{G : Type u_1}
[Monoid G]
{x : G}
{p : ℕ}
[hp : Fact (Nat.Prime p)]

(∃ k, orderOf x = p ^ k) ↔ ∃ m, x ^ p ^ m = 1


theorem totient_super_multiplicative (a b : ℕ) : φ a * φ b ≤ φ (a * b)


theorem lf_iff_lt {x y : PGame} (ox : Numeric x) (oy : Numeric y) : x ⧏ y ↔ x < y

{x y : SetTheory.PGame}
(ox : x.Numeric)
(oy : y.Numeric)


@[simp] lemma symm_iff : IsSl2Triple (-h) f e ↔ IsSl2Triple h e f


@[to_additive]
theorem TopologicalGroup.of_nhds_one {G : Type u} [Group G] [TopologicalSpace G]
    (hmul : Tendsto (uncurry ((· * ·) : G → G → G)) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))
    (hinv : Tendsto (fun x : G => x⁻¹) (𝓝 1) (𝓝 1))
    (hleft : ∀ x₀ : G, 𝓝 x₀ = map (x₀ * ·) (𝓝 1))
    (hconj : ∀ x₀ : G, Tendsto (x₀ * · * x₀⁻¹) (𝓝 1) (𝓝 1)) : TopologicalGroup G

(hmul : Filter.Tendsto (Function.uncurry fun x x_1 => x + x_1) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0))

(hinv : Filter.Tendsto (fun x => -x) (𝓝 0) (𝓝 0))

(hleft : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x₀ + x) (𝓝 0))

(hconj : ∀ (x₀ : G), Filter.Tendsto (fun x => x₀ + x + -x₀) (𝓝 0) (𝓝 0))


/-- If `C` has limits of shape `J` then any reflective subcategory has limits of shape `J`. -/
theorem hasLimitsOfShape_of_reflective [HasLimitsOfShape J C] (R : D ⥤ C) [Reflective R] :
    HasLimitsOfShape J D


theorem slope_def_module (f : k → E) (a b : k) : slope f a b = (b - a)⁻¹ • (f b - f a)

{k : Type u_1}
{E : Type u_2}
[Field k]
[AddCommGroup E]
[Module k E]
(f : k → E)
(a b : k)


theorem weightedHomogeneousComponent_of_isWeightedHomogeneous_same
    {m : M} {p : MvPolynomial σ R} (hp : IsWeightedHomogeneous w p m) :
    weightedHomogeneousComponent w m p = p

(hp : MvPolynomial.IsWeightedHomogeneous w p m)

(MvPolynomial.weightedHomogeneousComponent w m) p = p


lemma measurableSet_generateFrom_memPartition (t : ℕ → Set α) (n : ℕ) :
    MeasurableSet[generateFrom (memPartition t (n + 1))] (t n)


@[simp]
theorem den_one : ((1 : NumDenSameDeg 𝒜 x).den : A) = 1

{ι : Type u_1}
{R : Type u_2}
{A : Type u_3}
[AddCommMonoid ι]
[DecidableEq ι]
[CommRing R]
[CommRing A]
[Algebra R A]
{𝒜 : ι → Submodule R A}
[GradedAlgebra 𝒜]
(x : Submonoid A)

↑(HomogeneousLocalization.NumDenSameDeg.den 1) = 1


@[to_additive (attr := simp)]
lemma inv_smul_smul (g : G) (a : α) : g⁻¹ • g • a = a

{G : Type u_3}
{α : Type u_7}
[Group G]
[MulAction G α]
(g : G)
(a : α)


lemma exact_of_comp_of_mem_range
    (h1 : g ∘ₗ f = 0) (h2 : ∀ x, g x = 0 → x ∈ range f) : Exact f g

(h2 : ∀ (x : N), g x = 0 → x ∈ LinearMap.range f)


theorem zpow_pred_clog_lt_self {b : ℕ} {r : R} (hb : 1 < b) (hr : 0 < r) :
    (b : R) ^ (clog b r - 1) < r

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
{b : ℕ}
{r : R}
(hb : 1 < b)
(hr : 0 < r)


/-- If a proposition holds for all elements, then the subtype is
equivalent to the original type. -/
@[simps apply symm_apply]
def subtypeUnivEquiv {p : α → Prop} (h : ∀ x, p x) : Subtype p ≃ α

{α : Type u_1}
{p : α → Prop}
(h : ∀ (x : α), p x)
(x : Subtype p)


@[to_additive]
theorem prod_insert_div {M : Type*} [CommGroup M] [DecidableEq α] (ha : a ∉ s) {f : α → M} :
    (∏ x ∈ insert a s, f x) / f a = ∏ x ∈ s, f x

{α : Type u_3}
{s : Finset α}
{a : α}
{M : Type u_6}
[AddCommGroup M]
[DecidableEq α]
(ha : a ∉ s)
{f : α → M}

∑ x ∈ insert a s, f x - f a = ∑ x ∈ s, f x


theorem toLex_inj {a b : α} : toLex a = toLex b ↔ a = b


/-- If `A` and `B` are isomorphic, then an ind-object presentation of `A` can be extended to an
    ind-object presentation of `B`. -/
@[simps!]
noncomputable def extend {A B : Cᵒᵖ ⥤ Type v} (P : IndObjectPresentation A) (η : A ⟶ B) [IsIso η] :
    IndObjectPresentation B

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

(P : CategoryTheory.Limits.IndObjectPresentation A)


@[to_additive]
theorem uniformity_eq_comap_inv_mul_nhds_one_swapped :
    𝓤 α = comap (fun x : α × α => x.2⁻¹ * x.1) (𝓝 (1 : α))

{α : Type u_1}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]

𝓤 α = Filter.comap (fun x => -x.2 + x.1) (𝓝 0)


theorem IsBlock.def_mem {B : Set X} (hB : IsBlock G B) {a : X} {g : G} :
    a ∈ B → g • a ∈ B → g • B = B

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
{B : Set X}
(hB : MulAction.IsBlock G B)
{a : X}
{g : G}


/-- The `vectorSpan` of an indexed family of `n + 1` points has dimension at most `n`. -/
lemma finrank_vectorSpan_range_add_one_le [Fintype ι] [Nonempty ι] (p : ι → P) :
    finrank k (vectorSpan k (Set.range p)) + 1 ≤ Fintype.card ι

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
{ι : Type u_4}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[Fintype ι]
[Nonempty ι]
(p : ι → P)

FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) + 1 ≤ Fintype.card ι


/-- If the oriented angle between two vectors is `-π / 2`, the inner product of those vectors
(reversed) is zero. -/
theorem inner_rev_eq_zero_of_oangle_eq_neg_pi_div_two {x y : V} (h : o.oangle x y = (-π / 2 : ℝ)) :
    ⟪y, x⟫ = 0

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


@[to_additive (attr := simp, nolint simpComm)]
theorem commute_unop [Mul α] {x y : αᵐᵒᵖ} : Commute (unop x) (unop y) ↔ Commute x y

Commute (MulOpposite.unop x) (MulOpposite.unop y) ↔ Commute x y


lemma supClosed_iInter (hf : ∀ i, SupClosed (f i)) : SupClosed (⋂ i, f i)

{α : Type u_2}
[SemilatticeSup α]
{ι : Sort u_4}
{f : ι → Set α}
(hf : ∀ (i : ι), SupClosed (f i))


/-- Let `f : α → α` be a quasi ergodic map.
Let `g : α → X` be an a.e. strongly measurable function
from `α` to a nonempty metrizable topological space.
If `g` is a.e.-invariant under `f`, then `g` is a.e. constant. -/
theorem ae_eq_const_of_ae_eq_comp_ae {g : α → X} (h : QuasiErgodic f μ)
    (hgm : AEStronglyMeasurable g μ) (hg_eq : g ∘ f =ᵐ[μ] g) : ∃ c, g =ᵐ[μ] const α c

(hgm : MeasureTheory.AEStronglyMeasurable g μ)


@[simp]
theorem sumCongr_apply (ea : Equiv.Perm α) (eb : Equiv.Perm β) (x : α ⊕ β) :
    sumCongr ea eb x = Sum.map (⇑ea) (⇑eb) x

{α : Type u_1}
{β : Type u_2}
(ea : Equiv.Perm α)
(eb : Equiv.Perm β)
(x : α ⊕ β)

(ea.sumCongr eb) x = Sum.map (⇑ea) (⇑eb) x


/-- (Implementation). Given an iso between the pullbacks of two sheaves, we can whisker it with
`coyoneda` to obtain an iso between the pullbacks of the sheaves of maps from `X`.
-/
@[simps!]
def isoOver {ℱ ℱ' : Sheaf K A} (α : G.op ⋙ ℱ.val ≅ G.op ⋙ ℱ'.val) (X : A) :
    G.op ⋙ (sheafOver ℱ X).val ≅ G.op ⋙ (sheafOver ℱ' X).val

{K : CategoryTheory.GrothendieckTopology D}

(α : G.op.comp ℱ.val ≅ G.op.comp ℱ'.val)

∀ (X_1 : Cᵒᵖ) (a : (CategoryTheory.coyoneda.obj (Opposite.op X)).obj ((G.op.comp ℱ'.val).obj X_1)),
  (CategoryTheory.Functor.IsCoverDense.isoOver α X).inv.app X_1 a = CategoryTheory.CategoryStruct.comp a (α.inv.app X_1)


theorem dvd_of_mk_le_mk {a b : α} : Associates.mk a ≤ Associates.mk b → a ∣ b


@[to_additive]
theorem mulSupport_mul [MulOneClass M] (f g : α → M) :
    (mulSupport fun x => f x * g x) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_1}
{M : Type u_5}
[MulOneClass M]
(f g : α → M)

(Function.mulSupport fun x => f x * g x) ⊆ Function.mulSupport f ∪ Function.mulSupport g


theorem not_coprime_of_dvd_of_dvd (dgt1 : 1 < d) (Hm : d ∣ m) (Hn : d ∣ n) : ¬ Coprime m n

{d m n : Nat}
(dgt1 : 1 < d)
(Hm : d ∣ m)
(Hn : d ∣ n)


@[to_additive] lemma prod_eq_one (hl : ∀ x ∈ l, x = 1) : l.prod = 1

{M : Type u_4}
[AddMonoid M]
{l : List M}
(hl : ∀ x ∈ l, x = 0)


nonrec theorem isClosedMap_smul (hc : IsUnit c) : IsClosedMap fun x : α => c • x

{M : Type u_1}
{α : Type u_2}
[Monoid M]
[TopologicalSpace α]
[MulAction M α]
[ContinuousConstSMul M α]
{c : M}
(hc : IsUnit c)


theorem cons_vecMul_cons (x : α) (v : Fin n → α) (w : o' → α) (B : Fin n → o' → α) :
    vecCons x v ᵥ* of (vecCons w B) = x • w + v ᵥ* of B

{α : Type u}
{n : ℕ}
{o' : Type uₒ}
[NonUnitalNonAssocSemiring α]
(x : α)
(v : Fin n → α)
(w : o' → α)
(B : Fin n → o' → α)

Matrix.vecMul (Matrix.vecCons x v) (Matrix.of (Matrix.vecCons w B)) = x • w + Matrix.vecMul v (Matrix.of B)


theorem neg_mul_comm (a b : α) : -a * b = a * -b

{α : Type u}
[Mul α]
[HasDistribNeg α]
(a b : α)


@[simp]
theorem toReal_mul : (a * b).toReal = a.toReal * b.toReal


/-- Fundamental theorem of calculus for set integrals, `nhdsWithin` version: if `μ` is a locally
finite measure and `f` is an almost everywhere measurable function that is continuous at a point `a`
within a measurable set `t`, then `∫ x in s i, f x ∂μ = μ (s i) • f a + o(μ (s i))` at a filter `li`
provided that `s i` tends to `(𝓝[t] a).smallSets` along `li`.  Since `μ (s i)` is an `ℝ≥0∞`
number, we use `(μ (s i)).toReal` in the actual statement.

Often there is a good formula for `(μ (s i)).toReal`, so the formalization can take an optional
argument `m` with this formula and a proof of `(fun i => (μ (s i)).toReal) =ᶠ[li] m`. Without these
arguments, `m i = (μ (s i)).toReal` is used in the output. -/
theorem ContinuousWithinAt.integral_sub_linear_isLittleO_ae [TopologicalSpace X]
    [OpensMeasurableSpace X] {μ : Measure X}
    [IsLocallyFiniteMeasure μ] {x : X} {t : Set X} {f : X → E} (hx : ContinuousWithinAt f t x)
    (ht : MeasurableSet t) (hfm : StronglyMeasurableAtFilter f (𝓝[t] x) μ) {s : ι → Set X}
    {li : Filter ι} (hs : Tendsto s li (𝓝[t] x).smallSets) (m : ι → ℝ := fun i => (μ (s i)).toReal)
    (hsμ : (fun i => (μ (s i)).toReal) =ᶠ[li] m := by rfl) :
    (fun i => (∫ x in s i, f x ∂μ) - m i • f x) =o[li] m

(hs : Filter.Tendsto s li (𝓝[t] x).smallSets)

(fun i => ∫ (x : X) in s i, f x ∂μ - m i • f x) =o[li] m


@[simp]
theorem algebraMap (A : Mon_ (ModuleCat.{u} R)) (r : R) : algebraMap R A.X r = A.one r

{R : Type u}
[CommRing R]
(A : Mon_ (ModuleCat R))
(r : R)


theorem EuclideanSpace.nnnorm_eq {𝕜 : Type*} [RCLike 𝕜] {n : Type*} [Fintype n]
    (x : EuclideanSpace 𝕜 n) : ‖x‖₊ = NNReal.sqrt (∑ i, ‖x i‖₊ ^ 2)

{𝕜 : Type u_8}
[RCLike 𝕜]
{n : Type u_9}
[Fintype n]
(x : EuclideanSpace 𝕜 n)

‖x‖₊ = NNReal.sqrt (∑ i : n, ‖x i‖₊ ^ 2)


instance isOrderConnected (r : α → α → Prop) [IsOrderConnected α r] [IsTrichotomous α r] :
    IsOrderConnected (List α) (Lex r)

{α : Type u}
(r : α → α → Prop)
[IsOrderConnected α r]
[IsTrichotomous α r]

∀ (x x_1 x_2 : List α), List.Lex r x x_2 → List.Lex r x x_1 ∨ List.Lex r x_1 x_2


@[simp 1100]
lemma norm_int {n : ℤ} : ‖(n : ℂ)‖ = |(n : ℝ)|


@[to_additive]
theorem comap_inf (H K : Subgroup N) (f : G →* N) : (H ⊓ K).comap f = H.comap f ⊓ K.comap f

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

AddSubgroup.comap f (H ⊓ K) = AddSubgroup.comap f H ⊓ AddSubgroup.comap f K


lemma isIso_of_toNatTrans_isIso (α : F ⟶ G) [IsIso (X := F.toFunctor) α.toNatTrans] : IsIso α

{𝒮 : Type u₁}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
{𝒳 : CategoryTheory.BasedCategory 𝒮}
{𝒴 : CategoryTheory.BasedCategory 𝒮}
{F G : CategoryTheory.BasedFunctor 𝒳 𝒴}
(α : F ⟶ G)
[CategoryTheory.IsIso α.toNatTrans]


@[simp]
theorem le_pred_iff_isMin : a ≤ pred a ↔ IsMin a

{α : Type u_1}
[Preorder α]
[PredOrder α]
{a : α}


theorem continuousAt_congr {g : X → Y} (h : f =ᶠ[𝓝 x] g) :
    ContinuousAt f x ↔ ContinuousAt g x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{x : X}
{g : X → Y}
(h : f =ᶠ[𝓝 x] g)


/-- If `univ` is complete, the space is a complete space -/
theorem completeSpace_of_isComplete_univ (h : IsComplete (univ : Set α)) : CompleteSpace α

{α : Type u}
[uniformSpace : UniformSpace α]
(h : IsComplete Set.univ)


@[simp]
theorem coe_quotEquivOfEqBot_symm (hp : p = ⊥) :
    ((p.quotEquivOfEqBot hp).symm : M →ₗ[R] M ⧸ p) = p.mkQ

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
(hp : p = ⊥)


theorem image_relEmbedding_iff {φ : r ↪r r'} : IsAntichain r' (φ '' s) ↔ IsAntichain r s

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{r' : β → β → Prop}
{s : Set α}
{φ : r ↪r r'}

IsAntichain r' (⇑φ '' s) ↔ IsAntichain r s


lemma toENatAux_gc : GaloisConnection (↑) toENatAux


theorem isBounded_le_nhds (a : α) : (𝓝 a).IsBounded (· ≤ ·)

{α : Type u_2}
[Preorder α]
[TopologicalSpace α]
[BoundedLENhdsClass α]
(a : α)

Filter.IsBounded (fun x x_1 => x ≤ x_1) (𝓝 a)


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

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

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


@[simp]
theorem comp_apply (Q : QuadraticMap R N P) (f : M →ₗ[R] N) (x : M) : (Q.comp f) x = Q (f x)

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
(Q : QuadraticMap R N P)
(f : M →ₗ[R] N)
(x : M)


theorem Ioo_ae_eq_Ico : Ioo a b =ᵐ[μ] Ico a b

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


lemma tendsto_diracProbaEquivSymm_iff_tendsto [T0Space X] [CompletelyRegularSpace X]
    {μ : range (diracProba (X := X))} (F : Filter (range (diracProba (X := X)))) :
    Tendsto diracProbaEquiv.symm F (𝓝 (diracProbaEquiv.symm μ)) ↔ Tendsto id F (𝓝 μ)

{μ : ↑(Set.range MeasureTheory.diracProba)}

(F : Filter ↑(Set.range MeasureTheory.diracProba))

Filter.Tendsto (⇑MeasureTheory.diracProbaEquiv.symm) F (𝓝 (MeasureTheory.diracProbaEquiv.symm μ)) ↔
  Filter.Tendsto id F (𝓝 μ)


theorem Algebra.homEquiv_naturality_str (adj : F ⊣ G) (A₁ A₂ : Algebra F) (f : A₁ ⟶ A₂) :
    (adj.homEquiv A₁.a A₁.a) A₁.str ≫ G.map f.f = f.f ≫ (adj.homEquiv A₂.a A₂.a) A₂.str

(A₁ A₂ : CategoryTheory.Endofunctor.Algebra F)

CategoryTheory.CategoryStruct.comp ((adj.homEquiv A₁.a A₁.a) A₁.str) (G.map f.f) =
  CategoryTheory.CategoryStruct.comp f.f ((adj.homEquiv A₂.a A₂.a) A₂.str)


@[to_additive (attr := simp)]
theorem lift_comp_of' (f : FreeSemigroup α →ₙ* β) : lift (f ∘ of) = f

{α : Type u}
{β : Type v}
[Semigroup β]
(f : FreeSemigroup α →ₙ* β)

FreeSemigroup.lift (⇑f ∘ FreeSemigroup.of) = f


theorem dist_bdd_within_interval {a b lb ub : α} (hal : lb ≤ a) (hau : a ≤ ub) (hbl : lb ≤ b)
    (hbu : b ≤ ub) : |a - b| ≤ ub - lb

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b lb ub : α}
(hal : lb ≤ a)
(hau : a ≤ ub)
(hbl : lb ≤ b)
(hbu : b ≤ ub)


lemma dvd_choose (hp : Prime p) (ha : a < p) (hab : b - a < p) (h : p ≤ b) : p ∣ choose b a

{p a b : ℕ}
(hp : Nat.Prime p)
(ha : a < p)
(hab : b - a < p)
(h : p ≤ b)


/-- When `F` is initial, and `F ⋙ G` has a limit, then `G` has a limit also.

We can't make this an instance, because `F` is not determined by the goal.
(Even if this weren't a problem, it would cause a loop with `comp_hasLimit`.)
-/
theorem hasLimit_of_comp [HasLimit (F ⋙ G)] : HasLimit G


/-- The functor on homological complexes induced by the identity functor is
isomorphic to the identity functor. -/
@[simps!]
def Functor.mapHomologicalComplexIdIso (c : ComplexShape ι) :
    (𝟭 W₁).mapHomologicalComplex c ≅ 𝟭 _

((CategoryTheory.Functor.mapHomologicalComplexIdIso W₁ c).hom.app X).f i = 𝟙 (X.X i)


@[to_additive]
theorem exponent_eq_iSup_orderOf' :
    exponent G = if ∃ g : G, orderOf g = 0 then 0 else ⨆ g : G, orderOf g

Monoid.exponent G = if ∃ g, orderOf g = 0 then 0 else ⨆ g, orderOf g


@[to_additive (attr := measurability)]
theorem List.aemeasurable_prod (l : List (α → M)) (hl : ∀ f ∈ l, AEMeasurable f μ) :
    AEMeasurable (fun x => (l.map fun f : α → M => f x).prod) μ

{M : Type u_2}
{α : Type u_3}
[Monoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(l : List (α → M))
(hl : ∀ f ∈ l, AEMeasurable f μ)

AEMeasurable (fun x => (List.map (fun f => f x) l).prod) μ


theorem restrictScalars_apply (f : A →ₐ[S] B) (x : A) : f.restrictScalars R x = f x

(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)
(x : A)


@[simp]
theorem diagramNatTrans_id (X : C) (P : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (𝟙 P) X = 𝟙 (J.diagram P X)

(J : CategoryTheory.GrothendieckTopology C)

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

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

J.diagramNatTrans (CategoryTheory.CategoryStruct.id P) X = CategoryTheory.CategoryStruct.id (J.diagram P X)


@[simp] theorem run_seq {α β : Type u} [Monad m] (f : ReaderT ρ m (α → β)) (x : ReaderT ρ m α) (ctx : ρ)
    : (f <*> x).run ctx = (f.run ctx <*> x.run ctx)

{m : Type u → Type u_1}
{ρ α β : Type u}
[Monad m]
(f : ReaderT ρ m (α → β))
(x : ReaderT ρ m α)
(ctx : ρ)

(Seq.seq f fun x_1 => x).run ctx = Seq.seq (f.run ctx) fun x_1 => x.run ctx


/-- A triangle `(X,Y,Z,f,g,h)` in `C` is defined by the morphisms `f : X ⟶ Y`, `g : Y ⟶ Z`
and `h : Z ⟶ X⟦1⟧`.
-/
@[simps]
def Triangle.mk {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧) : Triangle C

(h : Z ⟶ (CategoryTheory.shiftFunctor C 1).obj X)

(CategoryTheory.Pretriangulated.Triangle.mk f g h).mor₁ = f


theorem coeFn_mk (f : α → β) (hf) : (mk f hf : α →ₘ[μ] β) =ᵐ[μ] f

(hf : MeasureTheory.AEStronglyMeasurable f μ)

↑(MeasureTheory.AEEqFun.mk f hf) =ᵐ[μ] f


theorem adjoin_rootSet_eq_range [Algebra R K] [Algebra R L] {p : R[X]}
    (h : p.Splits (algebraMap R K)) (f : K →ₐ[R] L) :
    Algebra.adjoin R (p.rootSet L) = f.range ↔ Algebra.adjoin R (p.rootSet K) = ⊤

(h : Polynomial.Splits (algebraMap R K) p)


@[simp]
lemma Γevaluation_eq_zero_iff_not_mem_basicOpen (x : X) (f : X.presheaf.obj (op ⊤)) :
    X.Γevaluation x f = 0 ↔ x ∉ X.toRingedSpace.basicOpen f

(X.Γevaluation x) f = 0 ↔ x ∉ X.toRingedSpace.basicOpen f


@[simp, norm_cast]
theorem coe_eq_one {x : ℝ} : (x : EReal) = 1 ↔ x = 1


@[simp]
theorem coe_Ici (a : α) : ↑(Ici a) = Set.Ici a


theorem jointly_surjective_of_isColimit {F : J ⥤ Type u} {t : Cocone F} (h : IsColimit t)
    (x : t.pt) : ∃ j y, t.ι.app j y = x

{J : Type v}
[CategoryTheory.Category.{w, v} J]
{F : J ⥤ Type u}
{t : CategoryTheory.Limits.Cocone F}
(h : CategoryTheory.Limits.IsColimit t)
(x : t.pt)


theorem Image.isSubfield {K : Type*} [Field K] (f : F →+* K) {s : Set F} (hs : IsSubfield s) :
    IsSubfield (f '' s)

{F : Type u_1}
[Field F]
{K : Type u_2}
[Field K]
(f : F →+* K)
{s : Set F}
(hs : IsSubfield s)


lemma coe_eq_algebraMap (x : 𝓞 K) : (x : K) = algebraMap _ _ x

{K : Type u_1}
[Field K]
(x : NumberField.RingOfIntegers K)

↑x = (algebraMap (NumberField.RingOfIntegers K) K) x


/-- See also `Fintype.card_zpowers`. -/
@[to_additive (attr := simp) "See also `Fintype.card_zmultiples`."]
theorem Nat.card_zpowers : Nat.card (zpowers a) = orderOf a

Nat.card ↥(AddSubgroup.zmultiples a) = addOrderOf a


theorem Real.smul_iInf_of_nonpos (ha : a ≤ 0) (f : ι → ℝ) : (a • ⨅ i, f i) = ⨆ i, a • f i

{ι : Sort u_1}
{α : Type u_2}
[LinearOrderedField α]
[Module α ℝ]
[OrderedSMul α ℝ]
{a : α}
(ha : a ≤ 0)
(f : ι → ℝ)


@[to_additive sum_le_sum_of_ne_zero]
theorem prod_le_prod_of_ne_one' (h : ∀ x ∈ s, f x ≠ 1 → x ∈ t) :
    ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x

{ι : Type u_1}
{M : Type u_4}
[CanonicallyOrderedCommMonoid M]
{f : ι → M}
{s t : Finset ι}
(h : ∀ x ∈ s, f x ≠ 1 → x ∈ t)


lemma iUnion₂_congr {s t : ∀ i, κ i → Set α} (h : ∀ i j, s i j = t i j) :
    ⋃ (i) (j), s i j = ⋃ (i) (j), t i j

(h : ∀ (i : ι) (j : κ i), s i j = t i j)


@[simp]
theorem range_mkQ : range p.mkQ = ⊤

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)


@[to_additive, deprecated pow_natAbs_eq_one (since := "2024-02-14")]
lemma exists_pow_eq_one_of_zpow_eq_one (hn : n ≠ 0) (h : a ^ n = 1) :
    ∃ n : ℕ, 0 < n ∧ a ^ n = 1

{G : Type u_3}
[AddGroup G]
{a : G}
{n : ℤ}
(hn : n ≠ 0)
(h : n • a = 0)


theorem attach_affineCombination_coe (s : Finset P) (w : P → k) :
    s.attach.affineCombination k ((↑) : s → P) (w ∘ (↑)) = s.affineCombination k id w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
(s : Finset P)
(w : P → k)

(Finset.affineCombination k s.attach Subtype.val) (w ∘ Subtype.val) = (Finset.affineCombination k s id) w


/-- If `f` is `C^1` at `x` and `K > ‖fderiv 𝕂 f x‖`, then `f` is `K`-Lipschitz in a neighborhood of
`x`. -/
theorem ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt {f : E' → F'} {x : E'}
    (hf : ContDiffAt 𝕂 1 f x) (K : ℝ≥0) (hK : ‖fderiv 𝕂 f x‖₊ < K) :
    ∃ t ∈ 𝓝 x, LipschitzOnWith K f t

{𝕂 : Type u_1}
[RCLike 𝕂]
{E' : Type u_2}
[NormedAddCommGroup E']
[NormedSpace 𝕂 E']
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace 𝕂 F']
{f : E' → F'}
{x : E'}
(hf : ContDiffAt 𝕂 1 f x)
(K : ℝ≥0)
(hK : ‖fderiv 𝕂 f x‖₊ < K)