/-- The restriction of the Killing form of a finite-dimensional Killing Lie algebra to the range of
the adjoint action is nondegenerate. -/
lemma killingForm_restrict_range_ad_nondegenerate : ((killingForm R 𝔻).restrict 𝕀).Nondegenerate

(R : Type u_1)
(L : Type u_2)
[Field R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[LieAlgebra.IsKilling R L]

((killingForm R (LieDerivation R L L)).restrict (LieDerivation.ad R L).range.toSubmodule).Nondegenerate


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

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hfs_meas : ∀ᶠ (x : X) in 𝓝 x₀, MeasureTheory.AEStronglyMeasurable (fs x) μ)

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

(bound_integrable : MeasureTheory.Integrable bound μ)

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

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


@[simp]
theorem optionEquivSumPUnit_symm_inl (a) : (optionEquivSumPUnit α).symm (Sum.inl a) = a

(Equiv.optionEquivSumPUnit α).symm (Sum.inl a) = some a


@[simp, norm_cast]
lemma coe_himp (G₁ G₂ : G.Finsubgraph) : ↑(G₁ ⇨ G₂) = (G₁ ⇨ G₂ : G.Subgraph)

{V : Type u}
{G : SimpleGraph V}
[Finite V]
(G₁ G₂ : G.Finsubgraph)

↑(G₁ ⇨ G₂) = ↑G₁ ⇨ ↑G₂


theorem Filter.Tendsto.div {l : Filter α} {a b : G₀} (hf : Tendsto f l (𝓝 a))
    (hg : Tendsto g l (𝓝 b)) (hy : b ≠ 0) : Tendsto (f / g) l (𝓝 (a / b))

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


/-- Composition of `AddConstEquiv`s, as an `AddConstEquiv`. -/
@[simps! (config := { simpRhs := true }) toEquiv apply]
def trans (e₁ : G ≃+c[a, b] H) (e₂ : H ≃+c[b, c] K) : G ≃+c[a, c] K

{G : Type u_1}
{H : Type u_2}
{K : Type u_3}
[Add G]
[Add H]
[Add K]
{a : G}
{b : H}
{c : K}
(e₁ : G ≃+c[a, b] H)
(e₂ : H ≃+c[b, c] K)

(e₁.trans e₂).toEquiv = e₁.trans e₂.toEquiv


lemma summand_bound_of_mem_verticalStrip {k : ℝ} (hk : 0 ≤ k) (x : Fin 2 → ℤ)
    {A B : ℝ} (hB : 0 < B) (hz : z ∈ verticalStrip A B) :
    Complex.abs (x 0 * z + x 1) ^ (-k) ≤ r ⟨⟨A, B⟩, hB⟩ ^ (-k) * ‖x‖ ^ (-k)

(hz : z ∈ UpperHalfPlane.verticalStrip A B)

Complex.abs (↑(x 0) * ↑z + ↑(x 1)) ^ (-k) ≤ EisensteinSeries.r ⟨{ re := A, im := B }, hB⟩ ^ (-k) * ‖x‖ ^ (-k)


theorem ContDiff.comp_contMDiffWithinAt {g : F → F'} {f : M → F} {s : Set M} {x : M}
    (hg : ContDiff 𝕜 n g) (hf : ContMDiffWithinAt I 𝓘(𝕜, F) n f s x) :
    ContMDiffWithinAt I 𝓘(𝕜, F') n (g ∘ f) s x


/-- A function is `C^∞` on a domain with unique derivatives if and only if it is differentiable
there, and its derivative (formulated with `derivWithin`) is `C^∞`. -/
theorem contDiffOn_top_iff_derivWithin (hs : UniqueDiffOn 𝕜 s₂) :
    ContDiffOn 𝕜 ∞ f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ∞ (derivWithin f₂ s₂) s₂

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₂ : 𝕜 → F}
{s₂ : Set 𝕜}
(hs : UniqueDiffOn 𝕜 s₂)

ContDiffOn 𝕜 ⊤ f₂ s₂ ↔ DifferentiableOn 𝕜 f₂ s₂ ∧ ContDiffOn 𝕜 ⊤ (derivWithin f₂ s₂) s₂


theorem range_top_iff_surjective (f : A →ₙₐ[R] B) :
    NonUnitalAlgHom.range f = (⊤ : NonUnitalSubalgebra R B) ↔ Function.Surjective f

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[IsScalarTower R B B]
[SMulCommClass R B B]
(f : A →ₙₐ[R] B)

NonUnitalAlgHom.range f = ⊤ ↔ Function.Surjective ⇑f


theorem normalize_eq (x : α) : normalize x = x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[Unique αˣ]
(x : α)


@[to_additive sum_pos]
theorem one_lt_prod (h : ∀ i ∈ s, 1 < f i) (hs : s.Nonempty) : 1 < ∏ i ∈ s, f i

{ι : Type u_1}
{M : Type u_4}
[OrderedCancelCommMonoid M]
{f : ι → M}
{s : Finset ι}
(h : ∀ i ∈ s, 1 < f i)
(hs : s.Nonempty)


theorem measure_lt_top_of_memℒp_indicator (hp_pos : p ≠ 0) (hp_ne_top : p ≠ ∞) {c : E} (hc : c ≠ 0)
    {s : Set α} (hs : MeasurableSet s) (hcs : Memℒp ((const α c).piecewise s hs (const α 0)) p μ) :
    μ s < ⊤

(hcs :
  MeasureTheory.Memℒp
    (↑(MeasureTheory.SimpleFunc.piecewise s hs (MeasureTheory.SimpleFunc.const α c)
        (MeasureTheory.SimpleFunc.const α 0)))
    p μ)


/-- Composition of partial equivs respects equivalence. -/
theorem EqOnSource.trans' {e e' : PartialEquiv α β} {f f' : PartialEquiv β γ} (he : e ≈ e')
    (hf : f ≈ f') : e.trans f ≈ e'.trans f'

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{e e' : PartialEquiv α β}
{f f' : PartialEquiv β γ}
(he : e ≈ e')
(hf : f ≈ f')


theorem condexpIndL1_of_not_measurableSet (hs : ¬MeasurableSet s) (x : G) :
    condexpIndL1 hm μ s x = 0

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs : ¬MeasurableSet s)
(x : G)


@[to_additive posPart_eq_of_posPart_pos]
lemma oneLePart_of_one_lt_oneLePart (ha : 1 < a⁺ᵐ) : a⁺ᵐ = a

{α : Type u_1}
[LinearOrder α]
[Group α]
{a : α}
(ha : 1 < a⁺ᵐ )


@[simp]
theorem bind₂_monomial_one (f : R →+* MvPolynomial σ S) (d : σ →₀ ℕ) :
    bind₂ f (monomial d 1) = monomial d 1

{σ : Type u_1}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
(f : R →+* MvPolynomial σ S)
(d : σ →₀ ℕ)

(MvPolynomial.bind₂ f) ((MvPolynomial.monomial d) 1) = (MvPolynomial.monomial d) 1


@[simp]
theorem intrinsicInterior_singleton (x : P) : intrinsicInterior 𝕜 ({x} : Set P) = {x}

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


@[to_additive (attr := simp)]
theorem compl_inv : sᶜ⁻¹ = s⁻¹ᶜ


@[to_additive (attr := simp)]
theorem comap_unop_nhds (x : M) : comap (unop : Mᵐᵒᵖ → M) (𝓝 x) = 𝓝 (op x)

{M : Type u_1}
[TopologicalSpace M]
(x : M)

Filter.comap MulOpposite.unop (𝓝 x) = 𝓝 (MulOpposite.op x)


lemma levyProkhorovEDist_self (μ : Measure Ω) :
    levyProkhorovEDist μ μ = 0

{Ω : Type u_2}
[MeasurableSpace Ω]
[PseudoEMetricSpace Ω]
(μ : MeasureTheory.Measure Ω)

MeasureTheory.levyProkhorovEDist μ μ = 0


theorem isRat_le_false [LinearOrderedRing α] [Nontrivial α] {a b : α} {na nb : ℤ} {da db : ℕ}
    (ha : IsRat a na da) (hb : IsRat b nb db) (h : decide (nb * da < na * db)) : ¬a ≤ b

(ha : Mathlib.Meta.NormNum.IsRat a na da)

(hb : Mathlib.Meta.NormNum.IsRat b nb db)

(h : decide (nb * ↑da < na * ↑db) = true)


theorem one_sub_X_sq_mul_derivative_T_eq_poly_in_T (n : ℤ) :
    (1 - X ^ 2) * derivative (T R (n + 1)) = (n + 1 : R[X]) * (T R n - X * T R (n + 1))

(1 - Polynomial.X ^ 2) * Polynomial.derivative (Polynomial.Chebyshev.T R (n + 1)) =
  (↑n + 1) * (Polynomial.Chebyshev.T R n - Polynomial.X * Polynomial.Chebyshev.T R (n + 1))


/-- In a Turán-maximal graph, non-adjacent vertices have the same degree. -/
lemma degree_eq_of_not_adj (h : G.IsTuranMaximal r) (hn : ¬G.Adj s t) :
    G.degree s = G.degree t

{V : Type u_1}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{r : ℕ}
{s t : V}
(h : G.IsTuranMaximal r)
(hn : ¬G.Adj s t)


protected theorem isClosed_preimage (hf : QuotientMap f) {s : Set Y} :
    IsClosed (f ⁻¹' s) ↔ IsClosed s

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


@[reassoc (attr := simp)]
lemma map_hom_inv_id (F : C ⥤ D) :
    F.map e.hom ≫ F.map e.inv = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
[CategoryTheory.Category.{u_3, u_1} D]
{X Y : C}
(e : X ≅ Y)
(F : CategoryTheory.Functor C D)

CategoryTheory.CategoryStruct.comp (F.map e.hom) (F.map e.inv) = CategoryTheory.CategoryStruct.id (F.obj X)


@[to_additive]
theorem mulIndicator_apply (s : Set α) (f : α → M) (a : α) [Decidable (a ∈ s)] :
    mulIndicator s f a = if a ∈ s then f a else 1

{α : Type u_1}
{M : Type u_4}
[Zero M]
(s : Set α)
(f : α → M)
(a : α)
[Decidable (a ∈ s)]

s.indicator f a = if a ∈ s then f a else 0


@[simps!]
instance : MonoidalCategoryStruct (Dial C)

(CategoryTheory.MonoidalCategory.leftUnitor X).hom.f = CategoryTheory.Limits.prod.snd


theorem modEq_add_fac {a b n : ℤ} (c : ℤ) (ha : a ≡ b [ZMOD n]) : a + n * c ≡ b [ZMOD n]


/-- The natural `ℝ`-linear isometry equivalence between `𝕜` satisfying `RCLike 𝕜` and `ℝ` when
`RCLike.I = 0`. -/
@[simps]
noncomputable def realLinearIsometryEquiv (h : I = (0 : K)) : K ≃ₗᵢ[ℝ] ℝ

{K : Type u_1}
[RCLike K]
(h : RCLike.I = 0)

∀ (a : K), (RCLike.realLinearIsometryEquiv h) a = (RCLike.realRingEquiv h).toFun a


@[to_additive]
theorem HasProd.mul_compl {s : Set β} (ha : HasProd (f ∘ (↑) : s → α) a)
    (hb : HasProd (f ∘ (↑) : (sᶜ : Set β) → α) b) : HasProd f (a * b)

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a b : α}
[ContinuousMul α]
{s : Set β}
(ha : HasProd (f ∘ Subtype.val) a)
(hb : HasProd (f ∘ Subtype.val) b)


@[to_additive]
theorem mul_bot : s * ⊥ = ⊥

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

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


theorem perfect_iff_sum_divisors_eq_two_mul (h : 0 < n) :
    Perfect n ↔ ∑ i ∈ divisors n, i = 2 * n


@[simp]
theorem mapRange.linearMap_apply (f : M →ₗ[R] N) (g : α →₀ M) :
    mapRange.linearMap f g = mapRange f f.map_zero g

{α : Type u_1}
{M : Type u_2}
{N : Type u_3}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(f : M →ₗ[R] N)
(g : α →₀ M)

(Finsupp.mapRange.linearMap f) g = Finsupp.mapRange ⇑f ⋯ g


theorem whisker_exchange_bimod {X Y Z : Mon_ C} {M N : Bimod X Y} {P Q : Bimod Y Z} (f : M ⟶ N)
    (g : P ⟶ Q) : whiskerLeft M g ≫ whiskerRight f Q =
      whiskerRight f P ≫ whiskerLeft N g

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

M.whiskerLeft g ≫ Bimod.whiskerRight f Q = Bimod.whiskerRight f P ≫ N.whiskerLeft g


@[simp]
theorem zeroRootSubalgebra_eq_of_is_cartan (H : LieSubalgebra R L) [H.IsCartanSubalgebra]
    [IsNoetherian R L] : zeroRootSubalgebra R L H = H

(R : Type u_1)
(L : Type u_2)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
[H.IsCartanSubalgebra]
[IsNoetherian R L]


/-- Exactness of `S.X₁.homology i ⟶ S.X₂.homology i ⟶ S.X₃.homology i`. -/
lemma homology_exact₂ : (ShortComplex.mk (HomologicalComplex.homologyMap S.f i)
    (HomologicalComplex.homologyMap S.g i) (by rw [← HomologicalComplex.homologyMap_comp,
      S.zero, HomologicalComplex.homologyMap_zero])).Exact

{S : CategoryTheory.ShortComplex (HomologicalComplex C c)}

(CategoryTheory.ShortComplex.mk (HomologicalComplex.homologyMap S.f i) (HomologicalComplex.homologyMap S.g i) ⋯).Exact


/-- An application of the layer cake formula / Cavalieri's principle / tail probability formula:

For a nonnegative function `f` on a measure space, the Lebesgue integral of `f` can
be written (roughly speaking) as: `∫⁻ f^p ∂μ = p * ∫⁻ t in 0..∞, t^(p-1) * μ {ω | f(ω) > t}`.

See `MeasureTheory.lintegral_rpow_eq_lintegral_meas_le_mul` for a version with sets of the form
`{ω | f(ω) ≥ t}` instead. -/
theorem lintegral_rpow_eq_lintegral_meas_lt_mul :
    ∫⁻ ω, ENNReal.ofReal (f ω ^ p) ∂μ =
      ENNReal.ofReal p * ∫⁻ t in Ioi 0, μ {a : α | t < f a} * ENNReal.ofReal (t ^ (p - 1))

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ}
(μ : MeasureTheory.Measure α)
(f_nn : 0 ≤ᵐ[μ] f)
(f_mble : AEMeasurable f μ)
{p : ℝ}
(p_pos : 0 < p)

∫⁻ (ω : α), ENNReal.ofReal (f ω ^ p) ∂μ =
  ENNReal.ofReal p * ∫⁻ (t : ℝ) in Set.Ioi 0, μ {a | t < f a} * ENNReal.ofReal (t ^ (p - 1))


lemma eq_or_eq_not : ∀ a b, a = b ∨ a = !b


/--
If `R → T` is surjective on stalks, and `J` is some prime of `T`,
then every element `x` in `S ⊗[R] T` satisfies `(1 ⊗ r • t) * x = a ⊗ t` for some
`r : R`, `a : S`, and `t : T` such that `r • t ∉ J`.
-/
lemma SurjectiveOnStalks.exists_mul_eq_tmul
    (hf₂ : (algebraMap R T).SurjectiveOnStalks)
    (x : S ⊗[R] T) (J : Ideal T) (hJ : J.IsPrime) :
    ∃ (t : T) (r : R) (a : S), (r • t ∉ J) ∧
      (1 : S) ⊗ₜ[R] (r • t) * x = a ⊗ₜ[R] t

∃ t r a, r • t ∉ J ∧ 1 ⊗ₜ[R] (r • t) * x = a ⊗ₜ[R] t


theorem complete_polishSpaceMetric (α : Type*) [ht : TopologicalSpace α] [h : PolishSpace α] :
    @CompleteSpace α (polishSpaceMetric α).toUniformSpace

(α : Type u_3)
[ht : TopologicalSpace α]
[h : PolishSpace α]


lemma quasicategory_of_filler (S : SSet)
    (filler : ∀ ⦃n : ℕ⦄ ⦃i : Fin (n+3)⦄ (σ₀ : Λ[n+2, i] ⟶ S)
      (_h0 : 0 < i) (_hn : i < Fin.last (n+2)),
      ∃ σ : S _[n+2], ∀ (j) (h : j ≠ i), S.δ j σ = σ₀.app _ (horn.face i j h)) :
    Quasicategory S

(filler :
  ∀ ⦃n : ℕ⦄ ⦃i : Fin (n + 3)⦄ (σ₀ : SSet.horn (n + 2) i ⟶ S),
    0 < i →
      i < Fin.last (n + 2) →
        ∃ σ,
          ∀ (j : Fin (n + 3)) (h : j ≠ i),
            CategoryTheory.SimplicialObject.δ S j σ =
              σ₀.app (Opposite.op (SimplexCategory.mk (n + 1))) (SSet.horn.face i j h))


/-- For `z : ℍ`, there is a `g : SL(2,ℤ)` maximizing `(g•z).im` -/
theorem exists_max_im : ∃ g : SL(2, ℤ), ∀ g' : SL(2, ℤ), (g' • z).im ≤ (g • z).im

∃ g, ∀ (g' : SL(2, ℤ)), (g' • z).im ≤ (g • z).im


/-- An intermediate field of `E / F` contains the separable closure of `F` in `E`
if `E` is purely inseparable over it. -/
theorem separableClosure_le (L : IntermediateField F E)
    [h : IsPurelyInseparable L E] : separableClosure F E ≤ L

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(L : IntermediateField F E)
[h : IsPurelyInseparable (↥L) E]


nonrec theorem HasDerivWithinAt.prod (hf₁ : HasDerivWithinAt f₁ f₁' s x)
    (hf₂ : HasDerivWithinAt f₂ f₂' s x) : HasDerivWithinAt (fun x => (f₁ x, f₂ x)) (f₁', f₂') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₁ : 𝕜 → F}
{f₁' : F}
{x : 𝕜}
{s : Set 𝕜}
{G : Type w}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f₂ : 𝕜 → G}
{f₂' : G}
(hf₁ : HasDerivWithinAt f₁ f₁' s x)
(hf₂ : HasDerivWithinAt f₂ f₂' s x)


@[to_additive]
theorem map_equiv_eq_comap_symm' (f : G ≃* N) (K : Subgroup G) :
    K.map f.toMonoidHom = K.comap f.symm.toMonoidHom

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G ≃* N)
(K : Subgroup G)

Subgroup.map f.toMonoidHom K = Subgroup.comap f.symm.toMonoidHom K


theorem UniformSpace.Core.nhds_toTopologicalSpace {α : Type u} (u : Core α) (x : α) :
    @nhds α u.toTopologicalSpace x = comap (Prod.mk x) u.uniformity

{α : Type u}
(u : UniformSpace.Core α)
(x : α)

𝓝 x = Filter.comap (Prod.mk x) u.uniformity


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


@[simp]
lemma stableUnderGeneralization_compl_iff {s : Set X} :
    StableUnderGeneralization sᶜ ↔ StableUnderSpecialization s

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


lemma sup_set_smul (s t : Set S) :
    (s ⊔ t) • N = s • N ⊔ t • N

{R : Type u_2}
{M : Type u_3}
[Semiring R]
{S : Type u_4}
[Monoid S]
[AddCommMonoid M]
[Module R M]
[DistribMulAction S M]
(N : Submodule R M)
(s t : Set S)


/-- Given a natural transformation `τ : F ⟶ G` between functors `C ⥤ D` which preserve
the right homology of a short complex `S`, and a right homology data for `S`,
this is the right homology map data for the morphism `S.mapNatTrans τ`
obtained by evaluating `τ`. -/
@[simps]
def RightHomologyMapData.natTransApp (h : RightHomologyData S) (τ : F ⟶ G) :
    RightHomologyMapData (S.mapNatTrans τ) (h.map F) (h.map G)

(CategoryTheory.ShortComplex.RightHomologyMapData.natTransApp h τ).φH = τ.app h.H


/-- If `maximals r s` is included in but *shadows* the antichain `t`, then it is actually
equal to `t`. -/
theorem IsAntichain.max_maximals (ht : IsAntichain r t) (h : maximals r s ⊆ t)
    (hs : ∀ ⦃a⦄, a ∈ t → ∃ b ∈ maximals r s, r b a) : maximals r s = t

(hs : ∀ ⦃a : α⦄, a ∈ t → ∃ b ∈ maximals r s, r b a)


/-- A strictly concave function on an open segment is strictly lower-bounded by the min of its
endpoints. -/
theorem StrictConcaveOn.lt_on_openSegment (hf : StrictConcaveOn 𝕜 s f) {x y z : E} (hx : x ∈ s)
    (hy : y ∈ s) (hxy : x ≠ y) (hz : z ∈ openSegment 𝕜 x y) : min (f x) (f y) < f z

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : StrictConcaveOn 𝕜 s f)
{x y z : E}
(hx : x ∈ s)
(hy : y ∈ s)
(hxy : x ≠ y)
(hz : z ∈ openSegment 𝕜 x y)


theorem BddBelow.bddAbove_image2_of_bddAbove :
    BddBelow s → BddAbove t → BddAbove (Set.image2 f s t)

{f : α → β → γ}

(h₀ : ∀ (b : β), Antitone (Function.swap f b))


/-- If `p : W → Prop` holds for the identity and it is preserved under multiplying on the left
by a simple reflection, then it holds for all elements of `W`. -/
theorem simple_induction_left {p : W → Prop} (w : W) (one : p 1)
    (mul_simple_left : ∀ (w : W) (i : B), p w → p (s i * w)) : p w

(mul_simple_left : ∀ (w : W) (i : B), p w → p (cs.simple i * w))


/-- The non-negative norm of the tensor product of a scalar linear map and of an element of a normed
space is the product of the non-negative norms. -/
@[simp]
theorem nnnorm_smulRight_apply (c : E →L[𝕜] 𝕜) (f : Fₗ) : ‖smulRight c f‖₊ = ‖c‖₊ * ‖f‖₊

{𝕜 : Type u_1}
{E : Type u_4}
{Fₗ : Type u_7}
[NormedAddCommGroup E]
[NormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Fₗ]
(c : E →L[𝕜] 𝕜)
(f : Fₗ)


/-- The diagonal functor as a monoidal functor. -/
@[simps]
def diag : MonoidalFunctor C (C × C)

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

(CategoryTheory.MonoidalFunctor.diag C).toFunctor = CategoryTheory.Functor.diag C


@[to_additive (attr := simp)] lemma isUnit_pow_iff (hn : n ≠ 0) : IsUnit (a ^ n) ↔ IsUnit a

{M : Type u_1}
[Monoid M]
{n : ℕ}
{a : M}
(hn : n ≠ 0)


theorem Derivation.tensorProductTo_tmul (D : Derivation R S M) (s t : S) :
    D.tensorProductTo (s ⊗ₜ t) = s • D t

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{M : Type u_1}
[AddCommGroup M]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(D : Derivation R S M)
(s t : S)


@[simp]
theorem one_le {I : FractionalIdeal S P} : 1 ≤ I ↔ (1 : P) ∈ I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{I : FractionalIdeal S P}


@[simp]
theorem num_eq_zero_iff {x : RatFunc K} : num x = 0 ↔ x = 0


/-- Core data defining a locally trivial bundle with fiber `F` over a topological
space `B`. Note that "bundle" is used in its mathematical sense. This is the (computer science)
bundled version, i.e., all the relevant data is contained in the following structure. A family of
local trivializations is indexed by a type `ι`, on open subsets `baseSet i` for each `i : ι`.
Trivialization changes from `i` to `j` are given by continuous maps `coordChange i j` from
`baseSet i ∩ baseSet j` to the set of homeomorphisms of `F`, but we express them as maps
`B → F → F` and require continuity on `(baseSet i ∩ baseSet j) × F` to avoid the topology on the
space of continuous maps on `F`. -/
-- Porting note(#5171): was @[nolint has_nonempty_instance]
structure FiberBundleCore (ι : Type*) (B : Type*) [TopologicalSpace B] (F : Type*)
    [TopologicalSpace F] where
  baseSet : ι → Set B
  isOpen_baseSet : ∀ i, IsOpen (baseSet i)
  indexAt : B → ι
  mem_baseSet_at : ∀ x, x ∈ baseSet (indexAt x)
  coordChange : ι → ι → B → F → F
  coordChange_self : ∀ i, ∀ x ∈ baseSet i, ∀ v, coordChange i i x v = v
  continuousOn_coordChange : ∀ i j,
    ContinuousOn (fun p : B × F => coordChange i j p.1 p.2) ((baseSet i ∩ baseSet j) ×ˢ univ)
  coordChange_comp : ∀ i j k, ∀ x ∈ baseSet i ∩ baseSet j ∩ baseSet k, ∀ v,
    (coordChange j k x) (coordChange i j x v) = coordChange i k x v

{ι : Type u_5}
{B : Type u_6}
[TopologicalSpace B]
{F : Type u_7}
[TopologicalSpace F]
(self : FiberBundleCore ι B F)
(i : ι)
(x : B)

x ∈ self.baseSet i → ∀ (v : F), self.coordChange i i x v = v


theorem degree_sub_eq_right_of_degree_lt (h : degree p < degree q) : degree (p - q) = degree q

{R : Type u}
[Ring R]
{p q : R[X]}
(h : p.degree < q.degree)


@[simp]
lemma UniformFun.toFun_smul {M : Type*} [SMul M β] (c : M) (f : α →ᵤ β) :
    toFun (c • f) = c • toFun f

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[SMul M β]
(c : M)
(f : α →ᵤ β)

UniformFun.toFun (c • f) = c • UniformFun.toFun f


theorem bot_continuous : Continuous (⊥ : α →o β)

{α : Type u}
{β : Type v}
[OmegaCompletePartialOrder α]
[CompleteLattice β]


@[to_additive]
theorem hasProd_ite_div_hasProd [DecidableEq β] (hf : HasProd f a) (b : β) :
    HasProd (fun n ↦ ite (n = b) 1 (f n)) (a / f b)

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f : β → α}
{a : α}
[DecidableEq β]
(hf : HasProd f a)
(b : β)

HasProd (fun n => if n = b then 1 else f n) (a / f b)


@[simp]
theorem closure_empty : closure (∅ : Set R) = ⊥


theorem Finite.star [InvolutiveStar α] {s : Set α} (hs : s.Finite) : s⋆.Finite

{α : Type u_1}
[InvolutiveStar α]
{s : Set α}
(hs : s.Finite)


/-- Sends a complex `X` with objects in `V` to the corresponding complex with objects in `Vᵒᵖ`. -/
@[simps]
protected def op (X : HomologicalComplex V c) : HomologicalComplex Vᵒᵖ c.symm


/-- The truncation of an `ℕ`-indexed chain complex,
deleting the object at `0` and shifting everything else down.
-/
@[simps]
def truncate [HasZeroMorphisms V] : ChainComplex V ℕ ⥤ ChainComplex V ℕ

(ChainComplex.truncate.obj C).d i j = C.d (i + 1) (j + 1)


theorem biUnion_range_preimage_singleton (f : α → β) : ⋃ y ∈ range f, f ⁻¹' {y} = univ

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


/-- If for some `n`, `m ^ n • a = a`, then `0 < period m a`. -/
@[to_additive "If for some `n`, `(n • m) +ᵥ a = a`, then `0 < period m a`."]
theorem period_pos_of_fixed {m : M} {a : α} {n : ℕ} (n_pos : 0 < n) (fixed : m ^ n • a = a) :
    0 < period m a

{α : Type v}
{M : Type u}
[Monoid M]
[MulAction M α]
{m : M}
{a : α}
{n : ℕ}
(n_pos : 0 < n)
(fixed : m ^ n • a = a)


@[simp] theorem getElem?_nil {n : Nat} : ([] : List α)[n]? = none


theorem HasFDerivWithinAt.sinh (hf : HasFDerivWithinAt f f' s x) :
    HasFDerivWithinAt (fun x => Real.sinh (f x)) (Real.cosh (f x) • f') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{x : E}
{s : Set E}
(hf : HasFDerivWithinAt f f' s x)


{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)


theorem deriv_id_of_nfp_id {f : Ordinal → Ordinal} (h : nfp f = id) : deriv f = id

{f : Ordinal.{u_1} → Ordinal.{u_1}}
(h : Ordinal.nfp f = id)


@[simp]
theorem eqToHom_proj {I : Type*} {x x' : GradedObject I C} (h : x = x') (i : I) :
    (eqToHom h : x ⟶ x') i = eqToHom (Function.funext_iff.mp h i)

{x x' : CategoryTheory.GradedObject I C}

CategoryTheory.eqToHom h i = CategoryTheory.eqToHom ⋯


/-- The underlying object of `(Comonad.comparison L).obj X` is just `L.obj X`.
-/
@[simps]
def Comonad.comparisonForget {L : C ⥤ D} {R : D ⥤ C} (h : L ⊣ R) :
    Comonad.comparison h ⋙ h.toComonad.forget ≅ L

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : CategoryTheory.Functor C D}
{R : CategoryTheory.Functor D C}
(h : L ⊣ R)
(X : C)

(CategoryTheory.Comonad.comparisonForget h).hom.app X =
  CategoryTheory.CategoryStruct.id (((CategoryTheory.Comonad.comparison h).comp h.toComonad.forget).obj X)


/-- The opposite cocone of the image of a cone is the image of the opposite cocone. -/
-- Porting note: removed @[simps (config := { rhsMd := semireducible })] and replaced with
@[simps!]
def mapConeOp (t : Cone F) : (mapCone G t).op ≅ mapCocone G.op t.op

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
{F : J ⥤ C}
(G : C ⥤ D)
(t : CategoryTheory.Limits.Cone F)

(CategoryTheory.Functor.mapConeOp G t).inv.hom = 𝟙 (Opposite.op (G.obj t.pt))


/-- A connected space is a nonempty one where there is no non-trivial open partition. -/
class ConnectedSpace (α : Type u) [TopologicalSpace α] extends PreconnectedSpace α : Prop where
  /-- A connected space is nonempty. -/
  toNonempty : Nonempty α

{α : Type u}
[TopologicalSpace α]
[self : ConnectedSpace α]


/-- A functor preserves monomorphisms if it maps monomorphisms to monomorphisms. -/
class PreservesMonomorphisms (F : C ⥤ D) : Prop where
  /-- A functor preserves monomorphisms if it maps monomorphisms to monomorphisms. -/
  preserves : ∀ {X Y : C} (f : X ⟶ Y) [Mono f], Mono (F.map f)

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


@[simp]
theorem y_mk (x y : ℤ) (prop : x ^ 2 - d * y ^ 2 = 1) : (mk x y prop).y = y


theorem sin_int_mul_pi_sub (x : ℝ) (n : ℤ) : sin (n * π - x) = -((-1) ^ n * sin x)

Real.sin (↑n * Real.pi - x) = -((-1) ^ n * Real.sin x)


@[simp]
protected theorem add_le {d₁ d₂ d₃ : ManyOneDegree} : d₁ + d₂ ≤ d₃ ↔ d₁ ≤ d₃ ∧ d₂ ≤ d₃

d₁ + d₂ ≤ d₃ ↔ d₁ ≤ d₃ ∧ d₂ ≤ d₃


theorem splits_of_map_degree_eq_one {f : K[X]} (hf : degree (f.map i) = 1) : Splits i f

{K : Type v}
{L : Type w}
[CommRing K]
[Field L]
(i : K →+* L)
{f : K[X]}
(hf : (Polynomial.map i f).degree = 1)


@[simp]
theorem toDual_lt_toDual [LT α] {a b : α} : toDual a < toDual b ↔ b < a

OrderDual.toDual a < OrderDual.toDual b ↔ b < a


@[simp]
theorem realize_alls {φ : L.BoundedFormula α n} {v : α → M} :
    φ.alls.Realize v ↔ ∀ xs : Fin n → M, φ.Realize v xs

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{n : ℕ}
{φ : L.BoundedFormula α n}
{v : α → M}

φ.alls.Realize v ↔ ∀ (xs : Fin n → M), φ.Realize v xs


@[to_additive (attr := simp)]
theorem lift_restrict (f : FreeMonoid α →* M) : lift (f ∘ of) = f

{α : Type u_1}
{M : Type u_4}
[AddMonoid M]
(f : FreeAddMonoid α →+ M)

FreeAddMonoid.lift (⇑f ∘ FreeAddMonoid.of) = f


@[simp]
theorem norm_constOfIsEmpty [IsEmpty ι] (x : G) : ‖constOfIsEmpty 𝕜 E x‖ = ‖x‖

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

‖ContinuousMultilinearMap.constOfIsEmpty 𝕜 E x‖ = ‖x‖


@[simp]
theorem unop_inv {X Y : Cᵒᵖ} (f : X ⟶ Y) [IsIso f] : (inv f).unop = inv f.unop

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y : Cᵒᵖ}
(f : X ⟶ Y)
[CategoryTheory.IsIso f]

(CategoryTheory.inv f).unop = CategoryTheory.inv f.unop


@[simp]
theorem zero_lt_top : (0 : PartENat) < ⊤


/-- Given a finset equipartitioned into `k` parts, its elements can be enumerated such that
elements in the same part have congruent indices modulo `k`. -/
theorem IsEquipartition.exists_partPreservingEquiv (hP : P.IsEquipartition) : ∃ f : s ≃ Fin s.card,
    ∀ a b : s, P.part a = P.part b ↔ f a % P.parts.card = f b % P.parts.card

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{P : Finpartition s}
(hP : P.IsEquipartition)

∃ f, ∀ (a b : { x // x ∈ s }), P.part ↑a = P.part ↑b ↔ ↑(f a) % P.parts.card = ↑(f b) % P.parts.card


theorem bot_eq_top_iff_finrank_eq_one [Nontrivial E] [Module.Free F E] :
    (⊥ : Subalgebra F E) = ⊤ ↔ finrank F E = 1

{F : Type u_1}
{E : Type u_2}
[CommRing F]
[StrongRankCondition F]
[Ring E]
[Algebra F E]
[Nontrivial E]
[Module.Free F E]

⊥ = ⊤ ↔ FiniteDimensional.finrank F E = 1


theorem perm_orderedInsert (a) : ∀ l : List α, orderedInsert r a l ~ a :: l

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

(List.orderedInsert r a l).Perm (a :: l)


theorem fderivWithin_add_const (hxs : UniqueDiffWithinAt 𝕜 s x) (c : F) :
    fderivWithin 𝕜 (fun y => f y + c) s x = fderivWithin 𝕜 f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
{s : Set E}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(c : F)


theorem inf_iSup_eq (a : α) (f : ι → α) : (a ⊓ ⨆ i, f i) = ⨆ i, a ⊓ f i

{α : Type u}
{ι : Sort w}
[Order.Frame α]
(a : α)
(f : ι → α)


theorem mapIdxGo_append : ∀ (f : ℕ → α → β) (l₁ l₂ : List α) (arr : Array β),
    mapIdx.go f (l₁ ++ l₂) arr = mapIdx.go f l₂ (List.toArray (mapIdx.go f l₁ arr))

{α : Type u}
{β : Type v}
(f : ℕ → α → β)
(l₁ l₂ : List α)
(arr : Array β)

List.mapIdx.go f (l₁ ++ l₂) arr = List.mapIdx.go f l₂ (List.toArray (List.mapIdx.go f l₁ arr))


theorem and_comm : ∀ (x y : Bool), (x && y) = (y && x)


@[simp]
theorem toFinsupp_sub [AddGroup M] [∀ m : M, Decidable (m ≠ 0)] (f g : Π₀ _ : ι, M) :
    (toFinsupp (f - g) : ι →₀ M) = toFinsupp f - toFinsupp g

{ι : Type u_1}
{M : Type u_3}
[DecidableEq ι]
[AddGroup M]
[(m : M) → Decidable (m ≠ 0)]
(f g : Π₀ (x : ι), M)

(f - g).toFinsupp = f.toFinsupp - g.toFinsupp


theorem mod_eq_zero_of_dvd {a b : Ordinal} (H : b ∣ a) : a % b = 0


@[simp]
theorem coeff_iterate_fslope (k n : ℕ) : (fslope^[k] p).coeff n = p.coeff (n + k)

{𝕜 : Type u}
{E : Type v}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{p : FormalMultilinearSeries 𝕜 𝕜 E}
(k n : ℕ)

(FormalMultilinearSeries.fslope^[k] p).coeff n = p.coeff (n + k)


@[to_additive]
theorem embedding_toContinuousMap :
    Embedding (toContinuousMap : ContinuousMonoidHom A B → C(A, B))

(A : Type u_2)
(B : Type u_3)
[Monoid A]
[Monoid B]
[TopologicalSpace A]
[TopologicalSpace B]


/-- Orbits in a `SubMulAction` coincide with orbits in the ambient space. -/
theorem val_image_orbit {p : SubMulAction R M} (m : p) :
    Subtype.val '' MulAction.orbit R m = MulAction.orbit R (m : M)

{R : Type u}
{M : Type v}
[Monoid R]
[MulAction R M]
{p : SubMulAction R M}
(m : ↥p)

Subtype.val '' MulAction.orbit R m = MulAction.orbit R ↑m


/-- If the second of three points is strictly between the other two, the angle at the first point
is zero. -/
theorem _root_.Sbtw.angle₂₁₃_eq_zero {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) : ∠ p₂ p₁ p₃ = 0

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}
(h : Sbtw ℝ p₁ p₂ p₃)


/-- The isomorphism `F.postcomp G ≅ F.postcomp G'` induced by an isomorphism `e : G ≅ G'`
which commutes with the shift. -/
@[simps!]
def postcompIsoOfIso {G G' : D ⥤ E} (e : G ≅ G') [G.CommShift A] [G'.CommShift A]
    [NatTrans.CommShift e.hom A] :
    F.postcomp G ≅ F.postcomp G'

(F : CategoryTheory.SingleFunctors C D A)

((F.postcompIsoOfIso e).inv.hom a).app X = e.inv.app ((F.functor a).obj X)


/-- The explicit pullback cone is a limit cone. -/
@[simps! lift]
def pullback.isLimit : Limits.IsLimit (pullback.cone f g)

(s : CategoryTheory.Limits.PullbackCone f g)

(Profinite.pullback.isLimit f g).lift s = Profinite.pullback.lift f g s.fst s.snd ⋯


lemma monotone_iff_apply₂ : Monotone f ↔ ∀ i, Monotone (f · i)

{ι : Type u_4}
{α : Type u_5}
{β : ι → Type u_6}
[(i : ι) → Preorder (β i)]
[Preorder α]
{f : α → (i : ι) → β i}

Monotone f ↔ ∀ (i : ι), Monotone fun x => f x i


theorem Subsingleton.einfsep (hs : s.Subsingleton) : s.einfsep = ∞

{α : Type u_1}
[EDist α]
{s : Set α}
(hs : s.Subsingleton)


theorem mapPair_equifibered {F F' : Discrete WalkingPair ⥤ C} (α : F ⟶ F') :
    NatTrans.Equifibered α

{F F' : CategoryTheory.Functor (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) C}


theorem encard_diff_add_encard_of_subset (h : s ⊆ t) : (t \ s).encard + s.encard = t.encard

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


@[simp]
theorem length_toList (s : Multiset α) : s.toList.length = card s


theorem image_image2_antidistrib {g : γ → δ} {f' : β' → α' → δ} {g₁ : β → β'} {g₂ : α → α'}
    (h_antidistrib : ∀ a b, g (f a b) = f' (g₁ b) (g₂ a)) :
    (image2 f s t).image g = image2 f' (t.image g₁) (s.image g₂)

{f : α → β → γ}

(h_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a))

g '' Set.image2 f s t = Set.image2 f' (g₁ '' t) (g₂ '' s)


/-- The language map removing an empty constant set.  -/
@[simps]
def LEquiv.addEmptyConstants [ie : IsEmpty α] : L ≃ᴸ L[[α]]

(L : FirstOrder.Language)
(α : Type w')
[ie : IsEmpty α]

(FirstOrder.Language.LEquiv.addEmptyConstants L α).toLHom = L.lhomWithConstants α


theorem LinearIndependent.repr_eq_single (i) (x : span R (range v)) (hx : ↑x = v i) :
    hv.repr x = Finsupp.single i 1

{ι : Type u'}
{R : Type u_2}
{M : Type u_4}
{v : ι → M}
[Ring R]
[AddCommGroup M]
[Module R M]
(hv : LinearIndependent R v)
(i : ι)
(x : ↥(Submodule.span R (Set.range v)))
(hx : ↑x = v i)


lemma chainTopCoeff_le_chainLength : chainTopCoeff α β ≤ chainLength α β

{K : Type u_1}
{L : Type u_2}
[Field K]
[CharZero K]
[LieRing L]
[LieAlgebra K L]
[LieAlgebra.IsKilling K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
(α β : LieModule.Weight K (↥H) L)

LieModule.chainTopCoeff (⇑α) β ≤ LieAlgebra.IsKilling.chainLength α β


@[simp] protected theorem add_zero (x : BitVec n) : x + 0#n = x


/-- **Tychonoff's theorem** formulated in terms of filters: `Filter.cocompact` on an indexed product
type `Π d, X d` the `Filter.coprodᵢ` of filters `Filter.cocompact` on `X d`. -/
theorem Filter.coprodᵢ_cocompact {X : ι → Type*} [∀ d, TopologicalSpace (X d)] :
    (Filter.coprodᵢ fun d => Filter.cocompact (X d)) = Filter.cocompact (∀ d, X d)

{ι : Type u_1}
{X : ι → Type u_3}
[(d : ι) → TopologicalSpace (X d)]

(Filter.coprodᵢ fun d => Filter.cocompact (X d)) = Filter.cocompact ((d : ι) → X d)


theorem map_lt_add {x y : R} {g : Γ₀} (hx : g < v x) (hy : g < v y) : g < v (x + y)

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(v : AddValuation R Γ₀)
{x y : R}
{g : Γ₀}
(hx : g < v x)
(hy : g < v y)


theorem add_quot {a b} : (⟨Quot.mk _ a⟩ + ⟨Quot.mk _ b⟩ : RingQuot r) = ⟨Quot.mk _ (a + b)⟩

{R : Type uR}
[Semiring R]
(r : R → R → Prop)
{a b : R}

{ toQuot := Quot.mk (RingQuot.Rel r) a } + { toQuot := Quot.mk (RingQuot.Rel r) b } =
  { toQuot := Quot.mk (RingQuot.Rel r) (a + b) }


theorem sign_mul_abs (a : ℤ) : sign a * |a| = a


theorem snd_mem_divisors_of_mem_antidiagonal {x : ℕ × ℕ} (h : x ∈ divisorsAntidiagonal n) :
    x.snd ∈ divisors n

{n : ℕ}
{x : ℕ × ℕ}
(h : x ∈ n.divisorsAntidiagonal)


/-- Given an object `Y : Karoubi (SimplicialObject C)`, this lemma
computes `PInfty` for the associated object in `SimplicialObject (Karoubi C)`
in terms of `PInfty` for `Y.X : SimplicialObject C` and `Y.p`. -/
theorem karoubi_PInfty_f {Y : Karoubi (SimplicialObject C)} (n : ℕ) :
    ((PInfty : K[(karoubiFunctorCategoryEmbedding _ _).obj Y] ⟶ _).f n).f =
      Y.p.app (op [n]) ≫ (PInfty : K[Y.X] ⟶ _).f n

{Y : CategoryTheory.Idempotents.Karoubi (CategoryTheory.SimplicialObject C)}

(AlgebraicTopology.DoldKan.PInfty.f n).f = Y.p.app (Opposite.op [n]) ≫ AlgebraicTopology.DoldKan.PInfty.f n


theorem pred_iterate_le (k : ℕ) (x : α) : pred^[k] x ≤ x

{α : Type u_1}
[Preorder α]
[PredOrder α]
(k : ℕ)
(x : α)


@[simp]
theorem sum.map_one : sum (1 : FreeGroup α) = 0


theorem alternatingGroup_eq_sign_ker : alternatingGroup α = sign.ker

{α : Type u_1}
[Fintype α]
[DecidableEq α]

alternatingGroup α = Equiv.Perm.sign.ker


{α : Type u_1}
[LinearOrderedCommMonoidWithZero α]
{a : α}


theorem Set.OrdConnected.apply_wcovBy_apply_iff (f : α ↪o β) (h : (range f).OrdConnected) :
    f a ⩿ f b ↔ a ⩿ b

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{a b : α}
(f : α ↪o β)
(h : (Set.range ⇑f).OrdConnected)


theorem isPiSystem_Ioc (f : ι → α) (g : ι' → α) :
    @IsPiSystem α { S | ∃ i j, f i < g j ∧ Ioc (f i) (g j) = S }

{α : Type u_1}
{ι : Sort u_2}
{ι' : Sort u_3}
[LinearOrder α]
(f : ι → α)
(g : ι' → α)

IsPiSystem {S | ∃ i j, f i < g j ∧ Set.Ioc (f i) (g j) = S}


@[to_additive (attr := continuity)]
theorem continuous_op : Continuous (op : M → Mᵐᵒᵖ)


theorem quotientInfEquivSupQuotient_symm_apply_eq_zero_iff {p p' : Submodule R M} {x : ↥(p ⊔ p')} :
    (quotientInfEquivSupQuotient p p').symm (Submodule.Quotient.mk x) = 0 ↔ (x : M) ∈ p'

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
{p p' : Submodule R M}
{x : ↥(p ⊔ p')}

(LinearMap.quotientInfEquivSupQuotient p p').symm (Submodule.Quotient.mk x) = 0 ↔ ↑x ∈ p'


theorem countP_eq_zero {s} : countP p s = 0 ↔ ∀ a ∈ s, ¬p a

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


@[simp]
theorem coe_inclusion {S T : NonUnitalSubalgebra R A} (h : S ≤ T) (s : S) :
    (inclusion h s : A) = s

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
{S T : NonUnitalSubalgebra R A}
(h : S ≤ T)
(s : ↥S)

↑((NonUnitalSubalgebra.inclusion h) s) = ↑s


lemma domain_eq (f : R ⟶ S) (φ : a ⟶ b) [p.IsHomLift f φ] : p.obj a = R

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₂} 𝒳]
[CategoryTheory.Category.{v₂, u₁} 𝒮]
(p : 𝒳 ⥤ 𝒮)
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
(φ : a ⟶ b)
[p.IsHomLift f φ]


/-- Alias of `Nat.cast_eq_zero`, specialized to `Ordinal` --/
theorem natCast_ne_zero {n : ℕ} : (n : Ordinal) ≠ 0 ↔ n ≠ 0

↑n ≠ 0 ↔ n ≠ 0


theorem kstar_def (a : α × β) : a∗ = (a.1∗, a.2∗)

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


@[simp] theorem coe_comp {X Y Z : TopCat.{u}} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g : X → Z) = g ∘ f

{X Y Z : TopCat}
(f : X ⟶ Y)
(g : Y ⟶ Z)


@[gcongr] protected theorem mul_lt_mul_left' (h0 : a ≠ 0) (hinf : a ≠ ⊤) (bc : b < c) :
    a * b < a * c

{a b c : ℝ≥0∞}
(h0 : a ≠ 0)
(hinf : a ≠ ⊤)
(bc : b < c)


theorem empty_nmem_countableBasis [SecondCountableTopology α] : ∅ ∉ countableBasis α

(α : Type u)
[t : TopologicalSpace α]
[SecondCountableTopology α]


/-- The Monge point of an (n+2)-simplex, minus the centroid of an
n-dimensional face, in terms of `pointsWithCircumcenter`. -/
theorem mongePoint_vsub_face_centroid_eq_weightedVSub_of_pointsWithCircumcenter {n : ℕ}
    (s : Simplex ℝ P (n + 2)) {i₁ i₂ : Fin (n + 3)} (h : i₁ ≠ i₂) :
    s.mongePoint -ᵥ ({i₁, i₂}ᶜ : Finset (Fin (n + 3))).centroid ℝ s.points =
      (univ : Finset (PointsWithCircumcenterIndex (n + 2))).weightedVSub s.pointsWithCircumcenter
        (mongePointVSubFaceCentroidWeightsWithCircumcenter i₁ i₂)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P (n + 2))
{i₁ i₂ : Fin (n + 3)}
(h : i₁ ≠ i₂)

s.mongePoint -ᵥ Finset.centroid ℝ {i₁, i₂}ᶜ s.points =
  (Finset.univ.weightedVSub s.pointsWithCircumcenter)
    (Affine.Simplex.mongePointVSubFaceCentroidWeightsWithCircumcenter i₁ i₂)


/-- If `E` is an algebraic closure of `F`, then `F` is separably closed if and only if `E / F` is
purely inseparable. -/
theorem isSepClosed_iff_isPurelyInseparable_algebraicClosure [IsAlgClosure F E] :
    IsSepClosed F ↔ IsPurelyInseparable F E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
[IsAlgClosure F E]


/-- `IsSubfield (S : Set F)` is the predicate saying that a given subset of a field is
the set underlying a subfield. This structure is deprecated; use the bundled variant
`Subfield F` to model subfields of a field. -/
structure IsSubfield extends IsSubring S : Prop where
  inv_mem : ∀ {x : F}, x ∈ S → x⁻¹ ∈ S

{F : Type u_1}
[Field F]
{S : Set F}
(self : IsSubfield S)
{x : F}

x ∈ S → x⁻¹ ∈ S


theorem sub_fst (a b : 𝓜(𝕜, A)) : (a - b).fst = a.fst - b.fst

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]
(a b : 𝓜(𝕜, A))

(a - b).toProd.1 = a.toProd.1 - b.toProd.1


theorem eq_some_of_isSome : ∀ {o : Option α} (h : o.isSome), o = some (o.get h)

{α : Type u_1}
{o : Option α}
(h : o.isSome = true)


protected theorem id : QuotientMap (@id X)


theorem coe_ennreal_nonneg (x : ℝ≥0∞) : (0 : EReal) ≤ x


/-- If a measurable space admits a countable separating family of measurable sets,
there is a countably generated coarser space which still separates points. -/
theorem exists_countablyGenerated_le_of_countablySeparated [m : MeasurableSpace α]
    [h : CountablySeparated α] :
    ∃ m' : MeasurableSpace α, @CountablyGenerated _ m' ∧ @SeparatesPoints _ m' ∧ m' ≤ m

[h : MeasurableSpace.CountablySeparated α]

∃ m', MeasurableSpace.CountablyGenerated α ∧ MeasurableSpace.SeparatesPoints α ∧ m' ≤ m


@[fun_prop]
theorem DifferentiableWithinAt.const_add (hf : DifferentiableWithinAt 𝕜 f s x) (c : F) :
    DifferentiableWithinAt 𝕜 (fun y => c + f y) s x

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


@[simp]
theorem total_mapDomain (f : α → α') (l : α →₀ R) :
    (Finsupp.total α' M' R v') (mapDomain f l) = (Finsupp.total α M' R (v' ∘ f)) l

{α : Type u_1}
(R : Type u_5)
[Semiring R]
{α' : Type u_7}
{M' : Type u_8}
[AddCommMonoid M']
[Module R M']
{v' : α' → M'}
(f : α → α')
(l : α →₀ R)

(Finsupp.total α' M' R v') (Finsupp.mapDomain f l) = (Finsupp.total α M' R (v' ∘ f)) l


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

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

((CategoryTheory.Functor.RightExtension.precomp L F G).map φ).right = CategoryTheory.CategoryStruct.id X.right


@[simp]
theorem truncate_lift (s : S) : WittVector.truncate n (lift _ f_compat s) = f n s

{f : (k : ℕ) → S →+* TruncatedWittVector p k R}

(f_compat : ∀ (k₁ k₂ : ℕ) (hk : k₁ ≤ k₂), (TruncatedWittVector.truncate hk).comp (f k₂) = f k₁)

(WittVector.truncate n) ((WittVector.lift f f_compat) s) = (f n) s


@[simp]
theorem toSubring_one :
    toSubring (1 : R[X]) T
        (Set.Subset.trans coeffs_one <| Finset.singleton_subset_set_iff.2 T.one_mem) =
      1


/-- This structure contains the data of three left fractions for
`W : MorphismProperty C` that have the same "denominator". -/
structure LeftFraction₃ (X Y : C) where
  /-- the auxiliary object of left fractions -/
  {Y' : C}
  /-- the numerator of the first left fraction -/
  f : X ⟶ Y'
  /-- the numerator of the second left fraction -/
  f' : X ⟶ Y'
  /-- the numerator of the third left fraction -/
  f'' : X ⟶ Y'
  /-- the denominator of the left fractions -/
  s : Y ⟶ Y'
  /-- the condition that the denominator belongs to the given morphism property -/
  hs : W s

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(self : W.LeftFraction₃ X Y)


theorem hasInitial_of_hasTerminal_op [HasTerminal Cᵒᵖ] : HasInitial C

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasTerminal Cᵒᵖ]


@[to_additive (attr := simp)]
theorem liftExpand_of {C : Sort*} {P : X → S → C}
    {hP : ∀ (r : X) (t : R) (s : S) (ht : t * s ∈ S), P r s = P (t • r) ⟨t * s, ht⟩} (r : X)
    (s : S) : liftExpand P hP (r /ₒ s) = P r s

{hP : ∀ (r : X) (t : R) (s : ↥S) (ht : t + ↑s ∈ S), P r s = P (t +ᵥ r) ⟨t + ↑s, ht⟩}

AddOreLocalization.liftExpand P hP (r -ₒ s) = P r s


theorem iteratedDerivWithin_const_neg (hn : 0 < n) (c : F) :
    iteratedDerivWithin n (fun z => c - f z) s x = iteratedDerivWithin n (fun z => -f z) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ}
{x : 𝕜}
{s : Set 𝕜}
(hx : x ∈ s)
(h : UniqueDiffOn 𝕜 s)
{f : 𝕜 → F}
(hn : 0 < n)
(c : F)


@[reassoc (attr := simp)]
lemma pullback.lift_fst {Z : Profinite.{u}} (a : Z ⟶ X) (b : Z ⟶ Y) (w : a ≫ f = b ≫ g) :
    pullback.lift f g a b w ≫ pullback.fst f g = a

(w : CategoryTheory.CategoryStruct.comp a f = CategoryTheory.CategoryStruct.comp b g)

CategoryTheory.CategoryStruct.comp (Profinite.pullback.lift f g a b w) (Profinite.pullback.fst f g) = a


theorem IsWF.min_le (hs : s.IsWF) (hn : s.Nonempty) (ha : a ∈ s) : hs.min hn ≤ a

{α : Type u_2}
[LinearOrder α]
{s : Set α}
{a : α}
(hs : s.IsWF)
(hn : s.Nonempty)
(ha : a ∈ s)


@[to_additive (attr := continuity, fun_prop)]
theorem continuous_one [TopologicalSpace M] [One M] : Continuous (1 : X → M)

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[One M]


theorem isHomogeneous_X (i : σ) : IsHomogeneous (X i : MvPolynomial σ R) 1

{σ : Type u_1}
(R : Type u_3)
[CommSemiring R]
(i : σ)


theorem setToL1_lipschitz (hT : DominatedFinMeasAdditive μ T C) :
    LipschitzWith (Real.toNNReal C) (setToL1 hT)

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

LipschitzWith C.toNNReal ⇑(MeasureTheory.L1.setToL1 hT)


@[to_additive (attr := simp)]
theorem const_le_one : const β a ≤ 1 ↔ a ≤ 1

{α : Type u_3}
{β : Type u_4}
[One α]
[Preorder α]
{a : α}
[Nonempty β]


theorem product_eq_biUnion_right [DecidableEq (α × β)] (s : Finset α) (t : Finset β) :
    s ×ˢ t = t.biUnion fun b => s.image fun a => (a, b)

{α : Type u_1}
{β : Type u_2}
[DecidableEq (α × β)]
(s : Finset α)
(t : Finset β)

s ×ˢ t = t.biUnion fun b => Finset.image (fun a => (a, b)) s


/-- Canonical prefunctor from `B` to `free_bicategory B`. -/
@[simps]
def of : Prefunctor B (FreeBicategory B)

∀ (x x_1 : B) (f : x ⟶ x_1), CategoryTheory.FreeBicategory.of.map f = CategoryTheory.FreeBicategory.Hom.of f


theorem biprod.braiding'_eq_braiding {P Q : C} : biprod.braiding' P Q = biprod.braiding P Q

CategoryTheory.Limits.biprod.braiding' P Q = CategoryTheory.Limits.biprod.braiding P Q


/-- A free module with a basis indexed by a `Fintype` is finite. -/
theorem _root_.Module.Finite.of_basis {R M ι : Type*} [Semiring R] [AddCommMonoid M] [Module R M]
    [_root_.Finite ι] (b : Basis ι R M) : Module.Finite R M

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


theorem succ_inj' : succ a = succ b ↔ a = b


/-- A finitely strongly measurable function is strongly measurable. -/
@[aesop 5% apply (rule_sets := [Measurable])]
protected theorem stronglyMeasurable [Zero β] [TopologicalSpace β]
    (hf : FinStronglyMeasurable f μ) : StronglyMeasurable f

(hf : MeasureTheory.FinStronglyMeasurable f μ)


/-- Left-multiplication by a left-invertible element of a topological monoid is proper, i.e.,
inverse images of compact sets are compact. -/
theorem Filter.tendsto_cocompact_mul_left {a b : M} (ha : b * a = 1) :
    Filter.Tendsto (fun x : M => a * x) (Filter.cocompact M) (Filter.cocompact M)

{M : Type u_3}
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
{a b : M}
(ha : b * a = 1)

Filter.Tendsto (fun x => a * x) (Filter.cocompact M) (Filter.cocompact M)


/-- If `μ` is a non-zero finite measure on `α`, `s` is a convex closed set in `E`, and `f` is an
integrable function sending `μ`-a.e. points to `s`, then the average value of `f` belongs to `s`:
`⨍ x, f x ∂μ ∈ s`. See also `Convex.centerMass_mem` for a finite sum version of this lemma. -/
theorem Convex.set_average_mem (hs : Convex ℝ s) (hsc : IsClosed s) (h0 : μ t ≠ 0) (ht : μ t ≠ ∞)
    (hfs : ∀ᵐ x ∂μ.restrict t, f x ∈ s) (hfi : IntegrableOn f t μ) : (⨍ x in t, f x ∂μ) ∈ s

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

(hfi : MeasureTheory.IntegrableOn f t μ)


/-- A dilation from a metric space is a uniform embedding -/
protected theorem uniformEmbedding [PseudoEMetricSpace β] [DilationClass F α β] (f : F) :
    UniformEmbedding f

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


lemma integrable_preCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℚ) :
    Integrable (fun a ↦ (preCDF ρ x a).toReal) ρ.fst

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
[MeasureTheory.IsFiniteMeasure ρ]
(x : ℚ)

MeasureTheory.Integrable (fun a => (ProbabilityTheory.preCDF ρ x a).toReal) ρ.fst


theorem bindOnSupport_pure (p : PMF α) : (p.bindOnSupport fun a _ => pure a) = p

(p.bindOnSupport fun a x => PMF.pure a) = p


theorem surjOn_Iic_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f)
    (a : α) : SurjOn f (Iic a) (Iic (f a))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[PartialOrder β]
{f : α → β}
(h_mono : Monotone f)
(h_surj : Function.Surjective f)
(a : α)

Set.SurjOn f (Set.Iic a) (Set.Iic (f a))


{K : Type u}
[Field K]
(A : ValuationSubring K)


@[to_additive, field_simps] -- The attributes are out of order on purpose
theorem mul_div_assoc' (a b c : G) : a * (b / c) = a * b / c

{G : Type u_3}
[SubNegMonoid G]
(a b c : G)


@[simp, norm_cast]
theorem coe_intCast (n : ℤ) : ((n : s) : R) = n

{R : Type u}
{S : Type v}
[Ring R]
[SetLike S R]
[hSR : SubringClass S R]
(s : S)
(n : ℤ)


theorem HasFDerivWithinAt.rpow (hf : HasFDerivWithinAt f f' s x) (hg : HasFDerivWithinAt g g' s x)
    (h : 0 < f x) : HasFDerivWithinAt (fun x => f x ^ g x)
      ((g x * f x ^ (g x - 1)) • f' + (f x ^ g x * Real.log (f x)) • g') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : E → ℝ}
{f' g' : E →L[ℝ] ℝ}
{x : E}
{s : Set E}
(hf : HasFDerivWithinAt f f' s x)
(hg : HasFDerivWithinAt g g' s x)
(h : 0 < f x)


lemma ofLowerSet_le_iff {a b : WithLowerSet α} : ofLowerSet a ≤ ofLowerSet b ↔ a ≤ b

{α : Type u_1}
[Preorder α]
{a b : Topology.WithLowerSet α}

Topology.WithLowerSet.ofLowerSet a ≤ Topology.WithLowerSet.ofLowerSet b ↔ a ≤ b


@[simp]
theorem fullyFaithfulCancelRight_inv_app {F G : C ⥤ D} {H : D ⥤ E} [Full H] [H.Faithful]
    (comp_iso : F ⋙ H ≅ G ⋙ H) (X : C) :
    (fullyFaithfulCancelRight H comp_iso).inv.app X = H.preimage (comp_iso.inv.app X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{F G : CategoryTheory.Functor C D}
{H : CategoryTheory.Functor D E}
[H.Full]
[H.Faithful]
(comp_iso : F.comp H ≅ G.comp H)
(X : C)

(CategoryTheory.Functor.fullyFaithfulCancelRight H comp_iso).inv.app X = H.preimage (comp_iso.inv.app X)


theorem offDiag_union (h : Disjoint s t) :
    (s ∪ t).offDiag = s.offDiag ∪ t.offDiag ∪ s ×ˢ t ∪ t ×ˢ s

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


/-- `sigmaFiberEquiv f` for `f : α → β` is the natural equivalence between
the type of all fibres of `f` and the total space `α`. -/
@[simps]
def sigmaFiberEquiv {α β : Type*} (f : α → β) : (Σ y : β, { x // f x = y }) ≃ α

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(x : (y : β) × { x // f x = y })


private theorem associator_naturality_aux {X₁ X₂ X₃ : Type*} [AddCommMonoid X₁] [AddCommMonoid X₂]
    [AddCommMonoid X₃] [Module R X₁] [Module R X₂] [Module R X₃] {Y₁ Y₂ Y₃ : Type*}
    [AddCommMonoid Y₁] [AddCommMonoid Y₂] [AddCommMonoid Y₃] [Module R Y₁] [Module R Y₂]
    [Module R Y₃] (f₁ : X₁ →ₗ[R] Y₁) (f₂ : X₂ →ₗ[R] Y₂) (f₃ : X₃ →ₗ[R] Y₃) :
    ↑(assoc R Y₁ Y₂ Y₃) ∘ₗ map (map f₁ f₂) f₃ = map f₁ (map f₂ f₃) ∘ₗ ↑(assoc R X₁ X₂ X₃)

{R : Type u}
[CommRing R]
{X₁ : Type u_1}
{X₂ : Type u_2}
{X₃ : Type u_3}
[AddCommMonoid X₁]
[AddCommMonoid X₂]
[AddCommMonoid X₃]
[Module R X₁]
[Module R X₂]
[Module R X₃]
{Y₁ : Type u_4}
{Y₂ : Type u_5}
{Y₃ : Type u_6}
[AddCommMonoid Y₁]
[AddCommMonoid Y₂]
[AddCommMonoid Y₃]
[Module R Y₁]
[Module R Y₂]
[Module R Y₃]
(f₁ : X₁ →ₗ[R] Y₁)
(f₂ : X₂ →ₗ[R] Y₂)
(f₃ : X₃ →ₗ[R] Y₃)

↑(TensorProduct.assoc R Y₁ Y₂ Y₃) ∘ₗ TensorProduct.map (TensorProduct.map f₁ f₂) f₃ =
  TensorProduct.map f₁ (TensorProduct.map f₂ f₃) ∘ₗ ↑(TensorProduct.assoc R X₁ X₂ X₃)


@[simp]
lemma symm_trans_self (e : G ≃+c[a, b] H) : e.symm.trans e = .refl b

{G : Type u_1}
{H : Type u_2}
[Add G]
[Add H]
{a : G}
{b : H}
(e : G ≃+c[a, b] H)


theorem _root_.Disjoint.exists_mem_filter_basis (h : Disjoint l l') (hl : l.HasBasis p s)
    (hl' : l'.HasBasis p' s') : ∃ i, p i ∧ ∃ i', p' i' ∧ Disjoint (s i) (s' i')

{α : Type u_1}
{ι : Sort u_4}
{ι' : Sort u_5}
{l l' : Filter α}
{p : ι → Prop}
{s : ι → Set α}
{p' : ι' → Prop}
{s' : ι' → Set α}
(h : Disjoint l l')
(hl : l.HasBasis p s)
(hl' : l'.HasBasis p' s')


theorem memℒp_snd [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h : IdentDistrib f g μ ν)
    (hf : Memℒp f p μ) : Memℒp g p ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)


theorem of_div (h : a / c ≡ b / c [MOD m / c]) (ha : c ∣ a) (ha : c ∣ b) (ha : c ∣ m) :
    a ≡ b [MOD m]

{m a b c : ℕ}
(h : a / c ≡ b / c [MOD m / c])
(ha : c ∣ a)


@[simp]
theorem add_tsub_cancel_left (a b : α) : a + b - a = b

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


theorem pairwise_lt (n m : ℕ) : Pairwise (· < ·) (Ico n m)

List.Pairwise (fun x x_1 => x < x_1) (List.Ico n m)


theorem comapDomain_add (v₁ v₂ : β →₀ M) (hv₁ : Set.InjOn f (f ⁻¹' ↑v₁.support))
    (hv₂ : Set.InjOn f (f ⁻¹' ↑v₂.support)) (hv₁₂ : Set.InjOn f (f ⁻¹' ↑(v₁ + v₂).support)) :
    comapDomain f (v₁ + v₂) hv₁₂ = comapDomain f v₁ hv₁ + comapDomain f v₂ hv₂

Finsupp.comapDomain f (v₁ + v₂) hv₁₂ = Finsupp.comapDomain f v₁ hv₁ + Finsupp.comapDomain f v₂ hv₂


theorem destruct_eq_nil {s : Seq α} : destruct s = none → s = nil


/-- Given `(S : Solution)`, we have that `λ ∣ (S.a + η * S.b)`. -/
lemma lambda_dvd_a_add_eta_mul_b : λ ∣ (S.a + η * S.b)

(S : FermatLastTheoremForThreeGen.Solution hζ)


theorem map_bind₁ (f : R →+* S) (g : σ → MvPolynomial τ R) (φ : MvPolynomial σ R) :
    map f (bind₁ g φ) = bind₁ (fun i : σ => (map f) (g i)) (map f φ)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
(f : R →+* S)
(g : σ → MvPolynomial τ R)
(φ : MvPolynomial σ R)

(MvPolynomial.map f) ((MvPolynomial.bind₁ g) φ) =
  (MvPolynomial.bind₁ fun i => (MvPolynomial.map f) (g i)) ((MvPolynomial.map f) φ)


theorem erase_sdiff_comm (s t : Finset α) (a : α) : s.erase a \ t = (s \ t).erase a

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


@[simp] theorem drop_tail' {i : ℕ} {s : Stream' α} : drop i (tail s) = s.drop (i+1)

Stream'.drop i s.tail = Stream'.drop (i + 1) s


@[simp]
theorem ite_left (s t : Set α) : s.ite s t = s ∪ t


@[simp]
theorem AddMonoidHom.coe_toIntLinearMap [AddCommGroup M] [AddCommGroup M₂] (f : M →+ M₂) :
    ⇑f.toIntLinearMap = f

{M : Type u_9}
{M₂ : Type u_11}
[AddCommGroup M]
[AddCommGroup M₂]
(f : M →+ M₂)


@[to_additive]
theorem exists_one_lt_mul_of_lt' (h : a < b) : ∃ c, 1 < c ∧ a * c = b

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


@[trans]
theorem Equiv.trans {s t u : Computation α} : s ~ t → t ~ u → s ~ u


theorem range_comp_le_range (f : M →[L] N) (g : N →[L] P) : range (g.comp f : M →[L] P) ≤ range g

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
{P : Type u_2}
[L.Structure M]
[L.Structure N]
[L.Structure P]
(f : L.Hom M N)
(g : L.Hom N P)


@[to_additive zsmul_strictMono_right]
lemma zpow_strictMono_left (hn : 0 < n) : StrictMono ((· ^ n) : α → α)

(α : Type u_1)
[OrderedCommGroup α]
{n : ℤ}
(hn : 0 < n)


/-- Whiskering a 1-morphism is a functor. -/
@[simps]
def whiskering {x : B} (h : c ⟶ x) : LeftExtension f g ⥤ LeftExtension f (g ≫ h)

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

∀ {X Y : CategoryTheory.Bicategory.LeftExtension f g} (η : X ⟶ Y),
  (CategoryTheory.Bicategory.LeftExtension.whiskering h).map η =
    CategoryTheory.Bicategory.LeftExtension.homMk (CategoryTheory.Bicategory.whiskerRight η.right h) ⋯


theorem le_cofinite_iff_eventually_ne : l ≤ cofinite ↔ ∀ x, ∀ᶠ y in l, y ≠ x

l ≤ Filter.cofinite ↔ ∀ (x : α), ∀ᶠ (y : α) in l, y ≠ x


theorem norm_nonneg (f : PadicSeq p) : 0 ≤ f.norm

{p : ℕ}
[Fact (Nat.Prime p)]
(f : PadicSeq p)


@[simp]
theorem sum_mk : sum (mk L) = List.sum (L.map fun x => cond x.2 x.1 (-x.1))

{α : Type u}
{L : List (α × Bool)}
[AddGroup α]

(FreeGroup.mk L).sum = (List.map (fun x => bif x.2 then x.1 else -x.1) L).sum


/-- Promote a `Fin n` into a larger `Fin m`, as a subtype where the underlying
values are retained. This is the `OrderIso` version of `Fin.castLE`. -/
@[simps apply symm_apply]
def Fin.castLEOrderIso {n m : ℕ} (h : n ≤ m) : Fin n ≃o { i : Fin m // (i : ℕ) < n }

(RelIso.symm (Fin.castLEOrderIso h)) i = ⟨↑↑i, ⋯⟩


theorem dist_lt_of_dist_lt_modulus (f : C(α, β)) (ε : ℝ) (h : 0 < ε) {a b : α}
    (w : dist a b < f.modulus ε h) : dist (f a) (f b) < ε

{α : Type u_1}
{β : Type u_2}
[MetricSpace α]
[CompactSpace α]
[MetricSpace β]
(f : C(α, β))
(ε : ℝ)
(h : 0 < ε)
{a b : α}
(w : dist a b < f.modulus ε h)


@[simp]
theorem smul_apply (f : ContinuousMultilinearMap A M₁ M₂) (c : R') (m : ∀ i, M₁ i) :
    (c • f) m = c • f m

{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
{R' : Type u_1}
{A : Type u_3}
[Monoid R']
[Semiring A]
[(i : ι) → Module A (M₁ i)]
[Module A M₂]
[DistribMulAction R' M₂]
[ContinuousConstSMul R' M₂]
[SMulCommClass A R' M₂]
(f : ContinuousMultilinearMap A M₁ M₂)
(c : R')
(m : (i : ι) → M₁ i)


theorem Iic_subset_Iio_union_Icc : Iic b ⊆ Iio a ∪ Icc a b

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


@[to_additive zsmul_pos] lemma one_lt_zpow' (ha : 1 < a) (hn : 0 < n) : 1 < a ^ n

{α : Type u_1}
[OrderedCommGroup α]
{n : ℤ}
{a : α}
(ha : 1 < a)
(hn : 0 < n)


@[simp, deprecated not_top_lt "Don't mix Option and WithTop" (since := "2024-05-27")]
theorem not_none_lt (a : WithTop α) : ¬@LT.lt (WithTop α) _ none a


@[simp]
theorem coe_finsetBasisOfLinearIndependentOfCardEqFinrank {s : Finset V} (hs : s.Nonempty)
    (lin_ind : LinearIndependent K ((↑) : s → V)) (card_eq : s.card = finrank K V) :
    ⇑(finsetBasisOfLinearIndependentOfCardEqFinrank hs lin_ind card_eq) = ((↑) : s → V)

(lin_ind : LinearIndependent K Subtype.val)

(card_eq : s.card = FiniteDimensional.finrank K V)

⇑(finsetBasisOfLinearIndependentOfCardEqFinrank hs lin_ind card_eq) = Subtype.val


theorem lift_card_closure_le_card_term : Cardinal.lift.{max u w} #(closure L s) ≤ #(L.Term s)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{s : Set M}

Cardinal.lift.{max u w, w} (Cardinal.mk ↥((FirstOrder.Language.Substructure.closure L).toFun s)) ≤
  Cardinal.mk (L.Term ↑s)


theorem exists_pos_left_iff_sameRay_and_ne_zero (hx : x ≠ 0) :
    (∃ r : R, 0 < r ∧ r • x = y) ↔ SameRay R x y ∧ y ≠ 0

{R : Type u_1}
[LinearOrderedField R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}
(hx : x ≠ 0)

(∃ r, 0 < r ∧ r • x = y) ↔ SameRay R x y ∧ y ≠ 0


theorem nat_le : PrimrecRel ((· ≤ ·) : ℕ → ℕ → Prop)


@[to_additive]
theorem tprod_eq_mulSingle {f : β → α} (b : β) (hf : ∀ b' ≠ b, f b' = 1) :
    ∏' b, f b = f b

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
(b : β)
(hf : ∀ (b' : β), b' ≠ b → f b' = 0)


theorem isClosedMap_ofAdd : IsClosedMap (ofAdd : X → Multiplicative X)


@[simp]
theorem algEquiv_eq (f : B ≃ₐ[A] B') (x : B) : minpoly A (f x) = minpoly A x

{A : Type u_1}
{B : Type u_2}
{B' : Type u_3}
[CommRing A]
[Ring B]
[Ring B']
[Algebra A B]
[Algebra A B']
(f : B ≃ₐ[A] B')
(x : B)


/-- Do not use this lemma: It is made obsolete by `exists_right_complement'_of_coprime` -/
private theorem step6 : IsPGroup (Nat.card N).minFac N

(h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Finite G'],
    Nat.card G' < Nat.card G →
      ∀ {N' : Subgroup G'} [inst_2 : N'.Normal], (Nat.card ↥N').Coprime N'.index → ∃ H', N'.IsComplement' H')

(h3 : ∀ (H : Subgroup G), ¬N.IsComplement' H)


theorem le_count_iff_replicate_sublist {l : List α} : n ≤ count a l ↔ replicate n a <+ l

{α : Type u_1}
[DecidableEq α]
{n : Nat}
{a : α}
{l : List α}

n ≤ List.count a l ↔ List.replicate n a <+ l


theorem transAssocReparamAux_zero : transAssocReparamAux 0 = 0

Path.Homotopy.transAssocReparamAux 0 = 0


theorem diophFn_comp2 {h : ℕ → ℕ → ℕ} (d : DiophFn fun v : Vector3 ℕ 2 => h (v &0) (v &1)) :
    DiophFn fun v => h (f v) (g v)

{h : ℕ → ℕ → ℕ}

(d : Dioph.DiophFn fun v => h (v (Fin2.ofNat' 0)) (v (Fin2.ofNat' 1)))


/-- Derivative under integral of `x ↦ ∫ F x a` at a given point `x₀ : 𝕜`, `𝕜 = ℝ` or `𝕜 = ℂ`,
assuming `F x₀` is integrable, `x ↦ F x a` is differentiable on an interval around `x₀` for ae `a`
(with interval radius independent of `a`) with derivative uniformly bounded by an integrable
function, and `F x` is ae-measurable for `x` in a possibly smaller neighborhood of `x₀`. -/
nonrec theorem hasDerivAt_integral_of_dominated_loc_of_deriv_le
    {F : 𝕜 → ℝ → E} {F' : 𝕜 → ℝ → E} {x₀ : 𝕜}
    (ε_pos : 0 < ε) (hF_meas : ∀ᶠ x in 𝓝 x₀, AEStronglyMeasurable (F x) (μ.restrict (Ι a b)))
    (hF_int : IntervalIntegrable (F x₀) μ a b)
    (hF'_meas : AEStronglyMeasurable (F' x₀) (μ.restrict (Ι a b)))
    (h_bound : ∀ᵐ t ∂μ, t ∈ Ι a b → ∀ x ∈ ball x₀ ε, ‖F' x t‖ ≤ bound t)
    (bound_integrable : IntervalIntegrable bound μ a b)
    (h_diff : ∀ᵐ t ∂μ, t ∈ Ι a b → ∀ x ∈ ball x₀ ε, HasDerivAt (fun x => F x t) (F' x t) x) :
    IntervalIntegrable (F' x₀) μ a b ∧
      HasDerivAt (fun x => ∫ t in a..b, F x t ∂μ) (∫ t in a..b, F' x₀ t ∂μ) x₀

(hF_meas : ∀ᶠ (x : 𝕜) in 𝓝 x₀, MeasureTheory.AEStronglyMeasurable (F x) (μ.restrict (Ι a b)))

(hF'_meas : MeasureTheory.AEStronglyMeasurable (F' x₀) (μ.restrict (Ι a b)))

(h_bound : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ∀ x ∈ Metric.ball x₀ ε, ‖F' x t‖ ≤ bound t)

(h_diff : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ∀ x ∈ Metric.ball x₀ ε, HasDerivAt (fun x => F x t) (F' x t) x)

IntervalIntegrable (F' x₀) μ a b ∧ HasDerivAt (fun x => ∫ (t : ℝ) in a..b, F x t ∂μ) (∫ (t : ℝ) in a..b, F' x₀ t ∂μ) x₀


/-- `qrSign` is symmetric when both arguments are odd. -/
protected theorem symm {m n : ℕ} (hm : Odd m) (hn : Odd n) : qrSign m n = qrSign n m


/-- 1 is weighted homogeneous of degree 0. -/
theorem isWeightedHomogeneous_one (w : σ → M) : IsWeightedHomogeneous w (1 : MvPolynomial σ R) 0

(R : Type u_1)
{M : Type u_2}
[CommSemiring R]
{σ : Type u_3}
[AddCommMonoid M]
(w : σ → M)

MvPolynomial.IsWeightedHomogeneous w 1 0


theorem map_map_of_aemeasurable {g : β → γ} {f : α → β} (hg : AEMeasurable g (Measure.map f μ))
    (hf : AEMeasurable f μ) : (μ.map f).map g = μ.map (g ∘ f)

(hg : AEMeasurable g (MeasureTheory.Measure.map f μ))

MeasureTheory.Measure.map g (MeasureTheory.Measure.map f μ) = MeasureTheory.Measure.map (g ∘ f) μ


theorem _root_.TendstoLocallyUniformlyOn.deriv (hf : TendstoLocallyUniformlyOn F f φ U)
    (hF : ∀ᶠ n in φ, DifferentiableOn ℂ (F n) U) (hU : IsOpen U) :
    TendstoLocallyUniformlyOn (deriv ∘ F) (deriv f) φ U

(hF : ∀ᶠ (n : ι) in φ, DifferentiableOn ℂ (F n) U)


protected theorem lt_ediv_of_mul_lt {a b c : Int} (H1 : 0 ≤ b) (H2 : b ∣ c) (H3 : a * b < c) :
    a < c / b


/-- `unitInterval.symm` as a `Homeomorph`. -/
@[simps]
def symmHomeomorph : I ≃ₜ I

∀ (a : ↑unitInterval), unitInterval.symmHomeomorph a = unitInterval.symm a


/-- If `s` is a countable family of compact sets, `f` is a continuous function, and the sequence
`‖f.restrict (s i)‖ * μ (s i)` is summable, then `f` is integrable on the union of the `s i`. -/
theorem integrableOn_iUnion_of_summable_norm_restrict {f : C(X, E)} {s : ι → Compacts X}
    (hf : Summable fun i : ι => ‖f.restrict (s i)‖ * ENNReal.toReal (μ <| s i)) :
    IntegrableOn f (⋃ i : ι, s i) μ

(hf : Summable fun i => ‖ContinuousMap.restrict (↑(s i)) f‖ * (μ ↑(s i)).toReal)

MeasureTheory.IntegrableOn (⇑f) (⋃ i, ↑(s i)) μ


@[simp]
theorem vectorAllP_nil (p : α → Prop) : VectorAllP p [] = True


theorem modifyNthTail_add (f : List α → List α) (n) (l₁ l₂ : List α) :
    modifyNthTail f (l₁.length + n) (l₁ ++ l₂) = l₁ ++ modifyNthTail f n l₂

{α : Type u_1}
(f : List α → List α)
(n : Nat)
(l₁ l₂ : List α)

List.modifyNthTail f (l₁.length + n) (l₁ ++ l₂) = l₁ ++ List.modifyNthTail f n l₂


@[simp]
lemma inl_comp_binaryCoproductIso_inv_apply (a : C) (x : F.obj a) :
    (binaryCoproductIso F G).inv.app a (.inl x) = (Limits.coprod.inl (X := F)).app a x

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

(CategoryTheory.FunctorToTypes.binaryCoproductIso F G).inv.app a (Sum.inl x) = CategoryTheory.Limits.coprod.inl.app a x


theorem ContDiffOn.fderiv_of_isOpen (hf : ContDiffOn 𝕜 n f s) (hs : IsOpen s) (hmn : m + 1 ≤ n) :
    ContDiffOn 𝕜 m (fun y => fderiv 𝕜 f y) s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{m n : ℕ∞}
(hf : ContDiffOn 𝕜 n f s)
(hs : IsOpen s)
(hmn : m + 1 ≤ n)


protected theorem dvd_def (a b : Int) : (a ∣ b) = Exists (fun c => b = a * c)


@[to_additive]
theorem iUnion_mul_left_image : ⋃ a ∈ s, (a * ·) '' t = s * t


@[simp]
theorem succAbove_cases_eq_insertNth : @succAboveCases.{u + 1} = @insertNth.{u}


theorem Submodule.mapsTo_smul_closure (s : Submodule R M) (c : R) :
    Set.MapsTo (c • ·) (closure s : Set M) (closure s)

{R : Type u}
{M : Type v}
[Semiring R]
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
[ContinuousConstSMul R M]
(s : Submodule R M)
(c : R)

Set.MapsTo (fun x => c • x) (closure ↑s) (closure ↑s)


@[simp]
theorem coe_mk (e : E ≃ₛₗ[σ₁₂] E₂) (he : ∀ x, ‖e x‖ = ‖x‖) : ⇑(mk e he) = e

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(e : E ≃ₛₗ[σ₁₂] E₂)
(he : ∀ (x : E), ‖e x‖ = ‖x‖)

⇑{ toLinearEquiv := e, norm_map' := he } = ⇑e


/-- `biprodComparison' F X Y` is a split mono. -/
@[simps]
def splitMonoBiprodComparison' : SplitMono (biprodComparison' F X Y)

[CategoryTheory.Limits.HasBinaryBiproduct (F.obj X) (F.obj Y)]

(F.splitMonoBiprodComparison' X Y).retraction = F.biprodComparison X Y


@[to_additive]
protected theorem inv_inv : Commute a b → Commute a⁻¹ b⁻¹

{G : Type u_1}
[DivisionMonoid G]
{a b : G}


lemma CstarRing.conjugate_le_norm_smul {a b : A} (hb : IsSelfAdjoint b := by cfc_tac) :
    star a * b * a ≤ ‖b‖ • (star a * a)

{A : Type u_1}
[NonUnitalNormedRing A]
[CompleteSpace A]
[PartialOrder A]
[StarRing A]
[StarOrderedRing A]
[CstarRing A]
[NormedSpace ℂ A]
[StarModule ℂ A]
[SMulCommClass ℂ A A]
[IsScalarTower ℂ A A]
{a b : A}
(hb : IsSelfAdjoint b := by cfc_tac)


/-- The `covolume` can be computed by taking the `volume` of any given fundamental domain `s`. -/
@[to_additive]
lemma IsFundamentalDomain.covolume_eq_volume (ν : Measure α) [Countable G]
    [MeasurableSMul G α] [SMulInvariantMeasure G α ν] {s : Set α}
    (fund_dom_s : IsFundamentalDomain G s ν) : covolume G α ν = ν s

[MeasureTheory.VAddInvariantMeasure G α ν]

(fund_dom_s : MeasureTheory.IsAddFundamentalDomain G s ν)


theorem EventuallyEq.cardinal_iInter {s t : ι → Set α} (hic : #ι < c)
    (h : ∀ i, s i =ᶠ[l] t i) : ⋂ i, s i =ᶠ[l] ⋂ i, t i

{ι α : Type u}
{c : Cardinal.{u}}
{l : Filter α}
[CardinalInterFilter l c]
{s t : ι → Set α}
(hic : #ι < c)
(h : ∀ (i : ι), s i =ᶠ[l] t i)


@[simp]
theorem sin_int_mul_pi (n : ℤ) : sin (n * π) = 0


lemma egauge_eq_top : egauge 𝕜 s x = ∞ ↔ ∀ c : 𝕜, x ∉ c • s

{𝕜 : Type u_1}
[NNNorm 𝕜]
{E : Type u_2}
[SMul 𝕜 E]
{s : Set E}
{x : E}


@[to_additive]
lemma isOpenMap_mul_left (a : G) : IsOpenMap (a * ·)

{G : Type w}
[TopologicalSpace G]
[Group G]
[ContinuousMul G]
(a : G)


/-- Typeclass for division rounded down. For each `a > 0`, this asserts the existence of a right
adjoint to the map `b ↦ a • b : β → β`. -/
class FloorDiv where
  /-- Flooring division. If `a > 0`, then `b ⌊/⌋ a` is the greatest `c` such that `a • c ≤ b`. -/
  floorDiv : β → α → β
  /-- Do not use this. Use `gc_floorDiv_smul` or `gc_floorDiv_mul` instead. -/
  protected floorDiv_gc ⦃a⦄ : 0 < a → GaloisConnection (a • ·) (floorDiv · a)
  /-- Do not use this. Use `floorDiv_nonpos` instead. -/
  protected floorDiv_nonpos ⦃a⦄ : a ≤ 0 → ∀ b, floorDiv b a = 0
  /-- Do not use this. Use `zero_floorDiv` instead. -/
  protected zero_floorDiv (a) : floorDiv 0 a = 0

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[self : FloorDiv α β]
⦃a : α⦄

0 < a → GaloisConnection (fun x => a • x) fun x => x ⌊/⌋ a


theorem le_mul_tsub {R : Type*} [Distrib R] [Preorder R] [Sub R] [OrderedSub R]
    [CovariantClass R R (· * ·) (· ≤ ·)] {a b c : R} : a * b - a * c ≤ a * (b - c)

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


lemma lie_h_pow_toEnd_f (n : ℕ) :
    ⁅h, ψ n⁆ = (μ - 2 * n) • ψ n

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{h e f : L}
{m : M}
{μ : R}
{t : IsSl2Triple h e f}
(P : t.HasPrimitiveVectorWith m μ)
(n : ℕ)

⁅h, ((LieModule.toEnd R L M) f ^ n) m⁆ = (μ - 2 * ↑n) • ((LieModule.toEnd R L M) f ^ n) m


@[simp]
theorem eval₂_map [CommSemiring S₂] (f : R →+* S₁) (g : σ → S₂) (φ : S₁ →+* S₂)
    (p : MvPolynomial σ R) : eval₂ φ g (map f p) = eval₂ (φ.comp f) g p

{R : Type u}
{S₁ : Type v}
{S₂ : Type w}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[CommSemiring S₂]
(f : R →+* S₁)
(g : σ → S₂)
(φ : S₁ →+* S₂)
(p : MvPolynomial σ R)

MvPolynomial.eval₂ φ g ((MvPolynomial.map f) p) = MvPolynomial.eval₂ (φ.comp f) g p


lemma isLocalDiffeomorph_iff {f : M → N} :
    IsLocalDiffeomorph I J n f ↔ ∀ x : M, IsLocalDiffeomorphAt I J n f x

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

IsLocalDiffeomorph I J n f ↔ ∀ (x : M), IsLocalDiffeomorphAt I J n f x


/-- A Klein four-group is a group of cardinality four and exponent two. -/
@[to_additive existing IsAddKleinFour]
class IsKleinFour (G : Type*) [Group G] : Prop where
  card_four : Nat.card G = 4
  exponent_two : Monoid.exponent G = 2

{G : Type u_1}
[Group G]
[self : IsKleinFour G]


@[simp]
lemma baseChange_top : (⊤ : Submodule R M).baseChange A = ⊤

{R : Type u_1}
{M : Type u_2}
(A : Type u_3)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]


@[to_additive]
theorem mulIndicator_mulIndicator (s t : Set α) (f : α → M) :
    mulIndicator s (mulIndicator t f) = mulIndicator (s ∩ t) f

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

s.mulIndicator (t.mulIndicator f) = (s ∩ t).mulIndicator f


/-- Two affine maps are equal if they have equal linear maps and are equal at some point. -/
theorem ext_linear {f g : P1 →ᵃ[k] P2} (h₁ : f.linear = g.linear) {p : P1} (h₂ : f p = g p) :
    f = g

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
{f g : P1 →ᵃ[k] P2}
(h₁ : f.linear = g.linear)
{p : P1}
(h₂ : f p = g p)


@[simp]
theorem intCast_comp (i : ℤ) : comp (i : R[X]) p = i

{R : Type u}
[Ring R]
{p : R[X]}
(i : ℤ)


theorem epi_iff_range_eq_top : Epi f ↔ f.range = ⊤

CategoryTheory.Epi f ↔ AddMonoidHom.range f = ⊤


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

(self : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit X) (CategoryTheory.Functor.id T))

(CategoryTheory.Under.forgetCone X).π.app self = self.hom


protected theorem le_antisymm {x y : Fin n} (h1 : x ≤ y) (h2 : y ≤ x) : x = y

{n : Nat}
{x y : Fin n}
(h1 : x ≤ y)
(h2 : y ≤ x)


@[measurability]
theorem measurableSet_uIcc : MeasurableSet (uIcc a b)

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{a b : α}


@[simp]
theorem ofLinearEquiv_symm :
    (ofLinearEquiv l map_one map_mul).symm =
      ofLinearEquiv l.symm
        (_root_.map_one <| ofLinearEquiv_symm.aux l map_one map_mul)
        (_root_.map_mul <| ofLinearEquiv_symm.aux l map_one map_mul)

(map_mul : ∀ (x y : A₁), l (x * y) = l x * l y)

(AlgEquiv.ofLinearEquiv l map_one map_mul).symm = AlgEquiv.ofLinearEquiv l.symm ⋯ ⋯


theorem Sized.dual_iff {t : Ordnode α} : Sized (.dual t) ↔ Sized t


@[simp]
lemma leadingCoeff_Ψ₂Sq (h : (4 : R) ≠ 0) : W.Ψ₂Sq.leadingCoeff = 4

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


/-- The ring isomorphism between the ring `R` and the global sections `Γ(X, 𝒪ₓ)`. -/
-- Porting note: was @[simps (config := { rhsMd := Tactic.Transparency.semireducible })]
@[simps!]
def globalSectionsIso : CommRingCat.of R ≅ (structureSheaf R).1.obj (op ⊤)

(AlgebraicGeometry.StructureSheaf.globalSectionsIso R).inv =
  CategoryTheory.inv (AlgebraicGeometry.StructureSheaf.toOpen R ⊤)


@[to_additive]
protected theorem inv [Group β] [TopologicalGroup β] (hu : Adapted f u) :
    Adapted f u⁻¹

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[TopologicalSpace β]
[Preorder ι]
{u : ι → Ω → β}
{f : MeasureTheory.Filtration ι m}
[Group β]
[TopologicalGroup β]
(hu : MeasureTheory.Adapted f u)


theorem differentiableOn_pow : DifferentiableOn 𝕜 (fun x : 𝕜 => x ^ n) s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{s : Set 𝕜}
(n : ℕ)


protected theorem add_zero (x : X[S⁻¹]) : x + 0 = x

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddMonoid X]
[DistribMulAction R X]
(x : OreLocalization S X)


/-- A map between emetric spaces is a uniform embedding if and only if the edistance between `f x`
and `f y` is controlled in terms of the distance between `x` and `y` and conversely. -/
theorem EMetric.uniformEmbedding_iff' [EMetricSpace β] {f : γ → β} :
    UniformEmbedding f ↔
      (∀ ε > 0, ∃ δ > 0, ∀ {a b : γ}, edist a b < δ → edist (f a) (f b) < ε) ∧
        ∀ δ > 0, ∃ ε > 0, ∀ {a b : γ}, edist (f a) (f b) < ε → edist a b < δ

{β : Type v}
{γ : Type w}
[EMetricSpace γ]
[EMetricSpace β]
{f : γ → β}


@[to_additive]
theorem uniformContinuous_op [UniformSpace α] : UniformContinuous (op : α → αᵐᵒᵖ)


@[to_additive (attr := simp)]
theorem ofList_append (xs ys : List α) : ofList (xs ++ ys) = ofList xs * ofList ys

FreeMonoid.ofList (xs ++ ys) = FreeMonoid.ofList xs * FreeMonoid.ofList ys


@[to_additive]
theorem Submonoid.FG.map_injective {M' : Type*} [Monoid M'] {P : Submonoid M} (e : M →* M')
    (he : Function.Injective e) (h : (P.map e).FG) : P.FG

{M : Type u_1}
[AddMonoid M]
{M' : Type u_3}
[AddMonoid M']
{P : AddSubmonoid M}
(e : M →+ M')
(he : Function.Injective ⇑e)
(h : (AddSubmonoid.map e P).FG)


/-- A space is sober if every irreducible closed subset has a generic point. -/
@[mk_iff]
class QuasiSober (α : Type*) [TopologicalSpace α] : Prop where
  sober : ∀ {S : Set α}, IsIrreducible S → IsClosed S → ∃ x, IsGenericPoint x S

{α : Type u_3}
[TopologicalSpace α]
[self : QuasiSober α]
{S : Set α}


theorem cons_ne_nil (a : α) (l : List α) : a :: l ≠ []


/-- The right fraction from `X` to `Y` given by a morphism `f : X ⟶ Y`. -/
@[simps]
def ofHom (f : X ⟶ Y) [W.ContainsIdentities] :
    W.RightFraction X Y

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
(W : CategoryTheory.MorphismProperty C)
{X Y : C}
(f : X ⟶ Y)
[W.ContainsIdentities]

(CategoryTheory.MorphismProperty.RightFraction.ofHom W f).s = CategoryTheory.CategoryStruct.id X


@[to_additive]
theorem Step.to_red : Step L₁ L₂ → Red L₁ L₂

FreeAddGroup.Red.Step L₁ L₂ → FreeAddGroup.Red L₁ L₂


theorem smul_apply (c : S₂) (f : M₁ →SL[σ₁₂] M₂) (x : M₁) : (c • f) x = c • f x

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
{S₂ : Type u_9}
[Monoid S₂]
[DistribMulAction S₂ M₂]
[SMulCommClass R₂ S₂ M₂]
[ContinuousConstSMul S₂ M₂]
(c : S₂)
(f : M₁ →SL[σ₁₂] M₂)
(x : M₁)


theorem normAtPlace_nonneg  (w : InfinitePlace K) (x : E K) :
    0 ≤ normAtPlace w x

(x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

0 ≤ (NumberField.mixedEmbedding.normAtPlace w) x


theorem comapₗ_apply {β} [MeasurableSpace α] {mβ : MeasurableSpace β} (f : α → β)
    (hfi : Injective f) (hf : ∀ s, MeasurableSet s → MeasurableSet (f '' s)) (μ : Measure β)
    (hs : MeasurableSet s) : comapₗ f μ s = μ (f '' s)

(hf : ∀ (s : Set α), MeasurableSet s → MeasurableSet (f '' s))

((MeasureTheory.Measure.comapₗ f) μ) s = μ (f '' s)


/--
The regular sheaf condition on an essentially small site can be checked after precomposing with
the equivalence with a small category.
-/
theorem preregular_isSheaf_iff_of_essentiallySmall [EssentiallySmall C] (F : Cᵒᵖ ⥤ A) :
    IsSheaf (regularTopology C) F ↔ IsSheaf (regularTopology (SmallModel C))
    ((equivSmallModel C).inverse.op ⋙ F)

[CategoryTheory.EssentiallySmall.{u_4, u_5, u_1} C]

CategoryTheory.Presheaf.IsSheaf (CategoryTheory.regularTopology C) F ↔
  CategoryTheory.Presheaf.IsSheaf (CategoryTheory.regularTopology (CategoryTheory.SmallModel.{u_4, u_5, u_1} C))
    ((CategoryTheory.equivSmallModel C).inverse.op.comp F)


theorem comap_ofFunction {β} (f : β → α) (h : Monotone m ∨ Surjective f) :
    comap f (OuterMeasure.ofFunction m m_empty) =
      OuterMeasure.ofFunction (fun s => m (f '' s)) (by simp; simp [m_empty])

(h : Monotone m ∨ Function.Surjective f)

(MeasureTheory.OuterMeasure.comap f) (MeasureTheory.OuterMeasure.ofFunction m m_empty) =
  MeasureTheory.OuterMeasure.ofFunction (fun s => m (f '' s)) ⋯


/-- For every nonzero ideal `I` of `v`, there are finitely many maximal ideals `v` such that
`v^(val_v(I))`, regarded as a fractional ideal, is not `(1)`. -/
theorem finite_mulSupport_coe {I : Ideal R} (hI : I ≠ 0) :
    (mulSupport fun v : HeightOneSpectrum R => (v.asIdeal : FractionalIdeal R⁰ K) ^
      ((Associates.mk v.asIdeal).count (Associates.mk I).factors : ℤ)).Finite

{R : Type u_1}
[CommRing R]
{K : Type u_2}
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDedekindDomain R]
{I : Ideal R}
(hI : I ≠ 0)

(Function.mulSupport fun v => ↑v.asIdeal ^ ↑((Associates.mk v.asIdeal).count (Associates.mk I).factors)).Finite


/-- Auxiliary definition for `functorCategoryEquivalence`. -/
@[simps]
def functor : Action V G ⥤ SingleObj G ⥤ V

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}

∀ {X Y : Action V G} (f : X ⟶ Y) (x : CategoryTheory.SingleObj ↑G),
  (Action.FunctorCategoryEquivalence.functor.map f).app x = f.hom


theorem natAdd_natAdd (m n : Nat) {p : Nat} (i : Fin p) :
    natAdd m (natAdd n i) = cast (Nat.add_assoc ..) (natAdd (m + n) i)

Fin.natAdd m (Fin.natAdd n i) = Fin.cast ⋯ (Fin.natAdd (m + n) i)


@[simp]
theorem tfae_cons_self {a} {l : List Prop} : TFAE (a :: a :: l) ↔ TFAE (a :: l)


theorem ideal_isMaximal_iff (I : Ideal C(X, 𝕜)) [hI : IsClosed (I : Set C(X, 𝕜))] :
    I.IsMaximal ↔ ∃ x : X, idealOfSet 𝕜 {x}ᶜ = I

{X : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
[TopologicalSpace X]
[CompactSpace X]
[T2Space X]
(I : Ideal C(X, 𝕜))
[hI : IsClosed ↑I]

I.IsMaximal ↔ ∃ x, ContinuousMap.idealOfSet 𝕜 {x}ᶜ = I


/--
A family of morphisms `π a : X a ⟶ B` indexed by `α` is effective epimorphic
provided that the `π a` exhibit `B` as a colimit of the diagram of all "relations"
`R → X a₁`, `R ⟶ X a₂` for all `a₁ a₂ : α`.
-/
class EffectiveEpiFamily {B : C} {α : Type*} (X : α → C) (π : (a : α) → (X a ⟶ B)) : Prop where
  /-- `π` is an effective epimorphic family if there exists an `EffectiveEpiFamilyStruct` for `π` -/
  effectiveEpiFamily : Nonempty (EffectiveEpiFamilyStruct X π)

[self : CategoryTheory.EffectiveEpiFamily X π]

Nonempty (CategoryTheory.EffectiveEpiFamilyStruct X π)


/-- If a vector is in the same ray as its negation, that vector is zero. -/
theorem eq_zero_of_sameRay_self_neg [NoZeroSMulDivisors R M] (h : SameRay R x (-x)) : x = 0

{R : Type u_1}
[StrictOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x : M}
[NoZeroSMulDivisors R M]
(h : SameRay R x (-x))


theorem divisors_subset_properDivisors {m : ℕ} (hzero : n ≠ 0) (h : m ∣ n) (hdiff : m ≠ n) :
    divisors m ⊆ properDivisors n

{n m : ℕ}
(hzero : n ≠ 0)
(h : m ∣ n)
(hdiff : m ≠ n)


@[simp]
theorem jacobson_top : jacobson (⊤ : Ideal R) = ⊤


/-- Left Kan extensions of isomorphic functors are isomorphic. -/
@[simps]
noncomputable def leftKanExtensionUniqueOfIso {G : C ⥤ H} (i : F ≅ G) (G' : D ⥤ H)
    (β : G ⟶ L ⋙ G') [G'.IsLeftKanExtension β] : F' ≅ G'

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_9, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : F ⟶ L.comp F')
[F'.IsLeftKanExtension α]
{G : CategoryTheory.Functor C H}
(i : F ≅ G)
(G' : CategoryTheory.Functor D H)
(β : G ⟶ L.comp G')
[G'.IsLeftKanExtension β]

(F'.leftKanExtensionUniqueOfIso α i G' β).hom =
  F'.descOfIsLeftKanExtension α G' (CategoryTheory.CategoryStruct.comp i.hom β)


@[simp] lemma infClosed (L : Sublattice α) : InfClosed (L : Set α)

{α : Type u_2}
[Lattice α]
(L : Sublattice α)


/-- By moving `succ` to the outside of this expression, we create opportunities for further
simplification using `succAbove_zero` or `succ_succAbove_zero`. -/
@[simp] lemma succ_succAbove_one {n : ℕ} [NeZero n] (i : Fin (n + 1)) :
    i.succ.succAbove 1 = (i.succAbove 0).succ


@[simp]
theorem coe_id : ⇑(AlgHom.id R A) = id

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


@[simp]
theorem TrailingMonic.trailingCoeff {p : R[X]} (hp : p.TrailingMonic) : trailingCoeff p = 1

{R : Type u}
[Semiring R]
{p : R[X]}
(hp : p.TrailingMonic)


@[simp]
theorem frequently_sSup {p : α → Prop} {fs : Set (Filter α)} :
    (∃ᶠ x in sSup fs, p x) ↔ ∃ f ∈ fs, ∃ᶠ x in f, p x

{α : Type u}
{p : α → Prop}
{fs : Set (Filter α)}

(∃ᶠ (x : α) in sSup fs, p x) ↔ ∃ f ∈ fs, ∃ᶠ (x : α) in f, p x


theorem integral_comp_sub_mul (hc : c ≠ 0) (d) :
    (∫ x in a..b, f (d - c * x)) = c⁻¹ • ∫ x in d - c * b..d - c * a, f x

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

∫ (x : ℝ) in a..b, f (d - c * x) = c⁻¹ • ∫ (x : ℝ) in d - c * b..d - c * a, f x


@[to_additive (attr := simp)]
theorem coe_inv {G : Type*} [Group G] [TopologicalSpace G] [ChartedSpace H' G] [LieGroup I' G]
    (f : C^∞⟮I, N; I', G⟯) : ⇑f⁻¹ = (⇑f)⁻¹

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_4}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{H' : Type u_5}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{N : Type u_6}
[TopologicalSpace N]
[ChartedSpace H N]
{G : Type u_10}
[AddGroup G]
[TopologicalSpace G]
[ChartedSpace H' G]
[LieAddGroup I' G]
(f : C^⊤⟮I, N; I', G⟯)


/-- An integral domain is a *discrete valuation ring* (DVR) if it's a local PID which
  is not a field. -/
class DiscreteValuationRing (R : Type u) [CommRing R] [IsDomain R]
    extends IsPrincipalIdealRing R, LocalRing R : Prop where
  not_a_field' : maximalIdeal R ≠ ⊥

{R : Type u}
[CommRing R]
[IsDomain R]
[self : DiscreteValuationRing R]


/-- The **Chevalley–Warning theorem**, `Fintype` version.
Let `(f i)` be a finite family of multivariate polynomials
in finitely many variables (`X s`, `s : σ`) over a finite field of characteristic `p`.
Assume that the sum of the total degrees of the `f i` is less than the cardinality of `σ`.
Then the number of common solutions of the `f i` is divisible by `p`. -/
theorem char_dvd_card_solutions_of_fintype_sum_lt [Fintype ι] {f : ι → MvPolynomial σ K}
    (h : (∑ i, (f i).totalDegree) < Fintype.card σ) :
    p ∣ Fintype.card { x : σ → K // ∀ i, eval x (f i) = 0 }

(h : ∑ i : ι, (f i).totalDegree < Fintype.card σ)

p ∣ Fintype.card { x // ∀ (i : ι), (MvPolynomial.eval x) (f i) = 0 }


/-- Postcomposing by the identity does not change the cone up to isomorphism. -/
@[simps!]
def postcomposeId : postcompose (𝟙 F) ≅ 𝟭 (Cone F)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(X : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.Cones.postcomposeId.inv.app X).hom = 𝟙 X.pt


@[to_additive]
lemma coe_inv_val_mul_coe_val (S : Submonoid M) {x : Sˣ} :
    ((x⁻¹ : Sˣ) : M) * ((x : Sˣ) : M) = 1

{M : Type u_1}
[AddMonoid M]
(S : AddSubmonoid M)
{x : AddUnits ↥S}


theorem IndepFun.neg_left {_mβ : MeasurableSpace β} {_mβ' : MeasurableSpace β'} [Neg β]
    [MeasurableNeg β] (hfg : IndepFun f g κ μ) :
    IndepFun (-f) g κ μ

(hfg : ProbabilityTheory.Kernel.IndepFun f g κ μ)

ProbabilityTheory.Kernel.IndepFun (-f) g κ μ


@[simp]
theorem measurableEquivPi_symm_apply (p : (Fin 2) → ℝ) :
    measurableEquivPi.symm p = (p 0) + (p 1) * I

Complex.measurableEquivPi.symm p = ↑(p 0) + ↑(p 1) * Complex.I


@[simp] theorem refl_symm : (refl X).symm = refl X

(DilationEquiv.refl X).symm = DilationEquiv.refl X


theorem or_le : ∀ {x y z}, x ≤ z → y ≤ z → (x || y) ≤ z


lemma fibration_iff_image_Iic [Preorder α] [Preorder β] (hf : Monotone f) :
    Fibration (· ≤ ·) (· ≤ ·) f ↔ ∀ x, f '' Iic x = Iic (f x)

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

Relation.Fibration (fun x x_1 => x ≤ x_1) (fun x x_1 => x ≤ x_1) f ↔ ∀ (x : α), f '' Set.Iic x = Set.Iic (f x)


@[simp] lemma cast_pos : (0 : K) < q ↔ 0 < q

{q : ℚ}
{K : Type u_5}
[LinearOrderedField K]


/-- The intersection of the images of the maps from any two distinct groups in the diagram
into the amalgamated product is the image of the map from the base group in the diagram. -/
theorem inf_of_range_eq_base_range (hφ : ∀ i, Injective (φ i)) {i j : ι} (hij : i ≠ j) :
    (of i).range ⊓ (of j).range = (base φ).range

(hφ : ∀ (i : ι), Function.Injective ⇑(φ i))

(Monoid.PushoutI.of i).range ⊓ (Monoid.PushoutI.of j).range = (Monoid.PushoutI.base φ).range


@[simp]
theorem lowerBounds_singleton : lowerBounds {a} = Iic a


lemma eval_image_piFinset_subset (t : ∀ a, Finset (δ a)) (a : α) [DecidableEq (δ a)] :
    ((piFinset t).image fun f ↦ f a) ⊆ t a

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{δ : α → Type u_3}
(t : (a : α) → Finset (δ a))
(a : α)
[DecidableEq (δ a)]

Finset.image (fun f => f a) (Fintype.piFinset t) ⊆ t a


@[to_additive (attr := simp)]
theorem invRev_empty : invRev ([] : List (α × Bool)) = []


@[simp]
theorem map_compose : Filter.map m' ∘ Filter.map m = Filter.map (m' ∘ m)

{α : Type u}
{β : Type v}
{γ : Type w}
{m : α → β}
{m' : β → γ}


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

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


theorem embedding_sigmaMk_comp [Nonempty X] :
    Embedding (fun g : Σ i, C(X, Y i) ↦ (sigmaMk g.1).comp g.2)

{X : Type u_1}
{ι : Type u_2}
{Y : ι → Type u_3}
[TopologicalSpace X]
[(i : ι) → TopologicalSpace (Y i)]
[Nonempty X]

Embedding fun g => (ContinuousMap.sigmaMk g.fst).comp g.snd


@[simp]
theorem iUnion_mk (π : Prepartition I) (f h) : (mk π f h).iUnion = π.iUnion

(h : ∀ (J : BoxIntegral.Box ι), f J ∈ BoxIntegral.Box.Icc I)

{ toPrepartition := π, tag := f, tag_mem_Icc := h }.iUnion = π.iUnion


@[simp]
theorem eval₂_neg {S} [Ring S] (f : R →+* S) {x : S} : (-p).eval₂ f x = -p.eval₂ f x

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

Polynomial.eval₂ f x (-p) = -Polynomial.eval₂ f x p


@[to_additive]
theorem eq_one_or_one_lt (a : α) : a = 1 ∨ 1 < a

{α : Type u}
[CanonicallyOrderedCommMonoid α]
(a : α)


@[simp]
theorem lift.initialSeg_coe : (lift.initialSeg.{u,v} : Ordinal → Ordinal) = lift.{v,u}

⇑Ordinal.lift.initialSeg = Ordinal.lift.{v, u}


lemma nthRootsFinset_def (n : ℕ) (R : Type*) [CommRing R] [IsDomain R] [DecidableEq R] :
    nthRootsFinset n R = Multiset.toFinset (nthRoots n (1 : R))

(n : ℕ)
(R : Type u_1)
[CommRing R]
[IsDomain R]
[DecidableEq R]

Polynomial.nthRootsFinset n R = (Polynomial.nthRoots n 1).toFinset


@[simp]
theorem union_diff_self {s t : Set α} : s ∪ t \ s = s ∪ t


/-- How the `eisSummand` function changes under the Moebius action. -/
theorem eisSummand_SL2_apply (k : ℤ) (i : (Fin 2 → ℤ)) (A : SL(2, ℤ)) (z : ℍ) :
    eisSummand k i (A • z) = (z.denom A) ^ k * eisSummand k (i ᵥ* A) z

EisensteinSeries.eisSummand k i (A • z) = UpperHalfPlane.denom (↑A) z ^ k * EisensteinSeries.eisSummand k (i ᵥ* ↑A) z


/-- A homomorphism from a group to a monoid is injective iff its kernel is trivial.
For the iff statement on the triviality of the kernel, see `injective_iff_map_eq_one'`.  -/
@[to_additive
  "A homomorphism from an additive group to an additive monoid is injective iff
  its kernel is trivial. For the iff statement on the triviality of the kernel,
  see `injective_iff_map_eq_zero'`."]
theorem _root_.injective_iff_map_eq_one {G H} [Group G] [MulOneClass H]
    [FunLike F G H] [MonoidHomClass F G H]
    (f : F) : Function.Injective f ↔ ∀ a, f a = 1 → a = 1

{F : Type u_8}
{G : Type u_9}
{H : Type u_10}
[AddGroup G]
[AddZeroClass H]
[FunLike F G H]
[AddMonoidHomClass F G H]
(f : F)

Function.Injective ⇑f ↔ ∀ (a : G), f a = 0 → a = 0


@[simp]
lemma dual_zero :
    dual A K (0 : FractionalIdeal B⁰ L) = 0

(A : Type u_1)
(K : Type u_2)
(L : Type u)
(B : Type u_3)
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsDomain A]
[IsFractionRing A K]
[IsIntegralClosure B A L]
[IsFractionRing B L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed A]
[IsDedekindDomain B]


@[to_additive]
theorem map_ne_one_iff (h : M ≃* N) {x : M} : h x ≠ 1 ↔ x ≠ 1

{M : Type u_6}
{N : Type u_7}
[MulOneClass M]
[MulOneClass N]
(h : M ≃* N)
{x : M}


lemma complete_distinguished_triangle_morphism (T₁ T₂ : Triangle Cᵒᵖ)
    (hT₁ : T₁ ∈ distinguishedTriangles C) (hT₂ : T₂ ∈ distinguishedTriangles C)
    (a : T₁.obj₁ ⟶ T₂.obj₁) (b : T₁.obj₂ ⟶ T₂.obj₂) (comm : T₁.mor₁ ≫ b = a ≫ T₂.mor₁) :
    ∃ (c : T₁.obj₃ ⟶ T₂.obj₃), T₁.mor₂ ≫ c = b ≫ T₂.mor₂ ∧
      T₁.mor₃ ≫ a⟦1⟧' = c ≫ T₂.mor₃

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

(T₁ T₂ : CategoryTheory.Pretriangulated.Triangle Cᵒᵖ)

(hT₁ : T₁ ∈ CategoryTheory.Pretriangulated.Opposite.distinguishedTriangles C)

(hT₂ : T₂ ∈ CategoryTheory.Pretriangulated.Opposite.distinguishedTriangles C)

(comm : CategoryTheory.CategoryStruct.comp T₁.mor₁ b = CategoryTheory.CategoryStruct.comp a T₂.mor₁)

∃ c,
  CategoryTheory.CategoryStruct.comp T₁.mor₂ c = CategoryTheory.CategoryStruct.comp b T₂.mor₂ ∧
    CategoryTheory.CategoryStruct.comp T₁.mor₃ ((CategoryTheory.shiftFunctor Cᵒᵖ 1).map a) =
      CategoryTheory.CategoryStruct.comp c T₂.mor₃


theorem StrictMonoOn.Iic_id_le [SuccOrder α] [IsSuccArchimedean α] [OrderBot α] {n : α} {φ : α → α}
    (hφ : StrictMonoOn φ (Set.Iic n)) : ∀ m ≤ n, m ≤ φ m

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
[IsSuccArchimedean α]
[OrderBot α]
{n : α}
{φ : α → α}
(hφ : StrictMonoOn φ (Set.Iic n))
(m : α)

m ≤ n → m ≤ φ m


@[simp]
theorem right_inr (g : G) : (inr g : N ⋊[φ] G).right = g

{N : Type u_1}
{G : Type u_2}
[Group N]
[Group G]
{φ : G →* MulAut N}
(g : G)


/-- The set of vectors in the direction of a nonempty affine subspace is given by `vsub_set`. -/
theorem coe_direction_eq_vsub_set {s : AffineSubspace k P} (h : (s : Set P).Nonempty) :
    (s.direction : Set V) = (s : Set P) -ᵥ s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : AffineSubspace k P}
(h : (↑s).Nonempty)


/-- An object `X` in a category is a *zero object* if for every object `Y`
there is a unique morphism `to : X → Y` and a unique morphism `from : Y → X`.

This is a characteristic predicate for `has_zero_object`. -/
structure IsZero (X : C) : Prop where
  /-- there are unique morphisms to the object -/
  unique_to : ∀ Y, Nonempty (Unique (X ⟶ Y))
  /-- there are unique morphisms from the object -/
  unique_from : ∀ Y, Nonempty (Unique (Y ⟶ X))

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


/-- The cokernel of the image inclusion of a morphism `f` is isomorphic to the cokernel of `f`.

(This result requires that the factorisation through the image is an epimorphism.
This holds in any category with equalizers.)
-/
@[simps]
def cokernelImageι {X Y : C} (f : X ⟶ Y) [HasImage f] [HasCokernel (image.ι f)] [HasCokernel f]
    [Epi (factorThruImage f)] : cokernel (image.ι f) ≅ cokernel f

(CategoryTheory.Limits.cokernelImageι f).inv =
  CategoryTheory.Limits.cokernel.desc f (CategoryTheory.Limits.cokernel.π (CategoryTheory.Limits.image.ι f)) ⋯


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

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


theorem algebraMap_def {_ : CommSemiring R} [_s : ∀ i, Semiring (f i)] [∀ i, Algebra R (f i)]
    (a : R) : algebraMap R (∀ i, f i) a = fun i => algebraMap R (f i) a

(I : Type u)
{R : Type u_1}
(f : I → Type v)

∀ {x : CommSemiring R} [_s : (i : I) → Semiring (f i)] [inst : (i : I) → Algebra R (f i)] (a : R),
  (algebraMap R ((i : I) → f i)) a = fun i => (algebraMap R (f i)) a


@[simp]
theorem toIdeal_sSup (ℐ : Set (HomogeneousIdeal 𝒜)) : (sSup ℐ).toIdeal = ⨆ s ∈ ℐ, toIdeal s

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
(ℐ : Set (HomogeneousIdeal 𝒜))


/-- The equivalence `Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiChainComplexEquivalence : Karoubi (ChainComplex C α) ≌ ChainComplex (Karoubi C) α

(C : Type u_1)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Preadditive C]
(α : Type u_3)
[AddRightCancelSemigroup α]
[One α]

∀ {X Y : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C (ComplexShape.down α))} (f : X ⟶ Y) (n : α),
  (((CategoryTheory.Idempotents.karoubiChainComplexEquivalence C α).functor.map f).f n).f = f.f.f n


theorem erase_erase (a a' : α) (s : AList β) : (s.erase a).erase a' = (s.erase a').erase a

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a a' : α)
(s : AList β)

AList.erase a' (AList.erase a s) = AList.erase a (AList.erase a' s)


theorem not_mem_of_mem_compl {s : Set α} {x : α} (h : x ∈ sᶜ) : x ∉ s

{α : Type u}
{s : Set α}
{x : α}
(h : x ∈ sᶜ)


@[to_additive (attr := simp 1100)]
theorem closedBall_div_singleton : closedBall x δ / {y} = closedBall (x / y) δ

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

Metric.closedBall x δ / {y} = Metric.closedBall (x / y) δ


protected theorem Infinite.false [Finite α] (_ : Infinite α) : False


theorem comp_hasFDerivAt_iff' {f : G → E} {x : G} {f' : G →L[𝕜] F} :
    HasFDerivAt (iso ∘ f) f' x ↔ HasFDerivAt f ((iso.symm : F →L[𝕜] E).comp f') x

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

HasFDerivAt (⇑iso ∘ f) f' x ↔ HasFDerivAt f ((↑iso.symm).comp f') x


@[to_additive exists_nhds_zero_half]
theorem exists_nhds_one_split {s : Set M} (hs : s ∈ 𝓝 (1 : M)) :
    ∃ V ∈ 𝓝 (1 : M), ∀ v ∈ V, ∀ w ∈ V, v * w ∈ s

{M : Type u_3}
[TopologicalSpace M]
[MulOneClass M]
[ContinuousMul M]
{s : Set M}
(hs : s ∈ 𝓝 1)


/-- `CharP.quotient'` as an `Iff`. -/
theorem quotient_iff {R : Type*} [CommRing R] (n : ℕ) [CharP R n] (I : Ideal R) :
    CharP (R ⧸ I) n ↔ ∀ x : ℕ, ↑x ∈ I → (x : R) = 0

{R : Type u_1}
[CommRing R]
(n : ℕ)
[CharP R n]
(I : Ideal R)

CharP (R ⧸ I) n ↔ ∀ (x : ℕ), ↑x ∈ I → ↑x = 0


theorem toMatrix_lmul' (x : S) (i j) :
    LinearMap.toMatrix b b (lmul R S x) i j = b.repr (x * b j) i

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
{m : Type u_3}
[Fintype m]
[DecidableEq m]
(b : Basis m R S)
(x : S)
(i j : m)

(LinearMap.toMatrix b b) ((Algebra.lmul R S) x) i j = (b.repr (x * b j)) i


@[simp] lemma unop_associator (X Y Z : Cᵒᵖ) :
    (α_ X Y Z).unop = (α_ (unop X) (unop Y) (unop Z)).symm

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

(CategoryTheory.MonoidalCategory.associator X Y Z).unop =
  (CategoryTheory.MonoidalCategory.associator (Opposite.unop X) (Opposite.unop Y) (Opposite.unop Z)).symm


theorem RingHom.isIntegral_of_surjective (hf : Function.Surjective f) : f.IsIntegral

{R : Type u_1}
{S : Type u_4}
[CommRing R]
[CommRing S]
(f : R →+* S)
(hf : Function.Surjective ⇑f)


protected theorem Antitone.Iio (hf : Antitone f) : Antitone fun x => Iio (f x)

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


@[to_additive]
theorem infinite_not_isOfFinOrder {x : G} (h : ¬IsOfFinOrder x) :
    { y : G | ¬IsOfFinOrder y }.Infinite

{G : Type u_1}
[LeftCancelMonoid G]
{x : G}
(h : ¬IsOfFinOrder x)


theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | exp 1 ≤ x }

AntitoneOn (fun x => Real.log x / x) {x | Real.exp 1 ≤ x}


@[simp]
lemma preNormEDS_neg (n : ℤ) : preNormEDS b c d (-n) = -preNormEDS b c d n

{R : Type u}
[CommRing R]
(b c d : R)
(n : ℤ)


theorem coeff_one_add_X_pow (R : Type*) [Semiring R] (n k : ℕ) :
    ((1 + X) ^ n).coeff k = (n.choose k : R)

((1 + Polynomial.X) ^ n).coeff k = ↑(n.choose k)


private theorem lintegral_tendsto_of_monotone_of_nat {φ : ℕ → Set α} (hφ : AECover μ atTop φ)
    (hmono : Monotone φ) {f : α → ℝ≥0∞} (hfm : AEMeasurable f μ) :
    Tendsto (fun i => ∫⁻ x in φ i, f x ∂μ) atTop (𝓝 <| ∫⁻ x, f x ∂μ)

(hφ : MeasureTheory.AECover μ Filter.atTop φ)

{f : α → ℝ≥0∞}

Filter.Tendsto (fun i => ∫⁻ (x : α) in φ i, f x ∂μ) Filter.atTop (𝓝 (∫⁻ (x : α), f x ∂μ))


@[simp] theorem bne_self_right : ∀(a b : Bool), ((a != b) != b) = a


theorem inner_condexpL2_left_eq_right (hm : m ≤ m0) {f g : α →₂[μ] E} :
    ⟪(condexpL2 E 𝕜 hm f : α →₂[μ] E), g⟫₂ = ⟪f, (condexpL2 E 𝕜 hm g : α →₂[μ] E)⟫₂

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_7}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(hm : m ≤ m0)
{f g : ↥(MeasureTheory.Lp E 2 μ)}

⟪↑((MeasureTheory.condexpL2 E 𝕜 hm) f), g⟫_𝕜 = ⟪f, ↑((MeasureTheory.condexpL2 E 𝕜 hm) g)⟫_𝕜


@[simp] lemma sinh_eq_zero : sinh x = 0 ↔ x = 0


theorem sublistsAux_eq_array_foldl :
    sublistsAux = fun (a : α) (r : List (List α)) =>
      (r.toArray.foldl (init := #[])
        fun r l => (r.push l).push (a :: l)).toList

List.sublistsAux = fun a r => (Array.foldl (fun r l => (r.push l).push (a :: l)) #[] (List.toArray r) 0).toList


@[to_additive noncommSum_eq_card_nsmul]
theorem noncommProd_eq_pow_card (s : Multiset α) (comm) (m : α) (h : ∀ x ∈ s, x = m) :
    s.noncommProd comm = m ^ Multiset.card s

{α : Type u_3}
[Monoid α]
(s : Multiset α)
(comm : {x | x ∈ s}.Pairwise Commute)
(m : α)
(h : ∀ x ∈ s, x = m)


@[simp] lemma mem_Iio : x ∈ Iio b ↔ x < b

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrderBot α]
{b x : α}


@[simp] lemma ofIsLimitKernelFork_f' (hf : S.f = 0) (c : KernelFork S.g) (hc : IsLimit c) :
    (ofIsLimitKernelFork S hf c hc).f' = 0

(c : CategoryTheory.Limits.KernelFork S.g)

(CategoryTheory.ShortComplex.LeftHomologyData.ofIsLimitKernelFork S hf c hc).f' = 0


theorem add_choose (i j : ℕ) : (i + j).choose j = (i + j)! / (i ! * j !)