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

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

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


theorem Module.card_fintype [Fintype ι] (b : Basis ι R M) [Fintype R] [Fintype M] :
    card M = card R ^ card ι

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Fintype ι]
(b : Basis ι R M)
[Fintype R]
[Fintype M]

Fintype.card M = Fintype.card R ^ Fintype.card ι


theorem All.trivial (H : ∀ {x : α}, p x) : ∀ {t : RBNode α}, t.All p

{α : Type u_1}
{p : α → Prop}
(H : ∀ {x : α}, p x)
{t : Batteries.RBNode α}


theorem card_eq_zero_iff : card α = 0 ↔ IsEmpty α


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


theorem toMultiset_sup [DecidableEq α] (f g : α →₀ ℕ) :
    toMultiset (f ⊔ g) = toMultiset f ∪ toMultiset g

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

Finsupp.toMultiset (f ⊔ g) = Finsupp.toMultiset f ∪ Finsupp.toMultiset g


protected theorem add_sub_assoc (a b c : Int) : a + b - c = a + (b - c)


theorem salient_iff_not_flat (S : ConvexCone 𝕜 E) : S.Salient ↔ ¬S.Flat

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(S : ConvexCone 𝕜 E)


theorem UInt8.le_antisymm {x y : UInt8} (h1 : x ≤ y) (h2 : y ≤ x) : x = y


/-- If `l₁` is a sublist of `l₂` and all elements of `l₂` are greater than or equal to one, then
`l₁.prod ≤ l₂.prod`. One can prove a stronger version assuming `∀ a ∈ l₂.diff l₁, 1 ≤ a` instead
of `∀ a ∈ l₂, 1 ≤ a` but this lemma is not yet in `mathlib`. -/
@[to_additive sum_le_sum "If `l₁` is a sublist of `l₂` and all elements of `l₂` are nonnegative,
  then `l₁.sum ≤ l₂.sum`.
  One can prove a stronger version assuming `∀ a ∈ l₂.diff l₁, 0 ≤ a` instead of `∀ a ∈ l₂, 0 ≤ a`
  but this lemma is not yet in `mathlib`."]
lemma Sublist.prod_le_prod' [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] {l₁ l₂ : List M} (h : l₁ <+ l₂)
    (h₁ : ∀ a ∈ l₂, (1 : M) ≤ a) : l₁.prod ≤ l₂.prod

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

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


@[simp]
theorem npow_zero (x : M) : x ^ 0 = 1

{M : Type u_1}
[MulOneClass M]
[Pow M ℕ]
[NatPowAssoc M]
(x : M)


@[fun_prop]
theorem differentiableOn_fst {s : Set (E × F)} : DifferentiableOn 𝕜 Prod.fst s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set (E × F)}


@[simp]
theorem finAddFlip_apply_natAdd (k : Fin n) (m : ℕ) :
    finAddFlip (Fin.natAdd m k) = Fin.castAdd m k


theorem isVonNBounded_ball (r : ℝ) : Bornology.IsVonNBounded 𝕜 (Metric.ball (0 : E) r)

(𝕜 : Type u_1)
(E : Type u_3)
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
(r : ℝ)

Bornology.IsVonNBounded 𝕜 (Metric.ball 0 r)


theorem upcrossingStrat_nonneg : 0 ≤ upcrossingStrat a b f N n ω

{Ω : Type u_1}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{N n : ℕ}
{ω : Ω}

0 ≤ MeasureTheory.upcrossingStrat a b f N n ω


theorem _root_.IsFractional.div_of_nonzero {I J : Submodule R₁ K} :
    IsFractional R₁⁰ I → IsFractional R₁⁰ J → J ≠ 0 → IsFractional R₁⁰ (I / J)

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[frac : IsFractionRing R₁ K]
[IsDomain R₁]
{I J : Submodule R₁ K}


/-- The separable closure in `E` of the separable closure of `F` in `E` is equal to itself. -/
theorem separableClosure.separableClosure_eq_bot :
    separableClosure (separableClosure F E) E = ⊥

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]

separableClosure (↥(separableClosure F E)) E = ⊥


@[simp]
theorem eval_zero' : eval (fun _ => 0 : σ → R) = constantCoeff

{R : Type u}
{σ : Type u_1}
[CommSemiring R]

(MvPolynomial.eval fun x => 0) = MvPolynomial.constantCoeff


/-- The embedding from `down ℕ` to `up ℤ` with sends `n` to `-n`. -/
@[simps!]
def embeddingDownNat : Embedding (down ℕ) (up ℤ)


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

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


@[to_additive]
protected theorem OneHom.map_one [One M] [One N] (f : OneHom M N) : f 1 = 1

{M : Type u_4}
{N : Type u_5}
[One M]
[One N]
(f : OneHom M N)


{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[(i : ι) → LE (α i)]
{f g : Π₀ (i : ι), α i}


@[simp]
lemma ofHomotopy_ofEq {φ₁ φ₂ : F ⟶ G} (h : φ₁ = φ₂) :
    ofHomotopy (Homotopy.ofEq h) = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G : CochainComplex C ℤ}
{φ₁ φ₂ : F ⟶ G}
(h : φ₁ = φ₂)

CochainComplex.HomComplex.Cochain.ofHomotopy (Homotopy.ofEq h) = 0


theorem foldr_swap (f : α → β → β) (H : LeftCommutative f) (b : β) (s : Multiset α) :
    foldr f H b s = foldl (fun x y => f y x) (fun _x _y _z => (H _ _ _).symm) b s

{α : Type u_1}
{β : Type v}
(f : α → β → β)
(H : LeftCommutative f)
(b : β)
(s : Multiset α)

Multiset.foldr f H b s = Multiset.foldl (fun x y => f y x) ⋯ b s


theorem sub : @Primrec' 2 fun v => v.head - v.tail.head

Nat.Primrec' fun v => v.head - v.tail.head


@[simp] theorem getLsb_truncate (m : Nat) (x : BitVec n) (i : Nat) :
    getLsb (truncate m x) i = (decide (i < m) && getLsb x i)

{n : Nat}
(m : Nat)
(x : BitVec n)
(i : Nat)

(BitVec.truncate m x).getLsb i = (decide (i < m) && x.getLsb i)


theorem openSegment_subset_Ioo (h : x < y) : openSegment 𝕜 x y ⊆ Ioo x y

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[OrderedCancelAddCommMonoid E]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{x y : E}
(h : x < y)


/-- The elliptic curve mapped over a ring homomorphism `φ : R →+* A`. -/
@[simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def map : EllipticCurve A

{R : Type u}
[CommRing R]
(E : EllipticCurve R)
{A : Type v}
[CommRing A]
(φ : R →+* A)


theorem isIso_toSheafify {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) : IsIso (J.toSheafify P)

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

(hP : CategoryTheory.Presheaf.IsSheaf J P)


/-- If a function is continuous on a set for some topologies, then it is
continuous on the same set with respect to any coarser topology on the target space. -/
theorem ContinuousOn.mono_rng {α β : Type*} {t₁ : TopologicalSpace α} {t₂ t₃ : TopologicalSpace β}
    (h₁ : t₂ ≤ t₃) {s : Set α} {f : α → β} (h₂ : @ContinuousOn α β t₁ t₂ f s) :
    @ContinuousOn α β t₁ t₃ f s

{α : Type u_7}
{β : Type u_8}
{t₁ : TopologicalSpace α}
{t₂ t₃ : TopologicalSpace β}
(h₁ : t₂ ≤ t₃)
{s : Set α}
{f : α → β}
(h₂ : ContinuousOn f s)


theorem pairwise_gt_iota (n : ℕ) : Pairwise (· > ·) (iota n)

List.Pairwise (fun x x_1 => x > x_1) (List.iota n)


@[simp]
theorem interior_iInter₂_le_nat {n : ℕ} (f : ℕ → Set X) :
    interior (⋂ m ≤ n, f m) = ⋂ m ≤ n, interior (f m)

{X : Type u}
[TopologicalSpace X]
{n : ℕ}
(f : ℕ → Set X)

interior (⋂ m, ⋂ (_ : m ≤ n), f m) = ⋂ m, ⋂ (_ : m ≤ n), interior (f m)


lemma Pi.uniformSpace_comap_precomp (φ : ι' → ι) :
    UniformSpace.comap (· ∘ φ) (Pi.uniformSpace (fun _ ↦ β)) =
    ⨅ i', UniformSpace.comap (eval (φ i')) ‹UniformSpace β›

{ι : Type u_1}
{ι' : Type u_2}
{β : Type u_3}
[UniformSpace β]
(φ : ι' → ι)

UniformSpace.comap (fun x => x ∘ φ) (Pi.uniformSpace fun x => β) = ⨅ i', UniformSpace.comap (Function.eval (φ i')) inst✝


theorem algebraicIndependent_adjoin (hs : AlgebraicIndependent R x) :
    @AlgebraicIndependent ι R (adjoin R (range x))
      (fun i : ι => ⟨x i, subset_adjoin (mem_range_self i)⟩) _ _ _

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hs : AlgebraicIndependent R x)

AlgebraicIndependent R fun i => ⟨x i, ⋯⟩


@[simp]
theorem coe_id : ⇑(SupHom.id α) = id


theorem Codisjoint.top_le : Codisjoint a b → ⊤ ≤ a ⊔ b

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b : α}


@[to_additive (attr := simp)]
theorem top_mul_top : (⊤ : Filter α) * ⊤ = ⊤


theorem subset_pi_eval_image (s : Set ι) (u : Set (∀ i, α i)) : u ⊆ pi s fun i => eval i '' u

{ι : Type u_1}
{α : ι → Type u_2}
(s : Set ι)
(u : Set ((i : ι) → α i))


theorem inter_right_comm (s₁ s₂ s₃ : Finset α) : s₁ ∩ s₂ ∩ s₃ = s₁ ∩ s₃ ∩ s₂

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

s₁ ∩ s₂ ∩ s₃ = s₁ ∩ s₃ ∩ s₂


theorem HasFPowerSeriesAt.hasFDerivAt (h : HasFPowerSeriesAt f p x) :
    HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p 1)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : FormalMultilinearSeries 𝕜 E F}
{f : E → F}
{x : E}
(h : HasFPowerSeriesAt f p x)

HasFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x


@[to_additive]
theorem noncommProd_mem (S : Submonoid M) {ι : Type*} (t : Finset ι) (f : ι → M) (comm)
    (h : ∀ c ∈ t, f c ∈ S) : t.noncommProd f comm ∈ S

(comm : (↑t).Pairwise fun a b => AddCommute (f a) (f b))


theorem contDiffWithinAtProp_self_source {f : E → H'} {s : Set E} {x : E} :
    ContDiffWithinAtProp 𝓘(𝕜, E) I' n f s x ↔ ContDiffWithinAt 𝕜 n (I' ∘ f) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H')
{n : ℕ∞}
{f : E → H'}
{s : Set E}
{x : E}

ContDiffWithinAtProp 𝓘(𝕜, E) I' n f s x ↔ ContDiffWithinAt 𝕜 n (↑I' ∘ f) s x


theorem ext_nat' [AddMonoid A] [AddMonoidHomClass F ℕ A] (f g : F) (h : f 1 = g 1) : f = g

{A : Type u_3}
{F : Type u_5}
[FunLike F ℕ A]
[AddMonoid A]
[AddMonoidHomClass F ℕ A]
(f g : F)
(h : f 1 = g 1)


theorem truncate_succ (x : BitVec w) :
    truncate (i+1) x = cons (getLsb x i) (truncate i x)

BitVec.truncate (i + 1) x = BitVec.cons (x.getLsb i) (BitVec.truncate i x)


@[to_additive]
theorem div [Div Y] ⦃f g : X → Y⦄ (hf : IsLocallyConstant f) (hg : IsLocallyConstant g) :
    IsLocallyConstant (f / g)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[Sub Y]
⦃f g : X → Y⦄
(hf : IsLocallyConstant f)
(hg : IsLocallyConstant g)


theorem ContinuousAt.upperSemicontinuousAt {f : α → γ} (h : ContinuousAt f x) :
    UpperSemicontinuousAt f x

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{f : α → γ}
(h : ContinuousAt f x)


theorem stronglyMeasurable_mk {f : α → β} (hfm : AEStronglyMeasurable' m f μ) :
    StronglyMeasurable[m] (hfm.mk f)

(hfm : MeasureTheory.AEStronglyMeasurable' m f μ)

MeasureTheory.StronglyMeasurable (MeasureTheory.AEStronglyMeasurable'.mk f hfm)


theorem map_sup (s t : AffineSubspace k P₁) (f : P₁ →ᵃ[k] P₂) : (s ⊔ t).map f = s.map f ⊔ t.map f

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(s t : AffineSubspace k P₁)
(f : P₁ →ᵃ[k] P₂)

AffineSubspace.map f (s ⊔ t) = AffineSubspace.map f s ⊔ AffineSubspace.map f t


@[simp] lemma norm_ofMul (x : E) : ‖ofMul x‖ = ‖x‖


@[reassoc (attr := simp)]
theorem σ_comp_PInfty (X : SimplicialObject C) {n : ℕ} (i : Fin (n + 1)) :
    X.σ i ≫ PInfty.f (n + 1) = 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(X : CategoryTheory.SimplicialObject C)
{n : ℕ}
(i : Fin (n + 1))

X.σ i ≫ AlgebraicTopology.DoldKan.PInfty.f (n + 1) = 0


theorem LTCmp.cmp_iff_gt [LT α] [LTCmp (α := α) cmp] : cmp x y = .gt ↔ y < x

{α : Type u_1}
{cmp : α → α → Ordering}
{x y : α}
[LT α]
[Batteries.LTCmp cmp]


/-- The comonad induced by the Eilenberg-Moore adjunction is the original comonad. -/
@[simps!]
def adjToComonadIso (G : Comonad C) : G.adj.toComonad ≅ G

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

(CategoryTheory.Adjunction.adjToComonadIso G).inv.app X = CategoryTheory.CategoryStruct.id (G.obj X)


@[to_additive (attr := simp, norm_cast)]
theorem op_intCast [IntCast α] (n : ℤ) : op (n : α) = n


theorem Eq.cmp_eq_eq (h : x = y) : cmp x y = Ordering.eq

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


theorem formPerm_apply_of_not_mem (h : x ∉ l) : formPerm l x = x

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


/-- A partial homeomorphism defines a homeomorphism between its source and target. -/
@[simps!] -- Porting note: new `simps`
def toHomeomorphSourceTarget : e.source ≃ₜ e.target

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)

∀ (a : ↑e.source), ↑(e.toHomeomorphSourceTarget a) = ↑e ↑a


theorem coe_iSup_of_directed [Nonempty ι] (dir : Directed (· ≤ ·) t) :
    ↑(iSup t) = ⋃ i, (t i : Set L)

(dir : Directed (fun x x_1 => x ≤ x_1) t)


@[reassoc (attr := simp)]
lemma inv_hom_id_right (e : f ≅ g) : e.inv.right ≫ e.hom.right = 𝟙 _

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

CategoryTheory.CategoryStruct.comp e.inv.right e.hom.right = CategoryTheory.CategoryStruct.id g.right


theorem quasilinearOn_iff_monotoneOn_or_antitoneOn [LinearOrderedAddCommMonoid β]
    (hs : Convex 𝕜 s) : QuasilinearOn 𝕜 s f ↔ MonotoneOn f s ∨ AntitoneOn f s

{𝕜 : Type u_1}
{β : Type u_4}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → β}
[LinearOrderedAddCommMonoid β]
(hs : Convex 𝕜 s)


theorem setToFun_eq (hT : DominatedFinMeasAdditive μ T C) (hf : Integrable f μ) :
    setToFun μ T hT f = L1.setToL1 hT (hf.toL1 f)

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

MeasureTheory.setToFun μ T hT f = (MeasureTheory.L1.setToL1 hT) (MeasureTheory.Integrable.toL1 f hf)


@[simp]
theorem top_coeSubmodule : ((⊤ : LieSubmodule R L M) : Submodule R M) = ⊤

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


theorem Sized.univ_mem_iff [Fintype α] (hA : A.Sized r) : Finset.univ ∈ A ↔ A = {Finset.univ}

{α : Type u_1}
{A : Set (Finset α)}
{r : ℕ}
[Fintype α]
(hA : Set.Sized r A)


/-- We say that restrictions of the topology on `X` to sets from a family `S`
generates the original topology,
if either of the following equivalent conditions hold:

- a set which is relatively open in each `s ∈ S` is open;
- a set which is relatively closed in each `s ∈ S` is closed;
- for any topological space `Y`, a function `f : X → Y` is continuous
  provided that it is continuous on each `s ∈ S`.
-/
structure RestrictGenTopology (S : Set (Set X)) : Prop where
  isOpen_of_forall_induced (u : Set X) : (∀ s ∈ S, IsOpen ((↑) ⁻¹' u : Set s)) → IsOpen u

{X : Type u_1}
[tX : TopologicalSpace X]
{S : Set (Set X)}
(self : RestrictGenTopology S)
(u : Set X)

(∀ s ∈ S, IsOpen (Subtype.val ⁻¹' u)) → IsOpen u


/-- Split equalizers are absolute: they are preserved by any functor. -/
@[simps]
def IsSplitEqualizer.map {W : C} {ι : W ⟶ X} (q : IsSplitEqualizer f g ι) (F : C ⥤ D) :
    IsSplitEqualizer (F.map f) (F.map g) (F.map ι)

(q : CategoryTheory.IsSplitEqualizer f g ι)

(q.map F).rightRetraction = F.map q.rightRetraction


@[to_additive (attr := simp)]
theorem coe_copy {s : Set M} (hs : s = S) : (S.copy s hs : Set M) = s

{M : Type u_1}
[Mul M]
{S : Subsemigroup M}
{s : Set M}
(hs : s = ↑S)


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

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

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


theorem IsRat.of_raw (α) [DivisionRing α] (n : ℤ) (d : ℕ)
    (h : (d : α) ≠ 0) : IsRat (Rat.rawCast n d : α) n d

(α : Type u_1)
[DivisionRing α]
(n : ℤ)
(d : ℕ)
(h : ↑d ≠ 0)

Mathlib.Meta.NormNum.IsRat (Rat.rawCast n d) n d


@[to_additive]
protected theorem Specializes.zpow {G : Type*} [DivInvMonoid G] [TopologicalSpace G]
    [ContinuousMul G] [ContinuousInv G] {x y : G} (h : x ⤳ y) : ∀ m : ℤ, (x ^ m) ⤳ (y ^ m)

{G : Type u_1}
[SubNegMonoid G]
[TopologicalSpace G]
[ContinuousAdd G]
[ContinuousNeg G]
{x y : G}
(h : x ⤳ y)
(m : ℤ)


@[to_additive (attr := simp)] theorem range_inl_sup_range_inr :
    MonoidHom.range (inl : G →* G ∗ H) ⊔ MonoidHom.range inr = ⊤

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]

Monoid.Coprod.inl.range ⊔ Monoid.Coprod.inr.range = ⊤


lemma F_nat_zero_zero_sub_le {t : ℝ} (ht : 0 < t) :
    ‖F_nat 0 0 t - 1‖ ≤ rexp (-π * t) / (1 - rexp (-π * t))

‖HurwitzKernelBounds.F_nat 0 0 t - 1‖ ≤ rexp (-π * t) / (1 - rexp (-π * t))


theorem le_csInf_iff'' {s : Set α} {a : α} (ne : s.Nonempty) :
    a ≤ sInf s ↔ ∀ b : α, b ∈ s → a ≤ b

{α : Type u_1}
[ConditionallyCompleteLinearOrderBot α]
{s : Set α}
{a : α}
(ne : s.Nonempty)


@[simp]
theorem symm_mul (e : Perm α) : e.symm * e = 1


theorem _root_.Continuous.inner_ {f g : ℝ → E} (hf : Continuous f) (hg : Continuous g) :
    Continuous fun x => inner_ 𝕜 (f x) (g x)

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f g : ℝ → E}
(hf : Continuous f)
(hg : Continuous g)


theorem bsup_lt_ord_lift_of_isRegular {o : Ordinal} {f : ∀ a < o, Ordinal} {c} (hc : IsRegular c)
    (hι : Cardinal.lift.{v, u} o.card < c) :
    (∀ i hi, f i hi < c.ord) → Ordinal.bsup.{u, v} o f < c.ord

{f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}}

(∀ (i : Ordinal.{u}) (hi : i < o), f i hi < c.ord) → o.bsup f < c.ord


/-- Construct an isomorphism from a homeomorphism. -/
@[simps hom inv]
def isoOfHomeo {X Y : CompactlyGenerated.{u, w}} (f : X ≃ₜ Y) : X ≅ Y

{X Y : CompactlyGenerated}
(f : ↑X.toTop ≃ₜ ↑Y.toTop)

(CompactlyGenerated.isoOfHomeo f).hom = { toFun := ⇑f, continuous_toFun := ⋯ }


theorem EventuallyEq.cardinal_bUnion {S : Set ι} (hS : #S < c)
    {s t : ∀ i ∈ S, Set α} (h : ∀ i hi, s i hi =ᶠ[l] t i hi) :
    ⋃ i ∈ S, s i ‹_› =ᶠ[l] ⋃ i ∈ S, t i ‹_›

(h : ∀ (i : ι) (hi : i ∈ S), s i hi =ᶠ[l] t i hi)

⋃ i, ⋃ (h : i ∈ S), s i h =ᶠ[l] ⋃ i, ⋃ (h : i ∈ S), t i h


theorem sigma_apply {k n : ℕ} : σ k n = ∑ d ∈ divisors n, d ^ k

(ArithmeticFunction.sigma k) n = ∑ d ∈ n.divisors, d ^ k


/-- The edist to a singleton is the edistance to the single point of this singleton -/
@[simp]
theorem infEdist_singleton : infEdist x {y} = edist x y

{α : Type u}
[PseudoEMetricSpace α]
{x y : α}


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

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

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


theorem prod_apply_inr_fst (i) : (b.prod b' (Sum.inr i)).1 = 0

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(b' : Basis ι' R M')
(i : ι')


@[simp, norm_cast]
theorem coe_one : ((1 : s) : K) = 1

{K : Type u}
[DivisionRing K]
(s : Subfield K)


protected lemma EventuallyEq.iInter [Finite ι] {s t : ι → Set α}
    (h : ∀ i, s i =ᶠ[l] t i) : (⋂ i, s i) =ᶠ[l] ⋂ i, t i

{α : Type u}
{ι : Sort x}
{l : Filter α}
[Finite ι]
{s t : ι → Set α}
(h : ∀ (i : ι), s i =ᶠ[l] t i)


theorem ssubset_cons {s : Multiset α} {a : α} (ha : a ∉ s) : s ⊂ a ::ₘ s

{α : Type u_1}
{s : Multiset α}
{a : α}
(ha : a ∉ s)


/-- The open cover of the coproduct. -/
@[simps obj map]
noncomputable
def sigmaOpenCover : (∐ f).OpenCover

{ι : Type u}
(f : ι → AlgebraicGeometry.Scheme)

∀ (a : ι), (AlgebraicGeometry.sigmaOpenCover f).obj a = f a


lemma infs_self_subset : s ⊼ s ⊆ s ↔ InfClosed (s : Set α)

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


theorem tr_eval' {σ₁ σ₂} (f₁ : σ₁ → Option σ₁) (f₂ : σ₂ → Option σ₂) (tr : σ₁ → σ₂)
    (H : Respects f₁ f₂ fun a b ↦ tr a = b) (a₁) : eval f₂ (tr a₁) = tr <$> eval f₁ a₁

(tr : σ₁ → σ₂)

(H : Turing.Respects f₁ f₂ fun a b => tr a = b)

Turing.eval f₂ (tr a₁) = tr <$> Turing.eval f₁ a₁


@[to_additive]
lemma prod_sdiff_eq_prod_sdiff_iff :
    ∏ i ∈ s \ t, f i = ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i = ∏ i ∈ t, f i

{ι : Type u_1}
{α : Type u_3}
[DecidableEq ι]
[CancelCommMonoid α]
{s t : Finset ι}
{f : ι → α}


/-- If a closed set has a closed thickening with finite measure, then the measure of its closed
`r`-thickenings converge to its measure as `r` tends to `0`. -/
theorem tendsto_measure_cthickening_of_isClosed {μ : Measure α} {s : Set α}
    (hs : ∃ R > 0, μ (cthickening R s) ≠ ∞) (h's : IsClosed s) :
    Tendsto (fun r => μ (cthickening r s)) (𝓝 0) (𝓝 (μ s))

(hs : ∃ R > 0, μ (Metric.cthickening R s) ≠ ⊤)

Filter.Tendsto (fun r => μ (Metric.cthickening r s)) (𝓝 0) (𝓝 (μ s))


@[simp]
theorem cos_pi_div_two : cos (π / 2) = 0


theorem Iio_eq_finset_subtype : Iio b = (Iio (b : ℕ)).fin n

Finset.Iio b = Finset.fin n (Finset.Iio ↑b)


lemma norm_jacobiTheta₂_term_fderiv_le (n : ℤ) (z τ : ℂ) :
    ‖jacobiTheta₂_term_fderiv n z τ‖ ≤ 3 * π * |n| ^ 2 * ‖jacobiTheta₂_term n z τ‖

‖jacobiTheta₂_term_fderiv n z τ‖ ≤ 3 * π * ↑|n| ^ 2 * ‖jacobiTheta₂_term n z τ‖


/-- Continuous linear equivalences between modules. We only put the type classes that are necessary
for the definition, although in applications `M` and `M₂` will be topological modules over the
topological semiring `R`. -/
-- Porting note (#5171): linter not ported yet; was @[nolint has_nonempty_instance]
structure ContinuousLinearEquiv {R : Type*} {S : Type*} [Semiring R] [Semiring S] (σ : R →+* S)
    {σ' : S →+* R} [RingHomInvPair σ σ'] [RingHomInvPair σ' σ] (M : Type*) [TopologicalSpace M]
    [AddCommMonoid M] (M₂ : Type*) [TopologicalSpace M₂] [AddCommMonoid M₂] [Module R M]
    [Module S M₂] extends M ≃ₛₗ[σ] M₂ where
  continuous_toFun : Continuous toFun := by continuity
  continuous_invFun : Continuous invFun := by continuity

{R : Type u_1}
{S : Type u_2}
[Semiring R]
[Semiring S]
{σ : R →+* S}
{σ' : S →+* R}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
{M : Type u_3}
[TopologicalSpace M]
[AddCommMonoid M]
{M₂ : Type u_4}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R M]
[Module S M₂]
(self : M ≃SL[σ] M₂)


theorem nat_rec {f : α → ℕ} {g : α →. σ} {h : α → ℕ × σ →. σ} (hf : Computable f) (hg : Partrec g)
    (hh : Partrec₂ h) : Partrec fun a => (f a).rec (g a) fun y IH => IH.bind fun i => h a (y, i)

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{f : α → ℕ}
{g : α →. σ}
{h : α → ℕ × σ →. σ}
(hf : Computable f)
(hg : Partrec g)
(hh : Partrec₂ h)

Partrec fun a => Nat.rec (g a) (fun y IH => IH.bind fun i => h a (y, i)) (f a)


theorem hasDerivWithinAt_lineMap : HasDerivWithinAt (lineMap a b) (b - a) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{a b : E}
{s : Set 𝕜}
{x : 𝕜}

HasDerivWithinAt (⇑(AffineMap.lineMap a b)) (b - a) s x


@[simp]
theorem smul_apply (g : G) (b : Basis ι R M) (i : ι) : (g • b) i = g • b i

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{G : Type u_10}
[Group G]
[DistribMulAction G M]
[SMulCommClass G R M]
(g : G)
(b : Basis ι R M)
(i : ι)


lemma mem_of_mem_dropSlice {n m : ℕ} {l : List α} {a : α} (h : a ∈ l.dropSlice n m) : a ∈ l

{α : Type u_1}
{n m : ℕ}
{l : List α}
{a : α}
(h : a ∈ List.dropSlice n m l)


theorem le_of_lt_add_one {a b : Int} (H : a < b + 1) : a ≤ b


theorem closure_union (s t : Set R) : closure (s ∪ t) = closure s ⊔ closure t

{R : Type u}
[NonAssocSemiring R]
(s t : Set R)

Subsemiring.closure (s ∪ t) = Subsemiring.closure s ⊔ Subsemiring.closure t


theorem boundedSpace_val_set_iff {s : Set α} : BoundedSpace s ↔ IsBounded s

{α : Type u_1}
[Bornology α]
{s : Set α}


theorem mul_def {f g : MonoidAlgebra k G} :
    f * g = f.sum fun a₁ b₁ => g.sum fun a₂ b₂ => single (a₁ * a₂) (b₁ * b₂)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Mul G]
{f g : MonoidAlgebra k G}

f * g = Finsupp.sum f fun a₁ b₁ => Finsupp.sum g fun a₂ b₂ => MonoidAlgebra.single (a₁ * a₂) (b₁ * b₂)


theorem dom_of_mem_fix {f : α →. β ⊕ α} {a : α} {b : β} (h : b ∈ f.fix a) : (f a).Dom

{α : Type u_1}
{β : Type u_2}
{f : α →. β ⊕ α}
{a : α}
{b : β}
(h : b ∈ f.fix a)


theorem Tape.map_mk' {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : PointedMap Γ Γ') (L R : ListBlank Γ) :
    (Tape.mk' L R).map f = Tape.mk' (L.map f) (R.map f)

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Turing.PointedMap Γ Γ')
(L R : Turing.ListBlank Γ)

Turing.Tape.map f (Turing.Tape.mk' L R) = Turing.Tape.mk' (Turing.ListBlank.map f L) (Turing.ListBlank.map f R)


theorem digits_append_digits {b m n : ℕ} (hb : 0 < b) :
    digits b n ++ digits b m = digits b (n + b ^ (digits b n).length * m)

b.digits n ++ b.digits m = b.digits (n + b ^ (b.digits n).length * m)


theorem IsLocalMin.comp_continuous [TopologicalSpace δ] {g : δ → α} {b : δ}
    (hf : IsLocalMin f (g b)) (hg : ContinuousAt g b) : IsLocalMin (f ∘ g) b

{α : Type u}
{β : Type v}
{δ : Type x}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
[TopologicalSpace δ]
{g : δ → α}
{b : δ}
(hf : IsLocalMin f (g b))
(hg : ContinuousAt g b)


protected theorem funext [TopologicalSpace β] [T2Space β] {f g : hatα → β} (hf : Continuous f)
    (hg : Continuous g) (h : ∀ a, f (ι a) = g (ι a)) : f = g

(h : ∀ (a : α), f (pkg.coe a) = g (pkg.coe a))


theorem associated_rightInverse :
    Function.RightInverse (associatedHom S) (BilinMap.toQuadraticMap : _ → QuadraticMap R M R)

(S : Type u_1)
{R : Type u_3}
{M : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[CommSemiring S]
[Algebra S R]
[Invertible 2]

Function.RightInverse (⇑(QuadraticMap.associatedHom S)) LinearMap.BilinMap.toQuadraticMap


/-- Symmetry properties of `IH24`. -/
lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y)

Surreal.Multiplication.IH24 x₁ x₂ y → Surreal.Multiplication.IH24 (-x₂) (-x₁) y ∧ Surreal.Multiplication.IH24 x₁ x₂ (-y)


theorem IsPushout.isVanKampen_iff (H : IsPushout f g h i) :
    H.IsVanKampen ↔ IsVanKampenColimit (PushoutCocone.mk h i H.w)

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

H.IsVanKampen ↔ CategoryTheory.IsVanKampenColimit (CategoryTheory.Limits.PushoutCocone.mk h i ⋯)


/-- A (bundled) complete separated uniform space. -/
structure CpltSepUniformSpace where
  /-- The underlying space -/
  α : Type u
  [isUniformSpace : UniformSpace α]
  [isCompleteSpace : CompleteSpace α]
  [isT0 : T0Space α]


/-- A category is (finitary) extensive if it has finite coproducts,
and binary coproducts are van Kampen. -/
class FinitaryExtensive (C : Type u) [Category.{v} C] : Prop where
  [hasFiniteCoproducts : HasFiniteCoproducts C]
  [hasPullbacksOfInclusions : HasPullbacksOfInclusions C]
  /-- In a finitary extensive category, all coproducts are van Kampen-/
  van_kampen' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsVanKampenColimit c

[self : CategoryTheory.FinitaryExtensive C]


lemma cond_eq_zero_of_meas_eq_zero (hμs : μ s = 0) : μ[|s] = 0

{Ω : Type u_1}
{m : MeasurableSpace Ω}
(μ : MeasureTheory.Measure Ω)
{s : Set Ω}
(hμs : μ s = 0)


/-- The image of `h ≫ f` is always a smaller subobject than the image of `f`. -/
theorem imageSubobject_comp_le {X' : C} (h : X' ⟶ X) (f : X ⟶ Y) [HasImage f] [HasImage (h ≫ f)] :
    imageSubobject (h ≫ f) ≤ imageSubobject f

[CategoryTheory.Limits.HasImage (h ≫ f)]

CategoryTheory.Limits.imageSubobject (h ≫ f) ≤ CategoryTheory.Limits.imageSubobject f


theorem EventuallyEq.countable_iUnion [Countable ι] {s t : ι → Set α} (h : ∀ i, s i =ᶠ[l] t i) :
    ⋃ i, s i =ᶠ[l] ⋃ i, t i

{ι : Sort u_1}
{α : Type u_2}
{l : Filter α}
[CountableInterFilter l]
[Countable ι]
{s t : ι → Set α}
(h : ∀ (i : ι), s i =ᶠ[l] t i)


theorem norm_star_mul_self' {x : E} : ‖x⋆ * x‖ = ‖x⋆‖ * ‖x‖

{E : Type u_2}
[NonUnitalNormedRing E]
[StarRing E]
[CstarRing E]
{x : E}

‖x⋆ * x‖ = ‖x⋆‖ * ‖x‖


@[ext] lemma ext {f g : r ≼i s} (h : ∀ x, f x = g x) : f = g

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
{f g : r ≼i s}
(h : ∀ (x : α), f x = g x)


@[to_additive (attr := simp)]
theorem relindex_sup_left [K.Normal] : K.relindex (K ⊔ H) = K.relindex H

{G : Type u_1}
[AddGroup G]
(H K : AddSubgroup G)
[K.Normal]


@[simp]
theorem map_comp_inr : (map f₁ f₂ h).comp inr = inr.comp f₂

(h : ∀ (g : G), f₁.comp (MulEquiv.toMonoidHom (φ g)) = (MulEquiv.toMonoidHom (φ₁ (f₂ g))).comp f₁)

(SemidirectProduct.map f₁ f₂ h).comp SemidirectProduct.inr = SemidirectProduct.inr.comp f₂


lemma toPartENat_eq_iff_of_le_aleph0 {c c' : Cardinal} (hc : c ≤ ℵ₀) (hc' : c' ≤ ℵ₀) :
    toPartENat c = toPartENat c' ↔ c = c'

{c c' : Cardinal.{u_1}}
(hc : c ≤ Cardinal.aleph0)
(hc' : c' ≤ Cardinal.aleph0)

Cardinal.toPartENat c = Cardinal.toPartENat c' ↔ c = c'


theorem natTrailingDegree_mul_X_pow {p : R[X]} (hp : p ≠ 0) (n : ℕ) :
    (p * X ^ n).natTrailingDegree = p.natTrailingDegree + n

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

(p * Polynomial.X ^ n).natTrailingDegree = p.natTrailingDegree + n


@[simp]
theorem isConnected_image {s : Set X} (h : X ≃ₜ Y) :
    IsConnected (h '' s) ↔ IsConnected s

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
(h : X ≃ₜ Y)


@[simp] theorem toFin_not (x : BitVec w) :
    (~~~x).toFin = x.toFin.rev


@[to_additive]
theorem mul_prod_eq_prod_insertNone (f : α → M) (x : M) (s : Finset α) :
    x * ∏ i ∈ s, f i = ∏ i ∈ insertNone s, i.elim x f

{α : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
(f : α → M)
(x : M)
(s : Finset α)

x + ∑ i ∈ s, f i = ∑ i ∈ Finset.insertNone s, i.elim x f


@[simp]
theorem toNonUnitalSubalgebra_toSubmodule (p : Submodule R A) (h_mul) :
    (p.toNonUnitalSubalgebra h_mul).toSubmodule = p

(h_mul : ∀ (x y : A), x ∈ p → y ∈ p → x * y ∈ p)


theorem mem_cons_of_mem {a : α} {s : Stream' α} (b : α) : a ∈ s → a ∈ b::s

{α : Type u}
{a : α}
{s : Stream' α}
(b : α)


@[simp]
theorem coe_sum {ι : Type*} (s : Finset ι) (f : ι → NormedAddGroupHom V₁ V₂) :
    ⇑(∑ i ∈ s, f i) = ∑ i ∈ s, (f i : V₁ → V₂)

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
{ι : Type u_5}
(s : Finset ι)
(f : ι → NormedAddGroupHom V₁ V₂)


theorem Sigma.curry_update {γ : ∀ a, β a → Type*} [DecidableEq α] [∀ a, DecidableEq (β a)]
    (i : Σ a, β a) (f : (i : Σ a, β a) → γ i.1 i.2) (x : γ i.1 i.2) :
    Sigma.curry (Function.update f i x) =
      Function.update (Sigma.curry f) i.1 (Function.update (Sigma.curry f i.1) i.2 x)

(f : (i : (a : α) × β a) → γ i.fst i.snd)

Sigma.curry (Function.update f i x) =
  Function.update (Sigma.curry f) i.fst (Function.update (Sigma.curry f i.fst) i.snd x)


@[symm] protected lemma symm (h : p.IsConjExponent q) : q.IsConjExponent p


theorem EventuallyConst.of_tendsto {x : β} (h : Tendsto f l (pure x)) : EventuallyConst f l

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{f : α → β}
{x : β}
(h : Filter.Tendsto f l (pure x))


theorem ae_eq_zero_compl (hf : AEFinStronglyMeasurable f μ) :
    f =ᵐ[μ.restrict hf.sigmaFiniteSetᶜ] 0

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)


nonrec theorem IsLocalMinOn.comp_mono (hf : IsLocalMinOn f s a) {g : β → γ} (hg : Monotone g) :
    IsLocalMinOn (g ∘ f) s a

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


theorem isLindelof_univ [h : LindelofSpace X] : IsLindelof (univ : Set X)

{X : Type u}
[TopologicalSpace X]
[h : LindelofSpace X]


theorem le_N (hN : 2 ≤ N) : (2 * dValue N - 1) ^ nValue N ≤ N

(2 * Behrend.dValue N - 1) ^ Behrend.nValue N ≤ N


lemma ConvexOn.smul_concaveOn' (hf : ConvexOn 𝕜 s f) (hg : ConcaveOn 𝕜 s g)
    (hf₀ : ∀ ⦃x⦄, x ∈ s → f x ≤ 0) (hg₀ : ∀ ⦃x⦄, x ∈ s → 0 ≤ g x) (hfg : MonovaryOn f g s) :
    ConvexOn 𝕜 s (f • g)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[LinearOrderedCommRing 𝕜]
[LinearOrderedCommRing E]
[LinearOrderedAddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
[Module E F]
[IsScalarTower 𝕜 E F]
[SMulCommClass 𝕜 E F]
[OrderedSMul 𝕜 E]
[OrderedSMul 𝕜 F]
[OrderedSMul E F]
{s : Set 𝕜}
{f : 𝕜 → E}
{g : 𝕜 → F}
(hf : ConvexOn 𝕜 s f)
(hg : ConcaveOn 𝕜 s g)
(hf₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → f x ≤ 0)
(hg₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → 0 ≤ g x)
(hfg : MonovaryOn f g s)


/-- Each pairwise difference is in the `vectorSpan`. -/
theorem vsub_mem_vectorSpan {s : Set P} {p1 p2 : P} (hp1 : p1 ∈ s) (hp2 : p2 ∈ s) :
    p1 -ᵥ p2 ∈ vectorSpan k s

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set P}
{p1 p2 : P}
(hp1 : p1 ∈ s)
(hp2 : p2 ∈ s)


@[simp]
lemma toCostructuredArrow_comp_proj (G : E ⥤ C) (F : C ⥤ D) (X : D)
    (f : (Y : E) → F.obj (G.obj Y) ⟶ X) (h : ∀ {Y Z : E} (g : Y ⟶ Z), F.map (G.map g) ≫ f Z = f Y) :
    G.toCostructuredArrow F X f h ⋙ CostructuredArrow.proj _ _ = G

(h : ∀ {Y Z : E} (g : Y ⟶ Z), CategoryTheory.CategoryStruct.comp (F.map (G.map g)) (f Z) = f Y)

(G.toCostructuredArrow F X f ⋯).comp (CategoryTheory.CostructuredArrow.proj F X) = G


/-- `NonnegHomClass F α β` states that `F` is a type of nonnegative morphisms. -/
class NonnegHomClass (F α β : Type*) [Zero β] [LE β] [FunLike F α β] : Prop where
  /-- the image of any element is non negative. -/
  apply_nonneg (f : F) : ∀ a, 0 ≤ f a

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Zero β]
[LE β]
[FunLike F α β]
[self : NonnegHomClass F α β]
(f : F)
(a : α)


/-- The map from the restriction of a presheafed space.
-/
@[simps]
def ofRestrict {U : TopCat} (X : PresheafedSpace C) {f : U ⟶ (X : TopCat)}
    (h : OpenEmbedding f) : X.restrict h ⟶ X

(X : AlgebraicGeometry.PresheafedSpace C)


@[to_additive (attr := simp)]
theorem recOn_of_mul {C : FreeMonoid α → Sort*} (x : α) (xs : FreeMonoid α) (h0 : C 1)
    (ih : ∀ x xs, C xs → C (of x * xs)) : @recOn α C (of x * xs) h0 ih = ih x xs (recOn xs h0 ih)

(ih : (x : α) → (xs : FreeAddMonoid α) → C xs → C (FreeAddMonoid.of x + xs))

(FreeAddMonoid.of x + xs).recOn h0 ih = ih x xs (xs.recOn h0 ih)


protected theorem _root_.IsMin.withTop (h : IsMin a) : IsMin (a : WithTop α)

{α : Type u_1}
{a : α}
[LE α]
(h : IsMin a)


@[simp]
theorem symm_symm {f₀ f₁ : C(X, Y)} (F : HomotopyWith f₀ f₁ P) : F.symm.symm = F

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


@[simp]
theorem constantCoeff_comp_C : constantCoeff.comp (C : R →+* MvPolynomial σ R) = RingHom.id R

(R : Type u)
(σ : Type u_1)
[CommSemiring R]

MvPolynomial.constantCoeff.comp MvPolynomial.C = RingHom.id R


theorem choose_subtype_eq {α : Type*} (p : α → Prop) [Fintype { a : α // p a }] [DecidableEq α]
    (x : { a : α // p a })
    (h : ∃! a : { a // p a }, (a : α) = x :=
      ⟨x, rfl, fun y hy => by simpa [Subtype.ext_iff] using hy⟩) :
    Fintype.choose (fun y : { a : α // p a } => (y : α) = x) h = x

{α : Type u_4}
(p : α → Prop)
[Fintype { a // p a }]
[DecidableEq α]
(x : { a // p a })
(h : ∃! a, ↑a = ↑x := ⋯)


/-- Given a Borel-measurable function from a Polish space to a second-countable space, there exists
a finer Polish topology on the source space for which the function is continuous. -/
theorem _root_.Measurable.exists_continuous {α β : Type*} [t : TopologicalSpace α] [PolishSpace α]
    [MeasurableSpace α] [BorelSpace α] [tβ : TopologicalSpace β] [MeasurableSpace β]
    [OpensMeasurableSpace β] {f : α → β} [SecondCountableTopology (range f)] (hf : Measurable f) :
    ∃ t' : TopologicalSpace α, t' ≤ t ∧ @Continuous α β t' tβ f ∧ @PolishSpace α t'


/-- Unbundled bounded linear functions are `C^∞`.
-/
theorem IsBoundedLinearMap.contDiff (hf : IsBoundedLinearMap 𝕜 f) : ContDiff 𝕜 n f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ∞}
(hf : IsBoundedLinearMap 𝕜 f)


@[simp]
theorem Orientation.map_refl : (Orientation.map ι <| LinearEquiv.refl R M) = Equiv.refl _

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(ι : Type u_4)

Orientation.map ι (LinearEquiv.refl R M) = Equiv.refl (Orientation R M ι)


theorem setIntegral_congr_set_ae (hst : s =ᵐ[μ] t) : ∫ x in s, f x ∂μ = ∫ x in t, f x ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{s t : Set X}
{μ : MeasureTheory.Measure X}
(hst : s =ᵐ[μ] t)

∫ (x : X) in s, f x ∂μ = ∫ (x : X) in t, f x ∂μ


theorem comp_fderivWithin {f : G → E} {s : Set G} {x : G} (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (iso ∘ f) s x = (iso : E →L[𝕜] F).comp (fderivWithin 𝕜 f s x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(iso : E ≃L[𝕜] F)
{f : G → E}
{s : Set G}
{x : G}
(hxs : UniqueDiffWithinAt 𝕜 s x)

fderivWithin 𝕜 (⇑iso ∘ f) s x = (↑iso).comp (fderivWithin 𝕜 f s x)


/-- An object is projective if its preadditive Co-Yoneda functor preserves finite colimits. -/
theorem projective_of_preservesFiniteColimits_preadditiveCoyonedaObj (P : C)
    [hP : PreservesFiniteColimits (preadditiveCoyonedaObj (op P))] : Projective P

[hP : CategoryTheory.Limits.PreservesFiniteColimits (CategoryTheory.preadditiveCoyonedaObj (Opposite.op P))]


/-- Inversion as a measurable automorphism of a group or group with zero. -/
@[to_additive (attr := simps! (config := .asFn) toEquiv apply)
    "Negation as a measurable automorphism of an additive group."]
def inv (G) [MeasurableSpace G] [InvolutiveInv G] [MeasurableInv G] : G ≃ᵐ G

(G : Type u_4)
[MeasurableSpace G]
[InvolutiveInv G]
[MeasurableInv G]

(MeasurableEquiv.inv G).toEquiv = Equiv.inv G


@[simp]
theorem toMeasure_uniformOfFinset_apply [MeasurableSpace α] (ht : MeasurableSet t) :
    (uniformOfFinset s hs).toMeasure t = (s.filter (· ∈ t)).card / s.card

{α : Type u_1}
{s : Finset α}
(hs : s.Nonempty)
(t : Set α)
[MeasurableSpace α]
(ht : MeasurableSet t)

(PMF.uniformOfFinset s hs).toMeasure t = ↑(Finset.filter (fun x => x ∈ t) s).card / ↑s.card


@[to_additive (attr := simp)]
theorem div_apply [Div β] [ContinuousDiv β] (f g : C(α, β)) (x : α) : (f / g) x = f x / g x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Div β]
[ContinuousDiv β]
(f g : C(α, β))
(x : α)


@[to_additive]
theorem closure_union (s t : Set M) : closure (s ∪ t) = closure s ⊔ closure t

{M : Type u_1}
[AddZeroClass M]
(s t : Set M)

AddSubmonoid.closure (s ∪ t) = AddSubmonoid.closure s ⊔ AddSubmonoid.closure t


/--
If `S1` and `S2` are sums of squares in a semiring `R`, then `S1 + S2` is a sum of squares in `R`.
-/
theorem isSumSq.add [AddMonoid R] {S1 S2 : R} (p1 : isSumSq S1)
    (p2 : isSumSq S2) : isSumSq (S1 + S2)

{R : Type u_1}
[Mul R]
[AddMonoid R]
{S1 S2 : R}
(p1 : isSumSq S1)
(p2 : isSumSq S2)


/-- In a weakly locally compact space,
the filters `𝓝 x` and `cocompact X` are disjoint for all `X`. -/
theorem disjoint_nhds_cocompact [WeaklyLocallyCompactSpace X] (x : X) :
    Disjoint (𝓝 x) (cocompact X)

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


@[simp, norm_cast]
theorem coe_coe (f : M₁ →SL[σ₁₂] M₂) : ⇑(f : M₁ →ₛₗ[σ₁₂] M₂) = f

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


theorem mem_prod_iff_left {s : Set (α × β)} :
    s ∈ f ×ˢ g ↔ ∃ t ∈ f, ∀ᶠ y in g, ∀ x ∈ t, (x, y) ∈ s

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Filter β}
{s : Set (α × β)}

s ∈ f ×ˢ g ↔ ∃ t ∈ f, ∀ᶠ (y : β) in g, ∀ x ∈ t, (x, y) ∈ s


@[to_additive]
theorem inv_ne_one : a⁻¹ ≠ 1 ↔ a ≠ 1

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

a⁻¹ ≠ 1 ↔ a ≠ 1


protected theorem eq_zero_or_eq_zero_of_mul_eq_zero : ∀ {a b : ℤ√d}, a * b = 0 → a = 0 ∨ b = 0

{d : ℕ}
[dnsq : Zsqrtd.Nonsquare d]
{a b : ℤ√↑d}


/-- homotopy is closed under composition -/
@[simps!]
def comp {C₁ C₂ C₃ : HomologicalComplex V c} {f₁ g₁ : C₁ ⟶ C₂} {f₂ g₂ : C₂ ⟶ C₃}
    (h₁ : Homotopy f₁ g₁) (h₂ : Homotopy f₂ g₂) : Homotopy (f₁ ≫ f₂) (g₁ ≫ g₂)

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C₁ C₂ C₃ : HomologicalComplex V c}
{f₁ g₁ : C₁ ⟶ C₂}
{f₂ g₂ : C₂ ⟶ C₃}
(h₁ : Homotopy f₁ g₁)
(h₂ : Homotopy f₂ g₂)
(i j : ι)

(h₁.comp h₂).hom i j = h₁.hom i j ≫ f₂.f j + g₁.f i ≫ h₂.hom i j


@[simp]
theorem range_IicExtend (f : Iic b → β) : range (IicExtend f) = range f

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{b : α}
(f : ↑(Set.Iic b) → β)

Set.range (Set.IicExtend f) = Set.range f


@[simp]
theorem mapMatrix_trans (f : α ≃ₐ[R] β) (g : β ≃ₐ[R] γ) :
    f.mapMatrix.trans g.mapMatrix = ((f.trans g).mapMatrix : Matrix m m α ≃ₐ[R] _)

{m : Type u_2}
{R : Type u_7}
{α : Type v}
{β : Type w}
{γ : Type u_9}
[Fintype m]
[DecidableEq m]
[CommSemiring R]
[Semiring α]
[Semiring β]
[Semiring γ]
[Algebra R α]
[Algebra R β]
[Algebra R γ]
(f : α ≃ₐ[R] β)
(g : β ≃ₐ[R] γ)

f.mapMatrix.trans g.mapMatrix = (f.trans g).mapMatrix


/-- Negating the orientation negates the angle in `rotation`. -/
theorem rotation_neg_orientation_eq_neg (θ : Real.Angle) : (-o).rotation θ = o.rotation (-θ)

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


theorem IsTranscendenceBasis.isAlgebraic [Nontrivial R] (hx : IsTranscendenceBasis R x) :
    Algebra.IsAlgebraic (adjoin R (range x)) A

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
[Nontrivial R]
(hx : IsTranscendenceBasis R x)

Algebra.IsAlgebraic (↥(Algebra.adjoin R (Set.range x))) A


@[simp]
theorem ssubset_toFinset {s : Finset α} : s ⊂ ht.toFinset ↔ ↑s ⊂ t

{α : Type u}
{t : Set α}
{ht : t.Finite}
{s : Finset α}


@[to_additive]
theorem mem_nhds_one : (U : Set G) ∈ 𝓝 (1 : G)

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
(U : OpenAddSubgroup G)


/-- The elements of the non-unital subsemiring closure of `M` are exactly the elements of the
additive closure of a multiplicative subsemigroup `M`. -/
theorem coe_closure_eq (s : Set R) :
    (closure s : Set R) = AddSubmonoid.closure (Subsemigroup.closure s : Set R)

{R : Type u}
[NonUnitalNonAssocSemiring R]
(s : Set R)

↑(NonUnitalSubsemiring.closure s) = ↑(AddSubmonoid.closure ↑(Subsemigroup.closure s))


/-- A sequentially compact set in a uniform set with countably generated uniformity filter
is complete. -/
protected theorem IsSeqCompact.isComplete (hs : IsSeqCompact s) : IsComplete s

{X : Type u_1}
[UniformSpace X]
{s : Set X}
[(𝓤 X).IsCountablyGenerated]
(hs : IsSeqCompact s)


@[simp]
theorem sheafificationWhiskerRightIso_inv_app :
    (J.sheafificationWhiskerRightIso F).inv.app P = (J.sheafifyCompIso F P).inv

(J : CategoryTheory.GrothendieckTopology C)

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

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

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

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

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ E]

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ F]

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


theorem gcd_eq_left {i j : ℤ} (H : i ∣ j) : gcd i j = natAbs i


theorem affine_affine_hasPullback {B C : CommRingCat} {X : Scheme}
    (f : X ⟶ Spec C) (g : Spec B ⟶ Spec C) :
    HasPullback f g

(g : AlgebraicGeometry.Spec B ⟶ AlgebraicGeometry.Spec C)


theorem row_vecMul [Fintype m] [NonUnitalNonAssocSemiring α] (M : Matrix m n α) (v : m → α) :
    Matrix.row ι (v ᵥ* M) = Matrix.row ι v * M

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{ι : Type u_6}
[Fintype m]
[NonUnitalNonAssocSemiring α]
(M : Matrix m n α)
(v : m → α)

Matrix.row ι (Matrix.vecMul v M) = Matrix.row ι v * M


/-- If two locally integrable functions on a finite-dimensional real manifold have the same integral
when multiplied by any smooth compactly supported function, then they coincide almost everywhere. -/
theorem ae_eq_of_integral_smooth_smul_eq
    (hf : LocallyIntegrable f μ) (hf' : LocallyIntegrable f' μ) (h : ∀ (g : M → ℝ),
      Smooth I 𝓘(ℝ) g → HasCompactSupport g → ∫ x, g x • f x ∂μ = ∫ x, g x • f' x ∂μ) :
    ∀ᵐ x ∂μ, f x = f' x

(hf : MeasureTheory.LocallyIntegrable f μ)

(hf' : MeasureTheory.LocallyIntegrable f' μ)

(h : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ)


@[to_additive]
theorem HasProd.mul (hf : HasProd f a) (hg : HasProd g b) :
    HasProd (fun b ↦ f b * g b) (a * b)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f g : β → α}
{a b : α}
[ContinuousAdd α]
(hf : HasSum f a)
(hg : HasSum g b)


/-- The 1 of the quotient of a monoid by a congruence relation is the equivalence class of the
    monoid's 1. -/
@[to_additive (attr := simp) "The 0 of the quotient of an `AddMonoid` by an additive congruence
relation is the equivalence class of the `AddMonoid`'s 0."]
theorem coe_one : ((1 : M) : c.Quotient) = 1

{M : Type u_1}
[MulOneClass M]
{c : Con M}


lemma equation_of_Z_eq_zero {P : Fin 3 → R} (hPz : P z = 0) :
    W'.Equation P ↔ P y ^ 2 = P x ^ 3

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


@[to_additive]
lemma ofUnits_le_iff_le_units (S : Submonoid M) (H : Subgroup Mˣ) :
    H.ofUnits ≤ S ↔ H ≤ S.units

{M : Type u_1}
[AddMonoid M]
(S : AddSubmonoid M)
(H : AddSubgroup (AddUnits M))


/-- **Class formula** for a finite group acting on a finite type. See
`MulAction.card_eq_sum_card_group_div_card_stabilizer` for a specialized version using
`Quotient.out'`. -/
@[to_additive
      "**Class formula** for a finite group acting on a finite type. See
      `AddAction.card_eq_sum_card_addGroup_div_card_stabilizer` for a specialized version using
      `Quotient.out'`."]
theorem card_eq_sum_card_group_div_card_stabilizer' [Fintype α] [Fintype β] [Fintype Ω]
    [∀ b : β, Fintype <| stabilizer α b] {φ : Ω → β} (hφ : LeftInverse Quotient.mk'' φ) :
    Fintype.card β = ∑ ω : Ω, Fintype.card α / Fintype.card (stabilizer α (φ ω))

[Fintype (Quotient (MulAction.orbitRel α β))]

[(b : β) → Fintype ↥(MulAction.stabilizer α b)]

{φ : Quotient (MulAction.orbitRel α β) → β}

(hφ : Function.LeftInverse Quotient.mk'' φ)

Fintype.card β = ∑ ω : Quotient (MulAction.orbitRel α β), Fintype.card α / Fintype.card ↥(MulAction.stabilizer α (φ ω))


@[simp]
theorem up_down {a : α} : (down a).up = a


/-- As a corollary of Schur's lemma for preadditive categories,
any morphism between simple objects is (exclusively) either an isomorphism or zero.
-/
theorem isIso_iff_nonzero [HasKernels C] {X Y : C} [Simple X] [Simple Y] (f : X ⟶ Y) :
    IsIso f ↔ f ≠ 0

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.Limits.HasKernels C]
{X Y : C}
[CategoryTheory.Simple X]
[CategoryTheory.Simple Y]
(f : X ⟶ Y)


@[to_additive]
lemma mulSupport_iInf [ConditionallyCompleteLattice M] [Nonempty ι] (f : ι → α → M) :
    mulSupport (fun x ↦ ⨅ i, f i x) ⊆ ⋃ i, mulSupport (f i)

{ι : Sort u_1}
{α : Type u_2}
{M : Type u_4}
[Zero M]
[ConditionallyCompleteLattice M]
[Nonempty ι]
(f : ι → α → M)

(Function.support fun x => ⨅ i, f i x) ⊆ ⋃ i, Function.support (f i)


@[simp]
theorem _root_.map_finset_inf [SemilatticeInf β] [OrderTop β]
    [FunLike F α β] [InfTopHomClass F α β]
    (f : F) (s : Finset ι) (g : ι → α) : f (s.inf g) = s.inf (f ∘ g)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
{ι : Type u_5}
[SemilatticeInf α]
[OrderTop α]
[SemilatticeInf β]
[OrderTop β]
[FunLike F α β]
[InfTopHomClass F α β]
(f : F)
(s : Finset ι)
(g : ι → α)


theorem principal_add_one : Principal (· + ·) 1

Ordinal.Principal (fun x x_1 => x + x_1) 1


/-- Given a coalgebra morphism whose carrier part is an epimorphism, we get an algebra epimorphism.
-/
theorem algebra_epi_of_epi {X Y : Coalgebra G} (f : X ⟶ Y) [h : Epi f.f] : Epi f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(G : CategoryTheory.Comonad C)
{X Y : G.Coalgebra}
(f : X ⟶ Y)
[h : CategoryTheory.Epi f.f]


/-- `id` is entire -/
theorem analyticOn_id {s : Set E} : AnalyticOn 𝕜 (fun x : E ↦ x) s

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}


theorem eq_zero_rpow_iff {x : ℝ} {a : ℝ} : a = 0 ^ x ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1


theorem disjoint_closedBall_closedBall_iff (hδ : 0 ≤ δ) (hε : 0 ≤ ε) :
    Disjoint (closedBall x δ) (closedBall y ε) ↔ δ + ε < dist x y

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{x y : E}
{δ ε : ℝ}
(hδ : 0 ≤ δ)
(hε : 0 ≤ ε)

Disjoint (Metric.closedBall x δ) (Metric.closedBall y ε) ↔ δ + ε < dist x y


theorem comp_def {M N K : Mat_ C} (f : M ⟶ N) (g : N ⟶ K) :
    f ≫ g = fun i k => ∑ j : N.ι, f i j ≫ g j k

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
{M N K : CategoryTheory.Mat_ C}
(f : M ⟶ N)
(g : N ⟶ K)


theorem findIdx_lt_length_of_exists {xs : List α} (h : ∃ x ∈ xs, p x) :
    xs.findIdx p < xs.length

{α : Type u_1}
{p : α → Bool}
{xs : List α}
(h : ∃ x, x ∈ xs ∧ p x = true)


/-- Functor translating a commutative monoid object in a functor category
to a functor into the category of commutative monoid objects.
-/
@[simps!]
def functor : CommMon_ (C ⥤ D) ⥤ C ⥤ CommMon_ D

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

((CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.functor.obj A).obj X).mul = A.mul.app X


/-- A gluing datum consists of
1. An index type `J`
2. An object `U i` for each `i : J`.
3. An object `V i j` for each `i j : J`.
4. A monomorphism `f i j : V i j ⟶ U i` for each `i j : J`.
5. A transition map `t i j : V i j ⟶ V j i` for each `i j : J`.
such that
6. `f i i` is an isomorphism.
7. `t i i` is the identity.
8. The pullback for `f i j` and `f i k` exists.
9. `V i j ×[U i] V i k ⟶ V i j ⟶ V j i` factors through `V j k ×[U j] V j i ⟶ V j i` via some
    `t' : V i j ×[U i] V i k ⟶ V j k ×[U j] V j i`.
10. `t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _`.
-/
-- Porting note(#5171): linter not ported yet
-- @[nolint has_nonempty_instance]
structure GlueData where
  J : Type v
  U : J → C
  V : J × J → C
  f : ∀ i j, V (i, j) ⟶ U i
  f_mono : ∀ i j, Mono (f i j) := by infer_instance
  f_hasPullback : ∀ i j k, HasPullback (f i j) (f i k) := by infer_instance
  f_id : ∀ i, IsIso (f i i) := by infer_instance
  t : ∀ i j, V (i, j) ⟶ V (j, i)
  t_id : ∀ i, t i i = 𝟙 _
  t' : ∀ i j k, pullback (f i j) (f i k) ⟶ pullback (f j k) (f j i)
  t_fac : ∀ i j k, t' i j k ≫ pullback.snd _ _ = pullback.fst _ _ ≫ t i j
  cocycle : ∀ i j k, t' i j k ≫ t' j k i ≫ t' k i j = 𝟙 _

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
(self : CategoryTheory.GlueData C)
(i j k : self.J)

CategoryTheory.CategoryStruct.comp (self.t' i j k) (CategoryTheory.Limits.pullback.snd (self.f j k) (self.f j i)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.fst (self.f i j) (self.f i k)) (self.t i j)


@[to_additive]
theorem extend_mul [Mul γ] (f : α → β) (g₁ g₂ : α → γ) (e₁ e₂ : β → γ) :
    Function.extend f (g₁ * g₂) (e₁ * e₂) = Function.extend f g₁ e₁ * Function.extend f g₂ e₂

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Add γ]
(f : α → β)
(g₁ g₂ : α → γ)
(e₁ e₂ : β → γ)

Function.extend f (g₁ + g₂) (e₁ + e₂) = Function.extend f g₁ e₁ + Function.extend f g₂ e₂


lemma top_mul_of_pos {x : EReal} (h : 0 < x) : ⊤ * x = ⊤


@[simp]
theorem ofMkLEMk_comp {B A₁ A₂ : C} {f : A₁ ⟶ B} {g : A₂ ⟶ B} [Mono f] [Mono g] (h : mk f ≤ mk g) :
    ofMkLEMk f g h ≫ g = f

(h : CategoryTheory.Subobject.mk f ≤ CategoryTheory.Subobject.mk g)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Subobject.ofMkLEMk f g h) g = f


@[to_additive support_prod_mk]
theorem mulSupport_prod_mk (f : α → M) (g : α → N) :
    (mulSupport fun x => (f x, g x)) = mulSupport f ∪ mulSupport g

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
[One M]
[One N]
(f : α → M)
(g : α → N)

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


theorem liftPropAt_iff_comp_subtype_val (hG : LocalInvariantProp G G' P) {U : Opens M}
    (f : M → M') (x : U) :
    LiftPropAt P f x ↔ LiftPropAt P (f ∘ Subtype.val) x

{H : Type u_1}
{M : Type u_2}
{H' : Type u_3}
{M' : Type u_4}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[TopologicalSpace H']
[TopologicalSpace M']
[ChartedSpace H' M']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
(hG : G.LocalInvariantProp G' P)
{U : TopologicalSpace.Opens M}
(f : M → M')
(x : ↥U)

ChartedSpace.LiftPropAt P f ↑x ↔ ChartedSpace.LiftPropAt P (f ∘ Subtype.val) x


/-- Every generalized eigenvector is a generalized eigenvector for exponent `finrank K V`.
    (Lemma 8.11 of [axler2015]) -/
theorem genEigenspace_le_genEigenspace_finrank [FiniteDimensional K V] (f : End K V)
    (μ : K) (k : ℕ) : f.genEigenspace μ k ≤ f.genEigenspace μ (finrank K V)

{K : Type v}
{V : Type w}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
(f : Module.End K V)
(μ : K)
(k : ℕ)

(f.genEigenspace μ) k ≤ (f.genEigenspace μ) (FiniteDimensional.finrank K V)


@[simp]
theorem sqrt_mul_self (h : 0 ≤ x) : √(x * x) = x


@[to_additive (attr := simp)]
lemma orbitRel.Quotient.orbit_inj {x y : orbitRel.Quotient G α} : x.orbit = y.orbit ↔ x = y

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{x y : MulAction.orbitRel.Quotient G α}


theorem image_vsub_prod : (fun x : β × β ↦ x.fst -ᵥ x.snd) '' s ×ˢ t = s -ᵥ t

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{s t : Set β}

(fun x => x.1 -ᵥ x.2) '' s ×ˢ t = s -ᵥ t


@[simp]
theorem gcd_singleton {b : β} : ({b} : Finset β).gcd f = normalize (f b)

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{f : β → α}
{b : β}


/-- Given `X : T`, to upgrade a functor `F : S ⥤ T` to a functor `S ⥤ Under X`, it suffices to
    provide maps `X ⟶ F.obj Y` for all `Y` making the obvious triangles involving all `F.map g`
    commute.  -/
@[simps! obj_right map_right]
def toUnder (F : S ⥤ T) (X : T) (f : (Y : S) → X ⟶ F.obj Y)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), f Y ≫ F.map g = f Z) : S ⥤ Under X

(h : ∀ {Y Z : S} (g : Y ⟶ Z), CategoryTheory.CategoryStruct.comp (f Y) (F.map g) = f Z)

((F.toUnder X f h).obj Y).right = F.obj Y


@[to_additive]
theorem Nonempty.of_mul_left : (s * t).Nonempty → s.Nonempty

{α : Type u_2}
[DecidableEq α]
[Mul α]
{s t : Finset α}


lemma dblY_of_Z_eq_zero {P : Fin 3 → R} (hP : W'.Equation P) (hPz : P z = 0) :
    W'.dblY P = (P x ^ 2) ^ 3

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P : Fin 3 → R}
(hP : W'.Equation P)
(hPz : P z = 0)


/-- `mul_right_comm` for `Algebra`s when one element is from the base ring. -/
theorem right_comm (x : A) (r : R) (y : A) :
    x * algebraMap R A r * y = x * y * algebraMap R A r

{R : Type u}
{A : Type w}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)
(r : R)
(y : A)

x * (algebraMap R A) r * y = x * y * (algebraMap R A) r


theorem congr_iff {s : Set H} {x : H} {f g : H → H'} (h : f =ᶠ[𝓝 x] g) : P f s x ↔ P g s x

{H : Type u_1}
{H' : Type u_3}
[TopologicalSpace H]
[TopologicalSpace H']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
(hG : G.LocalInvariantProp G' P)
{s : Set H}
{x : H}
{f g : H → H'}
(h : f =ᶠ[𝓝 x] g)


@[simp] lemma unop_tensorObj (X Y : Cᵒᵖ) : unop (X ⊗ Y) = unop X ⊗ unop Y

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

Opposite.unop (CategoryTheory.MonoidalCategory.tensorObj X Y) =
  CategoryTheory.MonoidalCategory.tensorObj (Opposite.unop X) (Opposite.unop Y)


theorem tendsto_of_ne_zero {γ : Γ₀} (h : γ ≠ 0) : Tendsto f l (𝓝 γ) ↔ ∀ᶠ x in l, f x = γ

{α : Type u_1}
{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]
{l : Filter α}
{f : α → Γ₀}
{γ : Γ₀}
(h : γ ≠ 0)

Filter.Tendsto f l (𝓝 γ) ↔ ∀ᶠ (x : α) in l, f x = γ


/-- The `MonoidHom` from a subgroup to its image. -/
@[to_additive (attr := simps!) "the `AddMonoidHom` from an additive subgroup to its image"]
def subgroupMap (f : G →* G') (H : Subgroup G) : H →* H.map f

{G : Type u_1}
{G' : Type u_2}
[AddGroup G]
[AddGroup G']
(f : G →+ G')
(H : AddSubgroup G)
(x : ↥H.toAddSubmonoid)


/-- Decomposition of a `k`-algebra homomorphism from `MonoidAlgebra k G` by
its values on `F (single a 1)`. -/
theorem lift_unique (F : k[G] →ₐ[k] A) (f : MonoidAlgebra k G) :
    F f = f.sum fun a b => b • F (single a 1)

{k : Type u₁}
{G : Type u₂}
[CommSemiring k]
[AddMonoid G]
{A : Type u₃}
[Semiring A]
[Algebra k A]
(F : AddMonoidAlgebra k G →ₐ[k] A)
(f : MonoidAlgebra k G)

F f = Finsupp.sum f fun a b => b • F (AddMonoidAlgebra.single a 1)


@[simp] theorem infinite_abs_iff {x : ℝ*} : Infinite |x| ↔ Infinite x


@[simp]
theorem reflect_C (r : R) (N : ℕ) : reflect N (C r) = C r * X ^ N

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

Polynomial.reflect N (Polynomial.C r) = Polynomial.C r * Polynomial.X ^ N


theorem card_eq [Fintype V] [Fintype W] : Fintype.card V = Fintype.card W

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G ≃g G')
[Fintype V]
[Fintype W]


theorem exists_path_through_family {n : ℕ} (p : Fin (n + 1) → X) :
    ∃ γ : Path (p 0) (p n), ∀ i, p i ∈ range γ

{X : Type u_1}
[TopologicalSpace X]
[PathConnectedSpace X]
{n : ℕ}
(p : Fin (n + 1) → X)

∃ γ, ∀ (i : Fin (n + 1)), p i ∈ Set.range ⇑γ


theorem pred_top_le_iff : pred ⊤ ≤ a ↔ a = ⊤ ∨ a = pred ⊤

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a : α}
[OrderTop α]

Order.pred ⊤ ≤ a ↔ a = ⊤ ∨ a = Order.pred ⊤


@[to_additive]
theorem epi_iff_surjective : Epi f ↔ Function.Surjective f

CategoryTheory.Epi f ↔ Function.Surjective ⇑f


/-- The functor `HomologicalComplex C c ⥤ ShortComplex C` which sends a homological
complex `K` to the short complex `K.X i ⟶ K.X j ⟶ K.X k` for arbitrary indices `i`, `j` and `k`. -/
@[simps]
def shortComplexFunctor' (i j k : ι) : HomologicalComplex C c ⥤ ShortComplex C

((HomologicalComplex.shortComplexFunctor' C c i j k).obj K).X₃ = K.X k


@[simp]
theorem mem_toMultiset (f : α →₀ ℕ) (i : α) : i ∈ toMultiset f ↔ i ∈ f.support

i ∈ Finsupp.toMultiset f ↔ i ∈ f.support


theorem trans_source'' : (e.trans e').source = e.symm '' (e.target ∩ e'.source)

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

(e.trans e').source = ↑e.symm '' (e.target ∩ e'.source)


theorem pos_of_dvd_of_pos {m n : Nat} (H1 : m ∣ n) (H2 : 0 < n) : 0 < m


@[simp]
lemma Cocone.toCostructuredArrow_comp_toOver_comp_forget {F : J ⥤ C} (c : Cocone F) :
    c.toCostructuredArrow ⋙ CostructuredArrow.toOver _ _ ⋙ Over.forget _ = F

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

c.toCostructuredArrow.comp ((CategoryTheory.CostructuredArrow.toOver F c.pt).comp (CategoryTheory.Over.forget c.pt)) = F


@[simp] theorem coe_ofNNRealHom : ⇑ofNNRealHom = some


theorem le_ciInf_set_iff {ι : Type*} {s : Set ι} {f : ι → α} {a : α} (hs : s.Nonempty)
    (hf : BddBelow (f '' s)) : (a ≤ ⨅ i : s, f i) ↔ ∀ i ∈ s, a ≤ f i

{α : Type u_1}
[ConditionallyCompleteLattice α]
{ι : Type u_5}
{s : Set ι}
{f : ι → α}
{a : α}
(hs : s.Nonempty)
(hf : BddBelow (f '' s))


lemma charP_of_ne_zero (hn : card R = p) (hR : ∀ i < p, (i : R) = 0 → i = 0) : CharP R p

{R : Type u_6}
[NonAssocRing R]
[Fintype R]
(p : ℕ)
(hn : Fintype.card R = p)
(hR : ∀ i < p, ↑i = 0 → i = 0)


lemma equiv_some_of_Z_ne_zero {P : Fin 3 → F} (hPz : P z ≠ 0) : P ≈ ![P x / P z, P y / P z, 1]

{F : Type u}
[Field F]
{P : Fin 3 → F}
(hPz : P 2 ≠ 0)


theorem Set.Countable.exists_pos_forall_sum_le {ι : Type*} {s : Set ι} (hs : s.Countable) {ε : ℝ}
    (hε : 0 < ε) : ∃ ε' : ι → ℝ,
    (∀ i, 0 < ε' i) ∧ ∀ t : Finset ι, ↑t ⊆ s → ∑ i ∈ t, ε' i ≤ ε

{ι : Type u_4}
{s : Set ι}
(hs : s.Countable)
{ε : ℝ}
(hε : 0 < ε)

∃ ε', (∀ (i : ι), 0 < ε' i) ∧ ∀ (t : Finset ι), ↑t ⊆ s → ∑ i ∈ t, ε' i ≤ ε


theorem Separable.inj_of_prod_X_sub_C [Nontrivial R] {ι : Sort _} {f : ι → R} {s : Finset ι}
    (hfs : (∏ i ∈ s, (X - C (f i))).Separable) {x y : ι} (hx : x ∈ s) (hy : y ∈ s)
    (hfxy : f x = f y) : x = y

(hfs : (∏ i ∈ s, (Polynomial.X - Polynomial.C (f i))).Separable)


@[simp]
theorem zero_opow {a : Ordinal} (a0 : a ≠ 0) : (0 : Ordinal) ^ a = 0


theorem linearIndependent_iff'' :
    LinearIndependent R v ↔
      ∀ (s : Finset ι) (g : ι → R), (∀ i ∉ s, g i = 0) →
        ∑ i ∈ s, g i • v i = 0 → ∀ i, g i = 0

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

LinearIndependent R v ↔ ∀ (s : Finset ι) (g : ι → R), (∀ i ∉ s, g i = 0) → ∑ i ∈ s, g i • v i = 0 → ∀ (i : ι), g i = 0


@[simp]
theorem whiskerRight_twice {H K : B ⥤ C} (F : C ⥤ D) (G : D ⥤ E) (α : H ⟶ K) :
    whiskerRight (whiskerRight α F) G = whiskerRight α (F ⋙ G)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{B : Type u₄}
[CategoryTheory.Category.{v₄, u₄} B]
{H K : CategoryTheory.Functor B C}
(F : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
(α : H ⟶ K)

CategoryTheory.whiskerRight (CategoryTheory.whiskerRight α F) G = CategoryTheory.whiskerRight α (F.comp G)


protected theorem isOpen_iff (s : Set (Σi, E i)) :
    IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ y, dist x y < ε → y ∈ s

{ι : Type u_1}
{E : ι → Type u_2}
[(i : ι) → MetricSpace (E i)]
(s : Set ((i : ι) × E i))

IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ (y : (i : ι) × E i), dist x y < ε → y ∈ s


/-- A family `𝓕 : ι → X → α` is equicontinuous at `x₀` within `S` iff `range 𝓕` is equicontinuous
at `x₀` within `S`, i.e the family `(↑) : range F → X → α` is equicontinuous at `x₀` within `S`. -/
theorem equicontinuousWithinAt_iff_range {F : ι → X → α} {S : Set X} {x₀ : X} :
    EquicontinuousWithinAt F S x₀ ↔ EquicontinuousWithinAt ((↑) : range F → X → α) S x₀

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

EquicontinuousWithinAt F S x₀ ↔ EquicontinuousWithinAt Subtype.val S x₀


@[simp] theorem ofNat_eq_coe : Int.ofNat n = Nat.cast n


/-- The restriction of scalars of presheaves of modules, on objects. -/
@[simps]
noncomputable def restrictScalarsBundledCore (M' : PresheafOfModules R') (α : R ⟶ R') :
    BundledCorePresheafOfModules R

{C : Type u'}
[CategoryTheory.Category.{v', u'} C]
{R R' : Cᵒᵖ ⥤ RingCat}
(M' : PresheafOfModules R')
(α : R ⟶ R')
{X Y : Cᵒᵖ}
(f : X ⟶ Y)
(a : ↑(M'.obj X))

((M'.restrictScalarsBundledCore α).map f) a = (M'.map f) a


theorem isPrimary_inf {I J : Ideal R} (hi : IsPrimary I) (hj : IsPrimary J)
    (hij : radical I = radical J) : IsPrimary (I ⊓ J)

{R : Type u_1}
[CommSemiring R]
{I J : Ideal R}
(hi : I.IsPrimary)
(hj : J.IsPrimary)
(hij : I.radical = J.radical)


theorem IsBigOWith.const_smul_self (c' : R) :
    IsBigOWith (‖c'‖) l (fun x => c' • f' x) f'

{α : Type u_1}
{E' : Type u_6}
{R : Type u_13}
[SeminormedAddCommGroup E']
[SeminormedRing R]
{f' : α → E'}
{l : Filter α}
[Module R E']
[BoundedSMul R E']
(c' : R)

Asymptotics.IsBigOWith ‖c'‖ l (fun x => c' • f' x) f'


protected theorem _root_.IsAntichain.ordConnected (hs : IsAntichain (· ≤ ·) s) : s.OrdConnected

(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)


lemma toTriangle_surjOn [NoAccidental t] :
    (t : Set (α × β × γ)).SurjOn toTriangle ((graph t).cliqueSet 3)

Set.SurjOn (⇑SimpleGraph.TripartiteFromTriangles.toTriangle) (↑t)
  ((SimpleGraph.TripartiteFromTriangles.graph t).cliqueSet 3)


theorem Disjoint.set_prod_left (hs : Disjoint s₁ s₂) (t₁ t₂ : Set β) :
    Disjoint (s₁ ×ˢ t₁) (s₂ ×ˢ t₂)

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
(hs : Disjoint s₁ s₂)
(t₁ t₂ : Set β)


/-- A seminorm is convex. Also see `convexOn_norm`. -/
protected theorem convexOn : ConvexOn ℝ univ p

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[NormedSpace ℝ 𝕜]
[Module 𝕜 E]
[SMul ℝ E]
[IsScalarTower ℝ 𝕜 E]
(p : Seminorm 𝕜 E)


protected lemma RightInvOn.extendDomain (h : RightInvOn g₁ g₂ t) :
    RightInvOn (g₁.extendDomain f) (g₂.extendDomain f) ((↑) ∘ f '' t)

{α : Type u_1}
{β : Type u_2}
{p : β → Prop}
[DecidablePred p]
{f : α ≃ Subtype p}
{g₁ g₂ : Equiv.Perm α}
{t : Set α}
(h : Set.RightInvOn (⇑g₁) (⇑g₂) t)

Set.RightInvOn (⇑(g₁.extendDomain f)) (⇑(g₂.extendDomain f)) (Subtype.val ∘ ⇑f '' t)


theorem dist_eq_of_ne {x y : ∀ n, E n} (h : x ≠ y) : dist x y = (1 / 2 : ℝ) ^ firstDiff x y

{E : ℕ → Type u_1}
{x y : (n : ℕ) → E n}
(h : x ≠ y)

dist x y = (1 / 2) ^ PiNat.firstDiff x y


theorem _root_.MeasureTheory.Integrable.condexpKernel_ae (hf_int : Integrable f μ) :
    ∀ᵐ ω ∂μ, Integrable f (condexpKernel μ m ω)

{Ω : Type u_1}
{F : Type u_2}
{m : MeasurableSpace Ω}
[mΩ : MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
[NormedAddCommGroup F]
{f : Ω → F}
(hf_int : MeasureTheory.Integrable f μ)

∀ᵐ (ω : Ω) ∂μ, MeasureTheory.Integrable f ((ProbabilityTheory.condexpKernel μ m) ω)


theorem hasGradientAt_const : HasGradientAt (fun _ => c) 0 x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
(x : F)
(c : 𝕜)


@[to_additive]
theorem monotone_map {f : F} : Monotone (map f)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{f : F}


theorem lift_uniq (H : Set.range g.base ⊆ Set.range f.base) (l : Y ⟶ X) (hl : l ≫ f = g) :
    l = lift f g H

{X Y Z : AlgebraicGeometry.PresheafedSpace C}

[hf : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

(H : Set.range ⇑g.base ⊆ Set.range ⇑f.base)

l = AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.lift f g H


/-- If a functor preserves span and cospan, then it preserves images.
-/
@[simps!]
def iso {X Y : A} (f : X ⟶ Y) : image (L.map f) ≅ L.obj (image f)

[{X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan f g) L]

[{X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.span f g) L]

(CategoryTheory.PreservesImage.iso L f).hom =
  CategoryTheory.Limits.image.lift
    (CategoryTheory.Limits.MonoFactorisation.mk (L.obj (CategoryTheory.Limits.image f))
      (L.map (CategoryTheory.Limits.image.ι f)) (L.map (CategoryTheory.Limits.factorThruImage f)) ⋯)


/-- Dominated convergence theorem for nonnegative functions which are just almost everywhere
measurable. -/
theorem tendsto_lintegral_of_dominated_convergence' {F : ℕ → α → ℝ≥0∞} {f : α → ℝ≥0∞}
    (bound : α → ℝ≥0∞) (hF_meas : ∀ n, AEMeasurable (F n) μ) (h_bound : ∀ n, F n ≤ᵐ[μ] bound)
    (h_fin : ∫⁻ a, bound a ∂μ ≠ ∞) (h_lim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))) :
    Tendsto (fun n => ∫⁻ a, F n a ∂μ) atTop (𝓝 (∫⁻ a, f a ∂μ))

{F : ℕ → α → ℝ≥0∞}

{f : α → ℝ≥0∞}

(hF_meas : ∀ (n : ℕ), AEMeasurable (F n) μ)

(h_lim : ∀ᵐ (a : α) ∂μ, Filter.Tendsto (fun n => F n a) Filter.atTop (𝓝 (f a)))

Filter.Tendsto (fun n => ∫⁻ (a : α), F n a ∂μ) Filter.atTop (𝓝 (∫⁻ (a : α), f a ∂μ))


/-- An arrow in the groupoid defines, by conjugation, an isomorphism of groups between
its endpoints.
-/
@[simps]
def vertexGroupIsomOfMap {c d : C} (f : c ⟶ d) : (c ⟶ c) ≃* (d ⟶ d)

{C : Type u}
[CategoryTheory.Groupoid C]
{c d : C}
(f : c ⟶ d)
(γ : c ⟶ c)

(CategoryTheory.Groupoid.vertexGroupIsomOfMap f) γ =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Groupoid.inv f) (CategoryTheory.CategoryStruct.comp γ f)


theorem inf_submodule : (F ⊓ F').submodule = F.submodule ⊓ F'.submodule

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


@[to_additive (attr := simp, norm_cast)]
theorem coe_smul (c : M) (x : X) : (↑(c • x) : Completion X) = c • (x : Completion X)

{M : Type v}
{X : Type x}
[UniformSpace X]
[VAdd M X]
[UniformContinuousConstVAdd M X]
(c : M)
(x : X)


theorem factors_right_of_inf_factors {A B : C} {X Y : Subobject B} {f : A ⟶ B}
    (h : (X ⊓ Y).Factors f) : Y.Factors f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{A B : C}
{X Y : CategoryTheory.Subobject B}
{f : A ⟶ B}
(h : (X ⊓ Y).Factors f)


theorem get_reverse' (l : List α) (n) (hn') :
    l.reverse.get n = l.get ⟨l.length - 1 - n, hn'⟩

{α : Type u}
(l : List α)
(n : Fin l.reverse.length)
(hn' : l.length - 1 - ↑n < l.length)

l.reverse.get n = l.get ⟨l.length - 1 - ↑n, hn'⟩


/--
Comonoid objects are contravariantly equivalent to monoid objects in the opposite category.
-/
@[simps]
def Comon_EquivMon_OpOp : Comon_ C ≌ (Mon_ (Cᵒᵖ))ᵒᵖ

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

(Comon_.Comon_EquivMon_OpOp C).functor = Comon_.Comon_ToMon_OpOp C


lemma filter_subset_univ [DecidableEq α] (s : Finset α) :
    filter (fun t ↦ t ⊆ s) univ = powerset s

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

Finset.filter (fun t => t ⊆ s) Finset.univ = s.powerset


theorem smul_inv (r : k) (φ : k⟦X⟧) : (r • φ)⁻¹ = r⁻¹ • φ⁻¹

{k : Type u_2}
[Field k]
(r : k)
(φ : PowerSeries k)

(r • φ)⁻¹ = r⁻¹ • φ⁻¹


theorem size_eq_natSize : ∀ n, (size n : ℕ) = natSize n


/-- Negating the first vector passed to `oangle` adds `π` to the angle. -/
theorem oangle_neg_left {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    o.oangle (-x) y = o.oangle x y + π

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


theorem mem_uniformity_isClosed {s : Set (α × α)} (h : s ∈ 𝓤 α) : ∃ t ∈ 𝓤 α, IsClosed t ∧ t ⊆ s

{α : Type ua}
[UniformSpace α]
{s : Set (α × α)}
(h : s ∈ 𝓤 α)


@[simp] lemma num_mk (q : ℚ) (hq : 0 ≤ q) : num ⟨q, hq⟩ = q.num.natAbs


theorem algebraMap_ne_zero {x : K[X]} (hx : x ≠ 0) : algebraMap K[X] (RatFunc K) x ≠ 0

{K : Type u}
[CommRing K]
[IsDomain K]
{x : K[X]}
(hx : x ≠ 0)


theorem continuousAt_parametric_primitive_of_dominated [FirstCountableTopology X]
    {F : X → ℝ → E} (bound : ℝ → ℝ) (a b : ℝ)
    {a₀ b₀ : ℝ} {x₀ : X} (hF_meas : ∀ x, AEStronglyMeasurable (F x) (μ.restrict <| Ι a b))
    (h_bound : ∀ᶠ x in 𝓝 x₀, ∀ᵐ t ∂μ.restrict <| Ι a b, ‖F x t‖ ≤ bound t)
    (bound_integrable : IntervalIntegrable bound μ a b)
    (h_cont : ∀ᵐ t ∂μ.restrict <| Ι a b, ContinuousAt (fun x ↦ F x t) x₀) (ha₀ : a₀ ∈ Ioo a b)
    (hb₀ : b₀ ∈ Ioo a b) (hμb₀ : μ {b₀} = 0) :
    ContinuousAt (fun p : X × ℝ ↦ ∫ t : ℝ in a₀..p.2, F p.1 t ∂μ) (x₀, b₀)

(hF_meas : ∀ (x : X), MeasureTheory.AEStronglyMeasurable (F x) (μ.restrict (Ι a b)))

(h_bound : ∀ᶠ (x : X) in nhds x₀, ∀ᵐ (t : ℝ) ∂μ.restrict (Ι a b), ‖F x t‖ ≤ bound t)

(h_cont : ∀ᵐ (t : ℝ) ∂μ.restrict (Ι a b), ContinuousAt (fun x => F x t) x₀)

ContinuousAt (fun p => ∫ (t : ℝ) in a₀..p.2, F p.1 t ∂μ) (x₀, b₀)


@[ext]
theorem ext {s t : LowerSet α} : (s : Set α) = t → s = t

{α : Type u_1}
[LE α]
{s t : LowerSet α}


theorem support_esymm (n : ℕ) [DecidableEq σ] [Nontrivial R] :
    (esymm σ R n).support =
      (powersetCard n (univ : Finset σ)).image fun t => ∑ i ∈ t, Finsupp.single i 1

(σ : Type u_1)
(R : Type u_2)
[CommSemiring R]
[Fintype σ]
(n : ℕ)
[DecidableEq σ]
[Nontrivial R]

(MvPolynomial.esymm σ R n).support =
  Finset.image (fun t => ∑ i ∈ t, Finsupp.single i 1) (Finset.powersetCard n Finset.univ)


@[to_additive] -- Porting note: simp removed, simpNF says LHS simplifies to itself
theorem ofHom_apply {X Y : Type u} [Mul X] [Mul Y] (f : X →ₙ* Y) (x : X) : ofHom f x = f x


/-- Define a structure for multiplicative characters.
A multiplicative character from a commutative monoid `R` to a commutative monoid with zero `R'`
is a homomorphism of (multiplicative) monoids that sends non-units to zero. -/
structure MulChar extends MonoidHom R R' where
  map_nonunit' : ∀ a : R, ¬IsUnit a → toFun a = 0

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
(self : MulChar R R')
(a : R)

¬IsUnit a → (↑self.toMonoidHom).toFun a = 0


/-- The eigenvalues of a positive semi-definite matrix are non-negative -/
lemma eigenvalues_nonneg [DecidableEq n] {A : Matrix n n 𝕜}
    (hA : Matrix.PosSemidef A) (i : n) : 0 ≤ hA.1.eigenvalues i

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


/-- Taking the product under `h` is an additive-to-multiplicative homomorphism of finsupps,
if `h` is an additive-to-multiplicative homomorphism.
This is a more specialized version of `Finsupp.prod_add_index` with simpler hypotheses. -/
@[to_additive
      "Taking the sum under `h` is an additive homomorphism of finsupps,if `h` is an additive
      homomorphism. This is a more specific version of `Finsupp.sum_add_index` with simpler
      hypotheses."]
theorem prod_add_index' [AddZeroClass M] [CommMonoid N] {f g : α →₀ M} {h : α → M → N}
    (h_zero : ∀ a, h a 0 = 1) (h_add : ∀ a b₁ b₂, h a (b₁ + b₂) = h a b₁ * h a b₂) :
    (f + g).prod h = f.prod h * g.prod h

(h_add : ∀ (a : α) (b₁ b₂ : M), h a (b₁ + b₂) = h a b₁ + h a b₂)


@[mono]
theorem comp_mono ⦃g₁ g₂ : β →o γ⦄ (hg : g₁ ≤ g₂) ⦃f₁ f₂ : α →o β⦄ (hf : f₁ ≤ f₂) :
    g₁.comp f₁ ≤ g₂.comp f₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
⦃g₁ g₂ : β →o γ⦄
(hg : g₁ ≤ g₂)
⦃f₁ f₂ : α →o β⦄
(hf : f₁ ≤ f₂)


theorem generateFrom_sup_generateFrom {s t : Set (Set α)} :
    generateFrom s ⊔ generateFrom t = generateFrom (s ∪ t)

MeasurableSpace.generateFrom s ⊔ MeasurableSpace.generateFrom t = MeasurableSpace.generateFrom (s ∪ t)


/-- Definition of `HasBasis` unfolded with implicit set argument. -/
theorem HasBasis.mem_iff (hl : l.HasBasis p s) : t ∈ l ↔ ∃ i, p i ∧ s i ⊆ t

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
{t : Set α}
(hl : l.HasBasis p s)


theorem fg_top (S : Subalgebra R A) : (⊤ : Subalgebra R S).FG ↔ S.FG

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)


@[simp]
theorem getElem_insertNth_self (l : List α) (x : α) (n : ℕ) (hn : n ≤ l.length)
    (hn' : n < (insertNth n x l).length := (by rwa [length_insertNth _ _ hn, Nat.lt_succ_iff])) :
    (insertNth n x l)[n] = x

(hn' : n < (List.insertNth n x l).length := ⋯)


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

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

CategoryTheory.Sieve.functorPullback F ⊤ = ⊤


theorem discr_odd_prime' [IsCyclotomicExtension {p} ℚ K] (hζ : IsPrimitiveRoot ζ p) (hodd : p ≠ 2) :
    discr ℚ (hζ.subOnePowerBasis ℚ).basis = (-1) ^ (((p : ℕ) - 1) / 2) * p ^ ((p : ℕ) - 2)

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

Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis = (-1) ^ ((↑p - 1) / 2) * ↑↑p ^ (↑p - 2)


theorem principal_mul_two : Principal (· * ·) 2

Ordinal.Principal (fun x x_1 => x * x_1) 2


theorem map_of_injective [MonoidHomClass F M N] (h : IsPrimitiveRoot ζ k) (hf : Injective f) :
    IsPrimitiveRoot (f ζ) k

{M : Type u_1}
{N : Type u_2}
{F : Type u_6}
[CommMonoid M]
[CommMonoid N]
{k : ℕ}
{ζ : M}
{f : F}
[FunLike F M N]
[MonoidHomClass F M N]
(h : IsPrimitiveRoot ζ k)
(hf : Function.Injective ⇑f)


/-- The class `EquivLike E α β` expresses that terms of type `E` have an
injective coercion to bijections between `α` and `β`.

Note that this does not directly extend `FunLike`, nor take `FunLike` as a parameter,
so we can state `coe_injective'` in a nicer way.

This typeclass is used in the definition of the isomorphism (or equivalence) typeclasses,
such as `ZeroEquivClass`, `MulEquivClass`, `MonoidEquivClass`, ....
-/
class EquivLike (E : Sort*) (α β : outParam (Sort*)) where
  /-- The coercion to a function in the forward direction. -/
  coe : E → α → β
  /-- The coercion to a function in the backwards direction. -/
  inv : E → β → α
  /-- The coercions are left inverses. -/
  left_inv : ∀ e, Function.LeftInverse (inv e) (coe e)
  /-- The coercions are right inverses. -/
  right_inv : ∀ e, Function.RightInverse (inv e) (coe e)
  /-- The two coercions to functions are jointly injective. -/
  coe_injective' : ∀ e g, coe e = coe g → inv e = inv g → e = g

{E : Sort u_1}
{α : outParam (Sort u_2)}
{β : outParam (Sort u_3)}
[self : EquivLike E α β]
(e : E)

Function.LeftInverse (EquivLike.inv e) (EquivLike.coe e)


@[simp]
theorem add_right [Distrib R] {a x y x' y' : R} (h : SemiconjBy a x y) (h' : SemiconjBy a x' y') :
    SemiconjBy a (x + x') (y + y')

{R : Type x}
[Distrib R]
{a x y x' y' : R}
(h : SemiconjBy a x y)
(h' : SemiconjBy a x' y')


/-- Map a cokernel cocone on the difference of two morphisms to the coequalizer cofork. -/
@[simps! pt]
def coforkOfCokernelCofork (c : CokernelCofork (f - g)) : Cofork f g

(c : CategoryTheory.Limits.CokernelCofork (f - g))

(CategoryTheory.Preadditive.coforkOfCokernelCofork c).pt = c.pt


/-- `s.sym2` is the finset of all unordered pairs of elements from `s`.
It is the image of `s ×ˢ s` under the quotient `α × α → Sym2 α`. -/
@[simps]
protected def sym2 (s : Finset α) : Finset (Sym2 α)


@[simp]
theorem hasDerivAt_deriv_iff : HasDerivAt f (deriv f x) x ↔ DifferentiableAt 𝕜 f x

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


theorem irreducible_iff_prime_iff :
    (∀ a : α, Irreducible a ↔ Prime a) ↔ ∀ a : Associates α, Irreducible a ↔ Prime a

(∀ (a : α), Irreducible a ↔ Prime a) ↔ ∀ (a : Associates α), Irreducible a ↔ Prime a


/-- Fundamental theorem of calculus: if `f : ℝ → E` is integrable on `a..b` and `f x` is continuous
on the right or on the left at `a`, then the right (resp., left) derivative of
`u ↦ ∫ x in u..b, f x` at `a` equals `-f a`. -/
theorem derivWithin_integral_left (hf : IntervalIntegrable f volume a b) {s t : Set ℝ}
    [FTCFilter a (𝓝[s] a) (𝓝[t] a)] (hmeas : StronglyMeasurableAtFilter f (𝓝[t] a))
    (ha : ContinuousWithinAt f t a)
    (hs : UniqueDiffWithinAt ℝ s a := by uniqueDiffWithinAt_Ici_Iic_univ) :
    derivWithin (fun u => ∫ x in u..b, f x) s a = -f a

(hf : IntervalIntegrable f MeasureTheory.volume a b)

[intervalIntegral.FTCFilter a (𝓝[s] a) (𝓝[t] a)]

(hmeas : StronglyMeasurableAtFilter f (𝓝[t] a) MeasureTheory.volume)

derivWithin (fun u => ∫ (x : ℝ) in u..b, f x) s a = -f a


theorem isClosedMap_mk : IsClosedMap (mk : X → SeparationQuotient X)


theorem exists_smul_add_of_span_sup_eq_top (y : L) : ∃ t : R, ∃ z ∈ I, y = t • x + z

(hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤)


@[to_additive]
theorem mulLeft_bijective (a : Mˣ) : Function.Bijective ((a * ·) : M → M)

{M : Type u_6}
[AddMonoid M]
(a : AddUnits M)


@[fun_prop]
theorem differentiable_fst : Differentiable 𝕜 (Prod.fst : E × F → E)

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


theorem mono_set_ae (hf : IntervalIntegrable f μ a b) (h : Ι c d ≤ᵐ[μ] Ι a b) :
    IntervalIntegrable f μ c d

{E : Type u_3}
[NormedAddCommGroup E]
{f : ℝ → E}
{a b c d : ℝ}
{μ : MeasureTheory.Measure ℝ}
(hf : IntervalIntegrable f μ a b)
(h : Ι c d ≤ᵐ[μ] Ι a b)


/-- The left fraction from `X` to `Y` given by a morphism `s : Y ⟶ X` such that `W s`. -/
@[simps]
def ofInv (s : Y ⟶ X) (hs : W s) :
    W.LeftFraction X Y

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(s : Y ⟶ X)
(hs : W s)

(CategoryTheory.MorphismProperty.LeftFraction.ofInv s hs).f = CategoryTheory.CategoryStruct.id X


@[simp]
lemma linearDeriv_apply [DecidableEq ι] [Fintype ι] (f : MultilinearMap R M₁ M₂)
    (x y : (i : ι) → M₁ i) :
    f.linearDeriv x y = ∑ i, f (update x i (y i))

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[DecidableEq ι]
[Fintype ι]
(f : MultilinearMap R M₁ M₂)
(x y : (i : ι) → M₁ i)

(f.linearDeriv x) y = ∑ i : ι, f (Function.update x i (y i))


/-- The top map in the coequalizer diagram we will construct. -/
@[simps!]
def FreeCoequalizer.topMap : (Monad.free T).obj (T.obj X.A) ⟶ (Monad.free T).obj X.A

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

(CategoryTheory.Monad.FreeCoequalizer.topMap X).f = T.map X.a


@[simp]
theorem coe_equivIco_mk_apply (x : 𝕜) :
    (equivIco p 0 <| QuotientAddGroup.mk x : 𝕜) = Int.fract (x / p) * p

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p : 𝕜)
[hp : Fact (0 < p)]
[FloorRing 𝕜]
(x : 𝕜)

↑((AddCircle.equivIco p 0) ↑x) = Int.fract (x / p) * p


private theorem abs_pos_of_ne_zero {α : Type*} [AddGroup α] [LinearOrder α]
    [CovariantClass α α (·+·) (·≤·)] {a : α} : a ≠ 0 → 0 < |a|

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


theorem mdifferentiableOn_atlas_symm (h : e ∈ atlas H M) : MDifferentiableOn I I e.symm e.target

{𝕜 : 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]
[SmoothManifoldWithCorners I M]
{e : PartialHomeomorph M H}
(h : e ∈ atlas H M)

MDifferentiableOn I I (↑e.symm) e.target


private theorem toStepOfLE.succ (n : ℕ) (h : 0 ≤ n) :
    toStepOfLE k 0 (n + 1) (h.trans n.le_succ) =
    (toStepSucc k n).comp (toStepOfLE k 0 n h)

(k : Type u)
[Field k]
(n : ℕ)
(h : 0 ≤ n)

AlgebraicClosure.toStepOfLE k 0 (n + 1) ⋯ = (AlgebraicClosure.toStepSucc k n).comp (AlgebraicClosure.toStepOfLE k 0 n h)


@[simp] lemma rev_last {n} : rev (@last n) = fz


/-- Subtracting a point from the point `p` is an injective
function. -/
theorem vsub_right_injective (p : P) : Function.Injective ((p -ᵥ ·) : P → G)

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
(p : P)


theorem foldr_monotone [Preorder β] {f : α → β → β} (H : ∀ a, Monotone (f a)) (l : List α) :
    Monotone fun b ↦ l.foldr f b

{α : Type u}
{β : Type v}
[Preorder β]
{f : α → β → β}
(H : ∀ (a : α), Monotone (f a))
(l : List α)


/-- Let the group `G` be the union of finitely many left cosets `g i • H i`. Then the
sum of the inverses of the indexes of the subgroups `H i` is greater than or equal to 1. -/
@[to_additive one_le_sum_inv_index_of_leftCoset_cover]
theorem one_le_sum_inv_index_of_leftCoset_cover :
    1 ≤ ∑ i ∈ s, ((H i).index : ℚ)⁻¹

(hcovers : ⋃ i ∈ s, g i • ↑(H i) = Set.univ)


theorem StrictConcaveOn.add_const {γ : Type*} {f : E → γ} [OrderedCancelAddCommMonoid γ]
    [Module 𝕜 γ] (hf : StrictConcaveOn 𝕜 s f) (b : γ) : StrictConcaveOn 𝕜 s (f + fun _ => b)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{s : Set E}
{γ : Type u_7}
{f : E → γ}
[OrderedCancelAddCommMonoid γ]
[Module 𝕜 γ]
(hf : StrictConcaveOn 𝕜 s f)
(b : γ)


@[simp]
theorem toMeasure_apply_finset (s : Finset α) : p.toMeasure s = ∑ x ∈ s, p x

{α : Type u_1}
[MeasurableSpace α]
(p : PMF α)
[MeasurableSingletonClass α]
(s : Finset α)


theorem Arrow.from_middle_condition {X : C} {S : J.Cover X} {T : ∀ I : S.Arrow, J.Cover I.Y}
    (I : (S.bind T).Arrow) : S I.fromMiddleHom

{J : CategoryTheory.GrothendieckTopology C}


@[simp]
lemma FixedPoints.mem_addSubgroup (a : α) : a ∈ α^+M ↔ ∀ m : M, m • a = a

(M : Type u)
(α : Type v)
[Monoid M]
[AddGroup α]
[DistribMulAction M α]
(a : α)


@[to_additive]
lemma IsUnit.smul [Group G] [Monoid M] [MulAction G M] [SMulCommClass G M M] [IsScalarTower G M M]
    {m : M} (g : G) (h : IsUnit m) : IsUnit (g • m)

{G : Type u_1}
{M : Type u_3}
[Group G]
[Monoid M]
[MulAction G M]
[SMulCommClass G M M]
[IsScalarTower G M M]
{m : M}
(g : G)
(h : IsUnit m)


@[simp]
theorem mem_cast (h : n = m) : a ∈ Sym.cast h s ↔ a ∈ s

{α : Type u_1}
{n m : ℕ}
{s : Sym α n}
{a : α}
(h : n = m)


@[ext]
lemma mapBifunctorBifunctor₂₃MapObj_ext {j : J} {A : C₄}
    (f g : mapBifunctorMapObj F ρ₂₃.q X₁ (mapBifunctorMapObj G₂₃ ρ₂₃.p X₂ X₃) j ⟶ A)
    (h : ∀ (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (h : r ⟨i₁, i₂, i₃⟩ = j),
      ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h ≫ f =
        ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h ≫ g) : f = g

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

(G₂₃ : CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₂₃))

(ρ₂₃ : CategoryTheory.GradedObject.BifunctorComp₂₃IndexData r)

{X₁ : CategoryTheory.GradedObject I₁ C₁}

{X₂ : CategoryTheory.GradedObject I₂ C₂}

{X₃ : CategoryTheory.GradedObject I₃ C₃}

[(((CategoryTheory.GradedObject.mapBifunctor G₂₃ I₂ I₃).obj X₂).obj X₃).HasMap ρ₂₃.p]

[(((CategoryTheory.GradedObject.mapBifunctor F I₁ ρ₂₃.I₂₃).obj X₁).obj
        (CategoryTheory.GradedObject.mapBifunctorMapObj G₂₃ ρ₂₃.p X₂ X₃)).HasMap
    ρ₂₃.q]

[H : CategoryTheory.GradedObject.HasGoodTrifunctor₂₃Obj F G₂₃ ρ₂₃ X₁ X₂ X₃]

(f g :
  CategoryTheory.GradedObject.mapBifunctorMapObj F ρ₂₃.q X₁
      (CategoryTheory.GradedObject.mapBifunctorMapObj G₂₃ ρ₂₃.p X₂ X₃) j ⟶
    A)

(h :
  ∀ (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (h : r (i₁, i₂, i₃) = j),
    CategoryTheory.CategoryStruct.comp
        (CategoryTheory.GradedObject.ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h) f =
      CategoryTheory.CategoryStruct.comp
        (CategoryTheory.GradedObject.ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h) g)


@[to_additive]
theorem div_iUnion (s : Set α) (t : ι → Set α) : (s / ⋃ i, t i) = ⋃ i, s / t i

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


/-- If the distance between `s n` and `s m`, `n, m ≥ N` is bounded above by `b N`
and `b` converges to zero, then `s` is a Cauchy sequence.  -/
theorem cauchySeq_of_le_tendsto_0 {s : β → α} (b : β → ℝ)
    (h : ∀ n m N : β, N ≤ n → N ≤ m → dist (s n) (s m) ≤ b N) (h₀ : Tendsto b atTop (𝓝 0)) :
    CauchySeq s

(h : ∀ (n m N : β), N ≤ n → N ≤ m → dist (s n) (s m) ≤ b N)

(h₀ : Filter.Tendsto b Filter.atTop (𝓝 0))


protected theorem Surjective.forall₂ (hf : Surjective f) {p : β → β → Prop} :
    (∀ y₁ y₂, p y₁ y₂) ↔ ∀ x₁ x₂, p (f x₁) (f x₂)

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
(hf : Function.Surjective f)
{p : β → β → Prop}

(∀ (y₁ y₂ : β), p y₁ y₂) ↔ ∀ (x₁ x₂ : α), p (f x₁) (f x₂)


@[simp]
theorem product_val : (s ×ˢ t).1 = s.1 ×ˢ t.1

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : Finset β}


theorem list_ofFn :
    ∀ {n} {f : Fin n → α → σ}, (∀ i, Primrec (f i)) → Primrec fun a => List.ofFn fun i => f i a

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
{n : ℕ}
{f : Fin n → α → σ}

(∀ (i : Fin n), Primrec (f i)) → Primrec fun a => List.ofFn fun i => f i a


theorem eigenspace_aeval_polynomial_degree_1 (f : End K V) (q : K[X]) (hq : degree q = 1) :
    eigenspace f (-q.coeff 0 / q.leadingCoeff) = LinearMap.ker (aeval f q)

{K : Type v}
{V : Type w}
[Field K]
[AddCommGroup V]
[Module K V]
(f : Module.End K V)
(q : Polynomial K)
(hq : q.degree = 1)

f.eigenspace (-q.coeff 0 / q.leadingCoeff) = LinearMap.ker ((Polynomial.aeval f) q)


@[to_additive (attr := simp)]
theorem div_down [Div α] : (x / y).down = x.down / y.down

{α : Type u}
{x y : ULift.{v, u} α}
[Div α]


/-- The **Weierstrass Approximation Theorem**:
polynomials functions on `[a, b] ⊆ ℝ` are dense in `C([a,b],ℝ)`

(While we could deduce this as an application of the Stone-Weierstrass theorem,
our proof of that relies on the fact that `abs` is in the closure of polynomials on `[-M, M]`,
so we may as well get this done first.)
-/
theorem polynomialFunctions_closure_eq_top (a b : ℝ) :
    (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤


lemma LocalRing.finrank_CotangentSpace_eq_one [IsDomain R] [DiscreteValuationRing R] :
    finrank (ResidueField R) (CotangentSpace R) = 1

(R : Type u_1)
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]

FiniteDimensional.finrank (LocalRing.ResidueField R) (LocalRing.CotangentSpace R) = 1


theorem support_tsub : (f - g).support ⊆ f.support

[(i : ι) → CanonicallyOrderedAddCommMonoid (α i)]

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


theorem union_eq_union_iff_right : s ∪ u = t ∪ u ↔ s ⊆ t ∪ u ∧ t ⊆ s ∪ u

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


/-- Constructs an isomorphism of lattices from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : SemilatSupCat.{u}} (e : α ≃o β) : α ≅ β

{α β : SemilatSupCat}
(e : α.X ≃o β.X)
(a : β.X)

(SemilatSupCat.Iso.mk e).inv.toSupHom a = e.symm a


@[to_additive existing (attr := simp)]
lemma equivShrink_mul [Mul α] [Small α] (x y : α) :
    equivShrink α (x * y) = equivShrink α x * equivShrink α y

{α : Type u_1}
[Mul α]
[Small.{u_2, u_1} α]
(x y : α)

(equivShrink α) (x * y) = (equivShrink α) x * (equivShrink α) y


/-- Reflection through the trivial subspace {0} is just negation. -/
@[simp]
theorem reflection_bot : reflection (⊥ : Submodule 𝕜 E) = LinearIsometryEquiv.neg 𝕜

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

reflection ⊥ = LinearIsometryEquiv.neg 𝕜


theorem map_rename (f : R →+* S) (g : σ → τ) (p : MvPolynomial σ R) :
    map f (rename g p) = rename g (map f p)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
{S : Type u_5}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(g : σ → τ)
(p : MvPolynomial σ R)

(MvPolynomial.map f) ((MvPolynomial.rename g) p) = (MvPolynomial.rename g) ((MvPolynomial.map f) p)


@[fun_prop]
nonrec theorem HasFDerivAt.sub (hf : HasFDerivAt f f' x) (hg : HasFDerivAt g g' x) :
    HasFDerivAt (fun x => f x - g x) (f' - g') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{f' g' : E →L[𝕜] F}
{x : E}
(hf : HasFDerivAt f f' x)
(hg : HasFDerivAt g g' x)


@[simp]
theorem succ_apply {n : ℕ} (a) : SuccOrder.succ a = if a < Fin.last n then a + 1 else a


/-- Morphisms from a single object cochain complex with `X` concentrated in degree 0
to an `ℕ`-indexed cochain complex `C`
are the same as morphisms `f : X ⟶ C.X 0` such that `f ≫ C.d 0 1 = 0`. -/
@[simps apply_coe]
noncomputable def fromSingle₀Equiv (C : CochainComplex V ℕ) (X : V) :
    ((single₀ V).obj X ⟶ C) ≃ { f : X ⟶ C.X 0 // f ≫ C.d 0 1 = 0 }

(φ : (CochainComplex.single₀ V).obj X ⟶ C)


theorem bernoulliFourierCoeff_eq {k : ℕ} (hk : k ≠ 0) (n : ℤ) :
    bernoulliFourierCoeff k n = -k ! / (2 * π * I * n) ^ k

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


@[simp] theorem eraseP_cons_of_pos {l : List α} (p) (h : p a) : (a :: l).eraseP p = l

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


theorem Iio_succ_eq_insert_of_not_isMax (h : ¬IsMax a) : Iio (succ a) = insert a (Iio a)

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a : α}
(h : ¬IsMax a)

Set.Iio (Order.succ a) = insert a (Set.Iio a)


theorem univ_pi_Ioi_ae_eq_Ici {f : ∀ i, α i} :
    (pi univ fun i => Ioi (f i)) =ᵐ[Measure.pi μ] Ici f

{μ : (i : ι) → MeasureTheory.Measure (α i)}

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

[∀ (i : ι), MeasureTheory.NoAtoms (μ i)]

(Set.univ.pi fun i => Set.Ioi (f i)) =ᵐ[MeasureTheory.Measure.pi μ] Set.Ici f


protected theorem mul_mul_mul_comm (a b c d : Nat) : (a * b) * (c * d) = (a * c) * (b * d)


/-- This rather trivial consequence of `iInter_subset`is convenient with `apply`, and has `i`
explicit for this purpose. -/
theorem iInter_subset_of_subset {s : ι → Set α} {t : Set α} (i : ι) (h : s i ⊆ t) :
    ⋂ i, s i ⊆ t

{α : Type u_1}
{ι : Sort u_4}
{s : ι → Set α}
{t : Set α}
(i : ι)
(h : s i ⊆ t)


/-- In a noncompact locally compact group, a left-invariant measure which is positive
on open sets has infinite mass. -/
@[to_additive (attr := simp)
"In a noncompact locally compact additive group, a left-invariant measure which is positive on open
sets has infinite mass."]
theorem measure_univ_of_isMulLeftInvariant [WeaklyLocallyCompactSpace G] [NoncompactSpace G]
    (μ : Measure G) [IsOpenPosMeasure μ] [μ.IsMulLeftInvariant] : μ univ = ∞

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
[Group G]
[TopologicalGroup G]
[WeaklyLocallyCompactSpace G]
[NoncompactSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsOpenPosMeasure]
[μ.IsMulLeftInvariant]


@[simp]
theorem coe_ofEq_apply (h : p = q) (x : p) : (ofEq p q h x : M) = x

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
{module_M : Module R M}
{p q : Submodule R M}
(h : p = q)
(x : ↥p)


@[to_additive]
theorem inv_def (w : FreeMonoid (G ⊕ H)) :
    (mk w)⁻¹ = mk (ofList (w.toList.map (Sum.map Inv.inv Inv.inv)).reverse)

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
(w : FreeAddMonoid (G ⊕ H))

-AddMonoid.Coprod.mk w =
  AddMonoid.Coprod.mk (FreeAddMonoid.ofList (List.map (Sum.map Neg.neg Neg.neg) (FreeAddMonoid.toList w)).reverse)


/-- Evaluation of continuous maps at a point, bundled as an algebra homomorphism. -/
@[simps]
def ContinuousMap.evalAlgHom (x : X) : C(X, R) →ₐ[S] R

{X : Type u_1}
(S : Type u_2)
(R : Type u_3)
[TopologicalSpace X]
[CommSemiring S]
[CommSemiring R]
[Algebra S R]
[TopologicalSpace R]
[TopologicalSemiring R]
(x : X)
(f : C(X, R))

(ContinuousMap.evalAlgHom S R x) f = f x


@[simp]
theorem equiv_smul : WithLp.equiv p V (c • x) = c • WithLp.equiv p V x

(p : ℝ≥0∞)
{K : Type uK}
{V : Type uV}
[Semiring K]
[AddCommGroup V]
[Module K V]
(c : K)
(x : WithLp p V)

(WithLp.equiv p V) (c • x) = c • (WithLp.equiv p V) x


@[to_additive]
theorem finprod_mem_inter_mulSupport_eq' (f : α → M) (s t : Set α)
    (h : ∀ x ∈ mulSupport f, x ∈ s ↔ x ∈ t) : ∏ᶠ i ∈ s, f i = ∏ᶠ i ∈ t, f i

(h : ∀ x ∈ Function.support f, x ∈ s ↔ x ∈ t)

∑ᶠ (i : α) (_ : i ∈ s), f i = ∑ᶠ (i : α) (_ : i ∈ t), f i


@[simp]
theorem map_exp_atBot : map exp atBot = 𝓝[>] 0

Filter.map Real.exp Filter.atBot = 𝓝[>] 0


@[to_additive]
theorem finprod_mem_coe_finset (f : α → M) (s : Finset α) :
    (∏ᶠ i ∈ (s : Set α), f i) = ∏ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(f : α → M)
(s : Finset α)

∑ᶠ (i : α) (_ : i ∈ ↑s), f i = ∑ i ∈ s, f i


@[simp]
theorem prop_snd : TwoPointing.prop.snd = True


@[simp]
theorem curry_apply {α β γ} (f : α × β → γ) (x : α) (y : β) : curry f x y = f (x, y)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α × β → γ)
(x : α)
(y : β)


@[to_additive]
theorem op_closure (s : Set M) : (closure s).op = closure (MulOpposite.unop ⁻¹' s)

{M : Type u_2}
[MulOneClass M]
(s : Set M)

(Submonoid.closure s).op = Submonoid.closure (MulOpposite.unop ⁻¹' s)


theorem Finset.mem_sup_support_iff [Zero M] {s : Finset (ι →₀ M)} {x : ι} :
    x ∈ s.sup Finsupp.support ↔ ∃ f ∈ s, x ∈ f.support

{ι : Type u_1}
{M : Type u_2}
[DecidableEq ι]
[Zero M]
{s : Finset (ι →₀ M)}
{x : ι}


theorem nontrivial_of_nonZeroDivisors [Nontrivial R] (hS : S ≤ R⁰) :
    Nontrivial R[S⁻¹]

{R : Type u_1}
[Ring R]
{S : Submonoid R}
[OreLocalization.OreSet S]
[Nontrivial R]
(hS : S ≤ nonZeroDivisors R)


theorem nonpos_iff_ne_one {a : SignType} : a ≤ 0 ↔ a ≠ 1


/-- The `n+1`-dimensional loops are in bijection with the loops in the space of
  `n`-dimensional loops with base point `const`.
  We allow an arbitrary indexing type `N` in place of `Fin n` here. -/
@[simps]
def loopHomeo (i : N) : Ω^ N X x ≃ₜ Ω (Ω^ { j // j ≠ i } X x) const

(p : Ω (↑(Ω^ { j // j ≠ i } X x)) GenLoop.const)

(GenLoop.loopHomeo i).symm p = GenLoop.fromLoop i p


/-- The prod of two linear maps is a linear map. -/
@[simps]
def prod (f : M →ₗ[R] M₂) (g : M →ₗ[R] M₃) : M →ₗ[R] M₂ × M₃

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
(f : M →ₗ[R] M₂)
(g : M →ₗ[R] M₃)
(i : M)


/-- Given f : Y ⟶ X, this is the obvious functor from T/Y to (T/X)/f -/
@[simps]
def iteratedSliceBackward : Over f.left ⥤ Over f

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
(f : CategoryTheory.Over X)
(g : CategoryTheory.Over f.left)

f.iteratedSliceBackward.obj g = CategoryTheory.Over.mk (CategoryTheory.Over.homMk g.hom ⋯)


theorem strongInductionOn_eq {p : Multiset α → Sort*} (s : Multiset α) (H) :
    @strongInductionOn _ p s H = H s fun t _h => @strongInductionOn _ p t H

(H : (s : Multiset α) → ((t : Multiset α) → t < s → p t) → p s)

s.strongInductionOn H = H s fun t _h => t.strongInductionOn H


theorem isClopen_preimage (A : Set S) : IsClopen (S.proj ⁻¹' A)

{X : Type u_2}
[TopologicalSpace X]
(S : DiscreteQuotient X)
(A : Set (Quotient S.toSetoid))


@[simp]
theorem comp_hom' {M N K : Comon_ C} (f : M ⟶ N) (g : N ⟶ K) : (f ≫ g).hom = f.hom ≫ g.hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{M N K : Comon_ C}
(f : M ⟶ N)
(g : N ⟶ K)


@[reassoc]
theorem Scheme.isoSpec_hom_naturality {X Y : Scheme} [IsAffine X] [IsAffine Y] (f : X ⟶ Y) :
    X.isoSpec.hom ≫ Spec.map (f.app ⊤) = f ≫ Y.isoSpec.hom

{X Y : AlgebraicGeometry.Scheme}
[AlgebraicGeometry.IsAffine X]
[AlgebraicGeometry.IsAffine Y]
(f : X ⟶ Y)

X.isoSpec.hom ≫ AlgebraicGeometry.Spec.map (AlgebraicGeometry.Scheme.Hom.app f ⊤) = f ≫ Y.isoSpec.hom


@[to_additive]
theorem Monoid.fg_of_surjective {M' : Type*} [Monoid M'] [Monoid.FG M] (f : M →* M')
    (hf : Function.Surjective f) : Monoid.FG M'

{M : Type u_1}
[Monoid M]
{M' : Type u_3}
[Monoid M']
[Monoid.FG M]
(f : M →* M')
(hf : Function.Surjective ⇑f)


theorem SameCycle.apply_eq_self_iff : SameCycle f x y → (f x = x ↔ f y = y)

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}


@[deprecated map_finsupp_prod (since := "2024-06-26")]
protected theorem map_finsupp_prod {α : Type*} [Zero α] {ι : Type*} (f : ι →₀ α) (g : ι → α → A) :
    φ (f.prod g) = f.prod fun i a => φ (g i a)

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[CommSemiring A]
[CommSemiring B]
[Algebra R A]
[Algebra R B]
(φ : A →ₐ[R] B)
{α : Type u_1}
[Zero α]
{ι : Type u_2}
(f : ι →₀ α)
(g : ι → α → A)


@[to_additive]
theorem mul_lipschitzWith (hf : AntilipschitzWith Kf f) (hg : LipschitzWith Kg g) (hK : Kg < Kf⁻¹) :
    AntilipschitzWith (Kf⁻¹ - Kg)⁻¹ fun x => f x * g x

{α : Type u_5}
{E : Type u_6}
[SeminormedAddCommGroup E]
[PseudoEMetricSpace α]
{Kf Kg : ℝ≥0}
{f g : α → E}
(hf : AntilipschitzWith Kf f)
(hg : LipschitzWith Kg g)
(hK : Kg < Kf⁻¹)

AntilipschitzWith (Kf⁻¹ - Kg)⁻¹ fun x => f x + g x


@[simp] lemma nilpotencyClass_zero [Nontrivial R] :
    nilpotencyClass (0 : R) = 1

{R : Type u_1}
[MonoidWithZero R]
[Nontrivial R]


@[to_additive]
theorem le_mul_right (h : a ≤ b) : a ≤ b * c

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a b c : α}
(h : a ≤ b)