theorem polar_comp {F : Type*} [CommRing S] [FunLike F N S] [AddMonoidHomClass F N S]
    (f : M → N) (g : F) (x y : M) :
    polar (g ∘ f) x y = g (polar f x y)

{S : Type u_1}
{M : Type u_4}
{N : Type u_5}
[AddCommGroup M]
[AddCommGroup N]
{F : Type u_8}
[CommRing S]
[FunLike F N S]
[AddMonoidHomClass F N S]
(f : M → N)
(g : F)
(x y : M)

QuadraticMap.polar (⇑g ∘ f) x y = g (QuadraticMap.polar f x y)


@[simp]
theorem erase_inter (a : α) (s t : Finset α) : s.erase a ∩ t = (s ∩ t).erase a

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


theorem lt_geom {u : ℕ → ℝ} {c : ℝ} (hc : 0 ≤ c) {n : ℕ} (hn : 0 < n)
    (h : ∀ k < n, u (k + 1) < c * u k) : u n < c ^ n * u 0


@[simp]
theorem const.get_map (f : α ⟹ β) (x : const n A α) : const.get (f <$$> x) = const.get x

{n : ℕ}
{A : Type u}
{α β : TypeVec.{u} n}
(f : α ⟹ β)
(x : ↑(MvPFunctor.const n A) α)

MvPFunctor.const.get (f <$$> x) = MvPFunctor.const.get x


theorem _root_.Antitone.isBoundedUnder_le_comp [Preorder α] [Preorder β] {l : Filter γ} {u : γ → α}
    {v : α → β} (hv : Antitone v) (hl : l.IsBoundedUnder (· ≥ ·) u) :
    l.IsBoundedUnder (· ≤ ·) (v ∘ u)

(hl : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) l u)

Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l (v ∘ u)


theorem finset_sum {ι} (s : Finset ι) {f : ι → ∀ i, E i} (hf : ∀ i ∈ s, Memℓp (f i) p) :
    Memℓp (fun a => ∑ i ∈ s, f i a) p

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{ι : Type u_3}
(s : Finset ι)
{f : ι → (i : α) → E i}
(hf : ∀ i ∈ s, Memℓp (f i) p)


@[simp, mfld_simps]
theorem localTrivAt_apply (p : Z.TotalSpace) : (Z.localTrivAt p.1) p = ⟨p.1, p.2⟩

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(p : Z.TotalSpace)

↑(Z.localTrivAt p.proj) p = (p.proj, p.snd)


@[simp]
theorem AlgHom.coe_mapIntegralClosure [Algebra R S] (f : A →ₐ[R] S)
    (x : integralClosure R A) : (f.mapIntegralClosure x : S) = f (x : A)

{R : Type u_1}
{A : Type u_2}
{S : Type u_4}
[CommRing R]
[CommRing A]
[CommRing S]
[Algebra R A]
[Algebra R S]
(f : A →ₐ[R] S)
(x : ↥(integralClosure R A))


lemma iInf_coe_eq_top : ⨅ i, (f i : ℕ∞) = ⊤ ↔ IsEmpty ι


theorem foldl_eq_foldl_data (f : β → α → β) (init : β) (arr : Array α) :
    arr.foldl f init = arr.data.foldl f init

{β : Type u_1}
{α : Type u_2}
(f : β → α → β)
(init : β)
(arr : Array α)

Array.foldl f init arr 0 = List.foldl f init arr.data


@[simp]
theorem mem_fin {n} {s : Finset ℕ} : ∀ a : Fin n, a ∈ s.fin n ↔ (a : ℕ) ∈ s


theorem filter_ssubset {s : Finset α} : s.filter p ⊂ s ↔ ∃ x ∈ s, ¬p x

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


theorem sub_modEq_iff_modEq_add' : a - b ≡ c [PMOD p] ↔ a ≡ b + c [PMOD p]

{α : Type u_1}
[AddCommGroup α]
{p a b c : α}


@[to_additive (attr := simp)]
theorem inv_eq_val_inv : a.inv = ((a⁻¹ : αˣ) : α)


/--
If `B` is a strict bicategory and `I` is a (1-)category, any functor (of 1-categories) `I ⥤ B` can
be promoted to a pseudofunctor from `LocallyDiscrete I` to `B`.
-/
@[simps]
def Functor.toPseudoFunctor (F : I ⥤ B) : Pseudofunctor (LocallyDiscrete I) B

{I : Type u₁}
[CategoryTheory.Category.{v₁, u₁} I]
{B : Type u₂}
[CategoryTheory.Bicategory B]
[CategoryTheory.Bicategory.Strict B]
(F : CategoryTheory.Functor I B)

∀ {a b : CategoryTheory.LocallyDiscrete I} {f g : a ⟶ b} (η : f ⟶ g),
  F.toPseudoFunctor.map₂ η = CategoryTheory.eqToHom ⋯


theorem revzip_powersetAux {l : List α} ⦃x⦄ (h : x ∈ revzip (powersetAux l)) : x.1 + x.2 = ↑l

(h : x ∈ (Multiset.powersetAux l).revzip)


@[simp] theorem iff_self (p : Prop) : (p ↔ p) = True


/-- The diameter of a subsingleton vanishes. -/
theorem diam_subsingleton (hs : s.Subsingleton) : diam s = 0

{α : Type u}
[PseudoEMetricSpace α]
{s : Set α}
(hs : s.Subsingleton)


@[to_additive]
theorem mem_norm_comm {s : Set G} (hs : IsNormalSubgroup s) {a b : G} (hab : a * b ∈ s) :
    b * a ∈ s

{G : Type u_1}
[Group G]
{s : Set G}
(hs : IsNormalSubgroup s)
{a b : G}
(hab : a * b ∈ s)


theorem mem_iUnion_of_mem {s : ι → Set α} {a : α} (i : ι) (ha : a ∈ s i) : a ∈ ⋃ i, s i

{α : Type u_1}
{ι : Sort u_4}
{s : ι → Set α}
{a : α}
(i : ι)
(ha : a ∈ s i)


@[reassoc (attr := simp)]
theorem coconePointUniqueUpToIso_inv_desc {r s t : Cocone F} (P : IsColimit s) (Q : IsColimit t) :
    (coconePointUniqueUpToIso P Q).inv ≫ P.desc r = Q.desc r

{r s t : CategoryTheory.Limits.Cocone F}

(P.coconePointUniqueUpToIso Q).inv ≫ P.desc r = Q.desc r


/-- If the symmetric difference of two positive sets is a null-set, then so are the differences
between the two sets. -/
theorem of_diff_eq_zero_of_symmDiff_eq_zero_positive (hu : MeasurableSet u) (hv : MeasurableSet v)
    (hsu : 0 ≤[u] s) (hsv : 0 ≤[v] s) (hs : s (u ∆ v) = 0) : s (u \ v) = 0 ∧ s (v \ u) = 0

(hsu : MeasureTheory.VectorMeasure.restrict 0 u ≤ MeasureTheory.VectorMeasure.restrict s u)

(hsv : MeasureTheory.VectorMeasure.restrict 0 v ≤ MeasureTheory.VectorMeasure.restrict s v)


theorem Filter.EventuallyEq.hasFDerivWithinAt_iff_of_mem (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : x ∈ s) :
    HasFDerivWithinAt f₀ f' s x ↔ HasFDerivWithinAt f₁ f' s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₀ f₁ : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
(h : f₀ =ᶠ[𝓝[s] x] f₁)
(hx : x ∈ s)


theorem Filter.tendsto_mul_iff_of_ne_zero [T1Space G₀] {f g : α → G₀} {l : Filter α} {x y : G₀}
    (hg : Tendsto g l (𝓝 y)) (hy : y ≠ 0) :
    Tendsto (fun n => f n * g n) l (𝓝 <| x * y) ↔ Tendsto f l (𝓝 x)

{α : Type u_1}
{G₀ : Type u_3}
[GroupWithZero G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
[ContinuousMul G₀]
[T1Space G₀]
{f g : α → G₀}
{l : Filter α}
{x y : G₀}
(hg : Filter.Tendsto g l (𝓝 y))
(hy : y ≠ 0)

Filter.Tendsto (fun n => f n * g n) l (𝓝 (x * y)) ↔ Filter.Tendsto f l (𝓝 x)


@[to_additive]
theorem Nonempty.smul : s.Nonempty → t.Nonempty → (s • t).Nonempty

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{s : Set α}
{t : Set β}


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

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


theorem le_digits_len_le (b n m : ℕ) (h : n ≤ m) : (digits b n).length ≤ (digits b m).length

(b.digits n).length ≤ (b.digits m).length


@[simps! apply]
protected def Lp.constL (𝕜 : Type*) [NormedField 𝕜] [NormedSpace 𝕜 E] [Fact (1 ≤ p)] :
    E →L[𝕜] Lp E p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
(p : ℝ≥0∞)
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[MeasureTheory.IsFiniteMeasure μ]
(𝕜 : Type u_5)
[NormedField 𝕜]
[NormedSpace 𝕜 E]
[Fact (1 ≤ p)]
(a : E)

(MeasureTheory.Lp.constL p μ 𝕜) a = (MeasureTheory.Lp.const p μ) a


theorem chain_lt_range' (s n : Nat) {step} (h : 0 < step) :
    Chain (· < ·) s (range' (s + step) n step)

List.Chain (fun x x_1 => x < x_1) s (List.range' (s + step) n step)


@[to_additive]
theorem smulAntidiagonal_mono_left (h : s₁ ⊆ s₂) :
    smulAntidiagonal s₁ t a ⊆ smulAntidiagonal s₂ t a

{G : Type u_1}
{P : Type u_2}
[VAdd G P]
{s₁ s₂ : Set G}
{t : Set P}
{a : P}
(h : s₁ ⊆ s₂)

s₁.vaddAntidiagonal t a ⊆ s₂.vaddAntidiagonal t a


theorem bounded_le_iff_bounded_lt [Preorder α] [NoMaxOrder α] :
    Bounded (· ≤ ·) s ↔ Bounded (· < ·) s

{α : Type u_1}
{s : Set α}
[Preorder α]
[NoMaxOrder α]

Set.Bounded (fun x x_1 => x ≤ x_1) s ↔ Set.Bounded (fun x x_1 => x < x_1) s


@[simp]
theorem inf_nhds_atBot (a : α) : 𝓝 a ⊓ atBot = ⊥

{α : Type u}
[Preorder α]
[NoBotOrder α]
[TopologicalSpace α]
[ClosedIicTopology α]
(a : α)


lemma rnDeriv_tilted_right (μ ν : Measure α) [SigmaFinite μ] [SigmaFinite ν]
    (hf : Integrable (fun x ↦ exp (f x)) ν) :
    μ.rnDeriv (ν.tilted f)
      =ᵐ[ν] fun x ↦ ENNReal.ofReal (exp (- f x) * ∫ x, exp (f x) ∂ν) * μ.rnDeriv ν x

(hf : MeasureTheory.Integrable (fun x => rexp (f x)) ν)

μ.rnDeriv (ν.tilted f) =ᵐ[ν] fun x => ENNReal.ofReal (rexp (-f x) * ∫ (x : α), rexp (f x) ∂ν) * μ.rnDeriv ν x


theorem isOpenMap_ofMul : IsOpenMap (ofMul : X → Additive X)


theorem lt_two_mul_self [ZeroLEOneClass α] [MulPosStrictMono α] [NeZero (R := α) 1]
    [CovariantClass α α (· + ·) (· < ·)] (ha : 0 < a) : a < 2 * a

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


/-- `α ≃ β` is the type of functions from `α → β` with a two-sided inverse. -/
structure Equiv (α : Sort*) (β : Sort _) where
  protected toFun : α → β
  protected invFun : β → α
  protected left_inv : LeftInverse invFun toFun
  protected right_inv : RightInverse invFun toFun

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


theorem Filter.EventuallyEq.hasFDerivWithinAt_iff (h : f₀ =ᶠ[𝓝[s] x] f₁) (hx : f₀ x = f₁ x) :
    HasFDerivWithinAt f₀ f' s x ↔ HasFDerivWithinAt f₁ f' s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₀ f₁ : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
(h : f₀ =ᶠ[𝓝[s] x] f₁)
(hx : f₀ x = f₁ x)


/-- A basic equivalence `A ≅ B'` obtained by composing `eA : A ≅ A'` and `e' : A' ≅ B'`. -/
@[simps! functor inverse unitIso_hom_app]
def equivalence₀ : A ≌ 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')

(AlgebraicTopology.DoldKan.Compatibility.equivalence₀ eA e').inverse = e'.inverse ⋙ eA.inverse


@[simp] theorem symm_trans_self (e : α ≃ β) : e.symm.trans e = Equiv.refl β


/-- If a multivariate formal power series is invertible,
 then so is its constant coefficient. -/
theorem isUnit_constantCoeff (φ : MvPowerSeries σ R) (h : IsUnit φ) :
    IsUnit (constantCoeff σ R φ)

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
(φ : MvPowerSeries σ R)
(h : IsUnit φ)

IsUnit ((MvPowerSeries.constantCoeff σ R) φ)


theorem coeff_inv (n) (φ : k⟦X⟧) :
    coeff k n φ⁻¹ =
      if n = 0 then (constantCoeff k φ)⁻¹
      else
        -(constantCoeff k φ)⁻¹ *
          ∑ x ∈ antidiagonal n,
            if x.2 < n then coeff k x.1 φ * coeff k x.2 φ⁻¹ else 0

{k : Type u_2}
[Field k]
(n : ℕ)
(φ : PowerSeries k)

(PowerSeries.coeff k n) φ⁻¹ =
  if n = 0 then ((PowerSeries.constantCoeff k) φ)⁻¹
  else
    -((PowerSeries.constantCoeff k) φ)⁻¹ *
      ∑ x ∈ Finset.antidiagonal n, if x.2 < n then (PowerSeries.coeff k x.1) φ * (PowerSeries.coeff k x.2) φ⁻¹ else 0


@[to_additive (attr := simp)]
theorem pow_smul_mod_minimalPeriod (n : ℕ) :
    a ^ (n % minimalPeriod (a • ·) b) • b = a ^ n • b

{α : Type v}
{G : Type u}
[AddGroup G]
[AddAction G α]
(a : G)
(b : α)
(n : ℕ)

(n % Function.minimalPeriod (fun x => a +ᵥ x) b) • a +ᵥ b = n • a +ᵥ b


lemma Pi.map_ext (x y : F.obj (∏ᶜ f : C))
    (h : ∀ i, F.map (Pi.π f i) x = F.map (Pi.π f i) y) : x = y

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Discrete.functor f) F]

[CategoryTheory.Limits.HasProduct fun j => F.obj (f j)]

[CategoryTheory.Limits.PreservesLimitsOfShape CategoryTheory.Limits.WalkingCospan (CategoryTheory.forget D)]

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Discrete.functor fun b => F.obj (f b)) (CategoryTheory.forget D)]

(x y : (CategoryTheory.forget D).obj (F.obj (∏ᶜ f)))

(h : ∀ (i : J), (F.map (CategoryTheory.Limits.Pi.π f i)) x = (F.map (CategoryTheory.Limits.Pi.π f i)) y)


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps]
def coneEquivUnitIsoApp (c : Cone ((diagram U).op ⋙ F)) :
    (𝟭 (Cone ((diagram U).op ⋙ F))).obj c ≅
      (coneEquivFunctor F U ⋙ coneEquivInverse F U).obj c

(c : CategoryTheory.Limits.Cone ((CategoryTheory.Pairwise.diagram U).op ⋙ F))

(TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivUnitIsoApp F U c).inv.hom =
  𝟙
    ((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivFunctor F U ⋙
            TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivInverse F U).obj
        c).pt


theorem add_coeff_zero (x y : 𝕎 R) : (x + y).coeff 0 = x.coeff 0 + y.coeff 0

{p : ℕ}
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
(x y : 𝕎 R)


@[simp]
theorem map_coeSubmodule (h : ↑(map f I) = f '' I) :
    LieSubmodule.toSubmodule (map f I) = (LieSubmodule.toSubmodule I).map (f : L →ₗ[R] L')

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(f : L →ₗ⁅R⁆ L')
(I : LieIdeal R L)
(h : ↑(LieIdeal.map f I) = ⇑f '' ↑I)

↑(LieIdeal.map f I) = Submodule.map ↑f ↑I


/-- A CHSH tuple in a *-monoid consists of 4 self-adjoint involutions `A₀ A₁ B₀ B₁` such that
the `Aᵢ` commute with the `Bⱼ`.

The physical interpretation is that `A₀` and `A₁` are a pair of boolean observables which
are spacelike separated from another pair `B₀` and `B₁` of boolean observables.
-/
--@[nolint has_nonempty_instance] Porting note(#5171): linter not ported yet
structure IsCHSHTuple {R} [Monoid R] [StarMul R] (A₀ A₁ B₀ B₁ : R) : Prop where
  A₀_inv : A₀ ^ 2 = 1
  A₁_inv : A₁ ^ 2 = 1
  B₀_inv : B₀ ^ 2 = 1
  B₁_inv : B₁ ^ 2 = 1
  A₀_sa : star A₀ = A₀
  A₁_sa : star A₁ = A₁
  B₀_sa : star B₀ = B₀
  B₁_sa : star B₁ = B₁
  A₀B₀_commutes : A₀ * B₀ = B₀ * A₀
  A₀B₁_commutes : A₀ * B₁ = B₁ * A₀
  A₁B₀_commutes : A₁ * B₀ = B₀ * A₁
  A₁B₁_commutes : A₁ * B₁ = B₁ * A₁

{R : Type u_1}
[Monoid R]
[StarMul R]
{A₀ A₁ B₀ B₁ : R}
(self : IsCHSHTuple A₀ A₁ B₀ B₁)


@[to_additive support_prod_mk]
theorem mulSupport_prod_mk (f : α → M) (g : α → N) :
    (mulSupport fun x => (f x, g x)) = mulSupport f ∪ mulSupport g

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
[Zero M]
[Zero N]
(f : α → M)
(g : α → N)

(Function.support fun x => (f x, g x)) = Function.support f ∪ Function.support g


protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α)

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsLower α]


@[simp]
theorem length_bind (l : List α) (f : α → List β) :
    length (List.bind l f) = sum (map (length ∘ f) l)

{α : Type u_2}
{β : Type u_3}
(l : List α)
(f : α → List β)

(l.bind f).length = (List.map (List.length ∘ f) l).sum


nonrec theorem exp_add : exp (x + y) = exp x * exp y

Real.exp (x + y) = Real.exp x * Real.exp y


theorem IsCycle.isCycle_pow_pos_of_lt_prime_order [Finite β] {f : Perm β} (hf : IsCycle f)
    (hf' : (orderOf f).Prime) (n : ℕ) (hn : 0 < n) (hn' : n < orderOf f) : IsCycle (f ^ n)

{β : Type u_3}
[Finite β]
{f : Equiv.Perm β}
(hf : f.IsCycle)
(hf' : Nat.Prime (orderOf f))
(n : ℕ)
(hn : 0 < n)
(hn' : n < orderOf f)


@[simp]
theorem refl_trans (α : X ≅ Y) : Iso.refl X ≪≫ α = α

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


@[simp]
theorem mapMatrix_comp (f : β →ₐ[R] γ) (g : α →ₐ[R] β) :
    f.mapMatrix.comp g.mapMatrix = ((f.comp g).mapMatrix : Matrix m m α →ₐ[R] _)

{m : Type u_2}
{R : Type u_7}
{α : Type v}
{β : Type w}
{γ : Type u_9}
[Fintype m]
[DecidableEq m]
[CommSemiring R]
[Semiring α]
[Semiring β]
[Semiring γ]
[Algebra R α]
[Algebra R β]
[Algebra R γ]
(f : β →ₐ[R] γ)
(g : α →ₐ[R] β)

f.mapMatrix.comp g.mapMatrix = (f.comp g).mapMatrix


theorem cauchySeq_finset_iff_vanishing_norm {f : ι → E} :
    (CauchySeq fun s : Finset ι => ∑ i ∈ s, f i) ↔
      ∀ ε > (0 : ℝ), ∃ s : Finset ι, ∀ t, Disjoint t s → ‖∑ i ∈ t, f i‖ < ε

{ι : Type u_1}
{E : Type u_3}
[SeminormedAddCommGroup E]
{f : ι → E}

(CauchySeq fun s => ∑ i ∈ s, f i) ↔ ∀ ε > 0, ∃ s, ∀ (t : Finset ι), Disjoint t s → ‖∑ i ∈ t, f i‖ < ε


@[to_additive]
theorem smul_finset_inter : a • (s ∩ t) = a • s ∩ a • t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[AddGroup α]
[AddAction α β]
{s t : Finset β}
{a : α}


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

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


theorem RespectsIso.is_localization_away_iff (hP : RingHom.RespectsIso @P) {R S : Type u}
    (R' S' : Type u) [CommRing R] [CommRing S] [CommRing R'] [CommRing S'] [Algebra R R']
    [Algebra S S'] (f : R →+* S) (r : R) [IsLocalization.Away r R'] [IsLocalization.Away (f r) S'] :
    P (Localization.awayMap f r) ↔ P (IsLocalization.Away.map R' S' f r)

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


@[simp]
theorem mul_coeff_zero (p q : R[X]) : coeff (p * q) 0 = coeff p 0 * coeff q 0


theorem card_Ioc : (Ioc a b).card = if h : a.1 = b.1 then (Ioc (h.rec a.2) b.2).card else 0

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

(Finset.Ioc a b).card = if h : a.fst = b.fst then (Finset.Ioc (h ▸ a.snd) b.snd).card else 0


@[simp]
lemma Icc_inl_inr : Icc (inlₗ a) (inrₗ b) = ((Ici a).disjSum (Iic b)).map toLex.toEmbedding

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[OrderTop α]
[OrderBot β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a : α)
(b : β)

Finset.Icc (Sum.inlₗ a) (Sum.inrₗ b) = Finset.map toLex.toEmbedding ((Finset.Ici a).disjSum (Finset.Iic b))


@[simp]
theorem star_intCast_smul [Ring R] [AddCommGroup M] [Module R M] [StarAddMonoid M] (n : ℤ)
    (x : M) : star ((n : R) • x) = (n : R) • star x

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[StarAddMonoid M]
(n : ℤ)
(x : M)


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the left side and `g` on the right side. -/
@[simps!]
def fromArrowArrowFunctor : Arrow (Arrow C) ⥤ Square C

(f : CategoryTheory.Arrow (CategoryTheory.Arrow C))

(CategoryTheory.Square.fromArrowArrowFunctor.obj f).X₄ = f.right.right


@[simp, norm_cast] lemma imJ_nnratCast (q : ℚ≥0) : (q : ℍ[R]).imJ = 0

{R : Type u_1}
[LinearOrderedField R]
(q : ℚ≥0)


@[simp, norm_cast]
theorem coe_C (a : R) : ((C a : MvPolynomial σ R) : MvPowerSeries σ R) = MvPowerSeries.C σ R a

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(a : R)

↑(MvPolynomial.C a) = (MvPowerSeries.C σ R) a


/-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C

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


theorem lift_word_prod_nontrivial_of_not_empty {i j} (w : NeWord H i j) : lift f w.prod ≠ 1

(hcard : 3 ≤ Cardinal.mk ι ∨ ∃ i, 3 ≤ Cardinal.mk (H i))

(hXnonempty : ∀ (i : ι), (X i).Nonempty)

(hXdisj : Pairwise fun i j => Disjoint (X i) (X j))

(hpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → (f i) h • X j ⊆ X i)


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem toFinset_nonempty : s.toFinset.Nonempty ↔ s ≠ 0

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


lemma le_rpow_inv_iff_of_pos (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x ≤ y ^ z⁻¹ ↔ x ^ z ≤ y


lemma isSFiniteKernel_const [Nonempty α] {μβ : Measure β} :
    IsSFiniteKernel (const α μβ) ↔ SFinite μβ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
[Nonempty α]
{μβ : MeasureTheory.Measure β}

ProbabilityTheory.IsSFiniteKernel (ProbabilityTheory.Kernel.const α μβ) ↔ MeasureTheory.SFinite μβ


theorem exists_range_iff {f : α →ₛ β} {p : β → Prop} : (∃ y ∈ f.range, p y) ↔ ∃ x, p (f x)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{f : MeasureTheory.SimpleFunc α β}
{p : β → Prop}


/-- The natural isomorphism (in `Karoubi (ChainComplex C ℕ)`) between the chain complex
of nondegenerate simplices of a split simplicial object and the normalized Moore complex
defined as a formal direct factor of the alternating face map complex. -/
@[simps!]
noncomputable def toKaroubiNondegComplexFunctorIsoN₁ :
    nondegComplexFunctor ⋙ toKaroubi (ChainComplex C ℕ) ≅ forget C ⋙ DoldKan.N₁

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(X : SimplicialObject.Split C)
(n : ℕ)

(SimplicialObject.Split.toKaroubiNondegComplexFunctorIsoN₁.inv.app X).f.f n =
  X.s.πSummand (SimplicialObject.Splitting.IndexSet.id (Opposite.op [n]))


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

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


/--
For any `I : RingCon R`, when we view it as an ideal, `I.subtype` is the injective `R`-linear map
`I → R`.
-/
@[simps]
def subtype : I →ₗ[R] R

{R : Type u_1}
[Ring R]
(I : TwoSidedIdeal R)
(x : ↥I)


/-- Applying a linear map at `v : M`, seen as a linear map from `M →ₗ[R] M₂` to `M₂`.
See also `LinearMap.applyₗ'` for a version that works with two different semirings.

This is the `LinearMap` version of `toAddMonoidHom.eval`. -/
@[simps]
def applyₗ : M →ₗ[R] (M →ₗ[R] M₂) →ₗ[R] M₂

{R : Type u_1}
{M : Type u_5}
{M₂ : Type u_7}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(v : M)
(f : M →ₗ[R] M₂)


theorem setLIntegral_congr_fun {f g : α → ℝ≥0∞} {s : Set α} (hs : MeasurableSet s)
    (hfg : ∀ᵐ x ∂μ, x ∈ s → f x = g x) : ∫⁻ x in s, f x ∂μ = ∫⁻ x in s, g x ∂μ

(hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → f x = g x)

∫⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α) in s, g x ∂μ


theorem not_isLeft {x : α ⊕ β} : ¬x.isLeft ↔ x.isRight

{α : Type u_1}
{β : Type u_2}
{x : α ⊕ β}


theorem surjective_coord [Nontrivial ι] (i : ι) : Function.Surjective <| b.coord i

{ι : Type u_1}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
[Nontrivial ι]
(i : ι)


@[to_additive]
theorem uniformContinuous_mul : UniformContinuous fun p : α × α => p.1 * p.2

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]


theorem Basis'.insert_not_indep (hI : M.Basis' I X) (he : e ∈ X \ I) : ¬ M.Indep (insert e I)

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
{e : α}
(hI : M.Basis' I X)
(he : e ∈ X \ I)


theorem WOppSide.nonempty {s : AffineSubspace R P} {x y : P} (h : s.WOppSide x y) :
    (s : Set P).Nonempty

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
(h : s.WOppSide x y)


theorem SupPrime.le_sup (ha : SupPrime a) : a ≤ b ⊔ c ↔ a ≤ b ∨ a ≤ c

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


theorem btw_coe_iff' {x₁ x₂ x₃ : α} :
    Btw.btw (x₁ : α ⧸ AddSubgroup.zmultiples p) x₂ x₃ ↔
      toIcoMod hp'.out 0 (x₂ - x₁) ≤ toIocMod hp'.out 0 (x₃ - x₁)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
[hp' : Fact (0 < p)]
{x₁ x₂ x₃ : α}

btw ↑x₁ ↑x₂ ↑x₃ ↔ toIcoMod ⋯ 0 (x₂ - x₁) ≤ toIocMod ⋯ 0 (x₃ - x₁)


@[simp, norm_cast]
theorem coe_rpow (x : ℝ≥0) (y : ℝ) : ((x ^ y : ℝ≥0) : ℝ) = (x : ℝ) ^ y


@[simp] theorem min_some_none [Min α] {a : α} : min (some a) none = some a


lemma rpow_mul_intCast (hx : 0 ≤ x) (y : ℝ) (n : ℤ) : x ^ (y * n) = (x ^ y) ^ n


@[simp]
theorem insert_infty_range_coe : insert ∞ (range (@some X)) = univ

insert OnePoint.infty (Set.range OnePoint.some) = Set.univ


theorem single_eq_lof (i : ι) (b : M i) : DFinsupp.single i b = lof R ι M i b

(R : Type u)
[Semiring R]
{ι : Type v}
[dec_ι : DecidableEq ι]
{M : ι → Type w}
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
(i : ι)
(b : M i)

DFinsupp.single i b = (DirectSum.lof R ι M i) b


theorem smul_sphere' {c : 𝕜} (hc : c ≠ 0) (x : E) (r : ℝ) :
    c • sphere x r = sphere (c • x) (‖c‖ * r)

{𝕜 : Type u_1}
{E : Type u_2}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{c : 𝕜}
(hc : c ≠ 0)
(x : E)
(r : ℝ)

c • Metric.sphere x r = Metric.sphere (c • x) (‖c‖ * r)


theorem natCast (n x : ℕ) : (x : PerfectClosure K p) = mk K p (n, x)

(K : Type u)
[CommRing K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(n x : ℕ)


/-- Constructs an ordered module given an `OrderedAddCommGroup`, a cone, and a proof that
the order relation is the one defined by the cone.
-/
theorem to_orderedSMul (S : ConvexCone 𝕜 E) (h : ∀ x y : E, x ≤ y ↔ y - x ∈ S) : OrderedSMul 𝕜 E

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedField 𝕜]
[OrderedAddCommGroup E]
[Module 𝕜 E]
(S : ConvexCone 𝕜 E)
(h : ∀ (x y : E), x ≤ y ↔ y - x ∈ S)


theorem HasGradientWithinAt.continuousWithinAt (h : HasGradientWithinAt f f' s x) :
    ContinuousWithinAt f s x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
{s : Set F}
(h : HasGradientWithinAt f f' s x)


@[to_additive (attr := simp)]
theorem edist_smul_left [SMul M X] [IsometricSMul M X] (c : M) (x y : X) :
    edist (c • x) (c • y) = edist x y

{M : Type u}
{X : Type w}
[PseudoEMetricSpace X]
[SMul M X]
[IsometricSMul M X]
(c : M)
(x y : X)


@[simp]
theorem op_zsmul {X Y : C} (k : ℤ) (f : X ⟶ Y) : (k • f).op = k • f.op

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


@[simp]
theorem fst_vadd (v : G × G') (p : P × P') : (v +ᵥ p).1 = v.1 +ᵥ p.1

{G : Type u_1}
{G' : Type u_2}
{P : Type u_3}
{P' : Type u_4}
[AddGroup G]
[AddGroup G']
[AddTorsor G P]
[AddTorsor G' P']
(v : G × G')
(p : P × P')


theorem sourceAffineLocally_respectsIso (h₁ : RingHom.RespectsIso P) :
    (sourceAffineLocally P).toProperty.RespectsIso

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

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

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


@[simp]
theorem pullbackIsoPullback_inv_snd :
    (pullbackIsoPullback f g).inv ≫ pullback.snd _ _ = fun p => (p.1 : X × Y).snd

{X Y Z : Type u}
(f : X ⟶ Z)
(g : Y ⟶ Z)

(CategoryTheory.Limits.Types.pullbackIsoPullback f g).inv ≫ CategoryTheory.Limits.pullback.snd f g = fun p => (↑p).2


theorem iunfoldr_replace_snd
  {f : Fin w → α → α × Bool} (state : Nat → α) (value : BitVec w) (a : α)
    (init : state 0 = a)
    (step : ∀(i : Fin w), f i (state i.val) = (state (i.val+1), value.getLsb i.val)) :
    (iunfoldr f a).snd = value

(step : ∀ (i : Fin w), f i (state ↑i) = (state (↑i + 1), value.getLsb ↑i))


/-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [HasOrthogonalProjection K]
    {v : E} (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K : Submodule 𝕜 E}
[HasOrthogonalProjection K]
{v : E}
(hv : v ∈ Kᗮ)


/-- The identity map as `G →+c[a, a] G`. -/
@[simps (config := .asFn)]
protected def id : G →+c[a, a] G


theorem M.bisim_lemma {α : TypeVec n} {a₁ : (mp P).A} {f₁ : (mp P).B a₁ ⟹ α} {a' : P.A}
    {f' : (P.B a').drop ⟹ α} {f₁' : (P.B a').last → M P α}
    (e₁ : M.dest P ⟨a₁, f₁⟩ = ⟨a', splitFun f' f₁'⟩) :
    ∃ (g₁' : _)(e₁' : PFunctor.M.dest a₁ = ⟨a', g₁'⟩),
      f' = M.pathDestLeft P e₁' f₁ ∧
        f₁' = fun x : (last P).B a' => ⟨g₁' x, M.pathDestRight P e₁' f₁ x⟩

(e₁ : MvPFunctor.M.dest P ⟨a₁, f₁⟩ = ⟨a', TypeVec.splitFun f' f₁'⟩)

∃ g₁',
  ∃ (e₁' : PFunctor.M.dest a₁ = ⟨a', g₁'⟩),
    f' = MvPFunctor.M.pathDestLeft P e₁' f₁ ∧ f₁' = fun x => ⟨g₁' x, MvPFunctor.M.pathDestRight P e₁' f₁ x⟩


/-- If `S' = S ⊗[R] R'`, then any pair of `R`-algebra homomorphisms `f : S → A` and `g : R' → A`
such that `f x` and `g y` commutes for all `x, y` descends to a (unique) homomorphism `S' → A`.
-/
@[simps! (config := .lemmasOnly) apply]
noncomputable def Algebra.pushoutDesc [H : Algebra.IsPushout R S R' S'] {A : Type*} [Semiring A]
    [Algebra R A] (f : S →ₐ[R] A) (g : R' →ₐ[R] A) (hf : ∀ x y, f x * g y = g y * f x) :
    S' →ₐ[R] A

(hf : ∀ (x : S) (y : R'), f x * g y = g y * f x)

(Algebra.pushoutDesc S' f g hf) a = (⋯.lift g.toLinearMap) a


@[reassoc (attr := simp)]
lemma isoOfHom_hom_inv_id {X Y : C} (f : X ⟶ Y) (hf : W f) :
    L.map f ≫ (isoOfHom L W f hf).inv = 𝟙 _

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
{X Y : C}
(f : X ⟶ Y)
(hf : W f)

CategoryTheory.CategoryStruct.comp (L.map f) (CategoryTheory.Localization.isoOfHom L W f hf).inv =
  CategoryTheory.CategoryStruct.id (L.obj X)


protected theorem smul_mem {x : A} (hx : x ∈ S) (r : R) : r • x ∈ S

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
(S : StarSubalgebra R A)
{x : A}
(hx : x ∈ S)
(r : R)


theorem coe_of_apply {M S : Type*} [DecidableEq ι] [AddCommMonoid M] [SetLike S M]
    [AddSubmonoidClass S M] {A : ι → S} (i j : ι) (x : A i) :
    (of (fun i ↦ {x // x ∈ A i}) i x j : M) = if i = j then x else 0

{ι : Type v}
{M : Type u_1}
{S : Type u_2}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike S M]
[AddSubmonoidClass S M]
{A : ι → S}
(i j : ι)
(x : ↥(A i))

↑(((DirectSum.of (fun i => ↥(A i)) i) x) j) = ↑(if i = j then x else 0)


/-- The nilpotency class of a quotient of `G` is less or equal the nilpotency class of `G` -/
theorem nilpotencyClass_quotient_le (H : Subgroup G) [H.Normal] [_h : IsNilpotent G] :
    Group.nilpotencyClass (G ⧸ H) ≤ Group.nilpotencyClass G

{G : Type u_1}
[Group G]
(H : Subgroup G)
[H.Normal]
[_h : Group.IsNilpotent G]


protected theorem Embedding.t3Space [TopologicalSpace Y] [T3Space Y] {f : X → Y}
    (hf : Embedding f) : T3Space X

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


/-- Additivity of a continuous multilinear map along all coordinates at the same time,
writing `f (m + m')` as the sum of `f (s.piecewise m m')` over all sets `s`. -/
theorem map_add_univ [DecidableEq ι] [Fintype ι] (m m' : ∀ i, M₁ i) :
    f (m + m') = ∑ s : Finset ι, f (s.piecewise m m')

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
(f : ContinuousMultilinearMap R M₁ M₂)
[DecidableEq ι]
[Fintype ι]
(m m' : (i : ι) → M₁ i)


@[simp]
theorem coe_positive : ↑(positive 𝕜 E) = Set.Ici (0 : E)

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


/-- The volume of the region between two almost everywhere measurable functions on a measurable set
    can be represented as a Lebesgue integral. -/
theorem volume_regionBetween_eq_lintegral [SFinite μ] (hf : AEMeasurable f (μ.restrict s))
    (hg : AEMeasurable g (μ.restrict s)) (hs : MeasurableSet s) :
    μ.prod volume (regionBetween f g s) = ∫⁻ y in s, ENNReal.ofReal ((g - f) y) ∂μ

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{f g : α → ℝ}
{s : Set α}
[MeasureTheory.SFinite μ]
(hf : AEMeasurable f (μ.restrict s))
(hg : AEMeasurable g (μ.restrict s))
(hs : MeasurableSet s)

(μ.prod MeasureTheory.volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ENNReal.ofReal ((g - f) y) ∂μ


protected theorem sub_self_add (n m : Nat) : n - (n + m) = 0


/-- If for each `x : α`, exactly one of `g • x`, `g : G`, belongs to a measurable set `s`, then `s`
is a fundamental domain for the action of `G` on `α`. -/
@[to_additive "If for each `x : α`, exactly one of `g +ᵥ x`, `g : G`, belongs to a measurable set
`s`, then `s` is a fundamental domain for the additive action of `G` on `α`."]
theorem mk' (h_meas : NullMeasurableSet s μ) (h_exists : ∀ x : α, ∃! g : G, g • x ∈ s) :
    IsFundamentalDomain G s μ

(h_meas : MeasureTheory.NullMeasurableSet s μ)


/-- **Phragmen-Lindelöf principle** in a strip `U = {z : ℂ | a < re z < b}`.
Let `f : ℂ → E` be a function such that

* `f` is differentiable on `U` and is continuous on its closure;
* `‖f z‖` is bounded from above by `A * exp(B * exp(c * |im z|))` on `U` for some `c < π / (b - a)`;
* `f z = 0` on the boundary of `U`.

Then `f` is equal to zero on the closed strip `{z : ℂ | a ≤ re z ≤ b}`.
-/
theorem eq_zero_on_vertical_strip (hd : DiffContOnCl ℂ f (re ⁻¹' Ioo a b))
    (hB : ∃ c < π / (b - a), ∃ B, f =O[comap (_root_.abs ∘ im) atTop ⊓ 𝓟 (re ⁻¹' Ioo a b)]
      fun z ↦ expR (B * expR (c * |z.im|)))
    (ha : ∀ z : ℂ, re z = a → f z = 0) (hb : ∀ z : ℂ, re z = b → f z = 0) :
    EqOn f 0 (re ⁻¹' Icc a b)

(hd : DiffContOnCl ℂ f (Complex.re ⁻¹' Set.Ioo a b))

(hB :
  ∃ c < π / (b - a),
    ∃ B,
      f =O[Filter.comap (abs ∘ Complex.im) Filter.atTop ⊓ 𝓟 (Complex.re ⁻¹' Set.Ioo a b)] fun z =>
        expR (B * expR (c * |z.im|)))

Set.EqOn f 0 (Complex.re ⁻¹' Set.Icc a b)


@[simp]
theorem toDual_natCast [NatCast α] (n : ℕ) : toDual (n : α) = n


@[measurability]
protected theorem neg [AddGroup β] [TopologicalAddGroup β] (hf : FinStronglyMeasurable f μ) :
    FinStronglyMeasurable (-f) μ

(hf : MeasureTheory.FinStronglyMeasurable f μ)


nonrec theorem IsLocalExtr.comp_mono (hf : IsLocalExtr f a) {g : β → γ} (hg : Monotone g) :
    IsLocalExtr (g ∘ f) a

{α : Type u}
{β : Type v}
{γ : Type w}
[TopologicalSpace α]
[Preorder β]
[Preorder γ]
{f : α → β}
{a : α}
(hf : IsLocalExtr f a)
{g : β → γ}
(hg : Monotone g)


theorem measure_eq_iInf (s : Set α) : μ s = ⨅ (t) (_ : s ⊆ t) (_ : MeasurableSet t), μ t

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
(s : Set α)

μ s = ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), μ t


@[to_additive (attr := simp)] theorem multipliable_extend_one {g : β → γ} (hg : Injective g) :
    Multipliable (extend g f 1) ↔ Multipliable f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{g : β → γ}
(hg : Function.Injective g)

Summable (Function.extend g f 0) ↔ Summable f


lemma Module.annihilator_le_of_mem_support (hp : p ∈ Module.support R M) :
    Module.annihilator R M ≤ p.asIdeal

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{p : PrimeSpectrum R}
(hp : p ∈ Module.support R M)


@[to_additive]
theorem some_mul_some [Mul α] (a b : α) : some a * some b = some (a * b)

Part.some a + Part.some b = Part.some (a + b)


@[simp]
theorem Ico_filter_le (a b c : α) : ((Ico a b).filter fun x => c ≤ x) = Ico (max a c) b

{α : Type u_2}
[LinearOrder α]
[LocallyFiniteOrder α]
(a b c : α)

Finset.filter (fun x => c ≤ x) (Finset.Ico a b) = Finset.Ico (max a c) b


@[to_additive]
theorem ne_one_of_map {R S F : Type*} [One R] [One S] [FunLike F R S] [OneHomClass F R S]
    {f : F} {x : R} (hx : f x ≠ 1) : x ≠ 1

{R : Type u_10}
{S : Type u_11}
{F : Type u_12}
[One R]
[One S]
[FunLike F R S]
[OneHomClass F R S]
{f : F}
{x : R}
(hx : f x ≠ 1)


theorem gcd_eq_right {m n : Nat} (H : n ∣ m) : gcd m n = n


theorem Integrable.neg {f : α →ₘ[μ] β} : Integrable f → Integrable (-f)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : α →ₘ[μ] β}


theorem nfpFamily_eq_sup (f : ι → Ordinal.{max u v} → Ordinal.{max u v}) (a : Ordinal.{max u v}) :
    nfpFamily.{u, v} f a = sup.{u, v} (List.foldr f a)

Ordinal.nfpFamily f a = Ordinal.sup (List.foldr f a)


@[simp]
theorem image_add_const_Ici : (fun x => x + a) '' Ici b = Ici (b + a)

{M : Type u_1}
[OrderedCancelAddCommMonoid M]
[ExistsAddOfLE M]
(a b : M)

(fun x => x + a) '' Set.Ici b = Set.Ici (b + a)


@[simp]
theorem comp_codRestrict (p : Submodule R₃ M₃) (h : ∀ b, g b ∈ p) :
    ((codRestrict p g h).comp f : M →ₛₗ[σ₁₃] p) = codRestrict p (g.comp f) fun _ => h _

{R : Type u_1}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M : Type u_5}
{M₂ : Type u_7}
{M₃ : Type u_8}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R₂ M₂]
[Module R₃ M₃]
{σ₁₂ : R →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
(f : M →ₛₗ[σ₁₂] M₂)
(g : M₂ →ₛₗ[σ₂₃] M₃)
(p : Submodule R₃ M₃)
(h : ∀ (b : M₂), g b ∈ p)

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


protected theorem measurableSet_lt' [TopologicalSpace ι] [OrderTopology ι]
    [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
    MeasurableSet[hτ.measurableSpace] {ω | τ ω < i}

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


theorem coe_monoidHom_refl : (RingEquiv.refl R : R →* R) = MonoidHom.id R


theorem spanFinBasis.span : ⊤ ≤ Submodule.span ℤ (Set.range (spanFinBasis C s))

{I : Type u}
[LinearOrder I]
(C : Set (I → Bool))
(s : Finset I)

⊤ ≤ Submodule.span ℤ (Set.range (Profinite.NobelingProof.spanFinBasis C s))


theorem StrictAnti.minimal_of_maximal_image (hf : StrictAnti f) {a} (hmax : ∀ p, p ≤ f a) (x : α) :
    a ≤ x

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
(hf : StrictAnti f)
{a : α}
(hmax : ∀ (p : β), p ≤ f a)
(x : α)


@[to_additive IsOpen.right_addCoset]
theorem IsOpen.rightCoset {U : Set G} (h : IsOpen U) (x : G) : IsOpen (op x • U)

{G : Type w}
[TopologicalSpace G]
[Group G]
[ContinuousMul G]
{U : Set G}
(h : IsOpen U)
(x : G)


theorem wittPolyProdRemainder_vars (n : ℕ) :
    (wittPolyProdRemainder p n).vars ⊆ univ ×ˢ range n

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)

(WittVector.wittPolyProdRemainder p n).vars ⊆ Finset.univ ×ˢ Finset.range n


theorem join_map_dirac (μ : Measure α) : join (map dirac μ) = μ

{α : Type u_1}
[MeasurableSpace α]
(μ : MeasureTheory.Measure α)

(MeasureTheory.Measure.map MeasureTheory.Measure.dirac μ).join = μ


/-- Post-composition by a uniformly continuous function is uniformly continuous for the
uniform structures of `𝔖`-convergence.

More precisely, if `f : γ → β` is uniformly continuous, then
`(fun g ↦ f ∘ g) : (α →ᵤ[𝔖] γ) → (α →ᵤ[𝔖] β)` is uniformly continuous. -/
protected theorem postcomp_uniformContinuous [UniformSpace γ] {f : γ → β}
    (hf : UniformContinuous f) : UniformContinuous (ofFun 𝔖 ∘ (f ∘ ·) ∘ toFun 𝔖)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[UniformSpace β]
{𝔖 : Set (Set α)}
[UniformSpace γ]
{f : γ → β}
(hf : UniformContinuous f)

UniformContinuous (⇑(UniformOnFun.ofFun 𝔖) ∘ (fun x => f ∘ x) ∘ ⇑(UniformOnFun.toFun 𝔖))


/-- A nonempty separable space admits a sequence with dense range. Instead of running `cases` on the
conclusion of this lemma, you might want to use `TopologicalSpace.denseSeq` and
`TopologicalSpace.denseRange_denseSeq`.

If `α` might be empty, then `TopologicalSpace.exists_countable_dense` is the main way to use
separability of `α`. -/
theorem exists_dense_seq [SeparableSpace α] [Nonempty α] : ∃ u : ℕ → α, DenseRange u

(α : Type u)
[t : TopologicalSpace α]
[TopologicalSpace.SeparableSpace α]
[Nonempty α]


@[simp]
theorem unitors_inv_equal : (λ_ (𝟙 a)).inv = (ρ_ (𝟙 a)).inv

{B : Type u}
[CategoryTheory.Bicategory B]
{a : B}

(CategoryTheory.Bicategory.leftUnitor (CategoryTheory.CategoryStruct.id a)).inv =
  (CategoryTheory.Bicategory.rightUnitor (CategoryTheory.CategoryStruct.id a)).inv


theorem rank_sup_eq_rank_right_mul_rank_of_free :
    Module.rank R ↥(A ⊔ B) = Module.rank R B * Module.rank B (Algebra.adjoin B (A : Set S))

[Module.Free ↥B ↥(Algebra.adjoin ↥B ↑A)]

Module.rank R ↥(A ⊔ B) = Module.rank R ↥B * Module.rank ↥B ↥(Algebra.adjoin ↥B ↑A)


@[simp]
theorem lookupAll_cons_eq (l) (a : α) (b : β a) : lookupAll a (⟨a, b⟩ :: l) = b :: lookupAll a l

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

List.lookupAll a (⟨a, b⟩ :: l) = b :: List.lookupAll a l


theorem isometry_lpMeasSubgroupToLpTrim [hp : Fact (1 ≤ p)] (hm : m ≤ m0) :
    Isometry (lpMeasSubgroupToLpTrim F p μ hm)

{α : Type u_1}
{F : Type u_3}
{p : ℝ≥0∞}
[NormedAddCommGroup F]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[hp : Fact (1 ≤ p)]
(hm : m ≤ m0)

Isometry (MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm)


theorem matPolyEquiv_coeff_apply_aux_2 (i j : n) (p : R[X]) (k : ℕ) :
    coeff (matPolyEquiv (stdBasisMatrix i j p)) k = stdBasisMatrix i j (coeff p k)

{R : Type u_1}
[CommSemiring R]
{n : Type w}
[DecidableEq n]
[Fintype n]
(i j : n)
(p : R[X])
(k : ℕ)

(matPolyEquiv (Matrix.stdBasisMatrix i j p)).coeff k = Matrix.stdBasisMatrix i j (p.coeff k)


/-- `normalClosure` as a `ClosureOperator`. -/
@[simps]
noncomputable def closureOperator : ClosureOperator (IntermediateField F L)

(F : Type u_1)
(L : Type u_3)
[Field F]
[Field L]
[Algebra F L]
[Normal F L]
(K : IntermediateField F L)

(IntermediateField.closureOperator F L) K = normalClosure F (↥K) L


theorem separable_prod_X_sub_C_iff' {ι : Sort _} {f : ι → F} {s : Finset ι} :
    (∏ i ∈ s, (X - C (f i))).Separable ↔ ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y

{F : Type u}
[Field F]
{ι : Type u_1}
{f : ι → F}
{s : Finset ι}

(∏ i ∈ s, (Polynomial.X - Polynomial.C (f i))).Separable ↔ ∀ x ∈ s, ∀ y ∈ s, f x = f y → x = y


theorem u_unique {l' : α → β} {u' : β → α} (gc' : GaloisConnection l' u') (hl : ∀ a, l a = l' a)
    {b : β} : u b = u' b

{α : Type u}
{β : Type v}
[PartialOrder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{l' : α → β}
{u' : β → α}
(gc' : GaloisConnection l' u')
(hl : ∀ (a : α), l a = l' a)
{b : β}


theorem image_image₂ (f : α → β → γ) (g : γ → δ) :
    (image₂ f s t).image g = image₂ (fun a b => g (f a b)) s t

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{δ : Type u_7}
[DecidableEq γ]
[DecidableEq δ]
{s : Finset α}
{t : Finset β}
(f : α → β → γ)
(g : γ → δ)

Finset.image g (Finset.image₂ f s t) = Finset.image₂ (fun a b => g (f a b)) s t


/-- The distance from the orthocenter to the reflection of the
circumcenter in a side equals the circumradius, variant using a
`Finset`. -/
theorem dist_orthocenter_reflection_circumcenter_finset (t : Triangle ℝ P) {i₁ i₂ : Fin 3}
    (h : i₁ ≠ i₂) :
    dist t.orthocenter
        (reflection (affineSpan ℝ (t.points '' ↑({i₁, i₂} : Finset (Fin 3)))) t.circumcenter) =
      t.circumradius

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(t : Affine.Triangle ℝ P)
{i₁ i₂ : Fin 3}
(h : i₁ ≠ i₂)

dist t.orthocenter
    ((EuclideanGeometry.reflection (affineSpan ℝ (t.points '' ↑{i₁, i₂}))) (Affine.Simplex.circumcenter t)) =
  Affine.Simplex.circumradius t


@[to_additive]
theorem div_eq_div_iff_mul_eq_mul : a / b = c / d ↔ a * d = c * b

{G : Type u_3}
[AddCommGroup G]
{a b c d : G}


@[simp]
theorem map_C : (C a).map f = C (f a)

{R : Type u}
{S : Type v}
{a : R}
[Semiring R]
[Semiring S]
(f : R →+* S)

Polynomial.map f (Polynomial.C a) = Polynomial.C (f a)


theorem card_le_five : card {a, b, c, d, e} ≤ 5

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


@[simp]
theorem mem_range {f : M →[L] N} {x} : x ∈ range f ↔ ∃ y, f y = x

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f : L.Hom M N}
{x : N}


@[simp]
theorem pointReflection_self (x : P) : pointReflection 𝕜 x x = x

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x : P)

(AffineIsometryEquiv.pointReflection 𝕜 x) x = x


theorem prod_swap : map Prod.swap (μ.prod ν) = ν.prod μ

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

MeasureTheory.Measure.map Prod.swap (μ.prod ν) = ν.prod μ


theorem isInvariant_iff_image : IsInvariant ϕ s ↔ ∀ t, ϕ t '' s ⊆ s

{τ : Type u_1}
{α : Type u_2}
(ϕ : τ → α → α)
(s : Set α)

IsInvariant ϕ s ↔ ∀ (t : τ), ϕ t '' s ⊆ s


theorem homothety_invOf_two {R : Type*} {V P : Type*} [CommRing R] [Invertible (2 : R)]
    [AddCommGroup V] [Module R V] [AddTorsor V P] (a b : P) :
    homothety a (⅟ 2 : R) b = midpoint R a b

{R : Type u_1}
{V : Type u_2}
{P : Type u_3}
[CommRing R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(a b : P)

(AffineMap.homothety a ⅟2) b = midpoint R a b


@[mono]
theorem cliqueSet_mono (h : G ≤ H) : G.cliqueSet n ⊆ H.cliqueSet n

{α : Type u_1}
{G H : SimpleGraph α}
{n : ℕ}
(h : G ≤ H)


@[simp]
theorem cospanCompIso_hom_app_one : (cospanCompIso F f g).hom.app WalkingCospan.one = 𝟙 _

{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 ⟶ Z)
(g : Y ⟶ Z)

(CategoryTheory.Limits.cospanCompIso F f g).hom.app CategoryTheory.Limits.WalkingCospan.one =
  𝟙 ((CategoryTheory.Limits.cospan f g ⋙ F).obj CategoryTheory.Limits.WalkingCospan.one)


theorem finite_toSet_toFinset (s : Finset α) : s.finite_toSet.toFinset = s


@[simp]
theorem comp_id (η : ApplicativeTransformation F G) : η.comp idTransformation = η

{F : Type u → Type v}
[Applicative F]
{G : Type u → Type w}
[Applicative G]
(η : ApplicativeTransformation F G)

η.comp ApplicativeTransformation.idTransformation = η


theorem le_iSup₂_of_le {f : ∀ i, κ i → α} (i : ι) (j : κ i) (h : a ≤ f i j) :
    a ≤ ⨆ (i) (j), f i j

{α : Type u_1}
{ι : Sort u_5}
{κ : ι → Sort u_7}
[CompleteLattice α]
{a : α}
{f : (i : ι) → κ i → α}
(i : ι)
(j : κ i)
(h : a ≤ f i j)


theorem Codisjoint.mono_right : b ≤ c → Codisjoint a b → Codisjoint a c

{α : Type u_1}
[PartialOrder α]
[OrderTop α]
{a b c : α}


theorem cons_swap (a b : α) (s : Multiset α) : a ::ₘ b ::ₘ s = b ::ₘ a ::ₘ s

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


@[to_additive (attr := simp)]
lemma UniformOnFun.toFun_one [One β] : toFun 𝔖 (1 : α →ᵤ[𝔖] β) = 1

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
[One β]


theorem not_isMax_iff_ne_top : ¬IsMax a ↔ a ≠ ⊤

{α : Type u}
[PartialOrder α]
[OrderTop α]
{a : α}


theorem exists_lsub_cof (o : Ordinal) :
    ∃ (ι : _) (f : ι → Ordinal), lsub.{u, u} f = o ∧ #ι = cof o


@[simp]
theorem iteratedDeriv_zero : iteratedDeriv 0 f = f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}


@[simp]
theorem coe_toMultiplicative_range {A A' : Type*} [AddGroup A] [AddGroup A'] (f : A →+ A') :
    (AddMonoidHom.toMultiplicative f).range = AddSubgroup.toSubgroup f.range

{A : Type u_7}
{A' : Type u_8}
[AddGroup A]
[AddGroup A']
(f : A →+ A')


theorem convexOn_dist (z : E) (hs : Convex ℝ s) : ConvexOn ℝ s fun z' => dist z' z

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
(z : E)
(hs : Convex ℝ s)


theorem lf_of_moveRight_le {x y : PGame} {j} (h : x.moveRight j ≤ y) : x ⧏ y

{x y : SetTheory.PGame}
{j : x.RightMoves}
(h : x.moveRight j ≤ y)


@[simp] theorem reverse_insert [inst : @OrientedCmp α cmp] {t : RBNode α} :
    (insert cmp t x).reverse = insert (flip cmp) t.reverse x

{α : Type u_1}
{cmp : α → α → Ordering}
{x : α}
[inst : Batteries.OrientedCmp cmp]
{t : Batteries.RBNode α}

(Batteries.RBNode.insert cmp t x).reverse = Batteries.RBNode.insert (flip cmp) t.reverse x


/-- Orthogonal projection is idempotent. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem orthogonalProjection_orthogonalProjection (s : AffineSubspace ℝ P) [Nonempty s]
    [HasOrthogonalProjection s.direction] (p : P) :
    orthogonalProjection s (orthogonalProjection s p) = orthogonalProjection s p

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

(EuclideanGeometry.orthogonalProjection s) ↑((EuclideanGeometry.orthogonalProjection s) p) =
  (EuclideanGeometry.orthogonalProjection s) p


/-- Use linearity of `cramer` to take it out of a summation. -/
theorem sum_cramer {β} (s : Finset β) (f : β → n → α) :
    (∑ x ∈ s, cramer A (f x)) = cramer A (∑ x ∈ s, f x)

{n : Type v}
{α : Type w}
[DecidableEq n]
[Fintype n]
[CommRing α]
(A : Matrix n n α)
{β : Type u_1}
(s : Finset β)
(f : β → n → α)

∑ x ∈ s, A.cramer (f x) = A.cramer (∑ x ∈ s, f x)


theorem covBy_sup_of_inf_covBy_of_inf_covBy_right : a ⊓ b ⋖ a → a ⊓ b ⋖ b → b ⋖ a ⊔ b

{α : Type u_1}
[Lattice α]
[IsWeakUpperModularLattice α]
{a b : α}


/-- The localization of an integral domain to a set of non-zero elements is an integral domain. -/
theorem isDomain_localization {M : Submonoid A} (hM : M ≤ nonZeroDivisors A) :
    IsDomain (Localization M)

{A : Type u_6}
[CommRing A]
[IsDomain A]
{M : Submonoid A}
(hM : M ≤ nonZeroDivisors A)


/-- `SimpleFunc.lintegral` depends only on the measures of `f ⁻¹' {y}`. -/
theorem lintegral_eq_of_measure_preimage [MeasurableSpace β] {f : α →ₛ ℝ≥0∞} {g : β →ₛ ℝ≥0∞}
    {ν : Measure β} (H : ∀ y, μ (f ⁻¹' {y}) = ν (g ⁻¹' {y})) : f.lintegral μ = g.lintegral ν


@[simp] lemma _root_.Pi.compRightL_apply {α : Type*} (f : α → ι) (v : (i : ι) → φ i) (i : α) :
    Pi.compRightL R φ f v i = v (f i)

(R : Type u_1)
[Semiring R]
{ι : Type u_4}
(φ : ι → Type u_5)
[(i : ι) → TopologicalSpace (φ i)]
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
{α : Type u_6}
(f : α → ι)
(v : (i : ι) → φ i)
(i : α)


/-- The uncurried form of a continuous map `X → C(Y, Z)` as a continuous map `X × Y → Z` (if `Y` is
    locally compact). If `X` is also locally compact, then this is a homeomorphism between the two
    function spaces, see `Homeomorph.curry`. -/
@[simps]
def uncurry [LocallyCompactSpace Y] (f : C(X, C(Y, Z))) : C(X × Y, Z)

{X : Type u_2}
{Y : Type u_3}
{Z : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[LocallyCompactSpace Y]
(f : C(X, C(Y, Z)))

∀ (a : X × Y), f.uncurry a = Function.uncurry (fun x y => (f x) y) a


theorem ascFactorial_le_pow_add (n : ℕ) : ∀ k : ℕ, (n+1).ascFactorial k ≤ (n + k) ^ k


@[simp, reassoc]
theorem localizationToStalk_stalkToFiberRingHom (x : PrimeSpectrum.Top R) :
    localizationToStalk R x ≫ stalkToFiberRingHom R x = 𝟙 _

(x : ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

AlgebraicGeometry.StructureSheaf.localizationToStalk R x ≫ AlgebraicGeometry.StructureSheaf.stalkToFiberRingHom R x =
  𝟙 (CommRingCat.of (Localization.AtPrime x.asIdeal))


@[simp]
theorem zero_tmul (n : N) : (0 : M) ⊗ₜ[R] n = 0

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(n : N)


/-- A product over `s.subtype p` equals one over `s.filter p`. -/
@[to_additive (attr := simp, nolint simpNF)
  "A sum over `s.subtype p` equals one over `s.filter p`."]
theorem prod_subtype_eq_prod_filter (f : α → β) {p : α → Prop} [DecidablePred p] :
    ∏ x ∈ s.subtype p, f x = ∏ x ∈ s.filter p, f x

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
[CommMonoid β]
(f : α → β)
{p : α → Prop}
[DecidablePred p]

∏ x ∈ Finset.subtype p s, f ↑x = ∏ x ∈ Finset.filter p s, f x


/-- **Shrinking lemma** for coverings by open balls in a proper metric space. A point-finite open
cover of a closed subset of a proper metric space by open balls can be shrunk to a new cover by
open balls so that each of the new balls has strictly smaller radius than the old one. This version
assumes that `fun x ↦ ball (c i) (r i)` is a locally finite covering and provides a covering
indexed by the same type. -/
theorem exists_subset_iUnion_ball_radius_lt {r : ι → ℝ} (hs : IsClosed s)
    (uf : ∀ x ∈ s, { i | x ∈ ball (c i) (r i) }.Finite) (us : s ⊆ ⋃ i, ball (c i) (r i)) :
    ∃ r' : ι → ℝ, (s ⊆ ⋃ i, ball (c i) (r' i)) ∧ ∀ i, r' i < r i

(uf : ∀ x ∈ s, {i | x ∈ Metric.ball (c i) (r i)}.Finite)

∃ r', s ⊆ ⋃ i, Metric.ball (c i) (r' i) ∧ ∀ (i : ι), r' i < r i


theorem algebraMap_apply'' :
    algebraMap R⟦X⟧ A⟦X⟧ f = map (algebraMap R A) f

{R : Type u_1}
(A : Type u_2)
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
(f : PowerSeries R)

(algebraMap (PowerSeries R) (PowerSeries A)) f = (PowerSeries.map (algebraMap R A)) f


theorem algebraMap_injective : (algebraMap R ℍ[R] : _ → _).Injective


/-- The `RingEquiv` between spaces of square matrices induced by a `RingEquiv` between their
coefficients. This is `Matrix.map` as a `RingEquiv`. -/
@[simps apply]
def mapMatrix (f : α ≃+* β) : Matrix m m α ≃+* Matrix m m β

{m : Type u_2}
{α : Type v}
{β : Type w}
[Fintype m]
[DecidableEq m]
[NonAssocSemiring α]
[NonAssocSemiring β]
(f : α ≃+* β)
(M : Matrix m m α)


/-- Construct a left lift along `g : c ⟶ a` from a left lift along `𝟙 c ≫ g`. -/
@[simps!]
def ofIdComp (t : LeftLift f (𝟙 c ≫ g)) : LeftLift f g

(t : CategoryTheory.Bicategory.LeftLift f (CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id c) g))

t.ofIdComp.hom = CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.leftUnitor g).inv t.unit


@[simp]
theorem filter_false (l : List α) :
    filter (fun _ => false) l = []


@[to_additive (attr := simp, norm_cast)]
theorem coe_pow (x : H) (n : ℕ) : ((x ^ n : H) : G) = (x : G) ^ n

{G : Type u_1}
[AddGroup G]
{S : Type u_6}
{H : S}
[SetLike S G]
[AddSubgroupClass S G]
(x : ↥H)
(n : ℕ)


theorem exp_approx_succ {n} {x a₁ b₁ : ℝ} (m : ℕ) (e₁ : n + 1 = m) (a₂ b₂ : ℝ)
    (e : |1 + x / m * a₂ - a₁| ≤ b₁ - |x| / m * b₂)
    (h : |exp x - expNear m x a₂| ≤ |x| ^ m / m.factorial * b₂) :
    |exp x - expNear n x a₁| ≤ |x| ^ n / n.factorial * b₁

(e : |1 + x / ↑m * a₂ - a₁| ≤ b₁ - |x| / ↑m * b₂)

(h : |Real.exp x - Real.expNear m x a₂| ≤ |x| ^ m / ↑m.factorial * b₂)

|Real.exp x - Real.expNear n x a₁| ≤ |x| ^ n / ↑n.factorial * b₁


theorem toLp_toSimpleFunc (f : Lp.simpleFunc E p μ) :
    toLp (toSimpleFunc f) (simpleFunc.memℒp f) = f

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

MeasureTheory.Lp.simpleFunc.toLp (MeasureTheory.Lp.simpleFunc.toSimpleFunc f) ⋯ = f


lemma fibration_iff_isUpperSet_image_Ici [Preorder α] [LE β] :
    Fibration (· ≥ ·) (· ≥ ·) f ↔ ∀ x, IsUpperSet (f '' Ici x)

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

Relation.Fibration (fun x x_1 => x ≥ x_1) (fun x x_1 => x ≥ x_1) f ↔ ∀ (x : α), IsUpperSet (f '' Set.Ici x)


@[simp]
theorem L_mul {G : Type*} [Semigroup G] [TopologicalSpace G] [ChartedSpace H G] [SmoothMul I G]
    (g h : G) : 𝑳 I (g * h) = (𝑳 I g).comp (𝑳 I h)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(I : ModelWithCorners 𝕜 E H)
{G : Type u_8}
[Semigroup G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
(g h : G)

smoothLeftMul I (g * h) = (smoothLeftMul I g).comp (smoothLeftMul I h)


theorem sub_pow_expChar_pow [CommRing R] {q : ℕ} [hR : ExpChar R q]
    {n : ℕ} (x y : R) : (x - y) ^ q ^ n = x ^ q ^ n - y ^ q ^ n

(R : Type u)
[CommRing R]
{q : ℕ}
[hR : ExpChar R q]
{n : ℕ}
(x y : R)


theorem coe_mul_of_apply_of_le (r : ⨁ i, A i) {i : ι} (r' : A i) (n : ι) (h : i ≤ n) :
    ((r * of (fun i => A i) i r') n : R) = r (n - i) * r'

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

↑((r * (DirectSum.of (fun i => ↥(A i)) i) r') n) = ↑(r (n - i)) * ↑r'


theorem smul_apply (r : S) (D : LieDerivation R L M) : (r • D) a = r • D a

[LieDerivation.SMulBracketCommClass S L M]


theorem mem_range_embedding_iff' {j : Fin n} {i : Fin c.length} :
    j ∈ Set.range (c.embedding i) ↔ i = c.index j

{n : ℕ}
(c : Composition n)
{j : Fin n}
{i : Fin c.length}

j ∈ Set.range ⇑(c.embedding i) ↔ i = c.index j


@[simp]
theorem coe_finsetBasisIndex [IsNoetherian K V] :
    (↑(finsetBasisIndex K V) : Set V) = Basis.ofVectorSpaceIndex K V

(K : Type u)
(V : Type v)
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[IsNoetherian K V]

↑(IsNoetherian.finsetBasisIndex K V) = Basis.ofVectorSpaceIndex K V


theorem map_mono (f : L →ₐ[K] L') {S T : IntermediateField K L} (h : S ≤ T) :
    S.map f ≤ T.map f

{K : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
(f : L →ₐ[K] L')
{S T : IntermediateField K L}
(h : S ≤ T)

IntermediateField.map f S ≤ IntermediateField.map f T


theorem Sigma.ι_desc {β : Type w} {f : β → C} [HasCoproduct f] {P : C} (p : ∀ b, f b ⟶ P) (b : β) :
    Sigma.ι f b ≫ Sigma.desc p = p b

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{β : Type w}
{f : β → C}
[CategoryTheory.Limits.HasCoproduct f]
{P : C}
(p : (b : β) → f b ⟶ P)
(b : β)

CategoryTheory.Limits.Sigma.ι f b ≫ CategoryTheory.Limits.Sigma.desc p = p b


/-- An ordered vector addition is a bi-monotone vector addition. -/
class IsOrderedVAdd (G P : Type*) [LE G] [LE P] [VAdd G P] : Prop where
  protected vadd_le_vadd_left : ∀ a b : P, a ≤ b → ∀ c : G, c +ᵥ a ≤ c +ᵥ b
  protected vadd_le_vadd_right : ∀ c d : G, c ≤ d → ∀ a : P, c +ᵥ a ≤ d +ᵥ a

{G : Type u_3}
{P : Type u_4}
[LE G]
[LE P]
[VAdd G P]
[self : IsOrderedVAdd G P]
(a b : P)


@[to_additive]
theorem mulRothNumber_union_le (s t : Finset α) :
    mulRothNumber (s ∪ t) ≤ mulRothNumber s + mulRothNumber t

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


@[simp]
theorem kstar_one : (1 : α)∗ = 1


/-- The age of a direct limit of structures is the union of the ages of the structures. -/
-- @[simp] -- Porting note: cannot simplify itself
theorem age_directLimit {ι : Type w} [Preorder ι] [IsDirected ι (· ≤ ·)] [Nonempty ι]
    (G : ι → Type max w w') [∀ i, L.Structure (G i)] (f : ∀ i j, i ≤ j → G i ↪[L] G j)
    [DirectedSystem G fun i j h => f i j h] : L.age (DirectLimit G f) = ⋃ i : ι, L.age (G i)

[DirectedSystem G fun i j h => ⇑(f i j h)]

L.age (FirstOrder.Language.DirectLimit G f) = ⋃ i, L.age (G i)


@[simp]
theorem coe_inf (f g : InfTopHom α β) : DFunLike.coe (f ⊓ g) = f ⊓ g

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Top α]
[SemilatticeInf β]
[OrderTop β]
(f g : InfTopHom α β)


theorem deriv_limit (f) {o} : IsLimit o → deriv f o = bsup.{u, 0} o fun a _ => deriv f a

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

o.IsLimit → Ordinal.deriv f o = o.bsup fun a x => Ordinal.deriv f a


theorem algebraMap_mem (r : R) : algebraMap R A r ∈ (1 : SubMulAction R A)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(r : R)


@[simp]
theorem map_equiv (b : Basis ι R M) (b' : Basis ι' R M') (e : ι ≃ ι') :
    b.map (b.equiv b' e) = b'.reindex e.symm

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(b' : Basis ι' R M')
(e : ι ≃ ι')


theorem heq_of_eq_rec_left {φ : α → Sort v} {a a' : α} {p₁ : φ a} {p₂ : φ a'} :
    (e : a = a') → (h₂ : Eq.rec (motive := fun a _ ↦ φ a) p₁ e = p₂) → HEq p₁ p₂

{α : Sort u}
{φ : α → Sort v}
{a a' : α}
{p₁ : φ a}
{p₂ : φ a'}
(e : a = a')
(h₂ : e ▸ p₁ = p₂)


/-- A helper function for `sumRingEquiv`. -/
@[simps]
def mvPolynomialEquivMvPolynomial [CommSemiring S₃] (f : MvPolynomial S₁ R →+* MvPolynomial S₂ S₃)
    (g : MvPolynomial S₂ S₃ →+* MvPolynomial S₁ R) (hfgC : (f.comp g).comp C = C)
    (hfgX : ∀ n, f (g (X n)) = X n) (hgfC : (g.comp f).comp C = C) (hgfX : ∀ n, g (f (X n)) = X n) :
    MvPolynomial S₁ R ≃+* MvPolynomial S₂ S₃

(hfgC : (f.comp g).comp MvPolynomial.C = MvPolynomial.C)

(hfgX : ∀ (n : S₂), f (g (MvPolynomial.X n)) = MvPolynomial.X n)

(hgfC : (g.comp f).comp MvPolynomial.C = MvPolynomial.C)

(hgfX : ∀ (n : S₁), g (f (MvPolynomial.X n)) = MvPolynomial.X n)

(MvPolynomial.mvPolynomialEquivMvPolynomial R S₁ S₂ S₃ f g hfgC hfgX hgfC hgfX) a = f a


@[simp]
theorem mk'_def (α : Type u) : @Eq Cardinal ⟦α⟧ #α


theorem deriv_tsum (hu : Summable u) (hg : ∀ n, Differentiable 𝕜 (g n))
    (hg' : ∀ n y, ‖deriv (g n) y‖ ≤ u n) (hg0 : Summable fun n => g n y₀) :
    (deriv fun y => ∑' n, g n y) = fun y => ∑' n, deriv (g n) y

(hg : ∀ (n : α), Differentiable 𝕜 (g n))

(hg' : ∀ (n : α) (y : 𝕜), ‖deriv (g n) y‖ ≤ u n)

(deriv fun y => ∑' (n : α), g n y) = fun y => ∑' (n : α), deriv (g n) y


@[to_additive]
theorem mulSupport_div : (mulSupport fun x => f x / g x) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_1}
{G : Type u_9}
[SubtractionMonoid G]
(f g : α → G)

(Function.support fun x => f x - g x) ⊆ Function.support f ∪ Function.support g


/-- If a function is the greatest lower bound of countably many measurable functions on a measurable
set `s`, and coincides with a measurable function outside of `s`, then it is measurable. -/
theorem Measurable.isGLB_of_mem {ι} [Countable ι] {f : ι → δ → α} {g g' : δ → α}
    (hf : ∀ i, Measurable (f i))
    {s : Set δ} (hs : MeasurableSet s) (hg : ∀ b ∈ s, IsGLB { a | ∃ i, f i b = a } (g b))
    (hg' : EqOn g g' sᶜ) (g'_meas : Measurable g') : Measurable g

{f : ι → δ → α}

(hg : ∀ b ∈ s, IsGLB {a | ∃ i, f i b = a} (g b))


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

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


@[simp]
theorem center_toSubsemigroup :
    (center R).toSubsemigroup = Subsemigroup.center R

(R : Type u)
[NonUnitalNonAssocSemiring R]

(NonUnitalSubsemiring.center R).toSubsemigroup = Subsemigroup.center R


/-- The 2nd differential in the complex of inhomogeneous cochains of `A : Rep k G`, as a
`k`-linear map `Fun(G × G, A) → Fun(G × G × G, A)`. It sends
`(f, (g₁, g₂, g₃)) ↦ ρ_A(g₁)(f(g₂, g₃)) - f(g₁g₂, g₃) + f(g₁, g₂g₃) - f(g₁, g₂).` -/
@[simps]
def dTwo : (G × G → A) →ₗ[k] G × G × G → A

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)
(f : G × G → CoeSort.coe A)
(g : G × G × G)


theorem splits_X_pow_sub_one_of_X_pow_sub_C {F : Type*} [Field F] {E : Type*} [Field E]
    (i : F →+* E) (n : ℕ) {a : F} (ha : a ≠ 0) (h : (X ^ n - C a).Splits i) :
    (X ^ n - 1 : F[X]).Splits i

(h : Polynomial.Splits i (Polynomial.X ^ n - Polynomial.C a))

Polynomial.Splits i (Polynomial.X ^ n - 1)


@[simp]
theorem mem_pmap {p : α → Prop} {f : ∀ a, p a → β} {s H b} :
    b ∈ pmap f s H ↔ ∃ (a : _) (h : a ∈ s), f a (H a h) = b

{α : Type u_1}
{β : Type v}
{p : α → Prop}
{f : (a : α) → p a → β}
{s : Multiset α}
{H : ∀ a ∈ s, p a}
{b : β}

b ∈ Multiset.pmap f s H ↔ ∃ a, ∃ (h : a ∈ s), f a ⋯ = b


@[simp]
theorem condexpL1_zero : condexpL1 hm μ (0 : α → F') = 0

{α : Type u_1}
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace ℝ F']
[CompleteSpace F']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]


theorem IsSemisimpleModule.sup {p q : Submodule R M}
    (_ : IsSemisimpleModule R p) (_ : IsSemisimpleModule R q) :
    IsSemisimpleModule R ↥(p ⊔ q)

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{p q : Submodule R M}

IsSemisimpleModule R ↥p → IsSemisimpleModule R ↥q → IsSemisimpleModule R ↥(p ⊔ q)


theorem image_update_Ioo (f : ∀ i, α i) (i : ι) (a b : α i) :
    update f i '' Ioo a b = Ioo (update f i a) (update f i b)

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

Function.update f i '' Set.Ioo a b = Set.Ioo (Function.update f i a) (Function.update f i b)


/-- Algebra equivalences between `Algebra`s are the same as (isomorphic to) isomorphisms in
`AlgebraCat`. -/
@[simps]
def algEquivIsoAlgebraIso {X Y : Type u} [Ring X] [Ring Y] [Algebra R X] [Algebra R Y] :
    (X ≃ₐ[R] Y) ≅ AlgebraCat.of R X ≅ AlgebraCat.of R Y

(i : AlgebraCat.of R X ≅ AlgebraCat.of R Y)

algEquivIsoAlgebraIso.inv i = i.toAlgEquiv


@[nolint docBlame]
class FloatCfg where
  (prec emax : ℕ)
  precPos : 0 < prec
  precMax : prec ≤ emax


theorem _root_.SimpleGraph.induce_eq_coe_induce_top (s : Set V) :
    G.induce s = ((⊤ : G.Subgraph).induce s).coe

{V : Type u}
{G : SimpleGraph V}
(s : Set V)

SimpleGraph.induce s G = (⊤.induce s).coe


/-- If `F` is nonempty at each index and Mittag-Leffler, then so is `F.toEventualRanges`. -/
theorem toEventualRanges_nonempty (h : F.IsMittagLeffler) [∀ j : J, Nonempty (F.obj j)] (j : J) :
    Nonempty (F.toEventualRanges.obj j)

{J : Type u}
[CategoryTheory.Category.{u_1, u} J]
(F : J ⥤ Type v)
[CategoryTheory.IsCofilteredOrEmpty J]
(h : F.IsMittagLeffler)
[∀ (j : J), Nonempty (F.obj j)]
(j : J)


theorem add_apply : (D1 + D2) a = D1 a + D2 a

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M]
[Algebra R A]
[Module A M]
[Module R M]
{D1 D2 : Derivation R A M}
(a : A)


theorem le_intro (h : ∀ s, MeasurableSet s → s.Nonempty → μ₁ s ≤ μ₂ s) : μ₁ ≤ μ₂

(h : ∀ (s : Set α), MeasurableSet s → s.Nonempty → μ₁ s ≤ μ₂ s)


@[to_additive] lemma mabs_le' : |a|ₘ ≤ b ↔ a ≤ b ∧ a⁻¹ ≤ b

{α : Type u_1}
[Lattice α]
[AddGroup α]
{a b : α}


@[simp]
theorem nhds_top : 𝓝 (⊤ : Filter α) = ⊤


theorem IsCoseparating.mono {𝒢 : Set C} (h𝒢 : IsCoseparating 𝒢) {ℋ : Set C} (h𝒢ℋ : 𝒢 ⊆ ℋ) :
    IsCoseparating ℋ

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{𝒢 : Set C}
(h𝒢 : CategoryTheory.IsCoseparating 𝒢)
{ℋ : Set C}
(h𝒢ℋ : 𝒢 ⊆ ℋ)


@[to_additive]
theorem mono_iff_injective : Mono f ↔ Function.Injective f

CategoryTheory.Mono f ↔ Function.Injective ⇑f


@[simp]
theorem id_f (A : Coalgebra G) : (𝟙 A : A ⟶ A).f = 𝟙 A.A

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{G : CategoryTheory.Comonad C}
(A : G.Coalgebra)

(CategoryTheory.CategoryStruct.id A).f = CategoryTheory.CategoryStruct.id A.A


theorem translationNumber_lt_of_forall_lt_add (hf : Continuous f) {z : ℝ} (hz : ∀ x, f x < x + z) :
    τ f < z

(f : CircleDeg1Lift)
(hf : Continuous ⇑f)
{z : ℝ}
(hz : ∀ (x : ℝ), f x < x + z)


theorem AnalyticAt.differentiableAt : AnalyticAt 𝕜 f x → DifferentiableAt 𝕜 f x

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


@[simp]
theorem mem_mk {S : Subsemiring R} {x : R} (h) : x ∈ (⟨S, h⟩ : Subring R) ↔ x ∈ S

(h : ∀ {x : R}, x ∈ S.carrier → -x ∈ S.carrier)

x ∈ { toSubsemiring := S, neg_mem' := h } ↔ x ∈ S


theorem mkDerivationₗ_C (f : σ → A) (r : R) : mkDerivationₗ R f (C r) = 0

{σ : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Module (MvPolynomial σ R) A]
(f : σ → A)
(r : R)

(MvPolynomial.mkDerivationₗ R f) (MvPolynomial.C r) = 0


theorem fract_add_fract_le (a b : α) : fract a + fract b ≤ fract (a + b) + 1

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a b : α)

Int.fract a + Int.fract b ≤ Int.fract (a + b) + 1


theorem IsTrail.count_edges_eq_one [DecidableEq V] {u v : V} {p : G.Walk u v} (h : p.IsTrail)
    {e : Sym2 V} (he : e ∈ p.edges) : p.edges.count e = 1

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{p : G.Walk u v}
(h : p.IsTrail)
{e : Sym2 V}
(he : e ∈ p.edges)


/-- If `u` is a family of uniform structures on `γ`, then
`𝒱(α, γ, 𝔖, (⨅ i, u i)) = ⨅ i, 𝒱(α, γ, 𝔖, u i)`. -/
protected theorem iInf_eq {u : ι → UniformSpace γ} :
    𝒱(α, γ, 𝔖, ⨅ i, u i) = ⨅ i, 𝒱(α, γ, 𝔖, u i)

{α : Type u_1}
{γ : Type u_3}
{ι : Type u_4}
{𝔖 : Set (Set α)}
{u : ι → UniformSpace γ}

UniformOnFun.uniformSpace α γ 𝔖 = ⨅ i, UniformOnFun.uniformSpace α γ 𝔖


@[to_additive]
protected lemma mul_eq_one_iff_eq_inv (h : IsUnit b) : a * b = 1 ↔ a = b⁻¹

{α : Type u}
[SubtractionMonoid α]
{a b : α}
(h : IsAddUnit b)


theorem ContinuousOn.comp {g : β → γ} {f : α → β} {s : Set α} {t : Set β} (hg : ContinuousOn g t)
    (hf : ContinuousOn f s) (h : MapsTo f s t) : ContinuousOn (g ∘ f) s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{g : β → γ}
{f : α → β}
{s : Set α}
{t : Set β}
(hg : ContinuousOn g t)
(hf : ContinuousOn f s)
(h : Set.MapsTo f s t)


lemma coeff_Ψ₂Sq_ne_zero (h : (4 : R) ≠ 0) : W.Ψ₂Sq.coeff 3 ≠ 0

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(h : 4 ≠ 0)


@[simp]
theorem emptyGraph_eq_bot (V : Type u) : emptyGraph V = ⊥


/-- If `a` is a left identity for `f : α → β → β`, then `pure a` is a left identity for
`Filter.map₂ f`. -/
theorem map₂_left_identity {f : α → β → β} {a : α} (h : ∀ b, f a b = b) (l : Filter β) :
    map₂ f (pure a) l = l

{α : Type u_1}
{β : Type u_3}
{f : α → β → β}
{a : α}
(h : ∀ (b : β), f a b = b)
(l : Filter β)


theorem open_dom_of_pcontinuous {f : X →. Y} (h : PContinuous f) : IsOpen f.Dom

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X →. Y}
(h : PContinuous f)


theorem preErgodic_of_preErgodic_conjugate (hg : MeasurePreserving g μ μ') (hf : PreErgodic f μ)
    {f' : β → β} (h_comm : g ∘ f = f' ∘ g) : PreErgodic f' μ'

(hg : MeasureTheory.MeasurePreserving g μ μ')


@[nolint unusedHavesSuffices] -- false positive from unfolding String.findAux
theorem findAux_of_valid (p) : ∀ l m r,
    findAux ⟨l ++ m ++ r⟩ p ⟨utf8Len l + utf8Len m⟩ ⟨utf8Len l⟩ =
    ⟨utf8Len l + utf8Len (m.takeWhile (!p ·))⟩

{ data := l ++ m ++ r }.findAux p { byteIdx := String.utf8Len l + String.utf8Len m } { byteIdx := String.utf8Len l } =
  { byteIdx := String.utf8Len l + String.utf8Len (List.takeWhile (fun x => !p x) m) }


/-- Urysohn's lemma: if `s` and `t` are two disjoint sets in a regular locally compact topological
space `X`, with `s` compact and `t` closed, then there exists a continuous
function `f : X → ℝ` such that

* `f` equals zero on `s`;
* `f` equals one on `t`;
* `0 ≤ f x ≤ 1` for all `x`.
-/
theorem exists_continuous_zero_one_of_isCompact [RegularSpace X] [LocallyCompactSpace X]
    {s t : Set X} (hs : IsCompact s) (ht : IsClosed t) (hd : Disjoint s t) :
    ∃ f : C(X, ℝ), EqOn f 0 s ∧ EqOn f 1 t ∧ ∀ x, f x ∈ Icc (0 : ℝ) 1

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
[LocallyCompactSpace X]
{s t : Set X}
(hs : IsCompact s)
(ht : IsClosed t)
(hd : Disjoint s t)

∃ f, Set.EqOn (⇑f) 0 s ∧ Set.EqOn (⇑f) 1 t ∧ ∀ (x : X), f x ∈ Set.Icc 0 1


@[simp]
theorem mem_univ (x : α) : x ∈ (univ : Finset α)


@[to_additive (attr := simp)]
theorem coe_add : ⇑(p + q) = p + q

{E : Type u_4}
[Group E]
(p q : GroupNorm E)


@[to_additive (attr := simp)]
theorem noncommProd_insert_of_not_mem [DecidableEq α] (s : Finset α) (a : α) (f : α → β) (comm)
    (ha : a ∉ s) :
    noncommProd (insert a s) f comm =
      f a * noncommProd s f (comm.mono fun _ => mem_insert_of_mem)

(comm : (↑(insert a s)).Pairwise fun a b => Commute (f a) (f b))

(insert a s).noncommProd f comm = f a * s.noncommProd f ⋯


@[to_additive (attr := simp)]
theorem ofMulEquivOfLocalizations_id : f.ofMulEquivOfLocalizations (MulEquiv.refl N) = f

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
(f : S.LocalizationMap N)

f.ofAddEquivOfLocalizations (AddEquiv.refl N) = f


theorem mul_def (f g : A →A[R] A) : f * g = f.comp g

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
[Algebra R A]
(f g : A →A[R] A)


@[simp]
theorem mem_intrinsicFrontier :
    x ∈ intrinsicFrontier 𝕜 s ↔ ∃ y, y ∈ frontier ((↑) ⁻¹' s : Set <| affineSpan 𝕜 s) ∧ ↑y = x

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

x ∈ intrinsicFrontier 𝕜 s ↔ ∃ y ∈ frontier (Subtype.val ⁻¹' s), ↑y = x


protected theorem map_list_sum [NonAssocSemiring R] [NonAssocSemiring S] (f : R ≃+* S)
    (l : List R) : f l.sum = (l.map f).sum

{R : Type u_2}
{S : Type u_3}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R ≃+* S)
(l : List R)


theorem blimsup_eq : blimsup u f p = sInf { a | ∀ᶠ x in f, p x → u x ≤ a }

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
{f : Filter β}
{u : β → α}
{p : β → Prop}

Filter.blimsup u f p = sInf {a | ∀ᶠ (x : β) in f, p x → u x ≤ a}


@[to_additive]
theorem div_le_div_iff_left (a : α) : a / b ≤ a / c ↔ c ≤ b

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

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


theorem short_birthday (x : PGame.{u}) : [Short x] → x.birthday < Ordinal.omega


@[to_additive mem_own_leftAddCoset]
theorem mem_own_leftCoset (a : α) : a ∈ a • (s : Set α)

{α : Type u_1}
[Monoid α]
(s : Submonoid α)
(a : α)


@[simp] theorem get?_set_ne (a : Array α) (i : Fin a.size) {j : Nat} (v : α)
    (h : i.1 ≠ j) : (a.set i v)[j]? = a[j]?

{α : Type u_1}
(a : Array α)
(i : Fin a.size)
{j : Nat}
(v : α)
(h : ↑i ≠ j)


@[simp]
theorem ihom_ev_app_hom (A B : Rep k G) :
    Action.Hom.hom ((ihom.ev A).app B)
      = TensorProduct.uncurry k A (A →ₗ[k] B) B LinearMap.id.flip

{k G : Type u}
[CommRing k]
[Group G]
(A B : Rep k G)

((CategoryTheory.ihom.ev A).app B).hom =
  (TensorProduct.uncurry k (CoeSort.coe A) (CoeSort.coe A →ₗ[k] CoeSort.coe B) (CoeSort.coe B)) LinearMap.id.flip


/-- Linear lower bound for `f (x + n)` on unit interval -/
theorem f_add_nat_ge (hf_conv : ConvexOn ℝ (Ioi 0) f)
    (hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + log y) (hn : 2 ≤ n) (hx : 0 < x) :
    f n + x * log (n - 1) ≤ f (n + x)

(hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + Real.log y)

f ↑n + x * Real.log (↑n - 1) ≤ f (↑n + x)


/-- For the single implications with fewer assumptions, see `one_div_lt_one_div_of_lt` and
  `lt_of_one_div_lt_one_div` -/
theorem one_div_lt_one_div (ha : 0 < a) (hb : 0 < b) : 1 / a < 1 / b ↔ b < a

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 < a)
(hb : 0 < b)


@[simp] theorem subset_insert (a : α) (s : Finset α) : s ⊆ insert a s

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


theorem coe_eq_zero (z : ℤ_[p]) : (z : ℚ_[p]) = 0 ↔ z = 0

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


/-- A monotone map has a limit to the left of any point `x`, equal to `sSup (f '' (Iio x))`. -/
theorem Monotone.tendsto_nhdsWithin_Iio {α β : Type*} [LinearOrder α] [TopologicalSpace α]
    [OrderTopology α] [ConditionallyCompleteLinearOrder β] [TopologicalSpace β] [OrderTopology β]
    {f : α → β} (Mf : Monotone f) (x : α) : Tendsto f (𝓝[<] x) (𝓝 (sSup (f '' Iio x)))

{α : Type u_4}
{β : Type u_5}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(Mf : Monotone f)
(x : α)

Filter.Tendsto f (𝓝[<] x) (𝓝 (sSup (f '' Set.Iio x)))


theorem _root_.ContinuousLinearMap.intervalIntegral_comp_comm (L : E →L[𝕜] F)
    (hf : IntervalIntegrable f μ a b) : (∫ x in a..b, L (f x) ∂μ) = L (∫ x in a..b, f x ∂μ)

{𝕜 : Type u_2}
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[CompleteSpace E]
[NormedSpace ℝ E]
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
{f : ℝ → E}
[RCLike 𝕜]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedSpace ℝ F]
[CompleteSpace F]
(L : E →L[𝕜] F)
(hf : IntervalIntegrable f μ a b)

∫ (x : ℝ) in a..b, L (f x) ∂μ = L (∫ (x : ℝ) in a..b, f x ∂μ)


theorem stronglyMeasurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜]
    [h : SecondCountableTopologyEither 𝕜 F] (f : 𝕜 → F) : StronglyMeasurable (deriv f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
[MeasurableSpace 𝕜]
[OpensMeasurableSpace 𝕜]
[h : SecondCountableTopologyEither 𝕜 F]
(f : 𝕜 → F)


/-- Reorder a product.

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

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

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

The difference with `Finset.sum_nbij` is that the bijection is allowed to use membership of the
domain of the sum, rather than being a non-dependent function."]
theorem prod_bij (i : ∀ a ∈ s, κ) (hi : ∀ a ha, i a ha ∈ t)
    (i_inj : ∀ a₁ ha₁ a₂ ha₂, i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂)
    (i_surj : ∀ b ∈ t, ∃ a ha, i a ha = b) (h : ∀ a ha, f a = g (i a ha)) :
    ∏ x ∈ s, f x = ∏ x ∈ t, g x

(hi : ∀ (a : ι) (ha : a ∈ s), i a ha ∈ t)

(i_inj : ∀ (a₁ : ι) (ha₁ : a₁ ∈ s) (a₂ : ι) (ha₂ : a₂ ∈ s), i a₁ ha₁ = i a₂ ha₂ → a₁ = a₂)

(i_surj : ∀ b ∈ t, ∃ a, ∃ (ha : a ∈ s), i a ha = b)

(h : ∀ (a : ι) (ha : a ∈ s), f a = g (i a ha))


theorem abs_poly_dioph (p : Poly α) : DiophFn fun v => (p v).natAbs


theorem dualCoannihilator_iSup_eq {ι : Sort*} (U : ι → Submodule R (Module.Dual R M)) :
    (⨆ i : ι, U i).dualCoannihilator = ⨅ i : ι, (U i).dualCoannihilator

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{ι : Sort u_1}
(U : ι → Submodule R (Module.Dual R M))

(⨆ i, U i).dualCoannihilator = ⨅ i, (U i).dualCoannihilator


/-- Rewrite the Gamma integral as an example of a Mellin transform. -/
theorem GammaIntegral_eq_mellin : GammaIntegral = mellin fun x => ↑(Real.exp (-x))

Complex.GammaIntegral = mellin fun x => ↑(rexp (-x))


@[continuity]
theorem continuous_nhds : Continuous (𝓝 : X → Filter X)


lemma sum_smul_minpolyDiv_eq_X_pow (E) [Field E] [Algebra K E] [IsAlgClosed E]
    [FiniteDimensional K L] [Algebra.IsSeparable K L]
    {x : L} (hxL : Algebra.adjoin K {x} = ⊤) {r : ℕ} (hr : r < finrank K L) :
    ∑ σ : L →ₐ[K] E, ((x ^ r / aeval x (derivative <| minpoly K x)) •
      minpolyDiv K x).map σ = (X ^ r : E[X])

(hr : r < FiniteDimensional.finrank K L)

∑ σ : L →ₐ[K] E,
    Polynomial.map (↑σ) ((x ^ r / (Polynomial.aeval x) (Polynomial.derivative (minpoly K x))) • minpolyDiv K x) =
  Polynomial.X ^ r


@[simp]
theorem restriction_one : restriction (1 : R[X]) = 1


/-- Rotation in an oriented real inner product space of dimension 2 can be evaluated in terms of a
complex-number representation of the space. -/
theorem rotation_map_complex (θ : Real.Angle) (f : V ≃ₗᵢ[ℝ] ℂ)
    (hf : Orientation.map (Fin 2) f.toLinearEquiv o = Complex.orientation) (x : V) :
    f (o.rotation θ x) = θ.expMapCircle * f x

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

(hf : (Orientation.map (Fin 2) f.toLinearEquiv) o = Complex.orientation)

f ((o.rotation θ) x) = ↑θ.expMapCircle * f x


theorem closedBall_eq_image (x : E) (r : ℝ) :
    closedBall x r = toEuclidean.symm '' Metric.closedBall (toEuclidean x) r

{E : Type u_1}
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[T2Space E]
[Module ℝ E]
[ContinuousSMul ℝ E]
[FiniteDimensional ℝ E]
(x : E)
(r : ℝ)

Euclidean.closedBall x r = ⇑toEuclidean.symm '' Metric.closedBall (toEuclidean x) r


theorem xn_modEq_x2n_add_lem (n j) : xn a1 n ∣ d a1 * yn a1 n * (yn a1 n * xn a1 j) + xn a1 j

Pell.xn a1 n ∣ Pell.d a1 * Pell.yn a1 n * (Pell.yn a1 n * Pell.xn a1 j) + Pell.xn a1 j


@[simp]
theorem embDomain_eq_zero {f : α ↪ β} {l : α →₀ M} : embDomain f l = 0 ↔ l = 0

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[Zero M]
{f : α ↪ β}
{l : α →₀ M}


/-- A union of a family of preconnected sets with a common point is preconnected as well. -/
theorem isPreconnected_sUnion (x : α) (c : Set (Set α)) (H1 : ∀ s ∈ c, x ∈ s)
    (H2 : ∀ s ∈ c, IsPreconnected s) : IsPreconnected (⋃₀ c)

{α : Type u}
[TopologicalSpace α]
(x : α)
(c : Set (Set α))
(H1 : ∀ s ∈ c, x ∈ s)
(H2 : ∀ s ∈ c, IsPreconnected s)


theorem trTape'_move_right (L R : ListBlank Γ) :
    (Tape.move Dir.right)^[n] (trTape' enc0 L R) = trTape' enc0 (L.cons R.head) R.tail

(enc0 : enc default = Mathlib.Vector.replicate n false)

(Turing.Tape.move Turing.Dir.right)^[n] (Turing.TM1to1.trTape' enc0 L R) =
  Turing.TM1to1.trTape' enc0 (Turing.ListBlank.cons R.head L) R.tail


theorem comp_toRingHom (φ₁ : B →ₐ[R] C) (φ₂ : A →ₐ[R] B) :
    (φ₁.comp φ₂ : A →+* C) = (φ₁ : B →+* C).comp ↑φ₂

{R : Type u}
{A : Type v}
{B : Type w}
{C : Type u₁}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Semiring C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
(φ₁ : B →ₐ[R] C)
(φ₂ : A →ₐ[R] B)


@[simp]
theorem op_unop (x : αᵒᵖ) : op (unop x) = x


theorem sSup_le {A : C} (s : Set (Subobject A)) (f : Subobject A) (k : ∀ g ∈ s, g ≤ f) :
    sSup s ≤ f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.WellPowered C]
[CategoryTheory.Limits.HasCoproducts C]
[CategoryTheory.Limits.HasImages C]
{A : C}
(s : Set (CategoryTheory.Subobject A))
(f : CategoryTheory.Subobject A)
(k : ∀ g ∈ s, g ≤ f)


@[reassoc (attr := simp)]
lemma opShiftFunctorEquivalence_counitIso_inv_naturality (n : ℤ) {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    f ≫ (opShiftFunctorEquivalence C n).counitIso.inv.app Y =
      (opShiftFunctorEquivalence C n).counitIso.inv.app X ≫ f.unop⟦n⟧'.op⟦n⟧'

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

CategoryTheory.CategoryStruct.comp f
    ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).counitIso.inv.app Y) =
  CategoryTheory.CategoryStruct.comp
    ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C n).counitIso.inv.app X)
    ((CategoryTheory.shiftFunctor Cᵒᵖ n).map ((CategoryTheory.shiftFunctor C n).map f.unop).op)


/-- An equivalence between `ℕ × ℕ` and `ℕ`. -/
@[simps (config := .asFn)]
def pairEquiv : ℕ × ℕ ≃ ℕ


/-- If `P` is a prime ideal of `R`, then `P.R[x]` is a prime ideal of `R[x]`. -/
theorem isPrime_map_C_of_isPrime {P : Ideal R} (H : IsPrime P) :
    IsPrime (map (C : R →+* R[X]) P : Ideal R[X])

{R : Type u}
[CommRing R]
{P : Ideal R}
(H : P.IsPrime)


theorem antitoneOn_of_rightInvOn_of_mapsTo [PartialOrder α] [LinearOrder β]
    {φ : β → α} {ψ : α → β} {t : Set β} {s : Set α} (hφ : AntitoneOn φ t)
    (φψs : Set.RightInvOn ψ φ s) (ψts : Set.MapsTo ψ s t) : AntitoneOn ψ s

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[LinearOrder β]
{φ : β → α}
{ψ : α → β}
{t : Set β}
{s : Set α}
(hφ : AntitoneOn φ t)
(φψs : Set.RightInvOn ψ φ s)
(ψts : Set.MapsTo ψ s t)


/-- The integral of `sin x * cos x`, given in terms of sin².
  See `integral_sin_mul_cos₂` below for the integral given in terms of cos². -/
@[simp]
theorem integral_sin_mul_cos₁ : ∫ x in a..b, sin x * cos x = (sin b ^ 2 - sin a ^ 2) / 2

∫ (x : ℝ) in a..b, Real.sin x * Real.cos x = (Real.sin b ^ 2 - Real.sin a ^ 2) / 2


@[simp]
protected theorem map_smul (c : ℝ≥0∞) (μ : Measure α) (f : α → β) :
    (c • μ).map f = c • μ.map f

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
(c : ENNReal)
(μ : MeasureTheory.Measure α)
(f : α → β)

MeasureTheory.Measure.map f (c • μ) = c • MeasureTheory.Measure.map f μ


theorem ball_smul_ball (p : Seminorm 𝕜 E) (r₁ r₂ : ℝ) :
    Metric.ball (0 : 𝕜) r₁ • p.ball 0 r₂ ⊆ p.ball 0 (r₁ * r₂)

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
(r₁ r₂ : ℝ)

Metric.ball 0 r₁ • p.ball 0 r₂ ⊆ p.ball 0 (r₁ * r₂)


theorem iInter_subtype (p : α → Prop) (s : { x // p x } → Set β) :
    ⋂ x : { x // p x }, s x = ⋂ (x) (hx : p x), s ⟨x, hx⟩

{α : Type u_1}
{β : Type u_2}
(p : α → Prop)
(s : { x // p x } → Set β)


@[simp]
theorem comp_id : φ.comp (AlgHom.id R A) = φ

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


@[simp]
theorem Definable.sdiff {s t : Set (α → M)} (hs : A.Definable L s) (ht : A.Definable L t) :
    A.Definable L (s \ t)

{M : Type w}
{A : Set M}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{s t : Set (α → M)}
(hs : A.Definable L s)
(ht : A.Definable L t)


/-- A prime `p` satisfies `p % 2 = 1` if and only if `p ≠ 2`. -/
theorem Prime.mod_two_eq_one_iff_ne_two {p : ℕ} [Fact p.Prime] : p % 2 = 1 ↔ p ≠ 2


@[simp]
lemma ltByCases_eq (h : x = y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} :
    ltByCases x y h₁ h₂ h₃ = h₂ h

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
(h : x = y)
{h₁ : x < y → P}
{h₂ : x = y → P}
{h₃ : y < x → P}


theorem le_def {f g : α →o β} : f ≤ g ↔ ∀ x, f x ≤ g x

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{f g : α →o β}


@[simp]
theorem polar_closure (s : Set E) : polar 𝕜 (closure s) = polar 𝕜 s

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

NormedSpace.polar 𝕜 (closure s) = NormedSpace.polar 𝕜 s


theorem Embedding.isTotallyDisconnected [TopologicalSpace β] {f : α → β} (hf : Embedding f)
    {s : Set α} (h : IsTotallyDisconnected (f '' s)) : IsTotallyDisconnected s

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(hf : Embedding f)
{s : Set α}
(h : IsTotallyDisconnected (f '' s))


/-- Combine two `PartialEquiv`s with disjoint sources and disjoint targets. We reuse
`PartialEquiv.piecewise`, then override `source` and `target` to ensure better definitional
equalities. -/
@[simps! (config := .asFn)]
def disjointUnion (e e' : PartialEquiv α β) (hs : Disjoint e.source e'.source)
    (ht : Disjoint e.target e'.target) [∀ x, Decidable (x ∈ e.source)]
    [∀ y, Decidable (y ∈ e.target)] : PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
(e e' : PartialEquiv α β)
(hs : Disjoint e.source e'.source)
(ht : Disjoint e.target e'.target)
[(x : α) → Decidable (x ∈ e.source)]
[(y : β) → Decidable (y ∈ e.target)]

↑(e.disjointUnion e' hs ht) = e.source.piecewise ↑e ↑e'


lemma memPartition_succ (f : ℕ → Set α) (n : ℕ) :
    memPartition f (n + 1) = {s | ∃ u ∈ memPartition f n, s = u ∩ f n ∨ s = u \ f n}


lemma InjectiveResolution.toRightDerivedZero_eq
    {X : C} (I : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.toRightDerivedZero.app X = I.toRightDerivedZero' F ≫
      (CochainComplex.isoHomologyπ₀ _).hom ≫ (I.isoRightDerivedObj F 0).inv

(I : CategoryTheory.InjectiveResolution X)

F.toRightDerivedZero.app X =
  CategoryTheory.CategoryStruct.comp (I.toRightDerivedZero' F)
    (CategoryTheory.CategoryStruct.comp
      (CochainComplex.isoHomologyπ₀ ((F.mapHomologicalComplex (ComplexShape.up ℕ)).obj I.cocomplex)).hom
      (I.isoRightDerivedObj F 0).inv)


/-- Given a diagram `F : J ⥤ C` and two `Cone F`s, we can join them into a diagram `Bicone J ⥤ C`.
-/
@[simps]
def biconeMk {C : Type u₁} [Category.{v₁} C] {F : J ⥤ C} (c₁ c₂ : Cone F) : Bicone J ⥤ C

(J : Type v₁)
[CategoryTheory.SmallCategory J]
{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{F : CategoryTheory.Functor J C}
(c₁ c₂ : CategoryTheory.Limits.Cone F)

∀ {X Y : CategoryTheory.Bicone J} (f : X ⟶ Y),
  (CategoryTheory.biconeMk J c₁ c₂).map f =
    CategoryTheory.BiconeHom.casesOn (motive := fun a a_1 x =>
      X = a →
        Y = a_1 →
          HEq f x →
            ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶
              (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
      f
      (fun h =>
        Eq.ndrec (motive := fun {X} =>
          (f : X ⟶ Y) →
            Y = CategoryTheory.Bicone.left →
              HEq f CategoryTheory.BiconeHom.left_id →
                ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶
                  (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
          (fun f h =>
            Eq.ndrec (motive := fun {Y} =>
              (f : CategoryTheory.Bicone.left ⟶ Y) →
                HEq f CategoryTheory.BiconeHom.left_id →
                  ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) CategoryTheory.Bicone.left ⟶
                    (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
              (fun f h =>
                CategoryTheory.CategoryStruct.id
                  ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) CategoryTheory.Bicone.left))
              ⋯ f)
          ⋯ f)
      (fun h =>
        Eq.ndrec (motive := fun {X} =>
          (f : X ⟶ Y) →
            Y = CategoryTheory.Bicone.right →
              HEq f CategoryTheory.BiconeHom.right_id →
                ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶
                  (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
          (fun f h =>
            Eq.ndrec (motive := fun {Y} =>
              (f : CategoryTheory.Bicone.right ⟶ Y) →
                HEq f CategoryTheory.BiconeHom.right_id →
                  ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) CategoryTheory.Bicone.right ⟶
                    (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
              (fun f h =>
                CategoryTheory.CategoryStruct.id
                  ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) CategoryTheory.Bicone.right))
              ⋯ f)
          ⋯ f)
      (fun j h =>
        Eq.ndrec (motive := fun {X} =>
          (f : X ⟶ Y) →
            Y = CategoryTheory.Bicone.diagram j →
              HEq f (CategoryTheory.BiconeHom.left j) →
                ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶
                  (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
          (fun f h =>
            Eq.ndrec (motive := fun {Y} =>
              (f : CategoryTheory.Bicone.left ⟶ Y) →
                HEq f (CategoryTheory.BiconeHom.left j) →
                  ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) CategoryTheory.Bicone.left ⟶
                    (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
              (fun f h => c₁.π.app j) ⋯ f)
          ⋯ f)
      (fun j h =>
        Eq.ndrec (motive := fun {X} =>
          (f : X ⟶ Y) →
            Y = CategoryTheory.Bicone.diagram j →
              HEq f (CategoryTheory.BiconeHom.right j) →
                ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶
                  (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
          (fun f h =>
            Eq.ndrec (motive := fun {Y} =>
              (f : CategoryTheory.Bicone.right ⟶ Y) →
                HEq f (CategoryTheory.BiconeHom.right j) →
                  ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) CategoryTheory.Bicone.right ⟶
                    (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
              (fun f h => c₂.π.app j) ⋯ f)
          ⋯ f)
      (fun {j k} f_1 h =>
        Eq.ndrec (motive := fun {X} =>
          (f : X ⟶ Y) →
            Y = CategoryTheory.Bicone.diagram k →
              HEq f (CategoryTheory.BiconeHom.diagram f_1) →
                ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶
                  (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
          (fun f h =>
            Eq.ndrec (motive := fun {Y} =>
              (f : CategoryTheory.Bicone.diagram j ⟶ Y) →
                HEq f (CategoryTheory.BiconeHom.diagram f_1) →
                  ((fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j)
                      (CategoryTheory.Bicone.diagram j) ⟶
                    (fun X => CategoryTheory.Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))
              (fun f h => F.map f_1) ⋯ f)
          ⋯ f)
      ⋯ ⋯ ⋯


@[simp]
theorem differentiableOn_star_iff :
    DifferentiableOn 𝕜 (fun y => star (f y)) s ↔ DifferentiableOn 𝕜 f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[StarRing 𝕜]
[TrivialStar 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[StarAddMonoid F]
[NormedSpace 𝕜 F]
[StarModule 𝕜 F]
[ContinuousStar F]
{f : E → F}
{s : Set E}


@[to_additive card_sq_le_card_mul_addEnergy]
lemma card_sq_le_card_mul_mulEnergy (s t u : Finset α) :
    ((s ×ˢ t).filter fun (a, b) ↦ a * b ∈ u).card ^ 2 ≤ u.card * Eₘ[s, t]

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

(Finset.filter (fun x => Finset.addEnergy_eq_sum_sq'.match_1 (fun x => Prop) x fun a b => a + b ∈ u) (s ×ˢ t)).card ^
    2 ≤
  u.card * s.addEnergy t


@[to_additive (attr := simp)]
theorem coe_mk' : (mk' N : G → G ⧸ N) = mk

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]

⇑(QuotientGroup.mk' N) = QuotientGroup.mk


/-- Given a type `E` equipped with a fiber bundle structure, this is a `Prop` typeclass
for trivializations of `E`, expressing that a trivialization is in the designated atlas for the
bundle.  This is needed because lemmas about the linearity of trivializations or the continuity (as
functions to `F →L[R] F`, where `F` is the model fiber) of the transition functions are only
expected to hold for trivializations in the designated atlas. -/
@[mk_iff]
class MemTrivializationAtlas [FiberBundle F E] (e : Trivialization F (π F E)) : Prop where
  out : e ∈ trivializationAtlas F E

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

MemTrivializationAtlas e ↔ e ∈ trivializationAtlas F E


theorem isImage_preimage_prod (e : Trivialization F proj) (s : Set B) :
    e.toPartialHomeomorph.IsImage (proj ⁻¹' s) (s ×ˢ univ)

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
(s : Set B)


lemma nonsingular_negAdd_of_eval_derivative_ne_zero {x₁ x₂ y₁ L : R}
    (hx' : W.Equation (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L))
    (hx : (W.addPolynomial x₁ y₁ L).derivative.eval (W.addX x₁ x₂ L) ≠ 0) :
    W.Nonsingular (W.addX x₁ x₂ L) (W.negAddY x₁ x₂ y₁ L)

(hx : Polynomial.eval (W.addX x₁ x₂ L) (Polynomial.derivative (W.addPolynomial x₁ y₁ L)) ≠ 0)


theorem univ_pi_nonempty_iff : (pi univ t).Nonempty ↔ ∀ i, (t i).Nonempty

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

(Set.univ.pi t).Nonempty ↔ ∀ (i : ι), (t i).Nonempty


lemma restrictPreimage_injective (hf : Injective f) : Injective (t.restrictPreimage f)

{α : Type u_1}
{β : Type u_2}
(t : Set β)
{f : α → β}
(hf : Function.Injective f)


lemma append_apply_left (p q : RelSeries r) (connect : r p.last q.head)
    (i : Fin (p.length + 1)) :
    p.append q connect ((i.castAdd (q.length + 1)).cast (by dsimp; abel)) = p i

{α : Type u_1}
{r : Rel α α}
(p q : RelSeries r)
(connect : r p.last q.head)
(i : Fin (p.length + 1))

(p.append q connect).toFun (Fin.cast ⋯ (Fin.castAdd (q.length + 1) i)) = p.toFun i


@[simp] theorem decide_true_eq  {b : Bool} [Decidable (true = b)]  : decide (true  = b) =  b


@[simp]
theorem sizeUpTo_zero : c.sizeUpTo 0 = 0


@[to_additive]
theorem isClosedMap_mul_right (a : G) : IsClosedMap (· * a)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[ContinuousAdd G]
(a : G)


/-- `AlternatingMap.curryLeft` as a `LinearMap`. This is a separate definition as dot notation
does not work for this version. -/
@[simps]
def curryLeftLinearMap {n : ℕ} :
    (M'' [⋀^Fin n.succ]→ₗ[R'] N'') →ₗ[R'] M'' →ₗ[R'] M'' [⋀^Fin n]→ₗ[R'] N''

{R' : Type u_10}
{M'' : Type u_11}
{N'' : Type u_13}
[CommSemiring R']
[AddCommMonoid M'']
[AddCommMonoid N'']
[Module R' M'']
[Module R' N'']
{n : ℕ}
(f : M'' [⋀^Fin n.succ]→ₗ[R'] N'')

AlternatingMap.curryLeftLinearMap f = f.curryLeft


/-- The sum of a nontrivial subgroup of the units of a field is zero. -/
theorem sum_subgroup_units_eq_zero [Ring K] [NoZeroDivisors K]
    {G : Subgroup Kˣ} [Fintype G] (hg : G ≠ ⊥) :
    ∑ x : G, (x.val : K) = 0

{K : Type u_1}
[Ring K]
[NoZeroDivisors K]
{G : Subgroup Kˣ}
[Fintype ↥G]
(hg : G ≠ ⊥)


theorem openSegment_symm (x y : E) : openSegment 𝕜 x y = openSegment 𝕜 y x

(𝕜 : Type u_1)
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
(x y : E)


theorem HasStrictDerivAt.const_cpow (hf : HasStrictDerivAt f f' x) (h : c ≠ 0 ∨ f x ≠ 0) :
    HasStrictDerivAt (fun x => c ^ f x) (c ^ f x * Complex.log c * f') x

{f : ℂ → ℂ}
{f' x c : ℂ}
(hf : HasStrictDerivAt f f' x)
(h : c ≠ 0 ∨ f x ≠ 0)


@[simp]
theorem measure_Icc (a b : ℝ) : f.measure (Icc a b) = ofReal (f b - leftLim f a)

f.measure (Set.Icc a b) = ENNReal.ofReal (↑f b - Function.leftLim (↑f) a)


@[simp, norm_cast]
theorem coe_top : ((⊤ : L.DefinableSet A α) : Set (α → M)) = univ

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{A : Set M}
{α : Type u₁}


/-- An encoding of bounded formulas as lists. -/
@[simps]
protected def encoding : Encoding (Σn, L.BoundedFormula α n)

(l : List ((k : ℕ) × L.Term (α ⊕ Fin k) ⊕ (n : ℕ) × L.Relations n ⊕ ℕ))

FirstOrder.Language.BoundedFormula.encoding.decode l = (FirstOrder.Language.BoundedFormula.listDecode l)[0]?


@[simp]
theorem inf_apply (f g : InfTopHom α β) (a : α) : (f ⊓ g) a = f a ⊓ g a

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Top α]
[SemilatticeInf β]
[OrderTop β]
(f g : InfTopHom α β)
(a : α)


@[to_additive]
theorem prod_eq_tprod_mulIndicator (f : β → α) (s : Finset β) :
    ∏ x ∈ s, f x = ∏' x, Set.mulIndicator (↑s) f x

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
(f : β → α)
(s : Finset β)

∑ x ∈ s, f x = ∑' (x : β), (↑s).indicator f x


theorem isConj_of {σ τ : alternatingGroup α} (hc : IsConj (σ : Perm α) (τ : Perm α))
    (hσ : (σ : Perm α).support.card + 2 ≤ Fintype.card α) : IsConj σ τ

(hσ : (↑σ).support.card + 2 ≤ Fintype.card α)


theorem restrict_mono_ae (h : s ≤ᵐ[μ] t) : μ.restrict s ≤ μ.restrict t

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(h : s ≤ᵐ[μ] t)


@[ext]
theorem ModelProd.ext {x y : ModelProd H H'} (h₁ : x.1 = y.1) (h₂ : x.2 = y.2) : x = y

{H : Type u}
{H' : Type u_1}
{x y : ModelProd H H'}
(h₁ : x.1 = y.1)
(h₂ : x.2 = y.2)


@[simp]
theorem vaddConst_toAffineEquiv (p : P) :
    (vaddConst 𝕜 p).toAffineEquiv = AffineEquiv.vaddConst 𝕜 p

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(p : P)

(AffineIsometryEquiv.vaddConst 𝕜 p).toAffineEquiv = AffineEquiv.vaddConst 𝕜 p


lemma sqrt_le_add (n : ℕ) : n ≤ sqrt n * sqrt n + sqrt n + sqrt n


theorem supported_mono (st : s ⊆ t) : supported R s ≤ supported R t

{σ : Type u_1}
{R : Type u}
[CommSemiring R]
{s t : Set σ}
(st : s ⊆ t)

MvPolynomial.supported R s ≤ MvPolynomial.supported R t


theorem comp_def (f : M ⟶ N) (g : N ⟶ U) : f ≫ g = g.comp f

{R : Type u}
[Ring R]
{M N U : ModuleCat R}
(f : M ⟶ N)
(g : N ⟶ U)


theorem formPerm_eq_self_of_not_mem (s : Cycle α) (h : Nodup s) (x : α) (hx : x ∉ s) :
    formPerm s h x = x

{α : Type u_1}
[DecidableEq α]
(s : Cycle α)
(h : s.Nodup)
(x : α)
(hx : x ∉ s)


theorem strictMono_l [Preorder α] [Preorder β] (gi : GaloisCoinsertion l u) : StrictMono l

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[Preorder α]
[Preorder β]
(gi : GaloisCoinsertion l u)


/-- A function which is `EventuallyEq` to some `EventuallyMeasurable` function
is `EventuallyMeasurable`.-/
theorem EventuallyMeasurable.congr
    (hf : EventuallyMeasurable m l f) (hgf : g =ᶠ[l] f) : EventuallyMeasurable m l g

{α : Type u_1}
{m : MeasurableSpace α}
{l : Filter α}
[CountableInterFilter l]
{β : Type u_2}
[MeasurableSpace β]
{f g : α → β}
(hf : EventuallyMeasurable m l f)
(hgf : g =ᶠ[l] f)


theorem IsRelPrime.of_prod_right (H1 : IsRelPrime x (∏ i ∈ t, s i)) (i : I) (hit : i ∈ t) :
    IsRelPrime x (s i)

{α : Type u_1}
{I : Type u_2}
[CommMonoid α]
[DecompositionMonoid α]
{x : α}
{s : I → α}
{t : Finset I}
(H1 : IsRelPrime x (∏ i ∈ t, s i))
(i : I)
(hit : i ∈ t)


theorem coe_lt [Preorder β] {f g : α → β} : (f : β*) < g ↔ ∀* x, f x < g x

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


theorem add_lt_add {a b c d : Nat} (h₁ : a < b) (h₂ : c < d) : a + c < b + d


@[simp]
theorem symmDiff_nonempty : (s ∆ t).Nonempty ↔ s ≠ t


@[simp] theorem abs_top : (⊤ : EReal).abs = ⊤


theorem integral_comp_inv_mul_left (g : ℝ → F) (a : ℝ) :
    (∫ x : ℝ, g (a⁻¹ * x)) = |a| • ∫ y : ℝ, g y

{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
(g : ℝ → F)
(a : ℝ)

∫ (x : ℝ), g (a⁻¹ * x) = |a| • ∫ (y : ℝ), g y


theorem Nonempty.imp {α} {p : Prop} : (Nonempty α → p) ↔ (α → p)


@[simp] lemma exterior_eq_empty : exterior s = ∅ ↔ s = ∅

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


/-- In a commutative monoid, an element `a` divides an element `b` iff all
  left associates of `a` divide `b`. -/
@[simp]
theorem mul_left_dvd (hu : IsUnit u) : u * a ∣ b ↔ a ∣ b

{α : Type u_1}
[CommMonoid α]
{a b u : α}
(hu : IsUnit u)


@[simp]
theorem count_some (hp : Irreducible p) (s : Multiset _) :
    count p (WithTop.some s) = s.count ⟨p, hp⟩

[(p : Associates α) → Decidable (Irreducible p)]


@[simp]
theorem Prod.fst_comp_toSigma {α β} : Sigma.fst ∘ @Prod.toSigma α β = Prod.fst