/-- The region between two measurable functions on a measurable set is measurable. -/
theorem measurableSet_regionBetween (hf : Measurable f) (hg : Measurable g) (hs : MeasurableSet s) :
    MeasurableSet (regionBetween f g s)

{α : Type u_1}
[MeasurableSpace α]
{f g : α → ℝ}
{s : Set α}
(hf : Measurable f)
(hg : Measurable g)
(hs : MeasurableSet s)


@[simp] lemma cfcₙ_apply_zero {f : R → R} : cfcₙ f (0 : A) = 0


theorem subNatNat_add (m n k : Nat) : subNatNat (m + n) k = m + subNatNat n k

Int.subNatNat (m + n) k = ↑m + Int.subNatNat n k


theorem Poly.denote_toExpr (ctx : Context) (p : Poly) : p.toExpr.denote ctx = p.denote ctx

(ctx : Nat.Linear.Context)
(p : Nat.Linear.Poly)

Nat.Linear.Expr.denote ctx p.toExpr = Nat.Linear.Poly.denote ctx p


theorem IsExtrOn.localize (hf : IsExtrOn f s a) : IsLocalExtrOn f s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsExtrOn f s a)


theorem mk'_mem_incidenceSet_iff : s(b, c) ∈ G.incidenceSet a ↔ G.Adj b c ∧ (a = b ∨ a = c)

{V : Type u}
(G : SimpleGraph V)
{a b c : V}


@[simp]
theorem esymm_zero : esymm σ R 0 = 1

(σ : Type u_1)
(R : Type u_2)
[CommSemiring R]
[Fintype σ]


protected theorem mul_neg_of_neg_of_pos {a b : Int} (ha : a < 0) (hb : 0 < b) : a * b < 0


/-- Composition of two continuous homomorphisms. -/
@[to_additive (attr := simps!) "Composition of two continuous homomorphisms."]
def comp (g : ContinuousMonoidHom B C) (f : ContinuousMonoidHom A B) : ContinuousMonoidHom A C

{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[Monoid A]
[Monoid B]
[Monoid C]
[TopologicalSpace A]
[TopologicalSpace B]
[TopologicalSpace C]
(g : ContinuousMonoidHom B C)
(f : ContinuousMonoidHom A B)

∀ (a : A), (g.comp f) a = g.toMonoidHom (f.toMonoidHom a)


lemma CompleteOrthogonalIdempotents.unique_iff [Unique I] :
    CompleteOrthogonalIdempotents e ↔ e default = 1

{R : Type u_1}
[Ring R]
{I : Type u_3}
{e : I → R}
[Fintype I]
[Unique I]


theorem efixedPoint_eq_of_edist_lt_top (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞)
    {y : α} (hy : edist y (f y) ≠ ∞) (h : edist x y ≠ ∞) :
    efixedPoint f hf x hx = efixedPoint f hf y hy

{α : Type u_1}
[EMetricSpace α]
[cs : CompleteSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x : α}
(hx : edist x (f x) ≠ ⊤)
{y : α}
(hy : edist y (f y) ≠ ⊤)
(h : edist x y ≠ ⊤)

ContractingWith.efixedPoint f hf x hx = ContractingWith.efixedPoint f hf y hy


@[nolint unusedArguments]
lemma mul_zero_eq {α} {R : α → α → Prop} [Semiring α] {a b : α} (_ : R a 0) (h : b = 0) :
    a * b = 0

{α : Type u_1}
{R : α → α → Prop}
[Semiring α]
{a b : α}


theorem choose_mul {n k s : ℕ} (hkn : k ≤ n) (hsk : s ≤ k) :
    n.choose k * k.choose s = n.choose s * (n - s).choose (k - s)


@[simp]
theorem mulRight_one : mulRight R (1 : A) = LinearMap.id

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]


@[simp, norm_cast]
theorem coprime_coe {m n : ℕ+} : Nat.Coprime ↑m ↑n ↔ m.Coprime n


@[to_additive]
lemma SMulCommClass.of_mul_smul_one {M N} [Monoid N] [SMul M N]
    (H : ∀ (x : M) (y : N), y * x • (1 : N) = x • y) : SMulCommClass M N N


theorem completeSpace_iff_ultrafilter :
    CompleteSpace α ↔ ∀ l : Ultrafilter α, Cauchy (l : Filter α) → ∃ x : α, ↑l ≤ 𝓝 x

{α : Type u}
[uniformSpace : UniformSpace α]

CompleteSpace α ↔ ∀ (l : Ultrafilter α), Cauchy ↑l → ∃ x, ↑l ≤ 𝓝 x


@[simp]
theorem rpow_logb (hx : 0 < x) : b ^ logb b x = x


lemma subsingleton_iff {n : ℕ} : Subsingleton (ZMod n) ↔ n = 1


/-- A slightly stronger version of `exists_partition` on which we perform induction on `n`:
for all `ε > 0`, we can partition the remainders of any family of polynomials `A`
into equivalence classes, where the equivalence(!) relation is "closer than `ε`". -/
theorem exists_partition_polynomial_aux (n : ℕ) {ε : ℝ} (hε : 0 < ε) {b : Fq[X]} (hb : b ≠ 0)
    (A : Fin n → Fq[X]) : ∃ t : Fin n → Fin (Fintype.card Fq ^ ⌈-log ε / log (Fintype.card Fq)⌉₊),
      ∀ i₀ i₁ : Fin n, t i₀ = t i₁ ↔
        (cardPowDegree (A i₁ % b - A i₀ % b) : ℝ) < cardPowDegree b • ε

{Fq : Type u_1}
[Fintype Fq]
[Field Fq]
(n : ℕ)
{ε : ℝ}
(hε : 0 < ε)
{b : Polynomial Fq}
(hb : b ≠ 0)
(A : Fin n → Polynomial Fq)

∃ t, ∀ (i₀ i₁ : Fin n), t i₀ = t i₁ ↔ ↑(Polynomial.cardPowDegree (A i₁ % b - A i₀ % b)) < Polynomial.cardPowDegree b • ε


theorem Subpresheaf.nat_trans_naturality (f : F' ⟶ G.toPresheaf) {U V : Cᵒᵖ} (i : U ⟶ V)
    (x : F'.obj U) : (f.app V (F'.map i x)).1 = F.map i (f.app U x).1

(G : CategoryTheory.GrothendieckTopology.Subpresheaf F)

↑(f.app V (F'.map i x)) = F.map i ↑(f.app U x)


@[simp] theorem Prop.compl_singleton (p : Prop) : ({p}ᶜ : Set Prop) = {¬p}


/-- If `f` admits a Taylor series `p` in a set `s`, and `g` is linear, then `g ∘ f` admits a Taylor
series whose `k`-th term is given by `g ∘ (p k)`. -/
theorem HasFTaylorSeriesUpToOn.continuousLinearMap_comp (g : F →L[𝕜] G)
    (hf : HasFTaylorSeriesUpToOn n f p s) :
    HasFTaylorSeriesUpToOn n (g ∘ f) (fun x k => g.compContinuousMultilinearMap (p x k)) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{f : E → F}
{n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(g : F →L[𝕜] G)
(hf : HasFTaylorSeriesUpToOn n f p s)

HasFTaylorSeriesUpToOn n (⇑g ∘ f) (fun x k => g.compContinuousMultilinearMap (p x k)) s


@[simp]
theorem mulMap_tmul (a : A) (b : B) : mulMap A B (a ⊗ₜ[R] b) = a.1 * b.1

{R : Type u}
{S : Type v}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
(A B : Subalgebra R S)
(a : ↥A)
(b : ↥B)


theorem toRingHom_comp_symm_toRingHom (e : R ≃+* S) :
    e.toRingHom.comp e.symm.toRingHom = RingHom.id _

{R : Type u_4}
{S : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
(e : R ≃+* S)

e.toRingHom.comp e.symm.toRingHom = RingHom.id S


theorem mul_sub_algebraMap_pow_commutes [Ring A] [Algebra R A] (x : A) (r : R) (n : ℕ) :
    x * (x - algebraMap R A r) ^ n = (x - algebraMap R A r) ^ n * x

{R : Type u}
{A : Type w}
[CommSemiring R]
[Ring A]
[Algebra R A]
(x : A)
(r : R)
(n : ℕ)

x * (x - (algebraMap R A) r) ^ n = (x - (algebraMap R A) r) ^ n * x


@[to_additive]
theorem closure_preimage_le (f : G →* N) (s : Set N) : closure (f ⁻¹' s) ≤ (closure s).comap f

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)
(s : Set N)

Subgroup.closure (⇑f ⁻¹' s) ≤ Subgroup.comap f (Subgroup.closure s)


/-- The identity lax braided monoidal functor. -/
@[simps!]
def id : LaxBraidedFunctor C C

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

(CategoryTheory.LaxBraidedFunctor.id C).ε = 𝟙 (𝟙_ C)


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


@[simp] theorem Sublist.refl : ∀ l : List α, l <+ l


@[simp]
lemma unop_nonZeroSMulDivisors_mulOpposite_eq_nonZeroDivisors :
    (Rᵐᵒᵖ ⁰[R]).unop = R⁰


@[to_additive]
theorem inv_inv_div_inv : (a⁻¹ / b⁻¹)⁻¹ = a / b

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


theorem liminf_sdiff [NeBot f] (a : α) : liminf u f \ a = liminf (fun b => u b \ a) f

{α : Type u_1}
{β : Type u_2}
[CompleteBooleanAlgebra α]
(f : Filter β)
(u : β → α)
[f.NeBot]
(a : α)

Filter.liminf u f \ a = Filter.liminf (fun b => u b \ a) f


theorem eq_empty_relation (r) [IsIrrefl α r] [Subsingleton α] : r = EmptyRelation

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


@[simp, rclike_simps]
theorem one_re : re (1 : K) = 1


theorem add_rmatch_iff (P Q : RegularExpression α) (x : List α) :
    (P + Q).rmatch x ↔ P.rmatch x ∨ Q.rmatch x

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

(P + Q).rmatch x = true ↔ P.rmatch x = true ∨ Q.rmatch x = true


@[simp]
theorem map_top (f : F) : (⊤ : NonUnitalStarSubalgebra R A).map f = NonUnitalStarAlgHom.range f

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
[NonUnitalSemiring B]
[StarRing B]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(f : F)

NonUnitalStarSubalgebra.map f ⊤ = NonUnitalStarAlgHom.range f


theorem multinomial_spec : (∏ i ∈ s, (f i)!) * multinomial s f = (∑ i ∈ s, f i)!

{α : Type u_1}
(s : Finset α)
(f : α → ℕ)

(∏ i ∈ s, (f i)!) * Nat.multinomial s f = (∑ i ∈ s, f i)!


@[simp]
theorem toReal_eq_pi_div_two_iff {θ : Angle} : θ.toReal = π / 2 ↔ θ = (π / 2 : ℝ)


/-- If the `p i` are pairwise coprime, a `⨅ i, p i`-torsion module is the internal direct sum of
its `p i`-torsion submodules. -/
theorem torsionBySet_isInternal {p : ι → Ideal R}
    (hp : (S : Set ι).Pairwise fun i j => p i ⊔ p j = ⊤)
    (hM : Module.IsTorsionBySet R M (⨅ i ∈ S, p i : Ideal R)) :
    DirectSum.IsInternal fun i : S => torsionBySet R M <| p i

(hp : (↑S).Pairwise fun i j => p i ⊔ p j = ⊤)

(hM : Module.IsTorsionBySet R M ↑(⨅ i ∈ S, p i))

DirectSum.IsInternal fun i => Submodule.torsionBySet R M ↑(p ↑i)


theorem iSup_subtype'' {ι} (s : Set ι) (f : ι → α) : ⨆ i : s, f i = ⨆ (t : ι) (_ : t ∈ s), f t

{α : Type u_1}
[CompleteLattice α]
{ι : Type u_9}
(s : Set ι)
(f : ι → α)


theorem app_isIso_of_stalkFunctor_map_iso {F G : Sheaf C X} (f : F ⟶ G) (U : Opens X)
    [∀ x : U, IsIso ((stalkFunctor C x.val).map f.1)] : IsIso (f.1.app (op U))

[∀ (x : ↥U), CategoryTheory.IsIso ((TopCat.Presheaf.stalkFunctor C ↑x).map f.val)]

CategoryTheory.IsIso (f.val.app (Opposite.op U))


theorem reindex_diophFn {f : (α → ℕ) → ℕ} (g : α → β) (d : DiophFn f) :
    DiophFn fun v => f (v ∘ g)

{α β : Type u}
{f : (α → ℕ) → ℕ}
(g : α → β)
(d : Dioph.DiophFn f)


@[simp]
theorem preimage_image {α β} (e : α ≃ β) (s : Set α) : e ⁻¹' (e '' s) = s

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


theorem count_mono_left {n : ℕ} (hpq : ∀ k, p k → q k) : count p n ≤ count q n

{p : ℕ → Prop}
[DecidablePred p]
{q : ℕ → Prop}
[DecidablePred q]
{n : ℕ}
(hpq : ∀ (k : ℕ), p k → q k)


@[simps]
instance limitLaxMonoidal : LaxMonoidal fun F : J ⥤ C => limit F

CategoryTheory.LaxMonoidal.ε =
  CategoryTheory.Limits.limit.lift ((CategoryTheory.Functor.const J).obj (𝟙_ C))
    { pt := 𝟙_ C, π := { app := fun j => 𝟙 (((CategoryTheory.Functor.const J).obj (𝟙_ C)).obj j), naturality := ⋯ } }


lemma weightSpace_le_weightSpaceChain {k : ℤ} (hk : k ∈ Ioo p q) :
    weightSpace M (k • χ₁ + χ₂) ≤ weightSpaceChain M χ₁ χ₂ p q

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(M : Type u_3)
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
(χ₁ χ₂ : L → R)
(p q : ℤ)
{k : ℤ}
(hk : k ∈ Set.Ioo p q)

LieModule.weightSpace M (k • χ₁ + χ₂) ≤ LieModule.weightSpaceChain M χ₁ χ₂ p q


theorem natDegree_X_sub_C (x : R) : (X - C x).natDegree = 1

{R : Type u}
[Ring R]
[Nontrivial R]
(x : R)

(Polynomial.X - Polynomial.C x).natDegree = 1


/-- Universe lift functor for commutative groups. -/
@[to_additive (attr := simps)
  "Universe lift functor for additive commutative groups."]
def uliftFunctor : CommGrp.{u} ⥤ CommGrp.{max u v}

CommGrp.uliftFunctor.obj X = CommGrp.of (ULift.{v, u} ↑X)


/-- Typeclass for expressing that a type `M` with addition and a zero satisfies
`0 + a = a` and `a + 0 = a` for all `a : M`. -/
class AddZeroClass (M : Type u) extends Zero M, Add M where
  /-- Zero is a left neutral element for addition -/
  protected zero_add : ∀ a : M, 0 + a = a
  /-- Zero is a right neutral element for addition -/
  protected add_zero : ∀ a : M, a + 0 = a

{M : Type u}
[self : AddZeroClass M]
(a : M)


/-- Reorder a product.

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

The difference with `Finset.prod_bij` is that the bijection is a non-dependent function, rather than
being allowed to use membership of the domain of the product. -/
@[to_additive "Reorder a sum.

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

The difference with `Finset.sum_bij` is that the bijection is a non-dependent function, rather than
being allowed to use membership of the domain of the sum."]
lemma prod_nbij (i : ι → κ) (hi : ∀ a ∈ s, i a ∈ t) (i_inj : (s : Set ι).InjOn i)
    (i_surj : (s : Set ι).SurjOn i t) (h : ∀ a ∈ s, f a = g (i a)) :
    ∏ x ∈ s, f x = ∏ x ∈ t, g x

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[CommMonoid α]
{s : Finset ι}
{t : Finset κ}
{f : ι → α}
{g : κ → α}
(i : ι → κ)
(hi : ∀ a ∈ s, i a ∈ t)
(i_inj : Set.InjOn i ↑s)
(i_surj : Set.SurjOn i ↑s ↑t)
(h : ∀ a ∈ s, f a = g (i a))


theorem snd_sumFinsuppAddEquivProdFinsupp {α β : Type*} (f : α ⊕ β →₀ M) (y : β) :
    (sumFinsuppAddEquivProdFinsupp f).2 y = f (Sum.inr y)

{M : Type u_5}
[AddMonoid M]
{α : Type u_13}
{β : Type u_14}
(f : α ⊕ β →₀ M)
(y : β)

(Finsupp.sumFinsuppAddEquivProdFinsupp f).2 y = f (Sum.inr y)


/-- An equalizer that is an epimorphism is an isomorphism. -/
theorem isIso_limit_cone_parallelPair_of_epi {c : Fork f g} (h : IsLimit c) [Epi c.ι] : IsIso c.ι

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f g : X ⟶ Y}
{c : CategoryTheory.Limits.Fork f g}
(h : CategoryTheory.Limits.IsLimit c)
[CategoryTheory.Epi c.ι]


lemma negOnePow_sub (n₁ n₂ : ℤ) :
    (n₁ - n₂).negOnePow = n₁.negOnePow * n₂.negOnePow


theorem injOn_union (h : Disjoint s₁ s₂) :
    InjOn f (s₁ ∪ s₂) ↔ InjOn f s₁ ∧ InjOn f s₂ ∧ ∀ x ∈ s₁, ∀ y ∈ s₂, f x ≠ f y

{α : Type u_1}
{β : Type u_2}
{s₁ s₂ : Set α}
{f : α → β}
(h : Disjoint s₁ s₂)

Set.InjOn f (s₁ ∪ s₂) ↔ Set.InjOn f s₁ ∧ Set.InjOn f s₂ ∧ ∀ x ∈ s₁, ∀ y ∈ s₂, f x ≠ f y


theorem restrict_restrict_of_subset (h : s ⊆ t) : (μ.restrict t).restrict s = μ.restrict s

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h : s ⊆ t)


/-- Given an open cover on `X`, we may pull them back along a morphism `f : W ⟶ X` to obtain
an open cover of `W`. This is similar to `Scheme.OpenCover.pullbackCover`, but here we
take `pullback (𝒰.map x) f` instead of `pullback f (𝒰.map x)`. -/
@[simps]
def OpenCover.pullbackCover' {X W : Scheme.{u}} (𝒰 : X.OpenCover) (f : W ⟶ X) :
    W.OpenCover

{X W : AlgebraicGeometry.Scheme}
(𝒰 : X.OpenCover)
(f : W ⟶ X)
(x : 𝒰.J)

(𝒰.pullbackCover' f).map x = CategoryTheory.Limits.pullback.snd (𝒰.map x) f


theorem models_of_models_theory {T' : L.Theory}
    (h : ∀ φ : L.Sentence, φ ∈ T' → T ⊨ᵇ φ)
    {φ : L.Formula α} (hφ : T' ⊨ᵇ φ) : T ⊨ᵇ φ

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
{T' : L.Theory}
(h : ∀ φ ∈ T', T ⊨ᵇ φ)
{φ : L.Formula α}
(hφ : T' ⊨ᵇ φ)


/-- Dividing by an element is the same as multiplying by its inverse.

This is a duplicate of `DivInvMonoid.div_eq_mul_inv` ensuring that the types unfold better.
-/
@[to_additive "Subtracting an element is the same as adding by its negative.
This is a duplicate of `SubNegMonoid.sub_eq_mul_neg` ensuring that the types unfold better."]
theorem div_eq_mul_inv (a b : G) : a / b = a * b⁻¹

{G : Type u_1}
[DivInvMonoid G]
(a b : G)


@[reassoc]
lemma RightHomologyData.rightHomologyIso_hom_naturality
    (h₁ : S₁.RightHomologyData) (h₂ : S₂.RightHomologyData) :
    h₁.homologyIso.hom ≫ rightHomologyMap' φ h₁ h₂ =
      homologyMap φ ≫ h₂.homologyIso.hom

CategoryTheory.CategoryStruct.comp h₁.homologyIso.hom (CategoryTheory.ShortComplex.rightHomologyMap' φ h₁ h₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap φ) h₂.homologyIso.hom


theorem IsSimpleGroup.comm_iff_isSolvable : (∀ a b : G, a * b = b * a) ↔ IsSolvable G

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

(∀ (a b : G), a * b = b * a) ↔ IsSolvable G


@[simp, norm_cast]
theorem coe_min : ↑(min a b) = (min a b : ℕ)


@[simp]
theorem inv_apply_self (e : AddAut A) (a : A) : e (e⁻¹ a) = a

(A : Type u_1)
[Add A]
(e : AddAut A)
(a : A)


/-- In the specific case of multilinear maps on spaces indexed by `Fin (n+1)`, where one can build
an element of `∀ (i : Fin (n+1)), M i` using `cons`, one can express directly the additivity of a
multilinear map along the first variable. -/
theorem cons_add (f : MultilinearMap R M M₂) (m : ∀ i : Fin n, M i.succ) (x y : M 0) :
    f (cons (x + y) m) = f (cons x m) + f (cons y m)

[(i : Fin n.succ) → AddCommMonoid (M i)]

f (Fin.cons (x + y) m) = f (Fin.cons x m) + f (Fin.cons y m)


/-- An `R`-module `M` is flat if for all finitely generated ideals `I` of `R`,
the canonical map `I ⊗ M →ₗ M` is injective. -/
@[mk_iff] class Flat : Prop where
  out : ∀ ⦃I : Ideal R⦄ (_ : I.FG),
    Function.Injective (TensorProduct.lift ((lsmul R M).comp I.subtype))

(R : Type u)
(M : Type v)
[CommRing R]
[AddCommGroup M]
[Module R M]

Module.Flat R M ↔
  ∀ ⦃I : Ideal R⦄, I.FG → Function.Injective ⇑(TensorProduct.lift (LinearMap.lsmul R M ∘ₗ Submodule.subtype I))


@[to_additive exists_le_of_sum_le]
lemma exists_le_of_prod_le' [LinearOrder M] [CovariantClass M M (· * ·) (· < ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] [CovariantClass M M (Function.swap (· * ·)) (· < ·)]
    [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)] {l : List ι} (hl : l ≠ []) (f g : ι → M)
    (h : (l.map f).prod ≤ (l.map g).prod) : ∃ x ∈ l, f x ≤ g x

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

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

[CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1]

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

(h : (List.map f l).prod ≤ (List.map g l).prod)


@[simp, reassoc]
theorem ι_fromGlued (x : 𝒰.J) : 𝒰.gluedCover.ι x ≫ 𝒰.fromGlued = 𝒰.map x

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


lemma injective_iff {ψ : AddChar A M} : Injective ψ ↔ ∀ ⦃x⦄, ψ x = 1 → x = 0

{A : Type u_1}
{M : Type u_2}
[AddCommGroup A]
[DivisionCommMonoid M]
{ψ : AddChar A M}

Function.Injective ⇑ψ ↔ ∀ ⦃x : A⦄, ψ x = 1 → x = 0


/-- The element in `Splitting.IndexSet Δ` attached to an epimorphism `f : Δ ⟶ Δ'`. -/
@[simps]
def mk {Δ Δ' : SimplexCategory} (f : Δ ⟶ Δ') [Epi f] : IndexSet (op Δ)

{Δ Δ' : SimplexCategory}
(f : Δ ⟶ Δ')
[CategoryTheory.Epi f]

↑(SimplicialObject.Splitting.IndexSet.mk f).snd = f


lemma Monotone.partMap (hg : Monotone g) : Monotone fun x ↦ (g x).map f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Preorder α]
{f : β → γ}
{g : α → Part β}
(hg : Monotone g)


theorem iSup_false {s : False → α} : iSup s = ⊥

{α : Type u_1}
[CompleteLattice α]
{s : False → α}


theorem coe_bot : ↑(⊥ : IntermediateField F E) = Set.range (algebraMap F E)

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]


/-- The shift functor on `DifferentialObject S C` is additive. -/
@[simps!]
nonrec def shiftFunctorAdd (m n : S) :
    shiftFunctor C (m + n) ≅ shiftFunctor C m ⋙ shiftFunctor C n

(X : CategoryTheory.DifferentialObject S C)

((CategoryTheory.DifferentialObject.shiftFunctorAdd C m n).hom.app X).f =
  (CategoryTheory.shiftFunctorAdd C m n).hom.app X.obj


theorem le_arcsin_iff_sin_le {x y : ℝ} (hx : x ∈ Icc (-(π / 2)) (π / 2)) (hy : y ∈ Icc (-1 : ℝ) 1) :
    x ≤ arcsin y ↔ sin x ≤ y


@[to_additive Summable.prod_factor]
theorem Multipliable.prod_factor {f : β × γ → α} (h : Multipliable f) (b : β) :
    Multipliable fun c ↦ f (b, c)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
[CompleteSpace α]
{f : β × γ → α}
(h : Multipliable f)
(b : β)


theorem approx_le_approx_of_U_sub_C {c₁ c₂ : CU P} (h : c₁.U ⊆ c₂.C) (n₁ n₂ : ℕ) (x : X) :
    c₂.approx n₂ x ≤ c₁.approx n₁ x

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
{c₁ c₂ : Urysohns.CU P}
(h : c₁.U ⊆ c₂.C)
(n₁ n₂ : ℕ)
(x : X)

Urysohns.CU.approx n₂ c₂ x ≤ Urysohns.CU.approx n₁ c₁ x


@[simp]
theorem kroneckerMap_one_one [Zero α] [Zero β] [Zero γ] [One α] [One β] [One γ] [DecidableEq m]
    [DecidableEq n] (f : α → β → γ) (hf₁ : ∀ b, f 0 b = 0) (hf₂ : ∀ a, f a 0 = 0)
    (hf₃ : f 1 1 = 1) : kroneckerMap f (1 : Matrix m m α) (1 : Matrix n n β) = 1

{α : Type u_2}
{β : Type u_4}
{γ : Type u_6}
{m : Type u_9}
{n : Type u_10}
[Zero α]
[Zero β]
[Zero γ]
[One α]
[One β]
[One γ]
[DecidableEq m]
[DecidableEq n]
(f : α → β → γ)
(hf₁ : ∀ (b : β), f 0 b = 0)
(hf₂ : ∀ (a : α), f a 0 = 0)
(hf₃ : f 1 1 = 1)


theorem strongEpi_map_of_strongEpi (adj : F ⊣ F') (f : A ⟶ B) [h₁ : F'.PreservesMonomorphisms]
    [h₂ : F.PreservesEpimorphisms] [StrongEpi f] : StrongEpi (F.map f)

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F : C ⥤ D}
{F' : D ⥤ C}
{A B : C}
(adj : F ⊣ F')
(f : A ⟶ B)
[h₁ : F'.PreservesMonomorphisms]
[h₂ : F.PreservesEpimorphisms]
[CategoryTheory.StrongEpi f]


@[to_additive mem_rightAddCoset_iff]
theorem mem_rightCoset_iff (a : α) : x ∈ op a • s ↔ x * a⁻¹ ∈ s

{α : Type u_1}
[Group α]
{s : Set α}
{x : α}
(a : α)


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


@[simp]
theorem top_rpow_of_pos {y : ℝ} (h : 0 < y) : (⊤ : ℝ≥0∞) ^ y = ⊤


@[simp, norm_cast]
theorem prod_apply [Module R₁ M₂] [Module R₁ M₃] [Module R₁ M₄] (e : M₁ ≃L[R₁] M₂)
    (e' : M₃ ≃L[R₁] M₄) (x) : e.prod e' x = (e x.1, e' x.2)

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
{M₄ : Type u_8}
[TopologicalSpace M₄]
[AddCommMonoid M₄]
[Module R₁ M₁]
[Module R₁ M₂]
[Module R₁ M₃]
[Module R₁ M₄]
(e : M₁ ≃L[R₁] M₂)
(e' : M₃ ≃L[R₁] M₄)
(x : M₁ × M₃)


@[simp, norm_cast]
theorem castNum_ldiff : ∀ m n : Num, (ldiff m n : ℕ) = Nat.ldiff m n


theorem toNonUnitalSubring_injective :
    Function.Injective (toNonUnitalSubring : NonUnitalSubalgebra R A → NonUnitalSubring A)

{R : Type u}
{A : Type v}
[CommRing R]
[NonUnitalNonAssocRing A]
[Module R A]


@[simp]
theorem codisjoint_toDual_iff [SemilatticeInf α] [OrderBot α] {a b : α} :
    Codisjoint (toDual a) (toDual b) ↔ Disjoint a b

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b : α}

Codisjoint (OrderDual.toDual a) (OrderDual.toDual b) ↔ Disjoint a b


theorem mk_preimage_of_injective (f : α → β) (s : Set β) (h : Injective f) :
    #(f ⁻¹' s) ≤ #s

{α β : Type u}
(f : α → β)
(s : Set β)
(h : Function.Injective f)


@[simp]
theorem coeff_pow_mul_natDegree (p : R[X]) (n : ℕ) :
    (p ^ n).coeff (n * p.natDegree) = p.leadingCoeff ^ n

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


/--
A universe polymorphic "Yoneda presheaf" on `C` given by continuous maps into a topoological space
`Y`.
-/
@[simps]
def yonedaPresheaf : Cᵒᵖ ⥤ Type (max w w')

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : C ⥤ TopCat)
(Y : Type w')
[TopologicalSpace Y]
(X : Cᵒᵖ)

(ContinuousMap.yonedaPresheaf F Y).obj X = C(↑(F.obj (Opposite.unop X)), Y)


theorem decode_encodePosNum : ∀ n, decodePosNum (encodePosNum n) = n

Computability.decodePosNum (Computability.encodePosNum n) = n


/-- Given an adjunction `F ⊣ G`, this provides the natural adjunction
  `(whiskeringLeft _ _ C).obj G ⊣ (whiskeringLeft _ _ C).obj F`. -/
@[simps! unit_app_app counit_app_app]
protected def whiskerLeft (adj : F ⊣ G) :
    (whiskeringLeft E D C).obj G ⊣ (whiskeringLeft D E C).obj F

(C : Type u_1)
{D : Type u_2}
{E : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} E]
{F : CategoryTheory.Functor D E}
{G : CategoryTheory.Functor E D}
(adj : F ⊣ G)
(X : CategoryTheory.Functor D C)

∀ (X_1 : D), ((CategoryTheory.Adjunction.whiskerLeft C adj).unit.app X).app X_1 = X.map (adj.unit.app X_1)


theorem Sorted.head!_le [Inhabited α] [Preorder α] {a : α} {l : List α} (h : Sorted (· < ·) l)
    (ha : a ∈ l) : l.head! ≤ a

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


@[csimp] theorem intersperse_eq_intersperseTR : @intersperse = @intersperseTR


/-- A ring isomorphism defines an isomorphism of residue fields. -/
@[simps apply]
def mapEquiv (f : R ≃+* S) : LocalRing.ResidueField R ≃+* LocalRing.ResidueField S

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[LocalRing R]
[CommRing S]
[LocalRing S]
(f : R ≃+* S)
(a : LocalRing.ResidueField R)

(LocalRing.ResidueField.mapEquiv f) a = (LocalRing.ResidueField.map ↑f) a


@[to_additive]
theorem prod_mapRange_index {β₁ : ι → Type v₁} {β₂ : ι → Type v₂} [∀ i, Zero (β₁ i)]
    [∀ i, Zero (β₂ i)] [∀ (i) (x : β₁ i), Decidable (x ≠ 0)] [∀ (i) (x : β₂ i), Decidable (x ≠ 0)]
    [CommMonoid γ] {f : ∀ i, β₁ i → β₂ i} {hf : ∀ i, f i 0 = 0} {g : Π₀ i, β₁ i} {h : ∀ i, β₂ i → γ}
    (h0 : ∀ i, h i 0 = 1) : (mapRange f hf g).prod h = g.prod fun i b => h i (f i b)

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

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

(DFinsupp.mapRange f hf g).sum h = g.sum fun i b => h i (f i b)


/-- The image of a binary bicone under a functor. -/
@[simps!]
def mapBinaryBicone {X Y : C} (b : BinaryBicone X Y) : BinaryBicone (F.obj X) (F.obj Y)

(b : CategoryTheory.Limits.BinaryBicone X Y)


@[simp]
theorem Matrix.toBilin'_symm :
    (Matrix.toBilin'.symm : _ ≃ₗ[R₂] Matrix n n R₂) = BilinForm.toMatrix'

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]


theorem IsPartition.biUnionPrepartition {π : TaggedPrepartition I} (h : IsPartition π)
    {πi : ∀ J, Prepartition J} (hi : ∀ J ∈ π, (πi J).IsPartition) :
    (π.biUnionPrepartition πi).IsPartition

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


lemma smul_basis_mul_C (y : R[X]) (p q : R[X]) :
    (p • (1 : W.CoordinateRing) + q • mk W Y) * mk W (C y) =
      (p * y) • (1 : W.CoordinateRing) + (q * y) • mk W Y

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
(y p q : R[X])

(p • 1 + q • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y) *
    (WeierstrassCurve.Affine.CoordinateRing.mk W) (Polynomial.C y) =
  (p * y) • 1 + (q * y) • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y


lemma hasCoproduct_of_equiv_of_iso (f : α → C) (g : β → C)
    [HasCoproduct f] (e : β ≃ α) (iso : ∀ j, g j ≅ f (e j)) : HasCoproduct g

{β : Type w}
{α : Type w₂}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(f : α → C)
(g : β → C)
[CategoryTheory.Limits.HasCoproduct f]
(e : β ≃ α)
(iso : (j : β) → g j ≅ f (e j))


@[simp]
theorem aleph'_zero : aleph' 0 = 0


/-- The left homology functor `ShortComplex C ⥤ C`, where the left homology of a
short complex `S` is understood as a cokernel of the obvious map `S.toCycles : S.X₁ ⟶ S.cycles`
where `S.cycles` is a kernel of `S.g : S.X₂ ⟶ S.X₃`. -/
@[simps]
noncomputable def leftHomologyFunctor : ShortComplex C ⥤ C

∀ {X Y : CategoryTheory.ShortComplex C} (φ : X ⟶ Y),
  (CategoryTheory.ShortComplex.leftHomologyFunctor C).map φ = CategoryTheory.ShortComplex.leftHomologyMap φ


@[simp]
theorem quot_one : Quot.mk Setoid.r one = (1 : ColimitType F)

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ RingCat)

Quot.mk Setoid.r RingCat.Colimits.Prequotient.one = 1


/-- **Chernoff bound** on the upper tail of a real random variable. -/
theorem measure_ge_le_exp_mul_mgf [IsFiniteMeasure μ] (ε : ℝ) (ht : 0 ≤ t)
    (h_int : Integrable (fun ω => exp (t * X ω)) μ) :
    (μ {ω | ε ≤ X ω}).toReal ≤ exp (-t * ε) * mgf X μ t

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

(μ {ω | ε ≤ X ω}).toReal ≤ rexp (-t * ε) * ProbabilityTheory.mgf X μ t


theorem mono (hf : IntervalIntegrable f ν a b) (h1 : [[c, d]] ⊆ [[a, b]]) (h2 : μ ≤ ν) :
    IntervalIntegrable f μ c d

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


/-- The multiplicity of `a` as root of a nonzero polynomial `p` is at least `n` iff
  `(X - a) ^ n` divides `p`. -/
theorem le_rootMultiplicity_iff {p : R[X]} (p0 : p ≠ 0) {a : R} {n : ℕ} :
    n ≤ rootMultiplicity a p ↔ (X - C a) ^ n ∣ p

{R : Type u}
[CommRing R]
{p : R[X]}
(p0 : p ≠ 0)
{a : R}
{n : ℕ}

n ≤ Polynomial.rootMultiplicity a p ↔ (Polynomial.X - Polynomial.C a) ^ n ∣ p


/-- A point in a set is in its affine span. -/
theorem mem_affineSpan {p : P} {s : Set P} (hp : p ∈ s) : p ∈ affineSpan k s

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p : P}
{s : Set P}
(hp : p ∈ s)


theorem Periodic.const_inv_mul [DivisionSemiring α] (h : Periodic f c) (a : α) :
    Periodic (fun x => f (a⁻¹ * x)) (a * c)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[DivisionSemiring α]
(h : Function.Periodic f c)
(a : α)

Function.Periodic (fun x => f (a⁻¹ * x)) (a * c)


/-- Induction on a well-founded relation. -/
theorem induction {C : α → Prop} : ∀ a, (∀ x, (∀ y, r y x → C y) → C x) → C a

{α : Type u}
(r : α → α → Prop)
[IsWellFounded α r]
{C : α → Prop}
(a : α)

(∀ (x : α), (∀ (y : α), r y x → C y) → C x) → C a


/-- The generic case of the first cosimplicial identity -/
@[reassoc]
theorem δ_comp_δ {n} {i j : Fin (n + 2)} (H : i ≤ j) :
    X.δ i ≫ X.δ j.succ = X.δ j ≫ X.δ (Fin.castSucc i)

(X : CategoryTheory.CosimplicialObject C)

X.δ i ≫ X.δ j.succ = X.δ j ≫ X.δ i.castSucc


@[to_additive (attr := simp)] lemma _root_.Function.const_one [One β] : const α (1 : β) = 1


theorem SuperpolynomialDecay.congr' (hf : SuperpolynomialDecay l k f) (hfg : f =ᶠ[l] g) :
    SuperpolynomialDecay l k g

(hf : Asymptotics.SuperpolynomialDecay l k f)


@[simp]
theorem toFinset_coe (l : List α) : (l : Multiset α).toFinset = l.toFinset

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


protected theorem mul_lt_of_lt_ediv {a b c : Int} (H : 0 < c) (H3 : a < b / c) : a * c < b


/-- Construct an augmented simplicial object from an augmented cosimplicial
object in the opposite category. -/
@[simps!]
def CosimplicialObject.Augmented.leftOp (X : CosimplicialObject.Augmented Cᵒᵖ) :
    SimplicialObject.Augmented C

(X : CategoryTheory.CosimplicialObject.Augmented Cᵒᵖ)

∀ {X_1 Y : SimplexCategoryᵒᵖ} (f : X_1 ⟶ Y), X.leftOp.left.map f = (X.right.map f.unop).unop


/-- Predicate typeclass for expressing that a type is not reduced to a single element. In rings,
this is equivalent to `0 ≠ 1`. In vector spaces, this is equivalent to positive dimension. -/
class Nontrivial (α : Type*) : Prop where
  /-- In a nontrivial type, there exists a pair of distinct terms. -/
  exists_pair_ne : ∃ x y : α, x ≠ y


lemma sumTransform_def {p : ℝ} {g : ℝ → ℝ} {n₀ n : ℕ} :
    sumTransform p g n₀ n = n^p * ∑ u ∈ Finset.Ico n₀ n, g u / u^(p + 1)

AkraBazziRecurrence.sumTransform p g n₀ n = ↑n ^ p * ∑ u ∈ Finset.Ico n₀ n, g ↑u / ↑u ^ (p + 1)


lemma basis_iff_indep_subset_closure : M.Basis I X ↔ M.Indep I ∧ I ⊆ X ∧ X ⊆ M.closure I

{α : Type u_2}
{M : Matroid α}
{X I : Set α}


@[to_additive (attr := simp)]
theorem eq_one_iff {N : Subgroup G} [nN : N.Normal] (x : G) : (x : G ⧸ N) = 1 ↔ x ∈ N

{G : Type u}
[AddGroup G]
{N : AddSubgroup G}
[nN : N.Normal]
(x : G)


lemma finsuppLeft'_apply (x : (ι →₀ M) ⊗[R] N) :
    finsuppLeft' R M N ι S x = finsuppLeft R M N ι x

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_4}
[DecidableEq ι]
{S : Type u_5}
[CommSemiring S]
[Algebra R S]
[Module S M]
[IsScalarTower R S M]
(x : (ι →₀ M) ⊗[R] N)

(TensorProduct.finsuppLeft' R M N ι S) x = (TensorProduct.finsuppLeft R M N ι) x


@[simp]
theorem sin_add_int_mul_two_pi (x : ℝ) (n : ℤ) : sin (x + n * (2 * π)) = sin x

Real.sin (x + ↑n * (2 * Real.pi)) = Real.sin x


@[simp]
lemma choose_eq' (a : α) : @Exists.choose _ (a = ·) ⟨a, rfl⟩ = a


/-- The `i + j`-th element of a list coincides with the `j`-th element of the list obtained by
dropping the first `i` elements. Version designed to rewrite from the big list to the small list. -/
theorem getElem_drop (L : List α) {i j : Nat} (h : i + j < L.length) :
    L[i + j] = (L.drop i)[j]'(lt_length_drop L h)

{α : Type u_1}
(L : List α)
{i j : Nat}
(h : i + j < L.length)


@[simp]
theorem linearEquivOfInjective_apply [FiniteDimensional K V] [FiniteDimensional K V₂]
    {f : V →ₗ[K] V₂} (hf : Injective f) (hdim : finrank K V = finrank K V₂) (x : V) :
    f.linearEquivOfInjective hf hdim x = f x

(hdim : FiniteDimensional.finrank K V = FiniteDimensional.finrank K V₂)

(f.linearEquivOfInjective hf hdim) x = f x


theorem centralizer_toSubmonoid {R} [Semiring R] (s : Set R) :
    (centralizer s).toSubmonoid = Submonoid.centralizer s

(Subsemiring.centralizer s).toSubmonoid = Submonoid.centralizer s


theorem mk_mem_target {y : F} : (b, y) ∈ e'.target ↔ b ∈ e'.baseSet

[TopologicalSpace (Bundle.TotalSpace F E)]

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


theorem oadd_pos (e n a) : 0 < oadd e n a


lemma liftBaseChange_comp {P} [AddCommMonoid P] [Module A P] [Module R P] [IsScalarTower R A P]
    (l : M →ₗ[R] N) (l' : N →ₗ[A] P) :
      l' ∘ₗ l.liftBaseChange A = (l'.restrictScalars R ∘ₗ l).liftBaseChange A

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
(A : Type u_2)
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
[Module A N]
[IsScalarTower R A N]
{P : Type u_1}
[AddCommMonoid P]
[Module A P]
[Module R P]
[IsScalarTower R A P]
(l : M →ₗ[R] N)
(l' : N →ₗ[A] P)

l' ∘ₗ LinearMap.liftBaseChange A l = LinearMap.liftBaseChange A (↑R l' ∘ₗ l)


theorem Tendsto.congr {f₁ f₂ : α → β} {l₁ : Filter α} {l₂ : Filter β} (h : ∀ x, f₁ x = f₂ x) :
    Tendsto f₁ l₁ l₂ → Tendsto f₂ l₁ l₂

{α : Type u}
{β : Type v}
{f₁ f₂ : α → β}
{l₁ : Filter α}
{l₂ : Filter β}
(h : ∀ (x : α), f₁ x = f₂ x)

Filter.Tendsto f₁ l₁ l₂ → Filter.Tendsto f₂ l₁ l₂


theorem card_parts_equitabilise (hm : m ≠ 0) : (P.equitabilise h).parts.card = a + b

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{m a b : ℕ}
(P : Finpartition s)
(h : a * m + b * (m + 1) = s.card)
(hm : m ≠ 0)

(Finpartition.equitabilise h).parts.card = a + b


theorem Presieve.in_coverByImage (G : C ⥤ D) {X : D} {Y : C} (f : G.obj Y ⟶ X) :
    Presieve.coverByImage G X f

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
{D : Type u_2}
[CategoryTheory.Category.{u_5, u_2} D]
(G : CategoryTheory.Functor C D)
{X : D}
{Y : C}
(f : G.obj Y ⟶ X)

CategoryTheory.Presieve.coverByImage G X f


@[simp]
theorem noncommFold_coe (l : List α) (comm) (a : α) :
    noncommFold op (l : Multiset α) comm a = l.foldr op a

(op : α → α → α)

(comm : {x | x ∈ ↑l}.Pairwise fun x y => op x y = op y x)

Multiset.noncommFold op (↑l) comm a = List.foldr op a l


/-- Conjugating `ClosureOperators` on `α` and on `β` by a fixed isomorphism
`e : α ≃o β` gives an equivalence `ClosureOperator α ≃ ClosureOperator β`. -/
@[simps apply symm_apply]
def OrderIso.equivClosureOperator {α β} [Preorder α] [Preorder β] (e : α ≃o β) :
    ClosureOperator α ≃ ClosureOperator β

{α : Type u_4}
{β : Type u_5}
[Preorder α]
[Preorder β]
(e : α ≃o β)
(c : ClosureOperator α)


@[to_additive]
theorem norm_div_rev (a b : E) : ‖a / b‖ = ‖b / a‖

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


lemma ediv_two_mul_two_add_one_of_odd : Odd n → n / 2 * 2 + 1 = n


theorem openEmbedding_exp : OpenEmbedding exp


theorem IsLocalExtrOn.not_nhds_le_map [TopologicalSpace β] (hf : IsLocalExtrOn f s a)
    [NeBot (𝓝[<] f a)] [NeBot (𝓝[>] f a)] : ¬𝓝 (f a) ≤ map f (𝓝[s] a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
[TopologicalSpace β]
(hf : IsLocalExtrOn f s a)
[(𝓝[<] f a).NeBot]
[(𝓝[>] f a).NeBot]


theorem lift_eq_iff_equiv (c₁ c₂ : Computation α) : LiftRel (· = ·) c₁ c₂ ↔ c₁ ~ c₂

Computation.LiftRel (fun x x_1 => x = x_1) c₁ c₂ ↔ c₁.Equiv c₂


/-- The natural cone over the forgetful functor `Under X ⥤ T` with cone point `X`. -/
@[simps]
def forgetCone (X : T) : Limits.Cone (forget X)

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

(CategoryTheory.Under.forgetCone X).pt = X


@[simp]
theorem sumCongr_refl : Equiv.sumCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ⊕ β)

(Equiv.refl α).sumCongr (Equiv.refl β) = Equiv.refl (α ⊕ β)


/-- Interpret a `RingEquiv` `f` as an `f`-semilinear equiv. -/
@[simps]
def _root_.RingEquiv.toSemilinearEquiv (f : R ≃+* S) :
    haveI := RingHomInvPair.of_ringEquiv f
    haveI := RingHomInvPair.symm (↑f : R →+* S) (f.symm : S →+* R)
    R ≃ₛₗ[(↑f : R →+* S)] S

{R : Type u_1}
{S : Type u_7}
[Semiring R]
[Semiring S]
(f : R ≃+* S)
(a : R)


@[simp]
theorem untrop_zpow [AddGroup R] (x : Tropical R) (n : ℤ) : untrop (x ^ n) = n • untrop x

{R : Type u}
[AddGroup R]
(x : Tropical R)
(n : ℤ)

Tropical.untrop (x ^ n) = n • Tropical.untrop x


theorem eq_dual_comm {M₁ M₂ : Matroid α} : M₁ = M₂✶ ↔ M₂ = M₁✶

M₁ = M₂✶ ↔ M₂ = M₁✶


@[to_additive]
theorem measurable_mul_op {α : Type*} [MeasurableSpace α] : Measurable (op : α → αᵐᵒᵖ)


theorem tendsto_nhds_coe_iff {α : Type*} {l : Filter α} {x : ℝ≥0} {f : ℝ≥0∞ → α} :
    Tendsto f (𝓝 ↑x) l ↔ Tendsto (f ∘ (↑) : ℝ≥0 → α) (𝓝 x) l

{α : Type u_4}
{l : Filter α}
{x : ℝ≥0}
{f : ℝ≥0∞ → α}

Filter.Tendsto f (𝓝 ↑x) l ↔ Filter.Tendsto (f ∘ ENNReal.ofNNReal) (𝓝 x) l


theorem hitting_bot_le_iff {i n : ι} {ω : Ω} (hx : ∃ j, j ≤ n ∧ u j ω ∈ s) :
    hitting u s ⊥ n ω ≤ i ↔ ∃ j ≤ i, u j ω ∈ s

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[ConditionallyCompleteLinearOrderBot ι]
[IsWellOrder ι fun x x_1 => x < x_1]
{u : ι → Ω → β}
{s : Set β}
{i n : ι}
{ω : Ω}
(hx : ∃ j ≤ n, u j ω ∈ s)

MeasureTheory.hitting u s ⊥ n ω ≤ i ↔ ∃ j ≤ i, u j ω ∈ s


theorem coe_sumCoords_eq_finsum : (b.sumCoords : M → R) = fun m => ∑ᶠ i, b.coord i m

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

⇑b.sumCoords = fun m => ∑ᶠ (i : ι), (b.coord i) m


theorem cof_lsub_le_lift {ι} (f : ι → Ordinal) :
    cof (lsub.{u, v} f) ≤ Cardinal.lift.{v, u} #ι

{ι : Type u}
(f : ι → Ordinal.{max u v})

(Ordinal.lsub f).cof ≤ Cardinal.lift.{v, u} #ι


theorem map_target {x : B × F} (hx : x ∈ e.target) : e.toPartialHomeomorph.symm x ∈ e.source

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{x : B × F}
(hx : x ∈ e.target)


@[simp]
theorem aleph'_omega : aleph' ω = ℵ₀


@[simp]
theorem coe_comp_rangeFactorization (f : ι → β) : (↑) ∘ rangeFactorization f = f

{β : Type u_2}
{ι : Sort u_4}
(f : ι → β)

Subtype.val ∘ Set.rangeFactorization f = f


theorem mem_ideal_span_monomial_image_iff_dvd {x : MvPolynomial σ R} {s : Set (σ →₀ ℕ)} :
    x ∈ Ideal.span ((fun s => monomial s (1 : R)) '' s) ↔
      ∀ xi ∈ x.support, ∃ si ∈ s, monomial si 1 ∣ monomial xi (x.coeff xi)

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
{x : MvPolynomial σ R}
{s : Set (σ →₀ ℕ)}

x ∈ Ideal.span ((fun s => (MvPolynomial.monomial s) 1) '' s) ↔
  ∀ xi ∈ x.support, ∃ si ∈ s, (MvPolynomial.monomial si) 1 ∣ (MvPolynomial.monomial xi) (MvPolynomial.coeff xi x)


lemma coe_galRestrict_apply (σ : L ≃ₐ[K] L) :
    (galRestrict A K L B σ : B →ₐ[A] B) = galRestrictHom A K L B σ

(A : Type u_1)
{K : Type u_2}
{L : Type u_3}
(B : Type u_4)
[CommRing A]
[CommRing B]
[Algebra A B]
[Field K]
[Field L]
[Algebra A K]
[IsFractionRing A K]
[Algebra B L]
[Algebra K L]
[Algebra A L]
[IsScalarTower A B L]
[IsScalarTower A K L]
[IsIntegralClosure B A L]
[FiniteDimensional K L]
(σ : L ≃ₐ[K] L)

↑((galRestrict A K L B) σ) = (galRestrictHom A K L B) ↑σ


/-- An induction principle for elements of `⨆ i, S i`.
If `C` holds all elements of `S i` for all `i`, and is preserved under multiplication,
then it holds for all elements of the supremum of `S`. -/
@[to_additive (attr := elab_as_elim)
"An induction principle for elements of `⨆ i, S i`. If `C` holds all
elements of `S i` for all `i`, and is preserved under addition, then it holds for all elements of
the supremum of `S`."]
theorem iSup_induction (S : ι → Subsemigroup M) {C : M → Prop} {x₁ : M} (hx₁ : x₁ ∈ ⨆ i, S i)
    (mem : ∀ i, ∀ x₂ ∈ S i, C x₂) (mul : ∀ x y, C x → C y → C (x * y)) : C x₁

(mul : ∀ (x y : M), C x → C y → C (x * y))


@[to_additive]
lemma HasProd.of_nat_of_neg {f : ℤ → G} (hf₁ : HasProd (fun n : ℕ ↦ f n) g)
    (hf₂ : HasProd (fun n : ℕ ↦ f (-n)) g') : HasProd f (g * g' / f 0)

{G : Type u_2}
[CommGroup G]
{g g' : G}
[TopologicalSpace G]
[TopologicalGroup G]
{f : ℤ → G}
(hf₁ : HasProd (fun n => f ↑n) g)
(hf₂ : HasProd (fun n => f (-↑n)) g')


theorem equivalence_join_reflTransGen
    (h : ∀ a b c, r a b → r a c → ∃ d, ReflGen r b d ∧ ReflTransGen r c d) :
    Equivalence (Join (ReflTransGen r))

(h : ∀ (a b c : α), r a b → r a c → ∃ d, Relation.ReflGen r b d ∧ Relation.ReflTransGen r c d)

Equivalence (Relation.Join (Relation.ReflTransGen r))


protected lemma mul_le_of_le_div (k x y : ℕ) (h : x ≤ y / k) : x * k ≤ y


@[simp, norm_cast] lemma coe_top : ↑(⊤ : CompactOpens α) = (univ : Set α)

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


lemma lift_mk_le_lift_mk_of_surjective {α : Type u} {β : Type v} {f : α → β} (hf : Surjective f) :
    Cardinal.lift.{u} (#β) ≤ Cardinal.lift.{v} (#α)

{α : Type u}
{β : Type v}
{f : α → β}
(hf : Function.Surjective f)

Cardinal.lift.{u, v} (Cardinal.mk β) ≤ Cardinal.lift.{v, u} (Cardinal.mk α)


lemma Set.Finite.latticeClosure (hs : s.Finite) : (latticeClosure s).Finite

{α : Type u_2}
[DistribLattice α]
{s : Set α}
(hs : s.Finite)


@[to_additive (attr := simp)]
theorem toGroupSeminorm_eq_coe : ⇑p.toGroupSeminorm = p

{E : Type u_4}
[Group E]
{p : GroupNorm E}


@[simp]
theorem quotientPiLift_mk (p : ∀ i, Submodule R (Ms i)) (f : ∀ i, Ms i →ₗ[R] Ns i)
    (hf : ∀ i, p i ≤ ker (f i)) (x : ∀ i, Ms i) :
    quotientPiLift p f hf (Quotient.mk x) = fun i => f i (x i)

(hf : ∀ (i : ι), p i ≤ LinearMap.ker (f i))

(Submodule.quotientPiLift p f hf) (Submodule.Quotient.mk x) = fun i => (f i) (x i)


/-- Given a functor `F` and a collection of limit cones for each diagram `X ↦ F X k`, we can stitch
them together to give a cone for the diagram `F`.
`combinedIsLimit` shows that the new cone is limiting, and `evalCombined` shows it is
(essentially) made up of the original cones.
-/
@[simps]
def combineCones (F : J ⥤ K ⥤ C) (c : ∀ k : K, LimitCone (F.flip.obj k)) : Cone F

(c : (k : K) → CategoryTheory.Limits.LimitCone (F.flip.obj k))

((CategoryTheory.Limits.combineCones F c).π.app j).app k = (c k).cone.π.app j


@[simp]
theorem Complex.logDeriv_cos : logDeriv (Complex.cos) = -Complex.tan


theorem coe_pow [Monoid R] [BoundedMul R] [ContinuousMul R] (n : ℕ) (f : α →ᵇ R) :
    ⇑(f ^ n) = (⇑f) ^ n

{α : Type u}
[TopologicalSpace α]
{R : Type u_2}
[PseudoMetricSpace R]
[Monoid R]
[BoundedMul R]
[ContinuousMul R]
(n : ℕ)
(f : BoundedContinuousFunction α R)


theorem lt_of_gt {x y : Nat} (h : x > y) : y < x


@[simp]
theorem fst_inl [Zero A] (r : R) : (inl r : Unitization R A).fst = r

{R : Type u_1}
(A : Type u_2)
[Zero A]
(r : R)


theorem span_eq_closure {s : Set M} : (span R s).toAddSubmonoid = closure (@univ R • s)

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set M}

(Submodule.span R s).toAddSubmonoid = AddSubmonoid.closure (Set.univ • s)


theorem congr_arg_heq {β : α → Sort*} (f : ∀ a, β a) :
    ∀ {a₁ a₂ : α}, a₁ = a₂ → HEq (f a₁) (f a₂)

{α : Sort u_1}
{β : α → Sort u_2}
(f : (a : α) → β a)
{a₁ a₂ : α}


theorem forall_mem_cons {p : α → Prop} {a : α} {l : List α} :
    (∀ x, x ∈ a :: l → p x) ↔ p a ∧ ∀ x, x ∈ l → p x

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

(∀ (x : α), x ∈ a :: l → p x) ↔ p a ∧ ∀ (x : α), x ∈ l → p x


@[simp]
theorem toFinsupp_neg {R : Type u} [Ring R] (a : R[X]) : (-a).toFinsupp = -a.toFinsupp


/-- The product of a character with its inverse is the trivial character. -/
-- Porting note (#10618): @[simp] can prove this (later)
theorem inv_mul (χ : MulChar R R') : χ⁻¹ * χ = 1

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


theorem blockDiagonal'_map (M : ∀ i, Matrix (m' i) (n' i) α) (f : α → β) (hf : f 0 = 0) :
    (blockDiagonal' M).map f = blockDiagonal' fun k => (M k).map f

{o : Type u_4}
{m' : o → Type u_7}
{n' : o → Type u_8}
{α : Type u_12}
{β : Type u_13}
[DecidableEq o]
[Zero α]
[Zero β]
(M : (i : o) → Matrix (m' i) (n' i) α)
(f : α → β)
(hf : f 0 = 0)

(Matrix.blockDiagonal' M).map f = Matrix.blockDiagonal' fun k => (M k).map f


@[simp, norm_cast]
theorem castNum_shiftLeft (m : Num) (n : Nat) : ↑(m <<< n) = (m : ℕ) <<< (n : ℕ)


@[to_additive]
theorem eq_iff_div_mem {N : Subgroup G} [nN : N.Normal] {x y : G} :
    (x : G ⧸ N) = y ↔ x / y ∈ N

{G : Type u}
[Group G]
{N : Subgroup G}
[nN : N.Normal]
{x y : G}


theorem List.norm_prod_le' : ∀ {l : List α}, l ≠ [] → ‖l.prod‖ ≤ (l.map norm).prod

{α : Type u_1}
[SeminormedRing α]
{l : List α}

l ≠ [] → ‖l.prod‖ ≤ (List.map norm l).prod


theorem deriv_log (x : ℝ) : deriv log x = x⁻¹


/-- A skyscraper presheaf is a presheaf supported at a single point: if `p₀ ∈ X` is a specified
point, then the skyscraper presheaf `𝓕` with value `A` is defined by `U ↦ A` if `p₀ ∈ U` and
`U ↦ *` if `p₀ ∉ A` where `*` is some terminal object.
-/
@[simps]
def skyscraperPresheaf : Presheaf C X

[(U : TopologicalSpace.Opens ↑X) → Decidable (p₀ ∈ U)]

(skyscraperPresheaf p₀ A).obj U = if p₀ ∈ Opposite.unop U then A else ⊤_ C


@[simp]
theorem coord_apply_combination_of_not_mem (hi : i ∉ s) {w : ι → k} (hw : s.sum w = 1) :
    b.coord i (s.affineCombination k b w) = 0

{ι : Type u_1}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
{s : Finset ι}
{i : ι}
(hi : i ∉ s)
{w : ι → k}
(hw : s.sum w = 1)

(b.coord i) ((Finset.affineCombination k s ⇑b) w) = 0


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

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

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

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


/-- Auxiliary lemma for the proof of `oangle_sign_smul_add_right`; not intended to be used
outside of that proof. -/
theorem oangle_smul_add_right_eq_zero_or_eq_pi_iff {x y : V} (r : ℝ) :
    o.oangle x (r • x + y) = 0 ∨ o.oangle x (r • x + y) = π ↔
    o.oangle x y = 0 ∨ o.oangle x y = π

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

o.oangle x (r • x + y) = 0 ∨ o.oangle x (r • x + y) = ↑π ↔ o.oangle x y = 0 ∨ o.oangle x y = ↑π


@[to_additive] lemma mabs_by_cases (P : α → Prop) (h1 : P a) (h2 : P a⁻¹) : P |a|ₘ

{α : Type u_1}
[Group α]
[LinearOrder α]
{a : α}
(P : α → Prop)
(h1 : P a)
(h2 : P a⁻¹)


theorem funMap_eq_coe_constants {c : L.Constants} {x : Fin 0 → M} : funMap c x = c

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{c : L.Constants}
{x : Fin 0 → M}

FirstOrder.Language.Structure.funMap c x = ↑c


@[simp]
theorem comp_continuous_iff {f : α → P} : Continuous (e ∘ f) ↔ Continuous f

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(e : P ≃ᵃⁱ[𝕜] P₂)
{α : Type u_14}
[TopologicalSpace α]
{f : α → P}


theorem antidiagonal_succ_succ' {n : ℕ} :
    antidiagonal (n + 2) =
      cons (0, n + 2)
        (cons (n + 2, 0)
            ((antidiagonal n).map
              (Embedding.prodMap ⟨Nat.succ, Nat.succ_injective⟩
                ⟨Nat.succ, Nat.succ_injective⟩)) <|
          by simp)
        (by simp)

Finset.antidiagonal (n + 2) =
  Finset.cons (0, n + 2)
    (Finset.cons (n + 2, 0)
      (Finset.map
        ({ toFun := Nat.succ, inj' := Nat.succ_injective }.prodMap { toFun := Nat.succ, inj' := Nat.succ_injective })
        (Finset.antidiagonal n))
      ⋯)
    ⋯


/-- **Tietze extension theorem** for real-valued bounded continuous maps, a version with a closed
embedding and unbundled composition. If `e : C(X, Y)` is a closed embedding of a topological space
into a normal topological space and `f : X →ᵇ ℝ` is a bounded continuous function, then there exists
a bounded continuous function `g : Y →ᵇ ℝ` of the same norm such that `g ∘ e = f`. -/
theorem exists_extension_norm_eq_of_closedEmbedding (f : X →ᵇ ℝ) {e : X → Y}
    (he : ClosedEmbedding e) : ∃ g : Y →ᵇ ℝ, ‖g‖ = ‖f‖ ∧ g ∘ e = f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[NormalSpace Y]
(f : X →ᵇ ℝ)
{e : X → Y}
(he : ClosedEmbedding e)

∃ g, ‖g‖ = ‖f‖ ∧ ⇑g ∘ e = ⇑f


/-- The natural `ContinuousLinearEquiv` from `ℂ` to `ℝ × ℝ`. -/
@[simps! (config := { simpRhs := true }) apply symm_apply_re symm_apply_im]
def equivRealProdCLM : ℂ ≃L[ℝ] ℝ × ℝ

∀ (a : ℂ), Complex.equivRealProdCLM a = (a.re, a.im)


/-- A side of a right-angled triangle divided by the sine of the opposite angle equals the
hypotenuse. -/
theorem norm_div_sin_oangle_add_right_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : ‖y‖ / Real.Angle.sin (o.oangle x (x + y)) = ‖x + y‖

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

‖y‖ / (o.oangle x (x + y)).sin = ‖x + y‖


/-- Left scalar multiplication as an order isomorphism. -/
@[simps!]
def OrderIso.smulRightDual (ha : a < 0) : β ≃o βᵒᵈ

{α : Type u_1}
(β : Type u_2)
[LinearOrderedField α]
[OrderedAddCommGroup β]
[Module α β]
{a : α}
[PosSMulMono α β]
(ha : a < 0)

∀ (a_1 : β), (OrderIso.smulRightDual β ha) a_1 = a • OrderDual.toDual a_1


theorem ofReal_add_le {p q : ℝ} : ENNReal.ofReal (p + q) ≤ ENNReal.ofReal p + ENNReal.ofReal q


lemma not_dvd_of_pos_of_lt (h1 : 0 < n) (h2 : n < m) : ¬m ∣ n


theorem continuous_setToFun_of_dominated (hT : DominatedFinMeasAdditive μ T C) {fs : X → α → E}
    {bound : α → ℝ} (hfs_meas : ∀ x, AEStronglyMeasurable (fs x) μ)
    (h_bound : ∀ x, ∀ᵐ a ∂μ, ‖fs x a‖ ≤ bound a) (bound_integrable : Integrable bound μ)
    (h_cont : ∀ᵐ a ∂μ, Continuous fun x => fs x a) : Continuous fun x => setToFun μ T hT (fs x)

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hfs_meas : ∀ (x : X), MeasureTheory.AEStronglyMeasurable (fs x) μ)

(h_bound : ∀ (x : X), ∀ᵐ (a : α) ∂μ, ‖fs x a‖ ≤ bound a)

(bound_integrable : MeasureTheory.Integrable bound μ)

(h_cont : ∀ᵐ (a : α) ∂μ, Continuous fun x => fs x a)

Continuous fun x => MeasureTheory.setToFun μ T hT (fs x)


theorem fun_respects {σ₁ σ₂ f₁ f₂} {tr : σ₁ → σ₂} :
    (Respects f₁ f₂ fun a b ↦ tr a = b) ↔ ∀ ⦃a₁⦄, FRespects f₂ tr (tr a₁) (f₁ a₁)

{σ₁ : Type u_1}
{σ₂ : Type u_2}
{f₁ : σ₁ → Option σ₁}
{f₂ : σ₂ → Option σ₂}
{tr : σ₁ → σ₂}

(Turing.Respects f₁ f₂ fun a b => tr a = b) ↔ ∀ ⦃a₁ : σ₁⦄, Turing.FRespects f₂ tr (tr a₁) (f₁ a₁)


theorem apriori_edist_iterate_efixedPoint_le' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
    (hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞)
    (n : ℕ) :
    edist (f^[n] x) (efixedPoint' f hsc hsf hf x hxs hx) ≤
      edist x (f x) * (K : ℝ≥0∞) ^ n / (1 - K)

(hf : ContractingWith K (Set.MapsTo.restrict f s s hsf))

edist (f^[n] x) (ContractingWith.efixedPoint' f hsc hsf hf x hxs hx) ≤ edist x (f x) * ↑K ^ n / (1 - ↑K)


lemma mapₐ_injective_of_injective {f : A →ₐ[R] B} (a : A) [Away a Aₚ] [Away (f a) Bₚ]
    (hf : Function.Injective f) : Function.Injective (mapₐ Aₚ Bₚ f a)

{R : Type u_1}
[CommSemiring R]
{A : Type u_5}
[CommRing A]
[Algebra R A]
{B : Type u_6}
[CommRing B]
[Algebra R B]
{Aₚ : Type u_7}
[CommRing Aₚ]
[Algebra A Aₚ]
[Algebra R Aₚ]
[IsScalarTower R A Aₚ]
{Bₚ : Type u_8}
[CommRing Bₚ]
[Algebra B Bₚ]
[Algebra R Bₚ]
[IsScalarTower R B Bₚ]
{f : A →ₐ[R] B}
(a : A)
[IsLocalization.Away a Aₚ]
[IsLocalization.Away (f a) Bₚ]
(hf : Function.Injective ⇑f)

Function.Injective ⇑(IsLocalization.Away.mapₐ Aₚ Bₚ f a)


@[simp]
theorem equivAdjoinSimple_aeval (pb : PowerBasis K L) (f : K[X]) :
    pb.equivAdjoinSimple (aeval (AdjoinSimple.gen K pb.gen) f) = aeval pb.gen f

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(pb : PowerBasis K L)
(f : K[X])

pb.equivAdjoinSimple ((Polynomial.aeval (IntermediateField.AdjoinSimple.gen K pb.gen)) f) = (Polynomial.aeval pb.gen) f


/-- The projection from a fiber bundle to its base is an open map. -/
theorem isOpenMap_proj : IsOpenMap (π F E)

[TopologicalSpace (Bundle.TotalSpace F E)]


@[simp]
theorem id_apply_of_ne (M : Mat R) (i j : M) (h : i ≠ j) : (𝟙 M : Matrix M M R) i j = 0

(R : Type u)
[Semiring R]
(M : CategoryTheory.Mat R)
(i j : ↑M)
(h : i ≠ j)


lemma Indep.exists_eq_image_of_mapSetEmbedding {f : M.E ↪ β} {I : Set β}
    (hI : (M.mapSetEmbedding f).Indep I) : ∃ (I₀ : Set M.E), M.Indep I₀ ∧ I = f '' I₀

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{f : ↑M.E ↪ β}
{I : Set β}
(hI : (M.mapSetEmbedding f).Indep I)


protected theorem ContinuousMap.HomotopyEquiv.contractibleSpace [ContractibleSpace Y] (e : X ≃ₕ Y) :
    ContractibleSpace X

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[ContractibleSpace Y]
(e : X ≃ₕ Y)


@[simp]
theorem transpose_zpow (A : M) : ∀ n : ℤ, (A ^ n)ᵀ = Aᵀ ^ n

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


/-- A monoid homomorphism preserves multiplication. -/
@[to_additive "An additive monoid homomorphism preserves addition."]
theorem map_mul' (x y) : f (x * y) = f x * f y

{α : Type u}
{β : Type v}
[MulOneClass α]
[MulOneClass β]
{f : α → β}
(hf : IsMonoidHom f)
(x y : α)


/-- Integral $\oint_{|z-c|=R} \frac{dz}{z-w} = 2πi$ whenever $|w-c| < R$. -/
theorem integral_sub_inv_of_mem_ball {c w : ℂ} {R : ℝ} (hw : w ∈ ball c R) :
    (∮ z in C(c, R), (z - w)⁻¹) = 2 * π * I

{c w : ℂ}
{R : ℝ}
(hw : w ∈ Metric.ball c R)

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


theorem setToL1SCLM_congr_measure {μ' : Measure α} (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ' T C') (hμ : μ ≪ μ') (f : α →₁ₛ[μ] E) (f' : α →₁ₛ[μ'] E)
    (h : (f : α → E) =ᵐ[μ] f') : setToL1SCLM α E μ hT f = setToL1SCLM α E μ' hT' f'

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

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

(f' : ↥(MeasureTheory.Lp.simpleFunc E 1 μ'))

(MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT) f = (MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ' hT') f'


/-- Canonical homomorphism of monoids from `αˣ` into `α × αᵐᵒᵖ`.
Used mainly to define the natural topology of `αˣ`. -/
@[to_additive (attr := simps)
      "Canonical homomorphism of additive monoids from `AddUnits α` into `α × αᵃᵒᵖ`.
      Used mainly to define the natural topology of `AddUnits α`."]
def embedProduct (α : Type*) [Monoid α] : αˣ →* α × αᵐᵒᵖ

(α : Type u_8)
[AddMonoid α]
(x : AddUnits α)

(AddUnits.embedProduct α) x = (↑x, AddOpposite.op ↑(-x))


@[simp]
theorem coe_ofBijective [NonUnitalRingHomClass F R S] (f : F) (hf : Function.Bijective f) :
    (ofBijective f hf : R → S) = f

{F : Type u_1}
{R : Type u_4}
{S : Type u_5}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(f : F)
(hf : Function.Bijective ⇑f)


theorem pullback_fst_eq :
    LightProfinite.pullback.fst f g = (pullbackIsoPullback f g).hom ≫ Limits.pullback.fst f g

{X Y B : LightProfinite}
(f : X ⟶ B)
(g : Y ⟶ B)

LightProfinite.pullback.fst f g =
  CategoryTheory.CategoryStruct.comp (LightProfinite.pullbackIsoPullback f g).hom
    (CategoryTheory.Limits.pullback.fst f g)


theorem circleMap_mem_sphere' (c : ℂ) (R : ℝ) (θ : ℝ) : circleMap c R θ ∈ sphere c |R|


/-- The sine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
opposite side, version subtracting vectors. -/
theorem sin_oangle_sub_right_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.sin (o.oangle y (y - x)) * ‖y - x‖ = ‖x‖

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

(o.oangle y (y - x)).sin * ‖y - x‖ = ‖x‖


theorem specializes_iff_mem_closure : x ⤳ y ↔ y ∈ closure ({x} : Set X)

{X : Type u_1}
[TopologicalSpace X]
{x y : X}


private lemma AM_GM : {a b : ℕ} → (4 * a * b ≤ (a + b) * (a + b))


theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i

{α : Type u}
{ι : Type u_2}
{s : ι → Filter α}
{U : Set α}

U ∈ ⨅ i, s i ↔ ∃ I, I.Finite ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i


@[simp]
theorem eLpNorm_norm (f : α → F) : eLpNorm (fun x => ‖f x‖) p μ = eLpNorm f p μ

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

MeasureTheory.eLpNorm (fun x => ‖f x‖) p μ = MeasureTheory.eLpNorm f p μ


theorem fintype_card_le_finrank [Module.Finite R M]
    {ι : Type*} [Fintype ι] {b : ι → M} (h : LinearIndependent R b) :
    Fintype.card ι ≤ finrank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Finite R M]
{ι : Type u_1}
[Fintype ι]
{b : ι → M}
(h : LinearIndependent R b)

Fintype.card ι ≤ FiniteDimensional.finrank R M


theorem ext_inner_right_basis {ι : Type*} {x y : E} (b : Basis ι 𝕜 E)
    (h : ∀ i : ι, ⟪x, b i⟫ = ⟪y, b i⟫) : x = y

(h : ∀ (i : ι), ⟪x, b i⟫_𝕜 = ⟪y, b i⟫_𝕜)


@[to_additive (attr := simp)]
lemma _root_.Function.const_div [Div β] (a b : β) : const α a / const α b = const α (a / b)

{α : Type u_1}
{β : Type u_2}
[Div β]
(a b : β)

Function.const α a / Function.const α b = Function.const α (a / b)


theorem orderOf {g : Perm α} (ht : IsThreeCycle g) : orderOf g = 3

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{g : Equiv.Perm α}
(ht : g.IsThreeCycle)


@[simp]
theorem inv_inr (m : M) : (inr m)⁻¹ = (0 : tsze R M)

{R : Type u}
{M : Type v}
[DivisionSemiring R]
[AddCommGroup M]
[Module Rᵐᵒᵖ M]
[Module R M]
(m : M)


theorem compl₁₂_inj {f₁ f₂ : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ} {g : Qₗ →ₗ[R] Mₗ} {g' : Qₗ' →ₗ[R] Nₗ}
    (hₗ : Function.Surjective g) (hᵣ : Function.Surjective g') :
    f₁.compl₁₂ g g' = f₂.compl₁₂ g g' ↔ f₁ = f₂

{R : Type u_1}
[CommSemiring R]
{Mₗ : Type u_9}
{Nₗ : Type u_10}
{Pₗ : Type u_11}
{Qₗ : Type u_12}
{Qₗ' : Type u_13}
[AddCommMonoid Mₗ]
[AddCommMonoid Nₗ]
[AddCommMonoid Pₗ]
[AddCommMonoid Qₗ]
[AddCommMonoid Qₗ']
[Module R Mₗ]
[Module R Nₗ]
[Module R Pₗ]
[Module R Qₗ]
[Module R Qₗ']
{f₁ f₂ : Mₗ →ₗ[R] Nₗ →ₗ[R] Pₗ}
{g : Qₗ →ₗ[R] Mₗ}
{g' : Qₗ' →ₗ[R] Nₗ}
(hₗ : Function.Surjective ⇑g)
(hᵣ : Function.Surjective ⇑g')


theorem infiniteNeg_add_not_infinitePos {x y : ℝ*} :
    InfiniteNeg x → ¬InfinitePos y → InfiniteNeg (x + y)

x.InfiniteNeg → ¬y.InfinitePos → (x + y).InfiniteNeg


/-- The restriction of a scheme to an open subset. -/
@[simps! val_base_apply]
def ι : ↑U ⟶ X

{X : AlgebraicGeometry.Scheme}
(U : X.Opens)
(self : ↥U)


/-- A completion of `α` is the data of a complete separated uniform space (from the same universe)
and a map from `α` with dense range and inducing the original uniform structure on `α`. -/
structure AbstractCompletion (α : Type u) [UniformSpace α] where
  /-- The underlying space of the completion. -/
  space : Type u
  /-- A map from a space to its completion. -/
  coe : α → space
  /-- The completion carries a uniform structure. -/
  uniformStruct : UniformSpace space
  /-- The completion is complete. -/
  complete : CompleteSpace space
  /-- The completion is a T₀ space. -/
  separation : T0Space space
  /-- The map into the completion is uniform-inducing. -/
  uniformInducing : UniformInducing coe
  /-- The map into the completion has dense range. -/
  dense : DenseRange coe

{α : Type u}
[UniformSpace α]
(self : AbstractCompletion α)


theorem mapsTo_ball (hf : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ) :
    MapsTo f (Metric.ball x r) (Metric.ball (f x) (K * r))

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(hf : LipschitzWith K f)
(hK : K ≠ 0)
(x : α)
(r : ℝ)

Set.MapsTo f (Metric.ball x r) (Metric.ball (f x) (↑K * r))


@[trans]
theorem BlankRel.trans {Γ} [Inhabited Γ] {l₁ l₂ l₃ : List Γ} :
    BlankRel l₁ l₂ → BlankRel l₂ l₃ → BlankRel l₁ l₃

{Γ : Type u_1}
[Inhabited Γ]
{l₁ l₂ l₃ : List Γ}

Turing.BlankRel l₁ l₂ → Turing.BlankRel l₂ l₃ → Turing.BlankRel l₁ l₃


@[to_additive]
theorem mulLECancellable_one [Monoid α] [LE α] : MulLECancellable (1 : α)


@[to_additive addCHaar_sup_eq]
theorem chaar_sup_eq {K₀ : PositiveCompacts G}
    {K₁ K₂ : Compacts G} (h : Disjoint K₁.1 K₂.1) (h₂ : IsClosed K₂.1) :
    chaar K₀ (K₁ ⊔ K₂) = chaar K₀ K₁ + chaar K₀ K₂

{K₀ : TopologicalSpace.PositiveCompacts G}

MeasureTheory.Measure.haar.chaar K₀ (K₁ ⊔ K₂) =
  MeasureTheory.Measure.haar.chaar K₀ K₁ + MeasureTheory.Measure.haar.chaar K₀ K₂


theorem univ_eq_empty_iff : (univ : Finset α) = ∅ ↔ IsEmpty α


/-- Shows that the integer parts of the continued fraction are at least one. -/
theorem of_one_le_get?_partDen {b : K}
    (nth_partDen_eq : (of v).partDens.get? n = some b) : 1 ≤ b

(nth_partDen_eq : (GenContFract.of v).partDens.get? n = some b)


/-- Dedekind domains, in the sense of Noetherian integrally closed domains of Krull dimension ≤ 1,
are also Dedekind domains in the sense of Noetherian domains where the localization at every
nonzero prime ideal is a DVR. -/
theorem IsDedekindDomain.isDedekindDomainDvr [IsDedekindDomain A] : IsDedekindDomainDvr A

(A : Type u_2)
[CommRing A]
[IsDomain A]
[IsDedekindDomain A]


theorem lt_mul_of_le_of_one_lt_of_pos [PosMulStrictMono α] (bc : b ≤ c) (ha : 1 < a) (c0 : 0 < c) :
    b < c * a

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
(bc : b ≤ c)
(ha : 1 < a)
(c0 : 0 < c)


@[simp]
theorem toHomeomorph_symm : e.toHomeomorph.symm = e.symm.toHomeomorph

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(e : P ≃ᵃⁱ[𝕜] P₂)


/-- If a subgroup of a topological group has `1` in its interior, then it is open. -/
@[to_additive "If a subgroup of an additive topological group has `0` in its interior, then it is
open."]
theorem isOpen_of_one_mem_interior [ContinuousMul G] (H: Subgroup G)
    (h_1_int : (1 : G) ∈ interior (H : Set G)) : IsOpen (H : Set G)

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[ContinuousMul G]
(H : Subgroup G)
(h_1_int : 1 ∈ interior ↑H)


@[to_additive]
theorem HasProd.inv (h : HasProd f a) : HasProd (fun b ↦ (f b)⁻¹) a⁻¹

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f : β → α}
{a : α}
(h : HasSum f a)


@[simp]
theorem Fintype.total_apply_single [DecidableEq α] (i : α) (r : R) :
    Fintype.total R S v (Pi.single i r) = r • v i

{α : Type u_1}
{M : Type u_2}
(R : Type u_3)
[Fintype α]
[Semiring R]
[AddCommMonoid M]
[Module R M]
{S : Type u_4}
[Semiring S]
[Module S M]
[SMulCommClass R S M]
(v : α → M)
[DecidableEq α]
(i : α)
(r : R)

((Fintype.total R S) v) (Pi.single i r) = r • v i


theorem dedup_subset (s : Multiset α) : dedup s ⊆ s

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


@[simp]
theorem inf'_le_iff : s.inf' H f ≤ a ↔ ∃ i ∈ s, f i ≤ a

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
{s : Finset ι}
(H : s.Nonempty)
{f : ι → α}
{a : α}


@[to_additive (attr := simp)]
theorem smul_finset_singleton (b : β) : a • ({b} : Finset β) = {a • b}

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{a : α}
(b : β)


theorem le_iInf_comp {ι' : Sort*} (f : ι' → α) (g : ι → ι') : ⨅ y, f y ≤ ⨅ x, f (g x)

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{ι' : Sort u_9}
(f : ι' → α)
(g : ι → ι')


@[to_additive (attr := simp)]
theorem N_one (B : GroupFilterBasis G) : B.N 1 = B.toFilterBasis.filter

{G : Type u}
[Group G]
(B : GroupFilterBasis G)

B.N 1 = GroupFilterBasis.toFilterBasis.filter


theorem zero_def : (0 : Language α) = (∅ : Set _)


/-- Every finite symmetric group is generated by transpositions of adjacent elements. -/
theorem mclosure_swap_castSucc_succ (n : ℕ) :
    Submonoid.closure (Set.range fun i : Fin n ↦ swap i.castSucc i.succ) = ⊤

Submonoid.closure (Set.range fun i => Equiv.swap i.castSucc i.succ) = ⊤


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

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


/-- Suppose `f` and `g` are two morphisms with a common domain and suppose we have written `g` as
    an epimorphism followed by a monomorphism. If `f` factors through the epi part of this
    factorization, then any pushout of `g` along `f` is a monomorphism. -/
theorem mono_inl_of_factor_thru_epi_mono_factorization (f : X ⟶ Y) (g : X ⟶ Z) (g₁ : X ⟶ W) [Epi g₁]
    (g₂ : W ⟶ Z) [Mono g₂] (hg : g₁ ≫ g₂ = g) (f' : W ⟶ Y) (hf : g₁ ≫ f' = f)
    (t : PushoutCocone f g) (ht : IsColimit t) : Mono t.inl

(t : CategoryTheory.Limits.PushoutCocone f g)

(ht : CategoryTheory.Limits.IsColimit t)


theorem dist_le_opNorm (x y : E) : dist (f x) (f y) ≤ ‖f‖ * dist x y

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)
(x y : E)


@[simp, norm_cast]
theorem coe_eq_one {x : Ioc (0 : α) 1} : (x : α) = 1 ↔ x = 1

{α : Type u_1}
[StrictOrderedSemiring α]
{x : ↑(Set.Ioc 0 1)}


private theorem restrictNonposSeq_disjoint' {n m : ℕ} (h : n < m) :
    restrictNonposSeq s i n ∩ restrictNonposSeq s i m = ∅

{α : Type u_1}
[MeasurableSpace α]
{s : MeasureTheory.SignedMeasure α}
{i : Set α}
{n m : ℕ}
(h : n < m)

MeasureTheory.SignedMeasure.restrictNonposSeq s i n ∩ MeasureTheory.SignedMeasure.restrictNonposSeq s i m = ∅


@[simp]
theorem integrableOn_singleton_iff {x : α} [MeasurableSingletonClass α] :
    IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ∞

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{μ : MeasureTheory.Measure α}
{x : α}
[MeasurableSingletonClass α]

MeasureTheory.IntegrableOn f {x} μ ↔ f x = 0 ∨ μ {x} < ⊤


lemma tendsto_harmonic_sub_log_add_one :
    Tendsto (fun n : ℕ ↦ harmonic n - log (n + 1)) atTop (𝓝 eulerMascheroniConstant)

Filter.Tendsto (fun n => ↑(harmonic n) - Real.log (↑n + 1)) Filter.atTop (𝓝 Real.eulerMascheroniConstant)


@[simp]
theorem extendWith_zero [DecidableEq ι] [∀ i, Zero (α i)] (x : α none) :
    (0 : Π₀ i, α (some i)).extendWith x = single none x

{ι : Type u}
{α : Option ι → Type v}
[DecidableEq ι]
[(i : Option ι) → Zero (α i)]
(x : α none)

DFinsupp.extendWith x 0 = DFinsupp.single none x


@[to_additive (attr := simp)]
theorem inv_pure : (pure a : Filter α)⁻¹ = pure a⁻¹


@[to_additive (attr := simp)]
theorem period_inv (g : G) (a : α) : period g⁻¹ a = period g a

{α : Type v}
{G : Type u}
[Group G]
[MulAction G α]
(g : G)
(a : α)

MulAction.period g⁻¹ a = MulAction.period g a


theorem destruct_append (s t : WSeq α) :
    destruct (append s t) = (destruct s).bind (destruct_append.aux t)

(s.append t).destruct = s.destruct.bind (Stream'.WSeq.destruct_append.aux t)


theorem tendsto_pow_div_pow_atTop_atTop {p q : ℕ} (hpq : q < p) :
    Tendsto (fun x : 𝕜 => x ^ p / x ^ q) atTop atTop

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{p q : ℕ}
(hpq : q < p)

Filter.Tendsto (fun x => x ^ p / x ^ q) Filter.atTop Filter.atTop


theorem comap_subtype {H : Subgroup G} (hH : IsPGroup p H) {K : Subgroup G} :
    IsPGroup p (H.comap K.subtype)

{p : ℕ}
{G : Type u_1}
[Group G]
{H : Subgroup G}
(hH : IsPGroup p ↥H)
{K : Subgroup G}

IsPGroup p ↥(Subgroup.comap K.subtype H)


@[measurability, fun_prop]
theorem measurable_edist_left : Measurable fun y => edist y x

{α : Type u_1}
[PseudoEMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
{x : α}


/-- If `K / E / F` is a field extension tower, `L` is an intermediate field of `K / F`, such that
either `E / F` or `L / F` is algebraic, then `[E(L) : E] ≤ [L : F]`. A corollary of
`Subalgebra.adjoin_rank_le` since in this case `E(L) = E[L]`. -/
theorem adjoin_rank_le_of_isAlgebraic (L : IntermediateField F K)
    (halg : Algebra.IsAlgebraic F E ∨ Algebra.IsAlgebraic F L) :
    Module.rank E (adjoin E (L : Set K)) ≤ Module.rank F L

(halg : Algebra.IsAlgebraic F E ∨ Algebra.IsAlgebraic F ↥L)

Module.rank E ↥(IntermediateField.adjoin E ↑L) ≤ Module.rank F ↥L


@[to_additive]
theorem AntitoneOn.inv (hf : AntitoneOn f s) : MonotoneOn (fun x => (f x)⁻¹) s

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


theorem inject_dummies (f : β → γ) (g : γ → Option β) (inv : ∀ x, g (f x) = some x)
    (p : Poly (α ⊕ β)) (h : ∀ v, S v ↔ ∃ t, p (v ⊗ t) = 0) :
    ∃ q : Poly (α ⊕ γ), ∀ v, S v ↔ ∃ t, q (v ⊗ t) = 0

(h : ∀ (v : α → ℕ), S v ↔ ∃ t, p (v ⊗ t) = 0)

∃ q, ∀ (v : α → ℕ), S v ↔ ∃ t, q (v ⊗ t) = 0


theorem map_add_eq_of_lt_right (h : v x < v y) : v (x + y) = v y

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)
{x y : R}
(h : v x < v y)


theorem mem_range_iff {m n r : ℤ} : r ∈ range m n ↔ m ≤ r ∧ r < n


/-- Baire theorem: a countable intersection of dense Gδ sets is dense. Formulated here with ⋂₀. -/
theorem dense_sInter_of_Gδ {S : Set (Set X)} (ho : ∀ s ∈ S, IsGδ s) (hS : S.Countable)
    (hd : ∀ s ∈ S, Dense s) : Dense (⋂₀ S)

{X : Type u_1}
[TopologicalSpace X]
[BaireSpace X]
{S : Set (Set X)}
(ho : ∀ s ∈ S, IsGδ s)
(hS : S.Countable)
(hd : ∀ s ∈ S, Dense s)


theorem AddValuation.map_add (x y : ℚ_[p]) :
    min (addValuationDef x) (addValuationDef y) ≤ addValuationDef (x + y : ℚ_[p])

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(x y : ℚ_[p])

min x.addValuationDef y.addValuationDef ≤ (x + y).addValuationDef


theorem sdiff_le_inf_hnot : a \ b ≤ a ⊓ ￢b

{α : Type u_2}
[CoheytingAlgebra α]
{a b : α}


/-- A bicategory structure on the oplax functors between bicategories. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
instance OplaxFunctor.bicategory : Bicategory (OplaxFunctor B C)

(B : Type u₁)
[CategoryTheory.Bicategory B]
(C : Type u₂)
[CategoryTheory.Bicategory C]
{F G : CategoryTheory.OplaxFunctor B C}
(η : F ⟶ G)
(a : B)

(CategoryTheory.Bicategory.rightUnitor η).inv.app a = (CategoryTheory.Bicategory.rightUnitor (η.app a)).inv


@[simp]
theorem mapRange.addMonoidHom_id :
    mapRange.addMonoidHom (AddMonoidHom.id M) = AddMonoidHom.id (α →₀ M)

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]

Finsupp.mapRange.addMonoidHom (AddMonoidHom.id M) = AddMonoidHom.id (α →₀ M)


@[scoped simp]
theorem map_sub_zsmul [AddGroup G] [AddGroup H] [AddConstMapClass F G H a b]
    (f : F) (x : G) (n : ℤ) : f (x - n • a) = f x - n • b

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
{a : G}
{b : H}
[AddGroup G]
[AddGroup H]
[AddConstMapClass F G H a b]
(f : F)
(x : G)
(n : ℤ)


theorem mem_single (a : α) (b : β) : b ∈ single a b a

{α : Type u}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
(a : α)
(b : β)


theorem isVonNBounded_sub :
    IsVonNBounded 𝕜 (s - t) ↔ s = ∅ ∨ t = ∅ ∨ IsVonNBounded 𝕜 s ∧ IsVonNBounded 𝕜 t

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
[TopologicalAddGroup E]
{s t : Set E}

Bornology.IsVonNBounded 𝕜 (s - t) ↔ s = ∅ ∨ t = ∅ ∨ Bornology.IsVonNBounded 𝕜 s ∧ Bornology.IsVonNBounded 𝕜 t


@[simp]
theorem val_mk {x : L} (hx : x ∈ S) : S.val ⟨x, hx⟩ = x

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
{x : L}
(hx : x ∈ S)


@[simp]
theorem zero_lintegral : (0 : α →ₛ ℝ≥0∞).lintegral μ = 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}

MeasureTheory.SimpleFunc.lintegral 0 μ = 0


@[simp]
theorem volume_pi_Ico_toReal {a b : ι → ℝ} (h : a ≤ b) :
    (volume (pi univ fun i => Ico (a i) (b i))).toReal = ∏ i, (b i - a i)

{ι : Type u_1}
[Fintype ι]
{a b : ι → ℝ}
(h : a ≤ b)

(MeasureTheory.volume (Set.univ.pi fun i => Set.Ico (a i) (b i))).toReal = ∏ i : ι, (b i - a i)


theorem rootMultiplicity_eq_nat_find_of_nonzero [DecidableEq R] {p : R[X]} (p0 : p ≠ 0) {a : R} :
    letI : DecidablePred fun n : ℕ => ¬(X - C a) ^ (n + 1) ∣ p := fun n =>
      @Not.decidable _ (decidableDvdMonic p ((monic_X_sub_C a).pow (n + 1)))
    rootMultiplicity a p = Nat.find (multiplicity_X_sub_C_finite a p0)

{R : Type u}
[Ring R]
[DecidableEq R]
{p : R[X]}
(p0 : p ≠ 0)
{a : R}

Polynomial.rootMultiplicity a p = Nat.find ⋯


@[simp]
theorem deriv_cos' : deriv cos = fun x => -sin x

deriv Complex.cos = fun x => -Complex.sin x


/-- If `a` and `b` are related by the reflexive transitive closure of `r`, then there is an
`r`-chain starting from `a` and ending on `b`.
The converse of `relationReflTransGen_of_exists_chain`.
-/
theorem exists_chain_of_relationReflTransGen (h : Relation.ReflTransGen r a b) :
    ∃ l, Chain r a l ∧ getLast (a :: l) (cons_ne_nil _ _) = b

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

∃ l, List.Chain r a l ∧ (a :: l).getLast ⋯ = b


theorem intCast_eq_intCast_iff_dvd_sub (a b : ℤ) (c : ℕ) : (a : ZMod c) = ↑b ↔ ↑c ∣ b - a


/-- See https://proofwiki.org/wiki/Fibonacci_Number_in_terms_of_Smaller_Fibonacci_Numbers -/
theorem fib_add (m n : ℕ) : fib (m + n + 1) = fib m * fib n + fib (m + 1) * fib (n + 1)

Nat.fib (m + n + 1) = Nat.fib m * Nat.fib n + Nat.fib (m + 1) * Nat.fib (n + 1)


@[to_additive]
theorem TopologicalGroup.of_nhds_one' {G : Type u} [Group G] [TopologicalSpace G]
    (hmul : Tendsto (uncurry ((· * ·) : G → G → G)) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))
    (hinv : Tendsto (fun x : G => x⁻¹) (𝓝 1) (𝓝 1))
    (hleft : ∀ x₀ : G, 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1))
    (hright : ∀ x₀ : G, 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)) : TopologicalGroup G

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

(hinv : Filter.Tendsto (fun x => -x) (𝓝 0) (𝓝 0))

(hleft : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x₀ + x) (𝓝 0))

(hright : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x + x₀) (𝓝 0))


/-- ε-δ characterization of Cauchy sequences on pseudoemetric spaces -/
protected theorem cauchy_iff {f : Filter α} :
    Cauchy f ↔ f ≠ ⊥ ∧ ∀ ε > 0, ∃ t ∈ f, ∀ x, x ∈ t → ∀ y, y ∈ t → edist x y < ε

{α : Type u}
[PseudoEMetricSpace α]
{f : Filter α}

Cauchy f ↔ f ≠ ⊥ ∧ ∀ ε > 0, ∃ t ∈ f, ∀ x ∈ t, ∀ y ∈ t, edist x y < ε


/-- This lemma is superceded by `UniformIntegrable.spec` which does not require measurability. -/
theorem UniformIntegrable.spec' (hp : p ≠ 0) (hp' : p ≠ ∞) (hf : ∀ i, StronglyMeasurable (f i))
    (hfu : UniformIntegrable f p μ) {ε : ℝ} (hε : 0 < ε) :
    ∃ C : ℝ≥0, ∀ i, eLpNorm ({ x | C ≤ ‖f i x‖₊ }.indicator (f i)) p μ ≤ ENNReal.ofReal ε

{f : ι → α → β}

(hf : ∀ (i : ι), MeasureTheory.StronglyMeasurable (f i))

(hfu : MeasureTheory.UniformIntegrable f p μ)

∃ C, ∀ (i : ι), MeasureTheory.eLpNorm ({x | C ≤ ‖f i x‖₊}.indicator (f i)) p μ ≤ ENNReal.ofReal ε


/-- A helper function used in defining the Čech adjunction. -/
@[simps]
def equivalenceLeftToRight (X : SimplicialObject.Augmented C) (F : Arrow C)
    (G : Augmented.toArrow.obj X ⟶ F) : X ⟶ F.augmentedCechNerve

[∀ (n : ℕ) (f : CategoryTheory.Arrow C), CategoryTheory.Limits.HasWidePullback f.right (fun x => f.left) fun x => f.hom]

(X : CategoryTheory.SimplicialObject.Augmented C)

(G : CategoryTheory.SimplicialObject.Augmented.toArrow.obj X ⟶ F)

(CategoryTheory.SimplicialObject.equivalenceLeftToRight X F G).right = G.right


theorem inter_left (u : Set α) (h : Disjoint s t) : Disjoint (s ∩ u) t

{α : Type u_1}
{s t : Set α}
(u : Set α)
(h : Disjoint s t)


@[simp, norm_cast]
theorem cast_to_int [AddGroupWithOne α] : ∀ n : ZNum, ((n : ℤ) : α) = n

{α : Type u_1}
[AddGroupWithOne α]
(n : ZNum)


/--
For two preorders `α, β`, if `f : α → β` is strictly monotonic, then a strict chain of `α`
can be pushed out to a strict chain of `β` by
`a₀ < a₁ < ... < aₙ ↦ f a₀ < f a₁ < ... < f aₙ`
-/
@[simps!]
def map (p : LTSeries α) (f : α → β) (hf : StrictMono f) : LTSeries β

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(p : LTSeries α)
(f : α → β)
(hf : StrictMono f)

∀ (a : Fin (p.length + 1)), (p.map f hf).toFun a = f (p.toFun a)


lemma counitBackward_counitForward (F : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v)
    (s : CostructuredArrow yoneda A) : counitBackward F s ∘ counitForward F s = id

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

(F : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v))

(s : CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)

CategoryTheory.OverPresheafAux.counitBackward F s ∘ CategoryTheory.OverPresheafAux.counitForward F s = id


protected theorem nontrivial (R S : Type*) [CommRing R] [Nontrivial R] [CommRing S] [Algebra R S]
    [IsFractionRing R S] : Nontrivial S

(R : Type u_8)
(S : Type u_9)
[CommRing R]
[Nontrivial R]
[CommRing S]
[Algebra R S]
[IsFractionRing R S]


@[simp]
theorem monomial_modMonomial (s : σ →₀ ℕ) : monomial s (1 : R) %ᵐᵒⁿᵒᵐⁱᵃˡ s = 0

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(s : σ →₀ ℕ)

((MvPolynomial.monomial s) 1).modMonomial s = 0


@[to_additive]
theorem Pi.mulSingle_inf [∀ i, SemilatticeInf (f i)] [∀ i, One (f i)] (i : I) (x y : f i) :
    Pi.mulSingle i (x ⊓ y) = Pi.mulSingle i x ⊓ Pi.mulSingle i y

{I : Type u}
{f : I → Type v}
[DecidableEq I]
[(i : I) → SemilatticeInf (f i)]
[(i : I) → Zero (f i)]
(i : I)
(x y : f i)

Pi.single i (x ⊓ y) = Pi.single i x ⊓ Pi.single i y


lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :
    ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game)

(h : Surreal.Multiplication.IH24 x₁ x₂ y)


theorem induce_mono (hg : G' ≤ G'') (hs : s ⊆ s') : G'.induce s ≤ G''.induce s'

{V : Type u}
{G : SimpleGraph V}
{G' G'' : G.Subgraph}
{s s' : Set V}
(hg : G' ≤ G'')
(hs : s ⊆ s')


theorem Irreducible.ne_one [Monoid α] : ∀ {p : α}, Irreducible p → p ≠ 1


theorem dvd_sub {k m n : Nat} (H : n ≤ m) (h₁ : k ∣ m) (h₂ : k ∣ n) : k ∣ m - n


/-- The cokernel of `f.op` is the opposite of `kernel f`. -/
@[simps]
def cokernelOpUnop : (cokernel f.op).unop ≅ kernel f

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

(CategoryTheory.cokernelOpUnop f).hom =
  CategoryTheory.Limits.kernel.lift f (CategoryTheory.Limits.cokernel.π f.op).unop ⋯


@[reassoc (attr := simp)]
lemma d_fst_v' (i j : ℤ) (hij : i + 1 = j) :
    (mappingCone φ).d (i - 1) i ≫ (fst φ).1.v i j hij =
      -(fst φ).1.v (i - 1) i (by omega) ≫ F.d i j

(CochainComplex.mappingCone φ).d (i - 1) i ≫ (↑(CochainComplex.mappingCone.fst φ)).v i j hij =
  -(↑(CochainComplex.mappingCone.fst φ)).v (i - 1) i ⋯ ≫ F.d i j


@[reassoc]
lemma ProjectiveResolution.isoLeftDerivedToHomotopyCategoryObj_inv_naturality
    {X Y : C} (f : X ⟶ Y) (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f)
    (F : C ⥤ D) [F.Additive] :
    (P.isoLeftDerivedToHomotopyCategoryObj F).inv ≫ F.leftDerivedToHomotopyCategory.map f =
      (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map φ ≫
        (Q.isoLeftDerivedToHomotopyCategoryObj F).inv

(P : CategoryTheory.ProjectiveResolution X)

(Q : CategoryTheory.ProjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (φ.f 0) (Q.π.f 0) = CategoryTheory.CategoryStruct.comp (P.π.f 0) f)

CategoryTheory.CategoryStruct.comp (P.isoLeftDerivedToHomotopyCategoryObj F).inv
    (F.leftDerivedToHomotopyCategory.map f) =
  CategoryTheory.CategoryStruct.comp
    (((F.mapHomologicalComplex (ComplexShape.down ℕ)).comp (HomotopyCategory.quotient D (ComplexShape.down ℕ))).map φ)
    (Q.isoLeftDerivedToHomotopyCategoryObj F).inv


@[simp]
theorem coe_toEmbedding (f : M ↪ₑ[L] N) : (f.toEmbedding : M → N) = (f : M → N)

{L : FirstOrder.Language}
{M : Type u_1}
{N : Type u_2}
[L.Structure M]
[L.Structure N]
(f : M ↪ₑ[L] N)


theorem contDiffOn_id' : ContDiffOn K n (fun x : E => x) s

{K : Type u_1}
[NontriviallyNormedField K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
{s : Set E}
{n : ℕ∞}


@[to_additive (attr := simp)]
theorem mk_mul_mk [Mul M] [Mul N] (a₁ a₂ : M) (b₁ b₂ : N) :
    (a₁, b₁) * (a₂, b₂) = (a₁ * a₂, b₁ * b₂)

{M : Type u_5}
{N : Type u_6}
[Add M]
[Add N]
(a₁ a₂ : M)
(b₁ b₂ : N)

(a₁, b₁) + (a₂, b₂) = (a₁ + a₂, b₁ + b₂)


theorem subring_closure_le (s : Set K) : Subring.closure s ≤ (closure s).toSubring

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

Subring.closure s ≤ (Subfield.closure s).toSubring


@[to_additive]
theorem snd_prod : (∏ c ∈ s, f c).2 = ∏ c ∈ s, (f c).2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[AddCommMonoid β]
{s : Finset γ}
{f : γ → α × β}


theorem card_eq_one {s : Multiset α} : card s = 1 ↔ ∃ a, s = {a}


theorem toIcoMod_eq_fract_mul (b : α) : toIcoMod hp 0 b = Int.fract (b / p) * p

{α : Type u_1}
[LinearOrderedField α]
[FloorRing α]
{p : α}
(hp : 0 < p)
(b : α)


theorem _root_.Bool.involutive_not : Involutive not


@[simp]
theorem dmuld : sqrtd (d := d) * sqrtd (d := d) = d


lemma isZero_homology_of_isZero_X₂ (hS : IsZero S.X₂) [S.HasHomology] :
    IsZero S.homology

(hS : CategoryTheory.Limits.IsZero S.X₂)


@[to_additive]
lemma isSquare_op_iff {a : α} : IsSquare (op a) ↔ IsSquare a


@[simp]
theorem image_preimage (e : α ≃o β) (s : Set β) : e '' (e ⁻¹' s) = s

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)
(s : Set β)


@[csimp] theorem any_eq_anyTR : @any = @anyTR


theorem infs_subset_right : s₁ ⊆ s₂ → s₁ ⊼ t ⊆ s₂ ⊼ t

{α : Type u_2}
[SemilatticeInf α]
{s₁ s₂ t : Set α}

s₁ ⊆ s₂ → s₁ ⊼ t ⊆ s₂ ⊼ t


theorem rightInverse_rangeSplitting {f : α → β} (h : Injective f) :
    RightInverse (rangeFactorization f) (rangeSplitting f)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(h : Function.Injective f)

Function.RightInverse (Set.rangeFactorization f) (Set.rangeSplitting f)


theorem integral_sin_pow_succ_le : (∫ x in (0)..π, sin x ^ (n + 1)) ≤ ∫ x in (0)..π, sin x ^ n

∫ (x : ℝ) in 0 ..π, Real.sin x ^ (n + 1) ≤ ∫ (x : ℝ) in 0 ..π, Real.sin x ^ n


protected theorem eq_zero_iff_of_le {f : α → E} {s : Set α} (hf : LocallyBoundedVariationOn f s)
    {a b : α} (ha : a ∈ s) (hb : b ∈ s) (ab : a ≤ b) :
    variationOnFromTo f s a b = 0 ↔
      ∀ ⦃x⦄ (_hx : x ∈ s ∩ Icc a b) ⦃y⦄ (_hy : y ∈ s ∩ Icc a b), edist (f x) (f y) = 0

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)
(ab : a ≤ b)

variationOnFromTo f s a b = 0 ↔ ∀ ⦃x : α⦄, x ∈ s ∩ Set.Icc a b → ∀ ⦃y : α⦄, y ∈ s ∩ Set.Icc a b → edist (f x) (f y) = 0


theorem copy_eq (S : NonUnitalStarSubsemiring R) (s : Set R) (hs : s = ↑S) : S.copy s hs = S

{R : Type v}
[NonUnitalNonAssocSemiring R]
[StarRing R]
(S : NonUnitalStarSubsemiring R)
(s : Set R)
(hs : s = ↑S)


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

{X Y : AlgebraicGeometry.PresheafedSpace C}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

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


/-- The `Generators` containing the whole algebra, which induces the canonical map  `R[S] → S`. -/
@[simps]
noncomputable
def self : Generators R S

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

(Algebra.Generators.self R S).val a = id a


/-- Functions in a `StarHomClass` preserve self-adjoint elements. -/
theorem starHom_apply {F R S : Type*} [Star R] [Star S] [FunLike F R S] [StarHomClass F R S]
    {x : R} (hx : IsSelfAdjoint x) (f : F) : IsSelfAdjoint (f x)

{F : Type u_3}
{R : Type u_4}
{S : Type u_5}
[Star R]
[Star S]
[FunLike F R S]
[StarHomClass F R S]
{x : R}
(hx : IsSelfAdjoint x)
(f : F)


theorem natDegree_C_le (a : R) : natDegree (C a) ≤ 0


/-- If `P` imples `P'`, then there is a functor from `CompHausLike P` to `CompHausLike P'`. -/
@[simps]
def toCompHausLike {P P' : TopCat → Prop} (h : ∀ (X : CompHausLike P), P X.toTop → P' X.toTop) :
    CompHausLike P ⥤ CompHausLike P'

∀ {X Y : CompHausLike P} (f : X ⟶ Y), (CompHausLike.toCompHausLike h).map f = f


@[to_additive (attr := simp)]
theorem topEquiv_toMulHom :
    ((topEquiv : _ ≃* M) : _ →ₙ* M) = MulMemClass.subtype (⊤ : Subsemigroup M)

↑Subsemigroup.topEquiv = MulMemClass.subtype ⊤


@[to_additive]
protected theorem inv (hab : Commute a b) : (a * b)⁻¹ = a⁻¹ * b⁻¹

{G : Type u_1}
[SubtractionMonoid G]
{a b : G}
(hab : AddCommute a b)


theorem get_of_valid (cs cs' : List Char) : get ⟨cs ++ cs'⟩ ⟨utf8Len cs⟩ = cs'.headD default

{ data := cs ++ cs' }.get { byteIdx := String.utf8Len cs } = cs'.headD default


protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering

{U : Type u_1}
[Quiver U]
{V : Type u_2}
[Quiver V]
(φ : U ⥤q V)
(hφ : φ.IsCovering)


@[norm_cast] lemma cast_lt_zero : (q : K) < 0 ↔ q < 0

{K : Type u_5}
[LinearOrderedSemifield K]
{q : ℚ≥0}


@[to_additive (attr := simp)]
theorem mulRight_symm [IsometricSMul Gᵐᵒᵖ G] (x : G) : (mulRight x).symm = mulRight x⁻¹

{G : Type v}
[Group G]
[PseudoEMetricSpace G]
[IsometricSMul Gᵐᵒᵖ G]
(x : G)

(IsometryEquiv.mulRight x).symm = IsometryEquiv.mulRight x⁻¹


@[to_additive (attr := simp)]
theorem coe_mrangeRestrict {N} [MulOneClass N] (f : M →* N) (x : M) :
    (f.mrangeRestrict x : N) = f x

{M : Type u_1}
[AddZeroClass M]
{N : Type u_6}
[AddZeroClass N]
(f : M →+ N)
(x : M)


theorem smul_sup (r : R) (p q : AddGroupSeminorm E) : r • (p ⊔ q) = r • p ⊔ r • q

{R : Type u_2}
{E : Type u_4}
[AddGroup E]
[SMul R ℝ]
[SMul R ℝ≥0]
[IsScalarTower R ℝ≥0 ℝ]
(r : R)
(p q : AddGroupSeminorm E)


theorem _root_.WellFounded.wellFoundedOn : WellFounded r → s.WellFoundedOn r

{α : Type u_2}
{r : α → α → Prop}
{s : Set α}


@[to_additive]
theorem mem_sup_right {S T : Subgroup G} : ∀ {x : G}, x ∈ T → x ∈ S ⊔ T

{G : Type u_1}
[Group G]
{S T : Subgroup G}
{x : G}


@[simp]
theorem coe_preimage_self (s : Set α) : ((↑) : s → α) ⁻¹' s = univ


@[simp] theorem exists_eq_right_right' : (∃ (a : α), p a ∧ q a ∧ a' = a) ↔ p a' ∧ q a'

{α : Sort u_1}
{p q : α → Prop}
{a' : α}


@[to_additive addCHaar_nonneg]
theorem chaar_nonneg (K₀ : PositiveCompacts G) (K : Compacts G) : 0 ≤ chaar K₀ K

(K₀ : TopologicalSpace.PositiveCompacts G)

0 ≤ MeasureTheory.Measure.haar.addCHaar K₀ K


theorem subset_zeroLocus_vanishingIdeal (t : Set (ProjectiveSpectrum 𝒜)) :
    t ⊆ zeroLocus 𝒜 (vanishingIdeal t)

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(t : Set (ProjectiveSpectrum 𝒜))

t ⊆ ProjectiveSpectrum.zeroLocus 𝒜 ↑(ProjectiveSpectrum.vanishingIdeal t)


@[simp]
theorem toNat_eq_one : toNat c = 1 ↔ c = 1


@[simp]
theorem keys_empty : (∅ : AList β).keys = []


theorem toPoly_eq_zero_iff (P : Cubic R) : P.toPoly = 0 ↔ P = 0

{R : Type u_1}
[Semiring R]
(P : Cubic R)


@[simp]
theorem snd_prod (f : A →ₙₐ[R] B) (g : A →ₙₐ[R] C) : (snd R B C).comp (prod f g) = g

{R : Type u}
[Monoid R]
{A : Type v}
{B : Type w}
{C : Type w₁}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[NonUnitalNonAssocSemiring C]
[DistribMulAction R B]
[DistribMulAction R C]
(f : A →ₙₐ[R] B)
(g : A →ₙₐ[R] C)

(NonUnitalAlgHom.snd R B C).comp (f.prod g) = g


lemma StrictAntiOn.image_Ioi_subset (h : StrictAntiOn f (Ici a)) : f '' Ioi a ⊆ Iio (f a)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a : α}
(h : StrictAntiOn f (Set.Ici a))


theorem vandermonde_transpose_mul_vandermonde {n : ℕ} (v : Fin n → R) (i j) :
    ((vandermonde v)ᵀ * vandermonde v) i j = ∑ k : Fin n, v k ^ (i + j : ℕ)

{R : Type u_1}
[CommRing R]
{n : ℕ}
(v : Fin n → R)
(i j : Fin n)

((Matrix.vandermonde v)ᵀ * Matrix.vandermonde v) i j = ∑ k : Fin n, v k ^ (↑i + ↑j)


theorem productive_congr {s t : WSeq α} (h : s ~ʷ t) : Productive s ↔ Productive t

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


theorem bijOn_periodicPts : BijOn f (periodicPts f) (periodicPts f)

Set.BijOn f (Function.periodicPts f) (Function.periodicPts f)


theorem sized_shadow_iff (h : ∅ ∉ 𝒜) :
    (∂ 𝒜 : Set (Finset α)).Sized r ↔ (𝒜 : Set (Finset α)).Sized (r + 1)

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{r : ℕ}
(h : ∅ ∉ 𝒜)

Set.Sized r ↑𝒜.shadow ↔ Set.Sized (r + 1) ↑𝒜


@[simp]
theorem tprod_cons (i : δ) (l : List δ) (μ : ∀ i, Measure (π i)) :
    Measure.tprod (i :: l) μ = (μ i).prod (Measure.tprod l μ)

(μ : (i : δ) → MeasureTheory.Measure (π i))

MeasureTheory.Measure.tprod (i :: l) μ = (μ i).prod (MeasureTheory.Measure.tprod l μ)


/-- Lemma 2.2 in [Gleason, *Projective topological spaces*][gleason1958]:
in an extremally disconnected space, if $U_1$ and $U_2$ are disjoint open sets,
then $\overline{U_1}$ and $\overline{U_2}$ are also disjoint. -/
lemma ExtremallyDisconnected.disjoint_closure_of_disjoint_isOpen [ExtremallyDisconnected A]
    {U₁ U₂ : Set A} (h : Disjoint U₁ U₂) (hU₁ : IsOpen U₁) (hU₂ : IsOpen U₂) :
    Disjoint (closure U₁) (closure U₂)

{A : Type u}
[TopologicalSpace A]
[ExtremallyDisconnected A]
{U₁ U₂ : Set A}
(h : Disjoint U₁ U₂)
(hU₁ : IsOpen U₁)
(hU₂ : IsOpen U₂)


@[simp]
theorem Icc_erase_left (a b : α) : (Icc a b).erase a = Ioc a b

{α : Type u_2}
[PartialOrder α]
[LocallyFiniteOrder α]
[DecidableEq α]
(a b : α)

(Finset.Icc a b).erase a = Finset.Ioc a b


@[simp, mfld_simps]
theorem coe_trans : (e.trans e' : α → γ) = e' ∘ e

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : PartialEquiv α β)
(e' : PartialEquiv β γ)


theorem infiniteNeg_add_infiniteNeg {x y : ℝ*} :
    InfiniteNeg x → InfiniteNeg y → InfiniteNeg (x + y)

x.InfiniteNeg → y.InfiniteNeg → (x + y).InfiniteNeg


/-- The natural equivalence between continuous linear maps from `M₂` to `M₃`
and continuous 1-multilinear maps from `M₂` to `M₃`. -/
@[simps! apply_toMultilinearMap apply_apply symm_apply_apply]
def ofSubsingleton [Subsingleton ι] (i : ι) :
    (M₂ →L[R] M₃) ≃ ContinuousMultilinearMap R (fun _ : ι => M₂) M₃

(R : Type u)
{ι : Type v}
(M₂ : Type w₂)
(M₃ : Type w₃)
[Semiring R]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M₂]
[Module R M₃]
[TopologicalSpace M₂]
[TopologicalSpace M₃]
[Subsingleton ι]
(i : ι)
(f : M₂ →L[R] M₃)
(x : ι → M₂)

((ContinuousMultilinearMap.ofSubsingleton R M₂ M₃ i) f) x = f (x i)


theorem inner_rightAngleRotation_swap' (x y : E) : ⟪J x, y⟫ = -⟪x, J y⟫

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

⟪o.rightAngleRotation x, y⟫_ℝ = -⟪x, o.rightAngleRotation y⟫_ℝ


@[reassoc]
lemma ProjectiveResolution.isoLeftDerivedObj_hom_naturality
    {X Y : C} (f : X ⟶ Y) (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f)
    (F : C ⥤ D) [F.Additive] (n : ℕ) :
    (F.leftDerived n).map f ≫ (Q.isoLeftDerivedObj F n).hom =
      (P.isoLeftDerivedObj F n).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map φ

(P : CategoryTheory.ProjectiveResolution X)

(Q : CategoryTheory.ProjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (φ.f 0) (Q.π.f 0) = CategoryTheory.CategoryStruct.comp (P.π.f 0) f)

CategoryTheory.CategoryStruct.comp ((F.leftDerived n).map f) (Q.isoLeftDerivedObj F n).hom =
  CategoryTheory.CategoryStruct.comp (P.isoLeftDerivedObj F n).hom
    (((F.mapHomologicalComplex (ComplexShape.down ℕ)).comp
          (HomologicalComplex.homologyFunctor D (ComplexShape.down ℕ) n)).map
      φ)


/-- A ball package is a family of balls in a metric space with positive bounded radii. -/
structure BallPackage (β : Type*) (α : Type*) where
  c : β → α
  r : β → ℝ
  rpos : ∀ b, 0 < r b
  r_bound : ℝ
  r_le : ∀ b, r b ≤ r_bound

{β : Type u_1}
{α : Type u_2}
(self : Besicovitch.BallPackage β α)
(b : β)


/-- If a filter `f` is majorated by some `𝓝 x`, then it is majorated by `𝓝 (Filter.lim f)`. We
formulate this lemma with a `[Nonempty X]` argument of `lim` derived from `h` to make it useful for
types without a `[Nonempty X]` instance. Because of the built-in proof irrelevance, Lean will unify
this instance with any other instance. -/
theorem le_nhds_lim {f : Filter X} (h : ∃ x, f ≤ 𝓝 x) : f ≤ 𝓝 (@lim _ _ (nonempty_of_exists h) f)

{X : Type u}
[TopologicalSpace X]
{f : Filter X}
(h : ∃ x, f ≤ 𝓝 x)


theorem IsNilpotent.isUnit_quotient_mk_iff {R : Type*} [CommRing R] {I : Ideal R}
    (hI : IsNilpotent I) {x : R} : IsUnit (Ideal.Quotient.mk I x) ↔ IsUnit x

{R : Type u_3}
[CommRing R]
{I : Ideal R}
(hI : IsNilpotent I)
{x : R}

IsUnit ((Ideal.Quotient.mk I) x) ↔ IsUnit x


theorem image_closure {S : Type*} [Ring S] (f : R →+* S) (s : Set R) :
    f '' closure s = closure (f '' s)

{R : Type u}
[Ring R]
{S : Type u_1}
[Ring S]
(f : R →+* S)
(s : Set R)

⇑f '' Ring.closure s = Ring.closure (⇑f '' s)


@[simp, norm_cast]
theorem coe_smul [Zero β] {R : Type*} [Zero R] [SMulWithZero R β] [ContinuousConstSMul R β] (r : R)
    (f : C₀(α, β)) : ⇑(r • f) = r • ⇑f

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
{R : Type u_2}
[Zero R]
[SMulWithZero R β]
[ContinuousConstSMul R β]
(r : R)
(f : α →C₀ β)


@[simp]
theorem coe_add {s t : SummableFamily Γ R α} : ⇑(s + t) = s + t

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


@[simp]
theorem exp_unop [T2Space 𝔸] (x : 𝔸ᵐᵒᵖ) :
    exp 𝕂 (MulOpposite.unop x) = MulOpposite.unop (exp 𝕂 x)

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[Field 𝕂]
[Ring 𝔸]
[Algebra 𝕂 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
[T2Space 𝔸]
(x : 𝔸ᵐᵒᵖ)

NormedSpace.exp 𝕂 (MulOpposite.unop x) = MulOpposite.unop (NormedSpace.exp 𝕂 x)


@[to_additive (attr := simp)]
theorem prod_mk [CommMonoid β] (s : Multiset α) (hs : s.Nodup) (f : α → β) :
    (⟨s, hs⟩ : Finset α).prod f = (s.map f).prod

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
(s : Multiset α)
(hs : s.Nodup)
(f : α → β)

{ val := s, nodup := hs }.sum f = (Multiset.map f s).sum


@[simp]
theorem adjoin_intCast (n : ℤ) : F⟮(n : E)⟯ = ⊥

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(n : ℤ)


@[simp]
theorem smul_mem_pointwise_smul_iff₀ {a : M} (ha : a ≠ 0) (S : Subsemiring R) (x : R) :
    a • x ∈ a • S ↔ x ∈ S

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


theorem isSt_real_iff_eq {r s : ℝ} : IsSt r s ↔ r = s


/-- The coercion `(fun x y => B x y) : E → (F → 𝕜)` is continuous. -/
theorem coeFn_continuous : Continuous fun (x : WeakBilin B) y => B x y

{𝕜 : Type u_2}
{E : Type u_5}
{F : Type u_6}
[TopologicalSpace 𝕜]
[CommSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[AddCommMonoid F]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)


protected theorem mul_lt_mul_of_pos_right {n m k : Nat} (h : n < m) (hk : k > 0) : n * k < m * k


@[simp]
theorem finsuppLEquivDirectSum_symm_lof (i : ι) (m : M) :
    (finsuppLEquivDirectSum R M ι).symm (DirectSum.lof R ι _ i m) = Finsupp.single i m

(R : Type u)
(M : Type v)
[Semiring R]
[AddCommMonoid M]
[Module R M]
(ι : Type u_1)
[DecidableEq ι]
(i : ι)
(m : M)

(finsuppLEquivDirectSum R M ι).symm ((DirectSum.lof R ι (fun x => M) i) m) = Finsupp.single i m


/-- The image of an element of finite order has finite order. -/
@[to_additive "The image of an element of finite additive order has finite additive order."]
theorem MonoidHom.isOfFinOrder [Monoid H] (f : G →* H) {x : G} (h : IsOfFinOrder x) :
    IsOfFinOrder <| f x

{G : Type u_1}
{H : Type u_2}
[AddMonoid G]
[AddMonoid H]
(f : G →+ H)
{x : G}
(h : IsOfFinAddOrder x)


/-- Binary **rearrangement inequality**. -/
lemma smul_add_smul_le_smul_add_smul [PosSMulMono α β]
    {b₁ b₂ : α} {a d : β} (hab : b₁ ≤ b₂) (hcd : a ≤ d) : b₁ • d + b₂ • a ≤ b₁ • a + b₂ • d

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulMono α β]
{b₁ b₂ : α}
{a d : β}
(hab : b₁ ≤ b₂)
(hcd : a ≤ d)


@[simp]
theorem ofInjective_toHom [L.IsAlgebraic] {f : M →[L] N} (hf : Function.Injective f) :
    (ofInjective hf).toHom = f

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
[L.IsAlgebraic]
{f : L.Hom M N}
(hf : Function.Injective ⇑f)

(FirstOrder.Language.Embedding.ofInjective hf).toHom = f


theorem integral_comp_div_add (hc : c ≠ 0) (d) :
    (∫ x in a..b, f (x / c + d)) = c • ∫ x in a / c + d..b / c + d, f x

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

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


/-- Right-multiplication by a nonzero element of a topological division ring is proper, i.e.,
inverse images of compact sets are compact. -/
theorem Filter.tendsto_cocompact_mul_right₀ [ContinuousMul K] {a : K} (ha : a ≠ 0) :
    Filter.Tendsto (fun x : K => x * a) (Filter.cocompact K) (Filter.cocompact K)

{K : Type u_1}
[DivisionRing K]
[TopologicalSpace K]
[ContinuousMul K]
{a : K}
(ha : a ≠ 0)

Filter.Tendsto (fun x => x * a) (Filter.cocompact K) (Filter.cocompact K)


@[simp]
theorem derivedSeries_succ (n : ℕ) :
    derivedSeries G (n + 1) = ⁅derivedSeries G n, derivedSeries G n⁆


theorem replicate_succ' (n) (a : α) : replicate (n + 1) a = replicate n a ++ [a]

List.replicate (n + 1) a = List.replicate n a ++ [a]


@[to_additive]
theorem smul_apply_eq_smul_apply_inv_smul (f : F) (T : leftTransversals (H : Set G)) (q : G ⧸ H) :
    (toEquiv (f • T).2 q : G) = f • (toEquiv T.2 (f⁻¹ • q) : G)

(T : ↑(AddSubgroup.leftTransversals ↑H))

↑((AddSubgroup.MemLeftTransversals.toEquiv ⋯) q) = f +ᵥ ↑((AddSubgroup.MemLeftTransversals.toEquiv ⋯) (-f +ᵥ q))


@[simp] lemma inf_eq_sup : a ⊓ b = a ⊔ b ↔ a = b


theorem mem_commonNeighbors {u v w : V} : u ∈ G.commonNeighbors v w ↔ G.Adj v u ∧ G.Adj w u

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


@[simp]
theorem head_even (s : Stream' α) : head (even s) = head s


/-- The completion of a seminormed group, as an endofunctor on `SemiNormedGrp`. -/
@[simps]
def completion : SemiNormedGrp.{u} ⥤ SemiNormedGrp.{u}

SemiNormedGrp.completion.obj V = SemiNormedGrp.of (UniformSpace.Completion ↑V)


/-- Given an exact short complex `S` and a limit kernel fork `kf` for `S.g`, this is the
left homology data for `S` with `K := kf.pt` and `H := 0`. -/
@[simps]
noncomputable def Exact.leftHomologyDataOfIsLimitKernelFork
    (hS : S.Exact) [HasZeroObject C] (kf : KernelFork S.g) (hkf : IsLimit kf) :
    S.LeftHomologyData

(kf : CategoryTheory.Limits.KernelFork S.g)

(hkf : CategoryTheory.Limits.IsLimit kf)

(hS.leftHomologyDataOfIsLimitKernelFork kf hkf).π = 0


/-- The image of a cone in C under a functor G : C ⥤ D is a cone in D. -/
@[simps!]
def mapCone (c : Cone F) : Cone (F ⋙ H)

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


@[to_additive (attr := simp)]
lemma smul_apply' [∀ i, SMul (α i) (β i)] (s : ∀ i, α i) (x : ∀ i, β i) : (s • x) i = s i • x i

{ι : Type u_1}
{α : ι → Type u_4}
{β : ι → Type u_5}
(i : ι)
[(i : ι) → SMul (α i) (β i)]
(s : (i : ι) → α i)
(x : (i : ι) → β i)


@[simp] lemma isLowerSet_shatterer (𝒜 : Finset (Finset α)) :
    IsLowerSet (𝒜.shatterer : Set (Finset α))

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


@[to_additive (attr := simp)]
theorem mrange_inl_sup_mrange_inr : mrange (inl M N) ⊔ mrange (inr M N) = ⊤

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

AddMonoidHom.mrange (AddMonoidHom.inl M N) ⊔ AddMonoidHom.mrange (AddMonoidHom.inr M N) = ⊤


theorem abs_le_sqrt_two_mul_max (z : ℂ) : Complex.abs z ≤ Real.sqrt 2 * max |z.re| |z.im|