@[simp]
theorem map_id_obj (U : Opens X) : (map (𝟙 X)).obj U = U

{X : TopCat}
(U : TopologicalSpace.Opens ↑X)

(TopologicalSpace.Opens.map (𝟙 X)).obj U = U


theorem sub_mem_Icc_iff_left : a - b ∈ Set.Icc c d ↔ a ∈ Set.Icc (c + b) (d + b)

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


theorem Basis'.basis (hI : M.Basis' I X) (hX : X ⊆ M.E := by aesop_mat) : M.Basis I X

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hI : M.Basis' I X)
(hX : X ⊆ M.E := by aesop_mat)


theorem pimage_union [DecidableEq α] : (s ∪ t).pimage f = s.pimage f ∪ t.pimage f

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{f : α →. β}
[(x : α) → Decidable (f x).Dom]
{s t : Finset α}
[DecidableEq α]

Finset.pimage f (s ∪ t) = Finset.pimage f s ∪ Finset.pimage f t


@[simp]
theorem deriv_add (P Q : RegularExpression α) (a : α) : deriv (P + Q) a = deriv P a + deriv Q a

{α : Type u_1}
[dec : DecidableEq α]
(P Q : RegularExpression α)
(a : α)


lemma isIso_homologyMap_of_epi_of_isIso_of_mono' (φ : S₁ ⟶ S₂) [S₁.HasHomology] [S₂.HasHomology]
    (h₁ : Epi φ.τ₁) (h₂ : IsIso φ.τ₂) (h₃ : Mono φ.τ₃) :
    IsIso (homologyMap φ)


lemma baseChange_negY (x y : A) :
    (W.baseChange B).toAffine.negY (f x) (f y) = f ((W.baseChange A).toAffine.negY x y)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type s}
[CommRing S]
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)
(x y : A)

(WeierstrassCurve.baseChange W B).toAffine.negY (f x) (f y) = f ((WeierstrassCurve.baseChange W A).toAffine.negY x y)


/-- If `f : α → E` is a function such that `norm ∘ f` has a maximum on a set `s` at a point `c` and
`y` is a vector on the same ray as `f c`, then the function `fun x => ‖f x + y‖` has a maximum
on `s` at `c`. -/
theorem IsMaxOn.norm_add_sameRay (h : IsMaxOn (norm ∘ f) s c) (hy : SameRay ℝ (f c) y) :
    IsMaxOn (fun x => ‖f x + y‖) s c

{α : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{f : α → E}
{s : Set α}
{c : α}
{y : E}
(h : IsMaxOn (norm ∘ f) s c)
(hy : SameRay ℝ (f c) y)


theorem uniformEmbedding_coe_real : UniformEmbedding ((↑) : ℤ → ℝ)


/-- The difference between two points lies in their `vectorSpan`. -/
theorem vsub_mem_vectorSpan_pair (p₁ p₂ : P) : p₁ -ᵥ p₂ ∈ vectorSpan k ({p₁, p₂} : Set P)

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(p₁ p₂ : P)


theorem isOrtho_comm {x y : M} : IsOrtho Q x y ↔ IsOrtho Q y x

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{Q : QuadraticMap R M N}
{x y : M}


theorem mapQ_mkQ (f : M →ₛₗ[τ₁₂] M₂) {h} : (mapQ p q f h).comp p.mkQ = q.mkQ.comp f

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
{R₂ : Type u_3}
{M₂ : Type u_4}
[Ring R₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
(q : Submodule R₂ M₂)
(f : M →ₛₗ[τ₁₂] M₂)
{h : p ≤ Submodule.comap f q}

(p.mapQ q f h).comp p.mkQ = q.mkQ.comp f


theorem tendstoUniformlyOn_iff_tendstoUniformlyOnFilter :
    TendstoUniformlyOn F f p s ↔ TendstoUniformlyOnFilter F f p (𝓟 s)

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


@[simp, norm_cast]
theorem ofReal_one : ((1 : ℝ) : ℂ) = 1


theorem continuousAt_extChartAt' {x x' : M} (h : x' ∈ (extChartAt I x).source) :
    ContinuousAt (extChartAt I x) x'

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
{x x' : M}
(h : x' ∈ (extChartAt I x).source)


@[simp]
theorem prodPrimeFactors_apply [CommMonoidWithZero R] {f : ℕ → R} {n : ℕ} (hn : n ≠ 0) :
    ∏ᵖ p ∣ n, f p = ∏ p ∈ n.primeFactors, f p

{R : Type u_1}
[CommMonoidWithZero R]
{f : ℕ → R}
{n : ℕ}
(hn : n ≠ 0)

(ArithmeticFunction.prodPrimeFactors fun p => f p) n = ∏ p ∈ n.primeFactors, f p


@[simp] theorem smul_imK [SMul S R] (s : S) : (s • a).imK = s • a.imK

{S : Type u_1}
{R : Type u_3}
[CommRing R]
(a : ℍ[R])
[SMul S R]
(s : S)


theorem powersetAux_eq_map_coe {l : List α} : powersetAux l = (sublists l).map (↑)

Multiset.powersetAux l = List.map Multiset.ofList l.sublists


@[simp]
theorem toDeleteEdges_nil (s : Set (Sym2 V)) {v : V} (hp) :
    (Walk.nil : G.Walk v v).toDeleteEdges s hp = Walk.nil

(hp : ∀ e ∈ SimpleGraph.Walk.nil.edges, e ∉ s)

SimpleGraph.Walk.toDeleteEdges s SimpleGraph.Walk.nil hp = SimpleGraph.Walk.nil


/-- Given a compact set `K` inside an open set `U`, there is an open neighborhood `V` of `1`
  such that `K * V ⊆ U`. -/
@[to_additive
  "Given a compact set `K` inside an open set `U`, there is an open neighborhood `V` of
  `0` such that `K + V ⊆ U`."]
theorem compact_open_separated_mul_right {K U : Set G} (hK : IsCompact K) (hU : IsOpen U)
    (hKU : K ⊆ U) : ∃ V ∈ 𝓝 (1 : G), K * V ⊆ U

{G : Type w}
[TopologicalSpace G]
[AddZeroClass G]
[ContinuousAdd G]
{K U : Set G}
(hK : IsCompact K)
(hU : IsOpen U)
(hKU : K ⊆ U)


/-- Any additive functor `C ⥤ D` to a category `D` with finite biproducts extends to
a functor `Mat_ C ⥤ D`. -/
@[simps]
def lift (F : C ⥤ D) [Functor.Additive F] : Mat_ C ⥤ D

∀ {X Y : CategoryTheory.Mat_ C} (f : X ⟶ Y),
  (CategoryTheory.Mat_.lift F).map f = CategoryTheory.Limits.biproduct.matrix fun i j => F.map (f i j)


@[to_additive]
theorem ExponentExists.isOfFinOrder (h : ExponentExists G) {g : G} : IsOfFinOrder g

{G : Type u}
[Monoid G]
(h : Monoid.ExponentExists G)
{g : G}


/-- We define `Tor C n : C ⥤ C ⥤ C` by left-deriving in the second factor of `(X, Y) ↦ X ⊗ Y`. -/
@[simps]
def Tor (n : ℕ) : C ⥤ C ⥤ C

∀ {X Y : C} (f : X ⟶ Y),
  (CategoryTheory.Tor C n).map f =
    CategoryTheory.NatTrans.leftDerived ((CategoryTheory.MonoidalCategory.tensoringLeft C).map f) n


@[to_additive (attr := simp)]
lemma smul_coe_set [Group G] [SetLike S G] [SubgroupClass S G] {s : S} {a : G} (ha : a ∈ s) :
    a • (s : Set G) = s

{G : Type u_2}
{S : Type u_4}
[AddGroup G]
[SetLike S G]
[AddSubgroupClass S G]
{s : S}
{a : G}
(ha : a ∈ s)


theorem continuousMapEval_bijective : Bijective (continuousMapEval X 𝕜)

(X : Type u_1)
(𝕜 : Type u_2)
[TopologicalSpace X]
[CompactSpace X]
[T2Space X]
[RCLike 𝕜]

Function.Bijective ⇑(WeakDual.CharacterSpace.continuousMapEval X 𝕜)


theorem setToL1_eq_setToL1' (hT : DominatedFinMeasAdditive μ T C)
    (h_smul : ∀ c : 𝕜, ∀ s x, T s (c • x) = c • T s x) (f : α →₁[μ] E) :
    setToL1 hT f = setToL1' 𝕜 hT h_smul f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(h_smul : ∀ (c : 𝕜) (s : Set α) (x : E), (T s) (c • x) = c • (T s) x)

(MeasureTheory.L1.setToL1 hT) f = (MeasureTheory.L1.setToL1' 𝕜 hT h_smul) f


/-- For a function `f` on `𝕜`, and `z₀ ∈ 𝕜`, there exists at most one `n` such that on a
neighbourhood of `z₀` we have `f z = (z - z₀) ^ n • g z`, with `g` analytic and nonvanishing at
`z₀`. -/
lemma unique_eventuallyEq_pow_smul_nonzero {m n : ℕ}
    (hm : ∃ g, AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧ ∀ᶠ z in 𝓝 z₀, f z = (z - z₀) ^ m • g z)
    (hn : ∃ g, AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧ ∀ᶠ z in 𝓝 z₀, f z = (z - z₀) ^ n • g z) :
    m = n

(hm : ∃ g, AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ m • g z)

(hn : ∃ g, AnalyticAt 𝕜 g z₀ ∧ g z₀ ≠ 0 ∧ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ n • g z)


theorem exists₂_congr {p q : ∀ a, β a → Prop} (h : ∀ a b, p a b ↔ q a b) :
    (∃ a b, p a b) ↔ ∃ a b, q a b

(h : ∀ (a : α) (b : β a), p a b ↔ q a b)


theorem norm_eq_ciSup (f : lp E ∞) : ‖f‖ = ⨆ i, ‖f i‖

{α : Type u_1}
{E : α → Type u_2}
[(i : α) → NormedAddCommGroup (E i)]
(f : ↥(lp E ⊤))

‖f‖ = ⨆ i, ‖↑f i‖


@[simp]
theorem _root_.Cardinal.toPartENat_lt_natCast_iff {n : ℕ} {c : Cardinal} :
    toPartENat c < ↑n ↔ c < ↑n


/-- Convex **strict Jensen inequality**.

If the function is strictly convex, the weights are strictly positive and the indexed family of
points is non-constant, then Jensen's inequality is strict.

See also `StrictConvexOn.map_sum_eq_iff`. -/
lemma StrictConvexOn.map_sum_lt (hf : StrictConvexOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 < w i)
    (h₁ : ∑ i ∈ t, w i = 1) (hmem : ∀ i ∈ t, p i ∈ s) (hp : ∃ j ∈ t, ∃ k ∈ t, p j ≠ p k) :
    f (∑ i ∈ t, w i • p i) < ∑ i ∈ t, w i • f (p i)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
{ι : Type u_5}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[OrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Finset ι}
{w : ι → 𝕜}
{p : ι → E}
(hf : StrictConvexOn 𝕜 s f)
(h₀ : ∀ i ∈ t, 0 < w i)
(h₁ : ∑ i ∈ t, w i = 1)
(hmem : ∀ i ∈ t, p i ∈ s)
(hp : ∃ j ∈ t, ∃ k ∈ t, p j ≠ p k)


theorem le_sub_of_le {a b c : Ordinal} (h : b ≤ a) : c ≤ a - b ↔ b + c ≤ a


/-- For any natural numbers n, a, and b, one of the following holds:
1. n < a
2. n ≥ b
3. n ∈ Ico a b
-/
theorem trichotomy (n a b : ℕ) : n < a ∨ b ≤ n ∨ n ∈ Ico a b


/-- `Groupoid.inv` is involutive. -/
@[simps]
def Groupoid.invEquiv : (X ⟶ Y) ≃ (Y ⟶ X)

{C : Type u}
[CategoryTheory.Groupoid C]
{X Y : C}

∀ (a : Y ⟶ X), CategoryTheory.Groupoid.invEquiv.symm a = CategoryTheory.Groupoid.inv a


/-- If `fab : α → β` semiconjugates `ga` to `gb` and `fbc : β → γ` semiconjugates `gb` to `gc`,
then `fbc ∘ fab` semiconjugates `ga` to `gc`.

See also `Function.Semiconj.comp_left` for a version with reversed arguments. -/
protected theorem trans (hab : Semiconj fab ga gb) (hbc : Semiconj fbc gb gc) :
    Semiconj (fbc ∘ fab) ga gc

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{fab : α → β}
{fbc : β → γ}
{ga : α → α}
{gb : β → β}
{gc : γ → γ}
(hab : Function.Semiconj fab ga gb)
(hbc : Function.Semiconj fbc gb gc)


/-- Given three points not equal to `p`, the angle between the first and the second at `p` plus
the angle between the second and the third equals the angle between the first and the third. -/
@[simp]
theorem oangle_add {p p₁ p₂ p₃ : P} (hp₁ : p₁ ≠ p) (hp₂ : p₂ ≠ p) (hp₃ : p₃ ≠ p) :
    ∡ p₁ p p₂ + ∡ p₂ p p₃ = ∡ p₁ p p₃

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


theorem Specializes.joinedIn (h : x ⤳ y) (hx : x ∈ F) (hy : y ∈ F) : JoinedIn F x y

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{F : Set X}
(h : x ⤳ y)
(hx : x ∈ F)
(hy : y ∈ F)


@[simp]
lemma Γ₂N₂ToKaroubiIso_hom_app (X : SimplicialObject C) :
    Γ₂N₂ToKaroubiIso.hom.app X = Γ₂.map (toKaroubiCompN₂IsoN₁.hom.app X)

AlgebraicTopology.DoldKan.Γ₂N₂ToKaroubiIso.hom.app X =
  AlgebraicTopology.DoldKan.Γ₂.map (AlgebraicTopology.DoldKan.toKaroubiCompN₂IsoN₁.hom.app X)


@[to_additive (attr := simp)]
lemma ofUnits_inf_units (S T : Subgroup Mˣ) : (S.ofUnits ⊓ T.ofUnits).units = S ⊓ T

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

(S.ofAddUnits ⊓ T.ofAddUnits).addUnits = S ⊓ T


/-- If `f : H →* G` is injective, then `Finite (Sylow p G)` implies `Finite (Sylow p H)`. -/
theorem Sylow.finite_of_injective {H : Type*} [Group H] {f : H →* G}
    (hf : Function.Injective f) [Finite (Sylow p G)] : Finite (Sylow p H)

{p : ℕ}
{G : Type u_1}
[Group G]
{H : Type u_2}
[Group H]
{f : H →* G}
(hf : Function.Injective ⇑f)
[Finite (Sylow p G)]


theorem mem_cofinite : s ∈ μ.cofinite ↔ μ sᶜ < ∞

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}


/-- The unit isomorphism of `equivalence`. -/
@[simps!]
def equivalenceUnitIso : 𝟭 A ≅ (F ⋙ eB.inverse) ⋙ G

(hG : eB.functor ⋙ e'.inverse ≅ G ⋙ eA.functor)

(AlgebraicTopology.DoldKan.Compatibility.equivalenceUnitIso hG ε).hom.app X =
  eA.unitIso.hom.app X ≫
    eA.inverse.map (ε.hom.app X) ≫
      eA.inverse.map (e'.inverse.map (eB.counitIso.inv.app (F.obj X))) ≫
        eA.inverse.map (hG.hom.app (eB.inverse.obj (F.obj X))) ≫ eA.unitIso.inv.app (G.obj (eB.inverse.obj (F.obj X)))


/-- A category is adhesive if it has pushouts and pullbacks along monomorphisms,
and such pushouts are van Kampen. -/
class Adhesive (C : Type u) [Category.{v} C] : Prop where
  [hasPullback_of_mono_left : ∀ {X Y S : C} (f : X ⟶ S) (g : Y ⟶ S) [Mono f], HasPullback f g]
  [hasPushout_of_mono_left : ∀ {X Y S : C} (f : S ⟶ X) (g : S ⟶ Y) [Mono f], HasPushout f g]
  van_kampen : ∀ {W X Y Z : C} {f : W ⟶ X} {g : W ⟶ Y} {h : X ⟶ Z} {i : Y ⟶ Z} [Mono f]
    (H : IsPushout f g h i), H.IsVanKampen

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


@[simp]
theorem smul_mem_pointwise_smul_iff₀ {a : α} (ha : a ≠ 0) (S : AddSubgroup A) (x : A) :
    a • x ∈ a • S ↔ x ∈ S

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[GroupWithZero α]
[DistribMulAction α A]
{a : α}
(ha : a ≠ 0)
(S : AddSubgroup A)
(x : A)


theorem liftPred_const {p : β → Prop} {x : β} (hx : p x) : LiftPred p (↑x : Germ l β)

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{p : β → Prop}
{x : β}
(hx : p x)


theorem _root_.HasStrictDerivAt.rpow {f g : ℝ → ℝ} {f' g' : ℝ} (hf : HasStrictDerivAt f f' x)
    (hg : HasStrictDerivAt g g' x) (h : 0 < f x) : HasStrictDerivAt (fun x => f x ^ g x)
      (f' * g x * f x ^ (g x - 1) + g' * f x ^ g x * Real.log (f x)) x

{x : ℝ}
{f g : ℝ → ℝ}
{f' g' : ℝ}
(hf : HasStrictDerivAt f f' x)
(hg : HasStrictDerivAt g g' x)
(h : 0 < f x)


@[simp] lemma edgeSet_nonempty : G.edgeSet.Nonempty ↔ G ≠ ⊥


/-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U

{X : TopCat}
{ι : Type w}
(U : ι → TopologicalSpace.Opens ↑X)
{Y : TopologicalSpace.Opens ↑X}
(hY : Y = iSup U)

(TopCat.Presheaf.generateEquivalenceOpensLe U hY).counitIso = CategoryTheory.eqToIso ⋯


@[to_additive]
theorem dist_div_div_le_of_le (h₁ : dist a₁ b₁ ≤ r₁) (h₂ : dist a₂ b₂ ≤ r₂) :
    dist (a₁ / a₂) (b₁ / b₂) ≤ r₁ + r₂

{E : Type u_3}
[SeminormedCommGroup E]
{a₁ a₂ b₁ b₂ : E}
{r₁ r₂ : ℝ}
(h₁ : dist a₁ b₁ ≤ r₁)
(h₂ : dist a₂ b₂ ≤ r₂)


@[to_additive]
theorem comap_map_eq_self_of_injective {f : G →* N} (h : Function.Injective f) (H : Subgroup G) :
    comap f (map f H) = H

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
(h : Function.Injective ⇑f)
(H : AddSubgroup G)

AddSubgroup.comap f (AddSubgroup.map f H) = H


@[reassoc (attr := simp)]
theorem pushoutIsoUnopPullback_inl_hom {X Y Z : C} (f : X ⟶ Z) (g : X ⟶ Y) [HasPushout f g]
    [HasPullback f.op g.op] :
    pushout.inl _ _ ≫ (pushoutIsoUnopPullback f g).hom = (pullback.fst f.op g.op).unop

CategoryTheory.Limits.pushout.inl f g ≫ (CategoryTheory.Limits.pushoutIsoUnopPullback f g).hom =
  (CategoryTheory.Limits.pullback.fst f.op g.op).unop


/-- Reflecting a vector plus a point in the subspace produces the
negation of that vector plus the point if the vector is a multiple of
the result of subtracting a point's orthogonal projection from that
point. -/
theorem reflection_vadd_smul_vsub_orthogonalProjection {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {p₁ : P} (p₂ : P) (r : ℝ) (hp₁ : p₁ ∈ s) :
    reflection s (r • (p₂ -ᵥ orthogonalProjection s p₂) +ᵥ p₁) =
      -(r • (p₂ -ᵥ orthogonalProjection s p₂)) +ᵥ p₁

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

(EuclideanGeometry.reflection s) (r • (p₂ -ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p₂)) +ᵥ p₁) =
  -(r • (p₂ -ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p₂))) +ᵥ p₁


theorem truncate_surjective {m : ℕ} (hm : n ≤ m) : Surjective (@truncate p _ _ R _ _ hm)

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{n : ℕ}
{R : Type u_1}
[CommRing R]
{m : ℕ}
(hm : n ≤ m)


@[simp]
theorem coyonedaEquiv_symm_app_apply {X : C} {F : C ⥤ Type v₁} (x : F.obj X) (Y : C)
    (f : X ⟶ Y) : (coyonedaEquiv.symm x).app Y f = F.map f x

{F : CategoryTheory.Functor C (Type v₁)}

(CategoryTheory.coyonedaEquiv.symm x).app Y f = F.map f x


theorem exists_mem_cons_of_exists {p : α → Prop} {a : α} {l : List α} : (∃ x ∈ l, p x) →
    ∃ x ∈ a :: l, p x

{α : Type u}
{p : α → Prop}
{a : α}
{l : List α}

(∃ x, x ∈ l ∧ p x) → ∃ x, x ∈ a :: l ∧ p x


theorem uniformOfFinset_apply_of_not_mem (ha : a ∉ s) : uniformOfFinset s hs a = 0

{α : Type u_1}
{s : Finset α}
(hs : s.Nonempty)
{a : α}
(ha : a ∉ s)


@[simp, nolint simpNF]
lemma toLawson_inj {a b : α} : toLawson a = toLawson b ↔ a = b

Topology.WithLawson.toLawson a = Topology.WithLawson.toLawson b ↔ a = b


@[simp, norm_cast]
theorem cast_eq_one {n : ℕ} : (n : R) = 1 ↔ n = 1

{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
{n : ℕ}


@[simp]
theorem trop_untrop (x : Tropical R) : trop (untrop x) = x


theorem add_mul_subset : (s + t) * u ⊆ s * u + t * u

{α : Type u_2}
[Distrib α]
(s t u : Set α)


@[simp]
theorem toNNReal_le_toNNReal_iff {r p : ℝ} (hp : 0 ≤ p) :
    toNNReal r ≤ toNNReal p ↔ r ≤ p


theorem tail_dedup [Inhabited α] (l : List α) :
    l.dedup.tail = if l.headI ∈ l.tail then l.tail.dedup.tail else l.tail.dedup

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


@[simp]
protected theorem rightAngleRotation (z : ℂ) :
    Complex.orientation.rightAngleRotation z = I * z

Complex.orientation.rightAngleRotation z = Complex.I * z


theorem multiplicity_le_multiplicity_of_dvd_right {a b c : α} (h : b ∣ c) :
    multiplicity a b ≤ multiplicity a c

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b c : α}
(h : b ∣ c)


theorem adjoin_simple_toSubalgebra_of_integral (hα : IsIntegral F α) :
    F⟮α⟯.toSubalgebra = Algebra.adjoin F {α}

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{α : E}
(hα : IsIntegral F α)


@[simp] lemma _root_.EReal.expHomeomorph_symm : expHomeomorph.symm = logHomeomorph


theorem map_add_atTop_eq_nat (k : ℕ) : map (fun a => a + k) atTop = atTop

Filter.map (fun a => a + k) Filter.atTop = Filter.atTop


@[measurability]
theorem measurable_rnDeriv (s : SignedMeasure α) (μ : Measure α) : Measurable (rnDeriv s μ)

{α : Type u_1}
{m : MeasurableSpace α}
(s : MeasureTheory.SignedMeasure α)
(μ : MeasureTheory.Measure α)


/-- A submonoid `S` includes `closure s` if and only if it includes `s`. -/
@[to_additive (attr := simp)
"An additive submonoid `S` includes `closure s` if and only if it includes `s`"]
theorem closure_le : closure s ≤ S ↔ s ⊆ S

{M : Type u_1}
[AddZeroClass M]
{s : Set M}
{S : AddSubmonoid M}


@[simp]
theorem subtypeDomain_neg : (-v).subtypeDomain p = -v.subtypeDomain p

{α : Type u_1}
{G : Type u_9}
[AddGroup G]
{p : α → Prop}
{v : α →₀ G}

Finsupp.subtypeDomain p (-v) = -Finsupp.subtypeDomain p v


theorem support_C_mul_X_pow' (n : ℕ) (c : R) : Polynomial.support (C c * X ^ n) ⊆ singleton n

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

(Polynomial.C c * Polynomial.X ^ n).support ⊆ {n}


@[simp]
theorem forget₂_obj (X : CoalgebraCat R) :
    (forget₂ (CoalgebraCat R) (ModuleCat R)).obj X = ModuleCat.of R X

{R : Type u}
[CommRing R]
(X : CoalgebraCat R)

(CategoryTheory.forget₂ (CoalgebraCat R) (ModuleCat R)).obj X = ModuleCat.of R ↑X.toModuleCat


theorem infinite_of_infinitesimal_inv {x : ℝ*} (h0 : x ≠ 0) (hi : Infinitesimal x⁻¹) :
    Infinite x

{x : ℝ*}
(h0 : x ≠ 0)
(hi : x⁻¹.Infinitesimal)


@[reassoc (attr := simp)]
theorem isoRestrict_inv_ofRestrict : (isoRestrict f).inv ≫ f = Y.ofRestrict _

{X Y : AlgebraicGeometry.PresheafedSpace C}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

(AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.isoRestrict f).inv ≫ f = Y.ofRestrict ⋯


theorem sup_prod_eq_top {s : Finset ι} {J : ι → Ideal R} (h : ∀ i, i ∈ s → I ⊔ J i = ⊤) :
    (I ⊔ ∏ i ∈ s, J i) = ⊤

{R : Type u}
{ι : Type u_1}
[CommSemiring R]
{I : Ideal R}
{s : Finset ι}
{J : ι → Ideal R}
(h : ∀ i ∈ s, I ⊔ J i = ⊤)


@[simp]
theorem not_prime_zero : ¬Prime (0 : α)


theorem eq_of_linearIndependent_of_span_subtype [Nontrivial R] {s t : Set M}
    (hs : LinearIndependent R (fun x => x : s → M)) (h : t ⊆ s) (hst : s ⊆ span R t) : s = t

(hs : LinearIndependent R fun (x : ↑s) => ↑x)


@[to_additive (attr := gcongr)]
lemma zpow_le_zpow (ha : 1 ≤ a) (h : m ≤ n) : a ^ m ≤ a ^ n

{α : Type u_1}
[OrderedCommGroup α]
{m n : ℤ}
{a : α}
(ha : 1 ≤ a)
(h : m ≤ n)


@[simp]
theorem isRotated_nil_iff' : [] ~r l ↔ [] = l


/-- The preimage of a compact set under `(c • ·)` is a compact set. -/
@[to_additive "The preimage of a compact set under `(c +ᵥ ·)` is a compact set."]
theorem IsCompact.preimage_smul {M X : Type*} [SMul M X] [TopologicalSpace X]
    [ProperConstSMul M X] {s : Set X} (hs : IsCompact s) (c : M) : IsCompact ((c • ·) ⁻¹' s)

{M : Type u_1}
{X : Type u_2}
[VAdd M X]
[TopologicalSpace X]
[ProperConstVAdd M X]
{s : Set X}
(hs : IsCompact s)
(c : M)


theorem Equiv.coinduced_symm {α β : Type*} (e : α ≃ β) :
    TopologicalSpace.coinduced e.symm = TopologicalSpace.induced e

{α : Type u_4}
{β : Type u_5}
(e : α ≃ β)

TopologicalSpace.coinduced ⇑e.symm = TopologicalSpace.induced ⇑e


theorem sub_mem_orthogonal_of_inner_left {x y : E} (h : ∀ v : K, ⟪x, v⟫ = ⟪y, v⟫) : x - y ∈ Kᗮ

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K : Submodule 𝕜 E}
{x y : E}
(h : ∀ (v : ↥K), ⟪x, ↑v⟫_𝕜 = ⟪y, ↑v⟫_𝕜)


lemma surjective_mk : Surjective (mk : X → t2Quotient X)


theorem trans_apply {f₀ f₁ f₂ : C(X, Y)} (F : HomotopyWith f₀ f₁ P) (G : HomotopyWith f₁ f₂ P)
    (x : I × X) :
    (F.trans G) x =
      if h : (x.1 : ℝ) ≤ 1 / 2 then
        F (⟨2 * x.1, (unitInterval.mul_pos_mem_iff zero_lt_two).2 ⟨x.1.2.1, h⟩⟩, x.2)
      else
        G (⟨2 * x.1 - 1, unitInterval.two_mul_sub_one_mem_iff.2 ⟨(not_le.1 h).le, x.1.2.2⟩⟩, x.2)

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

(F.trans G) x = if h : ↑x.1 ≤ 1 / 2 then F (⟨2 * ↑x.1, ⋯⟩, x.2) else G (⟨2 * ↑x.1 - 1, ⋯⟩, x.2)


@[simp]
theorem toAffineMap_inj {e e' : P₁ ≃ᵃ[k] P₂} : e.toAffineMap = e'.toAffineMap ↔ e = e'

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
{e e' : P₁ ≃ᵃ[k] P₂}


@[reassoc (attr := simp)]
theorem ofMkLEMk_comp_ofMkLE {B A₁ A₂ : C} (f : A₁ ⟶ B) [Mono f] (g : A₂ ⟶ B) [Mono g]
    (X : Subobject B) (h₁ : mk f ≤ mk g) (h₂ : mk g ≤ X) :
    ofMkLEMk f g h₁ ≫ ofMkLE g X h₂ = ofMkLE f X (h₁.trans h₂)

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

(h₂ : CategoryTheory.Subobject.mk g ≤ X)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Subobject.ofMkLEMk f g h₁) (CategoryTheory.Subobject.ofMkLE g X h₂) =
  CategoryTheory.Subobject.ofMkLE f X ⋯


theorem eqOn_refl (f : α → β) (s : Set α) : EqOn f f s

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(s : Set α)


protected theorem eta (x : p) (hx : (x : B) ∈ p) : (⟨x, hx⟩ : p) = x

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


@[simp]
theorem conjAut_trans (f g : Aut X) : α.conjAut (f ≪≫ g) = α.conjAut f ≪≫ α.conjAut g

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


@[to_additive]
theorem mulIndicator_eventuallyEq (hf : f =ᶠ[l ⊓ 𝓟 s] g) (hs : s =ᶠ[l] t) :
    mulIndicator s f =ᶠ[l] mulIndicator t g

{α : Type u_1}
{M : Type u_3}
[Zero M]
{s t : Set α}
{f g : α → M}
{l : Filter α}
(hf : f =ᶠ[l ⊓ 𝓟 s] g)
(hs : s =ᶠ[l] t)


@[to_additive]
theorem le_mul_of_le_mul_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d : α}
    (h : a ≤ b * c) (hle : b ≤ d) :
    a ≤ d * c

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


theorem nodup_iota (n : ℕ) : Nodup (iota n)


@[to_additive] lemma leOnePart_anti : Antitone (leOnePart : α → α)

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

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


/-- Linear equivalence between linear maps `M₂ →ₗ[R] M₃`
and one-multilinear maps `MultilinearMap R (fun _ : ι ↦ M₂) M₃`. -/
@[simps (config := { simpRhs := true })]
def ofSubsingletonₗ [Subsingleton ι] (i : ι) :
    (M₂ →ₗ[R] M₃) ≃ₗ[S] MultilinearMap R (fun _ : ι ↦ M₂) M₃

(R : Type uR)
(S : Type uS)
{ι : Type uι}
(M₂ : Type v₂)
(M₃ : Type v₃)
[Semiring R]
[AddCommMonoid M₂]
[Module R M₂]
[Semiring S]
[AddCommMonoid M₃]
[Module S M₃]
[Module R M₃]
[SMulCommClass R S M₃]
[Subsingleton ι]
(i : ι)

∀ (a : MultilinearMap R (fun x => M₂) M₃),
  (MultilinearMap.ofSubsingletonₗ R S M₂ M₃ i).symm a = (MultilinearMap.ofSubsingleton R M₂ M₃ i).symm a


@[to_additive]
theorem mulIndicator_eq_self_of_superset (h1 : s.mulIndicator f = f) (h2 : s ⊆ t) :
    t.mulIndicator f = f

{α : Type u_1}
{M : Type u_4}
[Zero M]
{s t : Set α}
{f : α → M}
(h1 : s.indicator f = f)
(h2 : s ⊆ t)


@[simp]
theorem coe_toLinearMap : ⇑e.toLinearMap = e

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


@[to_additive]
theorem lt_of_mul_lt_of_one_le_right [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c : α}
    (h : a * b < c) (hle : 1 ≤ a) :
    b < c


/-- `circleMap` is `2π`-periodic. -/
theorem periodic_circleMap (c : ℂ) (R : ℝ) : Periodic (circleMap c R) (2 * π)

Function.Periodic (circleMap c R) (2 * π)


protected theorem Infinite.prod_left (hs : s.Infinite) (ht : t.Nonempty) : (s ×ˢ t).Infinite

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}
(hs : s.Infinite)
(ht : t.Nonempty)


theorem Prime.one_lt {p : ℕ} : Prime p → 1 < p


@[simp]
theorem swap_mem_interedges_iff {x : α × α} : x.swap ∈ G.interedges s t ↔ x ∈ G.interedges t s

{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
{s t : Finset α}
{x : α × α}


@[simp] lemma sqrt_mul_self (x : ℝ≥0) : sqrt (x * x) = x


@[simp] lemma isOpen_ofUpperSet_preimage {s : Set α} :
    IsOpen (ofUpperSet ⁻¹' s) ↔ IsUpperSet s

IsOpen (⇑Topology.WithUpperSet.ofUpperSet ⁻¹' s) ↔ IsUpperSet s


@[simp] theorem lookup_replicate_ne {k : α} (h : !k == a) :
    (replicate n (a,b)).lookup k = none

{α : Type u_2}
[BEq α]
[LawfulBEq α]
{a : α}
{n : Nat}

∀ {α_1 : Type u_1} {b : α_1} {k : α}, (!k == a) = true → List.lookup k (List.replicate n (a, b)) = none


/-- Product of elements of a submonoid of a `CommMonoid` indexed by a `Finset` is in the
    submonoid. -/
@[to_additive
      "Sum of elements in an `AddSubmonoid` of an `AddCommMonoid` indexed by a `Finset`
      is in the `AddSubmonoid`."]
theorem prod_mem {M : Type*} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] {ι : Type*}
    {t : Finset ι} {f : ι → M} (h : ∀ c ∈ t, f c ∈ S) : (∏ c ∈ t, f c) ∈ S

{B : Type u_3}
{S : B}
{M : Type u_4}
[CommMonoid M]
[SetLike B M]
[SubmonoidClass B M]
{ι : Type u_5}
{t : Finset ι}
{f : ι → M}
(h : ∀ c ∈ t, f c ∈ S)


theorem sign_mul_nonneg (r : ℝ) : 0 ≤ sign r * r


theorem add_measure_left {_ : MeasurableSpace α} (μ ν : Measure α)
    (hT : DominatedFinMeasAdditive ν T C) (hC : 0 ≤ C) : DominatedFinMeasAdditive (μ + ν) T C

{α : Type u_1}
{β : Type u_7}
[SeminormedAddCommGroup β]
{T : Set α → β}
{C : ℝ}

∀ {x : MeasurableSpace α} (μ ν : MeasureTheory.Measure α),
  MeasureTheory.DominatedFinMeasAdditive ν T C → 0 ≤ C → MeasureTheory.DominatedFinMeasAdditive (μ + ν) T C


@[to_additive]
theorem group_inseparable_iff {x y : G} : Inseparable x y ↔ x / y ∈ closure (1 : Set G)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{x y : G}


/-- All `F`-embeddings of a field `K` into another field `A` factor through any intermediate
field of `A/F` in which the minimal polynomial of elements of `K` splits. -/
@[simps]
def IntermediateField.algHomEquivAlgHomOfSplits (L : IntermediateField F A)
    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) :
    (K →ₐ[F] L) ≃ (K →ₐ[F] A)

(hL : ∀ (x : K), Polynomial.Splits (algebraMap F ↥L) (minpoly F x))

(IntermediateField.algHomEquivAlgHomOfSplits A L hL) φ₂ = L.val.comp φ₂


theorem Sublist.eq_of_length : l₁ <+ l₂ → length l₁ = length l₂ → l₁ = l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁ <+ l₂ → l₁.length = l₂.length → l₁ = l₂


theorem _root_.Subalgebra.topologicalClosure_star_comm (s : Subalgebra R A) :
    (star s).topologicalClosure = star s.topologicalClosure

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[TopologicalSpace A]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
[TopologicalSemiring A]
[ContinuousStar A]
(s : Subalgebra R A)


theorem eqOn_Ioo_of_ae_eq {a b : X} {f g : X → Y} (hfg : f =ᵐ[μ.restrict (Ioo a b)] g)
    (hf : ContinuousOn f (Ioo a b)) (hg : ContinuousOn g (Ioo a b)) : EqOn f g (Ioo a b)

(hfg : f =ᵐ[μ.restrict (Set.Ioo a b)] g)


theorem slice_sum [AddCommMonoid α] {β : Type} (i : ℕ) (hid : i < d) (s : Finset β)
    (f : β → Holor α (d :: ds)) : (∑ x ∈ s, slice (f x) i hid) = slice (∑ x ∈ s, f x) i hid

{α : Type}
{d : ℕ}
{ds : List ℕ}
[AddCommMonoid α]
{β : Type}
(i : ℕ)
(hid : i < d)
(s : Finset β)
(f : β → Holor α (d :: ds))

∑ x ∈ s, (f x).slice i hid = (∑ x ∈ s, f x).slice i hid


@[simp]
theorem sign_pos (ha : 0 < a) : sign a = 1

{α : Type u_1}
[Zero α]
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
{a : α}
(ha : 0 < a)


/-- If `‖f‖ *[μ] ‖g‖` exists, then `f *[L, μ] g` exists. -/
theorem ConvolutionExistsAt.ofNorm' {x₀ : G}
    (h : ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (mul ℝ ℝ) μ)
    (hmf : AEStronglyMeasurable f μ) (hmg : AEStronglyMeasurable g <| map (fun t => x₀ - t) μ) :
    ConvolutionExistsAt f g x₀ L μ

(h : MeasureTheory.ConvolutionExistsAt (fun x => ‖f x‖) (fun x => ‖g x‖) x₀ (ContinuousLinearMap.mul ℝ ℝ) μ)

(hmf : MeasureTheory.AEStronglyMeasurable f μ)

(hmg : MeasureTheory.AEStronglyMeasurable g (MeasureTheory.Measure.map (fun t => x₀ - t) μ))

MeasureTheory.ConvolutionExistsAt f g x₀ L μ


@[simp]
lemma orderOf_ofAdd_eq_addOrderOf {α : Type*} [AddMonoid α] (a : α) :
    orderOf (Multiplicative.ofAdd a) = addOrderOf a


theorem subset_closedBall_norm_mul (a : A) : σ a ⊆ Metric.closedBall (0 : 𝕜) (‖a‖ * ‖(1 : A)‖)

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
(a : A)

spectrum 𝕜 a ⊆ Metric.closedBall 0 (‖a‖ * ‖1‖)


@[to_additive]
theorem ContinuousMul.of_nhds_one {M : Type u} [Monoid M] [TopologicalSpace M]
    (hmul : Tendsto (uncurry ((· * ·) : M → M → M)) (𝓝 1 ×ˢ 𝓝 1) <| 𝓝 1)
    (hleft : ∀ x₀ : M, 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1))
    (hright : ∀ x₀ : M, 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)) : ContinuousMul M

(hmul : Filter.Tendsto (Function.uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))

(hleft : ∀ (x₀ : M), 𝓝 x₀ = Filter.map (fun x => x₀ * x) (𝓝 1))

(hright : ∀ (x₀ : M), 𝓝 x₀ = Filter.map (fun x => x * x₀) (𝓝 1))


/-- To every `S : J.Cover X` and presheaf `P`, associate a `MulticospanIndex`. -/
@[simps]
def index {D : Type u₁} [Category.{v₁} D] (S : J.Cover X) (P : Cᵒᵖ ⥤ D) :
    Limits.MulticospanIndex D

{J : CategoryTheory.GrothendieckTopology C}


/-- `AddMonoidAlgebra.toDirectSum` and `DirectSum.toAddMonoidAlgebra` together form an
equiv. -/
@[simps (config := .asFn)]
def addMonoidAlgebraEquivDirectSum [DecidableEq ι] [Semiring M] [∀ m : M, Decidable (m ≠ 0)] :
    AddMonoidAlgebra M ι ≃ ⨁ _ : ι, M

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


/-- A Grönwall-like inequality: if `f : ℝ → ℝ` is continuous on `[a, b]` and satisfies
the inequalities `f a ≤ δ` and
`∀ x ∈ [a, b), liminf_{z→x+0} (f z - f x)/(z - x) ≤ K * (f x) + ε`, then `f x`
is bounded by `gronwallBound δ K ε (x - a)` on `[a, b]`.

See also `norm_le_gronwallBound_of_norm_deriv_right_le` for a version bounding `‖f x‖`,
`f : ℝ → E`. -/
theorem le_gronwallBound_of_liminf_deriv_right_le {f f' : ℝ → ℝ} {δ K ε : ℝ} {a b : ℝ}
    (hf : ContinuousOn f (Icc a b))
    (hf' : ∀ x ∈ Ico a b, ∀ r, f' x < r → ∃ᶠ z in 𝓝[>] x, (z - x)⁻¹ * (f z - f x) < r)
    (ha : f a ≤ δ) (bound : ∀ x ∈ Ico a b, f' x ≤ K * f x + ε) :
    ∀ x ∈ Icc a b, f x ≤ gronwallBound δ K ε (x - a)

(hf' : ∀ x ∈ Set.Ico a b, ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in 𝓝[>] x, (z - x)⁻¹ * (f z - f x) < r)

(bound : ∀ x ∈ Set.Ico a b, f' x ≤ K * f x + ε)

x ∈ Set.Icc a b → f x ≤ gronwallBound δ K ε (x - a)


/-- `Matrix.kroneckerMapBilinear` commutes with `*` if `f` does.

This is primarily used with `R = ℕ` to prove `Matrix.mul_kronecker_mul`. -/
theorem kroneckerMapBilinear_mul_mul [CommSemiring R] [Fintype m] [Fintype m']
    [NonUnitalNonAssocSemiring α] [NonUnitalNonAssocSemiring β] [NonUnitalNonAssocSemiring γ]
    [Module R α] [Module R β] [Module R γ] (f : α →ₗ[R] β →ₗ[R] γ)
    (h_comm : ∀ a b a' b', f (a * b) (a' * b') = f a a' * f b b') (A : Matrix l m α)
    (B : Matrix m n α) (A' : Matrix l' m' β) (B' : Matrix m' n' β) :
    kroneckerMapBilinear f (A * B) (A' * B') =
      kroneckerMapBilinear f A A' * kroneckerMapBilinear f B B'

((Matrix.kroneckerMapBilinear f) (A * B)) (A' * B') =
  ((Matrix.kroneckerMapBilinear f) A) A' * ((Matrix.kroneckerMapBilinear f) B) B'


@[simp]
theorem deriv_csin (hc : DifferentiableAt ℂ f x) :
    deriv (fun x => Complex.sin (f x)) x = Complex.cos (f x) * deriv f x

{f : ℂ → ℂ}
{x : ℂ}
(hc : DifferentiableAt ℂ f x)


theorem compareOfLessAndEq_rfl [LT α] [DecidableEq α] {a : α}
[Decidable (a < a)] (lt_irrefl : ¬ a < a) : compareOfLessAndEq a a = .eq

{α : Type u_1}
[LT α]
[DecidableEq α]
{a : α}
[Decidable (a < a)]
(lt_irrefl : ¬a < a)


/-- An auxiliary lemma used twice in the proof of `PiLp.pseudoMetricAux` below. Not intended for
use outside this file. -/
theorem iSup_edist_ne_top_aux {ι : Type*} [Finite ι] {α : ι → Type*}
    [∀ i, PseudoMetricSpace (α i)] (f g : PiLp ∞ α) : (⨆ i, edist (f i) (g i)) ≠ ⊤

{ι : Type u_5}
[Finite ι]
{α : ι → Type u_6}
[(i : ι) → PseudoMetricSpace (α i)]
(f g : PiLp ⊤ α)


theorem span_singleton_generator (S : Submodule R M) [S.IsPrincipal] : span R {generator S} = S

{R : Type u}
{M : Type v}
[AddCommGroup M]
[Ring R]
[Module R M]
(S : Submodule R M)
[S.IsPrincipal]

Submodule.span R {Submodule.IsPrincipal.generator S} = S


@[to_additive (attr := simp)]
theorem mem_stabilizerSubmonoid_iff {a : α} {m : M} : m ∈ stabilizerSubmonoid M a ↔ m • a = a

{M : Type u}
[AddMonoid M]
{α : Type v}
[AddAction M α]
{a : α}
{m : M}

m ∈ AddAction.stabilizerAddSubmonoid M a ↔ m +ᵥ a = a


/-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : PartialHomeomorph X Y)
(e' : PartialHomeomorph Y Z)
(h : e.target = e'.source)

∀ (a : Z), ↑(e.trans' e' h).symm a = ↑e.symm (↑e'.symm a)


/-- Construct an adjunction between `F` and `G` out of a natural bijection between each
`F.obj X ⟶ Y` and `X ⟶ G.obj Y`. -/
@[simps]
def mkOfHomEquiv (adj : CoreHomEquiv F G) : F ⊣ G

(adj : CategoryTheory.Adjunction.CoreHomEquiv F G)

(CategoryTheory.Adjunction.mkOfHomEquiv adj).counit.app Y =
  (adj.homEquiv (G.obj Y) ((CategoryTheory.Functor.id D).obj Y)).invFun (CategoryTheory.CategoryStruct.id (G.obj Y))


theorem base_pow_mul {p n exp : ℕ} (hp : 1 < p) (hn : 0 < n) :
    p.maxPowDiv (p ^ exp * n) = p.maxPowDiv n + exp


theorem liftRel_join (R : α → β → Prop) {S : WSeq (WSeq α)} {T : WSeq (WSeq β)}
    (h : LiftRel (LiftRel R) S T) : LiftRel R (join S) (join T)

(h : Stream'.WSeq.LiftRel (Stream'.WSeq.LiftRel R) S T)


@[local simp] theorem dot_nil_left : dot ([] : IntList) ys = 0


@[reassoc (attr := simp)]
lemma mappingConeCompTriangleh_comm₁ :
    (mappingConeCompTriangleh f g).mor₂ ≫
      (HomotopyCategory.quotient _ _).map (mappingConeCompHomotopyEquiv f g).hom =
    (HomotopyCategory.quotient _ _).map (mappingCone.inr _)

(CochainComplex.mappingConeCompTriangleh f g).mor₂ ≫
    (HomotopyCategory.quotient C (ComplexShape.up ℤ)).map (CochainComplex.mappingConeCompHomotopyEquiv f g).hom =
  (HomotopyCategory.quotient C (ComplexShape.up ℤ)).map
    (CochainComplex.mappingCone.inr (CochainComplex.mappingConeCompTriangle f g).mor₁)


@[to_additive (attr := simp) nnnorm_neg]
theorem nnnorm_inv' (a : E) : ‖a⁻¹‖₊ = ‖a‖₊

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

‖a⁻¹‖₊ = ‖a‖₊


@[to_additive]
theorem mulIndicator_apply (s : Set α) (f : α → M) (a : α) [Decidable (a ∈ s)] :
    mulIndicator s f a = if a ∈ s then f a else 1

{α : Type u_1}
{M : Type u_4}
[One M]
(s : Set α)
(f : α → M)
(a : α)
[Decidable (a ∈ s)]

s.mulIndicator f a = if a ∈ s then f a else 1


theorem coe_sort_true : (true : Prop) = True


protected theorem lt_add_of_sub_lt_right (h : a ≠ ∞ ∨ c ≠ ∞) : a - c < b → a < b + c


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

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

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


@[to_additive nsmul_nonneg]
theorem one_le_pow_of_one_le' {a : M} (H : 1 ≤ a) : ∀ n : ℕ, 1 ≤ a ^ n

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


@[simp]
theorem toMultiset_single (a : α) (n : ℕ) : toMultiset (single a n) = n • {a}

Finsupp.toMultiset (Finsupp.single a n) = n • {a}


protected theorem sub_eq_sub_min (n m : Nat) : n - m = n - min n m


theorem mul_lt_aleph0_iff_of_ne_zero {a b : Cardinal} (ha : a ≠ 0) (hb : b ≠ 0) :
    a * b < ℵ₀ ↔ a < ℵ₀ ∧ b < ℵ₀

{a b : Cardinal.{u_1}}
(ha : a ≠ 0)
(hb : b ≠ 0)

a * b < Cardinal.aleph0 ↔ a < Cardinal.aleph0 ∧ b < Cardinal.aleph0


@[to_additive]
theorem mulIndicator_eq_self_of_superset (h1 : s.mulIndicator f = f) (h2 : s ⊆ t) :
    t.mulIndicator f = f

{α : Type u_1}
{M : Type u_4}
[One M]
{s t : Set α}
{f : α → M}
(h1 : s.mulIndicator f = f)
(h2 : s ⊆ t)


protected theorem ne_zero [Nontrivial R] (i) : b i ≠ 0

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


lemma evalEval_mk (g : R[X][Y]) : evalEval h (mk p g) = g.evalEval x y

{R : Type u_1}
[CommRing R]
{x y : R}
{p : R[X][Y]}
(h : Polynomial.evalEval x y p = 0)
(g : R[X][Y])

(AdjoinRoot.evalEval h) ((AdjoinRoot.mk p) g) = Polynomial.evalEval x y g


@[simp]
theorem preimage_neg_Ioi : -Ioi a = Iio (-a)

{α : Type u_1}
[OrderedAddCommGroup α]
(a : α)


theorem testAgainstNN_lipschitz (μ : FiniteMeasure Ω) :
    LipschitzWith μ.mass fun f : Ω →ᵇ ℝ≥0 => μ.testAgainstNN f

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
[OpensMeasurableSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)

LipschitzWith μ.mass fun f => μ.testAgainstNN f


protected theorem Fintype.false [Infinite α] (_h : Fintype α) : False

{α : Type u_1}
[Infinite α]
(_h : Fintype α)


@[simp] theorem decide_eq_decide {p q : Prop} {_ : Decidable p} {_ : Decidable q} :
    decide p = decide q ↔ (p ↔ q)

∀ {x : Decidable p} {x_1 : Decidable q}, decide p = decide q ↔ (p ↔ q)


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

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

((CategoryTheory.Comma.mapRightEq L r r' h).hom.app X).right = CategoryTheory.CategoryStruct.id X.right


@[simp]
lemma elim_le_elim_iff {u₁ v₁ : α₁ → β} {u₂ v₂ : α₂ → β} :
    Sum.elim u₁ u₂ ≤ Sum.elim v₁ v₂ ↔ u₁ ≤ v₁ ∧ u₂ ≤ v₂

{β : Type u_3}
{α₁ : Type u_5}
{α₂ : Type u_6}
[LE β]
{u₁ v₁ : α₁ → β}
{u₂ v₂ : α₂ → β}


lemma Set.biInter_finsetSigma_univ' (s : Finset ι) (f : Π i, κ i → Set α) :
    ⋂ i ∈ s, ⋂ j, f i j = ⋂ ij ∈ s.sigma fun _ ↦ Finset.univ, f ij.1 ij.2

{ι : Type u_1}
{α : Type u_2}
{κ : ι → Type u_5}
[(i : ι) → Fintype (κ i)]
(s : Finset ι)
(f : (i : ι) → κ i → Set α)

⋂ i ∈ s, ⋂ j, f i j = ⋂ ij ∈ s.sigma fun x => Finset.univ, f ij.fst ij.snd


theorem semiconj_conj (f : α₁ → α₁) : Semiconj e f (e.conj f)

{α₁ : Type u_1}
{β₁ : Type u_2}
(e : α₁ ≃ β₁)
(f : α₁ → α₁)


/-- The powerset of `{a} ∪ s` is `𝒫 s` together with `{a} ∪ t` for each `t ∈ 𝒫 s`. -/
theorem powerset_insert (s : Set α) (a : α) : 𝒫 insert a s = 𝒫 s ∪ insert a '' 𝒫 s


/-- A finite sequence of Lp functions is uniformly integrable in the probability sense. -/
theorem uniformIntegrable_finite [Finite ι] (hp_one : 1 ≤ p) (hp_top : p ≠ ∞)
    (hf : ∀ i, Memℒp (f i) p μ) : UniformIntegrable f p μ

{f : ι → α → β}

(hf : ∀ (i : ι), MeasureTheory.Memℒp (f i) p μ)


@[simp]
theorem some_single_some [Zero M] (a : α) (m : M) :
    (single (Option.some a) m : Option α →₀ M).some = single a m

{α : Type u_1}
{M : Type u_5}
[Zero M]
(a : α)
(m : M)

(Finsupp.single (some a) m).some = Finsupp.single a m


/-- Converse to the mean value inequality: if `f` is differentiable at `x₀` and `C`-lipschitz
then its derivative at `x₀` has norm bounded by `C`. -/
theorem HasDerivAt.le_of_lipschitz {f : 𝕜 → F} {f' : F} {x₀ : 𝕜} (hf : HasDerivAt f f' x₀)
    {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖f'‖ ≤ C

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x₀ : 𝕜}
(hf : HasDerivAt f f' x₀)
{C : ℝ≥0}
(hlip : LipschitzWith C f)


@[simp]
theorem nil_product (l : List β) : (@nil α) ×ˢ l = []

{α : Type u_1}
{β : Type u_2}
(l : List β)


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

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

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


@[to_additive]
theorem contMDiffAt_finprod
    (lf : LocallyFinite fun i ↦ mulSupport <| f i) (h : ∀ i, ContMDiffAt I' I n (f i) x₀) :
    ContMDiffAt I' I n (fun x ↦ ∏ᶠ i, f i x) x₀

(lf : LocallyFinite fun i => Function.support (f i))

(h : ∀ (i : ι), ContMDiffAt I' I n (f i) x₀)

ContMDiffAt I' I n (fun x => ∑ᶠ (i : ι), f i x) x₀


theorem DifferentiableOn.rpow_const (hf : DifferentiableOn ℝ f s) (h : ∀ x ∈ s, f x ≠ 0 ∨ 1 ≤ p) :
    DifferentiableOn ℝ (fun x => f x ^ p) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{p : ℝ}
(hf : DifferentiableOn ℝ f s)
(h : ∀ x ∈ s, f x ≠ 0 ∨ 1 ≤ p)


theorem initiallySmall_of_initial_of_essentiallySmall [EssentiallySmall.{w} K] :
    InitiallySmall.{w} J

[CategoryTheory.EssentiallySmall.{w, v₁, u₁} K]


theorem val_ne_zero {n : ℕ} (a : ZMod n) : a.val ≠ 0 ↔ a ≠ 0


/-- An unbundled description of lax monoidal functors. -/
class LaxMonoidal (F : C → D) [Functorial.{v₁, v₂} F] where
  /-- unit morphism -/
  ε : 𝟙_ D ⟶ F (𝟙_ C)
  /-- tensorator -/
  μ : ∀ X Y : C, F X ⊗ F Y ⟶ F (X ⊗ Y)
  μ_natural_left :
    ∀ {X Y : C} (f : X ⟶ Y) (X' : C),
      map F f ▷ F X' ≫ μ Y X' = μ X X' ≫ map F (f ▷ X') := by
    aesop_cat
  μ_natural_right :
    ∀ {X Y : C} (X' : C) (f : X ⟶ Y) ,
      F X' ◁ map F f ≫ μ X' Y = μ X' X ≫ map F (X' ◁ f) := by
    aesop_cat
  /-- associativity of the tensorator -/
  associativity :
    ∀ X Y Z : C,
      μ X Y ▷ F Z ≫ μ (X ⊗ Y) Z ≫ map F (α_ X Y Z).hom =
        (α_ (F X) (F Y) (F Z)).hom ≫ F X ◁ μ Y Z ≫ μ X (Y ⊗ Z) := by
    aesop_cat
  /-- left unitality -/
  left_unitality : ∀ X : C, (λ_ (F X)).hom = ε ▷ F X ≫ μ (𝟙_ C) X ≫ map F (λ_ X).hom := by
    aesop_cat
  /-- right unitality -/
  right_unitality : ∀ X : C, (ρ_ (F X)).hom = F X ◁ ε ≫ μ X (𝟙_ C) ≫ map F (ρ_ X).hom := by
    aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
{F : C → D}
[CategoryTheory.Functorial F]
[self : CategoryTheory.LaxMonoidal F]
{X Y : C}
(X' : C)
(f : X ⟶ Y)

CategoryTheory.MonoidalCategory.whiskerLeft (F X') (CategoryTheory.map F f) ≫ CategoryTheory.LaxMonoidal.μ X' Y =
  CategoryTheory.LaxMonoidal.μ X' X ≫ CategoryTheory.map F (CategoryTheory.MonoidalCategory.whiskerLeft X' f)


@[to_additive (attr := simp)]
protected theorem le_div_iff : h ≤ f / g ↔ ∀ ⦃s⦄, s ∈ f → ∀ ⦃t⦄, t ∈ g → s / t ∈ h

{α : Type u_2}
[Sub α]
{f g h : Filter α}

h ≤ f - g ↔ ∀ ⦃s : Set α⦄, s ∈ f → ∀ ⦃t : Set α⦄, t ∈ g → s - t ∈ h


theorem inv_logb (a b : ℝ) : (logb a b)⁻¹ = logb b a


@[simp] theorem Fin.univ_val_map {n : ℕ} (f : Fin n → α) :
    Finset.univ.val.map f = List.ofFn f

Multiset.map f Finset.univ.val = ↑(List.ofFn f)


theorem AffineSubspace.isClosed_direction_iff (s : AffineSubspace 𝕜 Q) :
    IsClosed (s.direction : Set W) ↔ IsClosed (s : Set Q)

{W : Type u_4}
{Q : Type u_5}
[NormedAddCommGroup W]
[MetricSpace Q]
[NormedAddTorsor W Q]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 W]
(s : AffineSubspace 𝕜 Q)


/-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
{E : Type u_2}
[CategoryTheory.Category.{u_3, u_1} D]
[CategoryTheory.Category.{u_4, u_2} E]
(F : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
(X : CategoryTheory.WithInitial C)

(CategoryTheory.WithInitial.mapComp F G).hom.app X =
  (match X with
    | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of (G.obj (F.obj x)))
    | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).hom


protected theorem congr_fun {f g : E ≃ₛₗᵢ[σ₁₂] E₂} (h : f = g) (x : E) : f x = g x

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
{f g : E ≃ₛₗᵢ[σ₁₂] E₂}
(h : f = g)
(x : E)


theorem pf_div_c [Div α] (p : a = b) (c : α) : a / c = b / c

{α : Type u_1}
{a b : α}
[Div α]
(p : a = b)
(c : α)


protected theorem _root_.LinearEquiv.uniformEmbedding {E₁ E₂ : Type*} [UniformSpace E₁]
    [UniformSpace E₂] [AddCommGroup E₁] [AddCommGroup E₂] [Module R₁ E₁] [Module R₂ E₂]
    [UniformAddGroup E₁] [UniformAddGroup E₂] (e : E₁ ≃ₛₗ[σ₁₂] E₂)
    (h₁ : Continuous e) (h₂ : Continuous e.symm) : UniformEmbedding e

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{E₁ : Type u_9}
{E₂ : Type u_10}
[UniformSpace E₁]
[UniformSpace E₂]
[AddCommGroup E₁]
[AddCommGroup E₂]
[Module R₁ E₁]
[Module R₂ E₂]
[UniformAddGroup E₁]
[UniformAddGroup E₂]
(e : E₁ ≃ₛₗ[σ₁₂] E₂)
(h₁ : Continuous ⇑e)
(h₂ : Continuous ⇑e.symm)


/-- A multiplicative morphism between monoids gives a monoidal functor between the corresponding
discrete monoidal categories.
-/
@[to_additive (attr := simps) Discrete.addMonoidalFunctor]
def Discrete.monoidalFunctor (F : M →* N) : MonoidalFunctor (Discrete M) (Discrete N)

{M : Type u}
[Monoid M]
{N : Type u'}
[Monoid N]
(F : M →* N)

∀ {X Y : CategoryTheory.Discrete M} (f : X ⟶ Y),
  (CategoryTheory.Discrete.monoidalFunctor F).map f = CategoryTheory.Discrete.eqToHom ⋯


@[simp, nolint simpNF] -- Added `nolint simpNF` to avoid a timeout #8386
theorem aux_ι (m₁ m₂ : M) : aux f ((even.ι Q).bilin m₁ m₂) = f.bilin m₁ m₂

{R : Type uR}
{M : Type uM}
[CommRing R]
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{A : Type uA}
[Ring A]
[Algebra R A]
(f : CliffordAlgebra.EvenHom Q A)
(m₁ m₂ : M)

(CliffordAlgebra.even.lift.aux f) (((CliffordAlgebra.even.ι Q).bilin m₁) m₂) = (f.bilin m₁) m₂


theorem M.dest_corec' {α : TypeVec.{u} n} {β : Type u} (g₀ : β → P.A)
    (g₁ : ∀ b : β, P.drop.B (g₀ b) ⟹ α) (g₂ : ∀ b : β, P.last.B (g₀ b) → β) (x : β) :
    M.dest P (M.corec' P g₀ g₁ g₂ x) = ⟨g₀ x, splitFun (g₁ x) (M.corec' P g₀ g₁ g₂ ∘ g₂ x)⟩

{n : ℕ}
(P : MvPFunctor.{u} (n + 1))
{α : TypeVec.{u} n}
{β : Type u}
(g₀ : β → P.A)
(g₁ : (b : β) → P.drop.B (g₀ b) ⟹ α)
(g₂ : (b : β) → P.last.B (g₀ b) → β)
(x : β)

MvPFunctor.M.dest P (MvPFunctor.M.corec' P g₀ g₁ g₂ x) =
  ⟨g₀ x, TypeVec.splitFun (g₁ x) (MvPFunctor.M.corec' P g₀ g₁ g₂ ∘ g₂ x)⟩


/-- `mapCocone` commutes with `whisker`
-/
@[simps!]
def mapCoconeWhisker {E : K ⥤ J} {c : Cocone F} :
    mapCocone H (c.whisker E) ≅ (mapCocone H c).whisker E

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F : J ⥤ C}
{E : K ⥤ J}
{c : CategoryTheory.Limits.Cocone F}

H.mapCoconeWhisker.hom.hom = 𝟙 (H.obj c.pt)


@[simp]
theorem preimage_swap_prod (s : Set α) (t : Set β) : Prod.swap ⁻¹' s ×ˢ t = t ×ˢ s

{α : Type u_1}
{β : Type u_2}
(s : Set α)
(t : Set β)


theorem IicSnd_le_fst (r : ℝ) : ρ.IicSnd r ≤ ρ.fst

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
(r : ℝ)


@[simp]
theorem coe_toSubmonoid (s : Subring R) : (s.toSubmonoid : Set R) = s


theorem norm_approxBounded_le {β} {f : α → β} [SeminormedAddCommGroup β] [NormedSpace ℝ β]
    {m : MeasurableSpace α} {c : ℝ} (hf : StronglyMeasurable[m] f) (hc : 0 ≤ c) (n : ℕ) (x : α) :
    ‖hf.approxBounded c n x‖ ≤ c

(hf : MeasureTheory.StronglyMeasurable f)


@[simp]
theorem mk'_d_1_0 : (mk' X₀ X₁ d₀ succ').d 1 0 = d₀

(succ' : {X₀ X₁ : V} → (f : X₁ ⟶ X₀) → (X₂ : V) ×' (d : X₂ ⟶ X₁) ×' d ≫ f = 0)

(ChainComplex.mk' X₀ X₁ d₀ fun {X₀ X₁} => succ').d 1 0 = d₀


lemma countablePartitionSet_of_mem {n : ℕ} {a : α} {s : Set α} (hs : s ∈ countablePartition α n)
    (ha : a ∈ s) :
    countablePartitionSet n a = s

[h : MeasurableSpace.CountablyGenerated α]

(hs : s ∈ MeasurableSpace.countablePartition α n)

MeasurableSpace.countablePartitionSet n a = s


theorem part_iff₂ {f : ℕ → ℕ →. ℕ} : (@Partrec' 2 fun v => f v.head v.tail.head) ↔ Partrec₂ f

{f : ℕ → ℕ →. ℕ}

(Nat.Partrec' fun v => f v.head v.tail.head) ↔ Partrec₂ f


@[simp] lemma flip_flip : p.flip.flip = p

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(p : PerfectPairing R M N)


/-- Composing two multiplications on the right by `y` and `x`
is equal to a multiplication on the right by `y * x`.
-/
@[to_additive (attr := simp) "Composing two additions on the right by `y` and `x`
is equal to an addition on the right by `y + x`."]
theorem comp_mul_right (x y : α) : (· * x) ∘ (· * y) = (· * (y * x))

{α : Type u_1}
[AddSemigroup α]
(x y : α)


@[simp]
theorem toAddSubgroup_comap {G₂ : Type*} [Group G₂] (f : G →* G₂) (s : Subgroup G₂) :
    s.toAddSubgroup.comap (MonoidHom.toAdditive f) = Subgroup.toAddSubgroup (s.comap f)

{G : Type u_1}
[Group G]
{G₂ : Type u_7}
[Group G₂]
(f : G →* G₂)
(s : Subgroup G₂)

AddSubgroup.comap (MonoidHom.toAdditive f) (Subgroup.toAddSubgroup s) = Subgroup.toAddSubgroup (Subgroup.comap f s)


@[simp] theorem get_tail {n : ℕ} {s : Stream' α} : s.tail.get n = s.get (n + 1)


theorem isClosed_setOf_lipschitzOnWith {α β} [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0)
    (s : Set α) : IsClosed { f : α → β | LipschitzOnWith K f s }

{α : Type u_4}
{β : Type u_5}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(K : ℝ≥0)
(s : Set α)


theorem mul_pf_left (a₁ : R) (a₂) (_ : a₃ * b = c) :
    (a₁ ^ a₂ * a₃ : R) * b = a₁ ^ a₂ * c

{R : Type u_1}
[CommSemiring R]
{a₃ b c : R}
(a₁ : R)
(a₂ : ℕ)

a₃ * b = c → a₁ ^ a₂ * a₃ * b = a₁ ^ a₂ * c


theorem one_geom_sum (n : ℕ) : ∑ i ∈ range n, (1 : α) ^ i = n


@[to_additive existing (reorder := 6 7) smul_def]
lemma pow_def (p : α × β) (c : E) : p ^ c = (p.1 ^ c, p.2 ^ c)

{E : Type u_4}
{α : Type u_5}
{β : Type u_6}
[Pow α E]
[Pow β E]
(p : α × β)
(c : E)


@[simp]
theorem finRotate_one : finRotate 1 = Equiv.refl _


@[simp]
theorem coe_add (x y : ℝ) : ↑(x + y : ℝ) = (↑x + ↑y : Angle)


@[simp]
theorem contMDiffAt_transDiffeomorph_left {f : M → M'} {x} :
    ContMDiffAt (I.transDiffeomorph e) I' n f x ↔ ContMDiffAt I I' n f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, F)⟯ F)
{f : M → M'}
{x : M}


theorem exists_pos_of_mem {x} (hx : x ∈ s) : ∃ i, 0 < f i x

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
(f : SmoothPartitionOfUnity ι I M s)
{x : M}
(hx : x ∈ s)


theorem trans [Algebra S A] [IsScalarTower R S A] (hRS : FiniteType R S) (hSA : FiniteType S A) :
    FiniteType R A

{R : Type uR}
{S : Type uS}
{A : Type uA}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Algebra R S]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
(hRS : Algebra.FiniteType R S)
(hSA : Algebra.FiniteType S A)


@[to_additive]
theorem Group.rank_spec [h : Group.FG G] :
    ∃ S : Finset G, S.card = Group.rank G ∧ Subgroup.closure (S : Set G) = ⊤

(G : Type u_3)
[Group G]
[h : Group.FG G]

∃ S, S.card = Group.rank G ∧ Subgroup.closure ↑S = ⊤


theorem sieveOfSubfunctor_functorInclusion : sieveOfSubfunctor S.functorInclusion = S

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X : C}
{S : CategoryTheory.Sieve X}

CategoryTheory.Sieve.sieveOfSubfunctor S.functorInclusion = S


/-- A cone on `F` with cone point `X` is the same as an element of `lim Hom(X, F·)`,
    naturally in `X`. -/
@[simps!]
noncomputable def coyonedaCompLimIsoCones (F : J ⥤ C) :
    coyoneda ⋙ (whiskeringLeft _ _ _).obj F ⋙ lim ≅ F.cones

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

∀ (a : (CategoryTheory.coyoneda ⋙ (CategoryTheory.whiskeringLeft J C (Type v)).obj F ⋙ CategoryTheory.Limits.lim).obj X)
  (j : J),
  ((CategoryTheory.Limits.coyonedaCompLimIsoCones F).hom.app X a).app j =
    CategoryTheory.Limits.limit.π (F ⋙ CategoryTheory.coyoneda.obj X) j a


nonrec theorem cosh_three_mul : cosh (3 * x) = 4 * cosh x ^ 3 - 3 * cosh x

Real.cosh (3 * x) = 4 * Real.cosh x ^ 3 - 3 * Real.cosh x


theorem IsLUB.mem_upperBounds_of_tendsto [Preorder γ] [TopologicalSpace γ] [OrderClosedTopology γ]
    {f : α → γ} {s : Set α} {a : α} {b : γ} (hf : MonotoneOn f s) (ha : IsLUB s a)
    (hb : Tendsto f (𝓝[s] a) (𝓝 b)) : b ∈ upperBounds (f '' s)

{α : Type u_1}
{γ : Type u_3}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[Preorder γ]
[TopologicalSpace γ]
[OrderClosedTopology γ]
{f : α → γ}
{s : Set α}
{a : α}
{b : γ}
(hf : MonotoneOn f s)
(ha : IsLUB s a)
(hb : Filter.Tendsto f (𝓝[s] a) (𝓝 b))


lemma equivEssImageOfReflective_map_counitIso_app_hom [Reflective i]
    (X : Functor.EssImageSubcategory i) :
  (Functor.essImageInclusion i).map (equivEssImageOfReflective_counitIso_app X).hom =
    inv (NatTrans.app (reflectorAdjunction i).unit X.obj)

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

i.essImageInclusion.map (CategoryTheory.equivEssImageOfReflective_counitIso_app X).hom =
  CategoryTheory.inv ((CategoryTheory.reflectorAdjunction i).unit.app X.obj)


/-- If `L` preserves colimits and `ℰ` has them, then it is a left adjoint. Note this is a (partial)
converse to `leftAdjointPreservesColimits`.
-/
lemma isLeftAdjoint_of_preservesColimits (L : (C ⥤ Type v₁) ⥤ ℰ)
    [PreservesColimitsOfSize.{v₁, max u₁ v₁} L]
    [yoneda.HasPointwiseLeftKanExtension
      (yoneda ⋙ (opOpEquivalence C).congrLeft.functor.comp L)] :
    L.IsLeftAdjoint

(L : CategoryTheory.Functor (CategoryTheory.Functor C (Type v₁)) ℰ)

[CategoryTheory.Limits.PreservesColimitsOfSize.{v₁, max u₁ v₁, max u₁ v₁, v₁, max u₁ (v₁ + 1), u₂} L]

[CategoryTheory.yoneda.HasPointwiseLeftKanExtension
    (CategoryTheory.yoneda.comp ((CategoryTheory.opOpEquivalence C).congrLeft.functor.comp L))]


/-- If two sets `s` and `t` are included in a set `u`, and `μ s + μ t > μ u`,
then `s` intersects `t`. Version assuming that `s` is measurable. -/
theorem nonempty_inter_of_measure_lt_add' {m : MeasurableSpace α} (μ : Measure α) {s t u : Set α}
    (hs : MeasurableSet s) (h's : s ⊆ u) (h't : t ⊆ u) (h : μ u < μ s + μ t) :
    (s ∩ t).Nonempty

{α : Type u_1}
{m : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
{s t u : Set α}
(hs : MeasurableSet s)
(h's : s ⊆ u)
(h't : t ⊆ u)
(h : μ u < μ s + μ t)


/-- Each element of the scalars defines an additive monoid homomorphism. -/
@[simps]
def DistribSMul.toAddMonoidHom (x : M) : A →+ A

{M : Type u_1}
(A : Type u_4)
[AddZeroClass A]
[DistribSMul M A]
(x : M)

∀ (x_1 : A), (DistribSMul.toAddMonoidHom A x) x_1 = (fun x x_2 => x • x_2) x x_1


protected theorem SemanticallyEquivalent.imp {φ ψ φ' ψ' : L.BoundedFormula α n}
    (h : T.SemanticallyEquivalent φ ψ) (h' : T.SemanticallyEquivalent φ' ψ') :
    T.SemanticallyEquivalent (φ.imp φ') (ψ.imp ψ')

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
{n : ℕ}
{φ ψ φ' ψ' : L.BoundedFormula α n}
(h : T.SemanticallyEquivalent φ ψ)
(h' : T.SemanticallyEquivalent φ' ψ')

T.SemanticallyEquivalent (φ ⟹ φ') (ψ ⟹ ψ')


theorem MDifferentiableWithinAt.mono (hst : s ⊆ t) (h : MDifferentiableWithinAt I I' f t x) :
    MDifferentiableWithinAt I I' f s x


theorem mk_eq_mk_iff_isConj {a b : α} : ConjClasses.mk a = ConjClasses.mk b ↔ IsConj a b


/-- **Intermediate Value Theorem** for continuous functions on connected spaces. -/
theorem intermediate_value_univ [PreconnectedSpace X] (a b : X) {f : X → α} (hf : Continuous f) :
    Icc (f a) (f b) ⊆ range f

{X : Type u}
{α : Type v}
[TopologicalSpace X]
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[PreconnectedSpace X]
(a b : X)
{f : X → α}
(hf : Continuous f)


/-- A multiplicative morphism between commutative monoids gives a braided functor between
the corresponding discrete braided monoidal categories.
-/
@[simps!]
def Discrete.braidedFunctor (F : M →* N) : BraidedFunctor (Discrete M) (Discrete N)

{M : Type u}
[CommMonoid M]
{N : Type u}
[CommMonoid N]
(F : M →* N)

(CategoryTheory.Discrete.braidedFunctor F).ε = CategoryTheory.Discrete.eqToHom ⋯


@[to_additive]
theorem HasProd.sigma_of_hasProd {γ : β → Type*} {f : (Σb : β, γ b) → α} {g : β → α}
    {a : α} (ha : HasProd g a) (hf : ∀ b, HasProd (fun c ↦ f ⟨b, c⟩) (g b)) (hf' : Multipliable f) :
    HasProd f a

(hf : ∀ (b : β), HasProd (fun c => f ⟨b, c⟩) (g b))


@[to_additive]
theorem coe_pi (I : Set η) (H : ∀ i, Subgroup (f i)) :
    (pi I H : Set (∀ i, f i)) = Set.pi I fun i => (H i : Set (f i))

{η : Type u_7}
{f : η → Type u_8}
[(i : η) → AddGroup (f i)]
(I : Set η)
(H : (i : η) → AddSubgroup (f i))

↑(AddSubgroup.pi I H) = I.pi fun i => ↑(H i)


@[simp]
theorem isLocallyFraction_pred {U : Opens (PrimeSpectrum.Top R)} (f : ∀ x : U, Localizations R x) :
    (isLocallyFraction R).pred f =
      ∀ x : U,
        ∃ (V : _) (_ : x.1 ∈ V) (i : V ⟶ U),
          ∃ r s : R,
            ∀ y : V, ¬s ∈ y.1.asIdeal ∧ f (i y : U) * algebraMap _ _ s = algebraMap _ _ r

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

(f : (x : ↥U) → AlgebraicGeometry.StructureSheaf.Localizations R ↑x)

(AlgebraicGeometry.StructureSheaf.isLocallyFraction R).pred f =
  ∀ (x : ↥U),
    ∃ V,
      ∃ (_ : ↑x ∈ V),
        ∃ i r s,
          ∀ (y : ↥V),
            s ∉ (↑y).asIdeal ∧
              f ((fun x => ⟨↑x, ⋯⟩) y) *
                  (algebraMap R (AlgebraicGeometry.StructureSheaf.Localizations R ↑((fun x => ⟨↑x, ⋯⟩) y))) s =
                (algebraMap R (AlgebraicGeometry.StructureSheaf.Localizations R ↑((fun x => ⟨↑x, ⋯⟩) y))) r


theorem isIntegralCurveAt_eventuallyEq_of_contMDiffAt_boundaryless [BoundarylessManifold I M]
    (hv : ContMDiffAt I I.tangent 1 (fun x ↦ (⟨x, v x⟩ : TangentBundle I M)) (γ t₀))
    (hγ : IsIntegralCurveAt γ v t₀) (hγ' : IsIntegralCurveAt γ' v t₀) (h : γ t₀ = γ' t₀) :
    γ =ᶠ[𝓝 t₀] γ'

(hv : ContMDiffAt I I.tangent 1 (fun x => { proj := x, snd := v x }) (γ t₀))

γ =ᶠ[𝓝 t₀] γ'


@[to_additive]
theorem Antitone.tendsto_mulIndicator {ι} [Preorder ι] [One β] (s : ι → Set α) (hs : Antitone s)
    (f : α → β) (a : α) :
    Tendsto (fun i => mulIndicator (s i) f a) atTop (pure <| mulIndicator (⋂ i, s i) f a)

{α : Type u_1}
{β : Type u_2}
{ι : Type u_5}
[Preorder ι]
[Zero β]
(s : ι → Set α)
(hs : Antitone s)
(f : α → β)
(a : α)

Filter.Tendsto (fun i => (s i).indicator f a) Filter.atTop (pure ((⋂ i, s i).indicator f a))


/-- The only constant in a maximal ideal over a field is `0`. -/
theorem eq_zero_of_constant_mem_of_maximal (hR : IsField R) (I : Ideal R[X]) [hI : I.IsMaximal]
    (x : R) (hx : C x ∈ I) : x = 0

{R : Type u}
[Ring R]
(hR : IsField R)
(I : Ideal R[X])
[hI : I.IsMaximal]
(x : R)
(hx : Polynomial.C x ∈ I)


@[simp] theorem reverse_balance2 (l : RBNode α) (v : α) (r : RBNode α) :
    (balance2 l v r).reverse = balance1 r.reverse v l.reverse

{α : Type u_1}
(l : Batteries.RBNode α)
(v : α)
(r : Batteries.RBNode α)

(l.balance2 v r).reverse = r.reverse.balance1 v l.reverse


@[simp]
theorem uniqueProd_symm_apply [Unique β] (x : α) :
    (uniqueProd α β).symm x = (default, x)

{β : Type u_1}
{α : Type u_2}
[Unique β]
(x : α)

(Equiv.uniqueProd α β).symm x = (default, x)


@[simp, reassoc]
theorem gluedCoverT'_fst_fst (x y z : 𝒰.J) :
    𝒰.gluedCoverT' x y z ≫ pullback.fst _ _ ≫ pullback.fst _ _ =
      pullback.fst _ _ ≫ pullback.snd _ _

{X : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(x y z : 𝒰.J)

𝒰.gluedCoverT' x y z ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z))
        (CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map x)) ≫
      CategoryTheory.Limits.pullback.fst (𝒰.map y) (𝒰.map z) =
  CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map y))
      (CategoryTheory.Limits.pullback.fst (𝒰.map x) (𝒰.map z)) ≫
    CategoryTheory.Limits.pullback.snd (𝒰.map x) (𝒰.map y)


theorem SupPrime.not_isMin (ha : SupPrime a) : ¬IsMin a

{α : Type u_2}
[SemilatticeSup α]
{a : α}
(ha : SupPrime a)


theorem subgraphOfAdj_eq_induce {v w : V} (hvw : G.Adj v w) :
    G.subgraphOfAdj hvw = (⊤ : G.Subgraph).induce {v, w}

{V : Type u}
{G : SimpleGraph V}
{v w : V}
(hvw : G.Adj v w)


/-- A morphism in the `Dial C` category from `⟨U, X, α⟩` to `⟨V, Y, β⟩` is a pair
`(f : U ⟶ V, F : U ⨯ Y ⟶ X)` such that `{(u,y) | α(u, F(u, y))} ≤ {(u,y) | β(f(u), y)}`. -/
@[ext] structure Hom (X Y : Dial C) where
  /-- Maps the sources -/
  f : X.src ⟶ Y.src
  /-- Maps the targets (contravariantly) -/
  F : X.src ⨯ Y.tgt ⟶ X.tgt
  /-- This says `{(u, y) | α(u, F(u, y))} ⊆ {(u, y) | β(f(u), y)}` using subobject pullbacks -/
  le :
    (Subobject.pullback π(π₁, F)).obj X.rel ≤
    (Subobject.pullback (prod.map f (𝟙 _))).obj Y.rel

(CategoryTheory.Subobject.pullback (CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.fst self.F)).obj X.rel ≤
  (CategoryTheory.Subobject.pullback
        (CategoryTheory.Limits.prod.map self.f (CategoryTheory.CategoryStruct.id Y.tgt))).obj
    Y.rel


@[reassoc (attr := simp)]
lemma pOpcycles_comp_opcyclesIso_hom : S.pOpcycles ≫ h.opcyclesIso.hom = h.p

CategoryTheory.CategoryStruct.comp S.pOpcycles h.opcyclesIso.hom = h.p


/-- A scheme `X` is integral if its is nonempty,
and `𝒪ₓ(U)` is an integral domain for each `U ≠ ∅`. -/
class IsIntegral : Prop where
  nonempty : Nonempty X := by infer_instance
  component_integral : ∀ (U : X.Opens) [Nonempty U], IsDomain Γ(X, U) := by infer_instance

{X : AlgebraicGeometry.Scheme}
[self : AlgebraicGeometry.IsIntegral X]


@[simp]
theorem smul_mem_pointwise_smul_iff {a : α} {S : Subgroup G} {x : G} : a • x ∈ a • S ↔ x ∈ S

{α : Type u_1}
{G : Type u_2}
[Group G]
[Group α]
[MulDistribMulAction α G]
{a : α}
{S : Subgroup G}
{x : G}


theorem zero_kronecker [MulZeroClass α] (B : Matrix n p α) : (0 : Matrix l m α) ⊗ₖ B = 0

{α : Type u_2}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{p : Type u_11}
[MulZeroClass α]
(B : Matrix n p α)

Matrix.kroneckerMap (fun x x_1 => x * x_1) 0 B = 0


@[simp]
theorem comp_assoc {Q T : Type*} [SMul Q T]
    {η : P → Q} {θ : M → Q} {ζ : N → Q}
    (h : Z →ₑ[η] T) (g : Y →ₑ[ψ] Z) (f : X →ₑ[φ] Y)
    [CompTriple φ ψ χ] [CompTriple χ η θ]
    [CompTriple ψ η ζ] [CompTriple φ ζ θ] :
    h.comp (g.comp f) = (h.comp g).comp f

{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
{φ : M → N}
{ψ : N → P}
{χ : M → P}
{X : Type u_5}
[SMul M X]
{Y : Type u_6}
[SMul N Y]
{Z : Type u_7}
[SMul P Z]
{Q : Type u_8}
{T : Type u_9}
[SMul Q T]
{η : P → Q}
{θ : M → Q}
{ζ : N → Q}
(h : Z →ₑ[η] T)
(g : Y →ₑ[ψ] Z)
(f : X →ₑ[φ] Y)
[CompTriple φ ψ χ]
[CompTriple χ η θ]
[CompTriple ψ η ζ]
[CompTriple φ ζ θ]


theorem IsClopen.union (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ∪ t)

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
(hs : IsClopen s)
(ht : IsClopen t)


theorem HenselianLocalRing.TFAE (R : Type u) [CommRing R] [LocalRing R] :
    TFAE
      [HenselianLocalRing R,
        ∀ f : R[X], f.Monic → ∀ a₀ : ResidueField R, aeval a₀ f = 0 →
          aeval a₀ (derivative f) ≠ 0 → ∃ a : R, f.IsRoot a ∧ residue R a = a₀,
        ∀ {K : Type u} [Field K],
          ∀ (φ : R →+* K), Surjective φ → ∀ f : R[X], f.Monic → ∀ a₀ : K,
            f.eval₂ φ a₀ = 0 → f.derivative.eval₂ φ a₀ ≠ 0 → ∃ a : R, f.IsRoot a ∧ φ a = a₀]

[HenselianLocalRing R,
    ∀ (f : R[X]),
      f.Monic →
        ∀ (a₀ : LocalRing.ResidueField R),
          (Polynomial.aeval a₀) f = 0 →
            (Polynomial.aeval a₀) (Polynomial.derivative f) ≠ 0 → ∃ a, f.IsRoot a ∧ (LocalRing.residue R) a = a₀,
    ∀ {K : Type u} [inst : Field K] (φ : R →+* K),
      Function.Surjective ⇑φ →
        ∀ (f : R[X]),
          f.Monic →
            ∀ (a₀ : K),
              Polynomial.eval₂ φ a₀ f = 0 →
                Polynomial.eval₂ φ a₀ (Polynomial.derivative f) ≠ 0 → ∃ a, f.IsRoot a ∧ φ a = a₀].TFAE


/-- Three points are collinear if and only if the first or third point equals the second or
the sine of the angle between three points is zero. -/
theorem collinear_iff_eq_or_eq_or_sin_eq_zero {p₁ p₂ p₃ : P} :
    Collinear ℝ ({p₁, p₂, p₃} : Set P) ↔ p₁ = p₂ ∨ p₃ = p₂ ∨ Real.sin (∠ p₁ p₂ p₃) = 0

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}

Collinear ℝ {p₁, p₂, p₃} ↔ p₁ = p₂ ∨ p₃ = p₂ ∨ Real.sin (EuclideanGeometry.angle p₁ p₂ p₃) = 0


@[simp]
theorem symm_neg : (neg R : E ≃ₗᵢ[R] E).symm = neg R

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]

(LinearIsometryEquiv.neg R).symm = LinearIsometryEquiv.neg R


@[simp]
theorem center_eq_top (R) [NonUnitalCommRing R] : center R = ⊤


@[reassoc (attr := simp)]
lemma LeftHomologyData.liftCycles_comp_cyclesIso_hom :
    S.liftCycles k hk ≫ h.cyclesIso.hom = h.liftK k hk

(hk : CategoryTheory.CategoryStruct.comp k S.g = 0)

CategoryTheory.CategoryStruct.comp (S.liftCycles k hk) h.cyclesIso.hom = h.liftK k hk


theorem Eventually.diag_of_prod_left {f : Filter α} {g : Filter γ} {p : (α × α) × γ → Prop} :
    (∀ᶠ x in (f ×ˢ f) ×ˢ g, p x) → ∀ᶠ x : α × γ in f ×ˢ g, p ((x.1, x.1), x.2)

{α : Type u_1}
{γ : Type u_3}
{f : Filter α}
{g : Filter γ}
{p : (α × α) × γ → Prop}

(∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x) → ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.1, x.1), x.2)


/-- If `f` is a family of mutually independent random variables (`iIndepFun m f μ`) and `S, T` are
two disjoint finite index sets, then the tuple formed by `f i` for `i ∈ S` is independent of the
tuple `(f i)_i` for `i ∈ T`. -/
lemma iIndepFun.indepFun_finset (S T : Finset ι) (hST : Disjoint S T) (hf_Indep : iIndepFun m f μ)
    (hf_meas : ∀ i, Measurable (f i)) :
    IndepFun (fun a (i : S) ↦ f i a) (fun a (i : T) ↦ f i a) μ

(hf_Indep : ProbabilityTheory.iIndepFun m f μ)

ProbabilityTheory.IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) μ


/-- Subtraction of rational functions. -/
protected irreducible_def sub : RatFunc K → RatFunc K → RatFunc K

∀ (x x_1 : RatFunc K),
  x.sub x_1 =
    match x, x_1 with
    | { toFractionRing := p }, { toFractionRing := q } => { toFractionRing := p - q }


@[to_additive]
theorem toMonoidHom_injective : Injective (toMonoidHom : _ → α →* β)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[AddZeroClass α]
[AddZeroClass β]


protected theorem map_smulₛₗ (f : M₁ →SL[σ₁₂] M₂) (c : R₁) (x : M₁) : f (c • x) = σ₁₂ c • f x

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


@[to_additive (attr := deprecated (since := "2024-01-27"))]
theorem exponentExists_iff_ne_zero : ExponentExists G ↔ exponent G ≠ 0

AddMonoid.ExponentExists G ↔ AddMonoid.exponent G ≠ 0


/-- If the action is periodic, then a lower bound for its period can be computed. -/
@[to_additive "If the action is periodic, then a lower bound for its period can be computed."]
theorem le_period {m : M} {a : α} {n : ℕ} (period_pos : 0 < period m a)
    (moved : ∀ k, 0 < k → k < n → m ^ k • a ≠ a) : n ≤ period m a

(moved : ∀ (k : ℕ), 0 < k → k < n → m ^ k • a ≠ a)


theorem _root_.MeasureTheory.AEStronglyMeasurable.compProd_mk_left {δ : Type*} [TopologicalSpace δ]
    {f : β × γ → δ} (hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) :
    ∀ᵐ x ∂κ a, AEStronglyMeasurable (fun y => f (x, y)) (η (a, x))

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

{f : β × γ → δ}

(hf : MeasureTheory.AEStronglyMeasurable f ((κ ⊗ₖ η) a))

∀ᵐ (x : β) ∂κ a, MeasureTheory.AEStronglyMeasurable (fun y => f (x, y)) (η (a, x))


/-- See also `Finset.prod_ite_eq'`. -/
@[to_additive "See also `Finset.sum_ite_eq'`."]
lemma prod_ite_eq' (i : ι) (f : ι → α) : ∏ j, (if j = i then f j else 1) = f i

{ι : Type u_6}
{α : Type u_8}
[Fintype ι]
[AddCommMonoid α]
[DecidableEq ι]
(i : ι)
(f : ι → α)

(∑ j : ι, if j = i then f j else 0) = f i


theorem tsum_mul_left [T2Space α] : ∑' x, a * f x = a * ∑' x, f x

{ι : Type u_1}
{α : Type u_4}
[DivisionSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
{a : α}
[T2Space α]


theorem toBasicOpen_surjective (f : R) : Function.Surjective (toBasicOpen R f)

Function.Surjective ⇑(AlgebraicGeometry.StructureSheaf.toBasicOpen R f)


lemma Nat.Prime.divisors_sq {p : ℕ} (hp : p.Prime) : (p ^ 2).divisors = {p ^ 2, p, 1}


@[simp]
theorem equiv_symm_toEmbedding_trans_toEmbedding {α β : Sort*} (e : α ≃ β) :
    e.symm.toEmbedding.trans e.toEmbedding = Embedding.refl _

{α : Sort u_1}
{β : Sort u_2}
(e : α ≃ β)

e.symm.toEmbedding.trans e.toEmbedding = Function.Embedding.refl β


@[ext] theorem initial.hom_ext [HasInitial C] {P : C} (f g : ⊥_ C ⟶ P) : f = g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasInitial C]
{P : C}
(f g : ⊥_ C ⟶ P)


theorem eLpNorm_one_condexp_le_eLpNorm (f : α → ℝ) : eLpNorm (μ[f|m]) 1 μ ≤ eLpNorm f 1 μ

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → ℝ)

MeasureTheory.eLpNorm (μ[f|m]) 1 μ ≤ MeasureTheory.eLpNorm f 1 μ


/-- The ray of `someRayVector`. -/
@[simp]
theorem someRayVector_ray (x : Module.Ray R M) : (⟦x.someRayVector⟧ : Module.Ray R M) = x

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(x : Module.Ray R M)


@[to_additive (attr := simp)]
theorem diam_one [One α] : diam (1 : Set α) = 0

{α : Type u}
[PseudoMetricSpace α]
[One α]


/-- The unit of the constructed pointwise left Kan extension when
`HasPointwiseLeftKanExtension L F` holds. -/
@[simps]
noncomputable def pointwiseLeftKanExtensionUnit : F ⟶ L ⋙ pointwiseLeftKanExtension L F

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
(L : CategoryTheory.Functor C D)
(F : CategoryTheory.Functor C H)
[L.HasPointwiseLeftKanExtension F]
(X : C)

(L.pointwiseLeftKanExtensionUnit F).app X =
  CategoryTheory.Limits.colimit.ι ((CategoryTheory.CostructuredArrow.proj L (L.obj X)).comp F)
    (CategoryTheory.CostructuredArrow.mk (CategoryTheory.CategoryStruct.id (L.obj X)))


@[to_additive (attr := simp)]
theorem smul_mk : a • mk i b = ⟨i, a • b⟩

{ι : Type u_1}
{M : Type u_2}
{α : ι → Type u_4}
[(i : ι) → VAdd M (α i)]
(a : M)
(i : ι)
(b : α i)


theorem coeff_mul_add_eq_of_natDegree_le {df dg : ℕ} {f g : R[X]}
    (hdf : natDegree f ≤ df) (hdg : natDegree g ≤ dg) :
    (f * g).coeff (df + dg) = f.coeff df * g.coeff dg

{R : Type u}
[Semiring R]
{df dg : ℕ}
{f g : R[X]}
(hdf : f.natDegree ≤ df)
(hdg : g.natDegree ≤ dg)


lemma toIntAlgHom_injective [Ring R] [Ring S] [Algebra ℤ R] [Algebra ℤ S] :
    Function.Injective (RingHom.toIntAlgHom : (R →+* S) → _)

{R : Type u_1}
{S : Type u_2}
[Ring R]
[Ring S]
[Algebra ℤ R]
[Algebra ℤ S]


@[simp]
theorem addHaar_image_homothety (x : E) (r : ℝ) (s : Set E) :
    μ (AffineMap.homothety x r '' s) = ENNReal.ofReal (abs (r ^ finrank ℝ E)) * μ s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(x : E)
(r : ℝ)
(s : Set E)

μ (⇑(AffineMap.homothety x r) '' s) = ENNReal.ofReal |r ^ FiniteDimensional.finrank ℝ E| * μ s


theorem filter_eq_zero_iff : f.filter p = 0 ↔ ∀ x, p x → f x = 0

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

Finsupp.filter p f = 0 ↔ ∀ (x : α), p x → f x = 0


theorem eq_empty_or_nonempty (s : Finset α) : s = ∅ ∨ s.Nonempty


@[simp] lemma _root_.EReal.expHomeomorph_apply (x : EReal) : expHomeomorph x = exp x


@[simp]
theorem log_pow_eq_self [DecidableEq M] {n : M} (h : Function.Injective fun m : ℕ => n ^ m)
    (m : ℕ) : log (pow n m) = m

{M : Type u_1}
[Monoid M]
[DecidableEq M]
{n : M}
(h : Function.Injective fun m => n ^ m)
(m : ℕ)


theorem contDiff_pi' (hΦ : ∀ i, ContDiff K n fun x => Φ x i) : ContDiff K n Φ

(hΦ : ∀ (i : ι), ContDiff K n fun x => Φ x i)


theorem Monotone.le_of_tendsto [TopologicalSpace α] [Preorder α] [OrderClosedTopology α]
    [SemilatticeInf β] {f : β → α} {a : α} (hf : Monotone f) (ha : Tendsto f atBot (𝓝 a)) (b : β) :
    a ≤ f b

(ha : Filter.Tendsto f Filter.atBot (𝓝 a))


@[simp]
theorem map_smul (f : M →ₗ⁅R,L⁆ N) (c : R) (x : M) : f (c • x) = c • f x

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


theorem to_nat_pos : ∀ n : PosNum, 0 < (n : ℕ)


@[simp]
theorem alternatization_apply_toAlternatingMap :
    (alternatization f).toAlternatingMap = MultilinearMap.alternatization f.1

(f : ContinuousMultilinearMap R (fun x => M) N)

(ContinuousMultilinearMap.alternatization f).toAlternatingMap = MultilinearMap.alternatization f.toMultilinearMap


/-- A set is sequentially closed iff it is equal to its sequential closure. -/
theorem isSeqClosed_iff {s : Set X} : IsSeqClosed s ↔ seqClosure s = s

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


@[to_additive]
theorem singleton_mul_closedBall_one : {x} * closedBall 1 δ = closedBall x δ

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(x : E)

{x} + Metric.closedBall 0 δ = Metric.closedBall x δ


@[simp]
theorem mem_mk {l u x : ι → ℝ} {H} : x ∈ mk l u H ↔ ∀ i, x i ∈ Ioc (l i) (u i)

{ι : Type u_1}
{l u x : ι → ℝ}
{H : ∀ (i : ι), l i < u i}

x ∈ { lower := l, upper := u, lower_lt_upper := H } ↔ ∀ (i : ι), x i ∈ Set.Ioc (l i) (u i)


@[simp]
theorem comm_symm_tmul (a : A) (b : B) :
    (TensorProduct.comm R A B).symm (b ⊗ₜ a) = a ⊗ₜ b

(R : Type uR)
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
(a : A)
(b : B)

(Algebra.TensorProduct.comm R A B).symm (b ⊗ₜ[R] a) = a ⊗ₜ[R] b


private lemma auxRTensorBaseChange_eq (I : Ideal S) :
    auxRTensorBaseChange R S M I = rTensor (S ⊗[R] M) (Submodule.subtype I)

(R : Type u)
(S : Type v)
(M : Type w)
[CommRing R]
[CommRing S]
[Algebra R S]
[AddCommGroup M]
[Module R M]
(I : Ideal S)

Module.Flat.auxRTensorBaseChange R S M I = LinearMap.rTensor (S ⊗[R] M) (Submodule.subtype I)


@[simp]
theorem map_of_apply {f : α → β} (a : α) : map f (of a) = of (f a)

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

(FreeAbelianGroup.map f) (FreeAbelianGroup.of a) = FreeAbelianGroup.of (f a)


lemma mem_ae_iff_prob_eq_one₀ (hs : NullMeasurableSet s μ) : s ∈ ae μ ↔ μ s = 1

(hs : MeasureTheory.NullMeasurableSet s μ)


@[to_additive]
lemma exists_mem_ofUnits_val_eq (S : Subgroup Mˣ) {x : M} (h : x ∈ S.ofUnits) :
    ∃ y ∈ S, y = x

{M : Type u_1}
[Monoid M]
(S : Subgroup Mˣ)
{x : M}
(h : x ∈ S.ofUnits)


theorem norm_const_smul (hp : p ≠ 0) {c : 𝕜} (f : lp E p) : ‖c • f‖ = ‖c‖ * ‖f‖

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{𝕜 : Type u_3}
[NormedDivisionRing 𝕜]
[(i : α) → Module 𝕜 (E i)]
[∀ (i : α), BoundedSMul 𝕜 (E i)]
(hp : p ≠ 0)
{c : 𝕜}
(f : ↥(lp E p))

‖c • f‖ = ‖c‖ * ‖f‖


@[simp]
theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
    (coconeMorphism F j') (F.map f x) = (coconeMorphism F j) x

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ CommRingCat)
(j j' : J)
(f : j ⟶ j')
(x : ↑(F.obj j))

(CommRingCat.Colimits.coconeMorphism F j') ((F.map f) x) = (CommRingCat.Colimits.coconeMorphism F j) x


lemma arg_mul_eq_add_arg_iff {x y : ℂ} (hx₀ : x ≠ 0) (hy₀ : y ≠ 0) :
    (x * y).arg = x.arg + y.arg ↔ arg x + arg y ∈ Set.Ioc (-π) π

(x * y).arg = x.arg + y.arg ↔ x.arg + y.arg ∈ Set.Ioc (-π) π


@[elab_as_elim] protected lemma induction_on {p : ℤ → Prop} (i : ℤ)
    (hz : p 0) (hp : ∀ i : ℕ, p i → p (i + 1)) (hn : ∀ i : ℕ, p (-i) → p (-i - 1)) : p i

{p : ℤ → Prop}
(i : ℤ)
(hz : p 0)
(hp : ∀ (i : ℕ), p ↑i → p (↑i + 1))
(hn : ∀ (i : ℕ), p (-↑i) → p (-↑i - 1))


theorem null_of_totalVariation_zero (s : SignedMeasure α) {i : Set α}
    (hs : s.totalVariation i = 0) : s i = 0

{α : Type u_1}
[MeasurableSpace α]
(s : MeasureTheory.SignedMeasure α)
{i : Set α}
(hs : s.totalVariation i = 0)


@[to_additive]
theorem Set.piecewise_inv [∀ i, Inv (f i)] (s : Set I) [∀ i, Decidable (i ∈ s)] (f₁ g₁ : ∀ i, f i) :
    s.piecewise f₁⁻¹ g₁⁻¹ = (s.piecewise f₁ g₁)⁻¹

{I : Type u}
{f : I → Type v}
[(i : I) → Neg (f i)]
(s : Set I)
[(i : I) → Decidable (i ∈ s)]
(f₁ g₁ : (i : I) → f i)

s.piecewise (-f₁) (-g₁) = -s.piecewise f₁ g₁


@[simp]
lemma bodd_mul (m n : ℕ) : bodd (m * n) = (bodd m && bodd n)


@[to_additive (attr := simp)]
theorem equivMapOfInjective_coe_mulEquiv (H : Subgroup G) (e : G ≃* G') :
    H.equivMapOfInjective (e : G →* G') (EquivLike.injective e) = e.subgroupMap H

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
(H : Subgroup G)
(e : G ≃* G')

H.equivMapOfInjective ↑e ⋯ = e.subgroupMap H


@[simp]
theorem sign_ofSubtype {p : α → Prop} [DecidablePred p] (f : Equiv.Perm (Subtype p)) :
    sign (ofSubtype f) = sign f

{α : Type u}
[DecidableEq α]
[Fintype α]
{p : α → Prop}
[DecidablePred p]
(f : Equiv.Perm (Subtype p))

Equiv.Perm.sign (Equiv.Perm.ofSubtype f) = Equiv.Perm.sign f


@[simp]
theorem norm_coe_unitary_mul (U : unitary E) (A : E) : ‖(U : E) * A‖ = ‖A‖

{E : Type u_2}
[NormedRing E]
[StarRing E]
[CstarRing E]
(U : ↥(unitary E))
(A : E)

‖↑U * A‖ = ‖A‖


theorem Irreducible.isUnit_gcd_iff [GCDMonoid α] {x y : α} (hx : Irreducible x) :
    IsUnit (gcd x y) ↔ ¬(x ∣ y)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{x y : α}
(hx : Irreducible x)


theorem lt_def [Preorder β] : ((· < ·) : β* → β* → Prop) = LiftRel (· < ·)

{α : Type u}
{β : Type v}
{φ : Ultrafilter α}
[Preorder β]

(fun x x_1 => x < x_1) = Filter.Germ.LiftRel fun x x_1 => x < x_1


theorem mk_subset_ge_of_subset_image_lift {α : Type u} {β : Type v} (f : α → β) {s : Set α}
    {t : Set β} (h : t ⊆ f '' s) : lift.{u} #t ≤ lift.{v} #({ x ∈ s | f x ∈ t } : Set α)

Cardinal.lift.{u, v} (Cardinal.mk ↑t) ≤ Cardinal.lift.{v, u} (Cardinal.mk ↑{x | x ∈ s ∧ f x ∈ t})


theorem oadd_lt_oadd_3 {e n a₁ a₂} (h : a₁ < a₂) : oadd e n a₁ < oadd e n a₂

{e : ONote}
{n : ℕ+}
{a₁ a₂ : ONote}
(h : a₁ < a₂)


@[to_additive (attr := simp) existing AddGroupNorm.apply_one]
theorem apply_one (x : E) : (1 : GroupNorm E) x = if x = 1 then 0 else 1

{E : Type u_4}
[Group E]
[DecidableEq E]
(x : E)


theorem Finset.centerMass_insert (ha : i ∉ t) (hw : ∑ j ∈ t, w j ≠ 0) :
    (insert i t).centerMass w z =
      (w i / (w i + ∑ j ∈ t, w j)) • z i +
        ((∑ j ∈ t, w j) / (w i + ∑ j ∈ t, w j)) • t.centerMass w z

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(i : ι)
(t : Finset ι)
{w : ι → R}
(z : ι → E)
(ha : i ∉ t)
(hw : ∑ j ∈ t, w j ≠ 0)


theorem equivalent_weightedSumSquares (Q : QuadraticForm K V) :
    ∃ w : Fin (FiniteDimensional.finrank K V) → K, Equivalent Q (weightedSumSquares K w)

{K : Type u_3}
{V : Type u_8}
[Field K]
[Invertible 2]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
(Q : QuadraticForm K V)

∃ w, QuadraticMap.Equivalent Q (QuadraticMap.weightedSumSquares K w)


@[simp]
theorem intCast_toProd (n : ℤ) : (n : 𝓜(𝕜, A)).toProd = n

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(n : ℤ)


@[simp] theorem find?_cons_of_neg (l) (h : ¬p a) : find? p (a :: l) = find? p l

∀ {α : Type u_1} {p : α → Bool} {a : α} (l : List α), ¬p a = true → List.find? p (a :: l) = List.find? p l


theorem Duplicate.ne_nil (h : x ∈+ l) : l ≠ []

{α : Type u_1}
{l : List α}
{x : α}
(h : List.Duplicate x l)


@[to_additive]
theorem hasCompactMulSupport_def : HasCompactMulSupport f ↔ IsCompact (closure (mulSupport f))

{α : Type u_2}
{β : Type u_4}
[TopologicalSpace α]
[One β]
{f : α → β}

HasCompactMulSupport f ↔ IsCompact (closure (Function.mulSupport f))


theorem fderiv.comp_fderivWithin {g : F → G} (hg : DifferentiableAt 𝕜 g (f x))
    (hf : DifferentiableWithinAt 𝕜 f s x) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (g ∘ f) s x = (fderiv 𝕜 g (f x)).comp (fderivWithin 𝕜 f s x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
(x : E)
{s : Set E}
{g : F → G}
(hg : DifferentiableAt 𝕜 g (f x))
(hf : DifferentiableWithinAt 𝕜 f s x)
(hxs : UniqueDiffWithinAt 𝕜 s x)


/-- The conditional cdf is lower or equal to 1 for all `a : α`. -/
theorem condCDF_le_one (ρ : Measure (α × ℝ)) (a : α) (x : ℝ) : condCDF ρ a x ≤ 1

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
(a : α)
(x : ℝ)


@[simp]
theorem range_succ (n : ℕ) : range (succ n) = n ::ₘ range n

Multiset.range n.succ = n ::ₘ Multiset.range n


theorem isSeparatedFor_iff_generate :
    IsSeparatedFor P R ↔ IsSeparatedFor P (generate R : Presieve X)

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

CategoryTheory.Presieve.IsSeparatedFor P R ↔
  CategoryTheory.Presieve.IsSeparatedFor P (CategoryTheory.Sieve.generate R).arrows


@[simp] lemma toAdd_vadd [VAdd α β] (a) (b : β) : (toAdd a : α) +ᵥ b = a • b

{α : Type u_7}
{β : Type u_8}
[VAdd α β]
(a : Multiplicative α)
(b : β)


lemma finset_sup'_nhds_apply [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (fun a ↦ s.sup' hne (f · a)) l (𝓝 (s.sup' hne g))

(hs : ∀ i ∈ s, Filter.Tendsto (f i) l (𝓝 (g i)))

Filter.Tendsto (fun a => s.sup' hne fun x => f x a) l (𝓝 (s.sup' hne g))


theorem ContinuousWithinAt.preimage_mem_nhdsWithin' {f : α → β} {x : α} {s : Set α} {t : Set β}
    (h : ContinuousWithinAt f s x) (ht : t ∈ 𝓝[f '' s] f x) : f ⁻¹' t ∈ 𝓝[s] x

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


/-- See also `Finset.prod_dite_eq'`. -/
@[to_additive "See also `Finset.sum_dite_eq'`."] lemma prod_dite_eq' (i : ι) (f : ∀ j, j = i → α) :
    ∏ j, (if h : j = i then f j h else 1) = f i rfl

{ι : Type u_6}
{α : Type u_8}
[Fintype ι]
[AddCommMonoid α]
[DecidableEq ι]
(i : ι)
(f : (j : ι) → j = i → α)

(∑ j : ι, if h : j = i then f j h else 0) = f i ⋯


theorem lt_rpow_of_log_lt (hx : 0 ≤ x) (hy : 0 < y) (h : Real.log x < z * Real.log y) :
    x < y ^ z

{x y z : ℝ}
(hx : 0 ≤ x)
(hy : 0 < y)
(h : Real.log x < z * Real.log y)


/-- The ideal of `A ⊗[R] B` generated by `I` is the image of `A ⊗[R] I` -/
lemma Ideal.map_includeRight_eq (I : Ideal B) :
    (I.map (Algebra.TensorProduct.includeRight : B →ₐ[R] A ⊗[R] B)).restrictScalars R
      = LinearMap.range (LinearMap.lTensor A (Submodule.subtype (I.restrictScalars R)))

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
{B : Type u_3}
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(I : Ideal B)

Submodule.restrictScalars R (Ideal.map Algebra.TensorProduct.includeRight I) =
  LinearMap.range (LinearMap.lTensor A (Submodule.restrictScalars R I).subtype)


theorem mem_congr {s t : WSeq α} (h : s ~ʷ t) (a) : a ∈ s ↔ a ∈ t

{α : Type u}
{s t : Stream'.WSeq α}
(h : s ~ʷ t)
(a : α)


/-- Constant one function has product `1` -/
@[to_additive "Constant zero function has sum `0`"]
theorem hasProd_one : HasProd (fun _ ↦ 1 : β → α) 1

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]


theorem natAbs_div_le_natAbs (a b : Int) : natAbs (a / b) ≤ natAbs a


@[simp]
theorem coequalizerIso_quot_comp_inv :
    ↾Quot.mk (CoequalizerRel f g) ≫ (coequalizerIso f g).inv = coequalizer.π f g

↾Quot.mk (CategoryTheory.Limits.Types.CoequalizerRel f g) ≫ (CategoryTheory.Limits.Types.coequalizerIso f g).inv =
  CategoryTheory.Limits.coequalizer.π f g


/-- Engel subalgebras are self-normalizing.
See `LieSubalgebra.normalizer_eq_self_of_engel_le` for a proof that Lie-subalgebras
containing an Engel subalgebra are also self-normalizing,
provided that the ambient Lie algebra is artinina. -/
@[simp]
lemma normalizer_engel (x : L) : normalizer (engel R x) = engel R x

(R : Type u_1)
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(x : L)

(LieSubalgebra.engel R x).normalizer = LieSubalgebra.engel R x


@[simp]
theorem algebraMap_end_apply (a : R) (m : M) : algebraMap R (End S M) a m = a • m

(R : Type u)
(S : Type v)
(M : Type w)
[CommSemiring R]
[Semiring S]
[AddCommMonoid M]
[Module R M]
[Module S M]
[SMulCommClass S R M]
[SMul R S]
[IsScalarTower R S M]
(a : R)
(m : M)

((algebraMap R (Module.End S M)) a) m = a • m


theorem card_eq_two : s.card = 2 ↔ ∃ x y, x ≠ y ∧ s = {x, y}

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


/-- The categorical equivalence between `C` and `ShrinkHoms C`, when `C` is locally small.
-/
@[simps!]
noncomputable def equivalence : C ≌ ShrinkHoms C

[CategoryTheory.LocallySmall.{w, v, u} C]

(CategoryTheory.ShrinkHoms.equivalence C).counitIso.inv.app X =
  (equivShrink (X.fromShrinkHoms ⟶ X.fromShrinkHoms)) (𝟙 X.fromShrinkHoms)


@[simp]
theorem Iio_subset_Iio_iff : Iio a ⊆ Iio b ↔ a ≤ b

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


@[simp] theorem eq_neg_self_iff {a : R} : a = -a ↔ a = 0

{R : Type u_1}
[NonAssocRing R]
[NoZeroDivisors R]
[CharZero R]
{a : R}


@[to_additive]
theorem mul_one_div (x y : G) : x * (1 / y) = x / y

{G : Type u_3}
[DivInvMonoid G]
(x y : G)


@[simp]
theorem lookupAll_cons_ne (l) {a} : ∀ s : Sigma β, a ≠ s.1 → lookupAll a (s :: l) = lookupAll a l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(l : List (Sigma β))
{a : α}
(s : Sigma β)

a ≠ s.fst → List.lookupAll a (s :: l) = List.lookupAll a l


theorem mem_of_mem_coe {a : α} (ha : a ∈ (γ : Set α)) : ⟨a, coe_subset ha⟩ ∈ γ

(ha :
  a ∈ do
    let a ← γ
    pure ↑a)


@[simp]
theorem lor_bit : ∀ a m b n, bit a m ||| bit b n = bit (a || b) (m ||| n)

Nat.bit a m ||| Nat.bit b n = Nat.bit (a || b) (m ||| n)


@[simp]
theorem dual_top : dual (⊤ : Interval α) = ⊤

{α : Type u_1}
[Preorder α]
[BoundedOrder α]


@[simp]
theorem realize_add (x y : ring.Term α) (v : α → R) :
    Term.realize v (x + y) = Term.realize v x + Term.realize v y

{α : Type u_1}
{R : Type u_2}
[Add R]
[Mul R]
[Neg R]
[One R]
[Zero R]
[FirstOrder.Ring.CompatibleRing R]
(x y : FirstOrder.Language.ring.Term α)
(v : α → R)

FirstOrder.Language.Term.realize v (x + y) = FirstOrder.Language.Term.realize v x + FirstOrder.Language.Term.realize v y


theorem TendstoInMeasure.exists_seq_tendsto_ae' {u : Filter ι} [NeBot u] [IsCountablyGenerated u]
    {f : ι → α → E} {g : α → E} (hfg : TendstoInMeasure μ f u g) :
    ∃ ns : ℕ → ι, ∀ᵐ x ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))

(hfg : MeasureTheory.TendstoInMeasure μ f u g)

∃ ns, ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun i => f (ns i) x) Filter.atTop (𝓝 (g x))


/-- In a complete lattice, the liminf of a function is the infimum over sets `s` in the filter
of the supremum of the function over `s` -/
theorem liminf_eq_iSup_iInf {f : Filter β} {u : β → α} : liminf u f = ⨆ s ∈ f, ⨅ a ∈ s, u a

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

Filter.liminf u f = ⨆ s ∈ f, ⨅ a ∈ s, u a


/-- A continuous, periodic function has compact range. -/
theorem Periodic.compact_of_continuous [TopologicalSpace α] {f : ℝ → α} {c : ℝ} (hp : Periodic f c)
    (hc : c ≠ 0) (hf : Continuous f) : IsCompact (range f)

{α : Type u}
[TopologicalSpace α]
{f : ℝ → α}
{c : ℝ}
(hp : Function.Periodic f c)
(hc : c ≠ 0)
(hf : Continuous f)


theorem infiniteNeg_iff_infinitesimal_inv_neg {x : ℝ*} :
    InfiniteNeg x ↔ Infinitesimal x⁻¹ ∧ x⁻¹ < 0

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


lemma surjectiveOnStalks_of_surjective (h : Function.Surjective f) :
    SurjectiveOnStalks f

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
{f : R →+* S}
(h : Function.Surjective ⇑f)


/-- An element of `R` admitting a left inverse is `M`-regular. -/
theorem of_mul_eq_one (h : a * b = 1) : IsSMulRegular M b

{R : Type u_1}
{M : Type u_3}
{a b : R}
[Monoid R]
[MulAction R M]
(h : a * b = 1)


theorem atTop_countable_basis [Nonempty α] [SemilatticeSup α] [Countable α] :
    HasCountableBasis (atTop : Filter α) (fun _ => True) Ici

{α : Type u_3}
[Nonempty α]
[SemilatticeSup α]
[Countable α]

Filter.atTop.HasCountableBasis (fun x => True) Set.Ici


@[measurability]
protected theorem aestronglyMeasurable (f : Lp E p μ) : AEStronglyMeasurable f μ

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


/-- A homomorphism from a group to a monoid is injective iff its kernel is trivial.
For the iff statement on the triviality of the kernel, see `injective_iff_map_eq_one'`.  -/
@[to_additive
  "A homomorphism from an additive group to an additive monoid is injective iff
  its kernel is trivial. For the iff statement on the triviality of the kernel,
  see `injective_iff_map_eq_zero'`."]
theorem _root_.injective_iff_map_eq_one {G H} [Group G] [MulOneClass H]
    [FunLike F G H] [MonoidHomClass F G H]
    (f : F) : Function.Injective f ↔ ∀ a, f a = 1 → a = 1

{F : Type u_8}
{G : Type u_9}
{H : Type u_10}
[Group G]
[MulOneClass H]
[FunLike F G H]
[MonoidHomClass F G H]
(f : F)

Function.Injective ⇑f ↔ ∀ (a : G), f a = 1 → a = 1


@[to_additive]
theorem div_subset_div_left : t₁ ⊆ t₂ → s / t₁ ⊆ s / t₂

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


@[simp]
lemma neg_app (f : P ⟶ Q) (X : Cᵒᵖ) : (-f).app X = -f.app X

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
{P Q : PresheafOfModules R}
(f : P ⟶ Q)
(X : Cᵒᵖ)

PresheafOfModules.Hom.app (-f) X = -PresheafOfModules.Hom.app f X


protected theorem max_le_of_le_of_le {a b c : Nat} : a ≤ c → b ≤ c → max a b ≤ c


@[simp, norm_cast]
theorem coe_coe : ⇑(e : A →ₐc[R] B) = e

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(e : A ≃ₐc[R] B)


/-- A version of **Lebesgue differentiation theorem** for a sequence of closed balls whose
centers are not required to be fixed. -/
theorem ae_tendsto_average [NormedSpace ℝ E] [CompleteSpace E]
    {f : α → E} (hf : LocallyIntegrable f μ) (K : ℝ) : ∀ᵐ x ∂μ,
      ∀ {ι : Type*} {l : Filter ι} (w : ι → α) (δ : ι → ℝ) (δlim : Tendsto δ l (𝓝[>] 0))
        (xmem : ∀ᶠ j in l, x ∈ closedBall (w j) (K * δ j)),
        Tendsto (fun j => ⨍ y in closedBall (w j) (δ j), f y ∂μ) l (𝓝 (f x))

(hf : MeasureTheory.LocallyIntegrable f μ)

∀ᵐ (x : α) ∂μ,
  ∀ {ι : Type u_3} {l : Filter ι} (w : ι → α) (δ : ι → ℝ),
    Filter.Tendsto δ l (𝓝[>] 0) →
      (∀ᶠ (j : ι) in l, x ∈ Metric.closedBall (w j) (K * δ j)) →
        Filter.Tendsto (fun j => ⨍ (y : α) in Metric.closedBall (w j) (δ j), f y ∂μ) l (𝓝 (f x))


theorem tendsto_nhdsWithin_iff {a : α} {l : Filter β} {s : Set α} {f : β → α} :
    Tendsto f l (𝓝[s] a) ↔ Tendsto f l (𝓝 a) ∧ ∀ᶠ n in l, f n ∈ s

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{a : α}
{l : Filter β}
{s : Set α}
{f : β → α}

Filter.Tendsto f l (𝓝[s] a) ↔ Filter.Tendsto f l (𝓝 a) ∧ ∀ᶠ (n : β) in l, f n ∈ s


@[to_additive (attr := simp)]
theorem trans_apply (e₁ : M ≃* N) (e₂ : N ≃* P) (m : M) : e₁.trans e₂ m = e₂ (e₁ m)

{M : Type u_6}
{N : Type u_7}
{P : Type u_8}
[Add M]
[Add N]
[Add P]
(e₁ : M ≃+ N)
(e₂ : N ≃+ P)
(m : M)


@[to_additive]
theorem le_comap_of_map_le {T : Submonoid N} {f : F} : S.map f ≤ T → S ≤ T.comap f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(S : AddSubmonoid M)
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{T : AddSubmonoid N}
{f : F}

AddSubmonoid.map f S ≤ T → S ≤ AddSubmonoid.comap f T


theorem ContDiffWithinAt.continuousWithinAt (h : ContDiffWithinAt 𝕜 n f s x) :
    ContinuousWithinAt f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
(h : ContDiffWithinAt 𝕜 n f s x)


theorem inseparableSetoid_ring (α) [CommRing α] [TopologicalSpace α] [TopologicalRing α] :
    inseparableSetoid α = Submodule.quotientRel (Ideal.closure ⊥)

(α : Type u_2)
[CommRing α]
[TopologicalSpace α]
[TopologicalRing α]

inseparableSetoid α = Submodule.quotientRel ⊥.closure


lemma not_even_iff : ¬Even n ↔ n % 2 = 1


theorem setToL1_smul (hT : DominatedFinMeasAdditive μ T C)
    (h_smul : ∀ c : 𝕜, ∀ s x, T s (c • x) = c • T s x) (c : 𝕜) (f : α →₁[μ] E) :
    setToL1 hT (c • f) = c • setToL1 hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(h_smul : ∀ (c : 𝕜) (s : Set α) (x : E), (T s) (c • x) = c • (T s) x)

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


/-- A constructive version of `Classical.skolem` for `Encodable` types. -/
theorem skolem {α : Type*} {β : α → Type*} {P : ∀ x, β x → Prop} [∀ a, Encodable (β a)]
    [∀ x y, Decidable (P x y)] : (∀ x, ∃ y, P x y) ↔ ∃ f : ∀ a, β a, ∀ x, P x (f x)

[(x : α) → (y : β x) → Decidable (P x y)]

(∀ (x : α), ∃ y, P x y) ↔ ∃ f, ∀ (x : α), P x (f x)


theorem iterate_verschiebung_coeff (x : 𝕎 R) (n k : ℕ) :
    (verschiebung^[n] x).coeff (k + n) = x.coeff k

{p : ℕ}
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
(x : WittVector p R)
(n k : ℕ)

((⇑WittVector.verschiebung)^[n] x).coeff (k + n) = x.coeff k


theorem toReal_eq_zero_iff (x : ℝ≥0∞) : x.toReal = 0 ↔ x = 0 ∨ x = ∞


theorem bihimp_of_le {a b : α} (h : a ≤ b) : a ⇔ b = b ⇨ a

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


/-- See also `comp3_mem_uniformity`. -/
theorem comp_le_uniformity3 : ((𝓤 α).lift' fun s : Set (α × α) => s ○ (s ○ s)) ≤ 𝓤 α

((𝓤 α).lift' fun s => s ○ (s ○ s)) ≤ 𝓤 α


@[simp]
theorem range_snd : NonUnitalRingHom.srange (snd R S) = ⊤

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]

NonUnitalRingHom.srange (NonUnitalRingHom.snd R S) = ⊤


@[simp]
theorem isBounded_insert : IsBounded (insert x s) ↔ IsBounded s

∀ {x : Bornology α} {s : Set α} {x_1 : α}, Bornology.IsBounded (insert x_1 s) ↔ Bornology.IsBounded s


@[simp] theorem getLsb_shiftLeft (x : BitVec m) (n) :
    getLsb (x <<< n) i = (decide (i < m) && !decide (i < n) && getLsb x (i - n))

(x <<< n).getLsb i = (decide (i < m) && !decide (i < n) && x.getLsb (i - n))


theorem integrableOn_Ioc_of_intervalIntegral_norm_bounded_left {I a₀ b : ℝ}
    (hfi : ∀ i, IntegrableOn f <| Ioc (a i) b) (ha : Tendsto a l <| 𝓝 a₀)
    (h : ∀ᶠ i in l, (∫ x in Ioc (a i) b, ‖f x‖) ≤ I) : IntegrableOn f (Ioc a₀ b)

(hfi : ∀ (i : ι), MeasureTheory.IntegrableOn f (Set.Ioc (a i) b) MeasureTheory.volume)

(h : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in Set.Ioc (a i) b, ‖f x‖ ≤ I)

MeasureTheory.IntegrableOn f (Set.Ioc a₀ b) MeasureTheory.volume


theorem affineSegment_eq_segment (x y : V) : affineSegment R x y = segment R x y

(R : Type u_1)
{V : Type u_2}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
(x y : V)


theorem iIndepSet.indep_generateFrom_of_disjoint [IsMarkovKernel κ] {s : ι → Set Ω}
    (hsm : ∀ n, MeasurableSet (s n)) (hs : iIndepSet s κ μ) (S T : Set ι) (hST : Disjoint S T) :
    Indep (generateFrom { t | ∃ n ∈ S, s n = t }) (generateFrom { t | ∃ k ∈ T, s k = t }) κ μ

(hs : ProbabilityTheory.Kernel.iIndepSet s κ μ)

ProbabilityTheory.Kernel.Indep (MeasurableSpace.generateFrom {t | ∃ n ∈ S, s n = t})
  (MeasurableSpace.generateFrom {t | ∃ k ∈ T, s k = t}) κ μ


@[simp]
theorem ofFinsupp_one : (⟨1⟩ : R[X]) = 1


/-- If `S` contains `0` then the localization at `S` is trivial. -/
theorem subsingleton (h : 0 ∈ S) : Subsingleton (LocalizedModule S M)

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
(h : 0 ∈ S)


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


@[simp] lemma sq_eq_one_iff : a ^ 2 = 1 ↔ a = 1 ∨ a = -1

{R : Type x}
[Ring R]
{a : R}
[NoZeroDivisors R]


protected theorem le_tsub_iff_left (ha : AddLECancellable a) (h : a ≤ c) : b ≤ c - a ↔ a + b ≤ c

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


/-- The sine of `π / 3` is `√3 / 2`. -/
@[simp]
theorem sin_pi_div_three : sin (π / 3) = √3 / 2


@[simp] theorem isPWO_singleton (a : α) : IsPWO ({a} : Set α)


/-- A fixed block is a block -/
theorem IsFixedBlock.isBlock {B : Set X} (hfB : IsFixedBlock G B) :
    IsBlock G B

{G : Type u_1}
{X : Type u_2}
[SMul G X]
{B : Set X}
(hfB : MulAction.IsFixedBlock G B)


theorem IsLowerSet.prod (hs : IsLowerSet s) (ht : IsLowerSet t) : IsLowerSet (s ×ˢ t)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{s : Set α}
{t : Set β}
(hs : IsLowerSet s)
(ht : IsLowerSet t)


theorem aecover_restrict_of_ae_imp {s : Set α} {φ : ι → Set α} (hs : MeasurableSet s)
    (ae_eventually_mem : ∀ᵐ x ∂μ, x ∈ s → ∀ᶠ n in l, x ∈ φ n)
    (measurable : ∀ n, MeasurableSet <| φ n) : AECover (μ.restrict s) l φ

(ae_eventually_mem : ∀ᵐ (x : α) ∂μ, x ∈ s → ∀ᶠ (n : ι) in l, x ∈ φ n)

(measurable : ∀ (n : ι), MeasurableSet (φ n))

MeasureTheory.AECover (μ.restrict s) l φ