theorem isAlgebraic_adjoin {S : Set L} (hS : ∀ x ∈ S, IsIntegral K x) :
    Algebra.IsAlgebraic K (adjoin K S)

{K : Type u}
[Field K]
{L : Type u_3}
[Field L]
[Algebra K L]
{S : Set L}
(hS : ∀ x ∈ S, IsIntegral K x)

Algebra.IsAlgebraic K ↥(IntermediateField.adjoin K S)


theorem irreducible_of_mirror (h1 : ¬IsUnit f)
    (h2 : ∀ k, f * f.mirror = k * k.mirror → k = f ∨ k = -f ∨ k = f.mirror ∨ k = -f.mirror)
    (h3 : IsRelPrime f f.mirror) : Irreducible f

(h2 : ∀ (k : Polynomial R), f * f.mirror = k * k.mirror → k = f ∨ k = -f ∨ k = f.mirror ∨ k = -f.mirror)


@[simp]
theorem ratio_mul (f g : α →ᵈ α) : ratio (f * g) = ratio f * ratio g

{α : Type u_1}
[PseudoEMetricSpace α]
(f g : α →ᵈ α)

Dilation.ratio (f * g) = Dilation.ratio f * Dilation.ratio g


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

(h : ∀ (c : R) {x : M}, x ∈ S.carrier → c • x ∈ S.carrier)

x ∈ { toAddSubmonoid := S, smul_mem' := h } ↔ x ∈ S


lemma homologyMap'_comp (φ₁ : S₁ ⟶ S₂) (φ₂ : S₂ ⟶ S₃)
    (h₁ : S₁.HomologyData) (h₂ : S₂.HomologyData) (h₃ : S₃.HomologyData) :
    homologyMap' (φ₁ ≫ φ₂) h₁ h₃ = homologyMap' φ₁ h₁ h₂ ≫
      homologyMap' φ₂ h₂ h₃

{S₁ S₂ S₃ : CategoryTheory.ShortComplex C}

(φ₁ : S₁ ⟶ S₂)

(φ₂ : S₂ ⟶ S₃)

CategoryTheory.ShortComplex.homologyMap' (CategoryTheory.CategoryStruct.comp φ₁ φ₂) h₁ h₃ =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap' φ₁ h₁ h₂)
    (CategoryTheory.ShortComplex.homologyMap' φ₂ h₂ h₃)


@[simp]
theorem mem_univ_hom (x : ZFSet.{u}) : univ.{u} x


@[simp]
theorem Fin.image_succAbove_univ {n : ℕ} (i : Fin (n + 1)) : univ.image i.succAbove = {i}ᶜ

Finset.image i.succAbove Finset.univ = {i}ᶜ


theorem zero_div_subset (s : Finset α) : 0 / s ⊆ 0

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


@[simp] lemma log_lt_top_iff {x : ℝ≥0∞} : log x < ⊤ ↔ x < ⊤


@[simp, norm_cast]
lemma ofReal_lt_ofReal {x y : ℝ} : (x : K) < (y : K) ↔ x < y


protected theorem lt_of_not_ge : ∀{a b : Nat}, ¬(b ≥ a) → b < a


lemma isIso_g' (hS : S.Exact) (h : S.RightHomologyData) [Epi S.g] :
    IsIso h.g'

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Balanced C]
(hS : S.Exact)
(h : S.RightHomologyData)
[CategoryTheory.Epi S.g]


/-- A version of `Equiv.mulLeft a b⁻¹` that is defeq to `a / b`. -/
@[to_additive (attr := simps) " A version of `Equiv.addLeft a (-b)` that is defeq to `a - b`. "]
protected def divLeft (a : G) : G ≃ G


theorem tendsto_setToFun_approxOn_of_measurable_of_range_subset
    (hT : DominatedFinMeasAdditive μ T C) [MeasurableSpace E] [BorelSpace E] {f : α → E}
    (fmeas : Measurable f) (hf : Integrable f μ) (s : Set E) [SeparableSpace s]
    (hs : range f ∪ {0} ⊆ s) :
    Tendsto (fun n => setToFun μ T hT (SimpleFunc.approxOn f fmeas s 0 (hs <| by simp) n)) atTop
      (𝓝 <| setToFun μ T hT f)

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

Filter.Tendsto (fun n => MeasureTheory.setToFun μ T hT ↑(MeasureTheory.SimpleFunc.approxOn f fmeas s 0 ⋯ n))
  Filter.atTop (𝓝 (MeasureTheory.setToFun μ T hT f))


lemma Real.dist_le_of_mem_uIcc {x y x' y' : ℝ} (hx : x ∈ uIcc x' y') (hy : y ∈ uIcc x' y') :
    dist x y ≤ dist x' y'

{x y x' y' : ℝ}
(hx : x ∈ Set.uIcc x' y')
(hy : y ∈ Set.uIcc x' y')


/-- Equivariant functions :
When `φ : M → N` is a function, and types `X` and `Y` are endowed with actions of `M` and `N`,
a function `f : X → Y` is `φ`-equivariant if `f (m • x) = (φ m) • (f x)`.  -/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure MulActionHom where
  /-- The underlying function. -/
  protected toFun : X → Y
  /-- The proposition that the function commutes with the actions. -/
  protected map_smul' : ∀ (m : M) (x : X), toFun (m • x) = (φ m) • toFun x

{M : Type u_2}
{N : Type u_3}
{φ : M → N}
{X : Type u_5}
[SMul M X]
{Y : Type u_6}
[SMul N Y]
(self : X →ₑ[φ] Y)
(m : M)
(x : X)


/-- `SimpleFunc.lintegral` is monotone both in function and in measure. -/
@[mono]
theorem lintegral_mono {f g : α →ₛ ℝ≥0∞} (hfg : f ≤ g) (hμν : μ ≤ ν) :
    f.lintegral μ ≤ g.lintegral ν

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{f g : MeasureTheory.SimpleFunc α ℝ≥0∞}
(hfg : f ≤ g)
(hμν : μ ≤ ν)


/-- Conditional kernel of a kernel `κ : Kernel α (β × Ω)`: a Markov kernel such that
`fst κ ⊗ₖ condKernel κ = κ` (see `MeasureTheory.Measure.compProd_fst_condKernel`).
It exists whenever `Ω` is standard Borel and either `α` is countable
or `β` is countably generated. -/
noncomputable
irreducible_def condKernel : Kernel (α × β) Ω

[h : MeasurableSpace.CountableOrCountablyGenerated α β]

(κ : ProbabilityTheory.Kernel α (β × Ω))

κ.condKernel =
  if hα : Countable α then ProbabilityTheory.Kernel.condKernelCountable (fun a => (κ a).condKernel) ⋯
  else κ.condKernelBorel


@[to_additive (attr := simp)]
lemma symm_mk_one [One M] : mk.symm (1 : Mᵈᵐᵃ) = 1


@[trans]
theorem trans {u : VectorMeasure α L} {v : VectorMeasure α M} {w : VectorMeasure α N} (huv : u ≪ᵥ v)
    (hvw : v ≪ᵥ w) : u ≪ᵥ w

{α : Type u_1}
{m : MeasurableSpace α}
{L : Type u_3}
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid L]
[TopologicalSpace L]
[AddCommMonoid M]
[TopologicalSpace M]
[AddCommMonoid N]
[TopologicalSpace N]
{u : MeasureTheory.VectorMeasure α L}
{v : MeasureTheory.VectorMeasure α M}
{w : MeasureTheory.VectorMeasure α N}
(huv : u ≪ᵥ v)
(hvw : v ≪ᵥ w)


@[to_additive]
theorem symm_bijective : Function.Bijective (symm : (M ≃* N) → N ≃* M)

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]


theorem IsBounded.subset (ht : IsBounded t) (hs : s ⊆ t) : IsBounded s

∀ {x : Bornology α} {s t : Set α}, Bornology.IsBounded t → s ⊆ t → Bornology.IsBounded s


theorem toSubalgebra_mk (s : Submodule R A) (h1 hmul) :
    s.toSubalgebra h1 hmul =
      Subalgebra.mk ⟨⟨⟨s, @hmul⟩, h1⟩, s.add_mem, s.zero_mem⟩
        (by intro r; rw [Algebra.algebraMap_eq_smul_one]; apply s.smul_mem _ h1)

(hmul : ∀ (x y : A), x ∈ s → y ∈ s → x * y ∈ s)

s.toSubalgebra h1 hmul =
  { carrier := ↑s, mul_mem' := hmul, one_mem' := h1, add_mem' := ⋯, zero_mem' := ⋯, algebraMap_mem' := ⋯ }


lemma derivedSet_union (A B : Set X) : derivedSet (A ∪ B) = derivedSet A ∪ derivedSet B

{X : Type u_1}
[TopologicalSpace X]
(A B : Set X)


theorem filter_lt_lt_eq_Ioo [DecidablePred fun j => a < j ∧ j < b] :
    (univ.filter fun j => a < j ∧ j < b) = Ioo a b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
(a b : α)
[Fintype α]
[DecidablePred fun j => a < j ∧ j < b]

Finset.filter (fun j => a < j ∧ j < b) Finset.univ = Finset.Ioo a b


{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N : LieSubmodule R L M)
(I : LieIdeal R L)


/-- A morphism between target objects `T ⟶ T'`
covariantly induces a functor between costructured arrows,
`CostructuredArrow S T ⥤ CostructuredArrow S T'`.

Ideally this would be described as a 2-functor from `D`
(promoted to a 2-category with equations as 2-morphisms)
to `Cat`.
-/
@[simps!]
def map (f : T ⟶ T') : CostructuredArrow S T ⥤ CostructuredArrow S T'

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{T T' : D}
{S : CategoryTheory.Functor C D}
(f : T ⟶ T')

∀ {X Y : CategoryTheory.Comma S (CategoryTheory.Functor.fromPUnit T)} (f_1 : X ⟶ Y),
  ((CategoryTheory.CostructuredArrow.map f).map f_1).left = f_1.left


@[simp]
theorem equiv_refl : Compacts.equiv (Homeomorph.refl α) = Equiv.refl _

TopologicalSpace.Compacts.equiv (Homeomorph.refl α) = Equiv.refl (TopologicalSpace.Compacts α)


theorem fundamentalSequenceProp_inr (o f) :
    FundamentalSequenceProp o (Sum.inr f) ↔
      o.repr.IsLimit ∧
        (∀ i, f i < f (i + 1) ∧ f i < o ∧ (o.NF → (f i).NF)) ∧
        ∀ a, a < o.repr → ∃ i, a < (f i).repr

o.FundamentalSequenceProp (Sum.inr f) ↔
  o.repr.IsLimit ∧ (∀ (i : ℕ), f i < f (i + 1) ∧ f i < o ∧ (o.NF → (f i).NF)) ∧ ∀ a < o.repr, ∃ i, a < (f i).repr


theorem codisjoint_iff_le_sup : Codisjoint a b ↔ ⊤ ≤ a ⊔ b

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b : α}


theorem lift'_lift_assoc {g : Set α → Filter β} {h : Set β → Set γ} (hg : Monotone g) :
    (f.lift g).lift' h = f.lift fun s => (g s).lift' h

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{g : Set α → Filter β}
{h : Set β → Set γ}
(hg : Monotone g)


/-- A function is almost everywhere strongly measurable if and only if it is almost everywhere
measurable, and up to a zero measure set its range is contained in a separable set. -/
theorem _root_.aestronglyMeasurable_iff_aemeasurable_separable [PseudoMetrizableSpace β]
    [MeasurableSpace β] [BorelSpace β] :
    AEStronglyMeasurable f μ ↔
      AEMeasurable f μ ∧ ∃ t : Set β, IsSeparable t ∧ ∀ᵐ x ∂μ, f x ∈ t

MeasureTheory.AEStronglyMeasurable f μ ↔ AEMeasurable f μ ∧ ∃ t, TopologicalSpace.IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t


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

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
(f : EsakiaHom α β)
(f' : α → β)
(h : f' = ⇑f)


@[simp]
theorem bind₁_wittPolynomial_xInTermsOfW [Invertible (p : R)] (n : ℕ) :
    bind₁ (W_ R) (xInTermsOfW p R n) = X n

(p : ℕ)
(R : Type u_1)
[CommRing R]
[Invertible ↑p]
(n : ℕ)

(MvPolynomial.bind₁ (W_ R)) (xInTermsOfW p R n) = MvPolynomial.X n


/-- If the lines determined by corresponding pairs of points in two angles are parallel, twice
those angles are equal. -/
theorem two_zsmul_oangle_of_parallel {p₁ p₂ p₃ p₄ p₅ p₆ : P}
    (h₁₂₄₅ : line[ℝ, p₁, p₂] ∥ line[ℝ, p₄, p₅]) (h₃₂₆₅ : line[ℝ, p₃, p₂] ∥ line[ℝ, p₆, p₅]) :
    (2 : ℤ) • ∡ p₁ p₂ p₃ = (2 : ℤ) • ∡ p₄ p₅ p₆

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

(h₁₂₄₅ : affineSpan ℝ {p₁, p₂} ∥ affineSpan ℝ {p₄, p₅})

(h₃₂₆₅ : affineSpan ℝ {p₃, p₂} ∥ affineSpan ℝ {p₆, p₅})

2 • ∡ p₁ p₂ p₃ = 2 • ∡ p₄ p₅ p₆


lemma IsSMulRegular.isSMulRegular_on_quot_iff_smul_top_inf_eq_smul :
    IsSMulRegular M r → (IsSMulRegular (M ⧸ N) r ↔ r • ⊤ ⊓ N ≤ r • N)

{R : Type u_1}
{M : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)
{r : R}


@[to_additive Finset.sum_nonneg']
theorem one_le_prod'' (h : ∀ i : ι, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i

{ι : Type u_1}
{N : Type u_5}
[OrderedCommMonoid N]
{f : ι → N}
{s : Finset ι}
(h : ∀ (i : ι), 1 ≤ f i)


@[simp]
lemma inr_rel'_inr_iff (x₂ y₂ : X₂) :
    Rel' f g (Sum.inr x₂) (Sum.inr y₂) ↔ x₂ = y₂

{S X₁ X₂ : Type u}
(f : S ⟶ X₁)
(g : S ⟶ X₂)
(x₂ y₂ : X₂)

CategoryTheory.Limits.Types.Pushout.Rel' f g (Sum.inr x₂) (Sum.inr y₂) ↔ x₂ = y₂


theorem locallyIntegrable_zero : LocallyIntegrable (fun _ ↦ (0 : E)) μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[TopologicalSpace X]
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure X}

MeasureTheory.LocallyIntegrable (fun x => 0) μ


@[simp]
theorem iUnion_Ico_eq_Iio_self_iff {f : ι → α} {a : α} :
    ⋃ i, Ico (f i) a = Iio a ↔ ∀ x < a, ∃ i, f i ≤ x

{ι : Sort u}
{α : Type v}
[LinearOrder α]
{f : ι → α}
{a : α}

⋃ i, Set.Ico (f i) a = Set.Iio a ↔ ∀ x < a, ∃ i, f i ≤ x


@[to_additive]
theorem map_srange (g : N →ₙ* P) (f : M →ₙ* N) : f.srange.map g = (g.comp f).srange

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[Add M]
[Add N]
[Add P]
(g : AddHom N P)
(f : AddHom M N)

AddSubsemigroup.map g f.srange = (g.comp f).srange


@[simp] -- Porting note: add norm_cast; we leave it out for now to reproduce mathlib3 behavior.
theorem coe_smul' (c : ℝ≥0) (K : ConvexBody V) : (↑(c • K) : Set V) = c • (K : Set V)

{V : Type u_1}
[TopologicalSpace V]
[AddCommGroup V]
[Module ℝ V]
[ContinuousSMul ℝ V]
[ContinuousAdd V]
(c : ℝ≥0)
(K : ConvexBody V)


protected theorem equiv_of_isEmpty (x y : PSet) [IsEmpty x.Type] [IsEmpty y.Type] : Equiv x y

(x : PSet)
(y : PSet)
[IsEmpty x.Type]
[IsEmpty y.Type]


lemma shiftIso_add_inv_app (n m a a' a'' : M) (ha' : n + a = a') (ha'' : m + a' = a'') (X : C) :
    (F.shiftIso (m + n) a a'' (by rw [add_assoc, ha', ha''])).inv.app X =
      (shiftIso F m a' a'' ha'').inv.app X ≫
        (shiftIso F n a a' ha').inv.app ((shiftFunctor C m).obj X) ≫
          (shift F a).map ((shiftFunctorAdd C m n).inv.app X)

{C : Type u_1}
{A : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_5, u_2} A]
(F : C ⥤ A)
{M : Type u_3}
[AddMonoid M]
[CategoryTheory.HasShift C M]
[F.ShiftSequence M]
(n m a a' a'' : M)
(ha' : n + a = a')
(ha'' : m + a' = a'')
(X : C)

(F.shiftIso (m + n) a a'' ⋯).inv.app X =
  (F.shiftIso m a' a'' ha'').inv.app X ≫
    (F.shiftIso n a a' ha').inv.app ((CategoryTheory.shiftFunctor C m).obj X) ≫
      (F.shift a).map ((CategoryTheory.shiftFunctorAdd C m n).inv.app X)


theorem modByMonic_X (p : R[X]) : p %ₘ X = C (p.eval 0)

p %ₘ Polynomial.X = Polynomial.C (Polynomial.eval 0 p)


@[to_additive]
theorem Multipliable.of_inv (hf : Multipliable fun b ↦ (f b)⁻¹) : Multipliable f

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f : β → α}
(hf : Multipliable fun b => (f b)⁻¹)


theorem le_self_pow (ha : 1 ≤ a) (h : m ≠ 0) : a ≤ a ^ m

{R : Type u_3}
[OrderedSemiring R]
{a : R}
{m : ℕ}
(ha : 1 ≤ a)
(h : m ≠ 0)


@[simp]
theorem id_apply (a : α) : PFun.id α a = Part.some a


theorem ext_iff {r s : Setoid α} : r = s ↔ ∀ a b, r.Rel a b ↔ s.Rel a b

r = s ↔ ∀ (a b : α), r.Rel a b ↔ s.Rel a b


theorem quotientMap_quotient_mk' : QuotientMap (@Quotient.mk' X s)

{X : Type u}
[TopologicalSpace X]
{s : Setoid X}


/-- In a topological semiring, the left-multiplication `AddMonoidHom` is continuous. -/
theorem mulLeft_continuous (x : α) : Continuous (AddMonoidHom.mulLeft x)

{α : Type u_1}
[TopologicalSpace α]
[NonUnitalNonAssocRing α]
[TopologicalRing α]
(x : α)


/-- If `p` is a formal multilinear series such that `p m = 0` for `n ≤ m`, then
`p.changeOrigin x k = 0` for `n ≤ k`.  -/
lemma changeOrigin_finite_of_finite (p : FormalMultilinearSeries 𝕜 E F) {n : ℕ}
    (hn : ∀ (m : ℕ), n ≤ m → p m = 0) {k : ℕ} (hk : n ≤ k) :
    p.changeOrigin x k = 0

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
(p : FormalMultilinearSeries 𝕜 E F)
{n : ℕ}
(hn : ∀ (m : ℕ), n ≤ m → p m = 0)
{k : ℕ}
(hk : n ≤ k)


theorem ex1_dioph {S : Set (Option α → ℕ)} : Dioph S → Dioph {v | ∃ x, x ::ₒ v ∈ S}


lemma zpow_one_add₀ (h : a ≠ 0) (i : ℤ) : a ^ (1 + i) = a * a ^ i

{G₀ : Type u_3}
[GroupWithZero G₀]
{a : G₀}
(h : a ≠ 0)
(i : ℤ)


/-- A non-unital ring homomorphism `f : R →ₙ* S` such that `f x` commutes with `f y` for all `x, y`
defines a non-unital ring homomorphism from `Rᵐᵒᵖ`. -/
@[simps (config := .asFn)]
def NonUnitalRingHom.fromOpposite {R S : Type*} [NonUnitalNonAssocSemiring R]
    [NonUnitalNonAssocSemiring S] (f : R →ₙ+* S) (hf : ∀ x y, Commute (f x) (f y)) : Rᵐᵒᵖ →ₙ+* S

{R : Type u_2}
{S : Type u_3}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(f : R →ₙ+* S)
(hf : ∀ (x y : R), Commute (f x) (f y))

⇑(f.fromOpposite hf) = ⇑f ∘ MulOpposite.unop


theorem length_toList {xs : t α} : length xs = List.length (toList xs)

{α : Type u}
{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
{xs : t α}

Traversable.length xs = (Traversable.toList xs).length


theorem left_mem_of_mk_mem_sym2 {xs : List α} {a b : α}
    (h : s(a, b) ∈ xs.sym2) : a ∈ xs

{α : Type u_1}
{xs : List α}
{a b : α}
(h : s(a, b) ∈ xs.sym2)


theorem integrable_cexp_neg_sum_mul_add {ι : Type*} [Fintype ι] {b : ι → ℂ}
    (hb : ∀ i, 0 < (b i).re) (c : ι → ℂ) :
    Integrable (fun (v : ι → ℝ) ↦ cexp (- ∑ i, b i * (v i : ℂ) ^ 2 + ∑ i, c i * v i))

{ι : Type u_2}
[Fintype ι]
{b : ι → ℂ}
(hb : ∀ (i : ι), 0 < (b i).re)
(c : ι → ℂ)

MeasureTheory.Integrable (fun v => cexp (-∑ i : ι, b i * ↑(v i) ^ 2 + ∑ i : ι, c i * ↑(v i))) MeasureTheory.volume


theorem foldl_strictMono [Preorder α] {f : α → β → α} (H : ∀ b, StrictMono fun a ↦ f a b)
    (l : List β) : StrictMono fun a ↦ l.foldl f a

{f : α → β → α}

(H : ∀ (b : β), StrictMono fun a => f a b)


theorem tendsto_rightLim (x : α) : Tendsto f (𝓝[>] x) (𝓝 (rightLim f x))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Monotone f)
[TopologicalSpace α]
[OrderTopology α]
(x : α)

Filter.Tendsto f (𝓝[>] x) (𝓝 (Function.rightLim f x))


lemma strictMono_addNat (m) : StrictMono ((addNat · m) : Fin n → Fin (n + m))


/-- An open immersion `f : X ⟶ Y` induces an isomorphism `X ≅ Y|_{f(X)}`. -/
@[simps! hom_c_app]
noncomputable def isoRestrict : X ≅ Y.restrict H.base_open

{X Y : AlgebraicGeometry.PresheafedSpace C}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

∀ (X_1 : (TopologicalSpace.Opens ↑↑(Y.restrict ⋯))ᵒᵖ),
  (AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.isoRestrict f).hom.c.app X_1 =
    f.c.app (Opposite.op ((AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.opensFunctor f).obj (Opposite.unop X_1))) ≫
      X.presheaf.map (CategoryTheory.eqToHom ⋯)


@[ext]
theorem limit_obj_ext {H : J ⥤ K ⥤ C} [HasLimitsOfShape J C] {k : K} {W : C}
    {f g : W ⟶ (limit H).obj k}
    (w : ∀ j, f ≫ (Limits.limit.π H j).app k = g ≫ (Limits.limit.π H j).app k) : f = g

{f g : W ⟶ (CategoryTheory.Limits.limit H).obj k}

(w : ∀ (j : J), f ≫ (CategoryTheory.Limits.limit.π H j).app k = g ≫ (CategoryTheory.Limits.limit.π H j).app k)


/-- A short complex `S` has right homology when there exists a `S.RightHomologyData` -/
class HasRightHomology : Prop where
  condition : Nonempty S.RightHomologyData


theorem iInf_mul (f : ι → ℝ≥0) (a : ℝ≥0) : iInf f * a = ⨅ i, f i * a


/-- `f` has power series `p` at `x` iff some local extension of `f` has that series -/
lemma hasFPowerSeriesWithinOnBall_iff_exists_hasFPowerSeriesOnBall [CompleteSpace F] {f : E → F}
    {p : FormalMultilinearSeries 𝕜 E F} {s : Set E} {x : E} {r : ℝ≥0∞} :
    HasFPowerSeriesWithinOnBall f p s x r ↔
      ContinuousWithinAt f s x ∧ ∃ g, EqOn f g (s ∩ EMetric.ball x r) ∧
        HasFPowerSeriesOnBall g p x r

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{f : E → F}
{p : FormalMultilinearSeries 𝕜 E F}
{s : Set E}
{x : E}
{r : ℝ≥0∞}

HasFPowerSeriesWithinOnBall f p s x r ↔
  ContinuousWithinAt f s x ∧ ∃ g, Set.EqOn f g (s ∩ EMetric.ball x r) ∧ HasFPowerSeriesOnBall g p x r


@[simp] lemma comp_sup_lift (a b : α) : comp a ⊔ lift b = comp (a \ b)

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

Booleanisation.comp a ⊔ Booleanisation.lift b = Booleanisation.comp (a \ b)


@[to_additive]
theorem _root_.dfinsupp_prod_mem [∀ i, Zero (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)]
    [CommMonoid γ] {S : Type*} [SetLike S γ] [SubmonoidClass S γ]
    (s : S) (f : Π₀ i, β i) (g : ∀ i, β i → γ)
    (h : ∀ c, f c ≠ 0 → g c (f c) ∈ s) : f.prod g ∈ s

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

(h : ∀ (c : ι), f c ≠ 0 → g c (f c) ∈ s)


theorem ContDiff.iterate_deriv :
    ∀ (n : ℕ) {f₂ : 𝕜 → F}, ContDiff 𝕜 ∞ f₂ → ContDiff 𝕜 ∞ (deriv^[n] f₂)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(n : ℕ)
{f₂ : 𝕜 → F}

ContDiff 𝕜 ⊤ f₂ → ContDiff 𝕜 ⊤ (deriv^[n] f₂)


theorem mk_range_le {α β : Type u} {f : α → β} : #(range f) ≤ #α

Cardinal.mk ↑(Set.range f) ≤ Cardinal.mk α


theorem extendFrom_eq [T2Space Y] {A : Set X} {f : X → Y} {x : X} {y : Y} (hx : x ∈ closure A)
    (hf : Tendsto f (𝓝[A] x) (𝓝 y)) : extendFrom A f x = y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space Y]
{A : Set X}
{f : X → Y}
{x : X}
{y : Y}
(hx : x ∈ closure A)
(hf : Filter.Tendsto f (𝓝[A] x) (𝓝 y))


theorem int_cyclotomic_rw {n : ℕ} (h : n ≠ 0) :
    cyclotomic n ℤ = (int_coeff_of_cyclotomic' (Complex.isPrimitiveRoot_exp n h)).choose


theorem arg_eq_pi_iff {z : ℂ} : arg z = π ↔ z.re < 0 ∧ z.im = 0


theorem const_def {y : β} : (fun _ : α ↦ y) = const α y


/-- Symmetric statement to `Finset.image₂_image_left_comm`. -/
theorem image_image₂_distrib_left {g : γ → δ} {f' : α' → β → δ} {g' : α → α'}
    (h_distrib : ∀ a b, g (f a b) = f' (g' a) b) :
    (image₂ f s t).image g = image₂ f' (s.image g') t

{f : α → β → γ}

(h_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b)

Finset.image g (Finset.image₂ f s t) = Finset.image₂ f' (Finset.image g' s) t


/-- A monoidal functor induces a monoidal functor between
the categories of `G`-actions within those categories. -/
@[simps!]
def mapAction : MonoidalFunctor (Action V G) (Action W G)

(F : CategoryTheory.MonoidalFunctor V W)

∀ {X Y : Action V G} (a : X ⟶ Y), ((F.mapAction G).map a).hom = F.map a.hom


@[simp]
theorem frequently_and_distrib_right {f : Filter α} {p : α → Prop} {q : Prop} :
    (∃ᶠ x in f, p x ∧ q) ↔ (∃ᶠ x in f, p x) ∧ q

{α : Type u}
{f : Filter α}
{p : α → Prop}
{q : Prop}

(∃ᶠ (x : α) in f, p x ∧ q) ↔ (∃ᶠ (x : α) in f, p x) ∧ q


theorem NeBot.nonempty (f : Filter α) [hf : f.NeBot] : Nonempty α

{α : Type u}
(f : Filter α)
[hf : f.NeBot]


theorem int_lcm_helper {x y : ℤ} {x' y' d : ℕ}
    (hx : x.natAbs = x') (hy : y.natAbs = y') (h : Nat.lcm x' y' = d) :
    Int.lcm x y = d

{x y : ℤ}
{x' y' d : ℕ}
(hx : x.natAbs = x')
(hy : y.natAbs = y')
(h : x'.lcm y' = d)


@[measurability]
theorem Measurable.subtype_mk {p : β → Prop} {f : α → β} (hf : Measurable f) {h : ∀ x, p (f x)} :
    Measurable fun x => (⟨f x, h x⟩ : Subtype p)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{p : β → Prop}
{f : α → β}
(hf : Measurable f)
{h : ∀ (x : α), p (f x)}


theorem orderTop_sub {Γ} [LinearOrder Γ] {x y : HahnSeries Γ R}
    (hxy : x.orderTop < y.orderTop) : (x - y).orderTop = x.orderTop

{R : Type u_2}
[AddGroup R]
{Γ : Type u_3}
[LinearOrder Γ]
{x y : HahnSeries Γ R}
(hxy : x.orderTop < y.orderTop)


@[simp] theorem some_eq_coe (a : ℝ≥0) : (Option.some a : ℝ≥0∞) = (↑a : ℝ≥0∞)


@[simp] theorem size_swap! (a : Array α) (i j) :
    (a.swap! i j).size = a.size

{α : Type u_1}
(a : Array α)
(i j : Nat)


@[to_additive (attr := simp)]
lemma max_mul_min (a b : α) : max a b * min a b = a * b

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


theorem cont_withSeminorms_normedSpace (F) [SeminormedAddCommGroup F] [NormedSpace 𝕝₂ F]
    [TopologicalSpace E] {p : ι → Seminorm 𝕝 E} (hp : WithSeminorms p)
    (f : E →ₛₗ[τ₁₂] F) (hf : ∃ (s : Finset ι) (C : ℝ≥0), (normSeminorm 𝕝₂ F).comp f ≤ C • s.sup p) :
    Continuous f

{τ₁₂ : 𝕝 →+* 𝕝₂}

(hf : ∃ s C, (normSeminorm 𝕝₂ F).comp f ≤ C • s.sup p)


@[simp]
theorem bot_vsub : (⊥ : Filter β) -ᵥ g = ⊥

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{g : Filter β}


@[simp] theorem mul_val : ↑(A * B) = A.1 * B.1

{n : Type u}
[DecidableEq n]
[Fintype n]
{α : Type v}
[CommRing α]
[StarRing α]
(A B : ↥(Matrix.unitaryGroup n α))


@[mono]
theorem kstar_mono : Monotone (KStar.kstar : α → α)


/-- If `α = β` and `x = x'`, we would like to say that `stalk_map α x = stalk_map β x'`.
Unfortunately, this equality is not well-formed, as their types are not _definitionally_ the same.
To get a proper congruence lemma, we therefore have to introduce these `eqToHom` arrows on
either side of the equality.
-/
theorem congr {X Y : PresheafedSpace.{_, _, v} C} (α β : X ⟶ Y)
    (h₁ : α = β) (x x' : X) (h₂ : x = x') :
    α.stalkMap x ≫ eqToHom (show X.presheaf.stalk x = X.presheaf.stalk x' by rw [h₂]) =
      eqToHom (show Y.presheaf.stalk (α.base x) = Y.presheaf.stalk (β.base x') by rw [h₁, h₂]) ≫
        β.stalkMap x'

{X Y : AlgebraicGeometry.PresheafedSpace C}

AlgebraicGeometry.PresheafedSpace.Hom.stalkMap α x ≫ CategoryTheory.eqToHom ⋯ =
  CategoryTheory.eqToHom ⋯ ≫ AlgebraicGeometry.PresheafedSpace.Hom.stalkMap β x'


theorem eq_of_mem_singleton : a ∈ [b] → a = b

∀ {α : Type u_1} {a b : α}, a ∈ [b] → a = b


/-- The sum `F.sum' G` precomposed with the left inclusion functor is isomorphic to `F` -/
@[simps!]
def inlCompSum' (F : A ⥤ C) (G : B ⥤ C) : Sum.inl_ A B ⋙ F.sum' G ≅ F

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₁}
[CategoryTheory.Category.{v₁, u₁} B]
{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(F : CategoryTheory.Functor A C)
(G : CategoryTheory.Functor B C)
(X : A)

(F.inlCompSum' G).hom.app X = CategoryTheory.CategoryStruct.id ((F.sum' G).obj (Sum.inl X))


/-- The equivalence between `Preord` and itself induced by `OrderDual` both ways. -/
@[simps functor inverse]
def dualEquiv : Preord ≌ Preord


@[simp]
theorem relabel_moveRight' {x : PGame} {xl' xr'} (el : xl' ≃ x.LeftMoves) (er : xr' ≃ x.RightMoves)
    (j : xr') : moveRight (relabel el er) j = x.moveRight (er j)

{x : SetTheory.PGame}
{xl' xr' : Type u_1}
(el : xl' ≃ x.LeftMoves)
(er : xr' ≃ x.RightMoves)
(j : xr')

(SetTheory.PGame.relabel el er).moveRight j = x.moveRight (er j)


protected theorem inv_mul_cancel {x : (Cauchy abv)} : x ≠ 0 → x⁻¹ * x = 1

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[DivisionRing β]
{abv : β → α}
[IsAbsoluteValue abv]
{x : CauSeq.Completion.Cauchy abv}


theorem interior_prod_eq (s : Set X) (t : Set Y) : interior (s ×ˢ t) = interior s ×ˢ interior t

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
(s : Set X)
(t : Set Y)


nonrec
theorem ContinuousWithinAt.rexp (h : ContinuousWithinAt f s x) :
    ContinuousWithinAt (fun y ↦ exp (f y)) s x

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ}
{s : Set α}
{x : α}
(h : ContinuousWithinAt f s x)

ContinuousWithinAt (fun y => Real.exp (f y)) s x


theorem X_pow_sub_X_sub_one_irreducible_aux (z : ℂ) : ¬(z ^ n = z + 1 ∧ z ^ n + z ^ 2 = 0)


/-- The image of an additive Haar measure under a surjective linear map is proportional to a given
additive Haar measure. The proportionality factor will be infinite if the linear map has a
nontrivial kernel. -/
theorem LinearMap.exists_map_addHaar_eq_smul_addHaar' (h : Function.Surjective L) :
    ∃ (c : ℝ≥0∞), 0 < c ∧ c < ∞ ∧ μ.map L = (c * addHaar (univ : Set (LinearMap.ker L))) • ν

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[NormedAddCommGroup E]
[MeasurableSpace E]
[BorelSpace E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[MeasurableSpace F]
[BorelSpace F]
[NormedSpace 𝕜 F]
(L : E →ₗ[𝕜] F)
(μ : MeasureTheory.Measure E)
(ν : MeasureTheory.Measure F)
[μ.IsAddHaarMeasure]
[ν.IsAddHaarMeasure]
[LocallyCompactSpace E]
(h : Function.Surjective ⇑L)

∃ c, 0 < c ∧ c < ⊤ ∧ MeasureTheory.Measure.map (⇑L) μ = (c * MeasureTheory.Measure.addHaar Set.univ) • ν


theorem y_eq_one_of_mem_closedBall {D : ℝ} {x : E} (Dpos : 0 < D)
    (hx : x ∈ closedBall (0 : E) (1 - D)) : y D x = 1

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{D : ℝ}
{x : E}
(Dpos : 0 < D)
(hx : x ∈ Metric.closedBall 0 (1 - D))


(A : Matrix.SpecialLinearGroup (Fin 2) R)


@[to_additive (attr := simp) add_le_iff_nonpos_right]
theorem mul_le_iff_le_one_right' [CovariantClass α α (· * ·) (· ≤ ·)]
    [ContravariantClass α α (· * ·) (· ≤ ·)] (a : α) {b : α} :
    a * b ≤ a ↔ b ≤ 1

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

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


@[simp]
theorem _root_.Disjoint.of_image_finset {s t : Finset α} {f : α → β}
    (h : Disjoint (s.image f) (t.image f)) : Disjoint s t

(h : Disjoint (Finset.image f s) (Finset.image f t))


/-- `fun b ↦ Prod.mk a b` as a relation embedding. -/
@[simps]
def prodLexMkLeft (s : β → β → Prop) {a : α} (h : ¬r a a) : s ↪r Prod.Lex r s

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
(s : β → β → Prop)
{a : α}
(h : ¬r a a)
(snd : β)

(RelEmbedding.prodLexMkLeft s h) snd = (a, snd)


@[simp] theorem drop_length (l : List α) : drop l.length l = []


theorem dist_eq_card (f g : PiLp 0 α) :
    dist f g = {i | dist (f i) (g i) ≠ 0}.toFinite.toFinset.card

{ι : Type u_2}
{α : ι → Type u_3}
[Fintype ι]
[(i : ι) → Dist (α i)]
(f g : PiLp 0 α)


/-- The homology functor to graded objects. -/
@[simps]
noncomputable def gradedHomologyFunctor [CategoryWithHomology C] :
    HomologicalComplex C c ⥤ GradedObject ι C

(HomologicalComplex.gradedHomologyFunctor C c).obj K i = K.homology i


@[simp]
theorem ceil_add_one (a : α) : ⌈a + 1⌉ = ⌈a⌉ + 1

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


theorem comp_comp [RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] (p : Seminorm 𝕜₃ E₃) (g : E₂ →ₛₗ[σ₂₃] E₃)
    (f : E →ₛₗ[σ₁₂] E₂) : p.comp (g.comp f) = (p.comp g).comp f

{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
{𝕜₃ : Type u_5}
{E : Type u_7}
{E₂ : Type u_8}
{E₃ : Type u_9}
[SeminormedRing 𝕜]
[SeminormedRing 𝕜₂]
[SeminormedRing 𝕜₃]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
[RingHomIsometric σ₂₃]
{σ₁₃ : 𝕜 →+* 𝕜₃}
[RingHomIsometric σ₁₃]
[AddCommGroup E]
[AddCommGroup E₂]
[AddCommGroup E₃]
[Module 𝕜 E]
[Module 𝕜₂ E₂]
[Module 𝕜₃ E₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
(p : Seminorm 𝕜₃ E₃)
(g : E₂ →ₛₗ[σ₂₃] E₃)
(f : E →ₛₗ[σ₁₂] E₂)


theorem Subpresheaf.sheafify_sheafify (h : Presieve.IsSheaf J F) :
    (G.sheafify J).sheafify J = G.sheafify J

{J : CategoryTheory.GrothendieckTopology C}

(G : CategoryTheory.GrothendieckTopology.Subpresheaf F)

(h : CategoryTheory.Presieve.IsSheaf J F)

CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
    (CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G) =
  CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J G


theorem nndist_le_opNNNorm (x y : E) : nndist (f x) (f y) ≤ ‖f‖₊ * nndist x y

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


/-- **Ruzsa's triangle inequality**. Mul-mul-div version. -/
@[to_additive "**Ruzsa's triangle inequality**. Add-add-sub version."]
theorem ruzsa_triangle_inequality_mul_mul_div (A B C : Finset α) :
    (A * C).card * B.card ≤ (A * B).card * (B / C).card

{α : Type u_1}
[CommGroup α]
[DecidableEq α]
(A B C : Finset α)


theorem gradedMul_one (x : (⨁ i, 𝒜 i) ⊗[R] (⨁ i, ℬ i)) :
    gradedMul R 𝒜 ℬ x 1 = x

((TensorProduct.gradedMul R 𝒜 ℬ) x) 1 = x


theorem lt_iff : ∀ {x y : Bool}, x < y ↔ x = false ∧ y = true


lemma inclusion_apply (h : L ≤ M) (a : L) : inclusion h a = Set.inclusion h a

{α : Type u_2}
[Lattice α]
{L M : Sublattice α}
(h : L ≤ M)
(a : ↥L)

(Sublattice.inclusion h) a = Set.inclusion h a


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

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


theorem IntegrableOn.mul_continuousOn [T2Space X] (hg : IntegrableOn g K μ)
    (hg' : ContinuousOn g' K) (hK : IsCompact K) : IntegrableOn (fun x => g x * g' x) K μ

{X : Type u_1}
{R : Type u_5}
[MeasurableSpace X]
[TopologicalSpace X]
{μ : MeasureTheory.Measure X}
[OpensMeasurableSpace X]
{K : Set X}
[NormedRing R]
[SecondCountableTopologyEither X R]
{g g' : X → R}
[T2Space X]
(hg : MeasureTheory.IntegrableOn g K μ)
(hg' : ContinuousOn g' K)
(hK : IsCompact K)

MeasureTheory.IntegrableOn (fun x => g x * g' x) K μ


protected theorem continuous : Continuous f

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


/-- For any `x : ℝ` the sequence $\frac{f^n(x)-x}{n}$ tends to the translation number of `f`.
In particular, this limit does not depend on `x`. -/
theorem tendsto_translationNumber (x : ℝ) :
    Tendsto (fun n : ℕ => ((f ^ n) x - x) / n) atTop (𝓝 <| τ f)

Filter.Tendsto (fun n => ((f ^ n) x - x) / ↑n) Filter.atTop (𝓝 f.translationNumber)


@[reassoc (attr := simp)]
theorem triangle_assoc_comp_left_inv (X Y : C) :
    (X ◁ (λ_ Y).inv) ≫ (α_ X (𝟙_ C) Y).inv = (ρ_ X).inv ▷ Y

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

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.MonoidalCategory.leftUnitor Y).inv)
    (CategoryTheory.MonoidalCategory.associator X (𝟙_ C) Y).inv =
  CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.rightUnitor X).inv Y


/-- An anti-equivalence between the categories of triangles in `C` and in `Cᵒᵖ`.
A triangle in `Cᵒᵖ` shall be distinguished iff it correspond to a distinguished
triangle in `C` via this equivalence. -/
@[simps]
noncomputable def triangleOpEquivalence :
    (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ

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

(CategoryTheory.Pretriangulated.triangleOpEquivalence C).counitIso =
  CategoryTheory.Pretriangulated.TriangleOpEquivalence.counitIso C


theorem Base.dep_of_ssubset (hB : M.Base B) (h : B ⊂ X) (hX : X ⊆ M.E := by aesop_mat) : M.Dep X

{α : Type u_1}
{M : Matroid α}
{B X : Set α}
(hB : M.Base B)
(h : B ⊂ X)
(hX : X ⊆ M.E := by aesop_mat)


@[simp]
theorem whiskerLeft_app {F F' G' : C ⥤ D} {β : F' ⟶ G'} {X} :
    (F ◁ β).app X = F.obj X ◁ β.app X

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
{F F' G' : C ⥤ D}
{β : F' ⟶ G'}
{X : C}


private theorem eq_of_glueDist_eq_zero (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) (ε0 : 0 < ε) :
    ∀ p q : X ⊕ Y, glueDist Φ Ψ ε p q = 0 → p = q

{X : Type u}
{Y : Type v}
{Z : Type w}
[MetricSpace X]
[MetricSpace Y]
(Φ : Z → X)
(Ψ : Z → Y)
(ε : ℝ)
(ε0 : 0 < ε)
(p q : X ⊕ Y)


@[simp]
theorem iterate_derivative_at_1 (n ν : ℕ) (h : ν ≤ n) :
    (Polynomial.derivative^[n - ν] (bernsteinPolynomial R n ν)).eval 1 =
      (-1) ^ (n - ν) * (ascPochhammer R (n - ν)).eval (ν + 1 : R)

(R : Type u_1)
[CommRing R]
(n ν : ℕ)
(h : ν ≤ n)

Polynomial.eval 1 ((⇑Polynomial.derivative)^[n - ν] (bernsteinPolynomial R n ν)) =
  (-1) ^ (n - ν) * Polynomial.eval (↑ν + 1) (ascPochhammer R (n - ν))


theorem int_mul_iff (hm : m ≠ 0) : LiouvilleWith p (m * x) ↔ LiouvilleWith p x

LiouvilleWith p (↑m * x) ↔ LiouvilleWith p x


/-- Alternative way of writing the uniformPDF. -/
lemma uniformPDF_ite {s : Set E} {x : E} :
    uniformPDF s x μ = if x ∈ s then (μ s)⁻¹ else 0

{E : Type u_1}
[MeasurableSpace E]
{μ : MeasureTheory.Measure E}
{s : Set E}
{x : E}

MeasureTheory.pdf.uniformPDF s x μ = if x ∈ s then (μ s)⁻¹ else 0


/-- The equivalence between `Bipointed` and itself induced by `Prod.swap` both ways. -/
@[simps!]
def swapEquiv : Bipointed ≌ Bipointed

(Bipointed.swapEquiv.inverse.obj X).toProd = X.toProd.swap


theorem integral_im {f : X → 𝕜} (hf : Integrable f μ) :
    ∫ x, RCLike.im (f x) ∂μ = RCLike.im (∫ x, f x ∂μ)

{X : Type u_1}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
{f : X → 𝕜}
(hf : MeasureTheory.Integrable f μ)

∫ (x : X), RCLike.im (f x) ∂μ = RCLike.im (∫ (x : X), f x ∂μ)


theorem Prime.pow_minFac {p k : ℕ} (hp : p.Prime) (hk : k ≠ 0) : (p ^ k).minFac = p

{p k : ℕ}
(hp : Nat.Prime p)
(hk : k ≠ 0)


/-- Assumes right covariance.
The lemma assuming left covariance is `Left.mul_lt_one_of_le_of_lt`. -/
@[to_additive Right.add_neg_of_nonpos_of_neg
      "Assumes right covariance.
      The lemma assuming left covariance is `Left.add_neg_of_nonpos_of_neg`."]
theorem Right.mul_lt_one_of_le_of_lt [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b : α}
    (ha : a ≤ 1) (hb : b < 1) :
    a * b < 1


@[to_additive addProjection_respects_measure]
lemma IsFundamentalDomain.projection_respects_measure {ν : Measure α}
    (μ : Measure (Quotient α_mod_G)) [i : QuotientMeasureEqMeasurePreimage ν μ] {t : Set α}
    (fund_dom_t : IsFundamentalDomain G t ν) : μ = (ν.restrict t).map π

(μ : MeasureTheory.Measure (Quotient (AddAction.orbitRel G α)))

[i : MeasureTheory.AddQuotientMeasureEqMeasurePreimage ν μ]

(fund_dom_t : MeasureTheory.IsAddFundamentalDomain G t ν)

μ = MeasureTheory.Measure.map (Quotient.mk (AddAction.orbitRel G α)) (ν.restrict t)


lemma sFiniteSeq_absolutelyContinuous_toFiniteAux (μ : Measure α) [SFinite μ] (n : ℕ) :
    sFiniteSeq μ n ≪ μ.toFiniteAux

{α : Type u_1}
{mα : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ]
(n : ℕ)

(MeasureTheory.sFiniteSeq μ n).AbsolutelyContinuous μ.toFiniteAux


theorem int_add (h : LiouvilleWith p x) (m : ℤ) : LiouvilleWith p (m + x)

{p x : ℝ}
(h : LiouvilleWith p x)
(m : ℤ)


lemma isSMulRegular_on_quot_iff_lsmul_comap_le :
    IsSMulRegular (M ⧸ N) r ↔ N.comap (LinearMap.lsmul R M r) ≤ N

{R : Type u_1}
{M : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
(N : Submodule R M)
(r : R)

IsSMulRegular (M ⧸ N) r ↔ Submodule.comap ((LinearMap.lsmul R M) r) N ≤ N


/-- If each costructured arrow category on `G` has a terminal object, `G` is a left adjoint. -/
lemma isLeftAdjoint_of_costructuredArrowTerminals : G.IsLeftAdjoint

[∀ (A : C), CategoryTheory.Limits.HasTerminal (CategoryTheory.CostructuredArrow G A)]


theorem hasDerivAt_arsinh (x : ℝ) : HasDerivAt arsinh (√(1 + x ^ 2))⁻¹ x

HasDerivAt Real.arsinh (√(1 + x ^ 2))⁻¹ x


@[reassoc (attr := simp)]
theorem lanLiftUnit_desc [HasLeftKanLift f g] (s : LeftLift f g) :
    lanLiftUnit f g ≫ lanLiftDesc s ▷ f = s.unit

(s : CategoryTheory.Bicategory.LeftLift f g)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.lanLiftUnit f g)
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.lanLiftDesc s) f) =
  s.unit


@[to_additive]
theorem characteristic_iff_map_eq : H.Characteristic ↔ ∀ ϕ : G ≃* G, H.map ϕ.toMonoidHom = H

{G : Type u_1}
[Group G]
{H : Subgroup G}

H.Characteristic ↔ ∀ (ϕ : G ≃* G), Subgroup.map ϕ.toMonoidHom H = H


theorem Orthonormal.exists_orthonormalBasis_extension_of_card_eq {ι : Type*} [Fintype ι]
    (card_ι : finrank 𝕜 E = Fintype.card ι) {v : ι → E} {s : Set ι}
    (hv : Orthonormal 𝕜 (s.restrict v)) : ∃ b : OrthonormalBasis ι 𝕜 E, ∀ i ∈ s, b i = v i

(card_ι : FiniteDimensional.finrank 𝕜 E = Fintype.card ι)


lemma antivary_iff_forall_mul_nonpos : Antivary f g ↔ ∀ i j, (f j - f i) * (g j - g i) ≤ 0

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

Antivary f g ↔ ∀ (i j : ι), (f j - f i) * (g j - g i) ≤ 0


@[simp]
theorem Tape.mk'_left {Γ} [Inhabited Γ] (L R : ListBlank Γ) : (Tape.mk' L R).left = L

{Γ : Type u_1}
[Inhabited Γ]
(L R : Turing.ListBlank Γ)


theorem coeff_map (φ : R →+* S) (f : Ring.Perfection R p) (n : ℕ) :
    coeff S p n (map p φ f) = φ (coeff R p n f)

{R : Type u₁}
[CommSemiring R]
(p : ℕ)
[hp : Fact (Nat.Prime p)]
[CharP R p]
{S : Type u₂}
[CommSemiring S]
[CharP S p]
(φ : R →+* S)
(f : Ring.Perfection R p)
(n : ℕ)

(Perfection.coeff S p n) ((Perfection.map p φ) f) = φ ((Perfection.coeff R p n) f)


theorem homogeneousComponent_eq_zero'
    (h : ∀ d : σ →₀ ℕ, d ∈ φ.support → d.degree ≠ n) :
    homogeneousComponent n φ = 0

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(n : ℕ)
(φ : MvPolynomial σ R)
(h : ∀ d ∈ φ.support, d.degree ≠ n)

(MvPolynomial.homogeneousComponent n) φ = 0


@[simp] theorem default_bool : default = false


theorem foldl_range_subset_of_range_subset {f : α → β → α} {g : α → γ → α}
    (hfg : (Set.range fun a c => f c a) ⊆ Set.range fun b c => g c b) (a : α) :
    Set.range (foldl f a) ⊆ Set.range (foldl g a)

{f : α → β → α}

{g : α → γ → α}

Set.range (List.foldl f a) ⊆ Set.range (List.foldl g a)


theorem rank_comp_le_left (g : V →ₗ[K] V') (f : V' →ₗ[K] V'') : rank (f.comp g) ≤ rank f

{K : Type u}
{V : Type v}
{V' : Type v'}
{V'' : Type v''}
[Ring K]
[AddCommGroup V]
[Module K V]
[AddCommGroup V']
[Module K V']
[AddCommGroup V'']
[Module K V'']
(g : V →ₗ[K] V')
(f : V' →ₗ[K] V'')


@[simp, nolint simpNF]
theorem homEquiv_naturality_left_symm (f : X' ⟶ X) (g : X ⟶ G.obj Y) :
    (adj.homEquiv X' Y).symm (f ≫ g) = F.map f ≫ (adj.homEquiv X Y).symm g

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

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


lemma MonotoneOn.mapsTo_Ici (h : MonotoneOn f (Ici a)) : MapsTo f (Ici a) (Ici (f a))

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

Set.MapsTo f (Set.Ici a) (Set.Ici (f a))


protected theorem WellFoundedOn.insert (h : WellFoundedOn s r) (a : α) :
    WellFoundedOn (insert a s) r

{α : Type u_2}
{r : α → α → Prop}
[IsStrictOrder α r]
{s : Set α}
(h : s.WellFoundedOn r)
(a : α)


/-- If `f` has finite integral, then `∫⁻ x in s, f x ∂μ` is absolutely continuous in `s`: it tends
to zero as `μ s` tends to zero. This lemma states this fact in terms of `ε` and `δ`. -/
theorem exists_pos_setLIntegral_lt_of_measure_lt {f : α → ℝ≥0∞} (h : ∫⁻ x, f x ∂μ ≠ ∞) {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ δ > 0, ∀ s, μ s < δ → ∫⁻ x in s, f x ∂μ < ε

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(h : ∫⁻ (x : α), f x ∂μ ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ δ > 0, ∀ (s : Set α), μ s < δ → ∫⁻ (x : α) in s, f x ∂μ < ε


lemma toDigitsCore_lens_eq_aux (b f : Nat) :
    ∀ (n : Nat) (l1 l2 : List Char), l1.length = l2.length →
    (Nat.toDigitsCore b f n l1).length = (Nat.toDigitsCore b f n l2).length

l1.length = l2.length → (b.toDigitsCore f n l1).length = (b.toDigitsCore f n l2).length


theorem AffineEquiv.continuous_of_finiteDimensional (f : PE ≃ᵃ[𝕜] PF) : Continuous f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type w}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace 𝕜]
{PE : Type u_1}
{PF : Type u_2}
[MetricSpace PE]
[NormedAddTorsor E PE]
[MetricSpace PF]
[NormedAddTorsor F PF]
[FiniteDimensional 𝕜 E]
(f : PE ≃ᵃ[𝕜] PF)


theorem coeff_pthRoot (f : Ring.Perfection R p) (n : ℕ) :
    coeff R p n (pthRoot R p f) = coeff R p (n + 1) f

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

(Perfection.coeff R p n) ((Perfection.pthRoot R p) f) = (Perfection.coeff R p (n + 1)) f


theorem dualDistrib_dualDistribInvOfBasis_left_inverse (b : Basis ι R M) (c : Basis κ R N) :
    comp (dualDistrib R M N) (dualDistribInvOfBasis b c) = LinearMap.id

{R : Type u_1}
{M : Type u_3}
{N : Type u_4}
{ι : Type u_5}
{κ : Type u_6}
[DecidableEq ι]
[DecidableEq κ]
[Fintype ι]
[Fintype κ]
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(b : Basis ι R M)
(c : Basis κ R N)

TensorProduct.dualDistrib R M N ∘ₗ TensorProduct.dualDistribInvOfBasis b c = LinearMap.id


@[simp] lemma mapSubmodule_comapSubmodule (h := comapSubmodule_le_comap a) :
    mapSubmodule a (p := comapSubmodule R M a q) h = q

{q : Submodule R[X] (Module.AEval R M a)}

(h :
  (Module.AEval.comapSubmodule R M a) q ≤
    Submodule.comap ((Algebra.lsmul R R M) a) ((Module.AEval.comapSubmodule R M a) q) :=
  ⋯)


theorem continuousAt_zero' [TopologicalSpace E] [ContinuousConstSMul 𝕜 E] {p : Seminorm 𝕜 E}
    {r : ℝ} (hp : p.closedBall 0 r ∈ (𝓝 0 : Filter E)) : ContinuousAt p 0

{𝕜 : Type u_3}
{E : Type u_7}
[NontriviallyNormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousConstSMul 𝕜 E]
{p : Seminorm 𝕜 E}
{r : ℝ}
(hp : p.closedBall 0 r ∈ 𝓝 0)


/-- If `F⟮x⟯` has dimension `1` over `F` for every `x ∈ E` then `F = E`. -/
theorem bot_eq_top_of_rank_adjoin_eq_one (h : ∀ x : E, Module.rank F F⟮x⟯ = 1) :
    (⊥ : IntermediateField F E) = ⊤

(h : ∀ (x : E), Module.rank F ↥F⟮x⟯ = 1)


@[to_additive (attr := simp)]
lemma UniformFun.ofFun_mul [Mul β] (f g : α → β) : ofFun (f * g) = ofFun f * ofFun g

{α : Type u_1}
{β : Type u_2}
[Add β]
(f g : α → β)

UniformFun.ofFun (f + g) = UniformFun.ofFun f + UniformFun.ofFun g


theorem support_finset_sum [DecidableEq β] [AddCommMonoid M] {s : Finset α} {f : α → β →₀ M} :
    (Finset.sum s f).support ⊆ s.biUnion fun x => (f x).support

{α : Type u_1}
{β : Type u_7}
{M : Type u_8}
[DecidableEq β]
[AddCommMonoid M]
{s : Finset α}
{f : α → β →₀ M}

(s.sum f).support ⊆ s.biUnion fun x => (f x).support


theorem toIcoMod_add_right_eq_add (a b c : α) :
    toIcoMod hp a (b + c) = toIcoMod hp (a - c) b + c

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b c : α)


theorem mk_of_not_mem (hi : i ∉ s) : (mk s x : ∀ i, β i) i = 0

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
{s : Finset ι}
{x : (i : ↑↑s) → β ↑i}
{i : ι}
(hi : i ∉ s)


/-- If a function `f` is continuous and `f'` is strictly antitone on `ℝ` then `f` is strictly
concave. Note that we don't require differentiability, since it is guaranteed at all but at most
one point by the strict antitonicity of `f'`. -/
theorem StrictAnti.strictConcaveOn_univ_of_deriv {f : ℝ → ℝ} (hf : Continuous f)
    (hf'_anti : StrictAnti (deriv f)) : StrictConcaveOn ℝ univ f


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


@[simp]
theorem content_monomial {r : R} {k : ℕ} : content (monomial k r) = normalize r

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{r : R}
{k : ℕ}

((Polynomial.monomial k) r).content = normalize r


@[symm]
theorem EqOn.symm (h : EqOn f₁ f₂ s) : EqOn f₂ f₁ s

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


lemma schnirelmannDensity_le_iff_forall {x : ℝ} :
    schnirelmannDensity A ≤ x ↔
      ∀ ε : ℝ, 0 < ε → ∃ n : ℕ, 0 < n ∧ ((Ioc 0 n).filter (· ∈ A)).card / n < x + ε

{A : Set ℕ}
[DecidablePred fun x => x ∈ A]
{x : ℝ}

schnirelmannDensity A ≤ x ↔
  ∀ (ε : ℝ), 0 < ε → ∃ n, 0 < n ∧ ↑(Finset.filter (fun x => x ∈ A) (Finset.Ioc 0 n)).card / ↑n < x + ε


@[simp]
theorem constrL_apply {ι : Type*} [Fintype ι] (v : Basis ι 𝕜 E) (f : ι → F) (e : E) :
    v.constrL f e = ∑ i, v.equivFun e i • f i

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
{F : Type w}
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul 𝕜 F]
[CompleteSpace 𝕜]
[T2Space E]
{ι : Type u_2}
[Fintype ι]
(v : Basis ι 𝕜 E)
(f : ι → F)
(e : E)

(v.constrL f) e = ∑ i : ι, v.equivFun e i • f i


protected theorem map (hx : IsPeriodicPt fa n x) {g : α → β} (hg : Semiconj g fa fb) :
    IsPeriodicPt fb n (g x)

{α : Type u_1}
{β : Type u_2}
{fa : α → α}
{fb : β → β}
{x : α}
{n : ℕ}
(hx : Function.IsPeriodicPt fa n x)
{g : α → β}
(hg : Function.Semiconj g fa fb)


@[simp] theorem dite_true {α : Sort u} {t : True → α} {e : ¬ True → α} : (dite True t e) = t True.intro

{α : Sort u}
{t : True → α}
{e : ¬True → α}


theorem power_eq_two_power {c₁ c₂ : Cardinal} (h₁ : ℵ₀ ≤ c₁) (h₂ : 2 ≤ c₂) (h₂' : c₂ ≤ c₁) :
    c₂ ^ c₁ = 2 ^ c₁

{c₁ c₂ : Cardinal.{u_1}}
(h₁ : ℵ₀ ≤ c₁)
(h₂ : 2 ≤ c₂)
(h₂' : c₂ ≤ c₁)


/-- See also `Metric.measure_closedBall_pos_iff`. -/
theorem measure_closedBall_pos (x : X) {r : ℝ} (hr : 0 < r) : 0 < μ (closedBall x r)

{X : Type u_1}
[PseudoMetricSpace X]
{m : MeasurableSpace X}
(μ : MeasureTheory.Measure X)
[μ.IsOpenPosMeasure]
(x : X)
{r : ℝ}
(hr : 0 < r)


theorem lt_dist_iff_lt_dist_coe_center :
    r < dist z w ↔ w.im * Real.sinh r < dist (z : ℂ) (w.center r)

r < dist z w ↔ w.im * Real.sinh r < dist ↑z ↑(w.center r)


@[to_additive]
theorem op_inf (S₁ S₂ : Submonoid M) : (S₁ ⊓ S₂).op = S₁.op ⊓ S₂.op

{M : Type u_2}
[MulOneClass M]
(S₁ S₂ : Submonoid M)


theorem IsClique.card_le_of_colorable {s : Finset V} (h : G.IsClique s) {n : ℕ}
    (hc : G.Colorable n) : s.card ≤ n

{V : Type u}
{G : SimpleGraph V}
{s : Finset V}
(h : G.IsClique ↑s)
{n : ℕ}
(hc : G.Colorable n)


theorem toFun_spec'' (g : L ≃+* L) {n : ℕ+} {t : L} (ht : IsPrimitiveRoot t n) :
    g t = t ^ (χ₀ n g).val

{L : Type u}
[CommRing L]
[IsDomain L]
(g : L ≃+* L)
{n : ℕ+}
{t : L}
(ht : IsPrimitiveRoot t ↑n)

g t = t ^ (ModularCyclotomicCharacter.toFun n g).val


@[reassoc (attr := simp)]
lemma finiteCoproduct.ι_desc {B : LightProfinite.{max u w}} (e : (a : α) → (X a ⟶ B)) (a : α) :
    finiteCoproduct.ι X a ≫ finiteCoproduct.desc X e = e a

{α : Type w}
[Finite α]
(X : α → LightProfinite)
{B : LightProfinite}
(e : (a : α) → X a ⟶ B)
(a : α)

CategoryTheory.CategoryStruct.comp (LightProfinite.finiteCoproduct.ι X a) (LightProfinite.finiteCoproduct.desc X e) =
  e a


lemma IsUniform.cond {s : Set E} :
    IsUniform (id : E → E) s (ProbabilityTheory.cond μ s) μ

{E : Type u_1}
[MeasurableSpace E]
{μ : MeasureTheory.Measure E}
{s : Set E}

MeasureTheory.pdf.IsUniform id s (ProbabilityTheory.cond μ s) μ


@[simp] theorem loopyOn_restrict (E R : Set α) : (loopyOn E) ↾ R = loopyOn R

(Matroid.loopyOn E).restrict R = Matroid.loopyOn R


@[mono]
theorem colLen_anti (μ : YoungDiagram) (j1 j2 : ℕ) (hj : j1 ≤ j2) : μ.colLen j2 ≤ μ.colLen j1


theorem Prime.divisors {p : ℕ} (pp : p.Prime) : divisors p = {1, p}


theorem one_def : (1 : FreeAbelianGroup α) = of 1


theorem biprod.map_eq [HasBinaryBiproducts C] {W X Y Z : C} {f : W ⟶ Y} {g : X ⟶ Z} :
    biprod.map f g = biprod.fst ≫ f ≫ biprod.inl + biprod.snd ≫ g ≫ biprod.inr

CategoryTheory.Limits.biprod.map f g =
  CategoryTheory.Limits.biprod.fst ≫ f ≫ CategoryTheory.Limits.biprod.inl +
    CategoryTheory.Limits.biprod.snd ≫ g ≫ CategoryTheory.Limits.biprod.inr


theorem tendsto_subtype_rng {Y : Type*} {p : X → Prop} {l : Filter Y} {f : Y → Subtype p} :
    ∀ {x : Subtype p}, Tendsto f l (𝓝 x) ↔ Tendsto (fun x => (f x : X)) l (𝓝 (x : X))

{X : Type u}
[TopologicalSpace X]
{Y : Type u_5}
{p : X → Prop}
{l : Filter Y}
{f : Y → Subtype p}
{x : Subtype p}

Filter.Tendsto f l (𝓝 x) ↔ Filter.Tendsto (fun x => ↑(f x)) l (𝓝 ↑x)


/-- Auxiliary result; if the power series corresponding to `Real.cos` and `Real.sin` evaluated
at `‖q‖` tend to `c` and `s`, then the exponential series tends to `c + (s / ‖q‖)`. -/
theorem hasSum_expSeries_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) {c s : ℝ}
    (hc : HasSum (fun n => (-1 : ℝ) ^ n * ‖q‖ ^ (2 * n) / (2 * n)!) c)
    (hs : HasSum (fun n => (-1 : ℝ) ^ n * ‖q‖ ^ (2 * n + 1) / (2 * n + 1)!) s) :
    HasSum (fun n => expSeries ℝ (Quaternion ℝ) n fun _ => q) (↑c + (s / ‖q‖) • q)

HasSum (fun n => (NormedSpace.expSeries ℝ ℍ n) fun x => q) (↑c + (s / ‖q‖) • q)


theorem liftPropOn_indep_chart [HasGroupoid M G] [HasGroupoid M' G'] (he : e ∈ G.maximalAtlas M)
    (hf : f ∈ G'.maximalAtlas M') (h : LiftPropOn P g s) {y : H}
    (hy : y ∈ e.target ∩ e.symm ⁻¹' (s ∩ g ⁻¹' f.source)) :
    P (f ∘ g ∘ e.symm) (e.symm ⁻¹' s) y

(he : e ∈ StructureGroupoid.maximalAtlas M G)

(hf : f ∈ StructureGroupoid.maximalAtlas M' G')

(hy : y ∈ e.target ∩ ↑e.symm ⁻¹' (s ∩ g ⁻¹' f.source))


theorem reverse_bijective {u v : V} : Function.Bijective (reverse : G.Walk u v → _)

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


lemma Z_eq_zero_of_equiv {P Q : Fin 3 → R} (h : P ≈ Q) : P z = 0 ↔ Q z = 0

{R : Type u}
[CommRing R]
{P Q : Fin 3 → R}
(h : P ≈ Q)


/-- If `i : K →+* L` is a ring homomorphism of exponential characteristic `p` rings, such that `L`
is perfect, then the `p`-nilradical of `K` is contained in the kernel of `i`. -/
theorem RingHom.pNilradical_le_ker_of_perfectRing [PerfectRing L p] :
    pNilradical K p ≤ RingHom.ker i

{K : Type u_1}
{L : Type u_2}
[CommSemiring K]
[CommSemiring L]
(i : K →+* L)
(p : ℕ)
[ExpChar L p]
[PerfectRing L p]


theorem hom_eq_inv (α : X ≅ Y) (β : Y ≅ X) : α.hom = β.inv ↔ β.hom = α.inv

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


theorem atEnd : ∀ {it}, ValidFor l r it → (it.atEnd ↔ r = [])

{l r : List Char}
{it : String.Iterator}

String.Iterator.ValidFor l r it → (it.atEnd = true ↔ r = [])


/-- If `α` is a seminormed ring, then `‖a ^ n‖₊ ≤ ‖a‖₊ ^ n` for `n > 0`.
See also `nnnorm_pow_le`. -/
theorem nnnorm_pow_le' (a : α) : ∀ {n : ℕ}, 0 < n → ‖a ^ n‖₊ ≤ ‖a‖₊ ^ n

{α : Type u_1}
[SeminormedRing α]
(a : α)
{n : ℕ}


theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (a ^ ·) b


@[to_additive]
theorem mk''_toEquiv (hS : S ∈ Subgroup.rightTransversals (H : Set G))
    (q : Quotient (QuotientGroup.rightRel H)) : Quotient.mk'' (toEquiv hS q : G) = q

(hS : S ∈ Subgroup.rightTransversals ↑H)

Quotient.mk'' ↑((Subgroup.MemRightTransversals.toEquiv hS) q) = q


@[simp] protected theorem sub_add_cancel {n m : Nat} (h : m ≤ n) : n - m + m = n


theorem isUnit_of_invertible [Monoid α] (a : α) [Invertible a] : IsUnit a

{α : Type u}
[Monoid α]
(a : α)
[Invertible a]


/-- Given binary relations `r, s` with `r` contained in `s`, the smallest congruence relation
    containing `s` contains the smallest congruence relation containing `r`. -/
@[to_additive addConGen_mono "Given binary relations `r, s` with `r` contained in `s`, the
smallest additive congruence relation containing `s` contains the smallest additive congruence
relation containing `r`."]
theorem conGen_mono {r s : M → M → Prop} (h : ∀ x y, r x y → s x y) : conGen r ≤ conGen s

{M : Type u_1}
[Mul M]
{r s : M → M → Prop}
(h : ∀ (x y : M), r x y → s x y)


theorem Filter.Tendsto.const_cpow {l : Filter α} {f : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 b))
    (h : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))

{α : Type u_1}
{l : Filter α}
{f : α → ℂ}
{a b : ℂ}
(hf : Filter.Tendsto f l (𝓝 b))
(h : a ≠ 0 ∨ b ≠ 0)

Filter.Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))


theorem const_mul_cancel (f g₁ g₂ : R) (U hu₁ hu₂) :
    const R f g₁ U hu₁ * const R g₁ g₂ U hu₂ = const R f g₂ U hu₂

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

(hu₁ : ∀ x ∈ U, g₁ ∈ x.asIdeal.primeCompl)

(hu₂ : ∀ x ∈ U, g₂ ∈ x.asIdeal.primeCompl)

AlgebraicGeometry.StructureSheaf.const R f g₁ U hu₁ * AlgebraicGeometry.StructureSheaf.const R g₁ g₂ U hu₂ =
  AlgebraicGeometry.StructureSheaf.const R f g₂ U hu₂


@[simp] lemma ofNat_ne_bot (n : ℕ) [n.AtLeastTwo] : no_index (OfNat.ofNat n : WithBot α) ≠ ⊥

{α : Type u}
[AddMonoidWithOne α]
(n : ℕ)
[n.AtLeastTwo]


theorem lift_assoc {h : Set β → Filter γ} (hg : Monotone g) :
    (f.lift g).lift h = f.lift fun s => (g s).lift h

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{g : Set α → Filter β}
{h : Set β → Filter γ}
(hg : Monotone g)


/-- A partial diffeomorphism on `s` is a function `f : M → N` such that `f` restricts to a
diffeomorphism `s → t` between open subsets of `M` and `N`, respectively.
This is an auxiliary definition and should not be used outside of this file. -/
structure PartialDiffeomorph extends PartialEquiv M N where
  open_source : IsOpen source
  open_target : IsOpen target
  contMDiffOn_toFun : ContMDiffOn I J n toFun source
  contMDiffOn_invFun : ContMDiffOn J I n invFun target

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_4}
[TopologicalSpace H]
{G : Type u_5}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
(self : PartialDiffeomorph I J M N n)


theorem measurable_fderiv_with_param (hf : Continuous f.uncurry) :
    Measurable (fun (p : α × E) ↦ fderiv 𝕜 (f p.1) p.2)

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[LocallyCompactSpace E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{α : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[MeasurableSpace E]
[OpensMeasurableSpace α]
[OpensMeasurableSpace E]
{f : α → E → F}
[CompleteSpace F]
(hf : Continuous (Function.uncurry f))

Measurable fun p => fderiv 𝕜 (f p.1) p.2


theorem coe_isOpen (s : AbsConvexOpenSets 𝕜 E) : IsOpen (s : Set E)

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace E]
[AddCommMonoid E]
[Zero E]
[SeminormedRing 𝕜]
[SMul 𝕜 E]
[SMul ℝ E]
(s : AbsConvexOpenSets 𝕜 E)


@[simp]
theorem im_inner_adjoint_mul_self_eq_zero (T : E →ₗ[𝕜] E) (x : E) :
    im ⟪x, LinearMap.adjoint T (T x)⟫ = 0

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[FiniteDimensional 𝕜 E]
(T : E →ₗ[𝕜] E)
(x : E)

RCLike.im ⟪x, (LinearMap.adjoint T) (T x)⟫_𝕜 = 0


@[simp]
theorem sumAssoc_symm_apply_inl {α β γ} (a) : (sumAssoc α β γ).symm (inl a) = inl (inl a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(a : α)

(Equiv.sumAssoc α β γ).symm (Sum.inl a) = Sum.inl (Sum.inl a)


/-- Alias of `zpow_left_inj`, for ease of discovery alongside `zsmul_le_zsmul_iff'` and
`zsmul_lt_zsmul_iff'`. -/
@[to_additive "Alias of `zsmul_right_inj`, for ease of discovery alongside `zsmul_le_zsmul_iff'` and
`zsmul_lt_zsmul_iff'`."]
lemma zpow_eq_zpow_iff' (hn : n ≠ 0) : a ^ n = b ^ n ↔ a = b

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{n : ℤ}
{a b : α}
(hn : n ≠ 0)


lemma iCondIndepSets_iff (π : ι → Set (Set Ω)) (hπ : ∀ i s (_hs : s ∈ π i), MeasurableSet s)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' π μ ↔ ∀ (s : Finset ι) {f : ι → Set Ω} (_H : ∀ i, i ∈ s → f i ∈ π i),
      μ⟦⋂ i ∈ s, f i | m'⟧ =ᵐ[μ] ∏ i ∈ s, (μ⟦f i | m'⟧)

(hπ : ∀ (i : ι), ∀ s ∈ π i, MeasurableSet s)

ProbabilityTheory.iCondIndepSets m' hm' π μ ↔
  ∀ (s : Finset ι) {f : ι → Set Ω},
    (∀ i ∈ s, f i ∈ π i) → μ[(⋂ i ∈ s, f i).indicator fun ω => 1|m'] =ᵐ[μ] ∏ i ∈ s, μ[(f i).indicator fun ω => 1|m']


theorem le_tsum_condensed (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) :
    ∑' k, f k ≤ f 0 + ∑' k : ℕ, 2 ^ k * f (2 ^ k)

(hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m)


theorem WithSeminorms.topologicalAddGroup (hp : WithSeminorms p) : TopologicalAddGroup E

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[Nonempty ι]
[TopologicalSpace E]
{p : SeminormFamily 𝕜 E ι}
(hp : WithSeminorms p)


@[to_additive]
theorem mul_inv_eq_one : a * b⁻¹ = 1 ↔ a = b


theorem smul (c : 𝕜) (hf : IsBoundedLinearMap 𝕜 f) : IsBoundedLinearMap 𝕜 (c • f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(c : 𝕜)
(hf : IsBoundedLinearMap 𝕜 f)


theorem setLIntegral_preCDF_fst (ρ : Measure (α × ℝ)) (r : ℚ) {s : Set α} (hs : MeasurableSet s)
    [IsFiniteMeasure ρ] : ∫⁻ x in s, preCDF ρ r x ∂ρ.fst = ρ.IicSnd r s

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
(r : ℚ)
{s : Set α}
(hs : MeasurableSet s)
[MeasureTheory.IsFiniteMeasure ρ]

∫⁻ (x : α) in s, ProbabilityTheory.preCDF ρ r x ∂ρ.fst = (ρ.IicSnd ↑r) s


lemma Measure.AbsolutelyContinuous.trim {ν : Measure α} (hμν : μ ≪ ν) (hm : m ≤ m0) :
    μ.trim hm ≪ ν.trim hm

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
(hμν : μ.AbsolutelyContinuous ν)
(hm : m ≤ m0)

(μ.trim hm).AbsolutelyContinuous (ν.trim hm)


@[simp]
theorem isEmpty_pprod : IsEmpty (PProd α β) ↔ IsEmpty α ∨ IsEmpty β


@[simp]
theorem symm_dual_comp (g : BotHom βᵒᵈ γᵒᵈ) (f : BotHom αᵒᵈ βᵒᵈ) :
    TopHom.dual.symm (g.comp f) = (TopHom.dual.symm g).comp (TopHom.dual.symm f)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[LE α]
[OrderTop α]
[LE β]
[OrderTop β]
[LE γ]
[OrderTop γ]
(g : BotHom βᵒᵈ γᵒᵈ)
(f : BotHom αᵒᵈ βᵒᵈ)


/-- A special case of `f ∘ id = f`, `f` a Localization map. -/
@[to_additive (attr := simp) "A special case of `f ∘ id = f`, `f` a Localization map."]
theorem ofMulEquivOfDom_id :
    f.ofMulEquivOfDom
        (show S.map (MulEquiv.refl M).toMonoidHom = S from
          Submonoid.ext fun x ↦ ⟨fun ⟨_, hy, h⟩ ↦ h ▸ hy, fun h ↦ ⟨x, h, rfl⟩⟩) = f

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


@[simp]
theorem ofDual_apply_top : WithTop.ofDual (⊤ : WithTop α) = ⊥


protected theorem disjoint (h : IsMetricSeparated s t) : Disjoint s t

{X : Type u_1}
[EMetricSpace X]
{s t : Set X}
(h : IsMetricSeparated s t)


theorem hasFiniteIntegral_mul {f : ℝ → ℝ} {g : ℝ → ℝ≥0∞} (hg : pdf X ℙ =ᵐ[volume] g)
    (hgi : ∫⁻ x, ‖f x‖₊ * g x ≠ ∞) :
    HasFiniteIntegral fun x => f x * (pdf X ℙ volume x).toReal

{g : ℝ → ℝ≥0∞}

(hg : MeasureTheory.pdf X ℙ MeasureTheory.volume =ᵐ[MeasureTheory.volume] g)

MeasureTheory.HasFiniteIntegral (fun x => f x * (MeasureTheory.pdf X ℙ MeasureTheory.volume x).toReal)
  MeasureTheory.volume


theorem interedges_disjoint_right (s : Finset α) (ht : Disjoint t₁ t₂) :
    Disjoint (G.interedges s t₁) (G.interedges s t₂)

{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
{t₁ t₂ : Finset α}
(s : Finset α)
(ht : Disjoint t₁ t₂)


lemma div_le_iff_le_mul_add_pred (hb : 0 < b) : a / b ≤ c ↔ a ≤ b * c + (b - 1)


theorem strictAnti_dual_iff : StrictAnti (toDual ∘ f ∘ ofDual : αᵒᵈ → βᵒᵈ) ↔ StrictAnti f

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

StrictAnti (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) ↔ StrictAnti f


/-- An L¹-bounded submartingale has bounded upcrossings almost everywhere. -/
theorem Submartingale.upcrossings_ae_lt_top' [IsFiniteMeasure μ] (hf : Submartingale f ℱ μ)
    (hbdd : ∀ n, eLpNorm (f n) 1 μ ≤ R) (hab : a < b) : ∀ᵐ ω ∂μ, upcrossings a b f ω < ∞

{f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

(hbdd : ∀ (n : ℕ), MeasureTheory.eLpNorm (f n) 1 μ ≤ ↑R)

∀ᵐ (ω : Ω) ∂μ, MeasureTheory.upcrossings a b f ω < ⊤


/-- If `R` and `ι` lie in the same universe, the rank of `(ι →₀ R)` is `# ι`. -/
theorem rank_finsupp_self' {ι : Type u} : Module.rank R (ι →₀ R) = #ι

(R : Type u)
[Ring R]
[StrongRankCondition R]
{ι : Type u}


/-- If a word reduces to another word, then they have a common maximal reduction. -/
@[to_additive "If a word reduces to another word, then they have a common maximal reduction."]
theorem reduce.eq_of_red (H : Red L₁ L₂) : reduce L₁ = reduce L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
[DecidableEq α]
(H : FreeAddGroup.Red L₁ L₂)

FreeAddGroup.reduce L₁ = FreeAddGroup.reduce L₂


theorem eraseIdx_subset (l : List α) (k : Nat) : eraseIdx l k ⊆ l


theorem CPolynomialAt.sub (hf : CPolynomialAt 𝕜 f x) (hg : CPolynomialAt 𝕜 g x) :
    CPolynomialAt 𝕜 (f - g) x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{x : E}
(hf : CPolynomialAt 𝕜 f x)
(hg : CPolynomialAt 𝕜 g x)


/-- The orthocenter lies in the altitudes. -/
theorem orthocenter_mem_altitude (t : Triangle ℝ P) {i₁ : Fin 3} :
    t.orthocenter ∈ t.altitude i₁

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

t.orthocenter ∈ Affine.Simplex.altitude t i₁


theorem Prod.isMax_iff : IsMax x ↔ IsMax x.1 ∧ IsMax x.2

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


theorem lift_norm_le {N : Type*} [SeminormedAddCommGroup N] (S : AddSubgroup M)
    (f : NormedAddGroupHom M N) (hf : ∀ s ∈ S, f s = 0) {c : ℝ≥0} (fb : ‖f‖ ≤ c) :
    ‖lift S f hf‖ ≤ c

{M : Type u_1}
[SeminormedAddCommGroup M]
{N : Type u_3}
[SeminormedAddCommGroup N]
(S : AddSubgroup M)
(f : NormedAddGroupHom M N)
(hf : ∀ s ∈ S, f s = 0)
{c : ℝ≥0}
(fb : ‖f‖ ≤ ↑c)


theorem IsLimit.aleph0_le {c : Cardinal} (h : IsLimit c) : ℵ₀ ≤ c


@[simp] theorem ratio_refl : ratio (refl X) = 1

Dilation.ratio (DilationEquiv.refl X) = 1


@[to_additive subset_addCenter_add_units]
theorem subset_center_units : ((↑) : Mˣ → M) ⁻¹' center M ⊆ Set.center Mˣ

AddUnits.val ⁻¹' Set.addCenter M ⊆ Set.addCenter (AddUnits M)


theorem Tendsto.atTop_mul_atTop (hf : Tendsto f l atTop) (hg : Tendsto g l atTop) :
    Tendsto (fun x => f x * g x) l atTop

{α : Type u_3}
{β : Type u_4}
[OrderedSemiring α]
{l : Filter β}
{f g : β → α}
(hf : Filter.Tendsto f l Filter.atTop)
(hg : Filter.Tendsto g l Filter.atTop)

Filter.Tendsto (fun x => f x * g x) l Filter.atTop


theorem ContDiffAt.sqrt (hf : ContDiffAt ℝ n f x) (hx : f x ≠ 0) :
    ContDiffAt ℝ n (fun y => √(f y)) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{n : ℕ∞}
{x : E}
(hf : ContDiffAt ℝ n f x)
(hx : f x ≠ 0)


theorem Perm.bagInter_left (l : List α) {t₁ t₂ : List α} (p : t₁ ~ t₂) :
    l.bagInter t₁ = l.bagInter t₂

{α : Type u_1}
[DecidableEq α]
(l : List α)
{t₁ t₂ : List α}
(p : t₁.Perm t₂)


@[to_additive (attr := measurability)]
protected theorem inv [Inv β] [ContinuousInv β] (hf : AEStronglyMeasurable f μ) :
    AEStronglyMeasurable f⁻¹ μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)


/-- Embedding into `Option α` using `some`. -/
@[simps (config := .asFn)]
protected def some {α} : α ↪ Option α


@[simp] lemma infClosure_singleton : infClosure {a} = {a}

{α : Type u_2}
[SemilatticeInf α]
{a : α}


theorem eq_zero_of_num_eq_zero {x : K} (h : num A x = 0) : x = 0

{A : Type u_4}
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
{K : Type u_5}
[Field K]
[Algebra A K]
[IsFractionRing A K]
{x : K}
(h : IsFractionRing.num A x = 0)


/-- **Maximum principle** for convex functions on a segment. If a function `f` is convex on the
segment `[x, y]`, then the eventual maximum of `f` on `[x, y]` is at `x` or `y`. -/
lemma ConvexOn.le_max_of_mem_segment (hf : ConvexOn 𝕜 [x -[𝕜] y] f) (hz : z ∈ [x -[𝕜] y]) :
    f z ≤ max (f x) (f y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[LinearOrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{f : E → β}
{x y z : E}
(hf : ConvexOn 𝕜 [x-[𝕜]y] f)
(hz : z ∈ [x-[𝕜]y])


theorem derivative_natCast_mul {n : ℕ} {f : R[X]} :
    derivative ((n : R[X]) * f) = n * derivative f

{R : Type u}
[Semiring R]
{n : ℕ}
{f : R[X]}

Polynomial.derivative (↑n * f) = ↑n * Polynomial.derivative f


theorem diff_subset_iff {s t u : Set α} : s \ t ⊆ u ↔ s ⊆ t ∪ u


/-- If `f₁ = f₂` and `g₁ = g₂`, we may construct a canonical
isomorphism `pushout f₁ g₁ ≅ pullback f₂ g₂` -/
@[simps! hom]
def pushout.congrHom {X Y Z : C} {f₁ f₂ : X ⟶ Y} {g₁ g₂ : X ⟶ Z} (h₁ : f₁ = f₂) (h₂ : g₁ = g₂)
    [HasPushout f₁ g₁] [HasPushout f₂ g₂] : pushout f₁ g₁ ≅ pushout f₂ g₂

(CategoryTheory.Limits.pushout.congrHom h₁ h₂).hom = CategoryTheory.Limits.pushout.map f₁ g₁ f₂ g₂ (𝟙 Y) (𝟙 Z) (𝟙 X) ⋯ ⋯


@[simp]
theorem comp_apply (g : EsakiaHom β γ) (f : EsakiaHom α β) (a : α) : (g.comp f) a = g (f a)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
[TopologicalSpace γ]
[Preorder γ]
(g : EsakiaHom β γ)
(f : EsakiaHom α β)
(a : α)


theorem midpoint_le_midpoint (ha : a ≤ a') (hb : b ≤ b') : midpoint k a b ≤ midpoint k a' b'

{k : Type u_1}
{E : Type u_2}
[LinearOrderedRing k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
[Invertible 2]
{a a' b b' : E}
(ha : a ≤ a')
(hb : b ≤ b')


@[simp]
theorem comp_assoc (f : HeytingHom γ δ) (g : HeytingHom β γ) (h : HeytingHom α β) :
    (f.comp g).comp h = f.comp (g.comp h)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
{δ : Type u_5}
[HeytingAlgebra α]
[HeytingAlgebra β]
[HeytingAlgebra γ]
[HeytingAlgebra δ]
(f : HeytingHom γ δ)
(g : HeytingHom β γ)
(h : HeytingHom α β)


theorem LinearMap.isSimpleModule_iff_of_bijective [Module S N] {σ : R →+* S} [RingHomSurjective σ]
    (l : M →ₛₗ[σ] N) (hl : Function.Bijective l) : IsSimpleModule R M ↔ IsSimpleModule S N

{R : Type u_2}
{S : Type u_3}
[Ring R]
[Ring S]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{N : Type u_5}
[AddCommGroup N]
[Module S N]
{σ : R →+* S}
[RingHomSurjective σ]
(l : M →ₛₗ[σ] N)
(hl : Function.Bijective ⇑l)


protected theorem le_of_add_le_add_right [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (ha : a ≠ ⊥) (h : b + a ≤ c + a) : b ≤ c

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


theorem sublist_of_cons_sublist : a :: l₁ <+ l₂ → l₁ <+ l₂

∀ {α : Type u_1} {a : α} {l₁ l₂ : List α}, a :: l₁ <+ l₂ → l₁ <+ l₂


theorem gc_map_comap (f : A →⋆ₐ[R] B) : GaloisConnection (map f) (comap f)

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
(f : A →⋆ₐ[R] B)

GaloisConnection (StarSubalgebra.map f) (StarSubalgebra.comap f)


@[simp]
theorem Finsupp.toFreeAbelianGroup_comp_singleAddHom (x : X) :
    Finsupp.toFreeAbelianGroup.comp (Finsupp.singleAddHom x) =
      (smulAddHom ℤ (FreeAbelianGroup X)).flip (of x)

Finsupp.toFreeAbelianGroup.comp (Finsupp.singleAddHom x) =
  (smulAddHom ℤ (FreeAbelianGroup X)).flip (FreeAbelianGroup.of x)


/-- Constructs an equivalence between partial orders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : PartOrd.{u}} (e : α ≃o β) : α ≅ β


/-- The cross product satisfies the Leibniz lie property. -/
theorem leibniz_cross (u v w : Fin 3 → R) : u ×₃ (v ×₃ w) = u ×₃ v ×₃ w + v ×₃ (u ×₃ w)

{R : Type u_1}
[CommRing R]
(u v w : Fin 3 → R)

(crossProduct u) ((crossProduct v) w) = (crossProduct ((crossProduct u) v)) w + (crossProduct v) ((crossProduct u) w)


/-- The kernel of a linear map taking values in a simple module over the base ring is closed or
dense. Applies, e.g., to the case when `R = N` is a division ring. -/
theorem LinearMap.isClosed_or_dense_ker (l : M →ₗ[R] N) :
    IsClosed (LinearMap.ker l : Set M) ∨ Dense (LinearMap.ker l : Set M)

{R : Type u}
{M : Type v}
{N : Type w}
[Ring R]
[TopologicalSpace R]
[TopologicalSpace M]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[ContinuousSMul R M]
[Module R N]
[ContinuousAdd M]
[IsSimpleModule R N]
(l : M →ₗ[R] N)

IsClosed ↑(LinearMap.ker l) ∨ Dense ↑(LinearMap.ker l)


@[simp]
theorem not_mem_none (a : α) : a ∉ @none α


@[simp]
theorem cycleOf_self_apply (f : Perm α) [DecidableRel f.SameCycle] (x : α) :
    cycleOf f (f x) = cycleOf f x

{α : Type u_2}
(f : Equiv.Perm α)
[DecidableRel f.SameCycle]
(x : α)


@[to_additive]
theorem coe_mul {M N} {_ : Mul M} {_ : CommSemigroup N} (f g : M →ₙ* N) : (f * g : M → N) =
    fun x => f x * g x

∀ {x : Add M} {x_1 : AddCommSemigroup N} (f g : AddHom M N), ⇑f + ⇑g = fun x_2 => f x_2 + g x_2


@[simp]
theorem finSuccEquivLast_castSucc (i : Fin n) : finSuccEquivLast (Fin.castSucc i) = some i


theorem tmul_of_gradedMul_of_tmul (j₁ i₂ : ι)
    (a₁ : ⨁ i, 𝒜 i) (b₁ : ℬ j₁) (a₂ : 𝒜 i₂) (b₂ : ⨁ i, ℬ i) :
    gradedMul R 𝒜 ℬ (a₁ ⊗ₜ lof R _ ℬ j₁ b₁) (lof R _ 𝒜 i₂ a₂ ⊗ₜ b₂) =
      (-1 : ℤˣ)^(j₁ * i₂) • ((a₁ * lof R _ 𝒜 _ a₂) ⊗ₜ (lof R _ ℬ _ b₁ * b₂))

(R : Type u_1)
{ι : Type u_2}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
(𝒜 : ι → Type u_5)
(ℬ : ι → Type u_6)
[CommRing R]
[(i : ι) → AddCommGroup (𝒜 i)]
[(i : ι) → AddCommGroup (ℬ i)]
[(i : ι) → Module R (𝒜 i)]
[(i : ι) → Module R (ℬ i)]
[DirectSum.GRing 𝒜]
[DirectSum.GRing ℬ]
[DirectSum.GAlgebra R 𝒜]
[DirectSum.GAlgebra R ℬ]
(j₁ i₂ : ι)
(a₁ : ⨁ (i : ι), 𝒜 i)
(b₁ : ℬ j₁)
(a₂ : 𝒜 i₂)
(b₂ : ⨁ (i : ι), ℬ i)

((TensorProduct.gradedMul R 𝒜 ℬ) (a₁ ⊗ₜ[R] (DirectSum.lof R ι ℬ j₁) b₁)) ((DirectSum.lof R ι 𝒜 i₂) a₂ ⊗ₜ[R] b₂) =
  (-1) ^ (j₁ * i₂) • (a₁ * (DirectSum.lof R ι 𝒜 i₂) a₂) ⊗ₜ[R] ((DirectSum.lof R ι ℬ j₁) b₁ * b₂)


@[simp]
theorem iUnion_of_empty [IsEmpty ι] (s : ι → Set α) : ⋃ i, s i = ∅

{α : Type u_1}
{ι : Sort u_4}
[IsEmpty ι]
(s : ι → Set α)


theorem coprodᵢ_cofinite {α : ι → Type*} [Finite ι] :
    (Filter.coprodᵢ fun i => (cofinite : Filter (α i))) = cofinite

{ι : Type u_1}
{α : ι → Type u_4}
[Finite ι]

(Filter.coprodᵢ fun i => Filter.cofinite) = Filter.cofinite


theorem mem_closed_set_iff (h : IsGenericPoint x S) (hZ : IsClosed Z) : x ∈ Z ↔ S ⊆ Z

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{S Z : Set α}
(h : IsGenericPoint x S)
(hZ : IsClosed Z)


@[simp]
theorem ne_zero (n : ℕ+) : (n : ℕ) ≠ 0


@[simp]
theorem zero_ne_top : (0 : EReal) ≠ ⊤


@[simp]
theorem coe_ofFinsupp {f : α →₀ HahnSeries Γ R} : ⇑(SummableFamily.ofFinsupp f) = f

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommMonoid R]
{α : Type u_3}
{f : α →₀ HahnSeries Γ R}

⇑(HahnSeries.SummableFamily.ofFinsupp f) = ⇑f


/-- For any `p`, the power of `p` in `x^n` is `n` times the power in `x` -/
theorem factorization_pow {x : α} {n : ℕ} : factorization (x ^ n) = n • factorization x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
[NormalizationMonoid α]
[DecidableEq α]
{x : α}
{n : ℕ}


/-- Composition with a linear isometry on the left preserves the norm of the iterated
derivative. -/
theorem LinearIsometry.norm_iteratedFDeriv_comp_left {f : E → F} (g : F →ₗᵢ[𝕜] G)
    (hf : ContDiff 𝕜 n f) (x : E) {i : ℕ} (hi : (i : ℕ∞) ≤ n) :
    ‖iteratedFDeriv 𝕜 i (g ∘ f) x‖ = ‖iteratedFDeriv 𝕜 i f x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{f : E → F}
(g : F →ₗᵢ[𝕜] G)
(hf : ContDiff 𝕜 n f)
(x : E)
{i : ℕ}
(hi : ↑i ≤ n)

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


@[to_additive]
lemma prod_attach (s : Finset α) (f : α → β) : ∏ x ∈ s.attach, f x = ∏ x ∈ s, f x

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


theorem SetLike.intCast_mem_graded [Zero ι] [AddGroupWithOne R] [SetLike σ R]
    [AddSubgroupClass σ R] (A : ι → σ) [SetLike.GradedOne A] (z : ℤ) : (z : R) ∈ A 0

{ι : Type u_1}
{σ : Type u_2}
{R : Type u_4}
[Zero ι]
[AddGroupWithOne R]
[SetLike σ R]
[AddSubgroupClass σ R]
(A : ι → σ)
[SetLike.GradedOne A]
(z : ℤ)


/-- A closed subset of a compact set is a compact set. -/
theorem IsCompact.of_isClosed_subset (hs : IsCompact s) (ht : IsClosed t) (h : t ⊆ s) :
    IsCompact t

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


/-- If `μ` is a probability measure on `α`, `s` is a convex closed set in `E`, and `f` is an
integrable function sending `μ`-a.e. points to `s`, then the expected value of `f` belongs to `s`:
`∫ x, f x ∂μ ∈ s`. See also `Convex.sum_mem` for a finite sum version of this lemma. -/
theorem Convex.integral_mem [IsProbabilityMeasure μ] (hs : Convex ℝ s) (hsc : IsClosed s)
    (hf : ∀ᵐ x ∂μ, f x ∈ s) (hfi : Integrable f μ) : (∫ x, f x ∂μ) ∈ s

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{μ : MeasureTheory.Measure α}
{s : Set E}
{f : α → E}
[MeasureTheory.IsProbabilityMeasure μ]
(hs : Convex ℝ s)
(hsc : IsClosed s)
(hf : ∀ᵐ (x : α) ∂μ, f x ∈ s)
(hfi : MeasureTheory.Integrable f μ)


@[simp]
theorem principal_one_iff {op : Ordinal → Ordinal → Ordinal} : Principal op 1 ↔ op 0 0 = 0

{op : Ordinal.{u_1} → Ordinal.{u_1} → Ordinal.{u_1}}


theorem isLocallySurjective_iff (T : ℱ ⟶ 𝒢) :
    IsLocallySurjective T ↔
      ∀ (U t), ∀ x ∈ U, ∃ (V : _) (ι : V ⟶ U), (∃ s, T.app _ s = t |_ₕ ι) ∧ x ∈ V

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.ConcreteCategory C]
{X : TopCat}
{ℱ 𝒢 : TopCat.Presheaf C X}
(T : ℱ ⟶ 𝒢)

TopCat.Presheaf.IsLocallySurjective T ↔
  ∀ (U : TopologicalSpace.Opens ↑X) (t : (CategoryTheory.forget C).obj (𝒢.obj (Opposite.op U))),
    ∀ x ∈ U, ∃ V ι, (∃ s, (T.app (Opposite.op V)) s = TopCat.Presheaf.restrict t ι) ∧ x ∈ V


@[simp]
theorem aeval_T (x : A) (n : ℤ) : aeval x (T R n) = (T A n).eval x

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
(x : A)
(n : ℤ)

(Polynomial.aeval x) (Polynomial.Chebyshev.T R n) = Polynomial.eval x (Polynomial.Chebyshev.T A n)


@[to_additive (attr := simp)]
theorem mk_div (a b : G) : ((a / b : G) : Q) = a / b

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


/-- The inverse of a homotopy equivalence. -/
@[simps]
def symm (e : HomotopyEquiv S₁ S₂) : HomotopyEquiv S₂ S₁

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(e : S₁.HomotopyEquiv S₂)


theorem exp_list_sum (l : List ℂ) : exp l.sum = (l.map exp).prod

Complex.exp l.sum = (List.map Complex.exp l).prod


theorem _root_.Squarefree.natFactorization_le_one {n : ℕ} (p : ℕ) (hn : Squarefree n) :
    n.factorization p ≤ 1


theorem preimage_eq_iff_eq_image {f : α → β} (hf : Bijective f) {s t} :
    f ⁻¹' s = t ↔ s = f '' t

{α : Type u}
{β : Type v}
{f : α → β}
(hf : Function.Bijective f)
{s : Set β}
{t : Set α}


@[simp]
theorem grade_le_grade_iff : grade 𝕆 a ≤ grade 𝕆 b ↔ a ≤ b

{𝕆 : Type u_1}
{α : Type u_3}
[Preorder 𝕆]
[LinearOrder α]
[GradeOrder 𝕆 α]
{a b : α}


theorem comp_fderiv {f : G → E} {x : G} :
    fderiv 𝕜 (iso ∘ f) x = (iso : E →L[𝕜] F).comp (fderiv 𝕜 f x)

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

fderiv 𝕜 (⇑iso ∘ f) x =
  (↑{ toLinearEquiv := iso.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }).comp (fderiv 𝕜 f x)


@[simp]
theorem cast_div [DivisionRing α] {m n : ℤ} (n_dvd : n ∣ m) (hn : (n : α) ≠ 0) :
    ((m / n : ℤ) : α) = m / n

{α : Type u_1}
[DivisionRing α]
{m n : ℤ}
(n_dvd : n ∣ m)
(hn : ↑n ≠ 0)


theorem inv_mul {z : ℤ_[p]} (hz : ‖z‖ = 1) : z.inv * z = 1

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{z : ℤ_[p]}
(hz : ‖z‖ = 1)


@[to_additive]
theorem mem_sup {s t : Submonoid N} {x : N} : x ∈ s ⊔ t ↔ ∃ y ∈ s, ∃ z ∈ t, y * z = x

{N : Type u_4}
[AddCommMonoid N]
{s t : AddSubmonoid N}
{x : N}


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

Subsemigroup.centralizer Set.univ = Subsemigroup.center M


@[simp]
theorem forget₂_map (X Y : CoalgebraCat R) (f : X ⟶ Y) :
    (forget₂ (CoalgebraCat R) (ModuleCat R)).map f = (f.toCoalgHom : X →ₗ[R] Y)

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

(CategoryTheory.forget₂ (CoalgebraCat R) (ModuleCat R)).map f = ↑f.toCoalgHom


@[ext]
theorem addHom_ext [AddZeroClass β] ⦃f g : Multiset α →+ β⦄ (h : ∀ x, f {x} = g {x}) : f = g

{α : Type u_1}
{β : Type v}
[AddZeroClass β]
⦃f g : Multiset α →+ β⦄
(h : ∀ (x : α), f {x} = g {x})


theorem powers_le_nonZeroDivisors_of_noZeroDivisors [NoZeroDivisors M] {a : M} (ha : a ≠ 0) :
    Submonoid.powers a ≤ M⁰

{M : Type u_2}
[MonoidWithZero M]
[NoZeroDivisors M]
{a : M}
(ha : a ≠ 0)


@[simp] theorem Bool.not_eq_false (b : Bool) : (¬(b = false)) = (b = true)


theorem polar_def (s : Set E) : polar 𝕜 s = { f : WeakDual 𝕜 E | ∀ x ∈ s, ‖f x‖ ≤ 1 }

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

WeakDual.polar 𝕜 s = {f | ∀ x ∈ s, ‖f x‖ ≤ 1}


theorem colimit.existsUnique {F : J ⥤ C} [HasColimit F] (t : Cocone F) :
    ∃! d : colimit F ⟶ t.pt, ∀ j, colimit.ι F j ≫ d = t.ι.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F : J ⥤ C}
[CategoryTheory.Limits.HasColimit F]
(t : CategoryTheory.Limits.Cocone F)

∃! d, ∀ (j : J), CategoryTheory.Limits.colimit.ι F j ≫ d = t.ι.app j


/-- If `X` is a paracompact normal topological space and `U` is an open covering of a closed set
`s`, then there exists a `SmoothPartitionOfUnity ι M s` that is subordinate to `U`. -/
theorem exists_isSubordinate {s : Set M} (hs : IsClosed s) (U : ι → Set M) (ho : ∀ i, IsOpen (U i))
    (hU : s ⊆ ⋃ i, U i) : ∃ f : SmoothPartitionOfUnity ι I M s, f.IsSubordinate U

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
(I : ModelWithCorners ℝ E H)
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
[T2Space M]
[SigmaCompactSpace M]
{s : Set M}
(hs : IsClosed s)
(U : ι → Set M)
(ho : ∀ (i : ι), IsOpen (U i))
(hU : s ⊆ ⋃ i, U i)


@[simp]
lemma inl_comp_binaryCoproductIso_hom :
    Limits.coprod.inl ≫ (binaryCoproductIso F G).hom = coprod.inl

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

CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.coprod.inl
    (CategoryTheory.FunctorToTypes.binaryCoproductIso F G).hom =
  CategoryTheory.FunctorToTypes.coprod.inl


/--
`Associative op` indicates `op` is an associative operation,
i.e. `(a ∘ b) ∘ c = a ∘ (b ∘ c)`.
-/
class Associative (op : α → α → α) : Prop where
  /-- An associative operation satisfies `(a ∘ b) ∘ c = a ∘ (b ∘ c)`. -/
  assoc : (a b c : α) → op (op a b) c = op a (op b c)

{α : Sort u}
{op : α → α → α}
[self : Std.Associative op]
(a b c : α)


@[simp]
lemma coprod.desc_inr {F₁ F₂ : C ⥤ Type w} (τ₁ : F₁ ⟶ F) (τ₂ : F₂ ⟶ F) :
    coprod.inr ≫ coprod.desc τ₁ τ₂ = τ₂

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

CategoryTheory.CategoryStruct.comp CategoryTheory.FunctorToTypes.coprod.inr
    (CategoryTheory.FunctorToTypes.coprod.desc τ₁ τ₂) =
  τ₂


theorem pair_subset_iff : {a, b} ⊆ s ↔ a ∈ s ∧ b ∈ s


/--
The `Monad` typeclass only contains the operations of a monad.
`LawfulMonad` further asserts that these operations satisfy the laws of a monad,
including associativity and identity laws for `bind`:
```
pure x >>= f = f x
x >>= pure = x
x >>= f >>= g = x >>= (fun x => f x >>= g)
```

`LawfulMonad.mk'` is an alternative constructor containing useful defaults for many fields.
-/
class LawfulMonad (m : Type u → Type v) [Monad m] extends LawfulApplicative m : Prop where
  bind_pure_comp (f : α → β) (x : m α) : x >>= (fun a => pure (f a)) = f <$> x
  bind_map       {α β : Type u} (f : m (α → β)) (x : m α) : f >>= (. <$> x) = f <*> x
  pure_bind      (x : α) (f : α → m β) : pure x >>= f = f x
  bind_assoc     (x : m α) (f : α → m β) (g : β → m γ) : x >>= f >>= g = x >>= fun x => f x >>= g
  map_pure g x    := (by rw [← bind_pure_comp, pure_bind])
  seq_pure g x    := (by rw [← bind_map]; simp [map_pure, bind_pure_comp])
  seq_assoc x g h := (by simp [← bind_pure_comp, ← bind_map, bind_assoc, pure_bind])

{m : Type u → Type v}
[Monad m]
[self : LawfulMonad m]
{α β : Type u}
(f : α → β)
(x : m α)

(do
    let a ← x
    pure (f a)) =
  f <$> x


@[measurability]
theorem measurableSet_liminf {s : ℕ → Set α} (hs : ∀ n, MeasurableSet <| s n) :
    MeasurableSet <| Filter.liminf s Filter.atTop

{α : Type u_1}
[MeasurableSpace α]
{s : ℕ → Set α}
(hs : ∀ (n : ℕ), MeasurableSet (s n))

MeasurableSet (Filter.liminf s Filter.atTop)


lemma abs_mul (a b : α) : |a * b| = |a| * |b|

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


/-- The closure of `K` is the full space iff `Kᗮ` is trivial. -/
theorem Submodule.topologicalClosure_eq_top_iff [CompleteSpace E] :
    K.topologicalClosure = ⊤ ↔ Kᗮ = ⊥

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


/-- Given any distinguished triangle
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
the composition `f ≫ g = 0`.
See <https://stacks.math.columbia.edu/tag/0146>
-/
@[reassoc]
theorem comp_distTriang_mor_zero₁₂ (T) (H : T ∈ (distTriang C)) : T.mor₁ ≫ T.mor₂ = 0

[∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive]

(T : CategoryTheory.Pretriangulated.Triangle C)

(H : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


@[simp]
theorem ringEquiv_apply (e : α ≃ β) [Add β] [Mul β] (a : α) : (ringEquiv e) a = e a

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Add β]
[Mul β]
(a : α)


@[trans]
theorem IsConj.trans {a b c : α} : IsConj a b → IsConj b c → IsConj a c


/-- The bijection `(M₂ ⟶ N) ≃ (M₁ ⟶ N)` induced by a locally bijective morphism
`f : M₁ ⟶ M₂` of presheaves of modules, when `N` is a sheaf. -/
@[simps]
noncomputable def homEquivOfIsLocallyBijective : (M₂ ⟶ N) ≃ (M₁ ⟶ N)

{J : CategoryTheory.GrothendieckTopology C}

(hN : CategoryTheory.Presheaf.IsSheaf J N.presheaf)

((PresheafOfModules.homEquivOfIsLocallyBijective f hN).symm ψ).hom =
  (CategoryTheory.Localization.LeftBousfield.W.homEquiv ⋯ N.presheaf hN).symm ψ.hom


/-- The second simplicial identity -/
@[reassoc]
theorem δ_comp_σ_of_le {n} {i : Fin (n + 2)} {j : Fin (n + 1)} (H : i ≤ Fin.castSucc j) :
    δ (Fin.castSucc i) ≫ σ j.succ = σ j ≫ δ i

{n : ℕ}
{i : Fin (n + 2)}
{j : Fin (n + 1)}
(H : i ≤ j.castSucc)

SimplexCategory.δ i.castSucc ≫ SimplexCategory.σ j.succ = SimplexCategory.σ j ≫ SimplexCategory.δ i


theorem Icc_min_max : Icc (min a b) (max a b) = [[a, b]]

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

Finset.Icc (min a b) (max a b) = [[a, b]]


@[continuity, fun_prop]
protected theorem Continuous.min (hf : Continuous f) (hg : Continuous g) :
    Continuous fun b => min (f b) (g b)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f g : β → α}
[TopologicalSpace β]
(hf : Continuous f)
(hg : Continuous g)


theorem mul_neg_of_pos_of_neg [PosMulStrictMono α] (ha : 0 < a) (hb : b < 0) : a * b < 0

{α : Type u_1}
{a b : α}
[MulZeroClass α]
[Preorder α]
[PosMulStrictMono α]
(ha : 0 < a)
(hb : b < 0)


theorem sInf_sup_eq : sInf s ⊔ b = ⨅ a ∈ s, a ⊔ b

{α : Type u}
[Order.Coframe α]
{s : Set α}
{b : α}


theorem continuous_iff' [TopologicalSpace β] {f : β → α} :
    Continuous f ↔ ∀ (a), ∀ ε > 0, ∀ᶠ x in 𝓝 a, dist (f x) (f a) < ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[TopologicalSpace β]
{f : β → α}

Continuous f ↔ ∀ (a : β), ∀ ε > 0, ∀ᶠ (x : β) in 𝓝 a, dist (f x) (f a) < ε


theorem join_drop_length_sub_one {L : List (List α)} (h : L ≠ []) :
    (L.drop (L.length - 1)).join = L.getLast h

{α : Type u_1}
{L : List (List α)}
(h : L ≠ [])

(List.drop (L.length - 1) L).join = L.getLast h


theorem coprod_zero_left (g : M₂ →ₗ[R] M₃) : (0 : M →ₗ[R] M₃).coprod g = g.comp (snd R M M₂)

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
(g : M₂ →ₗ[R] M₃)

LinearMap.coprod 0 g = g ∘ₗ LinearMap.snd R M M₂


/-- The type of collections of lines such that
- each line is only one color except possibly at its endpoint
- the lines all have the same endpoint
- the colors of the lines are distinct.
Used in the proof `exists_mono_in_high_dimension`. -/
structure ColorFocused {α ι κ : Type*} (C : (ι → Option α) → κ) where
  /-- The underlying multiset of almost monochromatic lines of a color-focused collection. -/
  lines : Multiset (AlmostMono C)
  /-- The common endpoint of the lines in the color-focused collection. -/
  focus : ι → Option α
  /-- The proposition that all lines in a color-focused collection have the same endpoint. -/
  is_focused : ∀ p ∈ lines, p.line none = focus
  /-- The proposition that all lines in a color-focused collection of lines have distinct colors. -/
  distinct_colors : (lines.map AlmostMono.color).Nodup

(self : Combinatorics.Line.ColorFocused C)


theorem mk'_mul_mk'_eq_one' (x : R) (y : M) (h : x ∈ M) : mk' S x y * mk' S (y : R) ⟨x, h⟩ = 1

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x : R)
(y : ↥M)
(h : x ∈ M)

IsLocalization.mk' S x y * IsLocalization.mk' S ↑y ⟨x, h⟩ = 1


@[simp]
theorem natTrailingDegree_le_trailingDegree : ↑(natTrailingDegree p) ≤ trailingDegree p


/-- Typeclass for a negation operator that distributes across multiplication.

This is useful for dealing with submonoids of a ring that contain `-1` without having to duplicate
lemmas. -/
class HasDistribNeg (α : Type*) [Mul α] extends InvolutiveNeg α where
  /-- Negation is left distributive over multiplication -/
  neg_mul : ∀ x y : α, -x * y = -(x * y)
  /-- Negation is right distributive over multiplication -/
  mul_neg : ∀ x y : α, x * -y = -(x * y)

{α : Type u_1}
[Mul α]
[self : HasDistribNeg α]
(x y : α)


theorem _root_.Finset.prod_X_add_C_coeff {σ} (s : Finset σ) (r : σ → R) {k : ℕ} (h : k ≤ s.card) :
    (∏ i ∈ s, (X + C (r i))).coeff k = ∑ t ∈ s.powersetCard (s.card - k), ∏ i ∈ t, r i

{R : Type u_1}
[CommSemiring R]
{σ : Type u_2}
(s : Finset σ)
(r : σ → R)
{k : ℕ}
(h : k ≤ s.card)

(∏ i ∈ s, (Polynomial.X + Polynomial.C (r i))).coeff k = ∑ t ∈ Finset.powersetCard (s.card - k) s, ∏ i ∈ t, r i


lemma div_mul_cancel_right₀ (hb : b ≠ 0) (a : G₀) : b / (a * b) = a⁻¹

{G₀ : Type u_3}
[GroupWithZero G₀]
{b : G₀}
(hb : b ≠ 0)
(a : G₀)


@[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_hom_fst :
    (pullbackRightPullbackFstIso f g f').hom ≫ pullback.fst _ _ = pullback.fst _ _

[CategoryTheory.Limits.HasPullback f' (CategoryTheory.Limits.pullback.fst f g)]

[CategoryTheory.Limits.HasPullback (f' ≫ f) g]

(CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').hom ≫ CategoryTheory.Limits.pullback.fst (f' ≫ f) g =
  CategoryTheory.Limits.pullback.fst f' (CategoryTheory.Limits.pullback.fst f g)


theorem lintegral_map_le {mβ : MeasurableSpace β} (f : β → ℝ≥0∞) {g : α → β} (hg : Measurable g) :
    ∫⁻ a, f a ∂Measure.map g μ ≤ ∫⁻ a, f (g a) ∂μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{mβ : MeasurableSpace β}
(f : β → ℝ≥0∞)
{g : α → β}
(hg : Measurable g)

∫⁻ (a : β), f a ∂MeasureTheory.Measure.map g μ ≤ ∫⁻ (a : α), f (g a) ∂μ


theorem eq_of_boxes_subset_iUnion_superset (h₁ : π₁.boxes ⊆ π₂.boxes) (h₂ : π₂.iUnion ⊆ π₁.iUnion) :
    π₁ = π₂

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{π₁ π₂ : BoxIntegral.Prepartition I}
(h₁ : π₁.boxes ⊆ π₂.boxes)
(h₂ : π₂.iUnion ⊆ π₁.iUnion)


theorem toLinearIsometry_injective : Function.Injective (toLinearIsometry : _ → E →ₛₗᵢ[σ₁₂] E₂)

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]


/-- A variation on Fermat's little theorem. See `ZMod.pow_card_sub_one_eq_one` -/
@[simp]
theorem pow_card {p : ℕ} [Fact p.Prime] (x : ZMod p) : x ^ p = x

{p : ℕ}
[Fact (Nat.Prime p)]
(x : ZMod p)


/-- We can convert an equivalence of `discrete` categories to a type-level `Equiv`. -/
@[simps]
def equivOfEquivalence {α : Type u₁} {β : Type u₂} (h : Discrete α ≌ Discrete β) : α ≃ β

(h : CategoryTheory.Discrete α ≌ CategoryTheory.Discrete β)

∀ (a : α),
  (CategoryTheory.Discrete.equivOfEquivalence h) a =
    (CategoryTheory.Discrete.as ∘ h.functor.obj ∘ CategoryTheory.Discrete.mk) a


theorem not_isUnit_X_sub_C [Nontrivial R] (r : R) : ¬IsUnit (X - C r)

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


/-- A mixin class for `Trivialization`, stating that a trivialization is fiberwise linear with
respect to given module structures on its fibers and the model fiber. -/
protected class Trivialization.IsLinear [AddCommMonoid F] [Module R F] [∀ x, AddCommMonoid (E x)]
  [∀ x, Module R (E x)] (e : Trivialization F (π F E)) : Prop where
  linear : ∀ b ∈ e.baseSet, IsLinearMap R fun x : E b => (e ⟨b, x⟩).2

[TopologicalSpace (Bundle.TotalSpace F E)]

{e : Trivialization F Bundle.TotalSpace.proj}

b ∈ e.baseSet → IsLinearMap R fun x => (↑e { proj := b, snd := x }).2


lemma Icc_insert_succ_left (h : a ≤ b) : insert a (Icc (a + 1) b) = Icc a b

insert a (Finset.Icc (a + 1) b) = Finset.Icc a b


lemma aestabilizer_of_aeconst (hs : EventuallyConst s (ae μ)) : aestabilizer G μ s = ⊤

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

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.SMulInvariantMeasure G α μ] {s : Set α},
  Filter.EventuallyConst s (MeasureTheory.ae μ) → MulAction.aestabilizer G μ s = ⊤


theorem of_comp_finiteType (f : A →+* B) {g : B →+* C} (hg : (g.comp f).FinitePresentation)
    (hf : f.FiniteType) : g.FinitePresentation

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
[CommRing A]
[CommRing B]
[CommRing C]
(f : A →+* B)
{g : B →+* C}
(hg : (g.comp f).FinitePresentation)
(hf : f.FiniteType)


/-- The colimit cocone for the coproduct over an index type with exactly one term. -/
@[simps]
def colimitCoconeOfUnique : ColimitCocone (Discrete.functor f)

{β : Type w}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
[Unique β]
(f : β → C)

(CategoryTheory.Limits.colimitCoconeOfUnique f).cocone.pt = f default


@[simp]
theorem LieAlgebra.ad_apply (x y : L) : LieAlgebra.ad R L x y = ⁅x, y⁆

(R : Type u)
(L : Type v)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(x y : L)


theorem ge_iff_eq (h : a ≤ b) : b ≤ a ↔ a = b

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


@[to_additive (attr := gcongr) sub_le_sub_right]
theorem div_le_div_right' (h : a ≤ b) (c : α) : a / c ≤ b / c

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


@[to_additive] lemma commute_inv_coe : Commute ↑a⁻¹ (a : α)

{α : Type u}
[AddMonoid α]
(a : AddUnits α)


@[reassoc (attr := simp)]
theorem hom_inv_whiskerRight' {X Y : C} (f : X ⟶ Y) [IsIso f] (Z : C) :
    f ▷ Z ≫ inv f ▷ Z = 𝟙 (X ⊗ Z)

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f Z)
    (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.inv f) Z) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj X Z)


/-- Scalar multiplication of a skew-adjoint element by a skew-adjoint element produces a
self-adjoint element. -/
theorem isSelfAdjoint_smul_of_mem_skewAdjoint [Ring R] [AddCommGroup A] [Module R A]
    [StarAddMonoid R] [StarAddMonoid A] [StarModule R A] {r : R} (hr : r ∈ skewAdjoint R) {a : A}
    (ha : a ∈ skewAdjoint A) : IsSelfAdjoint (r • a)

{R : Type u_1}
{A : Type u_2}
[Ring R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid R]
[StarAddMonoid A]
[StarModule R A]
{r : R}
(hr : r ∈ skewAdjoint R)
{a : A}
(ha : a ∈ skewAdjoint A)


protected theorem sup_le (f g f' : α →ₘ[μ] β) (hf : f ≤ f') (hg : g ≤ f') : f ⊔ g ≤ f'

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
[SemilatticeSup β]
[ContinuousSup β]
(f g f' : α →ₘ[μ] β)
(hf : f ≤ f')
(hg : g ≤ f')


/-- Lists are equivalent to the sigma type of tuples of a given length. -/
@[simps]
def equivSigmaTuple : List α ≃ Σn, Fin n → α


@[simp]
theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1

(Finset.uIcc a b).card = (↑b - ↑a).natAbs + 1


@[simp]
theorem roots_zero : (0 : R[X]).roots = 0


lemma commute_of_mem_adjoin_self {a b : A} (hb : b ∈ adjoin R {a}) :
    Commute a b

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{a b : A}
(hb : b ∈ Algebra.adjoin R {a})


/--
This typeclass captures properties shared by ℝ and ℂ, with an API that closely matches that of ℂ.
-/
class RCLike (K : semiOutParam Type*) extends DenselyNormedField K, StarRing K,
    NormedAlgebra ℝ K, CompleteSpace K where
  re : K →+ ℝ
  im : K →+ ℝ
  /-- Imaginary unit in `K`. Meant to be set to `0` for `K = ℝ`. -/
  I : K
  I_re_ax : re I = 0
  I_mul_I_ax : I = 0 ∨ I * I = -1
  re_add_im_ax : ∀ z : K, 𝓚 (re z) + 𝓚 (im z) * I = z
  ofReal_re_ax : ∀ r : ℝ, re (𝓚 r) = r
  ofReal_im_ax : ∀ r : ℝ, im (𝓚 r) = 0
  mul_re_ax : ∀ z w : K, re (z * w) = re z * re w - im z * im w
  mul_im_ax : ∀ z w : K, im (z * w) = re z * im w + im z * re w
  conj_re_ax : ∀ z : K, re (conj z) = re z
  conj_im_ax : ∀ z : K, im (conj z) = -im z
  conj_I_ax : conj I = -I
  norm_sq_eq_def_ax : ∀ z : K, ‖z‖ ^ 2 = re z * re z + im z * im z
  mul_im_I_ax : ∀ z : K, im z * im I = im z
  /-- only an instance in the `ComplexOrder` locale -/
  [toPartialOrder : PartialOrder K]
  le_iff_re_im {z w : K} : z ≤ w ↔ re z ≤ re w ∧ im z = im w
  -- note we cannot put this in the `extends` clause
  [toDecidableEq : DecidableEq K]

{K : semiOutParam (Type u_1)}
[self : RCLike K]
(z w : K)

RCLike.im (z * w) = RCLike.re z * RCLike.im w + RCLike.im z * RCLike.re w


nonrec theorem IsLocalMax.inf (hf : IsLocalMax f a) (hg : IsLocalMax g a) :
    IsLocalMax (fun x => f x ⊓ g x) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SemilatticeInf β]
{f g : α → β}
{a : α}
(hf : IsLocalMax f a)
(hg : IsLocalMax g a)


/-- If a set `S` generates an additive monoid `M`, then the image of `M` generates, as algebra,
`R[M]`. -/
theorem freeAlgebra_lift_of_surjective_of_closure [CommSemiring R] {S : Set M}
    (hS : closure S = ⊤) :
    Function.Surjective
      (FreeAlgebra.lift R fun s : S => of R M ↑s : FreeAlgebra R S → MonoidAlgebra R M)

{R : Type u_1}
{M : Type u_2}
[Monoid M]
[CommSemiring R]
{S : Set M}
(hS : Submonoid.closure S = ⊤)

Function.Surjective ⇑((FreeAlgebra.lift R) fun s => (MonoidAlgebra.of R M) ↑s)


lemma ofArrows_mk {I : Type*} {X : C} (Y : I → C) (f : ∀ i, Y i ⟶ X) (i : I) :
    ofArrows Y f (f i)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{I : Type u_1}
{X : C}
(Y : I → C)
(f : (i : I) → Y i ⟶ X)
(i : I)

(CategoryTheory.Sieve.ofArrows Y f).arrows (f i)


theorem lt_rpow_inv_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) :
    x < y ^ z⁻¹ ↔ y < x ^ z


theorem eqOn_of_comp_eqOn (h₁ : ContinuousOn g₁ s) (h₂ : ContinuousOn g₂ s)
    (he : s.EqOn (p ∘ g₁) (p ∘ g₂)) {a : A} (has : a ∈ s) (ha : g₁ a = g₂ a) : s.EqOn g₁ g₂

{X : Type u_3}
{E : Type u_1}
{A : Type u_2}
[TopologicalSpace E]
[TopologicalSpace A]
{p : E → X}
(sep : IsSeparatedMap p)
(inj : IsLocallyInjective p)
{s : Set A}
(hs : IsPreconnected s)
{g₁ g₂ : A → E}
(h₁ : ContinuousOn g₁ s)
(h₂ : ContinuousOn g₂ s)
(he : Set.EqOn (p ∘ g₁) (p ∘ g₂) s)
{a : A}
(has : a ∈ s)
(ha : g₁ a = g₂ a)


@[to_additive (attr := simp)] lemma oneLePart_inv (a : α) : a⁻¹⁺ᵐ = a⁻ᵐ

{α : Type u_1}
[Lattice α]
[AddGroup α]
(a : α)


@[simp]
theorem card_Ioo : (Ioo a b).card = (b - a - 1).toNat

(Finset.Ioo a b).card = (b - a - 1).toNat


@[to_additive]
theorem mulSingle_injective (i : I) : Function.Injective (mulSingle i : f i → ∀ i, f i)

{I : Type u}
(f : I → Type v₁)
[DecidableEq I]
[(i : I) → One (f i)]
(i : I)


theorem le_of_pow_le_pow_left (hn : n ≠ 0) (hb : 0 ≤ b) (h : a ^ n ≤ b ^ n) : a ≤ b

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
{n : ℕ}
(hn : n ≠ 0)
(hb : 0 ≤ b)
(h : a ^ n ≤ b ^ n)


lemma toScheme_carrier : (U : Type u) = (U : Set X)

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


protected theorem Embedding.secondCountableTopology [SecondCountableTopology β] (hf : Embedding f) :
    SecondCountableTopology α

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
[SecondCountableTopology β]
(hf : Embedding f)


@[simp, norm_cast]
theorem coe_tsub (f g : Π₀ i, α i) : ⇑(f - g) = f - g

[(i : ι) → CanonicallyOrderedAddCommMonoid (α i)]


@[to_additive]
theorem inv_mul_eq_one : a⁻¹ * b = 1 ↔ a = b


@[simp]
theorem coe_fn_mk (f : r ↪r s) (t o) : (@PrincipalSeg.mk _ _ r s f t o : α → β) = f

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ↪r s)
(t : β)
(o : ∀ (b : β), s b t ↔ ∃ a, f a = b)

⇑{ toRelEmbedding := f, top := t, down' := o }.toRelEmbedding = ⇑f


@[simp]
theorem rpow_zero (x : ℝ≥0) : x ^ (0 : ℝ) = 1


@[to_additive (attr := simp)]
theorem lift.of {x} : lift f (of x) = f x

{α : Type u}
{β : Type v}
[AddGroup β]
{f : α → β}
{x : α}

(FreeAddGroup.lift f) (FreeAddGroup.of x) = f x


/-- In a join, dropping all the elements up to an index which is the sum of the lengths of the
first `i` sublists, is the same as taking the join after dropping the first `i` sublists. -/
lemma drop_sum_join (L : List (List α)) (i : ℕ) :
    L.join.drop ((L.map length).take i).sum = (L.drop i).join

{α : Type u_2}
(L : List (List α))
(i : ℕ)

List.drop (List.take i (List.map List.length L)).sum L.join = (List.drop i L).join


/-- The left whiskering of a 2-isomorphism is a 2-isomorphism. -/
@[simps]
def whiskerLeftIso (f : a ⟶ b) {g h : b ⟶ c} (η : g ≅ h) : f ≫ g ≅ f ≫ h

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c : B}
(f : a ⟶ b)
{g h : b ⟶ c}
(η : g ≅ h)

(CategoryTheory.Bicategory.whiskerLeftIso f η).hom = CategoryTheory.Bicategory.whiskerLeft f η.hom


theorem projIci_of_mem (hx : x ∈ Ici a) : projIci a x = ⟨x, hx⟩

{α : Type u_1}
[LinearOrder α]
{a x : α}
(hx : x ∈ Set.Ici a)