theorem _root_.List.foldr_inf_eq_inf_toFinset [DecidableEq α] (l : List α) :
    l.foldr (· ⊓ ·) ⊤ = l.toFinset.inf id

{α : Type u_2}
[SemilatticeInf α]
[OrderTop α]
[DecidableEq α]
(l : List α)

List.foldr (fun x x_1 => x ⊓ x_1) ⊤ l = l.toFinset.inf id


lemma setLIntegral_condKernel_eq_measure_prod (a : α) {s : Set β} (hs : MeasurableSet s)
    {t : Set Ω} (ht : MeasurableSet t) :
    ∫⁻ b in s, Kernel.condKernel κ (a, b) t ∂(Kernel.fst κ a) = κ a (s ×ˢ t)

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

∫⁻ (b : β) in s, (κ.condKernel (a, b)) t ∂κ.fst a = (κ a) (s ×ˢ t)


lemma map_inverseImage_eq_of_isEquivalence
    (P : MorphismProperty D) [P.RespectsIso] (F : C ⥤ D) [F.IsEquivalence] :
    (P.inverseImage F).map F = P

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
[CategoryTheory.Category.{u_2, u_1} D]
(P : CategoryTheory.MorphismProperty D)
[P.RespectsIso]
(F : C ⥤ D)
[F.IsEquivalence]


/-- The additive equivalence `Cochain K L n ≃+ Cochain (K⟦a⟧) L n'` when `n + a = n'`. -/
@[simps]
def leftShiftAddEquiv (n a n' : ℤ) (hn' : n + a = n') :
    Cochain K L n ≃+ Cochain (K⟦a⟧) L n'

(γ : CochainComplex.HomComplex.Cochain K L n)

(CochainComplex.HomComplex.Cochain.leftShiftAddEquiv K L n a n' hn') γ = γ.leftShift a n' hn'


theorem ker_coprod_of_disjoint_range {M₂ : Type*} [AddCommGroup M₂] [Module R M₂] {M₃ : Type*}
    [AddCommGroup M₃] [Module R M₃] (f : M →ₗ[R] M₃) (g : M₂ →ₗ[R] M₃)
    (hd : Disjoint (range f) (range g)) : ker (f.coprod g) = (ker f).prod (ker g)

(hd : Disjoint (LinearMap.range f) (LinearMap.range g))

LinearMap.ker (f.coprod g) = (LinearMap.ker f).prod (LinearMap.ker g)


@[to_additive (attr := simp)]
theorem centralizer_eq_top_iff_subset {s : Set M} : centralizer s = ⊤ ↔ s ⊆ center M

{M : Type u_1}
[Semigroup M]
{s : Set M}

Subsemigroup.centralizer s = ⊤ ↔ s ⊆ ↑(Subsemigroup.center M)


theorem aemeasurable_of_unif_approx {β} [MeasurableSpace β] [PseudoMetricSpace β] [BorelSpace β]
    {μ : Measure α} {g : α → β}
    (hf : ∀ ε > (0 : ℝ), ∃ f : α → β, AEMeasurable f μ ∧ ∀ᵐ x ∂μ, dist (f x) (g x) ≤ ε) :
    AEMeasurable g μ

(hf : ∀ ε > 0, ∃ f, AEMeasurable f μ ∧ ∀ᵐ (x : α) ∂μ, dist (f x) (g x) ≤ ε)


@[simp]
lemma shiftFunctorComm_eq_refl (i : A) :
    shiftFunctorComm C i i = Iso.refl _

(C : Type u)
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddCommMonoid A]
[CategoryTheory.HasShift C A]
(i : A)

CategoryTheory.shiftFunctorComm C i i =
  CategoryTheory.Iso.refl ((CategoryTheory.shiftFunctor C i).comp (CategoryTheory.shiftFunctor C i))


theorem IsBezout.span_gcd_eq_span_gcd (x y : R) :
    span {GCDMonoid.gcd x y} = span {IsBezout.gcd x y}

{R : Type u}
[CommRing R]
[IsDomain R]
[IsBezout R]
[GCDMonoid R]
(x y : R)

Ideal.span {gcd x y} = Ideal.span {IsBezout.gcd x y}


@[instance]
theorem ordConnected_univ : OrdConnected (univ : Set α)


theorem bit_not_testBit (x : BitVec w) (i : Fin w) :
  getLsb (((iunfoldr (fun (i : Fin w) c => (c, !(x.getLsb i)))) ()).snd) i.val = !(getLsb x i.val)

(BitVec.iunfoldr (fun i c => (c, !x.getLsb ↑i)) ()).snd.getLsb ↑i = !x.getLsb ↑i


theorem add_comp (X Y Z : C) (f g : X ⟶ Y) (h : Y ⟶ Z) : (f + g) ≫ h = f ≫ h + g ≫ h


theorem withDensity_densitytoFinite (μ : Measure α) [SFinite μ] :
    μ.toFinite.withDensity μ.densityToFinite = μ

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


theorem prod_inf (u v : PrimeMultiset) : (u ⊓ v).prod = PNat.gcd u.prod v.prod


/-- For `n ≠ m`,`(n, m)` is in the transitive closure of a relation `~` if `i ~ succ i` and
  `succ i ~ i` for all `i` between `n` and `m`. -/
theorem transGen_of_succ_of_ne (r : α → α → Prop) {n m : α} (h1 : ∀ i ∈ Ico n m, r i (succ i))
    (h2 : ∀ i ∈ Ico m n, r (succ i) i) (hnm : n ≠ m) : TransGen r n m

(h1 : ∀ i ∈ Set.Ico n m, r i (Order.succ i))

(h2 : ∀ i ∈ Set.Ico m n, r (Order.succ i) i)


theorem Chain.imp {r₁ r₂ : α → α → Prop} (H : ∀ a b, r₁ a b → r₂ a b) (p : Chain r₁ s) :
    Chain r₂ s

{α : Type u_1}
{s : Cycle α}
{r₁ r₂ : α → α → Prop}
(H : ∀ (a b : α), r₁ a b → r₂ a b)
(p : Cycle.Chain r₁ s)


theorem log2_lt (h : n ≠ 0) : n.log2 < k ↔ n < 2 ^ k


/-- A metric space has the Besicovitch covering property if there exist `N` and `τ > 1` such that
there are no satellite configuration of parameter `τ` with `N+1` points. This is the condition that
guarantees that the measurable Besicovitch covering theorem holds. It is satisfied by
finite-dimensional real vector spaces. -/
class HasBesicovitchCovering (α : Type*) [MetricSpace α] : Prop where
  no_satelliteConfig : ∃ (N : ℕ) (τ : ℝ), 1 < τ ∧ IsEmpty (Besicovitch.SatelliteConfig α N τ)

{α : Type u_1}
[MetricSpace α]
[self : HasBesicovitchCovering α]

∃ N τ, 1 < τ ∧ IsEmpty (Besicovitch.SatelliteConfig α N τ)


@[simp] lemma unmop_hom_associator (X Y Z : Cᴹᵒᵖ) :
    (α_ X Y Z).hom.unmop = (α_ (unmop Z) (unmop Y) (unmop X)).inv

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

(CategoryTheory.MonoidalCategory.associator X Y Z).hom.unmop =
  (CategoryTheory.MonoidalCategory.associator Z.unmop Y.unmop X.unmop).inv


theorem trailingDegree_ne_of_natTrailingDegree_ne {n : ℕ} :
    p.natTrailingDegree ≠ n → trailingDegree p ≠ n

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

p.natTrailingDegree ≠ n → p.trailingDegree ≠ ↑n


@[refl]
theorem Parallel.refl (s : AffineSubspace k P) : s ∥ 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)


@[simp]
theorem inv_apply_self (e : MulAut M) (m : M) : e⁻¹ (e m) = m

(M : Type u_2)
[Mul M]
(e : MulAut M)
(m : M)


theorem pairwise_of_coe_toFinset_pairwise (hl : (l.toFinset : Set α).Pairwise r) (hn : l.Nodup) :
    l.Pairwise r

{α : Type u_1}
[DecidableEq α]
{r : α → α → Prop}
{l : List α}
(hl : (↑l.toFinset).Pairwise r)
(hn : l.Nodup)


theorem mem_domain_iff_of_eq_graph {f g : E →ₗ.[R] F} (h : f.graph = g.graph) {x : E} :
    x ∈ f.domain ↔ x ∈ g.domain

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{f g : E →ₗ.[R] F}
(h : f.graph = g.graph)
{x : E}


/-- A strong epimorphism `f` is an epimorphism which has the left lifting property
with respect to monomorphisms. -/
class StrongEpi (f : P ⟶ Q) : Prop where
  /-- The epimorphism condition on `f` -/
  epi : Epi f
  /-- The left lifting property with respect to all monomorphism -/
  llp : ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [Mono z], HasLiftingProperty f z

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{P Q : C}
{f : P ⟶ Q}
[self : CategoryTheory.StrongEpi f]


@[simp]
theorem diagramIso_inv_app_left (i : D.J × D.J) :
    (D.diagramIso F).inv.app (WalkingMultispan.left i) = 𝟙 _

[H : (i j k : D.J) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan (D.f i j) (D.f i k)) F]

(D.diagramIso F).inv.app (CategoryTheory.Limits.WalkingMultispan.left i) =
  CategoryTheory.CategoryStruct.id
    ((D.mapGlueData F).diagram.multispan.obj (CategoryTheory.Limits.WalkingMultispan.left i))


theorem sub_emod (a b n : Int) : (a - b) % n = (a % n - b % n) % n


lemma cases (α : W.LeftFraction X Y) :
    ∃ (Y' : C) (f : X ⟶ Y') (s : Y ⟶ Y') (hs : W s), α = LeftFraction.mk f s hs

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

∃ Y' f s, ∃ (hs : W s), α = CategoryTheory.MorphismProperty.LeftFraction.mk f s hs


/-- If two maps of short complexes are homotopic, their opposites also are. -/
@[simps]
def neg (h : Homotopy φ₁ φ₂) : Homotopy (-φ₁) (-φ₂)

{φ₁ φ₂ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)


theorem appIso_hom' (U) :
    (f.appIso U).hom = f.appLE (f ''ᵁ U) U (preimage_image_eq f U).ge

[H : AlgebraicGeometry.IsOpenImmersion f]

(f.appIso U).hom = f.appLE (f.opensFunctor.obj U) U ⋯


theorem embedding_toPullbackDiag (f : X → Y) : Embedding (toPullbackDiag f)

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


theorem coeff_scaleRoots_natDegree (p : R[X]) (s : R) :
    (scaleRoots p s).coeff p.natDegree = p.leadingCoeff

{R : Type u_1}
[Semiring R]
(p : Polynomial R)
(s : R)

(p.scaleRoots s).coeff p.natDegree = p.leadingCoeff


theorem OpenEmbedding.singleton_smoothManifoldWithCorners {𝕜 : Type*} [NontriviallyNormedField 𝕜]
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [Nonempty M] {f : M → H}
    (h : OpenEmbedding f) :
    @SmoothManifoldWithCorners 𝕜 _ E _ _ H _ I M _ h.singletonChartedSpace

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_4}
[TopologicalSpace M]
[Nonempty M]
{f : M → H}
(h : OpenEmbedding f)


nonrec theorem Vec.prim {n m f} (hf : @Nat.Primrec'.Vec n m f) : Vec f

{f : Mathlib.Vector ℕ n → Mathlib.Vector ℕ m}


theorem subset_maximalAtlas [SmoothManifoldWithCorners I M] : atlas H M ⊆ maximalAtlas I M

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]

atlas H M ⊆ SmoothManifoldWithCorners.maximalAtlas I M


theorem strictConvex_univ : StrictConvex 𝕜 (univ : Set E)

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedSemiring 𝕜]
[TopologicalSpace E]
[AddCommMonoid E]
[SMul 𝕜 E]


theorem comap_mono {f : P₁ →ᵃ[k] P₂} {s t : AffineSubspace k P₂} : s ≤ t → s.comap f ≤ t.comap f

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
{f : P₁ →ᵃ[k] P₂}
{s t : AffineSubspace k P₂}

s ≤ t → AffineSubspace.comap f s ≤ AffineSubspace.comap f t


theorem exists_non_zero_rep {a : Associates α} : a ≠ 0 → ∃ a0 : α, a0 ≠ 0 ∧ Associates.mk a0 = a

{α : Type u_1}
[MonoidWithZero α]
{a : Associates α}

a ≠ 0 → ∃ a0, a0 ≠ 0 ∧ Associates.mk a0 = a


theorem image_sub_const_Ico (h : c ≤ a) :
    ((Ico a b).image fun x => x - c) = Ico (a - c) (b - c)

Finset.image (fun x => x - c) (Finset.Ico a b) = Finset.Ico (a - c) (b - c)


lemma integral_tsum_of_summable_integral_norm {ι} [Countable ι] {F : ι → α → E}
    (hF_int : ∀ i : ι, Integrable (F i) μ) (hF_sum : Summable fun i ↦ ∫ a, ‖F i a‖ ∂μ) :
    ∑' i, (∫ a, F i a ∂μ) = ∫ a, (∑' i, F i a) ∂μ

(hF_int : ∀ (i : ι), MeasureTheory.Integrable (F i) μ)

(hF_sum : Summable fun i => ∫ (a : α), ‖F i a‖ ∂μ)

∑' (i : ι), ∫ (a : α), F i a ∂μ = ∫ (a : α), ∑' (i : ι), F i a ∂μ


@[simp]
theorem coe_compl (P : { P : M // IsLprojection X P }) : ↑Pᶜ = (1 : M) - ↑P

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
(P : { P // IsLprojection X P })


/-- If the domain of a `UniformInducing` map `f` is a T₀ space, then `f` is injective,
hence it is a `UniformEmbedding`. -/
protected theorem UniformInducing.uniformEmbedding [T0Space α] {f : α → β}
    (hf : UniformInducing f) : UniformEmbedding f

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


theorem isGreatest_u {b : β} : IsGreatest { a | l a ≤ b } (u b)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{b : β}


@[simp]
theorem ofHamming_toHamming (x : ∀ i, β i) : ofHamming (toHamming x) = x

{ι : Type u_2}
{β : ι → Type u_3}
(x : (i : ι) → β i)

Hamming.ofHamming (Hamming.toHamming x) = x


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

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


@[simp, norm_cast]
theorem bodd_coe (n : ℕ) : Int.bodd n = Nat.bodd n


@[simp]
theorem recTopCoe_coe {C : ℕ∞ → Sort*} (d : C ⊤) (f : ∀ a : ℕ, C a) (x : ℕ) :
    @recTopCoe C d f ↑x = f x

{C : ℕ∞ → Sort u_1}
(d : C ⊤)
(f : (a : ℕ) → C ↑a)
(x : ℕ)


@[to_additive (attr := simp)]
theorem Units.coe_opEquiv_symm {M} [Monoid M] (u : Mˣᵐᵒᵖ) :
    (Units.opEquiv.symm u : Mᵐᵒᵖ) = op (u.unop : M)

↑(Units.opEquiv.symm u) = MulOpposite.op ↑(MulOpposite.unop u)


lemma W_iff {X Y : C} (f : X ⟶ Y) :
    S.W f ↔ ∃ (Z : C) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧)
      (_ : Triangle.mk f g h ∈ distTriang C), S.P Z

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

(S : CategoryTheory.Triangulated.Subcategory C)

S.W f ↔
  ∃ Z g h,
    ∃ (_ : CategoryTheory.Pretriangulated.Triangle.mk f g h ∈ CategoryTheory.Pretriangulated.distinguishedTriangles),
      S.P Z


@[to_additive]
lemma orbitRel_le_fst :
    orbitRel G (α × β) ≤ (orbitRel G α).comap Prod.fst

(G : Type u_1)
(α : Type u_2)
(β : Type u_3)
[AddGroup G]
[AddAction G α]
[AddAction G β]

AddAction.orbitRel G (α × β) ≤ Setoid.comap Prod.fst (AddAction.orbitRel G α)


theorem coe_injective : @Function.Injective (M →ₗ⁅R,L⁆ N) (M → N) (↑)

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]


@[to_additive]
theorem mul_univ_of_one_mem [Fintype α] (hs : (1 : α) ∈ s) : s * univ = univ

{α : Type u_2}
[DecidableEq α]
[Monoid α]
{s : Finset α}
[Fintype α]
(hs : 1 ∈ s)


/-- The counit isomorphism of the
equivalence `triangleOpEquivalence C : (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ` . -/
@[simps!]
noncomputable def counitIso : inverse C ⋙ functor C ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle Cᵒᵖ)

((CategoryTheory.Pretriangulated.TriangleOpEquivalence.counitIso C).inv.app X).hom₂ =
  CategoryTheory.CategoryStruct.id X.obj₂


@[simp]
theorem Homeomorph.toMeasurableEquiv_coe (h : γ ≃ₜ γ₂) : (h.toMeasurableEquiv : γ → γ₂) = h

{γ : Type u_3}
{γ₂ : Type u_4}
[TopologicalSpace γ]
[MeasurableSpace γ]
[BorelSpace γ]
[TopologicalSpace γ₂]
[MeasurableSpace γ₂]
[BorelSpace γ₂]
(h : γ ≃ₜ γ₂)


theorem iunfoldr_getLsb {f : Fin w → α → α × Bool} (state : Nat → α) (i : Fin w)
    (ind : ∀(i : Fin w), (f i (state i.val)).fst = state (i.val+1)) :
  getLsb (iunfoldr f (state 0)).snd i.val = (f i (state i.val)).snd

(ind : ∀ (i : Fin w), (f i (state ↑i)).fst = state (↑i + 1))

(BitVec.iunfoldr f (state 0)).snd.getLsb ↑i = (f i (state ↑i)).snd


/-- A lemma commonly useful when `e` and `e'` are charts of a manifold. -/
theorem mem_symm_trans_source {e' : PartialEquiv α γ} {x : α} (he : x ∈ e.source)
    (he' : x ∈ e'.source) : e x ∈ (e.symm.trans e').source

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : PartialEquiv α β)
{e' : PartialEquiv α γ}
{x : α}
(he : x ∈ e.source)
(he' : x ∈ e'.source)


/-- A `EuclideanDomain` is a non-trivial commutative ring with a division and a remainder,
  satisfying `b * (a / b) + a % b = a`.
  The definition of a Euclidean domain usually includes a valuation function `R → ℕ`.
  This definition is slightly generalised to include a well founded relation
  `r` with the property that `r (a % b) b`, instead of a valuation.  -/
class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R where
  /-- A division function (denoted `/`) on `R`.
    This satisfies the property `b * (a / b) + a % b = a`, where `%` denotes `remainder`. -/
  protected quotient : R → R → R
  /-- Division by zero should always give zero by convention. -/
  protected quotient_zero : ∀ a, quotient a 0 = 0
  /-- A remainder function (denoted `%`) on `R`.
    This satisfies the property `b * (a / b) + a % b = a`, where `/` denotes `quotient`. -/
  protected remainder : R → R → R
  /-- The property that links the quotient and remainder functions.
    This allows us to compute GCDs and LCMs. -/
  protected quotient_mul_add_remainder_eq : ∀ a b, b * quotient a b + remainder a b = a
  /-- A well-founded relation on `R`, satisfying `r (a % b) b`.
    This ensures that the GCD algorithm always terminates. -/
  protected r : R → R → Prop
  /-- The relation `r` must be well-founded.
    This ensures that the GCD algorithm always terminates. -/
  r_wellFounded : WellFounded r
  /-- The relation `r` satisfies `r (a % b) b`. -/
  protected remainder_lt : ∀ (a) {b}, b ≠ 0 → r (remainder a b) b
  /-- An additional constraint on `r`. -/
  mul_left_not_lt : ∀ (a) {b}, b ≠ 0 → ¬r (a * b) a

{R : Type u}
[self : EuclideanDomain R]
(a : R)


@[simp]
lemma inr_snd :
    (Cochain.ofHom (inr φ)).comp (snd φ) (zero_add 0) = Cochain.ofHom (𝟙 G)

(CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.inr φ)).comp (CochainComplex.mappingCone.snd φ) ⋯ =
  CochainComplex.HomComplex.Cochain.ofHom (𝟙 G)


/-- If `P` is a monic polynomial that splits, then `P.nextCoeff` equals the sum of the roots. -/
theorem sum_roots_eq_nextCoeff_of_monic_of_split {P : K[X]} (hmo : P.Monic)
    (hP : P.Splits (RingHom.id K)) : P.nextCoeff = -P.roots.sum

(hP : Polynomial.Splits (RingHom.id K) P)


@[simp]
theorem sameCycle_apply_left : SameCycle f (f x) y ↔ SameCycle f x y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}


theorem padicValNat_def' {n : ℕ} (hp : p ≠ 1) (hn : 0 < n) :
    ↑(padicValNat p n) = multiplicity p n


@[simp] theorem not_eq (x : BitVec w)                     : BitVec.not x = ~~~x


/-- Transposing Young diagrams is an `OrderIso`. -/
@[simps]
def transposeOrderIso : YoungDiagram ≃o YoungDiagram

(RelIso.symm YoungDiagram.transposeOrderIso) μ = μ.transpose


/-- The `weightedTotalDegree'` of a polynomial `p` is `⊥` if and only if `p = 0`. -/
theorem weightedTotalDegree'_eq_bot_iff (w : σ → M) (p : MvPolynomial σ R) :
    weightedTotalDegree' w p = ⊥ ↔ p = 0

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

MvPolynomial.weightedTotalDegree' w p = ⊥ ↔ p = 0


@[to_additive (attr := simps tensorObj_as leftUnitor rightUnitor associator) Discrete.addMonoidal]
instance Discrete.monoidal : MonoidalCategory (Discrete M)

(M : Type u)
[Monoid M]
(X Y Z : CategoryTheory.Discrete M)

α_ X Y Z = CategoryTheory.Discrete.eqToIso ⋯


lemma isUnit_add_isUnit_eq_isUnit_add_isUnit {a b c d : ℤ} (ha : IsUnit a) (hb : IsUnit b)
    (hc : IsUnit c) (hd : IsUnit d) : a + b = c + d ↔ a = c ∧ b = d ∨ a = d ∧ b = c


@[simp]
theorem ret_orElse (a : α) (c₂ : Computation α) : (pure a <|> c₂) = pure a

{α : Type u}
(a : α)
(c₂ : Computation α)

(HOrElse.hOrElse (Computation.pure a) fun x => c₂) = Computation.pure a


/-- The diamond isomorphism between the intervals `[a ⊓ b, a]` and `[b, a ⊔ b]` -/
@[simps]
def infIccOrderIsoIccSup (a b : α) : Set.Icc (a ⊓ b) a ≃o Set.Icc b (a ⊔ b)

{α : Type u_1}
[Lattice α]
[IsModularLattice α]
(a b : α)
(x : ↑(Set.Icc (a ⊓ b) a))

↑((infIccOrderIsoIccSup a b) x) = ↑x ⊔ b


theorem HasLineDerivWithinAt.congr' (h : HasLineDerivWithinAt 𝕜 f f' s x v)
    (hs : EqOn f₁ f s) (hx : x ∈ s) :
    HasLineDerivWithinAt 𝕜 f₁ f' s x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f f₁ : E → F}
{f' : F}
{s : Set E}
{x v : E}
(h : HasLineDerivWithinAt 𝕜 f f' s x v)
(hs : Set.EqOn f₁ f s)
(hx : x ∈ s)


theorem symm_apply_of_not_mem (e : Pretrivialization F (π F E)) {b : B} (hb : b ∉ e.baseSet)
    (y : F) : e.symm b y = 0

(e : Pretrivialization F Bundle.TotalSpace.proj)


/-- The `weightedTotalDegree` of the zero polynomial is `⊥`. -/
theorem weightedTotalDegree_zero (w : σ → M) :
    weightedTotalDegree w (0 : MvPolynomial σ R) = ⊥

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

MvPolynomial.weightedTotalDegree w 0 = ⊥


theorem withDensityᵥ_smul_eq_withDensityᵥ_withDensity {f : α → ℝ≥0} {g : α → E}
    (hf : AEMeasurable f μ) (hfg : Integrable (f • g) μ) :
    μ.withDensityᵥ (f • g) = (μ.withDensity (fun x ↦ f x)).withDensityᵥ g

(hfg : MeasureTheory.Integrable (f • g) μ)

μ.withDensityᵥ (f • g) = (μ.withDensity fun x => ↑(f x)).withDensityᵥ g


theorem X_add_C_ne_one (r : R) : X + C r ≠ 1

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


theorem sq_eq_neg_normSq : a ^ 2 = -normSq a ↔ a.re = 0

{R : Type u_1}
[LinearOrderedCommRing R]
{a : ℍ[R]}

a ^ 2 = -↑(Quaternion.normSq a) ↔ a.re = 0


theorem map_objAppend1 {α γ : TypeVec n} (g : α ⟹ γ) (a : P.A) (f' : P.drop.B a ⟹ α)
    (f : P.last.B a → P.W α) :
    appendFun g (P.wMap g) <$$> P.objAppend1 a f' f =
      P.objAppend1 a (g ⊚ f') fun x => P.wMap g (f x)

{n : ℕ}
(P : MvPFunctor.{u} (n + 1))
{α γ : TypeVec.{u} n}
(g : α.Arrow γ)
(a : P.A)
(f' : (P.drop.B a).Arrow α)
(f : P.last.B a → P.W α)

MvFunctor.map (g ::: P.wMap g) (P.objAppend1 a f' f) = P.objAppend1 a (TypeVec.comp g f') fun x => P.wMap g (f x)


@[to_additive]
theorem lt_div_iff_mul_lt' : b < c / a ↔ a * b < c

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


@[simp] lemma range_piEquiv (v : ι → M) :
    LinearMap.range (piEquiv ι R M v) = span R (range v)

(ι : Type u_1)
(R : Type u_2)
(M : Type u_3)
[Finite ι]
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(v : ι → M)

LinearMap.range ((Module.piEquiv ι R M) v) = Submodule.span R (Set.range v)


/-- If a set is convex independent, a point in the set is not in the convex hull of the other
points. See `convexIndependent_iff_not_mem_convexHull_diff` for the indexed family version. -/
theorem convexIndependent_set_iff_not_mem_convexHull_diff {s : Set E} :
    ConvexIndependent 𝕜 ((↑) : s → E) ↔ ∀ x ∈ s, x ∉ convexHull 𝕜 (s \ {x})

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}

ConvexIndependent 𝕜 Subtype.val ↔ ∀ x ∈ s, x ∉ (convexHull 𝕜) (s \ {x})


theorem hasColimit_iff_small_quot (F : J ⥤ Type u) : HasColimit F ↔ Small.{u} (Quot F)

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ Type u)

CategoryTheory.Limits.HasColimit F ↔ Small.{u, max u v} (CategoryTheory.Limits.Types.Quot F)


/-- Given a distinguished triangle `T` such that `T.mor₃ = 0` and the datum of morphisms
`inr : T.obj₃ ⟶ T.obj₂` and `fst : T.obj₂ ⟶ T.obj₁` satisfying suitable relations, this
is the binary biproduct data expressing that `T.obj₂` identifies to the binary
biproduct of `T.obj₁` and `T.obj₃`.
See also `exists_iso_binaryBiproduct_of_distTriang`. -/
@[simps]
def binaryBiproductData (T : Triangle C) (hT : T ∈ distTriang C) (hT₀ : T.mor₃ = 0)
    (inr : T.obj₃ ⟶ T.obj₂) (inr_snd : inr ≫ T.mor₂ = 𝟙 _) (fst : T.obj₂ ⟶ T.obj₁)
    (total : fst ≫ T.mor₁ + T.mor₂ ≫ inr = 𝟙 T.obj₂) :
    BinaryBiproductData T.obj₁ T.obj₃

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.Pretriangulated.binaryBiproductData T hT hT₀ inr inr_snd fst total).bicone.snd = T.mor₂


theorem testAgainstNN_mono (μ : FiniteMeasure Ω) {f g : Ω →ᵇ ℝ≥0} (f_le_g : (f : Ω → ℝ≥0) ≤ g) :
    μ.testAgainstNN f ≤ μ.testAgainstNN g

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)
{f g : Ω →ᵇ ℝ≥0}
(f_le_g : ⇑f ≤ ⇑g)


@[simp]
theorem dropn_think (s : WSeq α) (n) : drop (think s) n = (drop s n).think

{α : Type u}
(s : Stream'.WSeq α)
(n : ℕ)


@[to_additive]
lemma mabs_mabs_div_mabs_le (a b : α) : |(|a|ₘ / |b|ₘ)|ₘ ≤ |a / b|ₘ

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


theorem IsExtrFilter.lineDeriv_eq_zero {l : Filter E} (h : IsExtrFilter f l a)
    (h' : Tendsto (fun t : ℝ ↦ a + t • b) (𝓝 0) l) : lineDeriv ℝ f a b = 0

(h' : Filter.Tendsto (fun t => a + t • b) (𝓝 0) l)


lemma over_map_coverPreserving {X Y : C} (f : X ⟶ Y) :
    CoverPreserving (J.over X) (J.over Y) (Over.map f)

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.CoverPreserving (J.over X) (J.over Y) (CategoryTheory.Over.map f)


@[simp] lemma mop_hom_braiding (X Y : C) : (β_ X Y).hom.mop = (β_ (mop Y) (mop X)).hom

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

(β_ X Y).hom.mop = (β_ { unmop := Y } { unmop := X }).hom


@[simp]
theorem coe_sub (f g : NormedAddGroupHom V₁ V₂) : ⇑(f - g) = f - g

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(f g : NormedAddGroupHom V₁ V₂)


/-- Every irreducible polynomial can be contracted to a separable polynomial.
https://stacks.math.columbia.edu/tag/09H0 -/
theorem _root_.Irreducible.hasSeparableContraction (q : ℕ) [hF : ExpChar F q] {f : F[X]}
    (irred : Irreducible f) : HasSeparableContraction q f

{F : Type u_1}
[Field F]
(q : ℕ)
[hF : ExpChar F q]
{f : Polynomial F}
(irred : Irreducible f)


/-- See also `Submodule.smul_sup`. -/
theorem smul_sup' (a : α) (S T : Submodule R M) : a • (S ⊔ T) = a • S ⊔ a • T

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Monoid α]
[DistribMulAction α M]
[SMulCommClass α R M]
(a : α)
(S T : Submodule R M)


lemma unitization_norm_inr (x : A) : ‖(WithLp.equiv 1 (Unitization 𝕜 A)).symm x‖ = ‖x‖

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
(x : A)

‖(WithLp.equiv 1 (Unitization 𝕜 A)).symm ↑x‖ = ‖x‖


theorem SOppSide.not_sSameSide {s : AffineSubspace R P} {x y : P} (h : s.SOppSide x y) :
    ¬s.SSameSide x y

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


@[simp] lemma castLE_comp_castSucc {n m} (h : n + 1 ≤ m) :
    Fin.castLE h ∘ Fin.castSucc = Fin.castLE (Nat.le_of_succ_le h)

Fin.castLE h ∘ Fin.castSucc = Fin.castLE ⋯


theorem diophFn_comp {f : Vector3 ℕ n → ℕ} (df : DiophFn f) (g : Vector3 ((α → ℕ) → ℕ) n)
    (dg : VectorAllP DiophFn g) : DiophFn fun v => f fun i => g i v

{α : Type}
{n : ℕ}
{f : Vector3 ℕ n → ℕ}
(df : Dioph.DiophFn f)
(g : Vector3 ((α → ℕ) → ℕ) n)
(dg : VectorAllP Dioph.DiophFn g)


/-- Each function of a family equicontinuous on `S` is continuous on `S`. -/
theorem EquicontinuousOn.continuousOn {F : ι → X → α} {S : Set X} (h : EquicontinuousOn F S)
    (i : ι) : ContinuousOn (F i) S

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{F : ι → X → α}
{S : Set X}
(h : EquicontinuousOn F S)
(i : ι)


@[simp]
theorem rTensor_comp_map (f' : P →ₗ[R] S) (f : M →ₗ[R] P) (g : N →ₗ[R] Q) :
    (f'.rTensor _).comp (map f g) = map (f'.comp f) g

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

LinearMap.rTensor Q f' ∘ₗ TensorProduct.map f g = TensorProduct.map (f' ∘ₗ f) g


theorem map_eq_zero_iff (F : C ⥤ D) [PreservesZeroMorphisms F] [Faithful F] {X Y : C} {f : X ⟶ Y} :
    F.map f = 0 ↔ f = 0


theorem _root_.ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric {A : E →L[𝕜] E} :
    IsSelfAdjoint A ↔ (A : E →ₗ[𝕜] E).IsSymmetric

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{A : E →L[𝕜] E}


theorem find_comp_succ (h : ∃ n, p n) (h₂ : ∃ n, p (n + 1)) (h1 : ¬p 1) :
    PNat.find h = PNat.find h₂ + 1

{p : ℕ+ → Prop}
[DecidablePred p]
(h : ∃ n, p n)
(h₂ : ∃ n, p (n + 1))
(h1 : ¬p 1)


/-- A densely normed field is a normed field for which the image of the norm is dense in `ℝ≥0`,
which means it is also nontrivially normed. However, not all nontrivally normed fields are densely
normed; in particular, the `Padic`s exhibit this fact. -/
class DenselyNormedField (α : Type*) extends NormedField α where
  /-- The range of the norm is dense in the collection of nonnegative real numbers. -/
  lt_norm_lt : ∀ x y : ℝ, 0 ≤ x → x < y → ∃ a : α, x < ‖a‖ ∧ ‖a‖ < y

{α : Type u_5}
[self : DenselyNormedField α]
(x y : ℝ)


lemma ofColex_injective : Injective (ofColex : Colex α → Finset α)


/-- The variable of the power series ring over an integral domain is irreducible. -/
theorem X_irreducible : Irreducible (X : R⟦X⟧)

{R : Type u_1}
[CommRing R]
[IsDomain R]


theorem gradedComm_tmul_of_zero (a : ⨁ i, 𝒜 i) (b : ℬ 0) :
    gradedComm R 𝒜 ℬ (a ⊗ₜ lof R _ ℬ 0 b) = lof R _ ℬ _ b ⊗ₜ a

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

(TensorProduct.gradedComm R 𝒜 ℬ) (a ⊗ₜ[R] (DirectSum.lof R ι ℬ 0) b) = (DirectSum.lof R ι ℬ 0) b ⊗ₜ[R] a


protected theorem sub_right_le_of_le_add {a b c : Int} (h : a ≤ b + c) : a - c ≤ b


theorem toPartENat_eq_top {c : Cardinal} :
    toPartENat c = ⊤ ↔ ℵ₀ ≤ c

Cardinal.toPartENat c = ⊤ ↔ Cardinal.aleph0 ≤ c


/-- `Ordinal.induction` but for `NatOrdinal`. -/
theorem induction {p : NatOrdinal → Prop} : ∀ (i) (_ : ∀ j, (∀ k, k < j → p k) → p j), p i

{p : NatOrdinal → Prop}
(i : NatOrdinal)

(∀ (j : NatOrdinal), (∀ k < j, p k) → p j) → p i


@[to_additive]
theorem map_right_cancel {x y} {c : S} (h : f.toMap (c * x) = f.toMap (c * y)) :
    f.toMap x = f.toMap y

(h : f.toMap (↑c + x) = f.toMap (↑c + y))


@[simp]
theorem coe_fst : ⇑(fst : P1 × P2 →ᵃ[k] P1) = Prod.fst

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


lemma _root_.CategoryTheory.ShortComplex.isComplex_toComposableArrows (S : ShortComplex C) :
    S.toComposableArrows.IsComplex


@[continuity]
theorem continuous_fourierChar : Continuous 𝐞


/-- If `p` is a locally injective separated map, and `A` is a connected space,
  then two lifts `g₁, g₂ : A → E` of a map `f : A → X` are equal if they agree at one point. -/
theorem eq_of_comp_eq [PreconnectedSpace A] (h₁ : Continuous g₁) (h₂ : Continuous g₂)
    (he : p ∘ g₁ = p ∘ g₂) (a : A) (ha : g₁ a = g₂ a) : g₁ = g₂

{X : Type u_3}
{E : Type u_1}
{A : Type u_2}
[TopologicalSpace E]
[TopologicalSpace A]
{p : E → X}
(sep : IsSeparatedMap p)
(inj : IsLocallyInjective p)
{g₁ g₂ : A → E}
[PreconnectedSpace A]
(h₁ : Continuous g₁)
(h₂ : Continuous g₂)
(he : p ∘ g₁ = p ∘ g₂)
(a : A)
(ha : g₁ a = g₂ a)


theorem val_apply (x : S) : S.val x = (x : A)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R A)
(x : ↥S)


@[simp]
theorem edgeSet_subset_edgeSet : edgeSet G₁ ⊆ edgeSet G₂ ↔ G₁ ≤ G₂


theorem decode_encodeBool (b : Bool) : decodeBool (encodeBool b) = b

Computability.decodeBool (Computability.encodeBool b) = b


theorem ContinuousWithinAt.of_dslope (h : ContinuousWithinAt (dslope f a) s b) :
    ContinuousWithinAt f s b


/-- If `S` is an unramified `R`-algebra, then `R`-flat implies `S`-flat. Iversen I.2.7 -/
lemma flat_of_restrictScalars [Module.Flat R M] : Module.Flat S M

(R S : Type u_2)
[CommRing R]
[CommRing S]
[Algebra R S]
(M : Type u_1)
[AddCommGroup M]
[Module R M]
[Module S M]
[IsScalarTower R S M]
[Algebra.FormallyUnramified R S]
[Algebra.EssFiniteType R S]
[Module.Flat R M]


protected theorem aemeasurable [PseudoMetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
    (f : α →ₘ[μ] β) : AEMeasurable f μ


/-- If two ring homomorphisms from `MonoidAlgebra k G` are equal on all `single a 1`
and `single 1 b`, then they are equal. -/
theorem ringHom_ext {R} [Semiring k] [MulOneClass G] [Semiring R] {f g : MonoidAlgebra k G →+* R}
    (h₁ : ∀ b, f (single 1 b) = g (single 1 b)) (h_of : ∀ a, f (single a 1) = g (single a 1)) :
    f = g

(h₁ : ∀ (b : k), f (MonoidAlgebra.single 1 b) = g (MonoidAlgebra.single 1 b))

(h_of : ∀ (a : G), f (MonoidAlgebra.single a 1) = g (MonoidAlgebra.single a 1))


@[simp] theorem run_monadMap [MonadFunctor n m] (f : {β : Type u} → n β → n β) (x : ReaderT ρ m α) (ctx : ρ)
    : (monadMap @f x : ReaderT ρ m α).run ctx = monadMap @f (x.run ctx)

{n : Type u → Type u_1}
{m : Type u → Type u_2}
{ρ α : Type u}
[MonadFunctor n m]
(f : {β : Type u} → n β → n β)
(x : ReaderT ρ m α)
(ctx : ρ)

(monadMap f x).run ctx = monadMap f (x.run ctx)


lemma injective_lift_iff {I : Ideal R} {f : R →+* S} (H : ∀ (a : R), a ∈ I → f a = 0) :
    Injective (Quotient.lift I f H) ↔ ker f = I

{R : Type u}
{S : Type v}
[CommRing R]
[Semiring S]
{I : Ideal R}
{f : R →+* S}
(H : ∀ a ∈ I, f a = 0)

Function.Injective ⇑(Ideal.Quotient.lift I f H) ↔ RingHom.ker f = I


/-- A product of ideals in an integral domain is zero if and only if one of the terms is zero. -/
@[simp]
lemma multiset_prod_eq_bot {R : Type*} [CommRing R] [IsDomain R] {s : Multiset (Ideal R)} :
    s.prod = ⊥ ↔ ⊥ ∈ s

{R : Type u_2}
[CommRing R]
[IsDomain R]
{s : Multiset (Ideal R)}


@[to_additive]
theorem smul_def : a • x = x.map (a • ·) (a • ·)

{M : Type u_1}
{α : Type u_4}
{β : Type u_5}
[VAdd M α]
[VAdd M β]
(a : M)
(x : α ⊕ β)

a +ᵥ x = Sum.map (fun x => a +ᵥ x) (fun x => a +ᵥ x) x


theorem iInf_iSup_of_antitone {ι ι' α : Type*} [Finite ι] [Preorder ι'] [Nonempty ι']
    [IsDirected ι' (· ≤ ·)] [Order.Coframe α] {f : ι → ι' → α} (hf : ∀ i, Antitone (f i)) :
    ⨅ j, ⨆ i, f i j = ⨆ i, ⨅ j, f i j

{ι : Type u_1}
{ι' : Type u_2}
{α : Type u_3}
[Finite ι]
[Preorder ι']
[Nonempty ι']
[IsDirected ι' fun x x_1 => x ≤ x_1]
[Order.Coframe α]
{f : ι → ι' → α}
(hf : ∀ (i : ι), Antitone (f i))


theorem USize.toNat_mod (x y : USize) : (x % y).toNat = x.toNat % y.toNat


theorem eventually_atTop_prod_self' [SemilatticeSup α] [Nonempty α] {p : α × α → Prop} :
    (∀ᶠ x in atTop, p x) ↔ ∃ a, ∀ k ≥ a, ∀ l ≥ a, p (k, l)

{α : Type u_3}
[SemilatticeSup α]
[Nonempty α]
{p : α × α → Prop}

(∀ᶠ (x : α × α) in Filter.atTop, p x) ↔ ∃ a, ∀ k ≥ a, ∀ l ≥ a, p (k, l)


theorem continuous_sum_elim {f : X → Z} {g : Y → Z} :
    Continuous (Sum.elim f g) ↔ Continuous f ∧ Continuous g

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Z}
{g : Y → Z}


/-- The midpoint of the segment AB is the same distance from A as it is from B. -/
theorem dist_left_midpoint_eq_dist_right_midpoint (p1 p2 : P) :
    dist p1 (midpoint ℝ p1 p2) = dist p2 (midpoint ℝ p1 p2)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(p1 p2 : P)


lemma parallelPair_initial_mk {X Y : C} (f g : X ⟶ Y)
    (h₁ : ∀ Z, Nonempty (X ⟶ Z))
    (h₂ : ∀ ⦃Z : C⦄ (i j : X ⟶ Z), ∃ (a : Y ⟶ Z), i = f ≫ a ∧ j = g ≫ a) :
    (parallelPair f g).Initial

(h₂ :
  ∀ ⦃Z : C⦄ (i j : X ⟶ Z), ∃ a, i = CategoryTheory.CategoryStruct.comp f a ∧ j = CategoryTheory.CategoryStruct.comp g a)


lemma append_comp_rev {m n} {α : Type*} (xs : Fin m → α) (ys : Fin n → α) :
    append xs ys ∘ rev = append (ys ∘ rev) (xs ∘ rev) ∘ cast (Nat.add_comm ..)

{m n : ℕ}
{α : Type u_1}
(xs : Fin m → α)
(ys : Fin n → α)

Fin.append xs ys ∘ Fin.rev = Fin.append (ys ∘ Fin.rev) (xs ∘ Fin.rev) ∘ Fin.cast ⋯


/-- The composition of `C^∞` functions on domains is `C^∞`. -/
nonrec theorem SmoothOn.comp {t : Set M'} {g : M' → M''} (hg : SmoothOn I' I'' g t)
    (hf : SmoothOn I I' f s) (st : s ⊆ f ⁻¹' t) : SmoothOn I I'' (g ∘ f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{E'' : Type u_8}
[NormedAddCommGroup E'']
[NormedSpace 𝕜 E'']
{H'' : Type u_9}
[TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''}
{M'' : Type u_10}
[TopologicalSpace M'']
[ChartedSpace H'' M'']
{f : M → M'}
{s : Set M}
{t : Set M'}
{g : M' → M''}
(hg : SmoothOn I' I'' g t)
(hf : SmoothOn I I' f s)
(st : s ⊆ f ⁻¹' t)


/-- A morphism into the opposite monoid acts on the product by acting on the reversed elements. -/
lemma unop_map_list_prod {F : Type*} [FunLike F M Nᵐᵒᵖ] [MonoidHomClass F M Nᵐᵒᵖ]
    (f : F) (l : List M) :
    (f l.prod).unop = (l.map (MulOpposite.unop ∘ f)).reverse.prod

{M : Type u_4}
{N : Type u_5}
[Monoid M]
[Monoid N]
{F : Type u_8}
[FunLike F M Nᵐᵒᵖ]
[MonoidHomClass F M Nᵐᵒᵖ]
(f : F)
(l : List M)

MulOpposite.unop (f l.prod) = (List.map (MulOpposite.unop ∘ ⇑f) l).reverse.prod


@[simp]
theorem ofDual_inf [Sup α] (a b : αᵒᵈ) : ofDual (a ⊓ b) = ofDual a ⊔ ofDual b

OrderDual.ofDual (a ⊓ b) = OrderDual.ofDual a ⊔ OrderDual.ofDual b


@[simp] theorem le_eq : Nat.le x y = (x ≤ y)


theorem IsLUB.ciSup_eq [Nonempty ι] {f : ι → α} (H : IsLUB (range f) a) : ⨆ i, f i = a

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
{a : α}
[Nonempty ι]
{f : ι → α}
(H : IsLUB (Set.range f) a)


/-- A face is a subset of another one iff its vertices are. -/
theorem face_subset_face_iff (hs : s ∈ K.faces) (ht : t ∈ K.faces) :
    convexHull 𝕜 (s : Set E) ⊆ convexHull 𝕜 ↑t ↔ s ⊆ t

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{K : Geometry.SimplicialComplex 𝕜 E}
{s t : Finset E}
(hs : s ∈ K.faces)
(ht : t ∈ K.faces)

(convexHull 𝕜) ↑s ⊆ (convexHull 𝕜) ↑t ↔ s ⊆ t


@[simp]
theorem nontrivial_reverse_iff {s : Cycle α} : s.reverse.Nontrivial ↔ s.Nontrivial


@[simp] theorem next?_cons (a l) : @next? α (a :: l) = some (a, l)


@[simp]
theorem mem_iInf {ι} (p : ι → LieSubmodule R L M) {x} : (x ∈ ⨅ i, p i) ↔ ∀ i, x ∈ p i

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{ι : Sort u_1}
(p : ι → LieSubmodule R L M)
{x : M}


protected theorem Ne.ite_ne_left_iff (h : a ≠ b) : ite P a b ≠ a ↔ ¬P

{α : Sort u_1}
{P : Prop}
[Decidable P]
{a b : α}
(h : a ≠ b)


@[to_additive]
theorem comap_le_comap_iff_of_surjective {S T : Submonoid N} : S.comap f ≤ T.comap f ↔ S ≤ T

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}
(hf : Function.Surjective ⇑f)
{S T : AddSubmonoid N}

AddSubmonoid.comap f S ≤ AddSubmonoid.comap f T ↔ S ≤ T


lemma Real.singleton_eq_inter_Icc (b : ℝ) : {b} = ⋂ (r > 0), Icc (b - r) (b + r)


theorem dom_of_lt {x y : PartENat} : x < y → x.Dom


theorem upperSemicontinuousWithinAt_univ_iff :
    UpperSemicontinuousWithinAt f univ x ↔ UpperSemicontinuousAt f x

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

UpperSemicontinuousWithinAt f Set.univ x ↔ UpperSemicontinuousAt f x


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


@[to_additive (attr := simp)]
theorem image_one [DecidableEq β] {f : α → β} : image f 1 = {f 1}

{α : Type u_2}
{β : Type u_3}
[Zero α]
[DecidableEq β]
{f : α → β}


/-- Definition of `Pullback.TotalSpace.topologicalSpace`, which we make irreducible. -/
irreducible_def pullbackTopology : TopologicalSpace (TotalSpace F (f *ᵖ E))

[TopologicalSpace (Bundle.TotalSpace F E)]

pullbackTopology F E f =
  TopologicalSpace.induced Bundle.TotalSpace.proj inst✝ ⊓ TopologicalSpace.induced (Bundle.Pullback.lift f) inst✝¹


protected theorem continuousAt (e : M₁ ≃SL[σ₁₂] M₂) {x : M₁} : ContinuousAt (e : M₁ → M₂) x

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(e : M₁ ≃SL[σ₁₂] M₂)
{x : M₁}


@[to_additive]
theorem map_inl (s : Submonoid M) : s.map (inl M N) = s.prod ⊥

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(s : Submonoid M)

Submonoid.map (MonoidHom.inl M N) s = s.prod ⊥


theorem HasDerivAt.hasGradientAt' (h : HasDerivAt g g' u) :
    HasGradientAt g g' u

{g : ℝ → ℝ}
{g' u : ℝ}
(h : HasDerivAt g g' u)


theorem suffix_of_suffix_length_le
    (h₁ : l₁ <:+ l₃) (h₂ : l₂ <:+ l₃) (ll : length l₁ ≤ length l₂) : l₁ <:+ l₂

∀ {α : Type u_1} {l₁ l₃ l₂ : List α}, l₁ <:+ l₃ → l₂ <:+ l₃ → l₁.length ≤ l₂.length → l₁ <:+ l₂


protected theorem aeeq (hf : UnifTight f p μ) (hfg : ∀ n, f n =ᵐ[μ] g n) :
    UnifTight g p μ

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f g : ι → α → β}
{p : ENNReal}
(hf : MeasureTheory.UnifTight f p μ)
(hfg : ∀ (n : ι), f n =ᵐ[μ] g n)


theorem posMulReflectLE_iff_posMulReflectLT : PosMulReflectLE α ↔ PosMulReflectLT α

{α : Type u_1}
[CancelMonoidWithZero α]
[PartialOrder α]


theorem Valuation.inversion_estimate {x y : K} {γ : Γ₀ˣ} (y_ne : y ≠ 0)
    (h : v (x - y) < min (γ * (v y * v y)) (v y)) : v (x⁻¹ - y⁻¹) < γ

(h : v (x - y) < min (↑γ * (v y * v y)) (v y))


theorem comp_c_app' {X Y Z : SheafedSpace C} (α : X ⟶ Y) (β : Y ⟶ Z) (U) :
    (α ≫ β).c.app (op U) = β.c.app (op U) ≫ α.c.app (op ((Opens.map β.base).obj U))

{X Y Z : AlgebraicGeometry.SheafedSpace C}

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

(α ≫ β).c.app (Opposite.op U) =
  β.c.app (Opposite.op U) ≫ α.c.app (Opposite.op ((TopologicalSpace.Opens.map β.base).obj U))


/-- Maps a term's symbols along a language equivalence. -/
@[simps]
def Lequiv.onTerm (φ : L ≃ᴸ L') : L.Term α ≃ L'.Term α

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{α : Type u'}
(φ : L ≃ᴸ L')

∀ (a : L'.Term α), (FirstOrder.Language.Lequiv.onTerm φ).symm a = φ.invLHom.onTerm a


/-- `VAddMemClass S R M` says `S` is a type of subsets `s ≤ M` that are closed under the
additive action of `R` on `M`.

Note that only `R` is marked as an `outParam` here, since `M` is supplied by the `SetLike`
class instead. -/
class VAddMemClass (S : Type*) (R : outParam Type*) (M : Type*) [VAdd R M] [SetLike S M] :
    Prop where
  /-- Addition by a scalar with an element of the set remains in the set. -/
  vadd_mem : ∀ {s : S} (r : R) {m : M}, m ∈ s → r +ᵥ m ∈ s

{S : Type u_1}
{R : outParam (Type u_2)}
{M : Type u_3}
[VAdd R M]
[SetLike S M]
[self : VAddMemClass S R M]
{s : S}
(r : R)
{m : M}


protected theorem pow_mem {R : Type*} [Semiring R] (s : Subsemiring R) {x : R} (hx : x ∈ s)
    (n : ℕ) : x ^ n ∈ s

{R : Type u_1}
[Semiring R]
(s : Subsemiring R)
{x : R}
(hx : x ∈ s)
(n : ℕ)


/-- Adjunction between two 1-morphisms. -/
structure Adjunction (f : a ⟶ b) (g : b ⟶ a) where
  /-- The unit of an adjunction. -/
  unit : 𝟙 a ⟶ f ≫ g
  /-- The counit of an adjunction. -/
  counit : g ≫ f ⟶ 𝟙 b
  /-- The composition of the unit and the counit is equal to the identity up to unitors. -/
  left_triangle : leftZigzag unit counit = (λ_ _).hom ≫ (ρ_ _).inv := by aesop_cat
  /-- The composition of the unit and the counit is equal to the identity up to unitors. -/
  right_triangle : rightZigzag unit counit = (ρ_ _).hom ≫ (λ_ _).inv := by aesop_cat

(self : CategoryTheory.Bicategory.Adjunction f g)

CategoryTheory.Bicategory.rightZigzag self.unit self.counit =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.rightUnitor g).hom
    (CategoryTheory.Bicategory.leftUnitor g).inv


theorem norm_norm [Algebra.IsSeparable K L] [Algebra F L] [Algebra.IsSeparable F L]
    [FiniteDimensional F L] [IsScalarTower K F L] (x : 𝓞 L) : norm K (norm F x) = norm K x

{L : Type u_1}
(K : Type u_2)
[Field K]
[Field L]
[Algebra K L]
[FiniteDimensional K L]
(F : Type u_3)
[Field F]
[Algebra K F]
[Algebra.IsSeparable K F]
[FiniteDimensional K F]
[Algebra.IsSeparable K L]
[Algebra F L]
[Algebra.IsSeparable F L]
[FiniteDimensional F L]
[IsScalarTower K F L]
(x : 𝓞 L)

(RingOfIntegers.norm K) ((RingOfIntegers.norm F) x) = (RingOfIntegers.norm K) x


@[reassoc (attr := simp)]
theorem PInfty_f_naturality (n : ℕ) {X Y : SimplicialObject C} (f : X ⟶ Y) :
    f.app (op [n]) ≫ PInfty.f n = PInfty.f n ≫ f.app (op [n])

{X Y : CategoryTheory.SimplicialObject C}

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


/-- The **Cauchy-Davenport Theorem** for linearly ordered cancellative semigroups. The size of
`s * t` is lower-bounded by `|s| + |t| - 1`. -/
@[to_additive
"The **Cauchy-Davenport theorem** for linearly ordered additive cancellative semigroups. The size of
`s + t` is lower-bounded by `|s| + |t| - 1`."]
lemma Finset.card_add_card_sub_one_le_card_mul [LinearOrder α] [Semigroup α] [IsCancelMul α]
    [CovariantClass α α (· * ·) (· ≤ ·)] [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
    {s t : Finset α} (hs : s.Nonempty) (ht : t.Nonempty) : s.card + t.card - 1 ≤ (s * t).card

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


@[simp]
theorem domRestrict_domain (f : E →ₗ.[R] F) {S : Submodule R E} :
    (f.domRestrict S).domain = S ⊓ f.domain

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(f : E →ₗ.[R] F)
{S : Submodule R E}


theorem interior_sphere (x : E) {r : ℝ} (hr : r ≠ 0) : interior (sphere x r) = ∅

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
(x : E)
{r : ℝ}
(hr : r ≠ 0)


@[nontriviality]
theorem of_discrete [DiscreteTopology X] (f : X → Y) : IsLocallyConstant f

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


@[simp] theorem _root_.OrderHomClass.coe_coe {F} [FunLike F α β] [OrderHomClass F α β] (f : F) :
    ⇑(f : α →o β) = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{F : Type u_6}
[FunLike F α β]
[OrderHomClass F α β]
(f : F)


theorem fromPadicInt_comp_toPadicInt :
    (fromPadicInt p).comp (toPadicInt p) = RingHom.id (𝕎 (ZMod p))

(WittVector.fromPadicInt p).comp (WittVector.toPadicInt p) = RingHom.id (𝕎 (ZMod p))


@[simp]
theorem toMul_add [Mul α] (x y : Additive α) : toMul (x + y) = toMul x * toMul y

Additive.toMul (x + y) = Additive.toMul x * Additive.toMul y


/-- A simple sufficient condition for bounding `levyProkhorovDist` between probability measures
from above. The condition involves only one of two natural bounds, the other bound is for free. -/
lemma levyProkhorovDist_le_of_forall_le
    (μ ν : Measure Ω) [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] {δ : ℝ} (δ_nn : 0 ≤ δ)
    (h : ∀ ε B, δ < ε → MeasurableSet B → μ B ≤ ν (thickening ε B) + ENNReal.ofReal ε) :
    levyProkhorovDist μ ν ≤ δ

(h : ∀ (ε : ℝ) (B : Set Ω), δ < ε → MeasurableSet B → μ B ≤ ν (Metric.thickening ε B) + ENNReal.ofReal ε)


theorem convex_sum {ι} {s : Finset ι} (t : ι → Set E) (h : ∀ i ∈ s, Convex 𝕜 (t i)) :
    Convex 𝕜 (∑ i ∈ s, t i)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{ι : Type u_5}
{s : Finset ι}
(t : ι → Set E)
(h : ∀ i ∈ s, Convex 𝕜 (t i))


@[simp] lemma unop_sub [Sub α] (x y : αᵐᵒᵖ) : unop (x - y) = unop x - unop y

MulOpposite.unop (x - y) = MulOpposite.unop x - MulOpposite.unop y


@[simp]
lemma mem_functorPushforward_inverse {X : D} {S : Sieve X} {e : C ≌ D} {f : Y ⟶ e.inverse.obj X} :
    S.functorPushforward e.inverse f ↔ S (e.functor.map f ≫ e.counit.app X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{Y : C}
{X : D}
{S : CategoryTheory.Sieve X}
{e : C ≌ D}
{f : Y ⟶ e.inverse.obj X}

(CategoryTheory.Sieve.functorPushforward e.inverse S).arrows f ↔
  S.arrows (CategoryTheory.CategoryStruct.comp (e.functor.map f) (e.counit.app X))


theorem uncountable_iff_isEmpty_embedding : Uncountable α ↔ IsEmpty (α ↪ ℕ)


@[to_additive]
theorem orderOf_dvd_lcm_mul (h : Commute x y):
    orderOf y ∣ Nat.lcm (orderOf x) (orderOf (x * y))

{G : Type u_1}
[Monoid G]
{x y : G}
(h : Commute x y)

orderOf y ∣ (orderOf x).lcm (orderOf (x * y))


/-- If `K / E / F` is a field extension tower such that `K / F` is purely inseparable,
then `E / F` is also purely inseparable. -/
theorem IsPurelyInseparable.tower_bot [Algebra E K] [IsScalarTower F E K]
    [IsPurelyInseparable F K] : IsPurelyInseparable F E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type w)
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]
[IsPurelyInseparable F K]


@[simp]
theorem pushoutIsoUnopPullback_inv_snd {X Y Z : C} (f : X ⟶ Z) (g : X ⟶ Y) [HasPushout f g]
    [HasPullback f.op g.op] :
    (pushoutIsoUnopPullback f g).inv.op ≫ pullback.snd f.op g.op = (pushout.inr f g).op

(CategoryTheory.Limits.pushoutIsoUnopPullback f g).inv.op ≫ CategoryTheory.Limits.pullback.snd f.op g.op =
  (CategoryTheory.Limits.pushout.inr f g).op


@[to_additive (attr := simp) MeasureTheory.addFundamentalFrontier_vadd]
theorem fundamentalFrontier_smul [Group H] [MulAction H α] [SMulCommClass H G α] (g : H) :
    fundamentalFrontier G (g • s) = g • fundamentalFrontier G s

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

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


theorem int_sub (h : Irrational x) (m : ℤ) : Irrational (m - x)


theorem rpow_sub_int {x : ℝ} (hx : x ≠ 0) (y : ℝ) (n : ℕ) : x ^ (y - n) = x ^ y / x ^ n


@[continuity, fun_prop]
theorem Continuous.clm_apply {X} [TopologicalSpace X] {f : X → (E →L[𝕜] F)} {g : X → E}
    (hf : Continuous f) (hg : Continuous g) : Continuous (fun x ↦ (f x) (g x))

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{X : Type u_5}
[TopologicalSpace X]
{f : X → E →L[𝕜] F}
{g : X → E}
(hf : Continuous f)
(hg : Continuous g)


lemma Walk.connected_induce_support {u v : V} (p : G.Walk u v) :
    (G.induce {v | v ∈ p.support}).Connected

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

(SimpleGraph.induce {v_1 | v_1 ∈ p.support} G).Connected


private lemma good_vertices_triangle_card [DecidableEq α] (dst : 2 * ε ≤ G.edgeDensity s t)
    (dsu : 2 * ε ≤ G.edgeDensity s u) (dtu : 2 * ε ≤ G.edgeDensity t u) (utu : G.IsUniform ε t u)
    (x : α) (hx : x ∈ s \ (badVertices G ε s t ∪ badVertices G ε s u)) :
    ε ^ 3 * t.card * u.card ≤ (((t.filter (G.Adj x) ×ˢ u.filter (G.Adj x)).filter
        fun (y, z) ↦ G.Adj y z).image (x, ·)).card

(hx : x ∈ s \ (SimpleGraph.badVertices G ε s t ∪ SimpleGraph.badVertices G ε s u))

ε ^ 3 * ↑t.card * ↑u.card ≤
  ↑(Finset.image (fun x_1 => (x, x_1))
        (Finset.filter
          (fun x =>
            match x with
            | (y, z) => G.Adj y z)
          (Finset.filter (G.Adj x) t ×ˢ Finset.filter (G.Adj x) u))).card


/-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
(e : M ≃* N)

∀ {X Y : CategoryTheory.SingleObj N} (a : N), e.toSingleObjEquiv.inverse.map a = e.symm a


theorem zero_apply (a : A) : (0 : A →ₑ+[φ] B) a = 0

{M : Type u_1}
[Monoid M]
{N : Type u_2}
[Monoid N]
{φ : M →* N}
{A : Type u_4}
[AddMonoid A]
[DistribMulAction M A]
{B : Type u_5}
[AddMonoid B]
[DistribMulAction N B]
(a : A)


theorem localization_isReduced : LocalizationPreserves fun R hR => IsReduced R


/-- The L-series of the constant sequence `1` does not vanish on the right half-plane
`re s > 1`. -/
lemma LSeries_one_ne_zero_of_one_lt_re {s : ℂ} (hs : 1 < s.re) : L 1 s ≠ 0


@[simp]
theorem coe_toIcoMod (θ ψ : ℝ) : ↑(toIcoMod two_pi_pos ψ θ) = (θ : Angle)


theorem dualRestrict_def (W : Submodule R M) : W.dualRestrict = W.subtype.dualMap

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


@[simp]
theorem iInf_top : (⨅ _ : ι, ⊤ : α) = ⊤

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]


theorem not_lt_of_ge {x y : Int} (h : y ≥ x) : ¬ (y < x)


/-- `Functor C D` represents a functor between categories `C` and `D`.

To apply a functor `F` to an object use `F.obj X`, and to a morphism use `F.map f`.

The axiom `map_id` expresses preservation of identities, and
`map_comp` expresses functoriality.

See <https://stacks.math.columbia.edu/tag/001B>.
-/
structure Functor (C : Type u₁) [Category.{v₁} C] (D : Type u₂) [Category.{v₂} D]
    extends Prefunctor C D : Type max v₁ v₂ u₁ u₂ where
  /-- A functor preserves identity morphisms. -/
  map_id : ∀ X : C, map (𝟙 X) = 𝟙 (obj X) := by aesop_cat
  /-- A functor preserves composition. -/
  map_comp : ∀ {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z), map (f ≫ g) = map f ≫ map g := by aesop_cat

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

self.map (CategoryTheory.CategoryStruct.comp f g) = CategoryTheory.CategoryStruct.comp (self.map f) (self.map g)


/-- See `LinearIndependent.fin_cons` for a family of elements in a vector space. -/
theorem LinearIndependent.fin_cons' {m : ℕ} (x : M) (v : Fin m → M) (hli : LinearIndependent R v)
    (x_ortho : ∀ (c : R) (y : Submodule.span R (Set.range v)), c • x + y = (0 : M) → c = 0) :
    LinearIndependent R (Fin.cons x v : Fin m.succ → M)

(x_ortho : ∀ (c : R) (y : ↥(Submodule.span R (Set.range v))), c • x + ↑y = 0 → c = 0)


theorem trinomial_support (hkm : k < m) (hmn : m < n) (hu : u ≠ 0) (hv : v ≠ 0) (hw : w ≠ 0) :
    (trinomial k m n u v w).support = {k, m, n}

{R : Type u_1}
[Semiring R]
{k m n : ℕ}
{u v w : R}
(hkm : k < m)
(hmn : m < n)
(hu : u ≠ 0)
(hv : v ≠ 0)
(hw : w ≠ 0)

(Polynomial.trinomial k m n u v w).support = {k, m, n}


@[to_additive (attr := ext 1100)]
theorem hom_ext {f g : AssocQuotient α →ₙ* β} (h : f.comp of = g.comp of) : f = g

(h : f.comp Magma.AssocQuotient.of = g.comp Magma.AssocQuotient.of)


@[simp]
theorem sup_add (s₁ s₂ : Multiset α) : (s₁ + s₂).sup = s₁.sup ⊔ s₂.sup

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
(s₁ s₂ : Multiset α)


/-- If `α` is non-empty, an action is pretransitive if and only if the quotient has exactly one
element. -/
@[to_additive "If `α` is non-empty, an additive action is pretransitive if and only if the
quotient has exactly one element."]
theorem pretransitive_iff_unique_quotient_of_nonempty [Nonempty α] :
    IsPretransitive G α ↔ Nonempty (Unique <| orbitRel.Quotient G α)

(G : Type u_1)
(α : Type u_2)
[Group G]
[MulAction G α]
[Nonempty α]

MulAction.IsPretransitive G α ↔ Nonempty (Unique (MulAction.orbitRel.Quotient G α))


theorem contMDiffWithinAt_iff_source_of_mem_source {x' : M} (hx' : x' ∈ (chartAt H x).source) :
    ContMDiffWithinAt I I' n f s x' ↔
      ContMDiffWithinAt 𝓘(𝕜, E) I' n (f ∘ (extChartAt I x).symm)
        ((extChartAt I x).symm ⁻¹' s ∩ range I) (extChartAt I x x')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s : Set M}
{x : M}
{n : ℕ∞}
{x' : M}
(hx' : x' ∈ (chartAt H x).source)

ContMDiffWithinAt I I' n f s x' ↔
  ContMDiffWithinAt 𝓘(𝕜, E) I' n (f ∘ ↑(extChartAt I x).symm) (↑(extChartAt I x).symm ⁻¹' s ∩ Set.range ↑I)
    (↑(extChartAt I x) x')


/-- **Fundamental theorem of calculus-1**: if `f : ℝ → E` is integrable on `a..b` and `f` is
continuous at `a` and `b`, then `fderiv` derivative of `(u, v) ↦ ∫ x in u..v, f x` at `(a, b)`
equals `(u, v) ↦ v • cb - u • ca`. -/
theorem fderiv_integral (hf : IntervalIntegrable f volume a b)
    (hmeas_a : StronglyMeasurableAtFilter f (𝓝 a)) (hmeas_b : StronglyMeasurableAtFilter f (𝓝 b))
    (ha : ContinuousAt f a) (hb : ContinuousAt f b) :
    fderiv ℝ (fun p : ℝ × ℝ => ∫ x in p.1..p.2, f x) (a, b) =
      (snd ℝ ℝ ℝ).smulRight (f b) - (fst ℝ ℝ ℝ).smulRight (f a)

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas_a : StronglyMeasurableAtFilter f (𝓝 a) MeasureTheory.volume)

(hmeas_b : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

fderiv ℝ (fun p => ∫ (x : ℝ) in p.1 ..p.2, f x) (a, b) =
  (ContinuousLinearMap.snd ℝ ℝ ℝ).smulRight (f b) - (ContinuousLinearMap.fst ℝ ℝ ℝ).smulRight (f a)


theorem iterateFrobenius_def : iterateFrobenius R p n x = x ^ p ^ n

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


@[simp]
theorem functorPullback_mem (R : Presieve (F.obj X)) {Y} (f : Y ⟶ X) :
    R.functorPullback F f ↔ R (F.map f)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
{X : C}
(R : CategoryTheory.Presieve (F.obj X))
{Y : C}
(f : Y ⟶ X)

CategoryTheory.Presieve.functorPullback F R f ↔ R (F.map f)


/-- Right-composition gives a functor `(D ⥤ E) ⥤ ((C ⥤ D) ⥤ (C ⥤ E))`.

`(whiskeringRight.obj H).obj F` is `F ⋙ H`, and
`(whiskeringRight.obj H).map α` is `whiskerRight α H`.
-/
@[simps]
def whiskeringRight : (D ⥤ E) ⥤ (C ⥤ D) ⥤ C ⥤ E

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
(D : Type u₂)
[CategoryTheory.Category.{v₂, u₂} D]
(E : Type u₃)
[CategoryTheory.Category.{v₃, u₃} E]
(H : CategoryTheory.Functor D E)

∀ {X Y : CategoryTheory.Functor C D} (α : X ⟶ Y),
  ((CategoryTheory.whiskeringRight C D E).obj H).map α = CategoryTheory.whiskerRight α H


@[to_additive relindex_inf_mul_relindex]
theorem relindex_inf_mul_relindex : H.relindex (K ⊓ L) * K.relindex L = (H ⊓ K).relindex L

{G : Type u_1}
[Group G]
(H K L : Subgroup G)


theorem swap_mem_divisorsAntidiagonal {x : ℕ × ℕ} :
    x.swap ∈ divisorsAntidiagonal n ↔ x ∈ divisorsAntidiagonal n

x.swap ∈ n.divisorsAntidiagonal ↔ x ∈ n.divisorsAntidiagonal


/-- The additive equivalence between `FreeAbelianGroup X` and `(X →₀ ℤ)`. -/
@[simps!]
def equivFinsupp : FreeAbelianGroup X ≃+ (X →₀ ℤ)

(FreeAbelianGroup.equivFinsupp X) a = FreeAbelianGroup.toFinsupp a


theorem coe_prod (f : M →ₗ[R] M₂) (g : M →ₗ[R] M₃) : ⇑(f.prod g) = Pi.prod f g

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


/-- The transitivity axiom in 'arrow' form: If `S` covers `f` and every arrow in `S` is covered by
`R`, then `R` covers `f`.
-/
theorem arrow_trans (f : Y ⟶ X) (S R : Sieve X) (h : J.Covers S f) :
    (∀ {Z : C} (g : Z ⟶ X), S g → J.Covers R g) → J.Covers R f

(J : CategoryTheory.GrothendieckTopology C)

(∀ {Z : C} (g : Z ⟶ X), S.arrows g → J.Covers R g) → J.Covers R f


theorem continuous_symm_of_equiv_compact_to_t2 [CompactSpace X] [T2Space Y] {f : X ≃ Y}
    (hf : Continuous f) : Continuous f.symm

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[CompactSpace X]
[T2Space Y]
{f : X ≃ Y}
(hf : Continuous ⇑f)


@[simp]
theorem cocone_inr (s : CommSq f g h i) : s.cocone.inr = i

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
(s : CategoryTheory.CommSq f g h i)


@[simp]
theorem mk'_d_1_0 : (mk' X₀ X₁ d₀ succ').d 0 1 = d₀

(succ' : {X₀ X₁ : V} → (f : X₀ ⟶ X₁) → (X₂ : V) ×' (d : X₁ ⟶ X₂) ×' f ≫ d = 0)

(CochainComplex.mk' X₀ X₁ d₀ fun {X₀ X₁} => succ').d 0 1 = d₀


@[to_additive (attr := simp)]
theorem piCongrRight_trans {η : Type*} {Ms Ns Ps : η → Type*} [∀ j, Mul (Ms j)]
    [∀ j, Mul (Ns j)] [∀ j, Mul (Ps j)] (es : ∀ j, Ms j ≃* Ns j) (fs : ∀ j, Ns j ≃* Ps j) :
    (piCongrRight es).trans (piCongrRight fs) = piCongrRight fun i => (es i).trans (fs i)

{η : Type u_12}
{Ms : η → Type u_13}
{Ns : η → Type u_14}
{Ps : η → Type u_15}
[(j : η) → Mul (Ms j)]
[(j : η) → Mul (Ns j)]
[(j : η) → Mul (Ps j)]
(es : (j : η) → Ms j ≃* Ns j)
(fs : (j : η) → Ns j ≃* Ps j)

(MulEquiv.piCongrRight es).trans (MulEquiv.piCongrRight fs) = MulEquiv.piCongrRight fun i => (es i).trans (fs i)


theorem hasDerivAtFilter : HasDerivAtFilter f (f.linear 1) x L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(f : 𝕜 →ᵃ[𝕜] E)
{L : Filter 𝕜}
{x : 𝕜}


@[simp]
theorem inclusion_inj (h : s ⊆ t) {x y : s} : inclusion h x = inclusion h y ↔ x = y

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

Set.inclusion h x = Set.inclusion h y ↔ x = y


lemma completedCosZeta_eq (a : UnitAddCircle) (s : ℂ) :
    completedCosZeta a s =
    completedCosZeta₀ a s - 1 / s - (if a = 0 then 1 else 0) / (1 - s)

HurwitzZeta.completedCosZeta a s = HurwitzZeta.completedCosZeta₀ a s - 1 / s - (if a = 0 then 1 else 0) / (1 - s)


@[trans]
theorem lf_of_equiv_of_lf {x y z : PGame} (h₁ : x ≈ y) : y ⧏ z → x ⧏ z


theorem monic_integralNormalization {f : R[X]} (hf : f ≠ 0) : Monic (integralNormalization f)

{R : Type u}
[Semiring R]
{f : R[X]}
(hf : f ≠ 0)


/-- Let `M` be a `(n+1) × n` matrix whose row sums to zero. Then all the matrices obtained by
deleting one row have the same determinant up to a sign. -/
theorem submatrix_succAbove_det_eq_negOnePow_submatrix_succAbove_det {n : ℕ}
    (M : Matrix (Fin (n + 1)) (Fin n) R) (hv : ∑ j, M j = 0) (j₁ j₂ : Fin (n + 1)) :
    (M.submatrix (Fin.succAbove j₁) id).det =
      Int.negOnePow (j₁ - j₂) • (M.submatrix (Fin.succAbove j₂) id).det

{R : Type u_1}
[CommRing R]
{n : ℕ}
(M : Matrix (Fin (n + 1)) (Fin n) R)
(hv : ∑ j : Fin (n + 1), M j = 0)
(j₁ j₂ : Fin (n + 1))

(M.submatrix j₁.succAbove id).det = (↑↑j₁ - ↑↑j₂).negOnePow • (M.submatrix j₂.succAbove id).det


/-- The equivalence between a quaternion algebra over `R` and `R × R × R × R`. -/
@[simps]
def equivProd {R : Type*} (c₁ c₂ : R) : ℍ[R,c₁,c₂] ≃ R × R × R × R

{R : Type u_1}
(c₁ c₂ : R)
(a : R × R × R × R)

((QuaternionAlgebra.equivProd c₁ c₂).symm a).imJ = a.2.2.1


/-- A set is eventually carried into any open neighbourhood of its ω-limit:
if `c` is a compact set such that `closure {ϕ t x | t ∈ v, x ∈ s} ⊆ c` for some `v ∈ f`
and `n` is an open neighbourhood of `ω f ϕ s`, then for some `u ∈ f` we have
`closure {ϕ t x | t ∈ u, x ∈ s} ⊆ n`. -/
theorem eventually_closure_subset_of_isCompact_absorbing_of_isOpen_of_omegaLimit_subset [T2Space β]
    {c : Set β} (hc₁ : IsCompact c) (hc₂ : ∀ᶠ t in f, MapsTo (ϕ t) s c) {n : Set β} (hn₁ : IsOpen n)
    (hn₂ : ω f ϕ s ⊆ n) : ∃ u ∈ f, closure (image2 ϕ u s) ⊆ n

(ϕ : τ → α → β)

(hc₂ : ∀ᶠ (t : τ) in f, Set.MapsTo (ϕ t) s c)


theorem of_surjective {H : Type*} [Group H] (ϕ : G →* H) (hϕ : Function.Surjective ϕ) :
    IsPGroup p H

{p : ℕ}
{G : Type u_1}
[Group G]
(hG : IsPGroup p G)
{H : Type u_2}
[Group H]
(ϕ : G →* H)
(hϕ : Function.Surjective ⇑ϕ)


@[simp]
theorem Γ_map {X Y : (SheafedSpace C)ᵒᵖ} (f : X ⟶ Y) : Γ.map f = f.unop.c.app (op ⊤)

{X Y : (AlgebraicGeometry.SheafedSpace C)ᵒᵖ}

AlgebraicGeometry.SheafedSpace.Γ.map f = f.unop.c.app (Opposite.op ⊤)


@[simp, norm_cast] lemma cast_lt : (m : R) < n ↔ m < n

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


lemma coe_id {X : SemiRingCat} : (𝟙 X : X → X) = id


@[to_additive (attr := simp)]
theorem OneHom.mk_coe [One M] [One N] (f : OneHom M N) (h1) : OneHom.mk f h1 = f

{M : Type u_4}
{N : Type u_5}
[One M]
[One N]
(f : OneHom M N)
(h1 : f 1 = 1)


lemma lt_of_pow_dvd_right (hb : b ≠ 0) (ha : 2 ≤ a) (h : a ^ n ∣ b) : n < b

{a b n : ℕ}
(hb : b ≠ 0)
(ha : 2 ≤ a)
(h : a ^ n ∣ b)


@[to_additive (attr := simp, norm_cast)]
theorem mem_toSubgroup : g ∈ (U : Subgroup G) ↔ g ∈ U

{G : Type u_1}
[Group G]
[TopologicalSpace G]
{U : OpenSubgroup G}
{g : G}

g ∈ ↑U ↔ g ∈ U


theorem condexpIndL1_smul (c : ℝ) (x : G) :
    condexpIndL1 hm μ s (c • x) = c • condexpIndL1 hm μ s x

{α : 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)]
(c : ℝ)
(x : G)

MeasureTheory.condexpIndL1 hm μ s (c • x) = c • MeasureTheory.condexpIndL1 hm μ s x


/-- An open ball in a product space is a product of open balls. See also `ball_pi'`
for a version assuming `Nonempty β` instead of `0 < r`. -/
lemma ball_pi (x : ∀ b, π b) {r : ℝ} (hr : 0 < r) :
    ball x r = Set.pi univ fun b => ball (x b) r

{β : Type u_2}
{π : β → Type u_3}
[Fintype β]
[(b : β) → PseudoMetricSpace (π b)]
(x : (b : β) → π b)
{r : ℝ}
(hr : 0 < r)

Metric.ball x r = Set.univ.pi fun b => Metric.ball (x b) r


/-- A compact Hausdorff space is totally disconnected if and only if it is totally separated, this
  is also true for locally compact spaces. -/
theorem compact_t2_tot_disc_iff_tot_sep : TotallyDisconnectedSpace X ↔ TotallySeparatedSpace X

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
[CompactSpace X]


/-- If `f : R → ℝ` is a nonnegative, multiplicatively bounded function, then for every `x : R`,
  the image of `y ↦ f (x * y) / f y` is bounded above. -/
theorem seminormFromBounded_bddAbove_range (f_nonneg : 0 ≤ f)
    (f_mul : ∀ x y : R, f (x * y) ≤ c * f x * f y) (x : R) :
    BddAbove (Set.range fun y ↦ f (x * y) / f y)

(f_mul : ∀ (x y : R), f (x * y) ≤ c * f x * f y)

BddAbove (Set.range fun y => f (x * y) / f y)


protected theorem lt_div_iff_mul_lt (hb0 : b ≠ 0 ∨ c ≠ ∞) (hbt : b ≠ ∞ ∨ c ≠ 0) :
    c < a / b ↔ c * b < a

{a b c : ENNReal}
(hb0 : b ≠ 0 ∨ c ≠ ⊤)
(hbt : b ≠ ⊤ ∨ c ≠ 0)


/-- If the derivatives of `g` at `f x` are bounded by `C`, and the `i`-th derivative
of `f` at `x` is bounded by `D^i` for all `1 ≤ i ≤ n`, then the `n`-th derivative
of `g ∘ f` is bounded by `n! * C * D^n`. -/
theorem norm_iteratedFDeriv_comp_le {g : F → G} {f : E → F} {n : ℕ} {N : ℕ∞} (hg : ContDiff 𝕜 N g)
    (hf : ContDiff 𝕜 N f) (hn : (n : ℕ∞) ≤ N) (x : E) {C : ℝ} {D : ℝ}
    (hC : ∀ i, i ≤ n → ‖iteratedFDeriv 𝕜 i g (f x)‖ ≤ C)
    (hD : ∀ i, 1 ≤ i → i ≤ n → ‖iteratedFDeriv 𝕜 i f x‖ ≤ D ^ i) :
    ‖iteratedFDeriv 𝕜 n (g ∘ f) x‖ ≤ n ! * C * D ^ n

(hC : ∀ i ≤ n, ‖iteratedFDeriv 𝕜 i g (f x)‖ ≤ C)

(hD : ∀ (i : ℕ), 1 ≤ i → i ≤ n → ‖iteratedFDeriv 𝕜 i f x‖ ≤ D ^ i)

‖iteratedFDeriv 𝕜 n (g ∘ f) x‖ ≤ ↑n ! * C * D ^ n


theorem Finite.exists_max [Finite α] [Nonempty α] [LinearOrder β] (f : α → β) :
    ∃ x₀ : α, ∀ x, f x ≤ f x₀

{α : Type u_2}
{β : Type u_3}
[Finite α]
[Nonempty α]
[LinearOrder β]
(f : α → β)


/-- Exactly `n / p` naturals in `(0, n]` are multiples of `p`. -/
theorem Ioc_filter_dvd_card_eq_div (n p : ℕ) : ((Ioc 0 n).filter fun x => p ∣ x).card = n / p

(Finset.filter (fun x => p ∣ x) (Finset.Ioc 0 n)).card = n / p


/-- A split coequalizer diagram consists of morphisms

      f   π
    X ⇉ Y → Z
      g

satisfying `f ≫ π = g ≫ π` together with morphisms

      t   s
    X ← Y ← Z

satisfying `s ≫ π = 𝟙 Z`, `t ≫ g = 𝟙 Y` and `t ≫ f = π ≫ s`.

The name "coequalizer" is appropriate, since any split coequalizer is a coequalizer, see
`CategoryTheory.IsSplitCoequalizer.isCoequalizer`.
Split coequalizers are also absolute, since a functor preserves all the structure above.
-/
structure IsSplitCoequalizer {Z : C} (π : Y ⟶ Z) where
  /-- A map from the coequalizer to `Y` -/
  rightSection : Z ⟶ Y
  /-- A map in the opposite direction to `f` and `g` -/
  leftSection : Y ⟶ X
  /-- Composition of `π` with `f` and with `g` agree -/
  condition : f ≫ π = g ≫ π := by aesop_cat
  /-- `rightSection` splits `π` -/
  rightSection_π : rightSection ≫ π = 𝟙 Z := by aesop_cat
  /-- `leftSection` splits `g` -/
  leftSection_bottom : leftSection ≫ g = 𝟙 Y := by aesop_cat
  /-- `leftSection` composed with `f` is `pi` composed with `rightSection` -/
  leftSection_top : leftSection ≫ f = π ≫ rightSection := by aesop_cat

(self : CategoryTheory.IsSplitCoequalizer f g π)

CategoryTheory.CategoryStruct.comp f π = CategoryTheory.CategoryStruct.comp g π


/-- The identity lax prefunctor. -/
@[simps]
def id (B : Type u₁) [Quiver.{v₁ + 1} B] [∀ a b : B, Quiver.{w₁ + 1} (a ⟶ b)] :
    PrelaxFunctorStruct B B

(B : Type u₁)
[Quiver B]
[(a b : B) → Quiver (a ⟶ b)]

∀ {a b : B} {f g : a ⟶ b} (η : f ⟶ g), (CategoryTheory.PrelaxFunctorStruct.id B).map₂ η = η


lemma ContinuousOn.finset_sup (hs : ∀ i ∈ s, ContinuousOn (f i) t) :
    ContinuousOn (s.sup f) t

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeSup L]
[OrderBot L]
[ContinuousSup L]
{s : Finset ι}
{f : ι → X → L}
{t : Set X}
(hs : ∀ i ∈ s, ContinuousOn (f i) t)


theorem image_source_inter_eq' (s : Set α) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s

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

↑e '' (e.source ∩ s) = e.target ∩ ↑e.symm ⁻¹' s


theorem tendsto_integral_approxOn_of_measurable_of_range_subset [MeasurableSpace E] [BorelSpace E]
    {f : α → E} (fmeas : Measurable f) (hf : Integrable f μ) (s : Set E) [SeparableSpace s]
    (hs : range f ∪ {0} ⊆ s) :
    Tendsto (fun n => (SimpleFunc.approxOn f fmeas s 0 (hs <| by simp) n).integral μ) atTop
      (𝓝 <| ∫ x, f x ∂μ)

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[hE : CompleteSpace E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasurableSpace E]
[BorelSpace E]
{f : α → E}
(fmeas : Measurable f)
(hf : MeasureTheory.Integrable f μ)
(s : Set E)
[TopologicalSpace.SeparableSpace ↑s]
(hs : Set.range f ∪ {0} ⊆ s)

Filter.Tendsto (fun n => MeasureTheory.SimpleFunc.integral μ (MeasureTheory.SimpleFunc.approxOn f fmeas s 0 ⋯ n))
  Filter.atTop (𝓝 (∫ (x : α), f x ∂μ))


/-- The set of continuous functions is closed in the uniform convergence topology.
This is a simple wrapper over `TendstoUniformly.continuous`. -/
theorem isClosed_setOf_continuous [TopologicalSpace α] :
    IsClosed {f : α →ᵤ β | Continuous (toFun f)}

(α : Type u_1)
{β : Type u_2}
[UniformSpace β]
[TopologicalSpace α]

IsClosed {f | Continuous (UniformFun.toFun f)}


@[to_additive (attr := simp)]
theorem isComplement'_bot_left : IsComplement' ⊥ H ↔ H = ⊤

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}


theorem mem_segment_add_sub [Invertible (2 : 𝕜)] (x y : E) : x ∈ [x + y -[𝕜] x - y]

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[Invertible 2]
(x y : E)


@[simp] lemma upperBounds_smul_of_pos (ha : 0 < a) : upperBounds (a • s) = a • upperBounds s

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[GroupWithZero α]
[Zero β]
[MulActionWithZero α β]
[PosSMulMono α β]
[PosSMulReflectLE α β]
{s : Set β}
{a : α}
(ha : 0 < a)


/-- The limit cone exhibiting `⨁ Subtype.restrict pᶜ f` as the kernel of
`biproduct.toSubtype f p` -/
@[simps]
def kernelForkBiproductToSubtype (p : Set K) :
    LimitCone (parallelPair (biproduct.toSubtype f p) 0)

(CategoryTheory.Limits.kernelForkBiproductToSubtype f p).cone =
  CategoryTheory.Limits.KernelFork.ofι (CategoryTheory.Limits.biproduct.fromSubtype f pᶜ) ⋯


@[simp] theorem toBialgHom_comp {X Y Z : BialgebraCat.{v} R} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).toBialgHom = g.toBialgHom.comp f.toBialgHom

{R : Type u}
[CommRing R]
{X Y Z : BialgebraCat R}
(f : X ⟶ Y)
(g : Y ⟶ Z)


/-- Ring homomorphisms map zero to zero. -/
theorem map_zero (hf : IsRingHom f) : f 0 = 0

{α : Type u}
{β : Type v}
[Ring α]
[Ring β]
{f : α → β}
(hf : IsRingHom f)


theorem left_le_toIcoMod (a b : α) : a ≤ toIcoMod hp a b

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


/-- Fixing an element `b : β` gives an embedding `α ↪ α × β`. -/
@[simps]
def sectl (α : Sort _) {β : Sort _} (b : β) : α ↪ α × β

(α : Type u_1)
{β : Type u_2}
(b : β)
(a : α)

(Function.Embedding.sectl α b) a = (a, b)


/-- Four-way commutativity of `Prod`. The name matches `mul_mul_mul_comm`. -/
@[to_additive (attr := simps apply) prodProdProdComm
    "Four-way commutativity of `Prod`.\nThe name matches `mul_mul_mul_comm`"]
def prodProdProdComm : (M × N) × M' × N' ≃* (M × M') × N × N'

(M : Type u_5)
(N : Type u_6)
[AddZeroClass M]
[AddZeroClass N]
(M' : Type u_8)
(N' : Type u_9)
[AddZeroClass M']
[AddZeroClass N']
(mnmn : (M × N) × M' × N')

(AddEquiv.prodProdProdComm M N M' N') mnmn = ((mnmn.1.1, mnmn.2.1), mnmn.1.2, mnmn.2.2)


@[to_additive]
theorem le_mul_ciInf [CovariantClass α α (· * ·) (· ≤ ·)] {a : α} {g : α} {h : ι → α}
    (H : ∀ j, a ≤ g * h j) : a ≤ g * iInf h

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


theorem scottContinuous_of_continuous {α β} [OmegaCompletePartialOrder α]
    [OmegaCompletePartialOrder β] (f : Scott α → Scott β) (hf : Continuous f) :
    OmegaCompletePartialOrder.Continuous' f

{α : Type u_1}
{β : Type u_2}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
(f : Scott α → Scott β)
(hf : Continuous f)


theorem interpolate_eq_iff_values_eq_on (hvs : Set.InjOn v s) :
    interpolate s v r = interpolate s v r' ↔ ∀ i ∈ s, r i = r' i

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{s : Finset ι}
{v : ι → F}
(r r' : ι → F)
(hvs : Set.InjOn v ↑s)

(Lagrange.interpolate s v) r = (Lagrange.interpolate s v) r' ↔ ∀ i ∈ s, r i = r' i


theorem iInf_le (f : ι → α) (i : ι) : iInf f ≤ f i

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(f : ι → α)
(i : ι)


theorem constr_def (f : ι → M') :
    constr (M' := M') b S f = Finsupp.total M' M' R id ∘ₗ Finsupp.lmapDomain R R f ∘ₗ ↑b.repr

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(S : Type u_10)
[Semiring S]
[Module S M']
[SMulCommClass R S M']
(f : ι → M')

(b.constr S) f = Finsupp.total M' M' R id ∘ₗ Finsupp.lmapDomain R R f ∘ₗ ↑b.repr


lemma quotTensorEquivQuotSMul_comp_mk (I : Ideal R) :
    quotTensorEquivQuotSMul M I ∘ₗ TensorProduct.mk R (R ⧸ I) M 1 =
      Submodule.mkQ (I • ⊤)

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

↑(quotTensorEquivQuotSMul M I) ∘ₗ (TensorProduct.mk R (R ⧸ I) M) 1 = (I • ⊤).mkQ


theorem lt_iff [LT α] [LT β] (a b : α × β) :
    toLex a < toLex b ↔ a.1 < b.1 ∨ a.1 = b.1 ∧ a.2 < b.2

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


theorem Ioo_infinite : (Ioo a b).Infinite

{α : Type u_1}
[Preorder α]
[DenselyOrdered α]
{a b : α}
(h : a < b)


@[to_additive]
theorem relindex_inf_le : (H ⊓ K).relindex L ≤ H.relindex L * K.relindex L

{G : Type u_1}
[AddGroup G]
{H K L : AddSubgroup G}


lemma exists_forall_ge_and [LinearOrder α] {p q : α → Prop} :
    (∃ i, ∀ j ≥ i, p j) → (∃ i, ∀ j ≥ i, q j) → ∃ i, ∀ j ≥ i, p j ∧ q j

{α : Type u_2}
[LinearOrder α]
{p q : α → Prop}

(∃ i, ∀ (j : α), j ≥ i → p j) → (∃ i, ∀ (j : α), j ≥ i → q j) → ∃ i, ∀ (j : α), j ≥ i → p j ∧ q j


lemma normalClosure_of_normal [Normal F K] : normalClosure F K L = K

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


lemma nndist_eq (x y : ULift β) : nndist x y = nndist x.down y.down

{β : Type u_2}
[PseudoMetricSpace β]
(x y : ULift.{u_3, u_2} β)


@[simp]
theorem inf_symmDiff_symmDiff : (a ⊓ b) ∆ (a ∆ b) = a ⊔ b

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


@[simp]
theorem repr_reindex : (b.reindex e).repr x = (b.repr x).mapDomain e

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

(b.reindex e).repr x = Finsupp.mapDomain (⇑e) (b.repr x)


@[to_additive (attr := simp)]
theorem coe_mul {G : Type*} [Mul G] [TopologicalSpace G] [ChartedSpace H' G] [SmoothMul I' G]
    (f g : C^∞⟮I, N; I', G⟯) : ⇑(f * g) = f * g

{𝕜 : 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}
[Mul G]
[TopologicalSpace G]
[ChartedSpace H' G]
[SmoothMul I' G]
(f g : C^⊤⟮I, N; I', G⟯)


@[simp]
theorem finrank_dualCoannihilator_eq {Φ : Subspace K (Module.Dual K V)} :
    finrank K Φ.dualCoannihilator = finrank K Φ.dualAnnihilator

{K : Type u}
{V : Type v}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
{Φ : Subspace K (Module.Dual K V)}

FiniteDimensional.finrank K ↥(Submodule.dualCoannihilator Φ) =
  FiniteDimensional.finrank K ↥(Submodule.dualAnnihilator Φ)


theorem quotientMap_iff_closed :
    QuotientMap f ↔ Surjective f ∧ ∀ s : Set Y, IsClosed s ↔ IsClosed (f ⁻¹' s)

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]

QuotientMap f ↔ Function.Surjective f ∧ ∀ (s : Set Y), IsClosed s ↔ IsClosed (f ⁻¹' s)


@[to_additive]
lemma mem_stabilizer_finset' {s : Finset α} : a ∈ stabilizer G s ↔ ∀ ⦃b⦄, b ∈ s → a • b ∈ s

{G : Type u_1}
{α : Type u_3}
[Group G]
[MulAction G α]
{a : G}
[DecidableEq α]
{s : Finset α}

a ∈ MulAction.stabilizer G s ↔ ∀ ⦃b : α⦄, b ∈ s → a • b ∈ s


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

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


/-- If `f : R → ℝ` is a nonnegative, multiplicatively bounded function, then given `x y : R` with
  `f x = 0`, we have `f (x * y) = 0`. -/
theorem map_mul_zero_of_map_zero (f_nonneg : 0 ≤ f)
    (f_mul : ∀ x y : R, f (x * y) ≤ c * f x * f y) {x : R} (hx : f x = 0)
    (y : R) : f (x * y) = 0

(f_mul : ∀ (x y : R), f (x * y) ≤ c * f x * f y)


/-- Class `ContinuousSMul M X` says that the scalar multiplication `(•) : M → X → X`
is continuous in both arguments. We use the same class for all kinds of multiplicative actions,
including (semi)modules and algebras. -/
class ContinuousSMul (M X : Type*) [SMul M X] [TopologicalSpace M] [TopologicalSpace X] :
    Prop where
  /-- The scalar multiplication `(•)` is continuous. -/
  continuous_smul : Continuous fun p : M × X => p.1 • p.2

{M : Type u_1}
{X : Type u_2}
[SMul M X]
[TopologicalSpace M]
[TopologicalSpace X]
[self : ContinuousSMul M X]


theorem kroneckerMap_assoc₁ {δ ξ ω : Type*} (f : α → β → γ) (g : γ → δ → ω) (f' : α → ξ → ω)
    (g' : β → δ → ξ) (A : Matrix l m α) (B : Matrix n p β) (D : Matrix q r δ)
    (h : ∀ a b d, g (f a b) d = f' a (g' b d)) :
    reindex (Equiv.prodAssoc l n q) (Equiv.prodAssoc m p r)
        (kroneckerMap g (kroneckerMap f A B) D) =
      kroneckerMap f' A (kroneckerMap g' B D)

(f : α → β → γ)

(g : γ → δ → ω)

(f' : α → ξ → ω)

(g' : β → δ → ξ)

(Matrix.reindex (Equiv.prodAssoc l n q) (Equiv.prodAssoc m p r)) (Matrix.kroneckerMap g (Matrix.kroneckerMap f A B) D) =
  Matrix.kroneckerMap f' A (Matrix.kroneckerMap g' B D)


theorem isMaximal_eraseLast_last {s : CompositionSeries X} (h : 0 < s.length) :
    IsMaximal s.eraseLast.last s.last

{X : Type u}
[Lattice X]
[JordanHolderLattice X]
{s : CompositionSeries X}
(h : 0 < s.length)

JordanHolderLattice.IsMaximal (RelSeries.eraseLast s).last (RelSeries.last s)


theorem map_subset_iff {l₁ l₂ : List α} (f : α → β) (h : Injective f) :
    map f l₁ ⊆ map f l₂ ↔ l₁ ⊆ l₂

{α : Type u}
{β : Type v}
{l₁ l₂ : List α}
(f : α → β)
(h : Function.Injective f)


/-- If one controls the norm of every `A x`, `‖x‖₊ ≠ 0`, then one controls the norm of `A`. -/
theorem opNNNorm_le_bound' (f : E →SL[σ₁₂] F) (M : ℝ≥0) (hM : ∀ x, ‖x‖₊ ≠ 0 → ‖f x‖₊ ≤ M * ‖x‖₊) :
    ‖f‖₊ ≤ M

{σ₁₂ : 𝕜 →+* 𝕜₂}

(hM : ∀ (x : E), ‖x‖₊ ≠ 0 → ‖f x‖₊ ≤ M * ‖x‖₊)


/-- L'Hôpital's rule for approaching a real from the right, `HasDerivAt` version -/
theorem lhopital_zero_nhds_right (hff' : ∀ᶠ x in 𝓝[>] a, HasDerivAt f (f' x) x)
    (hgg' : ∀ᶠ x in 𝓝[>] a, HasDerivAt g (g' x) x) (hg' : ∀ᶠ x in 𝓝[>] a, g' x ≠ 0)
    (hfa : Tendsto f (𝓝[>] a) (𝓝 0)) (hga : Tendsto g (𝓝[>] a) (𝓝 0))
    (hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l) :
    Tendsto (fun x => f x / g x) (𝓝[>] a) l

(hff' : ∀ᶠ (x : ℝ) in 𝓝[>] a, HasDerivAt f (f' x) x)

(hgg' : ∀ᶠ (x : ℝ) in 𝓝[>] a, HasDerivAt g (g' x) x)

(hdiv : Filter.Tendsto (fun x => f' x / g' x) (𝓝[>] a) l)

Filter.Tendsto (fun x => f x / g x) (𝓝[>] a) l


theorem Pairwise.mono (hr : Pairwise r) (h : ∀ ⦃i j⦄, r i j → p i j) : Pairwise p

{α : Type u_1}
{r p : α → α → Prop}
(hr : Pairwise r)
(h : ∀ ⦃i j : α⦄, r i j → p i j)


@[simp]
theorem degree_le_zero_iff_eq_one (hp : p.Monic) : p.degree ≤ 0 ↔ p = 1

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


@[simp] protected lemma inv_zero : (0 : Set α)⁻¹ = 0


theorem mk_eq_normalize (num den nz c) : ⟨num, den, nz, c⟩ = normalize num den nz

(num : Int)
(den : Nat)
(nz : den ≠ 0)
(c : num.natAbs.Coprime den)

{ num := num, den := den, den_nz := nz, reduced := c } = Rat.normalize num den nz


(R : Type u_2)
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x : M)


/-- The composition of local homeomorphisms is a local homeomorphism. -/
protected theorem comp (hg : IsLocalHomeomorph g) (hf : IsLocalHomeomorph f) :
    IsLocalHomeomorph (g ∘ f)

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


theorem continuousWithinAt_univ (f : α → β) (x : α) :
    ContinuousWithinAt f Set.univ x ↔ ContinuousAt f x

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


theorem continuousAt_extend_symm {x : M} (h : x ∈ f.source) :
    ContinuousAt (f.extend I).symm (f.extend I x)

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)
{x : M}
(h : x ∈ f.source)

ContinuousAt (↑(f.extend I).symm) (↑(f.extend I) x)


@[simp]
lemma fromRows_apply_inr (A₁ : Matrix m₁ n R) (A₂ : Matrix m₂ n R) (i : m₂) (j : n) :
    (fromRows A₁ A₂) (Sum.inr i) j = A₂ i j

{R : Type u_1}
{m₁ : Type u_3}
{m₂ : Type u_4}
{n : Type u_5}
(A₁ : Matrix m₁ n R)
(A₂ : Matrix m₂ n R)
(i : m₂)
(j : n)


@[simp]
theorem decompose_sum {ι'} (s : Finset ι') (f : ι' → M) :
    decompose ℳ (∑ i ∈ s, f i) = ∑ i ∈ s, decompose ℳ (f i)

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
{ι' : Type u_5}
(s : Finset ι')
(f : ι' → M)

(DirectSum.decompose ℳ) (∑ i ∈ s, f i) = ∑ i ∈ s, (DirectSum.decompose ℳ) (f i)


theorem ofSeq_surjective : Function.Surjective ofSeq


@[to_additive]
theorem zpow_apply [Group β] [TopologicalGroup β] (f : C(α, β)) (z : ℤ) (x : α) :
    (f ^ z) x = f x ^ z

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[Group β]
[TopologicalGroup β]
(f : C(α, β))
(z : ℤ)
(x : α)


theorem hasseDeriv_apply :
    hasseDeriv k f = f.sum fun i r => monomial (i - k) (↑(i.choose k) * r)

{R : Type u_1}
[Semiring R]
(k : ℕ)
(f : Polynomial R)

(Polynomial.hasseDeriv k) f = f.sum fun i r => (Polynomial.monomial (i - k)) (↑(i.choose k) * r)


theorem eq_preimage_iff_image_eq {α β} (e : α ≃ β) (s t) : s = e ⁻¹' t ↔ e '' s = t

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


/-- The natural isomorphism `𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D`. -/
@[simps!]
noncomputable def sheafificationNatIso :
    𝟭 (Sheaf J D) ≅ sheafToPresheaf J D ⋙ presheafToSheaf J D

(J : CategoryTheory.GrothendieckTopology C)

((CategoryTheory.sheafificationNatIso J D).hom.app X).val = CategoryTheory.toSheafify J X.val


theorem zero_le_restrict_not_measurable (hi : ¬MeasurableSet i) : 0 ≤[i] v

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[TopologicalSpace M]
[OrderedAddCommMonoid M]
(v : MeasureTheory.VectorMeasure α M)
{i : Set α}
(hi : ¬MeasurableSet i)

MeasureTheory.VectorMeasure.restrict 0 i ≤ v.restrict i


@[reassoc] -- Porting note (#10618): simp can prove these
theorem prod.diag_map_fst_snd_comp [HasLimitsOfShape (Discrete WalkingPair) C] {X X' Y Y' : C}
    (g : X ⟶ Y) (g' : X' ⟶ Y') :
    diag (X ⨯ X') ≫ prod.map (prod.fst ≫ g) (prod.snd ≫ g') = prod.map g g'

[CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) C]

CategoryTheory.Limits.diag (X ⨯ X') ≫
    CategoryTheory.Limits.prod.map (CategoryTheory.Limits.prod.fst ≫ g) (CategoryTheory.Limits.prod.snd ≫ g') =
  CategoryTheory.Limits.prod.map g g'


@[local simp] theorem negSucc_add_ofNat (m n : Nat) : -[m+1] + ↑n = subNatNat n (succ m)

Int.negSucc m + ↑n = Int.subNatNat n m.succ


theorem tendsto_lintegral_norm_of_dominated_convergence {F : ℕ → α → β} {f : α → β} {bound : α → ℝ}
    (F_measurable : ∀ n, AEStronglyMeasurable (F n) μ)
    (bound_hasFiniteIntegral : HasFiniteIntegral bound μ)
    (h_bound : ∀ n, ∀ᵐ a ∂μ, ‖F n a‖ ≤ bound a)
    (h_lim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))) :
    Tendsto (fun n => ∫⁻ a, ENNReal.ofReal ‖F n a - f a‖ ∂μ) atTop (𝓝 0)

{F : ℕ → α → β}

(F_measurable : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (F n) μ)

(bound_hasFiniteIntegral : MeasureTheory.HasFiniteIntegral bound μ)

(h_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a)

(h_lim : ∀ᵐ (a : α) ∂μ, Filter.Tendsto (fun n => F n a) Filter.atTop (𝓝 (f a)))

Filter.Tendsto (fun n => ∫⁻ (a : α), ENNReal.ofReal ‖F n a - f a‖ ∂μ) Filter.atTop (𝓝 0)


theorem HasFiniteIntegral.add_measure {f : α → β} (hμ : HasFiniteIntegral f μ)
    (hν : HasFiniteIntegral f ν) : HasFiniteIntegral f (μ + ν)

(hμ : MeasureTheory.HasFiniteIntegral f μ)

(hν : MeasureTheory.HasFiniteIntegral f ν)

MeasureTheory.HasFiniteIntegral f (μ + ν)


theorem zero_smul {α} [AddCommMonoid α] (c) : smul c (0 : α) = 0

{α : Type u_1}
[AddCommMonoid α]
(c : ℕ)


theorem sSup_sets_eq {s : Set (Filter α)} : (sSup s).sets = ⋂ f ∈ s, (f : Filter α).sets


/-- The span of a set of points is contained in a subspace if and only if the set of points is
contained in the subspace. -/
theorem span_le_subspace_iff {S : Set (ℙ K V)} {W : Subspace K V} : span S ≤ W ↔ S ⊆ W

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
{S : Set (Projectivization K V)}
{W : Projectivization.Subspace K V}

Projectivization.Subspace.span S ≤ W ↔ S ⊆ ↑W


/--
A closure (increasing, inflationary and idempotent) operation on sieves that commutes with pullback
induces a Grothendieck topology.
In fact, such operations are in bijection with Grothendieck topologies.
-/
@[simps]
def topologyOfClosureOperator (c : ∀ X : C, ClosureOperator (Sieve X))
    (hc : ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : Sieve X), c _ (S.pullback f) = (c _ S).pullback f) :
    GrothendieckTopology C

(c : (X : C) → ClosureOperator (CategoryTheory.Sieve X))

(hc :
  ∀ ⦃X Y : C⦄ (f : Y ⟶ X) (S : CategoryTheory.Sieve X),
    (c Y) (CategoryTheory.Sieve.pullback f S) = CategoryTheory.Sieve.pullback f ((c X) S))

(CategoryTheory.topologyOfClosureOperator c hc).sieves X = {S | (c X) S = ⊤}


@[simp]
theorem disjoint_toFinset [Fintype s] [Fintype t] :
    Disjoint s.toFinset t.toFinset ↔ Disjoint s t

{α : Type u_1}
{s t : Set α}
[Fintype ↑s]
[Fintype ↑t]


@[ext]
theorem ext {w₁ w₂ : NormalWord d} (hhead : w₁.head = w₂.head)
    (hlist : w₁.toList = w₂.toList) : w₁ = w₂

{d : Monoid.PushoutI.NormalWord.Transversal φ}


protected theorem «forall» {p : ℝ≥0 → Prop} :
    (∀ x : ℝ≥0, p x) ↔ ∀ (x : ℝ) (hx : 0 ≤ x), p ⟨x, hx⟩

(∀ (x : ℝ≥0), p x) ↔ ∀ (x : ℝ) (hx : 0 ≤ x), p ⟨x, hx⟩


/-- **Rearrangement Inequality**: Pointwise multiplication of `f` and `g` is maximized when `f` and
`g` monovary together. Stated by permuting the entries of `g`. -/
theorem MonovaryOn.sum_mul_comp_perm_le_sum_mul (hfg : MonovaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) : ∑ i ∈ s, f i * g (σ i) ≤ ∑ i ∈ s, f i * g i

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f g : ι → α}
(hfg : MonovaryOn f g ↑s)
(hσ : {x | σ x ≠ x} ⊆ ↑s)


@[simp]
theorem symm_symm {f₀ f₁ : C(X, Y)} (F : Homotopy f₀ f₁) : F.symm.symm = F

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


@[simp]
theorem wronskianBilin_apply (a b : R[X]) : wronskianBilin R a b = wronskian a b

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

((Polynomial.wronskianBilin R) a) b = a.wronskian b


protected theorem eq_neg_comm {a b : Int} : a = -b ↔ b = -a


theorem DifferentiableWithinAt.differentiableAt (h : DifferentiableWithinAt 𝕜 f s x)
    (hs : s ∈ 𝓝 x) : DifferentiableAt 𝕜 f 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}
(h : DifferentiableWithinAt 𝕜 f s x)
(hs : s ∈ 𝓝 x)


lemma rescale_to_shell_zpow [NormedAddCommGroup F] [NormedSpace 𝕜 F] {c : 𝕜} (hc : 1 < ‖c‖)
    {ε : ℝ} (εpos : 0 < ε) {x : F} (hx : x ≠ 0) :
    ∃ n : ℤ, c^n ≠ 0 ∧ ‖c^n • x‖ < ε ∧ (ε / ‖c‖ ≤ ‖c^n • x‖) ∧ (‖c^n‖⁻¹ ≤ ε⁻¹ * ‖c‖ * ‖x‖)

{𝕜 : Type u_3}
{F : Type u_10}
[NormedField 𝕜]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{c : 𝕜}
(hc : 1 < ‖c‖)
{ε : ℝ}
(εpos : 0 < ε)
{x : F}
(hx : x ≠ 0)

∃ n, c ^ n ≠ 0 ∧ ‖c ^ n • x‖ < ε ∧ ε / ‖c‖ ≤ ‖c ^ n • x‖ ∧ ‖c ^ n‖⁻¹ ≤ ε⁻¹ * ‖c‖ * ‖x‖


lemma integrableOn_toReal_rnDeriv {s : Set α} (hμs : μ s ≠ ∞) :
    IntegrableOn (fun x ↦ (μ.rnDeriv ν x).toReal) s ν

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{s : Set α}
(hμs : μ s ≠ ⊤)

MeasureTheory.IntegrableOn (fun x => (μ.rnDeriv ν x).toReal) s ν


theorem mul_omega {a : Ordinal} (a0 : 0 < a) (ha : a < omega) : a * omega = omega

{a : Ordinal.{u_1}}
(a0 : 0 < a)
(ha : a < Ordinal.omega)


/-- For a nonzero element `f` in a `F[X]`-module `S`, the dimension of $S/\langle f \rangle$ as an
`F`-vector space is the degree of the norm of `f` relative to `F[X]`. -/
theorem finrank_quotient_span_eq_natDegree_norm [Algebra F S] [IsScalarTower F F[X] S]
    (b : Basis ι F[X] S) {f : S} (hf : f ≠ 0) :
    FiniteDimensional.finrank F (S ⧸ span ({f} : Set S)) = (Algebra.norm F[X] f).natDegree

{S : Type u_2}
{ι : Type u_3}
[CommRing S]
[IsDomain S]
{F : Type u_4}
[Field F]
[Algebra F[X] S]
[Finite ι]
[Algebra F S]
[IsScalarTower F F[X] S]
(b : Basis ι F[X] S)
{f : S}
(hf : f ≠ 0)

FiniteDimensional.finrank F (S ⧸ Ideal.span {f}) = ((Algebra.norm F[X]) f).natDegree


@[simp, norm_cast]
theorem coe_himp (a b : Regular α) : (↑(a ⇨ b) : α) = (a : α) ⇨ b

{α : Type u_1}
[HeytingAlgebra α]
(a b : Heyting.Regular α)


theorem iSup_disjointed (f : ℕ → α) : ⨆ n, disjointed f n = ⨆ n, f n

{α : Type u_1}
[CompleteBooleanAlgebra α]
(f : ℕ → α)


theorem preservesEpimorphisms.iso_iff {F G : C ⥤ D} (α : F ≅ G) :
    PreservesEpimorphisms F ↔ PreservesEpimorphisms G

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F G : C ⥤ D}
(α : F ≅ G)


theorem preimage_floor_of_ne_zero {n : ℕ} (hn : n ≠ 0) :
    (floor : α → ℕ) ⁻¹' {n} = Ico (n : α) (n + 1)

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{n : ℕ}
(hn : n ≠ 0)

Nat.floor ⁻¹' {n} = Set.Ico (↑n) (↑n + 1)


@[simp]
theorem apply_symm_apply (e : A ≃⋆ₐ[R] B) : ∀ x, e (e.symm x) = x

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[Add A]
[Add B]
[Mul A]
[Mul B]
[SMul R A]
[SMul R B]
[Star A]
[Star B]
(e : A ≃⋆ₐ[R] B)
(x : B)


theorem mk'_sub {M M' : Type*} [AddCommGroup M] [AddCommGroup M'] [Module R M] [Module R M']
    (f : M →ₗ[R] M') [IsLocalizedModule S f] (m₁ m₂ : M) (s : S) :
    mk' f (m₁ - m₂) s = mk' f m₁ s - mk' f m₂ s

{R : Type u_1}
[CommSemiring R]
{S : Submonoid R}
{M : Type u_6}
{M' : Type u_7}
[AddCommGroup M]
[AddCommGroup M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
(m₁ m₂ : M)
(s : ↥S)

IsLocalizedModule.mk' f (m₁ - m₂) s = IsLocalizedModule.mk' f m₁ s - IsLocalizedModule.mk' f m₂ s


theorem mem_resolventSet_of_norm_lt [NormOneClass A] {a : A} {k : 𝕜} (h : ‖a‖ < ‖k‖) : k ∈ ρ a

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
[NormOneClass A]
{a : A}
{k : 𝕜}
(h : ‖a‖ < ‖k‖)


/-- Given right homology map data for morphisms `φ` and `φ'`, this is the induced
right homology map data for `φ + φ'`. -/
@[simps]
def add : RightHomologyMapData (φ + φ') h₁ h₂

(γ : CategoryTheory.ShortComplex.RightHomologyMapData φ h₁ h₂)

(γ' : CategoryTheory.ShortComplex.RightHomologyMapData φ' h₁ h₂)


/-- A typeclass mixin saying that two multiplicative actions on the same space commute. -/
@[to_additive]
class SMulCommClass (M N α : Type*) [SMul M α] [SMul N α] : Prop where
  /-- `•` is left commutative -/
  smul_comm : ∀ (m : M) (n : N) (a : α), m • n • a = n • m • a

{M : Type u_11}
{N : Type u_12}
{α : Type u_13}
[SMul M α]
[SMul N α]
[self : SMulCommClass M N α]
(m : M)
(n : N)
(a : α)


@[simp] theorem neg_imJ : (-a).imJ = -a.imJ


@[simp, norm_cast]
theorem cast_bit0 [Semiring α] (n : Num) : (n.bit0 : α) = 2 * (n : α)


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

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

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


@[to_additive (attr := simp) cmp_add_right]
theorem cmp_mul_right' {α : Type*} [Mul α] [LinearOrder α]
    [CovariantClass α α (swap (· * ·)) (· < ·)] (a b c : α) :
    cmp (a * c) (b * c) = cmp a b

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


/-- An induction principle for span membership. If `p` holds for 0 and all elements of `s`, and is
preserved under addition and scalar multiplication, then `p` holds for all elements of the span of
`s`. -/
@[elab_as_elim]
theorem span_induction {p : M → Prop} (h : x ∈ span R s) (mem : ∀ x ∈ s, p x) (zero : p 0)
    (add : ∀ x y, p x → p y → p (x + y)) (smul : ∀ (a : R) (x), p x → p (a • x)) : p x

(add : ∀ (x y : M), p x → p y → p (x + y))

(smul : ∀ (a : R) (x : M), p x → p (a • x))


theorem le_self_mul_inv {I : FractionalIdeal R₁⁰ K} (hI : I ≤ (1 : FractionalIdeal R₁⁰ K)) :
    I ≤ I * I⁻¹

{K : Type u_3}
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]
{I : FractionalIdeal R₁⁰ K}
(hI : I ≤ 1)


theorem max_associative : Associative (max : α → α → α)


@[to_additive]
theorem IsWF.min_smul [LinearOrder G] [LinearOrder P] [SMul G P] [IsOrderedCancelSMul G P]
    {s : Set G} {t : Set P} (hs : s.IsWF) (ht : t.IsWF) (hsn : s.Nonempty) (htn : t.Nonempty) :
    (hs.smul ht).min (hsn.smul htn) = hs.min hsn • ht.min htn

{G : Type u_1}
{P : Type u_2}
[LinearOrder G]
[LinearOrder P]
[VAdd G P]
[IsOrderedCancelVAdd G P]
{s : Set G}
{t : Set P}
(hs : s.IsWF)
(ht : t.IsWF)
(hsn : s.Nonempty)
(htn : t.Nonempty)


@[simp, norm_cast]
theorem coe_ennreal_pos {x : ℝ≥0∞} : (0 : EReal) < x ↔ 0 < x


theorem range_pullback_to_prod {X Y Z : TopCat} (f : X ⟶ Z) (g : Y ⟶ Z) :
    Set.range (prod.lift (pullback.fst f g) (pullback.snd f g)) =
      { x | (Limits.prod.fst ≫ f) x = (Limits.prod.snd ≫ g) x }

Set.range
    ⇑(CategoryTheory.Limits.prod.lift (CategoryTheory.Limits.pullback.fst f g)
        (CategoryTheory.Limits.pullback.snd f g)) =
  {x | (CategoryTheory.Limits.prod.fst ≫ f) x = (CategoryTheory.Limits.prod.snd ≫ g) x}


@[simp] theorem ofNat_toNat (c : Char) : Char.ofNat c.toNat = c


theorem of_vert_isIso [IsIso g] [IsIso inl] (sq : CommSq f g inl inr) : IsPushout f g inl inr

(sq : CategoryTheory.CommSq f g inl inr)


@[simp]
theorem lift.equiv_apply (f : M →ₗ[R] N →ₗ[R] P) (m : M) (n : N) :
    lift.equiv R M N P f (m ⊗ₜ n) = f m n

(R : Type u_1)
[CommSemiring R]
(M : Type u_4)
(N : Type u_5)
(P : Type u_6)
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : M →ₗ[R] N →ₗ[R] P)
(m : M)
(n : N)

((TensorProduct.lift.equiv R M N P) f) (m ⊗ₜ[R] n) = (f m) n


theorem IsBigOWith.prod_rightr (h : IsBigOWith c l f g') (hc : 0 ≤ c) :
    IsBigOWith c l f fun x => (f' x, g' x)

{α : Type u_1}
{E : Type u_3}
{E' : Type u_6}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup E']
[SeminormedAddCommGroup F']
{c : ℝ}
{f : α → E}
(f' : α → E')
{g' : α → F'}
{l : Filter α}
(h : Asymptotics.IsBigOWith c l f g')
(hc : 0 ≤ c)

Asymptotics.IsBigOWith c l f fun x => (f' x, g' x)


@[simp]
theorem ord_le_ord {c₁ c₂} : ord c₁ ≤ ord c₂ ↔ c₁ ≤ c₂


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

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

⨆ ij ∈ s.sigma t, f ij = ⨆ i ∈ s, ⨆ j ∈ t i, f ⟨i, j⟩


@[simp]
theorem toOrdinal_min {a b : NatOrdinal} : toOrdinal (min a b) = min (toOrdinal a) (toOrdinal b)

NatOrdinal.toOrdinal (min a b) = min (NatOrdinal.toOrdinal a) (NatOrdinal.toOrdinal b)


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


lemma zero_le_three [Preorder α] [ZeroLEOneClass α] [CovariantClass α α (·+·) (·≤·)] :
    (0 : α) ≤ 3

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


theorem isOpenMap_smul₀ {c : G₀} (hc : c ≠ 0) : IsOpenMap fun x : α => c • x

{α : Type u_2}
{G₀ : Type u_4}
[TopologicalSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[ContinuousConstSMul G₀ α]
{c : G₀}
(hc : c ≠ 0)


@[simp]
theorem mem_sInter {x : α} {S : Set (Set α)} : x ∈ ⋂₀ S ↔ ∀ t ∈ S, x ∈ t


@[to_additive (attr := measurability)]
theorem Multiset.aemeasurable_prod' (l : Multiset (α → M)) (hl : ∀ f ∈ l, AEMeasurable f μ) :
    AEMeasurable l.prod μ

{M : Type u_2}
{α : Type u_4}
[CommMonoid M]
[MeasurableSpace M]
[MeasurableMul₂ M]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(l : Multiset (α → M))
(hl : ∀ f ∈ l, AEMeasurable f μ)


theorem HasDerivAtFilter.comp_hasFDerivAtFilter {f : E → 𝕜'} {f' : E →L[𝕜] 𝕜'} (x) {L'' : Filter E}
    (hh₂ : HasDerivAtFilter h₂ h₂' (f x) L') (hf : HasFDerivAtFilter f f' x L'')
    (hL : Tendsto f L'' L') : HasFDerivAtFilter (h₂ ∘ f) (h₂' • f') x L''


theorem nmul_nadd_le₃ {a' b' c' : Ordinal} (ha : a' ≤ a) (hb : b' ≤ b) (hc : c' ≤ c) :
    a' ⨳ b ⨳ c ♯ a ⨳ b' ⨳ c ♯ a ⨳ b ⨳ c' ♯ a' ⨳ b' ⨳ c' ≤
      a ⨳ b ⨳ c ♯ a' ⨳ b' ⨳ c ♯ a' ⨳ b ⨳ c' ♯ a ⨳ b' ⨳ c'

{a b c a' b' c' : Ordinal.{u}}
(ha : a' ≤ a)
(hb : b' ≤ b)
(hc : c' ≤ c)


protected theorem Connected.dist_eq_zero_iff (hconn : G.Connected) :
    G.dist u v = 0 ↔ u = v

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}
(hconn : G.Connected)


lemma uniformEmbedding_toContinuousMap :
    UniformEmbedding ((↑) : C(X, R)₀ → C(X, R))

{X : Type u_1}
{R : Type u_2}
[Zero X]
[TopologicalSpace X]
[Zero R]
[UniformSpace R]


@[simp]
theorem EuclideanSpace.norm_single (i : ι) (a : 𝕜) :
    ‖EuclideanSpace.single i (a : 𝕜)‖ = ‖a‖

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[DecidableEq ι]
[Fintype ι]
(i : ι)
(a : 𝕜)


@[simp]
theorem toAlternatingMap_add (f g : M [⋀^ι]→L[R] N) :
    (f + g).toAlternatingMap = f.toAlternatingMap + g.toAlternatingMap

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
[ContinuousAdd N]
(f g : M [⋀^ι]→L[R] N)


theorem iterate_zero_apply (x : α) : f^[0] x = x


@[to_additive (attr := simp)]
theorem upperClosure_mul_distrib : upperClosure (s * t) = upperClosure s * upperClosure t

{α : Type u_1}
[OrderedCommGroup α]
(s t : Set α)


@[simp, norm_cast]
protected theorem coe_zpow (a : { x : α // 0 ≤ x }) (n : ℤ) :
    ((a ^ n : { x : α // 0 ≤ x }) : α) = (a : α) ^ n

{α : Type u_1}
[LinearOrderedSemifield α]
(a : { x // 0 ≤ x })
(n : ℤ)