@[simp]
theorem toIocDiv_add_zsmul (a b : α) (m : ℤ) : toIocDiv hp a (b + m • p) = toIocDiv hp a b + m

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


theorem log_ne_zero_of_pos_of_ne_one {x : ℝ} (hx_pos : 0 < x) (hx : x ≠ 1) : log x ≠ 0


/-- The real interval `[0, 1]` is a set of unique differentiability. -/
theorem uniqueDiffOn_Icc_zero_one : UniqueDiffOn ℝ (Icc (0 : ℝ) 1)


theorem isOpen_ball {x : E} {r : ℝ} : IsOpen (ball x r)

{E : Type u_1}
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[T2Space E]
[Module ℝ E]
[ContinuousSMul ℝ E]
[FiniteDimensional ℝ E]
{x : E}
{r : ℝ}


theorem list_cons : Computable₂ (@List.cons α)


@[to_additive (attr := simp)]
theorem pow_add_period_smul (n : ℕ) (m : M) (a : α) :
    m ^ (n + period m a) • a = m ^ n • a

{α : Type v}
{M : Type u}
[Monoid M]
[MulAction M α]
(n : ℕ)
(m : M)
(a : α)

m ^ (n + MulAction.period m a) • a = m ^ n • a


theorem infinitesimal_iff_infinite_inv {x : ℝ*} (h : x ≠ 0) : Infinitesimal x ↔ Infinite x⁻¹


theorem convs'Aux_succ_some {s : Stream'.Seq (Pair K)} {p : Pair K} (h : s.head = some p)
    (n : ℕ) : convs'Aux s (n + 1) = p.a / (p.b + convs'Aux s.tail n)

{K : Type u_1}
[DivisionRing K]
{s : Stream'.Seq (GenContFract.Pair K)}
{p : GenContFract.Pair K}
(h : s.head = some p)
(n : ℕ)

GenContFract.convs'Aux s (n + 1) = p.a / (p.b + GenContFract.convs'Aux s.tail n)


theorem mem_srange_self (f : F) (x : R) : f x ∈ srange f

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


theorem map_isPath_of_injective (hinj : Function.Injective f) (hp : p.IsPath) :
    (p.map f).IsPath

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
{f : G →g G'}
{u v : V}
{p : G.Walk u v}
(hinj : Function.Injective ⇑f)
(hp : p.IsPath)


@[simp]
theorem conjTranspose_smul_non_comm [Star R] [Star α] [SMul R α] [SMul Rᵐᵒᵖ α] (c : R)
    (M : Matrix m n α) (h : ∀ (r : R) (a : α), star (r • a) = MulOpposite.op (star r) • star a) :
    (c • M)ᴴ = MulOpposite.op (star c) • Mᴴ


@[simp]
theorem ascPochhammer_map (f : S →+* T) (n : ℕ) :
    (ascPochhammer S n).map f = ascPochhammer T n

{S : Type u}
[Semiring S]
{T : Type v}
[Semiring T]
(f : S →+* T)
(n : ℕ)

Polynomial.map f (ascPochhammer S n) = ascPochhammer T n


@[simp, reassoc]
lemma comp_hom (f : P ⟶ Q) (g : Q ⟶ T) : (f ≫ g).hom = f.hom ≫ g.hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
{P Q T : PresheafOfModules R}
(f : P ⟶ Q)
(g : Q ⟶ T)


theorem ext_iff' (v w : VectorMeasure α M) : v = w ↔ ∀ i : Set α, v i = w i

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(v w : MeasureTheory.VectorMeasure α M)


theorem ExpChar.neg_one_pow_expChar_pow [Ring R] (q n : ℕ) [hR : ExpChar R q] :
    (-1 : R) ^ q ^ n = -1

(R : Type u)
[Ring R]
(q n : ℕ)
[hR : ExpChar R q]


theorem prime_of_isIntegrallyClosed {x : S} (hx : IsIntegral R x) : Prime (minpoly R x)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[IsDomain R]
[Algebra R S]
[IsDomain S]
[NoZeroSMulDivisors R S]
[IsIntegrallyClosed R]
{x : S}
(hx : IsIntegral R x)


@[simp]
theorem _root_.SuccOrder.limitRecOn_succ (ha : ¬ IsMax a) :
    SuccOrder.limitRecOn (succ a) H_succ H_lim
      = H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)

(H_succ : (a : α) → ¬IsMax a → C a → C (Order.succ a))

(H_lim : (a : α) → Order.IsSuccLimit a → ((b : α) → b < a → C b) → C a)

SuccOrder.limitRecOn (Order.succ a) H_succ H_lim = H_succ a ha (SuccOrder.limitRecOn a H_succ H_lim)


/-- Similar to `prod`, but both functors start from the same category `A` -/
@[simps]
def prod' (F : A ⥤ B) (G : A ⥤ C) : A ⥤ B × C

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

∀ {X Y : A} (f : X ⟶ Y), (F.prod' G).map f = (F.map f, G.map f)


/-- Hölder's inequality for functions `α → ℝ≥0`. The integral of the product of two functions
is bounded by the product of their `ℒp` and `ℒq` seminorms when `p` and `q` are conjugate
exponents. -/
theorem NNReal.lintegral_mul_le_Lp_mul_Lq {p q : ℝ} (hpq : p.IsConjExponent q) {f g : α → ℝ≥0}
    (hf : AEMeasurable f μ) (hg : AEMeasurable g μ) :
    (∫⁻ a, (f * g) a ∂μ) ≤
      (∫⁻ a, (f a : ℝ≥0∞) ^ p ∂μ) ^ (1 / p) * (∫⁻ a, (g a : ℝ≥0∞) ^ q ∂μ) ^ (1 / q)

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{p q : ℝ}
(hpq : p.IsConjExponent q)
{f g : α → NNReal}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)


@[simp]
theorem mapPresheaf_obj_X (F : C ⥤ D) (X : PresheafedSpace C) :
    (F.mapPresheaf.obj X : TopCat) = (X : TopCat)

(X : AlgebraicGeometry.PresheafedSpace C)


/-- The composition of braided monoidal functors. -/
@[simps!]
def comp (F : BraidedFunctor C D) (G : BraidedFunctor D E) : BraidedFunctor C E

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.BraidedCategory C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
[CategoryTheory.BraidedCategory D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
[CategoryTheory.MonoidalCategory E]
[CategoryTheory.BraidedCategory E]
(F : CategoryTheory.BraidedFunctor C D)
(G : CategoryTheory.BraidedFunctor D E)
(X Y : C)

(F.comp G).μ X Y = G.μ (F.obj X) (F.obj Y) ≫ G.map (F.μ X Y)


theorem AdjoinSimple.algebraMap_gen : algebraMap F⟮α⟯ E (AdjoinSimple.gen F α) = α

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(α : E)

(algebraMap (↥F⟮α⟯) E) (IntermediateField.AdjoinSimple.gen F α) = α


/--
The well formedness predicate for a `FindMin` value.
This is not actually a predicate, as it contains an additional data value
`rank` corresponding to the rank of the returned node, which is omitted from `findMin`.
-/
structure FindMin.WF (le : α → α → Bool) (res : FindMin α) where
  /-- The rank of the minimum element -/
  rank : Nat
  /-- `before` is a difference list which can be appended to a binomial heap
  with ranks at least `rank` to produce another well formed heap. -/
  before : ∀ {s}, s.WF le rank → (res.before s).WF le 0
  /-- `node` is a well formed forest of rank `rank` with `val` at the root. -/
  node : res.node.WF le res.val rank
  /-- `next` is a binomial heap with ranks above `rank + 1`. -/
  next : res.next.WF le (rank + 1)

{res : Batteries.BinomialHeap.Imp.FindMin α}

(self : Batteries.BinomialHeap.Imp.FindMin.WF le res)

Batteries.BinomialHeap.Imp.HeapNode.WF le res.val res.node self.rank


/-- The torsion submonoid of an abelian group equals the torsion subgroup as a submonoid. -/
@[to_additive add_torsion_eq_add_torsion_submonoid
      "The additive torsion submonoid of an abelian group equals the torsion
      subgroup as a submonoid."]
theorem torsion_eq_torsion_submonoid : CommMonoid.torsion G = (torsion G).toSubmonoid

CommMonoid.torsion G = (CommGroup.torsion G).toSubmonoid


/-- Proving equality between functors using heterogeneous equality. -/
theorem hext {F G : C ⥤ D} (h_obj : ∀ X, F.obj X = G.obj X)
    (h_map : ∀ (X Y) (f : X ⟶ Y), HEq (F.map f) (G.map f)) : F = G

(h_map : ∀ (X Y : C) (f : X ⟶ Y), HEq (F.map f) (G.map f))


@[to_additive]
theorem mono_iff_ker_eq_bot : Mono f ↔ f.ker = ⊥

CategoryTheory.Mono f ↔ MonoidHom.ker f = ⊥


private theorem derivativeFun_coe_mul_coe (f g : R[X]) : derivativeFun (f * g : R⟦X⟧) =
    f * derivative g + g * derivative f

{R : Type u_1}
[CommSemiring R]
(f g : Polynomial R)

(↑f * ↑g).derivativeFun = ↑f * ↑(Polynomial.derivative g) + ↑g * ↑(Polynomial.derivative f)


@[rify_simps] lemma ratCast_ne (a b : ℚ) : a ≠ b ↔ (a : ℝ) ≠ (b : ℝ)

a ≠ b ↔ ↑a ≠ ↑b


lemma mk₄_surjective (X : ComposableArrows C 4) :
    ∃ (X₀ X₁ X₂ X₃ X₄ : C) (f₀ : X₀ ⟶ X₁) (f₁ : X₁ ⟶ X₂) (f₂ : X₂ ⟶ X₃) (f₃ : X₃ ⟶ X₄),
      X = mk₄ f₀ f₁ f₂ f₃

(X : CategoryTheory.ComposableArrows C 4)

∃ X₀ X₁ X₂ X₃ X₄ f₀ f₁ f₂ f₃, X = CategoryTheory.ComposableArrows.mk₄ f₀ f₁ f₂ f₃


@[simp]
theorem decompose_symm_of {i : ι} (x : ℳ i) : (decompose ℳ).symm (DirectSum.of _ i x) = x

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
{i : ι}
(x : ↥(ℳ i))

(DirectSum.decompose ℳ).symm ((DirectSum.of (fun i => ↥(ℳ i)) i) x) = ↑x


/-- A Dedekind domain is equal to the intersection of its localizations at all its height one
non-zero prime ideals viewed as subalgebras of its field of fractions. -/
theorem iInf_localization_eq_bot [Algebra R K] [hK : IsFractionRing R K] :
    (⨅ v : HeightOneSpectrum R,
        Localization.subalgebra.ofField K _ v.asIdeal.primeCompl_le_nonZeroDivisors) = ⊥

(R : Type u_1)
(K : Type u_3)
[CommRing R]
[Field K]
[IsDedekindDomain R]
[Algebra R K]
[hK : IsFractionRing R K]

⨅ v, Localization.subalgebra.ofField K v.asIdeal.primeCompl ⋯ = ⊥


@[to_additive]
theorem eq_top_of_le_card [Finite G] (h : Nat.card G ≤ Nat.card H) : H = ⊤

{G : Type u_1}
[Group G]
(H : Subgroup G)
[Finite G]
(h : Nat.card G ≤ Nat.card ↥H)


@[simp]
theorem dualCoannihilator_top (W : Subspace K V) :
    (⊤ : Subspace K (Module.Dual K W)).dualCoannihilator = ⊥

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


@[reassoc (attr := simp)]
lemma whiskerLeft_fst (X : C) {Y₁ Y₂ : C} (g : Y₁ ⟶ Y₂) :
    (X ◁ g) ≫ fst _ _ = fst _ _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.ChosenFiniteProducts C]
(X : C)
{Y₁ Y₂ : C}
(g : Y₁ ⟶ Y₂)

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerLeft X g)
    (CategoryTheory.ChosenFiniteProducts.fst X Y₂) =
  CategoryTheory.ChosenFiniteProducts.fst X Y₁


theorem id_apply (x : M) : (id : M →ₗ⁅R,L⁆ M) x = x

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


theorem NormedAddGroupHom.completion_add (f g : NormedAddGroupHom G H) :
    (f + g).completion = f.completion + g.completion

{G : Type u_1}
[SeminormedAddCommGroup G]
{H : Type u_2}
[SeminormedAddCommGroup H]
(f g : NormedAddGroupHom G H)


@[simp] theorem not_neBot {f : Filter α} : ¬f.NeBot ↔ f = ⊥


theorem repr_inj {a b} [NF a] [NF b] : repr a = repr b ↔ a = b


lemma isLocallySurjective_of_isLocallySurjective_fac
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} {f₁ : F₁ ⟶ F₂} {f₂ : F₂ ⟶ F₃} {f₃ : F₁ ⟶ F₃} (fac : f₁ ≫ f₂ = f₃)
    [IsLocallySurjective J f₃] : IsLocallySurjective J f₂

(J : CategoryTheory.GrothendieckTopology C)


@[to_additive]
lemma prod_fiberwise' (s : Finset ι) (g : ι → κ) (f : κ → α) :
    ∏ j, ∏ _i ∈ s.filter fun i ↦ g i = j, f j = ∏ i ∈ s, f (g i)

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

∏ j : κ, ∏ _i ∈ Finset.filter (fun i => g i = j) s, f j = ∏ i ∈ s, f (g i)


/-- If `ξ` is an integer, all its convergents equal `ξ`. -/
@[simp]
theorem convergent_of_int {ξ : ℤ} (n : ℕ) : convergent ξ n = ξ


/-- The `ins` function preserves the ordering invariants. -/
protected theorem Ordered.ins : ∀ {t : RBNode α}, t.Ordered cmp → (ins cmp x t).Ordered cmp

{α : Type u_1}
{cmp : α → α → Ordering}
{x : α}
{t : Batteries.RBNode α}

Batteries.RBNode.Ordered cmp t → Batteries.RBNode.Ordered cmp (Batteries.RBNode.ins cmp x t)


theorem d_eq_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
    φ P.d = φ P.a * -(x * y * z)

(h3 : (Cubic.map φ P).roots = {x, y, z})


theorem apply_eq_zero_of_not_le_supDegree {a : A} (hlt : ¬ D a ≤ p.supDegree D) : p a = 0

(hlt : ¬D a ≤ AddMonoidAlgebra.supDegree D p)


theorem frobenius_sub : frobenius R p (x - y) = frobenius R p x - frobenius R p y

(R : Type u)
[CommRing R]
(p : ℕ)
[ExpChar R p]
(x y : R)

(frobenius R p) (x - y) = (frobenius R p) x - (frobenius R p) y


theorem map_toFinset [DecidableEq α] [DecidableEq β] {s : Multiset α} :
    s.toFinset.map f = (s.map f).toFinset

{α : Type u_1}
{β : Type u_2}
{f : α ↪ β}
[DecidableEq α]
[DecidableEq β]
{s : Multiset α}

Finset.map f s.toFinset = (Multiset.map (⇑f) s).toFinset


@[to_additive]
theorem Finite.toFinset_smul_set (hs : s.Finite) (hf : (a • s).Finite := hs.smul_set) :
    hf.toFinset = a • hs.toFinset

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{a : α}
{s : Set β}
(hs : s.Finite)
(hf : (a • s).Finite := ⋯)

Set.Finite.toFinset hf = a • hs.toFinset


@[simp]
theorem up_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    up (no_index (OfNat.ofNat n : α)) = OfNat.ofNat n

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

{ down := OfNat.ofNat n } = OfNat.ofNat n


/-- The radius of the circumsphere is the circumradius. -/
@[simp]
theorem circumsphere_radius {n : ℕ} (s : Simplex ℝ P n) : s.circumsphere.radius = s.circumradius

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P n)


lemma dvd_of_mul_dvd_mul_left (ha : a ≠ 0) (h : a * m ∣ a * n) : m ∣ n

{a m n : ℤ}
(ha : a ≠ 0)
(h : a * m ∣ a * n)


@[fun_prop]
theorem differentiableAt_snd : DifferentiableAt 𝕜 Prod.snd p

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : E × F}


@[to_additive]
theorem prod_biUnion [DecidableEq α] {s : Finset γ} {t : γ → Finset α}
    (hs : Set.PairwiseDisjoint (↑s) t) : ∏ x ∈ s.biUnion t, f x = ∏ x ∈ s, ∏ i ∈ t x, f i

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
{f : α → β}
[AddCommMonoid β]
[DecidableEq α]
{s : Finset γ}
{t : γ → Finset α}
(hs : (↑s).PairwiseDisjoint t)

∑ x ∈ s.biUnion t, f x = ∑ x ∈ s, ∑ i ∈ t x, f i


lemma quasiIsoAt_iff_exactAt (f : K ⟶ L) (i : ι) [K.HasHomology i] [L.HasHomology i]
    (hK : K.ExactAt i) :
    QuasiIsoAt f i ↔ L.ExactAt i


/-- Angles are translation invariant -/
@[simp]
theorem angle_vsub_const (p₁ p₂ p₃ p : P) : ∠ (p₁ -ᵥ p) (p₂ -ᵥ p) (p₃ -ᵥ p) = ∠ p₁ p₂ p₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(p₁ p₂ p₃ p : P)

EuclideanGeometry.angle (p₁ -ᵥ p) (p₂ -ᵥ p) (p₃ -ᵥ p) = EuclideanGeometry.angle p₁ p₂ p₃


theorem lTensor_comp : (g.comp f).lTensor M = (g.lTensor M).comp (f.lTensor M)

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
(g : P →ₗ[R] Q)
(f : N →ₗ[R] P)

LinearMap.lTensor M (g ∘ₗ f) = LinearMap.lTensor M g ∘ₗ LinearMap.lTensor M f


theorem pathGraph_adj {n : ℕ} {u v : Fin n} :
    (pathGraph n).Adj u v ↔ u.val + 1 = v.val ∨ v.val + 1 = u.val

(SimpleGraph.pathGraph n).Adj u v ↔ ↑u + 1 = ↑v ∨ ↑v + 1 = ↑u


theorem not_empty_toList (v : Vector α (n + 1)) : ¬v.toList.isEmpty

{n : ℕ}
{α : Type u_1}
(v : Mathlib.Vector α (n + 1))


/-- Sections of `F.op ⋙ yoneda.obj X` identify to natural
transformations `F ⟶ (const J).obj X`. -/
@[simps]
def opCompYonedaSectionsEquiv (F : J ⥤ C) (X : C) :
    (F.op ⋙ yoneda.obj X).sections ≃ (F ⟶ (const J).obj X)

(τ : F ⟶ (CategoryTheory.Functor.const J).obj X)

↑((CategoryTheory.Limits.opCompYonedaSectionsEquiv F X).symm τ) j = τ.app (Opposite.unop j)


/-- Predicate for a preorder to be equipped with its order-bornology, namely for its bounded sets
to be the ones that are bounded both above and below. -/
class IsOrderBornology : Prop where
  protected isBounded_iff_bddBelow_bddAbove (s : Set α) : IsBounded s ↔ BddBelow s ∧ BddAbove s

{α : Type u_1}
[Bornology α]
[Preorder α]
[self : IsOrderBornology α]
(s : Set α)

Bornology.IsBounded s ↔ BddBelow s ∧ BddAbove s


@[simp]
theorem NatTrans.mapHomotopyCategory_id (c : ComplexShape ι) (F : V ⥤ W) [F.Additive] :
    NatTrans.mapHomotopyCategory (𝟙 F) c = 𝟙 (F.mapHomotopyCategory c)

{ι : Type u_2}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{W : Type u_3}
[CategoryTheory.Category.{u_4, u_3} W]
[CategoryTheory.Preadditive W]
(c : ComplexShape ι)
(F : V ⥤ W)
[F.Additive]

CategoryTheory.NatTrans.mapHomotopyCategory (𝟙 F) c = 𝟙 (F.mapHomotopyCategory c)


nonrec theorem isOpenMap_smul (hc : IsUnit c) : IsOpenMap fun x : α => c • x

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


theorem coinduced_mono (h : t₁ ≤ t₂) : t₁.coinduced f ≤ t₂.coinduced f

{α : Type u_1}
{β : Type u_2}
{t₁ t₂ : TopologicalSpace α}
{f : α → β}
(h : t₁ ≤ t₂)

TopologicalSpace.coinduced f t₁ ≤ TopologicalSpace.coinduced f t₂


@[refl]
theorem IsConj.refl (a : α) : IsConj a a


theorem iUnion_inter_closedBall_nat (s : Set α) (x : α) : ⋃ n : ℕ, s ∩ closedBall x n = s

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


theorem IsTheta.smul [NormedSpace 𝕜 E'] [NormedSpace 𝕜' F'] {f₁ : α → 𝕜} {f₂ : α → 𝕜'} {g₁ : α → E'}
    {g₂ : α → F'} (hf : f₁ =Θ[l] f₂) (hg : g₁ =Θ[l] g₂) :
    (fun x ↦ f₁ x • g₁ x) =Θ[l] fun x ↦ f₂ x • g₂ x

{α : Type u_1}
{E' : Type u_6}
{F' : Type u_7}
{𝕜 : Type u_14}
{𝕜' : Type u_15}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
[NormedField 𝕜]
[NormedField 𝕜']
{l : Filter α}
[NormedSpace 𝕜 E']
[NormedSpace 𝕜' F']
{f₁ : α → 𝕜}
{f₂ : α → 𝕜'}
{g₁ : α → E'}
{g₂ : α → F'}
(hf : f₁ =Θ[l] f₂)
(hg : g₁ =Θ[l] g₂)

(fun x => f₁ x • g₁ x) =Θ[l] fun x => f₂ x • g₂ x


/-- If `f` is a locally integrable real-valued function which is `O(x ^ (-b))` at `0`, then for any
`b < s`, its Mellin transform converges on some right neighbourhood of `0`. -/
theorem mellin_convergent_zero_of_isBigO {b : ℝ} {f : ℝ → ℝ}
    (hfc : AEStronglyMeasurable f <| volume.restrict (Ioi 0))
    (hf :  f =O[𝓝[>] 0] (· ^ (-b))) {s : ℝ} (hs : b < s) :
    ∃ c : ℝ, 0 < c ∧ IntegrableOn (fun t : ℝ => t ^ (s - 1) * f t) (Ioc 0 c)

(hfc : MeasureTheory.AEStronglyMeasurable f (MeasureTheory.volume.restrict (Set.Ioi 0)))

∃ c, 0 < c ∧ MeasureTheory.IntegrableOn (fun t => t ^ (s - 1) * f t) (Set.Ioc 0 c) MeasureTheory.volume


theorem mem_of_subset' {a} : ∀ {l₁ l₂ : Lists' α true} (_ : l₁ ⊆ l₂) (_ : a ∈ l₁.toList), a ∈ l₂

{α : Type u_1}
{a : Lists α}
{l₁ l₂ : Lists' α true}


@[simp]
theorem pure_bindOnSupport (a : α) (f : ∀ (a' : α) (_ : a' ∈ (pure a).support), PMF β) :
    (pure a).bindOnSupport f = f a ((mem_support_pure_iff a a).mpr rfl)

(f : (a' : α) → a' ∈ (PMF.pure a).support → PMF β)


@[simp]
protected theorem Orientation.reindex_neg {ι ι' : Type*} (e : ι ≃ ι') (x : Orientation R M ι) :
    Orientation.reindex R M e (-x) = -Orientation.reindex R M e x

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_4}
{ι' : Type u_5}
(e : ι ≃ ι')
(x : Orientation R M ι)

(Orientation.reindex R M e) (-x) = -(Orientation.reindex R M e) x


@[simp]
theorem Iio_union_Icc_eq_Iic (h : a ≤ b) : Iio a ∪ Icc a b = Iic b

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


theorem MeasurableSet.exists_measurable_proj {_ : MeasurableSpace α}
    (hs : MeasurableSet s) (hne : s.Nonempty) : ∃ f : α → s, Measurable f ∧ ∀ x : s, f x = x

∀ {x : MeasurableSpace α}, MeasurableSet s → s.Nonempty → ∃ f, Measurable f ∧ ∀ (x : ↑s), f ↑x = x


@[simp]
theorem vadd_im : (x +ᵥ z).im = z.im


/-- Expand the square -/
theorem norm_sub_mul_self_real (x y : F) :
    ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ - 2 * ⟪x, y⟫_ℝ + ‖y‖ * ‖y‖

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(x y : F)


theorem length_mul_ge_length_sub_length (w₁ w₂ : W) :
    ℓ w₁ - ℓ w₂ ≤ ℓ (w₁ * w₂)

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(w₁ w₂ : W)

cs.length w₁ - cs.length w₂ ≤ cs.length (w₁ * w₂)


/-- If a function is `C^n` with `1 ≤ n` around a point, then the derivative of `f` at this point
is also a strict derivative. -/
theorem ContDiffAt.hasStrictDerivAt {f : 𝕂 → F'} {x : 𝕂} (hf : ContDiffAt 𝕂 n f x) (hn : 1 ≤ n) :
    HasStrictDerivAt f (deriv f x) x

{n : ℕ∞}
{𝕂 : Type u_1}
[RCLike 𝕂]
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace 𝕂 F']
{f : 𝕂 → F'}
{x : 𝕂}
(hf : ContDiffAt 𝕂 n f x)
(hn : 1 ≤ n)


theorem interior_setOf_eq {p : X → Prop} : interior { x | p x } = { x | ∀ᶠ y in 𝓝 x, p y }

{X : Type u}
[TopologicalSpace X]
{p : X → Prop}

interior {x | p x} = {x | ∀ᶠ (y : X) in 𝓝 x, p y}


theorem measurable_mapNatBool [MeasurableSpace α] [CountablyGenerated α] :
    Measurable (mapNatBool α)

(α : Type u_1)
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]


@[simp]
theorem apply_lineMap (e : P₁ ≃ᵃ[k] P₂) (a b : P₁) (c : k) :
    e (AffineMap.lineMap a b c) = AffineMap.lineMap (e a) (e b) c

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(e : P₁ ≃ᵃ[k] P₂)
(a b : P₁)
(c : k)

e ((AffineMap.lineMap a b) c) = (AffineMap.lineMap (e a) (e b)) c


theorem isPreconnected_Ico : IsPreconnected (Ico a b)

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{a b : α}


@[simp]
theorem Matrix.toBilin'_toMatrix' (B : BilinForm R₂ (n → R₂)) :
    Matrix.toBilin' (BilinForm.toMatrix' B) = B

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(B : LinearMap.BilinForm R₂ (n → R₂))

Matrix.toBilin' (LinearMap.BilinForm.toMatrix' B) = B


theorem of_is_bilimit' {b : BinaryBicone X Y} (h : b.IsBilimit) :
    IsPullback (0 : 0 ⟶ X) (0 : 0 ⟶ Y) b.inl b.inr

{b : CategoryTheory.Limits.BinaryBicone X Y}

CategoryTheory.IsPullback 0 0 b.inl b.inr


theorem Commute.ring_inverse_ring_inverse {a b : M₀} (h : Commute a b) :
    Commute (Ring.inverse a) (Ring.inverse b)

{M₀ : Type u_2}
[MonoidWithZero M₀]
{a b : M₀}
(h : Commute a b)


/-- When the second map `S.g` is zero, this is the homology data on `S` given by
the chosen `cokernel S.f` -/
@[simps]
noncomputable def ofHasCokernel (hg : S.g = 0) [HasCokernel S.f] :
    S.HomologyData

(CategoryTheory.ShortComplex.HomologyData.ofHasCokernel S hg).right =
  CategoryTheory.ShortComplex.RightHomologyData.ofHasCokernel S hg


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


theorem lt_addChar (p : Pos) (c : Char) : p < p + c


theorem symm_apply (e : Trivialization F (π F E)) {b : B} (hb : b ∈ e.baseSet) (y : F) :
    e.symm b y = cast (congr_arg E (e.symm_coe_proj hb)) (e.toPartialHomeomorph.symm (b, y)).2

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

e.symm b y = cast ⋯ (↑e.symm (b, y)).snd


/-- A subset of a monoid is contained in the submonoid it generates. -/
@[to_additive
    "A subset of an `AddMonoid` is contained in the `AddSubmonoid` it generates."]
theorem subset_closure {s : Set M} : s ⊆ Closure s


theorem ext [Inhabited (M F)] (x y : M F) (H : ∀ ps : Path F, iselect ps x = iselect ps y) :
    x = y

(H : ∀ (ps : PFunctor.Approx.Path F), PFunctor.M.iselect ps x = PFunctor.M.iselect ps y)


/-- The type of dependent functions on a sum type `ι ⊕ ι'` is equivalent to the type of pairs of
functions on `ι` and on `ι'`. This is a dependent version of `Equiv.sumArrowEquivProdArrow`. -/
@[simps]
def sumPiEquivProdPi (π : ι ⊕ ι' → Type*) : (∀ i, π i) ≃ (∀ i, π (inl i)) × ∀ i', π (inr i')

{ι : Type u_2}
{ι' : Type u_3}
(π : ι ⊕ ι' → Type u_1)
(f : (i : ι ⊕ ι') → π i)

(Equiv.sumPiEquivProdPi π) f = (fun i => f (Sum.inl i), fun i' => f (Sum.inr i'))


theorem valMinAbs_mul_two_eq_iff {n : ℕ} (a : ZMod n) : a.valMinAbs * 2 = n ↔ 2 * a.val = n


@[to_additive (attr := simp, aesop safe apply (rule_sets := [finsetNonempty]))]
theorem inv_nonempty_iff : s⁻¹.Nonempty ↔ s.Nonempty

{α : Type u_2}
[DecidableEq α]
[Neg α]
{s : Finset α}


theorem sub_mul (h : 0 < b → b < a → c ≠ ∞) : (a - b) * c = a * c - b * c

{a b c : ℝ≥0∞}
(h : 0 < b → b < a → c ≠ ⊤)


@[simp]
theorem comp_id (f : α →ᵈ β) : f.comp (Dilation.id α) = f

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(f : α →ᵈ β)


/-- Let `X` be an extended metric space. Let `K : ι → Set X` be a locally finite family of closed
sets, let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there
exists a positive continuous function `δ : C(X, ℝ≥0∞)` such that for any `i` and `x ∈ K i`,
we have `EMetric.closedBall x (δ x) ⊆ U i`. -/
theorem exists_continuous_eNNReal_forall_closedBall_subset (hK : ∀ i, IsClosed (K i))
    (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) :
    ∃ δ : C(X, ℝ≥0∞), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (δ x) ⊆ U i

{ι : Type u_1}
{X : Type u_2}
[EMetricSpace X]
{K U : ι → Set X}
(hK : ∀ (i : ι), IsClosed (K i))
(hU : ∀ (i : ι), IsOpen (U i))
(hKU : ∀ (i : ι), K i ⊆ U i)
(hfin : LocallyFinite K)

∃ δ, (∀ (x : X), 0 < δ x) ∧ ∀ (i : ι), ∀ x ∈ K i, EMetric.closedBall x (δ x) ⊆ U i


theorem image_inversion_sphere_dist_center (hR : R ≠ 0) (hy : y ≠ c) :
    inversion c R '' sphere y (dist y c) = insert c (perpBisector c (inversion c R y) : Set P)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c y : P}
{R : ℝ}
(hR : R ≠ 0)
(hy : y ≠ c)

EuclideanGeometry.inversion c R '' Metric.sphere y (dist y c) =
  insert c ↑(AffineSubspace.perpBisector c (EuclideanGeometry.inversion c R y))


/-- The intersection of a Lindelöf set and a closed set is a Lindelöf set. -/
theorem IsLindelof.inter_right (hs : IsLindelof s) (ht : IsClosed t) : IsLindelof (s ∩ t)

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
(hs : IsLindelof s)
(ht : IsClosed t)


/-- The restriction of an open cover to an open subset. -/
@[simps! J obj map]
noncomputable
def Scheme.OpenCover.restrict {X : Scheme.{u}} (𝒰 : X.OpenCover) (U : Opens X) :
    U.toScheme.OpenCover

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(U : X.Opens)

∀ (x : 𝒰.J), (𝒰.restrict U).obj x = ↑((TopologicalSpace.Opens.map (𝒰.map x).val.base).obj U)


@[simp]
theorem sym2_eq_zero_iff {m : Multiset α} : m.sym2 = 0 ↔ m = 0


@[to_additive]
lemma comp_left_injective (e : M ≃* N) : Injective fun f : N →* P ↦ f.comp (e : M →* N)

{M : Type u_6}
{N : Type u_7}
{P : Type u_8}
[MulOneClass M]
[MulOneClass N]
[MulOneClass P]
(e : M ≃* N)


theorem map_snd' (f : α → γ) (g : β → δ) : Prod.snd ∘ map f g = g ∘ Prod.snd

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α → γ)
(g : β → δ)


theorem adjoin_prod_le (s : Set A) (t : Set B) :
    adjoin R (s ×ˢ t) ≤ (adjoin R s).prod (adjoin R t)

(R : Type uR)
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(s : Set A)
(t : Set B)

Algebra.adjoin R (s ×ˢ t) ≤ (Algebra.adjoin R s).prod (Algebra.adjoin R t)


@[continuity, fun_prop]
theorem continuous_circleMap (c : ℂ) (R : ℝ) : Continuous (circleMap c R)


theorem gcd_dvd {s : Multiset α} {a : α} (h : a ∈ s) : s.gcd ∣ a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Multiset α}
{a : α}
(h : a ∈ s)


theorem exposedPoints_subset_extremePoints : A.exposedPoints 𝕜 ⊆ A.extremePoints 𝕜

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[LinearOrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A : Set E}

Set.exposedPoints 𝕜 A ⊆ Set.extremePoints 𝕜 A


@[to_additive (attr := simp)]
theorem mulEquivOfLocalizations_apply {k : LocalizationMap S P} {x} :
    f.mulEquivOfLocalizations k x = f.lift k.map_units x

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{k : S.LocalizationMap P}
{x : N}

(f.addEquivOfLocalizations k) x = (f.lift ⋯) x


@[simp] theorem coe_mk (f : α →o β) (hf : Continuous f) : ⇑(mk f hf) = f

(hf : OmegaCompletePartialOrder.Continuous f)


/-- A typeclass stating that multiplication is left and right distributive
over addition. -/
class Distrib (R : Type*) extends Mul R, Add R where
  /-- Multiplication is left distributive over addition -/
  protected left_distrib : ∀ a b c : R, a * (b + c) = a * b + a * c
  /-- Multiplication is right distributive over addition -/
  protected right_distrib : ∀ a b c : R, (a + b) * c = a * c + b * c

{R : Type u_1}
[self : Distrib R]
(a b c : R)


/-- If two monoid homomorphisms are equal on a set, then they are equal on its subgroup closure. -/
@[to_additive
      "If two monoid homomorphisms are equal on a set, then they are equal on its subgroup
      closure."]
theorem eqOn_closure {f g : G →* M} {s : Set G} (h : Set.EqOn f g s) : Set.EqOn f g (closure s)

{G : Type u_1}
[Group G]
{M : Type u_7}
[Monoid M]
{f g : G →* M}
{s : Set G}
(h : Set.EqOn (⇑f) (⇑g) s)


theorem Squarefree.ext_iff {n m : ℕ} (hn : Squarefree n) (hm : Squarefree m) :
    n = m ↔ ∀ p, Prime p → (p ∣ n ↔ p ∣ m)

n = m ↔ ∀ (p : ℕ), Nat.Prime p → (p ∣ n ↔ p ∣ m)


/-- Order isomorphism between `α` considered as a Boolean ring considered as a Boolean algebra and
`α`. -/
@[simps!]
def OrderIso.asBoolAlgAsBoolRing (α : Type*) [BooleanAlgebra α] : AsBoolAlg (AsBoolRing α) ≃o α

∀ (a : AsBoolAlg (AsBoolRing α)), (OrderIso.asBoolAlgAsBoolRing α) a = ofBoolRing (ofBoolAlg a)


theorem Ioi_mem_atTop [Preorder α] [NoMaxOrder α] (x : α) : Ioi x ∈ (atTop : Filter α)

{α : Type u_3}
[Preorder α]
[NoMaxOrder α]
(x : α)


theorem sym2_cons (a : α) (m : Multiset α) :
    (m.cons a).sym2 = ((m.cons a).map <| fun b => s(a, b)) + m.sym2

(a ::ₘ m).sym2 = Multiset.map (fun b => s(a, b)) (a ::ₘ m) + m.sym2


theorem comp_embeddingPiTangent_mfderiv (x : M) (hx : x ∈ s) :
    ((ContinuousLinearMap.fst ℝ E ℝ).comp
            (@ContinuousLinearMap.proj ℝ _ ι (fun _ => E × ℝ) _ _ (fun _ => inferInstance)
              (f.ind x hx))).comp
        (mfderiv I 𝓘(ℝ, ι → E × ℝ) f.embeddingPiTangent x) =
      mfderiv I I (chartAt H (f.c (f.ind x hx))) x

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

((ContinuousLinearMap.fst ℝ E ℝ).comp (ContinuousLinearMap.proj (f.ind x hx))).comp
    (mfderiv I 𝓘(ℝ, ι → E × ℝ) (⇑f.embeddingPiTangent) x) =
  mfderiv I I (↑(chartAt H (f.c (f.ind x hx)))) x


lemma exists_app :
    ∃ (φ : F.obj (op Y) ⟶ G.obj (op Y)),
      ∀ {Z : C} (p : Z ⟶ Y) (hp : S (p ≫ g)), φ ≫ G.map p.op =
        F.map p.op ≫ (x (p ≫ g) hp).app ⟨Over.mk (𝟙 Z)⟩

(hG :
  ⦃Y : C⦄ →
    (f : Y ⟶ X) → CategoryTheory.Limits.IsLimit (G.mapCone (CategoryTheory.Sieve.pullback f S).arrows.cocone.op))

(x : CategoryTheory.Presieve.FamilyOfElements (CategoryTheory.presheafHom F G) S.arrows)

∃ φ,
  ∀ {Z : C} (p : Z ⟶ Y) (hp : S.arrows (CategoryTheory.CategoryStruct.comp p g)),
    CategoryTheory.CategoryStruct.comp φ (G.map p.op) =
      CategoryTheory.CategoryStruct.comp (F.map p.op)
        ((x (CategoryTheory.CategoryStruct.comp p g) hp).app
          (Opposite.op (CategoryTheory.Over.mk (CategoryTheory.CategoryStruct.id Z))))


theorem bot_lt_mul' [LT α] {a b : WithBot α} (ha : ⊥ < a) (hb : ⊥ < b) : ⊥ < a * b

{α : Type u_1}
[DecidableEq α]
[MulZeroClass α]
[LT α]
{a b : WithBot α}
(ha : ⊥ < a)
(hb : ⊥ < b)


/-- If `E` is a strictly convex normed space and `f : α → E` is a function such that `‖f x‖ ≤ C`
a.e., then either this function is a.e. equal to its average value, or the norm of its integral is
strictly less than `(μ univ).toReal * C`. -/
theorem ae_eq_const_or_norm_integral_lt_of_norm_le_const [StrictConvexSpace ℝ E] [IsFiniteMeasure μ]
    (h_le : ∀ᵐ x ∂μ, ‖f x‖ ≤ C) :
    f =ᵐ[μ] const α (⨍ x, f x ∂μ) ∨ ‖∫ x, f x ∂μ‖ < (μ univ).toReal * C

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{μ : MeasureTheory.Measure α}
{f : α → E}
{C : ℝ}
[StrictConvexSpace ℝ E]
[MeasureTheory.IsFiniteMeasure μ]
(h_le : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ C)

f =ᵐ[μ] Function.const α (⨍ (x : α), f x ∂μ) ∨ ‖∫ (x : α), f x ∂μ‖ < (μ Set.univ).toReal * C


theorem idealFactorsFunOfQuotHom_comp {f : R ⧸ I →+* A ⧸ J} {g : A ⧸ J →+* B ⧸ L}
    (hf : Function.Surjective f) (hg : Function.Surjective g) :
    (idealFactorsFunOfQuotHom hg).comp (idealFactorsFunOfQuotHom hf) =
      idealFactorsFunOfQuotHom (show Function.Surjective (g.comp f) from hg.comp hf)

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[IsDedekindDomain A]
{I : Ideal R}
{J : Ideal A}
{B : Type u_4}
[CommRing B]
[IsDedekindDomain B]
{L : Ideal B}
{f : R ⧸ I →+* A ⧸ J}
{g : A ⧸ J →+* B ⧸ L}
(hf : Function.Surjective ⇑f)
(hg : Function.Surjective ⇑g)

(idealFactorsFunOfQuotHom hg).comp (idealFactorsFunOfQuotHom hf) = idealFactorsFunOfQuotHom ⋯


theorem Monic.comp (hp : p.Monic) (hq : q.Monic) (h : q.natDegree ≠ 0) : (p.comp q).Monic

{R : Type u}
[CommRing R]
[IsDomain R]
{p q : R[X]}
(hp : p.Monic)
(hq : q.Monic)
(h : q.natDegree ≠ 0)


@[simp]
theorem mgf_zero' : mgf X μ 0 = (μ Set.univ).toReal

{Ω : Type u_1}
{m : MeasurableSpace Ω}
{X : Ω → ℝ}
{μ : MeasureTheory.Measure Ω}

ProbabilityTheory.mgf X μ 0 = (μ Set.univ).toReal


/-- The tensor algebra is isomorphic to a direct sum of tensor powers. -/
@[simps!]
def equivDirectSum : TensorAlgebra R M ≃ₐ[R] ⨁ n, ⨂[R]^n M

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(a : TensorAlgebra R M)

TensorAlgebra.equivDirectSum a = TensorAlgebra.toDirectSum a


lemma prob_compl_lt_one_sub_of_lt_prob {p : ℝ≥0∞} (hμs : p < μ s) (s_mble : MeasurableSet s) :
    μ sᶜ < 1 - p

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[MeasureTheory.IsProbabilityMeasure μ]
{p : ℝ≥0∞}
(hμs : p < μ s)
(s_mble : MeasurableSet s)


@[to_additive (attr := simp) dite_smul]
lemma pow_dite (p : Prop) [Decidable p] (a : α) (b : p → β) (c : ¬ p → β) :
    a ^ (if h : p then b h else c h) = if h : p then a ^ b h else a ^ c h

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

(a ^ if h : p then b h else c h) = if h : p then a ^ b h else a ^ c h


theorem not_mem_empty (x : α) : ¬x ∈ (∅ : Set α)


@[simp]
theorem swap_swap_eq : swap ∘ swap = @id (α × β)


theorem comap_const_of_mem {x : β} (h : ∀ t ∈ g, x ∈ t) : comap (fun _ : α => x) g = ⊤

{α : Type u}
{β : Type v}
{g : Filter β}
{x : β}
(h : ∀ t ∈ g, x ∈ t)


lemma SupClosed.preimage [FunLike F β α] [SupHomClass F β α] (hs : SupClosed s) (f : F) :
    SupClosed (f ⁻¹' s)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[SemilatticeSup β]
{s : Set α}
[FunLike F β α]
[SupHomClass F β α]
(hs : SupClosed s)
(f : F)


/-- Restrict a `PartialEquiv` to a pair of corresponding sets. -/
@[simps (config := .asFn)]
def restr (h : e.IsImage s t) : PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}
{s : Set α}
{t : Set β}
(h : e.IsImage s t)


lemma isAtom_iff : IsAtom s ↔ ∃ a, s = {a}


theorem IsPeriodicPt.minimalPeriod_pos (hn : 0 < n) (hx : IsPeriodicPt f n x) :
    0 < minimalPeriod f x

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}
(hn : 0 < n)
(hx : Function.IsPeriodicPt f n x)


theorem card_Icc [LocallyFiniteOrder α] [LocallyFiniteOrder β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] (p q : α × β) :
    (Finset.Icc p q).card = (Finset.Icc p.1 q.1).card * (Finset.Icc p.2 q.2).card

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
[DecidableRel fun x x_1 => x ≤ x_1]
(p q : α × β)


@[simps!]
instance : MonoidalCategoryStruct (Dial C)

(CategoryTheory.MonoidalCategory.associator X Y Z).inv.F =
  CategoryTheory.Limits.prod.lift
    (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd
      (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.fst))
    (CategoryTheory.Limits.prod.lift
      (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd
        (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.snd))
      (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.snd))


@[simp]
theorem id_comp (f : α →CO β) : (ContinuousOpenMap.id β).comp f = f

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


theorem isClosed_induced_iff' {f : α → β} {s : Set α} :
    IsClosed[t.induced f] s ↔ ∀ a, f a ∈ closure (f '' s) → a ∈ s

{α : Type u_1}
{β : Type u_2}
[t : TopologicalSpace β]
{f : α → β}
{s : Set α}

IsClosed s ↔ ∀ (a : α), f a ∈ closure (f '' s) → a ∈ s


theorem Duplicate.elim_singleton {y : α} (h : x ∈+ [y]) : False

{α : Type u_1}
{x y : α}
(h : List.Duplicate x [y])


@[deprecated (since := "2023-12-25")]
theorem maps_univ_to (f : α → β) (s : Set β) : MapsTo f univ s ↔ ∀ a, f a ∈ s

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

Set.MapsTo f Set.univ s ↔ ∀ (a : α), f a ∈ s


theorem natCast_self (n : ℕ) : (n : ZMod n) = 0


/-- See note [comp_of_eq lemmas] -/
theorem ContMDiffWithinAt.comp_of_eq {t : Set M'} {g : M' → M''} {x : M} {y : M'}
    (hg : ContMDiffWithinAt I' I'' n g t y) (hf : ContMDiffWithinAt I I' n f s x)
    (st : MapsTo f s t) (hx : f x = y) : ContMDiffWithinAt I I'' n (g ∘ f) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{s : Set M}
{n : ℕ∞}
{t : Set M'}
{g : M' → M''}
{x : M}
{y : M'}
(hg : ContMDiffWithinAt I' I'' n g t y)
(hf : ContMDiffWithinAt I I' n f s x)
(st : Set.MapsTo f s t)
(hx : f x = y)


@[reassoc (attr := simp)]
lemma lift_f_snd_v (p q : ℤ) (hpq : p + 0 = q) :
    (lift φ α β eq).f p ≫ (snd φ).v p q hpq = β.v p q hpq

(α : CochainComplex.HomComplex.Cocycle K F 1)

(β : CochainComplex.HomComplex.Cochain K G 0)

(eq : CochainComplex.HomComplex.δ 0 1 β + (↑α).comp (CochainComplex.HomComplex.Cochain.ofHom φ) ⋯ = 0)

(CochainComplex.mappingCone.lift φ α β eq).f p ≫ (CochainComplex.mappingCone.snd φ).v p q hpq = β.v p q hpq


theorem compProd_apply_eq_compProdFun (κ : Kernel α β) [IsSFiniteKernel κ] (η : Kernel (α × β) γ)
    [IsSFiniteKernel η] (a : α) (hs : MeasurableSet s) :
    (κ ⊗ₖ η) a s = compProdFun κ η a s

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

((κ.compProd η) a) s = κ.compProdFun η a s


theorem get_extract_aux {as : Array α} {start stop : Nat} (h : i < (as.extract start stop).size) :
    start + i < as.size

{α : Type u_1}
{i : Nat}
{as : Array α}
{start stop : Nat}
(h : i < (as.extract start stop).size)


/-- The underlying `List` of a `Vector` after a `scanl` is the `List.scanl`
of the underlying `List` of the original `Vector`.
-/
@[simp]
theorem scanl_val : ∀ {v : Vector α n}, (scanl f b v).val = List.scanl f b v.val

{n : ℕ}
{α : Type u_1}
{β : Type u_2}
(f : β → α → β)
(b : β)
{v : Mathlib.Vector α n}

↑(Mathlib.Vector.scanl f b v) = List.scanl f b ↑v


/-- The associator as a natural isomorphism. -/
@[simps!]
def associatorNatIso : leftAssocTensor C ≅ rightAssocTensor C

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

(CategoryTheory.MonoidalCategory.associatorNatIso C).inv.app X =
  (CategoryTheory.MonoidalCategory.associator X.1 X.2.1 X.2.2).inv


/-- A non-empty star convex set is a contractible space. -/
protected theorem StarConvex.contractibleSpace (h : StarConvex ℝ x s) (hne : s.Nonempty) :
    ContractibleSpace s

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[ContinuousAdd E]
[ContinuousSMul ℝ E]
{s : Set E}
{x : E}
(h : StarConvex ℝ x s)
(hne : s.Nonempty)


@[simp]
theorem mem_bipartiteBelow {a : α} : a ∈ s.bipartiteBelow r b ↔ a ∈ s ∧ r a b

{α : Type u_1}
{β : Type u_2}
(r : α → β → Prop)
{s : Finset α}
{b : β}
[(a : α) → Decidable (r a b)]
{a : α}

a ∈ Finset.bipartiteBelow r s b ↔ a ∈ s ∧ r a b


theorem IsPurelyInseparable.pow_mem (q : ℕ) [ExpChar F q] [IsPurelyInseparable F E] (x : E) :
    ∃ n : ℕ, x ^ q ^ n ∈ (algebraMap F E).range

(F : Type u)
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[ExpChar F q]
[IsPurelyInseparable F E]
(x : E)


@[simp]
theorem of_comp_lift (f : X → L) : lift R f ∘ of R = f

{R : Type u}
{X : Type v}
[CommRing R]
{L : Type w}
[LieRing L]
[LieAlgebra R L]
(f : X → L)

⇑((FreeLieAlgebra.lift R) f) ∘ FreeLieAlgebra.of R = f


/-- linear equivalences between `Module`s are the same as (isomorphic to) isomorphisms
in `ModuleCat` -/
@[simps]
def linearEquivIsoModuleIso {X Y : Type u} [AddCommGroup X] [AddCommGroup Y] [Module R X]
    [Module R Y] : (X ≃ₗ[R] Y) ≅ ModuleCat.of R X ≅ ModuleCat.of R Y

(i : ModuleCat.of R X ≅ ModuleCat.of R Y)

linearEquivIsoModuleIso.inv i = i.toLinearEquiv


theorem WF_iff [BEq α] [Hashable α] {m : Imp α β} :
    m.WF ↔ m.size = m.buckets.size ∧ m.buckets.WF

{α : Type u_1}
{β : Type u_2}
[BEq α]
[Hashable α]
{m : Batteries.HashMap.Imp α β}


theorem map_permutationsAux2' {α' β'} (g : α → α') (g' : β → β') (t : α) (ts ys : List α)
    (r : List β) (f : List α → β) (f' : List α' → β') (H : ∀ a, g' (f a) = f' (map g a)) :
    map g' (permutationsAux2 t ts r ys f).2 =
      (permutationsAux2 (g t) (map g ts) (map g' r) (map g ys) f').2

(H : ∀ (a : List α), g' (f a) = f' (List.map g a))

List.map g' (List.permutationsAux2 t ts r ys f).2 =
  (List.permutationsAux2 (g t) (List.map g ts) (List.map g' r) (List.map g ys) f').2


@[simp]
theorem norm_half_period_eq : ‖(↑(p / 2) : AddCircle p)‖ = |p| / 2


theorem volume_of_add_preimage_eq (s I : Set <| AddCircle T) (u x : AddCircle T)
    (hu : IsOfFinAddOrder u) (hs : (u +ᵥ s : Set <| AddCircle T) =ᵐ[volume] s)
    (hI : I =ᵐ[volume] ball x (T / (2 * addOrderOf u))) :
    volume s = addOrderOf u • volume (s ∩ I)

(hs : u +ᵥ s =ᵐ[MeasureTheory.volume] s)

(hI : I =ᵐ[MeasureTheory.volume] Metric.ball x (T / (2 * ↑(addOrderOf u))))

MeasureTheory.volume s = addOrderOf u • MeasureTheory.volume (s ∩ I)


@[simp]
theorem coe_of (α : Type*) [BooleanAlgebra α] [Fintype α] : ↥(of α) = α

(α : Type u_1)
[BooleanAlgebra α]
[Fintype α]


theorem pi_Ico_mem_nhds' (ha : ∀ i, a' i < x' i) (hb : ∀ i, x' i < b' i) : Ico a' b' ∈ 𝓝 x'

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{ι : Type u_1}
[Finite ι]
{a' b' x' : ι → α}
[Nonempty ι]
(ha : ∀ (i : ι), a' i < x' i)
(hb : ∀ (i : ι), x' i < b' i)


/-- A more general version of `finprod_mem_insert` that requires `s ∩ mulSupport f` rather than `s`
to be finite. -/
@[to_additive
      "A more general version of `finsum_mem_insert` that requires `s ∩ support f` rather
      than `s` to be finite."]
theorem finprod_mem_insert' (f : α → M) (h : a ∉ s) (hs : (s ∩ mulSupport f).Finite) :
    ∏ᶠ i ∈ insert a s, f i = f a * ∏ᶠ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{a : α}
{s : Set α}
(f : α → M)
(h : a ∉ s)
(hs : (s ∩ Function.support f).Finite)

∑ᶠ (i : α) (_ : i ∈ insert a s), f i = f a + ∑ᶠ (i : α) (_ : i ∈ s), f i


@[simp]
theorem castSucc_le_castSucc_iff {a b : Fin n} : castSucc a ≤ castSucc b ↔ a ≤ b


theorem add_eq_zero' : a + b = 0 ↔ a = b

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


@[to_additive]
theorem closure_range_of : closure (Set.range <| @of α) = ⊤

AddSubmonoid.closure (Set.range FreeAddMonoid.of) = ⊤


theorem NF.of_dvd_omega_opow {b e n a} (h : NF (ONote.oadd e n a))
    (d : ω ^ b ∣ repr (ONote.oadd e n a)) :
    b ≤ repr e ∧ ω ^ b ∣ repr a

{b : Ordinal.{0}}
{e : ONote}
{n : ℕ+}
{a : ONote}
(h : (e.oadd n a).NF)
(d : ω ^ b ∣ (e.oadd n a).repr)


theorem LieSubalgebra.toEnd_eq (K : LieSubalgebra R L) {x : K} :
    LieModule.toEnd R K M x = LieModule.toEnd R L M x

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(K : LieSubalgebra R L)
{x : ↥K}

(LieModule.toEnd R (↥K) M) x = (LieModule.toEnd R L M) ↑x


theorem aeval_one : aeval x (1 : R[X]) = 1

{R : Type u}
{A : Type z}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)


theorem factors_eq_some_iff_ne_zero {a : Associates α} :
    (∃ s : Multiset { p : Associates α // Irreducible p }, a.factors = s) ↔ a ≠ 0

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


protected theorem BEqCmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α] [BEq α] [LawfulBEq α]
    (lt_irrefl : ∀ x : α, ¬x < x) :
    BEqCmp (α := α) (compareOfLessAndEq · ·)

{α : Type u_1}
[LT α]
[DecidableRel LT.lt]
[DecidableEq α]
[BEq α]
[LawfulBEq α]
(lt_irrefl : ∀ (x : α), ¬x < x)

Batteries.BEqCmp fun x x_1 => compareOfLessAndEq x x_1


@[simp] theorem pred_mk_succ' (i : Nat) (h₁ : i + 1 < n + 1 + 1) (h₂) :
    Fin.pred ⟨i + 1, h₁⟩ h₂ = ⟨i, Nat.lt_of_succ_lt_succ h₁⟩


theorem derived_le_lower_central (n : ℕ) : derivedSeries G n ≤ lowerCentralSeries G n


@[simp]
theorem mod_self (a : R) : a % a = 0

{R : Type u}
[EuclideanDomain R]
(a : R)


@[simp]
theorem ofNat_eq_lift_iff {a : Cardinal.{u}} {n : ℕ} [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n : Cardinal)) = lift.{v} a ↔ (OfNat.ofNat n : Cardinal) = a

OfNat.ofNat n = Cardinal.lift.{v, u} a ↔ OfNat.ofNat n = a


theorem trTape_mk' (L R : ListBlank Γ) : trTape enc0 (Tape.mk' L R) = trTape' enc0 L R

(enc0 : enc default = Mathlib.Vector.replicate n false)

Turing.TM1to1.trTape enc0 (Turing.Tape.mk' L R) = Turing.TM1to1.trTape' enc0 L R


@[simp, norm_cast]
theorem coe_coeIdeal (I : Ideal R) :
    ((I : FractionalIdeal S P) : Submodule R P) = coeSubmodule P I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
(I : Ideal R)


@[simp] theorem dual_inj {M₁ M₂ : Matroid α} : M₁✶ = M₂✶ ↔ M₁ = M₂

M₁✶ = M₂✶ ↔ M₁ = M₂


lemma neg_of_smul_pos_left [PosSMulMono α β] [SMulPosMono α β] (h : 0 < a • b) (ha : b ≤ 0) :
    a < 0

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulWithZero α β]
[LinearOrder α]
[LinearOrder β]
[PosSMulMono α β]
[SMulPosMono α β]
(h : 0 < a • b)
(ha : b ≤ 0)


/-- Evaluation of an unbundled function at a point (`Function.eval`) as an `OrderHom`. -/
@[simps (config := .asFn)]
def _root_.Pi.evalOrderHom (i : ι) : (∀ j, π j) →o π i

{ι : Type u_6}
{π : ι → Type u_7}
[(i : ι) → Preorder (π i)]
(i : ι)


theorem mem_factors_iff_dvd {a p : α} (ha0 : a ≠ 0) (hp : Irreducible p) :
    Associates.mk p ∈ factors (Associates.mk a) ↔ p ∣ a

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{a p : α}
(ha0 : a ≠ 0)
(hp : Irreducible p)

Associates.mk p ∈ (Associates.mk a).factors ↔ p ∣ a


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

{α' β' : Type u_1}
{s : Multiset α'}
(f : α' → β')


{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[TopologicalSpace M]
[AddCommMonoid M]
[PartialOrder M]
(v w : MeasureTheory.VectorMeasure α M)


lemma eventually_atTop_sumTransform_le :
    ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ i, sumTransform (p a b) g (r i n) n ≤ c * g n

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)

∃ c > 0,
  ∀ᶠ (n : ℕ) in Filter.atTop,
    ∀ (i : α), AkraBazziRecurrence.sumTransform (AkraBazziRecurrence.p a b) g (r i n) n ≤ c * g ↑n


@[simp]
theorem coe_comp (f : HeytingHom β γ) (g : HeytingHom α β) : ⇑(f.comp g) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[HeytingAlgebra α]
[HeytingAlgebra β]
[HeytingAlgebra γ]
(f : HeytingHom β γ)
(g : HeytingHom α β)


theorem ContMDiffAt.of_le (hf : ContMDiffAt I I' n f x) (le : m ≤ n) : ContMDiffAt I I' m f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{x : M}
{m n : ℕ∞}
(hf : ContMDiffAt I I' n f x)
(le : m ≤ n)


theorem subtypePreimage_symm_apply_coe_neg (x : { a // ¬p a } → β) (a : α) (h : ¬p a) :
    ((subtypePreimage p x₀).symm x : α → β) a = x ⟨a, h⟩

{α : Sort u_1}
{β : Sort u_2}
(p : α → Prop)
[DecidablePred p]
(x₀ : { a // p a } → β)
(x : { a // ¬p a } → β)
(a : α)
(h : ¬p a)

↑((Equiv.subtypePreimage p x₀).symm x) a = x ⟨a, h⟩


/-- A version of `Finsupp.range_total` which is useful for going in the other direction -/
theorem span_eq_range_total (s : Set M) : span R s = LinearMap.range (Finsupp.total s M R (↑))

{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
(s : Set M)

Submodule.span R s = LinearMap.range (Finsupp.total (↑s) M R Subtype.val)


lemma eq_X_pow_iff_natDegree_le_natTrailingDegree (h₁ : p.Monic) :
    p = X ^ p.natDegree ↔ p.natDegree ≤ p.natTrailingDegree

{R : Type u}
[Semiring R]
{p : R[X]}
(h₁ : p.Monic)

p = Polynomial.X ^ p.natDegree ↔ p.natDegree ≤ p.natTrailingDegree


@[simp]
theorem a_mul_xa (i j : ZMod (2 * n)) : a i * xa j = xa (j - i)

QuaternionGroup.a i * QuaternionGroup.xa j = QuaternionGroup.xa (j - i)


@[simp]
theorem contDiff_zero : ContDiff 𝕜 0 f ↔ Continuous f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}


@[simp] theorem or_eq_false_iff : ∀ (x y : Bool), (x || y) = false ↔ x = false ∧ y = false


theorem pred_le : ∀ (n : Nat), pred n ≤ n


@[simp]
theorem support_subtype_perm [DecidableEq α] {s : Finset α} (f : Perm α) (h) :
    ((f.subtypePerm h : Perm { x // x ∈ s }).support) =
    (s.attach.filter ((fun x => decide (f x ≠ x))) : Finset { x // x ∈ s })

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(f : Equiv.Perm α)
(h : ∀ (x : α), x ∈ s ↔ f x ∈ s)

(f.subtypePerm h).support = Finset.filter (fun x => decide (f ↑x ≠ ↑x) = true) s.attach


theorem summable_inner (f g : lp G 2) : Summable fun i => ⟪f i, g i⟫

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{G : ι → Type u_4}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
(f g : ↥(lp G 2))


@[to_additive]
theorem image_smul : (s.image fun x => a • x) = a • s

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s : Finset β}
{a : α}

Finset.image (fun x => a +ᵥ x) s = a +ᵥ s


@[continuity]
theorem coe_continuous : Continuous f

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


theorem hasSheafCompose : J.HasSheafCompose F

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[CategoryTheory.Equivalence.TransportsGrothendieckTopology J K e]


theorem toFinset.ext_iff {a b : List α} : a.toFinset = b.toFinset ↔ ∀ x, x ∈ a ↔ x ∈ b

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

a.toFinset = b.toFinset ↔ ∀ (x : α), x ∈ a ↔ x ∈ b


theorem tan_eq_zero_iff' {θ : ℝ} (hθ : cos θ ≠ 0) : tan θ = 0 ↔ ∃ k : ℤ, k * π = θ


/-- A pair of continuous (semi)linear equivalences generates a (semi)linear equivalence between the
spaces of continuous (semi)linear maps. -/
@[simps]
def arrowCongrSL (e₁₂ : E ≃SL[σ₁₂] F) (e₄₃ : H ≃SL[σ₄₃] G) :
    (E →SL[σ₁₄] H) ≃SL[σ₄₃] F →SL[σ₂₃] G

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{𝕜₄ : Type u_4}
{E : Type u_5}
{F : Type u_6}
{G : Type u_7}
{H : Type u_8}
[AddCommGroup E]
[AddCommGroup F]
[AddCommGroup G]
[AddCommGroup H]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NontriviallyNormedField 𝕜₄]
[Module 𝕜 E]
[Module 𝕜₂ F]
[Module 𝕜₃ G]
[Module 𝕜₄ H]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalSpace G]
[TopologicalSpace H]
[TopologicalAddGroup G]
[TopologicalAddGroup H]
[ContinuousConstSMul 𝕜₃ G]
[ContinuousConstSMul 𝕜₄ H]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{σ₂₁ : 𝕜₂ →+* 𝕜}
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
{σ₁₃ : 𝕜 →+* 𝕜₃}
{σ₃₄ : 𝕜₃ →+* 𝕜₄}
{σ₄₃ : 𝕜₄ →+* 𝕜₃}
{σ₂₄ : 𝕜₂ →+* 𝕜₄}
{σ₁₄ : 𝕜 →+* 𝕜₄}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[RingHomInvPair σ₃₄ σ₄₃]
[RingHomInvPair σ₄₃ σ₃₄]
[RingHomCompTriple σ₂₁ σ₁₄ σ₂₄]
[RingHomCompTriple σ₂₄ σ₄₃ σ₂₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₁₃ σ₃₄ σ₁₄]
[RingHomCompTriple σ₂₃ σ₃₄ σ₂₄]
[RingHomCompTriple σ₁₂ σ₂₄ σ₁₄]
[RingHomIsometric σ₁₂]
[RingHomIsometric σ₂₁]
(e₁₂ : E ≃SL[σ₁₂] F)
(e₄₃ : H ≃SL[σ₄₃] G)
(L : F →SL[σ₂₃] G)

(e₁₂.arrowCongrSL e₄₃).symm L = (↑e₄₃.symm).comp (L.comp ↑e₁₂)


@[simp] theorem neg_den (a : Rat) : (-a).den = a.den


/-- The obvious functor `(J ⥤ ShortComplex C) ⥤ ShortComplex (J ⥤ C)`. -/
@[simps]
def inverse : (J ⥤ ShortComplex C) ⥤ ShortComplex (J ⥤ C)

(F : CategoryTheory.Functor J (CategoryTheory.ShortComplex C))

((CategoryTheory.ShortComplex.FunctorEquivalence.inverse J C).obj F).X₃ = F.comp CategoryTheory.ShortComplex.π₃


/-- The product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is an element
of the submonoid. -/
@[to_additive
      "The sum of elements of an `AddSubmonoid` of an `AddCommMonoid` indexed by
      a `Finset` is an element of the `AddSubmonoid`."]
theorem finset_prod_mem {M A} [CommMonoid M] {s : Set M} (hs : IsSubmonoid s) (f : A → M) :
    ∀ t : Finset A, (∀ b ∈ t, f b ∈ s) → (∏ b ∈ t, f b) ∈ s

{M : Type u_3}
{A : Type u_4}
[CommMonoid M]
{s : Set M}
(hs : IsSubmonoid s)
(f : A → M)
(t : Finset A)


@[simp]
theorem functorPullback_bot (F : C ⥤ D) (X : C) : (⊥ : Sieve (F.obj X)).functorPullback F = ⊥

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

CategoryTheory.Sieve.functorPullback F ⊥ = ⊥


/-- The identity functor on `C`, viewed as a functor from `C` to its
monoidal opposite, upgraded to a braided functor. -/
@[simps!] def mopBraidedFunctor : BraidedFunctor C Cᴹᵒᵖ

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

((CategoryTheory.MonoidalOpposite.mopBraidedFunctor C).obj unmop).unmop = unmop


@[simp]
theorem type_prod_lex {α β : Type u} (r : α → α → Prop) (s : β → β → Prop) [IsWellOrder α r]
    [IsWellOrder β s] : type (Prod.Lex s r) = type r * type s

Ordinal.type (Prod.Lex s r) = Ordinal.type r * Ordinal.type s


@[simp]
theorem preimage_eq_preimage {f : β → α} (hf : Surjective f) : f ⁻¹' s = f ⁻¹' t ↔ s = t

{α : Type u_1}
{β : Type u_2}
{s t : Set α}
{f : β → α}
(hf : Function.Surjective f)


lemma LinearMap.dualMap_eq_lcomp (f : M₁ →ₗ[R] M₂) : f.dualMap = f.lcomp R

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


theorem IsLeast.mem_minimals [Preorder α] (h : IsLeast s a) : a ∈ minimals (· ≤ ·) s

{α : Type u_1}
{s : Set α}
{a : α}
[Preorder α]
(h : IsLeast s a)


/-- A circular preorder is the analogue of a preorder where you can loop around. `≤` and `<` are
replaced by ternary relations `btw` and `sbtw`. `btw` is reflexive and cyclic. `sbtw` is transitive.
-/
class CircularPreorder (α : Type*) extends Btw α, SBtw α where
  /-- `a` is between `a` and `a`. -/
  btw_refl (a : α) : btw a a a
  /-- If `b` is between `a` and `c`, then `c` is between `b` and `a`.
  This is motivated by imagining three points on a circle. -/
  btw_cyclic_left {a b c : α} : btw a b c → btw b c a
  sbtw := fun a b c => btw a b c ∧ ¬btw c b a
  /-- Strict betweenness is given by betweenness in one direction and non-betweenness in the other.

  I.e., if `b` is between `a` and `c` but not between `c` and `a`, then we say `b` is strictly
  between `a` and `c`. -/
  sbtw_iff_btw_not_btw {a b c : α} : sbtw a b c ↔ btw a b c ∧ ¬btw c b a := by intros; rfl
  /-- For any fixed `c`, `fun a b ↦ sbtw a b c` is a transitive relation.

  I.e., given `a` `b` `d` `c` in that "order", if we have `b` strictly between `a` and `c`, and `d`
  strictly between `b` and `c`, then `d` is strictly between `a` and `c`. -/
  sbtw_trans_left {a b c d : α} : sbtw a b c → sbtw b d c → sbtw a d c

{α : Type u_1}
[self : CircularPreorder α]
{a b c : α}


/-- The empty scheme. -/
@[simps]
def empty : Scheme

AlgebraicGeometry.Scheme.empty.presheaf =
  (CategoryTheory.Functor.const (TopologicalSpace.Opens ↑(TopCat.of PEmpty.{u_1 + 1}))ᵒᵖ).obj
    (CommRingCat.of PUnit.{u_1 + 1})


@[simp]
theorem mk_eq_mk {f g : α → β} {hf hg} : (mk f hf : α →ₘ[μ] β) = mk g hg ↔ f =ᵐ[μ] g

{hf : MeasureTheory.AEStronglyMeasurable f μ}

{hg : MeasureTheory.AEStronglyMeasurable g μ}

MeasureTheory.AEEqFun.mk f hf = MeasureTheory.AEEqFun.mk g hg ↔ f =ᵐ[μ] g


theorem le_replicate_iff {m : Multiset α} {a : α} {n : ℕ} :
    m ≤ replicate n a ↔ ∃ k ≤ n, m = replicate k a

{α : Type u_1}
{m : Multiset α}
{a : α}
{n : ℕ}

m ≤ Multiset.replicate n a ↔ ∃ k ≤ n, m = Multiset.replicate k a


/-- rank of a hermitian matrix is the number of nonzero eigenvalues of the hermitian matrix -/
lemma rank_eq_card_non_zero_eigs : A.rank = Fintype.card {i // hA.eigenvalues i ≠ 0}

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
[DecidableEq n]
(hA : A.IsHermitian)

A.rank = Fintype.card { i // hA.eigenvalues i ≠ 0 }


@[simp]
theorem isBigO_pure {x} : f'' =O[pure x] g'' ↔ g'' x = 0 → f'' x = 0

{α : Type u_1}
{E'' : Type u_9}
{F'' : Type u_10}
[NormedAddCommGroup E'']
[NormedAddCommGroup F'']
{f'' : α → E''}
{g'' : α → F''}
{x : α}


theorem Filter.Eventually.exists_Ioo_subset [OrderTopology α] [NoMaxOrder α] [NoMinOrder α] {a : α}
    {p : α → Prop} (hp : ∀ᶠ x in 𝓝 a, p x) : ∃ l u, a ∈ Ioo l u ∧ Ioo l u ⊆ { x | p x }

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[NoMaxOrder α]
[NoMinOrder α]
{a : α}
{p : α → Prop}
(hp : ∀ᶠ (x : α) in 𝓝 a, p x)

∃ l u, a ∈ Set.Ioo l u ∧ Set.Ioo l u ⊆ {x | p x}


lemma IsLower.scottHausdorff_le [IsLower α] : scottHausdorff α ≤ ‹TopologicalSpace α›

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsLower α]


theorem EventuallyLE.mul_nonneg [OrderedSemiring β] {l : Filter α} {f g : α → β} (hf : 0 ≤ᶠ[l] f)
    (hg : 0 ≤ᶠ[l] g) : 0 ≤ᶠ[l] f * g

{α : Type u}
{β : Type v}
[OrderedSemiring β]
{l : Filter α}
{f g : α → β}
(hf : 0 ≤ᶠ[l] f)
(hg : 0 ≤ᶠ[l] g)


theorem eventually_cardinal_forall {p : α → ι → Prop} (hic : #ι < c) :
    (∀ᶠ x in l, ∀ i, p x i) ↔ ∀ i, ∀ᶠ x in l, p x i

{ι α : Type u}
{c : Cardinal.{u}}
{l : Filter α}
[CardinalInterFilter l c]
{p : α → ι → Prop}
(hic : #ι < c)

(∀ᶠ (x : α) in l, ∀ (i : ι), p x i) ↔ ∀ (i : ι), ∀ᶠ (x : α) in l, p x i


@[simp]
theorem mem_sUnion : ∀ {x y : PSet.{u}}, y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z

y ∈ ⋃₀ x ↔ ∃ z ∈ x, y ∈ z


theorem gc_upperClosure_coe :
    GaloisConnection (toDual ∘ upperClosure : Set α → (UpperSet α)ᵒᵈ) ((↑) ∘ ofDual)

GaloisConnection (⇑OrderDual.toDual ∘ upperClosure) (SetLike.coe ∘ ⇑OrderDual.ofDual)


@[to_additive]
theorem mul_apply [Mul Y] (f g : LocallyConstant X Y) (x : X) : (f * g) x = f x * g x

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


theorem isUnit_iff_ker_eq_bot [FiniteDimensional K V] (f : V →ₗ[K] V) :
    IsUnit f ↔ (LinearMap.ker f) = ⊥

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
(f : V →ₗ[K] V)


@[simp]
theorem map_id : s.map (RingHom.id R) = s


/-- The functor which sends a functor to types to its sections. -/
@[simps]
def sectionsFunctor : (J ⥤ Type w) ⥤ Type max u w

{F G : CategoryTheory.Functor J (Type w)}

↑((CategoryTheory.Functor.sectionsFunctor J).map φ x) j = φ.app j (↑x j)


theorem eq_zero' [IsEmpty α] (f : lp E p) : f = 0

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
[IsEmpty α]
(f : ↥(lp E p))


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

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

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


protected theorem Function.Surjective.iSup_congr {g : ι' → α} (h : ι → ι') (h1 : Surjective h)
    (h2 : ∀ x, g (h x) = f x) : ⨆ x, f x = ⨆ y, g y

{α : Type u_1}
{ι : Sort u_5}
{ι' : Sort u_6}
[SupSet α]
{f : ι → α}
{g : ι' → α}
(h : ι → ι')
(h1 : Function.Surjective h)
(h2 : ∀ (x : ι), g (h x) = f x)


@[reassoc (attr := simp)]
lemma rightDerivedZeroIsoSelf_inv_hom_id_app (X : C) :
    F.toRightDerivedZero.app X ≫ F.rightDerivedZeroIsoSelf.hom.app X = 𝟙 _

CategoryTheory.CategoryStruct.comp (F.toRightDerivedZero.app X) (F.rightDerivedZeroIsoSelf.hom.app X) =
  CategoryTheory.CategoryStruct.id (F.obj X)


theorem mem_coe_of_mem {a : α} (ha : a ∈ β) (ha' : ⟨a, ha⟩ ∈ γ) : a ∈ (γ : Set α)

{α : Type u}
{β : Set α}
{γ : Set ↑β}
{a : α}
(ha : a ∈ β)
(ha' : ⟨a, ha⟩ ∈ γ)


/-- If `F i → f` in `L1`, then `setToFun μ T hT (F i) → setToFun μ T hT f`. -/
theorem tendsto_setToFun_of_L1 (hT : DominatedFinMeasAdditive μ T C) {ι} (f : α → E)
    (hfi : Integrable f μ) {fs : ι → α → E} {l : Filter ι} (hfsi : ∀ᶠ i in l, Integrable (fs i) μ)
    (hfs : Tendsto (fun i => ∫⁻ x, ‖fs i x - f x‖₊ ∂μ) l (𝓝 0)) :
    Tendsto (fun i => setToFun μ T hT (fs i)) l (𝓝 <| setToFun μ T hT f)

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hfsi : ∀ᶠ (i : ι) in l, MeasureTheory.Integrable (fs i) μ)

(hfs : Filter.Tendsto (fun i => ∫⁻ (x : α), ↑‖fs i x - f x‖₊ ∂μ) l (𝓝 0))

Filter.Tendsto (fun i => MeasureTheory.setToFun μ T hT (fs i)) l (𝓝 (MeasureTheory.setToFun μ T hT f))


/-- The left adjoint of the adjunction which induces the comonad `(U, ε_ U, δ_ U)`. -/
@[simps]
def fromCokleisli : Cokleisli U ⥤ C

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

(CategoryTheory.Cokleisli.Adjunction.fromCokleisli U).obj X = U.obj X


/-- The equivalence `Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiCochainComplexEquivalence :
    Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α

(P : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C (ComplexShape.up α)))

((CategoryTheory.Idempotents.karoubiCochainComplexEquivalence C α).unitIso.inv.app P).f.f n = P.p.f n


@[to_additive (attr := simp)]
theorem MonoidHom.id_comp [MulOneClass M] [MulOneClass N] (f : M →* N) :
    (MonoidHom.id N).comp f = f

{M : Type u_4}
{N : Type u_5}
[MulOneClass M]
[MulOneClass N]
(f : M →* N)


@[to_additive (attr := simp)]
theorem card_mul_singleton : (s * {a}).card = s.card

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


theorem iInter_comm (s : ι → ι' → Set α) : ⋂ (i) (i'), s i i' = ⋂ (i') (i), s i i'

{α : Type u_1}
{ι : Sort u_4}
{ι' : Sort u_5}
(s : ι → ι' → Set α)


/-- A version of `Finset.centerMass_mem_convexHull` for when the weights are nonpositive. -/
lemma Finset.centerMass_mem_convexHull_of_nonpos (t : Finset ι) (hw₀ : ∀ i ∈ t, w i ≤ 0)
    (hws : ∑ i ∈ t, w i < 0) (hz : ∀ i ∈ t, z i ∈ s) : t.centerMass w z ∈ convexHull R s

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{s : Set E}
{w : ι → R}
{z : ι → E}
(t : Finset ι)
(hw₀ : ∀ i ∈ t, w i ≤ 0)
(hws : ∑ i ∈ t, w i < 0)
(hz : ∀ i ∈ t, z i ∈ s)


theorem stationaryPoint_spec {f : PadicSeq p} (hf : ¬f ≈ 0) :
    ∀ {m n},
      stationaryPoint hf ≤ m → stationaryPoint hf ≤ n → padicNorm p (f n) = padicNorm p (f m)

{p : ℕ}
[Fact (Nat.Prime p)]
{f : PadicSeq p}
(hf : ¬f ≈ 0)
{m n : ℕ}

PadicSeq.stationaryPoint hf ≤ m → PadicSeq.stationaryPoint hf ≤ n → padicNorm p (↑f n) = padicNorm p (↑f m)


/-- Introduction rule to prove that `b` is the infimum of `s`: it suffices to check that `b`
is smaller than all elements of `s`, and that this is not the case of any `w > b`.
See `csInf_eq_of_forall_ge_of_forall_gt_exists_lt` for a version in conditionally complete
lattices. -/
theorem sInf_eq_of_forall_ge_of_forall_gt_exists_lt :
    (∀ a ∈ s, b ≤ a) → (∀ w, b < w → ∃ a ∈ s, a < w) → sInf s = b

{α : Type u_1}
[CompleteLattice α]
{s : Set α}
{b : α}

(∀ a ∈ s, b ≤ a) → (∀ (w : α), b < w → ∃ a ∈ s, a < w) → sInf s = b


theorem AECover.integrable_of_integral_tendsto_of_nonneg_ae [l.NeBot] [l.IsCountablyGenerated]
    {φ : ι → Set α} (hφ : AECover μ l φ) {f : α → ℝ} (I : ℝ) (hfi : ∀ i, IntegrableOn f (φ i) μ)
    (hnng : ∀ᵐ x ∂μ, 0 ≤ f x) (htendsto : Tendsto (fun i => ∫ x in φ i, f x ∂μ) l (𝓝 I)) :
    Integrable f μ

(hfi : ∀ (i : ι), MeasureTheory.IntegrableOn f (φ i) μ)

(htendsto : Filter.Tendsto (fun i => ∫ (x : α) in φ i, f x ∂μ) l (𝓝 I))


theorem continuous_clm_apply {X : Type*} [TopologicalSpace X] [FiniteDimensional 𝕜 E]
    {f : X → E →L[𝕜] F} : Continuous f ↔ ∀ y, Continuous (f · y)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type w}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace 𝕜]
{X : Type u_1}
[TopologicalSpace X]
[FiniteDimensional 𝕜 E]
{f : X → E →L[𝕜] F}

Continuous f ↔ ∀ (y : E), Continuous fun x => (f x) y


lemma IsHomological.of_iso {F₁ F₂ : C ⥤ A} [F₁.IsHomological] (e : F₁ ≅ F₂) :
    F₂.IsHomological

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


@[simp, mfld_simps] theorem mem_setOf_eq {x : α} {p : α → Prop} : (x ∈ {y | p y}) = p x


/-- The definition of a Grothendieck topology: a set of sieves `J X` on each object `X` satisfying
three axioms:
1. For every object `X`, the maximal sieve is in `J X`.
2. If `S ∈ J X` then its pullback along any `h : Y ⟶ X` is in `J Y`.
3. If `S ∈ J X` and `R` is a sieve on `X`, then provided that the pullback of `R` along any arrow
   `f : Y ⟶ X` in `S` is in `J Y`, we have that `R` itself is in `J X`.

A sieve `S` on `X` is referred to as `J`-covering, (or just covering), if `S ∈ J X`.

See <https://stacks.math.columbia.edu/tag/00Z4>, or [nlab], or [MM92][] Chapter III, Section 2,
Definition 1.
-/
structure GrothendieckTopology where
  /-- A Grothendieck topology on `C` consists of a set of sieves for each object `X`,
    which satisfy some axioms. -/
  sieves : ∀ X : C, Set (Sieve X)
  /-- The sieves associated to each object must contain the top sieve.
    Use `GrothendieckTopology.top_mem`. -/
  top_mem' : ∀ X, ⊤ ∈ sieves X
  /-- Stability under pullback. Use `GrothendieckTopology.pullback_stable`. -/
  pullback_stable' : ∀ ⦃X Y : C⦄ ⦃S : Sieve X⦄ (f : Y ⟶ X), S ∈ sieves X → S.pullback f ∈ sieves Y
  /-- Transitivity of sieves in a Grothendieck topology.
    Use `GrothendieckTopology.transitive`. -/
  transitive' :
    ∀ ⦃X⦄ ⦃S : Sieve X⦄ (_ : S ∈ sieves X) (R : Sieve X),
      (∀ ⦃Y⦄ ⦃f : Y ⟶ X⦄, S f → R.pullback f ∈ sieves Y) → R ∈ sieves X

(self : CategoryTheory.GrothendieckTopology C)

S ∈ self.sieves X → CategoryTheory.Sieve.pullback f S ∈ self.sieves Y


/-- Multiplicative equivalence between multiplicative endomorphisms of a `MulOneClass` `M`
and additive endomorphisms of `Additive M`. -/
@[simps!] def monoidEndToAdditive (M : Type*) [MulOneClass M] :
    Monoid.End M ≃* AddMonoid.End (Additive M)

(M : Type u_3)
[MulOneClass M]
(f : Additive M →+ Additive M)
(a : M)

((monoidEndToAdditive M).symm f) a = Additive.toMul (f (Additive.ofMul a))


/-- The equivalence class of `z₁.comp₀ z₂ z₃` does not depend on the choice of `z₃` provided
they satisfy the compatibility `z₂.f ≫ z₃.s = z₁.s ≫ z₃.f`. -/
lemma comp₀_rel {X Y Z : C} (z₁ : W.LeftFraction X Y) (z₂ : W.LeftFraction Y Z)
    (z₃ z₃' : W.LeftFraction z₁.Y' z₂.Y') (h₃ : z₂.f ≫ z₃.s = z₁.s ≫ z₃.f)
    (h₃' : z₂.f ≫ z₃'.s = z₁.s ≫ z₃'.f) :
    LeftFractionRel (z₁.comp₀ z₂ z₃) (z₁.comp₀ z₂ z₃')

(h₃ : CategoryTheory.CategoryStruct.comp z₂.f z₃.s = CategoryTheory.CategoryStruct.comp z₁.s z₃.f)

(h₃' : CategoryTheory.CategoryStruct.comp z₂.f z₃'.s = CategoryTheory.CategoryStruct.comp z₁.s z₃'.f)

CategoryTheory.MorphismProperty.LeftFractionRel (z₁.comp₀ z₂ z₃) (z₁.comp₀ z₂ z₃')


theorem edges_bypass_subset {u v : V} (p : G.Walk u v) : p.bypass.edges ⊆ p.edges

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
(p : G.Walk u v)


theorem ideal_gc : GaloisConnection (setOfIdeal : Ideal C(X, R) → Set X) (idealOfSet R)

(X : Type u_1)
(R : Type u_2)
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]

GaloisConnection ContinuousMap.setOfIdeal (ContinuousMap.idealOfSet R)


theorem finrank_cotangentSpace_le_one_iff [IsNoetherianRing R] :
    finrank (ResidueField R) (CotangentSpace R) ≤ 1 ↔ (maximalIdeal R).IsPrincipal

{R : Type u_1}
[CommRing R]
[LocalRing R]
[IsNoetherianRing R]

FiniteDimensional.finrank (LocalRing.ResidueField R) (LocalRing.CotangentSpace R) ≤ 1 ↔
  Submodule.IsPrincipal (LocalRing.maximalIdeal R)


/-- The RHS is a noncomputable version of `Nat.ceilRoot` with better order theoretical
properties. -/
lemma ceilRoot_def :
    ceilRoot n a = if n = 0 ∨ a = 0 then 0 else (a.factorization ⌈/⌉ n).prod (· ^ ·)

n.ceilRoot a = if n = 0 ∨ a = 0 then 0 else (a.factorization ⌈/⌉ n).prod fun x x_1 => x ^ x_1


@[to_additive]
theorem prod_neg_index [AddGroup G] [CommMonoid M] {g : α →₀ G} {h : α → G → M}
    (h0 : ∀ a, h a 0 = 1) : (-g).prod h = g.prod fun a b => h a (-b)

{α : Type u_1}
{M : Type u_8}
{G : Type u_12}
[AddGroup G]
[CommMonoid M]
{g : α →₀ G}
{h : α → G → M}
(h0 : ∀ (a : α), h a 0 = 1)


lemma ssubset_irrfl [IsIrrefl α (· ⊂ ·)] {a : α} : ¬a ⊂ a

{α : Type u}
[HasSSubset α]
[IsIrrefl α fun x x_1 => x ⊂ x_1]
{a : α}


@[to_additive (attr := simp)]
theorem sup_apply (x : E) : (p ⊔ q) x = p x ⊔ q x

{E : Type u_4}
[Group E]
(p q : GroupSeminorm E)
(x : E)


@[fun_prop]
theorem DifferentiableWithinAt.neg (h : DifferentiableWithinAt 𝕜 f s x) :
    DifferentiableWithinAt 𝕜 (fun y => -f y) s 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}
{s : Set E}
(h : DifferentiableWithinAt 𝕜 f s x)


/-- Evaluation of functions into an indexed collection of semigroups at a point is a semigroup
homomorphism.
This is `Function.eval i` as a `MulHom`. -/
@[to_additive (attr := simps)
  "Evaluation of functions into an indexed collection of additive semigroups at a point is an
  additive semigroup homomorphism. This is `Function.eval i` as an `AddHom`."]
def Pi.evalMulHom (i : I) : (∀ i, f i) →ₙ* f i

{I : Type u}
(f : I → Type v)
[(i : I) → Mul (f i)]
(i : I)
(g : (i : I) → f i)


/-- Möbius inversion for functions to a `CommGroupWithZero`, where the equalities only hold on
a well-behaved set. -/
theorem prod_eq_iff_prod_pow_moebius_eq_on_of_nonzero [CommGroupWithZero R]
    (s : Set ℕ) (hs : ∀ m n, m ∣ n → n ∈ s → m ∈ s) {f g : ℕ → R}
    (hf : ∀ n > 0, f n ≠ 0) (hg : ∀ n > 0, g n ≠ 0) :
    (∀ n > 0, n ∈ s → (∏ i ∈ n.divisors, f i) = g n) ↔
      ∀ n > 0, n ∈ s → (∏ x ∈ n.divisorsAntidiagonal, g x.snd ^ μ x.fst) = f n

(hs : ∀ (m n : ℕ), m ∣ n → n ∈ s → m ∈ s)

(∀ n > 0, n ∈ s → ∏ i ∈ n.divisors, f i = g n) ↔
  ∀ n > 0, n ∈ s → ∏ x ∈ n.divisorsAntidiagonal, g x.2 ^ ArithmeticFunction.moebius x.1 = f n


theorem iSup_dite (f : ∀ i, p i → α) (g : ∀ i, ¬p i → α) :
    ⨆ i, (if h : p i then f i h else g i h) = (⨆ (i) (h : p i), f i h) ⊔ ⨆ (i) (h : ¬p i),
    g i h

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(p : ι → Prop)
[DecidablePred p]
(f : (i : ι) → p i → α)
(g : (i : ι) → ¬p i → α)

(⨆ i, if h : p i then f i h else g i h) = (⨆ i, ⨆ (h : p i), f i h) ⊔ ⨆ i, ⨆ (h : ¬p i), g i h


@[simp, reassoc, elementwise]
theorem toStalk_stalkSpecializes {R : Type*} [CommRing R] {x y : PrimeSpectrum R} (h : x ⤳ y) :
    toStalk R y ≫ (structureSheaf R).presheaf.stalkSpecializes h = toStalk R x

{R : Type u_1}
[CommRing R]
{x y : PrimeSpectrum R}
(h : x ⤳ y)

AlgebraicGeometry.StructureSheaf.toStalk R y ≫ (AlgebraicGeometry.Spec.structureSheaf R).presheaf.stalkSpecializes h =
  AlgebraicGeometry.StructureSheaf.toStalk R x


@[to_additive]
theorem mem_center_iff {z : M} : z ∈ center M ↔ ∀ g, g * z = z * g

z ∈ Subsemigroup.center M ↔ ∀ (g : M), g * z = z * g


@[simp] theorem default_eq_zero : default = 0


theorem pure_traverse (x : t α) : traverse pure x = (pure x : F (t α))

{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
{F : Type u → Type u}
[Applicative F]
[LawfulApplicative F]
{α : Type u}
(x : t α)


lemma forall_uIoc_iff {P : α → Prop} :
    (∀ x ∈ Ι a b, P x) ↔ (∀ x ∈ Ioc a b, P x) ∧ ∀ x ∈ Ioc b a, P x

{α : Type u_1}
[LinearOrder α]
{a b : α}
{P : α → Prop}

(∀ x ∈ Ι a b, P x) ↔ (∀ x ∈ Set.Ioc a b, P x) ∧ ∀ x ∈ Set.Ioc b a, P x


theorem UniformCauchySeqOn.prod' {β' : Type*} [UniformSpace β'] {F' : ι → α → β'}
    (h : UniformCauchySeqOn F p s) (h' : UniformCauchySeqOn F' p s) :
    UniformCauchySeqOn (fun (i : ι) a => (F i a, F' i a)) p s

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{s : Set α}
{p : Filter ι}
{β' : Type u_1}
[UniformSpace β']
{F' : ι → α → β'}
(h : UniformCauchySeqOn F p s)
(h' : UniformCauchySeqOn F' p s)

UniformCauchySeqOn (fun i a => (F i a, F' i a)) p s


/-- Given a `ContDiff` function over `𝕂` (which is `ℝ` or `ℂ`) with an invertible derivative
at `a`, the inverse function (produced by `ContDiff.toPartialHomeomorph`) is
also `ContDiff`. -/
theorem to_localInverse {n : ℕ∞} (hf : ContDiffAt 𝕂 n f a)
    (hf' : HasFDerivAt f (f' : E →L[𝕂] F) a) (hn : 1 ≤ n) :
    ContDiffAt 𝕂 n (hf.localInverse hf' hn) (f a)

{𝕂 : Type u_1}
[RCLike 𝕂]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕂 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕂 F]
[CompleteSpace E]
{f : E → F}
{f' : E ≃L[𝕂] F}
{a : E}
{n : ℕ∞}
(hf : ContDiffAt 𝕂 n f a)
(hf' : HasFDerivAt f (↑f') a)
(hn : 1 ≤ n)


theorem roots_mul {p q : R[X]} (hpq : p * q ≠ 0) : (p * q).roots = p.roots + q.roots

{R : Type u}
[CommRing R]
[IsDomain R]
{p q : Polynomial R}
(hpq : p * q ≠ 0)


theorem mod_eq (x y : Nat) : x % y = if 0 < y ∧ y ≤ x then (x - y) % y else x

x % y = ite (0 < y ∧ y ≤ x) ((x - y) % y) x


theorem all_eq_true_iff_forall_mem {l : Array α} : l.all p ↔ ∀ x, x ∈ l → p x

{α : Type u_1}
{p : α → Bool}
{l : Array α}

l.all p 0 = true ↔ ∀ (x : α), x ∈ l → p x = true


@[simp] lemma ofEquiv_symm : (@ofEquiv α).symm = toEquiv


theorem getLast_append' (l₁ l₂ : List α) (h : l₂ ≠ []) :
    getLast (l₁ ++ l₂) (append_ne_nil_of_ne_nil_right l₁ l₂ h) = getLast l₂ h

{α : Type u}
(l₁ l₂ : List α)
(h : l₂ ≠ [])


@[simp]
theorem edgeSet_ssubset_edgeSet : edgeSet G₁ ⊂ edgeSet G₂ ↔ G₁ < G₂


@[simp]
theorem isVonNBounded_neg : IsVonNBounded 𝕜 (-s) ↔ IsVonNBounded 𝕜 s

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[AddGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[DistribMulAction 𝕜 E]
{s : Set E}

Bornology.IsVonNBounded 𝕜 (-s) ↔ Bornology.IsVonNBounded 𝕜 s


theorem map_eq_pure_bind [Monad m] [LawfulMonad m] (f : α → β) (x : m α) : f <$> x = x >>= fun a => pure (f a)

{m : Type u_1 → Type u_2}
{α β : Type u_1}
[Monad m]
[LawfulMonad m]
(f : α → β)
(x : m α)


theorem cof_type_le [IsWellOrder α r] {S : Set α} (h : Unbounded r S) : cof (type r) ≤ #S

{α : Type u_1}
{r : α → α → Prop}
[IsWellOrder α r]
{S : Set α}
(h : Set.Unbounded r S)


@[fun_prop]
theorem HasStrictFDerivAt.const_add (hf : HasStrictFDerivAt f f' x) (c : F) :
    HasStrictFDerivAt (fun y => c + f y) 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}
{f' : E →L[𝕜] F}
{x : E}
(hf : HasStrictFDerivAt f f' x)
(c : F)


theorem l_iSup (gc : GaloisConnection l u) {f : ι → α} : l (iSup f) = ⨆ i, l (f i)

{α : Type u}
{β : Type v}
{ι : Sort x}
[CompleteLattice α]
[CompleteLattice β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{f : ι → α}


theorem bound_aux' (n d : ℕ) : ((d ^ n :) / (n * d ^ 2 :) : ℝ) ≤ rothNumberNat ((2 * d - 1) ^ n)

↑(d ^ n) / ↑(n * d ^ 2) ≤ ↑(rothNumberNat ((2 * d - 1) ^ n))


@[simp]
theorem update_elim_inl [DecidableEq α] [DecidableEq (α ⊕ β)] {f : α → γ} {g : β → γ} {i : α}
    {x : γ} : update (Sum.elim f g) (inl i) x = Sum.elim (update f i x) g

{α : Type u}
{β : Type v}
{γ : Type u_1}
[DecidableEq α]
[DecidableEq (α ⊕ β)]
{f : α → γ}
{g : β → γ}
{i : α}
{x : γ}

Function.update (Sum.elim f g) (Sum.inl i) x = Sum.elim (Function.update f i x) g


theorem MonotoneOn.intervalIntegrable {u : ℝ → E} {a b : ℝ} (hu : MonotoneOn u (uIcc a b)) :
    IntervalIntegrable u μ a b


@[simp]
theorem coe_mk' (D : A →ₗ[R] M) (h) : ⇑(mk' D h) = D

(h : ∀ (a b : A), D (a * b) = a • D b + b • D a)


lemma toNat_ne_zero : toNat c ≠ 0 ↔ c ≠ 0 ∧ c < ℵ₀

Cardinal.toNat c ≠ 0 ↔ c ≠ 0 ∧ c < Cardinal.aleph0


theorem isSeparating_empty_of_thin [Quiver.IsThin C] : IsSeparating (∅ : Set C)

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


theorem list_prod_ofFn_mem_graded {n} (i : Fin n → ι) (r : Fin n → R) (h : ∀ j, r j ∈ A (i j)) :
    (List.ofFn r).prod ∈ A (List.ofFn i).sum

{ι : Type u_1}
{R : Type u_2}
{S : Type u_3}
[SetLike S R]
[Monoid R]
[AddMonoid ι]
{A : ι → S}
[SetLike.GradedMonoid A]
{n : ℕ}
(i : Fin n → ι)
(r : Fin n → R)
(h : ∀ (j : Fin n), r j ∈ A (i j))


theorem _root_.Module.End_isUnit_inv_apply_apply_of_isUnit
    {f : Module.End R M} (h : IsUnit f) (x : M) :
    h.unit.inv (f x) = x

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f : Module.End R M}
(h : IsUnit f)
(x : M)


@[elementwise (attr := simp)]
theorem binaryProductIso_inv_comp_snd (X Y : Type u) :
    (binaryProductIso X Y).inv ≫ Limits.prod.snd = _root_.Prod.snd

(CategoryTheory.Limits.Types.binaryProductIso X Y).inv ≫ CategoryTheory.Limits.prod.snd = Prod.snd


theorem zipWith_def {ι : Type u} {β : ι → Type v} {β₁ : ι → Type v₁} {β₂ : ι → Type v₂}
    [dec : DecidableEq ι] [∀ i : ι, Zero (β i)] [∀ i : ι, Zero (β₁ i)] [∀ i : ι, Zero (β₂ i)]
    [∀ (i : ι) (x : β₁ i), Decidable (x ≠ 0)] [∀ (i : ι) (x : β₂ i), Decidable (x ≠ 0)]
    {f : ∀ i, β₁ i → β₂ i → β i} {hf : ∀ i, f i 0 0 = 0} {g₁ : Π₀ i, β₁ i} {g₂ : Π₀ i, β₂ i} :
    zipWith f hf g₁ g₂ = mk (g₁.support ∪ g₂.support) fun i => f i.1 (g₁ i.1) (g₂ i.1)

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

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

DFinsupp.zipWith f hf g₁ g₂ = DFinsupp.mk (g₁.support ∪ g₂.support) fun i => f (↑i) (g₁ ↑i) (g₂ ↑i)


theorem isClosed_iff_ultrafilter : IsClosed s ↔
    ∀ x, ∀ u : Ultrafilter X, ↑u ≤ 𝓝 x → s ∈ u → x ∈ s

{X : Type u}
{s : Set X}
[TopologicalSpace X]

IsClosed s ↔ ∀ (x : X) (u : Ultrafilter X), ↑u ≤ 𝓝 x → s ∈ u → x ∈ s


theorem LEComap.comp : LEComap g B C → LEComap f A B → LEComap (g.comp f) A C

{X : Type u_2}
{Y : Type u_3}
{Z : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : C(X, Y)}
{A : DiscreteQuotient X}
{B : DiscreteQuotient Y}
{g : C(Y, Z)}
{C : DiscreteQuotient Z}

DiscreteQuotient.LEComap g B C → DiscreteQuotient.LEComap f A B → DiscreteQuotient.LEComap (g.comp f) A C


theorem fdiv_eq_ediv_of_dvd : ∀ {a b : Int}, b ∣ a → a.fdiv b = a / b


@[simp, norm_cast]
theorem coe_neg (f : P1 →ᵃ[k] V2) : ⇑(-f) = -f

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


@[simp]
theorem sub_lie : ⁅x - y, m⁆ = ⁅x, m⁆ - ⁅y, m⁆

{L : Type v}
{M : Type w}
[LieRing L]
[AddCommGroup M]
[LieRingModule L M]
(x y : L)
(m : M)


private theorem mul_smul' [Semiring R] [Module R V] (x y : HahnSeries Γ R)
    (z : HahnModule Γ' R V) : (x * y) • z = x • (y • z)

{Γ : Type u_1}
{Γ' : Type u_2}
{R : Type u_3}
{V : Type u_4}
[OrderedCancelAddCommMonoid Γ]
[PartialOrder Γ']
[AddAction Γ Γ']
[IsOrderedCancelVAdd Γ Γ']
[AddCommMonoid V]
[Semiring R]
[Module R V]
(x y : HahnSeries Γ R)
(z : HahnModule Γ' R V)


theorem disjoint_supported_supported_iff [Nontrivial M] {s t : Set α} :
    Disjoint (supported M R s) (supported M R t) ↔ Disjoint s t

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Nontrivial M]
{s t : Set α}

Disjoint (Finsupp.supported M R s) (Finsupp.supported M R t) ↔ Disjoint s t


@[reassoc (attr := simp)]
theorem limit.conePointUniqueUpToIso_inv_comp {F : J ⥤ C} [HasLimit F] {c : Cone F} (hc : IsLimit c)
    (j : J) : (IsLimit.conePointUniqueUpToIso (limit.isLimit _) hc).inv ≫ limit.π F j = c.π.app j

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

((CategoryTheory.Limits.limit.isLimit F).conePointUniqueUpToIso hc).inv ≫ CategoryTheory.Limits.limit.π F j = c.π.app j


@[to_additive (attr := simp)]
theorem prod_toMultiset [CommMonoid α] (f : α →₀ ℕ) :
    f.toMultiset.prod = f.prod fun a n => a ^ n

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

(Finsupp.toMultiset f).sum = f.sum fun a n => n • a


theorem hexagon_reverse_iso (X Y Z : C) :
    (α_ X Y Z).symm ≪≫ β_ (X ⊗ Y) Z ≪≫ (α_ Z X Y).symm =
      whiskerLeftIso X (β_ Y Z) ≪≫ (α_ X Z Y).symm ≪≫ whiskerRightIso (β_ X Z) Y

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

(α_ X Y Z).symm ≪≫ β_ (X ⊗ Y) Z ≪≫ (α_ Z X Y).symm =
  CategoryTheory.MonoidalCategory.whiskerLeftIso X (β_ Y Z) ≪≫
    (α_ X Z Y).symm ≪≫ CategoryTheory.MonoidalCategory.whiskerRightIso (β_ X Z) Y


/-- In a real vector space of dimension `> 1`, the complement of a singleton is connected. -/
theorem isConnected_compl_singleton_of_one_lt_rank (h : 1 < Module.rank ℝ E) (x : E) :
    IsConnected {x}ᶜ

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[ContinuousAdd E]
[ContinuousSMul ℝ E]
(h : 1 < Module.rank ℝ E)
(x : E)


theorem Matrix.toLinearMap₂'Aux_stdBasis (f : Matrix n m N₂) (i : n) (j : m) :
    f.toLinearMap₂'Aux σ₁ σ₂ (LinearMap.stdBasis R₁ (fun _ => R₁) i 1)
      (LinearMap.stdBasis R₂ (fun _ => R₂) j 1) = f i j

{R₁ : Type u_2}
{S₁ : Type u_3}
{R₂ : Type u_4}
{S₂ : Type u_5}
{N₂ : Type u_11}
{n : Type u_12}
{m : Type u_13}
[Semiring R₁]
[Semiring S₁]
[Semiring R₂]
[Semiring S₂]
[AddCommMonoid N₂]
[Module S₁ N₂]
[Module S₂ N₂]
[SMulCommClass S₂ S₁ N₂]
[Fintype n]
[Fintype m]
(σ₁ : R₁ →+* S₁)
(σ₂ : R₂ →+* S₂)
[DecidableEq n]
[DecidableEq m]
(f : Matrix n m N₂)
(i : n)
(j : m)

((Matrix.toLinearMap₂'Aux σ₁ σ₂ f) ((LinearMap.stdBasis R₁ (fun x => R₁) i) 1))
    ((LinearMap.stdBasis R₂ (fun x => R₂) j) 1) =
  f i j


/-- The obvious functor `(WidePullbackShape J)ᵒᵖ ⥤ WidePushoutShape J`-/
@[simps!]
def widePullbackShapeUnop : (WidePullbackShape J)ᵒᵖ ⥤ WidePushoutShape J

(X : (CategoryTheory.Limits.WidePullbackShape J)ᵒᵖ)

(CategoryTheory.Limits.widePullbackShapeUnop J).obj X = Opposite.unop X


/-- Consider two functions `f` and `g` which coincide on a set `s` and are continuous there.
Then there is an open neighborhood of `s` on which `f` and `g` are uniformly close. -/
lemma exists_is_open_mem_uniformity_of_forall_mem_eq
    [TopologicalSpace β] {r : Set (α × α)} {s : Set β}
    {f g : β → α} (hf : ∀ x ∈ s, ContinuousAt f x) (hg : ∀ x ∈ s, ContinuousAt g x)
    (hfg : s.EqOn f g) (hr : r ∈ 𝓤 α) :
    ∃ t, IsOpen t ∧ s ⊆ t ∧ ∀ x ∈ t, (f x, g x) ∈ r

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[TopologicalSpace β]
{r : Set (α × α)}
{s : Set β}
{f g : β → α}
(hf : ∀ x ∈ s, ContinuousAt f x)
(hg : ∀ x ∈ s, ContinuousAt g x)
(hfg : Set.EqOn f g s)
(hr : r ∈ 𝓤 α)


/-- If `G : C ⥤ D` is a functor which reflects isomorphisms and preserves limits
(we assume all limits exist in `C`),
then checking the sheaf condition for a presheaf `F : Presheaf C X`
is equivalent to checking the sheaf condition for `F ⋙ G`.

The important special case is when
`C` is a concrete category with a forgetful functor
that preserves limits and reflects isomorphisms.
Then to check the sheaf condition it suffices to check it on the underlying sheaf of types.

Another useful example is the forgetful functor `TopCommRing ⥤ Top`.

See <https://stacks.math.columbia.edu/tag/0073>.
In fact we prove a stronger version with arbitrary target category.
-/
theorem isSheaf_iff_isSheaf_comp' {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D]
    (G : C ⥤ D) [G.ReflectsIsomorphisms] [HasLimitsOfSize.{v, v} C] [PreservesLimitsOfSize.{v, v} G]
    {X : TopCat.{v}} (F : Presheaf C X) : Presheaf.IsSheaf F ↔ Presheaf.IsSheaf (F ⋙ G)

[CategoryTheory.Limits.HasLimitsOfSize.{v, v, v₁, u₁} C]

[CategoryTheory.Limits.PreservesLimitsOfSize.{v, v, v₁, v₂, u₁, u₂} G]

F.IsSheaf ↔ TopCat.Presheaf.IsSheaf (F ⋙ G)


/-- Pre-games defined by natural numbers are numeric. -/
theorem numeric_nat : ∀ n : ℕ, Numeric n


/-- If the second of three points is strictly between the other two, the oriented angle at the
first point (reversed) is zero. -/
theorem _root_.Sbtw.oangle₃₁₂_eq_zero {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) : ∡ p₃ p₁ p₂ = 0

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


protected theorem splits (n : ℕ) :
    ∀ {K : Type u} [Field K],
      ∀ (f : K[X]) (_hfn : f.natDegree = n), Splits (algebraMap K <| SplittingFieldAux n f) f

(n : ℕ)
{K : Type u}
[Field K]
(f : K[X])
(_hfn : f.natDegree = n)

Polynomial.Splits (algebraMap K (Polynomial.SplittingFieldAux n f)) f


@[to_additive bot_prod_bot]
theorem bot_prod_bot : (⊥ : Submonoid M).prod (⊥ : Submonoid N) = ⊥

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


/-- The value of `χ₈ n`, for `n : ℕ`, depends only on `n % 8`. -/
theorem χ₈_nat_mod_eight (n : ℕ) : χ₈ n = χ₈ (n % 8 : ℕ)


theorem le_def {J₁ J₂ : GrothendieckTopology C} : J₁ ≤ J₂ ↔ (J₁ : ∀ X : C, Set (Sieve X)) ≤ J₂

{J₁ J₂ : CategoryTheory.GrothendieckTopology C}


theorem TendstoUniformlyOnFilter.prod_map {ι' α' β' : Type*} [UniformSpace β'] {F' : ι' → α' → β'}
    {f' : α' → β'} {q : Filter ι'} {q' : Filter α'} (h : TendstoUniformlyOnFilter F f p p')
    (h' : TendstoUniformlyOnFilter F' f' q q') :
    TendstoUniformlyOnFilter (fun i : ι × ι' => Prod.map (F i.1) (F' i.2)) (Prod.map f f')
      (p ×ˢ q) (p' ×ˢ q')

{F : ι → α → β}

TendstoUniformlyOnFilter (fun i => Prod.map (F i.1) (F' i.2)) (Prod.map f f') (p ×ˢ q) (p' ×ˢ q')


protected theorem ediv_eq_of_eq_mul_right {a b c : Int}
    (H1 : b ≠ 0) (H2 : a = b * c) : a / b = c


@[to_additive (attr := simp)] lemma oneLePart_apply (f : ∀ i, α i) (i : ι) : f⁺ i = (f i)⁺

{ι : Type u_3}
{α : ι → Type u_4}
[(i : ι) → Lattice (α i)]
[(i : ι) → AddCommGroup (α i)]
(f : (i : ι) → α i)
(i : ι)


@[to_additive]
theorem regular_inv_iff : μ.inv.Regular ↔ μ.Regular

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[TopologicalAddGroup G]


@[simp]
lemma Cone.toStructuredArrow_comp_proj {F : J ⥤ C} (c : Cone F) :
    c.toStructuredArrow ⋙ StructuredArrow.proj _ _ = 𝟭 J

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

c.toStructuredArrow.comp (CategoryTheory.StructuredArrow.proj c.pt F) = CategoryTheory.Functor.id J


/-- If `f` is a function strictly monotone on a right neighborhood of `a` and the
image of this neighborhood under `f` meets every interval `(f a, b]`, `b > f a`, then `f` is
continuous at `a` from the right.

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

(hfs : ∀ b > f a, ∃ c ∈ s, f c ∈ Set.Ioc (f a) b)


/-- This is not an instance because `i` becomes a metavariable. -/
@[to_additive "This is not an instance because `i` becomes a metavariable."]
protected theorem FaithfulSMul' [FaithfulSMul M (α i)] : FaithfulSMul M (Σi, α i)

{ι : Type u_1}
{M : Type u_2}
{α : ι → Type u_4}
[(i : ι) → SMul M (α i)]
(i : ι)
[FaithfulSMul M (α i)]


theorem support_fderiv_subset : support (fderiv 𝕜 f) ⊆ tsupport f

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

Function.support (fderiv 𝕜 f) ⊆ tsupport f


theorem restrictScalars_toMatrix [Fintype ι] [DecidableEq ι] {S : Type*} [CommRing S] [Nontrivial S]
    [Algebra R₂ S] [Module S M₂] [IsScalarTower R₂ S M₂] [NoZeroSMulDivisors R₂ S]
    (b : Basis ι S M₂) (v : ι → span R₂ (Set.range b)) :
    (algebraMap R₂ S).mapMatrix ((b.restrictScalars R₂).toMatrix v) =
      b.toMatrix (fun i ↦ (v i : M₂))

(v : ι → ↥(Submodule.span R₂ (Set.range ⇑b)))

(algebraMap R₂ S).mapMatrix ((Basis.restrictScalars R₂ b).toMatrix v) = b.toMatrix fun i => ↑(v i)


@[reassoc]
lemma cyclesMap'_comp (φ₁ : S₁ ⟶ S₂) (φ₂ : S₂ ⟶ S₃)
    (h₁ : S₁.LeftHomologyData) (h₂ : S₂.LeftHomologyData) (h₃ : S₃.LeftHomologyData) :
    cyclesMap' (φ₁ ≫ φ₂) h₁ h₃ = cyclesMap' φ₁ h₁ h₂ ≫ cyclesMap' φ₂ h₂ h₃

{S₁ S₂ S₃ : CategoryTheory.ShortComplex C}

(φ₁ : S₁ ⟶ S₂)

(φ₂ : S₂ ⟶ S₃)

CategoryTheory.ShortComplex.cyclesMap' (CategoryTheory.CategoryStruct.comp φ₁ φ₂) h₁ h₃ =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.cyclesMap' φ₁ h₁ h₂)
    (CategoryTheory.ShortComplex.cyclesMap' φ₂ h₂ h₃)


protected theorem edist_zero_of_eq_zero {f : α → E} {s : Set α} (hf : LocallyBoundedVariationOn f s)
    {a b : α} (ha : a ∈ s) (hb : b ∈ s) (h : variationOnFromTo f s a b = 0) :
    edist (f a) (f b) = 0

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)
(h : variationOnFromTo f s a b = 0)


theorem IsBoundedUnder.sup [SemilatticeSup α] {f : Filter β} {u v : β → α} :
    f.IsBoundedUnder (· ≤ ·) u →
      f.IsBoundedUnder (· ≤ ·) v → f.IsBoundedUnder (· ≤ ·) fun a => u a ⊔ v a

{α : Type u_1}
{β : Type u_2}
[SemilatticeSup α]
{f : Filter β}
{u v : β → α}

Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u →
  Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f v → Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f fun a => u a ⊔ v a


/-- A variant of `app_inv_app` that gives an `eqToHom` instead of `homOfLe`. -/
@[reassoc]
theorem app_inv_app' (U : Opens Y) (hU : (U : Set Y) ⊆ Set.range f.1.base) :
    f.1.c.app (op U) ≫ H.invApp ((Opens.map f.1.base).obj U) =
      Y.presheaf.map
        (eqToHom <|
            le_antisymm (Set.image_preimage_subset f.1.base U.1) <|
              (Set.image_preimage_eq_inter_range (f := f.1.base) (t := U.1)).symm ▸
                Set.subset_inter_iff.mpr ⟨fun _ h => h, hU⟩).op

{X Y : AlgebraicGeometry.LocallyRingedSpace}

[H : AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion f]

(U : TopologicalSpace.Opens ↑Y.toTopCat)

f.val.c.app (Opposite.op U) ≫
    AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.invApp f ((TopologicalSpace.Opens.map f.val.base).obj U) =
  Y.presheaf.map (CategoryTheory.eqToHom ⋯).op


theorem map (hxy : x ≡ y [SMOD U]) (f : M →ₗ[R] N) : f x ≡ f y [SMOD U.map f]

{R : Type u_1}
[Ring R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{U : Submodule R M}
{x y : M}
{N : Type u_4}
[AddCommGroup N]
[Module R N]
(hxy : x ≡ y [SMOD U])
(f : M →ₗ[R] N)


/-- A map `f : E × F → G` satisfies `IsBoundedBilinearMap 𝕜 f` if it is bilinear and
continuous. -/
structure IsBoundedBilinearMap (f : E × F → G) : Prop where
  add_left : ∀ (x₁ x₂ : E) (y : F), f (x₁ + x₂, y) = f (x₁, y) + f (x₂, y)
  smul_left : ∀ (c : 𝕜) (x : E) (y : F), f (c • x, y) = c • f (x, y)
  add_right : ∀ (x : E) (y₁ y₂ : F), f (x, y₁ + y₂) = f (x, y₁) + f (x, y₂)
  smul_right : ∀ (c : 𝕜) (x : E) (y : F), f (x, c • y) = c • f (x, y)
  bound : ∃ C > 0, ∀ (x : E) (y : F), ‖f (x, y)‖ ≤ C * ‖x‖ * ‖y‖

{𝕜 : 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]
{f : E × F → G}
(self : IsBoundedBilinearMap 𝕜 f)
(x₁ x₂ : E)
(y : F)


theorem IsLimit.hom_ext {t : PullbackCone f g} (ht : IsLimit t) {W : C} {k l : W ⟶ t.pt}
    (h₀ : k ≫ fst t = l ≫ fst t) (h₁ : k ≫ snd t = l ≫ snd t) : k = l

{t : CategoryTheory.Limits.PullbackCone f g}


@[simp]
theorem coe_inl : (inl R M M₂ : M → M × M₂) = fun x => (x, 0)

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

⇑(LinearMap.inl R M M₂) = fun x => (x, 0)


@[simp]
theorem coe_sub (s t : List α) : (s - t : Multiset α) = (s.diff t : List α)

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


@[to_additive MeasureTheory.addFundamentalFrontier_subset]
theorem fundamentalFrontier_subset : fundamentalFrontier G s ⊆ s

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
{s : Set α}

MeasureTheory.fundamentalFrontier G s ⊆ s


protected theorem lt_of_le_ne (x y : BitVec n) (h1 : x <= y) (h2 : ¬ x = y) : x < y

{n : Nat}
(x y : BitVec n)
(h1 : x ≤ y)
(h2 : ¬x = y)


@[to_additive (attr := simp)]
lemma stabilizer_finset_univ [Fintype α] : stabilizer G (Finset.univ : Finset α) = ⊤

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
[DecidableEq α]
[Fintype α]


@[simp]
theorem latticeBasis_apply (i : ChooseBasisIndex ℤ (𝓞 K)) :
    latticeBasis K i = (mixedEmbedding K) (integralBasis K i)

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

(NumberField.mixedEmbedding.latticeBasis K) i = (NumberField.mixedEmbedding K) ((NumberField.integralBasis K) i)


/-- If `I` is a nonzero fractional ideal, `a ∈ R`, and `J` is an ideal of `R` such that
`I = a⁻¹J`, then `a` is nonzero. -/
theorem constant_factor_ne_zero {R} [CommRing R] {K : Type*} [Field K] [Algebra R K]
    [IsFractionRing R K] {I : FractionalIdeal R⁰ K} (hI : I ≠ 0) {a : R} {J : Ideal R}
    (haJ : I = spanSingleton R⁰ ((algebraMap R K) a)⁻¹ * ↑J) :
    (Ideal.span {a} : Ideal R) ≠ 0

(haJ : I = FractionalIdeal.spanSingleton R⁰ ((algebraMap R K) a)⁻¹ * ↑J)


@[simp]
lemma mul_le_iff_le_one_left [MulPosMono α] [MulPosReflectLE α] (b0 : 0 < b) : a * b ≤ b ↔ a ≤ 1

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[MulPosMono α]
[MulPosReflectLE α]
(b0 : 0 < b)


theorem image_sigmaMk_subset_sigma_right (hi : i ∈ s) : Sigma.mk i '' t i ⊆ s.sigma t

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t : (i : ι) → Set (α i)}
{i : ι}
(hi : i ∈ s)


/-- If a `Finset` is a subset of the image of two `Set`s under a binary operation,
then it is a subset of the `Finset.image₂` of two `Finset` subsets of these `Set`s. -/
theorem subset_image₂ {s : Set α} {t : Set β} (hu : ↑u ⊆ image2 f s t) :
    ∃ (s' : Finset α) (t' : Finset β), ↑s' ⊆ s ∧ ↑t' ⊆ t ∧ u ⊆ image₂ f s' t'

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{u : Finset γ}
{s : Set α}
{t : Set β}
(hu : ↑u ⊆ Set.image2 f s t)

∃ s' t', ↑s' ⊆ s ∧ ↑t' ⊆ t ∧ u ⊆ Finset.image₂ f s' t'


/-- The carrier of `N ⊔ H` is just `↑N * ↑H` (pointwise set product) when `N` is normal. -/
@[to_additive "The carrier of `N ⊔ H` is just `↑N + ↑H` (pointwise set addition)
when `N` is normal."]
theorem normal_mul (N H : Subgroup G) [N.Normal] : (↑(N ⊔ H) : Set G) = N * H

{G : Type u_2}
[AddGroup G]
(N H : AddSubgroup G)
[N.Normal]


/-- Given a free group basis of `G` over `ι`, there is a canonical bijection between maps from `ι`
to a group `H` and morphisms from `G` to `H`. -/
@[simps!]
def lift (b : FreeGroupBasis ι G) : (ι → H) ≃ (G →* H)

{ι : Type u_1}
{G : Type u_3}
{H : Type u_4}
[Group G]
[Group H]
(b : FreeGroupBasis ι G)

∀ (a : G →* H) (a_1 : ι), b.lift.symm a a_1 = a (b.repr.symm (FreeGroup.of a_1))


protected theorem mapL_add [DecidableEq ι] (i : ι) (u v : E i →L[𝕜] E' i) :
    mapL (update f i (u + v)) = mapL (update f i u) + mapL (update f i v)

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

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

PiTensorProduct.mapL (Function.update f i (u + v)) =
  PiTensorProduct.mapL (Function.update f i u) + PiTensorProduct.mapL (Function.update f i v)


protected theorem traverse_eq_map_id {α β} (f : α → β) :
    ∀ x : Vector α n, x.traverse ((pure : _ → Id _) ∘ f) = (pure : _ → Id _) (map f x)

{n : ℕ}
{α β : Type u_1}
(f : α → β)
(x : Mathlib.Vector α n)

Mathlib.Vector.traverse (pure ∘ f) x = pure (Mathlib.Vector.map f x)


theorem hasEigenvalue_eigenvalues (i : Fin n) : HasEigenvalue T (hT.eigenvalues hn i)

(hn : FiniteDimensional.finrank 𝕜 E = n)

Module.End.HasEigenvalue T ↑(hT.eigenvalues hn i)


@[simp, reassoc] -- reassoc lemma does not need `simp`
theorem comp_app {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (U) :
    (f ≫ g).app U = g.app U ≫ f.app _

{X Y Z : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
(g : Y ⟶ Z)
(U : Z.Opens)

AlgebraicGeometry.Scheme.Hom.app (f ≫ g) U =
  AlgebraicGeometry.Scheme.Hom.app g U ≫
    AlgebraicGeometry.Scheme.Hom.app f ((TopologicalSpace.Opens.map g.val.base).obj U)


theorem HasConstantSpeedOnWith.union {t : Set ℝ} (hfs : HasConstantSpeedOnWith f s l)
    (hft : HasConstantSpeedOnWith f t l) {x : ℝ} (hs : IsGreatest s x) (ht : IsLeast t x) :
    HasConstantSpeedOnWith f (s ∪ t) l

{E : Type u_2}
[PseudoEMetricSpace E]
{f : ℝ → E}
{s : Set ℝ}
{l : ℝ≥0}
{t : Set ℝ}
(hfs : HasConstantSpeedOnWith f s l)
(hft : HasConstantSpeedOnWith f t l)
{x : ℝ}
(hs : IsGreatest s x)
(ht : IsLeast t x)


theorem Pairwise.sublist : l₁ <+ l₂ → l₂.Pairwise R → l₁.Pairwise R

∀ {α : Type u_1} {l₁ l₂ : List α} {R : α → α → Prop}, l₁ <+ l₂ → List.Pairwise R l₂ → List.Pairwise R l₁


@[to_additive (attr := simp)]
theorem MulHom.toFun_eq_coe [Mul M] [Mul N] (f : M →ₙ* N) : f.toFun = f

{M : Type u_4}
{N : Type u_5}
[Mul M]
[Mul N]
(f : M →ₙ* N)


@[reassoc (attr := simp)]
lemma biprod_inr_desc_f (α : K ⟶ M) (β : L ⟶ M) (i : ι) :
    (biprod.inr : L ⟶ K ⊞ L).f i ≫ (biprod.desc α β).f i = β.f i

[∀ (i : ι), CategoryTheory.Limits.HasBinaryBiproduct (K.X i) (L.X i)]

CategoryTheory.Limits.biprod.inr.f i ≫ (CategoryTheory.Limits.biprod.desc α β).f i = β.f i


@[simp]
theorem isUnit_iff_singleton_aux : (∃ a, s = {a} ∧ IsUnit a) ↔ ∃ a, s = {a}


@[simp]
theorem ι_inj [Nontrivial R] (x y : X) : ι R x = ι R y ↔ x = y

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}
[Nontrivial R]
(x y : X)

FreeAlgebra.ι R x = FreeAlgebra.ι R y ↔ x = y


theorem dvd_geom_sum₂_self {x y : R} (h : ↑n ∣ x - y) :
    ↑n ∣ ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i)

{R : Type u_1}
{n : ℕ}
[CommRing R]
{x y : R}
(h : ↑n ∣ x - y)

↑n ∣ ∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i)


lemma Pi.uniformSpace_comap_precomp' (φ : ι' → ι) :
    UniformSpace.comap (fun g i' ↦ g (φ i')) (Pi.uniformSpace (fun i' ↦ α (φ i'))) =
    ⨅ i', UniformSpace.comap (eval (φ i')) (U (φ i'))

{ι : Type u_1}
{ι' : Type u_2}
(α : ι → Type u)
[U : (i : ι) → UniformSpace (α i)]
(φ : ι' → ι)

UniformSpace.comap (fun g i' => g (φ i')) (Pi.uniformSpace fun i' => α (φ i')) =
  ⨅ i', UniformSpace.comap (Function.eval (φ i')) (U (φ i'))


theorem apply_coe_mem_map (f : M →[L] N) (S : L.Substructure M) (x : S) : f x ∈ S.map f

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

f ↑x ∈ FirstOrder.Language.Substructure.map f S