/--
The same as `binaryRec_eq`,
but that one unfortunately requires `f` to be the identity when appending `false` to `0`.
Here, we allow you to explicitly say that that case is not happening,
i.e. supplying `n = 0 → b = true`. -/
theorem binaryRec_eq' {C : ℕ → Sort*} {z : C 0} {f : ∀ b n, C n → C (bit b n)} (b n)
    (h : f false 0 z = z ∨ (n = 0 → b = true)) :
    binaryRec z f (bit b n) = f b n (binaryRec z f n)

{f : (b : Bool) → (n : ℕ) → C n → C (Nat.bit b n)}

Nat.binaryRec z f (Nat.bit b n) = f b n (Nat.binaryRec z f n)


theorem postcomp_map_heq (H : D ⥤ E) (hx : F.obj X = G.obj X) (hy : F.obj Y = G.obj Y)
    (hmap : HEq (F.map f) (G.map f)) : HEq ((F ⋙ H).map f) ((G ⋙ H).map f)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{F G : CategoryTheory.Functor C D}
{X Y : C}
{f : X ⟶ Y}
(H : CategoryTheory.Functor D E)
(hx : F.obj X = G.obj X)
(hy : F.obj Y = G.obj Y)
(hmap : HEq (F.map f) (G.map f))

HEq ((F.comp H).map f) ((G.comp H).map f)


/-- The Gelfand transform as a `StarAlgEquiv` between a commutative unital C⋆-algebra over `ℂ`
and the continuous functions on its `characterSpace`. -/
@[simps!]
noncomputable def gelfandStarTransform : A ≃⋆ₐ[ℂ] C(characterSpace ℂ A, ℂ)

(A : Type u_1)
[NormedCommRing A]
[NormedAlgebra ℂ A]
[CompleteSpace A]
[StarRing A]
[CstarRing A]
[StarModule ℂ A]

∀ (a : C(↑(WeakDual.characterSpace ℂ A), ℂ)),
  (gelfandStarTransform A).symm a =
    (↑(RingEquiv.ofBijective { toAlgHom := WeakDual.gelfandTransform ℂ A, map_star' := ⋯ } ⋯)).symm a


@[simp]
theorem quotient_map_mkₐ {I : Ideal A} (J : Ideal B) (f : A →ₐ[R₁] B) (H : I ≤ J.comap f) {x : A} :
    quotientMapₐ J f H (Quotient.mk I x) = Quotient.mkₐ R₁ J (f x)

{R₁ : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R₁]
[CommRing A]
[Algebra R₁ A]
[CommRing B]
[Algebra R₁ B]
{I : Ideal A}
(J : Ideal B)
(f : A →ₐ[R₁] B)
(H : I ≤ Ideal.comap f J)
{x : A}

(Ideal.quotientMapₐ J f H) ((Ideal.Quotient.mk I) x) = (Ideal.Quotient.mkₐ R₁ J) (f x)


theorem efixedPoint_isFixedPt' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
    (hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
    IsFixedPt f (efixedPoint' f hsc hsf hf x hxs hx)

(hf : ContractingWith K (Set.MapsTo.restrict f s s hsf))

Function.IsFixedPt f (ContractingWith.efixedPoint' f hsc hsf hf x hxs hx)


@[simp] lemma ofList_nil : (ofList [] : Ideal R) = ⊥


theorem derivWithin_arctan (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    derivWithin (fun x => arctan (f x)) s x = 1 / (1 + f x ^ 2) * derivWithin f s x

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

derivWithin (fun x => Real.arctan (f x)) s x = 1 / (1 + f x ^ 2) * derivWithin f s x


theorem forallLTEqZero_supp_BddBelow (f : Γ → R) (n : Γ) (hn : ∀(m : Γ), m < n → f m = 0) :
    BddBelow (Function.support f)

{Γ : Type u_1}
{R : Type u_2}
[Zero R]
[LinearOrder Γ]
(f : Γ → R)
(n : Γ)
(hn : ∀ m < n, f m = 0)


@[to_additive]
theorem colimitInvAux_eq_of_rel (x y : Σ j, F.obj j)
    (h : Types.FilteredColimit.Rel (F ⋙ forget Grp) x y) :
    colimitInvAux.{v, u} F x = colimitInvAux F y

(h : CategoryTheory.Limits.Types.FilteredColimit.Rel (F ⋙ CategoryTheory.forget Grp) x y)

Grp.FilteredColimits.colimitInvAux F x = Grp.FilteredColimits.colimitInvAux F y


@[simp]
theorem toFinsupp_sub {R : Type u} [Ring R] (a b : R[X]) :
    (a - b).toFinsupp = a.toFinsupp - b.toFinsupp


protected theorem congr_fun {f g : Equiv α β} (h : f = g) (x : α) : f x = g x

{α : Sort u}
{β : Sort v}
{f g : α ≃ β}
(h : f = g)
(x : α)


@[simp] theorem ofReal_one : ENNReal.ofReal (1 : ℝ) = (1 : ℝ≥0∞)


@[simp]
theorem coe_reparam (γ : Path x y) {f : I → I} (hfcont : Continuous f) (hf₀ : f 0 = 0)
    (hf₁ : f 1 = 1) : ⇑(γ.reparam f hfcont hf₀ hf₁) = γ ∘ f

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)
{f : ↑I → ↑I}
(hfcont : Continuous f)
(hf₀ : f 0 = 0)
(hf₁ : f 1 = 1)


@[simp]
lemma homologyMap_smul [S₁.HasHomology] [S₂.HasHomology] :
    homologyMap (a • φ) = a • homologyMap φ

{R : Type u_1}
{C : Type u_2}
[Semiring R]
[CategoryTheory.Category.{u_3, u_2} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Linear R C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ : S₁ ⟶ S₂)
(a : R)
[S₁.HasHomology]
[S₂.HasHomology]

CategoryTheory.ShortComplex.homologyMap (a • φ) = a • CategoryTheory.ShortComplex.homologyMap φ


/-- **Lebesgue dominated convergence theorem**: sufficient conditions under which almost
  everywhere convergence of a sequence of functions implies the convergence of their image by
  `condexpL1`. -/
theorem tendsto_condexpL1_of_dominated_convergence (hm : m ≤ m0) [SigmaFinite (μ.trim hm)]
    {fs : ℕ → α → F'} {f : α → F'} (bound_fs : α → ℝ)
    (hfs_meas : ∀ n, AEStronglyMeasurable (fs n) μ) (h_int_bound_fs : Integrable bound_fs μ)
    (hfs_bound : ∀ n, ∀ᵐ x ∂μ, ‖fs n x‖ ≤ bound_fs x)
    (hfs : ∀ᵐ x ∂μ, Tendsto (fun n => fs n x) atTop (𝓝 (f x))) :
    Tendsto (fun n => condexpL1 hm μ (fs n)) atTop (𝓝 (condexpL1 hm μ f))

(hfs_meas : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (fs n) μ)

(h_int_bound_fs : MeasureTheory.Integrable bound_fs μ)

(hfs_bound : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, ‖fs n x‖ ≤ bound_fs x)

(hfs : ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => fs n x) Filter.atTop (𝓝 (f x)))

Filter.Tendsto (fun n => MeasureTheory.condexpL1 hm μ (fs n)) Filter.atTop (𝓝 (MeasureTheory.condexpL1 hm μ f))


Polynomial.Chebyshev.U R 1 = 2 * Polynomial.X


theorem hasLimit_of_closedUnderLimits (h : ClosedUnderLimitsOfShape J P)
    (F : J ⥤ FullSubcategory P) [HasLimit (F ⋙ fullSubcategoryInclusion P)] : HasLimit F

(h : CategoryTheory.Limits.ClosedUnderLimitsOfShape J P)

(F : J ⥤ CategoryTheory.FullSubcategory P)

[CategoryTheory.Limits.HasLimit (F ⋙ CategoryTheory.fullSubcategoryInclusion P)]


theorem floor_le_one_of_le_one (h : a ≤ 1) : ⌊a⌋₊ ≤ 1

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
(h : a ≤ 1)


@[simp]
theorem quotTorsionOfEquivSpanSingleton_apply_mk (x : M) (a : R) :
    quotTorsionOfEquivSpanSingleton R M x (Submodule.Quotient.mk a) =
      a • ⟨x, Submodule.mem_span_singleton_self x⟩

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(x : M)
(a : R)

(Ideal.quotTorsionOfEquivSpanSingleton R M x) (Submodule.Quotient.mk a) = a • ⟨x, ⋯⟩


@[simp]
theorem conj_mul {a b c : α} : b * a * b⁻¹ * (b * c * b⁻¹) = b * (a * c) * b⁻¹


/-- An isomorphism (a.k.a. an invertible morphism) between two objects of a category.
The inverse morphism is bundled.

See also `CategoryTheory.Core` for the category with the same objects and isomorphisms playing
the role of morphisms.

See <https://stacks.math.columbia.edu/tag/0017>.
-/
structure Iso {C : Type u} [Category.{v} C] (X Y : C) where
  /-- The forward direction of an isomorphism. -/
  hom : X ⟶ Y
  /-- The backwards direction of an isomorphism. -/
  inv : Y ⟶ X
  /-- Composition of the two directions of an isomorphism is the identity on the source. -/
  hom_inv_id : hom ≫ inv = 𝟙 X := by aesop_cat
  /-- Composition of the two directions of an isomorphism in reverse order
  is the identity on the target. -/
  inv_hom_id : inv ≫ hom = 𝟙 Y := by aesop_cat

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

CategoryTheory.CategoryStruct.comp self.hom self.inv = CategoryTheory.CategoryStruct.id X


@[to_additive (attr := simp)]
theorem iterate_map_pow {M F : Type*} [Monoid M] [FunLike F M M] [MonoidHomClass F M M]
    (f : F) (n : ℕ) (x : M) (k : ℕ) :
    f^[n] (x ^ k) = f^[n] x ^ k

{M : Type u_5}
{F : Type u_6}
[Monoid M]
[FunLike F M M]
[MonoidHomClass F M M]
(f : F)
(n : ℕ)
(x : M)
(k : ℕ)


/--
An affine open cover of `X` consists of a family of open immersions into `X` from
spectra of rings.
-/
structure AffineOpenCover (X : Scheme.{u}) where
  /-- index set of an affine open cover of a scheme `X` -/
  J : Type v
  /-- the ring associated to a component of an affine open cover -/
  obj : J → CommRingCat.{u}
  /-- the embedding of subschemes to `X` -/
  map : ∀ j : J, Spec (obj j) ⟶ X
  /-- given a point of `x : X`, `f x` is the index of the subscheme which contains `x`  -/
  f : X → J
  /-- the subschemes covers `X` -/
  covers : ∀ x, x ∈ Set.range (map (f x)).1.base
  /-- the embedding of subschemes are open immersions -/
  IsOpen : ∀ x, IsOpenImmersion (map x) := by infer_instance

{X : AlgebraicGeometry.Scheme}
(self : X.AffineOpenCover)
(x : ↑↑X.toPresheafedSpace)

x ∈ Set.range ⇑(self.map (self.f x)).val.base


theorem colorable_of_chromaticNumber_ne_top (h : G.chromaticNumber ≠ ⊤) :
    G.Colorable (ENat.toNat G.chromaticNumber)

{V : Type u}
{G : SimpleGraph V}
(h : G.chromaticNumber ≠ ⊤)


@[simp]
theorem insert_sdiff_insert (s t : Finset α) (x : α) : insert x s \ insert x t = s \ insert x t

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


theorem contDiff_id' : ContDiff K n (fun x : E => x)

{K : Type u_1}
[NontriviallyNormedField K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
{n : ℕ∞}


lemma StableUnderBaseChange.mk (P : AffineTargetMorphismProperty) [P.toProperty.RespectsIso]
    (H : ∀ ⦃X Y S : Scheme⦄ [IsAffine S] [IsAffine X] (f : X ⟶ S) (g : Y ⟶ S),
      P g → P (pullback.fst f g)) : P.StableUnderBaseChange

(H :
  ∀ ⦃X Y S : AlgebraicGeometry.Scheme⦄ [inst : AlgebraicGeometry.IsAffine S] [inst_1 : AlgebraicGeometry.IsAffine X]
    (f : X ⟶ S) (g : Y ⟶ S), P g → P (CategoryTheory.Limits.pullback.fst f g))


theorem AECover.lintegral_tendsto_of_nat {φ : ℕ → Set α} (hφ : AECover μ atTop φ) {f : α → ℝ≥0∞}
    (hfm : AEMeasurable f μ) : Tendsto (∫⁻ x in φ ·, f x ∂μ) atTop (𝓝 <| ∫⁻ x, f x ∂μ)

(hφ : MeasureTheory.AECover μ Filter.atTop φ)

{f : α → ℝ≥0∞}

Filter.Tendsto (fun x => ∫⁻ (x : α) in φ x, f x ∂μ) Filter.atTop (𝓝 (∫⁻ (x : α), f x ∂μ))


lemma frequently_mem_iff_neBot {l : Filter α} {s : Set α} : (∃ᶠ x in l, x ∈ s) ↔ NeBot (l ⊓ 𝓟 s)

(∃ᶠ (x : α) in l, x ∈ s) ↔ (l ⊓ 𝓟 s).NeBot


nonrec theorem eq_zero_iff {x : PartENat} : x = 0 ↔ x ≤ 0


{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)


theorem eLpNormEssSup_le_nnreal_smul_eLpNormEssSup_of_ae_le_mul {f : α → F} {g : α → G} {c : ℝ≥0}
    (h : ∀ᵐ x ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊) : eLpNormEssSup f μ ≤ c • eLpNormEssSup g μ

(h : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ ≤ c * ‖g x‖₊)

MeasureTheory.eLpNormEssSup f μ ≤ c • MeasureTheory.eLpNormEssSup g μ


@[simp]
theorem bind_map (p : PMF α) (f : α → β) (q : β → PMF γ) : (p.map f).bind q = p.bind (q ∘ f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(p : PMF α)
(f : α → β)
(q : β → PMF γ)


theorem ConvexOn.comp (hg : ConvexOn 𝕜 (f '' s) g) (hf : ConvexOn 𝕜 s f)
    (hg' : MonotoneOn g (f '' s)) : ConvexOn 𝕜 s (g ∘ f)

{𝕜 : Type u_1}
{E : Type u_2}
{α : Type u_4}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 α]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}
{g : β → α}
(hg : ConvexOn 𝕜 (f '' s) g)
(hf : ConvexOn 𝕜 s f)
(hg' : MonotoneOn g (f '' s))


theorem Periodic.map_vadd_multiples [AddCommMonoid α] (hf : Periodic f c)
    (a : AddSubmonoid.multiples c) (x : α) : f (a +ᵥ x) = f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddCommMonoid α]
(hf : Function.Periodic f c)
(a : ↥(AddSubmonoid.multiples c))
(x : α)


/-- The ring equiv between the top element of `NonUnitalSubsemiring R` and `R`. -/
@[simps!]
def topEquiv : (⊤ : NonUnitalSubsemiring R) ≃+* R

{R : Type u}
[NonUnitalNonAssocSemiring R]
(x : R)

↑(NonUnitalSubsemiring.topEquiv.symm x) = x


lemma IsWeaklyRegular.isWeaklyRegular_rTensor [Module.Flat R M₂]
    {rs : List R} (h : IsWeaklyRegular M rs) :
    IsWeaklyRegular (M ⊗[R] M₂) rs

(h : RingTheory.Sequence.IsWeaklyRegular M rs)

RingTheory.Sequence.IsWeaklyRegular (TensorProduct R M M₂) rs


theorem norm_mod_lt (x : ℤ[i]) {y : ℤ[i]} (hy : y ≠ 0) : (x % y).norm < y.norm


theorem map_add_supp (a : R) {s : R} (h : s ∈ supp v) : v (a + s) = v a

{R : Type u_3}
{Γ₀ : Type u_4}
[LinearOrderedAddCommMonoidWithTop Γ₀]
[CommRing R]
(v : AddValuation R Γ₀)
(a : R)
{s : R}
(h : s ∈ v.supp)


@[measurability]
theorem measurable_re : Measurable (re : 𝕜 → ℝ)


theorem toSignedMeasure_sub_apply {μ ν : Measure α} [IsFiniteMeasure μ] [IsFiniteMeasure ν]
    {i : Set α} (hi : MeasurableSet i) :
    (μ.toSignedMeasure - ν.toSignedMeasure) i = (μ i).toReal - (ν i).toReal

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
[MeasureTheory.IsFiniteMeasure ν]
{i : Set α}
(hi : MeasurableSet i)

↑(μ.toSignedMeasure - ν.toSignedMeasure) i = (μ i).toReal - (ν i).toReal


/-- Assumes right covariance.
The lemma assuming left covariance is `Left.one_lt_mul_of_lt_of_le`. -/
@[to_additive Right.add_pos_of_pos_of_nonneg
"Assumes right covariance.
The lemma assuming left covariance is `Left.add_pos_of_pos_of_nonneg`."]
theorem Right.one_lt_mul_of_lt_of_le [CovariantClass α α (swap (· * ·)) (· < ·)] {a b : α}
    (ha : 1 < a) (hb : 1 ≤ b) :
    1 < a * b

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


theorem regularSpace_sInf {X} {T : Set (TopologicalSpace X)} (h : ∀ t ∈ T, @RegularSpace X t) :
    @RegularSpace X (sInf T)

{X : Type u_3}
{T : Set (TopologicalSpace X)}
(h : ∀ t ∈ T, RegularSpace X)


@[simp]
theorem coe_mem (x : p) : (x : B) ∈ p

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{p : A}
(x : ↥p)


lemma equicontinuous_restrict_iff (F : ι → X → α) {S : Set X} :
    Equicontinuous (S.restrict ∘ F) ↔ EquicontinuousOn F S

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
(F : ι → X → α)
{S : Set X}


theorem univ_pi_subset_univ_pi_iff :
    pi univ t₁ ⊆ pi univ t₂ ↔ (∀ i, t₁ i ⊆ t₂ i) ∨ ∃ i, t₁ i = ∅

{ι : Type u_1}
{α : ι → Type u_2}
{t₁ t₂ : (i : ι) → Set (α i)}

Set.univ.pi t₁ ⊆ Set.univ.pi t₂ ↔ (∀ (i : ι), t₁ i ⊆ t₂ i) ∨ ∃ i, t₁ i = ∅


theorem dense_of_mem_residual {s : Set X} (hs : s ∈ residual X) : Dense s

{X : Type u_1}
[TopologicalSpace X]
[BaireSpace X]
{s : Set X}
(hs : s ∈ residual X)


@[simp]
theorem cancel_right {g₁ g₂ f : CentroidHom α} (hf : Surjective f) :
    g₁.comp f = g₂.comp f ↔ g₁ = g₂

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
{g₁ g₂ f : CentroidHom α}
(hf : Function.Surjective ⇑f)


theorem sub_pf [Sub α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ - a₂ = b₁ - b₂

{α : Type u_1}
{a₁ a₂ b₁ b₂ : α}
[Sub α]
(p₁ : a₁ = b₁)
(p₂ : a₂ = b₂)


theorem bounded_lt_Ico [Preorder α] (a b : α) : Bounded (· < ·) (Ico a b)

Set.Bounded (fun x x_1 => x < x_1) (Set.Ico a b)


theorem sub_apply [∀ i, AddGroup (β i)] (g₁ g₂ : Π₀ i, β i) (i : ι) : (g₁ - g₂) i = g₁ i - g₂ i

{ι : Type u}
{β : ι → Type v}
[(i : ι) → AddGroup (β i)]
(g₁ g₂ : Π₀ (i : ι), β i)
(i : ι)


@[to_additive (attr := simp)] theorem MonoidHom.id_monCat_comp
    {G : Type u} [Monoid G] {H : MonCat.{u}} (f : G →* H) : MonoidHom.comp (𝟙 H) f = f

{G : Type u}
[Monoid G]
{H : MonCat}
(f : G →* ↑H)


theorem inter_eq_nil_iff_disjoint : l₁ ∩ l₂ = [] ↔ Disjoint l₁ l₂

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


theorem normSq_ne_zero (z : ℍ) : Complex.normSq (z : ℂ) ≠ 0


@[simp] lemma LinearMap.extendScalarsOfIsLocalization_apply' (f : M →ₗ[R] N) (x : M) :
    (f.extendScalarsOfIsLocalization S A) x = f x

{R : Type u_3}
[CommSemiring R]
(S : Submonoid R)
(A : Type u_4)
[CommSemiring A]
[Algebra R A]
[IsLocalization S A]
{M : Type u_5}
{N : Type u_6}
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[Module A N]
[IsScalarTower R A N]
(f : M →ₗ[R] N)
(x : M)

(LinearMap.extendScalarsOfIsLocalization S A f) x = f x


@[simp]
theorem symm_dual_id : sInfHom.dual.symm (sSupHom.id _) = sInfHom.id α

sInfHom.dual.symm (sSupHom.id αᵒᵈ) = sInfHom.id α


/-- If `K : HomologicalComplex C c'`, then `K.IsStrictlySupported e` holds for
an embedding `e : c.Embedding c'` of complex shapes if `K.X i'` is zero
wheneverm `i'` is not of the form `e.f i` for some `i`.-/
class IsStrictlySupported : Prop where
  isZero (i' : ι') (hi' : ∀ i, e.f i ≠ i') : IsZero (K.X i')


theorem ContDiffAt.cexp {n} (hf : ContDiffAt 𝕜 n f x) :
    ContDiffAt 𝕜 n (fun x => Complex.exp (f x)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 ℂ]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : E → ℂ}
{x : E}
{n : ℕ∞}
(hf : ContDiffAt 𝕜 n f x)


/-- The `MonoidWithZero` version of `div_eq_div_iff_mul_eq_mul`. -/
protected lemma div_eq_div_iff (hbd : Commute b d) (hb : b ≠ 0) (hd : d ≠ 0) :
    a / b = c / d ↔ a * d = c * b

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b c d : G₀}
(hbd : Commute b d)
(hb : b ≠ 0)
(hd : d ≠ 0)


theorem contDiffOn_succ_of_fderiv_apply [FiniteDimensional 𝕜 E] {n : ℕ} {f : E → F} {s : Set E}
    (hf : DifferentiableOn 𝕜 f s) (h : ∀ y, ContDiffOn 𝕜 n (fun x => fderivWithin 𝕜 f s x y) s) :
    ContDiffOn 𝕜 (n + 1 : ℕ) f s

(h : ∀ (y : E), ContDiffOn 𝕜 (↑n) (fun x => (fderivWithin 𝕜 f s x) y) s)


theorem strictAntiOn_log : StrictAntiOn log (Set.Iio 0)


theorem of_equiv [FormallySmooth R A] (e : A ≃ₐ[R] B) : FormallySmooth R B

{R : Type u}
[CommSemiring R]
{A B : Type u}
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[Algebra.FormallySmooth R A]
(e : A ≃ₐ[R] B)


protected theorem continuous : Continuous f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
{c : E}
(f : ContDiffBump c)


@[simp]
theorem map_snoc : map f (xs.snoc x) = (map f xs).snoc (f x)

{α : Type u_2}
{n : ℕ}
(xs : Mathlib.Vector α n)

∀ {α_1 : Type u_1} {f : α → α_1} {x : α}, Mathlib.Vector.map f (xs.snoc x) = (Mathlib.Vector.map f xs).snoc (f x)


theorem min_le {a : α} {s : Finset α} (as : a ∈ s) : s.min ≤ a

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


theorem iUnion_biUnion_partition (h : ∀ J ∈ π, (πi J).IsPartition) :
    (π.biUnion πi).iUnion = π.iUnion

{πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J}


/-- Shows the correctness of `compExactValue` in case the continued fraction
`GenContFract.of v` did not terminate at position `n`. That is, we obtain the
value `v` if we pass the two successive (auxiliary) continuants at positions `n` and `n + 1` as well
as the fractional part at `IntFractPair.stream n` to `compExactValue`.

The correctness might be seen more readily if one uses `convs'` to evaluate the continued
fraction. Here is an example to illustrate the idea:

Let `(v : ℚ) := 3.4`. We have
- `GenContFract.IntFractPair.stream v 0 = some ⟨3, 0.4⟩`, and
- `GenContFract.IntFractPair.stream v 1 = some ⟨2, 0.5⟩`.
Now `(GenContFract.of v).convs' 1 = 3 + 1/2`, and our fractional term at position `2` is `0.5`.
We hence have `v = 3 + 1/(2 + 0.5) = 3 + 1/2.5 = 3.4`.
This computation corresponds exactly to the one using the recurrence equation in `compExactValue`.
-/
theorem compExactValue_correctness_of_stream_eq_some :
    ∀ {ifp_n : IntFractPair K}, IntFractPair.stream v n = some ifp_n →
      v = compExactValue ((of v).contsAux n) ((of v).contsAux <| n + 1) ifp_n.fr

{K : Type u_1}
[LinearOrderedField K]
{v : K}
{n : ℕ}
[FloorRing K]
{ifp_n : GenContFract.IntFractPair K}

GenContFract.IntFractPair.stream v n = some ifp_n →
  v = GenContFract.compExactValue ((GenContFract.of v).contsAux n) ((GenContFract.of v).contsAux (n + 1)) ifp_n.fr


@[to_additive]
theorem pow_lt_one_iff {x : M} {n : ℕ} (hn : n ≠ 0) : x ^ n < 1 ↔ x < 1

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


theorem condexp_bot_ae_eq (f : α → F') :
    μ[f|⊥] =ᵐ[μ] fun _ => (μ Set.univ).toReal⁻¹ • ∫ x, f x ∂μ

{α : Type u_1}
{F' : Type u_3}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → F')

μ[f|⊥] =ᵐ[μ] fun x => (μ Set.univ).toReal⁻¹ • ∫ (x : α), f x ∂μ


@[simp]
theorem preimage_const_mul_Ico (a b : α) {c : α} (h : 0 < c) :
    (c * ·) ⁻¹' Ico a b = Ico (a / c) (b / c)

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

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


theorem Disjoint.extendDomain {p : β → Prop} [DecidablePred p] (f : α ≃ Subtype p)
    {σ τ : Perm α} (h : Disjoint σ τ) : Disjoint (σ.extendDomain f) (τ.extendDomain f)

{α : Type u}
{β : Type v}
{p : β → Prop}
[DecidablePred p]
(f : α ≃ Subtype p)
{σ τ : Equiv.Perm α}
(h : σ.Disjoint τ)

(σ.extendDomain f).Disjoint (τ.extendDomain f)


theorem nonempty_algHom_of_splits : Nonempty (E →ₐ[F] K)

(hK' : ∀ (s : E), IsIntegral F s ∧ Polynomial.Splits (algebraMap F K) (minpoly F s))


theorem sinh_sub_id_strictMono : StrictMono fun x => sinh x - x


theorem derivative_pow (p : R[X]) (n : ℕ) :
    derivative (p ^ n) = C (n : R) * p ^ (n - 1) * derivative p

{R : Type u}
[CommSemiring R]
(p : R[X])
(n : ℕ)

Polynomial.derivative (p ^ n) = Polynomial.C ↑n * p ^ (n - 1) * Polynomial.derivative p


@[simp]
theorem setOf_eq_eq_singleton' {a : α} : { x | a = x } = {a}


/-- If `n` is a squarefree natural number, then `-1` is a square modulo `n` if and only if
`n` is not divisible by a prime `q` such that `q % 4 = 3`. -/
theorem ZMod.isSquare_neg_one_iff {n : ℕ} (hn : Squarefree n) :
    IsSquare (-1 : ZMod n) ↔ ∀ {q : ℕ}, q.Prime → q ∣ n → q % 4 ≠ 3

IsSquare (-1) ↔ ∀ {q : ℕ}, Nat.Prime q → q ∣ n → q % 4 ≠ 3


theorem nmul_nadd : ∀ a b c, a ⨳ (b ♯ c) = a ⨳ b ♯ a ⨳ c


@[simp]
theorem disjoint_val : s.1.Disjoint t.1 ↔ Disjoint s t


theorem coe_ennreal_strictMono : StrictMono ((↑) : ℝ≥0∞ → EReal)


@[simp]
theorem opNorm_mul : ‖mul 𝕜 𝕜'‖ = 1

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
(𝕜' : Type u_3)
[NonUnitalNormedRing 𝕜']
[NormedSpace 𝕜 𝕜']
[IsScalarTower 𝕜 𝕜' 𝕜']
[SMulCommClass 𝕜 𝕜' 𝕜']
[RegularNormedAlgebra 𝕜 𝕜']
[Nontrivial 𝕜']


/-- In a locally convex space, if `s`, `t` are disjoint convex sets, `s` is compact and `t` is
closed, then we can find open disjoint convex sets containing them. -/
theorem Disjoint.exists_open_convexes [LocallyConvexSpace 𝕜 E] {s t : Set E} (disj : Disjoint s t)
    (hs₁ : Convex 𝕜 s) (hs₂ : IsCompact s) (ht₁ : Convex 𝕜 t) (ht₂ : IsClosed t) :
    ∃ u v, IsOpen u ∧ IsOpen v ∧ Convex 𝕜 u ∧ Convex 𝕜 v ∧ s ⊆ u ∧ t ⊆ v ∧ Disjoint u v

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[LocallyConvexSpace 𝕜 E]
{s t : Set E}
(disj : Disjoint s t)
(hs₁ : Convex 𝕜 s)
(hs₂ : IsCompact s)
(ht₁ : Convex 𝕜 t)
(ht₂ : IsClosed t)


@[simp]
theorem iccHomeoI_apply_coe (a b : 𝕜) (h : a < b) (x : Set.Icc a b) :
    ((iccHomeoI a b h) x : 𝕜) = (x - a) / (b - a)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[TopologicalRing 𝕜]
(a b : 𝕜)
(h : a < b)
(x : ↑(Set.Icc a b))

↑((iccHomeoI a b h) x) = (↑x - a) / (b - a)


theorem monotone_iff_Icc [LinearOrderedAddCommGroup G] [Archimedean G] [OrderedAddCommGroup H]
    [AddConstMapClass F G H a b] {f : F} (ha : 0 < a) (l : G) :
    Monotone f ↔ MonotoneOn f (Icc l (l + a))

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{a : G}
{b : H}
[LinearOrderedAddCommGroup G]
[Archimedean G]
[OrderedAddCommGroup H]
[AddConstMapClass F G H a b]
{f : F}
(ha : 0 < a)
(l : G)

Monotone ⇑f ↔ MonotoneOn (⇑f) (Set.Icc l (l + a))


theorem IsDetecting.mono {𝒢 : Set C} (h𝒢 : IsDetecting 𝒢) {ℋ : Set C} (h𝒢ℋ : 𝒢 ⊆ ℋ) :
    IsDetecting ℋ

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{𝒢 : Set C}
(h𝒢 : CategoryTheory.IsDetecting 𝒢)
{ℋ : Set C}
(h𝒢ℋ : 𝒢 ⊆ ℋ)


@[to_additive (attr := simp)] lemma mul_inv_cancel_comm_assoc (a b : G) : a * (b * a⁻¹) = b

{G : Type u_1}
[AddCommGroup G]
(a b : G)


theorem Functor.isZero (F : C ⥤ D) (hF : ∀ X, IsZero (F.obj X)) : IsZero F

(hF : ∀ (X : C), CategoryTheory.Limits.IsZero (F.obj X))


theorem isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x


theorem Set.Finite.measurableSet {s : Set α} (hs : s.Finite) : MeasurableSet s

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSingletonClass α]
{s : Set α}
(hs : s.Finite)


@[simp]
theorem prodMonoidal_leftUnitor_hom_snd (X : C₁ × C₂) :
    ((λ_ X).hom : 𝟙_ _ ⊗ X ⟶ X).2 = (λ_ X.2).hom

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

(CategoryTheory.MonoidalCategory.leftUnitor X).hom.2 = (CategoryTheory.MonoidalCategory.leftUnitor X.2).hom


protected theorem IsPrefix.eraseIdx {l l' : List α} (h : l <+: l') (k : Nat) :
    eraseIdx l k <+: eraseIdx l' k

{α : Type u}
{l l' : List α}
(h : l <+: l')
(k : Nat)


theorem loop_eq {v : V} (p : G.Path v v) : p = Path.nil

{V : Type u}
{G : SimpleGraph V}
{v : V}
(p : G.Path v v)


theorem NNReal.tendsto_inverse_atTop_nhds_zero_nat :
    Tendsto (fun n : ℕ ↦ (n : ℝ≥0)⁻¹) atTop (𝓝 0)

Filter.Tendsto (fun n => (↑n)⁻¹) Filter.atTop (𝓝 0)


theorem disjoint_iff_coe_toSubmodule :
    Disjoint N N' ↔ Disjoint (N : Submodule R M) (N' : Submodule R M)

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


/-- Reinterpret `G ≃* H` as `Additive G ≃+ Additive H`. -/
@[simps]
def MulEquiv.toAdditive [MulOneClass G] [MulOneClass H] :
    G ≃* H ≃ (Additive G ≃+ Additive H)

{G : Type u_1}
{H : Type u_2}
[MulOneClass G]
[MulOneClass H]
(f : Additive G ≃+ Additive H)
(a : H)

(MulEquiv.toAdditive.symm f).symm a = (MonoidHom.toAdditive.symm f.symm.toAddMonoidHom) a


@[simp]
theorem symmDiff_symmDiff_cancel_left : a ∆ (a ∆ b) = b

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


theorem equivPair_symm (i) (p : Pair M i) : (equivPair i).symm p = rcons p

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
[(i : ι) → DecidableEq (M i)]
[DecidableEq ι]
(i : ι)
(p : Monoid.CoprodI.Word.Pair M i)

(Monoid.CoprodI.Word.equivPair i).symm p = Monoid.CoprodI.Word.rcons p


theorem strictConcaveOn_sqrt_mul_log_Ioi :
    StrictConcaveOn ℝ (Set.Ioi 1) fun x => √x * log x

StrictConcaveOn ℝ (Set.Ioi 1) fun x => √x * Real.log x


/-- If `β` is a first-countable space, then its induced topology via `f` on `α` is also
first-countable. -/
theorem firstCountableTopology_induced (α β : Type*) [t : TopologicalSpace β]
    [FirstCountableTopology β] (f : α → β) : @FirstCountableTopology α (t.induced f)

(α : Type u_1)
(β : Type u_2)
[t : TopologicalSpace β]
[FirstCountableTopology β]
(f : α → β)


/-- Assumes left covariance.
The lemma assuming right covariance is `Right.one_lt_mul_of_lt_of_le`. -/
@[to_additive Left.add_pos_of_pos_of_nonneg
      "Assumes left covariance.
      The lemma assuming right covariance is `Right.add_pos_of_pos_of_nonneg`."]
theorem Left.one_lt_mul_of_lt_of_le [CovariantClass α α (· * ·) (· ≤ ·)] {a b : α} (ha : 1 < a)
    (hb : 1 ≤ b) :
    1 < a * b

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


theorem insert_erase_subset (a : α) (s : Finset α) : s ⊆ insert a (erase s a)

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


theorem coeff_iterate_derivative {k} (p : R[X]) (m : ℕ) :
    (derivative^[k] p).coeff m = (m + k).descFactorial k • p.coeff (m + k)

{R : Type u}
[Semiring R]
{k : ℕ}
(p : R[X])
(m : ℕ)

((⇑Polynomial.derivative)^[k] p).coeff m = (m + k).descFactorial k • p.coeff (m + k)


@[to_additive]
theorem prod_mem_multiset [DecidableEq α] (m : Multiset α) (f : { x // x ∈ m } → β) (g : α → β)
    (hfg : ∀ x, f x = g x) : ∏ x : { x // x ∈ m }, f x = ∏ x ∈ m.toFinset, g x

(hfg : ∀ (x : { x // x ∈ m }), f x = g ↑x)

∑ x : { x // x ∈ m }, f x = ∑ x ∈ m.toFinset, g x


@[simp]
theorem eval₂_zero : (0 : MvPolynomial σ R).eval₂ f g = 0

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


theorem DifferentiableWithinAt.arsinh (h : DifferentiableWithinAt ℝ f s a) :
    DifferentiableWithinAt ℝ (fun x => arsinh (f x)) s a

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{a : E}
(h : DifferentiableWithinAt ℝ f s a)

DifferentiableWithinAt ℝ (fun x => Real.arsinh (f x)) s a


theorem isGLB_sInf (s : Set (WithTop α)) : IsGLB s (sInf s)

{α : Type u_1}
[ConditionallyCompleteLinearOrderBot α]
(s : Set (WithTop α))


theorem isUnit_iff_norm_isUnit {d : ℤ} (z : ℤ√d) : IsUnit z ↔ IsUnit z.norm


/-- This lemma doesn't require `H` to be impartial. -/
theorem equiv_iff_add_equiv_zero' (H : PGame) : (G ≈ H) ↔ (G + H ≈ 0)

(G : SetTheory.PGame)
[G.Impartial]
(H : SetTheory.PGame)


@[simp] theorem toNat_sub {n} (x y : BitVec n) :
    (x - y).toNat = (((2^n - y.toNat) + x.toNat) % 2^n)

(x - y).toNat = (2 ^ n - y.toNat + x.toNat) % 2 ^ n


@[simp]
theorem seq_destruct_think (s : WSeq α) : Seq.destruct (think s) = some (none, s)

Stream'.Seq.destruct s.think = some (none, s)


@[simp]
theorem toSigmaCofork_π : K.toSigmaCofork.π = Sigma.desc K.π

{I : CategoryTheory.Limits.MultispanIndex C}

(K : CategoryTheory.Limits.Multicofork I)

K.toSigmaCofork.π = CategoryTheory.Limits.Sigma.desc K.π


@[continuity]
theorem continuous_projIcc : Continuous (projIcc a b h)

{α : Type u_1}
[LinearOrder α]
{a b : α}
{h : a ≤ b}
[TopologicalSpace α]
[OrderTopology α]


theorem IsIntegral.multiset_sum {s : Multiset A} (h : ∀ x ∈ s, IsIntegral R x) :
    IsIntegral R s.sum

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
{s : Multiset A}
(h : ∀ x ∈ s, IsIntegral R x)


@[simp] lemma top_mul_top : (⊤ : EReal) * ⊤ = ⊤


theorem swap_apply_eq_iff {x y z w : α} : swap x y z = w ↔ z = swap x y w

{α : Sort u_1}
[DecidableEq α]
{x y z w : α}

(Equiv.swap x y) z = w ↔ z = (Equiv.swap x y) w


@[simp]
theorem pullback_obj_arrow (f : X ⟶ Y) (g : MonoOver Y) :
    ((pullback f).obj g).arrow = pullback.snd _ _

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

((CategoryTheory.MonoOver.pullback f).obj g).arrow =
  CategoryTheory.Limits.pullback.snd ((CategoryTheory.MonoOver.forget Y).obj g).hom f


theorem Measurable.comp_aemeasurable [MeasurableSpace δ] {f : α → δ} {g : δ → β} (hg : Measurable g)
    (hf : AEMeasurable f μ) : AEMeasurable (g ∘ f) μ

{α : Type u_1}
{β : Type u_2}
{δ : Type u_4}
{m : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
[MeasurableSpace δ]
{f : α → δ}
{g : δ → β}
(hg : Measurable g)
(hf : AEMeasurable f μ)


theorem prev : ∀ {it}, ValidFor (c :: l) r it → ValidFor l (c :: r) it.prev

{c : Char}
{l r : List Char}
{it : String.Iterator}

String.Iterator.ValidFor (c :: l) r it → String.Iterator.ValidFor l (c :: r) it.prev


lemma disjoint_iSup_genEigenspace [NoZeroSMulDivisors R M]
    (f : End R M) {μ₁ μ₂ : R} (hμ : μ₁ ≠ μ₂) :
    Disjoint (⨆ k, f.genEigenspace μ₁ k) (⨆ 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)
{μ₁ μ₂ : R}
(hμ : μ₁ ≠ μ₂)

Disjoint (⨆ k, (f.genEigenspace μ₁) k) (⨆ k, (f.genEigenspace μ₂) k)


theorem Basis.algebraMapCoeffs_apply (i : ι) : b.algebraMapCoeffs A h i = b i

(h : Function.Bijective ⇑(algebraMap R A))


theorem monoCoprod_of_preservesCoprod_of_reflectsMono [MonoCoprod D]
    [PreservesColimitsOfShape (Discrete WalkingPair) F]
    [ReflectsMonomorphisms F] : MonoCoprod C

[CategoryTheory.Limits.PreservesColimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) F]


@[simp]
theorem partiallyWellOrderedOn_singleton (a : α) : PartiallyWellOrderedOn {a} r

{α : Type u_2}
{r : α → α → Prop}
[IsRefl α r]
(a : α)


/-- Independence is the negation of dependence. -/
theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent 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 ↔ ¬Projectivization.Dependent f


theorem isBoundedUnder_le_abs [LinearOrderedAddCommGroup α] {f : Filter β} {u : β → α} :
    (f.IsBoundedUnder (· ≤ ·) fun a => |u a|) ↔
      f.IsBoundedUnder (· ≤ ·) u ∧ f.IsBoundedUnder (· ≥ ·) u

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

(Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f fun a => |u a|) ↔
  Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u ∧ Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u


/-- The tangent of an angle in a right-angled triangle as a ratio of sides, version subtracting
vectors. -/
theorem tan_angle_sub_of_inner_eq_zero {x y : V} (h : ⟪x, y⟫ = 0) :
    Real.tan (angle x (x - y)) = ‖y‖ / ‖x‖

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

Real.tan (InnerProductGeometry.angle x (x - y)) = ‖y‖ / ‖x‖


@[simp] theorem headI_nil [Inhabited α] : ([] : List α).headI = default


theorem mul_le_of_mul_le_of_nonneg_left [PosMulMono α] (h : a * b ≤ c) (hle : d ≤ b) (a0 : 0 ≤ a) :
    a * d ≤ c

{α : Type u_1}
{a b c d : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : a * b ≤ c)
(hle : d ≤ b)
(a0 : 0 ≤ a)


/-- The canonical isomorphism `S.cycles ≅ kernel S.g`. -/
@[simps]
noncomputable def cyclesIsoKernel [HasKernel S.g] : S.cycles ≅ kernel S.g

S.cyclesIsoKernel.hom = CategoryTheory.Limits.kernel.lift S.g S.iCycles ⋯


theorem ball_smul (p : Seminorm 𝕜 E) {c : NNReal} (hc : 0 < c) (r : ℝ) (x : E) :
    (c • p).ball x r = p.ball x (r / c)

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(p : Seminorm 𝕜 E)
{c : ℝ≥0}
(hc : 0 < c)
(r : ℝ)
(x : E)


/-- The functor which sends a bicomplex to its total complex. -/
@[simps]
noncomputable def totalFunctor :
    HomologicalComplex₂ C c₁ c₂ ⥤ HomologicalComplex C c₁₂

[∀ (K : HomologicalComplex₂ C c₁ c₂), K.HasTotal c₁₂]

∀ {X Y : HomologicalComplex₂ C c₁ c₂} (φ : X ⟶ Y),
  (HomologicalComplex₂.totalFunctor C c₁ c₂ c₁₂).map φ = HomologicalComplex₂.total.map φ c₁₂


theorem adjoint_eq_toCLM_adjoint (A : E →ₗ[𝕜] F) :
    haveI := FiniteDimensional.complete 𝕜 E
    haveI := FiniteDimensional.complete 𝕜 F
    LinearMap.adjoint A = ContinuousLinearMap.adjoint (LinearMap.toContinuousLinearMap A)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[FiniteDimensional 𝕜 E]
[FiniteDimensional 𝕜 F]
(A : E →ₗ[𝕜] F)

LinearMap.adjoint A = ↑(ContinuousLinearMap.adjoint (LinearMap.toContinuousLinearMap A))


theorem subOneIntegralPowerBasis'_gen_prime [IsCyclotomicExtension {p} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑p) :
    Prime hζ.subOneIntegralPowerBasis'.gen

{p : ℕ+}
{K : Type u}
[Field K]
[CharZero K]
{ζ : K}
[hp : Fact (Nat.Prime ↑p)]
[IsCyclotomicExtension {p} ℚ K]
(hζ : IsPrimitiveRoot ζ ↑p)


theorem sub_add_cancel_of_le [IsFiniteMeasure ν] (h₁ : ν ≤ μ) : μ - ν + ν = μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure ν]
(h₁ : ν ≤ μ)

μ - ν + ν = μ


@[to_additive (attr := simp)]
theorem toTopologicalSpace_iInf {ι} (s : ι → GroupTopology α) :
    (⨅ i, s i).toTopologicalSpace = ⨅ i, (s i).toTopologicalSpace

{α : Type u}
[AddGroup α]
{ι : Sort u_1}
(s : ι → AddGroupTopology α)


/-- If a set `t` is covered by a countable family of finite measure sets, then its measurable
superset `toMeasurable μ t` (which has the same measure as `t`) satisfies,
for any measurable set `s`, the equality `μ (toMeasurable μ t ∩ s) = μ (t ∩ s)`. -/
theorem measure_toMeasurable_inter_of_cover {s : Set α} (hs : MeasurableSet s) {t : Set α}
    {v : ℕ → Set α} (hv : t ⊆ ⋃ n, v n) (h'v : ∀ n, μ (t ∩ v n) ≠ ∞) :
    μ (toMeasurable μ t ∩ s) = μ (t ∩ s)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : MeasurableSet s)
{t : Set α}
{v : ℕ → Set α}
(hv : t ⊆ ⋃ n, v n)
(h'v : ∀ (n : ℕ), μ (t ∩ v n) ≠ ⊤)

μ (MeasureTheory.toMeasurable μ t ∩ s) = μ (t ∩ s)


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

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

Relation.ReflTransGen (Function.swap r) a b


theorem mem_rec_on {C : WSeq α → Prop} {a s} (M : a ∈ s) (h1 : ∀ b s', a = b ∨ C s' → C (cons b s'))
    (h2 : ∀ s, C s → C (think s)) : C s

(h1 : ∀ (b : α) (s' : Stream'.WSeq α), a = b ∨ C s' → C (Stream'.WSeq.cons b s'))

(h2 : ∀ (s : Stream'.WSeq α), C s → C s.think)


theorem le_dimH_of_hausdorffMeasure_eq_top {s : Set X} {d : ℝ≥0} (h : μH[d] s = ∞) :
    ↑d ≤ dimH s

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{s : Set X}
{d : ℝ≥0}
(h : μH[↑d] s = ⊤)


theorem compl_not_mem {f : Filter α} {s : Set α} [NeBot f] (h : s ∈ f) : sᶜ ∉ f

{α : Type u}
{f : Filter α}
{s : Set α}
[f.NeBot]
(h : s ∈ f)


theorem locallyConvexSpace_iff_zero : LocallyConvexSpace 𝕜 E ↔
    (𝓝 0 : Filter E).HasBasis (fun s : Set E => s ∈ (𝓝 0 : Filter E) ∧ Convex 𝕜 s) id

(𝕜 : Type u_1)
(E : Type u_2)
[OrderedSemiring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]

LocallyConvexSpace 𝕜 E ↔ (𝓝 0).HasBasis (fun s => s ∈ 𝓝 0 ∧ Convex 𝕜 s) id


theorem support_map_of_injective (p : MvPolynomial σ R) {f : R →+* S₁} (hf : Injective f) :
    (map f p).support = p.support

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(p : MvPolynomial σ R)
{f : R →+* S₁}
(hf : Function.Injective ⇑f)

((MvPolynomial.map f) p).support = p.support


lemma toMvPolynomial_isHomogeneous (f : M₁ →ₗ[R] M₂) (i : ι₂) :
    (f.toMvPolynomial b₁ b₂ i).IsHomogeneous 1

{R : Type u_1}
{M₁ : Type u_2}
{M₂ : Type u_3}
{ι₁ : Type u_4}
{ι₂ : Type u_5}
[CommRing R]
[AddCommGroup M₁]
[AddCommGroup M₂]
[Module R M₁]
[Module R M₂]
[Fintype ι₁]
[Finite ι₂]
[DecidableEq ι₁]
(b₁ : Basis ι₁ R M₁)
(b₂ : Basis ι₂ R M₂)
(f : M₁ →ₗ[R] M₂)
(i : ι₂)

(LinearMap.toMvPolynomial b₁ b₂ f i).IsHomogeneous 1


theorem shiftLeft_eq_mul_pow : ∀ (m : ℤ) (n : ℕ), m <<< (n : ℤ) = m * (2 ^ n : ℕ)


theorem hasPDF_iff {X : Ω → E} {ℙ : Measure Ω} {μ : Measure E} :
    HasPDF X ℙ μ ↔ AEMeasurable X ℙ ∧ (map X ℙ).HaveLebesgueDecomposition μ ∧ map X ℙ ≪ μ

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]

∀ {x : MeasurableSpace Ω} {X : Ω → E} {ℙ : MeasureTheory.Measure Ω} {μ : MeasureTheory.Measure E},
  MeasureTheory.HasPDF X ℙ μ ↔
    AEMeasurable X ℙ ∧ (MeasureTheory.Measure.map X ℙ).HaveLebesgueDecomposition μ ∧ MeasureTheory.Measure.map X ℙ ≪ μ


@[deprecated mem_iff_get (since := "2023-01-05")]
theorem mem_iff_nthLe {a} {l : List α} : a ∈ l ↔ ∃ n h, nthLe l n h = a


/-- Aposteriori estimates on the convergence of iterates to the fixed point. -/
theorem aposteriori_dist_iterate_fixedPoint_le (x n) :
    dist (f^[n] x) (fixedPoint f hf) ≤ dist (f^[n] x) (f^[n + 1] x) / (1 - K)

{α : Type u_1}
[MetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
[Nonempty α]
[CompleteSpace α]
(x : α)
(n : ℕ)

dist (f^[n] x) (ContractingWith.fixedPoint f hf) ≤ dist (f^[n] x) (f^[n + 1] x) / (1 - ↑K)


/-- Auxiliary definition for `HomologicalComplex₂.flipEquivalence`. -/
@[simps!]
def flipEquivalenceUnitIso :
    𝟭 (HomologicalComplex₂ C c₁ c₂) ≅ flipFunctor C c₁ c₂ ⋙ flipFunctor C c₂ c₁

∀ (i_1 : I₂), (((HomologicalComplex₂.flipEquivalenceUnitIso C c₁ c₂).inv.app X).f i).f i_1 = 𝟙 ((X.X i).X i_1)


lemma Continuous.preimage_coborder_subset (hf : Continuous f) (s : Set Y) :
    f ⁻¹' (coborder s) ⊆ coborder (f ⁻¹' s)

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


protected theorem Disjoint.sdiff_unique (hd : Disjoint x z) (hz : z ≤ y) (hs : y ≤ x ⊔ z) :
    y \ x = z

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]
(hd : Disjoint x z)
(hz : z ≤ y)
(hs : y ≤ x ⊔ z)


theorem monotone_iff_map_nonneg [iamhc : AddMonoidHomClass F α β] :
    Monotone (f : α → β) ↔ ∀ a, 0 ≤ a → 0 ≤ f a

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[OrderedAddCommMonoid β]
[i : FunLike F α β]
(f : F)
[iamhc : AddMonoidHomClass F α β]

Monotone ⇑f ↔ ∀ (a : α), 0 ≤ a → 0 ≤ f a


theorem linearIndependent_fin_succ {n} {v : Fin (n + 1) → V} :
    LinearIndependent K v ↔
      LinearIndependent K (Fin.tail v) ∧ v 0 ∉ Submodule.span K (range <| Fin.tail v)

{K : Type u_3}
{V : Type u}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{n : ℕ}
{v : Fin (n + 1) → V}

LinearIndependent K v ↔ LinearIndependent K (Fin.tail v) ∧ v 0 ∉ Submodule.span K (Set.range (Fin.tail v))


lemma coe_mono : Monotone (Finsupp.toFun : (ι →₀ α) → ι → α)

{ι : Type u_1}
{α : Type u_2}
[Zero α]
[Preorder α]


@[simp]
theorem mem_union (x : α) (a b : Set α) : x ∈ a ∪ b ↔ x ∈ a ∨ x ∈ b


@[simp]
theorem power_one {a : Cardinal.{u}} : a ^ (1 : Cardinal) = a


theorem nodup_replicate (a : α) : ∀ {n : ℕ}, Nodup (replicate n a) ↔ n ≤ 1


/-- If `f` is proper and converges to `y` along some ultrafilter `𝒰`, then `𝒰` converges to some
`x` such that `f x = y`. -/
lemma IsProperMap.ultrafilter_le_nhds_of_tendsto (h : IsProperMap f) ⦃𝒰 : Ultrafilter X⦄ ⦃y : Y⦄
    (hy : Tendsto f 𝒰 (𝓝 y)) : ∃ x, f x = y ∧ 𝒰 ≤ 𝓝 x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(h : IsProperMap f)
⦃𝒰 : Ultrafilter X⦄
⦃y : Y⦄
(hy : Filter.Tendsto f (↑𝒰) (𝓝 y))


theorem eqId_iff_mono : A.EqId ↔ Mono A.e

(A : SimplicialObject.Splitting.IndexSet Δ)


theorem matiyasevic {a k x y} :
    (∃ a1 : 1 < a, xn a1 k = x ∧ yn a1 k = y) ↔
      1 < a ∧ k ≤ y ∧ (x = 1 ∧ y = 0 ∨
        ∃ u v s t b : ℕ,
          x * x - (a * a - 1) * y * y = 1 ∧ u * u - (a * a - 1) * v * v = 1 ∧
          s * s - (b * b - 1) * t * t = 1 ∧ 1 < b ∧ b ≡ 1 [MOD 4 * y] ∧
          b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y])

(∃ (a1 : 1 < a), Pell.xn a1 k = x ∧ Pell.yn a1 k = y) ↔
  1 < a ∧
    k ≤ y ∧
      (x = 1 ∧ y = 0 ∨
        ∃ u v s t b,
          x * x - (a * a - 1) * y * y = 1 ∧
            u * u - (a * a - 1) * v * v = 1 ∧
              s * s - (b * b - 1) * t * t = 1 ∧
                1 < b ∧ b ≡ 1 [MOD 4 * y] ∧ b ≡ a [MOD u] ∧ 0 < v ∧ y * y ∣ v ∧ s ≡ x [MOD u] ∧ t ≡ k [MOD 4 * y])


/-- Typeclass for faithful actions. -/
class FaithfulVAdd (G : Type*) (P : Type*) [VAdd G P] : Prop where
  /-- Two elements `g₁` and `g₂` are equal whenever they act in the same way on all points. -/
  eq_of_vadd_eq_vadd : ∀ {g₁ g₂ : G}, (∀ p : P, g₁ +ᵥ p = g₂ +ᵥ p) → g₁ = g₂

{G : Type u_11}
{P : Type u_12}
[VAdd G P]
[self : FaithfulVAdd G P]
{g₁ g₂ : G}

(∀ (p : P), g₁ +ᵥ p = g₂ +ᵥ p) → g₁ = g₂


theorem admissible_E'5 : Admissible (E' 5)


theorem RelIso.cof_le_lift {α : Type u} {β : Type v} {r : α → α → Prop} {s} [IsRefl β s]
    (f : r ≃r s) : Cardinal.lift.{max u v} (Order.cof r) ≤
    Cardinal.lift.{max u v} (Order.cof s)

{α : Type u}
{β : Type v}
{r : α → α → Prop}
{s : β → β → Prop}
[IsRefl β s]
(f : r ≃r s)

Cardinal.lift.{max u v, u} (Order.cof r) ≤ Cardinal.lift.{max u v, v} (Order.cof s)


/-- Consider two actions `f₁ f₂ : G →* CircleDeg1Lift` of a group on the real line by lifts of
orientation preserving circle homeomorphisms. Suppose that for each `g : G` the homeomorphisms
`f₁ g` and `f₂ g` have equal rotation numbers. Then there exists `F : CircleDeg1Lift` such that
`F * f₁ g = f₂ g * F` for all `g : G`.

This is a version of Proposition 5.4 from [Étienne Ghys, Groupes d'homeomorphismes du cercle et
cohomologie bornee][ghys87:groupes]. -/
theorem semiconj_of_group_action_of_forall_translationNumber_eq {G : Type*} [Group G]
    (f₁ f₂ : G →* CircleDeg1Lift) (h : ∀ g, τ (f₁ g) = τ (f₂ g)) :
    ∃ F : CircleDeg1Lift, ∀ g, Semiconj F (f₁ g) (f₂ g)

(h : ∀ (g : G), (f₁ g).translationNumber = (f₂ g).translationNumber)

∃ F, ∀ (g : G), Function.Semiconj ⇑F ⇑(f₁ g) ⇑(f₂ g)


theorem prod_eq_prod_iff :
    s ×ˢ t = s₁ ×ˢ t₁ ↔ s = s₁ ∧ t = t₁ ∨ (s = ∅ ∨ t = ∅) ∧ (s₁ = ∅ ∨ t₁ = ∅)

{α : Type u_1}
{β : Type u_2}
{s s₁ : Set α}
{t t₁ : Set β}


@[to_additive]
theorem union_div_inter_subset_union : (s₁ ∪ s₂) / (t₁ ∩ t₂) ⊆ s₁ / t₁ ∪ s₂ / t₂

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


protected theorem LinearMap.derivWithin (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin e s x = e 1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
{s : Set 𝕜}
(e : 𝕜 →ₗ[𝕜] F)
(hxs : UniqueDiffWithinAt 𝕜 s x)


lemma tendsto_rpow_atBot_of_base_gt_one (b : ℝ) (hb : 1 < b) :
    Tendsto (b ^ · : ℝ → ℝ) atBot (𝓝 0)

Filter.Tendsto (fun x => b ^ x) Filter.atBot (𝓝 0)


/-- If an initial object `I` exists in a CCC, then `A ⨯ I ≅ I`. -/
@[simps]
def zeroMul {I : C} (t : IsInitial I) : A ⨯ I ≅ I

(CategoryTheory.zeroMul t).inv = t.to (A ⨯ I)


@[simp]
theorem centralizer_univ : centralizer R Set.univ = center R A

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]

NonUnitalSubalgebra.centralizer R Set.univ = NonUnitalSubalgebra.center R A


@[simp] lemma zero_ne_one [One α] [NeZero (1 : α)] : (0 : α) ≠ 1

{α : Type u_2}
[Zero α]
[One α]
[NeZero 1]


/-- Given an open cover on `X`, we may pull them back along a morphism `f : W ⟶ X` to obtain
an open cover of `W`. This is similar to `Scheme.OpenCover.pullbackCover`, but here we
take `pullback (𝒰.map x) f` instead of `pullback f (𝒰.map x)`. -/
@[simps]
def OpenCover.pullbackCover' {X W : Scheme.{u}} (𝒰 : X.OpenCover) (f : W ⟶ X) :
    W.OpenCover

{X W : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(f : W ⟶ X)
(x : 𝒰.J)

(𝒰.pullbackCover' f).obj x = CategoryTheory.Limits.pullback (𝒰.map x) f


/-- If `χ` is a multiplicative character with `χ^n = 1` and `μ` is a primitive `n`th root
of unity, then, for `a ≠ 0`, there is some `k` such that `χ a = μ^k`. -/
lemma exists_apply_eq_pow {χ : MulChar F R} {n : ℕ} (hn : n ≠ 0) (hχ : χ ^ n = 1) {μ : R}
    (hμ : IsPrimitiveRoot μ n) {a : F} (ha : a ≠ 0) :
    ∃ k < n, χ a = μ ^ k

{F : Type u_1}
[Field F]
[Finite F]
{R : Type u_2}
[CommRing R]
[IsDomain R]
{χ : MulChar F R}
{n : ℕ}
(hn : n ≠ 0)
(hχ : χ ^ n = 1)
{μ : R}
(hμ : IsPrimitiveRoot μ n)
{a : F}
(ha : a ≠ 0)


theorem hasStrictDerivAt_log {x : ℂ} (h : x ∈ slitPlane) : HasStrictDerivAt log x⁻¹ x


@[to_additive of_add_neg]
theorem IsSubgroup.of_div (s : Set G) (one_mem : (1 : G) ∈ s)
    (div_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a * b⁻¹ ∈ s) : IsSubgroup s

(div_mem : ∀ {a b : G}, a ∈ s → b ∈ s → a + -b ∈ s)


theorem Set.Finite.isCompact_biUnion {s : Set ι} {f : ι → Set X} (hs : s.Finite)
    (hf : ∀ i ∈ s, IsCompact (f i)) : IsCompact (⋃ i ∈ s, f i)

{X : Type u}
{ι : Type u_1}
[TopologicalSpace X]
{s : Set ι}
{f : ι → Set X}
(hs : s.Finite)
(hf : ∀ i ∈ s, IsCompact (f i))


/-- If `M` and `N` are linearly disjoint, if `N` is flat, then for any family of
`R`-linearly independent elements `{ m_i }` of `M`, and any family of
`R`-linearly independent elements `{ n_j }` of `N`, the family `{ m_i * n_j }` in `S` is
also `R`-linearly independent. -/
theorem linearIndependent_mul_of_flat_right (H : M.LinearDisjoint N) [Module.Flat R N]
    {κ ι : Type*} {m : κ → M} {n : ι → N} (hm : LinearIndependent R m)
    (hn : LinearIndependent R n) : LinearIndependent R fun (i : κ × ι) ↦ (m i.1).1 * (n i.2).1

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
[Algebra R S]
{M N : Submodule R S}
(H : M.LinearDisjoint N)
[Module.Flat R ↥N]
{κ : Type u_1}
{ι : Type u_2}
{m : κ → ↥M}
{n : ι → ↥N}
(hm : LinearIndependent R m)
(hn : LinearIndependent R n)

LinearIndependent R fun i => ↑(m i.1) * ↑(n i.2)


theorem eraseLead_degree_le : (eraseLead f).degree ≤ f.degree


lemma polyCharpoly_eq_of_basis [DecidableEq ιM] (bₘ : Basis ιM R M) :
    polyCharpoly φ b =
    (charpoly.univ R ιM).map (MvPolynomial.bind₁ (φ.toMvPolynomial b bₘ.end))

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{ι : Type u_5}
{ιM : Type u_7}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Fintype ι]
[Fintype ιM]
[DecidableEq ι]
[Module.Free R M]
[Module.Finite R M]
(b : Basis ι R L)
[DecidableEq ιM]
(bₘ : Basis ιM R M)

φ.polyCharpoly b =
  Polynomial.map (↑(MvPolynomial.bind₁ (LinearMap.toMvPolynomial b bₘ.end φ))) (Matrix.charpoly.univ R ιM)


@[simp] lemma subsingleton_Icc_iff {α : Type*} [LinearOrder α] {a b : α} :
    Set.Subsingleton (Icc a b) ↔ b ≤ a

{α : Type u_3}
[LinearOrder α]
{a b : α}


@[to_additive (attr := simp)]
theorem lift_of (x : α) : lift f (of x) = f x

{α : Type u}
{β : Type v}
[Semigroup β]
(f : α → β)
(x : α)

(FreeSemigroup.lift f) (FreeSemigroup.of x) = f x


theorem isCodetector_unop_iff (G : Cᵒᵖ) : IsCodetector (unop G) ↔ IsDetector G

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

CategoryTheory.IsCodetector (Opposite.unop G) ↔ CategoryTheory.IsDetector G


theorem adjoin_eq_top_of_gen_mem_adjoin {B : PowerBasis R S} {x : S}
    (hx : B.gen ∈ adjoin R ({x} : Set S)) : adjoin R ({x} : Set S) = ⊤

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
{B : PowerBasis R S}
{x : S}
(hx : B.gen ∈ Algebra.adjoin R {x})


/-- When the first map `S.f` is zero, this is the right homology data on `S` given by
the chosen `kernel S.g` -/
@[simps!]
noncomputable def ofHasKernel [HasKernel S.g] (hf : S.f = 0) : S.RightHomologyData

(CategoryTheory.ShortComplex.RightHomologyData.ofHasKernel S hf).ι = CategoryTheory.Limits.kernel.ι S.g


theorem num_denom_neg (x : RatFunc K) : (-x).num * x.denom = -x.num * (-x).denom


/-- Alias of `Nat.cast_inj` specialized to `PartENat` --/
theorem natCast_inj {x y : ℕ} : (x : PartENat) = y ↔ x = y


@[simp]
theorem diagramIso_inv_app_right (i : D.J) :
    (D.diagramIso F).inv.app (WalkingMultispan.right i) = 𝟙 _

[H : (i j k : D.J) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan (D.f i j) (D.f i k)) F]

(D.diagramIso F).inv.app (CategoryTheory.Limits.WalkingMultispan.right i) =
  CategoryTheory.CategoryStruct.id
    ((D.mapGlueData F).diagram.multispan.obj (CategoryTheory.Limits.WalkingMultispan.right i))


@[simp]
theorem multiset_prod_span_singleton (m : Multiset R) :
    (m.map fun x => Ideal.span {x}).prod = Ideal.span ({Multiset.prod m} : Set R)

{R : Type u}
[CommSemiring R]
(m : Multiset R)

(Multiset.map (fun x => Ideal.span {x}) m).prod = Ideal.span {m.prod}


protected theorem tendsto_inv_nat_nhds_zero : Tendsto (fun n : ℕ => (n : ℝ≥0∞)⁻¹) atTop (𝓝 0)

Filter.Tendsto (fun n => (↑n)⁻¹) Filter.atTop (𝓝 0)


@[simp]
theorem monic_one : Monic (1 : R[X])


@[to_additive exists_nhds_zero_half]
theorem exists_nhds_one_split {s : Set M} (hs : s ∈ 𝓝 (1 : M)) :
    ∃ V ∈ 𝓝 (1 : M), ∀ v ∈ V, ∀ w ∈ V, v * w ∈ s

{M : Type u_3}
[TopologicalSpace M]
[AddZeroClass M]
[ContinuousAdd M]
{s : Set M}
(hs : s ∈ 𝓝 0)


lemma disjoint_ker_weight_corootSpace (α : Weight K H L) :
    Disjoint α.ker (corootSpace α)

{K : Type u_2}
{L : Type u_3}
[LieRing L]
[Field K]
[LieAlgebra K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
[LieAlgebra.IsKilling K L]
[CharZero K]
(α : LieModule.Weight K (↥H) L)

Disjoint LieModule.Weight.ker (lieIdealSubalgebra K (↥H) (LieAlgebra.corootSpace ⇑α)).toSubmodule


lemma smul_min_of_nonneg [PosSMulMono α β] (ha : 0 ≤ a) (b₁ b₂ : β) :
    a • min b₁ b₂ = min (a • b₁) (a • b₂)

{α : Type u_1}
{β : Type u_2}
{a : α}
[SMul α β]
[Preorder α]
[LinearOrder β]
[Zero α]
[PosSMulMono α β]
(ha : 0 ≤ a)
(b₁ b₂ : β)


@[simp]
theorem nim_add_equiv_zero_iff (o₁ o₂ : Ordinal) : (nim o₁ + nim o₂ ≈ 0) ↔ o₁ = o₂

SetTheory.PGame.nim o₁ + SetTheory.PGame.nim o₂ ≈ 0 ↔ o₁ = o₂


theorem rightDual_leftDual_le_of_le {J J' : Set α} (h : J' ∈ R.leftFixedPoints) (h₁ : J ≤ J') :
    R.rightDual (R.leftDual J) ≤ J'

{α : Type u_1}
{β : Type u_2}
(R : Rel α β)
{J J' : Set α}
(h : J' ∈ R.leftFixedPoints)
(h₁ : J ≤ J')


@[simp]
theorem toOrderAddMonoidHom_eq_coe (f : α →+*o β) : f.toOrderAddMonoidHom = f

{α : Type u_2}
{β : Type u_3}
[NonAssocSemiring α]
[Preorder α]
[NonAssocSemiring β]
[Preorder β]
(f : α →+*o β)


@[simp]
theorem apply_hfdifferential {f : C^∞⟮I, M; I', M'⟯} {x : M} {y : M'} (h : f x = y)
    (v : PointDerivation I x) (g : C^∞⟮I', M'; 𝕜⟯) : 𝒅ₕ h v g = 𝒅 f x v g

{𝕜 : 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 : C^⊤⟮I, M; I', M'⟯}
{x : M}
{y : M'}
(h : f x = y)
(v : PointDerivation I x)
(g : C^⊤⟮I', M'; 𝓘(𝕜, 𝕜), 𝕜⟯)


theorem fst_comp_prodComm :
    (LinearMap.fst R M₂ M).comp (prodComm R M M₂).toLinearMap = (LinearMap.snd R M M₂)

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

LinearMap.fst R M₂ M ∘ₗ ↑(LinearEquiv.prodComm R M M₂) = LinearMap.snd R M M₂


@[norm_cast] lemma natCast_pred_of_pos {n : ℕ} (h : 0 < n) : ((n - 1 : ℕ) : ℤ) = (n : ℤ) - 1


@[to_additive (attr := simp)]
theorem snd_toProd (x : M ∗ N) : (toProd x).2 = snd x

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

(AddMonoid.Coprod.toSum x).2 = AddMonoid.Coprod.snd x


@[ext]
theorem hom_ext {F₁ F₂ : FreeNonUnitalNonAssocAlgebra R X →ₙₐ[R] A}
    (h : ∀ x, F₁ (of R x) = F₂ (of R x)) : F₁ = F₂

(h : ∀ (x : X), F₁ (FreeNonUnitalNonAssocAlgebra.of R x) = F₂ (FreeNonUnitalNonAssocAlgebra.of R x))


@[simp] theorem log_eq_bot_iff {x : ℝ≥0∞} : log x = ⊥ ↔ x = 0


/-- If `M` and `M₂` are both `R`-semimodules and `S`-semimodules and `R`-semimodule structures
are defined by an action of `R` on `S` (formally, we have two scalar towers), then any `S`-linear
equivalence from `M` to `M₂` is also an `R`-linear equivalence.

See also `LinearMap.restrictScalars`. -/
@[simps]
def restrictScalars (f : M ≃ₗ[S] M₂) : M ≃ₗ[R] M₂

(R : Type u_1)
{S : Type u_7}
{M : Type u_8}
{M₂ : Type u_10}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Module S M]
[Module S M₂]
[LinearMap.CompatibleSMul M M₂ R S]
(f : M ≃ₗ[S] M₂)
(a : M₂)

(LinearEquiv.restrictScalars R f).symm a = f.symm a


/-- An angle in a right-angled triangle expressed using `arcsin`. -/
theorem oangle_add_right_eq_arcsin_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    o.oangle x (x + y) = Real.arcsin (‖y‖ / ‖x + y‖)

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

o.oangle x (x + y) = ↑(Real.arcsin (‖y‖ / ‖x + y‖))


@[simp, elementwise]
theorem piIsoPi_inv_kernel_ι (i : ι) :
    (piIsoPi Z).inv ≫ Pi.π Z i = (LinearMap.proj i : (∀ i : ι, Z i) →ₗ[R] Z i)

{R : Type u}
[Ring R]
{ι : Type v}
(Z : ι → ModuleCatMax R)
[CategoryTheory.Limits.HasProduct Z]
(i : ι)

(ModuleCat.piIsoPi Z).inv ≫ CategoryTheory.Limits.Pi.π Z i = LinearMap.proj i


/-- The coercion from `Set.monad` as an instance is equal to the coercion in `Data.Set.Notation`. -/
theorem coe_eq_image_val (t : Set s) :
    @Lean.Internal.coeM Set s α _ Set.monad t = (t : Set α)


@[simp]
theorem LieModule.isNilpotent_of_top_iff :
    IsNilpotent R (⊤ : LieSubalgebra R L) M ↔ IsNilpotent R L M

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]

LieModule.IsNilpotent R (↥⊤) M ↔ LieModule.IsNilpotent R L M


@[simp, norm_cast]
theorem continuous'_coe : ∀ {f : α →o β}, Continuous' f ↔ Continuous f

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
{f : α →o β}

OmegaCompletePartialOrder.Continuous' ⇑f ↔ OmegaCompletePartialOrder.Continuous f


/-- `MonoidHom` version of `autMap`. -/
@[simps!]
noncomputable def autMapHom {A B : C} [IsConnected A] [IsGalois B] (f : A ⟶ B) :
     Aut A →* Aut B

(CategoryTheory.PreGaloisCategory.autMapHom f) σ = CategoryTheory.PreGaloisCategory.autMap f σ


/-- The union of all bounded set is the whole space. -/
theorem isVonNBounded_covers : ⋃₀ setOf (IsVonNBounded 𝕜) = (Set.univ : Set E)

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]

⋃₀ setOf (Bornology.IsVonNBounded 𝕜) = Set.univ


/-- In a group of exponent two, every element is its own inverse. -/
@[to_additive]
lemma inv_eq_self_of_exponent_two (hG : Monoid.exponent G = 2) (x : G) :
    x⁻¹ = x

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


theorem Set.Finite.isLindelof_biUnion {s : Set ι} {f : ι → Set X} (hs : s.Finite)
    (hf : ∀ i ∈ s, IsLindelof (f i)) : IsLindelof (⋃ i ∈ s, f i)

{X : Type u}
{ι : Type u_1}
[TopologicalSpace X]
{s : Set ι}
{f : ι → Set X}
(hs : s.Finite)
(hf : ∀ i ∈ s, IsLindelof (f i))


@[simp]
theorem inf_N : (F ⊓ F').N = F.N ⊓ F'.N

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
(F F' : I.Filtration M)


theorem range_cons_cons_empty (x y : α) (u : Fin 0 → α) :
    Set.range (vecCons x <| vecCons y u) = {x, y}

Set.range (Matrix.vecCons x (Matrix.vecCons y u)) = {x, y}


{S : Type u_5}
[OrderedSemiring S]
{R : Type u_6}
[Semiring R]
(abv : R → S)
[IsAbsoluteValue abv]


lemma odd_abs [LinearOrder α] [Ring α] {a : α} : Odd (abs a) ↔ Odd a

{α : Type u_1}
[LinearOrder α]
[Ring α]
{a : α}


@[simp] lemma compCLM_apply {g : D → E} (hg : g.HasTemperateGrowth)
    (hg_upper : ∃ (k : ℕ) (C : ℝ), ∀ x, ‖x‖ ≤ C * (1 + ‖g x‖) ^ k) (f : 𝓢(E, F)) :
    compCLM 𝕜 hg hg_upper f = f ∘ g

(hg_upper : ∃ k C, ∀ (x : D), ‖x‖ ≤ C * (1 + ‖g x‖) ^ k)

⇑((SchwartzMap.compCLM 𝕜 hg hg_upper) f) = ⇑f ∘ g


@[simp]
theorem coe_fn_toEquiv (f : r ≃r s) : (f.toEquiv : α → β) = f

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≃r s)


@[to_additive]
theorem mulSupport_extend_one_subset {f : α → M'} {g : α → N} :
    mulSupport (f.extend g 1) ⊆ f '' mulSupport g

{α : Type u_1}
{M' : Type u_6}
{N : Type u_7}
[One N]
{f : α → M'}
{g : α → N}

Function.mulSupport (Function.extend f g 1) ⊆ f '' Function.mulSupport g


@[simp]
theorem isTop_iff_eq_top : IsTop a ↔ a = ⊤

{α : Type u}
[PartialOrder α]
[OrderTop α]
{a : α}


@[simp]
theorem eval₂_add : (p + q).eval₂ f g = p.eval₂ f g + q.eval₂ f g

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

MvPolynomial.eval₂ f g (p + q) = MvPolynomial.eval₂ f g p + MvPolynomial.eval₂ f g q


theorem Ico_succ_right_eq_insert (h : a ≤ b) : Ico a (succ b) = insert b (Ico a b)

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

Set.Ico a (Order.succ b) = insert b (Set.Ico a b)


/-- This could be used in conjunction with `CategoryTheory.NatIso.isIso_of_isIso_app`. -/
theorem isIso_of_components (f : X ⟶ Y) [IsIso f.base] [IsIso f.c] : IsIso f

{X Y : AlgebraicGeometry.PresheafedSpace C}


theorem fractional_div_of_nonzero {I J : FractionalIdeal R₁⁰ K} (h : J ≠ 0) :
    IsFractional R₁⁰ (I / J : Submodule R₁ K)

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[frac : IsFractionRing R₁ K]
[IsDomain R₁]
{I J : FractionalIdeal R₁⁰ K}
(h : J ≠ 0)


/-- The pushforward of an open cover along an isomorphism. -/
@[simps! J obj map]
def OpenCover.pushforwardIso {X Y : Scheme.{u}} (𝒰 : OpenCover.{v} X) (f : X ⟶ Y) [IsIso f] :
    OpenCover.{v} Y

{X Y : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(f : X ⟶ Y)
[CategoryTheory.IsIso f]

∀ (x : 𝒰.J), (𝒰.pushforwardIso f).obj x = 𝒰.obj x


theorem sdiff_sdiff_left' (s t u : Finset α) : (s \ t) \ u = s \ t ∩ (s \ u)

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


@[to_additive (attr := simp)]
theorem toWord_one : (1 : FreeGroup α).toWord = []


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the left side and `g` on the right side. -/
@[simps!]
def fromArrowArrowFunctor : Arrow (Arrow C) ⥤ Square C

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

∀ {X Y : CategoryTheory.Arrow (CategoryTheory.Arrow C)} (φ : X ⟶ Y),
  (CategoryTheory.Square.fromArrowArrowFunctor.map φ).τ₂ = φ.right.left


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

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
{a b : α}

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


theorem ord_proj_dvd_ord_proj_of_dvd {a b : ℕ} (hb0 : b ≠ 0) (hab : a ∣ b) (p : ℕ) :
    ord_proj[p] a ∣ ord_proj[p] b

p ^ a.factorization p ∣ p ^ b.factorization p


theorem lmarginal_update_of_not_mem {i : δ}
    {f : (∀ i, π i) → ℝ≥0∞} (hf : Measurable f) (hi : i ∉ s) (x : ∀ i, π i) (y : π i) :
    (∫⋯∫⁻_s, f ∂μ) (Function.update x i y) = (∫⋯∫⁻_s, f ∘ (Function.update · i y) ∂μ) x

{μ : (i : δ) → MeasureTheory.Measure (π i)}

[∀ (i : δ), MeasureTheory.SigmaFinite (μ i)]

(∫⋯∫⁻_s, f ∂μ) (Function.update x i y) = (∫⋯∫⁻_s, f ∘ fun x => Function.update x i y ∂μ) x


@[to_additive]
theorem quotientMap_mk_symm : QuotientMap (@mk M).symm


@[simp]
theorem ihom_obj : (ihom V).obj W = FGModuleCat.of K (V →ₗ[K] W)

(K : Type u)
[Field K]
(V W : FGModuleCat K)

(CategoryTheory.ihom V).obj W = FGModuleCat.of K (↑V →ₗ[K] ↑W)


@[simp]
theorem coe_toComplL : ⇑(toComplL : E →L[𝕜] Completion E) = ((↑) : E → Completion E)

{𝕜 : Type u_1}
{E : Type u_2}
[NormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]


lemma isCompl_comap_subtype_of_isCompl_of_le {p q r : Submodule R M}
    (h₁ : IsCompl q r) (h₂ : q ≤ p) :
    IsCompl (q.comap p.subtype) (r.comap p.subtype)

{R : Type u_1}
{M : Type u_4}
[Ring R]
[AddCommGroup M]
[Module R M]
{p q r : Submodule R M}
(h₁ : IsCompl q r)
(h₂ : q ≤ p)

IsCompl (Submodule.comap p.subtype q) (Submodule.comap p.subtype r)


/-- The composition operator (in the target) with a Lipschitz map is continuous. -/
theorem continuous_comp {G : β → γ} {C : ℝ≥0} (H : LipschitzWith C G) :
    Continuous (comp G H : (α →ᵇ β) → α →ᵇ γ)

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[PseudoMetricSpace β]
[PseudoMetricSpace γ]
{G : β → γ}
{C : ℝ≥0}
(H : LipschitzWith C G)

Continuous (BoundedContinuousFunction.comp G H)


/-- The unique `RingHom` from `ℤ√d` to a ring `R`, constructed by replacing `√d` with the provided
root. Conversely, this associates to every mapping `ℤ√d →+* R` a value of `√d` in `R`. -/
@[simps]
def lift {d : ℤ} : { r : R // r * r = ↑d } ≃ (ℤ√d →+* R)

{R : Type}
[CommRing R]
{d : ℤ}
(f : ℤ√d →+* R)


@[simp] theorem bnot_isRight (x : α ⊕ β) : !x.isRight = x.isLeft

{α : Type u_1}
{β : Type u_2}
(x : α ⊕ β)


@[simp]
theorem image_openSegment (f : E →ᵃ[𝕜] F) (a b : E) :
    f '' openSegment 𝕜 a b = openSegment 𝕜 (f a) (f b)

(𝕜 : Type u_1)
{E : Type u_2}
{F : Type u_3}
[OrderedRing 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
(f : E →ᵃ[𝕜] F)
(a b : E)

⇑f '' openSegment 𝕜 a b = openSegment 𝕜 (f a) (f b)


/-- Spaces that are both Noetherian and Hausdorff are finite. -/
theorem NoetherianSpace.finite [NoetherianSpace α] [T2Space α] : Finite α

{α : Type u_1}
[TopologicalSpace α]
[TopologicalSpace.NoetherianSpace α]
[T2Space α]


theorem filter_pos_add_filter_neg [AddZeroClass M] (f : α →₀ M) (p : α → Prop) [DecidablePred p] :
    (f.filter p + f.filter fun a => ¬p a) = f

{α : Type u_1}
{M : Type u_5}
[AddZeroClass M]
(f : α →₀ M)
(p : α → Prop)
[DecidablePred p]

Finsupp.filter p f + Finsupp.filter (fun a => ¬p a) f = f


@[elementwise (attr := simp)]
theorem binaryProductIso_hom_comp_fst (X Y : Type u) :
    (binaryProductIso X Y).hom ≫ _root_.Prod.fst = Limits.prod.fst

(CategoryTheory.Limits.Types.binaryProductIso X Y).hom ≫ Prod.fst = CategoryTheory.Limits.prod.fst


theorem isBounded_image_iff {f : β → α} {s : Set β} :
    IsBounded (f '' s) ↔ ∃ C, ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ C

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
{f : β → α}
{s : Set β}

Bornology.IsBounded (f '' s) ↔ ∃ C, ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ C


/-- Transport a monoidal structure along an equivalence of (plain) categories.
-/
@[simps]
def transportStruct (e : C ≌ D) : MonoidalCategoryStruct.{v₂} D

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

ρ_ X =
  e.functor.mapIso
      ((CategoryTheory.Iso.refl (e.inverse.obj X) ⊗ (e.unitIso.app (𝟙_ C)).symm) ≪≫ ρ_ (e.inverse.obj X)) ≪≫
    e.counitIso.app X


theorem int_mul (h : Irrational x) {m : ℤ} (hm : m ≠ 0) : Irrational (m * x)

{x : ℝ}
(h : Irrational x)
{m : ℤ}
(hm : m ≠ 0)


/-- A map to the vertex of a cone induces a cone by composition. -/
@[simps]
def extend (c : Cone F) {X : C} (f : X ⟶ c.pt) : Cone F

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

(c.extend f).π = c.extensions.app (Opposite.op X) { down := f }


theorem hasSum_one_div_nat_pow_mul_cos {k : ℕ} (hk : k ≠ 0) {x : ℝ} (hx : x ∈ Icc (0 : ℝ) 1) :
    HasSum (fun n : ℕ => 1 / (n : ℝ) ^ (2 * k) * Real.cos (2 * π * n * x))
      ((-1 : ℝ) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / (2 * k)! *
        (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))).eval x)

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

HasSum (fun n => 1 / ↑n ^ (2 * k) * Real.cos (2 * π * ↑n * x))
  ((-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / ↑(2 * k)! *
    Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k))))


@[simp] theorem up_le [LE α] {a b : α} : up a ≤ up b ↔ a ≤ b


@[simp]
theorem eval_natCast_mul {n : ℕ} : ((n : R[X]) * p).eval x = n * p.eval x

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

Polynomial.eval x (↑n * p) = ↑n * Polynomial.eval x p


@[simp] lemma op_pow (x : α) (n : ℕ) : op (x ^ n) = op x ^ n

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

MulOpposite.op (x ^ n) = MulOpposite.op x ^ n


/-- Composition of kernels is associative. -/
theorem comp_assoc {δ : Type*} {mδ : MeasurableSpace δ} (ξ : Kernel γ δ) [IsSFiniteKernel ξ]
    (η : Kernel β γ) (κ : Kernel α β) : ξ ∘ₖ η ∘ₖ κ = ξ ∘ₖ (η ∘ₖ κ)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{mγ : MeasurableSpace γ}
{δ : Type u_5}
{mδ : MeasurableSpace δ}
(ξ : ProbabilityTheory.Kernel γ δ)
[ProbabilityTheory.IsSFiniteKernel ξ]
(η : ProbabilityTheory.Kernel β γ)
(κ : ProbabilityTheory.Kernel α β)


lemma Localization.essSurj_mapArrow_of_hasRightCalculusOfFractions :
    L.mapArrow.EssSurj

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[W.HasRightCalculusOfFractions]


theorem toSubalgebra_injective :
    Function.Injective (toSubalgebra : StarSubalgebra R A → Subalgebra R A)

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]


/-- If the `affineSpan` of a finite subset of an affinely independent
family lies in an affine subspace whose direction has dimension one
less than its cardinality, it equals that subspace. -/
theorem AffineIndependent.affineSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one
    [DecidableEq P] {p : ι → P}
    (hi : AffineIndependent k p) {s : Finset ι} {sp : AffineSubspace k P}
    [FiniteDimensional k sp.direction] (hle : affineSpan k (s.image p : Set P) ≤ sp)
    (hc : Finset.card s = finrank k sp.direction + 1) : affineSpan k (s.image p : Set P) = sp

(hle : affineSpan k ↑(Finset.image p s) ≤ sp)

(hc : s.card = FiniteDimensional.finrank k ↥sp.direction + 1)


@[to_additive (attr := simp)]
theorem centralizer_eq_top_iff_subset {s : Set M} : centralizer s = ⊤ ↔ s ⊆ center M

{M : Type u_1}
[AddSemigroup M]
{s : Set M}

AddSubsemigroup.centralizer s = ⊤ ↔ s ⊆ ↑(AddSubsemigroup.center M)


@[simp]
theorem setToSimpleFunc_zero_apply {m : MeasurableSpace α} (T : Set α → F →L[ℝ] F') :
    setToSimpleFunc T (0 : α →ₛ F) = 0

{α : Type u_1}
{F : Type u_3}
{F' : Type u_4}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedAddCommGroup F']
[NormedSpace ℝ F']
{m : MeasurableSpace α}
(T : Set α → F →L[ℝ] F')

MeasureTheory.SimpleFunc.setToSimpleFunc T 0 = 0


theorem fromBlocks_neg [Neg R] (A : Matrix n l R) (B : Matrix n m R) (C : Matrix o l R)
    (D : Matrix o m R) : -fromBlocks A B C D = fromBlocks (-A) (-B) (-C) (-D)

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{R : Type u_10}
[Neg R]
(A : Matrix n l R)
(B : Matrix n m R)
(C : Matrix o l R)
(D : Matrix o m R)

-Matrix.fromBlocks A B C D = Matrix.fromBlocks (-A) (-B) (-C) (-D)


theorem IsGreatest.isGreatest_image2_of_isLeast (ha : IsGreatest s a) (hb : IsLeast t b) :
    IsGreatest (Set.image2 f s t) (f a b)

{f : α → β → γ}

(h₀ : ∀ (b : β), Monotone (Function.swap f b))


/-- If `M / R` and `M' / R'` are modules, `i : R → R'` is a bijective map which maps zero to zero,
`j : M ≃+ M'` is a group isomorphism, such that the scalar multiplications on `M` and `M'` are
compatible, then the rank of `M / R` is equal to the rank of `M' / R'`.
As a special case, taking `R = R'` it is `LinearEquiv.lift_rank_eq`. -/
theorem lift_rank_eq_of_equiv_equiv (i : ZeroHom R R') (j : M ≃+ M')
    (hi : Bijective i) (hc : ∀ (r : R) (m : M), j (r • m) = i r • j m) :
    lift.{v'} (Module.rank R M) = lift.{v} (Module.rank R' M')

Cardinal.lift.{v', v} (Module.rank R M) = Cardinal.lift.{v, v'} (Module.rank R' M')


lemma two_le_iff_one_lt {c : Cardinal} : 2 ≤ c ↔ 1 < c


@[to_additive]
theorem mulIndicator_mul_eq_right {f g : α → M} (h : Disjoint (mulSupport f) (mulSupport g)) :
    (mulSupport g).mulIndicator (f * g) = g

(h : Disjoint (Function.mulSupport f) (Function.mulSupport g))

(Function.mulSupport g).mulIndicator (f * g) = g


/-- **Minkowski inequality**: the `L_p` seminorm of the sum of two vectors is less than or equal
to the sum of the `L_p`-seminorms of the summands. A version for `NNReal`-valued functions. -/
theorem Lp_add_le (f g : ι → ℝ≥0) {p : ℝ} (hp : 1 ≤ p) :
    (∑ i ∈ s, (f i + g i) ^ p) ^ (1 / p) ≤
      (∑ i ∈ s, f i ^ p) ^ (1 / p) + (∑ i ∈ s, g i ^ p) ^ (1 / p)

{ι : Type u}
(s : Finset ι)
(f g : ι → ℝ≥0)
{p : ℝ}
(hp : 1 ≤ p)


/-- The equivalence between the quaternions over `R` and `R × R × R × R`. -/
@[simps!]
def Quaternion.equivProd (R : Type*) [One R] [Neg R] : ℍ[R] ≃ R × R × R × R

(R : Type u_1)
[One R]
[Neg R]
(a : R × R × R × R)

((Quaternion.equivProd R).symm a).imK = a.2.2.2


@[simp]
theorem invOfUnit_eq' (φ : MvPowerSeries σ k) (u : Units k) (h : constantCoeff σ k φ = u) :
    invOfUnit φ u = φ⁻¹

(h : (MvPowerSeries.constantCoeff σ k) φ = ↑u)


theorem get_equiv {c₁ c₂ : Computation α} (h : c₁ ~ c₂) [Terminates c₁] [Terminates c₂] :
    get c₁ = get c₂


theorem normalizedFactors_multiset_prod (s : Multiset α) (hs : 0 ∉ s) :
    normalizedFactors (s.prod) = (s.map normalizedFactors).sum

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
[UniqueFactorizationMonoid α]
(s : Multiset α)
(hs : 0 ∉ s)

UniqueFactorizationMonoid.normalizedFactors s.prod = (Multiset.map UniqueFactorizationMonoid.normalizedFactors s).sum


theorem Matrix.represents_iff' {A : Matrix ι ι R} {f : Module.End R M} :
    A.Represents b f ↔ ∀ j, ∑ i : ι, A i j • b i = f (b j)

{ι : Type u_1}
[Fintype ι]
{M : Type u_2}
[AddCommGroup M]
{R : Type u_3}
[CommRing R]
[Module R M]
{b : ι → M}
[DecidableEq ι]
{A : Matrix ι ι R}
{f : Module.End R M}

Matrix.Represents b A f ↔ ∀ (j : ι), ∑ i : ι, A i j • b i = f (b j)


@[simp]
lemma single₀ObjXSelf (X : V) :
    HomologicalComplex.singleObjXSelf (ComplexShape.down ℕ) 0 X = Iso.refl _

HomologicalComplex.singleObjXSelf (ComplexShape.down ℕ) 0 X =
  CategoryTheory.Iso.refl (((HomologicalComplex.single V (ComplexShape.down ℕ) 0).obj X).X 0)


/-- We can turn any colimit cocone over a pair into a bicone. -/
@[simps]
def BinaryBicone.ofColimitCocone {X Y : C} {t : Cocone (pair X Y)} (ht : IsColimit t) :
    BinaryBicone X Y

{t : CategoryTheory.Limits.Cocone (CategoryTheory.Limits.pair X Y)}

(ht : CategoryTheory.Limits.IsColimit t)

(CategoryTheory.Limits.BinaryBicone.ofColimitCocone ht).pt = t.pt


nonrec theorem IsLocalMinOn.add (hf : IsLocalMinOn f s a) (hg : IsLocalMinOn g s a) :
    IsLocalMinOn (fun x => f x + g x) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[OrderedAddCommMonoid β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsLocalMinOn f s a)
(hg : IsLocalMinOn g s a)


/-- If `C` has colimits then any coreflective subcategory has colimits. -/
theorem hasColimits_of_coreflective (R : D ⥤ C) [HasColimitsOfSize.{v, u} C] [Coreflective R] :
    HasColimitsOfSize.{v, u} D

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

CategoryTheory.Limits.HasColimitsOfSize.{v, u, v₂, u₂} D


theorem mem_map_of_mem {m : M} (h : m ∈ N) : f m ∈ N.map f

{R : Type u}
{L : Type v}
{M : Type w}
{M' : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup M']
[Module R M']
[LieRingModule L M']
{f : M →ₗ⁅R,L⁆ M'}
{N : LieSubmodule R L M}
{m : M}
(h : m ∈ N)


@[to_additive]
theorem pow_subset_pow_of_one_mem (hs : (1 : α) ∈ s) (hn : m ≤ n) : s ^ m ⊆ s ^ n

{α : Type u_2}
[Monoid α]
{s : Set α}
{m n : ℕ}
(hs : 1 ∈ s)
(hn : m ≤ n)


@[simp]
theorem mem_const_vadd_affineSegment {x y z : P} (v : V) :
    v +ᵥ z ∈ affineSegment R (v +ᵥ x) (v +ᵥ y) ↔ z ∈ affineSegment R x y

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


protected theorem hasFDerivAt [DecidableEq ι] : HasFDerivAt f (f.linearDeriv x) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_2}
{E : ι → Type u_3}
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
[Fintype ι]
(f : ContinuousMultilinearMap 𝕜 E F)
(x : (i : ι) → E i)
[DecidableEq ι]


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


@[qify_simps] lemma intCast_ne (a b : ℤ) : a ≠ b ↔ (a : ℚ) ≠ (b : ℚ)

a ≠ b ↔ ↑a ≠ ↑b


theorem natTrailingDegree_eq_support_min' (h : p ≠ 0) :
    natTrailingDegree p = p.support.min' (nonempty_support_iff.mpr h)

{R : Type u}
[Semiring R]
{p : R[X]}
(h : p ≠ 0)


theorem and_congr_right' (h : b ↔ c) : a ∧ b ↔ a ∧ c


theorem true_equivalence : @Equivalence α fun _ _ ↦ True


@[simp]
theorem isOrtho_sup_right {U V₁ V₂ : Submodule 𝕜 E} : U ⟂ V₁ ⊔ V₂ ↔ U ⟂ V₁ ∧ U ⟂ V₂

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{U V₁ V₂ : Submodule 𝕜 E}

U ⟂ V₁ ⊔ V₂ ↔ U ⟂ V₁ ∧ U ⟂ V₂


lemma cfc_const_mul_id (r : R) (a : A) (ha : p a := by cfc_tac) : cfc (r * ·) a = r • a

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(r : R)
(a : A)
(ha : p a := by cfc_tac)


/-- Taking the product of two maps with the same domain is equivalent to taking the product of
their codomains. -/
@[simps]
def prodEquiv : (A →⋆ₐ[R] B) × (A →⋆ₐ[R] C) ≃ (A →⋆ₐ[R] B × C)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Star A]
[Semiring B]
[Algebra R B]
[Star B]
[Semiring C]
[Algebra R C]
[Star C]
(f : (A →⋆ₐ[R] B) × (A →⋆ₐ[R] C))


@[simp]
theorem iSup_N {ι : Sort*} (f : ι → I.Filtration M) : (iSup f).N = ⨆ i, (f i).N

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
{ι : Sort u_1}
(f : ι → I.Filtration M)


@[simp]
theorem mk_repr : (Basis.mk hli hsp).repr x = hli.repr ⟨x, hsp Submodule.mem_top⟩

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

(Basis.mk hli hsp).repr x = hli.repr ⟨x, ⋯⟩


/-- A category is called balanced if any morphism that is both monic and epic is an isomorphism. -/
class Balanced : Prop where
  isIso_of_mono_of_epi : ∀ {X Y : C} (f : X ⟶ Y) [Mono f] [Epi f], IsIso f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[self : CategoryTheory.Balanced C]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.Mono f]
[CategoryTheory.Epi f]


/-- An open neighborhood of the identity in the cartesian square of a nonarchimedean group
contains the cartesian square of an open neighborhood in the group. -/
@[to_additive NonarchimedeanAddGroup.prod_self_subset "An open neighborhood of the identity in
the cartesian square of a nonarchimedean group contains the cartesian square of
an open neighborhood in the group."]
theorem prod_self_subset {U} (hU : U ∈ 𝓝 (1 : G × G)) :
    ∃ V : OpenSubgroup G, (V : Set G) ×ˢ (V : Set G) ⊆ U

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
[NonarchimedeanAddGroup G]
{U : Set (G × G)}
(hU : U ∈ 𝓝 0)

∃ V, ↑V ×ˢ ↑V ⊆ U


theorem Perm.subsingleton_eq_refl [Subsingleton α] (e : Perm α) : e = Equiv.refl α

{α : Sort u}
[Subsingleton α]
(e : Equiv.Perm α)


lemma add_smul_of_not_equiv {P Q : Fin 3 → R} (h : ¬P ≈ Q) {u v : R} (hu : IsUnit u)
    (hv : IsUnit v) : W'.add (u • P) (v • Q) = (u * v) ^ 2 • W'.add P Q

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P Q : Fin 3 → R}
(h : ¬P ≈ Q)
{u v : R}
(hu : IsUnit u)
(hv : IsUnit v)


@[to_additive (attr := simp 1001)]
theorem smul_Lp_zero (c : Mᵈᵐᵃ) : c • (0 : Lp E p μ) = 0

[MeasureTheory.VAddInvariantMeasure M α μ]


/-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : PartialHomeomorph X Y)
(f' : Y ≃ₜ Z)

(e.transHomeomorph f').target = ⇑f'.symm ⁻¹' e.target


theorem inf_symmDiff_distrib_right : a ∆ b ⊓ c = (a ⊓ c) ∆ (b ⊓ c)

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


theorem not_ssubset_of_subset (h : a ⊆ b) : ¬b ⊂ a

[IsNonstrictStrictOrder α (fun x x_1 => x ⊆ x_1) fun x x_1 => x ⊂ x_1]


theorem mul_star_eq_coe : a * star a = (a * star a).re

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])


/-- A countable open cover induces a second-countable topology if all open covers
are themselves second countable. -/
theorem secondCountableTopology_of_countable_cover {ι} [Countable ι] {U : ι → Set α}
    [∀ i, SecondCountableTopology (U i)] (Uo : ∀ i, IsOpen (U i)) (hc : ⋃ i, U i = univ) :
    SecondCountableTopology α

[∀ (i : ι), SecondCountableTopology ↑(U i)]


theorem count_maximal (w : HeightOneSpectrum R) :
    count K v (w.asIdeal : FractionalIdeal R⁰ K) = if w = v then 1 else 0

(v w : IsDedekindDomain.HeightOneSpectrum R)

FractionalIdeal.count K v ↑w.asIdeal = if w = v then 1 else 0


theorem isBigOWith_self_const_mul (c : 𝕜) (hc : c ≠ 0) (f : α → 𝕜) (l : Filter α) :
    IsBigOWith ‖c‖⁻¹ l f fun x => c * f x

{α : Type u_1}
{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
(c : 𝕜)
(hc : c ≠ 0)
(f : α → 𝕜)
(l : Filter α)

Asymptotics.IsBigOWith ‖c‖⁻¹ l f fun x => c * f x


theorem inf'_le {b : β} (h : b ∈ s) : s.inf' ⟨b, h⟩ f ≤ f b

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
{s : Finset β}
(f : β → α)
{b : β}
(h : b ∈ s)


theorem map_nonpos (ha : a ≤ 0) : f a ≤ 0

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[FunLike F α β]
[Preorder α]
[Zero α]
[Preorder β]
[Zero β]
[OrderHomClass F α β]
[ZeroHomClass F α β]
(f : F)
{a : α}
(ha : a ≤ 0)


@[mono]
theorem toFinset_ssubset_toFinset [Fintype s] [Fintype t] : s.toFinset ⊂ t.toFinset ↔ s ⊂ t

{α : Type u_1}
{s t : Set α}
[Fintype ↑s]
[Fintype ↑t]


@[simp]
theorem setLike.coe_galgebra_toFun [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R]
    (A : ι → Submodule S R) [SetLike.GradedMonoid A] (s : S) :
    ↑(@DirectSum.GAlgebra.toFun _ S (fun i => A i) _ _ _ _ _ _ _ s) = (algebraMap S R s : R)

{ι : Type u_1}
{S : Type u_3}
{R : Type u_4}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring S]
[Semiring R]
[Algebra S R]
(A : ι → Submodule S R)
[SetLike.GradedMonoid A]
(s : S)

↑(DirectSum.GAlgebra.toFun s) = (algebraMap S R) s


theorem contains_def [DecidableEq α] {a : α} {as : Array α} : as.contains a ↔ a ∈ as

{α : Type u_1}
[DecidableEq α]
{a : α}
{as : Array α}


protected theorem tsum_eq_iSup_nat' {f : ℕ → ℝ≥0∞} {N : ℕ → ℕ} (hN : Tendsto N atTop atTop) :
    ∑' i : ℕ, f i = ⨆ i : ℕ, ∑ a ∈ Finset.range (N i), f a

{f : ℕ → ℝ≥0∞}

(hN : Filter.Tendsto N Filter.atTop Filter.atTop)

∑' (i : ℕ), f i = ⨆ i, ∑ a ∈ Finset.range (N i), f a


theorem congr_symm (f : A ≃ₐ[S] B) (g : C ≃ₐ[R] D) : congr f.symm g.symm = (congr f g).symm

{R : Type uR}
{S : Type uS}
{A : Type uA}
{B : Type uB}
{C : Type uC}
{D : Type uD}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Semiring A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
[Semiring B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
[Semiring C]
[Algebra R C]
[Semiring D]
[Algebra R D]
(f : A ≃ₐ[S] B)
(g : C ≃ₐ[R] D)

Algebra.TensorProduct.congr f.symm g.symm = (Algebra.TensorProduct.congr f g).symm


@[simp]
theorem constVAdd_add (v w : V₁) :
    constVAdd k P₁ (v + w) = (constVAdd k P₁ w).trans (constVAdd k P₁ v)

(k : Type u_1)
(P₁ : Type u_2)
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(v w : V₁)

AffineEquiv.constVAdd k P₁ (v + w) = (AffineEquiv.constVAdd k P₁ w).trans (AffineEquiv.constVAdd k P₁ v)


theorem map_zero (e : M₁ ≃SL[σ₁₂] M₂) : e (0 : M₁) = 0

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


@[to_additive]
lemma compl_mul_closure_one_eq_iff {t : Set G} :
    tᶜ * (closure {1} : Set G) = tᶜ ↔ t * (closure {1} : Set G) = t

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{t : Set G}

tᶜ + closure {0} = tᶜ ↔ t + closure {0} = t


/-- One half of the quivalence between `C` and `ULiftHom C`. -/
@[simps]
def ULiftHom.down : ULiftHom C ⥤ C

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

CategoryTheory.ULiftHom.down.obj A = A.objDown


/-- When the Hall condition is satisfied, the set of matchings on a finite set is nonempty.
This is where `Finset.all_card_le_biUnion_card_iff_existsInjective'` comes into the argument. -/
theorem hallMatchingsOn.nonempty {ι : Type u} {α : Type v} [DecidableEq α] (t : ι → Finset α)
    (h : ∀ s : Finset ι, s.card ≤ (s.biUnion t).card) (ι' : Finset ι) :
    Nonempty (hallMatchingsOn t ι')

(h : ∀ (s : Finset ι), s.card ≤ (s.biUnion t).card)


@[simp]
theorem isRotated_cyclicPermutations_iff {l l' : List α} :
    l.cyclicPermutations ~r l'.cyclicPermutations ↔ l ~r l'


@[simp]
theorem U_neg_sub_two (n : ℤ) : U R (-n - 2) = -U R n

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


lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ (Set.Ici 0) (√· : ℝ → ℝ)

StrictConcaveOn ℝ (Set.Ici 0) fun x => √x


theorem sup_eq_maxDefault [SemilatticeSup α] [DecidableRel ((· ≤ ·) : α → α → Prop)]
    [IsTotal α (· ≤ ·)] :
    (· ⊔ ·) = (maxDefault : α → α → α)

{α : Type u}
[SemilatticeSup α]
[DecidableRel fun x x_1 => x ≤ x_1]
[IsTotal α fun x x_1 => x ≤ x_1]


@[to_additive]
theorem fst_pow : (s ^ n).fst = s.fst ^ n

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

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


@[to_additive (attr := measurability)]
protected theorem const_smul {𝕜} [SMul 𝕜 β] [ContinuousConstSMul 𝕜 β] (hf : StronglyMeasurable f)
    (c : 𝕜) : StronglyMeasurable (c • f)

(hf : MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable (c +ᵥ f)


@[to_additive (attr := simp)]
theorem mul_nonempty : (s * t).Nonempty ↔ s.Nonempty ∧ t.Nonempty


lemma dZero_comp_H0_subtype : dZero A ∘ₗ (H0 A).subtype = 0

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

groupCohomology.dZero A ∘ₗ (groupCohomology.H0 A).subtype = 0


@[simp]
theorem empty_vecAppend (v : Fin n → α) : vecAppend n.zero_add.symm ![] v = v


theorem Coprime.gcd_mul_right_cancel (m : ℕ+) {n k : ℕ+} :
    k.Coprime n → (m * k).gcd n = m.gcd n


theorem covBy_iff_quot_is_simple {A B : Submodule R M} (hAB : A ≤ B) :
    A ⋖ B ↔ IsSimpleModule R (B ⧸ Submodule.comap B.subtype A)

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{A B : Submodule R M}
(hAB : A ≤ B)

A ⋖ B ↔ IsSimpleModule R (↥B ⧸ Submodule.comap B.subtype A)


theorem invFun_eq (h : ∃ a, f a = b) : f (invFun f b) = b

{α : Sort u_1}
{β : Sort u_2}
[Nonempty α]
{f : α → β}
{b : β}
(h : ∃ a, f a = b)


lemma IsLeftCancelMulZero.to_isRightCancelMulZero [IsLeftCancelMulZero M₀] :
    IsRightCancelMulZero M₀

{M₀ : Type u_1}
[CommSemigroup M₀]
[Zero M₀]
[IsLeftCancelMulZero M₀]


protected theorem ext {α β} {x y : Const α β} (h : x.run = y.run) : x = y

{α : Type u_1}
{β : Type u_2}
{x y : Functor.Const α β}
(h : x.run = y.run)


theorem Finite.union {s t : Set α} (hs : s.Finite) (ht : t.Finite) : (s ∪ t).Finite

{α : Type u}
{s t : Set α}
(hs : s.Finite)
(ht : t.Finite)


theorem hasFDerivAtFilter_pi :
    HasFDerivAtFilter (fun x i => φ i x) (ContinuousLinearMap.pi φ') x L ↔
      ∀ i, HasFDerivAtFilter (φ i) (φ' i) x L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{L : Filter E}
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
{φ : (i : ι) → E → F' i}
{φ' : (i : ι) → E →L[𝕜] F' i}

HasFDerivAtFilter (fun x i => φ i x) (ContinuousLinearMap.pi φ') x L ↔ ∀ (i : ι), HasFDerivAtFilter (φ i) (φ' i) x L


/-- Reinterpreting an `F`-structured arrow `X ⟶ F.obj d` as an arrow under `X` induces a functor
    `StructuredArrow X F ⥤ Under X`. -/
@[simps!]
def toUnder (X : T) (F : D ⥤ T) : StructuredArrow X F ⥤ Under X

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

∀ (X_1 : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit X) (F.comp (CategoryTheory.Functor.id T))),
  ((CategoryTheory.StructuredArrow.toUnder X F).obj X_1).right = F.obj X_1.right


theorem hasStrictDerivAt_exp (x : ℂ) : HasStrictDerivAt exp (exp x) x

HasStrictDerivAt Complex.exp (Complex.exp x) x


@[simp]
theorem equiv_fst_mul_equiv_snd (g : G) : ↑(hST.equiv g).fst * (hST.equiv g).snd = g

{G : Type u_1}
[Group G]
{S T : Set G}
(hST : Subgroup.IsComplement S T)
(g : G)


/-- The eigenvalues of a positive definite matrix are positive -/
lemma eigenvalues_pos [DecidableEq n] {A : Matrix n n 𝕜}
    (hA : Matrix.PosDef A) (i : n) : 0 < hA.1.eigenvalues i

{n : Type u_2}
{𝕜 : Type u_4}
[Fintype n]
[RCLike 𝕜]
[DecidableEq n]
{A : Matrix n n 𝕜}
(hA : A.PosDef)
(i : n)


@[reassoc]
lemma XIsoOfEq_hom_naturality {K L : HomologicalComplex V c} (φ : K ⟶ L) {n n' : ι} (h : n = n') :
    φ.f n ≫ (L.XIsoOfEq h).hom = (K.XIsoOfEq h).hom ≫ φ.f n'


@[simp]
theorem toIocDiv_sub' (a b : α) : toIocDiv hp (a - p) b = toIocDiv hp a b + 1

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


/-- Generalized **squeeze theorem** (also known as **sandwich theorem**). If `s : α → Set β` is a
family of sets that tends to `Filter.smallSets lb` along `la` and `f : α → β` is a function such
that `f x ∈ s x` eventually along `la`, then `f` tends to `lb` along `la`.

If `s x` is the closed interval `[g x, h x]` for some functions `g`, `h` that tend to the same limit
`𝓝 y`, then we obtain the standard squeeze theorem, see
`tendsto_of_tendsto_of_tendsto_of_le_of_le'`. -/
theorem Tendsto.of_smallSets {s : α → Set β} {f : α → β} (hs : Tendsto s la lb.smallSets)
    (hf : ∀ᶠ x in la, f x ∈ s x) : Tendsto f la lb

{α : Type u_1}
{β : Type u_2}
{la : Filter α}
{lb : Filter β}
{s : α → Set β}
{f : α → β}
(hs : Filter.Tendsto s la lb.smallSets)
(hf : ∀ᶠ (x : α) in la, f x ∈ s x)


lemma right_measure_le_of_levyProkhorovEDist_lt {μ ν : Measure Ω} {c : ℝ≥0∞}
    (h : levyProkhorovEDist μ ν < c) {B : Set Ω} (B_mble : MeasurableSet B) :
    ν B ≤ μ (thickening c.toReal B) + c

(h : MeasureTheory.levyProkhorovEDist μ ν < c)

ν B ≤ μ (Metric.thickening c.toReal B) + c


lemma linearMap_apply (ij : ι₂ × ι₁) :
    (b₁.linearMap b₂ ij) = (Matrix.toLin b₁ b₂) (Matrix.stdBasis R ι₂ ι₁ ij)

{R : Type u_1}
{M₁ : Type u_3}
{M₂ : Type u_4}
{ι₁ : Type u_6}
{ι₂ : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
[Fintype ι₁]
[Fintype ι₂]
[DecidableEq ι₁]
(b₁ : Basis ι₁ R M₁)
(b₂ : Basis ι₂ R M₂)
(ij : ι₂ × ι₁)

(b₁.linearMap b₂) ij = (Matrix.toLin b₁ b₂) ((Matrix.stdBasis R ι₂ ι₁) ij)


@[reassoc (attr := simp)]
theorem lift_comp_conePointUniqueUpToIso_inv {r s t : Cone F} (P : IsLimit s) (Q : IsLimit t) :
    Q.lift r ≫ (conePointUniqueUpToIso P Q).inv = P.lift r

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

Q.lift r ≫ (P.conePointUniqueUpToIso Q).inv = P.lift r


theorem isGreatest_union_iff :
    IsGreatest (s ∪ t) a ↔
      IsGreatest s a ∧ a ∈ upperBounds t ∨ a ∈ upperBounds s ∧ IsGreatest t a

{α : Type u}
[Preorder α]
{s t : Set α}
{a : α}


@[simp]
theorem mem_bind {b s} {f : α → Multiset β} : b ∈ bind s f ↔ ∃ a ∈ s, b ∈ f a

{α : Type u_1}
{β : Type v}
{b : β}
{s : Multiset α}
{f : α → Multiset β}


@[simp]
theorem invVal_isEmpty {l r : Type u} {b} (L R IHl IHr) (i : InvTy l r b) (x) [IsEmpty l]
    [IsEmpty r] : invVal L R IHl IHr x i = 0

{l r : Type u}
{b : Bool}
(L : l → SetTheory.PGame)
(R : r → SetTheory.PGame)
(IHl : l → SetTheory.PGame)
(IHr : r → SetTheory.PGame)
(i : SetTheory.PGame.InvTy l r b)
(x : SetTheory.PGame)
[IsEmpty l]
[IsEmpty r]

SetTheory.PGame.invVal L R IHl IHr x i = 0


theorem valMinAbs_nonneg_iff {n : ℕ} [NeZero n] (x : ZMod n) : 0 ≤ x.valMinAbs ↔ x.val ≤ n / 2


theorem eval₂_eq' [Fintype σ] (g : R →+* S₁) (X : σ → S₁) (f : MvPolynomial σ R) :
    f.eval₂ g X = ∑ d ∈ f.support, g (f.coeff d) * ∏ i, X i ^ d i

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[Fintype σ]
(g : R →+* S₁)
(X : σ → S₁)
(f : MvPolynomial σ R)

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


@[to_additive]
theorem eventually_constant_prod {u : ℕ → β} {N : ℕ} (hu : ∀ n ≥ N, u n = 1) {n : ℕ} (hn : N ≤ n) :
    (∏ k ∈ range n, u k) = ∏ k ∈ range N, u k

{β : Type u_4}
[CommMonoid β]
{u : ℕ → β}
{N : ℕ}
(hu : ∀ n ≥ N, u n = 1)
{n : ℕ}
(hn : N ≤ n)

∏ k ∈ Finset.range n, u k = ∏ k ∈ Finset.range N, u k


theorem upperCrossingTime_le : upperCrossingTime a b f N n ω ≤ N

{Ω : Type u_1}
{ι : Type u_2}
[ConditionallyCompleteLinearOrderBot ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{N : ι}
{n : ℕ}
{ω : Ω}

MeasureTheory.upperCrossingTime a b f N n ω ≤ N


/-- A non-unital ring homomorphism `f : R →ₙ+* S` such that `f x` commutes with `f y` for all `x, y`
defines a non-unital ring homomorphism to `Sᵐᵒᵖ`. -/
@[simps (config := .asFn)]
def NonUnitalRingHom.toOpposite {R S : Type*} [NonUnitalNonAssocSemiring R]
    [NonUnitalNonAssocSemiring S] (f : R →ₙ+* S) (hf : ∀ x y, Commute (f x) (f y)) : R →ₙ+* Sᵐᵒᵖ

{R : Type u_2}
{S : Type u_3}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(f : R →ₙ+* S)
(hf : ∀ (x y : R), Commute (f x) (f y))

⇑(f.toOpposite hf) = MulOpposite.op ∘ ⇑f


theorem HasCountableSeparatingOn.subtype_iff {α : Type*} {p : Set α → Prop} {t : Set α} :
    HasCountableSeparatingOn t (fun u ↦ ∃ v, p v ∧ (↑) ⁻¹' v = u) univ ↔
    HasCountableSeparatingOn α p t

{α : Type u_1}
{p : Set α → Prop}
{t : Set α}

HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) Set.univ ↔ HasCountableSeparatingOn α p t


/--
`M.comap f` pulls back the alphabet of `M` along `f`. In other words, it applies `f` to the input
before passing it to `M`.
-/
@[simps]
def comap (f : α' → α) (M : DFA α σ) : DFA α' σ

{α : Type u}
{σ : Type v}
{α' : Type u_1}
(f : α' → α)
(M : DFA α σ)
(s : σ)
(a : α')

(DFA.comap f M).step s a = M.step s (f a)


@[simp]
theorem coe_inf (p p' : Subsemiring R) : ((p ⊓ p' : Subsemiring R) : Set R) = (p : Set R) ∩ p'

{R : Type u}
[NonAssocSemiring R]
(p p' : Subsemiring R)


theorem map₂_span_singleton_eq_map_flip (f : M →ₗ[R] N →ₗ[R] P) (s : Submodule R M) (n : N) :
    map₂ f s (span R {n}) = map (f.flip n) s

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

Submodule.map₂ f s (Submodule.span R {n}) = Submodule.map (f.flip n) s


@[simp]
theorem LeftExactFunctor.forget_obj (F : C ⥤ₗ D) : (LeftExactFunctor.forget C D).obj F = F.1

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

(CategoryTheory.LeftExactFunctor.forget C D).obj F = F.obj


protected theorem sub (x : E) : f (c - x) = f (c + x)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
{c : E}
(f : ContDiffBump c)
(x : E)


theorem toAlgHom_apply (y : S) : toAlgHom R S A y = algebraMap S A y

(R : Type u)
(S : Type v)
(A : Type w)
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Algebra R S]
[Algebra S A]
[Algebra R A]
[IsScalarTower R S A]
(y : S)

(IsScalarTower.toAlgHom R S A) y = (algebraMap S A) y


lemma geometricPMFReal_nonneg {n : ℕ} (hp_pos : 0 < p) (hp_le_one : p ≤ 1) :
    0 ≤ geometricPMFReal p n

{p : ℝ}
{n : ℕ}
(hp_pos : 0 < p)
(hp_le_one : p ≤ 1)

0 ≤ ProbabilityTheory.geometricPMFReal p n


@[simp]
theorem basicOpen_zero (U : X.Opens) : X.basicOpen (0 : Γ(X, U)) = ⊥

(X : AlgebraicGeometry.Scheme)
(U : X.Opens)


@[simp]
theorem torsionBy_one : torsionBy R M 1 = ⊥

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]


/-- the assumption `(σ a).Nonempty` is necessary and cannot be removed without
further conditions on the algebra `A` and scalar field `𝕜`. -/
theorem smul_eq_smul [Nontrivial A] (k : 𝕜) (a : A) (ha : (σ a).Nonempty) :
    σ (k • a) = k • σ a

{𝕜 : Type u}
{A : Type v}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
[Nontrivial A]
(k : 𝕜)
(a : A)
(ha : (spectrum 𝕜 a).Nonempty)


theorem DifferentiableOn.arctan (hc : DifferentiableOn ℝ f s) :
    DifferentiableOn ℝ (fun x => arctan (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
(hc : DifferentiableOn ℝ f s)

DifferentiableOn ℝ (fun x => Real.arctan (f x)) s


theorem erase_append_left [LawfulBEq α] {l₁ : List α} (l₂) (h : a ∈ l₁) :
    (l₁ ++ l₂).erase a = l₁.erase a ++ l₂

{α : Type u_1}
[BEq α]
{a : α}
[LawfulBEq α]
{l₁ : List α}
(l₂ : List α)
(h : a ∈ l₁)


/-- The identity morphism in the Grothendieck category.
-/
@[simps]
def id (X : Grothendieck F) : Hom X X

{F : CategoryTheory.Functor C CategoryTheory.Cat}


lemma Continuous.finset_inf_apply (hs : ∀ i ∈ s, Continuous (f i)) :
    Continuous (fun a ↦ s.inf (f · a))

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeInf L]
[OrderTop L]
[ContinuousInf L]
{s : Finset ι}
{f : ι → X → L}
(hs : ∀ i ∈ s, Continuous (f i))

Continuous fun a => s.inf fun x => f x a


theorem mul_neg_geom_series (x : R) (h : ‖x‖ < 1) : ((1 - x) * ∑' i : ℕ, x ^ i) = 1

{R : Type u_4}
[NormedRing R]
[CompleteSpace R]
(x : R)
(h : ‖x‖ < 1)


theorem Int.natAbs (a : ℕ) (b : ℤ) : multiplicity a b.natAbs = multiplicity (a : ℤ) b

multiplicity a b.natAbs = multiplicity (↑a) b


lemma uIcc_subset_uIcc_iff_mem :
    [[a₁, b₁]] ⊆ [[a₂, b₂]] ↔ a₁ ∈ [[a₂, b₂]] ∧ b₁ ∈ [[a₂, b₂]]

{α : Type u_1}
[Lattice α]
{a₁ a₂ b₁ b₂ : α}

Set.uIcc a₁ b₁ ⊆ Set.uIcc a₂ b₂ ↔ a₁ ∈ Set.uIcc a₂ b₂ ∧ b₁ ∈ Set.uIcc a₂ b₂


theorem summable_of_isBigO {ι E} [SeminormedAddCommGroup E] [CompleteSpace E]
    {f : ι → E} {g : ι → ℝ} (hg : Summable g) (h : f =O[cofinite] g) : Summable f

{ι : Type u_1}
{E : Type u_2}
[SeminormedAddCommGroup E]
[CompleteSpace E]
{f : ι → E}
{g : ι → ℝ}
(hg : Summable g)
(h : f =O[Filter.cofinite] g)


@[simp]
theorem length_attach (L : List α) : L.attach.length = L.length


@[simp]
theorem coe_zero : ⇑(0 : NormedAddGroupHom V₁ V₂) = 0

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]


theorem perm_comp_perm : (Perm ∘r Perm : List α → List α → Prop) = Perm

Relation.Comp List.Perm List.Perm = List.Perm


/--
An `InjectiveResolution Z` consists of a bundled `ℕ`-indexed cochain complex of injective objects,
along with a quasi-isomorphism from the complex consisting of just `Z` supported in degree `0`.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure InjectiveResolution (Z : C) where
  /-- the cochain complex involved in the resolution -/
  cocomplex : CochainComplex C ℕ
  /-- the cochain complex must be degreewise injective -/
  injective : ∀ n, Injective (cocomplex.X n) := by infer_instance
  /-- the cochain complex must have homology -/
  [hasHomology : ∀ i, cocomplex.HasHomology i]
  /-- the morphism from the single cochain complex with `Z` in degree `0` -/
  ι : (single₀ C).obj Z ⟶ cocomplex
  /-- the morphism from the single cochain complex with `Z` in degree `0` is a quasi-isomorphism -/
  quasiIso : QuasiIso ι := by infer_instance

(self : CategoryTheory.InjectiveResolution Z)


@[simp]
theorem toContinuousMultilinearMap_smul (c : R') (f : M [⋀^ι]→L[A] N) :
    (c • f).toContinuousMultilinearMap = c • f.toContinuousMultilinearMap

{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[AddCommMonoid M]
[TopologicalSpace M]
[AddCommMonoid N]
[TopologicalSpace N]
{R' : Type u_7}
{A : Type u_9}
[Monoid R']
[Semiring A]
[Module A M]
[Module A N]
[DistribMulAction R' N]
[ContinuousConstSMul R' N]
[SMulCommClass A R' N]
(c : R')
(f : M [⋀^ι]→L[A] N)


/-- Modified version of `hasSum_int_evenKernel` omitting the constant term at `∞`. -/
lemma hasSum_int_evenKernel₀ (a : ℝ) {t : ℝ} (ht : 0 < t) :
    HasSum (fun n : ℤ ↦ if n + a = 0 then 0 else rexp (-π * (n + a) ^ 2 * t))
    (evenKernel a t - if (a : UnitAddCircle) = 0 then 1 else 0)

HasSum (fun n => if ↑n + a = 0 then 0 else rexp (-π * (↑n + a) ^ 2 * t))
  (HurwitzZeta.evenKernel (↑a) t - if ↑a = 0 then 1 else 0)


/-- Shows that all denominators are nonnegative. -/
theorem zero_le_of_den : 0 ≤ (of v).dens n

{K : Type u_1}
{v : K}
{n : ℕ}
[LinearOrderedField K]
[FloorRing K]


@[simp, norm_cast]
theorem coe_inf [SemilatticeInf α] {P : α → Prop}
    (Pinf : ∀ ⦃x y⦄, P x → P y → P (x ⊓ y)) (x y : Subtype P) :
    (haveI := Subtype.semilatticeInf Pinf; (x ⊓ y : Subtype P) : α) = (x ⊓ y : α)

(Pinf : ∀ ⦃x y : α⦄, P x → P y → P (x ⊓ y))


@[arith_mult]
theorem prodPrimeFactors [CommMonoidWithZero R] (f : ℕ → R) :
    IsMultiplicative (prodPrimeFactors f)

{R : Type u_1}
[CommMonoidWithZero R]
(f : ℕ → R)


/-- The centroid of two points, expressed directly as adding a vector
to a point. -/
theorem centroid_pair [DecidableEq ι] [Invertible (2 : k)] (p : ι → P) (i₁ i₂ : ι) :
    ({i₁, i₂} : Finset ι).centroid k p = (2⁻¹ : k) • (p i₂ -ᵥ p i₁) +ᵥ p i₁

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{ι : Type u_4}
[DecidableEq ι]
[Invertible 2]
(p : ι → P)
(i₁ i₂ : ι)

Finset.centroid k {i₁, i₂} p = 2⁻¹ • (p i₂ -ᵥ p i₁) +ᵥ p i₁


/-- `padicValRat p q` is symmetric in `q`. -/
@[simp]
protected theorem neg (q : ℚ) : padicValRat p (-q) = padicValRat p q


lemma kernImage_mono : Monotone (kernImage f)

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


theorem closure_range : closure (range i) = univ

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{i : α → β}
(di : DenseInducing i)