theorem conjugate_i (g : G) (v : V) : (conjugate π g : W → V) (i v) = v

{k : Type u}
[CommRing k]
{G : Type u}
[Group G]
{V : Type v}
[AddCommGroup V]
[Module k V]
[Module (MonoidAlgebra k G) V]
[IsScalarTower k (MonoidAlgebra k G) V]
{W : Type w}
[AddCommGroup W]
[Module k W]
[Module (MonoidAlgebra k G) W]
[IsScalarTower k (MonoidAlgebra k G) W]
(π : W →ₗ[k] V)
(i : V →ₗ[MonoidAlgebra k G] W)
(h : ∀ (v : V), π (i v) = v)
(g : G)
(v : V)


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

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


@[simp]
theorem inducedOrderRingIso_self : inducedOrderRingIso β β = OrderRingIso.refl β

LinearOrderedField.inducedOrderRingIso β β = OrderRingIso.refl β


theorem eq_of_incomp {α : Sort u} {lt : α → α → Prop} [IsTrichotomous α lt] {a b} :
    ¬lt a b ∧ ¬lt b a → a = b

{α : Sort u}
{lt : α → α → Prop}
[IsTrichotomous α lt]
{a b : α}


/-- The constructed pointwise right Kan extension
when `HasPointwiseRightKanExtension L F` holds. -/
@[simps]
noncomputable def pointwiseRightKanExtension : D ⥤ H

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
(L : CategoryTheory.Functor C D)
(F : CategoryTheory.Functor C H)
[L.HasPointwiseRightKanExtension F]
{Y₁ Y₂ : D}
(f : Y₁ ⟶ Y₂)

(L.pointwiseRightKanExtension F).map f =
  CategoryTheory.Limits.limit.lift ((CategoryTheory.StructuredArrow.proj Y₂ L).comp F)
    { pt := CategoryTheory.Limits.limit ((CategoryTheory.StructuredArrow.proj Y₁ L).comp F),
      π :=
        {
          app := fun g =>
            CategoryTheory.Limits.limit.π ((CategoryTheory.StructuredArrow.proj Y₁ L).comp F)
              ((CategoryTheory.StructuredArrow.map f).obj g),
          naturality := ⋯ } }


lemma map_nonsingular (hf : Function.Injective f) (x y : R) :
    (W.map f).toAffine.Nonsingular (f x) (f y) ↔ W.Nonsingular x y

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type v}
[CommRing S]
{f : R →+* S}
(hf : Function.Injective ⇑f)
(x y : R)

(WeierstrassCurve.map W f).toAffine.Nonsingular (f x) (f y) ↔ W.Nonsingular x y


@[simp]
theorem closed (S : L.Substructure M) : (closure L).closed (S : Set M)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
(S : L.Substructure M)


/-- A `MorphismProperty` in `W.Localization` is satisfied by all
morphisms in the localized category if it contains the image of the
morphisms in the original category, the inverses of the morphisms
in `W` and if it is stable under composition -/
theorem morphismProperty_is_top (P : MorphismProperty W.Localization)
    [P.IsStableUnderComposition] (hP₁ : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), P (W.Q.map f))
    (hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (wInv w hw)) :
    P = ⊤

(P : CategoryTheory.MorphismProperty W.Localization)

(hP₂ : ∀ ⦃X Y : C⦄ (w : X ⟶ Y) (hw : W w), P (CategoryTheory.Localization.Construction.wInv w hw))


@[simp]
theorem toFinset_union [Fintype (s ∪ t : Set _)] : (s ∪ t).toFinset = s.toFinset ∪ t.toFinset

{α : Type u_1}
(s t : Set α)
[DecidableEq α]
[Fintype ↑s]
[Fintype ↑t]
[Fintype ↑(s ∪ t)]


/-- The oscillation within `D` of `f` at `x ∈ D` is 0 if and only if `ContinuousWithinAt f D x`. -/
theorem eq_zero_iff_continuousWithinAt [TopologicalSpace E] (f : E → F) {D : Set E}
    {x : E} (xD : x ∈ D) : oscillationWithin f D x = 0 ↔ ContinuousWithinAt f D x

{E : Type u}
{F : Type v}
[PseudoEMetricSpace F]
[TopologicalSpace E]
(f : E → F)
{D : Set E}
{x : E}
(xD : x ∈ D)


private lemma le_trans (a b c : SignType) (_ : a ≤ b) (_ : b ≤ c) : a ≤ c


/-- Expressing `HasDerivAt f f' x` in terms of `HasFDerivAt` -/
theorem hasDerivAt_iff_hasFDerivAt {f' : F} :
    HasDerivAt f f' x ↔ HasFDerivAt f (smulRight (1 : 𝕜 →L[𝕜] 𝕜) f') x

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

HasDerivAt f f' x ↔ HasFDerivAt f (ContinuousLinearMap.smulRight 1 f') x


protected theorem mem_filter_iff (h : IsBasis p s) {U : Set α} :
    U ∈ h.filter ↔ ∃ i, p i ∧ s i ⊆ U

{α : Type u_1}
{ι : Sort u_4}
{p : ι → Prop}
{s : ι → Set α}
(h : Filter.IsBasis p s)
{U : Set α}


theorem lt_div_iff_of_neg (hc : c < 0) : a < b / c ↔ b < a * c

{α : Type u_2}
[LinearOrderedField α]
{a b c : α}
(hc : c < 0)


@[simp]
theorem coe_copy (f : C(α, β)) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : C(α, β))
(f' : α → β)
(h : f' = ⇑f)


lemma IsHereditarilyLindelof.isLindelof_subset (hs : IsHereditarilyLindelof s) (ht : t ⊆ s) :
    IsLindelof t

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


theorem map_comp (f : β → γ) (g : α → β) (hf : Continuous f) (hg : Continuous g) (hf' : IsOpenMap f)
    (hg' : IsOpenMap g) (K : CompactOpens α) :
    K.map (f ∘ g) (hf.comp hg) (hf'.comp hg') = (K.map g hg hg').map f hf hf'

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
(f : β → γ)
(g : α → β)
(hf : Continuous f)
(hg : Continuous g)
(hf' : IsOpenMap f)
(hg' : IsOpenMap g)
(K : TopologicalSpace.CompactOpens α)

TopologicalSpace.CompactOpens.map (f ∘ g) ⋯ ⋯ K =
  TopologicalSpace.CompactOpens.map f hf hf' (TopologicalSpace.CompactOpens.map g hg hg' K)


@[simp]
theorem toReal_coe (x : ℝ) : toReal (x : EReal) = x


/-- In a locally compact regular space with an inner regular measure, the measure of a compact
set `k` is the infimum of the integrals of compactly supported functions equal to `1` on `k`. -/
lemma IsCompact.measure_eq_biInf_integral_hasCompactSupport
    {X : Type*} [TopologicalSpace X] [MeasurableSpace X] [BorelSpace X]
    {k : Set X} (hk : IsCompact k)
    (μ : Measure X) [IsFiniteMeasureOnCompacts μ] [InnerRegularCompactLTTop μ]
    [LocallyCompactSpace X] [RegularSpace X] :
    μ k = ⨅ (f : X → ℝ) (_ : Continuous f) (_ : HasCompactSupport f) (_ : EqOn f 1 k)
      (_ : 0 ≤ f), ENNReal.ofReal (∫ x, f x ∂μ)

μ k =
  ⨅ f,
    ⨅ (_ : Continuous f),
      ⨅ (_ : HasCompactSupport f), ⨅ (_ : Set.EqOn f 1 k), ⨅ (_ : 0 ≤ f), ENNReal.ofReal (∫ (x : X), f x ∂μ)


lemma reciprocalFactors_odd {n : ℕ} (h1 : n ≠ 1) (h2 : Odd n) :
    reciprocalFactors n = n % 4 * n :: reciprocalFactors (n / 4 + 1)

DihedralGroup.reciprocalFactors n = n % 4 * n :: DihedralGroup.reciprocalFactors (n / 4 + 1)


/-- Converse to the mean value inequality: if `f` is `C`-lipschitz then
its derivative at `x₀` has norm bounded by `C`.
Version using `fderiv`. -/
theorem norm_fderiv_le_of_lipschitz {f : E → F} {x₀ : E}
    {C : ℝ≥0} (hlip : LipschitzWith C f) : ‖fderiv 𝕜 f x₀‖ ≤ C

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x₀ : E}
{C : ℝ≥0}
(hlip : LipschitzWith C f)


theorem StrongEpi.iff_of_arrow_iso {A B A' B' : C} {f : A ⟶ B} {g : A' ⟶ B'}
    (e : Arrow.mk f ≅ Arrow.mk g) : StrongEpi f ↔ StrongEpi g

(e : CategoryTheory.Arrow.mk f ≅ CategoryTheory.Arrow.mk g)

CategoryTheory.StrongEpi f ↔ CategoryTheory.StrongEpi g


/-- The algebra isomorphism between multivariable polynomials in `Option S₁` and
multivariable polynomials with coefficients in polynomials.
-/
@[simps!]
def optionEquivRight : MvPolynomial (Option S₁) R ≃ₐ[R] MvPolynomial S₁ R[X]

(R : Type u)
(S₁ : Type v)
[CommSemiring R]
(a : MvPolynomial S₁ R[X])

(MvPolynomial.optionEquivRight R S₁).symm a =
  (MvPolynomial.aevalTower (Polynomial.aeval (MvPolynomial.X none)) fun i => MvPolynomial.X (some i)) a


@[simp]
theorem epi_map_iff_epi [hF₁ : PreservesEpimorphisms F] [hF₂ : ReflectsEpimorphisms F] :
    Epi (F.map f) ↔ Epi f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : C ⥤ D)
{X Y : C}
(f : X ⟶ Y)
[hF₁ : F.PreservesEpimorphisms]
[hF₂ : F.ReflectsEpimorphisms]

CategoryTheory.Epi (F.map f) ↔ CategoryTheory.Epi f


@[simp]
theorem Ioc_mk_mk : Ioc (⟨i, a⟩ : Sigma α) ⟨i, b⟩ = (Ioc a b).map (Embedding.sigmaMk i)

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → Preorder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(i : ι)
(a b : α i)

Finset.Ioc ⟨i, a⟩ ⟨i, b⟩ = Finset.map (Function.Embedding.sigmaMk i) (Finset.Ioc a b)


theorem digits_len (b n : ℕ) (hb : 1 < b) (hn : n ≠ 0) : (b.digits n).length = b.log n + 1


theorem sum_sq_le_of_mem_box (hx : x ∈ box n d) : ∑ i : Fin n, x i ^ 2 ≤ n * (d - 1) ^ 2

{n d : ℕ}
{x : Fin n → ℕ}
(hx : x ∈ Behrend.box n d)


@[simp]
theorem roots_X : roots (X : R[X]) = {0}


@[norm_cast] lemma den_coe : (q : ℚ).den = q.den


theorem toDual_def {B : BilinForm K V} (b : B.SeparatingLeft) {m n : V} : B.toDual b m n = B m n

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{B : LinearMap.BilinForm K V}
(b : LinearMap.SeparatingLeft B)
{m n : V}


protected lemma lt_of_lt_of_le : a < b → b ≤ c → a < c


theorem Results.val_unique {s : Computation α} {a b m n} (h1 : Results s a m) (h2 : Results s b n) :
    a = b

{α : Type u}
{s : Computation α}
{a b : α}
{m n : ℕ}
(h1 : s.Results a m)
(h2 : s.Results b n)


@[simp]
theorem hausdorffMeasure_image (e : X ≃ᵢ Y) (d : ℝ) (s : Set X) : μH[d] (e '' s) = μH[d] s

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
[MeasurableSpace X]
[BorelSpace X]
[MeasurableSpace Y]
[BorelSpace Y]
(e : X ≃ᵢ Y)
(d : ℝ)
(s : Set X)


/-- For `A` positive semidefinite, we have `x⋆ A x = 0` iff `A x = 0` (linear maps version). -/
theorem PosSemidef.toLinearMap₂'_zero_iff [DecidableEq n]
    {A : Matrix n n 𝕜} (hA : PosSemidef A) (x : n → 𝕜) :
    Matrix.toLinearMap₂' 𝕜 A (star x) x = 0 ↔ Matrix.toLin' A x = 0

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

(((Matrix.toLinearMap₂' 𝕜) A) (star x)) x = 0 ↔ (Matrix.toLin' A) x = 0


/-- Equivalence of categories is reflexive. -/
@[refl, simps]
def refl : C ≌ C

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

CategoryTheory.Equivalence.refl.counitIso =
  CategoryTheory.Iso.refl ((CategoryTheory.Functor.id C).comp (CategoryTheory.Functor.id C))


@[to_additive]
theorem mul_left_cancel : a * b = a * c → b = c

{G : Type u_1}
[Mul G]
[IsLeftCancelMul G]
{a b c : G}


theorem mono_left (h : QuasiMeasurePreserving f μa μb) (ha : μa' ≪ μa) :
    QuasiMeasurePreserving f μa' μb

(h : MeasureTheory.Measure.QuasiMeasurePreserving f μa μb)

MeasureTheory.Measure.QuasiMeasurePreserving f μa' μb


@[to_additive zsmul_mono_right]
lemma zpow_mono_left (hn : 0 ≤ n) : Monotone ((· ^ n) : α → α)

(α : Type u_1)
[OrderedAddCommGroup α]
{n : ℤ}
(hn : 0 ≤ n)


theorem degree_quadratic_lt : degree (C a * X ^ 2 + C b * X + C c) < 3

(Polynomial.C a * Polynomial.X ^ 2 + Polynomial.C b * Polynomial.X + Polynomial.C c).degree < 3


@[simp]
theorem append_nil (s : WSeq α) : append s nil = s


theorem fderivWithin_zero_of_isolated (h : 𝓝[s \ {x}] x = ⊥) : fderivWithin 𝕜 f s x = 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s : Set E}
(h : 𝓝[s \ {x}] x = ⊥)


theorem iInf_of_not_bddBelow {α : Sort*} {f : α → ℝ} (hf : ¬BddBelow (Set.range f)) :
    ⨅ i, f i = 0

{α : Sort u_1}
{f : α → ℝ}
(hf : ¬BddBelow (Set.range f))


theorem sSup_le_sSup_of_forall_exists_le (h : ∀ x ∈ s, ∃ y ∈ t, x ≤ y) : sSup s ≤ sSup t

{α : Type u_1}
[CompleteSemilatticeSup α]
{s t : Set α}
(h : ∀ x ∈ s, ∃ y ∈ t, x ≤ y)


@[simp] theorem norm_equiv_symm (f : ∀ i, β i) : ‖(WithLp.equiv ⊤ _).symm f‖ = ‖f‖

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

‖(WithLp.equiv ⊤ ((i : ι) → β i)).symm f‖ = ‖f‖


/-- Dilations scale the diameter by `ratio f` in pseudoemetric spaces. -/
theorem ediam_image (s : Set α) : EMetric.diam ((f : α → β) '' s) = ratio f * EMetric.diam s

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)
(s : Set α)

EMetric.diam (⇑f '' s) = ↑(Dilation.ratio f) * EMetric.diam s


/-- A Besicovitch tau-package is a family of balls in a metric space with positive bounded radii,
together with enough data to proceed with the Besicovitch greedy algorithm. We register this in
a single structure to make sure that all our constructions in this algorithm only depend on
one variable. -/
structure TauPackage (β : Type*) (α : Type*) extends BallPackage β α where
  τ : ℝ
  one_lt_tau : 1 < τ

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


private lemma toAffine_negAddY_of_ne {P Q : Fin 3 → F} {n d : F} (hPz : P z ≠ 0) (hQz : Q z ≠ 0)
    (hd : d ≠ 0) :
    W.toAffine.negAddY (P x / P z ^ 2) (Q x / Q z ^ 2) (P y / P z ^ 3) (n / (P z * Q z * d)) =
      (n * (n ^ 2 + W.a₁ * n * P z * Q z * d - W.a₂ * P z ^ 2 * Q z ^ 2 * d ^ 2
          - P x * Q z ^ 2 * d ^ 2 - Q x * P z ^ 2 * d ^ 2 - P x * Q z ^ 2 * d ^ 2)
        + P y * Q z ^ 3 * d ^ 3) / (P z * Q z * d) ^ 3

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P Q : Fin 3 → F}
{n d : F}
(hPz : P z ≠ 0)
(hQz : Q z ≠ 0)
(hd : d ≠ 0)


theorem antideriv_sin_comp_const_mul (hz : z ≠ 0) (x : ℝ) :
    HasDerivAt (fun y : ℝ => -Complex.cos (2 * z * y) / (2 * z)) (Complex.sin (2 * z * x)) x

HasDerivAt (fun y => -Complex.cos (2 * z * ↑y) / (2 * z)) (Complex.sin (2 * z * ↑x)) x


/-- A version of `UniformOnFun.hasBasis_nhds_of_basis`
with weaker conclusion and weaker assumptions.

We make no assumptions about the set `𝔖`
but conclude only that the neighbourhoods filter is equal to some indexed infimum. -/
protected theorem nhds_eq_of_basis {ι : Sort*} {p : ι → Prop} {V : ι → Set (β × β)}
    (h : (𝓤 β).HasBasis p V) (f : α →ᵤ[𝔖] β) :
    𝓝 f = ⨅ s ∈ 𝔖, ⨅ (i) (_ : p i), 𝓟 {g | ∀ x ∈ s, (toFun 𝔖 f x, toFun 𝔖 g x) ∈ V i}

{α : Type u_1}
(β : Type u_2)
[UniformSpace β]
(𝔖 : Set (Set α))
{ι : Sort u_5}
{p : ι → Prop}
{V : ι → Set (β × β)}
(h : (𝓤 β).HasBasis p V)
(f : α →ᵤ[𝔖] β)

𝓝 f = ⨅ s ∈ 𝔖, ⨅ i, ⨅ (_ : p i), 𝓟 {g | ∀ x ∈ s, ((UniformOnFun.toFun 𝔖) f x, (UniformOnFun.toFun 𝔖) g x) ∈ V i}


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
lemma nonempty_Ici : (Ici a).Nonempty

{α : Type u_2}
[Preorder α]
{a : α}
[LocallyFiniteOrderTop α]


structure Subarray (α : Type u)  where
  array : Array α
  start : Nat
  stop : Nat
  start_le_stop : start ≤ stop
  stop_le_array_size : stop ≤ array.size


@[simp]
lemma toMvPolynomial_constantCoeff (f : M₁ →ₗ[R] M₂) (i : ι₂) :
    constantCoeff (f.toMvPolynomial b₁ b₂ i) = 0

{R : Type u_1}
{M₁ : Type u_2}
{M₂ : Type u_3}
{ι₁ : Type u_4}
{ι₂ : Type u_5}
[CommRing R]
[AddCommGroup M₁]
[AddCommGroup M₂]
[Module R M₁]
[Module R M₂]
[Fintype ι₁]
[Finite ι₂]
[DecidableEq ι₁]
(b₁ : Basis ι₁ R M₁)
(b₂ : Basis ι₂ R M₂)
(f : M₁ →ₗ[R] M₂)
(i : ι₂)

MvPolynomial.constantCoeff (LinearMap.toMvPolynomial b₁ b₂ f i) = 0


theorem Integrable.abs {β} [NormedLatticeAddCommGroup β] {f : α → β} (hf : Integrable f μ) :
    Integrable (fun a => |f a|) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_5}
[NormedLatticeAddCommGroup β]
{f : α → β}
(hf : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun a => |f a|) μ


theorem Nullhomotopic.comp_left {f : C(Y, Z)} (hf : f.Nullhomotopic) (g : C(X, Y)) :
    (f.comp g).Nullhomotopic

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : C(Y, Z)}
(hf : f.Nullhomotopic)
(g : C(X, Y))


/-- This holds in general for epimorphisms. -/
theorem of_isLocalization : FormallyUnramified R Rₘ

{R Rₘ : Type u}
[CommRing R]
[CommRing Rₘ]
(M : Submonoid R)
[Algebra R Rₘ]
[IsLocalization M Rₘ]


theorem aecover_Ioo_of_Ico : AECover (μ.restrict <| Ioo A B) l fun i => Ico (a i) (b i)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[OpensMeasurableSpace α]
{a b : ι → α}
{A B : α}
(ha : Filter.Tendsto a l (𝓝 A))
(hb : Filter.Tendsto b l (𝓝 B))

MeasureTheory.AECover (μ.restrict (Set.Ioo A B)) l fun i => Set.Ico (a i) (b i)


theorem dvd_term_of_isRoot_of_dvd_terms {r p : S} {f : S[X]} (i : ℕ) (hr : f.IsRoot r)
    (h : ∀ j ≠ i, p ∣ f.coeff j * r ^ j) : p ∣ f.coeff i * r ^ i

(h : ∀ (j : ℕ), j ≠ i → p ∣ f.coeff j * r ^ j)


theorem derivative_pow_succ (p : R[X]) (n : ℕ) :
    derivative (p ^ (n + 1)) = C (n + 1 : R) * p ^ n * derivative p

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

Polynomial.derivative (p ^ (n + 1)) = Polynomial.C (↑n + 1) * p ^ n * Polynomial.derivative p


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

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
(x y : F)


/-- The category of multiforks is equivalent to the category of forks over `∏ᶜ I.left ⇉ ∏ᶜ I.right`.
It then follows from `CategoryTheory.IsLimit.ofPreservesConeTerminal` (or `reflects`) that it
preserves and reflects limit cones.
-/
@[simps]
noncomputable def multiforkEquivPiFork : Multifork I ≌ Fork I.fstPiMap I.sndPiMap

(I : CategoryTheory.Limits.MulticospanIndex C)

I.multiforkEquivPiFork.unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun K =>
      CategoryTheory.Limits.Cones.ext
        (CategoryTheory.Iso.refl ((CategoryTheory.Functor.id (CategoryTheory.Limits.Multifork I)).obj K).pt) ⋯)
    ⋯


@[simp]
theorem map_apply (hf : Measurable f) {s : Set β} (hs : MeasurableSet s) :
    μ.map f s = μ (f ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{f : α → β}
(hf : Measurable f)
{s : Set β}
(hs : MeasurableSet s)

(MeasureTheory.Measure.map f μ) s = μ (f ⁻¹' s)


theorem normalize_coe_nat (n : ℕ) : normalize (n : ℤ) = n


/-- The product of the composition of functions `f` and `g`, is the product over `b ∈ s.image g` of
`f b` to the power of the cardinality of the fibre of `b`. See also `Finset.prod_image`. -/
@[to_additive "The sum of the composition of functions `f` and `g`, is the sum over `b ∈ s.image g`
of `f b` times of the cardinality of the fibre of `b`. See also `Finset.sum_image`."]
theorem prod_comp [DecidableEq γ] (f : γ → β) (g : α → γ) :
    ∏ a ∈ s, f (g a) = ∏ b ∈ s.image g, f b ^ (s.filter fun a => g a = b).card

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
{s : Finset α}
[CommMonoid β]
[DecidableEq γ]
(f : γ → β)
(g : α → γ)

∏ a ∈ s, f (g a) = ∏ b ∈ Finset.image g s, f b ^ (Finset.filter (fun a => g a = b) s).card


theorem derivation_eq_zero_of_forall_mem_vars {D : Derivation R (MvPolynomial σ R) A}
    {f : MvPolynomial σ R} (h : ∀ i ∈ f.vars, D (X i) = 0) : D f = 0

(h : ∀ i ∈ f.vars, D (MvPolynomial.X i) = 0)


@[simp] theorem smul_re : (s • a).re = s • a.re

{S : Type u_1}
{R : Type u_3}
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])
[SMul S R]
(s : S)


/-- **Removable singularity** theorem: if `s` is a neighborhood of `c : ℂ`, a function `f : ℂ → E`
is complex differentiable and is bounded on `s \ {c}`, then `f` redefined to be equal to
`limUnder (𝓝[≠] c) f` at `c` is complex differentiable on `s`. -/
theorem differentiableOn_update_limUnder_of_bddAbove {f : ℂ → E} {s : Set ℂ} {c : ℂ} (hc : s ∈ 𝓝 c)
    (hd : DifferentiableOn ℂ f (s \ {c})) (hb : BddAbove (norm ∘ f '' (s \ {c}))) :
    DifferentiableOn ℂ (update f c (limUnder (𝓝[≠] c) f)) s

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[CompleteSpace E]
{f : ℂ → E}
{s : Set ℂ}
{c : ℂ}
(hc : s ∈ 𝓝 c)
(hd : DifferentiableOn ℂ f (s \ {c}))
(hb : BddAbove (norm ∘ f '' (s \ {c})))

DifferentiableOn ℂ (Function.update f c (limUnder (𝓝[≠] c) f)) s


theorem foldr_loop_succ (f : Fin n → α → α) (x) (h : m < n) :
    foldr.loop n f ⟨m+1, h⟩ x = foldr.loop n f ⟨m, Nat.le_of_lt h⟩ (f ⟨m, h⟩ x)

{n : Nat}
{α : Sort u_1}
{m : Nat}
(f : Fin n → α → α)
(x : α)
(h : m < n)

Fin.foldr.loop n f ⟨m + 1, h⟩ x = Fin.foldr.loop n f ⟨m, ⋯⟩ (f ⟨m, h⟩ x)


protected theorem StrictAnti.comp_strictAntiOn (hg : StrictAnti g) (hf : StrictAntiOn f s) :
    StrictMonoOn (g ∘ f) s

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder α]
[Preorder β]
[Preorder γ]
{g : β → γ}
{f : α → β}
{s : Set α}
(hg : StrictAnti g)
(hf : StrictAntiOn f s)


/-- If `n` is a Fermat pseudoprime to base `b`, then `n` is coprime with `b`, assuming that `b` is
positive.

This lemma is a small wrapper based on `coprime_of_probablePrime`
-/
theorem coprime_of_fermatPsp {n b : ℕ} (h : FermatPsp n b) (h₁ : 1 ≤ b) : Nat.Coprime n b

{n b : ℕ}
(h : n.FermatPsp b)
(h₁ : 1 ≤ b)


@[simp]
theorem codRestrict_apply (p : L.Substructure N) (f : M ↪[L] N) {h} (x : M) :
    (codRestrict p f h x : N) = f x

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(p : L.Substructure N)
(f : L.Embedding M N)
{h : ∀ (c : M), f c ∈ p}
(x : M)

↑((FirstOrder.Language.Embedding.codRestrict p f h) x) = f x


@[continuity]
theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x


lemma isLocallyInjective (hf : IsLocalHomeomorph f) : IsLocallyInjective f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : IsLocalHomeomorph f)


theorem derivedSeriesOfIdeal_le_self (k : ℕ) : D k I ≤ I

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)
(k : ℕ)

LieAlgebra.derivedSeriesOfIdeal R L k I ≤ I


@[to_additive]
theorem prod_univ_add {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin (a + b) → M) :
    (∏ i : Fin (a + b), f i) = (∏ i : Fin a, f (castAdd b i)) * ∏ i : Fin b, f (natAdd a i)

{M : Type u_3}
[CommMonoid M]
{a b : ℕ}
(f : Fin (a + b) → M)

∏ i : Fin (a + b), f i = (∏ i : Fin a, f (Fin.castAdd b i)) * ∏ i : Fin b, f (Fin.natAdd a i)


@[reassoc (attr := simp)]
lemma p_opcyclesMap : K.pOpcycles i ≫ opcyclesMap φ i = φ.f i ≫ L.pOpcycles i

K.pOpcycles i ≫ HomologicalComplex.opcyclesMap φ i = φ.f i ≫ L.pOpcycles i


theorem mem_basicOpen_den (x : ProjectiveSpectrum.top 𝒜)
    (f : HomogeneousLocalization.NumDenSameDeg 𝒜 x.asHomogeneousIdeal.toIdeal.primeCompl) :
    x ∈ ProjectiveSpectrum.basicOpen 𝒜 f.den

x ∈ ProjectiveSpectrum.basicOpen 𝒜 ↑f.den


theorem Decidable.not_and_not_right [Decidable b] : ¬(a ∧ ¬b) ↔ (a → b)


@[simp]
theorem LinearMap.toContinuousLinearMap₁_coe (f : 𝕜 →ₗ[𝕜] E) :
    (f.toContinuousLinearMap₁ : 𝕜 →ₗ[𝕜] E) = f

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
(f : 𝕜 →ₗ[𝕜] E)


lemma eq_top_pullback {X Y : C} {S T : Sieve X} (h : S ≤ T) (f : Y ⟶ X) (hf : S f) :
    T.pullback f = ⊤

{C : Type u_2}
[CategoryTheory.Category.{u_1, u_2} C]
{X Y : C}
{S T : CategoryTheory.Sieve X}
(h : S ≤ T)
(f : Y ⟶ X)
(hf : S.arrows f)


/-- `∧` distributes over `∨` (on the right). -/
theorem or_and_right : (a ∨ b) ∧ c ↔ (a ∧ c) ∨ (b ∧ c)


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

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)
(s : Set A)
(hs : s = ↑S)


@[simp]
theorem dropn_nil (n) : drop (nil : WSeq α) n = nil

Stream'.WSeq.nil.drop n = Stream'.WSeq.nil


@[simp, norm_cast]
theorem toConvexCone_positive : ↑(positive 𝕜 E) = ConvexCone.positive 𝕜 E

(𝕜 : Type u_1)
(E : Type u_2)
[OrderedSemiring 𝕜]
[OrderedAddCommGroup E]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]

↑(PointedCone.positive 𝕜 E) = ConvexCone.positive 𝕜 E


@[simp]
theorem intrinsicClosure_diff_intrinsicInterior (s : Set P) :
    intrinsicClosure 𝕜 s \ intrinsicInterior 𝕜 s = intrinsicFrontier 𝕜 s

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_5}
[Ring 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
[TopologicalSpace P]
[AddTorsor V P]
(s : Set P)


@[to_additive]
theorem topologicalGroup_inf {t₁ t₂ : TopologicalSpace G} (h₁ : @TopologicalGroup G t₁ _)
    (h₂ : @TopologicalGroup G t₂ _) : @TopologicalGroup G (t₁ ⊓ t₂) _

{G : Type w}
[AddGroup G]
{t₁ t₂ : TopologicalSpace G}
(h₁ : TopologicalAddGroup G)
(h₂ : TopologicalAddGroup G)


theorem mem_closedBall_comm : x ∈ closedBall y ε ↔ y ∈ closedBall x ε

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε : ℝ}

x ∈ Metric.closedBall y ε ↔ y ∈ Metric.closedBall x ε


theorem LE.le.exists_succ_iterate (h : a ≤ b) : ∃ n, succ^[n] a = b

{α : Type u_1}
[Preorder α]
[SuccOrder α]
[IsSuccArchimedean α]
{a b : α}
(h : a ≤ b)


theorem length_toList_pos_of_mem_support (h : x ∈ p.support) : 0 < length (toList p x)

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(p : Equiv.Perm α)
(x : α)
(h : x ∈ p.support)


/-- This technical lemma asserts the existence of a polynomial `p` in an ideal `P ⊂ R[x]`
that is non-zero in the quotient `R / (P ∩ R) [x]`.  The assumptions are equivalent to
`P ≠ 0` and `P ∩ R = (0)`.
-/
theorem exists_nonzero_mem_of_ne_bot {P : Ideal R[X]} (Pb : P ≠ ⊥) (hP : ∀ x : R, C x ∈ P → x = 0) :
    ∃ p : R[X], p ∈ P ∧ Polynomial.map (Quotient.mk (P.comap (C : R →+* R[X]))) p ≠ 0

(hP : ∀ (x : R), Polynomial.C x ∈ P → x = 0)

∃ p ∈ P, Polynomial.map (Ideal.Quotient.mk (Ideal.comap Polynomial.C P)) p ≠ 0


/-- An endomorphism of a finite-dimensional vector space has a finite spectrum. -/
theorem Module.End.finite_spectrum {K : Type v} {V : Type w} [Field K] [AddCommGroup V]
    [Module K V] [FiniteDimensional K V] (f : Module.End K V) :
    Set.Finite (spectrum K f)


/-- If a map `f` has a contracting iterate `f^[n]`, then the fixed point of `f^[n]` is also a fixed
point of `f`. -/
theorem isFixedPt_fixedPoint_iterate {n : ℕ} (hf : ContractingWith K f^[n]) :
    IsFixedPt f (hf.fixedPoint f^[n])

{α : Type u_1}
[MetricSpace α]
{K : ℝ≥0}
{f : α → α}
[Nonempty α]
[CompleteSpace α]
{n : ℕ}
(hf : ContractingWith K f^[n])

Function.IsFixedPt f (ContractingWith.fixedPoint f^[n] hf)


theorem get?_enum (l : List α) (n) : get? (enum l) n = (get? l n).map fun a => (n, a)

l.enum.get? n = Option.map (fun a => (n, a)) (l.get? n)


@[simp]
theorem map_inv_lt_iff (f : F) {a : α} {b : β} : EquivLike.inv f b < a ↔ b < f a

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[EquivLike F α β]
[OrderIsoClass F α β]
(f : F)
{a : α}
{b : β}


@[to_additive exists_pos_norm_le]
lemma Bornology.IsBounded.exists_pos_norm_le' (hs : IsBounded s) : ∃ R > 0, ∀ x ∈ s, ‖x‖ ≤ R

{E : Type u_3}
[SeminormedAddGroup E]
{s : Set E}
(hs : Bornology.IsBounded s)


theorem unitization_range : (unitization s).range = StarAlgebra.adjoin R s

{R : Type u_1}
{S : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[SetLike S A]
[hSA : NonUnitalSubsemiringClass S A]
[hSRA : SMulMemClass S R A]
[StarMemClass S A]
(s : S)

(NonUnitalStarSubalgebra.unitization s).range = StarAlgebra.adjoin R ↑s


@[to_additive]
theorem exists_multiset_of_mem_closure {M : Type*} [CommMonoid M] {s : Set M} {x : M}
    (hx : x ∈ closure s) : ∃ l : Multiset M, (∀ y ∈ l, y ∈ s) ∧ l.prod = x

{M : Type u_4}
[CommMonoid M]
{s : Set M}
{x : M}
(hx : x ∈ Submonoid.closure s)


/-- A set is analytic if and only if it is the continuous image of some Polish space. -/
theorem analyticSet_iff_exists_polishSpace_range {s : Set α} :
    AnalyticSet s ↔
      ∃ (β : Type) (h : TopologicalSpace β) (_ : @PolishSpace β h) (f : β → α),
        @Continuous _ _ h _ f ∧ range f = s

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

MeasureTheory.AnalyticSet s ↔ ∃ β h, ∃ (_ : PolishSpace β), ∃ f, Continuous f ∧ Set.range f = s


theorem separableSpace_range_union_singleton {_ : MeasurableSpace α} [TopologicalSpace β]
    [PseudoMetrizableSpace β] (hf : StronglyMeasurable f) {b : β} :
    SeparableSpace (range f ∪ {b} : Set β)

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

∀ {x : MeasurableSpace α} [inst : TopologicalSpace β] [inst_1 : TopologicalSpace.PseudoMetrizableSpace β],
  MeasureTheory.StronglyMeasurable f → ∀ {b : β}, TopologicalSpace.SeparableSpace ↑(Set.range f ∪ {b})


theorem smul_restrictScalars {R S M} [CommSemiring R] [CommSemiring S]
    [Algebra R S] [AddCommMonoid M] [Module R M] [Module S M]
    [IsScalarTower R S M] (I : Ideal R) (N : Submodule S M) :
    (I.map (algebraMap R S) • N).restrictScalars R = I • N.restrictScalars R

{R : Type u_4}
{S : Type u_5}
{M : Type u_6}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[AddCommMonoid M]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(I : Ideal R)
(N : Submodule S M)

Submodule.restrictScalars R (Ideal.map (algebraMap R S) I • N) = I • Submodule.restrictScalars R N


theorem Int.exists_prime_and_dvd {n : ℤ} (hn : n.natAbs ≠ 1) : ∃ p, Prime p ∧ p ∣ n


@[simp]
theorem comap_id : comap (RingHom.id R) = ContinuousMap.id _

PrimeSpectrum.comap (RingHom.id R) = ContinuousMap.id (PrimeSpectrum R)


theorem pred_iterate (a : ℤ) : ∀ n, pred^[n] a = a - n


theorem Indep.basis_self (h : M.Indep I) : M.Basis I I

{α : Type u_1}
{M : Matroid α}
{I : Set α}
(h : M.Indep I)


@[simp]
theorem re_neg (z : 𝔻) : (-z).re = -z.re


@[to_additive]
theorem mono {f' : α → γ} (hf : HasCompactMulSupport f)
    (hff' : mulSupport f' ⊆ mulSupport f) : HasCompactMulSupport f'

(hff' : Function.support f' ⊆ Function.support f)


@[simp]
theorem support_neg [∀ i, AddGroup (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)] {f : Π₀ i, β i} :
    support (-f) = support f

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


theorem measurableSet_min_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω) {i : ι} :
    MeasurableSet[(hτ.min_const i).measurableSpace] s ↔
      MeasurableSet[hτ.measurableSpace] s ∧ MeasurableSet[f i] s

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

MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s


theorem perm_insertionSort : ∀ l : List α, insertionSort r l ~ l

{α : Type u}
(r : α → α → Prop)
[DecidableRel r]
(l : List α)


/-- If `Irreducible (cyclotomic (2 ^ k) K)` (in particular for `K = ℚ`) and `k` is at least `2`,
then the norm of `ζ - 1` is `2`. -/
theorem norm_sub_one_two {k : ℕ} (hζ : IsPrimitiveRoot ζ (2 ^ k)) (hk : 2 ≤ k)
    [H : IsCyclotomicExtension {(2 : ℕ+) ^ k} K L] (hirr : Irreducible (cyclotomic (2 ^ k) K)) :
    norm K (ζ - 1) = 2

(hirr : Irreducible (Polynomial.cyclotomic (2 ^ k) K))


theorem Filter.coLindelof_neBot_iff : NeBot (Filter.coLindelof X) ↔ NonLindelofSpace X

(Filter.coLindelof X).NeBot ↔ NonLindelofSpace X


theorem comp_differentiableAt_iff {f : G → E} {x : G} :
    DifferentiableAt 𝕜 (iso ∘ f) x ↔ DifferentiableAt 𝕜 f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(iso : E ≃ₗᵢ[𝕜] F)
{f : G → E}
{x : G}

DifferentiableAt 𝕜 (⇑iso ∘ f) x ↔ DifferentiableAt 𝕜 f x


theorem dot_set_left (xs ys : Coeffs) (i : Nat) (z : Int) :
    dot (set xs i z) ys = dot xs ys + (z - get xs i) * get ys i

(xs ys : Lean.Omega.Coeffs)
(i : Nat)
(z : Int)

(xs.set i z).dot ys = xs.dot ys + (z - xs.get i) * ys.get i


/-- The angle between a positive multiple of a vector and a vector. -/
@[simp]
theorem angle_smul_left_of_pos (x y : V) {r : ℝ} (hr : 0 < r) : angle (r • x) y = angle x y

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
(x y : V)
{r : ℝ}
(hr : 0 < r)

InnerProductGeometry.angle (r • x) y = InnerProductGeometry.angle x y


theorem reachable_iff_reflTransGen (u v : V) :
    G.Reachable u v ↔ Relation.ReflTransGen G.Adj u v

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


lemma shift_unop_opShiftFunctorEquivalence_counitIso_inv_app (X : Cᵒᵖ) (n : ℤ) :
    ((opShiftFunctorEquivalence C n).counitIso.inv.app X).unop⟦n⟧' =
      ((opShiftFunctorEquivalence C n).unitIso.hom.app ((Opposite.op ((X.unop)⟦n⟧)))).unop

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.HasShift C ℤ]
(X : Cᵒᵖ)
(n : ℤ)

(CategoryTheory.shiftFunctor C n).map
    ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).counitIso.inv.app X).unop =
  ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).unitIso.hom.app
      (Opposite.op ((CategoryTheory.shiftFunctor C n).obj (Opposite.unop X)))).unop


@[simp]
theorem Complex.coe_orthonormalBasisOneI :
    (Complex.orthonormalBasisOneI : Fin 2 → ℂ) = ![1, I]

⇑Complex.orthonormalBasisOneI = ![1, Complex.I]


/-- **Jensen's inequality**: if a function `g : E → ℝ` is convex and continuous on a convex closed
set `s`, `μ` is a finite non-zero measure on `α`, and `f : α → E` is a function sending
`μ`-a.e. points to `s`, then the value of `g` at the average value of `f` is less than or equal to
the average value of `g ∘ f` provided that both `f` and `g ∘ f` are integrable. See also
`ConvexOn.map_centerMass_le` for a finite sum version of this lemma. -/
theorem ConvexOn.map_average_le [IsFiniteMeasure μ] [NeZero μ]
    (hg : ConvexOn ℝ s g) (hgc : ContinuousOn g s) (hsc : IsClosed s)
    (hfs : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) (hgi : Integrable (g ∘ f) μ) :
    g (⨍ x, f x ∂μ) ≤ ⨍ x, g (f x) ∂μ

(hgi : MeasureTheory.Integrable (g ∘ f) μ)

g (⨍ (x : α), f x ∂μ) ≤ ⨍ (x : α), g (f x) ∂μ


theorem lt_of_mul_lt_mul_of_nonpos_right [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (h : a * c < b * c) (hc : c ≤ 0) : b < a

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

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


/-- Composition with a linear isometry equiv on the left preserves the norm of the iterated
derivative. -/
theorem LinearIsometryEquiv.norm_iteratedFDeriv_comp_left (g : F ≃ₗᵢ[𝕜] G) (f : E → F) (x : E)
    (i : ℕ) : ‖iteratedFDeriv 𝕜 i (g ∘ f) x‖ = ‖iteratedFDeriv 𝕜 i f x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(g : F ≃ₗᵢ[𝕜] G)
(f : E → F)
(x : E)
(i : ℕ)

‖iteratedFDeriv 𝕜 i (⇑g ∘ f) x‖ = ‖iteratedFDeriv 𝕜 i f x‖


theorem pairwiseDisjoint_range_singleton :
    (range (singleton : ι → Set ι)).PairwiseDisjoint id


theorem Nonempty.right (h : (s ∩ t).Nonempty) : t.Nonempty

{α : Type u}
{s t : Set α}
(h : (s ∩ t).Nonempty)


theorem mem_sSup_of_directedOn {S : Set (Subring R)} (Sne : S.Nonempty) (hS : DirectedOn (· ≤ ·) S)
    {x : R} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

(hS : DirectedOn (fun x x_1 => x ≤ x_1) S)


/-- `Multiset.toDFinsupp` as an `AddEquiv`. -/
@[simps! apply symm_apply]
def equivDFinsupp : Multiset α ≃+ Π₀ _ : α, ℕ

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

Multiset.equivDFinsupp a = Multiset.toDFinsupp a


@[reassoc (attr := simp)]
lemma XIsoOfEq_inv_comp_XIsoOfEq_hom (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι}
    (h₂₁ : p₂ = p₁) (h₂₃ : p₂ = p₃) :
    (K.XIsoOfEq h₂₁).inv ≫ (K.XIsoOfEq h₂₃).hom = (K.XIsoOfEq (h₂₁.symm.trans h₂₃)).hom

(K.XIsoOfEq h₂₁).inv ≫ (K.XIsoOfEq h₂₃).hom = (K.XIsoOfEq ⋯).hom


theorem rTensor_trans : (f ≪≫ₗ g).rTensor M = f.rTensor M ≪≫ₗ g.rTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
{Q : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
(g : P ≃ₗ[R] Q)
(f : N ≃ₗ[R] P)

LinearEquiv.rTensor M (f ≪≫ₗ g) = LinearEquiv.rTensor M f ≪≫ₗ LinearEquiv.rTensor M g


/--
`TopCat.toLightCondSet` yields a functor from `TopCat.{u}` to `LightCondSet.{u}`.
-/
@[simps]
noncomputable def topCatToLightCondSet : TopCat.{u} ⥤ LightCondSet.{u}

topCatToLightCondSet.obj X = X.toLightCondSet


@[simp]
theorem spanCompIso_app_left : (spanCompIso F f g).app WalkingSpan.left = Iso.refl _

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

(CategoryTheory.Limits.spanCompIso F f g).app CategoryTheory.Limits.WalkingSpan.left =
  CategoryTheory.Iso.refl ((CategoryTheory.Limits.span f g ⋙ F).obj CategoryTheory.Limits.WalkingSpan.left)


@[reassoc]
lemma mapMap_D₁ (i₁₂ i₁₂' : I₁₂) :
    GradedObject.mapMap (toGradedObjectMap φ) _ i₁₂ ≫ L.D₁ c₁₂ i₁₂ i₁₂' =
      K.D₁ c₁₂ i₁₂ i₁₂' ≫ GradedObject.mapMap (toGradedObjectMap φ) _ i₁₂'

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
{K L : HomologicalComplex₂ C c₁ c₂}
(φ : K ⟶ L)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
[L.HasTotal c₁₂]
(i₁₂ i₁₂' : I₁₂)

CategoryTheory.GradedObject.mapMap (HomologicalComplex₂.toGradedObjectMap φ) (c₁.π c₂ c₁₂) i₁₂ ≫ L.D₁ c₁₂ i₁₂ i₁₂' =
  K.D₁ c₁₂ i₁₂ i₁₂' ≫ CategoryTheory.GradedObject.mapMap (HomologicalComplex₂.toGradedObjectMap φ) (c₁.π c₂ c₁₂) i₁₂'


@[simp] lemma subperm_singleton_iff : l <+~ [a] ↔ l = [] ∨ l = [a]


/-- The length of the list to which a vector of length `n` maps is `n`. -/
@[simp]
theorem toList_length (v : Vector α n) : (toList v).length = n

{α : Type u}
{n : ℕ}
(v : Mathlib.Vector α n)


lemma add_left_iff {μ₁ μ₂ ν : Measure α} :
    μ₁ + μ₂ ≪ ν ↔ μ₁ ≪ ν ∧ μ₂ ≪ ν

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ₁ μ₂ ν : MeasureTheory.Measure α}

(μ₁ + μ₂).AbsolutelyContinuous ν ↔ μ₁.AbsolutelyContinuous ν ∧ μ₂.AbsolutelyContinuous ν


@[simp]
theorem isOrtho_orthogonal_left (U : Submodule 𝕜 E) : Uᗮ ⟂ U

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(U : Submodule 𝕜 E)


lemma IsHermitian.posSemidef_of_eigenvalues_nonneg [DecidableEq n] {A : Matrix n n 𝕜}
    (hA : IsHermitian A) (h : ∀ i : n, 0 ≤ hA.eigenvalues i) : PosSemidef A

{n : Type u_2}
{𝕜 : Type u_4}
[Fintype n]
[RCLike 𝕜]
[DecidableEq n]
{A : Matrix n n 𝕜}
(hA : A.IsHermitian)
(h : ∀ (i : n), 0 ≤ hA.eigenvalues i)


/-- Converse of "angles in same segment are equal" and "opposite angles of a cyclic quadrilateral
add to π", for oriented angles mod π, with a "cospherical or collinear" conclusion. -/
theorem cospherical_or_collinear_of_two_zsmul_oangle_eq {p₁ p₂ p₃ p₄ : P}
    (h : (2 : ℤ) • ∡ p₁ p₂ p₄ = (2 : ℤ) • ∡ p₁ p₃ p₄) :
    Cospherical ({p₁, p₂, p₃, p₄} : Set P) ∨ Collinear ℝ ({p₁, p₂, p₃, p₄} : Set P)

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

EuclideanGeometry.Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}


@[simp]
theorem toConvexCone_top : (⊤ : Submodule 𝕜 E).toConvexCone = ⊤

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]


theorem log_two_mul_two_le_sqrt_log_eight : log 2 * 2 ≤ √(log 8)


/-- If a function is `C^n`, then its bundled derivative is `C^m` when `m+1 ≤ n`. -/
theorem ContMDiff.contMDiff_tangentMap (hf : ContMDiff I I' n f) (hmn : m + 1 ≤ n) :
    ContMDiff I.tangent I'.tangent m (tangentMap I I' f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[Is : SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[I's : SmoothManifoldWithCorners I' M']
{f : M → M'}
{m n : ℕ∞}
(hf : ContMDiff I I' n f)
(hmn : m + 1 ≤ n)


@[to_additive (attr := simp) MeasureTheory.addFundamentalInterior_vadd]
theorem fundamentalInterior_smul [Group H] [MulAction H α] [SMulCommClass H G α] (g : H) :
    fundamentalInterior G (g • s) = g • fundamentalInterior G s

(G : Type u_1)
{H : Type u_2}
{α : Type u_3}
[AddGroup G]
[AddAction G α]
(s : Set α)
[AddGroup H]
[AddAction H α]
[VAddCommClass H G α]
(g : H)

MeasureTheory.addFundamentalInterior G (g +ᵥ s) = g +ᵥ MeasureTheory.addFundamentalInterior G s


lemma pi_map_piOptionEquivProd {β : Option ι → Type*} [∀ i, MeasurableSpace (β i)]
    (μ : (i : Option ι) → Measure (β i)) [∀ (i : Option ι), SigmaFinite (μ i)] :
    ((Measure.pi fun i ↦ μ (some i)).prod (μ none)).map
      (MeasurableEquiv.piOptionEquivProd β).symm = Measure.pi μ

[(i : Option ι) → MeasurableSpace (β i)]

(μ : (i : Option ι) → MeasureTheory.Measure (β i))

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

MeasureTheory.Measure.map (⇑(MeasurableEquiv.piOptionEquivProd β).symm)
    ((MeasureTheory.Measure.pi fun i => μ (some i)).prod (μ none)) =
  MeasureTheory.Measure.pi μ


theorem tan_add_nat_mul_pi (x : ℝ) (n : ℕ) : tan (x + n * π) = tan x

Real.tan (x + ↑n * Real.pi) = Real.tan x


/-- Type class for additive monoid actions. -/
class AddAction (G : Type*) (P : Type*) [AddMonoid G] extends VAdd G P where
  /-- Zero is a neutral element for `+ᵥ` -/
  protected zero_vadd : ∀ p : P, (0 : G) +ᵥ p = p
  /-- Associativity of `+` and `+ᵥ` -/
  add_vadd : ∀ (g₁ g₂ : G) (p : P), g₁ + g₂ +ᵥ p = g₁ +ᵥ (g₂ +ᵥ p)

{G : Type u_11}
{P : Type u_12}
[AddMonoid G]
[self : AddAction G P]
(p : P)


theorem coeff_mul [DecidableEq σ] (p q : MvPolynomial σ R) (n : σ →₀ ℕ) :
    coeff n (p * q) = ∑ x ∈ Finset.antidiagonal n, coeff x.1 p * coeff x.2 q

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[DecidableEq σ]
(p q : MvPolynomial σ R)
(n : σ →₀ ℕ)

MvPolynomial.coeff n (p * q) = ∑ x ∈ Finset.antidiagonal n, MvPolynomial.coeff x.1 p * MvPolynomial.coeff x.2 q


@[reassoc] theorem associator_hom_snd_fst (X Y Z : C) :
    (α_ X Y Z).hom ≫ prod.snd ≫ prod.fst = prod.fst ≫ prod.snd

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).hom
    (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst) =
  CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.snd


/-- An alternative construction for `FrechetUrysohnSpace`: if sequential convergence implies
convergence, then the space is a Fréchet-Urysohn space. -/
theorem FrechetUrysohnSpace.of_seq_tendsto_imp_tendsto
    (h : ∀ (f : X → Prop) (a : X),
      (∀ u : ℕ → X, Tendsto u atTop (𝓝 a) → Tendsto (f ∘ u) atTop (𝓝 (f a))) → ContinuousAt f a) :
    FrechetUrysohnSpace X

(h :
  ∀ (f : X → Prop) (a : X),
    (∀ (u : ℕ → X), Filter.Tendsto u Filter.atTop (𝓝 a) → Filter.Tendsto (f ∘ u) Filter.atTop (𝓝 (f a))) →
      ContinuousAt f a)


/-- Note that this result is slightly stronger than it might look at first glance: we only assume
that `N` is trivial over `I` rather than all of `L`. This means that it applies in the important
case of an Abelian ideal (which has `M = L` and `N = I`). -/
lemma traceForm_eq_zero_of_isTrivial [LieModule.IsTrivial I N] :
    trace R M (φ x ∘ₗ φ y) = 0

{R : Type u_1}
{L : Type u_3}
{M : Type u_4}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[Module.Free R M]
[Module.Finite R M]
[IsDomain R]
[IsPrincipalIdealRing R]
(N : LieSubmodule R L M)
(I : LieIdeal R L)
(h : I ≤ N.idealizer)
(x : L)
{y : L}
(hy : y ∈ I)
[LieModule.IsTrivial ↥↑I ↥↑N]


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

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[PseudoEMetricSpace γ]
{g₁ g₂ : β →ᵈ γ}
{f : α →ᵈ β}
(hf : Function.Surjective ⇑f)


/-- **Integration by parts**. For improper integrals, see
`MeasureTheory.integral_mul_deriv_eq_deriv_mul`,
`MeasureTheory.integral_Ioi_mul_deriv_eq_deriv_mul`,
and `MeasureTheory.integral_Iic_mul_deriv_eq_deriv_mul`. -/
theorem integral_mul_deriv_eq_deriv_mul_of_hasDeriv_right {u v u' v' : ℝ → A}
    (hu : ContinuousOn u [[a, b]])
    (hv : ContinuousOn v [[a, b]])
    (huu' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivWithinAt u (u' x) (Ioi x) x)
    (hvv' : ∀ x ∈ Ioo (min a b) (max a b), HasDerivWithinAt v (v' x) (Ioi x) x)
    (hu' : IntervalIntegrable u' volume a b)
    (hv' : IntervalIntegrable v' volume a b) :
    ∫ x in a..b, u x * v' x = u b * v b - u a * v a - ∫ x in a..b, u' x * v x

(huu' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivWithinAt u (u' x) (Set.Ioi x) x)

(hvv' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivWithinAt v (v' x) (Set.Ioi x) x)

(hu' : IntervalIntegrable u' MeasureTheory.volume a b)

(hv' : IntervalIntegrable v' MeasureTheory.volume a b)

∫ (x : ℝ) in a..b, u x * v' x = u b * v b - u a * v a - ∫ (x : ℝ) in a..b, u' x * v x


/-- If F and G are naturally isomorphic functors, establish an equivalence of hom-sets. -/
@[simps]
def equivHomsetLeftOfNatIso {F F' : C ⥤ D} (iso : F ≅ F') {X : C} {Y : D} :
    (F.obj X ⟶ Y) ≃ (F'.obj X ⟶ Y)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F F' : CategoryTheory.Functor C D}
(iso : F ≅ F')
{X : C}
{Y : D}
(g : F'.obj X ⟶ Y)

(CategoryTheory.Adjunction.equivHomsetLeftOfNatIso iso).symm g = CategoryTheory.CategoryStruct.comp (iso.hom.app X) g


/-- The inclusion of the right factor into the sum of two languages. -/
@[simps]
protected def sumInr : L' →ᴸ L.sum L'

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(_n : ℕ)
(val : L'.Relations _n)

FirstOrder.Language.LHom.sumInr.onRelation val = Sum.inr val


@[simp]
theorem fullMonoidalClosedSubcategory_ihom_obj (X Y : FullSubcategory P) :
    ((ihom X).obj Y).obj = (ihom X.obj).obj Y.obj

(X Y : CategoryTheory.FullSubcategory P)

((CategoryTheory.ihom X).obj Y).obj = (CategoryTheory.ihom X.obj).obj Y.obj


/-- A right homology data for a short complex `S` induces a left homology data for `S.op`. -/
@[simps]
def op (h : S.RightHomologyData) : S.op.LeftHomologyData


theorem factorization_le_factorization_mul_left {a b : ℕ} (hb : b ≠ 0) :
    a.factorization ≤ (a * b).factorization


@[simp]
theorem dotProduct_adjMatrix [NonAssocSemiring α] (v : V) (vec : V → α) :
    dotProduct vec (G.adjMatrix α v) = ∑ u ∈ G.neighborFinset v, vec u

{V : Type u_1}
{α : Type u_2}
(G : SimpleGraph V)
[DecidableRel G.Adj]
[Fintype V]
[NonAssocSemiring α]
(v : V)
(vec : V → α)

vec ⬝ᵥ SimpleGraph.adjMatrix α G v = ∑ u ∈ G.neighborFinset v, vec u


@[simp, norm_cast]
theorem hasSum_ofReal {f : α → ℝ} {x : ℝ} : HasSum (fun x => (f x : 𝕜)) x ↔ HasSum f x

{α : Type u_1}
(𝕜 : Type u_2)
[RCLike 𝕜]
{f : α → ℝ}
{x : ℝ}

HasSum (fun x => ↑(f x)) ↑x ↔ HasSum f x


lemma nonempty_iInter_Iic_iff [Preorder α] {f : ι → α} :
    (⋂ i, Iic (f i)).Nonempty ↔ BddBelow (range f)

{α : Type u_1}
{ι : Sort u_4}
[Preorder α]
{f : ι → α}

(⋂ i, Set.Iic (f i)).Nonempty ↔ BddBelow (Set.range f)


@[simp]
theorem exp_inl (x : R) : exp 𝕜 (inl x : tsze R M) = inl (exp 𝕜 x)

(𝕜 : Type u_1)
{R : Type u_3}
{M : Type u_4}
[Field 𝕜]
[CharZero 𝕜]
[Ring R]
[AddCommGroup M]
[Algebra 𝕜 R]
[Module 𝕜 M]
[Module R M]
[Module Rᵐᵒᵖ M]
[SMulCommClass R Rᵐᵒᵖ M]
[IsScalarTower 𝕜 R M]
[IsScalarTower 𝕜 Rᵐᵒᵖ M]
[TopologicalSpace R]
[TopologicalSpace M]
[TopologicalRing R]
[TopologicalAddGroup M]
[ContinuousSMul R M]
[ContinuousSMul Rᵐᵒᵖ M]
[T2Space R]
[T2Space M]
(x : R)

NormedSpace.exp 𝕜 (TrivSqZeroExt.inl x) = TrivSqZeroExt.inl (NormedSpace.exp 𝕜 x)


@[simp]
theorem vadd_vsub_vadd_cancel_right (v₁ v₂ : G) (p : P) : v₁ +ᵥ p -ᵥ (v₂ +ᵥ p) = v₁ - v₂

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


/-- Convergence a.e. implies convergence in measure in a finite measure space. -/
theorem tendstoInMeasure_of_tendsto_ae [IsFiniteMeasure μ] (hf : ∀ n, AEStronglyMeasurable (f n) μ)
    (hfg : ∀ᵐ x ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))) : TendstoInMeasure μ f atTop g

(hf : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (f n) μ)

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

MeasureTheory.TendstoInMeasure μ f Filter.atTop g


/-- Corollary of the Chinese remainder theorem: given elements `x i : R`,
we can choose a representative `y : R` such that `y - x i ∈ P i ^ e i`. -/
theorem IsDedekindDomain.exists_forall_sub_mem_ideal {ι : Type*} {s : Finset ι} (P : ι → Ideal R)
    (e : ι → ℕ) (prime : ∀ i ∈ s, Prime (P i))
    (coprime : ∀ᵉ (i ∈ s) (j ∈ s), i ≠ j → P i ≠ P j) (x : s → R) :
    ∃ y, ∀ (i) (hi : i ∈ s), y - x ⟨i, hi⟩ ∈ P i ^ e i

(coprime : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → P i ≠ P j)

∃ y, ∀ (i : ι) (hi : i ∈ s), y - x ⟨i, hi⟩ ∈ P i ^ e i


theorem trace_fin_one (A : Matrix (Fin 1) (Fin 1) R) : trace A = A 0 0

{R : Type u_6}
[AddCommMonoid R]
(A : Matrix (Fin 1) (Fin 1) R)


@[simp]
theorem tensorDistrib_tmul (B₁ : BilinForm A M₁) (B₂ : BilinForm R M₂) (m₁ : M₁) (m₂ : M₂)
    (m₁' : M₁) (m₂' : M₂) :
    tensorDistrib R A (B₁ ⊗ₜ B₂) (m₁ ⊗ₜ m₂) (m₁' ⊗ₜ m₂')
      = B₂ m₂ m₂' • B₁ m₁ m₁'

{R : Type uR}
{A : Type uA}
{M₁ : Type uM₁}
{M₂ : Type uM₂}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Algebra R A]
[Module R M₁]
[Module A M₁]
[SMulCommClass R A M₁]
[IsScalarTower R A M₁]
[Module R M₂]
(B₁ : LinearMap.BilinForm A M₁)
(B₂ : LinearMap.BilinForm R M₂)
(m₁ : M₁)
(m₂ : M₂)
(m₁' : M₁)
(m₂' : M₂)

(((LinearMap.BilinMap.tensorDistrib R A) (B₁ ⊗ₜ[R] B₂)) (m₁ ⊗ₜ[R] m₂)) (m₁' ⊗ₜ[R] m₂') = (B₂ m₂) m₂' • (B₁ m₁) m₁'


theorem head!_of_head? [Inhabited α] : ∀ {l : List α}, head? l = some a → head! l = a

{α : Type u_1}
{a : α}
[Inhabited α]
{l : List α}


@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f')

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{η : Type u_5}
{ε : Type u_6}
(e : PartialEquiv α β)
(f : PartialEquiv β γ)
(e' : PartialEquiv δ η)
(f' : PartialEquiv η ε)


theorem Commute.zpow_left {A B : M} (h : Commute A B) (m : ℤ) : Commute (A ^ m) B

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


theorem imageBasicOpen_image_preimage :
    (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' (imageBasicOpen f g U s).1) =
      (imageBasicOpen f g U s).1

{X Y : AlgebraicGeometry.LocallyRingedSpace}

(U : TopologicalSpace.Opens ↑↑(CategoryTheory.Limits.coequalizer f.val g.val).toPresheafedSpace)

(s : ↑((CategoryTheory.Limits.coequalizer f.val g.val).presheaf.obj (Opposite.op U)))

⇑(CategoryTheory.Limits.coequalizer.π f.val g.val).base ⁻¹'
    (⇑(CategoryTheory.Limits.coequalizer.π f.val g.val).base ''
      (AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen f g U s).carrier) =
  (AlgebraicGeometry.LocallyRingedSpace.HasCoequalizer.imageBasicOpen f g U s).carrier


@[to_additive]
theorem mulSupport_comp_eq (g : M → N) (hg : ∀ {x}, g x = 1 ↔ x = 1) (f : α → M) :
    mulSupport (g ∘ f) = mulSupport f

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
[One M]
[One N]
(g : M → N)
(hg : ∀ {x : M}, g x = 1 ↔ x = 1)
(f : α → M)

Function.mulSupport (g ∘ f) = Function.mulSupport f


@[reassoc (attr := simp)]
theorem sndPiMap_π (b) : I.sndPiMap ≫ Pi.π I.right b = Pi.π I.left _ ≫ I.snd b

(I : CategoryTheory.Limits.MulticospanIndex C)

CategoryTheory.CategoryStruct.comp I.sndPiMap (CategoryTheory.Limits.Pi.π I.right b) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Pi.π I.left (I.sndTo b)) (I.snd b)


@[simp] theorem run_mapConst [Monad m] (a : α) (x : ReaderT ρ m β) (ctx : ρ)
    : (Functor.mapConst a x).run ctx = Functor.mapConst a (x.run ctx)

{m : Type u_1 → Type u_2}
{α ρ β : Type u_1}
[Monad m]
(a : α)
(x : ReaderT ρ m β)
(ctx : ρ)


/-- The exponential characteristic is a prime number or one.
See also `CharP.char_is_prime_or_zero`. -/
theorem expChar_is_prime_or_one (q : ℕ) [hq : ExpChar R q] : Nat.Prime q ∨ q = 1

(R : Type u)
[Semiring R]
(q : ℕ)
[hq : ExpChar R q]


theorem zero_lt_orderTop_of_order {x : HahnSeries Γ R} (hx : 0 < x.order) : 0 < x.orderTop

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
[Zero Γ]
{x : HahnSeries Γ R}
(hx : 0 < x.order)


theorem sub_isLimit {a b} (l : IsLimit a) (h : b < a) : IsLimit (a - b)

{a b : Ordinal.{u_4}}
(l : a.IsLimit)
(h : b < a)


@[to_additive]
lemma mem_ofUnits_iff_exists_isUnit (S : Subgroup Mˣ) (x : M) :
    x ∈ S.ofUnits ↔ ∃ h : IsUnit x, h.unit ∈ S

{M : Type u_1}
[Monoid M]
(S : Subgroup Mˣ)
(x : M)

x ∈ S.ofUnits ↔ ∃ (h : IsUnit x), h.unit ∈ S


/-- A submonoid is closed under multiplication. -/
@[to_additive "An `AddSubmonoid` is closed under addition."]
protected theorem mul_mem {x y : M} : x ∈ S → y ∈ S → x * y ∈ S

{M : Type u_1}
[MulOneClass M]
(S : Submonoid M)
{x y : M}


/-- If `K / E / F` is a field extension tower, such that `E / F` is algebraic, then
`E` adjoin `separableClosure F K` is equal to `separableClosure E K`. -/
theorem adjoin_eq_of_isAlgebraic [Algebra.IsAlgebraic F E] :
    adjoin E (separableClosure F K) = separableClosure E K

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(K : Type w)
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]
[Algebra.IsAlgebraic F E]

IntermediateField.adjoin E ↑(separableClosure F K) = separableClosure E K


@[to_additive Summable.nat_add_neg_add_one]
lemma Multipliable.nat_mul_neg_add_one {f : ℤ → M} (hf : Multipliable f) :
    Multipliable (fun n : ℕ ↦ f n * f (-(n + 1)))

{M : Type u_1}
[CommMonoid M]
[TopologicalSpace M]
{f : ℤ → M}
(hf : Multipliable f)

Multipliable fun n => f ↑n * f (-(↑n + 1))


/-- **Fundamental theorem of calculus-1**, strict derivative in right endpoint for a locally finite
measure.

Let `f` be a measurable function integrable on `a..b`. Let `(lb, lb')` be a pair of
`intervalIntegral.FTCFilter`s around `b`. Suppose that `f` has a finite limit `c` at `lb' ⊓ ae μ`.

Then `∫ x in a..v, f x ∂μ - ∫ x in a..u, f x ∂μ = ∫ x in u..v, c ∂μ + o(∫ x in u..v, (1:ℝ) ∂μ)` as
`u` and `v` tend to `lb`.
-/
theorem measure_integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_right
    (hab : IntervalIntegrable f μ a b) (hmeas : StronglyMeasurableAtFilter f lb' μ)
    (hf : Tendsto f (lb' ⊓ ae μ) (𝓝 c)) (hu : Tendsto u lt lb) (hv : Tendsto v lt lb) :
    (fun t => ((∫ x in a..v t, f x ∂μ) - ∫ x in a..u t, f x ∂μ) - ∫ _ in u t..v t, c ∂μ) =o[lt]
      fun t => ∫ _ in u t..v t, (1 : ℝ) ∂μ

(hf : Filter.Tendsto f (lb' ⊓ MeasureTheory.ae μ) (𝓝 c))

(fun t => ∫ (x : ℝ) in a..v t, f x ∂μ - ∫ (x : ℝ) in a..u t, f x ∂μ - ∫ (x : ℝ) in u t..v t, c ∂μ) =o[lt] fun t =>
  ∫ (x : ℝ) in u t..v t, 1 ∂μ


@[simp, rclike_simps]
theorem ofRealAm_coe : (ofRealAm : ℝ → K) = ofReal


@[simp] lemma mk_inf_mk (a b : α) (ha hb) : (⟨a, ha⟩ ⊓ ⟨b, hb⟩ : L) = ⟨a ⊓ b, L.infClosed ha hb⟩

{α : Type u_2}
[Lattice α]
{L : Sublattice α}
(a b : α)
(ha : a ∈ L)
(hb : b ∈ L)


@[to_additive (attr := simp)]
theorem centralizer_univ : centralizer Set.univ = center M

AddSubmonoid.centralizer Set.univ = AddSubmonoid.center M


theorem integral_one_div (h : (0 : ℝ) ∉ [[a, b]]) : ∫ x : ℝ in a..b, 1 / x = log (b / a)

∫ (x : ℝ) in a..b, 1 / x = Real.log (b / a)


theorem Filter.Tendsto.inv_tendsto_zero (h : Tendsto f l (𝓝[>] 0)) : Tendsto f⁻¹ l atTop

{𝕜 : Type u_1}
{α : Type u_2}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{l : Filter α}
{f : α → 𝕜}
(h : Filter.Tendsto f l (𝓝[>] 0))


@[simp]
theorem decode_eq_ofNat (α) [Denumerable α] (n : ℕ) : decode (α := α) n = some (ofNat α n)

Encodable.decode n = some (Denumerable.ofNat α n)


@[norm_cast, simp]
theorem coe_linearMap_comp (f : L₂ →ₗ⁅R⁆ L₃) (g : L₁ →ₗ⁅R⁆ L₂) :
    (f.comp g : L₁ →ₗ[R] L₃) = (f : L₂ →ₗ[R] L₃).comp (g : L₁ →ₗ[R] L₂)

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
{L₃ : Type w₁}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
[LieRing L₂]
[LieAlgebra R L₂]
[LieRing L₃]
[LieAlgebra R L₃]
(f : L₂ →ₗ⁅R⁆ L₃)
(g : L₁ →ₗ⁅R⁆ L₂)


protected theorem mul_assoc : a * b * c = a * (b * c)


@[simp]
theorem coe_reAddGroupHom : (reAddGroupHom : ℂ → ℝ) = re


@[simp]
lemma _root_.absorbs_iUnion {ι : Sort*} [Finite ι] {t : ι → Set α} :
    Absorbs M s (⋃ i, t i) ↔ ∀ i, Absorbs M s (t i)

{M : Type u_1}
{α : Type u_2}
[Bornology M]
[SMul M α]
{s : Set α}
{ι : Sort u_3}
[Finite ι]
{t : ι → Set α}

Absorbs M s (⋃ i, t i) ↔ ∀ (i : ι), Absorbs M s (t i)


@[simp]
theorem mulRight_symm_apply (u : Rˣ) (x : R) : (mulRight u).symm x = x * u⁻¹

{R : Type u_1}
[Semiring R]
(u : Rˣ)
(x : R)

(AddEquiv.symm (AddAut.mulRight u)) x = x * ↑u⁻¹


theorem lsingle_apply (i : ℕ) (m : M) (n : ℕ) : lsingle R i m n = ite (i = n) m 0

(R : Type u_1)
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(i : ℕ)
(m : M)
(n : ℕ)

((PolynomialModule.lsingle R i) m) n = if i = n then m else 0


/-- The complex numbers are not countable. -/
theorem not_countable_complex : ¬(Set.univ : Set ℂ).Countable


protected theorem congr_arg (f : α →𝒄 β) {x y : α} (h : x = y) : f x = f y

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(f : α →𝒄 β)
{x y : α}
(h : x = y)


@[simp]
theorem isMin_ofDual_iff {a : αᵒᵈ} : IsMin (ofDual a) ↔ IsMax a


theorem iInf_extend_top {e : ι → β} (he : Injective e) (f : ι → α) :
    ⨅ j, extend e f ⊤ j = iInf f

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[CompleteLattice α]
{e : ι → β}
(he : Function.Injective e)
(f : ι → α)


lemma log_ofReal_of_pos {x : ℝ} (hx : 0 < x) : log (ENNReal.ofReal x) = Real.log x


/-- **The optional stopping theorem** (fair game theorem): an adapted integrable process `f`
is a submartingale if and only if for all bounded stopping times `τ` and `π` such that `τ ≤ π`, the
stopped value of `f` at `τ` has expectation smaller than its stopped value at `π`. -/
theorem submartingale_iff_expected_stoppedValue_mono [IsFiniteMeasure μ] (hadp : Adapted 𝒢 f)
    (hint : ∀ i, Integrable (f i) μ) :
    Submartingale f 𝒢 μ ↔ ∀ τ π : Ω → ℕ, IsStoppingTime 𝒢 τ → IsStoppingTime 𝒢 π →
      τ ≤ π → (∃ N, ∀ x, π x ≤ N) → μ[stoppedValue f τ] ≤ μ[stoppedValue f π]

{f : ℕ → Ω → ℝ}

(hint : ∀ (i : ℕ), MeasureTheory.Integrable (f i) μ)

MeasureTheory.Submartingale f 𝒢 μ ↔
  ∀ (τ π : Ω → ℕ),
    MeasureTheory.IsStoppingTime 𝒢 τ →
      MeasureTheory.IsStoppingTime 𝒢 π →
        τ ≤ π →
          (∃ N, ∀ (x : Ω), π x ≤ N) →
            ∫ (x : Ω), MeasureTheory.stoppedValue f τ x ∂μ ≤ ∫ (x : Ω), MeasureTheory.stoppedValue f π x ∂μ


@[simp] theorem mul_nil_left : ([] : IntList) * ys = []


@[simp]
lemma rightShift_rightUnshift {a n' : ℤ} (γ : Cochain K (L⟦a⟧) n') (n : ℤ) (hn' : n' + a = n) :
    (γ.rightUnshift n hn').rightShift a n' hn' = γ

(γ : CochainComplex.HomComplex.Cochain K ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj L) n')


/-- The **Lusin separation theorem**: if two analytic sets are disjoint, then they are contained in
disjoint Borel sets. -/
theorem AnalyticSet.measurablySeparable [T2Space α] [MeasurableSpace α] [OpensMeasurableSpace α]
    {s t : Set α} (hs : AnalyticSet s) (ht : AnalyticSet t) (h : Disjoint s t) :
    MeasurablySeparable s t

{α : Type u_1}
[TopologicalSpace α]
[T2Space α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
{s t : Set α}
(hs : MeasureTheory.AnalyticSet s)
(ht : MeasureTheory.AnalyticSet t)
(h : Disjoint s t)


theorem lineCount_eq_pointCount [Finite P] [Finite L] (p : P) (l : L) :
    lineCount L p = pointCount P l

{P : Type u_1}
{L : Type u_2}
[Membership P L]
[Configuration.ProjectivePlane P L]
[Finite P]
[Finite L]
(p : P)
(l : L)

Configuration.lineCount L p = Configuration.pointCount P l


@[simp]
theorem empty_pi (s : ∀ i, Set (α i)) : pi ∅ s = univ

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


/-- Lemma that allows the easy conclusion that perfectly normal spaces are completely normal. -/
theorem Disjoint.hasSeparatingCover_closed_gdelta_right {s t : Set X} [NormalSpace X]
    (st_dis : Disjoint s t) (t_cl : IsClosed t) (t_gd : IsGδ t) : HasSeparatingCover s t

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}
[NormalSpace X]
(st_dis : Disjoint s t)
(t_cl : IsClosed t)
(t_gd : IsGδ t)


/-- Given a tower of fields `L/E/K`, with `E/K` finite, the subgroup `Gal(L/E) ≤ L ≃ₐ[K] L` is
  closed. -/
theorem IntermediateField.fixingSubgroup_isClosed {K L : Type*} [Field K] [Field L] [Algebra K L]
    (E : IntermediateField K L) [FiniteDimensional K E] :
    IsClosed (E.fixingSubgroup : Set (L ≃ₐ[K] L))

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(E : IntermediateField K L)
[FiniteDimensional K ↥E]


protected theorem coe_mul (x y : S) : (↑(x * y) : L) = ↑x * ↑y

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


/-- The canonical isomorphism `S.opcycles ≅ cokernel S.f`. -/
@[simps]
noncomputable def opcyclesIsoCokernel [HasCokernel S.f] : S.opcycles ≅ cokernel S.f

S.opcyclesIsoCokernel.hom = S.descOpcycles (CategoryTheory.Limits.cokernel.π S.f) ⋯


@[to_additive]
theorem map_sup (S T : Submonoid M) (f : F) : (S ⊔ T).map f = S.map f ⊔ T.map f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
(S T : Submonoid M)
(f : F)

Submonoid.map f (S ⊔ T) = Submonoid.map f S ⊔ Submonoid.map f T


theorem nnnorm_const_le (b : β) : ‖const α b‖₊ ≤ ‖b‖₊

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
(b : β)

‖BoundedContinuousFunction.const α b‖₊ ≤ ‖b‖₊


protected theorem le_trans {a b c : Fin n} : a ≤ b → b ≤ c → a ≤ c


theorem gcd_eq_zero_iff {i j : Nat} : gcd i j = 0 ↔ i = 0 ∧ j = 0


/-- `t` is in the upper shadow of `𝒜` iff there is a `s ∈ 𝒜` from which we can remove one element
to get `t`. -/
lemma mem_upShadow_iff : t ∈ ∂⁺ 𝒜 ↔ ∃ s ∈ 𝒜, ∃ a ∉ s, insert a s = t

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

t ∈ 𝒜.upShadow ↔ ∃ s ∈ 𝒜, ∃ a ∉ s, insert a s = t


private theorem int_natAbs_pos {n : ℤ} (hn : 0 < n) : 0 < n.natAbs


lemma finiteCoproduct.ι_injective (a : α) : Function.Injective (finiteCoproduct.ι X a)

{α : Type w}
[Finite α]
(X : α → Profinite)
(a : α)

Function.Injective ⇑(Profinite.finiteCoproduct.ι X a)


theorem iff_left_comm {a b c : Prop} : (a ↔ (b ↔ c)) ↔ (b ↔ (a ↔ c))


@[to_additive] lemma isSquare_mabs : IsSquare |a|ₘ ↔ IsSquare a

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


/-- special case of `mul_dvd_mul_iff_right` for `ℕ`.
Duplicated here to keep simple imports for this file. -/
protected lemma mul_dvd_mul_iff_right (hc : 0 < c) : a * c ∣ b * c ↔ a ∣ b


theorem summable_mul_right_iff (h : a ≠ 0) : (Summable fun i ↦ f i * a) ↔ Summable f

{ι : Type u_1}
{α : Type u_4}
[DivisionSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
{a : α}
(h : a ≠ 0)

(Summable fun i => f i * a) ↔ Summable f


theorem filter_nonempty_iff : (s.filter p).Nonempty ↔ ∃ a ∈ s, p a

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{s : Finset α}

(Finset.filter p s).Nonempty ↔ ∃ a ∈ s, p a


@[reassoc (attr := simp)]
theorem leftAdjointUniq_hom_app_counit {F F' : C ⥤ D} {G : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F' ⊣ G)
    (x : D) :
    (leftAdjointUniq adj1 adj2).hom.app (G.obj x) ≫ adj2.counit.app x = adj1.counit.app x

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F F' : C ⥤ D}
{G : D ⥤ C}
(adj1 : F ⊣ G)
(adj2 : F' ⊣ G)
(x : D)

(adj1.leftAdjointUniq adj2).hom.app (G.obj x) ≫ adj2.counit.app x = adj1.counit.app x


@[simp]
lemma binaryProductIso_hom_comp_snd :
    (binaryProductIso F G).hom ≫ prod.snd = Limits.prod.snd

(F G : CategoryTheory.Functor C (Type w))

CategoryTheory.CategoryStruct.comp (CategoryTheory.FunctorToTypes.binaryProductIso F G).hom
    CategoryTheory.FunctorToTypes.prod.snd =
  CategoryTheory.Limits.prod.snd


theorem HasDerivWithinAt.mul (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x) :
    HasDerivWithinAt (fun y => c y * d y) (c' * d x + c x * d') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c d : 𝕜 → 𝔸}
{c' d' : 𝔸}
(hc : HasDerivWithinAt c c' s x)
(hd : HasDerivWithinAt d d' s x)


theorem ge_two_pow_implies_high_bit_true {x : Nat} (p : x ≥ 2^n) : ∃ i, i ≥ n ∧ testBit x i


@[simp] theorem mapM'_nil [Monad m] {f : α → m β} : mapM' f [] = pure []

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
{f : α → m β}


theorem model_distinctConstantsTheory {M : Type w} [L[[α]].Structure M] (s : Set α) :
    M ⊨ L.distinctConstantsTheory s ↔ Set.InjOn (fun i : α => (L.con i : M)) s

(L : FirstOrder.Language)
{α : Type u'}
{M : Type w}
[(L.withConstants α).Structure M]
(s : Set α)

M ⊨ L.distinctConstantsTheory s ↔ Set.InjOn (fun i => ↑(L.con i)) s


@[simp, norm_cast]
theorem coe_inf (a b : Complementeds α) : ↑(a ⊓ b) = (a : α) ⊓ b

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
(a b : Complementeds α)


/-- The functor `LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)`
obtained by precomposition. -/
@[simps!]
def LeftExtension.precomp : LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit F) ((CategoryTheory.whiskeringLeft C D H).obj L))

((CategoryTheory.Functor.LeftExtension.precomp L F G).obj X).right = X.right


@[reassoc (attr := simp)]
lemma homologyπ_comp_asIsoHomologyπ_inv (hf : S.f = 0) [S.HasHomology] :
    S.homologyπ ≫ (S.asIsoHomologyπ hf).inv = 𝟙 _

CategoryTheory.CategoryStruct.comp S.homologyπ (S.asIsoHomologyπ hf).inv = CategoryTheory.CategoryStruct.id S.cycles


@[simps (config := .asFn)]
instance : Zero (ι →ᵇᵃ[I₀] M)

{ι : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
{I₀ : WithTop (BoxIntegral.Box ι)}


@[simps]
instance : TotalComplexShapeSymmetry (up ℤ) (up ℤ) (up ℤ)

TotalComplexShapeSymmetry.σ (ComplexShape.up ℤ) (ComplexShape.up ℤ) (ComplexShape.up ℤ) p q = (p * q).negOnePow


/-- The equiv between `VectorMeasure α ℝ≥0∞` and `Measure α` formed by
`MeasureTheory.VectorMeasure.ennrealToMeasure` and
`MeasureTheory.Measure.toENNRealVectorMeasure`. -/
@[simps]
def equivMeasure [MeasurableSpace α] : VectorMeasure α ℝ≥0∞ ≃ Measure α

(v : MeasureTheory.VectorMeasure α ℝ≥0∞)

MeasureTheory.VectorMeasure.equivMeasure v = v.ennrealToMeasure


@[simp]
theorem sInf_toNonUnitalSubalgebra (S : Set (NonUnitalStarSubalgebra R A)) :
    (sInf S).toNonUnitalSubalgebra = sInf (NonUnitalStarSubalgebra.toNonUnitalSubalgebra '' S)

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
(S : Set (NonUnitalStarSubalgebra R A))


@[to_additive]
theorem eq_of_eqOn_topM {f g : M →* N} (h : Set.EqOn f g (⊤ : Submonoid M)) : f = g

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{f g : M →* N}
(h : Set.EqOn ⇑f ⇑g ↑⊤)


theorem HasAffineProperty.diagonal_of_openCover_diagonal
    (P) {Q} [HasAffineProperty P Q]
    {X Y : Scheme.{u}} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover.{u} Y) [∀ i, IsAffine (𝒰.obj i)]
    (h𝒰 : ∀ i, Q.diagonal (𝒰.pullbackHom f i)) :
    P.diagonal f

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

[∀ (i : 𝒰.J), AlgebraicGeometry.IsAffine (𝒰.obj i)]

(h𝒰 : ∀ (i : (𝒰.pullbackCover f).J), Q.diagonal (𝒰.pullbackHom f i))


/-- If we repeat a row of a matrix, we get a matrix of determinant zero. -/
theorem det_updateRow_eq_zero (h : i ≠ j) :
    (M.updateRow j (M i)).det = 0

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
{M : Matrix n n R}
{i j : n}
(h : i ≠ j)


theorem eq_swap {a b : α} : s(a, b) = s(b, a)


@[simp]
theorem mulRightMap_apply_single {M N : Submodule R S} {ι : Type*} (n : ι → N) (i : ι) (m : M) :
    mulRightMap M n (Finsupp.single i m) = m.1 * (n i).1

{R : Type u_1}
[Semiring R]
{S : Type u_4}
[Semiring S]
[Module R S]
[SMulCommClass R R S]
[IsScalarTower R S S]
{M N : Submodule R S}
{ι : Type u_5}
(n : ι → ↥N)
(i : ι)
(m : ↥M)

(M.mulRightMap n) (Finsupp.single i m) = ↑m * ↑(n i)


lemma cfcₙ_le_iff (f g : R → R) (a : A) (hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac)
    (hg : ContinuousOn g (σₙ R a) := by cfc_cont_tac) (hf0 : f 0 = 0 := by cfc_zero_tac)
    (hg0 : g 0 = 0 := by cfc_zero_tac) (ha : p a := by cfc_tac) :
    cfcₙ f a ≤ cfcₙ g a ↔ ∀ x ∈ σₙ R a, f x ≤ g x

[∀ (α : Type u_1) [inst : Zero α] [inst_1 : TopologicalSpace α], StarOrderedRing C(α, R)₀]


@[to_additive]
theorem finprod_eq_prod_plift_of_mulSupport_toFinset_subset {f : α → M}
    (hf : (mulSupport (f ∘ PLift.down)).Finite) {s : Finset (PLift α)} (hs : hf.toFinset ⊆ s) :
    ∏ᶠ i, f i = ∏ i ∈ s, f i.down

(hf : (Function.support (f ∘ PLift.down)).Finite)


@[to_additive]
theorem mul_ite {α} [Mul α] (P : Prop) [Decidable P] (a b c : α) :
    (a * if P then b else c) = if P then a * b else a * c

{α : Type u_1}
[Add α]
(P : Prop)
[Decidable P]
(a b c : α)

(a + if P then b else c) = if P then a + b else a + c


@[simp]
theorem inter_compl (s : Finset α) : s ∩ sᶜ = ∅

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


@[simp]
theorem trans_assoc {Z' : C} (α : X ≅ Y) (β : Y ≅ Z) (γ : Z ≅ Z') :
    (α ≪≫ β) ≪≫ γ = α ≪≫ β ≪≫ γ

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z Z' : C}
(α : X ≅ Y)
(β : Y ≅ Z)
(γ : Z ≅ Z')

(α ≪≫ β) ≪≫ γ = α ≪≫ β ≪≫ γ


theorem degree_le_of_dvd {p q : R[X]} (h1 : p ∣ q) (h2 : q ≠ 0) : degree p ≤ degree q

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p q : R[X]}
(h1 : p ∣ q)
(h2 : q ≠ 0)


@[simp] theorem ite_eq_left_iff {P : Prop} [Decidable P] : ite P a b = a ↔ ¬P → b = a

∀ {α : Sort u_1} {a b : α} {P : Prop} [inst : Decidable P], (if P then a else b) = a ↔ ¬P → b = a


@[simp]
theorem mk.eta {p : PProd α β} : PProd.mk p.1 p.2 = p

{α : Sort u_1}
{β : Sort u_2}
{p : PProd α β}


/-- `HasFTaylorSeriesUpTo n f p` registers the fact that `p 0 = f` and `p (m+1)` is a
derivative of `p m` for `m < n`, and is continuous for `m ≤ n`. This is a predicate analogous to
`HasFDerivAt` but for higher order derivatives.

Notice that `p` does not sum up to `f` on the diagonal (`FormalMultilinearSeries.sum`), even if
`f` is analytic and `n = ∞`: an addition `1/m!` factor on the `m`th term is necessary for that. -/
structure HasFTaylorSeriesUpTo (n : ℕ∞) (f : E → F) (p : E → FormalMultilinearSeries 𝕜 E F) :
  Prop where
  zero_eq : ∀ x, (p x 0).uncurry0 = f x
  fderiv : ∀ m : ℕ, (m : ℕ∞) < n → ∀ x, HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x
  cont : ∀ m : ℕ, (m : ℕ∞) ≤ n → Continuous fun x => p x m

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{f : E → F}
{p : E → FormalMultilinearSeries 𝕜 E F}
(self : HasFTaylorSeriesUpTo n f p)
(m : ℕ)

↑m < n → ∀ (x : E), HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x


@[simp] theorem nndist_ofAdd (a b : X) : nndist (ofAdd a) (ofAdd b) = nndist a b

{X : Type u_1}
[PseudoMetricSpace X]
(a b : X)

nndist (Multiplicative.ofAdd a) (Multiplicative.ofAdd b) = nndist a b


lemma addXYZ_self {P : Fin 3 → R} (hP : W'.Equation P) : W'.addXYZ P P = ![0, 0, 0]

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


theorem filter_filterMap (f : α → Option β) (p : β → Prop) [DecidablePred p] (s : Multiset α) :
    filter p (filterMap f s) = filterMap (fun x => (f x).filter p) s

{α : Type u_1}
{β : Type v}
(f : α → Option β)
(p : β → Prop)
[DecidablePred p]
(s : Multiset α)

Multiset.filter p (Multiset.filterMap f s) = Multiset.filterMap (fun x => Option.filter (fun b => decide (p b)) (f x)) s


theorem ContMDiffOn.mono (hf : ContMDiffOn I I' n f s) (hts : t ⊆ s) : ContMDiffOn I I' n f t

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s t : Set M}
{n : ℕ∞}
(hf : ContMDiffOn I I' n f s)
(hts : t ⊆ s)


theorem hasStrictDerivAt_log_of_pos (hx : 0 < x) : HasStrictDerivAt log x⁻¹ x


/-- A product over all subsets of `s ∪ {x}` is obtained by multiplying the product over all subsets
of `s`, and over all subsets of `s` to which one adds `x`. -/
@[to_additive "A sum over all subsets of `s ∪ {x}` is obtained by summing the sum over all subsets
of `s`, and over all subsets of `s` to which one adds `x`."]
lemma prod_powerset_cons (ha : a ∉ s) (f : Finset α → β) :
    ∏ t ∈ (s.cons a ha).powerset, f t = (∏ t ∈ s.powerset, f t) *
      ∏ t ∈ s.powerset.attach, f (cons a t $ not_mem_mono (mem_powerset.1 t.2) ha)

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{a : α}
[CommMonoid β]
(ha : a ∉ s)
(f : Finset α → β)

∏ t ∈ (Finset.cons a s ha).powerset, f t = (∏ t ∈ s.powerset, f t) * ∏ t ∈ s.powerset.attach, f (Finset.cons a ↑t ⋯)


theorem not_lt_eq (a b : Nat) : (¬ (a < b)) = (b ≤ a)


protected theorem map_zero (h : QuasispectrumRestricts a f) : f 0 = 0

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[Semifield R]
[Field S]
[NonUnitalRing A]
[Module R A]
[Module S A]
[Algebra R S]
{a : A}
{f : S → R}
(h : QuasispectrumRestricts a f)


/-- Mapping under `id` does not change a vector. -/
@[simp]
theorem map_id {n : ℕ} (v : Vector α n) : Vector.map id v = v

{α : Type u_1}
{n : ℕ}
(v : Mathlib.Vector α n)


theorem y_smooth : ContDiffOn ℝ ⊤ (uncurry y) (Ioo (0 : ℝ) 1 ×ˢ (univ : Set E))

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]

ContDiffOn ℝ ⊤ (Function.uncurry ExistsContDiffBumpBase.y) (Set.Ioo 0 1 ×ˢ Set.univ)


@[fun_prop]
protected theorem hasFDerivAt : HasFDerivAt iso (iso : E →L[𝕜] F) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
(iso : E ≃L[𝕜] F)


theorem mem_foldr_permutationsAux2 {t : α} {ts : List α} {r L : List (List α)} {l' : List α} :
    l' ∈ foldr (fun y r => (permutationsAux2 t ts r y id).2) r L ↔
      l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts

{α : Type u_1}
{t : α}
{ts : List α}
{r L : List (List α)}
{l' : List α}

l' ∈ List.foldr (fun y r => (List.permutationsAux2 t ts r y id).2) r L ↔
  l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts


{α : Type u_1}
[UniformSpace α]
(pkg : AbstractCompletion α)


@[simp]
theorem quotMapOfEquivQuotMapCMapSpanMk_mk (x : AdjoinRoot f) :
    quotMapOfEquivQuotMapCMapSpanMk I f (Ideal.Quotient.mk (I.map (of f)) x) =
      Ideal.Quotient.mk (Ideal.map (Ideal.Quotient.mk (span {f})) (I.map (C : R →+* R[X]))) x

{R : Type u}
[CommRing R]
(I : Ideal R)
(f : R[X])
(x : AdjoinRoot f)

(AdjoinRoot.quotMapOfEquivQuotMapCMapSpanMk I f) ((Ideal.Quotient.mk (Ideal.map (AdjoinRoot.of f) I)) x) =
  (Ideal.Quotient.mk (Ideal.map (Ideal.Quotient.mk (Ideal.span {f})) (Ideal.map Polynomial.C I))) x


@[norm_cast]
theorem coe_linear_mk (f : M →ₗ[R] N) (h) : ((⟨f, h⟩ : M →ₗ⁅R,L⁆ N) : M →ₗ[R] N) = f

(h : ∀ {x : L} {m : M}, f.toFun ⁅x, m⁆ = ⁅x, f.toFun m⁆)

↑{ toLinearMap := f, map_lie' := h } = f


theorem mem_span_insert {s : Set α} {x y} :
    x ∈ span (insert y s) ↔ ∃ a, ∃ z ∈ span s, x = a * y + z

{α : Type u}
[Semiring α]
{s : Set α}
{x y : α}

x ∈ Ideal.span (insert y s) ↔ ∃ a, ∃ z ∈ Ideal.span s, x = a * y + z


@[to_additive]
protected theorem mul_smul (x y : R[S⁻¹]) (z : X[S⁻¹]) : (x * y) • z = x • y • z

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{X : Type u_2}
[AddAction R X]
(x y : AddOreLocalization S R)
(z : AddOreLocalization S X)


@[simp] theorem birkhoffAverage_zero' (f : α → α) (g : α → M) : birkhoffAverage R f g 0 = 0

(R : Type u_1)
{α : Type u_2}
{M : Type u_3}
[DivisionSemiring R]
[AddCommMonoid M]
[Module R M]
(f : α → α)
(g : α → M)


theorem memℒp_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
    (hu : ∀ n, Memℒp (u n) p μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) : Memℒp (stoppedValue u τ) p μ

(hu : ∀ (n : ι), MeasureTheory.Memℒp (u n) p μ)

MeasureTheory.Memℒp (MeasureTheory.stoppedValue u τ) p μ


theorem lcm_eq_of_associated_left [NormalizedGCDMonoid α] {m n : α} (h : Associated m n) (k : α) :
    lcm m k = lcm n k

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{m n : α}
(h : Associated m n)
(k : α)


/-- The image under `↑ : WeakDual 𝕜 E → (E → 𝕜)` of a polar `WeakDual.polar 𝕜 s` of a
neighborhood `s` of the origin is a closed set. -/
theorem isClosed_image_polar_of_mem_nhds {s : Set E} (s_nhd : s ∈ 𝓝 (0 : E)) :
    IsClosed (((↑) : WeakDual 𝕜 E → E → 𝕜) '' polar 𝕜 s)

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
(s_nhd : s ∈ 𝓝 0)

IsClosed (DFunLike.coe '' WeakDual.polar 𝕜 s)


@[to_additive]
theorem ker_eq_bot_of_cancel {f : A →* B} (h : ∀ u v : f.ker →* A, f.comp u = f.comp v → u = v) :
    f.ker = ⊥

(h : ∀ (u v : ↥f.ker →* A), f.comp u = f.comp v → u = v)


theorem perm_of_mem_permutationsAux :
    ∀ {ts is l : List α}, l ∈ permutationsAux ts is → l ~ ts ++ is

l ∈ ts.permutationsAux is → l.Perm (ts ++ is)


theorem measure_liminf_eq_zero {s : ℕ → Set α} (h : (∑' i, μ (s i)) ≠ ∞) :
    μ (liminf s atTop) = 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : ℕ → Set α}
(h : ∑' (i : ℕ), μ (s i) ≠ ⊤)


/-- The functor `Comma L R ⥤ Comma L R` induced by the identity natural transformation on `R` is
    naturally isomorphic to the identity functor. -/
@[simps!]
def mapRightId : mapRight L (𝟙 R) ≅ 𝟭 _

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

((CategoryTheory.Comma.mapRightId L R).inv.app X).left = CategoryTheory.CategoryStruct.id X.left


theorem ne_of_adj_of_not_adj {v w x : V} (h : G.Adj v x) (hn : ¬G.Adj w x) : v ≠ w

{V : Type u}
(G : SimpleGraph V)
{v w x : V}
(h : G.Adj v x)
(hn : ¬G.Adj w x)


theorem image_morphismRestrict_preimage {X Y : Scheme.{u}} (f : X ⟶ Y) (U : Y.Opens) (V : Opens U) :
    (f ⁻¹ᵁ U).ι ''ᵁ ((f ∣_ U) ⁻¹ᵁ V) = f ⁻¹ᵁ (U.ι ''ᵁ V)

(V : TopologicalSpace.Opens ↑↑(↑U).toPresheafedSpace)

(AlgebraicGeometry.Scheme.Hom.opensFunctor ((TopologicalSpace.Opens.map f.val.base).obj U).ι).obj
    ((TopologicalSpace.Opens.map (f ∣_ U).val.base).obj V) =
  (TopologicalSpace.Opens.map f.val.base).obj ((AlgebraicGeometry.Scheme.Hom.opensFunctor U.ι).obj V)


@[to_additive]
theorem dist_eq_norm_div' (a b : E) : dist a b = ‖b / a‖

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


lemma ltTrichotomy_congr {x' y' : α} {p' q' r' : P} (ltc : (x < y) ↔ (x' < y'))
    (gtc : (y < x) ↔ (y' < x')) (hh'₁ : x' < y' → p = p')
    (hh'₂ : x' = y' → q = q') (hh'₃ : y' < x' → r = r') :
    ltTrichotomy x y p q r = ltTrichotomy x' y' p' q' r'

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
{p q r : P}
{x' y' : α}
{p' q' r' : P}
(ltc : x < y ↔ x' < y')
(gtc : y < x ↔ y' < x')
(hh'₁ : x' < y' → p = p')
(hh'₂ : x' = y' → q = q')
(hh'₃ : y' < x' → r = r')


@[simp]
theorem sinh_add_cosh : sinh x + cosh x = exp x


@[simp] theorem insert_replicate_self {a : α} (h : 0 < n) : (replicate n a).insert a = replicate n a

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{n : Nat}
{a : α}
(h : 0 < n)

List.insert a (List.replicate n a) = List.replicate n a


theorem removeNone_aux_none {x : α} (h : e (some x) = none) :
    some (removeNone_aux e x) = e none

{α : Type u_1}
{β : Type u_2}
(e : Option α ≃ Option β)
{x : α}
(h : e (some x) = none)


theorem typesGrothendieckTopology_eq_canonical :
    typesGrothendieckTopology.{u} = Sheaf.canonicalTopology (Type u)

CategoryTheory.typesGrothendieckTopology = CategoryTheory.Sheaf.canonicalTopology (Type u)


/-- If `R →+* A` is injective, then `R` is of characteristic `p` if and only if `A` is also of
characteristic `p`. Similar to `RingHom.charZero_iff`. -/
theorem RingHom.charP_iff {R A : Type*} [NonAssocSemiring R] [NonAssocSemiring A] (f : R →+* A)
    (H : Function.Injective f) (p : ℕ) : CharP R p ↔ CharP A p

{R : Type u_1}
{A : Type u_2}
[NonAssocSemiring R]
[NonAssocSemiring A]
(f : R →+* A)
(H : Function.Injective ⇑f)
(p : ℕ)


@[reassoc]
theorem right_unitality_app (n : M) (X : C) :
    F.ε.app ((F.obj n).obj X) ≫ (F.μ n (𝟙_ M)).app X ≫ (F.map (ρ_ n).hom).app X = 𝟙 _

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

CategoryTheory.CategoryStruct.comp (F.ε.app ((F.obj n).obj X))
    (CategoryTheory.CategoryStruct.comp ((F.μ n (𝟙_ M)).app X)
      ((F.map (CategoryTheory.MonoidalCategory.rightUnitor n).hom).app X)) =
  CategoryTheory.CategoryStruct.id ((𝟙_ (CategoryTheory.Functor C C)).obj ((F.obj n).obj X))


theorem IsCompl.hnot_eq (h : IsCompl a b) : ￢a = b

{α : Type u_2}
[CoheytingAlgebra α]
{a b : α}
(h : IsCompl a b)


@[simp]
theorem comp_toEmbedding (hnp : N ≃[L] P) (hmn : M ≃[L] N) :
    (hnp.comp hmn).toEmbedding = hnp.toEmbedding.comp hmn.toEmbedding

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{P : Type u_1}
[L.Structure P]
(hnp : L.Equiv N P)
(hmn : L.Equiv M N)


/-- The counit isomorphism of the equivalence `equivalence₁` between `A` and `B'`. -/
@[simps!]
def equivalence₁CounitIso : (e'.inverse ⋙ eA.inverse) ⋙ F ≅ 𝟭 B'

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

(AlgebraicTopology.DoldKan.Compatibility.equivalence₁CounitIso hF).hom.app X =
  hF.inv.app (eA.inverse.obj (e'.inverse.obj X)) ≫
    e'.functor.map (eA.counitIso.hom.app (e'.inverse.obj X)) ≫ e'.counitIso.hom.app X


@[simp]
lemma Memℒp.toLp_const : Memℒp.toLp _ (memℒp_const c) = Lp.const p μ c

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

MeasureTheory.Memℒp.toLp (fun x => c) ⋯ = (MeasureTheory.Lp.const p μ) c


/-- If `f x = g x` for all `x ∈ s` and `f`, `g` are continuous on `t`, `s ⊆ t ⊆ closure s`, then
`f x = g x` for all `x ∈ t`. See also `Set.EqOn.closure`. -/
theorem Set.EqOn.of_subset_closure [T2Space Y] {s t : Set X} {f g : X → Y} (h : EqOn f g s)
    (hf : ContinuousOn f t) (hg : ContinuousOn g t) (hst : s ⊆ t) (hts : t ⊆ closure s) :
    EqOn f g t

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space Y]
{s t : Set X}
{f g : X → Y}
(h : Set.EqOn f g s)
(hf : ContinuousOn f t)
(hg : ContinuousOn g t)
(hst : s ⊆ t)
(hts : t ⊆ closure s)


theorem minimals_inter_subset : minimals r s ∩ t ⊆ minimals r (s ∩ t)

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}


lemma _root_.MeasurableEmbedding.rnDeriv_map_aux (hf : MeasurableEmbedding f)
    (hμν : μ ≪ ν) [SigmaFinite μ] [SigmaFinite ν] :
    (fun x ↦ (μ.map f).rnDeriv (ν.map f) (f x)) =ᵐ[ν] μ.rnDeriv ν

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{mβ : MeasurableSpace β}
{f : α → β}
(hf : MeasurableEmbedding f)
(hμν : μ ≪ ν)
[MeasureTheory.SigmaFinite μ]
[MeasureTheory.SigmaFinite ν]

(fun x => (MeasureTheory.Measure.map f μ).rnDeriv (MeasureTheory.Measure.map f ν) (f x)) =ᵐ[ν] μ.rnDeriv ν


theorem Pointed.mono {S T : ConvexCone 𝕜 E} (h : S ≤ T) : S.Pointed → T.Pointed

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{S T : ConvexCone 𝕜 E}
(h : S ≤ T)


@[simp]
lemma ψ_neg (n : ℤ) : W.ψ (-n) = -W.ψ n

{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℤ)


theorem isGLB_Icc (h : a ≤ b) : IsGLB (Icc a b) a

{α : Type u}
[Preorder α]
{a b : α}
(h : a ≤ b)


/-- If `u` is a superset of `t` with the same (finite) measure (both sets possibly non-measurable),
then for any measurable set `s` one also has `μ (t ∩ s) = μ (u ∩ s)`. -/
theorem measure_inter_eq_of_measure_eq {s t u : Set α} (hs : MeasurableSet s) (h : μ t = μ u)
    (htu : t ⊆ u) (ht_ne_top : μ t ≠ ∞) : μ (t ∩ s) = μ (u ∩ s)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t u : Set α}
(hs : MeasurableSet s)
(h : μ t = μ u)
(htu : t ⊆ u)
(ht_ne_top : μ t ≠ ⊤)


/-- A sequentially complete uniform space with a countable basis of the uniformity filter is
complete. -/
theorem complete_of_cauchySeq_tendsto (H' : ∀ u : ℕ → α, CauchySeq u → ∃ a, Tendsto u atTop (𝓝 a)) :
    CompleteSpace α

(H' : ∀ (u : ℕ → α), CauchySeq u → ∃ a, Filter.Tendsto u Filter.atTop (𝓝 a))


theorem symm_continuousLinearEquivAt_eq (e : Trivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) : ((e.continuousLinearEquivAt R b hb).symm : F → E b) = e.symmL R b

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

⇑(Trivialization.continuousLinearEquivAt R e b hb).symm = ⇑(Trivialization.symmL R e b)


@[simp]
theorem degree_of_c_ne_zero' (hc : c ≠ 0) : (toPoly ⟨0, 0, c, d⟩).degree = 1

{R : Type u_1}
{c d : R}
[Semiring R]
(hc : c ≠ 0)


@[to_additive]
theorem prod_map_pow {n : ℕ} : (m.map fun i => f i ^ n).prod = (m.map f).prod ^ n

{ι : Type u_2}
{α : Type u_3}
[CommMonoid α]
{m : Multiset ι}
{f : ι → α}
{n : ℕ}

(Multiset.map (fun i => f i ^ n) m).prod = (Multiset.map f m).prod ^ n


theorem transAt_distrib {i j : N} (h : i ≠ j) (a b c d : Ω^ N X x) :
    transAt i (transAt j a b) (transAt j c d) = transAt j (transAt i a c) (transAt i b d)

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
{i j : N}
(h : i ≠ j)
(a b c d : ↑(Ω^ N X x))

GenLoop.transAt i (GenLoop.transAt j a b) (GenLoop.transAt j c d) =
  GenLoop.transAt j (GenLoop.transAt i a c) (GenLoop.transAt i b d)


@[to_additive (attr := simp)]
theorem liftOn_mk' {p : Sort u} (f : M → S → p) (H) (a : M) (b : S) :
    liftOn ((monoidOf S).mk' a b) f H = f a b

(H : ∀ {a c : M} {b d : ↥S}, (AddLocalization.r S) (a, b) (c, d) → f a b = f c d)

((AddLocalization.addMonoidOf S).mk' a b).liftOn f H = f a b


theorem mul_left_cancel_iff_of_pos [PosMulReflectLE α] (a0 : 0 < a) : a * b = a * c ↔ b = c

{α : Type u_1}
{a b c : α}
[MulZeroClass α]
[PartialOrder α]
[PosMulReflectLE α]
(a0 : 0 < a)


@[simp]
theorem union_sigma : (s₁ ∪ s₂).sigma t = s₁.sigma t ∪ s₂.sigma t

{ι : Type u_1}
{α : ι → Type u_3}
{s₁ s₂ : Set ι}
{t : (i : ι) → Set (α i)}


@[simp]
theorem nndist_midpoint_left (p₁ p₂ : P) :
    nndist (midpoint 𝕜 p₁ p₂) p₁ = ‖(2 : 𝕜)‖₊⁻¹ * nndist p₁ p₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
[Invertible 2]
(p₁ p₂ : P)

nndist (midpoint 𝕜 p₁ p₂) p₁ = ‖2‖₊⁻¹ * nndist p₁ p₂


@[simp] theorem pwFilter_cons_of_pos [DecidableRel (α := α) R] {a : α} {l : List α}
    (h : ∀ b ∈ pwFilter R l, R a b) : pwFilter R (a :: l) = a :: pwFilter R l

(h : ∀ (b : α), b ∈ List.pwFilter R l → R a b)

List.pwFilter R (a :: l) = a :: List.pwFilter R l


theorem coeff_add_ne_zero {f : Ring.Perfection R p} {n : ℕ} (hfn : coeff R p n f ≠ 0) (k : ℕ) :
    coeff R p (n + k) f ≠ 0

{R : Type u₁}
[CommSemiring R]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
[CharP R p]
{f : Ring.Perfection R p}
{n : ℕ}
(hfn : (Perfection.coeff R p n) f ≠ 0)
(k : ℕ)


/-- The canonical map `Φ.RightResolution X₂ → Φ.op.LeftResolution (Opposite.op X₂)`. -/
@[simps]
def RightResolution.op {X₂ : C₂} (L : Φ.RightResolution X₂) :
    Φ.op.LeftResolution (Opposite.op X₂)

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}


theorem coe_mapAlgHom_eq_coe_map (φ : K[X] →ₐ[S] R[X]) (hφ : K[X]⁰ ≤ R[X]⁰.comap φ) :
    (mapAlgHom φ hφ : RatFunc K → RatFunc R) = map φ hφ

{K : Type u}
[CommRing K]
[IsDomain K]
{R : Type u_2}
{S : Type u_3}
[CommRing R]
[IsDomain R]
[CommSemiring S]
[Algebra S K[X]]
[Algebra S R[X]]
(φ : K[X] →ₐ[S] R[X])
(hφ : K[X]⁰ ≤ Submonoid.comap φ R[X]⁰)

⇑(RatFunc.mapAlgHom φ hφ) = ⇑(RatFunc.map φ hφ)


@[simp]
theorem Proj.stalkIso'_germ (U : Opens (ProjectiveSpectrum.top 𝒜)) (x : U)
    (s : (Proj.structureSheaf 𝒜).1.obj (op U)) :
    Proj.stalkIso' 𝒜 x ((Proj.structureSheaf 𝒜).presheaf.germ x s) = s.1 x

(U : TopologicalSpace.Opens ↑(ProjectiveSpectrum.top 𝒜))

(s : ↑((AlgebraicGeometry.ProjectiveSpectrum.Proj.structureSheaf 𝒜).val.obj (Opposite.op U)))

(AlgebraicGeometry.Proj.stalkIso' 𝒜 ↑x)
    (((AlgebraicGeometry.ProjectiveSpectrum.Proj.structureSheaf 𝒜).presheaf.germ x) s) =
  ↑s x


theorem ker_mfderiv_eq_bot {x : M} (hx : x ∈ e.source) : LinearMap.ker (mfderiv I I' e x) = ⊥

(he : PartialHomeomorph.MDifferentiable I I' e)


theorem map_dualCoannihilator_le (Φ : Submodule R (Module.Dual R M)) :
    Φ.dualCoannihilator.map (Module.Dual.eval R M) ≤ Φ.dualAnnihilator

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(Φ : Submodule R (Module.Dual R M))

Submodule.map (Module.Dual.eval R M) Φ.dualCoannihilator ≤ Φ.dualAnnihilator


@[to_additive (attr := simp)]
theorem mem_stabilizer_iff {a : α} {g : G} : g ∈ stabilizer G a ↔ g • a = a

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{a : α}
{g : G}

g ∈ MulAction.stabilizer G a ↔ g • a = a


@[simp]
theorem coe_expOrderIso_apply (x : ℝ) : (expOrderIso x : ℝ) = exp x


theorem testBit_lt_two_pow {x i : Nat} (lt : x < 2^i) : x.testBit i = false


/-- A function which can be uniformly approximated by continuous functions is continuous. -/
theorem continuous_of_uniform_approx_of_continuous
    (L : ∀ u ∈ 𝓤 β, ∃ F, Continuous F ∧ ∀ y, (f y, F y) ∈ u) : Continuous f

(L : ∀ u ∈ 𝓤 β, ∃ F, Continuous F ∧ ∀ (y : α), (f y, F y) ∈ u)


@[simp]
theorem coeFn_mk (f : M → M') (hf : ContMDiff I I' n f) :
    DFunLike.coe (F := C^n⟮I, M; I', M'⟯) ⟨f, hf⟩ = f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_4}
[TopologicalSpace H]
{H' : Type u_5}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(f : M → M')
(hf : ContMDiff I I' n f)


theorem IsPathConnected.joinedIn (h : IsPathConnected F) :
    ∀ᵉ (x ∈ F) (y ∈ F), JoinedIn F x y

{X : Type u_1}
[TopologicalSpace X]
{F : Set X}
(h : IsPathConnected F)
(x : X)


theorem rank_span_le (s : Set M) : Module.rank R (span R s) ≤ #s

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
(s : Set M)

Module.rank R ↥(Submodule.span R s) ≤ #↑s


theorem iterate_sup_le_sup_iff {α : Type*} [SemilatticeSup α] (f : α →o α) :
    (∀ n₁ n₂ a₁ a₂, f^[n₁ + n₂] (a₁ ⊔ a₂) ≤ f^[n₁] a₁ ⊔ f^[n₂] a₂) ↔
      ∀ a₁ a₂, f (a₁ ⊔ a₂) ≤ f a₁ ⊔ a₂

{α : Type u_3}
[SemilatticeSup α]
(f : α →o α)

(∀ (n₁ n₂ : ℕ) (a₁ a₂ : α), (⇑f)^[n₁ + n₂] (a₁ ⊔ a₂) ≤ (⇑f)^[n₁] a₁ ⊔ (⇑f)^[n₂] a₂) ↔
  ∀ (a₁ a₂ : α), f (a₁ ⊔ a₂) ≤ f a₁ ⊔ a₂


/-- If `P` respects isos, then `stalkwise P` respects isos. -/
lemma stalkwise_respectsIso (hP : RingHom.RespectsIso P) :
    (stalkwise P).RespectsIso

{P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}

(hP : RingHom.RespectsIso fun {R S} [CommRing R] [CommRing S] => P)

(AlgebraicGeometry.stalkwise fun {R S} [CommRing R] [CommRing S] => P).RespectsIso


lemma rpow_intCast_mul (x : ℝ≥0∞) (n : ℤ) (z : ℝ) : x ^ (n * z) = (x ^ n) ^ z


theorem cmp_dist_eq_cmp_dist_coe_center (z w : ℍ) (r : ℝ) :
    cmp (dist z w) r = cmp (dist (z : ℂ) (w.center r)) (w.im * Real.sinh r)

cmp (dist z w) r = cmp (dist ↑z ↑(w.center r)) (w.im * Real.sinh r)


theorem HasMFDerivWithinAt.mono_of_mem (h : HasMFDerivWithinAt I I' f s x f') (ht : s ∈ 𝓝[t] x) :
    HasMFDerivWithinAt I I' f t x f'

{f' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}


lemma CompleteOrthogonalIdempotents.of_isIdempotentElem {e : R} (he : IsIdempotentElem e) :
    CompleteOrthogonalIdempotents ![e, 1 - e]

{R : Type u_1}
[Ring R]
{e : R}
(he : IsIdempotentElem e)


theorem IsNormal.monotone {f} (H : IsNormal f) : Monotone f

{f : Ordinal.{u_4} → Ordinal.{u_5}}
(H : Ordinal.IsNormal f)


@[simp]
theorem T_zero : (T 0 : R[T;T⁻¹]) = 1


/-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y

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


theorem keys_nodup (s : AList β) : s.keys.Nodup

{α : Type u}
{β : α → Type v}
(s : AList β)


@[simp]
theorem contSupp_halt : contSupp Cont'.halt = ∅

Turing.PartrecToTM2.contSupp Turing.PartrecToTM2.Cont'.halt = ∅


theorem IsLittleO.isBigOWith (hgf : f =o[l] g) : IsBigOWith 1 l f g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{l : Filter α}
(hgf : f =o[l] g)


@[to_additive]
theorem mul_div_mul_comm : a * b / (c * d) = a / c * (b / d)

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


theorem NodupKeys.eq_of_mk_mem {a : α} {b b' : β a} {l : List (Sigma β)} (nd : NodupKeys l)
    (h : Sigma.mk a b ∈ l) (h' : Sigma.mk a b' ∈ l) : b = b'

{α : Type u}
{β : α → Type v}
{a : α}
{b b' : β a}
{l : List (Sigma β)}
(nd : l.NodupKeys)
(h : ⟨a, b⟩ ∈ l)
(h' : ⟨a, b'⟩ ∈ l)


@[simp]
theorem coe_basis (pb : PowerBasis R S) : ⇑pb.basis = fun i : Fin pb.dim => pb.gen ^ (i : ℕ)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
(pb : PowerBasis R S)


@[simp]
theorem mem_map {f : E →L[ℝ] F} {K : ProperCone ℝ E} {y : F} :
    y ∈ K.map f ↔ y ∈ (PointedCone.map (f : E →ₗ[ℝ] F) ↑K).closure

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{F : Type u_2}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{f : E →L[ℝ] F}
{K : ProperCone ℝ E}
{y : F}

y ∈ ProperCone.map f K ↔ y ∈ (PointedCone.map ↑f ↑K).closure


@[simp]
theorem neLocus_self_add_left : neLocus (f + g) f = g.support

{α : Type u_1}
{N : Type u_3}
[DecidableEq α]
[DecidableEq N]
[AddGroup N]
(f g : α →₀ N)


theorem comap_lt_comap_of_integral_mem_sdiff [Algebra R S] [hI : I.IsPrime] (hIJ : I ≤ J) {x : S}
    (mem : x ∈ (J : Set S) \ I) (integral : IsIntegral R x) :
    I.comap (algebraMap R S) < J.comap (algebraMap R S)

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
{I J : Ideal S}
[Algebra R S]
[hI : I.IsPrime]
(hIJ : I ≤ J)
{x : S}
(mem : x ∈ ↑J \ ↑I)
(integral : IsIntegral R x)

Ideal.comap (algebraMap R S) I < Ideal.comap (algebraMap R S) J


/-- The non-zero non-`s`-factored numbers are `≥ N` when `s` contains all primes less than `N`. -/
lemma factoredNumbers_compl {N : ℕ} {s : Finset ℕ} (h : primesBelow N ≤ s) :
    (factoredNumbers s)ᶜ \ {0} ⊆ {n | N ≤ n}

{N : ℕ}
{s : Finset ℕ}
(h : N.primesBelow ≤ s)

(Nat.factoredNumbers s)ᶜ \ {0} ⊆ {n | N ≤ n}


protected theorem sub_pos_of_lt (h : m < n) : 0 < n - m


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


theorem realize_formula_cast {β : Type*} (φ : L.Formula β) (x : β → ∀ a, M a) :
    (φ.Realize fun i => (x i : (u : Filter α).Product M)) ↔
      ∀ᶠ a : α in u, φ.Realize fun i => x i a

{α : Type u_1}
{M : α → Type u_2}
{u : Ultrafilter α}
{L : FirstOrder.Language}
[(a : α) → L.Structure (M a)]
[∀ (a : α), Nonempty (M a)]
{β : Type u_3}
(φ : L.Formula β)
(x : β → (a : α) → M a)

(φ.Realize fun i => Quotient.mk' (x i)) ↔ ∀ᶠ (a : α) in ↑u, φ.Realize fun i => x i a


theorem eLpNorm_indicator_le_of_bound {f : α → β} (hp_top : p ≠ ∞) {ε : ℝ} (hε : 0 < ε) {M : ℝ}
    (hf : ∀ x, ‖f x‖ < M) :
    ∃ (δ : ℝ) (hδ : 0 < δ), ∀ s, MeasurableSet s →
      μ s ≤ ENNReal.ofReal δ → eLpNorm (s.indicator f) p μ ≤ ENNReal.ofReal ε

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{p : ℝ≥0∞}
{f : α → β}
(hp_top : p ≠ ⊤)
{ε : ℝ}
(hε : 0 < ε)
{M : ℝ}
(hf : ∀ (x : α), ‖f x‖ < M)

∃ δ,
  ∃ (_ : 0 < δ),
    ∀ (s : Set α),
      MeasurableSet s → μ s ≤ ENNReal.ofReal δ → MeasureTheory.eLpNorm (s.indicator f) p μ ≤ ENNReal.ofReal ε


theorem mkMMem_surjective [IsDedekindDomain S] [Algebra.IsAlgebraic R L] :
    Function.Surjective (ClassGroup.mkMMem bS adm)

{R : Type u_1}
{S : Type u_2}
(L : Type u_4)
[EuclideanDomain R]
[CommRing S]
[IsDomain S]
[Field L]
[algRL : Algebra R L]
[Algebra R S]
[Algebra S L]
[ist : IsScalarTower R S L]
[iic : IsIntegralClosure S R L]
{abv : AbsoluteValue R ℤ}
{ι : Type u_5}
[DecidableEq ι]
[Fintype ι]
(bS : Basis ι R S)
(adm : abv.IsAdmissible)
[Infinite R]
[DecidableEq R]
[IsDedekindDomain S]
[Algebra.IsAlgebraic R L]


theorem subsingleton_univ_pi (ht : ∀ i, (t i).Subsingleton) :
    (univ.pi t).Subsingleton

{ι : Type u_1}
{α : ι → Type u_2}
{t : (i : ι) → Set (α i)}
(ht : ∀ (i : ι), (t i).Subsingleton)


theorem equivRealProdAddHom_symm_apply (p : ℝ × ℝ) :
    equivRealProdAddHom.symm p = p.1 + p.2 * I

Complex.equivRealProdAddHom.symm p = ↑p.1 + ↑p.2 * Complex.I


@[simp]
theorem mem_iterate {f : α → α} {a : α} {n : ℕ} {b : α} :
    b ∈ iterate f a n ↔ ∃ m < n, b = f^[m] a

b ∈ List.iterate f a n ↔ ∃ m < n, b = f^[m] a


theorem erase_comm (s : Multiset α) (a b : α) : (s.erase a).erase b = (s.erase b).erase a

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


{ξ : ℝ}
{u v : ℤ}
(hv : 2 ≤ v)
(h : Real.ContfracLegendre.Ass ξ u v)


theorem preimage_smul_inv₀ (ha : a ≠ 0) (t : Set β) : (fun x ↦ a⁻¹ • x) ⁻¹' t = a • t

{α : Type u_2}
{β : Type u_3}
[GroupWithZero α]
[MulAction α β]
{a : α}
(ha : a ≠ 0)
(t : Set β)


@[simp]
theorem map₂_bot_right : map₂ m f ⊥ = ⊥

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f : Filter α}


@[simp]
lemma leftUnshift_zero (a n' : ℤ) (hn' : n + a = n') :
    (0 : Cochain (K⟦a⟧) L n').leftUnshift n hn' = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K L : CochainComplex C ℤ)
(n a n' : ℤ)
(hn' : n + a = n')

CochainComplex.HomComplex.Cochain.leftUnshift 0 n hn' = 0


theorem RelEmbedding.toOrderHom_injective
    (f : ((· < ·) : α → α → Prop) ↪r ((· < ·) : β → β → Prop)) :
    Function.Injective (f : ((· < ·) : α → α → Prop) →r ((· < ·) : β → β → Prop)).toOrderHom


/-- A complete type over a given theory in a certain type of variables is a maximally
  consistent (with the theory) set of formulas in that type. -/
structure CompleteType where
  toTheory : L[[α]].Theory
  subset' : (L.lhomWithConstants α).onTheory T ⊆ toTheory
  isMaximal' : toTheory.IsMaximal

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
(self : T.CompleteType α)

(L.lhomWithConstants α).onTheory T ⊆ ↑self


theorem norm_integral_le_integral_norm (h : a ≤ b) :
    ‖∫ x in a..b, f x ∂μ‖ ≤ ∫ x in a..b, ‖f x‖ ∂μ

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
{f : ℝ → E}
{μ : MeasureTheory.Measure ℝ}
(h : a ≤ b)

‖∫ (x : ℝ) in a..b, f x ∂μ‖ ≤ ∫ (x : ℝ) in a..b, ‖f x‖ ∂μ


theorem fst_map_prod_mk₀ {X : α → β} {Y : α → γ} {μ : Measure α}
    (hY : AEMeasurable Y μ) : (μ.map fun a => (X a, Y a)).fst = μ.map X

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[MeasurableSpace α]
[MeasurableSpace β]
[MeasurableSpace γ]
{X : α → β}
{Y : α → γ}
{μ : MeasureTheory.Measure α}
(hY : AEMeasurable Y μ)

(MeasureTheory.Measure.map (fun a => (X a, Y a)) μ).fst = MeasureTheory.Measure.map X μ


protected theorem MeasurableSet.const (p : Prop) : MeasurableSet { _a : α | p }

{α : Type u_1}
{m : MeasurableSpace α}
(p : Prop)


@[simp]
theorem bernoulli_zero : bernoulli 0 = 1


@[nontriviality, measurability]
theorem Subsingleton.measurableSet [Subsingleton α] {s : Set α} : MeasurableSet s

{α : Type u_1}
{m : MeasurableSpace α}
[Subsingleton α]
{s : Set α}


theorem add_rpow_le_rpow_add {p : ℝ} (a b : ℝ≥0) (hp1 : 1 ≤ p) : a ^ p + b ^ p ≤ (a + b) ^ p