lemma isRightKanExtension_iff_of_iso {F' F'' : D ⥤ H} (e : F' ≅ F'') {L : C ⥤ D} {F : C ⥤ H}
    (α : L ⋙ F' ⟶ F) (α' : L ⋙ F'' ⟶ F) (comm : whiskerLeft L e.hom ≫ α' = α) :
    F'.IsRightKanExtension α ↔ F''.IsRightKanExtension α'

(comm : CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerLeft L e.hom) α' = α)


theorem ReaderT.goto_mkLabel {α ρ β} (x : Label α m β) (i : α) :
    goto (ReaderT.mkLabel ρ x) i = monadLift (goto x i)

{m : Type u → Type v}
{α : Type u_1}
{ρ β : Type u}
(x : ContT.Label α m β)
(i : α)

ContT.goto (ReaderT.mkLabel ρ x) i = monadLift (ContT.goto x i)


@[to_additive MeasureTheory.IsAddFundamentalDomain.measure_addFundamentalFrontier]
theorem measure_fundamentalFrontier : μ (fundamentalFrontier G s) = 0

(hs : MeasureTheory.IsFundamentalDomain G s μ)

μ (MeasureTheory.fundamentalFrontier G s) = 0


@[simp]
theorem frontier_setOf_im_lt (a : ℝ) : frontier { z : ℂ | z.im < a } = { z | z.im = a }

frontier {z | z.im < a} = {z | z.im = a}


theorem contDiffWithinAt_univ : ContDiffWithinAt 𝕜 n f univ x ↔ ContDiffAt 𝕜 n f x

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

ContDiffWithinAt 𝕜 n f Set.univ x ↔ ContDiffAt 𝕜 n f x


protected theorem of_quotientMap_compose (hf : Continuous f) (hg : Continuous g)
    (hgf : QuotientMap (g ∘ f)) : QuotientMap g

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
{f : X → Y}
{g : Y → Z}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(hf : Continuous f)
(hg : Continuous g)
(hgf : QuotientMap (g ∘ f))


theorem iInf₂_mono' {f : ∀ i, κ i → α} {g : ∀ i', κ' i' → α} (h : ∀ i j, ∃ i' j', f i' j' ≤ g i j) :
    ⨅ (i) (j), f i j ≤ ⨅ (i) (j), g i j

(h : ∀ (i : ι') (j : κ' i), ∃ i' j', f i' j' ≤ g i j)


theorem IsClosedMap.mapClusterPt_iff_lift'_closure
    {F : Filter X} (f_closed : IsClosedMap f) (f_cont : Continuous f) {y : Y} :
    MapClusterPt y F f ↔ ((F.lift' closure) ⊓ 𝓟 (f ⁻¹' {y})).NeBot

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
{F : Filter X}
(f_closed : IsClosedMap f)
(f_cont : Continuous f)
{y : Y}

MapClusterPt y F f ↔ (F.lift' closure ⊓ 𝓟 (f ⁻¹' {y})).NeBot


@[simp] lemma mem_mk {s : Set α} (hs) {a : α} : a ∈ mk s hs ↔ a ∈ s

{α : Type u_1}
[LE α]
{s : Set α}
(hs : IsLowerSet s)
{a : α}

a ∈ { carrier := s, lower' := hs } ↔ a ∈ s


theorem pow_smul_mem_of_smul_subset_of_mem_adjoin [CommSemiring B] [Algebra R B] [Algebra A B]
    [IsScalarTower R A B] (r : A) (s : Set B) (B' : Subalgebra R B) (hs : r • s ⊆ B') {x : B}
    (hx : x ∈ adjoin R s) (hr : algebraMap A B r ∈ B') : ∃ n₀ : ℕ, ∀ n ≥ n₀, r ^ n • x ∈ B'

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[CommSemiring B]
[Algebra R B]
[Algebra A B]
[IsScalarTower R A B]
(r : A)
(s : Set B)
(B' : Subalgebra R B)
(hs : r • s ⊆ ↑B')
{x : B}
(hx : x ∈ Algebra.adjoin R s)
(hr : (algebraMap A B) r ∈ B')


@[simp, norm_cast]
lemma coe_set_smul : (I : Set R) • N = I • N

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{I : Ideal R}
{N : Submodule R M}


theorem dropWhile_suffix (p : α → Bool) : l.dropWhile p <:+ l

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


lemma cfc_apply_of_not_predicate {f : R → R} (a : A) (ha : ¬ p a) :
    cfc f a = 0

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


@[simp]
theorem arcsin_eq_neg_pi_div_two {x : ℝ} : arcsin x = -(π / 2) ↔ x ≤ -1


theorem Sbtw.trans_right [NoZeroSMulDivisors R V] {w x y z : P} (h₁ : Sbtw R w x z)
    (h₂ : Sbtw R x y z) : Sbtw R w y z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[NoZeroSMulDivisors R V]
{w x y z : P}
(h₁ : Sbtw R w x z)
(h₂ : Sbtw R x y z)


theorem diam_triple : diam ({x, y, z} : Set α) = max (max (edist x y) (edist x z)) (edist y z)

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

EMetric.diam {x, y, z} = max (max (edist x y) (edist x z)) (edist y z)


@[simp]
theorem rpow_eq_pow (x : ℝ≥0∞) (y : ℝ) : rpow x y = x ^ y


theorem continuous_preStoneCechExtend : Continuous (preStoneCechExtend hg)

{α : Type u}
[TopologicalSpace α]
{β : Type v}
[TopologicalSpace β]
[T2Space β]
[CompactSpace β]
{g : α → β}
(hg : Continuous g)


theorem mem_supported {s : Set α} (p : α →₀ M) : p ∈ supported M R s ↔ ↑p.support ⊆ s

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set α}
(p : α →₀ M)

p ∈ Finsupp.supported M R s ↔ ↑p.support ⊆ s


@[to_additive FreeAddGroup.eqvGen_step_iff_join_red]
theorem eqvGen_step_iff_join_red : EqvGen Red.Step L₁ L₂ ↔ Join Red L₁ L₂

EqvGen FreeAddGroup.Red.Step L₁ L₂ ↔ Relation.Join FreeAddGroup.Red L₁ L₂


theorem Continuous.subtype_val {f : Y → Subtype p} (hf : Continuous f) :
    Continuous fun x => (f x : X)

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


lemma polyCharpoly_coeff_rank_ne_zero :
    (polyCharpoly (ad R L).toLinearMap b).coeff (rank R L) ≠ 0

(R : Type u_1)
(L : Type u_3)
{ι : Type u_5}
[CommRing R]
[Nontrivial R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[Module.Free R L]
[Fintype ι]
[DecidableEq ι]
(b : Basis ι R L)

((↑(LieAlgebra.ad R L)).polyCharpoly b).coeff (LieAlgebra.rank R L) ≠ 0


theorem degrees_def [DecidableEq σ] (p : MvPolynomial σ R) :
    p.degrees = p.support.sup fun s : σ →₀ ℕ => Finsupp.toMultiset s

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[DecidableEq σ]
(p : MvPolynomial σ R)

p.degrees = p.support.sup fun s => Finsupp.toMultiset s


theorem Embedding.of_comp_iff (hg : Embedding g) : Embedding (g ∘ f) ↔ Embedding f

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
{f : X → Y}
{g : Y → Z}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(hg : Embedding g)


@[simp]
theorem coe_linearEquivTuple_symm : ⇑(linearEquivTuple c₁ c₂).symm = (equivTuple c₁ c₂).symm

⇑(QuaternionAlgebra.linearEquivTuple c₁ c₂).symm = ⇑(QuaternionAlgebra.equivTuple c₁ c₂).symm


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

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


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

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


theorem isNoetherian_iff_fg_wellFounded :
    IsNoetherian R M ↔
      WellFounded
        ((· > ·) : { N : Submodule R M // N.FG } → { N : Submodule R M // N.FG } → Prop)

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

IsNoetherian R M ↔ WellFounded fun x x_1 => x > x_1


@[reassoc (attr := simp)]
lemma iCyclesIso_hom_inv_id :
    K.iCycles i ≫ (K.iCyclesIso i j hj h).inv = 𝟙 _

K.iCycles i ≫ (K.iCyclesIso i j hj h).inv = 𝟙 (K.cycles i)


@[simp]
theorem submatrix_submatrix {l₂ o₂ : Type*} (A : Matrix m n α) (r₁ : l → m) (c₁ : o → n)
    (r₂ : l₂ → l) (c₂ : o₂ → o) :
    (A.submatrix r₁ c₁).submatrix r₂ c₂ = A.submatrix (r₁ ∘ r₂) (c₁ ∘ c₂)

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
{l₂ : Type u_10}
{o₂ : Type u_11}
(A : Matrix m n α)
(r₁ : l → m)
(c₁ : o → n)
(r₂ : l₂ → l)
(c₂ : o₂ → o)


private lemma uniformity_eq_seminorm :
    𝓤 (ContinuousMultilinearMap 𝕜 E G) = ⨅ r > 0, 𝓟 {f | ‖f.1 - f.2‖ < r}

[(i : ι) → SeminormedAddCommGroup (E i)]

𝓤 (ContinuousMultilinearMap 𝕜 E G) = ⨅ r, ⨅ (_ : r > 0), 𝓟 {f | ‖f.1 - f.2‖ < r}


@[to_additive]
theorem prod_unique_nonempty {α β : Type*} [CommMonoid β] [Unique α] (s : Finset α) (f : α → β)
    (h : s.Nonempty) : ∏ x ∈ s, f x = f default

{α : Type u_6}
{β : Type u_7}
[AddCommMonoid β]
[Unique α]
(s : Finset α)
(f : α → β)
(h : s.Nonempty)


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

{α : Type u_1}
{F : Type u_3}
{F' : Type u_4}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedAddCommGroup F']
[NormedSpace ℝ F']
{m : MeasurableSpace α}
(f : MeasureTheory.SimpleFunc α F)

MeasureTheory.SimpleFunc.setToSimpleFunc 0 f = 0


theorem aemeasurable_map_equiv_iff (e : α ≃ᵐ β) {f : β → γ} :
    AEMeasurable f (μ.map e) ↔ AEMeasurable (f ∘ e) μ

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
[MeasurableSpace γ]
{μ : MeasureTheory.Measure α}
(e : α ≃ᵐ β)
{f : β → γ}

AEMeasurable f (MeasureTheory.Measure.map (⇑e) μ) ↔ AEMeasurable (f ∘ ⇑e) μ


theorem HasStrictDerivAt.clog {f : ℂ → ℂ} {f' x : ℂ} (h₁ : HasStrictDerivAt f f' x)
    (h₂ : f x ∈ slitPlane) : HasStrictDerivAt (fun t => log (f t)) (f' / f x) x

{f : ℂ → ℂ}
{f' x : ℂ}
(h₁ : HasStrictDerivAt f f' x)
(h₂ : f x ∈ Complex.slitPlane)

HasStrictDerivAt (fun t => Complex.log (f t)) (f' / f x) x


/-- Ring isomorphism between `α` considered as a Boolean algebra considered as a Boolean ring and
`α`. -/
@[simps!]
def RingEquiv.asBoolRingAsBoolAlg (α : Type*) [BooleanRing α] : AsBoolRing (AsBoolAlg α) ≃+* α

∀ (a : α), (RingEquiv.asBoolRingAsBoolAlg α).symm a = toBoolRing (toBoolAlg a)


@[to_additive (attr := simp)]
theorem prod_pi_mulSingle {β : α → Type*} [DecidableEq α] [∀ a, CommMonoid (β a)] (a : α)
    (f : ∀ a, β a) (s : Finset α) :
    (∏ a' ∈ s, Pi.mulSingle a' (f a') a) = if a ∈ s then f a else 1

{α : Type u_3}
{β : α → Type u_6}
[DecidableEq α]
[(a : α) → CommMonoid (β a)]
(a : α)
(f : (a : α) → β a)
(s : Finset α)

∏ a' ∈ s, Pi.mulSingle a' (f a') a = if a ∈ s then f a else 1


/-- Finite form of Euler's sine product, with remainder term expressed as a ratio of cosine
integrals. -/
theorem sin_pi_mul_eq (z : ℂ) (n : ℕ) :
    Complex.sin (π * z) =
      ((π * z * ∏ j ∈ Finset.range n, ((1 : ℂ) - z ^ 2 / ((j : ℂ) + 1) ^ 2)) *
          ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ (2 * n)) /
        (∫ x in (0 : ℝ)..π / 2, cos x ^ (2 * n) : ℝ)

Complex.sin (↑π * z) =
  ((↑π * z * ∏ j ∈ Finset.range n, (1 - z ^ 2 / (↑j + 1) ^ 2)) *
      ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(Real.cos x) ^ (2 * n)) /
    ↑(∫ (x : ℝ) in 0 ..π / 2, Real.cos x ^ (2 * n))


@[simp]
theorem dom_prodLift (f : α →. β) (g : α →. γ) :
    (f.prodLift g).Dom = { x | (f x).Dom ∧ (g x).Dom }

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

(f.prodLift g).Dom = {x | (f x).Dom ∧ (g x).Dom}


theorem FiniteAtFilter.exists_mem_basis {f : Filter α} (hμ : FiniteAtFilter μ f) {p : ι → Prop}
    {s : ι → Set α} (hf : f.HasBasis p s) : ∃ i, p i ∧ μ (s i) < ∞

{α : Type u_1}
{ι : Type u_4}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : Filter α}
(hμ : μ.FiniteAtFilter f)
{p : ι → Prop}
{s : ι → Set α}
(hf : f.HasBasis p s)


@[to_additive]
theorem is_mul_left_invariant_outerMeasure [Group G] [TopologicalGroup G]
    (h : ∀ (g : G) {K : Compacts G}, μ (K.map _ <| continuous_mul_left g) = μ K) (g : G)
    (A : Set G) : μ.outerMeasure ((g * ·) ⁻¹' A) = μ.outerMeasure A

(h :
  ∀ (g : G) {K : TopologicalSpace.Compacts G},
    (fun s => ↑(μ.toFun s)) (TopologicalSpace.Compacts.map (fun b => g * b) ⋯ K) = (fun s => ↑(μ.toFun s)) K)

μ.outerMeasure ((fun x => g * x) ⁻¹' A) = μ.outerMeasure A


theorem fderivWithin_inv (x_ne_zero : x ≠ 0) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (fun x => x⁻¹) s x = smulRight (1 : 𝕜 →L[𝕜] 𝕜) (-(x ^ 2)⁻¹)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
(x_ne_zero : x ≠ 0)
(hxs : UniqueDiffWithinAt 𝕜 s x)

fderivWithin 𝕜 (fun x => x⁻¹) s x = ContinuousLinearMap.smulRight 1 (-(x ^ 2)⁻¹)


@[simp]
theorem sups_subset_iff : s ⊻ t ⊆ u ↔ ∀ a ∈ s, ∀ b ∈ t, a ⊔ b ∈ u

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


@[simp] lemma append_cast_left {n m} {α : Type*} (xs : Fin n → α) (ys : Fin m → α) (n' : ℕ)
    (h : n' = n) :
    Fin.append (xs ∘ Fin.cast h) ys = Fin.append xs ys ∘ (Fin.cast <| by rw [h])

{n m : ℕ}
{α : Type u_1}
(xs : Fin n → α)
(ys : Fin m → α)
(n' : ℕ)
(h : n' = n)

Fin.append (xs ∘ Fin.cast h) ys = Fin.append xs ys ∘ Fin.cast ⋯


@[to_additive]
theorem coe_liftRight (f : M →* N) (hf : ∀ x, IsUnit (f x)) (x) :
    (IsUnit.liftRight f hf x : N) = f x

{M : Type u_4}
{N : Type u_5}
[Monoid M]
[Monoid N]
(f : M →* N)
(hf : ∀ (x : M), IsUnit (f x))
(x : M)


theorem chineseRemainder_lt_mul (co : n.Coprime m) (a b : ℕ) (hn : n ≠ 0) (hm : m ≠ 0) :
    ↑(chineseRemainder co a b) < n * m

{m n : ℕ}
(co : n.Coprime m)
(a b : ℕ)
(hn : n ≠ 0)
(hm : m ≠ 0)


theorem martingalePart_add_predictablePart (ℱ : Filtration ℕ m0) (μ : Measure Ω) (f : ℕ → Ω → E) :
    martingalePart f ℱ μ + predictablePart f ℱ μ = f

{Ω : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace Ω}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
(ℱ : MeasureTheory.Filtration ℕ m0)
(μ : MeasureTheory.Measure Ω)
(f : ℕ → Ω → E)

MeasureTheory.martingalePart f ℱ μ + MeasureTheory.predictablePart f ℱ μ = f


lemma conj_eq (h : p.IsConjExponent q) : q = p / (p - 1)


@[to_additive]
theorem inv_def (μ : Measure G) : μ.inv = Measure.map inv μ

{G : Type u_2}
[MeasurableSpace G]
[Inv G]
(μ : MeasureTheory.Measure G)

μ.inv = MeasureTheory.Measure.map Inv.inv μ


theorem isBounded_def {s : Set α} : IsBounded s ↔ sᶜ ∈ cobounded α

∀ {x : Bornology α} {s : Set α}, Bornology.IsBounded s ↔ sᶜ ∈ Bornology.cobounded α


@[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}
[AddCommMonoid M]
(f : α → M)

(List.map f l).sum = ∑ m ∈ l.toFinset, List.count m l • f m


@[simp]
theorem mem_range {f : R →ₙ+* S} {y : S} : y ∈ f.range ↔ ∃ x, f x = y

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
{f : R →ₙ+* S}
{y : S}


theorem divides_sq_eq_zero_z {x y : ℤ} (h : x * x = d * y * y) : x = 0 ∧ y = 0

{d : ℕ}
[dnsq : Zsqrtd.Nonsquare d]
{x y : ℤ}
(h : x * x = ↑d * y * y)


theorem IsPrimitiveRoot.arg_eq_zero_iff {n : ℕ} {ζ : ℂ} (hζ : IsPrimitiveRoot ζ n) (hn : n ≠ 0) :
    ζ.arg = 0 ↔ ζ = 1


@[deprecated getElem_splitWrtComposition (since := "2024-06-12")]
theorem get_splitWrtComposition (l : List α) (c : Composition n)
    (i : Fin (l.splitWrtComposition c).length) :
    get (l.splitWrtComposition c) i = (l.take (c.sizeUpTo (i + 1))).drop (c.sizeUpTo i)

(l.splitWrtComposition c).get i = List.drop (c.sizeUpTo ↑i) (List.take (c.sizeUpTo (↑i + 1)) l)


/-- Strengthening of `IsLocalization.exist_integer_multiples`:
Let `J ≠ ⊤` be an ideal in a Dedekind domain `A`, and `f ≠ 0` a finite collection
of elements of `K = Frac(A)`, then we can multiply the elements of `f` by some `a : K`
to find a collection of elements of `A` that is not completely contained in `J`. -/
theorem Ideal.exist_integer_multiples_not_mem {J : Ideal A} (hJ : J ≠ ⊤) {ι : Type*} (s : Finset ι)
    (f : ι → K) {j} (hjs : j ∈ s) (hjf : f j ≠ 0) :
    ∃ a : K,
      (∀ i ∈ s, IsLocalization.IsInteger A (a * f i)) ∧
        ∃ i ∈ s, a * f i ∉ (J : FractionalIdeal A⁰ K)

{A : Type u_2}
{K : Type u_3}
[CommRing A]
[Field K]
[IsDedekindDomain A]
[Algebra A K]
[IsFractionRing A K]
{J : Ideal A}
(hJ : J ≠ ⊤)
{ι : Type u_4}
(s : Finset ι)
(f : ι → K)
{j : ι}
(hjs : j ∈ s)
(hjf : f j ≠ 0)

∃ a, (∀ i ∈ s, IsLocalization.IsInteger A (a * f i)) ∧ ∃ i ∈ s, a * f i ∉ ↑J


theorem BilinForm.toMatrix_comp (B : BilinForm R₂ M₂) (l r : M₂' →ₗ[R₂] M₂) :
    BilinForm.toMatrix c (B.comp l r) =
      (LinearMap.toMatrix c b l)ᵀ * BilinForm.toMatrix b B * LinearMap.toMatrix c b r

{R₂ : Type u_5}
{M₂ : Type u_6}
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{n : Type u_11}
{o : Type u_12}
[Fintype n]
[Fintype o]
[DecidableEq n]
(b : Basis n R₂ M₂)
{M₂' : Type u_13}
[AddCommMonoid M₂']
[Module R₂ M₂']
(c : Basis o R₂ M₂')
[DecidableEq o]
(B : LinearMap.BilinForm R₂ M₂)
(l r : M₂' →ₗ[R₂] M₂)

(BilinForm.toMatrix c) (B.comp l r) =
  ((LinearMap.toMatrix c b) l).transpose * (BilinForm.toMatrix b) B * (LinearMap.toMatrix c b) r


theorem KaehlerDifferential.one_smul_sub_smul_one_mem_ideal (a : S) :
    (1 : S) ⊗ₜ[R] a - a ⊗ₜ[R] (1 : S) ∈ KaehlerDifferential.ideal R S

(R : Type u)
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(a : S)

1 ⊗ₜ[R] a - a ⊗ₜ[R] 1 ∈ KaehlerDifferential.ideal R S


@[to_additive] lemma AntivaryOn.mul_left (h₁ : AntivaryOn f₁ g s) (h₂ : AntivaryOn f₂ g s) :
    AntivaryOn (f₁ * f₂) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[OrderedCommGroup β]
{s : Set ι}
{f₁ f₂ : ι → α}
{g : ι → β}
(h₁ : AntivaryOn f₁ g s)
(h₂ : AntivaryOn f₂ g s)


/-- A Boolean algebra is a bounded distributive lattice with a complement operator `ᶜ` such that
`x ⊓ xᶜ = ⊥` and `x ⊔ xᶜ = ⊤`. For convenience, it must also provide a set difference operation `\`
and a Heyting implication `⇨` satisfying `x \ y = x ⊓ yᶜ` and `x ⇨ y = y ⊔ xᶜ`.

This is a generalization of (classical) logic of propositions, or the powerset lattice.

Since `BoundedOrder`, `OrderBot`, and `OrderTop` are mixins that require `LE`
to be present at define-time, the `extends` mechanism does not work with them.
Instead, we extend using the underlying `Bot` and `Top` data typeclasses, and replicate the
order axioms of those classes here. A "forgetful" instance back to `BoundedOrder` is provided.
-/
class BooleanAlgebra (α : Type u) extends
    DistribLattice α, HasCompl α, SDiff α, HImp α, Top α, Bot α where
  /-- The infimum of `x` and `xᶜ` is at most `⊥` -/
  inf_compl_le_bot : ∀ x : α, x ⊓ xᶜ ≤ ⊥
  /-- The supremum of `x` and `xᶜ` is at least `⊤` -/
  top_le_sup_compl : ∀ x : α, ⊤ ≤ x ⊔ xᶜ
  /-- `⊤` is the greatest element -/
  le_top : ∀ a : α, a ≤ ⊤
  /-- `⊥` is the least element -/
  bot_le : ∀ a : α, ⊥ ≤ a
  /-- `x \ y` is equal to `x ⊓ yᶜ` -/
  sdiff := fun x y => x ⊓ yᶜ
  /-- `x ⇨ y` is equal to `y ⊔ xᶜ` -/
  himp := fun x y => y ⊔ xᶜ
  /-- `x \ y` is equal to `x ⊓ yᶜ` -/
  sdiff_eq : ∀ x y : α, x \ y = x ⊓ yᶜ := by aesop
  /-- `x ⇨ y` is equal to `y ⊔ xᶜ` -/
  himp_eq : ∀ x y : α, x ⇨ y = y ⊔ xᶜ := by aesop

{α : Type u}
[self : BooleanAlgebra α]
(x y : α)


theorem comp_le_of_monotoneOn (f : α → E) {s : Set α} {t : Set β} (φ : β → α) (hφ : MonotoneOn φ t)
    (φst : MapsTo φ t s) : eVariationOn (f ∘ φ) t ≤ eVariationOn f s

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{β : Type u_3}
[LinearOrder β]
(f : α → E)
{s : Set α}
{t : Set β}
(φ : β → α)
(hφ : MonotoneOn φ t)
(φst : Set.MapsTo φ t s)


theorem mk_mem_sym2_iff {m : Multiset α} {a b : α} :
    s(a, b) ∈ m.sym2 ↔ a ∈ m ∧ b ∈ m

{α : Type u_1}
{m : Multiset α}
{a b : α}


@[simp]
theorem inter_empty (a : Set α) : a ∩ ∅ = ∅


/-- If `R` is a monoid, an element in `Rˣ` is regular. -/
@[to_additive "If `R` is an additive monoid, an element in `add_units R` is add-regular."]
theorem Units.isRegular (a : Rˣ) : IsRegular (a : R)

{R : Type u_1}
[AddMonoid R]
(a : AddUnits R)


@[simp]
theorem toPiFork_π_app_one : K.toPiFork.π.app WalkingParallelPair.one = Pi.lift K.ι ≫ I.fstPiMap

{I : CategoryTheory.Limits.MulticospanIndex C}

K.toPiFork.π.app CategoryTheory.Limits.WalkingParallelPair.one =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Pi.lift K.ι) I.fstPiMap


/-- A countably generated filter admits a basis formed by an antitone sequence of sets. -/
theorem exists_antitone_basis (f : Filter α) [f.IsCountablyGenerated] :
    ∃ x : ℕ → Set α, f.HasAntitoneBasis x

{α : Type u_1}
(f : Filter α)
[f.IsCountablyGenerated]


@[simp]
theorem prod_cons {i} (g : G i) (w : NormalWord d) (hmw : w.fstIdx ≠ some i)
    (hgr : g ∉ (φ i).range) : (cons g w hmw hgr).prod = of i g * w.prod

{d : Monoid.PushoutI.NormalWord.Transversal φ}

(Monoid.PushoutI.NormalWord.cons g w hmw hgr).prod = (Monoid.PushoutI.of i) g * w.prod


theorem symm_apply_apply {x : TotalSpace F E} (hx : x ∈ e'.source) :
    e'.toPartialHomeomorph.symm (e' x) = x

[TopologicalSpace (Bundle.TotalSpace F E)]

(e' : Trivialization F Bundle.TotalSpace.proj)


theorem isCoprime_comm : IsCoprime x y ↔ IsCoprime y x


/-- A relation on morphisms is compatible with the shift by a monoid `A` when the
relation if preserved by the shift. -/
class IsCompatibleWithShift : Prop :=
  /-- the condition that the relation is preserved by the shift -/
  condition : ∀ (a : A) ⦃X Y : C⦄ (f g : X ⟶ Y), r f g → r (f⟦a⟧') (g⟦a⟧')

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{r : HomRel C}
{A : Type w}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[self : r.IsCompatibleWithShift A]
(a : A)
⦃X Y : C⦄
(f g : X ⟶ Y)

r f g → r ((CategoryTheory.shiftFunctor C a).map f) ((CategoryTheory.shiftFunctor C a).map g)


@[simp]
theorem coe_ne_top (a : ℕ) : (a : ℕ∞) ≠ ⊤


@[simp]
theorem top_orthogonal_eq_bot : (⊤ : Submodule 𝕜 E)ᗮ = ⊥

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


theorem coeff_sum [Semiring S] (n : ℕ) (f : ℕ → R → S[X]) :
    coeff (p.sum f) n = p.sum fun a b => coeff (f a b) n

{R : Type u}
{S : Type v}
[Semiring R]
{p : R[X]}
[Semiring S]
(n : ℕ)
(f : ℕ → R → S[X])

(p.sum f).coeff n = p.sum fun a b => (f a b).coeff n


@[simp]
theorem comp_id (f : CentroidHom α) : f.comp (CentroidHom.id α) = f

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(f : CentroidHom α)


theorem mem_filter : x ∈ filter p as ↔ x ∈ as ∧ p x

∀ {α : Type u_1} {x : α} {p : α → Bool} {as : List α}, x ∈ List.filter p as ↔ x ∈ as ∧ p x = true


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


@[simp]
theorem card_ring : card Language.ring = 5


theorem homEquiv_naturality_right_square_iff (f : X' ⟶ X) (g : X ⟶ G.obj Y')
    (h : X' ⟶ G.obj Y) (k : Y ⟶ Y') :
    (F.map f ≫ (adj.homEquiv X Y').symm g = (adj.homEquiv X' Y).symm h ≫ k) ↔
      (f ≫ g = h ≫ G.map k)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(adj : F ⊣ G)
{X' X : C}
{Y Y' : D}
(f : X' ⟶ X)
(g : X ⟶ G.obj Y')
(h : X' ⟶ G.obj Y)
(k : Y ⟶ Y')

CategoryTheory.CategoryStruct.comp (F.map f) ((adj.homEquiv X Y').symm g) =
    CategoryTheory.CategoryStruct.comp ((adj.homEquiv X' Y).symm h) k ↔
  CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp h (G.map k)


@[to_additive (attr := simp)]
theorem coe_comp (f : β →*o γ) (g : α →*o β) : (f.comp g : α → γ) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[MulOneClass α]
[MulOneClass β]
[MulOneClass γ]
(f : β →*o γ)
(g : α →*o β)


@[simp]
theorem liftNatTrans_app (F₁ F₂ : C ⥤ E) (F₁' F₂' : D ⥤ E) [Lifting L W F₁ F₁'] [Lifting L W F₂ F₂']
    (τ : F₁ ⟶ F₂) (X : C) :
    (liftNatTrans L W F₁ F₂ F₁' F₂' τ).app (L.obj X) =
      (Lifting.iso L W F₁ F₁').hom.app X ≫ τ.app X ≫ (Lifting.iso L W F₂ F₂').inv.app X

[CategoryTheory.Localization.Lifting L W F₁ F₁']

[CategoryTheory.Localization.Lifting L W F₂ F₂']

(CategoryTheory.Localization.liftNatTrans L W F₁ F₂ F₁' F₂' τ).app (L.obj X) =
  CategoryTheory.CategoryStruct.comp ((CategoryTheory.Localization.Lifting.iso L W F₁ F₁').hom.app X)
    (CategoryTheory.CategoryStruct.comp (τ.app X) ((CategoryTheory.Localization.Lifting.iso L W F₂ F₂').inv.app X))


lemma isIso_rightHomologyι (hg : S.g = 0) : IsIso S.rightHomologyι


/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p • z ∈ adjoin R {B.gen}`, then
`z ∈ adjoin R {B.gen}`. -/
theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
    (hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} (hzint : IsIntegral R z)
    (hz : p • z ∈ adjoin R ({B.gen} : Set L)) (hei : (minpoly R B.gen).IsEisensteinAt 𝓟) :
    z ∈ adjoin R ({B.gen} : Set L)

(hei : (minpoly R B.gen).IsEisensteinAt (Submodule.span R {p}))


theorem mapDomain_sum {k' G' : Type*} [Semiring k'] {f : G → G'} {s : MonoidAlgebra k' G}
    {v : G → k' → MonoidAlgebra k G} :
    mapDomain f (s.sum v) = s.sum fun a b => mapDomain f (v a b)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
{k' : Type u_3}
{G' : Type u_4}
[Semiring k']
{f : G → G'}
{s : MonoidAlgebra k' G}
{v : G → k' → MonoidAlgebra k G}

MonoidAlgebra.mapDomain f (Finsupp.sum s v) = Finsupp.sum s fun a b => MonoidAlgebra.mapDomain f (v a b)


theorem periodic_expMapCircle : Periodic expMapCircle (2 * π)

Function.Periodic (⇑expMapCircle) (2 * π)


theorem surj₂ : ∀ z w : S, ∃ z' w' : R, ∃ d : M,
    (z * algebraMap R S d = algebraMap R S z') ∧ (w * algebraMap R S d = algebraMap R S w')

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

∃ z' w' d, z * (algebraMap R S) ↑d = (algebraMap R S) z' ∧ w * (algebraMap R S) ↑d = (algebraMap R S) w'


theorem hausdorffMeasure_image (hf : Isometry f) (hd : 0 ≤ d ∨ Surjective f) (s : Set X) :
    μH[d] (f '' s) = μH[d] s

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
[MeasurableSpace X]
[BorelSpace X]
[MeasurableSpace Y]
[BorelSpace Y]
{f : X → Y}
{d : ℝ}
(hf : Isometry f)
(hd : 0 ≤ d ∨ Function.Surjective f)
(s : Set X)


/-- If `μ` is a measure finite at filter `l` and `f` is a function such that its norm is bounded
above at `l`, then `f` is integrable at `l`. -/
theorem Measure.FiniteAtFilter.integrableAtFilter {l : Filter α} [IsMeasurablyGenerated l]
    (hfm : StronglyMeasurableAtFilter f l μ) (hμ : μ.FiniteAtFilter l)
    (hf : l.IsBoundedUnder (· ≤ ·) (norm ∘ f)) : IntegrableAtFilter f l μ

(hf : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f))


theorem isSemisimple_of_squarefree_aeval_eq_zero {p : K[X]}
    (hp : Squarefree p) (hpf : aeval f p = 0) : f.IsSemisimple

{M : Type u_2}
[AddCommGroup M]
{K : Type u_3}
[Field K]
[Module K M]
{f : Module.End K M}
{p : K[X]}
(hp : Squarefree p)
(hpf : (Polynomial.aeval f) p = 0)


theorem Coprime.factor_eq_gcd_left_right {a b m n : ℕ+} (cop : m.Coprime n) (am : a ∣ m)
    (bn : b ∣ n) : a = m.gcd (a * b)


@[simp]
theorem comap_comp {f : β → α} {g : γ → β} : (m.comap f).comap g = m.comap (f ∘ g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{m : MeasurableSpace α}
{f : β → α}
{g : γ → β}

MeasurableSpace.comap g (MeasurableSpace.comap f m) = MeasurableSpace.comap (f ∘ g) m


@[simp]
lemma toNNReal_neg_smul (r : ℝ≥0) (f : C(X, ℝ)₀) : (-(r • f)).toNNReal = r • (-f).toNNReal

{X : Type u_1}
[TopologicalSpace X]
[Zero X]
(r : NNReal)
(f : ContinuousMapZero X ℝ)


@[simp]
theorem preimage_setOf_eq {p : α → Prop} {f : β → α} : f ⁻¹' { a | p a } = { a | p (f a) }

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


protected theorem Infinite.nonempty {s : Set α} (h : s.Infinite) : s.Nonempty

{α : Type u}
{s : Set α}
(h : s.Infinite)


/-- Suppose `α` is a nonempty dense linear order without endpoints, and
    suppose `lo`, `hi`, are finite subsets with all of `lo` strictly
    before `hi`. Then there is an element of `α` strictly between `lo`
    and `hi`. -/
theorem exists_between_finsets {α : Type*} [LinearOrder α] [DenselyOrdered α] [NoMinOrder α]
    [NoMaxOrder α] [nonem : Nonempty α] (lo hi : Finset α) (lo_lt_hi : ∀ x ∈ lo, ∀ y ∈ hi, x < y) :
    ∃ m : α, (∀ x ∈ lo, x < m) ∧ ∀ y ∈ hi, m < y

{α : Type u_1}
[LinearOrder α]
[DenselyOrdered α]
[NoMinOrder α]
[NoMaxOrder α]
[nonem : Nonempty α]
(lo hi : Finset α)
(lo_lt_hi : ∀ x ∈ lo, ∀ y ∈ hi, x < y)

∃ m, (∀ x ∈ lo, x < m) ∧ ∀ y ∈ hi, m < y


theorem IsLeftRegular.isSMulRegular [Mul R] {c : R} (h : IsLeftRegular c) : IsSMulRegular R c

{R : Type u_1}
[Mul R]
{c : R}
(h : IsLeftRegular c)


@[to_additive]
theorem comap_equiv_eq_map_symm' (f : N ≃* G) (K : Subgroup G) :
    K.comap f.toMonoidHom = K.map f.symm.toMonoidHom

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : N ≃+ G)
(K : AddSubgroup G)

AddSubgroup.comap f.toAddMonoidHom K = AddSubgroup.map f.symm.toAddMonoidHom K


lemma extend_d_from_eq_zero (i' j' : ι') (i : ι) (hi : e.f i = i') (hi' : ¬ c.Rel i (c.next i)) :
    (K.extend e).d i' j' = 0


/-- The `p`-adic norm respects the triangle inequality: the norm of `p + q` is at most the norm of
`p` plus the norm of `q`. -/
theorem triangle_ineq (q r : ℚ) : padicNorm p (q + r) ≤ padicNorm p q + padicNorm p r

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(q r : ℚ)


@[simp]
theorem sep_union : { x | (x ∈ s ∨ x ∈ t) ∧ p x } = { x ∈ s | p x } ∪ { x ∈ t | p x }

{α : Type u}
{s t : Set α}
{p : α → Prop}

{x | (x ∈ s ∨ x ∈ t) ∧ p x} = {x | x ∈ s ∧ p x} ∪ {x | x ∈ t ∧ p x}


theorem weightedHomogeneousComponent_directSum [DecidableEq M]
    (x : DirectSum M fun i : M => ↥(weightedHomogeneousSubmodule R w i)) (m : M) :
    (weightedHomogeneousComponent w m)
      ((DirectSum.coeLinearMap fun i : M => weightedHomogeneousSubmodule R w i) x) = x m

(x : DirectSum M fun i => ↥(MvPolynomial.weightedHomogeneousSubmodule R w i))

(MvPolynomial.weightedHomogeneousComponent w m)
    ((DirectSum.coeLinearMap fun i => MvPolynomial.weightedHomogeneousSubmodule R w i) x) =
  ↑(x m)


lemma latticeClosure_mono : Monotone (latticeClosure : Set α → Set α)


@[simp]
theorem sup_compl_eq_top : x ⊔ xᶜ = ⊤


theorem extend_iUnion {β} [Countable β] {f : β → Set α} (hd : Pairwise (Disjoint on f))
    (hm : ∀ i, P (f i)) : extend m (⋃ i, f i) = ∑' i, extend m (f i)

(PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i))

(mU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯)

MeasureTheory.extend m (⋃ i, f i) = ∑' (i : β), MeasureTheory.extend m (f i)


theorem Ioc_subset_Icc_self : Ioc a b ⊆ Icc a b

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


theorem span_singleton_mul_span_singleton (r s : R) :
    span {r} * span {s} = (span {r * s} : Ideal R)

Ideal.span {r} * Ideal.span {s} = Ideal.span {r * s}


@[simp]
theorem cancel_unit_right_assoc {W X X' Y : C} (f : W ⟶ X) (g : X ⟶ Y) (f' : W ⟶ X') (g' : X' ⟶ Y) :
    f ≫ g ≫ e.unit.app Y = f' ≫ g' ≫ e.unit.app Y ↔ f ≫ g = f' ≫ g'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)
{W X X' Y : C}
(f : W ⟶ X)
(g : X ⟶ Y)
(f' : W ⟶ X')
(g' : X' ⟶ Y)

CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp g (e.unit.app Y)) =
    CategoryTheory.CategoryStruct.comp f' (CategoryTheory.CategoryStruct.comp g' (e.unit.app Y)) ↔
  CategoryTheory.CategoryStruct.comp f g = CategoryTheory.CategoryStruct.comp f' g'


@[simp]
theorem const_succ {n} (p : Fin (n + 1) → Type u) {τ : Type u} (t : τ) :
    const p t = fun _ => const (vecTail p) t

{n : ℕ}
(p : Fin (n + 1) → Type u)
{τ : Type u}
(t : τ)

Function.FromTypes.const p t = fun x => Function.FromTypes.const (Matrix.vecTail p) t


@[simp] theorem map_iInf [InfSet α] [InfSet β] [sInfHomClass F α β] (f : F) (g : ι → α) :
    f (⨅ i, g i) = ⨅ i, f (g i)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
{ι : Sort u_6}
[FunLike F α β]
[InfSet α]
[InfSet β]
[sInfHomClass F α β]
(f : F)
(g : ι → α)


/-- The anti-equivalence between simplicial objects and cosimplicial objects. -/
@[simps!]
def simplicialCosimplicialEquiv : (SimplicialObject C)ᵒᵖ ≌ CosimplicialObject Cᵒᵖ

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(F : SimplexCategory ⥤ Cᵒᵖ)

(CategoryTheory.simplicialCosimplicialEquiv C).inverse.obj F = Opposite.op F.leftOp


theorem subsingleton_congr (e : α ≃ β) : Subsingleton α ↔ Subsingleton β


theorem centerAndRescale_center : a.centerAndRescale.c (last N) = 0

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{N : ℕ}
{τ : ℝ}
(a : Besicovitch.SatelliteConfig E N τ)


/-- Giving a hom between two families of generators is equivalent to
giving an algebra homomorphism between the polynomial rings. -/
@[simps]
noncomputable
def Hom.equivAlgHom :
    Hom P P' ≃ { f : P.Ring →ₐ[R] P'.Ring //
      ∀ x, aeval P'.val (f x) = algebraMap S S' (aeval P.val x) }

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

↑(Algebra.Generators.Hom.equivAlgHom f) = f.toAlgHom


theorem map_inf_eq_map_inf_comap [RingHomSurjective σ₁₂] {f : F} {p : Submodule R M}
    {p' : Submodule R₂ M₂} : map f p ⊓ p' = map f (p ⊓ comap f 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₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
{f : F}
{p : Submodule R M}
{p' : Submodule R₂ M₂}

Submodule.map f p ⊓ p' = Submodule.map f (p ⊓ Submodule.comap f p')


theorem trop_monotone [Preorder R] : Monotone (trop : R → Tropical R)


@[simp]
theorem Finset.univ_map_embedding {α : Type*} [Fintype α] (e : α ↪ α) : univ.map e = univ


theorem lim_re (f : CauSeq ℂ Complex.abs) : lim (cauSeqRe f) = (lim f).re


@[simp, norm_cast] theorem ncard_coe_Finset (s : Finset α) : (s : Set α).ncard = s.card


theorem distortion_biUnion (π : Prepartition I) (πi : ∀ J, Prepartition J) :
    (π.biUnion πi).distortion = π.boxes.sup fun J => (πi J).distortion

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


@[simp] lemma ofNat_injective : Function.Injective ofNat


theorem iInf_le_succ' (u : ℕ → α) (n : ℕ) : ⨅ k ≤ n + 1, u k = u 0 ⊓ ⨅ k ≤ n, u (k + 1)

{α : Type u_1}
[CompleteLattice α]
(u : ℕ → α)
(n : ℕ)


@[to_additive (attr := simp)]
theorem mk_coe (f : α →*o β) (h) : OrderMonoidHom.mk (f : α →* β) h = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]
(f : α →+o β)
(h : Monotone (↑↑f).toFun)

{ toAddMonoidHom := ↑f, monotone' := h } = f


@[simp]
theorem toWithTop_natCast' (n : ℕ) {_ : Decidable (n : PartENat).Dom} :
    toWithTop (n : PartENat) = n

∀ {x : Decidable (↑n).Dom}, (↑n).toWithTop = ↑n


theorem subNatNat_add_negSucc (m n k : Nat) :
    subNatNat m n + -[k+1] = subNatNat m (n + succ k)

Int.subNatNat m n + Int.negSucc k = Int.subNatNat m (n + k.succ)


@[simp]
theorem toDual_le_toDual_iff {a b : WithBot α} : WithBot.toDual a ≤ WithBot.toDual b ↔ b ≤ a


lemma nnnorm_def (x : ULift E) : ‖x‖₊ = ‖x.down‖₊

{E : Type u_2}
[NNNorm E]
(x : ULift.{u_5, u_2} E)


/-- The set of natural number powers of an element of a monoid is closed under multiplication. -/
@[to_additive
      "The set of natural number multiples of an element of an `AddMonoid` is closed under
      addition."]
theorem powers.mul_mem {x y z : M} : y ∈ powers x → z ∈ powers x → y * z ∈ powers x


@[simp]
theorem Iso.inv_hom (f : X ≅ Y) : inv f.hom = f.inv

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


lemma fst_map_prod (κ : Kernel α β) {f : β → γ} {g : β → δ}
    (hf : Measurable f) (hg : Measurable g) :
    fst (map κ (fun x ↦ (f x, g x)) (hf.prod_mk hg)) = map κ f hf

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{δ : Type u_4}
{mδ : MeasurableSpace δ}
{γ : Type u_5}
{mγ : MeasurableSpace γ}
(κ : ProbabilityTheory.Kernel α β)
{f : β → γ}
{g : β → δ}
(hf : Measurable f)
(hg : Measurable g)

(κ.map (fun x => (f x, g x)) ⋯).fst = κ.map f hf


/-- A traversable functor is lawful if its `traverse` satisfies a
number of additional properties.  It must send `pure : α → Id α` to `pure`,
send the composition of applicative functors to the composition of the
`traverse` of each, send each function `f` to `fun x ↦ f <$> x`, and
satisfy a naturality condition with respect to applicative
transformations. -/
class LawfulTraversable (t : Type u → Type u) [Traversable t] extends LawfulFunctor t :
    Prop where
  /-- `traverse` plays well with `pure` of the identity monad-/
  id_traverse : ∀ {α} (x : t α), traverse (pure : α → Id α) x = x
  /-- `traverse` plays well with composition of applicative functors. -/
  comp_traverse :
    ∀ {F G} [Applicative F] [Applicative G] [LawfulApplicative F] [LawfulApplicative G] {α β γ}
      (f : β → F γ) (g : α → G β) (x : t α),
      traverse (Functor.Comp.mk ∘ map f ∘ g) x = Comp.mk (map (traverse f) (traverse g x))
  /-- An axiom for `traverse` involving `pure : β → Id β`. -/
  traverse_eq_map_id : ∀ {α β} (f : α → β) (x : t α),
    traverse ((pure : β → Id β) ∘ f) x = id.mk (f <$> x)
  /-- The naturality axiom explaining how lawful traversable functors should play with
  lawful applicative functors. -/
  naturality :
    ∀ {F G} [Applicative F] [Applicative G] [LawfulApplicative F] [LawfulApplicative G]
      (η : ApplicativeTransformation F G) {α β} (f : α → F β) (x : t α),
      η (traverse f x) = traverse (@η _ ∘ f) x

{t : Type u → Type u}
[Traversable t]
[self : LawfulTraversable t]
{α β : Type u}
(f : α → β)
(x : t α)


@[simp] lemma isClosed_closure (x : α) : c.IsClosed (c x)

{α : Type u_1}
[PartialOrder α]
(c : ClosureOperator α)
(x : α)


theorem Biproduct.column_nonzero_of_iso' {σ τ : Type} [Finite τ] {S : σ → C} [HasBiproduct S]
    {T : τ → C} [HasBiproduct T] (s : σ) (f : ⨁ S ⟶ ⨁ T) [IsIso f] :
    (∀ t : τ, biproduct.ι S s ≫ f ≫ biproduct.π T t = 0) → 𝟙 (S s) = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{σ τ : Type}
[Finite τ]
{S : σ → C}
[CategoryTheory.Limits.HasBiproduct S]
{T : τ → C}
[CategoryTheory.Limits.HasBiproduct T]
(s : σ)
(f : ⨁ S ⟶ ⨁ T)
[CategoryTheory.IsIso f]

(∀ (t : τ), CategoryTheory.Limits.biproduct.ι S s ≫ f ≫ CategoryTheory.Limits.biproduct.π T t = 0) → 𝟙 (S s) = 0


/-- The top subsemigroup is isomorphic to the semigroup. -/
@[to_additive (attr := simps)
  "The top additive subsemigroup is isomorphic to the additive semigroup."]
def topEquiv : (⊤ : Subsemigroup M) ≃* M


lemma exists_of_closure_ssubset (hXY : M.closure X ⊂ M.closure Y) : ∃ e ∈ Y, e ∉ M.closure X

{α : Type u_2}
{M : Matroid α}
{X Y : Set α}
(hXY : M.closure X ⊂ M.closure Y)


/-- See `intervalIntegrable_rpow'` for a version with a weaker hypothesis on `r`, but assuming the
measure is volume. -/
theorem intervalIntegrable_rpow {r : ℝ} (h : 0 ≤ r ∨ (0 : ℝ) ∉ [[a, b]]) :
    IntervalIntegrable (fun x => x ^ r) μ a b


lemma eLpNorm_nnreal_pow_eq_lintegral {f : α → F} {p : ℝ≥0} (hp : p ≠ 0) :
    eLpNorm f p μ ^ (p : ℝ) = ∫⁻ x, ‖f x‖₊ ^ (p : ℝ) ∂μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}
{p : ℝ≥0}
(hp : p ≠ 0)

MeasureTheory.eLpNorm f (↑p) μ ^ ↑p = ∫⁻ (x : α), ↑‖f x‖₊ ^ ↑p ∂μ


/-- The additive version of `finsupp.toFinsupp`. Note that this is `noncomputable` because
`Finsupp.add` is noncomputable. -/
@[simps (config := .asFn)]
def finsuppAddEquivDFinsupp [DecidableEq ι] [AddZeroClass M] [∀ m : M, Decidable (m ≠ 0)] :
    (ι →₀ M) ≃+ Π₀ _ : ι, M

{ι : Type u_1}
{M : Type u_3}
[DecidableEq ι]
[AddZeroClass M]
[(m : M) → Decidable (m ≠ 0)]


/-- Equivalences of `LiftStruct` for a square and the corresponding square
in the opposite category. -/
@[simps]
def opEquiv (sq : CommSq f i p g) : LiftStruct sq ≃ LiftStruct sq.op

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{A B X Y : C}
{f : A ⟶ X}
{i : A ⟶ B}
{p : X ⟶ Y}
{g : B ⟶ Y}
(sq : CategoryTheory.CommSq f i p g)
(l : ⋯.LiftStruct)

(CategoryTheory.CommSq.LiftStruct.opEquiv sq).symm l = l.unop


theorem extChartAt_self_eq {x : H} : ⇑(extChartAt I x) = I

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


@[simp]
theorem neg_mem_iff : -x ∈ p ↔ x ∈ p

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : SubMulAction R M)
{x : M}


theorem isPreconnected_connectedComponentIn {x : α} {F : Set α} :
    IsPreconnected (connectedComponentIn F x)

{α : Type u}
[TopologicalSpace α]
{x : α}
{F : Set α}


/-- Reflecting a point in two subspaces produces the same result if
and only if the point has the same orthogonal projection in each of
those subspaces. -/
theorem reflection_eq_iff_orthogonalProjection_eq (s₁ s₂ : AffineSubspace ℝ P) [Nonempty s₁]
    [Nonempty s₂] [HasOrthogonalProjection s₁.direction] [HasOrthogonalProjection s₂.direction]
    (p : P) :
    reflection s₁ p = reflection s₂ p ↔
      (orthogonalProjection s₁ p : P) = orthogonalProjection s₂ p

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s₁ s₂ : AffineSubspace ℝ P)
[Nonempty ↥s₁]
[Nonempty ↥s₂]
[HasOrthogonalProjection s₁.direction]
[HasOrthogonalProjection s₂.direction]
(p : P)

(EuclideanGeometry.reflection s₁) p = (EuclideanGeometry.reflection s₂) p ↔
  ↑((EuclideanGeometry.orthogonalProjection s₁) p) = ↑((EuclideanGeometry.orthogonalProjection s₂) p)


/-- In a monoid with zero, zero equals one if and only if all elements of that semiring
are equal. -/
theorem subsingleton_iff_zero_eq_one : (0 : M₀) = 1 ↔ Subsingleton M₀


@[to_additive]
theorem multipliable_empty [IsEmpty β] : Multipliable f

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
[IsEmpty β]


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

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

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


theorem countP_apply (l : FreeAddMonoid α) : countP p l = Multiplicative.ofAdd (List.countP p l)

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

(FreeMonoid.countP p) l = Multiplicative.ofAdd (List.countP (fun b => decide (p b)) l)


@[simp]
theorem isCoatom_map (f : G ≃* H) {K : Subgroup G} :
    IsCoatom (Subgroup.map (f : G →* H) K) ↔ IsCoatom K

{G : Type u_1}
[Group G]
(H : Subgroup G)
(f : G ≃* ↥H)
{K : Subgroup G}

IsCoatom (Subgroup.map (↑f) K) ↔ IsCoatom K


@[simp]
theorem compAlternatingMap_codRestrict (g : N →ₗ[R] N₂) (f : M [⋀^ι]→ₗ[R] N)
    (p : Submodule R N₂) (h) :
    (g.codRestrict p h).compAlternatingMap f =
      (g.compAlternatingMap f).codRestrict p fun v => h (f v)

{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}
{N₂ : Type u_10}
[AddCommMonoid N₂]
[Module R N₂]
(g : N →ₗ[R] N₂)
(f : M [⋀^ι]→ₗ[R] N)
(p : Submodule R N₂)
(h : ∀ (c : N), g c ∈ p)

(LinearMap.codRestrict p g h).compAlternatingMap f = (g.compAlternatingMap f).codRestrict p ⋯


theorem sub_inter (s t : Multiset α) : s - s ∩ t = s - t

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


/-- `raise' l n` is a strictly increasing sequence. -/
theorem raise'_sorted : ∀ l n, List.Sorted (· < ·) (raise' l n)

List.Sorted (fun x x_1 => x < x_1) (Denumerable.raise' l n)


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

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

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


theorem range_toProd :
    Set.range toProd = { lr : (A →L[𝕜] A) × (A →L[𝕜] A) | ∀ x y, lr.2 x * y = x * lr.1 y }

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

Set.range DoubleCentralizer.toProd = {lr | ∀ (x y : A), lr.2 x * y = x * lr.1 y}


theorem of_iso {L₁ L₂ : C ⥤ D} (e : L₁ ≅ L₂) [L₁.IsLocalization W] : L₂.IsLocalization W

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
(W : CategoryTheory.MorphismProperty C)
{L₁ L₂ : CategoryTheory.Functor C D}
(e : L₁ ≅ L₂)
[L₁.IsLocalization W]


/-- The product of two `C^n` functions at a point is `C^n` at this point. -/
nonrec theorem ContDiffAt.mul {f g : E → 𝔸} (hf : ContDiffAt 𝕜 n f x) (hg : ContDiffAt 𝕜 n g x) :
    ContDiffAt 𝕜 n (fun x => f x * g x) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{n : ℕ∞}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{f g : E → 𝔸}
(hf : ContDiffAt 𝕜 n f x)
(hg : ContDiffAt 𝕜 n g x)


/-- The short complex `L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁`. -/
@[simps]
noncomputable def L₁' : ShortComplex C

(S : CategoryTheory.ShortComplex.SnakeInput C)


theorem toReal_ne_one : a.toReal ≠ 1 ↔ a ≠ 1


@[simp]
theorem _root_.LinearIsometry.coe_toSpanSingleton {v : E} (hv : ‖v‖ = 1) :
    (LinearIsometry.toSpanSingleton 𝕜 E hv).toLinearMap = LinearMap.toSpanSingleton 𝕜 E v

{𝕜 : Type u_1}
{E : Type u_4}
[SeminormedAddCommGroup E]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
{v : E}
(hv : ‖v‖ = 1)


theorem fourierCoeff_liftIoc_eq {a : ℝ} (f : ℝ → ℂ) (n : ℤ) :
    fourierCoeff (AddCircle.liftIoc T a f) n =
    fourierCoeffOn (lt_add_of_pos_right a hT.out) f n

fourierCoeff (AddCircle.liftIoc T a f) n = fourierCoeffOn ⋯ f n


@[simp]
theorem mkHom_f_0 : (mkHom P Q zero one one_zero_comm succ).f 0 = zero

(one_zero_comm : one ≫ Q.d 1 0 = P.d 1 0 ≫ zero)

(P.mkHom Q zero one one_zero_comm succ).f 0 = zero


@[to_additive]
theorem lift_unique {f : M →* P} {g : N →* P} {fg : M ∗ N →* P} (h₁ : fg.comp inl = f)
    (h₂ : fg.comp inr = g) : fg = lift f g

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[MulOneClass M]
[MulOneClass N]
[Monoid P]
{f : M →* P}
{g : N →* P}
{fg : Monoid.Coprod M N →* P}
(h₁ : fg.comp Monoid.Coprod.inl = f)
(h₂ : fg.comp Monoid.Coprod.inr = g)


lemma leftShift_v (a n' : ℤ) (hn' : n + a = n') (p q : ℤ) (hpq : p + n' = q)
    (p' : ℤ) (hp' : p' + n = q) :
    (γ.leftShift a n' hn').v p q hpq = (a * n' + ((a * (a - 1))/2)).negOnePow •
      (K.shiftFunctorObjXIso a p p'
        (by rw [← add_left_inj n, hp', add_assoc, add_comm a, hn', hpq])).hom ≫ γ.v p' q hp'

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

(γ.leftShift a n' hn').v p q hpq =
  (a * n' + a * (a - 1) / 2).negOnePow • (K.shiftFunctorObjXIso a p p' ⋯).hom ≫ γ.v p' q hp'


theorem formPerm_reverse : ∀ l : List α, formPerm l.reverse = (formPerm l)⁻¹

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


/-- The equivalence between cubic polynomials and polynomials of degree at most three. -/
@[simps]
def equiv : Cubic R ≃ { p : R[X] // p.degree ≤ 3 }

{R : Type u_1}
[Semiring R]
(f : { p // p.degree ≤ 3 })


theorem subset_hom (C : G.ComponentCompl L) (h : K ⊆ L) : (C : Set V) ⊆ (C.hom h : Set V)

{V : Type u}
{G : SimpleGraph V}
{K L : Set V}
(C : G.ComponentCompl L)
(h : K ⊆ L)

↑C ⊆ ↑(SimpleGraph.ComponentCompl.hom h C)


theorem mono_set (hf : IntervalIntegrable f μ a b) (h : [[c, d]] ⊆ [[a, b]]) :
    IntervalIntegrable f μ c d

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


theorem smul_apply (c : 𝕜) (f : α →ᵇ β) (x : α) : (c • f) x = c • f x

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


theorem expMapCircle_add_two_pi (x : ℝ) : expMapCircle (x + 2 * π) = expMapCircle x


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(m : ℕ)


lemma filter_attach (l : List α) (p : α → Bool) :
    (l.attach.filter fun x => p x : List {x // x ∈ l}) =
      (l.filter p).attach.map (Subtype.map id fun x => mem_of_mem_filter)

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

List.filter (fun x => p ↑x) l.attach = List.map (Subtype.map id ⋯) (List.filter p l).attach


@[to_additive]
theorem multipliable_iff_vanishing :
    Multipliable f ↔
    ∀ e ∈ 𝓝 (1 : α), ∃ s : Finset β, ∀ t, Disjoint t s → (∏ b ∈ t, f b) ∈ e

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[UniformSpace α]
[UniformAddGroup α]
{f : β → α}
[CompleteSpace α]

Summable f ↔ ∀ e ∈ 𝓝 0, ∃ s, ∀ (t : Finset β), Disjoint t s → ∑ b ∈ t, f b ∈ e


theorem disjoint_of_disjoint_of_mem {f g : Filter α} {s t : Set α} (h : Disjoint s t) (hs : s ∈ f)
    (ht : t ∈ g) : Disjoint f g

{α : Type u}
{f g : Filter α}
{s t : Set α}
(h : Disjoint s t)
(hs : s ∈ f)
(ht : t ∈ g)


theorem stepRet_eval {k v} : eval step (stepRet k v) = Cfg.halt <$> k.eval v

{k : Turing.ToPartrec.Cont}
{v : List ℕ}

Turing.eval Turing.ToPartrec.step (Turing.ToPartrec.stepRet k v) = Turing.ToPartrec.Cfg.halt <$> k.eval v


theorem Nonempty.mul_zero (hs : s.Nonempty) : s * 0 = 0

{α : Type u_2}
[DecidableEq α]
[MulZeroClass α]
{s : Finset α}
(hs : s.Nonempty)


@[simp]
theorem primPart_zero : primPart (0 : R[X]) = 1

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]


lemma indicator_const_smul (s : Set α) (r : R) (f : α → M) :
    indicator s (r • f ·) = (r • indicator s f ·)

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero M]
[SMulZeroClass R M]
(s : Set α)
(r : R)
(f : α → M)

(s.indicator fun x => r • f x) = fun x => r • s.indicator f x


theorem pushoutCoconeOfRightIso_ι_app_none : (pushoutCoconeOfRightIso f g).ι.app none = f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
(f : X ⟶ Y)
(g : X ⟶ Z)
[CategoryTheory.IsIso g]

(CategoryTheory.Limits.pushoutCoconeOfRightIso f g).ι.app none = f


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

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

[CovariantClass α α (Function.swap HMul.hMul) LT.lt]


@[to_additive (attr := simp)]
theorem mulSupport_nonempty_iff {f : α → M} : (mulSupport f).Nonempty ↔ f ≠ 1

{α : Type u_1}
{M : Type u_5}
[One M]
{f : α → M}

(Function.mulSupport f).Nonempty ↔ f ≠ 1


protected theorem Reachable.dist_eq_zero_iff (hr : G.Reachable u v) :
    G.dist u v = 0 ↔ u = v

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}
(hr : G.Reachable u v)


theorem add_prod (μ' : Measure α) [SFinite μ'] : (μ + μ').prod ν = μ.prod ν + μ'.prod ν

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
(μ' : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ']


@[to_additive (attr := simp)]
theorem coe_range (f : G →* N) : (f.range : Set N) = Set.range f

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)


@[simp]
theorem derivative_monomial (a : R) (n : ℕ) :
    derivative (monomial n a) = monomial (n - 1) (a * n)

{R : Type u}
[Semiring R]
(a : R)
(n : ℕ)

Polynomial.derivative ((Polynomial.monomial n) a) = (Polynomial.monomial (n - 1)) (a * ↑n)


@[simp, norm_cast] lemma coe_lt_coe : ⇑f < g ↔ f < g

{ι : Type u_1}
{α : Type u_2}
[Zero α]
[Preorder α]
{f g : ι →₀ α}


theorem isClosed_iff_closure_le : c.IsClosed x ↔ c x ≤ x

{α : Type u_1}
[PartialOrder α]
{c : ClosureOperator α}
{x : α}


theorem FractionalIdeal.canonicalEquiv_mk0 [IsDedekindDomain R] (K' : Type*) [Field K']
    [Algebra R K'] [IsFractionRing R K'] (I : (Ideal R)⁰) :
    FractionalIdeal.canonicalEquiv R⁰ K K' (FractionalIdeal.mk0 K I) =
    FractionalIdeal.mk0 K' I

{R : Type u_1}
(K : Type u_2)
[CommRing R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]
[IsDedekindDomain R]
(K' : Type u_4)
[Field K']
[Algebra R K']
[IsFractionRing R K']
(I : ↥(Ideal R)⁰)

(FractionalIdeal.canonicalEquiv R⁰ K K') ↑((FractionalIdeal.mk0 K) I) = ↑((FractionalIdeal.mk0 K') I)


theorem coeFn_injective : Function.Injective ((↑) : ENorm 𝕜 V → V → ℝ≥0∞)

{𝕜 : Type u_1}
{V : Type u_2}
[NormedField 𝕜]
[AddCommGroup V]
[Module 𝕜 V]


lemma AntivaryOn.div_right₀ (hg₁ : ∀ i ∈ s, 0 ≤ g₁ i) (hg₂ : ∀ i ∈ s, 0 < g₂ i)
    (h₁ : AntivaryOn f g₁ s) (h₂ : MonovaryOn f g₂ s) : AntivaryOn f (g₁ / g₂) s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{s : Set ι}
{f : ι → α}
{g₁ g₂ : ι → β}
(hg₁ : ∀ i ∈ s, 0 ≤ g₁ i)
(hg₂ : ∀ i ∈ s, 0 < g₂ i)
(h₁ : AntivaryOn f g₁ s)
(h₂ : MonovaryOn f g₂ s)


theorem verschiebungFun_coeff_zero (x : 𝕎 R) : (verschiebungFun x).coeff 0 = 0

{p : ℕ}
{R : Type u_1}
[CommRing R]
(x : WittVector p R)


@[simp] lemma _root_.LinearMap.surjective_domRestrict_iff
    {f : M →ₛₗ[τ₁₂] M₂} {S : Submodule R M} (hf : Surjective f) :
    Surjective (f.domRestrict S) ↔ S ⊔ LinearMap.ker f = ⊤

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[Semiring R₂]
[AddCommGroup M]
[Module R M]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
{f : M →ₛₗ[τ₁₂] M₂}
{S : Submodule R M}
(hf : Function.Surjective ⇑f)

Function.Surjective ⇑(f.domRestrict S) ↔ S ⊔ LinearMap.ker f = ⊤


lemma pushoutCocone_inl_eq_inr_iff_of_iso {c c' : PushoutCocone f g} (e : c ≅ c')
    (x₁ : X₁) (x₂ : X₂) :
    c.inl x₁ = c.inr x₂ ↔ c'.inl x₁ = c'.inr x₂

{c c' : CategoryTheory.Limits.PushoutCocone f g}


@[aesop unsafe apply (rule_sets := [finsetNonempty])]
theorem Nonempty.inr {s t : Finset α} (h : t.Nonempty) : (s ∪ t).Nonempty

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


theorem map_pair {f : α → β} {a s} : map f (a, s) = (f a, Seq.map f s)

{α : Type u}
{β : Type v}
{f : α → β}
{a : α}
{s : Stream'.Seq α}

Stream'.Seq1.map f (a, s) = (f a, Stream'.Seq.map f s)


theorem Ioc_mem_nhdsWithin_Iic (H : b ∈ Ioc a c) : Ioc a c ∈ 𝓝[≤] b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{a b c : α}
(H : b ∈ Set.Ioc a c)


theorem inter_nonempty_iff_exists_left : (s ∩ t).Nonempty ↔ ∃ x ∈ s, x ∈ t


theorem convex_iff_segment_subset : Convex 𝕜 s ↔ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → [x -[𝕜] y] ⊆ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{s : Set E}

Convex 𝕜 s ↔ ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → [x-[𝕜]y] ⊆ s


@[simp] lemma closure_univ (M : Matroid α) : M.closure univ = M.E


@[simp]
theorem add_apply (f g : NormedAddGroupHom V₁ V₂) (v : V₁) :
    (f + g) v = f v + g v

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


/-- If subtracting two points from the same point produces equal
results, those points are equal. -/
theorem vsub_right_cancel {p₁ p₂ p : P} (h : p -ᵥ p₁ = p -ᵥ p₂) : p₁ = p₂

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
{p₁ p₂ p : P}
(h : p -ᵥ p₁ = p -ᵥ p₂)


@[simp]
theorem K'.elim_update_main {a b c d a'} : update (K'.elim a b c d) main a' = K'.elim a' b c d

{a b c d a' : List Turing.PartrecToTM2.Γ'}

Function.update (Turing.PartrecToTM2.K'.elim a b c d) Turing.PartrecToTM2.K'.main a' =
  Turing.PartrecToTM2.K'.elim a' b c d


theorem card_le_four : card {a, b, c, d} ≤ 4

{α : Type u_1}
[DecidableEq α]
{a b c d : α}


theorem IsMaxFilter.isExtr : IsMaxFilter f l a → IsExtrFilter f l a

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


@[simp]
lemma nonempty_properDivisors : n.properDivisors.Nonempty ↔ 1 < n


lemma hurwitzEvenFEPair_zero_symm :
    (hurwitzEvenFEPair 0).symm = hurwitzEvenFEPair 0

(HurwitzZeta.hurwitzEvenFEPair 0).symm = HurwitzZeta.hurwitzEvenFEPair 0


/-- A generalization of the theorem that if `N` is a submodule of `M` and
  `N` and `M / N` are both Artinian, then `M` is Artinian. -/
theorem wellFounded_lt_exact_sequence {β γ : Type*} [PartialOrder β] [Preorder γ]
    (h₁ : WellFounded ((· < ·) : β → β → Prop)) (h₂ : WellFounded ((· < ·) : γ → γ → Prop)) (K : α)
    (f₁ : β → α) (f₂ : α → β) (g₁ : γ → α) (g₂ : α → γ) (gci : GaloisCoinsertion f₁ f₂)
    (gi : GaloisInsertion g₂ g₁) (hf : ∀ a, f₁ (f₂ a) = a ⊓ K) (hg : ∀ a, g₁ (g₂ a) = a ⊔ K) :
    WellFounded ((· < ·) : α → α → Prop)

{α : Type u_1}
[Lattice α]
[IsModularLattice α]
{β : Type u_2}
{γ : Type u_3}
[PartialOrder β]
[Preorder γ]
(h₁ : WellFounded fun x x_1 => x < x_1)
(h₂ : WellFounded fun x x_1 => x < x_1)
(K : α)
(f₁ : β → α)
(f₂ : α → β)
(g₁ : γ → α)
(g₂ : α → γ)
(gci : GaloisCoinsertion f₁ f₂)
(gi : GaloisInsertion g₂ g₁)
(hf : ∀ (a : α), f₁ (f₂ a) = a ⊓ K)
(hg : ∀ (a : α), g₁ (g₂ a) = a ⊔ K)


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


@[to_additive (attr := simp, norm_cast)]
theorem coe_top : ((⊤ : OpenSubgroup G) : Set G) = Set.univ

{G : Type u_1}
[Group G]
[TopologicalSpace G]


protected theorem contDiffAt {x n} : ContDiffAt ℝ n smoothTransition x


@[simp]
theorem toReal_eq_zero_iff {θ : Angle} : θ.toReal = 0 ↔ θ = 0


theorem sum_pow_char {ι : Type*} (s : Finset ι) (f : ι → R) :
    (∑ i ∈ s, f i) ^ p = ∑ i ∈ s, f i ^ p

{R : Type u}
[CommSemiring R]
(p : ℕ)
[ExpChar R p]
{ι : Type u_2}
(s : Finset ι)
(f : ι → R)


theorem equivalence₂CounitIso_eq :
    (equivalence₂ eB hF).counitIso = equivalence₂CounitIso eB hF

{A : Type u_1}
{A' : Type u_2}
{B : Type u_3}
{B' : Type u_4}
[CategoryTheory.Category.{u_6, u_1} A]
[CategoryTheory.Category.{u_7, u_2} A']
[CategoryTheory.Category.{u_5, u_3} B]
[CategoryTheory.Category.{u_8, u_4} B']
{eA : A ≌ A'}
(eB : B ≌ B')
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)

(AlgebraicTopology.DoldKan.Compatibility.equivalence₂ eB hF).counitIso =
  AlgebraicTopology.DoldKan.Compatibility.equivalence₂CounitIso eB hF


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


@[simp]
theorem free_obj_coe {α : Type u} : (free.obj α : Type u) = MvPolynomial α ℤ

↑(CommRingCat.free.obj α) = MvPolynomial α ℤ


theorem smul_def (xs : IntList) (i : Int) : i * xs = xs.map fun x => i * x


@[simp]
theorem thickening_cthickening (hε : 0 < ε) (hδ : 0 ≤ δ) (s : Set E) :
    thickening ε (cthickening δ s) = thickening (ε + δ) s

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{δ ε : ℝ}
(hε : 0 < ε)
(hδ : 0 ≤ δ)
(s : Set E)

Metric.thickening ε (Metric.cthickening δ s) = Metric.thickening (ε + δ) s


theorem aemeasurable_biSup {ι} {μ : Measure δ} (s : Set ι) {f : ι → δ → α} (hs : s.Countable)
    (hf : ∀ i ∈ s, AEMeasurable (f i) μ) : AEMeasurable (fun b => ⨆ i ∈ s, f i b) μ

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[MeasurableSpace δ]
[ConditionallyCompleteLinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
{ι : Type u_5}
{μ : MeasureTheory.Measure δ}
(s : Set ι)
{f : ι → δ → α}
(hs : s.Countable)
(hf : ∀ i ∈ s, AEMeasurable (f i) μ)


theorem chainClosure_empty : ChainClosure r ∅


protected theorem strictMono : StrictMono f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(f : α ↪o β)


/-- If `a` is the greatest element of `s` and `b` is the greatest element of `t`,
then `max a b` is the greatest element of `s ∪ t`. -/
theorem IsGreatest.union [LinearOrder γ] {a b : γ} {s t : Set γ} (ha : IsGreatest s a)
    (hb : IsGreatest t b) : IsGreatest (s ∪ t) (max a b)

{γ : Type w}
[LinearOrder γ]
{a b : γ}
{s t : Set γ}
(ha : IsGreatest s a)
(hb : IsGreatest t b)


/-- A minimal polynomial is prime. -/
theorem prime (hx : IsIntegral A x) : Prime (minpoly A x)

{A : Type u_1}
{B : Type u_2}
[Field A]
[Ring B]
[IsDomain B]
[Algebra A B]
{x : B}
(hx : IsIntegral A x)


@[to_additive]
theorem map_div_rev : f (x / y) = f (y / x)

{F : Type u_2}
{α : Type u_3}
{β : Type u_4}
[FunLike F α β]
[AddGroup α]
[OrderedAddCommMonoid β]
[AddGroupSeminormClass F α β]
(f : F)
(x y : α)


/-- *Bubble sort induction*: Prove that the sorted version of `f` has some property `P`
if `f` satisfies `P` and `P` is preserved when swapping two antitone values. -/
theorem bubble_sort_induction {n : ℕ} {α : Type*} [LinearOrder α] {f : Fin n → α}
    {P : (Fin n → α) → Prop} (hf : P f)
    (h : ∀ (g : Fin n → α) (i j : Fin n), i < j → g j < g i → P g → P (g ∘ Equiv.swap i j)) :
    P (f ∘ sort f)

(h : ∀ (g : Fin n → α) (i j : Fin n), i < j → g j < g i → P g → P (g ∘ ⇑(Equiv.swap i j)))


theorem ConjClasses.card_carrier {G : Type*} [Group G] [Fintype G] (g : G)
    [Fintype (ConjClasses.mk g).carrier] [Fintype <| MulAction.stabilizer (ConjAct G) g] :
    Fintype.card (ConjClasses.mk g).carrier =
      Fintype.card G / Fintype.card (MulAction.stabilizer (ConjAct G) g)

[Fintype ↥(MulAction.stabilizer (ConjAct G) g)]

Fintype.card ↑(ConjClasses.mk g).carrier = Fintype.card G / Fintype.card ↥(MulAction.stabilizer (ConjAct G) g)


theorem map_congr {f g : α → β} (h : f =ᵐ[μ] g) : Measure.map f μ = Measure.map g μ

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{f g : α → β}
(h : f =ᵐ[μ] g)

MeasureTheory.Measure.map f μ = MeasureTheory.Measure.map g μ


lemma rpow_add_nat' (hx : 0 ≤ x) (h : y + n ≠ 0) : x ^ (y + n) = x ^ y * x ^ n


/-- An isometry from an emetric space is an embedding -/
protected theorem embedding (hf : Isometry f) : Embedding f

{α : Type u}
{β : Type v}
[EMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
(hf : Isometry f)


@[simp, norm_cast] lemma coe_le_coe : ⇑f ≤ g ↔ f ≤ g

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

⇑f ≤ ⇑g ↔ f ≤ g


theorem ncard_congr {t : Set β} (f : ∀ a ∈ s, β) (h₁ : ∀ a ha, f a ha ∈ t)
    (h₂ : ∀ a b ha hb, f a ha = f b hb → a = b) (h₃ : ∀ b ∈ t, ∃ a ha, f a ha = b) :
    s.ncard = t.ncard

(h₁ : ∀ (a : α) (ha : a ∈ s), f a ha ∈ t)

(h₂ : ∀ (a b : α) (ha : a ∈ s) (hb : b ∈ s), f a ha = f b hb → a = b)

(h₃ : ∀ b ∈ t, ∃ a, ∃ (ha : a ∈ s), f a ha = b)


@[reassoc (attr := simp)]
lemma opcyclesToCycles_iCycles : K.opcyclesToCycles i j ≫ K.iCycles j = K.fromOpcycles i j


lemma subtype_injective (L : Sublattice α) : Injective <| subtype L

{α : Type u_2}
[Lattice α]
(L : Sublattice α)


/-- A general version of the slash action of the space of modular forms. -/
class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where
  map : β → G → α → α
  zero_slash : ∀ (k : β) (g : G), map k g 0 = 0
  slash_one : ∀ (k : β) (a : α), map k 1 a = a
  slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a)
  smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a
  add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b

{β : Type u_1}
{G : Type u_2}
{α : Type u_3}
{γ : Type u_4}
[Group G]
[AddMonoid α]
[SMul γ α]
[self : SlashAction β G α γ]
(k : β)
(g : G)
(a : α)
(z : γ)


theorem isLUB_prod {s : Set (α × β)} (p : α × β) :
    IsLUB s p ↔ IsLUB (Prod.fst '' s) p.1 ∧ IsLUB (Prod.snd '' s) p.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s : Set (α × β)}
(p : α × β)


@[simp]
theorem inter_mem_iff {s t : Set α} : s ∩ t ∈ f ↔ s ∈ f ∧ t ∈ f

{α : Type u}
{f : Filter α}
{s t : Set α}


@[simp]
theorem symm_piecewise (e e' : PartialHomeomorph X Y) {s : Set X} {t : Set Y}
    [∀ x, Decidable (x ∈ s)] [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t)
    (Hs : e.source ∩ frontier s = e'.source ∩ frontier s)
    (Heq : EqOn e e' (e.source ∩ frontier s)) :
    (e.piecewise e' s t H H' Hs Heq).symm =
      e.symm.piecewise e'.symm t s H.symm H'.symm
        (H.frontier.inter_eq_of_inter_eq_of_eqOn H'.frontier Hs Heq)
        (H.frontier.symm_eqOn_of_inter_eq_of_eqOn Hs Heq)

(Heq : Set.EqOn (↑e) (↑e') (e.source ∩ frontier s))

(e.piecewise e' s t H H' Hs Heq).symm = e.symm.piecewise e'.symm t s ⋯ ⋯ ⋯ ⋯


protected theorem Antitone {x' y'} (h : IsCompl x y) (h' : IsCompl x' y') (hx : x ≤ x') : y' ≤ y

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
{x y x' y' : α}
(h : IsCompl x y)
(h' : IsCompl x' y')
(hx : x ≤ x')


theorem rpow_neg (x : ℝ≥0) (y : ℝ) : x ^ (-y) = (x ^ y)⁻¹


@[to_additive]
theorem Subgroup.pow_exponent_eq_one {H : Subgroup G} {g : G} (g_in_H : g ∈ H) :
    g ^ Monoid.exponent H = 1

{G : Type u}
[AddGroup G]
{H : AddSubgroup G}
{g : G}
(g_in_H : g ∈ H)


/-- Function application `fun f => f a` (for fixed `a`) is a monotone function from the
monotone function space `α →o β` to `β`. See also `Pi.evalOrderHom`.  -/
@[simps! (config := .asFn)]
def apply (x : α) : (α →o β) →o β

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(x : α)

⇑(OrderHom.apply x) = Function.eval x ∘ fun f => ⇑f


/-- An additive content is a set function with value 0 at the empty set which is finitely additive
on a given set of sets. -/
structure AddContent (C : Set (Set α)) where
  /-- The value of the content on a set. -/
  toFun : Set α → ℝ≥0∞
  empty' : toFun ∅ = 0
  sUnion' (I : Finset (Set α)) (_h_ss : ↑I ⊆ C)
      (_h_dis : PairwiseDisjoint (I : Set (Set α)) id) (_h_mem : ⋃₀ ↑I ∈ C) :
    toFun (⋃₀ I) = ∑ u ∈ I, toFun u

{α : Type u_1}
{C : Set (Set α)}
(self : MeasureTheory.AddContent C)


/-- The equivalence induced by `a ↦ (a / n, a % n)` for nonzero `n`.
See `Int.ediv_emod_unique` for a similar propositional statement. -/
@[simps]
def Int.divModEquiv (n : ℕ) [NeZero n] : ℤ ≃ ℤ × Fin n

(Int.divModEquiv n).symm p = p.1 * ↑n + ↑↑p.2


@[simp]
theorem coe_coe {F : Type*} [FunLike F α β] [RingHomClass F α β] (f : F) :
    ((f : α →+* β) : α → β) = f

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} {F : Type u_5} [inst : FunLike F α β]
  [inst_1 : RingHomClass F α β] (f : F), ⇑↑f = ⇑f


@[simp]
theorem finite_singleton (a : α) : ({a} : Set α).Finite


/-- If `R` is a ring which is a topological semiring, then it is automatically a topological
ring. This exists so that one can place a topological ring structure on `R` without explicitly
proving `continuous_neg`. -/
theorem TopologicalSemiring.toTopologicalRing [TopologicalSpace α] [NonAssocRing α]
    (_ : TopologicalSemiring α) : TopologicalRing α

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

TopologicalSemiring α → TopologicalRing α


@[local simp] protected theorem add_right_neg (a : Int) : a + -a = 0


@[norm_cast]
theorem coe_projIci (a x : α) : (projIci a x : α) = max a x

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


theorem zero_testAgainstNN : (0 : FiniteMeasure Ω).testAgainstNN = 0

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]

MeasureTheory.FiniteMeasure.testAgainstNN 0 = 0


/--
A left adjoint functor `L : C ⥤ D` is *comonadic* if the comparison functor `Comonad.comparison L`
from `C` to the category of Eilenberg-Moore algebras for the adjunction is an equivalence.
-/
class ComonadicLeftAdjoint (L : C ⥤ D) where
  /-- a choice of right adjoint for `L` -/
  R : D ⥤ C
  /-- `L` is a right adjoint -/
  adj : L ⊣ R
  eqv : (Comonad.comparison adj).IsEquivalence

[self : CategoryTheory.ComonadicLeftAdjoint L]


/-- A monoid homomorphism `f: M → End X` into the endomorphisms of an object `X` of a category `C`
induces a functor `SingleObj M ⥤ C`. -/
@[simps]
def functor {X : C} (f : M →* End X) : SingleObj M ⥤ C

{M : Type u}
[Monoid M]
{C : Type v}
[CategoryTheory.Category.{w, v} C]
{X : C}
(f : M →* CategoryTheory.End X)

∀ (x : CategoryTheory.SingleObj M), (CategoryTheory.SingleObj.functor f).obj x = X


@[simp]
theorem nth_zero_of_zero (h : p 0) : nth p 0 = 0


@[simp] theorem bind_some (x : Option α) : x.bind some = x


/-- Construct a quadratic form on a product of two modules from the quadratic form on each module.
-/
@[simps!]
def prod (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P) : QuadraticMap R (M₁ × M₂) P

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R P]
(Q₁ : QuadraticMap R M₁ P)
(Q₂ : QuadraticMap R M₂ P)
(a : M₁ × M₂)


/-- The functor `Over S ⥤ Over S` that is constructed in order to apply the small
object argument to a family of morphisms `f i : A i ⟶ B i`, see the introduction
of the file `Mathlib.CategoryTheory.SmallObject.Construction` -/
@[simps! obj map]
noncomputable def functor : Over S ⥤ Over S

[∀ {X : C} (πX : X ⟶ S),
    CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete (CategoryTheory.SmallObject.FunctorObjIndex f πX))
      C]

(CategoryTheory.SmallObject.functor f S).obj π = CategoryTheory.Over.mk (CategoryTheory.SmallObject.πFunctorObj f π.hom)


/-- Quite often it is more natural to prove an estimate of the form `a * ε`, not `ε` in the RHS of
`BoxIntegral.hasIntegral_iff`, so we provide this auxiliary lemma.  -/
theorem HasIntegral.of_mul (a : ℝ)
    (h : ∀ ε : ℝ, 0 < ε → ∃ r : ℝ≥0 → ℝⁿ → Ioi (0 : ℝ), (∀ c, l.RCond (r c)) ∧ ∀ c π,
      l.MemBaseSet I c (r c) π → IsPartition π → dist (integralSum f vol π) y ≤ a * ε) :
    HasIntegral I l f vol y

(h :
  ∀ (ε : ℝ),
    0 < ε →
      ∃ r,
        (∀ (c : ℝ≥0), l.RCond (r c)) ∧
          ∀ (c : ℝ≥0) (π : BoxIntegral.TaggedPrepartition I),
            l.MemBaseSet I c (r c) π → π.IsPartition → dist (BoxIntegral.integralSum f vol π) y ≤ a * ε)


lemma union_mem_sups : s ∈ 𝒜 → t ∈ ℬ → s ∪ t ∈ 𝒜 ⊻ ℬ

{α : Type u_2}
[DecidableEq α]
{𝒜 ℬ : Finset (Finset α)}
{s t : Finset α}

s ∈ 𝒜 → t ∈ ℬ → s ∪ t ∈ 𝒜 ⊻ ℬ


theorem IsComplement.card_mul (h : IsComplement S T) :
    Nat.card S * Nat.card T = Nat.card G

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


theorem mk_initialSeg (o : Ordinal.{u}) :
    #{ o' : Ordinal | o' < o } = Cardinal.lift.{u + 1} o.card

#↑{o' | o' < o} = Cardinal.lift.{u + 1, u} o.card


@[simp]
theorem restrictScalars_top : restrictScalars S (⊤ : Submodule R M) = ⊤

(S : Type u_1)
(R : Type u_2)
(M : Type u_3)
[Semiring R]
[AddCommMonoid M]
[Semiring S]
[Module S M]
[Module R M]
[SMul S R]
[IsScalarTower S R M]


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


/-- The type of compact open sets of a topological space. This is useful in non Hausdorff contexts,
in particular spectral spaces. -/
structure CompactOpens (α : Type*) [TopologicalSpace α] extends Compacts α where
  isOpen' : IsOpen carrier

(self : TopologicalSpace.CompactOpens α)


@[simp] theorem zero_den : (0 : Rat).den = 1


/-- A version of **Matiyasevic's theorem** -/
theorem pow_dioph : DiophFn fun v => f v ^ g v

{α : Type}
{f g : (α → ℕ) → ℕ}
(df : Dioph.DiophFn f)
(dg : Dioph.DiophFn g)


@[simp]
theorem coe_comp (f : β →CO γ) (g : α →CO β) : (f.comp g : α → γ) = f ∘ g

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
(f : β →CO γ)
(g : α →CO β)


theorem ofList_dProd {α} (l : List α) (fι : α → ι) (fA : ∀ a, A (fι a)) :
    of A _ (l.dProd fι fA) = (l.map fun a => of A (fι a) (fA a)).prod

{ι : Type u_1}
[DecidableEq ι]
(A : ι → Type u_2)
[(i : ι) → AddCommMonoid (A i)]
[AddMonoid ι]
[DirectSum.GSemiring A]
{α : Type u_3}
(l : List α)
(fι : α → ι)
(fA : (a : α) → A (fι a))

(DirectSum.of A (l.dProdIndex fι)) (l.dProd fι fA) = (List.map (fun a => (DirectSum.of A (fι a)) (fA a)) l).prod


@[simp]
theorem forget₂_bialgebra_map (X Y : HopfAlgebraCat R) (f : X ⟶ Y) :
    (forget₂ (HopfAlgebraCat R) (BialgebraCat R)).map f = BialgebraCat.ofHom f.toBialgHom

{R : Type u}
[CommRing R]
(X Y : HopfAlgebraCat R)
(f : X ⟶ Y)

(CategoryTheory.forget₂ (HopfAlgebraCat R) (BialgebraCat R)).map f = BialgebraCat.ofHom f.toBialgHom


@[simp]
theorem seq_destruct_nil : Seq.destruct (nil : WSeq α) = none

Stream'.Seq.destruct Stream'.WSeq.nil = none


theorem aux_cobounded_eq : cobounded (PiLp p α) = @cobounded _ Pi.instBornology

(p : ℝ≥0∞)
{ι : Type u_2}
(α : ι → Type u_3)
[Fact (1 ≤ p)]
[(i : ι) → PseudoMetricSpace (α i)]
[Fintype ι]

Bornology.cobounded (PiLp p α) = Bornology.cobounded ((i : ι) → α i)


@[continuity, fun_prop]
theorem Continuous.sigma_map {f₁ : ι → κ} {f₂ : ∀ i, σ i → τ (f₁ i)} (hf : ∀ i, Continuous (f₂ i)) :
    Continuous (Sigma.map f₁ f₂)

{ι : Type u_5}
{κ : Type u_6}
{σ : ι → Type u_7}
{τ : κ → Type u_8}
[(i : ι) → TopologicalSpace (σ i)]
[(k : κ) → TopologicalSpace (τ k)]
{f₁ : ι → κ}
{f₂ : (i : ι) → σ i → τ (f₁ i)}
(hf : ∀ (i : ι), Continuous (f₂ i))


theorem map_dualCoannihilator (W : Subspace K (Dual K V)) [FiniteDimensional K V] :
    W.dualCoannihilator.map (Dual.eval K V) = W.dualAnnihilator

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
(W : Subspace K (Module.Dual K V))
[FiniteDimensional K V]

Submodule.map (Module.Dual.eval K V) (Submodule.dualCoannihilator W) = Submodule.dualAnnihilator W


theorem cycleRange_of_lt {n : ℕ} {i j : Fin n.succ} (h : j < i) : cycleRange i j = j + 1


protected theorem lt_or_gt_of_ne {a b : Int} : a ≠ b →  a < b ∨ b < a


theorem inl_mul_inr [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M] (r : R) (m : M) :
    (inl r * inr m : tsze R M) = inr (r • m)

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Module Rᵐᵒᵖ M]
(r : R)
(m : M)

TrivSqZeroExt.inl r * TrivSqZeroExt.inr m = TrivSqZeroExt.inr (r •> m)


@[to_additive] lemma inv_mabs_le_inv (a : α) : |a|ₘ⁻¹ ≤ a⁻¹

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


lemma prevD_eq_zero (f : ∀ i j, C.X i ⟶ D.X j) (i : ι) (hi : ¬ c.Rel (c.prev i) i) :
    prevD i f = 0

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f : (i j : ι) → C.X i ⟶ D.X j)
(i : ι)
(hi : ¬c.Rel (c.prev i) i)


theorem coevaluation_apply_one :
    (coevaluation K V) (1 : K) =
      let bV := Basis.ofVectorSpace K V
      ∑ i : Basis.ofVectorSpaceIndex K V, bV i ⊗ₜ[K] bV.coord i

(K : Type u)
[Field K]
(V : Type v)
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]

(coevaluation K V) 1 =
  let bV := Basis.ofVectorSpace K V;
  ∑ i : ↑(Basis.ofVectorSpaceIndex K V), bV i ⊗ₜ[K] bV.coord i


/-- `|a - b| ≤ n` if `0 ≤ a ≤ n` and `0 ≤ b ≤ n`. -/
theorem abs_sub_le_of_nonneg_of_le {a b n : α} (a_nonneg : 0 ≤ a) (a_le_n : a ≤ n)
    (b_nonneg : 0 ≤ b) (b_le_n : b ≤ n) : |a - b| ≤ n

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b n : α}
(a_nonneg : 0 ≤ a)
(a_le_n : a ≤ n)
(b_nonneg : 0 ≤ b)
(b_le_n : b ≤ n)


theorem foldr'Aux_foldr'Aux (f : M →ₗ[R] CliffordAlgebra Q × N →ₗ[R] N)
    (hf : ∀ m x fx, f m (ι Q m * x, f m (x, fx)) = Q m • fx) (v : M) (x_fx) :
    foldr'Aux Q f v (foldr'Aux Q f v x_fx) = Q v • x_fx

(hf : ∀ (m : M) (x : CliffordAlgebra Q) (fx : N), (f m) ((CliffordAlgebra.ι Q) m * x, (f m) (x, fx)) = Q m • fx)

((CliffordAlgebra.foldr'Aux Q f) v) (((CliffordAlgebra.foldr'Aux Q f) v) x_fx) = Q v • x_fx


protected theorem push_pull' (f : α → β) (F : Filter α) (G : Filter β) :
    map f (comap f G ⊓ F) = G ⊓ map f F

{α : Type u}
{β : Type v}
(f : α → β)
(F : Filter α)
(G : Filter β)

Filter.map f (Filter.comap f G ⊓ F) = G ⊓ Filter.map f F


/-- If `f : R ≃+* S` is a ring isomorphism and `I : Ideal R`, then `map f.symm (map f I) = I`. -/
@[simp]
theorem map_of_equiv (I : Ideal R) (f : R ≃+* S) :
    (I.map (f : R →+* S)).map (f.symm : S →+* R) = I

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(I : Ideal R)
(f : R ≃+* S)

Ideal.map (↑f.symm) (Ideal.map (↑f) I) = I


theorem Subsingleton.image2 (hs : s.Subsingleton) (ht : t.Subsingleton) (f : α → β → γ) :
    (image2 f s t).Subsingleton

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{s : Set α}
{t : Set β}
(hs : s.Subsingleton)
(ht : t.Subsingleton)
(f : α → β → γ)


protected theorem mem (U : OpenNhdsOf x) : x ∈ U

{α : Type u_2}
[TopologicalSpace α]
{x : α}
(U : TopologicalSpace.OpenNhdsOf x)


@[to_additive]
theorem Supports.smul (g : H) (h : Supports G s b) : Supports G (g • s) (g • b)

{G : Type u_1}
{H : Type u_2}
{α : Type u_3}
{β : Type u_4}
[AddGroup H]
[VAdd G α]
[VAdd G β]
[AddAction H α]
[VAdd H β]
[VAddCommClass G H β]
[VAddCommClass G H α]
{s : Set α}
{b : β}
(g : H)
(h : AddAction.Supports G s b)


theorem bliminf_congr {f : Filter β} {u v : β → α} {p : β → Prop} (h : ∀ᶠ a in f, p a → u a = v a) :
    bliminf u f p = bliminf v f p

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
{f : Filter β}
{u v : β → α}
{p : β → Prop}
(h : ∀ᶠ (a : β) in f, p a → u a = v a)

Filter.bliminf u f p = Filter.bliminf v f p


theorem isUpperSet_iff_forall_lt : IsUpperSet s ↔ ∀ ⦃a b : α⦄, a < b → a ∈ s → b ∈ s

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


@[to_additive]
theorem le_hasProd_of_le_prod (hf : HasProd f a) (h : ∀ s, a₂ ≤ ∏ i ∈ s, f i) : a₂ ≤ a

(h : ∀ (s : Finset ι), a₂ ≤ ∑ i ∈ s, f i)


lemma deriv_lt_slope (hfc : StrictConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableAt ℝ f x) :
    deriv f x < slope f x y

{S : Set ℝ}
{f : ℝ → ℝ}
{x y : ℝ}
(hfc : StrictConvexOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hfd : DifferentiableAt ℝ f x)


@[simp]
theorem inv_inv [IsIso f] : inv (inv f) = f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f : X ⟶ Y}
[CategoryTheory.IsIso f]

CategoryTheory.inv (CategoryTheory.inv f) = f


theorem nilpotent_iff_mem_maximal_of_minimal {x : _} :
    IsNilpotent x ↔ x ∈ LocalRing.maximalIdeal (Localization I.primeCompl)

{R : Type u_1}
[CommSemiring R]
{I : Ideal R}
[hI : I.IsPrime]
(hMin : I ∈ minimalPrimes R)
{x : Localization I.primeCompl}


lemma forget_map_apply {A B : NonemptyFinLinOrd.{u}} (f : A ⟶ B) (a : A) :
    (forget NonemptyFinLinOrd).map f a = (f : OrderHom A B).toFun a

{A B : NonemptyFinLinOrd}
(f : A ⟶ B)
(a : ↑A)

(CategoryTheory.forget NonemptyFinLinOrd).map f a = f.toFun a


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

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


/-- A bounded below function `u` is in particular eventually bounded below. -/
lemma _root_.BddBelow.isBoundedUnder [Preorder α] {f : Filter β} {u : β → α} :
    BddBelow (Set.range u) → f.IsBoundedUnder (· ≥ ·) u

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

BddBelow (Set.range u) → Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u


@[simp]
theorem isAdjoinRoot_map_eq_mk : (AdjoinRoot.isAdjoinRoot f).map = AdjoinRoot.mk f


/-- Change of variable formula for differentiable functions, set version: if a function `f` is
injective and differentiable on a measurable set `s`, then the pushforward of the measure with
density `|(f' x).det|` on `s` is the Lebesgue measure on the image set. This version requires
that `f` is measurable, as otherwise `Measure.map f` is zero per our definitions.
For a version without measurability assumption but dealing with the restricted
function `s.restrict f`, see `restrict_map_withDensity_abs_det_fderiv_eq_addHaar`.
-/
theorem map_withDensity_abs_det_fderiv_eq_addHaar (hs : MeasurableSet s)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (hf : InjOn f s) (h'f : Measurable f) :
    Measure.map f ((μ.restrict s).withDensity fun x => ENNReal.ofReal |(f' x).det|) =
      μ.restrict (f '' s)

MeasureTheory.Measure.map f ((μ.restrict s).withDensity fun x => ENNReal.ofReal |(f' x).det|) = μ.restrict (f '' s)


theorem nhds_swap (x : X) (y : Y) : 𝓝 (x, y) = (𝓝 (y, x)).map Prod.swap

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

𝓝 (x, y) = Filter.map Prod.swap (𝓝 (y, x))


@[simp] lemma orthogonal_bot : B.orthogonal ⊥ = ⊤

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}


theorem Antiperiodic.add_const [AddCommSemigroup α] [Neg β] (h : Antiperiodic f c) (a : α) :
    Antiperiodic (fun x => f (x + a)) c

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddCommSemigroup α]
[Neg β]
(h : Function.Antiperiodic f c)
(a : α)

Function.Antiperiodic (fun x => f (x + a)) c


/-- A functor `F : C ⥤ D` is initial if for every `d : D`, the comma category of morphisms
`F.obj c ⟶ d` is connected.
-/
class Initial (F : C ⥤ D) : Prop where
  out (d : D) : IsConnected (CostructuredArrow F d)

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

CategoryTheory.IsConnected (CategoryTheory.CostructuredArrow F d)


/-- A triangle `(X,Y,Z,f,g,h)` in `C` is defined by the morphisms `f : X ⟶ Y`, `g : Y ⟶ Z`
and `h : Z ⟶ X⟦1⟧`.
-/
@[simps]
def Triangle.mk {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧) : Triangle C

(h : Z ⟶ (CategoryTheory.shiftFunctor C 1).obj X)

(CategoryTheory.Pretriangulated.Triangle.mk f g h).mor₃ = h


/-- A realizer for filter `f` is a cfilter which generates `f`. -/
structure Filter.Realizer (f : Filter α) where
  σ : Type*
  F : CFilter (Set α) σ
  eq : F.toFilter = f

{α : Type u_1}
{f : Filter α}
(self : f.Realizer)


theorem insert_diff_singleton_comm (hab : a ≠ b) (s : Set α) :
    insert a (s \ {b}) = insert a s \ {b}

{α : Type u}
{a b : α}
(hab : a ≠ b)
(s : Set α)


@[simp]
theorem gcdA_zero_left {s : R} : gcdA 0 s = 0

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{s : R}


/-- The seminorm of an element in a product space is `≤ r` if and only if the norm of each
component is. -/
@[to_additive pi_norm_le_iff_of_nonneg "The seminorm of an element in a product space is `≤ r` if
and only if the norm of each component is."]
lemma pi_norm_le_iff_of_nonneg' (hr : 0 ≤ r) : ‖x‖ ≤ r ↔ ∀ i, ‖x i‖ ≤ r

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedAddGroup (π i)]
{x : (i : ι) → π i}
{r : ℝ}
(hr : 0 ≤ r)


@[simp]
theorem toSet_pair (x y : ZFSet.{u}) : (pair x y).toSet = {{x}, {x, y}}


/-- If `A` and `B` are isomorphic, then an ind-object presentation of `A` can be extended to an
    ind-object presentation of `B`. -/
@[simps!]
noncomputable def extend {A B : Cᵒᵖ ⥤ Type v} (P : IndObjectPresentation A) (η : A ⟶ B) [IsIso η] :
    IndObjectPresentation B

{A B : CategoryTheory.Functor Cᵒᵖ (Type v)}

(P : CategoryTheory.Limits.IndObjectPresentation A)


/-- If subtracting two points produces 0, they are equal. -/
theorem eq_of_vsub_eq_zero {p₁ p₂ : P} (h : p₁ -ᵥ p₂ = (0 : G)) : p₁ = p₂

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
{p₁ p₂ : P}
(h : p₁ -ᵥ p₂ = 0)


theorem _root_.BddAbove.continuous_convolution_left_of_integrable
    [FirstCountableTopology G] [SecondCountableTopologyEither G E]
    (hbf : BddAbove (range fun x => ‖f x‖)) (hf : Continuous f) (hg : Integrable g μ) :
    Continuous (f ⋆[L, μ] g)

(hbf : BddAbove (Set.range fun x => ‖f x‖))

Continuous (MeasureTheory.convolution f g L μ)


/-- An `AddSubgroup` is characteristic if it is fixed by all automorphisms.
  Several equivalent conditions are provided by lemmas of the form `Characteristic.iff...` -/
structure Characteristic : Prop where
  /-- `H` is fixed by all automorphisms -/
  fixed : ∀ ϕ : A ≃+ A, H.comap ϕ.toAddMonoidHom = H

{A : Type u_4}
[AddGroup A]
{H : AddSubgroup A}
(self : H.Characteristic)
(ϕ : A ≃+ A)

AddSubgroup.comap ϕ.toAddMonoidHom H = H


protected theorem sup_eq_top_iff {α : Type*} [LinearOrder α] [BoundedOrder α] [Nontrivial α]
    {s : Finset ι} {f : ι → α} : s.sup f = ⊤ ↔ ∃ b ∈ s, f b = ⊤

{ι : Type u_5}
{α : Type u_7}
[LinearOrder α]
[BoundedOrder α]
[Nontrivial α]
{s : Finset ι}
{f : ι → α}


@[simp]
theorem OrderBot.lowerBounds_univ [PartialOrder γ] [OrderBot γ] :
    lowerBounds (univ : Set γ) = {⊥}

{γ : Type w}
[PartialOrder γ]
[OrderBot γ]


@[to_additive (attr := simp)]
theorem coe_prod [CommMonoid β] [ContinuousMul β] {ι : Type*} (s : Finset ι) (f : ι → C(α, β)) :
    ⇑(∏ i ∈ s, f i) = ∏ i ∈ s, (f i : α → β)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[AddCommMonoid β]
[ContinuousAdd β]
{ι : Type u_3}
(s : Finset ι)
(f : ι → C(α, β))


/-- Given two model_with_corners `I` on `(E, H)` and `I'` on `(E', H')`, we define the model with
corners `I.prod I'` on `(E × E', ModelProd H H')`. This appears in particular for the manifold
structure on the tangent bundle to a manifold modelled on `(E, H)`: it will be modelled on
`(E × E, H × E)`. See note [Manifold type tags] for explanation about `ModelProd H H'`
vs `H × H'`. -/
@[simps (config := .lemmasOnly)]
def ModelWithCorners.prod {𝕜 : Type u} [NontriviallyNormedField 𝕜] {E : Type v}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type w} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) {E' : Type v'} [NormedAddCommGroup E'] [NormedSpace 𝕜 E']
    {H' : Type w'} [TopologicalSpace H'] (I' : ModelWithCorners 𝕜 E' H') :
    ModelWithCorners 𝕜 (E × E') (ModelProd H H')

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type w}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{E' : Type v'}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type w'}
[TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H')
(x : E × E')

↑(I.prod I').symm x = (↑I.symm x.1, ↑I'.symm x.2)


lemma HasLineDerivWithinAt.mono (hf : HasLineDerivWithinAt 𝕜 f f' s x v) (hst : t ⊆ s) :
    HasLineDerivWithinAt 𝕜 f f' t x v


/-- An isomorphism `X ⟶ Y` is an open cover of `Y`. -/
@[simps J obj map]
def openCoverOfIsIso {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso f] : OpenCover.{v} Y

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

∀ (x : PUnit.{v + 1}), (AlgebraicGeometry.Scheme.openCoverOfIsIso f).map x = f


@[to_additive]
theorem le_mul_of_le_of_one_le [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (hbc : b ≤ c)
    (ha : 1 ≤ a) :
    b ≤ c * a

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


@[simp]
theorem setLIntegral_deterministic {f : β → ℝ≥0∞} {g : α → β} {a : α} (hg : Measurable g)
    [MeasurableSingletonClass β] (s : Set β) [Decidable (g a ∈ s)] :
    ∫⁻ x in s, f x ∂deterministic g hg a = if g a ∈ s then f (g a) else 0

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{f : β → ℝ≥0∞}
{g : α → β}
{a : α}
(hg : Measurable g)
[MeasurableSingletonClass β]
(s : Set β)
[Decidable (g a ∈ s)]

∫⁻ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = if g a ∈ s then f (g a) else 0


theorem comap_exp_nhdsWithin_zero : comap exp (𝓝[≠] 0) = comap re atBot

Filter.comap Complex.exp (𝓝[≠] 0) = Filter.comap Complex.re Filter.atBot


theorem Filter.Tendsto.limUnder_eq {x : X} {f : Filter Y} [NeBot f] {g : Y → X}
    (h : Tendsto g f (𝓝 x)) : @limUnder _ _ _ ⟨x⟩ f g = x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T2Space X]
{x : X}
{f : Filter Y}
[f.NeBot]
{g : Y → X}
(h : Filter.Tendsto g f (𝓝 x))


/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the default sheaf condition.
-/
theorem isSheaf_iff_isSheafEqualizerProducts (F : Presheaf C X) :
    F.IsSheaf ↔ F.IsSheafEqualizerProducts

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
{X : TopCat}
(F : TopCat.Presheaf C X)


@[fun_prop]
theorem ContinuousAt.div₀ (hf : ContinuousAt f a) (hg : ContinuousAt g a) (h₀ : g a ≠ 0) :
    ContinuousAt (fun x => f x / g x) a

{α : Type u_1}
{G₀ : Type u_3}
[GroupWithZero G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
[ContinuousMul G₀]
{f g : α → G₀}
[TopologicalSpace α]
{a : α}
(hf : ContinuousAt f a)
(hg : ContinuousAt g a)
(h₀ : g a ≠ 0)


/-- Definition of `IsBigO` in terms of filters. -/
theorem isBigO_iff : f =O[l] g ↔ ∃ c : ℝ, ∀ᶠ x in l, ‖f x‖ ≤ c * ‖g x‖

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{l : Filter α}

f =O[l] g ↔ ∃ c, ∀ᶠ (x : α) in l, ‖f x‖ ≤ c * ‖g x‖


theorem right_comm : Commutative f → Associative f → RightCommutative f


theorem comap_comap (s : Subring T) (g : S →+* T) (f : R →+* S) :
    (s.comap g).comap f = s.comap (g.comp f)

{R : Type u}
{S : Type v}
{T : Type w}
[Ring R]
[Ring S]
[Ring T]
(s : Subring T)
(g : S →+* T)
(f : R →+* S)

Subring.comap f (Subring.comap g s) = Subring.comap (g.comp f) s


@[simp] lemma mul_den_eq_num (q : ℚ≥0) : q * q.den = q.num


@[simp]
theorem restrict_sum (μ : ι → Measure α) {s : Set α} (hs : MeasurableSet s) :
    (sum μ).restrict s = sum fun i => (μ i).restrict s

{α : Type u_2}
{ι : Type u_6}
{m0 : MeasurableSpace α}
(μ : ι → MeasureTheory.Measure α)
{s : Set α}
(hs : MeasurableSet s)

(MeasureTheory.Measure.sum μ).restrict s = MeasureTheory.Measure.sum fun i => (μ i).restrict s


theorem infinitesimal_pos_iff_infinitePos_inv {x : ℝ*} :
    InfinitePos x⁻¹ ↔ Infinitesimal x ∧ 0 < x

x⁻¹.InfinitePos ↔ x.Infinitesimal ∧ 0 < x


@[simp]
theorem swap_lt_swap : x.swap < y.swap ↔ x < y

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{x y : α × β}


theorem weightedSMul_apply {m : MeasurableSpace α} (μ : Measure α) (s : Set α) (x : F) :
    weightedSMul μ s x = (μ s).toReal • x

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
(s : Set α)
(x : F)

(MeasureTheory.weightedSMul μ s) x = (μ s).toReal • x


/-- This result only holds for `DivisionSemiring`s instead of `GroupWithZero`s because zeta takes
values in ℕ, and hence the coercion requires an `AddMonoidWithOne`. TODO: Generalise zeta -/
@[simp]
theorem pdiv_zeta [DivisionSemiring R] (f : ArithmeticFunction R) :
    pdiv f zeta = f

{R : Type u_1}
[DivisionSemiring R]
(f : ArithmeticFunction R)


@[simp]
theorem map_rightInverse [Nonempty α] [Nonempty γ] {f₁ : α → β} {g₁ : γ → δ} {f₂ : β → α}
    {g₂ : δ → γ} : RightInverse (map f₁ g₁) (map f₂ g₂) ↔ RightInverse f₁ f₂ ∧ RightInverse g₁ g₂

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[Nonempty α]
[Nonempty γ]
{f₁ : α → β}
{g₁ : γ → δ}
{f₂ : β → α}
{g₂ : δ → γ}

Function.RightInverse (Prod.map f₁ g₁) (Prod.map f₂ g₂) ↔ Function.RightInverse f₁ f₂ ∧ Function.RightInverse g₁ g₂


lemma polynomialX_eq : W'.polynomialX =
    C W'.a₁ * X 1 * X 2 - (C 3 * X 0 ^ 2 + C (2 * W'.a₂) * X 0 * X 2 ^ 2 + C W'.a₄ * X 2 ^ 4)

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}

W'.polynomialX =
  MvPolynomial.C W'.a₁ * MvPolynomial.X y * MvPolynomial.X z -
    (MvPolynomial.C 3 * MvPolynomial.X x ^ 2 + MvPolynomial.C (2 * W'.a₂) * MvPolynomial.X x * MvPolynomial.X z ^ 2 +
      MvPolynomial.C W'.a₄ * MvPolynomial.X z ^ 4)


theorem card_image₂_singleton_left (hf : Injective (f a)) : (image₂ f {a} t).card = t.card

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
(t : Finset β)
{a : α}
(hf : Function.Injective (f a))


lemma setLIntegral_toKernel_univ [IsFiniteKernel κ] (hf : IsCondKernelCDF f κ ν)
    (a : α) {s : Set β} (hs : MeasurableSet s) :
    ∫⁻ b in s, hf.toKernel f (a, b) univ ∂(ν a) = κ a (s ×ˢ univ)

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

(hf : ProbabilityTheory.IsCondKernelCDF f κ ν)

∫⁻ (b : β) in s, ((ProbabilityTheory.IsCondKernelCDF.toKernel f hf) (a, b)) Set.univ ∂ν a = (κ a) (s ×ˢ Set.univ)


@[simp]
lemma exists_apply_eq_apply3' {α β γ δ} {f : α → β → γ → δ} {a : α} {b : β} {c : γ} :
    ∃ x y z, f a b c = f x y z

{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
{δ : Sort u_6}
{f : α → β → γ → δ}
{a : α}
{b : β}
{c : γ}


theorem cases_head (h : ReflTransGen r a b) : a = b ∨ ∃ c, r a c ∧ ReflTransGen r c b

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

a = b ∨ ∃ c, r a c ∧ Relation.ReflTransGen r c b


/-- The functor `Karoubi (HomologicalComplex C c) ⥤ HomologicalComplex (Karoubi C) c`. -/
@[simps]
def functor : Karoubi (HomologicalComplex C c) ⥤ HomologicalComplex (Karoubi C) c

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{ι : Type u_2}
{c : ComplexShape ι}

∀ {X Y : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C c)} (f : X ⟶ Y),
  CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.functor.map f =
    CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Functor.map f


@[reassoc (attr := simp)]
theorem prod.map_snd {W X Y Z : C} [HasBinaryProduct W X] [HasBinaryProduct Y Z] (f : W ⟶ Y)
    (g : X ⟶ Z) : prod.map f g ≫ prod.snd = prod.snd ≫ g

CategoryTheory.Limits.prod.map f g ≫ CategoryTheory.Limits.prod.snd = CategoryTheory.Limits.prod.snd ≫ g


@[to_additive]
lemma fn_max_mul_fn_min (f : α → β) (a b : α) : f (max a b) * f (min a b) = f a * f b

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[CommSemigroup β]
(f : α → β)
(a b : α)


@[simp] theorem coe_id_of {X : Type u} [CommRing X] :
    @DFunLike.coe no_index (CommRingCat.of X ⟶ CommRingCat.of X) X
      (fun _ ↦ X) _
      (𝟙 (of X)) =
    @DFunLike.coe (X →+* X) X (fun _ ↦ X) _ (RingHom.id X)

⇑(𝟙 (CommRingCat.of X)) = ⇑(RingHom.id X)


theorem NeZero.ne (n : R) [h : NeZero n] : n ≠ 0

{R : Type u_1}
[Zero R]
(n : R)
[h : NeZero n]


@[simp] theorem zero_im : (0 : ℍ[R,c₁,c₂]).im = 0


/-- Bijection between a subgroup `H` and its opposite. -/
@[to_additive (attr := simps!) "Bijection between an additive subgroup `H` and its opposite."]
def equivOp (H : Subgroup G) : H ≃ H.op

{G : Type u_2}
[AddGroup G]
(H : AddSubgroup G)
(a : { a // (fun x => x ∈ H) a })


/-- The derivative of `tan x - x` is `1/(cos x)^2 - 1` away from the zeroes of cos. -/
theorem deriv_tan_sub_id (x : ℝ) (h : cos x ≠ 0) :
    deriv (fun y : ℝ => tan y - y) x = 1 / cos x ^ 2 - 1

deriv (fun y => Real.tan y - y) x = 1 / Real.cos x ^ 2 - 1


theorem HasAffineProperty.diagonal_iff
    (P) {Q} [HasAffineProperty P Q] {X Y} {f : X ⟶ Y} [IsAffine Y] :
    Q.diagonal f ↔ P.diagonal f

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)


/-- Multiplication `y ↦ x * y` as an `IsometryEquiv`. -/
@[to_additive (attr := simps! apply toEquiv) "Addition `y ↦ x + y` as an `IsometryEquiv`."]
def mulLeft [IsometricSMul G G] (c : G) : G ≃ᵢ G

{G : Type v}
[AddGroup G]
[PseudoEMetricSpace G]
[IsometricVAdd G G]
(c x : G)


/-- The antidiagonal of `n` does not contain duplicate entries. -/
theorem nodup_antidiagonalTuple (k n : ℕ) : List.Nodup (antidiagonalTuple k n)


theorem _root_.IsFractional.map (g : P →ₐ[R] P') {I : Submodule R P} :
    IsFractional S I → IsFractional S (Submodule.map g.toLinearMap I)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{P' : Type u_3}
[CommRing P']
[Algebra R P']
(g : P →ₐ[R] P')
{I : Submodule R P}


@[simp]
theorem cpow_one (x : ℂ) : x ^ (1 : ℂ) = x


theorem span_algebraMap_image_of_tower {S T : Type*} [CommSemiring S] [Semiring T] [Module R S]
    [Algebra R T] [Algebra S T] [IsScalarTower R S T] (a : Set S) :
    Submodule.span R (algebraMap S T '' a) =
      (Submodule.span R a).map ((Algebra.linearMap S T).restrictScalars R)

{R : Type u}
[CommSemiring R]
{S : Type u_1}
{T : Type u_2}
[CommSemiring S]
[Semiring T]
[Module R S]
[Algebra R T]
[Algebra S T]
[IsScalarTower R S T]
(a : Set S)

Submodule.span R (⇑(algebraMap S T) '' a) = Submodule.map (↑R (Algebra.linearMap S T)) (Submodule.span R a)


@[simp]
theorem contDiffOn_zero : ContDiffOn 𝕜 0 f s ↔ ContinuousOn f s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}


@[simp]
theorem lift_aleph0 : lift ℵ₀ = ℵ₀

Cardinal.lift.{u_1, u_2} Cardinal.aleph0 = Cardinal.aleph0


@[simp]
lemma _root_.absorbs_union : Absorbs M s (t₁ ∪ t₂) ↔ Absorbs M s t₁ ∧ Absorbs M s t₂

{M : Type u_1}
{α : Type u_2}
[Bornology M]
[SMul M α]
{s t₁ t₂ : Set α}


@[to_additive]
theorem toFreeSemigroup_comp_map (f : α → β) :
    toFreeSemigroup.comp (map f) = (FreeSemigroup.map f).comp toFreeSemigroup

FreeMagma.toFreeSemigroup.comp (FreeMagma.map f) = (FreeSemigroup.map f).comp FreeMagma.toFreeSemigroup


theorem commute_add_int : ∀ n : ℤ, Function.Commute f (· + n)


theorem degree_sub_le_of_le {a b : WithBot ℕ} (hp : degree p ≤ a) (hq : degree q ≤ b) :
    degree (p - q) ≤ max a b

{R : Type u}
[Ring R]
{p q : R[X]}
{a b : WithBot ℕ}
(hp : p.degree ≤ a)
(hq : q.degree ≤ b)


/-- A predictable supermartingale is a.e. less equal than its initial state. -/
theorem Supermartingale.le_zero_of_predictable [Preorder E] [SigmaFiniteFiltration μ 𝒢]
    {f : ℕ → Ω → E} (hfmgle : Supermartingale f 𝒢 μ) (hfadp : Adapted 𝒢 fun n => f (n + 1))
    (n : ℕ) : f n ≤ᵐ[μ] f 0

(hfmgle : MeasureTheory.Supermartingale f 𝒢 μ)

(hfadp : MeasureTheory.Adapted 𝒢 fun n => f (n + 1))


@[simp]
theorem coe_to_GLPos_to_GL_det (g : SpecialLinearGroup n R) :
    Matrix.GeneralLinearGroup.det ((g : GLPos n R) : GL n R) = 1

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[LinearOrderedCommRing R]
(g : Matrix.SpecialLinearGroup n R)

Matrix.GeneralLinearGroup.det ↑(Matrix.SpecialLinearGroup.toGLPos g) = 1


@[simp] theorem find?_map (f : β → α) (l : List β) : find? p (l.map f) = (l.find? (p ∘ f)).map f

{β : Type u_1}
{α : Type u_2}
{p : α → Bool}
(f : β → α)
(l : List β)

List.find? p (List.map f l) = Option.map f (List.find? (p ∘ f) l)


@[to_additive]
theorem closure_range_of : closure (Set.range <| @of α) = ⊤

Submonoid.closure (Set.range FreeMonoid.of) = ⊤


lemma preΨ'_ne_zero [Nontrivial R] {n : ℕ} (h : (n : R) ≠ 0) : W.preΨ' n ≠ 0

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
[Nontrivial R]
{n : ℕ}
(h : ↑n ≠ 0)


theorem midpoint_eq_iff' {x y z : P} : midpoint R x y = z ↔ Equiv.pointReflection z x = y

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

midpoint R x y = z ↔ (Equiv.pointReflection z) x = y


lemma monovaryOn_iff_forall_mul_nonneg :
    MonovaryOn f g s ↔ ∀ ⦃i⦄, i ∈ s → ∀ ⦃j⦄, j ∈ s → 0 ≤ (f j - f i) * (g j - g i)

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{f g : ι → α}
{s : Set ι}

MonovaryOn f g s ↔ ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ s → 0 ≤ (f j - f i) * (g j - g i)


@[simp] theorem mapM_cons [Monad m] [LawfulMonad m] (f : α → m β) :
    (a :: l).mapM f = (return (← f a) :: (← l.mapM f))

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
{a : α}
{l : List α}
[Monad m]
[LawfulMonad m]
(f : α → m β)

List.mapM f (a :: l) = do
  let __do_lift ← f a
  let __do_lift_1 ← List.mapM f l
  pure (__do_lift :: __do_lift_1)


theorem reachable_iff_exists_finsetWalkLength_nonempty (u v : V) :
    G.Reachable u v ↔ ∃ n : Fin (Fintype.card V), (G.finsetWalkLength n u v).Nonempty

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

G.Reachable u v ↔ ∃ n, (G.finsetWalkLength (↑n) u v).Nonempty


@[to_additive]
theorem lt_inv_iff_mul_lt_one' : a < b⁻¹ ↔ b * a < 1

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


/-- The differential on the complex of morphisms between cochain complexes, as a linear map. -/
@[simps!]
def δ_hom : Cochain F G n →ₗ[R] Cochain F G m

(z : CochainComplex.HomComplex.Cochain F G n)

(CochainComplex.HomComplex.δ_hom R F G n m) z = CochainComplex.HomComplex.δ n m z


theorem star_def [∀ i, Star (f i)] (x : ∀ i, f i) : star x = fun i => star (x i)

{I : Type u}
{f : I → Type v}
[(i : I) → Star (f i)]
(x : (i : I) → f i)


theorem expSeries_apply_eq (x : 𝔸) (n : ℕ) :
    (expSeries 𝕂 𝔸 n fun _ => x) = (n !⁻¹ : 𝕂) • x ^ n

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[Field 𝕂]
[Ring 𝔸]
[Algebra 𝕂 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
(x : 𝔸)
(n : ℕ)

((NormedSpace.expSeries 𝕂 𝔸 n) fun x_1 => x) = (↑n.factorial)⁻¹ • x ^ n


/-- Cauchy–Schwarz inequality with norm -/
theorem norm_inner_le_norm (x y : F) : ‖⟪x, y⟫‖ ≤ ‖x‖ * ‖y‖

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

‖⟪x, y⟫_𝕜‖ ≤ ‖x‖ * ‖y‖