@[simp]
theorem polar_self (x : M) : polar Q x x = 2 • Q x

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)
(x : M)


theorem IsInitial.isIso_to (hI : IsInitial I) {A : C} (f : A ⟶ I) : IsIso f

(hI : CategoryTheory.Limits.IsInitial I)


/-- The data of a comonad on C consists of an endofunctor G together with natural transformations
ε : G ⟶ 𝟭 C and δ : G ⟶ G ⋙ G satisfying three equations:
- δ_X ≫ G δ_X = δ_X ≫ δ_(GX) (coassociativity)
- δ_X ≫ ε_(GX) = 1_X (left counit)
- δ_X ≫ G ε_X = 1_X (right counit)
-/
structure Comonad extends C ⥤ C where
  /-- The counit for the comonad. -/
  ε : toFunctor ⟶ 𝟭 _
  /-- The comultiplication for the comonad. -/
  δ : toFunctor ⟶ toFunctor ⋙ toFunctor
  coassoc : ∀ X, NatTrans.app δ _ ≫ toFunctor.map (δ.app X) = δ.app _ ≫ δ.app _ := by
    aesop_cat
  left_counit : ∀ X : C, δ.app X ≫ ε.app (toFunctor.obj X) = 𝟙 _ := by aesop_cat
  right_counit : ∀ X : C, δ.app X ≫ toFunctor.map (ε.app X) = 𝟙 _ := by aesop_cat

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

CategoryTheory.CategoryStruct.comp (self.δ.app X) (self.map (self.δ.app X)) =
  CategoryTheory.CategoryStruct.comp (self.δ.app X) (self.δ.app (self.obj X))


lemma isClosed_iff_isLower : IsClosed s ↔ IsLowerSet s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpperSet α]
{s : Set α}


/-- Alias of `Nat.cast_le` specialized to `PartENat` --/
theorem coe_le_coe {x y : ℕ} : (x : PartENat) ≤ y ↔ x ≤ y

↑x ≤ ↑y ↔ x ≤ y


/-- The composition in the opposite direction is equal to the identity if and only if `F` preserves
    the biproduct, see `preservesBiproduct_of_monoBiproductComparison`.  -/
@[reassoc (attr := simp)]
theorem biproductComparison'_comp_biproductComparison :
    biproductComparison' F f ≫ biproductComparison F f = 𝟙 (⨁ F.obj ∘ f)

[CategoryTheory.Limits.HasBiproduct (F.obj ∘ f)]

F.biproductComparison' f ≫ F.biproductComparison f = 𝟙 (⨁ F.obj ∘ f)


/-- A simplicial set `S` is a *Kan complex* if it satisfies the following horn-filling condition:
for every `n : ℕ` and `0 ≤ i ≤ n`,
every map of simplicial sets `σ₀ : Λ[n, i] → S` can be extended to a map `σ : Δ[n] → S`. -/
class KanComplex (S : SSet) : Prop where
  hornFilling : ∀ ⦃n : ℕ⦄ ⦃i : Fin (n+1)⦄ (σ₀ : Λ[n, i] ⟶ S),
    ∃ σ : Δ[n] ⟶ S, σ₀ = hornInclusion n i ≫ σ

{S : SSet}
[self : S.KanComplex]
⦃n : ℕ⦄
⦃i : Fin (n + 1)⦄
(σ₀ : SSet.horn n i ⟶ S)

∃ σ, σ₀ = CategoryTheory.CategoryStruct.comp (SSet.hornInclusion n i) σ


@[simp] -- Porting note: new attr
theorem cycleType_one : (1 : Perm α).cycleType = 0

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


@[simp]
theorem coe_toEquiv : ⇑(e.toEquiv) = e

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


theorem lipschitz_evalx (x : α) : LipschitzWith 1 fun f : α →ᵇ β => f x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
(x : α)


theorem toNat_eq_one_iff_unique : toNat #α = 1 ↔ Subsingleton α ∧ Nonempty α

Cardinal.toNat (Cardinal.mk α) = 1 ↔ Subsingleton α ∧ Nonempty α


theorem continuous_CC'₀ : Continuous (CC'₀ C ho)

(ho : o < Ordinal.type fun x x_1 => x < x_1)

Continuous (Profinite.NobelingProof.CC'₀ C ho)


@[deprecated smul_mono_right (since := "2024-03-31")]
theorem set_smul_mono_right {p q : Submodule R M} (le : p ≤ q) :
    s • p ≤ s • q

{R : Type u_2}
{M : Type u_3}
[Semiring R]
{S : Type u_4}
[Monoid S]
[AddCommMonoid M]
[Module R M]
[DistribMulAction S M]
(s : Set S)
{p q : Submodule R M}
(le : p ≤ q)


lemma mem_descSet_singleton {x : lc.pt} {j : J} {y : K.obj j} :
    c.ι.app j y ∈ descSet hc {x} ↔ lc.ι.app j ⟨y⟩ = x

(hc : CategoryTheory.Limits.IsColimit c)

{lc : CategoryTheory.Limits.Cocone (K.comp CategoryTheory.uliftFunctor.{v, u})}

c.ι.app j y ∈ CategoryTheory.Limits.Types.descSet hc {x} ↔ lc.ι.app j { down := y } = x


/-- Two multiplicative characters on a monoid whose unit group is generated by `g`
are equal if and only if they agree on `g`. -/
lemma eq_iff {R R' : Type*} [CommMonoid R] [CommMonoidWithZero R'] {g : Rˣ}
    (hg : ∀ x, x ∈ Subgroup.zpowers g) (χ₁ χ₂ : MulChar R R') :
    χ₁ = χ₂ ↔ χ₁ g.val = χ₂ g.val

(hg : ∀ (x : Rˣ), x ∈ Subgroup.zpowers g)

χ₁ = χ₂ ↔ χ₁ ↑g = χ₂ ↑g


lemma sinKernel_undef (a : UnitAddCircle) {x : ℝ} (hx : x ≤ 0) : sinKernel a x = 0


theorem InitialSeg.ltOrEq_apply_right [IsWellOrder β s] (f : r ≼i s) (g : r ≃r s) (a : α) :
    g a = f a

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder β s]
(f : r ≼i s)
(g : r ≃r s)
(a : α)


/-- A version of `MeasureTheory.OuterMeasure.ext` that assumes `μ₁ s = μ₂ s` on all *nonempty*
sets `s`, and gets `μ₁ ∅ = μ₂ ∅` from `MeasureTheory.OuterMeasure.empty'`. -/
theorem ext_nonempty {μ₁ μ₂ : OuterMeasure α} (h : ∀ s : Set α, s.Nonempty → μ₁ s = μ₂ s) :
    μ₁ = μ₂

(h : ∀ (s : Set α), s.Nonempty → μ₁ s = μ₂ s)


@[simp]
theorem Ico_union_Ico_eq_Ico (h₁ : a ≤ b) (h₂ : b ≤ c) : Ico a b ∪ Ico b c = Ico a c

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


@[to_additive]
theorem UniformGroup.toUniformSpace_eq {G : Type*} [u : UniformSpace G] [Group G]
    [UniformGroup G] : TopologicalGroup.toUniformSpace G = u

{G : Type u_2}
[u : UniformSpace G]
[AddGroup G]
[UniformAddGroup G]

TopologicalAddGroup.toUniformSpace G = u


theorem Finite.inter_of_left {s : Set α} (hs : s.Finite) (t : Set α) : (s ∩ t).Finite

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


theorem strictMono_subseq_of_id_le {u : ℕ → ℕ} (hu : ∀ n, n ≤ u n) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ StrictMono (u ∘ φ)


@[to_additive]
lemma mulSupport_min [LinearOrder M] (f g : α → M) :
    mulSupport (fun x ↦ min (f x) (g x)) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_2}
{M : Type u_4}
[One M]
[LinearOrder M]
(f g : α → M)

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


theorem eq_of_irreducible_of_monic [Nontrivial B] {p : A[X]} (hp1 : Irreducible p)
    (hp2 : Polynomial.aeval x p = 0) (hp3 : p.Monic) : p = minpoly A x

{A : Type u_1}
{B : Type u_2}
[Field A]
[Ring B]
[Algebra A B]
{x : B}
[Nontrivial B]
{p : A[X]}
(hp1 : Irreducible p)
(hp2 : (Polynomial.aeval x) p = 0)
(hp3 : p.Monic)


@[simp]
lemma LieSubmodule.lowerCentralSeries_tensor_eq_baseChange (k : ℕ) :
    lowerCentralSeries A (A ⊗[R] L) (A ⊗[R] M) k =
    (lowerCentralSeries R L M k).baseChange A

(R : Type u_1)
(A : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[CommRing A]
[Algebra R A]
(k : ℕ)

LieModule.lowerCentralSeries A (TensorProduct R A L) (TensorProduct R A M) k =
  LieSubmodule.baseChange A (LieModule.lowerCentralSeries R L M k)


/-- Bind operation for `SupIndep`. -/
theorem SupIndep.sigma {β : ι → Type*} {s : Finset ι} {g : ∀ i, Finset (β i)} {f : Sigma β → α}
    (hs : s.SupIndep fun i => (g i).sup fun b => f ⟨i, b⟩)
    (hg : ∀ i ∈ s, (g i).SupIndep fun b => f ⟨i, b⟩) : (s.sigma g).SupIndep f


lemma map_evalRingHom_eval (x y : R) (p : R[X][Y]) :
    (p.map <| evalRingHom x).eval y = p.evalEval x y

{R : Type u_1}
[CommSemiring R]
(x y : R)
(p : R[X][Y])

Polynomial.eval y (Polynomial.map (Polynomial.evalRingHom x) p) = Polynomial.evalEval x y p


theorem Equivalence.eqvGen_eq (h : Equivalence r) : EqvGen r = r

{α : Type u_1}
{r : α → α → Prop}
(h : Equivalence r)


@[simp]
theorem coe_toAffineEquiv (e : V₁ ≃ₗ[k] V₂) : ⇑e.toAffineEquiv = e

{k : Type u_1}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddCommGroup V₂]
[Module k V₂]
(e : V₁ ≃ₗ[k] V₂)


@[to_additive]
theorem edist_unop (x y : αᵐᵒᵖ) : edist (unop x) (unop y) = edist x y

{α : Type u}
[PseudoEMetricSpace α]
(x y : αᵐᵒᵖ)

edist (MulOpposite.unop x) (MulOpposite.unop y) = edist x y


@[simp]
lemma homologyMap'_neg :
    homologyMap' (-φ) h₁ h₂ = -homologyMap' φ h₁ h₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
{φ : S₁ ⟶ S₂}
(h₁ : S₁.HomologyData)
(h₂ : S₂.HomologyData)

CategoryTheory.ShortComplex.homologyMap' (-φ) h₁ h₂ = -CategoryTheory.ShortComplex.homologyMap' φ h₁ h₂


@[simp]
lemma d_add (b b' : B) : D.d (b + b') = D.d b + D.d b'

{A B : CommRingCat}
{M : ModuleCat ↑B}
{f : A ⟶ B}
(D : M.Derivation f)
(b b' : ↑B)


@[simp]
theorem mem_singleton {a b : α} : b ∈ ({a} : Multiset α) ↔ b = a


lemma shiftFunctorAdd'_add_zero (a : A) :
    shiftFunctorAdd' C a 0 a (add_zero a) = (Functor.rightUnitor _).symm ≪≫
    isoWhiskerLeft (shiftFunctor C a) (shiftFunctorZero C A).symm

(C : Type u)
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
[CategoryTheory.HasShift C A]
(a : A)

CategoryTheory.shiftFunctorAdd' C a 0 a ⋯ =
  (CategoryTheory.shiftFunctor C a).rightUnitor.symm ≪≫
    CategoryTheory.isoWhiskerLeft (CategoryTheory.shiftFunctor C a) (CategoryTheory.shiftFunctorZero C A).symm


theorem signAux3_symm_trans_trans [Finite α] [DecidableEq β] [Finite β] (f : Perm α) (e : α ≃ β)
    {s : Multiset α} {t : Multiset β} (hs : ∀ x, x ∈ s) (ht : ∀ x, x ∈ t) :
    signAux3 ((e.symm.trans f).trans e) ht = signAux3 f hs

{α : Type u}
[DecidableEq α]
{β : Type v}
[Finite α]
[DecidableEq β]
[Finite β]
(f : Equiv.Perm α)
(e : α ≃ β)
{s : Multiset α}
{t : Multiset β}
(hs : ∀ (x : α), x ∈ s)
(ht : ∀ (x : β), x ∈ t)

Equiv.Perm.signAux3 ((e.symm.trans f).trans e) ht = f.signAux3 hs


@[simp]
theorem cancel_left {g : SpectralMap β γ} {f₁ f₂ : SpectralMap α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{g : SpectralMap β γ}
{f₁ f₂ : SpectralMap α β}
(hg : Function.Injective ⇑g)


theorem LT.lt.cmp_eq_lt (h : x < y) : cmp x y = Ordering.lt

{α : Type u_1}
[LinearOrder α]
{x y : α}
(h : x < y)


/-- A linearly ordered commutative monoid with a zero element. -/
class LinearOrderedCommMonoidWithZero (α : Type*) extends LinearOrderedCommMonoid α,
  CommMonoidWithZero α where
  /-- `0 ≤ 1` in any linearly ordered commutative monoid. -/
  zero_le_one : (0 : α) ≤ 1

[self : LinearOrderedCommMonoidWithZero α]


@[to_additive (attr := elab_as_elim)]
theorem induction_of_closure_eq_top_right {s : Set M} {p : M → Prop} (hs : closure s = ⊤) (x : M)
    (H1 : p 1) (Hmul : ∀ (x), ∀ y ∈ s, p x → p (x * y)) : p x

(Hmul : ∀ (x y : M), y ∈ s → p x → p (x + y))


@[simp]
theorem map_think (f : α → β) : ∀ s, map f (think s) = think (map f s)

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

Computation.map f s.think = (Computation.map f s).think


@[to_additive]
theorem relindex_iInf_ne_zero {ι : Type*} [_hι : Finite ι] {f : ι → Subgroup G}
    (hf : ∀ i, (f i).relindex L ≠ 0) : (⨅ i, f i).relindex L ≠ 0

{G : Type u_1}
[AddGroup G]
{L : AddSubgroup G}
{ι : Type u_3}
[_hι : Finite ι]
{f : ι → AddSubgroup G}
(hf : ∀ (i : ι), (f i).relindex L ≠ 0)


theorem distinctConstantsTheory_eq_iUnion (s : Set α) :
    L.distinctConstantsTheory s =
      ⋃ t : Finset s,
        L.distinctConstantsTheory (t.map (Function.Embedding.subtype fun x => x ∈ s))

{L : FirstOrder.Language}
{α : Type u'}
(s : Set α)

L.distinctConstantsTheory s = ⋃ t, L.distinctConstantsTheory ↑(Finset.map (Function.Embedding.subtype fun x => x ∈ s) t)


theorem sdiff_erase (h : a ∈ s) : s \ t.erase a = insert a (s \ t)

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


theorem Subperm.diff_right {l₁ l₂ : List α} (h : l₁ <+~ l₂) (t : List α) :
    l₁.diff t <+~ l₂.diff t

{α : Type u_1}
[DecidableEq α]
{l₁ l₂ : List α}
(h : l₁ <+~ l₂)
(t : List α)


/-- Every split mono `f` with a cokernel induces a binary bicone with `f` as its `inl` and
the cokernel map as its `snd`.
We will show in `is_bilimit_binary_bicone_of_split_mono_of_cokernel` that this binary bicone is in
fact already a biproduct. -/
@[simps]
def binaryBiconeOfIsSplitMonoOfCokernel {X Y : C} {f : X ⟶ Y} [IsSplitMono f] {c : CokernelCofork f}
    (i : IsColimit c) : BinaryBicone X c.pt

{c : CategoryTheory.Limits.CokernelCofork f}

(CategoryTheory.Limits.binaryBiconeOfIsSplitMonoOfCokernel i).fst = CategoryTheory.retraction f


@[to_additive]
theorem mem_div : a ∈ s / t ↔ ∃ x ∈ s, ∃ y ∈ t, x / y = a

{α : Type u_2}
[Div α]
{s t : Set α}
{a : α}


theorem map₂Left_eq_zipWith :
    ∀ as bs, length as ≤ length bs → map₂Left f as bs = zipWith (fun a b => f a (some b)) as bs

{α : Type u}
{β : Type v}
{γ : Type w}
(f : α → Option β → γ)
(as : List α)
(bs : List β)

as.length ≤ bs.length → List.map₂Left f as bs = List.zipWith (fun a b => f a (some b)) as bs


theorem iSup_univ {f : β → α} : ⨆ x ∈ (univ : Set β), f x = ⨆ x, f x

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : β → α}


theorem IsTotalPreorder.swap (r) [IsTotalPreorder α r] : IsTotalPreorder α (swap r)

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


lemma levyProkhorovEDist_ne_top (μ ν : Measure Ω) [IsFiniteMeasure μ] [IsFiniteMeasure ν] :
    levyProkhorovEDist μ ν ≠ ∞

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

MeasureTheory.levyProkhorovEDist μ ν ≠ ⊤


theorem mem_nhdsWithin_Ioi_iff_exists_mem_Ioc_Ioo_subset {a u' : α} {s : Set α} (hu' : a < u') :
    s ∈ 𝓝[>] a ↔ ∃ u ∈ Ioc a u', Ioo a u ⊆ s

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{a u' : α}
{s : Set α}
(hu' : a < u')

s ∈ 𝓝[>] a ↔ ∃ u ∈ Set.Ioc a u', Set.Ioo a u ⊆ s


theorem toComplex_mul (x y : ℤ[i]) : ((x * y : ℤ[i]) : ℂ) = x * y

GaussianInt.toComplex (x * y) = GaussianInt.toComplex x * GaussianInt.toComplex y


theorem vector_head {n} : Primrec (@Vector.head α n)


@[simp]
theorem coe_fold_r (b : α) (l : List α) : fold op b l = l.foldr op b

{α : Type u_1}
(op : α → α → α)
[hc : Std.Commutative op]
[ha : Std.Associative op]
(b : α)
(l : List α)

Multiset.fold op b ↑l = List.foldr op b l


{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]


@[simp]
theorem Ioc_diff_Ioi : Ioc a b \ Ioi c = Ioc a (min b c)

{α : Type u_1}
[LinearOrder α]
{a b c : α}

Set.Ioc a b \ Set.Ioi c = Set.Ioc a (min b c)


theorem Subpresheaf.to_sheafifyLift (f : G.toPresheaf ⟶ F') (h : Presieve.IsSheaf J F') :
    Subpresheaf.homOfLe (G.le_sheafify J) ≫ G.sheafifyLift f h = f

{J : CategoryTheory.GrothendieckTopology C}

(G : CategoryTheory.GrothendieckTopology.Subpresheaf F)

(h : CategoryTheory.Presieve.IsSheaf J F')

CategoryTheory.GrothendieckTopology.Subpresheaf.homOfLe ⋯ ≫ G.sheafifyLift f h = f


@[to_additive (attr := simp)]
theorem Finset.prod_apply {α : Type*} {β : α → Type*} {γ} [∀ a, CommMonoid (β a)] (a : α)
    (s : Finset γ) (g : γ → ∀ a, β a) : (∏ c ∈ s, g c) a = ∏ c ∈ s, g c a

{α : Type u_1}
{β : α → Type u_2}
{γ : Type u_3}
[(a : α) → CommMonoid (β a)]
(a : α)
(s : Finset γ)
(g : γ → (a : α) → β a)


/-- The adjunction showing that evaluation is a left adjoint. -/
@[simps! unit_app_app counit_app]
def evaluationAdjunctionLeft (c : C) : (evaluation _ _).obj c ⊣ evaluationRightAdjoint D c

[∀ (a b : C), CategoryTheory.Limits.HasProductsOfShape (a ⟶ b) D]

(CategoryTheory.evaluationAdjunctionLeft D c).counit.app Y =
  CategoryTheory.Limits.Pi.π (fun x => Y) (CategoryTheory.CategoryStruct.id c)


@[to_additive]
theorem ite_mul_one {P : Prop} [Decidable P] {a b : M} :
    ite P (a * b) 1 = ite P a 1 * ite P b 1

{M : Type u}
[AddZeroClass M]
{P : Prop}
[Decidable P]
{a b : M}

(if P then a + b else 0) = (if P then a else 0) + if P then b else 0


lemma setIntegral_densityProcess_of_mem (hκν : fst κ ≤ ν) [hν : IsFiniteKernel ν]
    (n : ℕ) (a : α) {s : Set β} (hs : MeasurableSet s) {u : Set γ}
    (hu : u ∈ countablePartition γ n) :
    ∫ x in u, densityProcess κ ν n a x s ∂(ν a) = (κ a (u ×ˢ s)).toReal

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

[hν : ProbabilityTheory.IsFiniteKernel ν]

(hu : u ∈ MeasurableSpace.countablePartition γ n)

∫ (x : γ) in u, κ.densityProcess ν n a x s ∂ν a = ((κ a) (u ×ˢ s)).toReal


theorem tendsto_iff (f : α → β) {l₁ : Filter α} {l₂ : Filter β} (L₁ : l₁.Realizer)
    (L₂ : l₂.Realizer) : Tendsto f l₁ l₂ ↔ ∀ b, ∃ a, ∀ x ∈ L₁.F a, f x ∈ L₂.F b

{α : Type u_1}
{β : Type u_2}
(f : α → β)
{l₁ : Filter α}
{l₂ : Filter β}
(L₁ : l₁.Realizer)
(L₂ : l₂.Realizer)

Filter.Tendsto f l₁ l₂ ↔ ∀ (b : L₂.σ), ∃ a, ∀ x ∈ L₁.F.f a, f x ∈ L₂.F.f b


lemma Affine.CoordinateRing.mk_φ (n : ℤ) : mk W (W.φ n) = mk W (C <| W.Φ n)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℤ)

(WeierstrassCurve.Affine.CoordinateRing.mk W) (W.φ n) =
  (WeierstrassCurve.Affine.CoordinateRing.mk W) (Polynomial.C (W.Φ n))


theorem concat_inj_left {l l' : List α} (a : α) : concat l a = concat l' a ↔ l = l'


/-- Distances `r₁` `r₂` of `p` from two different points `c₁` `c₂` determine at
most two points `p₁` `p₂` in a two-dimensional subspace containing those points
(two circles intersect in at most two points). -/
theorem eq_of_dist_eq_of_dist_eq_of_mem_of_finrank_eq_two {s : AffineSubspace ℝ P}
    [FiniteDimensional ℝ s.direction] (hd : finrank ℝ s.direction = 2) {c₁ c₂ p₁ p₂ p : P}
    (hc₁s : c₁ ∈ s) (hc₂s : c₂ ∈ s) (hp₁s : p₁ ∈ s) (hp₂s : p₂ ∈ s) (hps : p ∈ s) {r₁ r₂ : ℝ}
    (hc : c₁ ≠ c₂) (hp : p₁ ≠ p₂) (hp₁c₁ : dist p₁ c₁ = r₁) (hp₂c₁ : dist p₂ c₁ = r₁)
    (hpc₁ : dist p c₁ = r₁) (hp₁c₂ : dist p₁ c₂ = r₂) (hp₂c₂ : dist p₂ c₂ = r₂)
    (hpc₂ : dist p c₂ = r₂) : p = p₁ ∨ p = p₂

(hd : FiniteDimensional.finrank ℝ ↥s.direction = 2)


@[reassoc (attr := simp)]
theorem isoIsPullback_hom_snd (h : IsPullback fst snd f g) (h' : IsPullback fst' snd' f g) :
    (h.isoIsPullback h').hom ≫ snd' = snd

(h : CategoryTheory.IsPullback fst snd f g)

(h' : CategoryTheory.IsPullback fst' snd' f g)

(CategoryTheory.IsPullback.isoIsPullback X Y h h').hom ≫ snd' = snd


theorem contDiffAt_sqrt {x : ℝ} {n : ℕ∞} (hx : x ≠ 0) : ContDiffAt ℝ n (√·) x


theorem flip (n ν : ℕ) (h : ν ≤ n) :
    (bernsteinPolynomial R n ν).comp (1 - X) = bernsteinPolynomial R n (n - ν)

(R : Type u_1)
[CommRing R]
(n ν : ℕ)
(h : ν ≤ n)

(bernsteinPolynomial R n ν).comp (1 - Polynomial.X) = bernsteinPolynomial R n (n - ν)


theorem isCoseparator_iff_mono (G : C) [∀ A : C, HasProduct fun _ : A ⟶ G => G] :
    IsCoseparator G ↔ ∀ A : C, Mono (Pi.lift fun f : A ⟶ G => f)

[∀ (A : C), CategoryTheory.Limits.HasProduct fun x => G]

CategoryTheory.IsCoseparator G ↔ ∀ (A : C), CategoryTheory.Mono (CategoryTheory.Limits.Pi.lift fun f => f)


lemma isGLB_iff_sInf_eq : IsGLB s a ↔ sInf s = a

{α : Type u_1}
[CompleteSemilatticeInf α]
{s : Set α}
{a : α}


theorem rpow_lt_top_of_nonneg {x : ℝ≥0∞} {y : ℝ} (hy0 : 0 ≤ y) (h : x ≠ ⊤) : x ^ y < ⊤


theorem uniformInducing_id : UniformInducing (@id α)


/-- A family of submodules over an additive group are independent if and only iff `DFinsupp.lsum`
applied with `Submodule.subtype` is injective.

Note that this is not generally true for `[Semiring R]`; see
`CompleteLattice.Independent.dfinsupp_lsum_injective` for details. -/
theorem independent_iff_dfinsupp_lsum_injective (p : ι → Submodule R N) :
    Independent p ↔ Function.Injective (lsum ℕ (M := fun i ↦ ↥(p i)) fun i => (p i).subtype)

{ι : Type u_1}
{R : Type u_2}
{N : Type u_5}
[DecidableEq ι]
[Ring R]
[AddCommGroup N]
[Module R N]
(p : ι → Submodule R N)

CompleteLattice.Independent p ↔ Function.Injective ⇑((DFinsupp.lsum ℕ) fun i => (p i).subtype)


/-- Continuous path connecting two points `x` and `y` in a topological space -/
-- porting note (#5171): removed @[nolint has_nonempty_instance]
structure Path (x y : X) extends C(I, X) where
  /-- The start point of a `Path`. -/
  source' : toFun 0 = x
  /-- The end point of a `Path`. -/
  target' : toFun 1 = y

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


@[simp]
theorem finset_inf_coe {ι} (s : Finset ι) (p : ι → Submodule R M) :
    (↑(s.inf p) : Set M) = ⋂ i ∈ s, ↑(p i)

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
(s : Finset ι)
(p : ι → Submodule R M)


/-- The Riemann-Lebesgue lemma for functions on `ℝ`, formulated via `Real.fourierIntegral`. -/
theorem Real.zero_at_infty_fourierIntegral (f : ℝ → E) : Tendsto (𝓕 f) (cocompact ℝ) (𝓝 0)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : ℝ → E)

Filter.Tendsto (𝓕 f) (Filter.cocompact ℝ) (𝓝 0)


/-- If `M` and `N` are linearly disjoint, `M'` and `N'` are submodules of `M` and `N`,
respectively, such that `N` and `M'` are flat, then `M'` and `N'` are also linearly disjoint. -/
theorem of_le_of_flat_right (H : M.LinearDisjoint N) {M' N' : Submodule R S}
    (hm : M' ≤ M) (hn : N' ≤ N) [Module.Flat R N] [Module.Flat R M'] :
    M'.LinearDisjoint N'

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
[Algebra R S]
{M N : Submodule R S}
(H : M.LinearDisjoint N)
{M' N' : Submodule R S}
(hm : M' ≤ M)
(hn : N' ≤ N)
[Module.Flat R ↥N]
[Module.Flat R ↥M']


lemma natDegree_eq_of_natDegree_add_eq_zero (p q : R[X])
    (H : natDegree (p + q) = 0) : natDegree p = natDegree q

{R : Type u}
[Semiring R]
(p q : R[X])
(H : (p + q).natDegree = 0)


lemma countP_join (p : α → Bool) : ∀ L : List (List α), countP p L.join = (L.map (countP p)).sum

{α : Type u_2}
(p : α → Bool)
(L : List (List α))

List.countP p L.join = (List.map (List.countP p) L).sum


lemma smul_ne_zero_iff_right (hc : c ≠ 0) : c • x ≠ 0 ↔ x ≠ 0

{R : Type u_2}
{M : Type u_5}
[Zero R]
[Zero M]
[SMulWithZero R M]
[NoZeroSMulDivisors R M]
{c : R}
{x : M}
(hc : c ≠ 0)


/-- A non-cyclic multiplicative group is non-trivial. -/
@[to_additive "A non-cyclic additive group is non-trivial."]
theorem Nontrivial.of_not_isCyclic (nc : ¬IsCyclic α) : Nontrivial α

{α : Type u}
[AddGroup α]
(nc : ¬IsAddCyclic α)


theorem norm_eq_sqrt_inner (x : E) : ‖x‖ = √(re ⟪x, x⟫)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x : E)


/-- `NonarchimedeanHomClass F α β` states that `F` is a type of non-archimedean morphisms. -/
class NonarchimedeanHomClass (F α β : Type*) [Add α] [LinearOrder β] [FunLike F α β] : Prop where
  /-- the image of a sum is less or equal than the maximum of the images. -/
  map_add_le_max (f : F) : ∀ a b, f (a + b) ≤ max (f a) (f b)

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Add α]
[LinearOrder β]
[FunLike F α β]
[self : NonarchimedeanHomClass F α β]
(f : F)
(a b : α)


{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)


@[to_additive zsmul_right_injective
"See also `smul_right_injective`. TODO: provide a `NoZeroSMulDivisors` instance. We can't do
that here because importing that definition would create import cycles."]
lemma zpow_left_injective (hn : n ≠ 0) : Injective ((· ^ n) : α → α)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{n : ℤ}
(hn : n ≠ 0)


@[simp]
theorem emod_bmod_congr (x : Int) (n : Nat) : Int.bmod (x%n) n = Int.bmod x n


@[simp]
theorem map_lfp : f (lfp f) = lfp f

{α : Type u}
[CompleteLattice α]
(f : α →o α)


@[simp]
theorem eventually_smallSets_eventually {p : α → Prop} :
    (∀ᶠ s in l.smallSets, ∀ᶠ x in l', x ∈ s → p x) ↔ ∀ᶠ x in l ⊓ l', p x

{α : Type u_1}
{l l' : Filter α}
{p : α → Prop}

(∀ᶠ (s : Set α) in l.smallSets, ∀ᶠ (x : α) in l', x ∈ s → p x) ↔ ∀ᶠ (x : α) in l ⊓ l', p x


@[simp]
theorem toNat_manyOneEquiv {p : Set α} : ManyOneEquiv (toNat p) p

{α : Type u}
[Primcodable α]
[Inhabited α]
{p : Set α}


theorem dickson_one_one_eq_chebyshev_T [Invertible (2 : R)] :
    ∀ n, dickson 1 (1 : R) n = 2 * (Chebyshev.T R n).comp (C (⅟ 2) * X)

(R : Type u_1)
[CommRing R]
[Invertible 2]
(n : ℕ)

Polynomial.dickson 1 1 n = 2 * (Polynomial.Chebyshev.T R ↑n).comp (Polynomial.C ⅟2 * Polynomial.X)


@[simp]
lemma isSemisimple_sub_algebraMap_iff {μ : R} :
    (f - algebraMap R (End R M) μ).IsSemisimple ↔ f.IsSemisimple

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}
{μ : R}

(f - (algebraMap R (Module.End R M)) μ).IsSemisimple ↔ f.IsSemisimple


theorem openEmbedding_id : OpenEmbedding (@id X)


theorem norm_eq_zero_iff {d : ℤ} (hd : d < 0) (z : ℤ√d) : z.norm = 0 ↔ z = 0


/-- An isometric equivalence between two quadratic spaces `M₁, Q₁` and `M₂, Q₂` over a ring `R`,
is a linear equivalence between `M₁` and `M₂` that commutes with the quadratic forms. -/
-- Porting note(#5171): linter not ported yet @[nolint has_nonempty_instance]
structure IsometryEquiv (Q₁ : QuadraticMap R M₁ N) (Q₂ : QuadraticMap R M₂ N)
    extends M₁ ≃ₗ[R] M₂ where
  map_app' : ∀ m, Q₂ (toFun m) = Q₁ m

{R : Type u_2}
{M₁ : Type u_5}
{M₂ : Type u_6}
{N : Type u_9}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid N]
[Module R M₁]
[Module R M₂]
[Module R N]
{Q₁ : QuadraticMap R M₁ N}
{Q₂ : QuadraticMap R M₂ N}
(self : Q₁.IsometryEquiv Q₂)
(m : M₁)

Q₂ ((↑self.toLinearEquiv).toFun m) = Q₁ m


/-- Two equal natural transformations `L₁ ⟶ L₂` yield naturally isomorphic functors
    `Comma L₁ R ⥤ Comma L₂ R`. -/
@[simps!]
def mapLeftEq (l l' : L₁ ⟶ L₂) (h : l = l') : mapLeft R l ≅ mapLeft R l'

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(l l' : L₁ ⟶ L₂)
(h : l = l')
(X : CategoryTheory.Comma L₂ R)

((CategoryTheory.Comma.mapLeftEq R l l' h).inv.app X).left = CategoryTheory.CategoryStruct.id X.left


theorem comp_sumElim {L3 : Language} (θ : L' →ᴸ L3) :
    θ ∘ᴸ ϕ.sumElim ψ = (θ ∘ᴸ ϕ).sumElim (θ ∘ᴸ ψ)

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(ϕ : L →ᴸ L')
{L'' : FirstOrder.Language}
(ψ : L'' →ᴸ L')
{L3 : FirstOrder.Language}
(θ : L' →ᴸ L3)

θ.comp (ϕ.sumElim ψ) = (θ.comp ϕ).sumElim (θ.comp ψ)


theorem dense_iff_closure_eq : Dense s ↔ closure s = univ

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


@[simp]
theorem sign_coe_neg_pi_div_two : (↑(-π / 2) : Angle).sign = -1


/-- The weights in the centroid sum to 1, if the number of points,
converted to `k`, is not zero. -/
theorem sum_centroidWeights_eq_one_of_cast_card_ne_zero (h : (card s : k) ≠ 0) :
    ∑ i ∈ s, s.centroidWeights k i = 1

{k : Type u_1}
[DivisionRing k]
{ι : Type u_4}
(s : Finset ι)
(h : ↑s.card ≠ 0)

∑ i ∈ s, Finset.centroidWeights k s i = 1


theorem to_int_eq_succ_pred (n : PosNum) : (n : ℤ) = (n.pred' : ℕ) + 1


@[ext]
protected theorem TopologicalSpace.ext :
    ∀ {f g : TopologicalSpace X}, IsOpen[f] = IsOpen[g] → f = g


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

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


theorem Iic_union_Ici_of_le (h : a ≤ b) : Iic b ∪ Ici a = univ

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


theorem ext_adjoin_singleton {a : A} [FunLike F (adjoin R ({a} : Set A)) B]
    [AlgHomClass F R (adjoin R ({a} : Set A)) B] [StarAlgHomClass F R (adjoin R ({a} : Set A)) B]
    {f g : F} (h : f ⟨a, self_mem_adjoin_singleton R a⟩ = g ⟨a, self_mem_adjoin_singleton R a⟩) :
    f = g

[FunLike F (↥(StarAlgebra.adjoin R {a})) B]

[AlgHomClass F R (↥(StarAlgebra.adjoin R {a})) B]

[StarAlgHomClass F R (↥(StarAlgebra.adjoin R {a})) B]


lemma hasEigenvalueAt (χ : Weight R L M) (x : L) :
    (toEnd R L M x).HasEigenvalue (χ x)

{R : Type u_2}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(χ : LieModule.Weight R L M)
(x : L)

((LieModule.toEnd R L M) x).HasEigenvalue (χ x)


theorem mem_pointwise_smul_iff_inv_smul_mem₀ {a : M} (ha : a ≠ 0) (S : Subsemiring R) (x : R) :
    x ∈ a • S ↔ a⁻¹ • x ∈ S

{M : Type u_1}
{R : Type u_2}
[GroupWithZero M]
[Semiring R]
[MulSemiringAction M R]
{a : M}
(ha : a ≠ 0)
(S : Subsemiring R)
(x : R)

x ∈ a • S ↔ a⁻¹ • x ∈ S


/-- Given `G` acting on `X`, a group homomorphism `φ : G →* (X → H) ⋊ G` can be uncurried to
    a functor from the action groupoid to `H`, provided that `φ g = (_, g)` for all `g`. -/
@[simps]
def uncurry (F : G →* (X → H) ⋊[mulAutArrow] G) (sane : ∀ g, (F g).right = g) :
    ActionCategory G X ⥤ SingleObj H

{X : Type u}
{G : Type u_2}
[Group G]
[MulAction G X]
{H : Type u_3}
[Group H]
(F : G →* (X → H) ⋊[mulAutArrow] G)
(sane : ∀ (g : G), (F g).right = g)

∀ {x b : CategoryTheory.ActionCategory G X} (f : x ⟶ b),
  (CategoryTheory.ActionCategory.uncurry F sane).map f = (F ↑f).left b.back


@[to_additive (attr := simp)]
theorem clift_apply_inr (f : FreeMonoid (M ⊕ N) →* P) (hM₁ hN₁ hM hN) (x : N) :
    clift f hM₁ hN₁ hM hN (inr x) = f (of (.inr x))

(hM₁ : f (FreeAddMonoid.of (Sum.inl 0)) = 0)

(hN₁ : f (FreeAddMonoid.of (Sum.inr 0)) = 0)

(hM :
  ∀ (x y : M), f (FreeAddMonoid.of (Sum.inl (x + y))) = f (FreeAddMonoid.of (Sum.inl x) + FreeAddMonoid.of (Sum.inl y)))

(hN :
  ∀ (x y : N), f (FreeAddMonoid.of (Sum.inr (x + y))) = f (FreeAddMonoid.of (Sum.inr x) + FreeAddMonoid.of (Sum.inr y)))

(AddMonoid.Coprod.clift f hM₁ hN₁ hM hN) (AddMonoid.Coprod.inr x) = f (FreeAddMonoid.of (Sum.inr x))


theorem posDef_iff_nonneg {Q : QuadraticMap R₂ M N} : PosDef Q ↔ (∀ x, 0 ≤ Q x) ∧ Q.Anisotropic

{M : Type u_4}
{N : Type u_5}
{R₂ : Type u}
[CommSemiring R₂]
[AddCommMonoid M]
[Module R₂ M]
[PartialOrder N]
[AddCommMonoid N]
[Module R₂ N]
{Q : QuadraticMap R₂ M N}

Q.PosDef ↔ (∀ (x : M), 0 ≤ Q x) ∧ Q.Anisotropic


@[simp]
lemma tensorQuotEquivQuotSMul_tmul_mk (I : Ideal R) (x : M) (r : R) :
    tensorQuotEquivQuotSMul M I (x ⊗ₜ[R] Ideal.Quotient.mk I r) =
      Submodule.Quotient.mk (r • x)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(I : Ideal R)
(x : M)
(r : R)

(tensorQuotEquivQuotSMul M I) (x ⊗ₜ[R] (Ideal.Quotient.mk I) r) = Submodule.Quotient.mk (r • x)


theorem ceil_mono : Monotone (ceil : α → ℕ)

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


/-- If `C` is a monoidal closed category and `D` is groupoid, then the functor category `D ⥤ C`,
with the pointwise monoidal structure, is monoidal closed. -/
@[simps! closed_adj]
instance monoidalClosed : MonoidalClosed (D ⥤ C)

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

CategoryTheory.Closed.adj =
  CategoryTheory.Adjunction.mkOfUnitCounit
    { unit := X.closedUnit, counit := X.closedCounit, left_triangle := ⋯, right_triangle := ⋯ }


@[to_additive (attr := simp)]
theorem prod_div_distrib : ∏ x ∈ s, f x / g x = (∏ x ∈ s, f x) / ∏ x ∈ s, g x

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f g : α → β}
[DivisionCommMonoid β]


theorem RCLike.uniqueNonUnitalContinuousFunctionalCalculus_of_compactSpace_quasispectrum
    [TopologicalSpace A] [T2Space A] [NonUnitalRing A] [StarRing A] [Module 𝕜 A]
    [IsScalarTower 𝕜 A A] [SMulCommClass 𝕜 A A] [h : ∀ a : A, CompactSpace (quasispectrum 𝕜 a)] :
    UniqueNonUnitalContinuousFunctionalCalculus 𝕜 A

[h : ∀ (a : A), CompactSpace ↑(quasispectrum 𝕜 a)]


@[simp]
theorem comap_exp_atTop : comap exp atTop = atTop

Filter.comap Real.exp Filter.atTop = Filter.atTop


theorem addVal_eq_top_iff {a : R} : addVal R a = ⊤ ↔ a = 0

{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]
{a : R}

(DiscreteValuationRing.addVal R) a = ⊤ ↔ a = 0


@[simp]
theorem val_zero : (0 : HomogeneousLocalization 𝒜 x).val = 0

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


@[simp]
theorem toSubMulAction_one : (1 : Submodule R A).toSubMulAction = 1

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


lemma curry_two_eq_curry {p : Fin 2 → Type u} {τ : Type u}
    (f : ((i : Fin 2) → p i) → τ) :
    curry f = Function.curry (f ∘ (piFinTwoEquiv p).symm)

Function.FromTypes.curry f = Function.curry (f ∘ ⇑(piFinTwoEquiv p).symm)


@[to_additive]
theorem one_mem_one : (1 : Set α) ∈ (1 : Filter α)


@[simp]
theorem coe_subtype : (S.subtype : S → A) = Subtype.val

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


/-- If `‖f n‖ ≤ C * r ^ n` for all `n : ℕ` and some `r < 1`, then the partial sums of `f` form a
Cauchy sequence. This lemma does not assume `0 ≤ r` or `0 ≤ C`. -/
theorem cauchySeq_finset_of_geometric_bound (hr : r < 1) (hf : ∀ n, ‖f n‖ ≤ C * r ^ n) :
    CauchySeq fun s : Finset ℕ ↦ ∑ x ∈ s, f x

{α : Type u_1}
[SeminormedAddCommGroup α]
{r C : ℝ}
{f : ℕ → α}
(hr : r < 1)
(hf : ∀ (n : ℕ), ‖f n‖ ≤ C * r ^ n)


/-- In a (weakly) locally compact R₁ space, compact closed neighborhoods of a point `x`
form a basis of neighborhoods of `x`. -/
theorem isCompact_isClosed_basis_nhds (x : X) :
    (𝓝 x).HasBasis (fun K => K ∈ 𝓝 x ∧ IsCompact K ∧ IsClosed K) (·)

{X : Type u_1}
[TopologicalSpace X]
[R1Space X]
[WeaklyLocallyCompactSpace X]
(x : X)

(𝓝 x).HasBasis (fun K => K ∈ 𝓝 x ∧ IsCompact K ∧ IsClosed K) fun x => x


@[simp]
theorem coe_isComplEquivProj_symm_apply (f : { f : E →ₗ[R] p // ∀ x : p, f x = x }) :
    (p.isComplEquivProj.symm f : Submodule R E) = ker (f : E →ₗ[R] p)

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
(p : Submodule R E)
(f : { f // ∀ (x : ↥p), f ↑x = x })

↑(p.isComplEquivProj.symm f) = LinearMap.ker ↑f


theorem ext_iff' {t t' : Bornology α} :
    t = t' ↔ ∀ s, s ∈ @cobounded α t ↔ s ∈ @cobounded α t'

t = t' ↔ ∀ (s : Set α), s ∈ Bornology.cobounded α ↔ s ∈ Bornology.cobounded α


/-- If a function converges along a filter to a limit `a`, is integrable along this filter, and
all elements of the filter have infinite measure, then the limit has to vanish. -/
lemma IntegrableAtFilter.eq_zero_of_tendsto
    (h : IntegrableAtFilter f l μ) (h' : ∀ s ∈ l, μ s = ∞) {a : E}
    (hf : Tendsto f l (𝓝 a)) : a = 0

(h : MeasureTheory.IntegrableAtFilter f l μ)


/-- If `f,g` is coreflexive, then `g,f` is coreflexive. -/
theorem IsCoreflexivePair.swap [IsCoreflexivePair f g] : IsCoreflexivePair g f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{A B : C}
{f g : A ⟶ B}
[CategoryTheory.IsCoreflexivePair f g]


/-- When `D` is a monoidal category,
monoid objects in `C ⥤ D` are the same thing
as functors from `C` into the monoid objects of `D`.
-/
@[simps]
def monFunctorCategoryEquivalence : Mon_ (C ⥤ D) ≌ C ⥤ Mon_ D

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

(CategoryTheory.Monoidal.monFunctorCategoryEquivalence C D).functor =
  CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.functor


theorem sup_comm (a b : α) : a ⊔ b = b ⊔ a

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


theorem coeff_select (x : 𝕎 R) (n : ℕ) :
    (select P x).coeff n = aeval x.coeff (selectPoly P n)

{p : ℕ}
{R : Type u_1}
[CommRing R]
(P : ℕ → Prop)
(x : 𝕎 R)
(n : ℕ)

(WittVector.select P x).coeff n = (MvPolynomial.aeval x.coeff) (WittVector.selectPoly P n)


theorem pointed_zero : (0 : ConvexCone 𝕜 E).Pointed

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]


/-- The right injection of a space in a disjoint union is an isometry -/
theorem isometry_inr : Isometry (Sum.inr : Y → X ⊕ Y)

{X : Type u}
{Y : Type v}
[MetricSpace X]
[MetricSpace Y]


@[simp]
theorem reverseOpEquiv_opComm :
    AlgEquiv.opComm (reverseOpEquiv (Q := Q)) = reverseOpEquiv.symm

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}

AlgEquiv.opComm CliffordAlgebra.reverseOpEquiv = CliffordAlgebra.reverseOpEquiv.symm


@[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_inv_snd_snd :
    (pullbackRightPullbackFstIso f g f').inv ≫ pullback.snd _ _ ≫ pullback.snd _ _ =
      pullback.snd _ _

[CategoryTheory.Limits.HasPullback f' (CategoryTheory.Limits.pullback.fst f g)]

[CategoryTheory.Limits.HasPullback (f' ≫ f) g]

(CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').inv ≫
    CategoryTheory.Limits.pullback.snd f' (CategoryTheory.Limits.pullback.fst f g) ≫
      CategoryTheory.Limits.pullback.snd f g =
  CategoryTheory.Limits.pullback.snd (f' ≫ f) g


theorem length_eq_one {l : List α} : length l = 1 ↔ ∃ a, l = [a]


@[simp, reassoc, elementwise] lemma smoothSheafCommRing.ι_forgetStalk_hom (x : TopCat.of M) (U) :
    CategoryStruct.comp
      (Z := (smoothSheaf IM I M R).presheaf.stalk x)
      (DFunLike.coe
        (α := ((forget CommRingCat).obj ((smoothSheafCommRing IM I M R).presheaf.obj
          (op ((OpenNhds.inclusion x).obj U.unop)))))
        (colimit.ι ((OpenNhds.inclusion x).op ⋙ (smoothSheafCommRing IM I M R).presheaf) U))
      (forgetStalk IM I M R x).hom =
    colimit.ι ((OpenNhds.inclusion x).op ⋙ (smoothSheaf IM I M R).presheaf) U

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{EM : Type u_2}
[NormedAddCommGroup EM]
[NormedSpace 𝕜 EM]
{HM : Type u_3}
[TopologicalSpace HM]
(IM : ModelWithCorners 𝕜 EM HM)
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u)
[TopologicalSpace M]
[ChartedSpace HM M]
(R : Type u)
[TopologicalSpace R]
[ChartedSpace H R]
[CommRing R]
[SmoothRing I R]
(x : ↑(TopCat.of M))
(U : (TopologicalSpace.OpenNhds x)ᵒᵖ)

CategoryTheory.CategoryStruct.comp
    (⇑(CategoryTheory.Limits.colimit.ι
        ((TopologicalSpace.OpenNhds.inclusion x).op.comp (smoothSheafCommRing IM I M R).presheaf) U))
    (smoothSheafCommRing.forgetStalk IM I M R x).hom =
  CategoryTheory.Limits.colimit.ι ((TopologicalSpace.OpenNhds.inclusion x).op.comp (smoothSheaf IM I M R).presheaf) U


theorem lintegral_snd (κ : Kernel α (β × γ)) (a : α) {g : γ → ℝ≥0∞} (hg : Measurable g) :
    ∫⁻ c, g c ∂snd κ a = ∫⁻ bc : β × γ, g bc.snd ∂κ a

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

{g : γ → ℝ≥0∞}

∫⁻ (c : γ), g c ∂κ.snd a = ∫⁻ (bc : β × γ), g bc.2 ∂κ a


theorem isSuccLimit_of_succ_ne (h : ∀ b, succ b ≠ a) : IsSuccLimit a

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a : α}
(h : ∀ (b : α), Order.succ b ≠ a)


theorem isIdempotent_left [Std.IdempotentOp gb] (h : Semiconj₂ f ga gb) (h_inj : Injective f) :
    Std.IdempotentOp ga

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{ga : α → α → α}
{gb : β → β → β}
[Std.IdempotentOp gb]
(h : Function.Semiconj₂ f ga gb)
(h_inj : Function.Injective f)


@[simp]
lemma preimage_comp {X Y Z : Scheme.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) (U) :
    (f ≫ g) ⁻¹ᵁ U = f ⁻¹ᵁ g ⁻¹ᵁ U

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

(TopologicalSpace.Opens.map (f ≫ g).val.base).obj U =
  (TopologicalSpace.Opens.map f.val.base).obj ((TopologicalSpace.Opens.map g.val.base).obj U)


@[to_additive (attr := mono)]
theorem mul_subset_mul : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ * t₁ ⊆ s₂ * t₂

{α : Type u_2}
[DecidableEq α]
[Add α]
{s₁ s₂ t₁ t₂ : Finset α}

s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ + t₁ ⊆ s₂ + t₂


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

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


@[simp]
theorem dist_right_lineMap (p₁ p₂ : P) (c : 𝕜) : dist p₂ (lineMap p₁ p₂ c) = ‖1 - c‖ * dist p₁ p₂

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

dist p₂ ((AffineMap.lineMap p₁ p₂) c) = ‖1 - c‖ * dist p₁ p₂


theorem L1.dist_eq_integral_dist (f g : α →₁[μ] H) : dist f g = ∫ a, dist (f a) (g a) ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{H : Type u_7}
[NormedAddCommGroup H]
(f g : ↥(MeasureTheory.Lp H 1 μ))

dist f g = ∫ (a : α), dist (↑↑f a) (↑↑g a) ∂μ


theorem nonempty_def : s.Nonempty ↔ ∃ x, x ∈ s


theorem mapIso_injective (F : C ⥤ D) [Faithful F] :
    Function.Injective <| (F.mapIso : (X ≅ Y) → (F.obj X ≅ F.obj Y))

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


@[simp]
theorem map_f (f : X ⟶ Y) (n : ℕ) : (map f).f n = f.app (op [n])

{X Y : CategoryTheory.SimplicialObject C}

(AlgebraicTopology.AlternatingFaceMapComplex.map f).f n = f.app (Opposite.op [n])


lemma SymmetricCategory.reverseBraiding_eq (C : Type u₁) [Category.{v₁} C]
    [MonoidalCategory C] [i : SymmetricCategory C] :
    reverseBraiding C = i.toBraidedCategory

[i : CategoryTheory.SymmetricCategory C]

CategoryTheory.reverseBraiding C = CategoryTheory.SymmetricCategory.toBraidedCategory


@[to_additive (attr := simp)]
theorem unop_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    unop (no_index (OfNat.ofNat n : αᵐᵒᵖ)) = OfNat.ofNat n

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

MulOpposite.unop (OfNat.ofNat n) = OfNat.ofNat n


theorem ball_ne_none {p : Option α → Prop} : (∀ x (_ : x ≠ none), p x) ↔ ∀ x, p (some x)

(∀ (x : Option α), x ≠ none → p x) ↔ ∀ (x : α), p (some x)


/-- The square of a quadratic character is the trivial character. -/
theorem IsQuadratic.sq_eq_one {χ : MulChar R R'} (hχ : χ.IsQuadratic) : χ ^ 2 = 1

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommRing R']
{χ : MulChar R R'}
(hχ : χ.IsQuadratic)


/-- Reorder a product.

The difference with `Finset.prod_nbij` is that the bijection is specified with an inverse, rather
than as a surjective injection.

The difference with `Finset.prod_bij'` is that the bijection and its inverse are non-dependent
functions, rather than being allowed to use membership of the domains of the products.

The difference with `Finset.prod_equiv` is that bijectivity is only required to hold on the domains
of the products, rather than on the entire types.
-/
@[to_additive "Reorder a sum.

The difference with `Finset.sum_nbij` is that the bijection is specified with an inverse, rather
than as a surjective injection.

The difference with `Finset.sum_bij'` is that the bijection and its inverse are non-dependent
functions, rather than being allowed to use membership of the domains of the sums.

The difference with `Finset.sum_equiv` is that bijectivity is only required to hold on the domains
of the sums, rather than on the entire types."]
lemma prod_nbij' (i : ι → κ) (j : κ → ι) (hi : ∀ a ∈ s, i a ∈ t) (hj : ∀ a ∈ t, j a ∈ s)
    (left_inv : ∀ a ∈ s, j (i a) = a) (right_inv : ∀ a ∈ t, i (j a) = a)
    (h : ∀ a ∈ s, f a = g (i a)) : ∏ x ∈ s, f x = ∏ x ∈ t, g x

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[CommMonoid α]
{s : Finset ι}
{t : Finset κ}
{f : ι → α}
{g : κ → α}
(i : ι → κ)
(j : κ → ι)
(hi : ∀ a ∈ s, i a ∈ t)
(hj : ∀ a ∈ t, j a ∈ s)
(left_inv : ∀ a ∈ s, j (i a) = a)
(right_inv : ∀ a ∈ t, i (j a) = a)
(h : ∀ a ∈ s, f a = g (i a))


@[simp] lemma unop_inv_associator (X Y Z : Cᵒᵖ) :
    (α_ X Y Z).inv.unop = (α_ (unop X) (unop Y) (unop Z)).hom

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

(CategoryTheory.MonoidalCategory.associator X Y Z).inv.unop =
  (CategoryTheory.MonoidalCategory.associator (Opposite.unop X) (Opposite.unop Y) (Opposite.unop Z)).hom


theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X)

𝓝[≠] OnePoint.infty = Filter.map OnePoint.some (Filter.coclosedCompact X)


theorem toLp_denseRange [μ.WeaklyRegular] [IsFiniteMeasure μ] :
    DenseRange (toLp p μ 𝕜 : (α →ᵇ E) →L[𝕜] Lp E p μ)

{α : Type u_1}
[TopologicalSpace α]
[NormalSpace α]
[MeasurableSpace α]
[BorelSpace α]
(E : Type u_2)
[NormedAddCommGroup E]
(μ : MeasureTheory.Measure α)
{p : ℝ≥0∞}
[SecondCountableTopologyEither α E]
[_i : Fact (1 ≤ p)]
(hp : p ≠ ⊤)
(𝕜 : Type u_3)
[NormedField 𝕜]
[NormedAlgebra ℝ 𝕜]
[NormedSpace 𝕜 E]
[μ.WeaklyRegular]
[MeasureTheory.IsFiniteMeasure μ]

DenseRange ⇑(BoundedContinuousFunction.toLp p μ 𝕜)


theorem natDegree_le_iff_degree_le {n : ℕ} : natDegree p ≤ n ↔ degree p ≤ n

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


theorem Not.imp {a b : Prop} (H2 : ¬b) (H1 : a → b) : ¬a


theorem Module.eq_zero_of_zero_eq_one (zero_eq_one : (0 : R) = 1) : x = 0

{R : Type u_2}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x : M)
(zero_eq_one : 0 = 1)


@[to_additive]
lemma prod_range_diag_flip (n : ℕ) (f : ℕ → ℕ → M) :
    (∏ m ∈ range n, ∏ k ∈ range (m + 1), f k (m - k)) =
      ∏ m ∈ range n, ∏ k ∈ range (n - m), f m k

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

∑ m ∈ Finset.range n, ∑ k ∈ Finset.range (m + 1), f k (m - k) = ∑ m ∈ Finset.range n, ∑ k ∈ Finset.range (n - m), f m k


@[simp]
theorem sumLexAssoc_apply_inl_inr :
    sumLexAssoc α β γ (toLex <| inl <| toLex <| inr b) = toLex (inr <| toLex <| inl b)

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

(OrderIso.sumLexAssoc α β γ) (toLex (Sum.inl (toLex (Sum.inr b)))) = toLex (Sum.inr (toLex (Sum.inl b)))


@[simp]
theorem flip_nondegenerate {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} : B.flip.Nondegenerate ↔ B.Nondegenerate

{R : Type u_1}
{R₁ : Type u_2}
{R₂ : Type u_3}
{M : Type u_5}
{M₁ : Type u_6}
{M₂ : Type u_7}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{I₁ : R₁ →+* R}
{I₂ : R₂ →+* R}
{B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M}


@[to_additive neg_add]
theorem mul_inv : (a * b)⁻¹ = a⁻¹ * b⁻¹

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


lemma isIso_homologyMap_of_isIso_cyclesMap_of_epi {φ : S₁ ⟶ S₂}
    [S₁.HasHomology] [S₂.HasHomology] (h₁ : IsIso (cyclesMap φ)) (h₂ : Epi φ.τ₁) :
    IsIso (homologyMap φ)

(h₁ : CategoryTheory.IsIso (CategoryTheory.ShortComplex.cyclesMap φ))


@[simp]
theorem dotProduct_zero' : (v ⬝ᵥ fun _ => 0) = 0

{m : Type u_2}
{α : Type v}
[Fintype m]
[NonUnitalNonAssocSemiring α]
(v : m → α)


theorem inter_def {s₁ s₂ : Set α} : s₁ ∩ s₂ = { a | a ∈ s₁ ∧ a ∈ s₂ }


@[to_additive (attr := simp, norm_cast)]
theorem coe_mul (x y : H) : (↑(x * y) : G) = ↑x * ↑y

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


@[simp]
theorem one_le_ceil_iff : 1 ≤ ⌈a⌉ ↔ 0 < a

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


theorem lowerCentralSeries_map_eq_lcs : (lowerCentralSeries R L N k).map N.incl = N.lcs k

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

LieSubmodule.map N.incl (LieModule.lowerCentralSeries R L (↥↑N) k) = LieSubmodule.lcs k N


@[fun_prop]
theorem differentiableOn_singleton : DifferentiableOn 𝕜 f {x}

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


theorem mem_or_mem_of_mem_union {x : α} {a b : Set α} (H : x ∈ a ∪ b) : x ∈ a ∨ x ∈ b

{α : Type u}
{x : α}
{a b : Set α}
(H : x ∈ a ∪ b)


theorem disjointed_succ (f : ℕ → α) (n : ℕ) : disjointed f (n + 1) = f (n + 1) \ partialSups f n

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
(f : ℕ → α)
(n : ℕ)

disjointed f (n + 1) = f (n + 1) \ (partialSups f) n


theorem pseudoEqual_refl {P : C} : Reflexive (PseudoEqual P)

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


@[simp] lemma add_τ₂ (φ φ' : S₁ ⟶ S₂) : (φ + φ').τ₂ = φ.τ₂ + φ'.τ₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ φ' : S₁ ⟶ S₂)

(φ + φ').τ₂ = φ.τ₂ + φ'.τ₂


/-- A subset `v` of a null-set `w` has zero measure if `w` is a subset of a positive set `u`. -/
theorem subset_positive_null_set (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hw : MeasurableSet w) (hsu : 0 ≤[u] s) (hw₁ : s w = 0) (hw₂ : w ⊆ u) (hwt : v ⊆ w) :
    s v = 0

(hsu : MeasureTheory.VectorMeasure.restrict 0 u ≤ MeasureTheory.VectorMeasure.restrict s u)


lemma coeff_isHomogeneous_of_optionEquivLeft_symm
    [hσ : Finite σ] {p : Polynomial (MvPolynomial σ R)}
    (hp : ((optionEquivLeft R σ).symm p).IsHomogeneous n) (i j : ℕ) (h : i + j = n) :
    (p.coeff i).IsHomogeneous j

(hp : ((MvPolynomial.optionEquivLeft R σ).symm p).IsHomogeneous n)


@[simp]
theorem toDirectSum_add [Semiring M] (f g : AddMonoidAlgebra M ι) :
    (f + g).toDirectSum = f.toDirectSum + g.toDirectSum

{ι : Type u_1}
{M : Type u_3}
[Semiring M]
(f g : AddMonoidAlgebra M ι)


/-- The right multiplication map: `(a, b) ↦ b * a`. See also `AddMonoidHom.mulRight`. -/
@[simps!]
def AddMonoid.End.mulRight : R →+ AddMonoid.End R

{R : Type u_1}
[NonUnitalNonAssocSemiring R]
(y x : R)


@[simp]
theorem mk'_toAddSubmonoid {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha).toAddSubmonoid = sa

{R : Type u}
[NonUnitalNonAssocSemiring R]
{s : Set R}
{sg : Subsemigroup R}
(hg : ↑sg = s)
{sa : AddSubmonoid R}
(ha : ↑sa = s)


/-- Any morphism `Y ⟶ Z` is part of a distinguished triangle `X ⟶ Y ⟶ Z ⟶ X⟦1⟧` -/
lemma distinguished_cocone_triangle₁ {Y Z : C} (g : Y ⟶ Z) :
    ∃ (X : C) (f : X ⟶ Y) (h : Z ⟶ X⟦(1 : ℤ)⟧), Triangle.mk f g h ∈ distTriang C

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

∃ X f h, CategoryTheory.Pretriangulated.Triangle.mk f g h ∈ CategoryTheory.Pretriangulated.distinguishedTriangles


/-- `CliffordAlgebra.reverse` as a `LinearEquiv`. -/
@[simps!]
def reverseEquiv : CliffordAlgebra Q ≃ₗ[R] CliffordAlgebra Q

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}

∀ (a : CliffordAlgebra Q), CliffordAlgebra.reverseEquiv.symm a = CliffordAlgebra.reverse a


theorem EventuallyMeasurableSpace.measurable_le : m ≤ EventuallyMeasurableSpace m l

{α : Type u_1}
{m : MeasurableSpace α}
{l : Filter α}
[CountableInterFilter l]


theorem opNorm_le_bound₂ (f : E →SL[σ₁₃] F →SL[σ₂₃] G) {C : ℝ} (h0 : 0 ≤ C)
    (hC : ∀ x y, ‖f x y‖ ≤ C * ‖x‖ * ‖y‖) : ‖f‖ ≤ C

{σ₂₃ : 𝕜₂ →+* 𝕜₃}

{σ₁₃ : 𝕜 →+* 𝕜₃}

(hC : ∀ (x : E) (y : F), ‖(f x) y‖ ≤ C * ‖x‖ * ‖y‖)


@[simp]
theorem toMatrix_distrib_mul_action_toLinearMap (x : R) :
    LinearMap.toMatrix v₁ v₁ (DistribMulAction.toLinearMap R M₁ x) =
    Matrix.diagonal fun _ ↦ x

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)
(x : R)

(LinearMap.toMatrix v₁ v₁) (DistribMulAction.toLinearMap R M₁ x) = Matrix.diagonal fun x_1 => x


@[simp]
theorem smul_torsionBy (x : torsionBy R M a) : a • x = 0

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(a : R)
(x : ↥(Submodule.torsionBy R M a))


theorem of_constant_on_connected_components [LocallyConnectedSpace X] {f : X → Y}
    (h : ∀ x, ∀ y ∈ connectedComponent x, f y = f x) : IsLocallyConstant f

(h : ∀ (x y : X), y ∈ connectedComponent x → f y = f x)


@[to_additive]
protected theorem all [CommMagma S] (a b : S) : Commute a b


theorem lcm_mul_left {m n k : ℤ} : (m * n).lcm (m * k) = natAbs m * n.lcm k

(m * n).lcm (m * k) = m.natAbs * n.lcm k


@[to_additive]
theorem exponent_eq_zero_iff : exponent G = 0 ↔ ¬ExponentExists G

AddMonoid.exponent G = 0 ↔ ¬AddMonoid.ExponentExists G


@[to_additive existing (attr := simp) pow_addLeft]
lemma pow_mulLeft (n : ℕ) : Equiv.mulLeft a ^ n = Equiv.mulLeft (a ^ n)


theorem powersetCard_mono (n : ℕ) {s t : Multiset α} (h : s ≤ t) :
    powersetCard n s ≤ powersetCard n t

{α : Type u_1}
(n : ℕ)
{s t : Multiset α}
(h : s ≤ t)

Multiset.powersetCard n s ≤ Multiset.powersetCard n t


theorem MDifferentiableAt.congr_of_eventuallyEq (h : MDifferentiableAt I I' f x)
    (hL : f₁ =ᶠ[𝓝 x] f) : MDifferentiableAt I I' f₁ x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f f₁ : M → M'}
{x : M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(h : MDifferentiableAt I I' f x)
(hL : f₁ =ᶠ[𝓝 x] f)


/-- Pullback a `Nontrivial` instance along a surjective function. -/
protected theorem Function.Surjective.nontrivial [Nontrivial β] {f : α → β}
    (hf : Function.Surjective f) : Nontrivial α

{α : Type u_1}
{β : Type u_2}
[Nontrivial β]
{f : α → β}
(hf : Function.Surjective f)


/-- `BipointedToPointed_snd` is inverse to `PointedToBipointed`. -/
@[simps!]
def pointedToBipointedCompBipointedToPointedSnd :
    pointedToBipointed ⋙ bipointedToPointedSnd ≅ 𝟭 _

(X : Pointed)
(a : ((𝟭 Pointed).obj X).X)

(pointedToBipointedCompBipointedToPointedSnd.inv.app X).toFun a = a


theorem map_conj {X Y : C} (α : X ≅ Y) (f : End X) :
    F.map (α.conj f) = (F.mapIso α).conj (F.map f)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
(F : CategoryTheory.Functor C D)
{X Y : C}
(α : X ≅ Y)
(f : CategoryTheory.End X)


lemma add_mod_eq_ite :
    (m + n) % k = if k ≤ m % k + n % k then m % k + n % k - k else m % k + n % k


/-- The String representation produced by toDigitsCore has the proper length relative to
the number of digits in `n < e` for some base `b`. Since this works with any base greater
than one, it can be used for binary, decimal, and hex. -/
lemma toDigitsCore_length (b : Nat) (h : 2 <= b) (f n e : Nat)
    (hlt : n < b ^ e) (h_e_pos : 0 < e) : (Nat.toDigitsCore b f n []).length <= e


theorem lt_one_iff {a : SignType} : a < 1 ↔ a ≤ 0


/-- An auxiliary lemma that combines two “exponential of a power” estimates into a similar estimate
on the difference of the functions. -/
theorem isBigO_sub_exp_rpow {a : ℝ} {f g : ℂ → E} {l : Filter ℂ}
    (hBf : ∃ c < a, ∃ B, f =O[cobounded ℂ ⊓ l] fun z => expR (B * abs z ^ c))
    (hBg : ∃ c < a, ∃ B, g =O[cobounded ℂ ⊓ l] fun z => expR (B * abs z ^ c)) :
    ∃ c < a, ∃ B, (f - g) =O[cobounded ℂ ⊓ l] fun z => expR (B * abs z ^ c)

(hBf : ∃ c < a, ∃ B, f =O[Bornology.cobounded ℂ ⊓ l] fun z => expR (B * Complex.abs z ^ c))

(hBg : ∃ c < a, ∃ B, g =O[Bornology.cobounded ℂ ⊓ l] fun z => expR (B * Complex.abs z ^ c))

∃ c < a, ∃ B, (f - g) =O[Bornology.cobounded ℂ ⊓ l] fun z => expR (B * Complex.abs z ^ c)


@[mono]
theorem toSubsemigroup_mono : Monotone (toSubsemigroup : NonUnitalSubsemiring R → Subsemigroup R)

{R : Type u}
[NonUnitalNonAssocSemiring R]


@[simp]
theorem ofVector_nil : ↑(Vector.nil : Vector α 0) = (Sym.nil : Sym α 0)

Sym.ofVector Mathlib.Vector.nil = Sym.nil


theorem cos_eq_one_iff {x : ℂ} : cos x = 1 ↔ ∃ k : ℤ, k * (2 * π) = x

Complex.cos x = 1 ↔ ∃ k, ↑k * (2 * ↑Real.pi) = x


theorem leftUnitor_hom_toLinearMap :
    (λ_ (CoalgebraCat.of R M)).hom.1.toLinearMap = (TensorProduct.lid R M).toLinearMap

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

(CategoryTheory.MonoidalCategory.leftUnitor (CoalgebraCat.of R M)).hom.toCoalgHom.toLinearMap = ↑(TensorProduct.lid R M)


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

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}
(hf : Function.Surjective ⇑f)
(S : AddSubmonoid N)

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


theorem Ioi_pred_eq_insert (a : α) : Ioi (pred a) = insert a (Ioi a)

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
[NoMinOrder α]
(a : α)

Set.Ioi (Order.pred a) = insert a (Set.Ioi a)


/-- We say that a type has `MeasurableDiv₂` if `uncurry (· / ·)` is a measurable functions.
For a typeclass assuming measurability of `(c / ·)` and `(· / c)` see `MeasurableDiv`. -/
@[to_additive MeasurableSub₂]
class MeasurableDiv₂ (G₀ : Type*) [MeasurableSpace G₀] [Div G₀] : Prop where
  measurable_div : Measurable fun p : G₀ × G₀ => p.1 / p.2

{G₀ : Type u_2}
[MeasurableSpace G₀]
[Div G₀]
[self : MeasurableDiv₂ G₀]


theorem tendsto_iff_dist_tendsto_zero {f : β → α} {x : Filter β} {a : α} :
    Tendsto f x (𝓝 a) ↔ Tendsto (fun b => dist (f b) a) x (𝓝 0)

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
{f : β → α}
{x : Filter β}
{a : α}

Filter.Tendsto f x (𝓝 a) ↔ Filter.Tendsto (fun b => dist (f b) a) x (𝓝 0)


theorem snd_injective : Injective fun c : Concept α β r => c.snd

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}


theorem diff_inter {s t u : Set α} : s \ (t ∩ u) = s \ t ∪ s \ u


theorem bijective_bijInv (f_bij : Bijective f) : Bijective (bijInv f_bij)

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[DecidableEq β]
{f : α → β}
(f_bij : Function.Bijective f)


theorem bit0_of_bit0 : ∀ n, n + n = bit0 n


@[to_additive (attr := deprecated Monoid.one_lt_exponent (since := "2024-02-17"))
  AddGroup.one_lt_exponent]
lemma Group.one_lt_exponent [Finite G] [Nontrivial G] : 1 < Monoid.exponent G

{G : Type u}
[AddGroup G]
[Finite G]
[Nontrivial G]


theorem map_eq_none : f <$> x = none ↔ x = none

∀ {α α_1 : Type u_1} {f : α → α_1} {x : Option α}, f <$> x = none ↔ x = none


lemma update_ne_self_iff : update f a b ≠ f ↔ b ≠ f a

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


theorem arrowCongr_comp (e₁ : A₁ ≃ₐ[R] A₁') (e₂ : A₂ ≃ₐ[R] A₂')
    (e₃ : A₃ ≃ₐ[R] A₃') (f : A₁ →ₐ[R] A₂) (g : A₂ →ₐ[R] A₃) :
    arrowCongr e₁ e₃ (g.comp f) = (arrowCongr e₂ e₃ g).comp (arrowCongr e₁ e₂ f)

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
{A₃ : Type uA₃}
{A₁' : Type uA₁'}
{A₂' : Type uA₂'}
{A₃' : Type uA₃'}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Semiring A₃]
[Semiring A₁']
[Semiring A₂']
[Semiring A₃']
[Algebra R A₁]
[Algebra R A₂]
[Algebra R A₃]
[Algebra R A₁']
[Algebra R A₂']
[Algebra R A₃']
(e₁ : A₁ ≃ₐ[R] A₁')
(e₂ : A₂ ≃ₐ[R] A₂')
(e₃ : A₃ ≃ₐ[R] A₃')
(f : A₁ →ₐ[R] A₂)
(g : A₂ →ₐ[R] A₃)

(e₁.arrowCongr e₃) (g.comp f) = ((e₂.arrowCongr e₃) g).comp ((e₁.arrowCongr e₂) f)


theorem one_lt_encard_iff : 1 < s.encard ↔ ∃ a b, a ∈ s ∧ b ∈ s ∧ a ≠ b


/-- To check whether a morphism is coequalized by the maps of a pushout cocone, it suffices to check
  it for `inl t` and `inr t` -/
theorem coequalizer_ext (t : PushoutCocone f g) {W : C} {k l : t.pt ⟶ W}
    (h₀ : inl t ≫ k = inl t ≫ l) (h₁ : inr t ≫ k = inr t ≫ l) :
    ∀ j : WalkingSpan, t.ι.app j ≫ k = t.ι.app j ≫ l

(t : CategoryTheory.Limits.PushoutCocone f g)


@[simp]
theorem of'_apply (a : G) : of' k G a = single a 1

{k : Type u₁}
{G : Type u₂}
[Semiring k]
(a : G)

AddMonoidAlgebra.of' k G a = AddMonoidAlgebra.single a 1


theorem log_rpow {x : ℝ≥0∞} {y : ℝ} : log (x ^ y) = y * log x


theorem MeasurableEmbedding.prod_mk {α β γ δ : Type*} {mα : MeasurableSpace α}
    {mβ : MeasurableSpace β} {mγ : MeasurableSpace γ} {mδ : MeasurableSpace δ} {f : α → β}
    {g : γ → δ} (hg : MeasurableEmbedding g) (hf : MeasurableEmbedding f) :
    MeasurableEmbedding fun x : γ × α => (g x.1, f x.2)

{α : Type u_7}
{β : Type u_8}
{γ : Type u_9}
{δ : Type u_10}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{mγ : MeasurableSpace γ}
{mδ : MeasurableSpace δ}
{f : α → β}
{g : γ → δ}
(hg : MeasurableEmbedding g)
(hf : MeasurableEmbedding f)

MeasurableEmbedding fun x => (g x.1, f x.2)


@[to_additive (attr := simp)] lemma oneLePart_eq_self : a⁺ᵐ = a ↔ 1 ≤ a

{α : Type u_1}
[Lattice α]
[Group α]
{a : α}


@[simp]
theorem balanced_neg : Balanced 𝕜 (-s) ↔ Balanced 𝕜 s

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}


theorem isFractional_span_iff {s : Set P} :
    IsFractional S (span R s) ↔ ∃ a ∈ S, ∀ b : P, b ∈ s → IsInteger R (a • b)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{s : Set P}

IsFractional S (Submodule.span R s) ↔ ∃ a ∈ S, ∀ b ∈ s, IsLocalization.IsInteger R (a • b)


/-- For each object in `C`, there is a triangle of the form `(X,X,0,𝟙 X,0,0)`
-/
@[simps!]
def contractibleTriangle (X : C) : Triangle C

(CategoryTheory.Pretriangulated.contractibleTriangle X).mor₃ = 0


theorem span_eq_top_localization_localization {v : Set A} (hv : span R v = ⊤) :
    span Rₛ (algebraMap A Aₛ '' v) = ⊤

[hA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ]

Submodule.span Rₛ (⇑(algebraMap A Aₛ) '' v) = ⊤


theorem exists_mem_adjoin_mul_eq_pow_natDegree {x : S} (hx : aeval x f = 0) (hmo : f.Monic)
    (hf : f.IsWeaklyEisensteinAt (Submodule.span R {p})) : ∃ y ∈ adjoin R ({x} : Set S),
    (algebraMap R S) p * y = x ^ (f.map (algebraMap R S)).natDegree

∃ y ∈ Algebra.adjoin R {x}, (algebraMap R S) p * y = x ^ (Polynomial.map (algebraMap R S) f).natDegree


/-- The functor `(F, S) ⥤ (F ⋙ G, G(S))`. -/
@[simps]
def post (F : B ⥤ C) (G : C ⥤ D) (S : C) :
    CostructuredArrow F S ⥤ CostructuredArrow (F ⋙ G) (G.obj S)

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

∀ {X Y : CategoryTheory.CostructuredArrow F S} (f : X ⟶ Y),
  (CategoryTheory.CostructuredArrow.post F G S).map f = CategoryTheory.CostructuredArrow.homMk f.left ⋯


@[simp, norm_cast]
lemma ofENat_coe (n : ℕ) : ofENat n = n


/-- The image of a ball under addition with a singleton is another ball. -/
theorem vadd_ball (p : Seminorm 𝕜 E) : x +ᵥ p.ball y r = p.ball (x +ᵥ y) r

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


@[simp]
theorem sub_nat_iff : LiouvilleWith p (x - n) ↔ LiouvilleWith p x

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


theorem image_update_openSegment (i : ι) (x₁ x₂ : π i) (y : ∀ i, π i) :
    update y i '' openSegment 𝕜 x₁ x₂ = openSegment 𝕜 (update y i x₁) (update y i x₂)

{𝕜 : Type u_1}
{ι : Type u_5}
{π : ι → Type u_6}
[OrderedSemiring 𝕜]
[(i : ι) → AddCommMonoid (π i)]
[(i : ι) → Module 𝕜 (π i)]
[DecidableEq ι]
(i : ι)
(x₁ x₂ : π i)
(y : (i : ι) → π i)

Function.update y i '' openSegment 𝕜 x₁ x₂ = openSegment 𝕜 (Function.update y i x₁) (Function.update y i x₂)


@[simp]
theorem Composition.toCompositionAsSet_length (c : Composition n) :
    c.toCompositionAsSet.length = c.length


@[simp]
theorem transfer_transfer (hp) {K : SimpleGraph V} (hp') :
    (p.transfer H hp).transfer K hp' = p.transfer K (p.edges_transfer hp ▸ hp')

(hp' : ∀ e ∈ (p.transfer H hp).edges, e ∈ K.edgeSet)

(p.transfer H hp).transfer K hp' = p.transfer K ⋯


/-- A module `M` is Hausdorff with respect to an ideal `I` if `⋂ I^n M = 0`. -/
class IsHausdorff : Prop where
  haus' : ∀ x : M, (∀ n : ℕ, x ≡ 0 [SMOD (I ^ n • ⊤ : Submodule R M)]) → x = 0

{R : Type u_1}
[CommRing R]
{I : Ideal R}
{M : Type u_2}
[AddCommGroup M]
[Module R M]
[self : IsHausdorff I M]
(x : M)

(∀ (n : ℕ), x ≡ 0 [SMOD I ^ n • ⊤]) → x = 0


@[to_additive (attr := simp,norm_cast)]
theorem coe_div (s t : UpperSet α) : (↑(s / t) : Set α) = s / t

{α : Type u_1}
[OrderedAddCommGroup α]
(s t : UpperSet α)


@[simp]
theorem range_id : NonUnitalAlgHom.range (NonUnitalAlgHom.id R A) = ⊤

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]


theorem uniqueElim_preimage [Unique ι] (t : ∀ i, Set (α i)) :
    uniqueElim ⁻¹' pi univ t = t (default : ι)

{ι : Type u_1}
{α : ι → Type u_2}
[Unique ι]
(t : (i : ι) → Set (α i))

uniqueElim ⁻¹' Set.univ.pi t = t default


@[simp]
theorem inl_zero [Zero R] [Zero A] : (inl 0 : Unitization R A) = 0

{R : Type u_3}
(A : Type u_4)
[Zero R]
[Zero A]


/-- The functor from augmented objects to arrows. -/
@[simps]
def toArrow : Augmented C ⥤ Arrow C

(X : CategoryTheory.SimplicialObject.Augmented C)

(CategoryTheory.SimplicialObject.Augmented.toArrow.obj X).left =
  (CategoryTheory.SimplicialObject.Augmented.drop.obj X).obj (Opposite.op (SimplexCategory.mk 0))


theorem span_iUnion {ι} (s : ι → Set α) : span (⋃ i, s i) = ⨆ i, span (s i)

{α : Type u}
[Semiring α]
{ι : Sort u_1}
(s : ι → Set α)

Ideal.span (⋃ i, s i) = ⨆ i, Ideal.span (s i)


@[trans]
theorem ManyOneEquiv.trans {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ] {p : α → Prop}
    {q : β → Prop} {r : γ → Prop} : ManyOneEquiv p q → ManyOneEquiv q r → ManyOneEquiv p r

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
{p : α → Prop}
{q : β → Prop}
{r : γ → Prop}


theorem IsCoatom.Ici (ha : IsCoatom a) (hax : x ≤ a) : IsCoatom (⟨a, hax⟩ : Set.Ici x)

{α : Type u_2}
[Preorder α]
[OrderTop α]
{a x : α}
(ha : IsCoatom a)
(hax : x ≤ a)


@[simp]
lemma Scheme.iso_hom_val_base_inv_val_base_apply {X Y : Scheme.{u}} (e : X ≅ Y) (x : X) :
    (e.inv.val.base (e.hom.val.base x)) = x

{X Y : AlgebraicGeometry.Scheme}
(e : X ≅ Y)
(x : ↑↑X.toPresheafedSpace)


theorem leadingCoeff_det_X_one_add_C (A : Matrix n n α) :
    leadingCoeff (det ((X : α[X]) • (1 : Matrix n n α[X]) + A.map C)) = 1

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

(Polynomial.X • 1 + A.map ⇑Polynomial.C).det.leadingCoeff = 1


theorem frequently_nhds_subtype_iff (s : Set α) (a : s) (P : α → Prop) :
    (∃ᶠ x : s in 𝓝 a, P x) ↔ ∃ᶠ x in 𝓝[s] a, P x

{α : Type u_1}
[TopologicalSpace α]
(s : Set α)
(a : ↑s)
(P : α → Prop)

(∃ᶠ (x : ↑s) in 𝓝 a, P ↑x) ↔ ∃ᶠ (x : α) in 𝓝[s] ↑a, P x


theorem Complex.hasSum_cos' (z : ℂ) :
    HasSum (fun n : ℕ => (z * Complex.I) ^ (2 * n) / ↑(2 * n)!) (Complex.cos z)

HasSum (fun n => (z * Complex.I) ^ (2 * n) / ↑(2 * n)!) (Complex.cos z)


theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[f i] {ω | τ ω < i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[Preorder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
[PredOrder ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
(i : ι)


lemma ne_bot_of_isCartanSubalgebra [Nontrivial L] (H : LieSubalgebra R L) [H.IsCartanSubalgebra] :
    H ≠ ⊥

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[Nontrivial L]
(H : LieSubalgebra R L)
[H.IsCartanSubalgebra]


theorem compProd_null (a : α) (hs : MeasurableSet s) :
    (κ ⊗ₖ η) a s = 0 ↔ (fun b => η (a, b) (Prod.mk b ⁻¹' s)) =ᵐ[κ a] 0

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

((κ.compProd η) a) s = 0 ↔ (fun b => (η (a, b)) (Prod.mk b ⁻¹' s)) =ᵐ[κ a] 0


theorem Ioo_succ_right_eq_insert (h : a < b) : Ioo a (succ b) = insert b (Ioo a b)

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

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


/-- A rewrite lemma for `padicValNat p (a * b)` with conditions `a ≠ 0`, `b ≠ 0`. -/
protected theorem mul : a ≠ 0 → b ≠ 0 → padicValNat p (a * b) = padicValNat p a + padicValNat p b


lemma quotientInfToPiQuotient_inj (I : ι → Ideal R) : Injective (quotientInfToPiQuotient I)

{R : Type u}
[CommRing R]
{ι : Type u_1}
(I : ι → Ideal R)


/-- Determinant of 1x1 matrix -/
theorem det_fin_one (A : Matrix (Fin 1) (Fin 1) R) : det A = A 0 0

{R : Type v}
[CommRing R]
(A : Matrix (Fin 1) (Fin 1) R)


lemma AbsoluteValue.sum_le [Semiring R] [OrderedSemiring S] (abv : AbsoluteValue R S)
    (s : Finset ι) (f : ι → R) : abv (∑ i ∈ s, f i) ≤ ∑ i ∈ s, abv (f i)

{ι : Type u_1}
{R : Type u_2}
{S : Type u_3}
[Semiring R]
[OrderedSemiring S]
(abv : AbsoluteValue R S)
(s : Finset ι)
(f : ι → R)


/-- If x is algebraic over R, then x is algebraic over S when S is an extension of R,
  and the map from `R` to `S` is injective. -/
theorem IsAlgebraic.tower_top_of_injective
    (hinj : Function.Injective (algebraMap R S)) {x : A}
    (A_alg : IsAlgebraic R x) : IsAlgebraic S x

(hinj : Function.Injective ⇑(algebraMap R S))


lemma not_isUnit_of_mem_primeFactors {n p : ℕ} (h : p ∈ n.primeFactors) :
    ¬ IsUnit (p : ZMod n)


@[simp]
theorem denseRange_discrete {ι : Type*} {f : ι → α} : DenseRange f ↔ Surjective f

{α : Type u_1}
[TopologicalSpace α]
[DiscreteTopology α]
{ι : Type u_3}
{f : ι → α}


theorem tendstoUniformlyOn_univ : TendstoUniformlyOn F f p univ ↔ TendstoUniformly F f p

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

TendstoUniformlyOn F f p Set.univ ↔ TendstoUniformly F f p


theorem duplicate_cons_iff {y : α} : x ∈+ y :: l ↔ y = x ∧ x ∈ l ∨ x ∈+ l

List.Duplicate x (y :: l) ↔ y = x ∧ x ∈ l ∨ List.Duplicate x l


/-- The category of sheaves on a grothendieck topology. -/
structure SheafOfTypes (J : GrothendieckTopology C) : Type max u v (w + 1) where
  /-- the underlying presheaf -/
  val : Cᵒᵖ ⥤ Type w
  /-- the condition that the presheaf is a sheaf -/
  cond : Presieve.IsSheaf J val

{J : CategoryTheory.GrothendieckTopology C}


theorem coe_nsmul (n : ℕ) (x : ℝ) : ↑(n • x : ℝ) = n • (↑x : Angle)


theorem map_length_splitWrtCompositionAux {ns : List ℕ} :
    ∀ {l : List α}, ns.sum ≤ l.length → map length (l.splitWrtCompositionAux ns) = ns

{α : Type u_1}
{ns : List ℕ}
{l : List α}

ns.sum ≤ l.length → List.map List.length (l.splitWrtCompositionAux ns) = ns


@[to_additive]
theorem coe_ker (f : G →* M) : (f.ker : Set G) = (f : G → M) ⁻¹' {1}

{G : Type u_1}
[AddGroup G]
{M : Type u_7}
[AddZeroClass M]
(f : G →+ M)


@[simp] theorem succ_pos (a : Fin n) : (0 : Fin (n + 1)) < a.succ


theorem tendsto_insertNth {n : ℕ} {i : Fin (n + 1)} {a : α} :
    ∀ {l : Vector α n},
      Tendsto (fun p : α × Vector α n => Vector.insertNth p.1 i p.2) (𝓝 a ×ˢ 𝓝 l)
        (𝓝 (Vector.insertNth a i l))

{α : Type u_1}
[TopologicalSpace α]
{n : ℕ}
{i : Fin (n + 1)}
{a : α}
{l : Mathlib.Vector α n}

Filter.Tendsto (fun p => Mathlib.Vector.insertNth p.1 i p.2) (𝓝 a ×ˢ 𝓝 l) (𝓝 (Mathlib.Vector.insertNth a i l))


@[simp]
theorem «exists» {p : PProd α β → Prop} : (∃ x, p x) ↔ ∃ a b, p ⟨a, b⟩

{α : Sort u_1}
{β : Sort u_2}
{p : PProd α β → Prop}


@[to_additive] theorem of_mulHom (f : H →ₙ* G)
    (hf : ∀ ⦃a b c d : H⦄, a * b = c * d → f a = f c ∧ f b = f d → a = c ∧ b = d)
    [TwoUniqueProds G] : TwoUniqueProds H


@[simp]
theorem refl_prod_refl :
    (PartialHomeomorph.refl X).prod (PartialHomeomorph.refl Y) = PartialHomeomorph.refl (X × Y)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem norm_setToL1SCLM_le {T : Set α → E →L[ℝ] F} {C : ℝ} (hT : DominatedFinMeasAdditive μ T C)
    (hC : 0 ≤ C) : ‖setToL1SCLM α E μ hT‖ ≤ C

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

‖MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT‖ ≤ C


lemma IsIntegralCurveAt.hasMFDerivAt (h : IsIntegralCurveAt γ v t₀) :
    HasMFDerivAt 𝓘(ℝ, ℝ) I γ t₀ ((1 : ℝ →L[ℝ] ℝ).smulRight (v (γ t₀)))

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
{t₀ : ℝ}
(h : IsIntegralCurveAt γ v t₀)

HasMFDerivAt 𝓘(ℝ, ℝ) I γ t₀ (ContinuousLinearMap.smulRight 1 (v (γ t₀)))


/-- Auxiliary lemma:
Multivariate polynomials over an integral domain
with variables indexed by `Fin n` form an integral domain.
This fact is proven inductively,
and then used to prove the general case without any finiteness hypotheses.
See `MvPolynomial.noZeroDivisors` for the general case. -/
theorem noZeroDivisors_fin (R : Type u) [CommSemiring R] [NoZeroDivisors R] :
    ∀ n : ℕ, NoZeroDivisors (MvPolynomial (Fin n) R)

(R : Type u)
[CommSemiring R]
[NoZeroDivisors R]
(n : ℕ)


theorem subset_Icc_csInf_csSup (hb : BddBelow s) (ha : BddAbove s) : s ⊆ Icc (sInf s) (sSup s)

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
(hb : BddBelow s)
(ha : BddAbove s)


/-- An absolute value `abv : R → S` is Euclidean if it is compatible with the
`EuclideanDomain` structure on `R`, namely `abv` is strictly monotone with respect to the well
founded relation `≺` on `R`. -/
structure IsEuclidean : Prop where
  /-- The requirement of a Euclidean absolute value
  that `abv` is monotone with respect to `≺` -/
  map_lt_map_iff' : ∀ {x y}, abv x < abv y ↔ x ≺ y

{R : Type u_1}
{S : Type u_2}
[EuclideanDomain R]
[OrderedSemiring S]
{abv : AbsoluteValue R S}
(self : abv.IsEuclidean)
{x y : R}


@[to_additive (attr := simp) negPart_pos_iff] lemma one_lt_ltOnePart_iff : 1 < a⁻ᵐ ↔ a < 1

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


theorem nextOr_concat {xs : List α} {x : α} (d : α) (h : x ∉ xs) : nextOr (xs ++ [x]) x d = d

{α : Type u_1}
[DecidableEq α]
{xs : List α}
{x : α}
(d : α)
(h : x ∉ xs)


/-- The image of a von Neumann bounded set under a continuous multilinear map
is von Neumann bounded.

This version assumes that the codomain is a topological vector space.
-/
theorem image_multilinear [ContinuousSMul 𝕜 F] {s : Set (∀ i, E i)} (hs : IsVonNBounded 𝕜 s)
    (f : ContinuousMultilinearMap 𝕜 E F) : IsVonNBounded 𝕜 (f '' s)

{ι : Type u_1}
{𝕜 : Type u_2}
{F : Type u_3}
{E : ι → Type u_4}
[NormedField 𝕜]
[(i : ι) → AddCommGroup (E i)]
[(i : ι) → Module 𝕜 (E i)]
[(i : ι) → TopologicalSpace (E i)]
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[ContinuousSMul 𝕜 F]
{s : Set ((i : ι) → E i)}
(hs : Bornology.IsVonNBounded 𝕜 s)
(f : ContinuousMultilinearMap 𝕜 E F)


@[simp]
lemma leftHomologyMap_id [HasLeftHomology S] :
    leftHomologyMap (𝟙 S) = 𝟙 _

CategoryTheory.ShortComplex.leftHomologyMap (CategoryTheory.CategoryStruct.id S) =
  CategoryTheory.CategoryStruct.id S.leftHomology


theorem get_strictMono (h : l.Sorted (· < ·)) : StrictMono l.get

(h : List.Sorted (fun x x_1 => x < x_1) l)


lemma map_prodMkRight (κ : Kernel α β) (γ : Type*) [MeasurableSpace γ]
    {f : β → δ} (hf : Measurable f) :
    map (prodMkRight γ κ) f hf = prodMkRight γ (map κ f hf)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{δ : Type u_4}
{mδ : MeasurableSpace δ}
(κ : ProbabilityTheory.Kernel α β)
(γ : Type u_6)
[MeasurableSpace γ]
{f : β → δ}
(hf : Measurable f)

(ProbabilityTheory.Kernel.prodMkRight γ κ).map f hf = ProbabilityTheory.Kernel.prodMkRight γ (κ.map f hf)


@[simp] theorem pure_eq (a : α) : (pure a : Id α) = a


@[simp] lemma tensorAssoc_symm_apply
    (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) (Q₃ : QuadraticForm R M₃)
    (x : M₁ ⊗[R] (M₂ ⊗[R] M₃)) :
    (tensorAssoc Q₁ Q₂ Q₃).symm x = (TensorProduct.assoc R M₁ M₂ M₃).symm x

{R : Type uR}
{M₁ : Type uM₁}
{M₂ : Type uM₂}
{M₃ : Type uM₃}
[CommRing R]
[AddCommGroup M₁]
[AddCommGroup M₂]
[AddCommGroup M₃]
[Module R M₁]
[Module R M₂]
[Module R M₃]
[Invertible 2]
(Q₁ : QuadraticForm R M₁)
(Q₂ : QuadraticForm R M₂)
(Q₃ : QuadraticForm R M₃)
(x : M₁ ⊗[R] M₂ ⊗[R] M₃)

(Q₁.tensorAssoc Q₂ Q₃).symm x = (TensorProduct.assoc R M₁ M₂ M₃).symm x


theorem sdiff_union_inter (s t : Finset α) : s \ t ∪ s ∩ t = s

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


theorem if_eq_of_eq (c : Prop) [d : Decidable c] {α : Sort u} {t e : α} (h : t = e) :
    @ite α c d t e = t


@[simp]
theorem coe_ofNormedAddCommGroupDiscrete {α : Type u} {β : Type v} [TopologicalSpace α]
    [DiscreteTopology α] [SeminormedAddCommGroup β] (f : α → β) (C : ℝ) (H : ∀ x, ‖f x‖ ≤ C) :
    (ofNormedAddCommGroupDiscrete f C H : α → β) = f

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[DiscreteTopology α]
[SeminormedAddCommGroup β]
(f : α → β)
(C : ℝ)
(H : ∀ (x : α), ‖f x‖ ≤ C)

⇑(BoundedContinuousFunction.ofNormedAddCommGroupDiscrete f C H) = f


theorem opow_mul_add_lt_opow_succ {b u v w : Ordinal} (hvb : v < b) (hw : w < b ^ u) :
    b ^ u * v + w < b ^ succ u

{b u v w : Ordinal.{u_1}}
(hvb : v < b)
(hw : w < b ^ u)


@[simp] theorem some_orElse (a : α) (x : Option α) : (some a <|> x) = some a

(HOrElse.hOrElse (some a) fun x_1 => x) = some a


lemma oddKernel_neg (a : UnitAddCircle) (x : ℝ) : oddKernel (-a) x = -oddKernel a x

HurwitzZeta.oddKernel (-a) x = -HurwitzZeta.oddKernel a x


/-- The functor which sends a split simplicial object in a preadditive category to
the chain complex which consists of nondegenerate simplices. -/
@[simps]
noncomputable def nondegComplexFunctor : Split C ⥤ ChainComplex C ℕ

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : SimplicialObject.Split C}
(Φ : S₁ ⟶ S₂)
(n : ℕ)

(SimplicialObject.Split.nondegComplexFunctor.map Φ).f n = Φ.f n


theorem summable_bernoulli_fourier {k : ℕ} (hk : 2 ≤ k) :
    Summable (fun n => -k ! / (2 * π * I * n) ^ k : ℤ → ℂ)

Summable fun n => -↑k ! / (2 * ↑π * Complex.I * ↑n) ^ k


theorem sup_toSubalgebra_of_left [FiniteDimensional K E1] :
    (E1 ⊔ E2).toSubalgebra = E1.toSubalgebra ⊔ E2.toSubalgebra

{K : Type u_3}
{L : Type u_4}
[Field K]
[Field L]
[Algebra K L]
(E1 E2 : IntermediateField K L)
[FiniteDimensional K ↥E1]


theorem linearDependent_comp_subtype' {s : Set ι} :
    ¬LinearIndependent R (v ∘ (↑) : s → M) ↔
      ∃ f : ι →₀ R, f ∈ Finsupp.supported R R s ∧ Finsupp.total ι M R v f = 0 ∧ f ≠ 0

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{v : ι → M}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set ι}

¬LinearIndependent (ι := ↑s) R (v ∘ Subtype.val) ↔ ∃ f ∈ Finsupp.supported R R s, (Finsupp.total ι M R v) f = 0 ∧ f ≠ 0


/-- The Cauchy formula for the derivative of a holomorphic function. -/
theorem two_pi_I_inv_smul_circleIntegral_sub_sq_inv_smul_of_differentiable {U : Set ℂ}
    (hU : IsOpen U) {c w₀ : ℂ} {R : ℝ} {f : ℂ → E} (hc : closedBall c R ⊆ U)
    (hf : DifferentiableOn ℂ f U) (hw₀ : w₀ ∈ ball c R) :
    ((2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = deriv f w₀

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[CompleteSpace E]
{U : Set ℂ}
(hU : IsOpen U)
{c w₀ : ℂ}
{R : ℝ}
{f : ℂ → E}
(hc : Metric.closedBall c R ⊆ U)
(hf : DifferentiableOn ℂ f U)
(hw₀ : w₀ ∈ Metric.ball c R)

((2 * ↑π * Complex.I)⁻¹ • ∮ (z : ℂ) in C(c, R), ((z - w₀) ^ 2)⁻¹ • f z) = deriv f w₀


protected theorem congr_arg {x x'} : x = x' → e x = e x'

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
{e : A ≃ₗc[R] B}
{x x' : A}


/-- See also `Finset.inf'_prodMap`. -/
lemma prodMk_inf'_inf' (hs : s.Nonempty) (ht : t.Nonempty) (f : ι → α) (g : κ → β) :
    (inf' s hs f, inf' t ht g) = inf' (s ×ˢ t) (hs.product ht) (Prod.map f g)

{ι : Type u_7}
{κ : Type u_8}
{α : Type u_9}
{β : Type u_10}
[SemilatticeInf α]
[SemilatticeInf β]
{s : Finset ι}
{t : Finset κ}
(hs : s.Nonempty)
(ht : t.Nonempty)
(f : ι → α)
(g : κ → β)

(s.inf' hs f, t.inf' ht g) = (s ×ˢ t).inf' ⋯ (Prod.map f g)


theorem closedEmbedding_iff_closedEmbedding_of_iSup_eq_top (h : Continuous f) :
    ClosedEmbedding f ↔ ∀ i, ClosedEmbedding ((U i).1.restrictPreimage f)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{ι : Type u_3}
{U : ι → TopologicalSpace.Opens β}
(hU : iSup U = ⊤)
(h : Continuous f)

ClosedEmbedding f ↔ ∀ (i : ι), ClosedEmbedding ((U i).carrier.restrictPreimage f)


theorem USize.le_size : 2 ^ 32 ≤ USize.size


theorem lowerSemicontinuousWithinAt_sum {f : ι → α → γ} {a : Finset ι}
    (ha : ∀ i ∈ a, LowerSemicontinuousWithinAt (f i) s x) :
    LowerSemicontinuousWithinAt (fun z => ∑ i ∈ a, f i z) s x

{f : ι → α → γ}


theorem ContDiffAt.log {n} (hf : ContDiffAt ℝ n f x) (hx : f x ≠ 0) :
    ContDiffAt ℝ n (fun x => log (f x)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{n : ℕ∞}
(hf : ContDiffAt ℝ n f x)
(hx : f x ≠ 0)

ContDiffAt ℝ n (fun x => Real.log (f x)) x


theorem lt_sizeUpTo_index_succ (j : Fin n) : (j : ℕ) < c.sizeUpTo (c.index j).succ


theorem mfderivWithin_eq_mfderiv (hs : UniqueMDiffWithinAt I s x) (h : MDifferentiableAt I I' f x) :
    mfderivWithin I I' f s x = mfderiv I I' f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{x : M}
{s : Set M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(hs : UniqueMDiffWithinAt I s x)
(h : MDifferentiableAt I I' f x)


@[simp]
theorem coe_bot [Preorder α] [OrderBot α] : (⊥ : Iic a) = (⊥ : α)

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


protected theorem HasAntitoneBasis.mem [Preorder ι] {l : Filter α} {s : ι → Set α}
    (hs : l.HasAntitoneBasis s) (i : ι) : s i ∈ l

{α : Type u_1}
{ι : Type u_4}
[Preorder ι]
{l : Filter α}
{s : ι → Set α}
(hs : l.HasAntitoneBasis s)
(i : ι)


theorem lcm_dvd {i j k : ℤ} : i ∣ k → j ∣ k → (lcm i j : ℤ) ∣ k


@[to_additive (attr := simp)]
theorem lift_inr_inl : lift (inr : M →* N ∗ M) inl = swap M N

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

AddMonoid.Coprod.lift AddMonoid.Coprod.inr AddMonoid.Coprod.inl = AddMonoid.Coprod.swap M N


@[ext] theorem PProd.ext : {x y : PProd α β} → x.fst = y.fst → x.snd = y.snd → x = y

{α : Sort u_1}
{β : Sort u_2}
{x y : PProd α β}


lemma transGen_covBy_of_lt [Preorder α] [LocallyFiniteOrder α] {x y : α} (hxy : x < y) :
    TransGen (· ⋖ ·) x y

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{x y : α}
(hxy : x < y)

Relation.TransGen (fun x x_1 => x ⋖ x_1) x y


theorem ContinuousSMul.of_nhds_zero [TopologicalRing R] [TopologicalAddGroup M]
    (hmul : Tendsto (fun p : R × M => p.1 • p.2) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0))
    (hmulleft : ∀ m : M, Tendsto (fun a : R => a • m) (𝓝 0) (𝓝 0))
    (hmulright : ∀ a : R, Tendsto (fun m : M => a • m) (𝓝 0) (𝓝 0)) : ContinuousSMul R M

(hmul : Filter.Tendsto (fun p => p.1 • p.2) (𝓝 0 ×ˢ 𝓝 0) (𝓝 0))

(hmulleft : ∀ (m : M), Filter.Tendsto (fun a => a • m) (𝓝 0) (𝓝 0))

(hmulright : ∀ (a : R), Filter.Tendsto (fun m => a • m) (𝓝 0) (𝓝 0))


@[simp]
theorem interior_mem_nhds : interior s ∈ 𝓝 x ↔ s ∈ 𝓝 x

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


@[simp]
theorem bihimp_snd [GeneralizedHeytingAlgebra α] [GeneralizedHeytingAlgebra β] (a b : α × β) :
    (a ⇔ b).2 = a.2 ⇔ b.2

{α : Type u_2}
{β : Type u_3}
[GeneralizedHeytingAlgebra α]
[GeneralizedHeytingAlgebra β]
(a b : α × β)


theorem sOppSide_lineMap_left {s : AffineSubspace R P} {x y : P} (hx : x ∈ s) (hy : y ∉ s) {t : R}
    (ht : t < 0) : s.SOppSide (lineMap x y t) y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
(hx : x ∈ s)
(hy : y ∉ s)
{t : R}
(ht : t < 0)

s.SOppSide ((AffineMap.lineMap x y) t) y


theorem adjoin_union (s t : Set A) : adjoin R (s ∪ t) = adjoin R s ⊔ adjoin R t

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

Algebra.adjoin R (s ∪ t) = Algebra.adjoin R s ⊔ Algebra.adjoin R t


protected theorem measurableSet_eq_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω = i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
[Countable ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
(i : ι)


nonrec theorem _root_.IsUnit.aestronglyMeasurable_const_smul_iff {c : M} (hc : IsUnit c) :
    AEStronglyMeasurable (fun x => c • f x) μ ↔ AEStronglyMeasurable f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
{f : α → β}
{M : Type u_5}
[Monoid M]
[MulAction M β]
[ContinuousConstSMul M β]
{c : M}
(hc : IsUnit c)

MeasureTheory.AEStronglyMeasurable (fun x => c • f x) μ ↔ MeasureTheory.AEStronglyMeasurable f μ


@[simp]
theorem ihom_adjunction_unit : (ihom.adjunction A).unit = coev A

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

(CategoryTheory.ihom.adjunction A).unit = CategoryTheory.ihom.coev A


theorem Poly.mul_denote (ctx : Context) (p₁ p₂ : Poly) : (p₁.mul p₂).denote ctx = p₁.denote ctx * p₂.denote ctx

(ctx : Nat.Linear.Context)
(p₂ p₁ acc : Nat.SOM.Poly)

Nat.SOM.Poly.denote ctx (Nat.SOM.Poly.mul.go p₂ p₁ acc) =
  Nat.SOM.Poly.denote ctx acc + Nat.SOM.Poly.denote ctx p₁ * Nat.SOM.Poly.denote ctx p₂


theorem irrational_sqrt_ratCast_iff {q : ℚ} :
    Irrational (√q) ↔ ¬IsSquare q ∧ 0 ≤ q


@[simp]
theorem app_sum {ι : Type*} (s : Finset ι) (X : C) (α : ι → (F ⟶ G)) :
    (∑ i ∈ s, α i).app X = ∑ i ∈ s, (α i).app X

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Preadditive D]
{F G : CategoryTheory.Functor C D}
{ι : Type u_3}
(s : Finset ι)
(X : C)
(α : ι → (F ⟶ G))


@[to_additive coe_prod]
theorem coe_prod (f : M →ₙ* N) (g : M →ₙ* P) : ⇑(f.prod g) = Pi.prod f g

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[Mul M]
[Mul N]
[Mul P]
(f : M →ₙ* N)
(g : M →ₙ* P)


theorem le_add_left (s t : Multiset α) : s ≤ t + s


theorem range_vecMulLinear (M : Matrix m n R) :
    LinearMap.range M.vecMulLinear = span R (range M)

{R : Type u_1}
[Semiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype m]
(M : Matrix m n R)

LinearMap.range M.vecMulLinear = Submodule.span R (Set.range M)


theorem InfinitePos.pos {x : ℝ*} (hip : InfinitePos x) : 0 < x


@[symm]
protected theorem symm [Monoid α] : ∀ {x y : α}, x ~ᵤ y → y ~ᵤ x


theorem gt_iff_ne (h : a ≤ b) : a < b ↔ b ≠ a

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


theorem homeomorphCircle'_apply_mk (x : ℝ) : homeomorphCircle' x = expMapCircle x

AddCircle.homeomorphCircle' ↑x = expMapCircle x


theorem Uniform.tendsto_congr {α β} [UniformSpace β] {f g : α → β} {l : Filter α} {b : β}
    (hfg : Tendsto (fun x => (f x, g x)) l (𝓤 β)) : Tendsto f l (𝓝 b) ↔ Tendsto g l (𝓝 b)

(hfg : Filter.Tendsto (fun x => (f x, g x)) l (𝓤 β))

Filter.Tendsto f l (𝓝 b) ↔ Filter.Tendsto g l (𝓝 b)


theorem map_eq_zero_of_eq (v : ι → M) {i j : ι} (h : v i = v j) (hij : i ≠ j) : f v = 0

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(f : M [⋀^ι]→L[R] N)
(v : ι → M)
{i j : ι}
(h : v i = v j)
(hij : i ≠ j)


theorem abs_dvd_abs (a b : α) : |a| ∣ |b| ↔ a ∣ b

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


theorem add_right_cancel [IsRightCancelAdd α] (ha : a ≠ ⊥) (h : b + a = c + a) : b = c

{α : Type u}
[Add α]
{a b c : WithBot α}
[IsRightCancelAdd α]
(ha : a ≠ ⊥)
(h : b + a = c + a)


theorem integrableOn_Ico_iff_integrableOn_Ioo' (ha : μ {a} ≠ ∞) :
    IntegrableOn f (Ico a b) μ ↔ IntegrableOn f (Ioo a b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{a b : α}
(ha : μ {a} ≠ ⊤)

MeasureTheory.IntegrableOn f (Set.Ico a b) μ ↔ MeasureTheory.IntegrableOn f (Set.Ioo a b) μ


@[instance]
theorem Measure.isFiniteMeasure_map {m : MeasurableSpace α} (μ : Measure α) [IsFiniteMeasure μ]
    (f : α → β) : IsFiniteMeasure (μ.map f)

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

MeasureTheory.IsFiniteMeasure (MeasureTheory.Measure.map f μ)


theorem linearIndependent_sUnion_of_directed {s : Set (Set M)} (hs : DirectedOn (· ⊆ ·) s)
    (h : ∀ a ∈ s, LinearIndependent R ((↑) : ((a : Set M) : Type _) → M)) :
    LinearIndependent R (fun x => x : ⋃₀ s → M)

(hs : DirectedOn (fun x x_1 => x ⊆ x_1) s)

(h : ∀ a ∈ s, LinearIndependent (ι := { x // x ∈ a }) R Subtype.val)

LinearIndependent R fun (x : ↑(⋃₀ s)) => ↑x


@[simp] theorem countP_cons_of_pos (l) (pa : p a) : countP p (a :: l) = countP p l + 1

{α : Type u_1}
(p : α → Bool)
{a : α}
(l : List α)
(pa : p a = true)

List.countP p (a :: l) = List.countP p l + 1


@[simp]
theorem dom_prodMap (f : α →. γ) (g : β →. δ) :
    (f.prodMap g).Dom = { x | (f x.1).Dom ∧ (g x.2).Dom }

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

(f.prodMap g).Dom = {x | (f x.1).Dom ∧ (g x.2).Dom}


lemma sqrt_le (n : ℕ) : sqrt n * sqrt n ≤ n


@[reassoc (attr := simp)]
theorem pentagon_hom_inv_inv_inv_hom (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e) :
    (α_ f g (h ≫ i)).hom ≫ f ◁ (α_ g h i).inv ≫ (α_ f (g ≫ h) i).inv =
    (α_ (f ≫ g) h i).inv ≫ (α_ f g h).hom ▷ i

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c d e : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)
(i : d ⟶ e)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.comp h i)).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.associator g h i).inv)
      (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.comp g h) i).inv) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator (CategoryTheory.CategoryStruct.comp f g) h i).inv
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.associator f g h).hom i)


@[to_additive]
theorem ContMDiff.inv {f : M → G} (hf : ContMDiff I' I n f) : ContMDiff I' I n fun x => (f x)⁻¹

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[AddGroup G]
[LieAddGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{n : ℕ∞}
{f : M → G}
(hf : ContMDiff I' I n f)


theorem StrictAnti.maximal_of_minimal_image (hf : StrictAnti f) {a} (hmin : ∀ p, f a ≤ p) (x : α) :
    x ≤ a

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
(hf : StrictAnti f)
{a : α}
(hmin : ∀ (p : β), f a ≤ p)
(x : α)


theorem dvd_of_mod_eq_zero {m n : Nat} (H : n % m = 0) : m ∣ n


theorem sigma_ι_openEmbedding : OpenEmbedding (colimit.ι F i).base

(F : CategoryTheory.Discrete ι ⥤ AlgebraicGeometry.SheafedSpace C)

OpenEmbedding ⇑(CategoryTheory.Limits.colimit.ι F i).base


theorem isClosedMap_const {X Y} [TopologicalSpace X] [TopologicalSpace Y] [T1Space Y] {y : Y} :
    IsClosedMap (Function.const X y)

{X : Type u_3}
{Y : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[T1Space Y]
{y : Y}


theorem toLp_add (f g : α →ₛ E) (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    toLp (f + g) (hf.add hg) = toLp f hf + toLp g hg

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
(f g : MeasureTheory.SimpleFunc α E)
(hf : MeasureTheory.Memℒp (↑f) p μ)
(hg : MeasureTheory.Memℒp (↑g) p μ)

MeasureTheory.Lp.simpleFunc.toLp (f + g) ⋯ =
  MeasureTheory.Lp.simpleFunc.toLp f hf + MeasureTheory.Lp.simpleFunc.toLp g hg


theorem nadd_le_nadd_right (h : b ≤ c) (a) : b ♯ a ≤ c ♯ a

{b c : Ordinal.{u}}
(h : b ≤ c)
(a : Ordinal.{u})


/-- A structure designed to hold the hypotheses for the Mellin-functional-equation argument
(version without constant terms) -/
structure StrongFEPair extends WeakFEPair E where (hf₀ : f₀ = 0) (hg₀ : g₀ = 0)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(self : StrongFEPair E)


lemma hurwitzZetaOdd_eq (a : UnitAddCircle) (s : ℂ) :
    hurwitzZetaOdd a s = (hurwitzZeta a s - hurwitzZeta (-a) s) / 2

HurwitzZeta.hurwitzZetaOdd a s = (HurwitzZeta.hurwitzZeta a s - HurwitzZeta.hurwitzZeta (-a) s) / 2


/-- The determinant of `rotation` (as a linear equiv) is equal to `1`. -/
@[simp]
theorem linearEquiv_det_rotation (a : circle) : LinearEquiv.det (rotation a).toLinearEquiv = 1


/-- If `α` is a preorder with no maximal elements, then there exists a strictly monotone function
`ℕ → α` with any prescribed value of `f 0`. -/
theorem exists_strictMono' [NoMaxOrder α] (a : α) : ∃ f : ℕ → α, StrictMono f ∧ f 0 = a

{α : Type u}
[Preorder α]
[NoMaxOrder α]
(a : α)


@[simp]
theorem linearEquivFunOnFinite_symm_coe (f : α →₀ M) : (linearEquivFunOnFinite R M α).symm f = f

(R : Type u_1)
(M : Type u_3)
(α : Type u_4)
[Finite α]
[AddCommMonoid M]
[Semiring R]
[Module R M]
(f : α →₀ M)

(Finsupp.linearEquivFunOnFinite R M α).symm ⇑f = f


lemma comm_trans_rTensor_trans_comm_eq (g : N ≃ₗ[R] P) :
    TensorProduct.comm R Q N ≪≫ₗ rTensor Q g ≪≫ₗ TensorProduct.comm R P Q = lTensor Q g

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

TensorProduct.comm R Q N ≪≫ₗ LinearEquiv.rTensor Q g ≪≫ₗ TensorProduct.comm R P Q = LinearEquiv.lTensor Q g


theorem kroneckerMap_add_right [Add β] [Add γ] (f : α → β → γ)
    (hf : ∀ a b₁ b₂, f a (b₁ + b₂) = f a b₁ + f a b₂) (A : Matrix l m α) (B₁ B₂ : Matrix n p β) :
    kroneckerMap f A (B₁ + B₂) = kroneckerMap f A B₁ + kroneckerMap f A B₂

(f : α → β → γ)

(hf : ∀ (a : α) (b₁ b₂ : β), f a (b₁ + b₂) = f a b₁ + f a b₂)

Matrix.kroneckerMap f A (B₁ + B₂) = Matrix.kroneckerMap f A B₁ + Matrix.kroneckerMap f A B₂


theorem isUpperSet_of_isClosed (h : IsClosed s) : IsUpperSet s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsLower α]
{s : Set α}
(h : IsClosed s)


/-- On a finite product space, a product of integrable functions depending on each coordinate is
integrable. Version with dependent target. -/
theorem Integrable.fintype_prod_dep {ι : Type*} [Fintype ι] {E : ι → Type*}
    {f : (i : ι) → E i → 𝕜} [∀ i, MeasureSpace (E i)] [∀ i, SigmaFinite (volume : Measure (E i))]
    (hf : ∀ i, Integrable (f i)) :
    Integrable (fun (x : (i : ι) → E i) ↦ ∏ i, f i (x i))

[(i : ι) → MeasureTheory.MeasureSpace (E i)]

[∀ (i : ι), MeasureTheory.SigmaFinite MeasureTheory.volume]

(hf : ∀ (i : ι), MeasureTheory.Integrable (f i) MeasureTheory.volume)

MeasureTheory.Integrable (fun x => ∏ i : ι, f i (x i)) MeasureTheory.volume


theorem uniqueMDiffOn_image_aux (h : M ≃ₘ^n⟮I, J⟯ N) (hn : 1 ≤ n) {s : Set M}
    (hs : UniqueMDiffOn I s) : UniqueMDiffOn J (h '' s)

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


theorem opRingEquiv_op_C_mul_X_pow (r : R) (n : ℕ) :
    opRingEquiv R (op (C r * X ^ n : R[X])) = C (op r) * X ^ n

{R : Type u_1}
[Semiring R]
(r : R)
(n : ℕ)

(Polynomial.opRingEquiv R) (MulOpposite.op (Polynomial.C r * Polynomial.X ^ n)) =
  Polynomial.C (MulOpposite.op r) * Polynomial.X ^ n


theorem eventuallyConst_of_isNoetherian [IsNoetherian R M] (f : ℕ →o Submodule R M) :
    atTop.EventuallyConst f

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[IsNoetherian R M]
(f : ℕ →o Submodule R M)


theorem variance {n : ℕ} (h : 0 < (n : ℝ)) (x : I) :
    (∑ k : Fin (n + 1), (x - k/ₙ : ℝ) ^ 2 * bernstein n k x) = (x : ℝ) * (1 - x) / n

∑ k : Fin (n + 1), (↑x - ↑k/ₙ) ^ 2 * (bernstein n ↑k) x = ↑x * (1 - ↑x) / ↑n


@[simp]
theorem str_hom_commute (X Y : Compactum) (f : X ⟶ Y) (xs : Ultrafilter X) :
    f (X.str xs) = Y.str (map f xs)

(X Y : Compactum)
(f : X ⟶ Y)
(xs : Ultrafilter X.A)

f.f (X.str xs) = Y.str (Ultrafilter.map f.f xs)


/-- If `M` and `M'` are free (and lie in the same universe), the rank of `M × M'` is
  `(Module.rank R M) + (Module.rank R M')`. -/
theorem rank_prod' : Module.rank R (M × M₁) = Module.rank R M + Module.rank R M₁

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


@[simp] lemma id_f₁ : Hom.f₁ (𝟙 S) = 𝟙 _

(S : CategoryTheory.ShortComplex.SnakeInput C)

(CategoryTheory.CategoryStruct.id S).f₁ = CategoryTheory.CategoryStruct.id S.L₁


/-- For subgroups generated by a single element, see the simpler `zpow_induction_left`. -/
@[to_additive (attr := elab_as_elim)
  "For additive subgroups generated by a single element, see the simpler
  `zsmul_induction_left`."]
theorem closure_induction_left {p : (x : G) → x ∈ closure s → Prop} (one : p 1 (one_mem _))
    (mul_left : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy → p (x * y) (mul_mem (subset_closure hx) hy))
    (mul_left_inv : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy →
      p (x⁻¹ * y) (mul_mem (inv_mem (subset_closure hx)) hy))
    {x : G} (h : x ∈ closure s) : p x h

{p : (x : G) → x ∈ Subgroup.closure s → Prop}

(mul_left : ∀ (x : G) (hx : x ∈ s) (y : G) (hy : y ∈ Subgroup.closure s), p y hy → p (x * y) ⋯)

(mul_left_inv : ∀ (x : G) (hx : x ∈ s) (y : G) (hy : y ∈ Subgroup.closure s), p y hy → p (x⁻¹ * y) ⋯)


theorem moveRight_smaller {b : Board} {m : ℤ × ℤ} (h : m ∈ right b) :
    Finset.card (moveRight b m) / 2 < Finset.card b / 2

(h : m ∈ SetTheory.PGame.Domineering.right b)

Finset.card (SetTheory.PGame.Domineering.moveRight b m) / 2 < Finset.card b / 2


theorem inter_setOf_eq_sep (s : Set α) (p : α → Prop) : s ∩ {a | p a} = {a ∈ s | p a}


@[simp]
theorem cosh_sq_sub_sinh_sq (x : ℝ) : cosh x ^ 2 - sinh x ^ 2 = 1


theorem AnalyticAt.neg (hf : AnalyticAt 𝕜 f x) : AnalyticAt 𝕜 (-f) x

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


/-- In the special case `F = yoneda.obj Y`, the element `p.val` for `p : OverArrows η s` is itself
    a morphism `X ⟶ Y`. -/
@[simp]
lemma map_val {Y : C} {η : yoneda.obj Y ⟶ A} {X : C} {s : yoneda.obj X ⟶ A}
    (p : OverArrows η s) : yoneda.map p.val ≫ η = s

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

(p : CategoryTheory.OverPresheafAux.OverArrows η s)

CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map p.val) η = s


theorem map_zipWithAll {δ : Type _} (f : α → β) (g : Option γ → Option δ → α) (l : List γ) (l' : List δ) :
    map f (zipWithAll g l l') = zipWithAll (fun x y => f (g x y)) l l'

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

List.map f (List.zipWithAll g l l') = List.zipWithAll (fun x y => f (g x y)) l l'


@[to_additive (attr := simp)]
theorem ker_id : (MonoidHom.id G).ker = ⊥


theorem one_div_le_one_div_of_neg_of_le (hb : b < 0) (h : a ≤ b) : 1 / b ≤ 1 / a

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(hb : b < 0)
(h : a ≤ b)


theorem bijOn_iInter [hi : Nonempty ι] {s : ι → Set α} {t : ι → Set β} {f : α → β}
    (H : ∀ i, BijOn f (s i) (t i)) (Hinj : InjOn f (⋃ i, s i)) : BijOn f (⋂ i, s i) (⋂ i, t i)

(H : ∀ (i : ι), Set.BijOn f (s i) (t i))


@[to_additive]
theorem coe_of (R : Type u) [Monoid R] : (MonCat.of R : Type u) = R


/-- The region between two a.e.-measurable functions on a null-measurable set is null-measurable;
a version for the region together with the graph of the lower function. -/
lemma nullMeasurableSet_region_between_co (μ : Measure α)
    {f g : α → ℝ} (f_mble : AEMeasurable f μ) (g_mble : AEMeasurable g μ)
    {s : Set α} (s_mble : NullMeasurableSet s μ) :
    NullMeasurableSet {p : α × ℝ | p.1 ∈ s ∧ p.snd ∈ Ico (f p.fst) (g p.fst)} (μ.prod volume)

(s_mble : MeasureTheory.NullMeasurableSet s μ)

MeasureTheory.NullMeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Ico (f p.1) (g p.1)} (μ.prod MeasureTheory.volume)


theorem unique_irreducible [ValuationRing R] ⦃p q : R⦄ (hp : Irreducible p) (hq : Irreducible q) :
    Associated p q

{R : Type u_1}
[CommRing R]
[IsDomain R]
[ValuationRing R]
⦃p q : R⦄
(hp : Irreducible p)
(hq : Irreducible q)