@[simp]
theorem cons_copy {u v w v' w'} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v) (hw : w' = w) :
    Walk.cons h (p.copy hv hw) = (Walk.cons (hv ▸ h) p).copy rfl hw

{V : Type u}
{G : SimpleGraph V}
{u v w v' w' : V}
(h : G.Adj u v)
(p : G.Walk v' w')
(hv : v' = v)
(hw : w' = w)

SimpleGraph.Walk.cons h (p.copy hv hw) = (SimpleGraph.Walk.cons ⋯ p).copy ⋯ hw


/-- If `f n` is bounded in absolute value by a constant times `n^(x-1)` and `re s > x`,
then the `LSeries` of `f` is summable at `s`. -/
lemma LSeriesSummable_of_le_const_mul_rpow {f : ℕ → ℂ} {x : ℝ} {s : ℂ} (hs : x < s.re)
    (h : ∃ C, ∀ n ≠ 0, ‖f n‖ ≤ C * n ^ (x - 1)) :
    LSeriesSummable f s

(h : ∃ C, ∀ (n : ℕ), n ≠ 0 → ‖f n‖ ≤ C * ↑n ^ (x - 1))


/-- If `f : α → β` is an injective function, then domain `α` is equivalent to the range of `f`. -/
@[simps! apply]
noncomputable def ofInjective {α β} (f : α → β) (hf : Injective f) : α ≃ range f

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


theorem add_le_of_lt (h1 : a ≡ b [MOD m]) (h2 : a < b) : a + m ≤ b

{m a b : ℕ}
(h1 : a ≡ b [MOD m])
(h2 : a < b)


theorem mem_rootSet_of_ne {p : T[X]} {S : Type*} [CommRing S] [IsDomain S] [Algebra T S]
    [NoZeroSMulDivisors T S] (hp : p ≠ 0) {a : S} : a ∈ p.rootSet S ↔ aeval a p = 0

{T : Type w}
[CommRing T]
{p : Polynomial T}
{S : Type u_1}
[CommRing S]
[IsDomain S]
[Algebra T S]
[NoZeroSMulDivisors T S]
(hp : p ≠ 0)
{a : S}

a ∈ p.rootSet S ↔ (Polynomial.aeval a) p = 0


/-- See also `leOnePart_eq_inv`. -/
@[to_additive "See also `negPart_eq_neg`."]
lemma leOnePart_eq_inv' : a⁻ᵐ = a⁻¹ ↔ 1 ≤ a⁻¹

{α : Type u_1}
[Lattice α]
[Group α]
{a : α}

a⁻ᵐ = a⁻¹ ↔ 1 ≤ a⁻¹


@[to_additive]
theorem eqOn_mulIndicator : EqOn (mulIndicator s f) f s

{α : Type u_1}
{M : Type u_4}
[One M]
{s : Set α}
{f : α → M}


@[simp]
theorem leSupr_apply_mk {ι : Type*} (U : ι → Opens X) (i : ι) (x) (m) :
    (leSupr U i) ⟨x, m⟩ = ⟨x, (le_iSup U i : _) m⟩

{X : TopCat}
{ι : Type u_1}
(U : ι → TopologicalSpace.Opens ↑X)
(i : ι)
(x : ↑X)
(m : x ∈ U i)


@[simp]
theorem mem_range : m ∈ range n ↔ m < n


@[simp]
theorem support_neg {x : HahnSeries Γ R} : (-x).support = x.support

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddGroup R]
{x : HahnSeries Γ R}


theorem le_def {a b : Char} : a ≤ b ↔ a.1 ≤ b.1


@[to_additive sum_choose_succ_nsmul]
theorem prod_pow_choose_succ {M : Type*} [CommMonoid M] (f : ℕ → ℕ → M) (n : ℕ) :
    (∏ i ∈ range (n + 2), f i (n + 1 - i) ^ (n + 1).choose i) =
      (∏ i ∈ range (n + 1), f i (n + 1 - i) ^ n.choose i) *
        ∏ i ∈ range (n + 1), f (i + 1) (n - i) ^ n.choose i

{M : Type u_4}
[CommMonoid M]
(f : ℕ → ℕ → M)
(n : ℕ)

∏ i ∈ Finset.range (n + 2), f i (n + 1 - i) ^ (n + 1).choose i =
  (∏ i ∈ Finset.range (n + 1), f i (n + 1 - i) ^ n.choose i) *
    ∏ i ∈ Finset.range (n + 1), f (i + 1) (n - i) ^ n.choose i


@[simp, norm_cast] lemma coe_finsetEquivSet : ⇑finsetEquivSet = ((↑) : Finset α → Set α)


/-- If `xs : ι → ℝ≥0∞` is bounded, then we have `liminf (toReal ∘ xs) = toReal (liminf xs)`. -/
lemma limsup_toReal_eq {ι : Type*} {F : Filter ι} [NeBot F] {b : ℝ≥0∞} (b_ne_top : b ≠ ∞)
    {xs : ι → ℝ≥0∞} (le_b : ∀ᶠ i in F, xs i ≤ b) :
    F.limsup (fun i ↦ (xs i).toReal) = (F.limsup xs).toReal

{ι : Type u_5}
{F : Filter ι}
[F.NeBot]
{b : ℝ≥0∞}
(b_ne_top : b ≠ ⊤)
{xs : ι → ℝ≥0∞}
(le_b : ∀ᶠ (i : ι) in F, xs i ≤ b)

Filter.limsup (fun i => (xs i).toReal) F = (Filter.limsup xs F).toReal


theorem le_comap_sup : comap f K ⊔ comap f L ≤ comap f (K ⊔ L)

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
{K L : Ideal S}

Ideal.comap f K ⊔ Ideal.comap f L ≤ Ideal.comap f (K ⊔ L)


theorem isOrtho_flip {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M} {x y} : B.IsOrtho x y ↔ B.flip.IsOrtho y x

{R : Type u_1}
{R₁ : Type u_2}
{M : Type u_5}
{M₁ : Type u_6}
[CommSemiring R]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
[AddCommMonoid M]
[Module R M]
{I₁ I₁' : R₁ →+* R}
{B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M}
{x y : M₁}


theorem gramSchmidtOrthonormalBasis_apply_of_orthogonal {f : ι → E}
    (hf : Pairwise fun i j => ⟪f i, f j⟫ = 0) {i : ι} (hi : f i ≠ 0) :
    gramSchmidtOrthonormalBasis h f i = (‖f i‖⁻¹ : 𝕜) • f i

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

(hf : Pairwise fun i j => ⟪f i, f j⟫_𝕜 = 0)

(gramSchmidtOrthonormalBasis h f) i = (↑‖f i‖)⁻¹ • f i


/-- A version of **Dickson's lemma** any subset of functions `Π s : σ, α s` is partially well
ordered, when `σ` is a `Fintype` and each `α s` is a linear well order.
This includes the classical case of Dickson's lemma that `ℕ ^ n` is a well partial order.
Some generalizations would be possible based on this proof, to include cases where the target is
partially well ordered, and also to consider the case of `Set.PartiallyWellOrderedOn` instead of
`Set.IsPWO`. -/
theorem Pi.isPWO {α : ι → Type*} [∀ i, LinearOrder (α i)] [∀ i, IsWellOrder (α i) (· < ·)]
    [Finite ι] (s : Set (∀ i, α i)) : s.IsPWO

[∀ (i : ι), IsWellOrder (α i) fun x x_1 => x < x_1]


@[simp]
theorem Ioi_diff_Ici : Ioi a \ Ici b = Ioo a b

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


@[simp]
theorem preimage_coe_Ioi : (some : α → WithTop α) ⁻¹' Ioi a = Ioi a


lemma iIndep_iff_iIndepSets (m : ι → MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω} (μ : Measure Ω) :
    iIndep m μ ↔ iIndepSets (fun x ↦ {s | MeasurableSet[m x] s}) μ

{Ω : Type u_1}
{ι : Type u_2}
(m : ι → MeasurableSpace Ω)
{_mΩ : MeasurableSpace Ω}
(μ : MeasureTheory.Measure Ω)

ProbabilityTheory.iIndep m μ ↔ ProbabilityTheory.iIndepSets (fun x => {s | MeasurableSet s}) μ


@[simp] lemma card_eq_zero : s.card = 0 ↔ s = ∅


theorem iSup_mul (f : ι → ℝ≥0) (a : ℝ≥0) : (⨆ i, f i) * a = ⨆ i, f i * a


/-- A monotone function between (conditionally) complete linear ordered spaces sends a
`Filter.limsSup` to the `Filter.limsup` of the image if the function is continuous at the `limsSup`
(and the filter is bounded from above and frequently bounded from below). -/
theorem Monotone.map_limsSup_of_continuousAt {F : Filter R} [NeBot F] {f : R → S}
    (f_incr : Monotone f) (f_cont : ContinuousAt f F.limsSup)
    (bdd_above : F.IsBounded (· ≤ ·) := by isBoundedDefault)
    (cobdd : F.IsCobounded (· ≤ ·) := by isBoundedDefault) : f F.limsSup = F.limsup f

(bdd_above : Filter.IsBounded (fun x x_1 => x ≤ x_1) F := by isBoundedDefault)

(cobdd : Filter.IsCobounded (fun x x_1 => x ≤ x_1) F := by isBoundedDefault)


@[simp]
theorem toEnd_mul (x y : CentroidHom α) : (x * y).toEnd = x.toEnd * y.toEnd

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(x y : CentroidHom α)


theorem conjAut_mul (f g : Aut X) : α.conjAut (f * g) = α.conjAut f * α.conjAut g

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


theorem rightDistributor_hom {J : Type} [Fintype J] (f : J → C) (X : C) :
    (rightDistributor f X).hom =
      ∑ j : J, (biproduct.π f j ▷ X) ≫ biproduct.ι (fun j => f j ⊗ X) j

(CategoryTheory.rightDistributor f X).hom =
  ∑ j : J,
    CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.Limits.biproduct.π f j) X)
      (CategoryTheory.Limits.biproduct.ι (fun j => CategoryTheory.MonoidalCategory.tensorObj (f j) X) j)


@[symm]
theorem BalancedSz.symm {l r : ℕ} : BalancedSz l r → BalancedSz r l

Ordnode.BalancedSz l r → Ordnode.BalancedSz r l


theorem uniformCauchySeqOnFilter_of_deriv (hf' : UniformCauchySeqOnFilter f' l (𝓝 x))
    (hf : ∀ᶠ n : ι × 𝕜 in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)
    (hfg : Cauchy (map (fun n => f n x) l)) : UniformCauchySeqOnFilter f l (𝓝 x)

(hf : ∀ᶠ (n : ι × 𝕜) in l ×ˢ 𝓝 x, HasDerivAt (f n.1) (f' n.1 n.2) n.2)

(hfg : Cauchy (Filter.map (fun n => f n x) l))


theorem exists_smul_of_dvd_count (s : Multiset α) {k : ℕ}
    (h : ∀ a : α, a ∈ s → k ∣ Multiset.count a s) : ∃ u : Multiset α, s = k • u

{α : Type u_3}
[DecidableEq α]
(s : Multiset α)
{k : ℕ}
(h : ∀ a ∈ s, k ∣ Multiset.count a s)


theorem completeSpace_iff_isComplete_range {f : α → β} (hf : UniformInducing f) :
    CompleteSpace α ↔ IsComplete (range f)

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{f : α → β}
(hf : UniformInducing f)

CompleteSpace α ↔ IsComplete (Set.range f)


/-- The type of *double centralizers*, also known as the *multiplier algebra* and denoted by
`𝓜(𝕜, A)`, of a non-unital normed algebra.

If `x : 𝓜(𝕜, A)`, then `x.fst` and `x.snd` are what is usually referred to as $L$ and $R$. -/
structure DoubleCentralizer (𝕜 : Type u) (A : Type v) [NontriviallyNormedField 𝕜]
    [NonUnitalNormedRing A] [NormedSpace 𝕜 A] [SMulCommClass 𝕜 A A] [IsScalarTower 𝕜 A A] extends
    (A →L[𝕜] A) × (A →L[𝕜] A) where
  /-- The centrality condition that the maps linear maps intertwine one another. -/
  central : ∀ x y : A, snd x * y = x * fst y

{𝕜 : Type u}
{A : Type v}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(self : 𝓜(𝕜, A))
(x y : A)

self.toProd.2 x * y = x * self.toProd.1 y


/-- Taking sub-families preserves equicontinuity at a point within a subset. -/
theorem EquicontinuousWithinAt.comp {F : ι → X → α} {S : Set X} {x₀ : X}
    (h : EquicontinuousWithinAt F S x₀) (u : κ → ι) :
    EquicontinuousWithinAt (F ∘ u) S x₀

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{F : ι → X → α}
{S : Set X}
{x₀ : X}
(h : EquicontinuousWithinAt F S x₀)
(u : κ → ι)


@[simp]
lemma RightHomologyData.opcyclesIso_hom_comp_descQ :
    h.opcyclesIso.hom ≫ h.descQ k hk = S.descOpcycles k hk

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

CategoryTheory.CategoryStruct.comp h.opcyclesIso.hom (h.descQ k hk) = S.descOpcycles k hk


theorem any_iff_exists_prop : (any l fun a => p a) ↔ ∃ a ∈ l, p a

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{l : List α}

(l.any fun a => decide (p a)) = true ↔ ∃ a, a ∈ l ∧ p a


theorem emod_add_ediv' (a b : Int) : a % b + a / b * b = a


@[to_additive]
lemma iIndepFun.indepFun_mul_left (hf_indep : iIndepFun (fun _ ↦ m) f κ μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    IndepFun (f i * f j) (f k) κ μ

{f : ι → Ω → β}

(hf_indep : ProbabilityTheory.Kernel.iIndepFun (fun x => m) f κ μ)

ProbabilityTheory.Kernel.IndepFun (f i * f j) (f k) κ μ


lemma map_opcyclesMap' : F.map (ShortComplex.opcyclesMap' φ hr₁ hr₂) =
    ShortComplex.opcyclesMap' (F.mapShortComplex.map φ) (hr₁.map F) (hr₂.map F)

F.map (CategoryTheory.ShortComplex.opcyclesMap' φ hr₁ hr₂) =
  CategoryTheory.ShortComplex.opcyclesMap' (F.mapShortComplex.map φ) (hr₁.map F) (hr₂.map F)


nonrec theorem Valid.right {s l x r} (H : Valid (@node α s l x r)) : Valid r

{α : Type u_1}
[Preorder α]
{s : ℕ}
{l : Ordnode α}
{x : α}
{r : Ordnode α}
(H : (Ordnode.node s l x r).Valid)


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

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

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


@[to_additive all_zero_of_le_zero_le_of_sum_eq_zero]
lemma all_one_of_le_one_le_of_prod_eq_one :
    (∀ x ∈ s, (1 : α) ≤ x) → s.prod = 1 → ∀ x ∈ s, x = (1 : α)

{α : Type u_2}
[OrderedAddCommMonoid α]
{s : Multiset α}

(∀ x ∈ s, 0 ≤ x) → s.sum = 0 → ∀ x ∈ s, x = 0


/-- **Gödel's Beta Function Lemma** -/
lemma beta_unbeta_coe (l : List ℕ) (i : Fin l.length) : beta (unbeta l) i = l.get i


theorem simpleFunc_bot {α} (f : @SimpleFunc α ⊥ β) [Nonempty β] : ∃ c, ∀ x, f x = c

{β : Type u_2}
{α : Type u_5}
(f : MeasureTheory.SimpleFunc α β)
[Nonempty β]


lemma mul_self_inj : m * m = n * n ↔ m = n


/-- Construct a cocone on `F` from an object of the category `(F ↓ Δ)`. This is part of an
    equivalence, see `Cocone.equivStructuredArrow`. -/
@[simps]
def Cocone.fromStructuredArrow (F : J ⥤ C) : StructuredArrow F (const J) ⥤ Cocone F

(c : CategoryTheory.StructuredArrow F (CategoryTheory.Functor.const J))

((CategoryTheory.Limits.Cocone.fromStructuredArrow F).obj c).ι = c.hom


/-- If `coyoneda.map f` is an isomorphism, so was `f`.
-/
theorem isIso {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso (coyoneda.map f)] : IsIso f


/-- Proves that `f` satisfies `IsLocalHomeomorphOn f s`. The condition `h` is weaker than the
definition of `IsLocalHomeomorphOn f s`, since it only requires `e : PartialHomeomorph X Y` to
agree with `f` on its source `e.source`, as opposed to on the whole space `X`. -/
theorem mk (h : ∀ x ∈ s, ∃ e : PartialHomeomorph X Y, x ∈ e.source ∧ Set.EqOn f e e.source) :
    IsLocalHomeomorphOn f s

(h : ∀ x ∈ s, ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source)


theorem op_sSup (S : Set (Subalgebra R A)) : (sSup S).op = sSup (.unop ⁻¹' S)

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Set (Subalgebra R A))

(sSup S).op = sSup (Subalgebra.unop ⁻¹' S)


theorem nnnorm_of_nonneg (hr : 0 ≤ r) : ‖r‖₊ = ⟨r, hr⟩


theorem chainHeight_le_chainHeight_iff_le {t : Set β} :
    s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, length l ≤ length l'

{α : Type u_1}
{β : Type u_2}
[LT α]
[LT β]
{s : Set α}
{t : Set β}

s.chainHeight ≤ t.chainHeight ↔ ∀ l ∈ s.subchain, ∃ l' ∈ t.subchain, l.length ≤ l'.length


@[simp]
theorem biprod.isoCoprod_inv {X Y : C} [HasBinaryBiproduct X Y] :
    (biprod.isoCoprod X Y).inv = coprod.desc biprod.inl biprod.inr

(CategoryTheory.Limits.biprod.isoCoprod X Y).inv =
  CategoryTheory.Limits.coprod.desc CategoryTheory.Limits.biprod.inl CategoryTheory.Limits.biprod.inr


/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
assumes `0≤K`. -/
protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0) (h : ∀ x y, f x ≤ f y + K * dist x y) :
    LipschitzWith K f

(h : ∀ (x y : α), f x ≤ f y + ↑K * dist x y)


theorem norm_mkPiAlgebraFin_succ_le : ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕜 n.succ A‖ ≤ 1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{n : ℕ}
{A : Type u_1}
[NormedRing A]
[NormedAlgebra 𝕜 A]


theorem encode_lt_prec (cf cg) :
    encode cf < encode (prec cf cg) ∧ encode cg < encode (prec cf cg)

Encodable.encode cf < Encodable.encode (cf.prec cg) ∧ Encodable.encode cg < Encodable.encode (cf.prec cg)


/-- A property of ring homs is local if it is preserved by localizations and compositions, and for
each `{ r }` that spans `S`, we have `P (R →+* S) ↔ ∀ r, P (R →+* Sᵣ)`. -/
structure RingHom.PropertyIsLocal : Prop where
  LocalizationPreserves : RingHom.LocalizationPreserves @P
  OfLocalizationSpanTarget : RingHom.OfLocalizationSpanTarget @P
  StableUnderComposition : RingHom.StableUnderComposition @P
  HoldsForLocalizationAway : RingHom.HoldsForLocalizationAway @P

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


@[simp]
theorem forall_smul_mem_iff {R M S : Type*} [Monoid R] [MulAction R M] [SetLike S M]
    [SMulMemClass S R M] {N : S} {x : M} : (∀ a : R, a • x ∈ N) ↔ x ∈ N

{R : Type u_1}
{M : Type u_2}
{S : Type u_3}
[Monoid R]
[MulAction R M]
[SetLike S M]
[SMulMemClass S R M]
{N : S}
{x : M}


@[simp]
theorem snd_dual (s : NonemptyInterval α) : s.dual.snd = toDual s.fst

{α : Type u_1}
[LE α]
(s : NonemptyInterval α)

(NonemptyInterval.dual s).toProd.2 = OrderDual.toDual s.toProd.1


lemma sieve₁_eq_pullback_sieve₁' {W : C} (p₁ : W ⟶ E.X i₁) (p₂ : W ⟶ E.X i₂)
    (w : p₁ ≫ E.f i₁ = p₂ ≫ E.f i₂) :
    E.sieve₁ p₁ p₂ = (E.sieve₁' i₁ i₂).pullback (pullback.lift _ _ w)

[CategoryTheory.Limits.HasPullback (E.f i₁) (E.f i₂)]

(w : CategoryTheory.CategoryStruct.comp p₁ (E.f i₁) = CategoryTheory.CategoryStruct.comp p₂ (E.f i₂))

E.sieve₁ p₁ p₂ = CategoryTheory.Sieve.pullback (CategoryTheory.Limits.pullback.lift p₁ p₂ w) (E.sieve₁' i₁ i₂)


@[to_additive VAddAntidiagonal.eq_of_snd_eq_snd]
theorem eq_of_snd_eq_snd (h : (x : G × P).snd = (y : G × P).snd) : x = y

{G : Type u_1}
{P : Type u_2}
{s : Set G}
{t : Set P}
{a : P}
[VAdd G P]
[IsCancelVAdd G P]
{x y : ↑(s.vaddAntidiagonal t a)}
(h : (↑x).2 = (↑y).2)


@[mono, gcongr]
theorem div_le_div (hc : 0 ≤ c) (hac : a ≤ c) (hd : 0 < d) (hbd : d ≤ b) : a / b ≤ c / d

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c d : α}
(hc : 0 ≤ c)
(hac : a ≤ c)
(hd : 0 < d)
(hbd : d ≤ b)


protected lemma symm (hr : ∀ (a : α) (b : β), r₁₂ a b → r₂₁ b a) :
    LeftTotal r₁₂ → RightTotal r₂₁

Relator.LeftTotal r₁₂ → Relator.RightTotal r₂₁


theorem restrict_preimage {f : α → β} (hf : MeasurePreserving f μa μb) {s : Set β}
    (hs : MeasurableSet s) : MeasurePreserving f (μa.restrict (f ⁻¹' s)) (μb.restrict s)

(hf : MeasureTheory.MeasurePreserving f μa μb)

MeasureTheory.MeasurePreserving f (μa.restrict (f ⁻¹' s)) (μb.restrict s)


theorem nat_power_eq {c : Cardinal.{u}} (h : ℵ₀ ≤ c) {n : ℕ} (hn : 2 ≤ n) :
    (n : Cardinal.{u}) ^ c = 2 ^ c


@[simp]
theorem lookup_union_right {a} {s₁ s₂ : AList β} : a ∉ s₁ → lookup a (s₁ ∪ s₂) = lookup a s₂

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{s₁ s₂ : AList β}

a ∉ s₁ → AList.lookup a (s₁ ∪ s₂) = AList.lookup a s₂


protected theorem TendstoUniformly.tendstoLocallyUniformly (h : TendstoUniformly F f p) :
    TendstoLocallyUniformly F f p

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{p : Filter ι}
[TopologicalSpace α]
(h : TendstoUniformly F f p)


/-- A helper structure to construct the shift functor `(Discrete A) ⥤ (C ⥤ C)`. -/
structure ShiftMkCore where
  /-- the family of shift functors -/
  F : A → C ⥤ C
  /-- the shift by 0 identifies to the identity functor -/
  zero : F 0 ≅ 𝟭 C
  /-- the composition of shift functors identifies to the shift by the sum -/
  add : ∀ n m : A, F (n + m) ≅ F n ⋙ F m
  /-- compatibility with the associativity -/
  assoc_hom_app : ∀ (m₁ m₂ m₃ : A) (X : C),
    (add (m₁ + m₂) m₃).hom.app X ≫ (F m₃).map ((add m₁ m₂).hom.app X) =
      eqToHom (by rw [add_assoc]) ≫ (add m₁ (m₂ + m₃)).hom.app X ≫
        (add m₂ m₃).hom.app ((F m₁).obj X) := by aesop_cat
  /-- compatibility with the left addition with 0 -/
  zero_add_hom_app : ∀ (n : A) (X : C), (add 0 n).hom.app X =
    eqToHom (by dsimp; rw [zero_add]) ≫ (F n).map (zero.inv.app X) := by aesop_cat
  /-- compatibility with the right addition with 0 -/
  add_zero_hom_app : ∀ (n : A) (X : C), (add n 0).hom.app X =
    eqToHom (by dsimp; rw [add_zero]) ≫ zero.inv.app ((F n).obj X) := by aesop_cat

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
(self : CategoryTheory.ShiftMkCore C A)
(n : A)
(X : C)

(self.add n 0).hom.app X =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) (self.zero.inv.app ((self.F n).obj X))


@[simp]
theorem plusMap_zero [Preadditive D] (P Q : Cᵒᵖ ⥤ D) : J.plusMap (0 : P ⟶ Q) = 0

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]


@[simp] theorem getMsb_and {x y : BitVec w} : (x &&& y).getMsb i = (x.getMsb i && y.getMsb i)


theorem _root_.biSup_finsetSigma' [CompleteLattice β] (s : Finset ι) (t : ∀ i, Finset (α i))
    (f : ∀ i, α i → β) : ⨆ (i ∈ s) (j ∈ t i), f i j = ⨆ ij ∈ s.sigma t, f ij.fst ij.snd

{ι : Type u_1}
{α : ι → Type u_2}
{β : Type u_3}
[CompleteLattice β]
(s : Finset ι)
(t : (i : ι) → Finset (α i))
(f : (i : ι) → α i → β)

⨆ i ∈ s, ⨆ j ∈ t i, f i j = ⨆ ij ∈ s.sigma t, f ij.fst ij.snd


protected theorem IsCircuit.rotate {u v : V} {c : G.Walk v v} (hc : c.IsCircuit)
    (h : u ∈ c.support) : (c.rotate h).IsCircuit

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v : V}
{c : G.Walk v v}
(hc : c.IsCircuit)
(h : u ∈ c.support)


/-- A morphism of schemes `f : X ⟶ Y` is a preimmersion if the underlying map of
topological spaces is an embedding and the induced morphisms of stalks are all surjective. -/
@[mk_iff]
class IsPreimmersion {X Y : Scheme} (f : X ⟶ Y) : Prop where
  base_embedding : Embedding f.1.base
  surj_on_stalks : ∀ x, Function.Surjective (f.stalkMap x)

[self : AlgebraicGeometry.IsPreimmersion f]


theorem progMeasurable_of_tendsto' {γ} [MeasurableSpace ι] [PseudoMetrizableSpace β]
    (fltr : Filter γ) [fltr.NeBot] [fltr.IsCountablyGenerated] {U : γ → ι → Ω → β}
    (h : ∀ l, ProgMeasurable f (U l)) (h_tendsto : Tendsto U fltr (𝓝 u)) : ProgMeasurable f u

{u : ι → Ω → β}

{U : γ → ι → Ω → β}

(h : ∀ (l : γ), MeasureTheory.ProgMeasurable f (U l))

(h_tendsto : Filter.Tendsto U fltr (𝓝 u))


@[ext]
lemma hom_ext {X Y : SheafOfModules.{v} R} {f g : X ⟶ Y} (h : f.val = g.val) : f = g

{J : CategoryTheory.GrothendieckTopology C}


@[simp]
theorem measurableEquivRealProd_apply (a : ℂ) : measurableEquivRealProd a = (a.re, a.im)

Complex.measurableEquivRealProd a = (a.re, a.im)


/-- Any `K`-Lipschitz map from a subset `s` of a metric space `α` to a finite-dimensional real
vector space `E'` can be extended to a Lipschitz map on the whole space `α`, with a slightly worse
constant `C * K` where `C` only depends on `E'`. We record a working value for this constant `C`
as `lipschitzExtensionConstant E'`. -/
irreducible_def lipschitzExtensionConstant (E' : Type*) [NormedAddCommGroup E'] [NormedSpace ℝ E']
  [FiniteDimensional ℝ E'] : ℝ≥0

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

lipschitzExtensionConstant E' =
  let A := (Basis.ofVectorSpace ℝ E').equivFun.toContinuousLinearEquiv;
  max (‖↑A.symm‖₊ * ‖↑A‖₊) 1


@[simp]
theorem toNonUnitalStarSubalgebra_toNonUnitalSubalgebra (s : NonUnitalSubalgebra R A) (h_star) :
    (s.toNonUnitalStarSubalgebra h_star).toNonUnitalSubalgebra = s

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[Star A]
(s : NonUnitalSubalgebra R A)
(h_star : ∀ x ∈ s, star x ∈ s)


theorem image_preimage_eq_prod_univ {s : Set B} (hb : s ⊆ e.baseSet) :
    e '' (proj ⁻¹' s) = s ×ˢ univ

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


@[simp]
theorem ite_diff_self (t s s' : Set α) : t.ite s s' \ t = s' \ t


/-- The `I`-adic cauchy condition can be checked on successive `n`.-/
theorem isAdicCauchy_iff (f : ℕ → M) :
    IsAdicCauchy I M f ↔ ∀ n, f n ≡ f (n + 1) [SMOD (I ^ n • ⊤ : Submodule R M)]

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]
(f : ℕ → M)

AdicCompletion.IsAdicCauchy I M f ↔ ∀ (n : ℕ), f n ≡ f (n + 1) [SMOD I ^ n • ⊤]


theorem range_inr : range (inr R M M₂) = ker (fst R M M₂)

(R : Type u)
(M : Type v)
(M₂ : Type w)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

LinearMap.range (LinearMap.inr R M M₂) = LinearMap.ker (LinearMap.fst R M M₂)


theorem isPeriodicPt_minimalPeriod (f : α → α) (x : α) : IsPeriodicPt f (minimalPeriod f x) x

Function.IsPeriodicPt f (Function.minimalPeriod f x) x


@[simp]
theorem inf_factors {A B : C} {X Y : Subobject B} (f : A ⟶ B) :
    (X ⊓ Y).Factors f ↔ X.Factors f ∧ Y.Factors f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{A B : C}
{X Y : CategoryTheory.Subobject B}
(f : A ⟶ B)


/-- A weaker version of `Basis.opNNNorm_le` that abstracts away the value of `C`. -/
theorem Basis.exists_opNNNorm_le {ι : Type*} [Finite ι] (v : Basis ι 𝕜 E) :
    ∃ C > (0 : ℝ≥0), ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ i, ‖u (v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type w}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace 𝕜]
{ι : Type u_1}
[Finite ι]
(v : Basis ι 𝕜 E)

∃ C > 0, ∀ {u : E →L[𝕜] F} (M : ℝ≥0), (∀ (i : ι), ‖u (v i)‖₊ ≤ M) → ‖u‖₊ ≤ C * M


theorem card_le_six : card {a, b, c, d, e, f} ≤ 6

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


theorem nonempty_coe_sort {s : Finset α} : Nonempty (s : Type _) ↔ s.Nonempty


theorem Iso.conj_eq_conj (i : X ≅ X') (f : End X) :
    Iso.conj i f = LinearEquiv.conj i.toLinearEquiv f

{S : Type u}
[CommRing S]
{X X' : ModuleCat S}
(i : X ≅ X')
(f : CategoryTheory.End X)


theorem memℒp_neg_iff {f : α → E} : Memℒp (-f) p μ ↔ Memℒp f p μ

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

MeasureTheory.Memℒp (-f) p μ ↔ MeasureTheory.Memℒp f p μ


theorem Continuous.continuousWithinAt {f : α → β} {s : Set α} {x : α} (h : Continuous f) :
    ContinuousWithinAt f s x

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
{x : α}
(h : Continuous f)


@[to_additive]
theorem preimage {f : G → H} (hf : IsGroupHom f) {s : Set H} (hs : IsSubgroup s) :
    IsSubgroup (f ⁻¹' s)

{G : Type u_1}
{H : Type u_2}
[AddGroup G]
[AddGroup H]
{f : G → H}
(hf : IsAddGroupHom f)
{s : Set H}
(hs : IsAddSubgroup s)


@[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_monoidOf (x) :
    (mulEquivOfQuotient f).symm (f.toMap x) = (monoidOf S).toMap x

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

(Localization.mulEquivOfQuotient f).symm (f.toMap x) = (Localization.monoidOf S).toMap x


theorem liftProp_of_locally_liftPropOn (h : ∀ x, ∃ u, IsOpen u ∧ x ∈ u ∧ LiftPropOn P g u) :
    LiftProp P g

(h : ∀ (x : M), ∃ u, IsOpen u ∧ x ∈ u ∧ ChartedSpace.LiftPropOn P g u)


theorem UpperSemicontinuous.upperSemicontinuousOn (h : UpperSemicontinuous f) (s : Set α) :
    UpperSemicontinuousOn f s

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{f : α → β}
(h : UpperSemicontinuous f)
(s : Set α)


/-- If a function `f` is `1` outside of a finite set `s`, then it `HasProd` `∏ b ∈ s, f b`. -/
@[to_additive "If a function `f` vanishes outside of a finite set `s`, then it `HasSum`
`∑ b ∈ s, f b`."]
theorem hasProd_prod_of_ne_finset_one (hf : ∀ b ∉ s, f b = 1) :
    HasProd f (∏ b ∈ s, f b)

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{s : Finset β}
(hf : ∀ b ∉ s, f b = 1)


theorem add_right_neg_equiv (x : PGame) : x + -x ≈ 0


theorem ContDiff.ccos {n} (h : ContDiff ℂ n f) : ContDiff ℂ n fun x => Complex.cos (f x)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{n : ℕ∞}
(h : ContDiff ℂ n f)


lemma isoClosure_eq_self [ClosedUnderIsomorphisms P] : isoClosure P = P


@[simp]
theorem functor_map_eq_inf {X : TopCat} (U V : Opens X) :
    U.openEmbedding.isOpenMap.functor.obj ((Opens.map U.inclusion).obj V) = V ⊓ U

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

⋯.functor.obj ((TopologicalSpace.Opens.map U.inclusion).obj V) = V ⊓ U


@[simp]
theorem toCocone_inj (B : Bicone F) (j : J) : Cofan.inj B.toCocone j = B.ι j

CategoryTheory.Limits.Cofan.inj B.toCocone j = B.ι j


/-- An open quotient of a second countable space is second countable. -/
theorem Quotient.secondCountableTopology [SecondCountableTopology X]
    (h : IsOpenMap (Quotient.mk' : X → Quotient S)) : SecondCountableTopology (Quotient S)

{X : Type u_1}
[TopologicalSpace X]
{S : Setoid X}
[SecondCountableTopology X]
(h : IsOpenMap Quotient.mk')


@[to_additive (attr := simp)]
theorem noncommPiCoprod_mulSingle (i : ι) (y : N i) :
    noncommPiCoprod ϕ hcomm (Pi.mulSingle i y) = ϕ i y

{hcomm : Pairwise fun i j => ∀ (x : N i) (y : N j), Commute ((ϕ i) x) ((ϕ j) y)}

(MonoidHom.noncommPiCoprod ϕ hcomm) (Pi.mulSingle i y) = (ϕ i) y


/-- If a preconnected set contains endpoints of an interval, then it includes the whole interval. -/
theorem IsConnected.Icc_subset {s : Set α} (hs : IsConnected s) {a b : α} (ha : a ∈ s)
    (hb : b ∈ s) : Icc a b ⊆ s

{α : Type v}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{s : Set α}
(hs : IsConnected s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)


@[simp]
theorem coe_toHomotopy (F : HomotopyWith f₀ f₁ P) : ⇑F.toHomotopy = F

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


theorem exists_lt_of_tendsto_atBot [SemilatticeSup α] [Preorder β] [NoMinOrder β] {u : α → β}
    (h : Tendsto u atTop atBot) : ∀ a b, ∃ a' ≥ a, u a' < b

(h : Filter.Tendsto u Filter.atTop Filter.atBot)


/-- The measurable equivalence defined by an orthonormal basis is volume preserving. -/
theorem OrthonormalBasis.measurePreserving_measurableEquiv (b : OrthonormalBasis ι ℝ F) :
    MeasurePreserving b.measurableEquiv volume volume

{ι : Type u_1}
{F : Type u_3}
[Fintype ι]
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
[FiniteDimensional ℝ F]
[MeasurableSpace F]
[BorelSpace F]
(b : OrthonormalBasis ι ℝ F)

MeasureTheory.MeasurePreserving (⇑b.measurableEquiv) MeasureTheory.volume MeasureTheory.volume


@[simp]
lemma Ψ_ofNat (n : ℕ) : W.Ψ n = C (W.preΨ' n) * if Even n then W.ψ₂ else 1

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

W.Ψ ↑n = Polynomial.C (W.preΨ' n) * if Even n then W.ψ₂ else 1


lemma of_map (f : F) [neZero : NeZero (f a)] : NeZero a

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Zero α]
[Zero β]
[FunLike F α β]
[ZeroHomClass F α β]
{a : α}
(f : F)
[neZero : NeZero (f a)]


@[simp] lemma _root_.Equiv.simpleGraph_trans (e₁ : V ≃ W) (e₂ : W ≃ X) :
  (e₁.trans e₂).simpleGraph = e₁.simpleGraph.trans e₂.simpleGraph

{V : Type u_1}
{W : Type u_2}
{X : Type u_3}
(e₁ : V ≃ W)
(e₂ : W ≃ X)


theorem mem_Ioo_self_sub_add : x ≠ ∞ → x ≠ 0 → ε₁ ≠ 0 → ε₂ ≠ 0 → x ∈ Ioo (x - ε₁) (x + ε₂)

{x ε₁ ε₂ : ℝ≥0∞}

x ≠ ⊤ → x ≠ 0 → ε₁ ≠ 0 → ε₂ ≠ 0 → x ∈ Set.Ioo (x - ε₁) (x + ε₂)


/-- **Non-Denumerability of the Continuum**: The reals are not countable. -/
theorem not_countable_real : ¬(Set.univ : Set ℝ).Countable


theorem apply_lt_top (p : PMF α) (a : α) : p a < ∞


theorem uniformContinuous_sInf_rng {f : α → β} {u₁ : UniformSpace α} {u₂ : Set (UniformSpace β)} :
    UniformContinuous[u₁, sInf u₂] f ↔ ∀ u ∈ u₂, UniformContinuous[u₁, u] f

{α : Type ua}
{β : Type ub}
{f : α → β}
{u₁ : UniformSpace α}
{u₂ : Set (UniformSpace β)}

UniformContinuous f ↔ ∀ u ∈ u₂, UniformContinuous f


theorem IsTrail.of_cons {u v w : V} {h : G.Adj u v} {p : G.Walk v w} :
    (cons h p).IsTrail → p.IsTrail

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
{h : G.Adj u v}
{p : G.Walk v w}

(SimpleGraph.Walk.cons h p).IsTrail → p.IsTrail


protected theorem iInf {ι : Type*} [Countable ι] {t : ι → TopologicalSpace α}
    (ht₀ : ∃ i₀, ∀ i, t i ≤ t i₀) (ht : ∀ i, @PolishSpace α (t i)) : @PolishSpace α (⨅ i, t i)

{α : Type u_1}
{ι : Type u_3}
[Countable ι]
{t : ι → TopologicalSpace α}
(ht₀ : ∃ i₀, ∀ (i : ι), t i ≤ t i₀)
(ht : ∀ (i : ι), PolishSpace α)


theorem cyclotomic_pos_and_nonneg (n : ℕ) {R} [LinearOrderedCommRing R] (x : R) :
    (1 < x → 0 < eval x (cyclotomic n R)) ∧ (1 ≤ x → 0 ≤ eval x (cyclotomic n R))

(n : ℕ)
{R : Type u_1}
[LinearOrderedCommRing R]
(x : R)

(1 < x → 0 < Polynomial.eval x (Polynomial.cyclotomic n R)) ∧
  (1 ≤ x → 0 ≤ Polynomial.eval x (Polynomial.cyclotomic n R))


@[simp]
theorem constantCoeff_wittZSMul (z : ℤ) (n : ℕ) : constantCoeff (wittZSMul p z n) = 0

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

MvPolynomial.constantCoeff (WittVector.wittZSMul p z n) = 0


@[simp] -- Porting note (#10618): was @[simp]
nonrec theorem integral_comp_add_left (d) :
    (∫ x in a..b, f (d + x)) = ∫ x in d + a..d + b, f x

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
(f : ℝ → E)
(d : ℝ)

∫ (x : ℝ) in a..b, f (d + x) = ∫ (x : ℝ) in d + a..d + b, f x


theorem eventually_filterAt_integrableOn (x : α) {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᶠ a in v.filterAt x, IntegrableOn f a μ

(hf : MeasureTheory.LocallyIntegrable f μ)

∀ᶠ (a : Set α) in v.filterAt x, MeasureTheory.IntegrableOn f a μ


@[to_additive sub_one_nsmul_add]
lemma mul_pow_sub_one (hn : n ≠ 0) (a : M) : a * a ^ (n - 1) = a ^ n

{M : Type u_4}
[AddMonoid M]
{n : ℕ}
(hn : n ≠ 0)
(a : M)


@[simp]
theorem chain_cons {a b : α} {l : List α} : Chain R a (b :: l) ↔ R a b ∧ Chain R b l

{α : Type u_1}
{R : α → α → Prop}
{a b : α}
{l : List α}

List.Chain R a (b :: l) ↔ R a b ∧ List.Chain R b l


lemma image_sdiff_product (s t : Finset α) : (s ×ˢ t).image (uncurry (· \ ·)) = s \\ t

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

Finset.image (Function.uncurry fun x x_1 => x \ x_1) (s ×ˢ t) = s.diffs t


/-- A 'ite' producing a `Pi` type `Π a, σ a`, applied to a value `a : α` is a `ite` that applies
either branch to `a`. -/
theorem ite_apply (f g : ∀ a, σ a) (a : α) : (ite P f g) a = ite P (f a) (g a)

{α : Sort u_1}
{σ : α → Sort u_2}
(P : Prop)
[Decidable P]
(f g : (a : α) → σ a)
(a : α)

(if P then f else g) a = if P then f a else g a


theorem gaugeRescale_self {s : Set E} (hsa : Absorbent ℝ s) (hsb : IsVonNBounded ℝ s) :
    gaugeRescale s s = id

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[T1Space E]
{s : Set E}
(hsa : Absorbent ℝ s)
(hsb : Bornology.IsVonNBounded ℝ s)


theorem le_of_tendsto' {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a))
    (h : ∀ c, f c ≤ b) : a ≤ b

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder α]
[ClosedIicTopology α]
{f : β → α}
{a b : α}
{x : Filter β}
[x.NeBot]
(lim : Filter.Tendsto f x (𝓝 a))
(h : ∀ (c : β), f c ≤ b)


theorem sInf_le {A : C} (s : Set (Subobject A)) (f) (hf : f ∈ s) : sInf s ≤ f


@[simp] theorem conjNeg_symm : (conjNeg (a := a) (b := b)).symm = conjNeg

{G : Type u_1}
{H : Type u_2}
[AddCommGroup G]
[AddCommGroup H]
{a : G}
{b : H}


/-- The `i`th opcycles functor `HomologicalComplex C c ⥤ C`. -/
@[simps]
noncomputable def opcyclesFunctor [CategoryWithHomology C] : HomologicalComplex C c ⥤ C

(HomologicalComplex.opcyclesFunctor C c i).obj K = K.opcycles i


@[to_additive]
theorem comap_comap (S : Submonoid P) (g : N →* P) (f : M →* N) :
    (S.comap g).comap f = S.comap (g.comp f)

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[MulOneClass M]
[MulOneClass N]
[MulOneClass P]
(S : Submonoid P)
(g : N →* P)
(f : M →* N)

Submonoid.comap f (Submonoid.comap g S) = Submonoid.comap (g.comp f) S


@[simp, norm_cast]
theorem coe_im : (x : ℍ[R]).im = 0


theorem not_bddBelow_Iic : ¬BddBelow (Iic a)

{α : Type u_1}
[Preorder α]
(a : α)
[NoMinOrder α]


@[to_additive]
theorem ofMulEquivOfDom_comp_symm {k : P ≃* M} (H : T.map k.toMonoidHom = S) (x) :
    (f.ofMulEquivOfDom H).toMap (k.symm x) = f.toMap x

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{T : Submonoid P}
{k : P ≃* M}
(H : Submonoid.map k.toMonoidHom T = S)
(x : M)


@[to_additive]
theorem comap_inf_map_of_injective (S T : Submonoid M) : (S.map f ⊓ T.map f).comap f = S ⊓ T

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

Submonoid.comap f (Submonoid.map f S ⊓ Submonoid.map f T) = S ⊓ T


theorem coindep_iff_exists' : M.Coindep X ↔ (∃ B, M.Base B ∧ B ⊆ M.E \ X) ∧ X ⊆ M.E

{α : Type u_1}
{M : Matroid α}
{X : Set α}


theorem fold_cons'_left (b a : α) (s : Multiset α) : (a ::ₘ s).fold op b = s.fold op (a * b)

{α : Type u_1}
(op : α → α → α)
[hc : Std.Commutative op]
[ha : Std.Associative op]
(b a : α)
(s : Multiset α)

Multiset.fold op b (a ::ₘ s) = Multiset.fold op (op a b) s


/-- **Jensen's inequality**: if a function `g : E → ℝ` is convex and continuous on a convex closed
set `s`, `μ` is a finite non-zero measure on `α`, and `f : α → E` is a function sending
`μ`-a.e. points of a set `t` to `s`, then the value of `g` at the average value of `f` over `t` is
less than or equal to the average value of `g ∘ f` over `t` provided that both `f` and `g ∘ f` are
integrable. -/
theorem ConvexOn.map_set_average_le (hg : ConvexOn ℝ s g) (hgc : ContinuousOn g s)
    (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞) (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s)
    (hfi : IntegrableOn f t μ) (hgi : IntegrableOn (g ∘ f) t μ) :
    g (⨍ x in t, f x ∂μ) ≤ ⨍ x in t, g (f x) ∂μ

(hfs : ∀ᵐ (x : α) ∂μ.restrict t, f x ∈ s)

(hfi : MeasureTheory.IntegrableOn f t μ)

(hgi : MeasureTheory.IntegrableOn (g ∘ f) t μ)

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


protected theorem IsPath.transfer (hp) (pp : p.IsPath) :
    (p.transfer H hp).IsPath

{V : Type u}
{G : SimpleGraph V}
{u v : V}
{H : SimpleGraph V}
(p : G.Walk u v)
(hp : ∀ e ∈ p.edges, e ∈ H.edgeSet)
(pp : p.IsPath)


@[to_additive]
protected theorem mul [Mul β] [ContinuousMul β] (hu : ProgMeasurable f u)
    (hv : ProgMeasurable f v) : ProgMeasurable f fun i ω => u i ω * v i ω

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[TopologicalSpace β]
[Preorder ι]
{u v : ι → Ω → β}
{f : MeasureTheory.Filtration ι m}
[MeasurableSpace ι]
[Add β]
[ContinuousAdd β]
(hu : MeasureTheory.ProgMeasurable f u)
(hv : MeasureTheory.ProgMeasurable f v)

MeasureTheory.ProgMeasurable f fun i ω => u i ω + v i ω


theorem continuousWithinAt_log_of_re_neg_of_im_zero {z : ℂ} (hre : z.re < 0) (him : z.im = 0) :
    ContinuousWithinAt log { z : ℂ | 0 ≤ z.im } z

ContinuousWithinAt Complex.log {z | 0 ≤ z.im} z


@[simp]
theorem sum_dual_apply_smul_coord (f : Module.Dual R M) :
    (∑ x, f (b x) • b.coord x) = f

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[Fintype ι]
(b : Basis ι R M)
(f : Module.Dual R M)


/-- The equivalence from algebras for the coproduct monad to the under category.
-/
@[simps]
def algebraEquivUnder : Monad.Algebra (coprodMonad X) ≌ Under X

(CategoryTheory.algebraEquivUnder X).inverse = CategoryTheory.underToAlgebra X


/-- Auxiliary definition for `bifunctorComp₂₃`. -/
@[simps]
def bifunctorComp₂₃Obj (X₁ : C₁) : C₂ ⥤ C₃ ⥤ C₄

(F : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂₃ C₄))

(G₂₃ : CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₂₃))

((CategoryTheory.bifunctorComp₂₃Obj F G₂₃ X₁).obj X₂).map φ = (F.obj X₁).map ((G₂₃.obj X₂).map φ)


/-- A weighted sum, over the image of an embedding, equals a weighted
sum with the same points and weights over the original
`Finset`. -/
theorem weightedVSubOfPoint_map (e : ι₂ ↪ ι) (w : ι → k) (p : ι → P) (b : P) :
    (s₂.map e).weightedVSubOfPoint p b w = s₂.weightedVSubOfPoint (p ∘ e) b (w ∘ e)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
{ι₂ : Type u_5}
(s₂ : Finset ι₂)
(e : ι₂ ↪ ι)
(w : ι → k)
(p : ι → P)
(b : P)

((Finset.map e s₂).weightedVSubOfPoint p b) w = (s₂.weightedVSubOfPoint (p ∘ ⇑e) b) (w ∘ ⇑e)


lemma isCyclic_of_isSplittingField_X_pow_sub_C : IsCyclic (L ≃ₐ[K] L)

(H : Irreducible (Polynomial.X ^ n - Polynomial.C a))

[Polynomial.IsSplittingField K L (Polynomial.X ^ n - Polynomial.C a)]


@[to_additive]
theorem nnnorm_prod_le_of_le (s : Finset ι) {f : ι → E} {n : ι → ℝ≥0} (h : ∀ b ∈ s, ‖f b‖₊ ≤ n b) :
    ‖∏ b ∈ s, f b‖₊ ≤ ∑ b ∈ s, n b

{ι : Type u_4}
{E : Type u_6}
[SeminormedCommGroup E]
(s : Finset ι)
{f : ι → E}
{n : ι → ℝ≥0}
(h : ∀ b ∈ s, ‖f b‖₊ ≤ n b)


theorem UpperSemicontinuous.measurable [TopologicalSpace δ] [OpensMeasurableSpace δ] {f : δ → α}
    (hf : UpperSemicontinuous f) : Measurable f

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[MeasurableSpace δ]
[LinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
[TopologicalSpace δ]
[OpensMeasurableSpace δ]
{f : δ → α}
(hf : UpperSemicontinuous f)


@[simp]
theorem coe_reverse (l : List α) : (reverse l : Multiset α) = l


/-- If a set `t` is eventually covered by a countable family of sets, all with cardinality at
most `a`, then the cardinality of `t` is also bounded by `a`. -/
lemma mk_subtype_le_of_countable_eventually_mem {α : Type u} {ι : Type v} {a : Cardinal}
    [Countable ι] {f : ι → Set α} {l : Filter ι} [NeBot l]
    {t : Set α} (ht : ∀ x ∈ t, ∀ᶠ i in l, x ∈ f i)
    (h'f : ∀ i, #(f i) ≤ a) : #t ≤ a

(ht : ∀ x ∈ t, ∀ᶠ (i : ι) in l, x ∈ f i)


/-- A permutation `σ` equals `sort f` if and only if `f ∘ σ` is monotone and whenever `i < j`
and `f (σ i) = f (σ j)`, then `σ i < σ j`. This means that `sort f` is the lexicographically
smallest permutation `σ` such that `f ∘ σ` is monotone. -/
theorem eq_sort_iff :
    σ = sort f ↔ Monotone (f ∘ σ) ∧ ∀ i j, i < j → f (σ i) = f (σ j) → σ i < σ j

{n : ℕ}
{α : Type u_1}
[LinearOrder α]
{f : Fin n → α}
{σ : Equiv.Perm (Fin n)}

σ = Tuple.sort f ↔ Monotone (f ∘ ⇑σ) ∧ ∀ (i j : Fin n), i < j → f (σ i) = f (σ j) → σ i < σ j


/-- The first two terms of the taylor expansion of `det (1 + r • M)` at `r = 0`. -/
lemma det_one_add_smul (r : R) (M : Matrix n n R) :
    det (1 + r • M) =
      1 + trace M * r + (det (1 + (X : R[X]) • M.map C)).divX.divX.eval r * r ^ 2

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
(r : R)
(M : Matrix n n R)

(1 + r • M).det = 1 + M.trace * r + Polynomial.eval r (1 + Polynomial.X • M.map ⇑Polynomial.C).det.divX.divX * r ^ 2


/-- Avoid in favor of `Nat.factorial_mul_ascFactorial` if you can. ℕ-division isn't worth it. -/
theorem ascFactorial_eq_div (n k : ℕ) : (n + 1).ascFactorial k = (n + k)! / n !

(n + 1).ascFactorial k = (n + k).factorial / n.factorial


theorem unop_iInf (S : ι → Subalgebra R Aᵐᵒᵖ) : (iInf S).unop = ⨅ i, (S i).unop

{ι : Sort u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : ι → Subalgebra R Aᵐᵒᵖ)


/-- The distance between two functions is controlled by the supremum of the pointwise distances. -/
theorem dist_le (C0 : (0 : ℝ) ≤ C) : dist f g ≤ C ↔ ∀ x : α, dist (f x) (g x) ≤ C

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[CompactSpace α]
[MetricSpace β]
{f g : C(α, β)}
{C : ℝ}
(C0 : 0 ≤ C)

dist f g ≤ C ↔ ∀ (x : α), dist (f x) (g x) ≤ C


@[simp] theorem pointwise_vadd_bot (v : V) : v +ᵥ (⊥ : AffineSubspace k P) = ⊥

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


/-- An infinite sum of functions with summable sup norm is the uniform limit of its partial sums.
Version relative to a set, with general index set. -/
theorem tendstoUniformlyOn_tsum {f : α → β → F} (hu : Summable u) {s : Set β}
    (hfu : ∀ n x, x ∈ s → ‖f n x‖ ≤ u n) :
    TendstoUniformlyOn (fun t : Finset α => fun x => ∑ n ∈ t, f n x) (fun x => ∑' n, f n x) atTop
      s

(hfu : ∀ (n : α), ∀ x ∈ s, ‖f n x‖ ≤ u n)

TendstoUniformlyOn (fun t x => ∑ n ∈ t, f n x) (fun x => ∑' (n : α), f n x) Filter.atTop s


theorem isInt_dvd_true : {a b : ℤ} → {a' b' c : ℤ} →
    IsInt a a' → IsInt b b' → Int.mul a' c = b' → a ∣ b

Mathlib.Meta.NormNum.IsInt a a' → Mathlib.Meta.NormNum.IsInt b b' → a'.mul c = b' → a ∣ b


@[simp]
theorem ker_coeSubmodule : (f.ker : Submodule R M) = LinearMap.ker (f : M →ₗ[R] N)

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


@[to_additive]
theorem prod_Ioc_succ_top {a b : ℕ} (hab : a ≤ b) (f : ℕ → M) :
    (∏ k ∈ Ioc a (b + 1), f k) = (∏ k ∈ Ioc a b, f k) * f (b + 1)

{M : Type u_2}
[AddCommMonoid M]
{a b : ℕ}
(hab : a ≤ b)
(f : ℕ → M)

∑ k ∈ Finset.Ioc a (b + 1), f k = ∑ k ∈ Finset.Ioc a b, f k + f (b + 1)


theorem prod_top (s : NonUnitalSubsemiring R) :
    s.prod (⊤ : NonUnitalSubsemiring S) = s.comap (NonUnitalRingHom.fst R S)

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(s : NonUnitalSubsemiring R)

s.prod ⊤ = NonUnitalSubsemiring.comap (NonUnitalRingHom.fst R S) s


theorem le_powerlt {b c : Cardinal.{u}} (a) (h : c < b) : (a^c) ≤ a ^< b

{b c : Cardinal.{u}}
(a : Cardinal.{u})
(h : c < b)


theorem le_of_le_mul_of_le_one_of_nonneg_left [PosMulMono α] (h : a ≤ b * c) (hc : c ≤ 1)
    (hb : 0 ≤ b) : a ≤ b

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : a ≤ b * c)
(hc : c ≤ 1)
(hb : 0 ≤ b)


theorem coe_join :
    ∀ L : List (List α), join (L.map ((↑) : List α → Multiset α) : Multiset (Multiset α)) = L.join

(↑(List.map Multiset.ofList L)).join = ↑L.join


@[simp]
theorem classToCong_empty : classToCong ∅ = ∅


theorem lt_of_testBit {n m : ℕ} (i : ℕ) (hn : testBit n i = false) (hm : testBit m i = true)
    (hnm : ∀ j, i < j → testBit n j = testBit m j) : n < m

(hnm : ∀ (j : ℕ), i < j → n.testBit j = m.testBit j)


/-- If a function `f` is continuous on a convex set `D ⊆ ℝ`, is twice differentiable on its
interior, and `f''` is nonnegative on the interior, then `f` is convex on `D`. -/
theorem convexOn_of_deriv2_nonneg {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ} (hf : ContinuousOn f D)
    (hf' : DifferentiableOn ℝ f (interior D)) (hf'' : DifferentiableOn ℝ (deriv f) (interior D))
    (hf''_nonneg : ∀ x ∈ interior D, 0 ≤ deriv^[2] f x) : ConvexOn ℝ D f


lemma truncatedInf_sups_of_not_mem (ha : a ∉ upperClosure s ⊔ upperClosure t) :
    truncatedInf (s ⊻ t) a = ⊥

(ha : a ∉ upperClosure ↑s ⊔ upperClosure ↑t)


@[to_additive MeasureTheory.IsAddFundamentalDomain.measure_addFundamentalFrontier]
theorem measure_fundamentalFrontier : μ (fundamentalFrontier G s) = 0

(hs : MeasureTheory.IsAddFundamentalDomain G s μ)

μ (MeasureTheory.addFundamentalFrontier G s) = 0


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

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

(CategoryTheory.Square.fromArrowArrowFunctor'.obj f).X₂ = f.left.right


theorem root_or_root_of_root_mul (h : IsRoot (p * q) a) : IsRoot p a ∨ IsRoot q a

{R : Type u}
{a : R}
[CommSemiring R]
[NoZeroDivisors R]
{p q : R[X]}
(h : (p * q).IsRoot a)


protected theorem add_sub_cancel_right (n m : Nat) : (n + m) - m = n


/-- The assignment `x ↦ diracProba x` is injective if all singletons are measurable. -/
lemma injective_diracProba {X : Type*} [MeasurableSpace X] [MeasurableSpace.SeparatesPoints X] :
    Function.Injective (fun (x : X) ↦ diracProba x)

{X : Type u_2}
[MeasurableSpace X]
[MeasurableSpace.SeparatesPoints X]

Function.Injective fun x => MeasureTheory.diracProba x


lemma mapBifunctorShift₁Iso_trans_mapBifunctorShift₂Iso :
    mapBifunctorShift₁Iso K₁ (K₂⟦y⟧) F x ≪≫
      (CategoryTheory.shiftFunctor _ x).mapIso (mapBifunctorShift₂Iso K₁ K₂ F y) =
      (x * y).negOnePow • (mapBifunctorShift₂Iso (K₁⟦x⟧) K₂ F y ≪≫
        (CategoryTheory.shiftFunctor _ y).mapIso (mapBifunctorShift₁Iso K₁ K₂ F x) ≪≫
          (shiftFunctorComm (CochainComplex D ℤ) x y).app _)

{C₁ : Type u_1}
{C₂ : Type u_2}
{D : Type u_3}
[CategoryTheory.Category.{u_5, u_1} C₁]
[CategoryTheory.Category.{u_6, u_2} C₂]
[CategoryTheory.Category.{u_4, u_3} D]
[CategoryTheory.Preadditive C₁]
[CategoryTheory.Preadditive C₂]
[CategoryTheory.Preadditive D]
(K₁ : CochainComplex C₁ ℤ)
(K₂ : CochainComplex C₂ ℤ)
(F : C₁ ⥤ C₂ ⥤ D)
[F.Additive]
[∀ (X₁ : C₁), (F.obj X₁).Additive]
(x y : ℤ)
[K₁.HasMapBifunctor K₂ F]

K₁.mapBifunctorShift₁Iso ((CategoryTheory.shiftFunctor (CochainComplex C₂ ℤ) y).obj K₂) F x ≪≫
    (CategoryTheory.shiftFunctor (CochainComplex D ℤ) x).mapIso (K₁.mapBifunctorShift₂Iso K₂ F y) =
  (x * y).negOnePow •
    ((CategoryTheory.shiftFunctor (CochainComplex C₁ ℤ) x).obj K₁).mapBifunctorShift₂Iso K₂ F y ≪≫
      (CategoryTheory.shiftFunctor (CochainComplex D ℤ) y).mapIso (K₁.mapBifunctorShift₁Iso K₂ F x) ≪≫
        (CategoryTheory.shiftFunctorComm (CochainComplex D ℤ) x y).app (K₁.mapBifunctor K₂ F)


nonrec theorem two_lt_card_iff : 2 < card α ↔ ∃ a b c : α, a ≠ b ∧ a ≠ c ∧ b ≠ c

2 < Fintype.card α ↔ ∃ a b c, a ≠ b ∧ a ≠ c ∧ b ≠ c


@[to_additive (attr := simp)]
theorem op_comp_unop : (op : α → αᵐᵒᵖ) ∘ unop = id


lemma dvd_sub' (h₁ : k ∣ m) (h₂ : k ∣ n) : k ∣ m - n


/-- A semiring is local if it is nontrivial and the set of nonunits is closed under the addition. -/
theorem of_nonunits_add [Nontrivial R]
    (h : ∀ a b : R, a ∈ nonunits R → b ∈ nonunits R → a + b ∈ nonunits R) : LocalRing R

(h : ∀ (a b : R), a ∈ nonunits R → b ∈ nonunits R → a + b ∈ nonunits R)


lemma truncatedInf_sups (hs : a ∈ upperClosure s) (ht : a ∈ upperClosure t) :
    truncatedInf (s ⊻ t) a = truncatedInf s a ⊔ truncatedInf t a

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
[DecidableEq α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s t : Finset α}
{a : α}
(hs : a ∈ upperClosure ↑s)
(ht : a ∈ upperClosure ↑t)

(s ⊻ t).truncatedInf a = s.truncatedInf a ⊔ t.truncatedInf a


@[simp, reassoc]
theorem ev_coev : Limits.prod.map (𝟙 A) ((coev A).app B) ≫ (ev A).app (A ⨯ B) = 𝟙 (A ⨯ B)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.id A) ((CategoryTheory.exp.coev A).app B))
    ((CategoryTheory.exp.ev A).app (A ⨯ B)) =
  CategoryTheory.CategoryStruct.id (A ⨯ B)


@[simp]
theorem lift_self (z : ℤ_[p]) : @lift p _ ℤ_[p] _ toZModPow zmod_cast_comp_toZModPow z = z

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


theorem sSup_unit_ball_eq_norm {𝕜 𝕜₂ E F : Type*} [NormedAddCommGroup E] [SeminormedAddCommGroup F]
    [DenselyNormedField 𝕜] [NontriviallyNormedField 𝕜₂] {σ₁₂ : 𝕜 →+* 𝕜₂} [NormedSpace 𝕜 E]
    [NormedSpace 𝕜₂ F] [RingHomIsometric σ₁₂] (f : E →SL[σ₁₂] F) :
    sSup ((fun x => ‖f x‖) '' ball 0 1) = ‖f‖

{𝕜 : Type u_11}
{𝕜₂ : Type u_12}
{E : Type u_13}
{F : Type u_14}
[NormedAddCommGroup E]
[SeminormedAddCommGroup F]
[DenselyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)

sSup ((fun x => ‖f x‖) '' Metric.ball 0 1) = ‖f‖


theorem beth_pos (o : Ordinal) : 0 < beth o


theorem mem_nhds_right (y : α) {s : Set (α × α)} (h : s ∈ 𝓤 α) : { x : α | (x, y) ∈ s } ∈ 𝓝 y

{α : Type ua}
[UniformSpace α]
(y : α)
{s : Set (α × α)}
(h : s ∈ 𝓤 α)


/-- Orthogonality of characters for irreducible representations of finite group over an
algebraically closed field whose characteristic doesn't divide the order of the group. -/
theorem char_orthonormal (V W : FDRep k G) [Simple V] [Simple W] :
    ⅟ (Fintype.card G : k) • ∑ g : G, V.character g * W.character g⁻¹ =
      if Nonempty (V ≅ W) then ↑1 else ↑0

{k : Type u}
[Field k]
{G : Grp}
[IsAlgClosed k]
[Fintype ↑G]
[Invertible ↑(Fintype.card ↑G)]
(V W : FDRep k ↑G)
[CategoryTheory.Simple V]
[CategoryTheory.Simple W]

⅟↑(Fintype.card ↑G) • ∑ g : ↑G, V.character g * W.character g⁻¹ = if Nonempty (V ≅ W) then 1 else 0


theorem withDensity_rnDeriv_le (μ ν : Measure α) : ν.withDensity (μ.rnDeriv ν) ≤ μ

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


@[to_additive]
theorem smooth_finprod_cond (hc : ∀ i, p i → Smooth I' I (f i))
    (hf : LocallyFinite fun i => mulSupport (f i)) :
    Smooth I' I fun x => ∏ᶠ (i) (_ : p i), f i x

(hc : ∀ (i : ι), p i → Smooth I' I (f i))

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

Smooth I' I fun x => ∑ᶠ (i : ι) (_ : p i), f i x


theorem tan_add_pi (x : ℂ) : tan (x + π) = tan x

Complex.tan (x + ↑Real.pi) = Complex.tan x


@[simp]
theorem get_one_right {a : α} (ha : Finite a 1) : get (multiplicity a 1) ha = 0

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a : α}
(ha : multiplicity.Finite a 1)


/-- The equivalence `(X ⟶ Y) ≃ (F.obj X ⟶ F.obj Y)` given by `h : F.FullyFaithful`. -/
@[simps]
def homEquiv {X Y : C} : (X ⟶ Y) ≃ (F.obj X ⟶ F.obj Y)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
(hF : F.FullyFaithful)
{X Y : C}


theorem span_smul_le (s : Set M) (r : R) : span R (r • s) ≤ span R s

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

Submodule.span R (r • s) ≤ Submodule.span R s


@[to_additive]
theorem Finite.smul_set : s.Finite → (a • s).Finite

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s : Set β}
{a : α}


@[simp]
theorem dualTensorHom_apply (f : Module.Dual R M) (m : M) (n : N) :
    dualTensorHom R M N (f ⊗ₜ n) m = f m • n

{R : Type u}
{M : Type v₁}
{N : Type v₂}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : Module.Dual R M)
(m : M)
(n : N)

((dualTensorHom R M N) (f ⊗ₜ[R] n)) m = f m • n


/-- The functor `Karoubi (HomologicalComplex C c) ⥤ HomologicalComplex (Karoubi C) c`,
on objects. -/
@[simps]
def obj (P : Karoubi (HomologicalComplex C c)) : HomologicalComplex (Karoubi C) c

(P : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C c))

((CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Functor.obj P).X n).X = P.X.X n


theorem cosh_sub : cosh (x - y) = cosh x * cosh y - sinh x * sinh y

Complex.cosh (x - y) = Complex.cosh x * Complex.cosh y - Complex.sinh x * Complex.sinh y


@[simp]
theorem blockDiagonal_add [AddZeroClass α] (M N : o → Matrix m n α) :
    blockDiagonal (M + N) = blockDiagonal M + blockDiagonal N

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[DecidableEq o]
[AddZeroClass α]
(M N : o → Matrix m n α)

Matrix.blockDiagonal (M + N) = Matrix.blockDiagonal M + Matrix.blockDiagonal N


/-- If the codomain of an injective continuous function is a Hausdorff space, then so is its
domain. -/
theorem T2Space.of_injective_continuous [TopologicalSpace Y] [T2Space Y] {f : X → Y}
    (hinj : Injective f) (hc : Continuous f) : T2Space X

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[T2Space Y]
{f : X → Y}
(hinj : Function.Injective f)
(hc : Continuous f)


@[simp]
theorem coe_ne_bot : (a : WithBot α) ≠ ⊥


theorem _root_.MeasureTheory.AEStronglyMeasurable.integral_kernel_compProd [NormedSpace ℝ E]
    ⦃f : β × γ → E⦄ (hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)) :
    AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂η (a, x)) (κ a)

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

⦃f : β × γ → E⦄

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

MeasureTheory.AEStronglyMeasurable (fun x => ∫ (y : γ), f (x, y) ∂η (a, x)) (κ a)


@[deprecated map_zero (since := "2024-06-20")]
protected theorem map_zero : e 0 = 0

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


theorem cprank_upper_bound [Ring α] : ∀ {ds}, ∀ x : Holor α ds, cprank x ≤ ds.prod

{α : Type}
[Ring α]
{ds : List ℕ}
(x : Holor α ds)


theorem monovary_comm : Monovary f g ↔ Monovary g f

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[LinearOrder α]
[LinearOrder β]
{f : ι → α}
{g : ι → β}


theorem Submonoid.toAddSubmonoid_closure (S : Set M) :
    Submonoid.toAddSubmonoid (Submonoid.closure S)
      = AddSubmonoid.closure (Additive.toMul ⁻¹' S)

{M : Type u_1}
[MulOneClass M]
(S : Set M)

Submonoid.toAddSubmonoid (Submonoid.closure S) = AddSubmonoid.closure (⇑Additive.toMul ⁻¹' S)


theorem differentiableOn_euclidean :
    DifferentiableOn 𝕜 f t ↔ ∀ i, DifferentiableOn 𝕜 (fun x => f x i) t

{𝕜 : Type u_1}
{ι : Type u_2}
{H : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
[Fintype ι]
{f : H → EuclideanSpace 𝕜 ι}
{t : Set H}

DifferentiableOn 𝕜 f t ↔ ∀ (i : ι), DifferentiableOn 𝕜 (fun x => f x i) t


/-- A homeomorphism is a local homeomorphism. -/
lemma Homeomorph.isLocalHomeomorph (h : X ≃ₜ Y) : IsLocalHomeomorph h

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)


theorem submodule_map_involute_eq_comap (p : Submodule R (CliffordAlgebra Q)) :
    p.map (involute : CliffordAlgebra Q →ₐ[R] CliffordAlgebra Q).toLinearMap =
      p.comap (involute : CliffordAlgebra Q →ₐ[R] CliffordAlgebra Q).toLinearMap

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(p : Submodule R (CliffordAlgebra Q))

Submodule.map CliffordAlgebra.involute.toLinearMap p = Submodule.comap CliffordAlgebra.involute.toLinearMap p


/-- Main statement of the Nullstellensatz -/
@[simp]
theorem vanishingIdeal_zeroLocus_eq_radical (I : Ideal (MvPolynomial σ k)) :
    vanishingIdeal (zeroLocus I) = I.radical

{k : Type u_1}
[Field k]
{σ : Type u_2}
[IsAlgClosed k]
[Finite σ]
(I : Ideal (MvPolynomial σ k))

MvPolynomial.vanishingIdeal (MvPolynomial.zeroLocus I) = I.radical


/-- A filter `F` is prime if its complement is an ideal.
-/
@[mk_iff]
class IsPrime (F : PFilter P) : Prop where
  compl_ideal : IsIdeal (F : Set P)ᶜ

{P : Type u_1}
[Preorder P]
{F : Order.PFilter P}
[self : F.IsPrime]


theorem symmDiff_symmDiff_left :
    a ∆ b ∆ c = a \ (b ⊔ c) ⊔ b \ (a ⊔ c) ⊔ c \ (a ⊔ b) ⊔ a ⊓ b ⊓ c

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


theorem continuous_sInf_dom {t₁ : Set (TopologicalSpace α)} {t₂ : TopologicalSpace β}
    {t : TopologicalSpace α} (h₁ : t ∈ t₁) :
    Continuous[t, t₂] f → Continuous[sInf t₁, t₂] f

{α : Type u}
{β : Type v}
{f : α → β}
{t₁ : Set (TopologicalSpace α)}
{t₂ : TopologicalSpace β}
{t : TopologicalSpace α}
(h₁ : t ∈ t₁)


@[simp] lemma compls_union (s t : Finset α) : (s ∪ t)ᶜˢ = sᶜˢ ∪ tᶜˢ

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


lemma of_iso (h : IsPullback fst snd f g)
    {P' X' Y' Z' : C} {fst' : P' ⟶ X'} {snd' : P' ⟶ Y'} {f' : X' ⟶ Z'} {g' : Y' ⟶ Z'}
    (e₁ : P ≅ P') (e₂ : X ≅ X') (e₃ : Y ≅ Y') (e₄ : Z ≅ Z')
    (commfst : fst ≫ e₂.hom = e₁.hom ≫ fst')
    (commsnd : snd ≫ e₃.hom = e₁.hom ≫ snd')
    (commf : f ≫ e₄.hom = e₂.hom ≫ f')
    (commg : g ≫ e₄.hom = e₃.hom ≫ g') :
    IsPullback fst' snd' f' g'

(h : CategoryTheory.IsPullback fst snd f g)

CategoryTheory.IsPullback fst' snd' f' g'


theorem coe_stream'_rat_eq :
    ((IntFractPair.stream q).map (Option.map (mapFr (↑))) : Stream' <| Option <| IntFractPair K) =
      IntFractPair.stream v

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
{v : K}
{q : ℚ}
(v_eq_q : v = ↑q)

Stream'.map (Option.map (GenContFract.IntFractPair.mapFr Rat.cast)) (GenContFract.IntFractPair.stream q) =
  GenContFract.IntFractPair.stream v


theorem integrableOn_congr_fun (hst : EqOn f g s) (hs : MeasurableSet s) :
    IntegrableOn f s μ ↔ IntegrableOn g s μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f g : α → E}
{s : Set α}
{μ : MeasureTheory.Measure α}
(hst : Set.EqOn f g s)
(hs : MeasurableSet s)

MeasureTheory.IntegrableOn f s μ ↔ MeasureTheory.IntegrableOn g s μ


@[simp]
theorem sumEmpty_apply_inl [IsEmpty β] (a : α) : sumEmpty α β (Sum.inl a) = a

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


@[to_additive]
theorem prod_finprod_comm (s : Finset α) (f : α → β → M) (h : ∀ a ∈ s, (mulSupport (f a)).Finite) :
    (∏ a ∈ s, ∏ᶠ b : β, f a b) = ∏ᶠ b : β, ∏ a ∈ s, f a b

(h : ∀ a ∈ s, (Function.support (f a)).Finite)

∑ a ∈ s, ∑ᶠ (b : β), f a b = ∑ᶠ (b : β), ∑ a ∈ s, f a b


theorem lineMap_lt_right_iff_lt (h : r < 1) : lineMap a b r < b ↔ a < b

{k : Type u_1}
{E : Type u_2}
[OrderedRing k]
[OrderedAddCommGroup E]
[Module k E]
[OrderedSMul k E]
{a b : E}
{r : k}
(h : r < 1)


@[simp]
theorem self_sub_toIocDiv_zsmul (a b : α) : b - toIocDiv hp a b • p = toIocMod hp a b

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


theorem isGreatest_Icc (h : a ≤ b) : IsGreatest (Icc a b) b

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


theorem dualBasis_apply_self (i j : ι) : b.dualBasis i (b j) =
    if j = i then 1 else 0

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommRing R]
[AddCommGroup M]
[Module R M]
[DecidableEq ι]
(b : Basis ι R M)
[Finite ι]
(i j : ι)

(b.dualBasis i) (b j) = if j = i then 1 else 0


/-- A variant of `cofinal_of_colimit_comp_coyoneda_iso_pUnit` where we bind the various claims
    about `colimit (F ⋙ coyoneda.obj (Opposite.op d))` for each `d : D` into a single claim about
    the presheaf `colimit (F ⋙ yoneda)`. -/
theorem cofinal_of_isTerminal_colimit_comp_yoneda
    (h : IsTerminal (colimit (F ⋙ yoneda))) : Final F

(h : CategoryTheory.Limits.IsTerminal (CategoryTheory.Limits.colimit (F.comp CategoryTheory.yoneda)))


@[to_additive] lemma smul_def [Monoid M] [SMul M α] (m : Mˣ) (a : α) : m • a = (m : M) • a

{M : Type u_3}
{α : Type u_5}
[Monoid M]
[SMul M α]
(m : Mˣ)
(a : α)


/-- Tailored version for odd Jacobi theta functions. -/
lemma hasSum_mellin_pi_mul_sq' {a : ι → ℂ} {r : ι → ℝ} {F : ℝ → ℂ} {s : ℂ} (hs : 0 < s.re)
    (hF : ∀ t ∈ Ioi 0, HasSum (fun i ↦ a i * r i * rexp (-π * r i ^ 2 * t)) (F t))
    (h_sum : Summable fun i ↦ ‖a i‖ / |r i| ^ s.re) :
    HasSum (fun i ↦ Gammaℝ (s + 1) * a i * SignType.sign (r i) / |r i| ^ s)
    (mellin F ((s + 1) / 2))

(hF : ∀ t ∈ Set.Ioi 0, HasSum (fun i => a i * ↑(r i) * ↑(rexp (-π * r i ^ 2 * t))) (F t))

(h_sum : Summable fun i => ‖a i‖ / |r i| ^ s.re)

HasSum (fun i => (s + 1).Gammaℝ * a i * ↑(SignType.sign (r i)) / ↑|r i| ^ s) (mellin F ((s + 1) / 2))


lemma tendsto_stieltjesOfMeasurableRat_atTop (hf : Measurable f) (a : α) :
    Tendsto (stieltjesOfMeasurableRat f hf a) atTop (𝓝 1)

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℚ → ℝ}
(hf : Measurable f)
(a : α)

Filter.Tendsto (↑(ProbabilityTheory.stieltjesOfMeasurableRat f hf a)) Filter.atTop (𝓝 1)


@[simp]
theorem iterate_derivative_one {k} (h : 0 < k) : derivative^[k] (1 : R[X]) = 0

{R : Type u}
[Semiring R]
{k : ℕ}
(h : 0 < k)


theorem succFn_spec (i : ι) : IsGLB (Set.Ioi i) (succFn i)

IsGLB (Set.Ioi i) (LinearLocallyFiniteOrder.succFn i)


@[simp]
theorem max_eq_top [OrderTop α] {a b : α} : max a b = ⊤ ↔ a = ⊤ ∨ b = ⊤

{α : Type u}
[LinearOrder α]
[OrderTop α]
{a b : α}


lemma IsClique.insert (hs : G.IsClique s) (h : ∀ b ∈ s, a ≠ b → G.Adj a b) :
    G.IsClique (insert a s)

{α : Type u_1}
{G : SimpleGraph α}
{s : Set α}
{a : α}
(hs : G.IsClique s)
(h : ∀ b ∈ s, a ≠ b → G.Adj a b)


theorem iInf_add : iInf f + a = ⨅ i, f i + a

{ι : Sort u_1}
{f : ι → ℝ≥0∞}
{a : ℝ≥0∞}


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

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

{x} * Metric.closedBall 1 δ = Metric.closedBall x δ


theorem map_ne {x y : E} (h : x ≠ y) : e x ≠ e y

{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₂]
(e : E ≃ₛₗᵢ[σ₁₂] E₂)
{x y : E}
(h : x ≠ y)


theorem mem_closure_range_iff {e : β → α} {a : α} :
    a ∈ closure (range e) ↔ ∀ ε > 0, ∃ k : β, dist a (e k) < ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
{e : β → α}
{a : α}

a ∈ closure (Set.range e) ↔ ∀ ε > 0, ∃ k, dist a (e k) < ε


theorem contMDiffOn_univ : ContMDiffOn I I' n f univ ↔ ContMDiff I I' n f

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

ContMDiffOn I I' n f Set.univ ↔ ContMDiff I I' n f


theorem hasDerivAtFilter_iff_isLittleO :
    HasDerivAtFilter f f' x L ↔ (fun x' : 𝕜 => f x' - f x - (x' - x) • f') =o[L] fun x' => x' - x

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

HasDerivAtFilter f f' x L ↔ (fun x' => f x' - f x - (x' - x) • f') =o[L] fun x' => x' - x


/-- If `f` is continuous and `F` is path-connected, so is `f(F)`. -/
theorem IsPathConnected.image (hF : IsPathConnected F) {f : X → Y}
    (hf : Continuous f) : IsPathConnected (f '' F)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{F : Set X}
(hF : IsPathConnected F)
{f : X → Y}
(hf : Continuous f)


@[simp]
theorem image_const_sub_Icc : (fun x => a - x) '' Icc b c = Icc (a - c) (a - b)

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

(fun x => a - x) '' Set.Icc b c = Set.Icc (a - c) (a - b)


private theorem left_distrib_aux (n : ℕ) : ∀ a b c : Fin n, a * (b + c) = a * b + a * c


/-- Reinterpret a compact open as an open. -/
@[simps]
def toOpens (s : CompactOpens α) : Opens α

{α : Type u_1}
[TopologicalSpace α]
(s : TopologicalSpace.CompactOpens α)


/-- If `s ≤ t`, then we can view `s` as a submodule of `t` by taking the comap
of `t.subtype`. -/
@[simps symm_apply]
def comapSubtypeEquivOfLe {p q : Submodule R M} (hpq : p ≤ q) : comap q.subtype p ≃ₗ[R] p

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p q : Submodule R M}
(hpq : p ≤ q)
(x : ↥p)

(Submodule.comapSubtypeEquivOfLe hpq).symm x = ⟨⟨↑x, ⋯⟩, ⋯⟩


/-- The Roth number is a subadditive function. Note that by Fekete's lemma this shows that
the limit `rothNumberNat N / N` exists, but Roth's theorem gives the stronger result that this
limit is actually `0`. -/
theorem rothNumberNat_add_le (M N : ℕ) :
    rothNumberNat (M + N) ≤ rothNumberNat M + rothNumberNat N


theorem congr_trans (f₁ : M ≃ₗ[A] P) (f₂ : P ≃ₗ[A] P') (g₁ : N ≃ₗ[R] Q) (g₂ : Q ≃ₗ[R] Q') :
    congr (f₁.trans f₂) (g₁.trans g₂) = (congr f₁ g₁).trans (congr f₂ g₂)

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
{P : Type uP}
{Q : Type uQ}
{P' : Type uP'}
{Q' : Type uQ'}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]
[AddCommMonoid Q]
[Module R Q]
[AddCommMonoid P']
[Module R P']
[Module A P']
[IsScalarTower R A P']
[AddCommMonoid Q']
[Module R Q']
(f₁ : M ≃ₗ[A] P)
(f₂ : P ≃ₗ[A] P')
(g₁ : N ≃ₗ[R] Q)
(g₂ : Q ≃ₗ[R] Q')

TensorProduct.AlgebraTensorModule.congr (f₁ ≪≫ₗ f₂) (g₁ ≪≫ₗ g₂) =
  TensorProduct.AlgebraTensorModule.congr f₁ g₁ ≪≫ₗ TensorProduct.AlgebraTensorModule.congr f₂ g₂


/-- A lax monoidal functor is a functor `F : C ⥤ D` between monoidal categories,
equipped with morphisms `ε : 𝟙 _D ⟶ F.obj (𝟙_ C)` and `μ X Y : F.obj X ⊗ F.obj Y ⟶ F.obj (X ⊗ Y)`,
satisfying the appropriate coherences. -/
structure LaxMonoidalFunctor extends C ⥤ D where
  /-- unit morphism -/
  ε : 𝟙_ D ⟶ obj (𝟙_ C)
  /-- tensorator -/
  μ : ∀ X Y : C, obj X ⊗ obj Y ⟶ obj (X ⊗ Y)
  μ_natural_left :
    ∀ {X Y : C} (f : X ⟶ Y) (X' : C),
      map f ▷ obj X' ≫ μ Y X' = μ X X' ≫ map (f ▷ X') := by
    aesop_cat
  μ_natural_right :
    ∀ {X Y : C} (X' : C) (f : X ⟶ Y) ,
      obj X' ◁ map f ≫ μ X' Y = μ X' X ≫ map (X' ◁ f) := by
    aesop_cat
  /-- associativity of the tensorator -/
  associativity :
    ∀ X Y Z : C,
      μ X Y ▷ obj Z ≫ μ (X ⊗ Y) Z ≫ map (α_ X Y Z).hom =
        (α_ (obj X) (obj Y) (obj Z)).hom ≫ obj X ◁ μ Y Z ≫ μ X (Y ⊗ Z) := by
    aesop_cat
  -- unitality
  left_unitality : ∀ X : C, (λ_ (obj X)).hom = ε ▷ obj X ≫ μ (𝟙_ C) X ≫ map (λ_ X).hom := by
    aesop_cat
  right_unitality : ∀ X : C, (ρ_ (obj X)).hom = obj X ◁ ε ≫ μ X (𝟙_ C) ≫ map (ρ_ X).hom := by
    aesop_cat

(self : CategoryTheory.LaxMonoidalFunctor C D)

CategoryTheory.MonoidalCategory.whiskerLeft (self.obj X') (self.map f) ≫ self.μ X' Y =
  self.μ X' X ≫ self.map (CategoryTheory.MonoidalCategory.whiskerLeft X' f)


nonrec theorem of_comp_finiteType (f : A →ₐ[R] B) {g : B →ₐ[R] C}
    (h : (g.comp f).FinitePresentation) (h' : f.FiniteType) : g.FinitePresentation

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommRing R]
[CommRing A]
[CommRing B]
[CommRing C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
(f : A →ₐ[R] B)
{g : B →ₐ[R] C}
(h : (g.comp f).FinitePresentation)
(h' : f.FiniteType)


theorem Decidable.imp_iff_or_not [Decidable b] : b → a ↔ a ∨ ¬b

b → a ↔ a ∨ ¬b


theorem zero_pow_eventuallyEq [MonoidWithZero α] :
    (fun n : ℕ => (0 : α) ^ n) =ᶠ[atTop] fun _ => 0

(fun n => 0 ^ n) =ᶠ[Filter.atTop] fun x => 0


theorem biSup_add_biSup_le' {ι ι'} {p : ι → Prop} {q : ι' → Prop} (hp : ∃ i, p i) (hq : ∃ j, q j)
    {f : ι → ℝ≥0∞} {g : ι' → ℝ≥0∞} {a : ℝ≥0∞} (h : ∀ i, p i → ∀ j, q j → f i + g j ≤ a) :
    ((⨆ (i) (_ : p i), f i) + ⨆ (j) (_ : q j), g j) ≤ a

{f : ι → ℝ≥0∞}

(h : ∀ (i : ι), p i → ∀ (j : ι'), q j → f i + g j ≤ a)

(⨆ i, ⨆ (_ : p i), f i) + ⨆ j, ⨆ (_ : q j), g j ≤ a


@[simp]
theorem toDFA_correct : M.toDFA.accepts = M.accepts


@[simp] theorem emod_zero : ∀ a : Int, a % 0 = a


@[to_additive (attr := simp)]
protected theorem mul_cancel' {r₁ r₂ : R} {s t : S} :
    ((r₁ * s) /ₒ t) * (r₂ /ₒ s) = (r₁ * r₂) /ₒ t

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{r₁ r₂ : R}
{s t : ↥S}


private theorem int_floor_nonneg_of_pos [LinearOrderedRing α] [FloorRing α] {a : α}
    (ha : 0 < a) :
    0 ≤ ⌊a⌋

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


lemma inv_pow_sub_of_lt (a : G₀) (h : n < m) : a⁻¹ ^ (m - n) = (a ^ m)⁻¹ * a ^ n

{G₀ : Type u_3}
[GroupWithZero G₀]
{m n : ℕ}
(a : G₀)
(h : n < m)


/-- A single point is coplanar. -/
theorem coplanar_singleton (p : P) : Coplanar k ({p} : Set P)

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


/-- The inductive principle used to prove propositions about the elements of a quotient by a
    congruence relation. -/
@[to_additive (attr := elab_as_elim) "The inductive principle used to prove propositions about
the elements of a quotient by an additive congruence relation."]
protected theorem induction_on {C : c.Quotient → Prop} (q : c.Quotient) (H : ∀ x : M, C x) : C q

{M : Type u_1}
[Add M]
{c : AddCon M}
{C : c.Quotient → Prop}
(q : c.Quotient)
(H : ∀ (x : M), C ↑x)


lemma noZeroDivisors_iff_isDomain_or_subsingleton [Ring α] :
    NoZeroDivisors α ↔ IsDomain α ∨ Subsingleton α


lemma toCocycles_comp_isoOneCocycles_hom :
    toCocycles A 0 1 ≫ (isoOneCocycles A).hom =
      (zeroCochainsLequiv A).toModuleIso.hom ≫
        ModuleCat.ofHom (shortComplexH1 A).moduleCatToCycles

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

groupCohomology.toCocycles A 0 1 ≫ (groupCohomology.isoOneCocycles A).hom =
  (groupCohomology.zeroCochainsLequiv A).toModuleIso.hom ≫
    ModuleCat.ofHom (groupCohomology.shortComplexH1 A).moduleCatToCycles


@[to_additive]
protected theorem div [Group β] [TopologicalGroup β] (hu : ProgMeasurable f u)
    (hv : ProgMeasurable f v) : ProgMeasurable f fun i ω => u i ω / v i ω

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[TopologicalSpace β]
[Preorder ι]
{u v : ι → Ω → β}
{f : MeasureTheory.Filtration ι m}
[MeasurableSpace ι]
[AddGroup β]
[TopologicalAddGroup β]
(hu : MeasureTheory.ProgMeasurable f u)
(hv : MeasureTheory.ProgMeasurable f v)

MeasureTheory.ProgMeasurable f fun i ω => u i ω - v i ω


/-- **Riesz's theorem**: a locally compact normed vector space is finite-dimensional. -/
theorem FiniteDimensional.of_locallyCompactSpace [LocallyCompactSpace E] :
    FiniteDimensional 𝕜 E

(𝕜 : Type u)
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace 𝕜]
[LocallyCompactSpace E]


@[simp] theorem inf_top (s : Finset β) : (s.inf fun _ => ⊤) = (⊤ : α)

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[OrderTop α]
(s : Finset β)


theorem shiftLeftZeroExtend_eq {x : BitVec w} :
    shiftLeftZeroExtend x n = zeroExtend (w+n) x <<< n

x.shiftLeftZeroExtend n = BitVec.zeroExtend (w + n) x <<< n


lemma sup_nhds' [Sup L] [ContinuousSup L] (hf : Tendsto f l (𝓝 x)) (hg : Tendsto g l (𝓝 y)) :
    Tendsto (f ⊔ g) l (𝓝 (x ⊔ y))

{L : Type u_1}
[TopologicalSpace L]
{α : Type u_3}
{l : Filter α}
{f g : α → L}
{x y : L}
[Sup L]
[ContinuousSup L]
(hf : Filter.Tendsto f l (𝓝 x))
(hg : Filter.Tendsto g l (𝓝 y))


@[simp]
theorem comp_surjective (f : α → β) (e : F) : Function.Surjective (e ∘ f) ↔ Function.Surjective f

{F : Sort u_2}
{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
[iF : EquivLike F β γ]
(f : α → β)
(e : F)

Function.Surjective (⇑e ∘ f) ↔ Function.Surjective f


lemma modEq_list_prod_iff' {a b} {s : ι → ℕ} {l : List ι} (co : l.Pairwise (Coprime on s)) :
    a ≡ b [MOD (l.map s).prod] ↔ ∀ i ∈ l, a ≡ b [MOD s i]

(co : List.Pairwise (Nat.Coprime on s) l)

a ≡ b [MOD (List.map s l).prod] ↔ ∀ i ∈ l, a ≡ b [MOD s i]


theorem uIcc_eq :
    uIcc s t =
      (uIcc (toDFinsupp s) (toDFinsupp t)).map Multiset.equivDFinsupp.toEquiv.symm.toEmbedding

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

Finset.uIcc s t =
  Finset.map Multiset.equivDFinsupp.symm.toEmbedding (Finset.uIcc (Multiset.toDFinsupp s) (Multiset.toDFinsupp t))


@[simp]
theorem liftNatTrans_id (F : C ⥤ E) (F' : D ⥤ E) [h : Lifting L W F F'] :
    liftNatTrans L W F F F' F' (𝟙 F) = 𝟙 F'

[h : CategoryTheory.Localization.Lifting L W F F']

CategoryTheory.Localization.liftNatTrans L W F F F' F' (CategoryTheory.CategoryStruct.id F) =
  CategoryTheory.CategoryStruct.id F'


/-- A Jordan decomposition of a measurable space is a pair of mutually singular,
finite measures. -/
@[ext]
structure JordanDecomposition (α : Type*) [MeasurableSpace α] where
  (posPart negPart : Measure α)
  [posPart_finite : IsFiniteMeasure posPart]
  [negPart_finite : IsFiniteMeasure negPart]
  mutuallySingular : posPart ⟂ₘ negPart

(self : MeasureTheory.JordanDecomposition α)


theorem castSucc_lt_succ (i : Fin n) : Fin.castSucc i < i.succ


@[simp]
protected theorem inf_lt_iff : s.inf f < a ↔ ∃ b ∈ s, f b < a

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
[OrderTop α]
{s : Finset ι}
{f : ι → α}
{a : α}


@[simp]
lemma associator_inv_app_apply (K L M : SSet.{u}) {Δ : SimplexCategoryᵒᵖ}
    (x : (K ⊗ L ⊗ M).obj Δ) :
    (α_ K L M).inv.app Δ x = ⟨⟨x.1, x.2.1⟩, x.2.2⟩

(K L M : SSet)
{Δ : SimplexCategoryᵒᵖ}
(x : (K ⊗ L ⊗ M).obj Δ)


theorem nodup_periodicOrbit : (periodicOrbit f x).Nodup


/-- The free functor `Type u ⥤ ModuleCat R` sending a type `X` to the
free `R`-module with generators `x : X`, implemented as the type `X →₀ R`.
-/
@[simps]
def free : Type u ⥤ ModuleCat R

(ModuleCat.free R).obj X = ModuleCat.of R (X →₀ R)


theorem aecover_Ico_of_Ico (ha : Tendsto a l (𝓝 A)) (hb : Tendsto b l (𝓝 B)) :
    AECover (μ.restrict <| Ico A B) l fun i => Ico (a i) (b i)

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

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


@[simp]
theorem cmp_ofDual [LT α] [@DecidableRel α (· < ·)] (x y : αᵒᵈ) :
    cmp (ofDual x) (ofDual y) = cmp y x

{α : Type u_1}
[LT α]
[DecidableRel fun x x_1 => x < x_1]
(x y : αᵒᵈ)

cmp (OrderDual.ofDual x) (OrderDual.ofDual y) = cmp y x


/-- `smul` is a closed map in the second argument.

The lemma that `smul` is a closed map in the first argument (for a normed space over a complete
normed field) is `isClosedMap_smul_left` in `Analysis.Normed.Module.FiniteDimension`. -/
theorem isClosedMap_smul₀ {E : Type*} [Zero E] [MulActionWithZero G₀ E] [TopologicalSpace E]
    [T1Space E] [ContinuousConstSMul G₀ E] (c : G₀) : IsClosedMap fun x : E => c • x

{G₀ : Type u_4}
[GroupWithZero G₀]
{E : Type u_5}
[Zero E]
[MulActionWithZero G₀ E]
[TopologicalSpace E]
[T1Space E]
[ContinuousConstSMul G₀ E]
(c : G₀)


@[simp] lemma mapEmbedding_indep_iff {f : α ↪ β} {I : Set β} :
    (M.mapEmbedding f).Indep I ↔ M.Indep (f ⁻¹' I) ∧ I ⊆ range f

{α : Type u_1}
{β : Type u_2}
{M : Matroid α}
{f : α ↪ β}
{I : Set β}

(M.mapEmbedding f).Indep I ↔ M.Indep (⇑f ⁻¹' I) ∧ I ⊆ Set.range ⇑f


@[simp]
lemma openCover_affineOpenCover (X : Scheme.{u}) : X.affineOpenCover.openCover = X.affineCover


protected theorem one_mul' [NeZero n] (k : Fin n) : (1 : Fin n) * k = k


lemma differentiable_Gammaℝ_inv : Differentiable ℂ (fun s ↦ (Gammaℝ s)⁻¹)


/-- Restriction of partial equivs respects equivalence. -/
theorem EqOnSource.restr {e e' : PartialEquiv α β} (he : e ≈ e') (s : Set α) :
    e.restr s ≈ e'.restr s

{α : Type u_1}
{β : Type u_2}
{e e' : PartialEquiv α β}
(he : e ≈ e')
(s : Set α)


@[simp]
theorem coe_vaddConst' (p : P) : ↑(AffineEquiv.vaddConst 𝕜 p) = fun v => v +ᵥ p

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

⇑(AffineEquiv.vaddConst 𝕜 p) = fun v => v +ᵥ p


theorem HigherFacesVanish.inclusionOfMooreComplexMap (n : ℕ) :
    HigherFacesVanish (n + 1) ((inclusionOfMooreComplexMap X).f (n + 1))

{A : Type u_1}
[CategoryTheory.Category.{u_2, u_1} A]
[CategoryTheory.Abelian A]
{X : CategoryTheory.SimplicialObject A}
(n : ℕ)

AlgebraicTopology.DoldKan.HigherFacesVanish (n + 1) ((AlgebraicTopology.inclusionOfMooreComplexMap X).f (n + 1))


/-- Construct `HasBinaryProduct Q P` from `HasBinaryProduct P Q`.
This can't be an instance, as it would cause a loop in typeclass search.
-/
theorem HasBinaryProduct.swap (P Q : C) [HasBinaryProduct P Q] : HasBinaryProduct Q P


@[simp]
theorem get_pure (a : α) : get (pure a) = a


@[norm_cast]
lemma cast_mul_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
    ↑(q * r) = (q * r : α)

{α : Type u_3}
[DivisionSemiring α]
{q r : ℚ≥0}
(hq : ↑q.den ≠ 0)
(hr : ↑r.den ≠ 0)


@[simp]
theorem eval₂_at_one {S : Type*} [Semiring S] (f : R →+* S) : p.eval₂ f 1 = f (p.eval 1)

{R : Type u}
[Semiring R]
{p : R[X]}
{S : Type u_1}
[Semiring S]
(f : R →+* S)

Polynomial.eval₂ f 1 p = f (Polynomial.eval 1 p)


@[fun_prop]
theorem DifferentiableOn.inverse (hf : DifferentiableOn 𝕜 h S) (hz : ∀ x ∈ S, IsUnit (h x)) :
    DifferentiableOn 𝕜 (fun x => Ring.inverse (h x)) S

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{R : Type u_6}
[NormedRing R]
[NormedAlgebra 𝕜 R]
[CompleteSpace R]
{h : E → R}
{S : Set E}
(hf : DifferentiableOn 𝕜 h S)
(hz : ∀ x ∈ S, IsUnit (h x))


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


@[simp]
theorem ClassGroup.mk_mk0 [IsDedekindDomain R] (I : (Ideal R)⁰) :
    ClassGroup.mk (FractionalIdeal.mk0 K I) = ClassGroup.mk0 I

{R : Type u_1}
(K : Type u_2)
[CommRing R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]
[IsDedekindDomain R]
(I : ↥(Ideal R)⁰)

ClassGroup.mk ((FractionalIdeal.mk0 K) I) = ClassGroup.mk0 I


theorem single_eq_same {i b} : (single i b : Π₀ i, β i) i = b

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
{i : ι}
{b : β i}


/-- Definition of a (Pre)Galois category. Lenstra, Def 3.1, (G1)-(G3) -/
class PreGaloisCategory (C : Type u₁) [Category.{u₂, u₁} C] : Prop where
  /-- `C` has a terminal object (G1). -/
  hasTerminal : HasTerminal C := by infer_instance
  /-- `C` has pullbacks (G1). -/
  hasPullbacks : HasPullbacks C := by infer_instance
  /-- `C` has finite coproducts (G2). -/
  hasFiniteCoproducts : HasFiniteCoproducts C := by infer_instance
  /-- `C` has quotients by finite groups (G2). -/
  hasQuotientsByFiniteGroups (G : Type u₂) [Group G] [Finite G] :
    HasColimitsOfShape (SingleObj G) C := by infer_instance
  /-- Every monomorphism in `C` induces an isomorphism on a direct summand (G3). -/
  monoInducesIsoOnDirectSummand {X Y : C} (i : X ⟶ Y) [Mono i] : ∃ (Z : C) (u : Z ⟶ Y),
    Nonempty (IsColimit (BinaryCofan.mk i u))

[self : CategoryTheory.PreGaloisCategory C]

CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.SingleObj G) C


theorem isBigO_self_const_mul' {c : R} (hc : IsUnit c) (f : α → R) (l : Filter α) :
    f =O[l] fun x => c * f x

{α : Type u_1}
{R : Type u_13}
[SeminormedRing R]
{c : R}
(hc : IsUnit c)
(f : α → R)
(l : Filter α)


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


theorem dist_vadd_cancel_left (v : V) (x y : P) : dist (v +ᵥ x) (v +ᵥ y) = dist x y

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(v : V)
(x y : P)


theorem RightExactFunctor.forget_obj_of (F : C ⥤ D) [PreservesFiniteColimits F] :
    (RightExactFunctor.forget C D).obj (RightExactFunctor.of F) = F

(CategoryTheory.RightExactFunctor.forget C D).obj (CategoryTheory.RightExactFunctor.of F) = F


@[to_additive]
theorem div_ne_one : a / b ≠ 1 ↔ a ≠ b


/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : AlexDisc} (e : α ≃ₜ β) : α ≅ β

(AlexDisc.Iso.mk e).inv = e.symm.toContinuousMap


/-- A specialization of 'the smallest congruence relation containing a congruence relation `c`
    equals `c`'. -/
@[to_additive "A specialization of 'the smallest additive congruence relation containing
an additive congruence relation `c` equals `c`'."]
theorem mapOfSurjective_eq_mapGen {c : Con M} {f : M → N} (H : ∀ x y, f (x * y) = f x * f y)
    (h : mulKer f H ≤ c) (hf : Surjective f) : c.mapGen f = c.mapOfSurjective f H h hf

(H : ∀ (x y : M), f (x * y) = f x * f y)


lemma Ioc_filter_modEq_eq (v : ℤ) : (Ioc a b).filter (· ≡ v [ZMOD r]) =
    ((Ioc (a - v) (b - v)).filter (r ∣ ·)).map ⟨(· + v), add_left_injective v⟩

Finset.filter (fun x => x ≡ v [ZMOD r]) (Finset.Ioc a b) =
  Finset.map { toFun := fun x => x + v, inj' := ⋯ } (Finset.filter (fun x => r ∣ x) (Finset.Ioc (a - v) (b - v)))


@[simp]
theorem nonempty_two_pointing_iff : Nonempty (TwoPointing α) ↔ Nontrivial α


@[to_additive (attr := simp)]
lemma ofUnits_bot : (⊥ : Subgroup Mˣ).ofUnits = ⊥


@[simp]
lemma map₁_fst {G : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v} (η : F ⟶ G)
    (p : YonedaCollection F X) : (YonedaCollection.map₁ η p).fst = p.fst

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

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

{G : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)}

(p : CategoryTheory.OverPresheafAux.YonedaCollection F X)

(CategoryTheory.OverPresheafAux.YonedaCollection.map₁ η p).fst = p.fst


@[mono]
theorem dualCoannihilator_anti {U V : Submodule R (Module.Dual R M)} (hUV : U ≤ V) :
    V.dualCoannihilator ≤ U.dualCoannihilator

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{U V : Submodule R (Module.Dual R M)}
(hUV : U ≤ V)


theorem biInter_iUnion (s : ι → Set α) (t : α → Set β) :
    ⋂ x ∈ ⋃ i, s i, t x = ⋂ (i) (x ∈ s i), t x

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
(s : ι → Set α)
(t : α → Set β)

⋂ x ∈ ⋃ i, s i, t x = ⋂ i, ⋂ x ∈ s i, t x


lemma isSMulRegular_on_submodule_iff_disjoint_ker_lsmul_submodule :
    IsSMulRegular N r ↔ Disjoint (LinearMap.ker (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 (↥N) r ↔ Disjoint (LinearMap.ker ((LinearMap.lsmul R M) r)) N


@[ext high]
theorem ext_to_ring (f g : A →ₐc[R] R) : f = g

{R : Type u}
(A : Type v)
[CommSemiring R]
[Semiring A]
[Bialgebra R A]
(f g : A →ₐc[R] R)


theorem coe_weightSpace_of_top (χ : L → R) :
    (weightSpace M (χ ∘ (⊤ : LieSubalgebra R L).incl) : Submodule R M) = weightSpace M χ

{R : Type u_2}
{L : Type u_3}
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(χ : L → R)

↑(LieModule.weightSpace M (χ ∘ ⇑⊤.incl)) = ↑(LieModule.weightSpace M χ)


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

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(f : α → M)
(hf : (Function.mulSupport f).Finite)
{s : Finset α}
(h : hf.toFinset ⊆ s)


private noncomputable def mapExactAux :
    (n : ℕ) → { a : M | f a - x (k + n) ∈ (I ^ (k + n) • ⊤ : Submodule R N) }

(x : AdicCompletion.AdicCauchySequence I N)

(hker : ∀ (n : ℕ), g (↑x n) ∈ I ^ n • ⊤)

∃ d y, d ∈ I ^ (k + n) • ⊤ ∧ f y = ↑x (k + n) - d


@[reassoc (attr := simp)]
lemma pushforwardPullbackAdjunction_unit_app_app_germToPullbackStalk
    (f : X ⟶ Y) (F : Y.Presheaf C) (V : (Opens Y)ᵒᵖ) (x : (Opens.map f).obj V.unop) :
    ((pushforwardPullbackAdjunction C f).unit.app F).app V ≫ germToPullbackStalk C f F _ x =
      F.germ ⟨f x, x.2⟩

(x : ↥((TopologicalSpace.Opens.map f).obj (Opposite.unop V)))

((TopCat.Presheaf.pushforwardPullbackAdjunction C f).unit.app F).app V ≫
    TopCat.Presheaf.germToPullbackStalk C f F ((TopologicalSpace.Opens.map f).obj (Opposite.unop V)) x =
  F.germ ⟨f ↑x, ⋯⟩


/-- An alternative way to provide the argument to `CliffordAlgebra.lift` when `2` is invertible.

To show a function squares to the quadratic form, it suffices to show that
`f x * f y + f y * f x = algebraMap _ _ (polar Q x y)` -/
theorem forall_mul_self_eq_iff {A : Type*} [Ring A] [Algebra R A] (h2 : IsUnit (2 : A))
    (f : M →ₗ[R] A) :
    (∀ x, f x * f x = algebraMap _ _ (Q x)) ↔
      (LinearMap.mul R A).compl₂ f ∘ₗ f + (LinearMap.mul R A).flip.compl₂ f ∘ₗ f =
        Q.polarBilin.compr₂ (Algebra.linearMap R A)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{A : Type u_4}
[Ring A]
[Algebra R A]
(h2 : IsUnit 2)
(f : M →ₗ[R] A)

(∀ (x : M), f x * f x = (algebraMap R A) (Q x)) ↔
  (LinearMap.mul R A).compl₂ f ∘ₗ f + (LinearMap.mul R A).flip.compl₂ f ∘ₗ f =
    LinearMap.compr₂ (QuadraticMap.polarBilin Q) (Algebra.linearMap R A)


@[to_additive]
theorem finprod_mem_eq_prod (f : α → M) {s : Set α} (hf : (s ∩ mulSupport f).Finite) :
    ∏ᶠ i ∈ s, f i = ∏ i ∈ hf.toFinset, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(f : α → M)
{s : Set α}
(hf : (s ∩ Function.support f).Finite)

∑ᶠ (i : α) (_ : i ∈ s), f i = ∑ i ∈ hf.toFinset, f i


theorem Hereditarily.mem (h : x.Hereditarily p) (hy : y ∈ x) : y.Hereditarily p

{p : ZFSet → Prop}
{x y : ZFSet}
(h : ZFSet.Hereditarily p x)
(hy : y ∈ x)


/-- If `C` has finite coproducts, a functor `Discrete α ⥤ C` lifts to a functor
    `Finset (Discrete α) ⥤ C` by taking coproducts. -/
@[simps!]
def liftToFinset [HasFiniteCoproducts C] (F : Discrete α ⥤ C) : Finset (Discrete α) ⥤ C

∀ {x Y : Finset (CategoryTheory.Discrete α)} (h : x ⟶ Y),
  (CategoryTheory.Limits.CoproductsFromFiniteFiltered.liftToFinset F).map h =
    CategoryTheory.Limits.Sigma.desc fun y => CategoryTheory.Limits.Sigma.ι (fun x => F.obj ↑x) ⟨↑y, ⋯⟩


/-- A bundled version of `AddMonoidAlgebra.divOf`. -/
@[simps]
noncomputable def divOfHom : Multiplicative G →* AddMonoid.End k[G]

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
(g : Multiplicative G)
(x : AddMonoidAlgebra k G)

(AddMonoidAlgebra.divOfHom g) x = x.divOf (Multiplicative.toAdd g)


@[simp]
theorem toIcoMod_zsmul_add' (a b : α) (m : ℤ) :
    toIcoMod hp (m • p + a) b = m • p + toIcoMod hp a b

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


@[simp]
lemma not_countable [Uncountable α] : ¬Countable α


theorem opRingEquiv_symm_single [AddCommMonoid G] (r : kᵐᵒᵖ) (x : Gᵐᵒᵖ) :
    AddMonoidAlgebra.opRingEquiv.symm (single x r) = op (single x r.unop)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[AddCommMonoid G]
(r : kᵐᵒᵖ)
(x : Gᵐᵒᵖ)

AddMonoidAlgebra.opRingEquiv.symm (AddMonoidAlgebra.single x r) =
  MulOpposite.op (AddMonoidAlgebra.single x (MulOpposite.unop r))


theorem sign_subtypePerm (f : Perm α) {p : α → Prop} [DecidablePred p] (h₁ : ∀ x, p x ↔ p (f x))
    (h₂ : ∀ x, f x ≠ x → p x) : sign (subtypePerm f h₁) = sign f

{α : Type u}
[DecidableEq α]
[Fintype α]
(f : Equiv.Perm α)
{p : α → Prop}
[DecidablePred p]
(h₁ : ∀ (x : α), p x ↔ p (f x))
(h₂ : ∀ (x : α), f x ≠ x → p x)

Equiv.Perm.sign (f.subtypePerm h₁) = Equiv.Perm.sign f


theorem Balanced.neg_eq [NormOneClass 𝕜] (h : Balanced 𝕜 s) : -s = s

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
[NormOneClass 𝕜]
(h : Balanced 𝕜 s)


theorem sub_eq_psub (m : ℕ) : ∀ n, m - n = (psub m n).getD 0


theorem SmoothOn.comp_smooth {t : Set M'} {g : M' → M''} (hg : SmoothOn I' I'' g t)
    (hf : Smooth I I' f) (ht : ∀ x, f x ∈ t) : Smooth I I'' (g ∘ f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{t : Set M'}
{g : M' → M''}
(hg : SmoothOn I' I'' g t)
(hf : Smooth I I' f)
(ht : ∀ (x : M), f x ∈ t)


/-- The product of an element of `S` and an element of the additive closure of a multiplicative
submonoid `S` is contained in the additive closure of `S`. -/
theorem mul_left_mem_add_closure (ha : a ∈ S) (hb : b ∈ AddSubmonoid.closure (S : Set R)) :
    a * b ∈ AddSubmonoid.closure (S : Set R)

{M : Type u_1}
{R : Type u_4}
[NonUnitalNonAssocSemiring R]
[SetLike M R]
[MulMemClass M R]
{S : M}
{a b : R}
(ha : a ∈ S)
(hb : b ∈ AddSubmonoid.closure ↑S)


@[simp] lemma closure_union_closure_empty_eq (M : Matroid α) (X : Set α) :
    M.closure X ∪ M.closure ∅ = M.closure X

{α : Type u_2}
(M : Matroid α)
(X : Set α)


theorem convexJoin_left_comm (s t u : Set E) :
    convexJoin 𝕜 s (convexJoin 𝕜 t u) = convexJoin 𝕜 t (convexJoin 𝕜 s u)

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(s t u : Set E)


/-- If a monotone function is continuous at the infimum of a nonempty bounded below set `s`,
then it sends this infimum to the infimum of the image of `s`. -/
theorem Monotone.map_csInf_of_continuousAt {f : α → β} {s : Set α} (Cf : ContinuousAt f (sInf s))
    (Mf : Monotone f) (ne : s.Nonempty) (H : BddBelow s) : f (sInf s) = sInf (f '' s)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{f : α → β}
{s : Set α}
(Cf : ContinuousAt f (sInf s))
(Mf : Monotone f)
(ne : s.Nonempty)
(H : BddBelow s)


/-- If every map to `Bool` (a discrete two-element space), that is
continuous on a set `s`, is constant on s, then s is preconnected -/
theorem isPreconnected_of_forall_constant {s : Set α}
    (hs : ∀ f : α → Bool, ContinuousOn f s → ∀ x ∈ s, ∀ y ∈ s, f x = f y) : IsPreconnected s

(hs : ∀ (f : α → Bool), ContinuousOn f s → ∀ x ∈ s, ∀ y ∈ s, f x = f y)


/-- A product set is included in a product set if and only factors are included, or a factor of the
first set is empty. -/
theorem prod_subset_prod_iff : s ×ˢ t ⊆ s₁ ×ˢ t₁ ↔ s ⊆ s₁ ∧ t ⊆ t₁ ∨ s = ∅ ∨ t = ∅

{α : Type u_1}
{β : Type u_2}
{s s₁ : Set α}
{t t₁ : Set β}


theorem exists_pos_tsum_mul_lt_of_countable {ε : ℝ≥0∞} (hε : ε ≠ 0) {ι} [Countable ι] (w : ι → ℝ≥0∞)
    (hw : ∀ i, w i ≠ ∞) : ∃ δ : ι → ℝ≥0, (∀ i, 0 < δ i) ∧ (∑' i, (w i * δ i : ℝ≥0∞)) < ε

{ε : ℝ≥0∞}
(hε : ε ≠ 0)
{ι : Type u_4}
[Countable ι]
(w : ι → ℝ≥0∞)
(hw : ∀ (i : ι), w i ≠ ⊤)


theorem fg_of_noetherian (S : IntermediateField F E) [IsNoetherian F E] : S.FG

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(S : IntermediateField F E)
[IsNoetherian F E]


theorem mem_upperBounds_image (Hf : MonotoneOn f t) (Hst : s ⊆ t) (Has : a ∈ upperBounds s)
    (Hat : a ∈ t) : f a ∈ upperBounds (f '' s)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{s t : Set α}
{a : α}
(Hf : MonotoneOn f t)
(Hst : s ⊆ t)
(Has : a ∈ upperBounds s)
(Hat : a ∈ t)


/-- If `s` is a compact set and `μ` is finite at `𝓝 x` for every `x ∈ s`, then `s` admits an open
superset of finite measure. -/
theorem exists_open_superset_measure_lt_top' (h : IsCompact s)
    (hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x)) : ∃ U ⊇ s, IsOpen U ∧ μ U < ∞

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s : Set α}
(h : IsCompact s)
(hμ : ∀ x ∈ s, μ.FiniteAtFilter (𝓝 x))


@[symm]
theorem Indep.symm (h : Indep m₁ m₂ μ) : Indep m₂ m₁ μ

{Ω : Type u_1}
{m₁ m₂ _mΩ : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
(h : ProbabilityTheory.Indep m₁ m₂ μ)


lemma integral_llr_tilted_right [IsProbabilityMeasure μ] [SigmaFinite ν]
    (hμν : μ ≪ ν) (hfμ : Integrable f μ) (hfν : Integrable (fun x ↦ exp (f x)) ν)
    (h_int : Integrable (llr μ ν) μ) :
    ∫ x, llr μ (ν.tilted f) x ∂μ = ∫ x, llr μ ν x ∂μ - ∫ x, f x ∂μ + log (∫ x, exp (f x) ∂ν)

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

(h_int : MeasureTheory.Integrable (MeasureTheory.llr μ ν) μ)

∫ (x : α), MeasureTheory.llr μ (ν.tilted f) x ∂μ =
  ∫ (x : α), MeasureTheory.llr μ ν x ∂μ - ∫ (x : α), f x ∂μ + Real.log (∫ (x : α), rexp (f x) ∂ν)


@[simp] theorem length_modify [BEq α] {a : α} : (modify a f l).length = l.length

∀ {β : Type u_2} {f : α → β → β} {l : Batteries.AssocList α β} [inst : BEq α] {a : α},
  (Batteries.AssocList.modify a f l).length = l.length


theorem star_centerToCentroidCenter (z : NonUnitalStarSubsemiring.center α) :
    star (centerToCentroidCenter z) =
      (centerToCentroidCenter (star z : NonUnitalStarSubsemiring.center α))

(z : ↥(NonUnitalStarSubsemiring.center α))

star (CentroidHom.centerToCentroidCenter z) = CentroidHom.centerToCentroidCenter (star z)


/-- Subtracting two `affineCombination`s. -/
theorem affineCombination_vsub (w₁ w₂ : ι → k) (p : ι → P) :
    s.affineCombination k p w₁ -ᵥ s.affineCombination k p w₂ = s.weightedVSub p (w₁ - w₂)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w₁ w₂ : ι → k)
(p : ι → P)

(Finset.affineCombination k s p) w₁ -ᵥ (Finset.affineCombination k s p) w₂ = (s.weightedVSub p) (w₁ - w₂)


theorem permutations_perm_permutations' (ts : List α) : ts.permutations ~ ts.permutations'


theorem isOpen_iUnion {f : ι → Set X} (h : ∀ i, IsOpen (f i)) : IsOpen (⋃ i, f i)

{X : Type u}
{ι : Sort w}
[TopologicalSpace X]
{f : ι → Set X}
(h : ∀ (i : ι), IsOpen (f i))


lemma leRecOn_succ' {C : ℕ → Sort*} {n} {h : n ≤ n + 1} {next : ∀ {k}, C k → C (k + 1)} (x : C n) :
    (leRecOn h next x : C (n + 1)) = next x

{C : ℕ → Sort u_1}
{n : ℕ}
{h : n ≤ n + 1}
{next : {k : ℕ} → C k → C (k + 1)}
(x : C n)

Nat.leRecOn h (fun {k} => next) x = next x


@[to_additive]
theorem ofMulEquivOfDom_eq {k : P ≃* M} (H : T.map k.toMonoidHom = S) :
    (f.ofMulEquivOfDom H).toMap = f.toMap.comp k.toMonoidHom

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
{T : Submonoid P}
{k : P ≃* M}
(H : Submonoid.map k.toMonoidHom T = S)


@[simp]
theorem filter_smul {_ : Monoid R} [AddMonoid M] [DistribMulAction R M] {b : R} {v : α →₀ M} :
    (b • v).filter p = b • v.filter p

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
{p : α → Prop}
[DecidablePred p]

∀ {x : Monoid R} [inst : AddMonoid M] [inst_1 : DistribMulAction R M] {b : R} {v : α →₀ M},
  Finsupp.filter p (b • v) = b • Finsupp.filter p v


@[simp]
theorem lineMap_linear (p₀ p₁ : P1) :
    (lineMap p₀ p₁ : k →ᵃ[k] P1).linear = LinearMap.id.smulRight (p₁ -ᵥ p₀)

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
(p₀ p₁ : P1)

(AffineMap.lineMap p₀ p₁).linear = LinearMap.id.smulRight (p₁ -ᵥ p₀)


theorem aedisjoint_compl_right : AEDisjoint μ s sᶜ

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}


theorem concat_eq_append {u v w : V} (p : G.Walk u v) (h : G.Adj v w) :
    p.concat h = p.append (cons h nil)

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(p : G.Walk u v)
(h : G.Adj v w)

p.concat h = p.append (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil)


theorem congr_left {a b c : α} : s(b, a) = s(c, a) ↔ b = c


@[simp high]
protected theorem subset_symm_image {α β} (e : α ≃ β) (s : Set α) (t : Set β) :
    s ⊆ e.symm '' t ↔ e '' s ⊆ t

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


theorem normalize?_eq_some (w : normalize? (s, x) = some (s', x')) :
    normalizeConstraint s x = s' ∧ normalizeCoeffs s x = x'

(w : Lean.Omega.normalize? (s, x) = some (s', x'))

Lean.Omega.normalizeConstraint s x = s' ∧ Lean.Omega.normalizeCoeffs s x = x'


/-- "iff" version of `Multipliable.of_nat_of_neg_add_one`. -/
@[to_additive "\"iff\" version of `Summable.of_nat_of_neg_add_one`."]
lemma multipliable_int_iff_multipliable_nat_and_neg_add_one {f : ℤ → G} : Multipliable f ↔
    (Multipliable fun n : ℕ ↦ f n) ∧ (Multipliable fun n : ℕ ↦ f (-(n + 1)))

{G : Type u_2}
[CommGroup G]
[UniformSpace G]
[UniformGroup G]
[CompleteSpace G]
{f : ℤ → G}

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


/-- If a kernel `κ` is finite and a function `f : α → β → ℝ≥0∞` is bounded, then `withDensity κ f`
is finite. -/
theorem isFiniteKernel_withDensity_of_bounded (κ : Kernel α β) [IsFiniteKernel κ] {B : ℝ≥0∞}
    (hB_top : B ≠ ∞) (hf_B : ∀ a b, f a b ≤ B) : IsFiniteKernel (withDensity κ f)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{f : α → β → ℝ≥0∞}
(κ : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsFiniteKernel κ]
{B : ℝ≥0∞}
(hB_top : B ≠ ⊤)
(hf_B : ∀ (a : α) (b : β), f a b ≤ B)


@[to_additive add]
theorem mul' (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
    LipschitzWith (Kf + Kg) fun x => f x * g x

{α : Type u_5}
{E : Type u_6}
[SeminormedAddCommGroup E]
[PseudoEMetricSpace α]
{Kf Kg : ℝ≥0}
{f g : α → E}
(hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g)

LipschitzWith (Kf + Kg) fun x => f x + g x


theorem deriv_pi (h : ∀ i, DifferentiableAt 𝕜 (fun x => φ x i) x) :
    deriv φ x = fun i => deriv (fun x => φ x i) x

(h : ∀ (i : ι), DifferentiableAt 𝕜 (fun x => φ x i) x)


/-- In a non-trivial ring, the element `0` is not left-regular -- with typeclasses. -/
theorem not_isLeftRegular_zero [nR : Nontrivial R] : ¬IsLeftRegular (0 : R)

{R : Type u_1}
[MulZeroClass R]
[nR : Nontrivial R]


@[simp]
theorem constantCoeff_rename {τ : Type*} (f : σ → τ) (φ : MvPolynomial σ R) :
    constantCoeff (rename f φ) = constantCoeff φ

{σ : Type u_1}
{R : Type u_4}
[CommSemiring R]
{τ : Type u_6}
(f : σ → τ)
(φ : MvPolynomial σ R)

MvPolynomial.constantCoeff ((MvPolynomial.rename f) φ) = MvPolynomial.constantCoeff φ


theorem equalizerSubobject_factors_iff {W : C} (h : W ⟶ X) :
    (equalizerSubobject f g).Factors h ↔ h ≫ f = h ≫ g

(CategoryTheory.Limits.equalizerSubobject f g).Factors h ↔ h ≫ f = h ≫ g


theorem birkhoffSum_one (f : α → α) (g : α → M) (x : α) : birkhoffSum f g 1 x = g x

{α : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
(f : α → α)
(g : α → M)
(x : α)


/-- Shows that for any `q : ℚ` with `0 < q < 1`, the numerator of the fractional part of
`IntFractPair.of q⁻¹` is smaller than the numerator of `q`.
-/
theorem of_inv_fr_num_lt_num_of_pos (q_pos : 0 < q) : (IntFractPair.of q⁻¹).fr.num < q.num

(GenContFract.IntFractPair.of q⁻¹).fr.num < q.num


/-- In a `p`-th cyclotomic extension of `ℚ`, we have that `ζ - 1` divides `p` in `𝓞 K`. -/
lemma toInteger_sub_one_dvd_prime' [hcycl : IsCyclotomicExtension {p} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑p) : ((hζ.toInteger - 1)) ∣ p

{p : ℕ+}
{K : Type u}
[Field K]
[CharZero K]
{ζ : K}
[hp : Fact (Nat.Prime ↑p)]
[hcycl : IsCyclotomicExtension {p} ℚ K]
(hζ : IsPrimitiveRoot ζ ↑p)


@[reassoc (attr := simp)]
lemma hom_inv_id_hom (e : F ≅ G) (n : A) : e.hom.hom n ≫ e.inv.hom n = 𝟙 _

{F G : CategoryTheory.SingleFunctors C D A}

e.hom.hom n ≫ e.inv.hom n = 𝟙 (F.functor n)