@[simp] theorem map_map (f' : α' → α'') (g' : β' → β'') (f : α → α') (g : β → β') :
    ∀ x : Sum α β, (x.map f g).map f' g' = x.map (f' ∘ f) (g' ∘ g)

Sum.map f' g' (Sum.map f g x) = Sum.map (f' ∘ f) (g' ∘ g) x


theorem isGenericPoint_iff_specializes : IsGenericPoint x S ↔ ∀ y, x ⤳ y ↔ y ∈ S

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{S : Set α}

IsGenericPoint x S ↔ ∀ (y : α), x ⤳ y ↔ y ∈ S


theorem ne_zero_of_degree_ge_degree (hpq : p.degree ≤ q.degree) (hp : p ≠ 0) : q ≠ 0

{R : Type u}
[Semiring R]
{p q : R[X]}
(hpq : p.degree ≤ q.degree)
(hp : p ≠ 0)


@[simp]
theorem unmop_inj_iff (x y : Cᴹᵒᵖ) : unmop x = unmop y ↔ x = y


@[simp]
theorem symmDiff_hnot_self : a ∆ (￢a) = ⊤

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


theorem apply_mk_symm (e : Trivialization F (π F E)) {b : B} (hb : b ∈ e.baseSet) (y : F) :
    e ⟨b, e.symm b y⟩ = (b, y)

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

↑e { proj := b, snd := e.symm b y } = (b, y)


@[to_additive (attr := simp, norm_cast)]
theorem coe_inv (x : H) : ↑(x⁻¹ : H) = (x⁻¹ : G)

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


theorem symm_trans {f₀ f₁ f₂ : C(X, Y)} (F : Homotopy f₀ f₁) (G : Homotopy f₁ f₂) :
    (F.trans G).symm = G.symm.trans F.symm

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


theorem vec3_dotProduct' {a₀ a₁ a₂ b₀ b₁ b₂ : α} :
    ![a₀, a₁, a₂] ⬝ᵥ ![b₀, b₁, b₂] = a₀ * b₀ + a₁ * b₁ + a₂ * b₂

{α : Type u}
[AddCommMonoid α]
[Mul α]
{a₀ a₁ a₂ b₀ b₁ b₂ : α}

Matrix.dotProduct ![a₀, a₁, a₂] ![b₀, b₁, b₂] = a₀ * b₀ + a₁ * b₁ + a₂ * b₂


@[simp]
theorem ofComplex_comp_toComplex : ofComplex.comp toComplex = AlgHom.id ℝ (CliffordAlgebra Q)

CliffordAlgebraComplex.ofComplex.comp CliffordAlgebraComplex.toComplex =
  AlgHom.id ℝ (CliffordAlgebra CliffordAlgebraComplex.Q)


@[simp]
theorem ofNat_inj {m n : ℕ} [NeZero m] [NeZero n] :
    (no_index (OfNat.ofNat m) : ℕ+) = no_index (OfNat.ofNat n) ↔ OfNat.ofNat m = OfNat.ofNat n

OfNat.ofNat m = OfNat.ofNat n ↔ OfNat.ofNat m = OfNat.ofNat n


/-- Given a family of `n` linearly independent vectors in a finite-dimensional space of
dimension `> n`, one may extend the family by another vector while retaining linear independence. -/
theorem exists_linearIndependent_cons_of_lt_finrank {n : ℕ} {v : Fin n → M}
    (hv : LinearIndependent R v) (h : n < finrank R M) :
    ∃ (x : M), LinearIndependent R (Fin.cons x v)

{R : Type u_1}
{M : Type u}
[Ring R]
[AddCommGroup M]
[Module R M]
[HasRankNullity.{u, u_1} R]
[StrongRankCondition R]
{n : ℕ}
{v : Fin n → M}
(hv : LinearIndependent R v)
(h : n < FiniteDimensional.finrank R M)


lemma continuous_generateFrom_iff {t : TopologicalSpace α} {b : Set (Set β)} :
    Continuous[t, generateFrom b] f ↔ ∀ s ∈ b, IsOpen (f ⁻¹' s)

{α : Type u}
{β : Type v}
{f : α → β}
{t : TopologicalSpace α}
{b : Set (Set β)}

Continuous f ↔ ∀ s ∈ b, IsOpen (f ⁻¹' s)


protected theorem map_pow {A'} [Semiring A'] [Algebra R A'] (f : A →ₐ[R] A') (n : ℕ) :
    map f.toLinearMap (M ^ n) = map f.toLinearMap M ^ n

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(M : Submodule R A)
{A' : Type u_1}
[Semiring A']
[Algebra R A']
(f : A →ₐ[R] A')
(n : ℕ)

Submodule.map f.toLinearMap (M ^ n) = Submodule.map f.toLinearMap M ^ n


@[to_additive]
theorem Measurable.mul_iff_right {G : Type*} [MeasurableSpace G] [MeasurableSpace α] [CommGroup G]
    [MeasurableMul₂ G] [MeasurableInv G] {f g : α → G} (hf : Measurable f) :
    Measurable (f * g) ↔ Measurable g

{α : Type u_1}
{G : Type u_2}
[MeasurableSpace G]
[MeasurableSpace α]
[CommGroup G]
[MeasurableMul₂ G]
[MeasurableInv G]
{f g : α → G}
(hf : Measurable f)


theorem pairwise_insert_of_symmetric (hr : Symmetric r) :
    (insert a s).Pairwise r ↔ s.Pairwise r ∧ ∀ b ∈ s, a ≠ b → r a b

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{a : α}
(hr : Symmetric r)


lemma completedCosZeta_residue_zero (a : UnitAddCircle) :
    Tendsto (fun s ↦ s * completedCosZeta a s) (𝓝[≠] 0) (𝓝 (-1))

Filter.Tendsto (fun s => s * HurwitzZeta.completedCosZeta a s) (𝓝[≠] 0) (𝓝 (-1))


/-- The identity morphism of `Factorisation f`. -/
@[simps]
protected def Hom.id (d : Factorisation f) : Factorisation.Hom d d

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

(CategoryTheory.Factorisation.Hom.id d).h = CategoryTheory.CategoryStruct.id d.mid


@[simp]
theorem Iio_castSucc (i : Fin n) : Iio (castSucc i) = (Iio i).map Fin.castSuccEmb

Finset.Iio i.castSucc = Finset.map Fin.castSuccEmb (Finset.Iio i)


/-- **Schur's lemma** for `𝕜`-linear categories:
if hom spaces are finite dimensional, then the hom space between simples is at most 1-dimensional.

See `finrank_hom_simple_simple_eq_one_iff` and `finrank_hom_simple_simple_eq_zero_iff` below
for the refinements when we know whether or not the simples are isomorphic.
-/
theorem finrank_hom_simple_simple_le_one (X Y : C) [FiniteDimensional 𝕜 (X ⟶ X)] [Simple X]
    [Simple Y] : finrank 𝕜 (X ⟶ Y) ≤ 1

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
(𝕜 : Type u_2)
[Field 𝕜]
[IsAlgClosed 𝕜]
[CategoryTheory.Linear 𝕜 C]
[CategoryTheory.Limits.HasKernels C]
(X Y : C)
[FiniteDimensional 𝕜 (X ⟶ X)]
[CategoryTheory.Simple X]
[CategoryTheory.Simple Y]


theorem StableUnderBaseChange.pushout_inl (hP : RingHom.StableUnderBaseChange @P)
    (hP' : RingHom.RespectsIso @P) {R S T : CommRingCat} (f : R ⟶ S) (g : R ⟶ T) (H : P g) :
    P (pushout.inl _ _ : S ⟶ pushout f g)

(P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop)

P (CategoryTheory.Limits.pushout.inl f g)


/-- The Law of Quadratic Reciprocity for the Jacobi symbol: if `a` and `b` are natural numbers
both congruent to `3` mod `4`, then `J(a | b) = -J(b | a)`. -/
theorem quadratic_reciprocity_three_mod_four {a b : ℕ} (ha : a % 4 = 3) (hb : b % 4 = 3) :
    J(a | b) = -J(b | a)


private theorem smul_zero_aux (x : T) : x • (0 : LocalizedModule S M) = 0

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
{T : Type u_1}
[CommSemiring T]
[Algebra R T]
[IsLocalization S T]
(x : T)


@[simp]
lemma Cotangent.map_mk (f : Hom P P') (x) :
    Cotangent.map f (.mk x) =
      .mk ⟨f.toAlgHom x, by simpa [-map_aeval] using RingHom.congr_arg (algebraMap S S') x.2⟩

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
{R' : Type u_1}
{S' : Type u_2}
[CommRing R']
[CommRing S']
[Algebra R' S']
{P' : Algebra.Generators R' S'}
[Algebra R R']
[Algebra S S']
[Algebra R S']
[IsScalarTower R R' S']
[IsScalarTower R S S']
(f : P.Hom P')
(x : ↥P.ker)

(Algebra.Generators.Cotangent.map f) (Algebra.Generators.Cotangent.mk x) =
  Algebra.Generators.Cotangent.mk ⟨f.toAlgHom ↑x, ⋯⟩


theorem isComplete_ker {M' : Type*} [UniformSpace M'] [CompleteSpace M'] [AddCommMonoid M']
    [Module R₁ M'] [T1Space M₂] [FunLike F M' M₂] [ContinuousSemilinearMapClass F σ₁₂ M' M₂]
    (f : F) :
    IsComplete (ker f : Set M')


@[to_additive (attr := simp (default + 1))]
lemma le_inf_mul [SemilatticeInf β] [OrderTop β] {s t : Finset α} {f : α → β} {a : β} :
    a ≤ inf (s * t) f ↔ ∀ x ∈ s, ∀ y ∈ t, a ≤ f (x * y)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Add α]
[SemilatticeInf β]
[OrderTop β]
{s t : Finset α}
{f : α → β}
{a : β}

a ≤ (s + t).inf f ↔ ∀ x ∈ s, ∀ y ∈ t, a ≤ f (x + y)


/-- A product space `α × β` is equivalent to the space `Π i : Fin 2, γ i`, where
`γ = Fin.cons α (Fin.cons β finZeroElim)`. See also `piFinTwoEquiv` and
`finTwoArrowEquiv`. -/
@[simps! (config := .asFn)]
def prodEquivPiFinTwo (α β : Type u) : α × β ≃ ∀ i : Fin 2, ![α, β] i

⇑(prodEquivPiFinTwo α β).symm = fun f => (f 0, f 1)


theorem nmul_nadd_lt {a' b' : Ordinal} (ha : a' < a) (hb : b' < b) :
    a' ⨳ b ♯ a ⨳ b' < a ⨳ b ♯ a' ⨳ b'

{a b a' b' : Ordinal.{u}}
(ha : a' < a)
(hb : b' < b)


theorem left_bot_eq_left_quot (H : Subgroup G) :
    Quotient (⊥ : Subgroup G).1 (H : Set G) = (G ⧸ H)

{G : Type u_1}
[Group G]
(H : Subgroup G)

Doset.Quotient ↑⊥.toSubmonoid ↑H = (G ⧸ H)


@[simp] theorem fdiv_one : ∀ a : Int, a.fdiv 1 = a


@[reassoc (attr := simp)]
lemma opcyclesIsoX₂_inv_hom_id (hf : S.f = 0) :
    S.pOpcycles ≫ (S.opcyclesIsoX₂ hf).hom = 𝟙 _

CategoryTheory.CategoryStruct.comp S.pOpcycles (S.opcyclesIsoX₂ hf).hom = CategoryTheory.CategoryStruct.id S.X₂


theorem natCast_div_eq_divInt (n d : ℕ) : (n : ℚ) / d = n /. d


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

{α : Type u_2}
{β : Type u_3}
[BiheytingAlgebra α]
[BiheytingAlgebra β]
(f : BiheytingHom α β)


/-- The equivalence between `ℕ` and `Finset ℕ` that maps `∑ i in s, 2^i` to `s`. -/
@[simps] def equivBitIndices : ℕ ≃ Finset ℕ

Finset.equivBitIndices.symm s = ∑ i ∈ s, 2 ^ i


/-- Preimages are respected by equivalence. -/
theorem EqOnSource.source_inter_preimage_eq {e e' : PartialEquiv α β} (he : e ≈ e') (s : Set β) :
    e.source ∩ e ⁻¹' s = e'.source ∩ e' ⁻¹' s

{α : Type u_1}
{β : Type u_2}
{e e' : PartialEquiv α β}
(he : e ≈ e')
(s : Set β)

e.source ∩ ↑e ⁻¹' s = e'.source ∩ ↑e' ⁻¹' s


theorem Multiset.support_sum_subset [AddCommMonoid M] (s : Multiset (ι →₀ M)) :
    s.sum.support ⊆ (s.map Finsupp.support).sup

{ι : Type u_1}
{M : Type u_2}
[DecidableEq ι]
[AddCommMonoid M]
(s : Multiset (ι →₀ M))

s.sum.support ⊆ (Multiset.map Finsupp.support s).sup


theorem map_le_iff_le_comap (hφ : Function.Injective φ.obj) (S : Subgroupoid C)
    (T : Subgroupoid D) : map φ hφ S ≤ T ↔ S ≤ comap φ T

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
(hφ : Function.Injective φ.obj)
(S : CategoryTheory.Subgroupoid C)
(T : CategoryTheory.Subgroupoid D)

CategoryTheory.Subgroupoid.map φ hφ S ≤ T ↔ S ≤ CategoryTheory.Subgroupoid.comap φ T


theorem sdiff_idem (s t : Finset α) : (s \ t) \ t = s \ t

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


theorem Ici_subset_Ici : Ici a ⊆ Ici b ↔ b ≤ a


@[simp]
theorem den_neg_eq_den (q : ℚ) : (-q).den = q.den


theorem Filter.EventuallyEq.lineDifferentiableAt_iff (h : f₀ =ᶠ[𝓝 x] f₁) :
    LineDifferentiableAt 𝕜 f₀ x v ↔ LineDifferentiableAt 𝕜 f₁ x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f₀ f₁ : E → F}
{x v : E}
(h : f₀ =ᶠ[𝓝 x] f₁)


@[to_additive]
theorem mk_toWord : ∀ {x : FreeGroup α}, mk (toWord x) = x

{α : Type u}
[DecidableEq α]
{x : FreeAddGroup α}


lemma StrictMonoOn.mapsTo_Ioi (h : StrictMonoOn f (Ici a)) : MapsTo f (Ioi a) (Ioi (f a))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a : α}
(h : StrictMonoOn f (Set.Ici a))

Set.MapsTo f (Set.Ioi a) (Set.Ioi (f a))


theorem map_toSubalgebra {S : StarSubalgebra R A} {f : A →⋆ₐ[R] B} :
    (S.map f).toSubalgebra = S.toSubalgebra.map f.toAlgHom

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
{S : StarSubalgebra R A}
{f : A →⋆ₐ[R] B}

(StarSubalgebra.map f S).toSubalgebra = Subalgebra.map f.toAlgHom S.toSubalgebra


@[to_additive]
lemma range_eq_image_or_of_mulSupport_subset {f : α → M} {k : Set α} (h : mulSupport f ⊆ k) :
    range f = f '' k ∨ range f = insert 1 (f '' k)

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α → M}
{k : Set α}
(h : Function.support f ⊆ k)

Set.range f = f '' k ∨ Set.range f = insert 0 (f '' k)


theorem imp_congr (h₁ : a ↔ c) (h₂ : b ↔ d) : (a → b) ↔ (c → d)

{a b c d : Prop}
(h₁ : a ↔ c)
(h₂ : b ↔ d)


@[simp]
theorem natDegree_monomial [DecidableEq R] (i : ℕ) (r : R) :
    natDegree (monomial i r) = if r = 0 then 0 else i

{R : Type u}
[Semiring R]
[DecidableEq R]
(i : ℕ)
(r : R)

((Polynomial.monomial i) r).natDegree = if r = 0 then 0 else i


theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0

{f : ι → α → β}

(hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (g x)))

μ (s ∩ ⋂ j, MeasureTheory.Egorov.notConvergentSeq f g n j) = 0


@[simp]
theorem boundedBy_zero : boundedBy (0 : Set α → ℝ≥0∞) = 0

MeasureTheory.OuterMeasure.boundedBy 0 = 0


@[simp]
lemma add_self_of_Y_eq {x₁ y₁ : F} {h₁ : W.Nonsingular x₁ y₁} (hy : y₁ = W.negY x₁ y₁) :
    some h₁ + some h₁ = 0

{F : Type u}
[Field F]
{W : WeierstrassCurve.Affine F}
{x₁ y₁ : F}
{h₁ : W.Nonsingular x₁ y₁}
(hy : y₁ = W.negY x₁ y₁)

WeierstrassCurve.Affine.Point.some h₁ + WeierstrassCurve.Affine.Point.some h₁ = 0


@[simp]
theorem reverse_mul_of_domain {R : Type*} [Ring R] [NoZeroDivisors R] (f g : R[X]) :
    reverse (f * g) = reverse f * reverse g

{R : Type u_2}
[Ring R]
[NoZeroDivisors R]
(f g : Polynomial R)


theorem thickening_mem_nhdsSet (E : Set α) {δ : ℝ} (hδ : 0 < δ) : thickening δ E ∈ 𝓝ˢ E

{α : Type u}
[PseudoEMetricSpace α]
(E : Set α)
{δ : ℝ}
(hδ : 0 < δ)


theorem Subpresheaf.sheafify_le (h : G ≤ G') (hF : Presieve.IsSheaf J F)
    (hG' : Presieve.IsSheaf J G'.toPresheaf) : G.sheafify J ≤ G'

{J : CategoryTheory.GrothendieckTopology C}

(G G' : CategoryTheory.GrothendieckTopology.Subpresheaf F)

(hF : CategoryTheory.Presieve.IsSheaf J F)

(hG' : CategoryTheory.Presieve.IsSheaf J G'.toPresheaf)

CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G ≤ G'


@[simp]
theorem coe_val : ⇑S.val = ((↑) : S → L)

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)


@[simp, norm_cast]
theorem coe_lt_coe : (p : E → ℝ) < q ↔ p < q

{E : Type u_4}
[AddGroup E]
{p q : NonarchAddGroupNorm E}


/-- The values of a multiplicative character of order `n` are contained in `ℤ[μ]` when
`μ` is a primitive `n`th root of unity. -/
lemma apply_mem_algebraAdjoin {χ : MulChar F R} {μ : R} (hμ : IsPrimitiveRoot μ (orderOf χ))
    (a : F) :
    χ a ∈ Algebra.adjoin ℤ {μ}

{F : Type u_1}
[Field F]
[Finite F]
{R : Type u_2}
[CommRing R]
[IsDomain R]
{χ : MulChar F R}
{μ : R}
(hμ : IsPrimitiveRoot μ (orderOf χ))
(a : F)


@[to_additive]
lemma op_smul_op_smul (b : β) (a₁ a₂ : α) : b <• a₁ <• a₂ = b <• (a₁ * a₂)

{α : Type u_5}
{β : Type u_6}
[Monoid α]
[MulAction αᵐᵒᵖ β]
(b : β)
(a₁ a₂ : α)

MulOpposite.op a₂ • MulOpposite.op a₁ • b = MulOpposite.op (a₁ * a₂) • b


theorem BijOn.subset_range (h : BijOn f s t) : t ⊆ range f

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


lemma pow_dvd_pow (a : α) (h : m ≤ n) : a ^ m ∣ a ^ n

{α : Type u_1}
[Monoid α]
{m n : ℕ}
(a : α)
(h : m ≤ n)


theorem gaugeRescale_smul (s t : Set E) {c : ℝ} (hc : 0 ≤ c) (x : E) :
    gaugeRescale s t (c • x) = c • gaugeRescale s t x

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
(s t : Set E)
{c : ℝ}
(hc : 0 ≤ c)
(x : E)


lemma Pi.map'_comp_map {f : α → C} {g h : β → C} [HasProduct f] [HasProduct g] [HasProduct h]
    (p : β → α) (q : ∀ (b : β), f (p b) ⟶ g b) (q' : ∀ (b : β), g b ⟶ h b) :
    Pi.map' p q ≫ Pi.map q' = Pi.map' p (fun b => q b ≫ q' b)

{β : Type w}
{α : Type w₂}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{f : α → C}
{g h : β → C}
[CategoryTheory.Limits.HasProduct f]
[CategoryTheory.Limits.HasProduct g]
[CategoryTheory.Limits.HasProduct h]
(p : β → α)
(q : (b : β) → f (p b) ⟶ g b)
(q' : (b : β) → g b ⟶ h b)

CategoryTheory.Limits.Pi.map' p q ≫ CategoryTheory.Limits.Pi.map q' =
  CategoryTheory.Limits.Pi.map' p fun b => q b ≫ q' b


/-- If `p` is a prime and `IsCyclotomicExtension {p ^ k} K L`, then there are `u : ℤˣ` and
`n : ℕ` such that the discriminant of `hζ.powerBasis K` is `u * p ^ n`. Often this is enough and
less cumbersome to use than `IsCyclotomicExtension.discr_prime_pow`. -/
theorem discr_prime_pow_eq_unit_mul_pow [IsCyclotomicExtension {p ^ k} K L]
    [hp : Fact (p : ℕ).Prime] (hζ : IsPrimitiveRoot ζ ↑(p ^ k))
    (hirr : Irreducible (cyclotomic (↑(p ^ k) : ℕ) K)) :
    ∃ (u : ℤˣ) (n : ℕ), discr K (hζ.powerBasis K).basis = u * p ^ n

(hirr : Irreducible (Polynomial.cyclotomic (↑(p ^ k)) K))

∃ u n, Algebra.discr K ⇑(IsPrimitiveRoot.powerBasis K hζ).basis = ↑↑u * ↑↑p ^ n


theorem isBigO_const_mul_left_iff' {f : α → R} {c : R} (hc : IsUnit c) :
    (fun x => c * f x) =O[l] g ↔ f =O[l] g

{α : Type u_1}
{F : Type u_4}
{R : Type u_13}
[Norm F]
[SeminormedRing R]
{g : α → F}
{l : Filter α}
{f : α → R}
{c : R}
(hc : IsUnit c)


/-- Uses `left` co(ntra)variant. -/
@[to_additive (attr := simp) "Uses `left` co(ntra)variant."]
theorem Left.one_le_inv_iff : 1 ≤ a⁻¹ ↔ a ≤ 1

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

1 ≤ a⁻¹ ↔ a ≤ 1


@[simp]
theorem span_zero_singleton : (R ∙ (0 : M)) = ⊥

(R : Type u_1)
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]


/-- If `C` has finite coproducts and filtered colimits, we can construct arbitrary coproducts by
    taking the colimit of the diagram formed by the coproducts of finite sets over the indexing
    type. -/
@[simps!]
def liftToFinsetColimitCocone [HasFiniteCoproducts C] [HasFilteredColimitsOfSize.{w, w} C]
    (F : Discrete α ⥤ C) : ColimitCocone F

[CategoryTheory.Limits.HasFilteredColimitsOfSize.{w, w, v, u} C]

(CategoryTheory.Limits.CoproductsFromFiniteFiltered.liftToFinsetColimitCocone F).cocone.pt =
  CategoryTheory.Limits.colimit (CategoryTheory.Limits.CoproductsFromFiniteFiltered.liftToFinset F)


lemma Cauchy.pi [Nonempty ι] {l : ∀ i, Filter (α i)} (hl : ∀ i, Cauchy (l i)) :
    Cauchy (Filter.pi l)

{ι : Type u_1}
(α : ι → Type u)
[U : (i : ι) → UniformSpace (α i)]
[Nonempty ι]
{l : (i : ι) → Filter (α i)}
(hl : ∀ (i : ι), Cauchy (l i))


@[elab_as_elim]
theorem smul_induction_on {p : M → Prop} {x} (H : x ∈ I • N) (smul : ∀ r ∈ I, ∀ n ∈ N, p (r • n))
    (add : ∀ x y, p x → p y → p (x + y)) : p x

(add : ∀ (x y : M), p x → p y → p (x + y))


@[simp]
theorem mem_ker {f : F} {y} : y ∈ ker f ↔ f y = 0

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_6}
{M₂ : Type u_8}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_12}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
{f : F}
{y : M}


/-- If the gcf already terminated at position `n`, nothing gets squashed. -/
theorem squashGCF_eq_self_of_terminated (terminatedAt_n : TerminatedAt g n) :
    squashGCF g n = g

{K : Type u_1}
{n : ℕ}
{g : GenContFract K}
[DivisionRing K]
(terminatedAt_n : g.TerminatedAt n)


theorem eLpNorm'_const_smul {f : α → F} (c : 𝕜) (hq_pos : 0 < q) :
    eLpNorm' (c • f) q μ = ‖c‖₊ • eLpNorm' f q μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NormedDivisionRing 𝕜]
[Module 𝕜 F]
[BoundedSMul 𝕜 F]
{f : α → F}
(c : 𝕜)
(hq_pos : 0 < q)

MeasureTheory.eLpNorm' (c • f) q μ = ‖c‖₊ • MeasureTheory.eLpNorm' f q μ


/-- The equivalence between `TwoP` and itself induced by `Prod.swap` both ways. -/
@[simps!]
noncomputable def swapEquiv : TwoP ≌ TwoP

∀ (a : ((TwoP.swap ⋙ TwoP.swap).obj X).toBipointed.X),
  (TwoP.swapEquiv.unitIso.inv.app X).toFun a =
    (TwoP.swap.map (TwoP.swap.map { toFun := id, map_fst := ⋯, map_snd := ⋯ }) ≫
          TwoP.swap.map { toFun := id, map_fst := ⋯, map_snd := ⋯ } ≫ { toFun := id, map_fst := ⋯, map_snd := ⋯ }).toFun
      ((𝟙 (TwoP.swap.obj (TwoP.swap.obj X))).toFun a)


/-- A `SheafedSpace C` is a topological space equipped with a sheaf of `C`s. -/
structure SheafedSpace extends PresheafedSpace C where
  /-- A sheafed space is presheafed space which happens to be sheaf. -/
  IsSheaf : presheaf.IsSheaf

(self : AlgebraicGeometry.SheafedSpace C)


@[simp]
theorem preimage_sub_const_Iic : (fun x => x - a) ⁻¹' Iic b = Iic (b + a)

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

(fun x => x - a) ⁻¹' Set.Iic b = Set.Iic (b + a)


theorem limsInf_le_of_le {f : Filter α} {a}
    (hf : f.IsBounded (· ≥ ·) := by isBoundedDefault)
    (h : ∀ b, (∀ᶠ n in f, b ≤ n) → b ≤ a) : limsInf f ≤ a

(hf : Filter.IsBounded (fun x x_1 => x ≥ x_1) f := by isBoundedDefault)

(h : ∀ (b : α), (∀ᶠ (n : α) in f, b ≤ n) → b ≤ a)


@[to_additive]
theorem ball_div_singleton : ball x δ / {y} = ball (x / y) δ

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

Metric.ball x δ / {y} = Metric.ball (x / y) δ


@[simp]
theorem diagonal_apply_ne [Zero α] (d : n → α) {i j : n} (h : i ≠ j) : (diagonal d) i j = 0

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
(d : n → α)
{i j : n}
(h : i ≠ j)


theorem add_eq_left_iff {x y : Tropical R} : x + y = x ↔ x ≤ y

{R : Type u}
[LinearOrder R]
{x y : Tropical R}


theorem const_lt [Preorder β] {x y : β} : x < y → (↑x : β*) < ↑y

{α : Type u}
{β : Type v}
{φ : Ultrafilter α}
[Preorder β]
{x y : β}


theorem slope_fun_def (f : k → PE) : slope f = fun a b => (b - a)⁻¹ • (f b -ᵥ f a)

{k : Type u_1}
{E : Type u_2}
{PE : Type u_3}
[Field k]
[AddCommGroup E]
[Module k E]
[AddTorsor E PE]
(f : k → PE)


theorem fderiv_tsum (hu : Summable u) (hf : ∀ n, Differentiable 𝕜 (f n))
    (hf' : ∀ n x, ‖fderiv 𝕜 (f n) x‖ ≤ u n) (hf0 : Summable fun n => f n x₀) :
    (fderiv 𝕜 fun y => ∑' n, f n y) = fun x => ∑' n, fderiv 𝕜 (f n) x

(hf : ∀ (n : α), Differentiable 𝕜 (f n))

(hf' : ∀ (n : α) (x : E), ‖fderiv 𝕜 (f n) x‖ ≤ u n)

(fderiv 𝕜 fun y => ∑' (n : α), f n y) = fun x => ∑' (n : α), fderiv 𝕜 (f n) x


theorem equivalence : Equivalence (@Homotopic X _ x₀ x₁)

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}


/-- Closure of a subsemigroup `S` equals `S`. -/
@[to_additive (attr := simp) "Additive closure of an additive subsemigroup `S` equals `S`"]
theorem closure_eq : closure (S : Set M) = S

{M : Type u_1}
[Add M]
(S : AddSubsemigroup M)


/--
Given a `HomotopyWith f₀ f₁ P`, we can define a `HomotopyWith f₁ f₀ P` by reversing the homotopy.
-/
@[simps!]
def symm {f₀ f₁ : C(X, Y)} (F : HomotopyWith f₀ f₁ P) : HomotopyWith f₁ f₀ P

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


theorem isClosed_closedBall {x : E} {r : ℝ} : IsClosed (closedBall x r)

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


theorem sum_mul_smul (n : ℕ) :
    (∑ ν ∈ Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν) =
      (n * (n - 1)) • X ^ 2

∑ ν ∈ Finset.range (n + 1), (ν * (ν - 1)) • bernsteinPolynomial R n ν = (n * (n - 1)) • Polynomial.X ^ 2


theorem Convex.convexHull_subset_iff (ht : Convex 𝕜 t) : convexHull 𝕜 s ⊆ t ↔ s ⊆ t

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s t : Set E}
(ht : Convex 𝕜 t)


theorem mem_iInf_of_finite {ι : Type*} [Finite ι] {α : Type*} {f : ι → Filter α} (s) :
    (s ∈ ⨅ i, f i) ↔ ∃ t : ι → Set α, (∀ i, t i ∈ f i) ∧ s = ⋂ i, t i

{ι : Type u_2}
[Finite ι]
{α : Type u_3}
{f : ι → Filter α}
(s : Set α)

s ∈ ⨅ i, f i ↔ ∃ t, (∀ (i : ι), t i ∈ f i) ∧ s = ⋂ i, t i


theorem Specializes.mem_open (h : x ⤳ y) (hs : IsOpen s) (hy : y ∈ s) : x ∈ s

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{s : Set X}
(h : x ⤳ y)
(hs : IsOpen s)
(hy : y ∈ s)


@[simp, norm_cast]
theorem coe_prod :
    (e₁.prod e₂ : M × M₃ →ₗ[R] M₂ × M₄) = (e₁ : M →ₗ[R] M₂).prodMap (e₂ : M₃ →ₗ[R] M₄)

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
{M₄ : Type z}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[AddCommMonoid M₄]
{module_M : Module R M}
{module_M₂ : Module R M₂}
{module_M₃ : Module R M₃}
{module_M₄ : Module R M₄}
(e₁ : M ≃ₗ[R] M₂)
(e₂ : M₃ ≃ₗ[R] M₄)


/-- If `f : 𝕜 → 𝕜` is convex, then for any point `a` the slope of the secant line of `f` through `a`
and `b ≠ a` is monotone with respect to `b`. -/
theorem ConvexOn.secant_mono (hf : ConvexOn 𝕜 s f) {a x y : 𝕜} (ha : a ∈ s) (hx : x ∈ s)
    (hy : y ∈ s) (hxa : x ≠ a) (hya : y ≠ a) (hxy : x ≤ y) :
    (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
(hf : ConvexOn 𝕜 s f)
{a x y : 𝕜}
(ha : a ∈ s)
(hx : x ∈ s)
(hy : y ∈ s)
(hxa : x ≠ a)
(hya : y ≠ a)
(hxy : x ≤ y)


lemma adjoin_eq_span (s : Set A) :
    Subalgebra.toSubmodule (adjoin R s).toSubalgebra = span R (Submonoid.closure (s ∪ star s))

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
(s : Set A)

Subalgebra.toSubmodule (StarAlgebra.adjoin R s).toSubalgebra = Submodule.span R ↑(Submonoid.closure (s ∪ star s))


@[simp]
theorem coe_copy (f : A →A[R] B) (f' : A → B) (h : f' = ⇑f) : ⇑(f.copy f' h) = f'

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]
(f : A →A[R] B)
(f' : A → B)
(h : f' = ⇑f)


theorem getElem_set {l : List α} {m n} {a} (h) :
    (set l m a)[n]'h = if m = n then a else l[n]'(length_set .. ▸ h)

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

(l.set m a)[n] = if m = n then a else l[n]


theorem borel_eq_generateFrom_Ioc (α : Type*) [TopologicalSpace α] [SecondCountableTopology α]
    [LinearOrder α] [OrderTopology α] :
    borel α = .generateFrom { S : Set α | ∃ l u, l < u ∧ Ioc l u = S }

(α : Type u_5)
[TopologicalSpace α]
[SecondCountableTopology α]
[LinearOrder α]
[OrderTopology α]

borel α = MeasurableSpace.generateFrom {S | ∃ l u, l < u ∧ Set.Ioc l u = S}


lemma term_one {n : ℕ} (hn : 0 < n) :
    term n 1 = (log (n + 1) - log n) -  1 / (n + 1)

ZetaAsymptotics.term n 1 = Real.log (↑n + 1) - Real.log ↑n - 1 / (↑n + 1)


lemma coxeterWeight_zero_iff_isOrthogonal : P.coxeterWeight i j = 0 ↔ P.IsOrthogonal i j

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[LinearOrderedCommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
{P : RootPairing ι R M N}
(B : M →ₗ[R] M →ₗ[R] R)
[P.IsRootPositive B]
(i j : ι)


@[simp]
theorem invFun_smul (a : A) (M : Matrix n n A) :
    invFun R A n (a • M) = a ⊗ₜ 1 * invFun R A n M

(R : Type u)
[CommSemiring R]
(A : Type v)
[Semiring A]
[Algebra R A]
(n : Type w)
[DecidableEq n]
[Fintype n]
(a : A)
(M : Matrix n n A)

MatrixEquivTensor.invFun R A n (a • M) = a ⊗ₜ[R] 1 * MatrixEquivTensor.invFun R A n M


/-- The adjunction between the free and forgetful constructions for Eilenberg-Moore algebras for
  a monad. cf Lemma 5.2.8 of [Riehl][riehl2017]. -/
@[simps! unit counit]
def adj : T.free ⊣ T.forget

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

T.adj.counit = { app := fun Y => { f := Y.a, h := ⋯ }, naturality := ⋯ }


@[to_additive mem_own_rightAddCoset]
theorem mem_own_rightCoset (a : α) : a ∈ op a • (s : Set α)

{α : Type u_1}
[Monoid α]
(s : Submonoid α)
(a : α)


@[simp]
theorem nontrivial_dual_iff :
    Nontrivial (Dual K V) ↔ Nontrivial V

(K : Type uK)
{V : Type uV}
[CommRing K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]

Nontrivial (Module.Dual K V) ↔ Nontrivial V


@[simp] theorem smul_imJ : (s • a).imJ = s • a.imJ

{S : Type u_1}
{R : Type u_3}
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])
[SMul S R]
(s : S)


@[simp]
theorem coe_smul (c : 𝕜) (f : α →ᵇ β) : ⇑(c • f) = fun x => c • f x

{α : Type u}
{β : Type v}
{𝕜 : Type u_2}
[PseudoMetricSpace 𝕜]
[TopologicalSpace α]
[PseudoMetricSpace β]
[Zero 𝕜]
[Zero β]
[SMul 𝕜 β]
[BoundedSMul 𝕜 β]
(c : 𝕜)
(f : BoundedContinuousFunction α β)


/-- `coeff g` as an additive monoid/group homomorphism -/
@[simps]
def coeff.addMonoidHom (g : Γ) : HahnSeries Γ R →+ R

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddMonoid R]
(g : Γ)
(f : HahnSeries Γ R)

(HahnSeries.coeff.addMonoidHom g) f = f.coeff g


@[simp] lemma closure_union_closure_right_eq (M : Matroid α) (X Y : Set α) :
    M.closure (X ∪ M.closure Y) = M.closure (X ∪ Y)

{α : Type u_2}
(M : Matroid α)
(X Y : Set α)


theorem sublists_map (f : α → β) : ∀ (l : List α),
    sublists (map f l) = map (map f) (sublists l)

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

(List.map f l).sublists = List.map (List.map f) l.sublists


theorem spanningCoe_deleteEdges_le (G' : G.Subgraph) (s : Set (Sym2 V)) :
    (G'.deleteEdges s).spanningCoe ≤ G'.spanningCoe

{V : Type u}
{G : SimpleGraph V}
(G' : G.Subgraph)
(s : Set (Sym2 V))


theorem ack_mono_right (m : ℕ) : Monotone (ack m)


/-- Pythagorean theorem, if-and-only-if vector inner product form. -/
theorem norm_add_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero (x y : F) :
    ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ ⟪x, y⟫_ℝ = 0

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


@[simp]
theorem toOuterMeasure_apply_fintype [Fintype α] : p.toOuterMeasure s = ∑ x, s.indicator p x

{α : Type u_1}
(p : PMF α)
(s : Set α)
[Fintype α]

p.toOuterMeasure s = ∑ x : α, s.indicator (⇑p) x


@[to_additive]
lemma orderOf_eq_two_iff (hG : Monoid.exponent G = 2) {x : G} :
    orderOf x = 2 ↔ x ≠ 1

{G : Type u}
[AddMonoid G]
(hG : AddMonoid.exponent G = 2)
{x : G}


lemma coyonedaEquiv_naturality {X Y : C} {F : C ⥤ Type v₁} (f : coyoneda.obj (op X) ⟶ F)
    (g : X ⟶ Y) : F.map g (coyonedaEquiv f) = coyonedaEquiv (coyoneda.map g.op ≫ f)

{F : CategoryTheory.Functor C (Type v₁)}

(f : CategoryTheory.coyoneda.obj (Opposite.op X) ⟶ F)

F.map g (CategoryTheory.coyonedaEquiv f) =
  CategoryTheory.coyonedaEquiv (CategoryTheory.CategoryStruct.comp (CategoryTheory.coyoneda.map g.op) f)


@[to_additive]
theorem iInter_smul_subset (s : ι → Set α) (t : Set β) : (⋂ i, s i) • t ⊆ ⋂ i, s i • t

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
[SMul α β]
(s : ι → Set α)
(t : Set β)


@[simp]
theorem adjMatrix_mul_apply [NonAssocSemiring α] (M : Matrix V V α) (v w : V) :
    (G.adjMatrix α * M) v w = ∑ u ∈ G.neighborFinset v, M u w

{V : Type u_1}
{α : Type u_2}
(G : SimpleGraph V)
[DecidableRel G.Adj]
[Fintype V]
[NonAssocSemiring α]
(M : Matrix V V α)
(v w : V)

(SimpleGraph.adjMatrix α G * M) v w = ∑ u ∈ G.neighborFinset v, M u w


lemma _root_.induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) : ∀ n, P n

(h : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a))


theorem mem_carrier_iff_mk_eq {a : α} {b : ConjClasses α} :
    a ∈ carrier b ↔ ConjClasses.mk a = b

{α : Type u}
[Monoid α]
{a : α}
{b : ConjClasses α}


/--
Split any `Prop` over `R` into the three cases:
- positive characteristic.
- equal characteristic zero.
- mixed characteristic `(0, p)`.
-/
theorem split_by_characteristic (h_pos : ∀ p : ℕ, p ≠ 0 → CharP R p → P) (h_equal : Algebra ℚ R → P)
    (h_mixed : ∀ p : ℕ, Nat.Prime p → MixedCharZero R p → P) : P

(h_pos : ∀ (p : ℕ), p ≠ 0 → CharP R p → P)

(h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P)


@[simp]
theorem join_join (SS : WSeq (WSeq (WSeq α))) : join (join SS) ~ʷ join (map join SS)

(SS : Stream'.WSeq (Stream'.WSeq (Stream'.WSeq α)))

SS.join.join ~ʷ (Stream'.WSeq.map Stream'.WSeq.join SS).join


theorem cauchySeq_finset_of_norm_bounded_eventually {f : ι → E} {g : ι → ℝ} (hg : Summable g)
    (h : ∀ᶠ i in cofinite, ‖f i‖ ≤ g i) : CauchySeq fun s => ∑ i ∈ s, f i

(h : ∀ᶠ (i : ι) in Filter.cofinite, ‖f i‖ ≤ g i)


theorem adjugate_mul_distrib_aux (A B : Matrix n n α) (hA : IsLeftRegular A.det)
    (hB : IsLeftRegular B.det) : adjugate (A * B) = adjugate B * adjugate A

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A B : Matrix n n α)
(hA : IsLeftRegular A.det)
(hB : IsLeftRegular B.det)

(A * B).adjugate = B.adjugate * A.adjugate


theorem getElem?_set' (a : α) {m n} (l : List α) :
    (set l m a)[n]? = if m = n then (fun _ => a) <$> l[n]? else l[n]?

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

(l.set m a)[n]? = if m = n then (fun x => a) <$> l[n]? else l[n]?


@[to_additive]
theorem mem_zpowers_of_prime_card {G : Type*} [Group G] {_ : Fintype G} {p : ℕ} [hp : Fact p.Prime]
    (h : Fintype.card G = p) {g g' : G} (hg : g ≠ 1) : g' ∈ zpowers g

∀ {x : Fintype G} {p : ℕ} [hp : Fact (Nat.Prime p)], Fintype.card G = p → ∀ {g g' : G}, g ≠ 1 → g' ∈ Subgroup.zpowers g


theorem tendsto_finset_image_atTop_atTop [DecidableEq β] {i : β → γ} {j : γ → β}
    (h : Function.LeftInverse j i) : Tendsto (Finset.image j) atTop atTop

{β : Type u_4}
{γ : Type u_5}
[DecidableEq β]
{i : β → γ}
{j : γ → β}
(h : Function.LeftInverse j i)

Filter.Tendsto (Finset.image j) Filter.atTop Filter.atTop


/-- Triangle inequality for the nonnegative distance-/
theorem nndist_triangle (x y z : α) : nndist x z ≤ nndist x y + nndist y z

{α : Type u}
[PseudoMetricSpace α]
(x y z : α)


theorem IsExtrOn.on_preimage (g : δ → α) {b : δ} (hf : IsExtrOn f s (g b)) :
    IsExtrOn (f ∘ g) (g ⁻¹' s) b

{α : Type u}
{β : Type v}
{δ : Type x}
[Preorder β]
{f : α → β}
{s : Set α}
(g : δ → α)
{b : δ}
(hf : IsExtrOn f s (g b))


theorem Fintype.card_subtype_le [Fintype α] (p : α → Prop) [DecidablePred p] :
    Fintype.card { x // p x } ≤ Fintype.card α

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


@[to_additive indicator_nonneg]
lemma one_le_mulIndicator (h : ∀ a ∈ s, 1 ≤ f a) (a : α) : 1 ≤ mulIndicator s f a

{α : Type u_2}
{M : Type u_4}
[Preorder M]
[One M]
{s : Set α}
{f : α → M}
(h : ∀ a ∈ s, 1 ≤ f a)
(a : α)


@[simp]
theorem inr_pushoutZeroZeroIso_inv (X Y : C) [HasBinaryCoproduct X Y] :
    coprod.inr ≫ (pushoutZeroZeroIso X Y).inv = pushout.inr _ _

CategoryTheory.Limits.coprod.inr ≫ (CategoryTheory.Limits.pushoutZeroZeroIso X Y).inv =
  CategoryTheory.Limits.pushout.inr 0 0


theorem lift_symm_apply_apply (φ : Unitization R A →ₐ[R] C) (a : A) :
    Unitization.lift.symm φ a = φ a

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
{C : Type u_5}
[Semiring C]
[Algebra R C]
(φ : Unitization R A →ₐ[R] C)
(a : A)


@[simp]
theorem const_contLinear (q : Q) : (const R P q).contLinear = 0

{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
{P : Type u_6}
{Q : Type u_7}
[NormedAddCommGroup V]
[MetricSpace P]
[NormedAddTorsor V P]
[NormedAddCommGroup W]
[MetricSpace Q]
[NormedAddTorsor W Q]
[NormedField R]
[NormedSpace R V]
[NormedSpace R W]
(q : Q)

(ContinuousAffineMap.const R P q).contLinear = 0


theorem toMatrix_smul {R₁ S : Type*} [CommRing R₁] [Ring S] [Algebra R₁ S] [Fintype ι]
    [DecidableEq ι] (x : S) (b : Basis ι R₁ S) (w : ι → S) :
    (b.toMatrix (x • w)) = (Algebra.leftMulMatrix b x) * (b.toMatrix w)

{ι : Type u_1}
{R₁ : Type u_9}
{S : Type u_10}
[CommRing R₁]
[Ring S]
[Algebra R₁ S]
[Fintype ι]
[DecidableEq ι]
(x : S)
(b : Basis ι R₁ S)
(w : ι → S)

b.toMatrix (x • w) = (Algebra.leftMulMatrix b) x * b.toMatrix w


lemma weightSpace_chainBotCoeff_sub_one_zsmul_sub :
    weightSpace M ((-chainBotCoeff α β - 1 : ℤ) • α + β : L → R) = ⊥

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

LieModule.weightSpace M ((-↑(LieModule.chainBotCoeff α β) - 1) • α + ⇑β) = ⊥


@[simp]
theorem filter_subset (s : Multiset α) : filter p s ⊆ s

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


/-- `sUnion` is monotone under taking a superset of each set. -/
lemma sUnion_mono_supsets {s : Set (Set α)} {f : Set α → Set α} (hf : ∀ t : Set α, f t ⊆ t) :
    ⋃₀ (f '' s) ⊆ ⋃₀ s

{α : Type u_1}
{s : Set (Set α)}
{f : Set α → Set α}
(hf : ∀ (t : Set α), f t ⊆ t)


protected theorem eq_of_mul_eq_mul_right {a b c : Int} (ha : a ≠ 0) (h : b * a = c * a) : b = c


theorem exists_basis : ∃ s : Set V, Nonempty (Basis s K V)

(K : Type u_3)
(V : Type u_4)
[DivisionRing K]
[AddCommGroup V]
[Module K V]


theorem minimum?_eq_some_iff' {xs : List Nat} :
    xs.minimum? = some a ↔ (a ∈ xs ∧ ∀ b ∈ xs, a ≤ b)

xs.minimum? = some a ↔ a ∈ xs ∧ ∀ (b : Nat), b ∈ xs → a ≤ b


/-- When `A` is commutative, `Subalgebra.mul_toSubmodule_le` is strict. -/
theorem mul_toSubmodule {R : Type*} {A : Type*} [CommSemiring R] [CommSemiring A] [Algebra R A]
    (S T : Subalgebra R A) : (Subalgebra.toSubmodule S) * (Subalgebra.toSubmodule T)
        = Subalgebra.toSubmodule (S ⊔ T)

{R : Type u_3}
{A : Type u_4}
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
(S T : Subalgebra R A)

Subalgebra.toSubmodule S * Subalgebra.toSubmodule T = Subalgebra.toSubmodule (S ⊔ T)


/-- 1 is in the set of natural number powers of an element of a monoid. -/
@[to_additive "0 is in the set of natural number multiples of an element of an `AddMonoid`."]
theorem powers.one_mem {x : M} : (1 : M) ∈ powers x


lemma jacobiTheta₂'_add_right (z τ : ℂ) : jacobiTheta₂' z (τ + 2) = jacobiTheta₂' z τ


theorem sinh_two_mul : sinh (2 * x) = 2 * sinh x * cosh x

Complex.sinh (2 * x) = 2 * Complex.sinh x * Complex.cosh x


@[simp]
theorem trans_apply (e₁ : M₁ ≃SL[σ₁₂] M₂) (e₂ : M₂ ≃SL[σ₂₃] M₃) (c : M₁) :
    (e₁.trans e₂) c = e₂ (e₁ c)

{R₁ : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{σ₂₃ : R₂ →+* R₃}
{σ₃₂ : R₃ →+* R₂}
[RingHomInvPair σ₂₃ σ₃₂]
[RingHomInvPair σ₃₂ σ₂₃]
{σ₁₃ : R₁ →+* R₃}
{σ₃₁ : R₃ →+* R₁}
[RingHomInvPair σ₁₃ σ₃₁]
[RingHomInvPair σ₃₁ σ₁₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₂ M₂]
[Module R₃ M₃]
(e₁ : M₁ ≃SL[σ₁₂] M₂)
(e₂ : M₂ ≃SL[σ₂₃] M₃)
(c : M₁)


/-- Scalar multiplication commutes with the inclusion of each component into the direct sum. -/
theorem of_smul (i : ι) (c : R) (x) : of M i (c • x) = c • of M i x

(R : Type u)
[Semiring R]
{ι : Type v}
[dec_ι : DecidableEq ι]
{M : ι → Type w}
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
(i : ι)
(c : R)
(x : M i)

(DirectSum.of M i) (c • x) = c • (DirectSum.of M i) x


theorem addString_eq (p : Pos) (s : String) : p + s = ⟨p.byteIdx + s.utf8ByteSize⟩

p + s = { byteIdx := p.byteIdx + s.utf8ByteSize }


theorem normalize_eq_mkRat {num den} (den_nz) : normalize num den den_nz = mkRat num den

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

Rat.normalize num den den_nz = mkRat num den


theorem uniformity_basis_dist_lt {R : ℝ} (hR : 0 < R) :
    (𝓤 α).HasBasis (fun r : ℝ => 0 < r ∧ r < R) fun r => { p : α × α | dist p.1 p.2 < r }

{α : Type u}
[PseudoMetricSpace α]
{R : ℝ}
(hR : 0 < R)

(𝓤 α).HasBasis (fun r => 0 < r ∧ r < R) fun r => {p | dist p.1 p.2 < r}


@[to_additive (attr := simp)]
theorem inv_preimage : Inv.inv ⁻¹' s = s⁻¹


theorem liftRel_destruct_iff {R : α → β → Prop} {s : WSeq α} {t : WSeq β} :
    LiftRel R s t ↔ Computation.LiftRel (LiftRelO R (LiftRel R)) (destruct s) (destruct t)

{α : Type u}
{β : Type v}
{R : α → β → Prop}
{s : Stream'.WSeq α}
{t : Stream'.WSeq β}

Stream'.WSeq.LiftRel R s t ↔
  Computation.LiftRel (Stream'.WSeq.LiftRelO R (Stream'.WSeq.LiftRel R)) s.destruct t.destruct


theorem sum_logEmbedding_component (x : (𝓞 K)ˣ) :
    ∑ w, logEmbedding K x w = - mult (w₀ : InfinitePlace K) * Real.log (w₀ (x : K))

{K : Type u_1}
[Field K]
[NumberField K]
(x : (𝓞 K)ˣ)

∑ w : { w // w ≠ NumberField.Units.dirichletUnitTheorem.w₀ }, (NumberField.Units.logEmbedding K) x w =
  -↑NumberField.Units.dirichletUnitTheorem.w₀.mult *
    Real.log (NumberField.Units.dirichletUnitTheorem.w₀ ((algebraMap (𝓞 K) K) ↑x))


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

(hl : ∀ f ∈ l, MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable fun x => (List.map (fun f => f x) l).sum


theorem contMDiffWithinAt_iff_nat :
    ContMDiffWithinAt I I' n f s x ↔ ∀ m : ℕ, (m : ℕ∞) ≤ n → ContMDiffWithinAt I I' m 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']
{f : M → M'}
{s : Set M}
{x : M}
{n : ℕ∞}

ContMDiffWithinAt I I' n f s x ↔ ∀ (m : ℕ), ↑m ≤ n → ContMDiffWithinAt I I' (↑m) f s x


@[simp, mfld_simps]
theorem localTriv_symm_fst (p : B × F) :
    (Z.localTriv i).toPartialHomeomorph.symm p = ⟨p.1, Z.coordChange i (Z.indexAt p.1) p.1 p.2⟩

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)
(i : ι)
(p : B × F)

↑(Z.localTriv i).symm p = { proj := p.1, snd := (Z.coordChange i (Z.indexAt p.1) p.1) p.2 }


@[simp]
theorem toFinset_filter (s : Multiset α) (p : α → Prop) [DecidablePred p] :
    Multiset.toFinset (s.filter p) = s.toFinset.filter p

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

(Multiset.filter p s).toFinset = Finset.filter p s.toFinset


/-- This is the **Unfolding Trick**: Given a subgroup `Γ` of a group `G`, the integral of a
  function `f` on `G` times the lift to `G` of a function `g` on the quotient `G ⧸ Γ` with respect
  to a right-invariant measure `μ` on `G`, is equal to the integral over the quotient of the
  automorphization of `f` times `g`. -/
lemma QuotientGroup.integral_mul_eq_integral_automorphize_mul {K : Type*} [NormedField K]
    [NormedSpace ℝ K] [μ.IsMulRightInvariant] {f : G → K}
    (f_ℒ_1 : Integrable f μ) {g : G ⧸ Γ → K} (hg : AEStronglyMeasurable g μ_𝓕)
    (g_ℒ_infinity : essSup (fun x ↦ ↑‖g x‖₊) μ_𝓕 ≠ ∞)
    (F_ae_measurable : AEStronglyMeasurable (QuotientGroup.automorphize f) μ_𝓕) :
    ∫ x : G, g (x : G ⧸ Γ) * (f x) ∂μ
      = ∫ x : G ⧸ Γ, g x * (QuotientGroup.automorphize f x) ∂μ_𝓕

(h𝓕 : MeasureTheory.IsFundamentalDomain (↥Γ.op) 𝓕 μ)

(hg : MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map QuotientGroup.mk (μ.restrict 𝓕)))

(g_ℒ_infinity : essSup (fun x => ↑‖g x‖₊) (MeasureTheory.Measure.map QuotientGroup.mk (μ.restrict 𝓕)) ≠ ⊤)

(F_ae_measurable :
  MeasureTheory.AEStronglyMeasurable (QuotientGroup.automorphize f)
    (MeasureTheory.Measure.map QuotientGroup.mk (μ.restrict 𝓕)))

∫ (x : G), g ↑x * f x ∂μ =
  ∫ (x : G ⧸ Γ), g x * QuotientGroup.automorphize f x ∂MeasureTheory.Measure.map QuotientGroup.mk (μ.restrict 𝓕)


lemma comp_eq_zero [Zero P] (h : Exact f g) : g.comp f = 0

{M : Type u_2}
{N : Type u_4}
{P : Type u_6}
{f : M → N}
{g : N → P}
[Zero P]
(h : Function.Exact f g)


theorem map_csInf' (e : α ≃o β) {s : Set α} (hne : s.Nonempty) (hbdd : BddBelow s) :
    e (sInf s) = sInf (e '' s)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
(e : α ≃o β)
{s : Set α}
(hne : s.Nonempty)
(hbdd : BddBelow s)


theorem tsupport_subset_chartAt_source : tsupport f ⊆ (chartAt H c).source

{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(f : SmoothBumpFunction I c)
[T2Space M]


/-- Given a diagram `F : J ⥤ C` and two `Cone F`s, we can join them into a diagram `Bicone J ⥤ C`.
-/
@[simps]
def biconeMk {C : Type u₁} [Category.{v₁} C] {F : J ⥤ C} (c₁ c₂ : Cone F) : Bicone J ⥤ C

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

(CategoryTheory.biconeMk J c₁ c₂).obj X = CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j


@[csimp] theorem all_eq_allTR : @all = @allTR

(Nat.all f n && Nat.allTR.loop f (m + n) m) = Nat.all f (m + n)


theorem mod_def (x y : ℤ[i]) : x % y = x - y * (x / y)


@[simp]
theorem lift_apply_inl (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r)
    (r : R) :
    lift f g hg hfg hgf (inl r) = f r

(hfg : ∀ (r : R) (x : M), g (r •> x) = f r * g x)

(hgf : ∀ (r : R) (x : M), g (x <• r) = g x * f r)

(TrivSqZeroExt.lift f g hg hfg hgf) (TrivSqZeroExt.inl r) = f r


/-- The cardinality of the set of `k`-rough numbers `≤ N` is bounded by the sum of `⌊N/p⌋`
over the primes `k ≤ p ≤ N`. -/
lemma roughNumbersUpTo_card_le (N k : ℕ) :
    (roughNumbersUpTo N k).card ≤ (N.succ.primesBelow \ k.primesBelow).sum (fun p ↦ N / p)

(N.roughNumbersUpTo k).card ≤ ∑ p ∈ N.succ.primesBelow \ k.primesBelow, N / p


@[deprecated formPerm_apply_get (since := "2024-04-23")]
theorem formPerm_apply_nthLe (xs : List α) (h : Nodup xs) (n : ℕ) (hn : n < xs.length) :
    formPerm xs (xs.nthLe n hn) =
      xs.nthLe ((n + 1) % xs.length) (Nat.mod_lt _ (n.zero_le.trans_lt hn))

{α : Type u_1}
[DecidableEq α]
(xs : List α)
(h : xs.Nodup)
(n : ℕ)
(hn : n < xs.length)

xs.formPerm (xs.nthLe n hn) = xs.nthLe ((n + 1) % xs.length) ⋯


lemma tilted_tilted (hf : Integrable (fun x ↦ exp (f x)) μ) (g : α → ℝ) :
    (μ.tilted f).tilted g = μ.tilted (f + g)

(hf : MeasureTheory.Integrable (fun x => rexp (f x)) μ)


/-- The topology of `𝔖`-convergence is the infimum, for `S ∈ 𝔖`, of topology induced by the map
of `S.restrict : (α →ᵤ[𝔖] β) → (↥S →ᵤ β)` of restriction to `S`, where `↥S →ᵤ β` is endowed with
the topology of uniform convergence. -/
protected theorem topologicalSpace_eq :
    UniformOnFun.topologicalSpace α β 𝔖 =
      ⨅ (s : Set α) (_ : s ∈ 𝔖), TopologicalSpace.induced
        (UniformFun.ofFun ∘ s.restrict ∘ toFun 𝔖) (UniformFun.topologicalSpace s β)

(α : Type u_1)
(β : Type u_2)
[UniformSpace β]
(𝔖 : Set (Set α))

UniformOnFun.topologicalSpace α β 𝔖 =
  ⨅ s ∈ 𝔖,
    TopologicalSpace.induced (⇑UniformFun.ofFun ∘ s.restrict ∘ ⇑(UniformOnFun.toFun 𝔖))
      (UniformFun.topologicalSpace (↑s) β)


theorem and_any_distrib_left (l : List α) (p : α → Bool) (q : Bool) :
    (q && l.any p) = l.any fun a => q && p a

{α : Type u_1}
(l : List α)
(p : α → Bool)
(q : Bool)


/-- Construct a left extension of `g : a ⟶ c` from a left extension of `g ≫ 𝟙 c`. -/
@[simps!]
def ofCompId (t : LeftExtension f (g ≫ 𝟙 c)) : LeftExtension f g

(t :
  CategoryTheory.Bicategory.LeftExtension f (CategoryTheory.CategoryStruct.comp g (CategoryTheory.CategoryStruct.id c)))


/-- `a ≤ -b → b ≤ -a` on ereal -/
theorem le_neg_of_le_neg {a b : EReal} (h : a ≤ -b) : b ≤ -a


@[to_additive (attr := simp)]
theorem dist_one_left : dist (1 : E) = norm


theorem finite_of_fg_torsion [hG' : AddGroup.FG G] (hG : AddMonoid.IsTorsion G) : Finite G

(G : Type u)
[AddCommGroup G]
[hG' : AddGroup.FG G]
(hG : AddMonoid.IsTorsion G)


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


/-- Consider a parameterized integral `x ↦ ∫ y, L (g y) (f x y)` where `L` is bilinear,
`g` is locally integrable and `f` is continuous and uniformly compactly supported. Then the
integral depends continuously on `x`. -/
lemma continuousOn_integral_bilinear_of_locally_integrable_of_compact_support
    [NormedSpace 𝕜 E] (L : F →L[𝕜] G →L[𝕜] E)
    {f : X → Y → G} {s : Set X} {k : Set Y} {g : Y → F}
    (hk : IsCompact k) (hf : ContinuousOn f.uncurry (s ×ˢ univ))
    (hfs : ∀ p, ∀ x, p ∈ s → x ∉ k → f p x = 0) (hg : IntegrableOn g k μ) :
    ContinuousOn (fun x ↦ ∫ y, L (g y) (f x y) ∂μ) s

(hf : ContinuousOn (Function.uncurry f) (s ×ˢ Set.univ))

(hfs : ∀ (p : X) (x : Y), p ∈ s → x ∉ k → f p x = 0)

ContinuousOn (fun x => ∫ (y : Y), (L (g y)) (f x y) ∂μ) s


/-- We say that `α` is an `InfConvergenceClass` if the following holds. Let `f : ι → α` be a
monotone function, let `a : α` be a greatest lower bound of `Set.range f`. Then `f x` tends to `𝓝 a`
as `x → -∞` (formally, at the filter `Filter.atBot`). We require this for `ι = (s : Set α)`,
`f = CoeTC.coe` in the definition, then prove it for any `f` in `tendsto_atBot_isGLB`.

This property holds for linear orders with order topology as well as their products. -/
class InfConvergenceClass (α : Type*) [Preorder α] [TopologicalSpace α] : Prop where
  /-- proof that a monotone function tends to `𝓝 a` as `x → -∞`-/
  tendsto_coe_atBot_isGLB :
    ∀ (a : α) (s : Set α), IsGLB s a → Tendsto (CoeTC.coe : s → α) atBot (𝓝 a)

{α : Type u_3}
[Preorder α]
[TopologicalSpace α]
[self : InfConvergenceClass α]
(a : α)
(s : Set α)

IsGLB s a → Filter.Tendsto CoeTC.coe Filter.atBot (𝓝 a)


@[simp]
theorem Basis.det_comp (e : Basis ι A M) (f : M →ₗ[A] M) (v : ι → M) :
    e.det (f ∘ v) = (LinearMap.det f) * e.det v

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

e.det (⇑f ∘ v) = LinearMap.det f * e.det v


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

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


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


theorem bit_add : ∀ (b : Bool) (n m : ℕ), bit b (n + m) = bit false n + bit b m

Nat.bit b (n + m) = Nat.bit false n + Nat.bit b m


lemma pow_le_of_le_one [ZeroLEOneClass α] [PosMulMono α] [MulPosMono α]
    (h₀ : 0 ≤ a) (h₁ : a ≤ 1) {n : ℕ} (hn : n ≠ 0) : a ^ n ≤ a

{α : Type u}
[Semiring α]
[Preorder α]
{a : α}
[ZeroLEOneClass α]
[PosMulMono α]
[MulPosMono α]
(h₀ : 0 ≤ a)
(h₁ : a ≤ 1)
{n : ℕ}
(hn : n ≠ 0)


theorem U_neg_sub_one (n : ℤ) : U R (-n - 1) = -U R (n - 1)

Polynomial.Chebyshev.U R (-n - 1) = -Polynomial.Chebyshev.U R (n - 1)


@[ext]
theorem ext {μ₁ μ₂ : OuterMeasure α} (h : ∀ s, μ₁ s = μ₂ s) : μ₁ = μ₂

{α : Type u_1}
{μ₁ μ₂ : MeasureTheory.OuterMeasure α}
(h : ∀ (s : Set α), μ₁ s = μ₂ s)


@[fun_prop]
theorem hasFDerivWithinAt_singleton (f : E → F) (x : E) :
    HasFDerivWithinAt f (0 : E →L[𝕜] F) {x} 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)


protected theorem uniformEmbedding (h : α ≃ᵤ β) : UniformEmbedding h

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)


@[simp]
lemma weightedHomogeneousSubmodule_one (n : ℕ) :
    weightedHomogeneousSubmodule R 1 n = homogeneousSubmodule σ R n

(σ : Type u_1)
(R : Type u_3)
[CommSemiring R]
(n : ℕ)

MvPolynomial.weightedHomogeneousSubmodule R 1 n = MvPolynomial.homogeneousSubmodule σ R n


theorem mex_monotone {α β : Type u} {f : α → Ordinal.{max u v}} {g : β → Ordinal.{max u v}}
    (h : Set.range f ⊆ Set.range g) : mex.{_, v} f ≤ mex.{_, v} g


theorem Adhesive.mono_of_isPushout_of_mono_right [Adhesive C] (H : IsPushout f g h i) [Mono g] :
    Mono h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
[CategoryTheory.Adhesive C]
(H : CategoryTheory.IsPushout f g h i)
[CategoryTheory.Mono g]


theorem Subsemiring.topologicalClosure_minimal (s : Subsemiring α) {t : Subsemiring α} (h : s ≤ t)
    (ht : IsClosed (t : Set α)) : s.topologicalClosure ≤ t

{α : Type u_1}
[TopologicalSpace α]
[Semiring α]
[TopologicalSemiring α]
(s : Subsemiring α)
{t : Subsemiring α}
(h : s ≤ t)
(ht : IsClosed ↑t)


@[simp]
theorem eventually_principal {a : Set α} {p : α → Prop} : (∀ᶠ x in 𝓟 a, p x) ↔ ∀ x ∈ a, p x


theorem starConvex_iff_forall_pos (hx : x ∈ s) : StarConvex 𝕜 x s ↔
    ∀ ⦃y⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s

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

StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s


/-- The canonical isomorphism `(𝟭 C).mapTriangle ≅ 𝟭 (Triangle C)`. -/
@[simps!]
def mapTriangleIdIso : (𝟭 C).mapTriangle ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Functor.mapTriangleIdIso C).inv.app X).hom₂ = CategoryTheory.CategoryStruct.id X.obj₂


lemma levyProkhorovDist_self (μ : Measure Ω) :
    levyProkhorovDist μ μ = 0

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoEMetricSpace Ω]
(μ : MeasureTheory.Measure Ω)


theorem Convex.prod {s : Set E} {t : Set F} (hs : Convex 𝕜 s) (ht : Convex 𝕜 t) :
    Convex 𝕜 (s ×ˢ t)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[SMul 𝕜 E]
[SMul 𝕜 F]
{s : Set E}
{t : Set F}
(hs : Convex 𝕜 s)
(ht : Convex 𝕜 t)


theorem sum_add_sum_compl (s : Set ι) (μ : ι → Measure α) :
    ((sum fun i : s => μ i) + sum fun i : ↥sᶜ => μ i) = sum μ

{α : Type u_1}
{ι : Type u_5}
{m0 : MeasurableSpace α}
(s : Set ι)
(μ : ι → MeasureTheory.Measure α)

((MeasureTheory.Measure.sum fun i => μ ↑i) + MeasureTheory.Measure.sum fun i => μ ↑i) = MeasureTheory.Measure.sum μ


theorem isInt_jacobiSym : {a na : ℤ} → {b nb : ℕ} → {r : ℤ} →
    IsInt a na → IsNat b nb → jacobiSym na nb = r → IsInt (jacobiSym a b) r

Mathlib.Meta.NormNum.IsInt a na →
  Mathlib.Meta.NormNum.IsNat b nb → jacobiSym na nb = r → Mathlib.Meta.NormNum.IsInt (jacobiSym a b) r


/-- The restriction of a section `f` to the basic open of `f` is a unit. -/
theorem isUnit_res_basicOpen {U : Opens X} (f : X.presheaf.obj (op U)) :
    IsUnit (X.presheaf.map (@homOfLE (Opens X) _ _ _ (X.basicOpen_le f)).op f)

{U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace}

IsUnit ((X.presheaf.map (CategoryTheory.homOfLE ⋯).op) f)


theorem unifIntegrable_of (hp : 1 ≤ p) (hp' : p ≠ ∞) {f : ι → α → β}
    (hf : ∀ i, AEStronglyMeasurable (f i) μ)
    (h : ∀ ε : ℝ, 0 < ε → ∃ C : ℝ≥0,
      ∀ i, eLpNorm ({ x | C ≤ ‖f i x‖₊ }.indicator (f i)) p μ ≤ ENNReal.ofReal ε) :
    UnifIntegrable f p μ

{f : ι → α → β}

(hf : ∀ (i : ι), MeasureTheory.AEStronglyMeasurable (f i) μ)

(h :
  ∀ (ε : ℝ), 0 < ε → ∃ C, ∀ (i : ι), MeasureTheory.eLpNorm ({x | C ≤ ‖f i x‖₊}.indicator (f i)) p μ ≤ ENNReal.ofReal ε)


theorem boxProd_adj_left {a₁ : α} {b : β} {a₂ : α} :
    (G □ H).Adj (a₁, b) (a₂, b) ↔ G.Adj a₁ a₂

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{H : SimpleGraph β}
{a₁ : α}
{b : β}
{a₂ : α}


/-- Construct a pseudofunctor from an oplax functor whose `mapId` and `mapComp` are isomorphisms. -/
@[simps!]
noncomputable def mkOfOplax' (F : OplaxFunctor B C) [∀ a, IsIso (F.mapId a)]
    [∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), IsIso (F.mapComp f g)] : Pseudofunctor B C

[∀ (a : B), CategoryTheory.IsIso (F.mapId a)]

[∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), CategoryTheory.IsIso (F.mapComp f g)]

∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c),
  ((CategoryTheory.Pseudofunctor.mkOfOplax' F).mapComp f g).inv = CategoryTheory.inv (F.mapComp f g)


theorem comul_tensorObj_tensorObj_left :
    Coalgebra.comul (R := R)
      (A := ((CoalgebraCat.of R M ⊗ CoalgebraCat.of R N) ⊗ CoalgebraCat.of R P : CoalgebraCat R))
      = Coalgebra.comul (A := (M ⊗[R] N) ⊗[R] P)

{R : Type u}
[CommRing R]
{M N P : Type u}
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup P]
[Module R M]
[Module R N]
[Module R P]
[Coalgebra R M]
[Coalgebra R N]
[Coalgebra R P]


@[simp]
theorem smul_mem_pointwise_smul_iff {a : α} {S : Submonoid M} {x : M} : a • x ∈ a • S ↔ x ∈ S

{α : Type u_1}
{M : Type u_3}
[Monoid M]
[Group α]
[MulDistribMulAction α M]
{a : α}
{S : Submonoid M}
{x : M}


@[simp]
theorem continuous_lift {hf : ∀ x y, (x ~ᵢ y) → f x = f y} :
    Continuous (lift f hf) ↔ Continuous f

{hf : ∀ (x y : X), (x ~ᵢ y) → f x = f y}

Continuous (SeparationQuotient.lift f hf) ↔ Continuous f


private theorem T_pow_nonneg (n : ℕ) : 0 ≤ T ^ n

{p : ℕ}
[Fact (Nat.Prime p)]
{F : Polynomial ℤ_[p]}
{a : ℤ_[p]}
(n : ℕ)


/-- Two finite and free modules are isomorphic if and only if they have the same (finite) rank. -/
theorem FiniteDimensional.nonempty_linearEquiv_iff_finrank_eq [Module.Finite R M]
    [Module.Finite R M'] : Nonempty (M ≃ₗ[R] M') ↔ finrank R M = finrank R M'

{R : Type u}
{M : Type v}
{M' : Type v'}
[Ring R]
[StrongRankCondition R]
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[AddCommGroup M']
[Module R M']
[Module.Free R M']
[Module.Finite R M]
[Module.Finite R M']

Nonempty (M ≃ₗ[R] M') ↔ FiniteDimensional.finrank R M = FiniteDimensional.finrank R M'


theorem lt_iff_exists_rat_btwn {a b : EReal} :
    a < b ↔ ∃ x : ℚ, a < (x : ℝ) ∧ ((x : ℝ) : EReal) < b


protected theorem add_lt_add_iff_right {k n m : Nat} : n + k < m + k ↔ n < m


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

(K : HomologicalComplex (CategoryTheory.Idempotents.Karoubi C) (ComplexShape.down α))

((CategoryTheory.Idempotents.karoubiChainComplexEquivalence C α).inverse.obj K).X.d i j = (K.d i j).f


theorem KaehlerDifferential.map_surjective :
    Function.Surjective (KaehlerDifferential.map R S B B)

(R : Type u)
(S : Type v)
[CommRing R]
[CommRing S]
[Algebra R S]
(B : Type u_3)
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]

Function.Surjective ⇑(KaehlerDifferential.map R S B B)


theorem eventually_lt_atBot [Preorder α] [NoMinOrder α] (a : α) : ∀ᶠ x in atBot, x < a

{α : Type u_3}
[Preorder α]
[NoMinOrder α]
(a : α)


theorem NatTrans.congr {F G : C ⥤ D} (α : F ⟶ G) {X Y : C} (h : X = Y) :
    α.app X = F.map (eqToHom h) ≫ α.app Y ≫ G.map (eqToHom h.symm)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : CategoryTheory.Functor C D}
(α : F ⟶ G)
{X Y : C}
(h : X = Y)

α.app X =
  CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.eqToHom h))
    (CategoryTheory.CategoryStruct.comp (α.app Y) (G.map (CategoryTheory.eqToHom ⋯)))


@[simp]
theorem cosh_arsinh (x : ℝ) : cosh (arsinh x) = √(1 + x ^ 2)

Real.cosh (Real.arsinh x) = √(1 + x ^ 2)


theorem rel_of_subsingleton (r) [IsRefl α r] [Subsingleton α] (x y) : r x y

{α : Type u}
(r : α → α → Prop)
[IsRefl α r]
[Subsingleton α]
(x y : α)


theorem AntilipschitzWith.edist_lt_top [PseudoEMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
    {f : α → β} (h : AntilipschitzWith K f) (x y : α) : edist x y < ⊤

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(h : AntilipschitzWith K f)
(x y : α)


@[reassoc]
lemma homologySequenceδ_quotient_mapTriangle_obj
    (T : Triangle (CochainComplex C ℤ)) (n₀ n₁ : ℤ) (h : n₀ + 1 = n₁) :
    (homologyFunctor C (up ℤ) 0).homologySequenceδ
        ((quotient C (up ℤ)).mapTriangle.obj T) n₀ n₁ h =
      (homologyFunctorFactors C (up ℤ) n₀).hom.app _ ≫
        (HomologicalComplex.homologyFunctor C (up ℤ) 0).shiftMap T.mor₃ n₀ n₁ (by omega) ≫
        (homologyFunctorFactors C (up ℤ) n₁).inv.app _

(T : CategoryTheory.Pretriangulated.Triangle (CochainComplex C ℤ))

(HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) 0).homologySequenceδ
    ((HomotopyCategory.quotient C (ComplexShape.up ℤ)).mapTriangle.obj T) n₀ n₁ h =
  (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) n₀).hom.app T.obj₃ ≫
    (HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap T.mor₃ n₀ n₁ ⋯ ≫
      (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) n₁).inv.app T.obj₁


theorem lt_add_one_iff : ∀ {a b : ℕ+}, a < b + 1 ↔ a ≤ b


/-- The complete graph on `n` vertices has `n.choose 2` edges. -/
theorem card_edgeFinset_top_eq_card_choose_two [DecidableEq V] :
    (⊤ : SimpleGraph V).edgeFinset.card = (Fintype.card V).choose 2

{V : Type u_1}
[Fintype V]
[DecidableEq V]

⊤.edgeFinset.card = (Fintype.card V).choose 2


theorem contDiffOn_ext_coord_change [SmoothManifoldWithCorners I M] (x x' : M) :
    ContDiffOn 𝕜 ⊤ (extChartAt I x ∘ (extChartAt I x').symm)
      ((extChartAt I x').symm ≫ extChartAt I x).source

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
(x x' : M)

ContDiffOn 𝕜 ⊤ (↑(extChartAt I x) ∘ ↑(extChartAt I x').symm) ((extChartAt I x').symm ≫ extChartAt I x).source


@[to_additive (attr := simp, norm_cast)]
theorem coe_smul (s : Finset α) (t : Finset β) : ↑(s • t) = (s : Set α) • (t : Set β)

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
(s : Finset α)
(t : Finset β)


@[simp]
theorem getLast?_append_cons :
    ∀ (l₁ : List α) (a : α) (l₂ : List α), getLast? (l₁ ++ a :: l₂) = getLast? (a :: l₂)

{α : Type u}
(l₁ : List α)
(a : α)
(l₂ : List α)

(l₁ ++ a :: l₂).getLast? = (a :: l₂).getLast?


theorem NFBelow.repr_lt {o b} (h : NFBelow o b) : repr o < ω ^ b

{o : ONote}
{b : Ordinal.{0}}
(h : o.NFBelow b)


theorem pow_nat {b c k : ℕ} {d e : R} (_ : b = c * k) (_ : a ^ c = d) (_ : d ^ k = e) :
    (a : R) ^ b = e

{R : Type u_1}
[CommSemiring R]
{a : R}
{b c k : ℕ}
{d e : R}

b = c * k → a ^ c = d → d ^ k = e → a ^ b = e


@[to_additive]
theorem orbitRel_apply {a b : α} : (orbitRel G α).Rel a b ↔ a ∈ orbit G b

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{a b : α}

(MulAction.orbitRel G α).Rel a b ↔ a ∈ MulAction.orbit G b


@[simp]
theorem top_apply {s : Set α} (h : s.Nonempty) : (⊤ : OuterMeasure α) s = ∞

{α : Type u_1}
{s : Set α}
(h : s.Nonempty)


@[to_additive]
theorem op_sInf (S : Set (Subgroup G)) : (sInf S).op = sInf (.unop ⁻¹' S)

{G : Type u_2}
[Group G]
(S : Set (Subgroup G))

(sInf S).op = sInf (Subgroup.unop ⁻¹' S)


theorem get?_eq_get : ∀ {l : List α} {n} (h : n < l.length), l.get? n = some (get l ⟨n, h⟩)

{α : Type u_1}
{l : List α}
{n : Nat}
(h : n < l.length)


theorem inter_val_nd (s₁ s₂ : Finset α) : (s₁ ∩ s₂).1 = ndinter s₁.1 s₂.1

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


theorem insertNth_le_iff {i : Fin (n + 1)} {x : α i} {p : ∀ j, α (i.succAbove j)} {q : ∀ j, α j} :
    i.insertNth x p ≤ q ↔ x ≤ q i ∧ p ≤ fun j ↦ q (i.succAbove j)

{n : ℕ}
{α : Fin (n + 1) → Type u}
[(i : Fin (n + 1)) → Preorder (α i)]
{i : Fin (n + 1)}
{x : α i}
{p : (j : Fin n) → α (i.succAbove j)}
{q : (j : Fin (n + 1)) → α j}

i.insertNth x p ≤ q ↔ x ≤ q i ∧ p ≤ fun j => q (i.succAbove j)


@[to_additive]
theorem div_eq_one : a / b = 1 ↔ a = b


theorem image.map_homMk'_ι {X Y P Q : C} {k : X ⟶ Y} [HasImage k] {l : P ⟶ Q} [HasImage l]
    {m : X ⟶ P} {n : Y ⟶ Q} (w : m ≫ l = k ≫ n) [HasImageMap (Arrow.homMk' w)] :
    image.map (Arrow.homMk' w) ≫ image.ι l = image.ι k ≫ n

CategoryTheory.Limits.image.map (CategoryTheory.Arrow.homMk' w) ≫ CategoryTheory.Limits.image.ι l =
  CategoryTheory.Limits.image.ι k ≫ n


theorem quotientInfEquivSupQuotient_surjective (p p' : Submodule R M) :
    Function.Surjective (quotientInfToSupQuotient p p')

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

Function.Surjective ⇑(LinearMap.quotientInfToSupQuotient p p')


theorem map_congr {s1 s2 : Computation α} {f : α → β}
    (h1 : s1 ~ s2) : map f s1 ~ map f s2

{α : Type u}
{β : Type v}
{s1 s2 : Computation α}
{f : α → β}
(h1 : s1.Equiv s2)

(Computation.map f s1).Equiv (Computation.map f s2)


/-- A filter basis `B` on a type `α` is a nonempty collection of sets of `α`
such that the intersection of two elements of this collection contains some element
of the collection. -/
structure FilterBasis (α : Type*) where
  /-- Sets of a filter basis. -/
  sets : Set (Set α)
  /-- The set of filter basis sets is nonempty. -/
  nonempty : sets.Nonempty
  /-- The set of filter basis sets is directed downwards. -/
  inter_sets {x y} : x ∈ sets → y ∈ sets → ∃ z ∈ sets, z ⊆ x ∩ y


theorem copy_cons {u v w u' w'} (h : G.Adj u v) (p : G.Walk v w) (hu : u = u') (hw : w = w') :
    (Walk.cons h p).copy hu hw = Walk.cons (hu ▸ h) (p.copy rfl hw)

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

(SimpleGraph.Walk.cons h p).copy hu hw = SimpleGraph.Walk.cons ⋯ (p.copy ⋯ hw)


/-- The integral over `Ioi 0` of a forward convolution of two functions is equal to the product
of their integrals over this set. (Compare `integral_convolution` for the two-sided convolution.) -/
theorem integral_posConvolution [CompleteSpace E] [CompleteSpace E'] {μ ν : Measure ℝ}
    [SFinite μ] [SFinite ν] [IsAddRightInvariant μ] [NoAtoms ν] {f : ℝ → E} {g : ℝ → E'}
    (hf : IntegrableOn f (Ioi 0) ν) (hg : IntegrableOn g (Ioi 0) μ) (L : E →L[ℝ] E' →L[ℝ] F) :
    ∫ x : ℝ in Ioi 0, ∫ t : ℝ in (0)..x, L (f t) (g (x - t)) ∂ν ∂μ =
      L (∫ x : ℝ in Ioi 0, f x ∂ν) (∫ x : ℝ in Ioi 0, g x ∂μ)

(hf : MeasureTheory.IntegrableOn f (Set.Ioi 0) ν)

(hg : MeasureTheory.IntegrableOn g (Set.Ioi 0) μ)

∫ (x : ℝ) in Set.Ioi 0, ∫ (t : ℝ) in 0 ..x, (L (f t)) (g (x - t)) ∂ν ∂μ =
  (L (∫ (x : ℝ) in Set.Ioi 0, f x ∂ν)) (∫ (x : ℝ) in Set.Ioi 0, g x ∂μ)


theorem Indep.of_restrict (hI : (M ↾ R).Indep I) : M.Indep I

{α : Type u_1}
{M : Matroid α}
{R I : Set α}
(hI : (M.restrict R).Indep I)


/-- An algebra morphism with an underlying monomorphism hom in `C` is an algebra monomorphism. -/
theorem mono_of_mono {X Y : Coalgebra F} (f : X ⟶ Y) [h : Mono f.1] : Mono f

{X Y : CategoryTheory.Endofunctor.Coalgebra F}


protected theorem add_lt_add_iff_left : a ≠ ∞ → (a + b < a + c ↔ b < c)


@[simp]
theorem reindexLinearEquiv_refl_refl :
    reindexLinearEquiv R A (Equiv.refl m) (Equiv.refl n) = LinearEquiv.refl R _

{m : Type u_2}
{n : Type u_3}
(R : Type u_11)
(A : Type u_12)
[Semiring R]
[AddCommMonoid A]
[Module R A]

Matrix.reindexLinearEquiv R A (Equiv.refl m) (Equiv.refl n) = LinearEquiv.refl R (Matrix m n A)


theorem isUnit_or_eq_zero_of_isUnit_integerNormalization_primPart {p : K[X]} (h0 : p ≠ 0)
    (h : IsUnit (integerNormalization R⁰ p).primPart) : IsUnit p

(h : IsUnit (IsLocalization.integerNormalization R⁰ p).primPart)


/-- In a commutative monoid, an element `a` divides an element `b` iff all
  left associates of `a` divide `b`. -/
theorem mul_left_dvd : ↑u * a ∣ b ↔ a ∣ b

{α : Type u_1}
[CommMonoid α]
{a b : α}
{u : αˣ}


lemma Algebra.adjoin_nonUnitalSubalgebra_eq_span (s : NonUnitalSubalgebra R A) :
    Subalgebra.toSubmodule (adjoin R (s : Set A)) = span R {1} ⊔ s.toSubmodule

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(s : NonUnitalSubalgebra R A)

Subalgebra.toSubmodule (Algebra.adjoin R ↑s) = Submodule.span R {1} ⊔ s.toSubmodule


@[to_additive (attr := simp 1001)]
-- Porting note: increase priority so that the left-hand side doesn't simplify
theorem preimage_mul_closedBall (a b : E) (r : ℝ) :
    (b * ·) ⁻¹' closedBall a r = closedBall (a / b) r

{E : Type u_6}
[SeminormedCommGroup E]
(a b : E)
(r : ℝ)

(fun x => b * x) ⁻¹' Metric.closedBall a r = Metric.closedBall (a / b) r


@[simp]
theorem insert_compl_self (x : α) : insert x ({x}ᶜ : Finset α) = univ

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


theorem IsBlock.mk_notempty_one {B : Set X} :
    IsBlock G B ↔ ∀ g : G, g • B ∩ B ≠ ∅ → g • B = B

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
{B : Set X}

MulAction.IsBlock G B ↔ ∀ (g : G), g • B ∩ B ≠ ∅ → g • B = B


@[simp] lemma removeNth_insertNth (p : Fin (n + 1)) (a : α p) (f : ∀ i, α (succAbove p i)) :
    removeNth p (insertNth p a f) = f

{n : ℕ}
{α : Fin (n + 1) → Type u}
(p : Fin (n + 1))
(a : α p)
(f : (i : Fin n) → α (p.succAbove i))


theorem append_append_stream : ∀ (l₁ l₂ : List α) (s : Stream' α),
    l₁ ++ l₂ ++ₛ s = l₁ ++ₛ (l₂ ++ₛ s)

{α : Type u}
(l₁ l₂ : List α)
(s : Stream' α)


lemma sUnion_countablePartition (α : Type*) [MeasurableSpace α] [CountablyGenerated α] (n : ℕ) :
    ⋃₀ countablePartition α n = univ

(α : Type u_3)
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]
(n : ℕ)

⋃₀ MeasurableSpace.countablePartition α n = Set.univ


theorem mk_iUnion_eq_sum_mk {α ι : Type u} {f : ι → Set α}
    (h : Pairwise fun i j => Disjoint (f i) (f j)) : #(⋃ i, f i) = sum fun i => #(f i)

Cardinal.mk ↑(⋃ i, f i) = Cardinal.sum fun i => Cardinal.mk ↑(f i)


@[simp]
theorem irrational_add_rat_iff : Irrational (x + q) ↔ Irrational x


lemma mkRat_eq_divInt (n d) : mkRat n d = n /. d


@[simp] theorem get_swap_of_ne (a : Array α) {i j : Fin a.size} (hp : p < a.size)
    (hi : p ≠ i) (hj : p ≠ j) : (a.swap i j)[p]'(a.size_swap .. |>.symm ▸ hp) = a[p]

{α : Type u_1}
{p : Nat}
(a : Array α)
{i j : Fin a.size}
(hp : p < a.size)
(hi : p ≠ ↑i)
(hj : p ≠ ↑j)


@[simp]
theorem uncurrySum_aux_apply
    (f : MultilinearMap R (fun _ : ι => M') (MultilinearMap R (fun _ : ι' => M') M₂))
    (u : ι ⊕ ι' → M') : f.uncurrySum u = f (u ∘ Sum.inl) (u ∘ Sum.inr)

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

f.uncurrySum u = (f (u ∘ Sum.inl)) (u ∘ Sum.inr)


theorem mem_range_self (f : α →ₛ β) (x : α) : f x ∈ f.range

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α β)
(x : α)


theorem blsub_pos {o : Ordinal} (ho : 0 < o) (f : ∀ a < o, Ordinal) : 0 < blsub o f

(f : (a : Ordinal.{u_4}) → a < o → Ordinal.{max u_4 u_5})


theorem coeff_restriction' {p : R[X]} {n : ℕ} : (coeff (restriction p) n).1 = coeff p n

{R : Type u}
[Ring R]
{p : R[X]}
{n : ℕ}


theorem ContinuousOn.restrict_mapsTo {f : α → β} {s : Set α} {t : Set β} (hf : ContinuousOn f s)
    (ht : MapsTo f s t) : Continuous (ht.restrict f s t)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
{t : Set β}
(hf : ContinuousOn f s)
(ht : Set.MapsTo f s t)

Continuous (Set.MapsTo.restrict f s t ht)


@[simp]
theorem splitAt_eq_take_drop (n : ℕ) (l : List α) : splitAt n l = (take n l, drop n l)

{α : Type u}
(n : ℕ)
(l xs : List α)
(acc : Array α)

List.splitAt.go l xs n acc = if n < xs.length then (acc.toList ++ List.take n xs, List.drop n xs) else (l, [])


theorem preimage_coe_nnreal_ennreal (h : u.OrdConnected) : ((↑) ⁻¹' u : Set ℝ≥0).OrdConnected


@[fun_prop]
theorem HasStrictFDerivAt.restrictScalars (h : HasStrictFDerivAt f f' x) :
    HasStrictFDerivAt f (f'.restrictScalars 𝕜) x

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜' E]
[IsScalarTower 𝕜 𝕜' E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{f : E → F}
{f' : E →L[𝕜'] F}
{x : E}
(h : HasStrictFDerivAt f f' x)

HasStrictFDerivAt f (ContinuousLinearMap.restrictScalars 𝕜 f') x


lemma ker_residue : RingHom.ker (residue R) = maximalIdeal R

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

RingHom.ker (LocalRing.residue R) = LocalRing.maximalIdeal R


/-- A family of points in a projective space is independent if and only if the representative
vectors determined by the family are linearly independent. -/
theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)

{ι : Type u_1}
{K : Type u_2}
{V : Type u_3}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{f : ι → ℙ K V}

Projectivization.Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)


theorem pow_mono {f g : CircleDeg1Lift} (h : f ≤ g) (n : ℕ) : f ^ n ≤ g ^ n


@[simp]
theorem integral_id : ∫ x in a..b, x = (b ^ 2 - a ^ 2) / 2


/-- Given two classes of morphisms `W₁` and `W₂` on a category `C`, this is
the data of the factorization of a morphism `f : X ⟶ Y` as `i ≫ p` with
`W₁ i` and `W₂ p`. -/
structure MapFactorizationData {X Y : C} (f : X ⟶ Y) where
  /-- the intermediate object in the factorization -/
  Z : C
  /-- the first morphism in the factorization -/
  i : X ⟶ Z
  /-- the second morphism in the factorization -/
  p : Z ⟶ Y
  fac : i ≫ p = f := by aesop_cat
  hi : W₁ i
  hp : W₂ p

{W₁ W₂ : CategoryTheory.MorphismProperty C}


@[to_additive (attr := simp)]
theorem pure_smul : (pure a : Filter α) • g = g.map (a • ·)

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{g : Filter β}
{a : α}

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


/-- The equivalence of categories `X ≌ Y` induced by `e : X ≃o Y`. -/
@[simps]
def OrderIso.equivalence (e : X ≃o Y) : X ≌ Y

{X : Type u}
{Y : Type v}
[Preorder X]
[Preorder Y]
(e : X ≃o Y)

e.equivalence.counitIso = CategoryTheory.NatIso.ofComponents (fun x => CategoryTheory.eqToIso ⋯) ⋯


theorem exists_mem_eventuallyEq_const_of_eventually_mem_of_forall_separating (p : Set β → Prop)
    {s : Set β} [HasCountableSeparatingOn β p s] (hs : ∀ᶠ x in l, f x ∈ s) (hne : s.Nonempty)
    (h : ∀ U, p U → (∀ᶠ x in l, f x ∈ U) ∨ (∀ᶠ x in l, f x ∉ U)) :
    ∃ a ∈ s, f =ᶠ[l] const α a

(h : ∀ (U : Set β), p U → (∀ᶠ (x : α) in l, f x ∈ U) ∨ ∀ᶠ (x : α) in l, f x ∉ U)


@[simp]
theorem vecMul_diagonal_const (x : α) (v : m → α) :
    v ᵥ* (diagonal fun _ => x) = MulOpposite.op x • v

{m : Type u_2}
{α : Type v}
[NonAssocSemiring α]
[Fintype m]
[DecidableEq m]
(x : α)
(v : m → α)

(v ᵥ* Matrix.diagonal fun x_1 => x) = MulOpposite.op x • v


theorem ofFinsupp_sum {ι : Type*} (s : Finset ι) (f : ι → R[ℕ]) :
    (⟨∑ i ∈ s, f i⟩ : R[X]) = ∑ i ∈ s, ⟨f i⟩

{R : Type u}
[Semiring R]
{ι : Type u_1}
(s : Finset ι)
(f : ι → R[ℕ])

{ toFinsupp := ∑ i ∈ s, f i } = ∑ i ∈ s, { toFinsupp := f i }


theorem Disjoint.symmetric : Symmetric (@Disjoint α)


@[to_additive (attr := simp, norm_cast)]
lemma coe_mabs (f : C(α, β)) : ⇑|f|ₘ = |⇑f|ₘ

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[TopologicalSpace β]
[Group β]
[TopologicalGroup β]
[Lattice β]
[TopologicalLattice β]
(f : C(α, β))


theorem mul_iInf (f : ι → ℝ≥0) (a : ℝ≥0) : a * iInf f = ⨅ i, a * f i


@[simp] theorem beq_eq_true_eq (a b : Nat) : ((a == b) = true) = (a = b)


theorem add_mul_right_right : IsRelPrime x (y + z * x)

{R : Type u_1}
[CommRing R]
{x y : R}
(h : IsRelPrime x y)
(z : R)


/-- `smul` can be moved from one side of the product to the other . -/
theorem smul_tmul [DistribMulAction R' N] [CompatibleSMul R R' M N] (r : R') (m : M) (n : N) :
    (r • m) ⊗ₜ n = m ⊗ₜ[R] (r • n)

{R : Type u_1}
[CommSemiring R]
{R' : Type u_2}
[Monoid R']
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[DistribMulAction R' M]
[DistribMulAction R' N]
[TensorProduct.CompatibleSMul R R' M N]
(r : R')
(m : M)
(n : N)


@[simp]
theorem mem_cylinder (s : Finset ι) (S : Set (∀ i : s, α i)) (f : ∀ i, α i) :
    f ∈ cylinder s S ↔ (fun i : s ↦ f i) ∈ S

{ι : Type u_1}
{α : ι → Type u_2}
(s : Finset ι)
(S : Set ((i : { x // x ∈ s }) → α ↑i))
(f : (i : ι) → α i)

f ∈ MeasureTheory.cylinder s S ↔ (fun i => f ↑i) ∈ S


@[to_additive (attr := simp)]
theorem ofDual_one [One α] : (ofDual 1 : α) = 1


theorem Fintype.card_quotient_le [Fintype α] (s : Setoid α)
    [DecidableRel ((· ≈ ·) : α → α → Prop)] : Fintype.card (Quotient s) ≤ Fintype.card α

{α : Type u_1}
[Fintype α]
(s : Setoid α)
[DecidableRel fun x x_1 => x ≈ x_1]


lemma functorPushforward_inverse {X : D} (S : Sieve X) (e : C ≌ D) :
    S.functorPushforward e.inverse = (S.pullback (e.counit.app X)).functorPullback e.functor

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{X : D}
(S : CategoryTheory.Sieve X)
(e : C ≌ D)

CategoryTheory.Sieve.functorPushforward e.inverse S =
  CategoryTheory.Sieve.functorPullback e.functor (CategoryTheory.Sieve.pullback (e.counit.app X) S)


/-- Given an exact sequence `X₁ ⟶ X₂ ⟶ X₃ ⟶ 0` of `R`-modules and spanning
    families `v : ι → X₁` and `w : ι' → X₃`, we get a spanning family `ι ⊕ ι' → X₂` -/
theorem span_rightExact {w : ι' → S.X₃} (hv : ⊤ ≤ span R (range v))
    (hw : ⊤ ≤ span R (range w)) (hE : Epi S.g) :
    ⊤ ≤ span R (range (Sum.elim (S.f ∘ v) (S.g.toFun.invFun ∘ w)))

{S : CategoryTheory.ShortComplex (ModuleCat R)}

(hv : ⊤ ≤ Submodule.span R (Set.range v))

(hw : ⊤ ≤ Submodule.span R (Set.range w))

⊤ ≤ Submodule.span R (Set.range (Sum.elim (⇑S.f ∘ v) (Function.invFun S.g.toFun ∘ w)))


/-- The distance is symmetric.

This holds independent of `p` and does not require `[Fact (1 ≤ p)]`. We keep it separate
from `WithLp.instProdPseudoEMetricSpace` so it can be used also for `p < 1`. -/
theorem prod_edist_comm (f g : WithLp p (α × β)) : edist f g = edist g f

(p : ℝ≥0∞)
{α : Type u_2}
{β : Type u_3}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(f g : WithLp p (α × β))


theorem rightInverse_trop : Function.RightInverse (trop : R → Tropical R) untrop


@[simp]
lemma sup_covering (x y : Coverage C) (B : C) :
    (x ⊔ y).covering B = x.covering B ∪ y.covering B

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(x y : CategoryTheory.Coverage C)
(B : C)


theorem mem_disjSum : x ∈ s.disjSum t ↔ (∃ a, a ∈ s ∧ inl a = x) ∨ ∃ b, b ∈ t ∧ inr b = x

{α : Type u_1}
{β : Type u_2}
{s : Multiset α}
{t : Multiset β}
{x : α ⊕ β}

x ∈ s.disjSum t ↔ (∃ a ∈ s, Sum.inl a = x) ∨ ∃ b ∈ t, Sum.inr b = x


@[to_additive (attr := ext)]
theorem ext' {f g : GroupTopology α} (h : f.IsOpen = g.IsOpen) : f = g

(h : TopologicalSpace.IsOpen = TopologicalSpace.IsOpen)


theorem subtype_Ici_eq : Ici a = (Ici (a : α)).subtype p

{α : Type u_1}
[Preorder α]
(p : α → Prop)
[DecidablePred p]
[LocallyFiniteOrderTop α]
(a : Subtype p)

Finset.Ici a = Finset.subtype p (Finset.Ici ↑a)


theorem mem_support_iff_exists_append {V : Type u} {G : SimpleGraph V} {u v w : V}
    {p : G.Walk u v} : w ∈ p.support ↔ ∃ (q : G.Walk u w) (r : G.Walk w v), p = q.append r


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


@[simp] theorem addCases_left {m n : Nat} {motive : Fin (m + n) → Sort _} {left right} (i : Fin m) :
    addCases (motive := motive) left right (Fin.castAdd n i) = left i

{left : (i : Fin m) → motive (Fin.castAdd n i)}

{right : (i : Fin n) → motive (Fin.natAdd m i)}

Fin.addCases left right (Fin.castAdd n i) = left i


/-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2

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


theorem type_ne_zero_iff_nonempty [IsWellOrder α r] : type r ≠ 0 ↔ Nonempty α

{α : Type u}
{r : α → α → Prop}
[IsWellOrder α r]


@[simp] theorem reverse_nil : reverse ([] : List α) = []


theorem smul_mem_iff (s0 : s ≠ 0) : s • x ∈ p ↔ x ∈ p

{S : Type u'}
{R : Type u}
{M : Type v}
[DivisionSemiring S]
[Semiring R]
[AddCommMonoid M]
[Module R M]
[SMul S R]
[Module S M]
[IsScalarTower S R M]
(p : Submodule R M)
{s : S}
{x : M}
(s0 : s ≠ 0)


@[to_additive]
theorem mul_mem_sup {S T : Subgroup G} {x y : G} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T

{G : Type u_1}
[AddGroup G]
{S T : AddSubgroup G}
{x y : G}
(hx : x ∈ S)
(hy : y ∈ T)


/-- An object that is neither initial or connected has a non-trivial subobject. -/
lemma has_non_trivial_subobject_of_not_isConnected_of_not_initial (X : C) (hc : ¬ IsConnected X)
    (hi : IsInitial X → False) :
    ∃ (Y : C) (v : Y ⟶ X), (IsInitial Y → False) ∧ Mono v ∧ (¬ IsIso v)

(hc : ¬CategoryTheory.PreGaloisCategory.IsConnected X)

(hi : CategoryTheory.Limits.IsInitial X → False)

∃ Y v, (CategoryTheory.Limits.IsInitial Y → False) ∧ CategoryTheory.Mono v ∧ ¬CategoryTheory.IsIso v


theorem ofReal_normSq_eq_inner_self (x : F) : (normSqF x : 𝕜) = ⟪x, x⟫

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
(x : F)

↑(InnerProductSpace.Core.normSq x) = ⟪x, x⟫_𝕜


theorem arg_eq_nhds_of_re_pos (hx : 0 < x.re) : arg =ᶠ[𝓝 x] fun x => Real.arcsin (x.im / abs x)

Complex.arg =ᶠ[𝓝 x] fun x => Real.arcsin (x.im / Complex.abs x)


protected theorem perm_inv (h : IsFixedPt e x) : IsFixedPt (⇑e⁻¹) x

{α : Type u}
{x : α}
{e : Equiv.Perm α}
(h : Function.IsFixedPt (⇑e) x)


theorem sum_rpow_le_norm_rpow (hp : 0 < p.toReal) (f : lp E p) (s : Finset α) :
    ∑ i ∈ s, ‖f i‖ ^ p.toReal ≤ ‖f‖ ^ p.toReal

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
(hp : 0 < p.toReal)
(f : ↥(lp E p))
(s : Finset α)

∑ i ∈ s, ‖↑f i‖ ^ p.toReal ≤ ‖f‖ ^ p.toReal


theorem isLittleO_const_id_atTop (c : E'') : (fun _x : ℝ => c) =o[atTop] id

{E'' : Type u_9}
[NormedAddCommGroup E'']
(c : E'')


@[to_additive]
theorem uniformEmbedding_translate_mul (a : α) : UniformEmbedding fun x : α => x * a

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]
(a : α)


@[simp]
theorem land_bit : ∀ a m b n, bit a m &&& bit b n = bit (a && b) (m &&& n)

Nat.bit a m &&& Nat.bit b n = Nat.bit (a && b) (m &&& n)


/-- The `R`-linear equivalence between `ULift M` and `M`.

This is a linear version of `AddEquiv.ulift`. -/
@[simps apply symm_apply]
def moduleEquiv [Semiring R] [AddCommMonoid M] [Module R M] : ULift.{w} M ≃ₗ[R] M

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(down : M)

ULift.moduleEquiv.symm down = { down := down }


theorem div_eq_zero_of_lt {a b : Ordinal} (h : a < b) : a / b = 0


/-- `(d/dx) lim_{n → ∞} f n x = lim_{n → ∞} f' n x` when the `f' n` converge
_uniformly_ to their limit. -/
theorem hasFDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
    (hf : ∀ n : ι, ∀ x : E, HasFDerivAt (f n) (f' n x) x)
    (hfg : ∀ x : E, Tendsto (fun n => f n x) l (𝓝 (g x))) : ∀ x : E, HasFDerivAt g (g' x) x

(hf : ∀ (n : ι) (x : E), HasFDerivAt (f n) (f' n x) x)

(hfg : ∀ (x : E), Filter.Tendsto (fun n => f n x) l (𝓝 (g x)))


theorem lift_lt_univ (c : Cardinal) : lift.{u + 1, u} c < univ.{u, u + 1}

Cardinal.lift.{u + 1, u} c < Cardinal.univ.{u, u + 1}


theorem hasPDF {X : Ω → E} {s : Set E} (hns : μ s ≠ 0) (hnt : μ s ≠ ∞)
    (hu : IsUniform X s ℙ μ) : HasPDF X ℙ μ

{E : Type u_1}
[MeasurableSpace E]
{μ : MeasureTheory.Measure E}
{Ω : Type u_2}

∀ {x : MeasurableSpace Ω} {ℙ : MeasureTheory.Measure Ω} {X : Ω → E} {s : Set E},
  μ s ≠ 0 → μ s ≠ ⊤ → MeasureTheory.pdf.IsUniform X s ℙ μ → MeasureTheory.HasPDF X ℙ μ


theorem exists_eq_add_one_of_ne_zero : ∀ {n}, n ≠ 0 → Exists fun k => n = k + 1


theorem eq_mul_inv_iff_mul_eq {φ₁ φ₂ φ₃ : k⟦X⟧} (h : constantCoeff k φ₃ ≠ 0) :
    φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂

(h : (PowerSeries.constantCoeff k) φ₃ ≠ 0)

φ₁ = φ₂ * φ₃⁻¹ ↔ φ₁ * φ₃ = φ₂


theorem comap_inf (s t : NonUnitalSubsemiring S) (f : F) :
    (comap f (s ⊓ t) : NonUnitalSubsemiring R) = comap f s ⊓ comap f t

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

NonUnitalSubsemiring.comap f (s ⊓ t) = NonUnitalSubsemiring.comap f s ⊓ NonUnitalSubsemiring.comap f t


@[deprecated getElem_map (since := "2024-06-12")]
theorem get_map (f : α → β) {l n} :
    get (map f l) n = f (get l ⟨n, length_map l f ▸ n.2⟩)

{α : Type u_1}
{β : Type u_2}
(f : α → β)
{l : List α}
{n : Fin (List.map f l).length}

(List.map f l).get n = f (l.get ⟨↑n, ⋯⟩)


@[simp] theorem prev_zero (s : String) : prev s 0 = 0


@[simp] lemma Lex.exists {p : Lex α → Prop} : (∃ a, p a) ↔ ∃ a, p (toLex a)


theorem definable_finset_inf {ι : Type*} {f : ι → Set (α → M)} (hf : ∀ i, A.Definable L (f i))
    (s : Finset ι) : A.Definable L (s.inf f)

{M : Type w}
{A : Set M}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{ι : Type u_2}
{f : ι → Set (α → M)}
(hf : ∀ (i : ι), A.Definable L (f i))
(s : Finset ι)


theorem gauge_def : gauge s x = sInf ({ r ∈ Set.Ioi (0 : ℝ) | x ∈ r • s })

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
{x : E}

gauge s x = sInf {r | r ∈ Set.Ioi 0 ∧ x ∈ r • s}


@[simp]
theorem sphere_union_ball : sphere x ε ∪ ball x ε = closedBall x ε

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

Metric.sphere x ε ∪ Metric.ball x ε = Metric.closedBall x ε


lemma isZero₂_iff_isIso₃ : IsZero T.obj₂ ↔ IsIso T.mor₃

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.Limits.IsZero T.obj₂ ↔ CategoryTheory.IsIso T.mor₃


{α : Type u_1}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}


/-- A closed embedding is proper. -/
lemma isProperMap_of_closedEmbedding (hf : ClosedEmbedding f) : IsProperMap f

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


theorem pairwise_disjoint_Ioc_intCast : Pairwise (Disjoint on fun n : ℤ => Ioc (n : α) (n + 1))

Pairwise (Disjoint on fun n => Set.Ioc (↑n) (↑n + 1))


/-- The canonical `LeftHomologyData` of a short complex `S` in an abelian category, for
which the `H` field is `Abelian.coimage (kernel.ι S.g ≫ cokernel.π S.f)`. -/
@[simps]
noncomputable def ofAbelian : S.LeftHomologyData

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

(CategoryTheory.ShortComplex.LeftHomologyData.ofAbelian S).i = CategoryTheory.Limits.kernel.ι S.g


@[simp]
theorem rotationOf_rotation (a : circle) : rotationOf (rotation a) = a


theorem NonUnitalSubring.toSubring_toNonUnitalSubring (S : NonUnitalSubring R) (h1 : (1 : R) ∈ S) :
    (NonUnitalSubring.toSubring S h1).toNonUnitalSubring = S

{R : Type u_1}
[Ring R]
(S : NonUnitalSubring R)
(h1 : 1 ∈ S)


theorem IsExtreme.extremePoints_subset_extremePoints (hAB : IsExtreme 𝕜 A B) :
    B.extremePoints 𝕜 ⊆ A.extremePoints 𝕜

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{A B : Set E}
(hAB : IsExtreme 𝕜 A B)

Set.extremePoints 𝕜 B ⊆ Set.extremePoints 𝕜 A


@[simp]
theorem map_bot (f : A →ₐ[R] B) : (⊥ : Subalgebra R A).map f = ⊥

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


lemma preimage_iSup {ι} (U : ι → Opens Y) : f ⁻¹ᵁ iSup U = ⨆ i, f ⁻¹ᵁ U i

{X Y : AlgebraicGeometry.Scheme}
(f : X.Hom Y)
{ι : Sort u_1}
(U : ι → Y.Opens)

(TopologicalSpace.Opens.map f.val.base).obj (iSup U) = ⨆ i, (TopologicalSpace.Opens.map f.val.base).obj (U i)


theorem Countable.sUnion_iff {s : Set (Set α)} (hs : s.Countable) :
    (⋃₀ s).Countable ↔ ∀ a ∈ s, a.Countable

{α : Type u}
{s : Set (Set α)}
(hs : s.Countable)


@[simp]
theorem coe_toAddSubgroup (s : NonUnitalSubring R) : (s.toAddSubgroup : Set R) = s

{R : Type u}
[NonUnitalNonAssocRing R]
(s : NonUnitalSubring R)


@[simp] theorem restrict_empty (M : Matroid α) : M ↾ (∅ : Set α) = emptyOn α


theorem inter_inter_distrib_left (s t u : Finset α) : s ∩ (t ∩ u) = s ∩ t ∩ (s ∩ u)

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


@[to_additive Iio_add_Iic_subset]
theorem Iio_mul_Iic_subset' (a b : α) : Iio a * Iic b ⊆ Iio (a * b)

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

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


/-- A `Matroid α` is a ground set `E` of type `Set α`, and a nonempty collection of its subsets
  satisfying the exchange property and the maximal subset property. Each such set is called a
  `Base` of `M`. An `Indep`endent set is just a set contained in a base, but we include this
  predicate as a structure field for better definitional properties.

  In most cases, using this definition directly is not the best way to construct a matroid,
  since it requires specifying both the bases and independent sets. If the bases are known,
  use `Matroid.ofBase` or a variant. If just the independent sets are known,
  define an `IndepMatroid`, and then use `IndepMatroid.matroid`.
  -/
@[ext] structure Matroid (α : Type _) where
  /-- `M` has a ground set `E`. -/
  (E : Set α)
  /-- `M` has a predicate `Base` definining its bases. -/
  (Base : Set α → Prop)
  /-- `M` has a predicate `Indep` defining its independent sets. -/
  (Indep : Set α → Prop)
  /-- The `Indep`endent sets are those contained in `Base`s. -/
  (indep_iff' : ∀ ⦃I⦄, Indep I ↔ ∃ B, Base B ∧ I ⊆ B)
  /-- There is at least one `Base`. -/
  (exists_base : ∃ B, Base B)
  /-- For any bases `B`, `B'` and `e ∈ B \ B'`, there is some `f ∈ B' \ B` for which `B-e+f`
    is a base. -/
  (base_exchange : Matroid.ExchangeProperty Base)
  /-- Every independent subset `I` of a set `X` for is contained in a maximal independent
    subset of `X`. -/
  (maximality : ∀ X, X ⊆ E → Matroid.ExistsMaximalSubsetProperty Indep X)
  /-- Every base is contained in the ground set. -/
  (subset_ground : ∀ B, Base B → B ⊆ E)

{α : Type u_1}
(self : Matroid α)
(X : Set α)

X ⊆ self.E → Matroid.ExistsMaximalSubsetProperty self.Indep X


@[simp]
theorem bilinearComp_apply (f : E →SL[σ₁₃] F →SL[σ₂₃] G) (gE : E' →SL[σ₁'] E) (gF : F' →SL[σ₂'] F)
    (x : E') (y : F') : f.bilinearComp gE gF x y = f (gE x) (gF y)

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{E : Type u_4}
{F : Type u_6}
{G : Type u_8}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜₃ G]
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
{σ₁₃ : 𝕜 →+* 𝕜₃}
{E' : Type u_11}
{F' : Type u_12}
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{𝕜₁' : Type u_13}
{𝕜₂' : Type u_14}
[NontriviallyNormedField 𝕜₁']
[NontriviallyNormedField 𝕜₂']
[NormedSpace 𝕜₁' E']
[NormedSpace 𝕜₂' F']
{σ₁' : 𝕜₁' →+* 𝕜}
{σ₁₃' : 𝕜₁' →+* 𝕜₃}
{σ₂' : 𝕜₂' →+* 𝕜₂}
{σ₂₃' : 𝕜₂' →+* 𝕜₃}
[RingHomCompTriple σ₁' σ₁₃ σ₁₃']
[RingHomCompTriple σ₂' σ₂₃ σ₂₃']
[RingHomIsometric σ₂₃]
[RingHomIsometric σ₁₃']
[RingHomIsometric σ₂₃']
(f : E →SL[σ₁₃] F →SL[σ₂₃] G)
(gE : E' →SL[σ₁'] E)
(gF : F' →SL[σ₂'] F)
(x : E')
(y : F')

((f.bilinearComp gE gF) x) y = (f (gE x)) (gF y)


@[simp]
theorem orderTop_one [MulZeroOneClass R] [Nontrivial R] : orderTop (1 : HahnSeries Γ R) = 0

{Γ : Type u_1}
{R : Type u_3}
[Zero Γ]
[PartialOrder Γ]
[MulZeroOneClass R]
[Nontrivial R]


@[to_additive subset_addCentralizer_addCentralizer]
lemma subset_centralizer_centralizer : S ⊆ S.centralizer.centralizer


@[to_additive (attr := simp)]
theorem prod_mk_fst_snd (x : M ∗ N) : (fst x, snd x) = toProd x

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]
(x : Monoid.Coprod M N)

(Monoid.Coprod.fst x, Monoid.Coprod.snd x) = Monoid.Coprod.toProd x


/--
The category of multicoforks is equivalent to the category of coforks over `∐ I.left ⇉ ∐ I.right`.
It then follows from `CategoryTheory.IsColimit.ofPreservesCoconeInitial` (or `reflects`) that
it preserves and reflects colimit cocones.
-/
@[simps]
noncomputable def multicoforkEquivSigmaCofork :
    Multicofork I ≌ Cofork I.fstSigmaMap I.sndSigmaMap

(I : CategoryTheory.Limits.MultispanIndex C)

I.multicoforkEquivSigmaCofork.unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun K =>
      CategoryTheory.Limits.Cocones.ext
        (CategoryTheory.Iso.refl ((CategoryTheory.Functor.id (CategoryTheory.Limits.Multicofork I)).obj K).pt) ⋯)
    ⋯


theorem lipschitzWith_lineMap (p₁ p₂ : P) : LipschitzWith (nndist p₁ p₂) (lineMap p₁ p₂ : 𝕜 → P)

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
(p₁ p₂ : P)

LipschitzWith (nndist p₁ p₂) ⇑(AffineMap.lineMap p₁ p₂)


theorem hasDerivWithinAt_iff_tendsto_slope :
    HasDerivWithinAt f f' s x ↔ Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f')

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s : Set 𝕜}

HasDerivWithinAt f f' s x ↔ Filter.Tendsto (slope f x) (𝓝[s \ {x}] x) (𝓝 f')


@[to_additive]
nonrec theorem Smooth.mul (hf : Smooth I' I f) (hg : Smooth I' I g) : Smooth I' I (f * g)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[Mul G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{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 g : M → G}
(hf : Smooth I' I f)
(hg : Smooth I' I g)


/-- A split mono category is a category in which every monomorphism is split. -/
class SplitMonoCategory : Prop where
  /-- All monos are split -/
  isSplitMono_of_mono : ∀ {X Y : C} (f : X ⟶ Y) [Mono f], IsSplitMono f

[self : CategoryTheory.SplitMonoCategory C]


theorem DvdNotUnit.not_associated [CancelCommMonoidWithZero α] {p q : α} (h : DvdNotUnit p q) :
    ¬Associated p q

{α : Type u_1}
[CancelCommMonoidWithZero α]
{p q : α}
(h : DvdNotUnit p q)


@[simp]
theorem not_nontrivial_singleton {x} : ¬({x} : Set α).Nontrivial


theorem subset_upperClosure : s ⊆ upperClosure s


@[simp] theorem headI_cons [Inhabited α] {h : α} {t : List α} : (h :: t).headI = h

{α : Type u}
[Inhabited α]
{h : α}
{t : List α}


theorem lintegral_mul_const' (r : ℝ≥0∞) (f : α → ℝ≥0∞) (hr : r ≠ ∞) :
    ∫⁻ a, f a * r ∂μ = (∫⁻ a, f a ∂μ) * r

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(r : ℝ≥0∞)
(f : α → ℝ≥0∞)
(hr : r ≠ ⊤)

∫⁻ (a : α), f a * r ∂μ = (∫⁻ (a : α), f a ∂μ) * r


theorem gcd_eq_sum : ∃ a b : R, a * x + b * y = gcd x y

[Submodule.IsPrincipal (Ideal.span {x, y})]


theorem LiftRel.symm (R : α → α → Prop) (H : Symmetric R) : Symmetric (LiftRel R)

{α : Type u}
(R : α → α → Prop)
(H : Symmetric R)


lemma ciInf_le_of_le' (c : ι) : f c ≤ a → iInf f ≤ a

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrderBot α]
{f : ι → α}
{a : α}
(c : ι)


/-- We call a category `NonPreadditiveAbelian` if it has a zero object, kernels, cokernels, binary
    products and coproducts, and every monomorphism and every epimorphism is normal. -/
class NonPreadditiveAbelian extends HasZeroMorphisms C, NormalMonoCategory C,
    NormalEpiCategory C where
  [has_zero_object : HasZeroObject C]
  [has_kernels : HasKernels C]
  [has_cokernels : HasCokernels C]
  [has_finite_products : HasFiniteProducts C]
  [has_finite_coproducts : HasFiniteCoproducts C]

[self : CategoryTheory.NonPreadditiveAbelian C]


theorem sup_support_add_le : (f + g).support.sup degb ≤ f.support.sup degb ⊔ g.support.sup degb

{R : Type u_1}
{A : Type u_3}
{B : Type u_5}
[SemilatticeSup B]
[OrderBot B]
[Semiring R]
(degb : A → B)
(f g : AddMonoidAlgebra R A)


theorem typein_surj (r : α → α → Prop) [IsWellOrder α r] {o} (h : o < type r) :
    ∃ a, typein r a = o

{α : Type u}
(r : α → α → Prop)
[IsWellOrder α r]
{o : Ordinal.{u}}
(h : o < Ordinal.type r)


theorem card_interedges_add_card_interedges_compl (h : Disjoint s t) :
    (G.interedges s t).card + (Gᶜ.interedges s t).card = s.card * t.card

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


@[to_additive (attr := simp)]
theorem mk_mul_mk (x y : M) (hx : x ∈ S) (hy : y ∈ S) :
    (⟨x, hx⟩ : S) * ⟨y, hy⟩ = ⟨x * y, S.mul_mem hx hy⟩

{M : Type u_1}
[AddZeroClass M]
(S : AddSubmonoid M)
(x y : M)
(hx : x ∈ S)
(hy : y ∈ S)


@[simp]
theorem prodComm_symm (α β) : (prodComm α β).symm = prodComm β α

(Equiv.prodComm α β).symm = Equiv.prodComm β α


@[simp]
theorem toDual_compl (a : α) : toDual aᶜ = ￢toDual a

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

OrderDual.toDual aᶜ = ￢OrderDual.toDual a


theorem pairwise_iff_getElem : Pairwise R l ↔
    ∀ (i j : Nat) (_hi : i < l.length) (_hj : j < l.length) (_hij : i < j), R l[i] l[j]

∀ {α : Type u_1} {R : α → α → Prop} {l : List α},
  List.Pairwise R l ↔ ∀ (i j : Nat) (_hi : i < l.length) (_hj : j < l.length), i < j → R l[i] l[j]


@[simp] lemma preimage_subtype_val_Iic (a : {x // p x}) : (↑) ⁻¹' (Iic a.1) = Iic a

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a : { x // p x })


@[simp]
theorem coe_id (X : UniformSpaceCat) : (𝟙 X : X → X) = id

(CategoryTheory.forget UniformSpaceCat).map (𝟙 X) = id


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

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrderTop α]
(a : α)


@[to_additive (attr := simp)]
theorem div_get_eq [Div α] (a b : Part α) (hab : Dom (a / b)) :
    (a / b).get hab = a.get (left_dom_of_div_dom hab) / b.get (right_dom_of_div_dom hab)

{α : Type u_1}
[Sub α]
(a b : Part α)
(hab : (a - b).Dom)


theorem independent_genEigenspace [NoZeroSMulDivisors R M] (f : End R M) :
    CompleteLattice.Independent (fun μ ↦ ⨆ k, f.genEigenspace μ k)

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
(f : Module.End R M)

CompleteLattice.Independent fun μ => ⨆ k, (f.genEigenspace μ) k


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

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[SemilatticeInf β]
{s : Set α}
[FunLike F β α]
[InfHomClass F β α]
(hs : InfClosed s)
(f : F)


@[gcongr]
lemma div_le_div_of_nonneg_left (ha : 0 ≤ a) (hc : 0 < c) (h : c ≤ b) : a / b ≤ a / c

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c : α}
(ha : 0 ≤ a)
(hc : 0 < c)
(h : c ≤ b)


@[simp]
protected theorem compl_sup (s : Finset ι) (f : ι → α) : (s.sup f)ᶜ = s.inf fun i => (f i)ᶜ

{α : Type u_2}
{ι : Type u_5}
[BooleanAlgebra α]
(s : Finset ι)
(f : ι → α)


lemma mem_distinguishedTriangles_iff' (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔
      ∃ (T' : Triangle C) (_ : T' ∈ distTriang C),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T'))

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

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

T ∈ CategoryTheory.Pretriangulated.Opposite.distinguishedTriangles C ↔
  ∃ T',
    ∃ (_ : T' ∈ CategoryTheory.Pretriangulated.distinguishedTriangles),
      Nonempty (T ≅ (CategoryTheory.Pretriangulated.triangleOpEquivalence C).functor.obj (Opposite.op T'))


theorem prodMkLeft_apply' (κ : Kernel α β) (ca : γ × α) (s : Set β) :
    prodMkLeft γ κ ca s = κ ca.snd s

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_5}
{mγ : MeasurableSpace γ}
(κ : ProbabilityTheory.Kernel α β)
(ca : γ × α)
(s : Set β)

((ProbabilityTheory.Kernel.prodMkLeft γ κ) ca) s = (κ ca.2) s


@[to_additive (attr := simp)] theorem MonoidHom.comp_id_grp
    {G : Grp.{u}} {H : Type u} [Group H] (f : G →* H) : f.comp (𝟙 G) = f

{G : AddGrp}
{H : Type u}
[AddGroup H]
(f : ↑G →+ H)