protected theorem memℒp (f : Lp E p μ) : Memℒp f p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(f : ↥(MeasureTheory.Lp E p μ))


theorem map_pt_mem_toPartialHomeomorph_target :
    (φ.leftFun φ.pt, φ.rightFun φ.pt) ∈ φ.toPartialHomeomorph.target

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[CompleteSpace G]
(φ : ImplicitFunctionData 𝕜 E F G)


/-- Countable unions of σ-compact sets are σ-compact. -/
lemma isSigmaCompact_biUnion {s : Set ι} {S : ι → Set X} (hc : Set.Countable s)
    (hcomp : ∀ (i : ι), i ∈ s → IsSigmaCompact (S i)) :
    IsSigmaCompact (⋃ (i : ι) (_ : i ∈ s), S i)

{X : Type u_1}
{ι : Type u_3}
[TopologicalSpace X]
{s : Set ι}
{S : ι → Set X}
(hc : s.Countable)
(hcomp : ∀ i ∈ s, IsSigmaCompact (S i))


theorem apply_iterate (hx : IsPeriodicPt f n x) (m : ℕ) : IsPeriodicPt f n (f^[m] x)

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


lemma strictConvexOn_mul_log : StrictConvexOn ℝ (Set.Ici (0 : ℝ)) (fun x ↦ x * log x)

StrictConvexOn ℝ (Set.Ici 0) fun x => x * Real.log x


theorem oreDiv_add_char' {r r' : X} (s s' : S) (rb : R) (sb : R)
    (h : sb * s = rb * s') (h' : sb * s ∈ S) :
    r /ₒ s + r' /ₒ s' = (sb • r + rb • r') /ₒ ⟨sb * s, h'⟩

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddMonoid X]
[DistribMulAction R X]
{r r' : X}
(s s' : ↥S)
(rb sb : R)
(h : sb * ↑s = rb * ↑s')
(h' : sb * ↑s ∈ S)

r /ₒ s + r' /ₒ s' = (sb • r + rb • r') /ₒ ⟨sb * ↑s, h'⟩


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

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Sup α]
[Bot α]
[Sup β]
[Bot β]
[Sup γ]
[Bot γ]
{g₁ g₂ : SupBotHom β γ}
{f : SupBotHom α β}
(hf : Function.Surjective ⇑f)


theorem convex_halfspace_re_lt (r : ℝ) : Convex ℝ { c : ℂ | c.re < r }


lemma find_mono (h : ∀ n, q n → p n) {hp : ∃ n, p n} {hq : ∃ n, q n} : Nat.find hp ≤ Nat.find hq

{p q : ℕ → Prop}
[DecidablePred p]
[DecidablePred q]
(h : ∀ (n : ℕ), q n → p n)
{hp : ∃ n, p n}
{hq : ∃ n, q n}


/-- The boundary of `M × N` is `∂M × N ∪ (M × ∂N)`. -/
lemma ModelWithCorners.boundary_prod :
    (I.prod J).boundary (M × N) = Set.prod univ (J.boundary N) ∪ Set.prod (I.boundary M) univ

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace H' N]
(J : ModelWithCorners 𝕜 E' H')

(I.prod J).boundary (M × N) = Set.univ.prod (J.boundary N) ∪ (I.boundary M).prod Set.univ


lemma one_sub_inv_inv (ha₀ : a ≠ 0) (ha₁ : a < 1) : (1 - a)⁻¹.IsConjExponent a⁻¹

{a : NNReal}
(ha₀ : a ≠ 0)
(ha₁ : a < 1)


/-- If the quotient by a subgroup gives a singleton then the subgroup is the whole group. -/
@[to_additive "If the quotient by an additive subgroup gives a singleton then the additive subgroup
is the whole additive group."]
theorem subgroup_eq_top_of_subsingleton (H : Subgroup G) (h : Subsingleton (G ⧸ H)) : H = ⊤

{G : Type u}
[AddGroup G]
(H : AddSubgroup G)
(h : Subsingleton (G ⧸ H))


@[to_additive (attr := norm_cast, simp)]
theorem coe_mul [Mul β] [ContinuousMul β] (f g : C(α, β)) : ⇑(f * g) = f * g

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Mul β]
[ContinuousMul β]
(f g : C(α, β))


@[trans]
theorem trans (h₁₂ : v₁.IsEquiv v₂) (h₂₃ : v₂.IsEquiv v₃) : v₁.IsEquiv v₃

{R : Type u_3}
{Γ₀ : Type u_4}
{Γ'₀ : Type u_5}
{Γ''₀ : Type u_6}
[LinearOrderedCommMonoidWithZero Γ''₀]
[Ring R]
[LinearOrderedCommMonoidWithZero Γ₀]
[LinearOrderedCommMonoidWithZero Γ'₀]
{v₁ : Valuation R Γ₀}
{v₂ : Valuation R Γ'₀}
{v₃ : Valuation R Γ''₀}
(h₁₂ : v₁.IsEquiv v₂)
(h₂₃ : v₂.IsEquiv v₃)


theorem abs_toReal_le_pi (θ : Angle) : |θ.toReal| ≤ π


/--
  If there is a set of states that is closed under `f`, and such that `f` produces that same output
  for all states in this set, then the state is not actually needed.
  Hence, then we can rewrite `mapAccumr` into just `map`
-/
theorem mapAccumr_eq_map {f : α → σ → σ × β} {s₀ : σ} (S : Set σ) (h₀ : s₀ ∈ S)
    (closure : ∀ a s, s ∈ S → (f a s).1 ∈ S)
    (out : ∀ a s s', s ∈ S → s' ∈ S → (f a s).2 = (f a s').2) :
    (mapAccumr f xs s₀).snd = map (f · s₀ |>.snd) xs

{f : α → σ → σ × β}

(closure : ∀ (a : α), ∀ s ∈ S, (f a s).1 ∈ S)

(out : ∀ (a : α) (s s' : σ), s ∈ S → s' ∈ S → (f a s).2 = (f a s').2)

(Mathlib.Vector.mapAccumr f xs s₀).2 = Mathlib.Vector.map (fun x => (f x s₀).2) xs


@[simp]
theorem _root_.Algebra.adjoin.powerBasis'_gen (hx : IsIntegral R x) :
    (adjoin.powerBasis' hx).gen = ⟨x, SetLike.mem_coe.1 <| subset_adjoin <| mem_singleton x⟩

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

(Algebra.adjoin.powerBasis' hx).gen = ⟨x, ⋯⟩


theorem inv_smul_integral_comp_sub_div (c d) :
    (c⁻¹ • ∫ x in a..b, f (d - x / c)) = ∫ x in d - b / c..d - a / c, f x

{E : Type u_3}
[NormedAddCommGroup E]
[CompleteSpace E]
[NormedSpace ℝ E]
{a b : ℝ}
(f : ℝ → E)
(c d : ℝ)

c⁻¹ • ∫ (x : ℝ) in a..b, f (d - x / c) = ∫ (x : ℝ) in d - b / c..d - a / c, f x


theorem natAbs_lcm (i j : ℤ) : natAbs (GCDMonoid.lcm i j) = Int.lcm i j


@[simp]
theorem min_le_iff : min a b ≤ c ↔ a ≤ c ∨ b ≤ c

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


/-- The determinant of `rotation` (as a linear map) is equal to `1`. -/
@[simp]
theorem det_rotation (θ : Real.Angle) : LinearMap.det (o.rotation θ).toLinearMap = 1

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

LinearMap.det ↑(o.rotation θ).toLinearEquiv = 1


theorem integrallyClosed : IsIntegrallyClosed O

{K : Type u}
{Γ₀ : Type v}
[Field K]
[LinearOrderedCommGroupWithZero Γ₀]
{v : Valuation K Γ₀}
{O : Type w}
[CommRing O]
[Algebra O K]
[IsFractionRing O K]
(hv : v.Integers O)


theorem Finite.sep {s : Set α} (hs : s.Finite) (p : α → Prop) : { a ∈ s | p a }.Finite

{α : Type u}
{s : Set α}
(hs : s.Finite)
(p : α → Prop)


@[simp] theorem comap_eq (hf : MeasurableEmbedding f) : MeasurableSpace.comap f ‹_› = ‹_›

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
{f : α → β}
(hf : MeasurableEmbedding f)


@[simp]
theorem coe_count (a : α) (l : List α) : count a (ofList l) = l.count a

{α : Type u_1}
[DecidableEq α]
(a : α)
(l : List α)


theorem logb_ne_zero_of_pos_of_ne_one_of_base_lt_one (hx_pos : 0 < x) (hx : x ≠ 1) : logb b x ≠ 0


protected theorem max_comm (a b : Nat) : max a b = max b a


theorem mk_proj_snd' (ex : proj x ∈ e.baseSet) : (proj x, (e x).2) = e x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e : Pretrivialization F proj)
{x : Z}
(ex : proj x ∈ e.baseSet)


theorem rotate_eq_drop_append_take_mod {l : List α} {n : ℕ} :
    l.rotate n = l.drop (n % l.length) ++ l.take (n % l.length)

l.rotate n = List.drop (n % l.length) l ++ List.take (n % l.length) l


theorem dvd_lcm_left (x y : R) : x ∣ lcm x y

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x y : R)


@[to_additive (attr := simp)]
lemma subset_mulSpan : s ⊆ mulSpan s

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


lemma mod_add_div' (a b : ℕ) : a % b + a / b * b = a


/-- Embedding of a subtype into the ambient type as an `OrderEmbedding`. -/
@[simps! (config := .asFn)]
def subtype (p : α → Prop) : Subtype p ↪o α

{α : Type u_2}
[Preorder α]
(p : α → Prop)

⇑(OrderEmbedding.subtype p) = Subtype.val


theorem isCompact_range [CompactSpace X] {f : X → Y} (hf : Continuous f) : IsCompact (range f)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
[CompactSpace X]
{f : X → Y}
(hf : Continuous f)


@[ext]
protected theorem EMetricSpace.ext
    {α : Type*} {m m' : EMetricSpace α} (h : m.toEDist = m'.toEDist) : m = m'

(h : PseudoEMetricSpace.toEDist = PseudoEMetricSpace.toEDist)


theorem natCast_rightInverse [NeZero n] : Function.RightInverse val ((↑) : ℕ → ZMod n)


theorem finallySmall_of_small_weakly_terminal_set [IsFilteredOrEmpty J] (s : Set J) [Small.{v} s]
    (hs : ∀ i, ∃ j ∈ s, Nonempty (i ⟶ j)) : FinallySmall.{v} J

(hs : ∀ (i : J), ∃ j ∈ s, Nonempty (i ⟶ j))


@[simp]
theorem preimage_cast_Icc (p q : ℚ) : (↑) ⁻¹' Icc (p : K) q = Icc p q

{K : Type u_5}
[LinearOrderedField K]
(p q : ℚ)

Rat.cast ⁻¹' Set.Icc ↑p ↑q = Set.Icc p q


/--
When `f : X ⟶ Y⟦m⟧`, `m + n = mn`, `n + a = a'` and `ha'' : m + a' = a''`, this lemma
relates the two morphisms `F.shiftMap f a' a'' ha''` and `(F.shift a).map (f⟦n⟧')`. Indeed,
via canonical isomorphisms, they both identity to morphisms
`(F.shift a').obj X ⟶ (F.shift a'').obj Y`.
-/
lemma shiftIso_hom_app_comp_shiftMap {X Y : C} {m : M} (f : X ⟶ Y⟦m⟧) (n mn : M) (hnm : m + n = mn)
    (a a' a'' : M) (ha' : n + a = a') (ha'' : m + a' = a'') :
    (F.shiftIso n a a' ha').hom.app X ≫ F.shiftMap f a' a'' ha'' =
      (F.shift a).map (f⟦n⟧') ≫ (F.shift a).map ((shiftFunctorAdd' C m n mn hnm).inv.app Y) ≫
        (F.shiftIso mn a a'' (by rw [← ha'', ← ha', ← hnm, add_assoc])).hom.app Y

(f : X ⟶ (CategoryTheory.shiftFunctor C m).obj Y)

(F.shiftIso n a a' ha').hom.app X ≫ F.shiftMap f a' a'' ha'' =
  (F.shift a).map ((CategoryTheory.shiftFunctor C n).map f) ≫
    (F.shift a).map ((CategoryTheory.shiftFunctorAdd' C m n mn hnm).inv.app Y) ≫ (F.shiftIso mn a a'' ⋯).hom.app Y


theorem mgf_undef (hX : ¬Integrable (fun ω => exp (t * X ω)) μ) : mgf X μ t = 0

(hX : ¬MeasureTheory.Integrable (fun ω => rexp (t * X ω)) μ)


lemma contDiffOn_restrContDiff_source (f : PartialHomeomorph E F) (n : ℕ) :
    ContDiffOn 𝕜 n f (f.restrContDiff 𝕜 n).source

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

ContDiffOn 𝕜 (↑n) (↑f) (PartialHomeomorph.restrContDiff 𝕜 f n).source


theorem uniqueBaseOn_base_iff (hIE : I ⊆ E) : (uniqueBaseOn I E).Base B ↔ B = I

{α : Type u_1}
{E B I : Set α}
(hIE : I ⊆ E)

(Matroid.uniqueBaseOn I E).Base B ↔ B = I


/-- If one splits a list along a composition, and then joins the sublists, one gets back the
original list. -/
@[simp]
theorem join_splitWrtComposition (l : List α) (c : Composition l.length) :
    (l.splitWrtComposition c).join = l

{α : Type u_1}
(l : List α)
(c : Composition l.length)


@[mono]
theorem tsum_strict_mono {f g : α → ℝ≥0} (hg : Summable g) (h : f < g) : ∑' n, f n < ∑' n, g n

{α : Type u_1}
{f g : α → ℝ≥0}
(hg : Summable g)
(h : f < g)


@[simp]
theorem mem_comap {f : F} {p : Submodule R₂ M₂} : x ∈ comap f p ↔ f x ∈ p

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
{x : M}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
{f : F}
{p : Submodule R₂ M₂}


@[simp]
theorem centralizer_eq_top_iff_subset {R} [Semiring R] {s : Set R} :
    centralizer s = ⊤ ↔ s ⊆ center R

Subsemiring.centralizer s = ⊤ ↔ s ⊆ ↑(Subsemiring.center R)


lemma natCast_mul_self : Commute (n * a) a

{α : Type u_1}
[Semiring α]
(a : α)
(n : ℕ)


/-- This is the same as `orderOf_pow'` and `orderOf_pow''` but with one assumption less which is
automatic in the case of a finite cancellative monoid. -/
@[to_additive "This is the same as `addOrderOf_nsmul'` and
`addOrderOf_nsmul` but with one assumption less which is automatic in the case of a
finite cancellative additive monoid."]
theorem orderOf_pow (x : G) : orderOf (x ^ n) = orderOf x / gcd (orderOf x) n

{G : Type u_1}
[LeftCancelMonoid G]
[Finite G]
{n : ℕ}
(x : G)

orderOf (x ^ n) = orderOf x / (orderOf x).gcd n


theorem get_eq_of_mem {a} : a ∈ s → get s = a

{α : Type u}
(s : Computation α)
[h : s.Terminates]
{a : α}


theorem not_gt_eq (a b : β) : (¬ (a > b)) = (a ≤ b)

{β : Type u_2}
[LinearOrder β]
(a b : β)


theorem splits_iff_roots_eq_three (ha : P.a ≠ 0) :
    Splits φ P.toPoly ↔ ∃ x y z : K, (map φ P).roots = {x, y, z}

{F : Type u_3}
{K : Type u_4}
{P : Cubic F}
[Field F]
[Field K]
{φ : F →+* K}
(ha : P.a ≠ 0)

Polynomial.Splits φ P.toPoly ↔ ∃ x y z, (Cubic.map φ P).roots = {x, y, z}


@[simp]
theorem mk_eq_div {r s} :
    (Localization.mk r s : FractionRing A) =
      (algebraMap _ _ r / algebraMap A _ s : FractionRing A)

(A : Type u_4)
[CommRing A]
[IsDomain A]
{r : A}
{s : ↥(nonZeroDivisors A)}

Localization.mk r s = (algebraMap A (FractionRing A)) r / (algebraMap A (FractionRing A)) ↑s


@[simp]
theorem single_coeff_of_ne (h : b ≠ a) : (single a r).coeff b = 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{a b : Γ}
{r : R}
(h : b ≠ a)


theorem compl_iInf : (iInf f)ᶜ = ⨆ i, (f i)ᶜ

{α : Type u}
{ι : Sort w}
[CompleteBooleanAlgebra α]
{f : ι → α}


@[simp]
theorem map_fst_nhds (x : X × Y) : map Prod.fst (𝓝 x) = 𝓝 x.1

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(x : X × Y)


/-- A prelax functor between bicategories is a lax prefunctor such that `map₂` is a functor.
This structure will be extended to define `LaxFunctor` and `OplaxFunctor`.
-/
structure PrelaxFunctor (B : Type u₁) [Bicategory.{w₁, v₁} B] (C : Type u₂) [Bicategory.{w₂, v₂} C]
    extends PrelaxFunctorStruct B C where
  /-- Prelax functors preserves identity 2-morphisms. -/
  map₂_id : ∀ {a b : B} (f : a ⟶ b), map₂ (𝟙 f) = 𝟙 (map f) := by aesop -- TODO: why not aesop_cat?
  /-- Prelax functors preserves compositions of 2-morphisms. -/
  map₂_comp : ∀ {a b : B} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h),
      map₂ (η ≫ θ) = map₂ η ≫ map₂ θ := by aesop_cat

(self : CategoryTheory.PrelaxFunctor B C)

self.map₂ (CategoryTheory.CategoryStruct.id f) = CategoryTheory.CategoryStruct.id (self.map f)


theorem const_strictMono [Nonempty β] : StrictMono (const β : α → β → α)

{α : Type u}
{β : Type v}
[Preorder α]
[Nonempty β]


theorem image_Ico_emod (n a : ℤ) (h : 0 ≤ a) : (Ico n (n + a)).image (· % a) = Ico 0 a

Finset.image (fun x => x % a) (Finset.Ico n (n + a)) = Finset.Ico 0 a


/-- If `α` is a linear pred order, `β` is a preorder, and `f : α → β` is an antitone function, then
the intervals `Set.Ioo (f n) (f (Order.pred n))` are pairwise disjoint. -/
theorem pairwise_disjoint_on_Ioo_pred [PredOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :
    Pairwise (Disjoint on fun n => Ioo (f n) (f (pred n)))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[PredOrder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)

Pairwise (Disjoint on fun n => Set.Ioo (f n) (f (Order.pred n)))


@[simp]
theorem neg_iff {a : SignType} : a < 0 ↔ a = -1


theorem IsSpectralMap.continuous {f : α → β} (hf : IsSpectralMap f) : Continuous f

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


theorem zero_of_source_iso_zero' {X Y : C} (f : X ⟶ Y) (i : IsIsomorphic X 0) : f = 0


@[to_additive]
theorem center_le_centralizer (s) : center G ≤ centralizer s

AddSubgroup.center G ≤ AddSubgroup.centralizer s


/-- If `e : C ≌ D` is an equivalence of categories, and `iso : e.functor ≅ G` is
an isomorphism, then there is an equivalence of categories whose inverse is `G`. -/
@[simps!]
def changeInverse (e : C ≌ D) {G : D ⥤ C} (iso : e.inverse ≅ G) : C ≌ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{G : CategoryTheory.Functor D C}
(iso : e.inverse ≅ G)


/-- Embedding `i : Fin n` into `Fin (n + 1)` with a hole around `p : Fin (n + 1)`
embeds `i` by `succ` when the resulting `p < i.succ`. -/
lemma succAbove_of_le_castSucc (p : Fin (n + 1)) (i : Fin n) (h : p ≤ castSucc i) :
    p.succAbove i = i.succ

{n : ℕ}
(p : Fin (n + 1))
(i : Fin n)
(h : p ≤ i.castSucc)


theorem reflexive_join (h : Reflexive r) : Reflexive (Join r)

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


theorem prodCongr_refl_left (e : β₁ ≃ β₂) :
    prodCongr (Equiv.refl α₁) e = prodCongrRight fun _ => e

{α₁ : Type u_3}
{β₁ : Type u_1}
{β₂ : Type u_2}
(e : β₁ ≃ β₂)

(Equiv.refl α₁).prodCongr e = Equiv.prodCongrRight fun x => e


/-- The identity oplax functor. -/
@[simps]
def id (B : Type u₁) [Bicategory.{w₁, v₁} B] : OplaxFunctor B B

(B : Type u₁)
[CategoryTheory.Bicategory B]
(a : B)

(CategoryTheory.OplaxFunctor.id B).mapId a = CategoryTheory.CategoryStruct.id (CategoryTheory.CategoryStruct.id a)


theorem exists_mul_emod_eq_gcd {k n : ℕ} (hk : gcd n k < k) : ∃ m, n * m % k = gcd n k


@[simp]
theorem powerBasisAux'_repr_apply_to_fun (hg : g.Monic) (f : AdjoinRoot g) (i : Fin g.natDegree) :
    (powerBasisAux' hg).repr f i = (modByMonicHom hg f).coeff ↑i

{R : Type u}
[CommRing R]
{g : R[X]}
(hg : g.Monic)
(f : AdjoinRoot g)
(i : Fin g.natDegree)

((AdjoinRoot.powerBasisAux' hg).repr f) i = ((AdjoinRoot.modByMonicHom hg) f).coeff ↑i


/-- A projective object admits a trivial projective resolution: itself in degree 0. -/
@[simps]
noncomputable def self [Projective Z] : ProjectiveResolution Z

(CategoryTheory.ProjectiveResolution.self Z).π = CategoryTheory.CategoryStruct.id ((ChainComplex.single₀ C).obj Z)


lemma truncatedSup_union_left (hs : a ∈ lowerClosure s) (ht : a ∉ lowerClosure t) :
    truncatedSup (s ∪ t) a = truncatedSup s a

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s t : Finset α}
{a : α}
[DecidableEq α]
(hs : a ∈ lowerClosure ↑s)
(ht : a ∉ lowerClosure ↑t)

(s ∪ t).truncatedSup a = s.truncatedSup a


@[to_additive (attr := simp)]
theorem bot_toSubmonoid : (⊥ : Subgroup G).toSubmonoid = ⊥


theorem explicitCokernelDesc_comp_eq_zero {X Y Z W : SemiNormedGrp.{u}} {f : X ⟶ Y} {g : Y ⟶ Z}
    {h : Z ⟶ W} (cond : f ≫ g = 0) (cond2 : g ≫ h = 0) : explicitCokernelDesc cond ≫ h = 0

{X Y Z W : SemiNormedGrp}
{f : X ⟶ Y}
{g : Y ⟶ Z}
{h : Z ⟶ W}
(cond : f ≫ g = 0)
(cond2 : g ≫ h = 0)

SemiNormedGrp.explicitCokernelDesc cond ≫ h = 0


theorem exists_ord_compl_eq_one_iff_isPrimePow {n : ℕ} (hn : n ≠ 1) :
    IsPrimePow n ↔ ∃ p : ℕ, p.Prime ∧ ord_compl[p] n = 1

IsPrimePow n ↔ ∃ p, Nat.Prime p ∧ n / p ^ n.factorization p = 1


/-- See `finprod_comp`, `Fintype.prod_bijective` and `Finset.prod_bij`. -/
@[to_additive "See `finsum_comp`, `Fintype.sum_bijective` and `Finset.sum_bij`."]
theorem finprod_eq_of_bijective {f : α → M} {g : β → M} (e : α → β) (he₀ : Bijective e)
    (he₁ : ∀ x, f x = g (e x)) : ∏ᶠ i, f i = ∏ᶠ j, g j

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
{g : β → M}
(e : α → β)
(he₀ : Function.Bijective e)
(he₁ : ∀ (x : α), f x = g (e x))


theorem deriv.scomp (hg : DifferentiableAt 𝕜' g₁ (h x)) (hh : DifferentiableAt 𝕜 h x) :
    deriv (g₁ ∘ h) x = deriv h x • deriv g₁ (h x)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{h : 𝕜 → 𝕜'}
{g₁ : 𝕜' → F}
(hg : DifferentiableAt 𝕜' g₁ (h x))
(hh : DifferentiableAt 𝕜 h x)


@[simp]
protected theorem zero_mem : (0 : M) ∈ N

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


lemma neg_of_smul_neg_left [PosSMulReflectLT α β] (h : a • b < 0) (ha : 0 ≤ a) : b < 0

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[Zero α]
[Zero β]
[SMulZeroClass α β]
[Preorder α]
[Preorder β]
[PosSMulReflectLT α β]
(h : a • b < 0)
(ha : 0 ≤ a)


/-- The Dirichlet character mod `1` corresponds to the constant function `1`. -/
lemma modOne_eq_one {R : Type*} [CommSemiring R] {χ : DirichletCharacter R 1} :
    ((χ ·) : ℕ → R) = 1

{R : Type u_1}
[CommSemiring R]
{χ : DirichletCharacter R 1}


theorem leastGE_le {i : ℕ} {r : ℝ} (ω : Ω) : leastGE f r i ω ≤ i

{Ω : Type u_1}
{f : ℕ → Ω → ℝ}
{i : ℕ}
{r : ℝ}
(ω : Ω)


/-- The composition of homotopy equivalences. -/
@[simps]
def trans (e : HomotopyEquiv S₁ S₂) (e' : HomotopyEquiv S₂ S₃) :
    HomotopyEquiv S₁ S₃

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

(e.trans e').homotopyHomInvId =
  (CategoryTheory.ShortComplex.Homotopy.ofEq ⋯).trans
    (((e'.homotopyHomInvId.compRight e.inv).compLeft e.hom).trans
      ((CategoryTheory.ShortComplex.Homotopy.ofEq ⋯).trans e.homotopyHomInvId))


theorem IsPrime.mul_mem_iff_mem_or_mem {I : Ideal α} (hI : I.IsPrime) :
    ∀ {x y : α}, x * y ∈ I ↔ x ∈ I ∨ y ∈ I

{α : Type u}
[CommSemiring α]
{I : Ideal α}
(hI : I.IsPrime)
{x y : α}


theorem projIic_surjective : Surjective (projIic b)


@[simp] theorem sub_imJ : (a - b).imJ = a.imJ - b.imJ

{R : Type u_3}
[CommRing R]
(a b : ℍ[R])


/-- Given `Finite α`, `equivFunOnFinite` is the `Equiv` between `α →₀ β` and `α → β`.
  (All functions on a finite type are finitely supported.) -/
@[simps]
def equivFunOnFinite [Finite α] : (α →₀ M) ≃ (α → M)

{α : Type u_1}
{M : Type u_5}
[Zero M]
[Finite α]
(f : α → M)

∀ (a : α), (Finsupp.equivFunOnFinite.symm f) a = f a


@[simp]
theorem comap_apply (f : R →+* S) (U : Opens (PrimeSpectrum.Top R))
    (V : Opens (PrimeSpectrum.Top S)) (hUV : V.1 ⊆ PrimeSpectrum.comap f ⁻¹' U.1)
    (s : (structureSheaf R).1.obj (op U)) (p : V) :
    (comap f U V hUV s).1 p =
      Localization.localRingHom (PrimeSpectrum.comap f p.1).asIdeal _ f rfl
        (s.1 ⟨PrimeSpectrum.comap f p.1, hUV p.2⟩ : _)

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(V : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top S))

(hUV : V.carrier ⊆ ⇑(PrimeSpectrum.comap f) ⁻¹' U.carrier)

(s : ↑((AlgebraicGeometry.Spec.structureSheaf R).val.obj (Opposite.op U)))

↑((AlgebraicGeometry.StructureSheaf.comap f U V hUV) s) p =
  (Localization.localRingHom ((PrimeSpectrum.comap f) ↑p).asIdeal (↑p).asIdeal f ⋯) (↑s ⟨(PrimeSpectrum.comap f) ↑p, ⋯⟩)


lemma Monotone.mapsTo_Icc (h : Monotone f) : MapsTo f (Icc a b) (Icc (f a) (f b))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a b : α}
(h : Monotone f)

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


/-- Useful to use together with `Continuous.comp₂`. -/
theorem ContinuousLinearMap.continuous₂ (f : E →L[𝕜] F →L[𝕜] G) :
    Continuous (Function.uncurry fun x y => f x y)

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

Continuous (Function.uncurry fun x y => (f x) y)


lemma map_sub_map_piecewise [LinearOrder ι] (a b : (i : ι) → M₁ i) (s : Finset ι) :
    f a - f (s.piecewise b a) =
    ∑ i ∈ s, f (fun j ↦ if j ∈ s → j < i then a j else if i = j then a j - b j else b j)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommGroup (M₁ i)]
[AddCommGroup M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
[LinearOrder ι]
(a b : (i : ι) → M₁ i)
(s : Finset ι)

f a - f (s.piecewise b a) = ∑ i ∈ s, f fun j => if j ∈ s → j < i then a j else if i = j then a j - b j else b j


@[simp] lemma symm_refl (a : G) : (refl a).symm = refl a

(AddConstEquiv.refl a).symm = AddConstEquiv.refl a


theorem trace_prodMap' (f : M →ₗ[R] M) (g : N →ₗ[R] N) :
    trace R (M × N) (prodMap f g) = trace R M f + trace R N g

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{N : Type u_3}
[AddCommGroup N]
[Module R N]
[Module.Free R M]
[Module.Finite R M]
[Module.Free R N]
[Module.Finite R N]
(f : M →ₗ[R] M)
(g : N →ₗ[R] N)

(LinearMap.trace R (M × N)) (f.prodMap g) = (LinearMap.trace R M) f + (LinearMap.trace R N) g


theorem IsMinFilter.tendsto_principal_Ici (h : IsMinFilter f l a) : Tendsto f l (𝓟 <| Ici (f a))

{α : Type u}
{β : Type v}
[Preorder β]
{f : α → β}
{l : Filter α}
{a : α}
(h : IsMinFilter f l a)


/-- Given a short exact complex `S` in `C` that is short exact (`hS`), this is the
canonical isomorphism between the triangle `hS.singleTriangle` in the derived category
and the triangle attached to the corresponding short exact sequence of cochain complexes
after the application of the single functor. -/
@[simps!]
noncomputable def singleTriangleIso :
    hS.singleTriangle ≅
      triangleOfSES (hS.map_of_exact (HomologicalComplex.single C (ComplexShape.up ℤ) 0))

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

hS.singleTriangleIso.inv.hom₁ = ((DerivedCategory.singleFunctorsPostcompQIso C).inv.hom 0).app S.X₁


@[simp]
theorem r_mul_sr (i j : ZMod n) : r i * sr j = sr (j - i)

DihedralGroup.r i * DihedralGroup.sr j = DihedralGroup.sr (j - i)


protected lemma mul_nonneg : 0 ≤ a → 0 ≤ b → 0 ≤ a * b


@[simp]
theorem Matrix.toLinearMapₛₗ₂'_stdBasis (M : Matrix n m N₂) (i : n) (j : m) :
    Matrix.toLinearMapₛₗ₂' R σ₁ σ₂ M (LinearMap.stdBasis R₁ (fun _ => R₁) i 1)
      (LinearMap.stdBasis R₂ (fun _ => R₂) j 1) = M i j

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

(((Matrix.toLinearMapₛₗ₂' R σ₁ σ₂) M) ((LinearMap.stdBasis R₁ (fun x => R₁) i) 1))
    ((LinearMap.stdBasis R₂ (fun x => R₂) j) 1) =
  M i j


/-- From a free module, every quadratic map can be built from a bilinear form.

See `BilinMap.not_forall_toQuadraticMap_surjective` for a counterexample when the module is
not free. -/
theorem _root_.LinearMap.BilinMap.toQuadraticMap_surjective [Module.Free R M] :
    Function.Surjective (LinearMap.BilinMap.toQuadraticMap : LinearMap.BilinMap R M N → _)

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[Module.Free R M]


/-- Composition by continuous linear equivs on the right respects higher differentiability at a
point in a domain. -/
theorem ContinuousLinearEquiv.contDiffWithinAt_comp_iff (e : G ≃L[𝕜] E) :
    ContDiffWithinAt 𝕜 n (f ∘ e) (e ⁻¹' s) (e.symm x) ↔ ContDiffWithinAt 𝕜 n f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
(e : G ≃L[𝕜] E)

ContDiffWithinAt 𝕜 n (f ∘ ⇑e) (⇑e ⁻¹' s) (e.symm x) ↔ ContDiffWithinAt 𝕜 n f s x


@[simp]
theorem toMul_lt {a b : Additive α} : toMul a < toMul b ↔ a < b

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

Additive.toMul a < Additive.toMul b ↔ a < b


lemma uniformSpace_eq_of_hasBasis
    {ι} [UniformSpace E] [UniformAddGroup E] [ContinuousConstSMul 𝕜 E]
    {p' : ι → Prop} {s : ι → Set E} (p : Seminorm 𝕜 E) (hb : (𝓝 0 : Filter E).HasBasis p' s)
    (h₁ : ∃ r, p.closedBall 0 r ∈ 𝓝 0) (h₂ : ∀ i, p' i → ∃ r > 0, p.ball 0 r ⊆ s i) :
    ‹UniformSpace E› = p.toAddGroupSeminorm.toSeminormedAddGroup.toUniformSpace

(h₂ : ∀ (i : ι), p' i → ∃ r > 0, p.ball 0 r ⊆ s i)


theorem continuous_iff_surjective : Continuous f ↔ Function.Surjective f


theorem Monoid.fg_iff_add_fg : Monoid.FG M ↔ AddMonoid.FG (Additive M)


lemma mono₁ (h : T.mor₃ = 0) : Mono T.mor₁

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


@[simp]
lemma toNNReal_lt_ofNat {r : ℝ} {n : ℕ} [n.AtLeastTwo] :
    r.toNNReal < no_index (OfNat.ofNat n) ↔ r < OfNat.ofNat n

r.toNNReal < OfNat.ofNat n ↔ r < OfNat.ofNat n


/-- The indexed supremum of a function is bounded below by the value taken at one point-/
theorem le_ciSup {f : ι → α} (H : BddAbove (range f)) (c : ι) : f c ≤ iSup f

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
{f : ι → α}
(H : BddAbove (Set.range f))
(c : ι)


@[simp]
theorem comapSubtypeEquivOfLe_apply_coe {p q : Submodule R M} (hpq : p ≤ q)
    (x : comap q.subtype p) :
    (comapSubtypeEquivOfLe hpq x : M) = (x : M)

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p q : Submodule R M}
(hpq : p ≤ q)
(x : ↥(Submodule.comap q.subtype p))

↑((Submodule.comapSubtypeEquivOfLe hpq) x) = ↑↑x


@[to_additive one_lt_card_iff_ne_bot]
theorem one_lt_card_iff_ne_bot [Finite H] : 1 < Nat.card H ↔ H ≠ ⊥

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


theorem IsPrimePow.minFac_pow_factorization_eq {n : ℕ} (hn : IsPrimePow n) :
    n.minFac ^ n.factorization n.minFac = n


theorem le_inf_sup : a ⊓ b ⊔ a ⊓ c ≤ a ⊓ (b ⊔ c)


@[simp]
theorem circleIntegrable_const (a : E) (c : ℂ) (R : ℝ) : CircleIntegrable (fun _ => a) c R

{E : Type u_1}
[NormedAddCommGroup E]
(a : E)
(c : ℂ)
(R : ℝ)


theorem nadd_le_nadd : ∀ {a b c d}, a ≤ b → c ≤ d → a ♯ c ≤ b ♯ d


@[simp]
theorem zero_weightSpace_eq_top_of_nilpotent [IsNilpotent R L M] :
    weightSpace M (0 : (⊤ : LieSubalgebra R L) → R) = ⊤

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


@[to_additive (attr := simp)]
theorem inv_subset_inv : s⁻¹ ⊆ t⁻¹ ↔ s ⊆ t

{α : Type u_2}
[InvolutiveInv α]
{s t : Set α}

s⁻¹ ⊆ t⁻¹ ↔ s ⊆ t


@[simp] theorem and_eq_false_imp : ∀ (x y : Bool), (x && y) = false ↔ (x = true → y = false)


/-- Right translation preserves convexity. -/
theorem ConvexOn.translate_right (hf : ConvexOn 𝕜 s f) (c : E) :
    ConvexOn 𝕜 ((fun z => c + z) ⁻¹' s) (f ∘ fun z => c + z)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
(c : E)


/-- Scaling by a positive unit is a no-op. -/
theorem units_smul_of_pos (u : Rˣ) (hu : 0 < (u.1 : R)) (v : Module.Ray R M) : u • v = v

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(u : Rˣ)
(hu : 0 < ↑u)
(v : Module.Ray R M)


theorem nhds_top' : 𝓝 (⊤ : EReal) = ⨅ a : ℝ, 𝓟 (Ioi ↑a)


theorem ker_pow_constant {f : End K V} {k : ℕ}
    (h : LinearMap.ker (f ^ k) = LinearMap.ker (f ^ k.succ)) :
    ∀ m, LinearMap.ker (f ^ k) = LinearMap.ker (f ^ (k + m))


theorem eq_zero_of_gcd_eq_zero_right {m n : Nat} (H : gcd m n = 0) : n = 0


@[reassoc (attr := simp)]
theorem e_comp_id (X Y : C) :
    (ρ_ (X ⟶[V] Y)).inv ≫ _ ◁ eId V Y ≫ eComp V X Y Y = 𝟙 (X ⟶[V] Y)

(V : Type v)
[CategoryTheory.Category.{w, v} V]
[CategoryTheory.MonoidalCategory V]
{C : Type u₁}
[CategoryTheory.EnrichedCategory V C]
(X Y : C)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.rightUnitor (CategoryTheory.EnrichedCategory.Hom X Y)).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerLeft (CategoryTheory.EnrichedCategory.Hom X Y) (CategoryTheory.eId V Y))
      (CategoryTheory.eComp V X Y Y)) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.EnrichedCategory.Hom X Y)


/-- Every Schwartz function is smooth. -/
theorem smooth (f : 𝓢(E, F)) (n : ℕ∞) : ContDiff ℝ n f

{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(f : SchwartzMap E F)
(n : ℕ∞)


/-- The presheaf of abelian groups attached to a `CorePresheafOfModules R`. -/
@[simps]
def presheaf : Cᵒᵖ ⥤ AddCommGrp.{v}

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(M : CorePresheafOfModules R)

∀ {X Y : Cᵒᵖ} (f : X ⟶ Y), M.presheaf.map f = AddCommGrp.ofHom (M.map f).toAddMonoidHom


theorem Monic.ne_zero_of_polynomial_ne {r} (hp : Monic p) (hne : q ≠ r) : p ≠ 0

{R : Type u}
[Semiring R]
{p q r : R[X]}
(hp : p.Monic)
(hne : q ≠ r)


theorem toIcoDiv_sub_eq_toIcoDiv_add' (a b c : α) :
    toIcoDiv hp (a - c) b = toIcoDiv hp a (b + c)

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


theorem IsPrimePow.exists_ord_compl_eq_one {n : ℕ} (h : IsPrimePow n) :
    ∃ p : ℕ, p.Prime ∧ ord_compl[p] n = 1

∃ p, Nat.Prime p ∧ n / p ^ n.factorization p = 1


theorem withTopEquiv_ofNat (n : Nat) [n.AtLeastTwo] :
    withTopEquiv (no_index (OfNat.ofNat n)) = OfNat.ofNat n

PartENat.withTopEquiv (OfNat.ofNat n) = OfNat.ofNat n


theorem mul_eq_inf_of_coprime (h : I ⊔ J = ⊤) : I * J = I ⊓ J

{R : Type u}
[CommSemiring R]
{I J : Ideal R}
(h : I ⊔ J = ⊤)


@[simp] theorem tail_drop' {i : ℕ} {s : Stream' α} : tail (drop i s) = s.drop (i+1)

(Stream'.drop i s).tail = Stream'.drop (i + 1) s


/-- The forward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
@[simps]
def toMon_Comon_ : Bimon_ C ⥤ Mon_ (Comon_ C)

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

(Bimon_.toMon_Comon_ C).obj M = Bimon_.toMon_Comon_obj C M


theorem vector_fourierIntegral_eq_integral_exp_smul {V : Type*} [AddCommGroup V] [Module ℝ V]
    [MeasurableSpace V] {W : Type*} [AddCommGroup W] [Module ℝ W] (L : V →ₗ[ℝ] W →ₗ[ℝ] ℝ)
    (μ : Measure V) (f : V → E) (w : W) :
    VectorFourier.fourierIntegral fourierChar μ L f w =
      ∫ v : V, Complex.exp (↑(-2 * π * L v w) * Complex.I) • f v ∂μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
[AddCommGroup V]
[Module ℝ V]
[MeasurableSpace V]
{W : Type u_3}
[AddCommGroup W]
[Module ℝ W]
(L : V →ₗ[ℝ] W →ₗ[ℝ] ℝ)
(μ : MeasureTheory.Measure V)
(f : V → E)
(w : W)

VectorFourier.fourierIntegral Real.fourierChar μ L f w =
  ∫ (v : V), Complex.exp (↑(-2 * π * (L v) w) * Complex.I) • f v ∂μ


@[to_additive]
theorem prod_product_right {s : Finset γ} {t : Finset α} {f : γ × α → β} :
    ∏ x ∈ s ×ˢ t, f x = ∏ y ∈ t, ∏ x ∈ s, f (x, y)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[AddCommMonoid β]
{s : Finset γ}
{t : Finset α}
{f : γ × α → β}

∑ x ∈ s ×ˢ t, f x = ∑ y ∈ t, ∑ x ∈ s, f (x, y)


lemma isOpen_iff_isUpperSet_and_dirSupInacc : IsOpen s ↔ IsUpperSet s ∧ DirSupInacc s

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


theorem cos_three_mul : cos (3 * x) = 4 * cos x ^ 3 - 3 * cos x

Complex.cos (3 * x) = 4 * Complex.cos x ^ 3 - 3 * Complex.cos x


theorem degree_eq_of_le_of_coeff_ne_zero' {deg m o : WithBot ℕ} {c : R} {p : R[X]}
    (h_deg_le : degree p ≤ m) (coeff_eq : coeff p (WithBot.unbot' 0 deg) = c)
    (coeff_ne_zero : c ≠ 0) (deg_eq_deg : m = deg) (coeff_eq_deg : o = deg) :
    degree p = deg

(coeff_eq : p.coeff (WithBot.unbot' 0 deg) = c)


@[to_additive existing]
theorem le_map_add_map_div [Group α] [AddCommSemigroup β] [LE β] [MulLEAddHomClass F α β] (f : F)
    (a b : α) : f a ≤ f b + f (a / b)

{F : Type u_2}
{α : Type u_3}
{β : Type u_4}
[FunLike F α β]
[Group α]
[AddCommSemigroup β]
[LE β]
[MulLEAddHomClass F α β]
(f : F)
(a b : α)


@[simp]
theorem lie_of [DecidableEq ι] {i j : ι} (x : L i) (y : L j) :
    ⁅of L i x, of L j y⁆ = if hij : i = j then of L i ⁅x, hij.symm.recOn y⁆ else 0

{ι : Type v}
(L : ι → Type w)
[(i : ι) → LieRing (L i)]
[DecidableEq ι]
{i j : ι}
(x : L i)
(y : L j)

⁅(DirectSum.of L i) x, (DirectSum.of L j) y⁆ = if hij : i = j then (DirectSum.of L i) ⁅x, Eq.recOn ⋯ y⁆ else 0


theorem destutter_idem : (l.destutter R).destutter R = l.destutter R

{α : Type u_1}
(l : List α)
(R : α → α → Prop)
[DecidableRel R]

List.destutter R (List.destutter R l) = List.destutter R l


@[simp]
theorem invOf_mem_center {a : M} [Invertible a] (ha : a ∈ Set.center M) : ⅟a ∈ Set.center M

{M : Type u_1}
[Monoid M]
{a : M}
[Invertible a]
(ha : a ∈ Set.center M)


theorem mul_le_mul_left (h0 : a ≠ 0) (hinf : a ≠ ∞) : a * b ≤ a * c ↔ b ≤ c

{a b c : ℝ≥0∞}
(h0 : a ≠ 0)
(hinf : a ≠ ⊤)


protected theorem add_lt_of_lt_neg_add {a b c : Int} (h : b < -a + c) : a + b < c


theorem setToFun_congr_measure_of_add_right {μ' : Measure α}
    (hT_add : DominatedFinMeasAdditive (μ + μ') T C') (hT : DominatedFinMeasAdditive μ T C)
    (f : α → E) (hf : Integrable f (μ + μ')) :
    setToFun (μ + μ') T hT_add f = setToFun μ T hT f

(hT_add : MeasureTheory.DominatedFinMeasAdditive (μ + μ') T C')

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hf : MeasureTheory.Integrable f (μ + μ'))

MeasureTheory.setToFun (μ + μ') T hT_add f = MeasureTheory.setToFun μ T hT f


theorem integral_pos_iff_support_of_nonneg {f : α → ℝ} (hf : 0 ≤ f) (hfi : Integrable f μ) :
    (0 < ∫ x, f x ∂μ) ↔ 0 < μ (Function.support f)

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : 0 ≤ f)
(hfi : MeasureTheory.Integrable f μ)

0 < ∫ (x : α), f x ∂μ ↔ 0 < μ (Function.support f)


@[simp]
theorem not_equiv_zero_iff : ¬(G ≈ 0) ↔ G ‖ 0


@[simp]
theorem unop_neg {X Y : Cᵒᵖ} (f : X ⟶ Y) : (-f).unop = -f.unop

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


theorem iff_stalk_iso {X Y : Scheme.{u}} (f : X ⟶ Y) :
    IsOpenImmersion f ↔ OpenEmbedding f.1.base ∧ ∀ x, IsIso (f.stalkMap x)

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)

AlgebraicGeometry.IsOpenImmersion f ↔
  OpenEmbedding ⇑f.val.base ∧
    ∀ (x : ↑↑X.toPresheafedSpace), CategoryTheory.IsIso (AlgebraicGeometry.Scheme.Hom.stalkMap f x)


@[to_additive le_sum_nonempty_of_subadditive]
lemma le_prod_nonempty_of_submultiplicative (f : α → β) (h_mul : ∀ a b, f (a * b) ≤ f a * f b)
    (s : Multiset α) (hs_nonempty : s ≠ ∅) : f s.prod ≤ (s.map f).prod

(h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b)


@[simp]
theorem coe_union (s t : Subtype (MeasurableSet : Set α → Prop)) : ↑(s ∪ t) = (s ∪ t : Set α)

{α : Type u_1}
[MeasurableSpace α]
(s t : Subtype MeasurableSet)


@[simp]
lemma linearIsometryEquiv_coe_symm_apply (e : H ≃ₗᵢ[𝕜] H) :
    linearIsometryEquiv.symm e = (e : H →L[𝕜] H)

{𝕜 : Type u_1}
[RCLike 𝕜]
{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace 𝕜 H]
[CompleteSpace H]
(e : H ≃ₗᵢ[𝕜] H)

↑(unitary.linearIsometryEquiv.symm e) =
  ↑{ toLinearEquiv := e.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }


/-- If a set `S` generates, as algebra, `R[M]`, then the image of the union of
the supports of elements of `S` generates `R[M]`. -/
theorem support_gen_of_gen' {S : Set R[M]} (hS : Algebra.adjoin R S = ⊤) :
    Algebra.adjoin R (of' R M '' ⋃ f ∈ S, (f.support : Set M)) = ⊤

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddMonoid M]
{S : Set (AddMonoidAlgebra R M)}
(hS : Algebra.adjoin R S = ⊤)

Algebra.adjoin R (AddMonoidAlgebra.of' R M '' ⋃ f ∈ S, ↑f.support) = ⊤


lemma even_or_odd' (n : ℤ) : ∃ k, n = 2 * k ∨ n = 2 * k + 1


/-- For any product along `{0, ..., n - 1}` of a commutative-monoid-valued function, we can verify
that it's equal to a different function just by checking ratios of adjacent terms.

This is a multiplicative discrete analogue of the fundamental theorem of calculus. -/
@[to_additive "For any sum along `{0, ..., n - 1}` of a commutative-monoid-valued function, we can
verify that it's equal to a different function just by checking differences of adjacent terms.

This is a discrete analogue of the fundamental theorem of calculus."]
theorem prod_range_induction (f s : ℕ → β) (base : s 0 = 1)
    (step : ∀ n, s (n + 1) = s n * f n) (n : ℕ) :
    ∏ k ∈ Finset.range n, f k = s n

(step : ∀ (n : ℕ), s (n + 1) = s n + f n)


@[simp]
theorem mem_toNonUnitalStarSubalgebra {s : NonUnitalSubalgebra R A} {h_star} {x} :
    x ∈ s.toNonUnitalStarSubalgebra h_star ↔ x ∈ s

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[Star A]
{s : NonUnitalSubalgebra R A}
{h_star : ∀ x ∈ s, star x ∈ s}
{x : A}


@[reassoc (attr := simp)]
theorem ε_inv_naturality {X Y : C} (f : X ⟶ Y) :
    (MonoidalFunctor.εIso F).inv.app X ≫ (𝟙_ (C ⥤ C)).map f = F.εIso.inv.app X ≫ f

(F : CategoryTheory.MonoidalFunctor M (CategoryTheory.Functor C C))

CategoryTheory.CategoryStruct.comp (F.εIso.inv.app X) ((𝟙_ (CategoryTheory.Functor C C)).map f) =
  CategoryTheory.CategoryStruct.comp (F.εIso.inv.app X) f


theorem le_of_inf_neBot (f : Ultrafilter α) {g : Filter α} (hg : NeBot (↑f ⊓ g)) : ↑f ≤ g

{α : Type u}
(f : Ultrafilter α)
{g : Filter α}
(hg : (↑f ⊓ g).NeBot)


/-- **Henstock-Sacks inequality**. Let `r₁ r₂ : ℝⁿ → (0, ∞)` be a function such that for any tagged
*partition* of `I` subordinate to `rₖ`, `k=1,2`, the integral sum of `f` over this partition differs
from the integral of `f` by at most `εₖ`. Then for any two tagged *prepartition* `π₁ π₂` subordinate
to `r₁` and `r₂` respectively and covering the same part of `I`, the integral sums of `f` over these
prepartitions differ from each other by at most `ε₁ + ε₂`.

The actual statement

- uses `BoxIntegral.Integrable.convergenceR` instead of a predicate assumption on `r`;
- uses `BoxIntegral.IntegrationParams.MemBaseSet` instead of “subordinate to `r`” to
  account for additional requirements like being a Henstock partition or having a bounded
  distortion.

See also `BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet_of_iUnion_eq` and
`BoxIntegral.Integrable.dist_integralSum_sum_integral_le_of_memBaseSet`.
-/
theorem dist_integralSum_le_of_memBaseSet (h : Integrable I l f vol) (hpos₁ : 0 < ε₁)
    (hpos₂ : 0 < ε₂) (h₁ : l.MemBaseSet I c₁ (h.convergenceR ε₁ c₁) π₁)
    (h₂ : l.MemBaseSet I c₂ (h.convergenceR ε₂ c₂) π₂) (HU : π₁.iUnion = π₂.iUnion) :
    dist (integralSum f vol π₁) (integralSum f vol π₂) ≤ ε₁ + ε₂

{π₁ π₂ : BoxIntegral.TaggedPrepartition I}

dist (BoxIntegral.integralSum f vol π₁) (BoxIntegral.integralSum f vol π₂) ≤ ε₁ + ε₂


theorem of_irreducible_map (f : R →+* S) [h : IsLocalRingHom f] {x} (hfx : Irreducible (f x)) :
    Irreducible x

{R : Type u_1}
{S : Type u_2}
[Semiring R]
[Semiring S]
(f : R →+* S)
[h : IsLocalRingHom f]
{x : R}
(hfx : Irreducible (f x))


/-- The obvious triangle `X₁ ⟶ X₁ ⊞ X₂ ⟶ X₂ ⟶ X₁⟦1⟧`. -/
@[simps!]
def binaryBiproductTriangle (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryBiproduct X₁ X₂] :
    Triangle C

(CategoryTheory.Pretriangulated.binaryBiproductTriangle X₁ X₂).obj₂ = (X₁ ⊞ X₂)


@[to_additive] lemma zpow_zpow (h : Commute a b) (m n : ℤ) : Commute (a ^ m) (b ^ n)

{G : Type u_1}
[Group G]
{a b : G}
(h : Commute a b)
(m n : ℤ)


@[simp]
theorem lanLeftExtension_unit (f : a ⟶ b) (g : a ⟶ c) [HasLeftKanExtension f g] :
    (lanLeftExtension f g).unit = lanUnit f g

(CategoryTheory.Bicategory.lanLeftExtension f g).unit = CategoryTheory.Bicategory.lanUnit f g


/-- A function `f : α → ℚ → ℝ` is a (kernel) rational cumulative distribution function if it is
measurable in the first argument and if `f a` satisfies a list of properties for all `a : α`:
monotonicity between 0 at -∞ and 1 at +∞ and a form of continuity.

A function with these properties can be extended to a measurable function `α → StieltjesFunction`.
See `ProbabilityTheory.IsMeasurableRatCDF.stieltjesFunction`.
-/
structure IsMeasurableRatCDF (f : α → ℚ → ℝ) : Prop where
  isRatStieltjesPoint : ∀ a, IsRatStieltjesPoint f a
  measurable : Measurable f

{f : α → ℚ → ℝ}

(self : ProbabilityTheory.IsMeasurableRatCDF f)


@[to_additive (attr := simp)]
theorem smul_none : a • (none : Option α) = none

{M : Type u_1}
{α : Type u_3}
[VAdd M α]
(a : M)


theorem finsuppTensorFinsuppLid_self :
    finsuppTensorFinsuppLid R R ι κ = finsuppTensorFinsupp' R ι κ

(R : Type u_1)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]


theorem Antitone.map_iSup₂_le [CompleteLattice β] {f : α → β} (hf : Antitone f) (s : ∀ i, κ i → α) :
    f (⨆ (i) (j), s i j) ≤ ⨅ (i) (j), f (s i j)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
{κ : ι → Sort u_7}
[CompleteLattice α]
[CompleteLattice β]
{f : α → β}
(hf : Antitone f)
(s : (i : ι) → κ i → α)

f (⨆ i, ⨆ j, s i j) ≤ ⨅ i, ⨅ j, f (s i j)


theorem sInf_isPrime_of_isChain {s : Set (Ideal α)} (hs : s.Nonempty) (hs' : IsChain (· ≤ ·) s)
    (H : ∀ p ∈ s, Ideal.IsPrime p) : (sInf s).IsPrime

(hs' : IsChain (fun x x_1 => x ≤ x_1) s)


theorem map_smul₂ (f : E →L[𝕜] F →L[𝕜] G) (c : 𝕜) (x : E) (y : F) : f (c • x) y = c • f x y

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(f : E →L[𝕜] F →L[𝕜] G)
(c : 𝕜)
(x : E)
(y : F)


theorem coe_vanishingIdeal (t : Set (PrimeSpectrum R)) :
    (vanishingIdeal t : Set R) = { f : R | ∀ x ∈ t, f ∈ x.asIdeal }

{R : Type u}
[CommSemiring R]
(t : Set (PrimeSpectrum R))

↑(PrimeSpectrum.vanishingIdeal t) = {f | ∀ x ∈ t, f ∈ x.asIdeal}


/-- The compatibility of the shift functors on `CochainComplex C ℤ` with respect
to the addition of integers. -/
@[simps!]
def shiftFunctorAdd' (n₁ n₂ n₁₂ : ℤ) (h : n₁ + n₂ = n₁₂) :
    shiftFunctor C n₁₂ ≅ shiftFunctor C n₁ ⋙ shiftFunctor C n₂

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(n₁ n₂ n₁₂ : ℤ)
(h : n₁ + n₂ = n₁₂)
(X : CochainComplex C ℤ)
(i : ℤ)

((CochainComplex.shiftFunctorAdd' C n₁ n₂ n₁₂ h).hom.app X).f i = (HomologicalComplex.XIsoOfEq X ⋯).hom


@[norm_cast]
theorem coe_zpow (r : R) (z : ℤ) : ↑(r ^ z) = (r : A) ^ z

{R : Type u_1}
(A : Type u_2)
[Semifield R]
[DivisionSemiring A]
[Algebra R A]
(r : R)
(z : ℤ)


theorem mem_append_of_mem_right {b : α} {bs : List α} (as : List α) : b ∈ bs → b ∈ as ++ bs

{α : Type u}
{b : α}
{bs : List α}
(as : List α)


/-- A lax braided functor takes commutative monoid objects to commutative monoid objects.

That is, a lax braided functor `F : C ⥤ D` induces a functor `CommMon_ C ⥤ CommMon_ D`.
-/
@[simps!]
def mapCommMon (F : LaxBraidedFunctor C D) : CommMon_ C ⥤ CommMon_ D

(F : CategoryTheory.LaxBraidedFunctor C D)

∀ {X Y : CommMon_ C} (f : X ⟶ Y), (F.mapCommMon.map f).hom = F.map f.hom


/-- If a function `f` is convex on `s`, then the value it takes at some center of mass of points of
`s` is less than the value it takes on one of those points. -/
theorem ConvexOn.exists_ge_of_centerMass (h : ConvexOn 𝕜 s f) (hw₀ : ∀ i ∈ t, 0 ≤ w i)
    (hw₁ : 0 < ∑ i ∈ t, w i) (hp : ∀ i ∈ t, p i ∈ s) :
    ∃ i ∈ t, f (t.centerMass w p) ≤ f (p i)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
{ι : Type u_5}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[LinearOrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Finset ι}
{w : ι → 𝕜}
{p : ι → E}
(h : ConvexOn 𝕜 s f)
(hw₀ : ∀ i ∈ t, 0 ≤ w i)
(hw₁ : 0 < ∑ i ∈ t, w i)
(hp : ∀ i ∈ t, p i ∈ s)


/-- When lowered to a prop, `Matrix.invertibleOfSubmatrixEquivInvertible` forms an `iff`. -/
@[simp]
theorem isUnit_submatrix_equiv {A : Matrix m m α} (e₁ e₂ : n ≃ m) :
    IsUnit (A.submatrix e₁ e₂) ↔ IsUnit A

{m : Type u}
{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
[Fintype m]
[DecidableEq m]
{A : Matrix m m α}
(e₁ e₂ : n ≃ m)


@[simp] lemma lift_le_lift : lift a ≤ lift b ↔ a ≤ b

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
{a b : α}

Booleanisation.lift a ≤ Booleanisation.lift b ↔ a ≤ b


@[simp]
theorem aequiv_symm (h : IsAdjoinRoot S f) (h' : IsAdjoinRoot T f) :
    (h.aequiv h').symm = h'.aequiv h

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{f : R[X]}
{T : Type u_1}
[CommRing T]
[Algebra R T]
(h : IsAdjoinRoot S f)
(h' : IsAdjoinRoot T f)


/-- Auxiliary lemma for `inv_rnDeriv`. -/
lemma inv_rnDeriv_aux [SigmaFinite μ] [SigmaFinite ν] (hμν : μ ≪ ν) (hνμ : ν ≪ μ) :
    (μ.rnDeriv ν)⁻¹ =ᵐ[μ] ν.rnDeriv μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]
(hμν : μ ≪ ν)
(hνμ : ν ≪ μ)


theorem coe_injective : Function.Injective ((↑) : (M₁ ≃SL[σ₁₂] M₂) → M₁ →SL[σ₁₂] M₂)

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


/-- `OrderDual` as a functor. -/
@[simps]
def dual : BoolAlg ⥤ BoolAlg


theorem l_biInf_of_ul_eq_self [CompleteLattice α] [CompleteLattice β] (gi : GaloisInsertion l u)
    {ι : Sort x} {p : ι → Prop} (f : ∀ (i) (_ : p i), α) (hf : ∀ i hi, u (l (f i hi)) = f i hi) :
    l (⨅ (i) (hi), f i hi) = ⨅ (i) (hi), l (f i hi)

(hf : ∀ (i : ι) (hi : p i), u (l (f i hi)) = f i hi)

l (⨅ i, ⨅ (hi : p i), f i hi) = ⨅ i, ⨅ (hi : p i), l (f i hi)


theorem setToL1_smul_left' (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (c : ℝ)
    (h_smul : ∀ s, MeasurableSet s → μ s < ∞ → T' s = c • T s) (f : α →₁[μ] E) :
    setToL1 hT' f = c • setToL1 hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hT' : MeasureTheory.DominatedFinMeasAdditive μ T' C')

(h_smul : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → T' s = c • T s)

(MeasureTheory.L1.setToL1 hT') f = c • (MeasureTheory.L1.setToL1 hT) f


/-- A real-valued random variable `X` `HasPDF X ℙ λ` (where `λ` is the Lebesgue measure) if and
only if the push-forward measure of `ℙ` along `X` is absolutely continuous with respect to `λ`. -/
nonrec theorem _root_.Real.hasPDF_iff_of_aemeasurable (hX : AEMeasurable X ℙ) :
    HasPDF X ℙ ↔ map X ℙ ≪ volume

{Ω : Type u_1}
{m : MeasurableSpace Ω}
{ℙ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure ℙ]
{X : Ω → ℝ}
(hX : AEMeasurable X ℙ)

MeasureTheory.HasPDF X ℙ MeasureTheory.volume ↔ MeasureTheory.Measure.map X ℙ ≪ MeasureTheory.volume


@[simp]
theorem coe_div {I J : FractionalIdeal R₁⁰ K} (hJ : J ≠ 0) :
    (↑(I / J) : Submodule R₁ K) = ↑I / (↑J : Submodule R₁ K)

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


/-- Constructor for `InitialSmall C` from an explicit small category witness. -/
theorem InitiallySmall.mk' {J : Type u} [Category.{v} J] {S : Type w} [SmallCategory S]
    (F : S ⥤ J) [Initial F] : InitiallySmall.{w} J

{J : Type u}
[CategoryTheory.Category.{v, u} J]
{S : Type w}
[CategoryTheory.SmallCategory S]
(F : S ⥤ J)
[F.Initial]


theorem continuousWithinAt_inter' {f : α → β} {s t : Set α} {x : α} (h : t ∈ 𝓝[s] x) :
    ContinuousWithinAt f (s ∩ t) x ↔ ContinuousWithinAt f s x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s t : Set α}
{x : α}
(h : t ∈ 𝓝[s] x)


@[simp]
theorem map_top : LieSubmodule.map f ⊤ = f.range

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


/-- `mulEquivEnd` as an isomorphism between endomorphism monoids. -/
@[simps!]
noncomputable def mulEquivEnd (X : C) :
    End X ≃* End (f.obj X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
{f : CategoryTheory.Functor C D}
(hf : f.FullyFaithful)
(X : C)

∀ (a : X ⟶ X), (hf.mulEquivEnd X) a = f.map a


lemma mul_nonneg_iff_pos_imp_nonneg [ExistsAddOfLE α] [PosMulStrictMono α] [MulPosStrictMono α]
    [CovariantClass α α (· + ·) (· ≤ ·)] [ContravariantClass α α (· + ·) (· ≤ ·)] :
    0 ≤ a * b ↔ (0 < a → 0 ≤ b) ∧ (0 < b → 0 ≤ a)

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

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


@[simp]
theorem val_add (n : ℕ) (f g : AdicCompletion I M) : (f + g).val n = f.val n + g.val n

{R : Type u_1}
[CommRing R]
{I : Ideal R}
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(n : ℕ)
(f g : AdicCompletion I M)


@[simp] theorem and_append {x₁ x₂ : BitVec w} {y₁ y₂ : BitVec v} :
    (x₁ ++ y₁) &&& (x₂ ++ y₂) = (x₁ &&& x₂) ++ (y₁ &&& y₂)

{w v : Nat}
{x₁ x₂ : BitVec w}
{y₁ y₂ : BitVec v}


@[to_additive]
theorem comap_map_eq_of_injective (S : Subsemigroup M) : (S.map f).comap f = S

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{f : M →ₙ* N}
(hf : Function.Injective ⇑f)
(S : Subsemigroup M)

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


theorem mul_conj (z : K) : z * conj z = ‖z‖ ^ 2


lemma imaginaryPart_eq_neg_I_smul_skewAdjointPart (x : A) :
    (imaginaryPart x : A) = -I • (skewAdjointPart ℝ x : A)

{A : Type u_1}
[AddCommGroup A]
[Module ℂ A]
[StarAddMonoid A]
[StarModule ℂ A]
(x : A)

↑(imaginaryPart x) = -Complex.I • ↑((skewAdjointPart ℝ) x)


/-- Any function semiconjugates the identity function to the identity function. -/
theorem id_right : Semiconj f id id

{α : Type u_1}
{β : Type u_2}
{f : α → β}


theorem comp_swap_eq_update (i j : α) (f : α → β) :
    f ∘ Equiv.swap i j = update (update f j (f i)) i (f j)

{α : Sort u_2}
[DecidableEq α]
{β : Sort u_1}
(i j : α)
(f : α → β)

f ∘ ⇑(Equiv.swap i j) = Function.update (Function.update f j (f i)) i (f j)


theorem quasiCompact_affineProperty_iff_quasiSeparatedSpace {X Y : Scheme} [IsAffine Y]
    (f : X ⟶ Y) :
    AffineTargetMorphismProperty.diagonal (fun X _ _ _ ↦ CompactSpace X) f ↔
      QuasiSeparatedSpace X

{X Y : AlgebraicGeometry.Scheme}
[AlgebraicGeometry.IsAffine Y]
(f : X ⟶ Y)

AlgebraicGeometry.AffineTargetMorphismProperty.diagonal (fun X x x_1 x => CompactSpace ↑↑X.toPresheafedSpace) f ↔
  QuasiSeparatedSpace ↑↑X.toPresheafedSpace


@[simp]
lemma one_lt_star_iff {x : R} : 1 < star x ↔ 1 < x

{R : Type u}
[Semiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x : R}


theorem iteratedFDeriv_const_smul_apply' {x : E} (hf : ContDiff 𝕜 i f) :
    iteratedFDeriv 𝕜 i (fun x ↦ a • f x) x = a • iteratedFDeriv 𝕜 i f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{R : Type u_3}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
{i : ℕ}
{a : R}
{x : E}
(hf : ContDiff 𝕜 (↑i) f)

iteratedFDeriv 𝕜 i (fun x => a • f x) x = a • iteratedFDeriv 𝕜 i f x


@[to_additive (attr := simp)] theorem range_lift (f : G →* K) (g : H →* K) :
    MonoidHom.range (lift f g) = MonoidHom.range f ⊔ MonoidHom.range g

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{K : Type u_3}
[Group K]
(f : G →* K)
(g : H →* K)

(Monoid.Coprod.lift f g).range = f.range ⊔ g.range


theorem Valid'.trans_left {t₁ t₂ : Ordnode α} {x : α} {o₁ o₂} (h : Bounded t₁ o₁ x)
    (H : Valid' x t₂ o₂) : Valid' o₁ t₂ o₂

{α : Type u_1}
[Preorder α]
{t₁ t₂ : Ordnode α}
{x : α}
{o₁ : WithBot α}
{o₂ : WithTop α}
(h : t₁.Bounded o₁ ↑x)
(H : Ordnode.Valid' (↑x) t₂ o₂)


theorem BlockTriangular.add (hM : BlockTriangular M b) (hN : BlockTriangular N b) :
    BlockTriangular (M + N) b

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{M N : Matrix m m R}
{b : m → α}
[LT α]
(hM : M.BlockTriangular b)
(hN : N.BlockTriangular b)


theorem discr_eq_discr_of_algEquiv {L : Type*} [Field L] [NumberField L] (f : K ≃ₐ[ℚ] L) :
    discr K = discr L

(K : Type u_1)
[Field K]
[NumberField K]
{L : Type u_2}
[Field L]
[NumberField L]
(f : K ≃ₐ[ℚ] L)

NumberField.discr K = NumberField.discr L


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

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Inf α]
[Inf β]
[Inf γ]
{g : InfHom β γ}
{f₁ f₂ : InfHom α β}
(hg : Function.Injective ⇑g)


lemma apply_extend {δ} {g : α → γ} (F : γ → δ) (f : α → β) (e' : β → γ) (b : β) :
    F (extend f g e' b) = extend f (F ∘ g) (F ∘ e') b

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{δ : Sort u_4}
{g : α → γ}
(F : γ → δ)
(f : α → β)
(e' : β → γ)
(b : β)

F (Function.extend f g e' b) = Function.extend f (F ∘ g) (F ∘ e') b


@[to_additive]
lemma comp_ne_one_iff [One β] [One γ] (f : α → β) {g : β → γ} (hg : Injective g) (hg0 : g 1 = 1) :
    g ∘ f ≠ 1 ↔ f ≠ 1

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[One β]
[One γ]
(f : α → β)
{g : β → γ}
(hg : Function.Injective g)
(hg0 : g 1 = 1)


theorem countable_range [Countable ι] (f : ι → β) : (range f).Countable

{β : Type v}
{ι : Sort x}
[Countable ι]
(f : ι → β)


/-- Embed `Fin n` into `Fin (n + 1)` by prepending zero to the `univ` -/
theorem Fin.univ_succ (n : ℕ) :
    (univ : Finset (Fin (n + 1))) =
      Finset.cons 0 (univ.map ⟨Fin.succ, Fin.succ_injective _⟩) (by simp [map_eq_image])

Finset.univ = Finset.cons 0 (Finset.map { toFun := Fin.succ, inj' := ⋯ } Finset.univ) ⋯


@[simp]
theorem self_trans_symm (e : P₁ ≃ᵃL[k] P₂) : e.trans e.symm = refl k P₁

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(e : P₁ ≃ᵃL[k] P₂)

e.trans e.symm = ContinuousAffineEquiv.refl k P₁


@[to_additive]
theorem IsCompact.smul {α β} [SMul α β] [TopologicalSpace β] [ContinuousConstSMul α β] (a : α)
    {s : Set β} (hs : IsCompact s) : IsCompact (a • s)

{α : Type u_4}
{β : Type u_5}
[VAdd α β]
[TopologicalSpace β]
[ContinuousConstVAdd α β]
(a : α)
{s : Set β}
(hs : IsCompact s)


/-- Two cases of the **Schwarz Lemma** (derivative and distance), merged together. -/
theorem norm_dslope_le_div_of_mapsTo_ball (hd : DifferentiableOn ℂ f (ball c R₁))
    (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (hz : z ∈ ball c R₁) :
    ‖dslope f c z‖ ≤ R₂ / R₁

(hd : DifferentiableOn ℂ f (Metric.ball c R₁))

(h_maps : Set.MapsTo f (Metric.ball c R₁) (Metric.ball (f c) R₂))


@[simp]
theorem coeLinearMap_of (i : ι) (x : A i) : DirectSum.coeLinearMap A (of (fun i ↦ A i) i x) = x

{R : Type u}
[Semiring R]
{ι : Type v}
[dec_ι : DecidableEq ι]
{M : Type u_1}
[AddCommMonoid M]
[Module R M]
(A : ι → Submodule R M)
(i : ι)
(x : ↥(A i))

(DirectSum.coeLinearMap A) ((DirectSum.of (fun i => ↥(A i)) i) x) = ↑x


/-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
distance at most `r` from `p`, the third point is weakly between the other two points. -/
theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
    (h : Collinear ℝ ({p₁, p₂, p₃} : Set P)) (hp₁ : dist p₁ p = r) (hp₂ : dist p₂ p ≤ r)
    (hp₃ : dist p₃ p = r) (hp₁p₃ : p₁ ≠ p₃) : Wbtw ℝ p₁ p₂ p₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[StrictConvexSpace ℝ V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{p p₁ p₂ p₃ : P}
{r : ℝ}
(h : Collinear ℝ {p₁, p₂, p₃})
(hp₁ : dist p₁ p = r)
(hp₂ : dist p₂ p ≤ r)
(hp₃ : dist p₃ p = r)
(hp₁p₃ : p₁ ≠ p₃)


theorem mem_comp_comp {V W M : Set (β × β)} (hW' : SymmetricRel W) {p : β × β} :
    p ∈ V ○ M ○ W ↔ (ball p.1 V ×ˢ ball p.2 W ∩ M).Nonempty

{β : Type ub}
{V W M : Set (β × β)}
(hW' : SymmetricRel W)
{p : β × β}

p ∈ V ○ M ○ W ↔ (UniformSpace.ball p.1 V ×ˢ UniformSpace.ball p.2 W ∩ M).Nonempty


@[simp]
theorem toLocalizationMap_sec : (toLocalizationMap M S).sec = sec M

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]

(IsLocalization.toLocalizationMap M S).sec = IsLocalization.sec M


theorem le_orthogonalBilin_orthogonalBilin (b : B.IsRefl) :
    N ≤ (N.orthogonalBilin B).orthogonalBilin B

{R : Type u_1}
{R₁ : Type u_2}
{M : Type u_5}
{M₁ : Type u_6}
[CommRing R]
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
[AddCommGroup M]
[Module R M]
{I₁ I₂ : R₁ →+* R}
{B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M}
{N : Submodule R₁ M₁}
(b : B.IsRefl)


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

{R : Type u}
[Monoid R]
{A : Type v}
{B : Type w}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]

⇑(NonUnitalAlgHom.inl R A B) = fun x => (x, 0)


theorem measure_union₀ (ht : NullMeasurableSet t μ) (hd : AEDisjoint μ s t) :
    μ (s ∪ t) = μ s + μ t

(ht : MeasureTheory.NullMeasurableSet t μ)


/-- The scalar factor between two left-invariant measures is non-zero when both measures are
positive on open sets. -/
@[to_additive]
lemma haarScalarFactor_pos_of_isHaarMeasure (μ' μ : Measure G) [IsHaarMeasure μ]
    [IsHaarMeasure μ'] : 0 < haarScalarFactor μ' μ

{G : Type u_1}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
[MeasurableSpace G]
[BorelSpace G]
(μ' μ : MeasureTheory.Measure G)
[μ.IsHaarMeasure]
[μ'.IsHaarMeasure]


@[to_additive]
theorem inter_mul_union_subset : s ∩ t * (s ∪ t) ⊆ s * t

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


@[simp, nolint simpNF]
theorem himp_eq : a ⇨ b = unit


@[to_additive]
theorem HasProd.mul_disjoint {s t : Set β} (hs : Disjoint s t) (ha : HasProd (f ∘ (↑) : s → α) a)
    (hb : HasProd (f ∘ (↑) : t → α) b) : HasProd (f ∘ (↑) : (s ∪ t : Set β) → α) (a * b)

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a b : α}
[ContinuousMul α]
{s t : Set β}
(hs : Disjoint s t)
(ha : HasProd (f ∘ Subtype.val) a)
(hb : HasProd (f ∘ Subtype.val) b)


@[simp] theorem length_singleton (c : Char) : (String.singleton c).length = 1


@[simp]
theorem sr_mul_sr (i j : ZMod n) : sr i * sr j = r (j - i)

DihedralGroup.sr i * DihedralGroup.sr j = DihedralGroup.r (j - i)


theorem reachable_delete_edges_iff_exists_walk {v w : V} :
    (G \ fromEdgeSet {s(v, w)}).Reachable v w ↔ ∃ p : G.Walk v w, ¬s(v, w) ∈ p.edges

{V : Type u}
{G : SimpleGraph V}
{v w : V}

(G \ SimpleGraph.fromEdgeSet {s(v, w)}).Reachable v w ↔ ∃ p, s(v, w) ∉ p.edges


theorem _root_.cauchy_product (ha : IsCauSeq abs fun m ↦ ∑ n ∈ range m, abv (f n))
    (hb : IsCauSeq abv fun m ↦ ∑ n ∈ range m, g n) (ε : α) (ε0 : 0 < ε) :
    ∃ i : ℕ, ∀ j ≥ i,
      abv ((∑ k ∈ range j, f k) * ∑ k ∈ range j, g k -
        ∑ n ∈ range j, ∑ m ∈ range (n + 1), f m * g (n - m)) < ε

(ha : IsCauSeq abs fun m => ∑ n ∈ Finset.range m, abv (f n))

(hb : IsCauSeq abv fun m => ∑ n ∈ Finset.range m, g n)

∃ i,
  ∀ j ≥ i,
    abv
        ((∑ k ∈ Finset.range j, f k) * ∑ k ∈ Finset.range j, g k -
          ∑ n ∈ Finset.range j, ∑ m ∈ Finset.range (n + 1), f m * g (n - m)) <
      ε


{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommGroup R]
{α : Type u_3}
{s : HahnSeries.SummableFamily Γ R α}


@[simp] lemma isGLB_infClosure : IsGLB (infClosure s) a ↔ IsGLB s a

{α : Type u_2}
[SemilatticeInf α]
{s : Set α}
{a : α}


@[reassoc (attr := simp)]
theorem e_id_comp (X Y : C) :
    (λ_ (X ⟶[V] Y)).inv ≫ eId V X ▷ _ ≫ eComp V X X Y = 𝟙 (X ⟶[V] Y)

(V : Type v)
[CategoryTheory.Category.{w, v} V]
[CategoryTheory.MonoidalCategory V]
{C : Type u₁}
[CategoryTheory.EnrichedCategory V C]
(X Y : C)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.leftUnitor (CategoryTheory.EnrichedCategory.Hom X Y)).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.eId V X) (CategoryTheory.EnrichedCategory.Hom X Y))
      (CategoryTheory.eComp V X X Y)) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.EnrichedCategory.Hom X Y)


@[simp] theorem natDegree_add_C {a : R} : (p + C a).natDegree = p.natDegree

{R : Type u}
[Semiring R]
{p : R[X]}
{a : R}

(p + Polynomial.C a).natDegree = p.natDegree


theorem iSup_image {γ} {f : β → γ} {g : γ → α} {t : Set β} :
    ⨆ c ∈ f '' t, g c = ⨆ b ∈ t, g (f b)

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{γ : Type u_9}
{f : β → γ}
{g : γ → α}
{t : Set β}


protected theorem mul_le_mul_of_nonpos_right {a b c : Int}
    (h : b ≤ a) (hc : c ≤ 0) : a * c ≤ b * c


/-- The functor forgetting the differential in a complex, obtaining a graded object. -/
@[simps]
def forget : HomologicalComplex V c ⥤ GradedObject ι V

∀ (a : ι), (HomologicalComplex.forget V c).obj C a = C.X a


@[to_additive norm_toNNReal]
theorem norm_toNNReal' : ‖a‖.toNNReal = ‖a‖₊

{E : Type u_6}
[SeminormedGroup E]
{a : E}


theorem int_prod_range_nonneg (m : ℤ) (n : ℕ) (hn : Even n) :
    0 ≤ ∏ k ∈ Finset.range n, (m - k)


@[simp]
lemma le_mul_iff_one_le_right [PosMulMono α] [PosMulReflectLE α] (a0 : 0 < a) : a ≤ a * b ↔ 1 ≤ b

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
[PosMulReflectLE α]
(a0 : 0 < a)


/-- `ψ⁻¹ = mulShift ψ (-1))`. -/
theorem inv_mulShift (ψ : AddChar R M) : ψ⁻¹ = mulShift ψ (-1)

{R : Type u_1}
{M : Type u_2}
[Ring R]
[CommMonoid M]
(ψ : AddChar R M)


/-- Equational lemma for the presheaf structure on `presheafHom`.
It is advisable to use this lemma rather than `dsimp [presheafHom]` which may result
in the need to prove equalities of objects in an `Over` category. -/
lemma presheafHom_map_app {X Y Z : C} (f : Z ⟶ Y) (g : Y ⟶ X) (h : Z ⟶ X) (w : f ≫ g = h)
    (α : (presheafHom F G).obj (op X)) :
    ((presheafHom F G).map g.op α).app (op (Over.mk f)) =
      α.app (op (Over.mk h))

(w : CategoryTheory.CategoryStruct.comp f g = h)

(α : (CategoryTheory.presheafHom F G).obj (Opposite.op X))

((CategoryTheory.presheafHom F G).map g.op α).app (Opposite.op (CategoryTheory.Over.mk f)) =
  α.app (Opposite.op (CategoryTheory.Over.mk h))


@[norm_cast]
lemma cast_inv_of_ne_zero (hq : (q.num : α) ≠ 0) : ↑(q⁻¹) = (q⁻¹ : α)

{α : Type u_3}
[DivisionRing α]
{q : ℚ}
(hq : ↑q.num ≠ 0)

↑q⁻¹ = (↑q)⁻¹


theorem StarConvex.add_right (hs : StarConvex 𝕜 x s) (z : E) :
    StarConvex 𝕜 (x + z) ((fun x => x + z) '' s)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{x : E}
{s : Set E}
(hs : StarConvex 𝕜 x s)
(z : E)


theorem IsIntegral.sum {α : Type*} {s : Finset α} (f : α → A) (h : ∀ x ∈ s, IsIntegral R (f x)) :
    IsIntegral R (∑ x ∈ s, f x)

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
{α : Type u_5}
{s : Finset α}
(f : α → A)
(h : ∀ x ∈ s, IsIntegral R (f x))


/-- An additive subsemigroup of an additive magma `M` is a subset closed under addition. -/
structure AddSubsemigroup (M : Type*) [Add M] where
  /-- The carrier of an additive subsemigroup. -/
  carrier : Set M
  /-- The sum of two elements of an additive subsemigroup belongs to the subsemigroup. -/
  add_mem' {a b} : a ∈ carrier → b ∈ carrier → a + b ∈ carrier

{M : Type u_4}
[Add M]
(self : AddSubsemigroup M)
{a b : M}

a ∈ self.carrier → b ∈ self.carrier → a + b ∈ self.carrier


@[simp]
theorem coe_range (f : α →ₛ β) : (↑f.range : Set β) = Set.range f

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


theorem subset_union_elim {s : Finset α} {t₁ t₂ : Set α} (h : ↑s ⊆ t₁ ∪ t₂) :
    ∃ s₁ s₂ : Finset α, s₁ ∪ s₂ = s ∧ ↑s₁ ⊆ t₁ ∧ ↑s₂ ⊆ t₂ \ t₁

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{t₁ t₂ : Set α}
(h : ↑s ⊆ t₁ ∪ t₂)

∃ s₁ s₂, s₁ ∪ s₂ = s ∧ ↑s₁ ⊆ t₁ ∧ ↑s₂ ⊆ t₂ \ t₁


@[simp]
theorem algebraicIndependent_empty_type_iff [IsEmpty ι] :
    AlgebraicIndependent R x ↔ Injective (algebraMap R A)

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
[IsEmpty ι]

AlgebraicIndependent R x ↔ Function.Injective ⇑(algebraMap R A)


lemma negOnePow_even (n : ℤ) (hn : Even n) : n.negOnePow = 1


@[simp]
theorem arccos_zero : arccos 0 = π / 2


@[simp]
theorem zero_subset (s : Multiset α) : 0 ⊆ s


@[reassoc]
lemma stalkMap_congr_hom (f g : X ⟶ Y) (hfg : f = g) (x : X) :
    f.stalkMap x = Y.presheaf.stalkSpecializes (specializes_of_eq <| hfg ▸ rfl) ≫
      g.stalkMap x

{X Y : AlgebraicGeometry.LocallyRingedSpace}

AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap f x =
  Y.presheaf.stalkSpecializes ⋯ ≫ AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap g x


protected lemma mul_right_inj (ha : a ≠ 0) : a * b = a * c ↔ b = c


theorem bypass_isPath {u v : V} (p : G.Walk u v) : p.bypass.IsPath

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


/-- A weight of a Lie module is a map `L → R` such that the corresponding weight space is
non-trivial. -/
structure Weight where
  /-- The family of eigenvalues corresponding to a weight. -/
  toFun : L → R
  weightSpace_ne_bot' : weightSpace M toFun ≠ ⊥

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


theorem cons_comp_rev {α n} (a : α) (f : Fin n → α) :
    Fin.cons a f ∘ Fin.rev = Fin.snoc (f ∘ Fin.rev) a

{α : Type u_1}
{n : ℕ}
(a : α)
(f : Fin n → α)


/-- If a measure `μ` is left-invariant and satisfies the right scaling condition, then it
  satisfies `QuotientMeasureEqMeasurePreimage`. -/
@[to_additive "If a measure `μ` is
left-invariant and satisfies the right scaling condition, then it satisfies
`AddQuotientMeasureEqMeasurePreimage`."]
theorem MeasureTheory.leftInvariantIsQuotientMeasureEqMeasurePreimage [IsFiniteMeasure μ]
    [hasFun : HasFundamentalDomain Γ.op G ν]
    (h : covolume Γ.op G ν = μ univ) : QuotientMeasureEqMeasurePreimage ν μ

[hasFun : MeasureTheory.HasFundamentalDomain (↥Γ.op) G ν]

(h : MeasureTheory.covolume (↥Γ.op) G ν = μ Set.univ)


lemma ne_of_ne_of_eq' {α : Sort*} {a c b : α} (hab : (a : α) ≠ c) (hbc : a = b) : b ≠ c

{α : Sort u_1}
{a c b : α}
(hab : a ≠ c)
(hbc : a = b)


@[deprecated smul_iInf_le (since := "2024-03-31")]
protected theorem smul_iInf_le {ι : Sort*} {I : Ideal R} {t : ι → Submodule R M} :
    I • iInf t ≤ ⨅ i, I • t i

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{ι : Sort u_4}
{I : Ideal R}
{t : ι → Submodule R M}


@[to_additive sum_le_card_nsmul]
lemma prod_le_pow_card [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] (l : List M) (n : M) (h : ∀ x ∈ l, x ≤ n) :
    l.prod ≤ n ^ l.length

[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]


theorem map_linearMap_addHaar_pi_eq_smul_addHaar {ι : Type*} [Finite ι] {f : (ι → ℝ) →ₗ[ℝ] ι → ℝ}
    (hf : LinearMap.det f ≠ 0) (μ : Measure (ι → ℝ)) [IsAddHaarMeasure μ] :
    Measure.map f μ = ENNReal.ofReal (abs (LinearMap.det f)⁻¹) • μ

{ι : Type u_1}
[Finite ι]
{f : (ι → ℝ) →ₗ[ℝ] ι → ℝ}
(hf : LinearMap.det f ≠ 0)
(μ : MeasureTheory.Measure (ι → ℝ))
[μ.IsAddHaarMeasure]

MeasureTheory.Measure.map (⇑f) μ = ENNReal.ofReal |(LinearMap.det f)⁻¹| • μ


@[simp]
theorem normSq_eq_zero : normSq a = 0 ↔ a = 0

{R : Type u_1}
[LinearOrderedCommRing R]
{a : ℍ[R]}


theorem union_subset_iff : s ∪ t ⊆ u ↔ s ⊆ u ∧ t ⊆ u

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


theorem FG.pow (h : M.FG) (n : ℕ) : (M ^ n).FG

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{M : Submodule R A}
(h : M.FG)
(n : ℕ)


@[simp]
theorem zero_le_coe {q : ℝ≥0} : 0 ≤ (q : ℝ)


/-- The `n`th power of a fundamental solution is trivial if and only if `n = 0`. -/
theorem zpow_eq_one_iff {a : Solution₁ d} (h : IsFundamental a) (n : ℤ) : a ^ n = 1 ↔ n = 0

{d : ℤ}
{a : Pell.Solution₁ d}
(h : Pell.IsFundamental a)
(n : ℤ)


@[simp]
theorem neg_toAddSubmonoid (S : Submodule R M) : (-S).toAddSubmonoid = -S.toAddSubmonoid

{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommGroup M]
[Module R M]
(S : Submodule R M)


/-- A key divisibility fact for the proof of `WittVector.map_frobeniusPoly`. -/
theorem map_frobeniusPoly.key₁ (n j : ℕ) (hj : j < p ^ n) :
    p ^ (n - v p ⟨j + 1, j.succ_pos⟩) ∣ (p ^ n).choose (j + 1)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n j : ℕ)
(hj : j < p ^ n)

p ^ (n - WittVector.pnat_multiplicity p ⟨j + 1, ⋯⟩) ∣ (p ^ n).choose (j + 1)


/-- Given `F : C ⥤ D ⥤ D`, `X : C`, `e : F.obj X ≅ 𝟭 D` and `Y : GradedObject J D`,
this is the isomorphism `((mapBifunctor F I J).obj ((single₀ I).obj X)).obj Y a ≅ Y a.2`
when `a : I × J` is such that `a.1 = 0`. -/
@[simps!]
noncomputable def mapBifunctorObjSingle₀ObjIso (a : I × J) (ha : a.1 = 0) :
    ((mapBifunctor F I J).obj ((single₀ I).obj X)).obj Y a ≅ Y a.2

(F : CategoryTheory.Functor C (CategoryTheory.Functor D D))

(e : F.obj X ≅ CategoryTheory.Functor.id D)

(CategoryTheory.GradedObject.mapBifunctorObjSingle₀ObjIso F X e Y a ha).inv =
  CategoryTheory.CategoryStruct.comp (e.inv.app (Y a.2))
    ((F.map (CategoryTheory.GradedObject.singleObjApplyIsoOfEq 0 X a.1 ha).inv).app (Y a.2))


theorem coe_inj (H : (f : V₁ → V₂) = g) : f = g

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
{f g : NormedAddGroupHom V₁ V₂}
(H : ⇑f = ⇑g)


theorem eq_or_ssubset_of_subset [IsAntisymm α (· ⊆ ·)] (h : a ⊆ b) : a = b ∨ a ⊂ b

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


theorem zmodRepr_spec : zmodRepr x < p ∧ x - zmodRepr x ∈ maximalIdeal ℤ_[p]

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(x : ℤ_[p])

x.zmodRepr < p ∧ x - ↑x.zmodRepr ∈ LocalRing.maximalIdeal ℤ_[p]


/-- `SatisfiesM` distributes over `>>=`, general version. -/
protected theorem bind [Monad m] [LawfulMonad m] {f : α → m β}
    (hx : SatisfiesM p x) (hf : ∀ a, p a → SatisfiesM q (f a)) :
    SatisfiesM q (x >>= f)

(hf : ∀ (a : α), p a → SatisfiesM q (f a))


@[to_additive (attr := simp)]
theorem one_prod_one [One β] : (1 : Filter α) ×ˢ (1 : Filter β) = 1

{α : Type u_2}
{β : Type u_3}
[Zero α]
[Zero β]


/-- A finite family of vectors `v i` is linear independent iff the linear map that sends
`c : ι → R` to `∑ i, c i • v i` has the trivial kernel. -/
theorem Fintype.linearIndependent_iff' [Fintype ι] [DecidableEq ι] :
    LinearIndependent R v ↔
      LinearMap.ker (LinearMap.lsum R (fun _ ↦ R) ℕ fun i ↦ LinearMap.id.smulRight (v i)) = ⊥

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

LinearIndependent R v ↔ LinearMap.ker ((LinearMap.lsum R (fun x => R) ℕ) fun i => LinearMap.id.smulRight (v i)) = ⊥


@[simp] lemma mk_le_mk (hs_sup hs_inf ht_sup ht_inf) :
    mk s hs_sup hs_inf ≤ mk t ht_sup ht_inf ↔ s ⊆ t

{α : Type u_2}
[Lattice α]
{s t : Set α}
(hs_sup : SupClosed s)
(hs_inf : InfClosed s)
(ht_sup : SupClosed t)
(ht_inf : InfClosed t)

{ carrier := s, supClosed' := hs_sup, infClosed' := hs_inf } ≤
    { carrier := t, supClosed' := ht_sup, infClosed' := ht_inf } ↔
  s ⊆ t


@[to_additive]
theorem prod_list_map_count [DecidableEq α] (l : List α) {M : Type*} [CommMonoid M] (f : α → M) :
    (l.map f).prod = ∏ m ∈ l.toFinset, f m ^ l.count m

{α : Type u_3}
[DecidableEq α]
(l : List α)
{M : Type u_6}
[CommMonoid M]
(f : α → M)

(List.map f l).prod = ∏ m ∈ l.toFinset, f m ^ List.count m l


theorem le_of_ge {x y : Nat} (h : x ≥ y) : y ≤ x


theorem ContinuousLinearMap.isBoundedLinearMap_comp_right (f : E →L[𝕜] F) :
    IsBoundedLinearMap 𝕜 fun g : F →L[𝕜] G => ContinuousLinearMap.comp g f

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


theorem Codisjoint.sup_left' (h : Codisjoint a b) : Codisjoint (c ⊔ a) b

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b : α}
(c : α)
(h : Codisjoint a b)


@[to_additive]
theorem reduce.Step.eq (H : Red.Step L₁ L₂) : reduce L₁ = reduce L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
[DecidableEq α]
(H : FreeAddGroup.Red.Step L₁ L₂)

FreeAddGroup.reduce L₁ = FreeAddGroup.reduce L₂


lemma longestOf_is_longest [FiniteDimensionalOrder α] (x : LTSeries α) :
    x.length ≤ (LTSeries.longestOf α).length

{α : Type u_1}
[Preorder α]
[FiniteDimensionalOrder α]
(x : LTSeries α)


@[to_additive]
theorem cauchySeq_prod_of_eventually_eq {u v : ℕ → E} {N : ℕ} (huv : ∀ n ≥ N, u n = v n)
    (hv : CauchySeq fun n => ∏ k ∈ range (n + 1), v k) :
    CauchySeq fun n => ∏ k ∈ range (n + 1), u k

(hv : CauchySeq fun n => ∑ k ∈ Finset.range (n + 1), v k)

CauchySeq fun n => ∑ k ∈ Finset.range (n + 1), u k


/-- The datum of an extra degeneracy is a technical condition on
augmented simplicial objects. The morphisms `s'` and `s n` of the
structure formally behave like extra degeneracies `σ (-1)`. -/
@[ext]
structure ExtraDegeneracy (X : SimplicialObject.Augmented C) where
  s' : point.obj X ⟶ drop.obj X _[0]
  s : ∀ n : ℕ, drop.obj X _[n] ⟶ drop.obj X _[n + 1]
  s'_comp_ε : s' ≫ X.hom.app (op [0]) = 𝟙 _
  s₀_comp_δ₁ : s 0 ≫ X.left.δ 1 = X.hom.app (op [0]) ≫ s'
  s_comp_δ₀ : ∀ n : ℕ, s n ≫ X.left.δ 0 = 𝟙 _
  s_comp_δ :
    ∀ (n : ℕ) (i : Fin (n + 2)), s (n + 1) ≫ X.left.δ i.succ = X.left.δ i ≫ s n
  s_comp_σ :
    ∀ (n : ℕ) (i : Fin (n + 1)), s n ≫ X.left.σ i.succ = X.left.σ i ≫ s (n + 1)

{X : CategoryTheory.SimplicialObject.Augmented C}

(self : SimplicialObject.Augmented.ExtraDegeneracy X)

self.s 0 ≫ X.left.δ 1 = X.hom.app (Opposite.op [0]) ≫ self.s'


theorem cof_blsub_le {o} (f : ∀ a < o, Ordinal) : cof (blsub.{u, u} o f) ≤ o.card

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


@[simp] theorem coe_castSucc (i : Fin n) : (Fin.castSucc i : Nat) = i


theorem exists_eq_pow_p_mul (a : 𝕎 k) (ha : a ≠ 0) :
    ∃ (m : ℕ) (b : 𝕎 k), b.coeff 0 ≠ 0 ∧ a = (p : 𝕎 k) ^ m * b

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[CommRing k]
[CharP k p]
[PerfectRing k p]
(a : WittVector p k)
(ha : a ≠ 0)


theorem liftIco_zero_continuous [TopologicalSpace B] {f : 𝕜 → B} (hf : f 0 = f p)
    (hc : ContinuousOn f <| Icc 0 p) : Continuous (liftIco p 0 f)

{𝕜 : Type u_1}
{B : Type u_2}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{p : 𝕜}
[hp : Fact (0 < p)]
[Archimedean 𝕜]
[TopologicalSpace B]
{f : 𝕜 → B}
(hf : f 0 = f p)
(hc : ContinuousOn f (Set.Icc 0 p))


@[simp] lemma mem_pos : a ∈ pos α ↔ 0 < a

{α : Type u_2}
[MulZeroOneClass α]
[PartialOrder α]
[PosMulStrictMono α]
[ZeroLEOneClass α]
[NeZero 1]
{a : α}


@[simp] theorem length_mapKey : (mapKey f l).length = l.length

∀ {α : Type u_1} {α_1 : Type u_2} {f : α → α_1} {β : Type u_3} {l : Batteries.AssocList α β},
  (Batteries.AssocList.mapKey f l).length = l.length


/-- The shift functor on `DifferentialObject S C`. -/
@[simps]
def shiftFunctor (n : S) : DifferentialObject S C ⥤ DifferentialObject S C

∀ {X Y : CategoryTheory.DifferentialObject S C} (f : X ⟶ Y),
  ((CategoryTheory.DifferentialObject.shiftFunctor C n).map f).f = (CategoryTheory.shiftFunctor C n).map f.f


theorem one_lt_mul_of_lt_of_le [ZeroLEOneClass α] [PosMulMono α]
    (ha : 1 < a) (hb : 1 ≤ b) : 1 < a * b

{α : Type u}
[Semiring α]
[Preorder α]
{a b : α}
[ZeroLEOneClass α]
[PosMulMono α]
(ha : 1 < a)
(hb : 1 ≤ b)


theorem countable_cover_nhdsWithin [SecondCountableTopology α] {f : α → Set α} {s : Set α}
    (hf : ∀ x ∈ s, f x ∈ 𝓝[s] x) : ∃ t ⊆ s, t.Countable ∧ s ⊆ ⋃ x ∈ t, f x

{α : Type u}
[t : TopologicalSpace α]
[SecondCountableTopology α]
{f : α → Set α}
{s : Set α}
(hf : ∀ x ∈ s, f x ∈ 𝓝[s] x)


theorem nhds_ofAdd (x : X) : 𝓝 (ofAdd x) = map ofAdd (𝓝 x)

{X : Type u}
[TopologicalSpace X]
(x : X)

𝓝 (Multiplicative.ofAdd x) = Filter.map (⇑Multiplicative.ofAdd) (𝓝 x)


/-- The product of generated σ-algebras is the one generated by boxes, if both generating sets
  are countably spanning. -/
theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountablySpanning (C i)) :
    (@MeasurableSpace.pi _ _ fun i => generateFrom (C i)) =
    generateFrom (pi univ '' pi univ C)

(hC : ∀ (i : ι), IsCountablySpanning (C i))

MeasurableSpace.pi = MeasurableSpace.generateFrom (Set.univ.pi '' Set.univ.pi C)


theorem eq_natDegree_of_le_mem_support (pn : p.natDegree ≤ n) (ns : n ∈ p.support) :
    p.natDegree = n

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}
(pn : p.natDegree ≤ n)
(ns : n ∈ p.support)


theorem LinearMap.toMatrix_smulBasis_left {G} [Group G] [DistribMulAction G M₁]
    [SMulCommClass G R M₁] (g : G) (f : M₁ →ₗ[R] M₂) :
    LinearMap.toMatrix (g • v₁) v₂ f =
      LinearMap.toMatrix v₁ v₂ (f ∘ₗ DistribMulAction.toLinearMap _ _ g)

{R : Type u_1}
[CommSemiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype n]
[Finite m]
[DecidableEq n]
{M₁ : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
(v₁ : Basis n R M₁)
(v₂ : Basis m R M₂)
{G : Type u_7}
[Group G]
[DistribMulAction G M₁]
[SMulCommClass G R M₁]
(g : G)
(f : M₁ →ₗ[R] M₂)

(LinearMap.toMatrix (g • v₁) v₂) f = (LinearMap.toMatrix v₁ v₂) (f ∘ₗ DistribMulAction.toLinearMap R M₁ g)


@[simp]
theorem natDegree_neg (p : R[X]) : natDegree (-p) = natDegree p


@[to_additive]
lemma elim_le_one_iff : Sum.elim v₁ v₂ ≤ 1 ↔ v₁ ≤ 1 ∧ v₂ ≤ 1

{α₁ : Type u_1}
{α₂ : Type u_2}
{β : Type u_3}
[LE β]
[One β]
{v₁ : α₁ → β}
{v₂ : α₂ → β}


@[simp]
theorem default_def : (default : M →ₛₗ[σ₁₂] M₂) = 0

{R₁ : Type u_2}
{R₂ : Type u_3}
{M : Type u_9}
{M₂ : Type u_11}
[Semiring R₁]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R₁ M]
[Module R₂ M₂]
{σ₁₂ : R₁ →+* R₂}


theorem OrthogonalFamily.inner_right_dfinsupp [DecidableEq ι] (l : ⨁ i, G i) (i : ι) (v : G i) :
    ⟪V i v, l.sum fun j => V j⟫ = ⟪v, l i⟫

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

⟪(V i) v, DFinsupp.sum l fun j => ⇑(V j)⟫_𝕜 = ⟪v, l i⟫_𝕜


@[to_additive (attr := simp)]
theorem mulIndicator_one (s : Set α) : (mulIndicator s fun _ => (1 : M)) = fun _ => (1 : M)

{α : Type u_1}
(M : Type u_4)
[One M]
(s : Set α)

(s.mulIndicator fun x => 1) = fun x => 1


@[simp]
theorem compLinearMap_apply (f : M [⋀^ι]→ₗ[R] N) (g : M₂ →ₗ[R] M) (v : ι → M₂) :
    f.compLinearMap g v = f fun i => g (v i)

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
{M₂ : Type u_10}
[AddCommMonoid M₂]
[Module R M₂]
(f : M [⋀^ι]→ₗ[R] N)
(g : M₂ →ₗ[R] M)
(v : ι → M₂)

(f.compLinearMap g) v = f fun i => g (v i)


theorem rpow_lt_rpow_of_exponent_gt (hx0 : 0 < x) (hx1 : x < 1) (hyz : z < y) : x ^ y < x ^ z


@[simp]
theorem dedup_idem {m : Multiset α} : m.dedup.dedup = m.dedup

{α : Type u_1}
[DecidableEq α]
{m : Multiset α}


@[simp]
theorem «forall» {p : (Σ'a, β a) → Prop} : (∀ x, p x) ↔ ∀ a b, p ⟨a, b⟩

{α : Sort u_1}
{β : α → Sort u_2}
{p : (a : α) ×' β a → Prop}

(∀ (x : (a : α) ×' β a), p x) ↔ ∀ (a : α) (b : β a), p ⟨a, b⟩


theorem mem_support {v : V} : v ∈ G.support ↔ ∃ w, G.Adj v w

{V : Type u}
(G : SimpleGraph V)
{v : V}


lemma exact_iff_mono [HasZeroObject C] (hf : S.f = 0) :
    S.Exact ↔ Mono S.g

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
(S : CategoryTheory.ShortComplex C)
[CategoryTheory.Limits.HasZeroObject C]
(hf : S.f = 0)


lemma nonsingular_some (X Y : R) : W.Nonsingular ![X, Y, 1] ↔ W.toAffine.Nonsingular X Y

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Projective R)
(X Y : R)


@[to_additive (attr := simp)]
theorem preimage_mul_right_singleton :
    preimage {b} (· * a) (mul_left_injective _).injOn = {b * a⁻¹}

{b}.preimage (fun x => x * a) ⋯ = {b * a⁻¹}


@[fun_prop]
theorem ContinuousOn.rexp (h : ContinuousOn f s) :
    ContinuousOn (fun y ↦ exp (f y)) s

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ}
{s : Set α}
(h : ContinuousOn f s)

ContinuousOn (fun y => Real.exp (f y)) s


theorem gcd_content_eq_of_dvd_sub {a : R} {p q : R[X]} (h : C a ∣ p - q) :
    GCDMonoid.gcd a p.content = GCDMonoid.gcd a q.content

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{a : R}
{p q : Polynomial R}
(h : Polynomial.C a ∣ p - q)


/-- Given a predicate on functions `∀ i, Finset (α i)` defined on a finite type, it is true on all
maps provided that it is true on `fun _ ↦ ∅` and for any function `g : ∀ i, Finset (α i)`, an index
`i : ι`, and `x ∉ g i`, `p g` implies `p (update g i (insert x (g i)))`.

See also `Finset.induction_on_pi_max` and `Finset.induction_on_pi_min` for specialized versions
that require `∀ i, LinearOrder (α i)`.  -/
theorem induction_on_pi {p : (∀ i, Finset (α i)) → Prop} (f : ∀ i, Finset (α i)) (h0 : p fun _ ↦ ∅)
    (step : ∀ (g : ∀ i, Finset (α i)) (i : ι), ∀ x ∉ g i, p g → p (update g i (insert x (g i)))) :
    p f

(step : ∀ (g : (i : ι) → Finset (α i)) (i : ι), ∀ x ∉ g i, p g → p (Function.update g i (insert x (g i))))


theorem hadamard_assoc [Semigroup α] : A ⊙ B ⊙ C = A ⊙ (B ⊙ C)

{α : Type u_1}
{m : Type u_4}
{n : Type u_5}
(A B C : Matrix m n α)
[Semigroup α]

(A.hadamard B).hadamard C = A.hadamard (B.hadamard C)


theorem contDiff_iff_continuous_differentiable :
    ContDiff 𝕜 n f ↔
      (∀ m : ℕ, (m : ℕ∞) ≤ n → Continuous fun x => iteratedFDeriv 𝕜 m f x) ∧
        ∀ m : ℕ, (m : ℕ∞) < n → Differentiable 𝕜 fun x => iteratedFDeriv 𝕜 m f x

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

ContDiff 𝕜 n f ↔
  (∀ (m : ℕ), ↑m ≤ n → Continuous fun x => iteratedFDeriv 𝕜 m f x) ∧
    ∀ (m : ℕ), ↑m < n → Differentiable 𝕜 fun x => iteratedFDeriv 𝕜 m f x


@[simp]
theorem prodCongr_symm (h₁ : M ≃ₘ^n⟮I, I'⟯ M') (h₂ : N ≃ₘ^n⟮J, J'⟯ N') :
    (h₁.prodCongr h₂).symm = h₁.symm.prodCongr h₂.symm

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{G : Type u_7}
[TopologicalSpace G]
{G' : Type u_8}
[TopologicalSpace G']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{J : ModelWithCorners 𝕜 F G}
{J' : ModelWithCorners 𝕜 F G'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{N : Type u_11}
[TopologicalSpace N]
[ChartedSpace G N]
{N' : Type u_12}
[TopologicalSpace N']
[ChartedSpace G' N']
{n : ℕ∞}
(h₁ : M ≃ₘ^n⟮I, I'⟯ M')
(h₂ : N ≃ₘ^n⟮J, J'⟯ N')


theorem append_left_snoc {n m} {α : Type*} (xs : Fin n → α) (x : α) (ys : Fin m → α) :
    Fin.append (Fin.snoc xs x) ys =
      Fin.append xs (Fin.cons x ys) ∘ Fin.cast (Nat.succ_add_eq_add_succ ..)

{n m : ℕ}
{α : Type u_1}
(xs : Fin n → α)
(x : α)
(ys : Fin m → α)

Fin.append (Fin.snoc xs x) ys = Fin.append xs (Fin.cons x ys) ∘ Fin.cast ⋯


theorem Sized.rotateL_size {l x r} (hm : Sized r) :
    size (@Ordnode.rotateL α l x r) = size l + size r + 1

{α : Type u_1}
{l : Ordnode α}
{x : α}
{r : Ordnode α}
(hm : r.Sized)

(l.rotateL x r).size = l.size + r.size + 1


theorem diff_eq_compl_inter {s t : Set α} : s \ t = tᶜ ∩ s


/-- Pull-out property of the conditional expectation. -/
theorem condexp_stronglyMeasurable_mul₀ {f g : α → ℝ} (hf : AEStronglyMeasurable' m f μ)
    (hfg : Integrable (f * g) μ) (hg : Integrable g μ) : μ[f * g|m] =ᵐ[μ] f * μ[g|m]

(hf : MeasureTheory.AEStronglyMeasurable' m f μ)

(hfg : MeasureTheory.Integrable (f * g) μ)


/-- If `R` is a ring with a continuous multiplication, then negation is continuous as well since it
is just multiplication with `-1`. -/
theorem TopologicalSemiring.continuousNeg_of_mul [TopologicalSpace α] [NonAssocRing α]
    [ContinuousMul α] : ContinuousNeg α

{α : Type u_1}
[TopologicalSpace α]
[NonAssocRing α]
[ContinuousMul α]


theorem Antiperiodic.add_int_mul_eq [Ring α] [Ring β] (h : Antiperiodic f c) (n : ℤ) :
    f (x + n * c) = (n.negOnePow : ℤ) * f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[Ring α]
[Ring β]
(h : Function.Antiperiodic f c)
(n : ℤ)


/-- Although `fun x => x ^ r` for fixed `r` is *not* complex-differentiable along the negative real
line, it is still real-differentiable, and the derivative is what one would formally expect. -/
theorem hasDerivAt_ofReal_cpow {x : ℝ} (hx : x ≠ 0) {r : ℂ} (hr : r ≠ -1) :
    HasDerivAt (fun y : ℝ => (y : ℂ) ^ (r + 1) / (r + 1)) (x ^ r) x

HasDerivAt (fun y => ↑y ^ (r + 1) / (r + 1)) (↑x ^ r) x


theorem unop_inf (S₁ S₂ : Subsemiring Rᵐᵒᵖ) : (S₁ ⊓ S₂).unop = S₁.unop ⊓ S₂.unop

{R : Type u_2}
[NonAssocSemiring R]
(S₁ S₂ : Subsemiring Rᵐᵒᵖ)


/-- Define the second primitive quadratic character on `ZMod 8`, `χ₈'`.
It corresponds to the extension `ℚ(√-2)/ℚ`. -/
@[simps]
def χ₈' : MulChar (ZMod 8) ℤ


theorem Int.prime_iff_natAbs_prime {k : ℤ} : Prime k ↔ Nat.Prime k.natAbs


theorem card' : ∃ (p : ℕ) (n : ℕ+), Nat.Prime p ∧ Fintype.card K = p ^ (n : ℕ)


@[simp]
theorem pairFunction_right (X Y : C) : pairFunction X Y right = Y

CategoryTheory.Limits.pairFunction X Y CategoryTheory.Limits.WalkingPair.right = Y


@[to_additive (attr := simp)]
theorem div_singleton (a : α) : s / {a} = s.image (· / a)

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

s - {a} = Finset.image (fun x => x - a) s


@[simp]
theorem LiftRelAux.ret_left (R : α → β → Prop) (C : Computation α → Computation β → Prop) (a cb) :
    LiftRelAux R C (Sum.inl a) (destruct cb) ↔ ∃ b, b ∈ cb ∧ R a b

Computation.LiftRelAux R C (Sum.inl a) cb.destruct ↔ ∃ b, b ∈ cb ∧ R a b


@[simp]
theorem FamilyOfElements.compPresheafMap_id (x : FamilyOfElements P R) :
    x.compPresheafMap (𝟙 P) = x

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

(x : CategoryTheory.Presieve.FamilyOfElements P R)

CategoryTheory.Presieve.FamilyOfElements.compPresheafMap (CategoryTheory.CategoryStruct.id P) x = x


theorem ord_compl_dvd_ord_compl_of_dvd {a b : ℕ} (hab : a ∣ b) (p : ℕ) :
    ord_compl[p] a ∣ ord_compl[p] b

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


/-- If the second vector passed to `oangle` is 0, the result is 0. -/
@[simp]
theorem oangle_zero_right (x : V) : o.oangle x 0 = 0

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


theorem _root_.Function.Commute.finset_image [DecidableEq α] {f g : α → α}
    (h : Function.Commute f g) : Function.Commute (image f) (image g)

{α : Type u_1}
[DecidableEq α]
{f g : α → α}
(h : Function.Commute f g)

Function.Commute (Finset.image f) (Finset.image g)


@[fun_prop]
theorem hasFDerivAt_pi'' (hφ : ∀ i, HasFDerivAt (fun x => Φ x i) ((proj i).comp Φ') x) :
    HasFDerivAt Φ Φ' x

(hφ : ∀ (i : ι), HasFDerivAt (fun x => Φ x i) ((ContinuousLinearMap.proj i).comp Φ') x)


theorem ne_ones_iff {c : Composition n} : c ≠ ones n ↔ ∃ i ∈ c.blocks, 1 < i

c ≠ Composition.ones n ↔ ∃ i ∈ c.blocks, 1 < i


@[reassoc (attr := simp 1100)]
theorem NatTrans.mapHomologicalComplex_naturality {c : ComplexShape ι} {F G : W₁ ⥤ W₂}
    [F.PreservesZeroMorphisms] [G.PreservesZeroMorphisms]
    (α : F ⟶ G) {C D : HomologicalComplex W₁ c} (f : C ⟶ D) :
    (F.mapHomologicalComplex c).map f ≫ (NatTrans.mapHomologicalComplex α c).app D =
      (NatTrans.mapHomologicalComplex α c).app C ≫ (G.mapHomologicalComplex c).map f

(F.mapHomologicalComplex c).map f ≫ (CategoryTheory.NatTrans.mapHomologicalComplex α c).app D =
  (CategoryTheory.NatTrans.mapHomologicalComplex α c).app C ≫ (G.mapHomologicalComplex c).map f


theorem gc_map_comap (f : A →ₐ[R] B) : GaloisConnection (map f) (comap f)

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

GaloisConnection (Subalgebra.map f) (Subalgebra.comap f)


@[simp]
lemma leftShift_comp_zero_cochain (a n' : ℤ) (hn' : n + a = n') (γ' : Cochain L M 0) :
    (γ.comp γ' (add_zero n)).leftShift a n' hn' =
      (γ.leftShift a n' hn').comp γ' (add_zero n')

(γ : CochainComplex.HomComplex.Cochain K L n)

(γ' : CochainComplex.HomComplex.Cochain L M 0)

(γ.comp γ' ⋯).leftShift a n' hn' = (γ.leftShift a n' hn').comp γ' ⋯


theorem isAlgebraic_of_mem_rootSet {R : Type u} {A : Type v} [Field R] [Field A] [Algebra R A]
    {p : R[X]} {x : A} (hx : x ∈ p.rootSet A) : IsAlgebraic R x


@[elementwise (attr := simp)]
theorem productIso_inv_comp_π (j : J) :
    (productIso.{v, u} F).inv ≫ Pi.π F j = fun f => ((equivShrink (∀ j, F j)).symm f) j

{J : Type v}
(F : J → Type u)
[Small.{u, v} J]
(j : J)

(CategoryTheory.Limits.Types.Small.productIso F).inv ≫ CategoryTheory.Limits.Pi.π F j = fun f =>
  (equivShrink ((j : J) → F j)).symm f j


@[simp]
theorem coe_copy (S : Subsemiring R) (s : Set R) (hs : s = ↑S) : (S.copy s hs : Set R) = s

{R : Type u}
[NonAssocSemiring R]
(S : Subsemiring R)
(s : Set R)
(hs : s = ↑S)


@[reassoc (attr := simp)]
lemma asIsoHomologyι_inv_comp_homologyι (hg : S.g = 0) [S.HasHomology] :
    (S.asIsoHomologyι hg).inv ≫ S.homologyι = 𝟙 _

CategoryTheory.CategoryStruct.comp (S.asIsoHomologyι hg).inv S.homologyι = CategoryTheory.CategoryStruct.id S.opcycles


theorem add_def (xs ys : IntList) :
    xs + ys = List.zipWithAll (fun x y => x.getD 0 + y.getD 0) xs ys


@[to_additive]
theorem mulIndicator_biUnion_finset_eventuallyEq {ι} [One β] (s : ι → Set α) (f : α → β) (a : α) :
    (fun n : Finset ι => mulIndicator (⋃ i ∈ n, s i) f a) =ᶠ[atTop]
      fun _ ↦ mulIndicator (iUnion s) f a

{α : Type u_1}
{β : Type u_2}
{ι : Type u_5}
[One β]
(s : ι → Set α)
(f : α → β)
(a : α)

(fun n => (⋃ i ∈ n, s i).mulIndicator f a) =ᶠ[Filter.atTop] fun x => (Set.iUnion s).mulIndicator f a


theorem Ioc_subset_Ioc_union_Ioc : Ioc a c ⊆ Ioc a b ∪ Ioc b c

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


/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Monoid`, but
  requiring a summability hypothesis. -/
theorem tsum_const_smul [T2Space α] (b : γ) (hf : Summable f) : ∑' i, b • f i = b • ∑' i, f i

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Monoid γ]
[TopologicalSpace α]
[AddCommMonoid α]
[DistribMulAction γ α]
[ContinuousConstSMul γ α]
{f : β → α}
[T2Space α]
(b : γ)
(hf : Summable f)

∑' (i : β), b • f i = b • ∑' (i : β), f i


theorem contMDiffOn_extChartAt : ContMDiffOn I 𝓘(𝕜, E) n (extChartAt I x) (chartAt H x).source

{𝕜 : 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]
{x : M}
{n : ℕ∞}

ContMDiffOn I 𝓘(𝕜, E) n (↑(extChartAt I x)) (chartAt H x).source


theorem IsIntegral.smul {R} [CommSemiring R] [CommRing S] [Algebra R B] [Algebra S B] [Algebra R S]
    [IsScalarTower R S B] {x : B} (r : R)(hx : IsIntegral S x) : IsIntegral S (r • x)

{B : Type u_3}
{S : Type u_4}
[Ring B]
{R : Type u_5}
[CommSemiring R]
[CommRing S]
[Algebra R B]
[Algebra S B]
[Algebra R S]
[IsScalarTower R S B]
{x : B}
(r : R)
(hx : IsIntegral S x)


/-- A subring contains the ring's 0. -/
protected theorem zero_mem : (0 : R) ∈ s


/-- A graph is strongly regular with parameters `n k ℓ μ` if
 * its vertex set has cardinality `n`
 * it is regular with degree `k`
 * every pair of adjacent vertices has `ℓ` common neighbors
 * every pair of nonadjacent vertices has `μ` common neighbors
-/
structure IsSRGWith (n k ℓ μ : ℕ) : Prop where
  card : Fintype.card V = n
  regular : G.IsRegularOfDegree k
  of_adj : ∀ v w : V, G.Adj v w → Fintype.card (G.commonNeighbors v w) = ℓ
  of_not_adj : Pairwise fun v w => ¬G.Adj v w → Fintype.card (G.commonNeighbors v w) = μ

{V : Type u}
[Fintype V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{n k ℓ μ : ℕ}
(self : G.IsSRGWith n k ℓ μ)


@[to_additive (attr := simp)]
theorem prod_dite_irrel (p : Prop) [Decidable p] (s : Finset α) (f : p → α → β) (g : ¬p → α → β) :
    ∏ x ∈ s, (if h : p then f h x else g h x) =
      if h : p then ∏ x ∈ s, f h x else ∏ x ∈ s, g h x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
(p : Prop)
[Decidable p]
(s : Finset α)
(f : p → α → β)
(g : ¬p → α → β)

(∑ x ∈ s, if h : p then f h x else g h x) = if h : p then ∑ x ∈ s, f h x else ∑ x ∈ s, g h x


@[simp]
theorem le_eq_subset : ((· ≤ ·) : Set α → Set α → Prop) = (· ⊆ ·)

(fun x x_1 => x ≤ x_1) = fun x x_1 => x ⊆ x_1


@[to_additive (attr := simp)]
theorem measure_smul (c : G) (s : Set α) : μ (c • s) = μ s

[MeasureTheory.VAddInvariantMeasure G α μ]


theorem domDomCongr_mul (σ₁ : Equiv.Perm ι₁) (σ₂ : Equiv.Perm ι₁)
    (m : MultilinearMap R (fun _ : ι₁ => M₂) M₃) :
    m.domDomCongr (σ₂ * σ₁) = (m.domDomCongr σ₁).domDomCongr σ₂

{R : Type uR}
{M₂ : Type v₂}
{M₃ : Type v₃}
[Semiring R]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M₂]
[Module R M₃]
{ι₁ : Type u_1}
(σ₁ σ₂ : Equiv.Perm ι₁)
(m : MultilinearMap R (fun x => M₂) M₃)

MultilinearMap.domDomCongr (σ₂ * σ₁) m = MultilinearMap.domDomCongr σ₂ (MultilinearMap.domDomCongr σ₁ m)


/-- Note that the stronger `List.Subset.dedup_append_right` is proved earlier. -/
theorem _root_.List.Subset.dedup_append_left {s t : List α} (h : t ⊆ s) :
    List.dedup (s ++ t) ~ List.dedup s

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


/-- The minimum degree in the graph is at most the degree of any particular vertex. -/
theorem minDegree_le_degree [DecidableRel G.Adj] (v : V) : G.minDegree ≤ G.degree v

{V : Type u_1}
(G : SimpleGraph V)
[Fintype V]
[DecidableRel G.Adj]
(v : V)


@[simp]
theorem conjTranspose_nsmul [AddMonoid α] [StarAddMonoid α] (c : ℕ) (M : Matrix m n α) :
    (c • M)ᴴ = c • Mᴴ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[AddMonoid α]
[StarAddMonoid α]
(c : ℕ)
(M : Matrix m n α)


theorem sqrt_lt (hx : 0 ≤ x) (hy : 0 ≤ y) : √x < y ↔ x < y ^ 2


theorem induction_on_inter {C : Set α → Prop} {s : Set (Set α)} [m : MeasurableSpace α]
    (h_eq : m = generateFrom s) (h_inter : IsPiSystem s) (h_empty : C ∅) (h_basic : ∀ t ∈ s, C t)
    (h_compl : ∀ t, MeasurableSet t → C t → C tᶜ)
    (h_union :
      ∀ f : ℕ → Set α,
        Pairwise (Disjoint on f) → (∀ i, MeasurableSet (f i)) → (∀ i, C (f i)) → C (⋃ i, f i)) :
    ∀ ⦃t⦄, MeasurableSet t → C t

(h_eq : m = MeasurableSpace.generateFrom s)

(h_compl : ∀ (t : Set α), MeasurableSet t → C t → C tᶜ)

(h_union :
  ∀ (f : ℕ → Set α), Pairwise (Disjoint on f) → (∀ (i : ℕ), MeasurableSet (f i)) → (∀ (i : ℕ), C (f i)) → C (⋃ i, f i))


@[simp]
theorem mapAlgHom_id : mapAlgHom (AlgHom.id R A) = AlgHom.id R (Polynomial A)

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

Polynomial.mapAlgHom (AlgHom.id R A) = AlgHom.id R A[X]


/-- **Nakayama's Lemma** - A slightly more general version of (4) in
[Stacks 00DV](https://stacks.math.columbia.edu/tag/00DV).
See also `smul_le_of_le_smul_of_le_jacobson_bot` for the special case when `J = ⊥`.  -/
theorem sup_smul_eq_sup_smul_of_le_smul_of_le_jacobson {I J : Ideal R} {N N' : Submodule R M}
    (hN' : N'.FG) (hIJ : I ≤ jacobson J) (hNN : N' ≤ N ⊔ I • N') : N ⊔ I • N' = N ⊔ J • N'

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I J : Ideal R}
{N N' : Submodule R M}
(hN' : N'.FG)
(hIJ : I ≤ J.jacobson)
(hNN : N' ≤ N ⊔ I • N')


theorem sup_eq_sup_iff_left : a ⊔ b = a ⊔ c ↔ b ≤ a ⊔ c ∧ c ≤ a ⊔ b

{α : Type u}
[SemilatticeSup α]
{a b c : α}


@[to_additive]
protected theorem _root_.IsUnit.set : IsUnit a → IsUnit ({a} : Set α)


/-- If `E` and `K` are isomorphic as `F`-algebras, then they have the same `Field.finSepDegree`
over `F`. -/
theorem finSepDegree_eq_of_equiv (i : E ≃ₐ[F] K) :
    finSepDegree F E = finSepDegree F K

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type w)
[Field K]
[Algebra F K]
(i : E ≃ₐ[F] K)

Field.finSepDegree F E = Field.finSepDegree F K


theorem rank_quotient_add_rank_le [Nontrivial R] (M' : Submodule R M) :
    Module.rank R (M ⧸ M') + Module.rank R M' ≤ Module.rank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[Nontrivial R]
(M' : Submodule R M)

Module.rank R (M ⧸ M') + Module.rank R ↥M' ≤ Module.rank R M


/-- The linear equivalence between linear functions on a finite product of modules and
families of functions on these modules. See note [bundled maps over different rings]. -/
@[simps symm_apply]
def lsum (S) [AddCommMonoid M] [Module R M] [Fintype ι] [DecidableEq ι] [Semiring S] [Module S M]
    [SMulCommClass R S M] : ((i : ι) → φ i →ₗ[R] M) ≃ₗ[S] ((i : ι) → φ i) →ₗ[R] M

(R : Type u)
{M : Type v}
{ι : Type x}
[Semiring R]
(φ : ι → Type i)
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(S : Type u_1)
[AddCommMonoid M]
[Module R M]
[Fintype ι]
[DecidableEq ι]
[Semiring S]
[Module S M]
[SMulCommClass R S M]
(f : ((i : ι) → φ i) →ₗ[R] M)
(i : ι)

(LinearMap.lsum R φ S).symm f i = f ∘ₗ LinearMap.single i


@[to_additive] lemma lt_or_lt_of_div_lt_div : a / d < b / c → a < b ∨ c < d

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