/-- Eta rule for cocones. -/
@[simps!]
def eta (c : Cocone F) : c ≅ ⟨c.pt, c.ι⟩

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

(CategoryTheory.Limits.Cocones.eta c).inv.hom = 𝟙 c.pt


/-- `Squarefree` is multiplicative. Note that the → direction does not require `hmn`
and generalizes to arbitrary commutative monoids. See `Squarefree.of_mul_left` and
`Squarefree.of_mul_right` above for auxiliary lemmas. -/
theorem squarefree_mul {m n : ℕ} (hmn : m.Coprime n) :
    Squarefree (m * n) ↔ Squarefree m ∧ Squarefree n


theorem compl_I_eq_F : (IF.I : Set P)ᶜ = IF.F

{P : Type u_1}
[Preorder P]
(IF : Order.Ideal.PrimePair P)


lemma complementedLattice_of_sSup_eq_top (hS : BooleanGenerators S) (h : sSup S = ⊤) :
    ComplementedLattice α

(hS : IsCompactlyGenerated.BooleanGenerators S)


/-- A linear order is reflexive, transitive, antisymmetric and total relation `≤`.
We assume that every linear ordered type has decidable `(≤)`, `(<)`, and `(=)`. -/
class LinearOrder (α : Type u) extends PartialOrder α, Min α, Max α, Ord α :=
  /-- A linear order is total. -/
  le_total (a b : α) : a ≤ b ∨ b ≤ a
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLE : DecidableRel (· ≤ · : α → α → Prop)
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableEq : DecidableEq α := @decidableEqOfDecidableLE _ _ decidableLE
  /-- In a linearly ordered type, we assume the order relations are all decidable. -/
  decidableLT : DecidableRel (· < · : α → α → Prop) :=
    @decidableLTOfDecidableLE _ _ decidableLE
  min := fun a b => if a ≤ b then a else b
  max := fun a b => if a ≤ b then b else a
  /-- The minimum function is equivalent to the one you get from `minOfLe`. -/
  min_def : ∀ a b, min a b = if a ≤ b then a else b := by intros; rfl
  /-- The minimum function is equivalent to the one you get from `maxOfLe`. -/
  max_def : ∀ a b, max a b = if a ≤ b then b else a := by intros; rfl
  compare a b := compareOfLessAndEq a b
  /-- Comparison via `compare` is equal to the canonical comparison given decidable `<` and `=`. -/
  compare_eq_compareOfLessAndEq : ∀ a b, compare a b = compareOfLessAndEq a b := by
    compareOfLessAndEq_rfl

{α : Type u}
[self : LinearOrder α]
(a b : α)


/-- Continuity of `Urysohns.CU.lim`. See module docstring for a sketch of the proofs. -/
theorem continuous_lim (c : CU P) : Continuous c.lim

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)


/-- The map of a Gaussian distribution by multiplication by a constant is a Gaussian. -/
lemma gaussianReal_map_mul_const (c : ℝ) :
    (gaussianReal μ v).map (· * c) = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v)

MeasureTheory.Measure.map (fun x => x * c) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)


@[simp]
theorem eval₂_mul : (p * q).eval₂ f x = p.eval₂ f x * q.eval₂ f x

{R : Type u}
{S : Type v}
[Semiring R]
{p q : R[X]}
[CommSemiring S]
(f : R →+* S)
(x : S)

Polynomial.eval₂ f x (p * q) = Polynomial.eval₂ f x p * Polynomial.eval₂ f x q


@[simp]
theorem coe_one : ((1 : A →⋆ₙₐ[R] A) : A → A) = id

{R : Type u_1}
{A : Type u_2}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[Star A]


/-- A product of sums can be written as a sum of products. -/
lemma prod_sum {κ : ι → Type*} [Fintype ι] [∀ i, Fintype (κ i)] (f : ∀ i, κ i → α) :
    ∏ i, ∑ j, f i j = ∑ x : ∀ i, κ i, ∏ i, f i (x i)

{ι : Type u_6}
{α : Type u_8}
[DecidableEq ι]
[CommSemiring α]
{κ : ι → Type u_9}
[Fintype ι]
[(i : ι) → Fintype (κ i)]
(f : (i : ι) → κ i → α)

∏ i : ι, ∑ j : κ i, f i j = ∑ x : (i : ι) → κ i, ∏ i : ι, f i (x i)


/-- Uses `left` co(ntra)variant. -/
@[to_additive (attr := simp) Left.neg_pos_iff "Uses `left` co(ntra)variant."]
theorem Left.one_lt_inv_iff : 1 < a⁻¹ ↔ a < 1

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


/-- When `f` is bilinear then `Matrix.kroneckerMap f` is also bilinear. -/
@[simps!]
def kroneckerMapBilinear [CommSemiring R] [AddCommMonoid α] [AddCommMonoid β] [AddCommMonoid γ]
    [Module R α] [Module R β] [Module R γ] (f : α →ₗ[R] β →ₗ[R] γ) :
    Matrix l m α →ₗ[R] Matrix n p β →ₗ[R] Matrix (l × n) (m × p) γ

{R : Type u_1}
{α : Type u_2}
{β : Type u_4}
{γ : Type u_6}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{p : Type u_11}
[CommSemiring R]
[AddCommMonoid α]
[AddCommMonoid β]
[AddCommMonoid γ]
[Module R α]
[Module R β]
[Module R γ]
(f : α →ₗ[R] β →ₗ[R] γ)

∀ (m_1 : Matrix l m α) (B : Matrix n p β),
  ((Matrix.kroneckerMapBilinear f) m_1) B = Matrix.kroneckerMap (fun r s => (f r) s) m_1 B


theorem _root_.Set.Infinite.not_bddAbove {s : Set α} : s.Infinite → ¬BddAbove s

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrderBot α]
{s : Set α}


theorem sInf_def {s : Set ℕ} (h : s.Nonempty) : sInf s = @Nat.find (fun n ↦ n ∈ s) _ h


@[simp]
theorem maxTrivEquiv_of_refl_eq_refl :
    maxTrivEquiv (LieModuleEquiv.refl : M ≃ₗ⁅R,L⁆ M) = LieModuleEquiv.refl

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

LieModule.maxTrivEquiv LieModuleEquiv.refl = LieModuleEquiv.refl


/-- If `s` generates the whole module and linear maps `f`, `g` are equal on `s`, then they are
equal. -/
theorem ext_on {s : Set M} {f g : F} (hv : span R s = ⊤) (h : Set.EqOn f g s) : f = g

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Semiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{F : Type u_8}
{σ₁₂ : R →+* R₂}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
{s : Set M}
{f g : F}
(hv : Submodule.span R s = ⊤)
(h : Set.EqOn (⇑f) (⇑g) s)


@[simp]
theorem evenOdd_map_involute (n : ZMod 2) :
    (evenOdd Q n).map (involute : CliffordAlgebra Q →ₐ[R] CliffordAlgebra Q).toLinearMap =
      evenOdd Q n

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(n : ZMod 2)

Submodule.map CliffordAlgebra.involute.toLinearMap (CliffordAlgebra.evenOdd Q n) = CliffordAlgebra.evenOdd Q n


theorem Nontrivial.le_infsep_iff {d} (hs : s.Nontrivial) :
    d ≤ s.infsep ↔ ∀ x ∈ s, ∀ y ∈ s, x ≠ y → d ≤ dist x y

{α : Type u_1}
[PseudoMetricSpace α]
{s : Set α}
{d : ℝ}
(hs : s.Nontrivial)


@[to_additive Ico_add_Icc_subset]
theorem Ico_mul_Icc_subset' (a b c d : α) : Ico a b * Icc c d ⊆ Ico (a * c) (b * d)

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

[CovariantClass α α (Function.swap HMul.hMul) LT.lt]

Set.Ico a b * Set.Icc c d ⊆ Set.Ico (a * c) (b * d)


@[simp]
theorem multichoose_two (k : ℕ) : multichoose 2 k = k + 1


theorem finite_biUnion {ι : Type*} (s : Set ι) [Finite s] (t : ι → Set α)
    (H : ∀ i ∈ s, Finite (t i)) : Finite (⋃ x ∈ s, t x)

{α : Type u}
{ι : Type u_1}
(s : Set ι)
[Finite ↑s]
(t : ι → Set α)
(H : ∀ i ∈ s, Finite ↑(t i))


theorem comapRight_apply' (κ : Kernel α β) (hf : MeasurableEmbedding f) (a : α) {t : Set γ}
    (ht : MeasurableSet t) : comapRight κ hf a t = κ a (f '' t)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_4}
{mγ : MeasurableSpace γ}
{f : γ → β}
(κ : ProbabilityTheory.Kernel α β)
(hf : MeasurableEmbedding f)
(a : α)
{t : Set γ}
(ht : MeasurableSet t)

((κ.comapRight hf) a) t = (κ a) (f '' t)


theorem LinearIndependent.image_subtype {s : Set M} {f : M →ₗ[R] M'}
    (hs : LinearIndependent R (fun x => x : s → M))
    (hf_inj : Disjoint (span R s) (LinearMap.ker f)) :
    LinearIndependent R (fun x => x : f '' s → M')

(hs : LinearIndependent R fun (x : ↑s) => ↑x)

(hf_inj : Disjoint (Submodule.span R s) (LinearMap.ker f))

LinearIndependent R fun (x : ↑(⇑f '' s)) => ↑x


/-- If presheaf of `J₁`-closed sieves is a `J₂`-sheaf then `J₁ ≤ J₂`. Note the converse is true by
`classifier_isSheaf` and `isSheaf_of_le`.
-/
theorem le_topology_of_closedSieves_isSheaf {J₁ J₂ : GrothendieckTopology C}
    (h : Presieve.IsSheaf J₁ (Functor.closedSieves J₂)) : J₁ ≤ J₂

{J₁ J₂ : CategoryTheory.GrothendieckTopology C}

(h : CategoryTheory.Presieve.IsSheaf J₁ (CategoryTheory.Functor.closedSieves J₂))


private lemma x_mul_y_mul_z_eq_u_mul_w_cube : S.x * S.y * S.z = S.u * S.w ^ 3

(S : FermatLastTheoremForThreeGen.Solution hζ)

FermatLastTheoremForThreeGen.Solution.x S * FermatLastTheoremForThreeGen.Solution.y S *
    FermatLastTheoremForThreeGen.Solution.z S =
  ↑S.u * FermatLastTheoremForThreeGen.Solution.w S ^ 3


/-- The obvious triangle `X₁ ⟶ X₁ ⊞ X₂ ⟶ X₂ ⟶ X₁⟦1⟧`. -/
@[simps!]
def binaryBiproductTriangle (X₁ X₂ : C) [HasZeroMorphisms C] [HasBinaryBiproduct X₁ X₂] :
    Triangle C

(CategoryTheory.Pretriangulated.binaryBiproductTriangle X₁ X₂).obj₁ = X₁


theorem ofFinsupp_algebraMap (r : R) : (⟨algebraMap R _ r⟩ : A[X]) = algebraMap R A[X] r

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

{ toFinsupp := (algebraMap R (AddMonoidAlgebra A ℕ)) r } = (algebraMap R A[X]) r


theorem Perm.append_cons (a : α) {h₁ h₂ t₁ t₂ : List α} (p₁ : h₁ ~ h₂) (p₂ : t₁ ~ t₂) :
    h₁ ++ a :: t₁ ~ h₂ ++ a :: t₂

{α : Type u_1}
(a : α)
{h₁ h₂ t₁ t₂ : List α}
(p₁ : h₁ ~ h₂)
(p₂ : t₁ ~ t₂)


/-- Note: `Sym.map_id` is not simp-normal, as simp ends up unfolding `id` with `Sym.map_congr` -/
@[simp]
theorem map_id' {α : Type*} {n : ℕ} (s : Sym α n) : Sym.map (fun x : α => x) s = s


theorem nhdsWithin_pi_neBot {I : Set ι} {s : ∀ i, Set (π i)} {x : ∀ i, π i} :
    (𝓝[pi I s] x).NeBot ↔ ∀ i ∈ I, (𝓝[s i] x i).NeBot

{ι : Type u_5}
{π : ι → Type u_6}
[(i : ι) → TopologicalSpace (π i)]
{I : Set ι}
{s : (i : ι) → Set (π i)}
{x : (i : ι) → π i}

(𝓝[I.pi s] x).NeBot ↔ ∀ i ∈ I, (𝓝[s i] x i).NeBot


theorem aeSeq_eq_mk_of_mem_aeSeqSet (hf : ∀ i, AEMeasurable (f i) μ) {x : α}
    (hx : x ∈ aeSeqSet hf p) (i : ι) : aeSeq hf p i x = (hf i).mk (f i) x

{ι : Sort u_1}
{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{f : ι → α → β}
{μ : MeasureTheory.Measure α}
{p : α → (ι → β) → Prop}
(hf : ∀ (i : ι), AEMeasurable (f i) μ)
{x : α}
(hx : x ∈ aeSeqSet hf p)
(i : ι)

aeSeq hf p i x = AEMeasurable.mk (f i) ⋯ x


/-- Structure recording good behavior of a property of a triple `(f, s, x)` where `f` is a function,
`s` a set and `x` a point. Good behavior here means locality and invariance under given groupoids
(both in the source and in the target). Given such a good behavior, the lift of this property
to charted spaces admitting these groupoids will inherit the good behavior. -/
structure LocalInvariantProp (P : (H → H') → Set H → H → Prop) : Prop where
  is_local : ∀ {s x u} {f : H → H'}, IsOpen u → x ∈ u → (P f s x ↔ P f (s ∩ u) x)
  right_invariance' : ∀ {s x f} {e : PartialHomeomorph H H},
    e ∈ G → x ∈ e.source → P f s x → P (f ∘ e.symm) (e.symm ⁻¹' s) (e x)
  congr_of_forall : ∀ {s x} {f g : H → H'}, (∀ y ∈ s, f y = g y) → f x = g x → P f s x → P g s x
  left_invariance' : ∀ {s x f} {e' : PartialHomeomorph H' H'},
    e' ∈ G' → s ⊆ f ⁻¹' e'.source → f x ∈ e'.source → P f s x → P (e' ∘ f) s x

{H : Type u_1}
{H' : Type u_3}
[TopologicalSpace H]
[TopologicalSpace H']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
(self : G.LocalInvariantProp G' P)
{s : Set H}
{x : H}
{u : Set H}
{f : H → H'}


@[simp]
theorem snd_lineMap (p₀ p₁ : P1 × P2) (c : k) : (lineMap p₀ p₁ c).2 = lineMap p₀.2 p₁.2 c

{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]
(p₀ p₁ : P1 × P2)
(c : k)

((AffineMap.lineMap p₀ p₁) c).2 = (AffineMap.lineMap p₀.2 p₁.2) c


/-- See [Theorem 6.6][calugareanu]. -/
theorem complementedLattice_of_isAtomistic [IsAtomistic α] : ComplementedLattice α

{α : Type u_2}
[CompleteLattice α]
[IsModularLattice α]
[IsCompactlyGenerated α]
[IsAtomistic α]


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


@[to_additive]
theorem coe_iSup_of_directed {ι} [Nonempty ι] {S : ι → Subgroup G} (hS : Directed (· ≤ ·) S) :
    ((⨆ i, S i : Subgroup G) : Set G) = ⋃ i, S i

(hS : Directed (fun x x_1 => x ≤ x_1) S)


/--
M is flat if and only if `𝟙 M ⊗ f` is injective whenever `f` is an injective linear map.
-/
lemma iff_lTensor_preserves_injective_linearMap [Small.{v} R] :
    Flat R M ↔
    ∀ ⦃N N' : Type v⦄ [AddCommGroup N] [AddCommGroup N'] [Module R N] [Module R N']
      (L : N →ₗ[R] N'), Function.Injective L → Function.Injective (L.lTensor M)

(R : Type u)
(M : Type v)
[CommRing R]
[AddCommGroup M]
[Module R M]
[Small.{v, u} R]

Module.Flat R M ↔
  ∀ ⦃N N' : Type v⦄ [inst : AddCommGroup N] [inst_1 : AddCommGroup N'] [inst_2 : Module R N] [inst_3 : Module R N']
    (L : N →ₗ[R] N'), Function.Injective ⇑L → Function.Injective ⇑(LinearMap.lTensor M L)


theorem kahler_comp_rightAngleRotation (x y : E) : o.kahler (J x) (J y) = o.kahler x y

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

(o.kahler (o.rightAngleRotation x)) (o.rightAngleRotation y) = (o.kahler x) y


@[simp]
theorem add_eq_sup {I J : Ideal R} : I + J = I ⊔ J

{R : Type u}
[Semiring R]
{I J : Ideal R}


/-- When an inner product space `E` over `𝕜` is considered as a real normed space, its inner
product satisfies `IsBoundedBilinearMap`.

In order to state these results, we need a `NormedSpace ℝ E` instance. We will later establish
such an instance by restriction-of-scalars, `InnerProductSpace.rclikeToReal 𝕜 E`, but this
instance may be not definitionally equal to some other “natural” instance. So, we assume
`[NormedSpace ℝ E]`.
-/
theorem _root_.isBoundedBilinearMap_inner [NormedSpace ℝ E] :
    IsBoundedBilinearMap ℝ fun p : E × E => ⟪p.1, p.2⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]

IsBoundedBilinearMap ℝ fun p => ⟪p.1, p.2⟫_𝕜


@[simp]
theorem comap_inf (f : F) : comap f (q ⊓ q') = comap f q ⊓ comap f q'

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
(q q' : Submodule R₂ M₂)
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
(f : F)

Submodule.comap f (q ⊓ q') = Submodule.comap f q ⊓ Submodule.comap f q'


@[to_additive]
theorem subtype_injective : Function.Injective (Subgroup.subtype H)

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


/-- The trivial continuous homomorphism. -/
@[to_additive (attr := simps!) "The trivial continuous homomorphism."]
def one : ContinuousMonoidHom A B

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

∀ (x : A), (ContinuousMonoidHom.one A B) x = 1


theorem lift_apply (F : Multiplicative G →* A) (f : MonoidAlgebra k G) :
    lift k G A F f = f.sum fun a b => b • F (Multiplicative.ofAdd a)

{k : Type u₁}
{G : Type u₂}
[CommSemiring k]
[AddMonoid G]
{A : Type u₃}
[Semiring A]
[Algebra k A]
(F : Multiplicative G →* A)
(f : MonoidAlgebra k G)

((AddMonoidAlgebra.lift k G A) F) f = Finsupp.sum f fun a b => b • F (Multiplicative.ofAdd a)


theorem map_eq_zero_iff (e : M₁ ≃SL[σ₁₂] M₂) {x : M₁} : e x = 0 ↔ x = 0

{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₁}


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

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


protected theorem map_neg : D (-a) = -D a

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(D : LieDerivation R L M)
(a : L)


/-- The fully faithful embedding of `Sequential` in `TopCat`. -/
@[simps!]
def sequentialToTop : Sequential.{u} ⥤ TopCat.{u}

Sequential.sequentialToTop.obj self = self.toTop


theorem uniformSpace_eq [UniformSpace F] [UniformAddGroup F] (𝔖 : Set (Set E)) :
    instUniformSpace σ F 𝔖 = UniformSpace.comap DFunLike.coe (UniformOnFun.uniformSpace E F 𝔖)

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NormedField 𝕜₁]
[NormedField 𝕜₂]
(σ : 𝕜₁ →+* 𝕜₂)
{E : Type u_3}
(F : Type u_4)
[AddCommGroup E]
[Module 𝕜₁ E]
[TopologicalSpace E]
[AddCommGroup F]
[Module 𝕜₂ F]
[UniformSpace F]
[UniformAddGroup F]
(𝔖 : Set (Set E))

UniformConvergenceCLM.instUniformSpace σ F 𝔖 = UniformSpace.comap DFunLike.coe (UniformOnFun.uniformSpace E F 𝔖)


@[to_additive]
theorem _root_.Equiv.Perm.prod_comp (σ : Equiv.Perm α) (s : Finset α) (f : α → β)
    (hs : { a | σ a ≠ a } ⊆ s) : (∏ x ∈ s, f (σ x)) = ∏ x ∈ s, f x

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
(σ : Equiv.Perm α)
(s : Finset α)
(f : α → β)
(hs : {a | σ a ≠ a} ⊆ ↑s)


theorem eq_top_of_isIso_arrow {Y : C} (P : Subobject Y) [IsIso P.arrow] : P = ⊤

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{Y : C}
(P : CategoryTheory.Subobject Y)
[CategoryTheory.IsIso P.arrow]


@[simp]
lemma ab_zero_apply (x : S.X₁) : S.g (S.f x) = 0

(S : CategoryTheory.ShortComplex Ab)
(x : ↑S.X₁)


/-- As well as being linear, `ι m` squares to zero. -/
-- @[simp] -- Porting note (#10618): simp can prove this
theorem ι_sq_zero (m : M) : ι R m * ι R m = 0

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
(m : M)

(ExteriorAlgebra.ι R) m * (ExteriorAlgebra.ι R) m = 0


protected theorem IsClosed.intrinsicClosure (hs : IsClosed ((↑) ⁻¹' s : Set <| affineSpan 𝕜 s)) :
    intrinsicClosure 𝕜 s = s

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_5}
[Ring 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
[TopologicalSpace P]
[AddTorsor V P]
{s : Set P}
(hs : IsClosed (Subtype.val ⁻¹' s))


theorem HasSheafify.mk' {F : (Cᵒᵖ ⥤ A) ⥤ Sheaf J A} (adj : F ⊣ sheafToPresheaf J A)
    [PreservesFiniteLimits F] : HasSheafify J A

(J : CategoryTheory.GrothendieckTopology C)

{F : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ A) (CategoryTheory.Sheaf J A)}

(adj : F ⊣ CategoryTheory.sheafToPresheaf J A)


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

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

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


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


theorem toList_singleton (x : α) : toList (singleton x) = [x]

(Batteries.DList.singleton x).toList = [x]


theorem limsup_lintegral_le {f : ℕ → α → ℝ≥0∞} (g : α → ℝ≥0∞) (hf_meas : ∀ n, Measurable (f n))
    (h_bound : ∀ n, f n ≤ᵐ[μ] g) (h_fin : ∫⁻ a, g a ∂μ ≠ ∞) :
    limsup (fun n => ∫⁻ a, f n a ∂μ) atTop ≤ ∫⁻ a, limsup (fun n => f n a) atTop ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : ℕ → α → ℝ≥0∞}
(g : α → ℝ≥0∞)
(hf_meas : ∀ (n : ℕ), Measurable (f n))
(h_bound : ∀ (n : ℕ), f n ≤ᵐ[μ] g)
(h_fin : ∫⁻ (a : α), g a ∂μ ≠ ⊤)

Filter.limsup (fun n => ∫⁻ (a : α), f n a ∂μ) Filter.atTop ≤ ∫⁻ (a : α), Filter.limsup (fun n => f n a) Filter.atTop ∂μ


/-- In an ordered commutative monoid, if each factor `f i` of one finite product is less than or
equal to the corresponding factor `g i` of another finite product, then
`∏ i ∈ s, f i ≤ ∏ i ∈ s, g i`. -/
@[to_additive sum_le_sum]
theorem prod_le_prod' (h : ∀ i ∈ s, f i ≤ g i) : ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i

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


theorem Eventually.exists_measurable_mem {f : Filter α} [IsMeasurablyGenerated f] {p : α → Prop}
    (h : ∀ᶠ x in f, p x) : ∃ s ∈ f, MeasurableSet s ∧ ∀ x ∈ s, p x

{α : Type u_1}
[MeasurableSpace α]
{f : Filter α}
[f.IsMeasurablyGenerated]
{p : α → Prop}
(h : ∀ᶠ (x : α) in f, p x)


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


theorem sum_partition_boxes (f : ι →ᵇᵃ[I₀] M) (hI : ↑I ≤ I₀) {π : Prepartition I}
    (h : π.IsPartition) : ∑ J ∈ π.boxes, f J = f I

{ι : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
{I₀ : WithTop (BoxIntegral.Box ι)}
{I : BoxIntegral.Box ι}
(f : BoxIntegral.BoxAdditiveMap ι M I₀)
(hI : ↑I ≤ I₀)
{π : BoxIntegral.Prepartition I}
(h : π.IsPartition)


@[simp]
theorem lTensorBot_tmul (x : R) (a : A) : A.lTensorBot (algebraMap R _ x ⊗ₜ[R] a) = x • a

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

A.lTensorBot ((algebraMap R ↥⊥) x ⊗ₜ[R] a) = x • a


@[simp]
theorem mem_bot {x : M} : x ∈ (⊥ : Submodule R M) ↔ x = 0

(R : Type u_1)
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{x : M}


theorem thin_of_isCoseparating_empty (h : IsCoseparating (∅ : Set C)) : Quiver.IsThin C

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


theorem get_indexOf [DecidableEq α] {l : List α} (H : Nodup l) (i : Fin l.length) :
    indexOf (get l i) l = i

{α : Type u}
[DecidableEq α]
{l : List α}
(H : l.Nodup)
(i : Fin l.length)


/-- A pseudofunctor `F` between bicategories `B` and `C` consists of a function between objects
`F.obj`, a function between 1-morphisms `F.map`, and a function between 2-morphisms `F.map₂`.

Unlike functors between categories, `F.map` do not need to strictly commute with the compositions,
and do not need to strictly preserve the identity. Instead, there are specified 2-isomorphisms
`F.map (𝟙 a) ≅ 𝟙 (F.obj a)` and `F.map (f ≫ g) ≅ F.map f ≫ F.map g`.

`F.map₂` strictly commute with compositions and preserve the identity. They also preserve the
associator, the left unitor, and the right unitor modulo some adjustments of domains and codomains
of 2-morphisms.
-/
structure Pseudofunctor (B : Type u₁) [Bicategory.{w₁, v₁} B] (C : Type u₂)
    [Bicategory.{w₂, v₂} C] extends PrelaxFunctor B C where
  mapId (a : B) : map (𝟙 a) ≅ 𝟙 (obj a)
  mapComp {a b c : B} (f : a ⟶ b) (g : b ⟶ c) : map (f ≫ g) ≅ map f ≫ map g
  map₂_whisker_left :
    ∀ {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h),
      map₂ (f ◁ η) = (mapComp f g).hom ≫ map f ◁ map₂ η ≫ (mapComp f h).inv := by
    aesop_cat
  map₂_whisker_right :
    ∀ {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c),
      map₂ (η ▷ h) = (mapComp f h).hom ≫ map₂ η ▷ map h ≫ (mapComp g h).inv := by
    aesop_cat
  map₂_associator :
    ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d),
      map₂ (α_ f g h).hom = (mapComp (f ≫ g) h).hom ≫ (mapComp f g).hom ▷ map h ≫
      (α_ (map f) (map g) (map h)).hom ≫ map f ◁ (mapComp g h).inv ≫
      (mapComp f (g ≫ h)).inv := by
    aesop_cat
  map₂_left_unitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (λ_ f).hom = (mapComp (𝟙 a) f).hom ≫ (mapId a).hom ▷ map f ≫ (λ_ (map f)).hom := by
    aesop_cat
  map₂_right_unitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (ρ_ f).hom = (mapComp f (𝟙 b)).hom ≫ map f ◁ (mapId b).hom ≫ (ρ_ (map f)).hom := by
    aesop_cat

(self : CategoryTheory.Pseudofunctor B C)

self.map₂ (CategoryTheory.Bicategory.whiskerLeft f η) =
  CategoryTheory.CategoryStruct.comp (self.mapComp f g).hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (self.map f) (self.map₂ η))
      (self.mapComp f h).inv)


theorem factorization_lcm {a b : ℕ} (ha : a ≠ 0) (hb : b ≠ 0) :
    (a.lcm b).factorization = a.factorization ⊔ b.factorization


{α : Type u_1}
[LinearOrder α]
{s : Finset α}
[Fintype α]


theorem card_le_mul_card_image {f : α → β} (s : Finset α) (n : ℕ)
    (hn : ∀ a ∈ s.image f, (s.filter fun x ↦ f x = a).card ≤ n) : s.card ≤ n * (s.image f).card

(hn : ∀ a ∈ Finset.image f s, (Finset.filter (fun x => f x = a) s).card ≤ n)


/-- Any mono factorisation of `f` gives a mono factorisation of `f ≫ g` when `g` is a mono. -/
@[simps]
def compMono (F : MonoFactorisation f) {Y' : C} (g : Y ⟶ Y') [Mono g] :
    MonoFactorisation (f ≫ g)

(F : CategoryTheory.Limits.MonoFactorisation f)


/-- The scalar action via `mul.toOppositeSMul` is transformed by the same map as the
elements of the matrix, when `f` preserves multiplication. -/
theorem map_op_smul' [Mul α] [Mul β] (f : α → β) (r : α) (A : Matrix n n α)
    (hf : ∀ a₁ a₂, f (a₁ * a₂) = f a₁ * f a₂) :
    (MulOpposite.op r • A).map f = MulOpposite.op (f r) • A.map f

(hf : ∀ (a₁ a₂ : α), f (a₁ * a₂) = f a₁ * f a₂)


@[simp]
theorem coe_ennreal_ofReal {x : ℝ} : (ENNReal.ofReal x : EReal) = max x 0


/-- Binary **rearrangement inequality**. -/
lemma mul_add_mul_le_mul_add_mul' [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (· + ·) (· ≤ ·)] [ContravariantClass α α (· + ·) (· ≤ ·)]
    (hba : b ≤ a) (hdc : d ≤ c) : a * d + b * c ≤ a * c + b * d

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

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


theorem mul_pp_pf_overlap {ea eb e : ℕ} (x : R) (_ : ea + eb = e) (_ : a₂ * b₂ = c) :
    (x ^ ea * a₂ : R) * (x ^ eb * b₂) = x ^ e * c

{R : Type u_1}
[CommSemiring R]
{a₂ b₂ c : R}
{ea eb e : ℕ}
(x : R)

ea + eb = e → a₂ * b₂ = c → x ^ ea * a₂ * (x ^ eb * b₂) = x ^ e * c


/-- Riemann-Lebesgue Lemma for continuous and compactly-supported functions: the integral
`∫ v, exp (-2 * π * ⟪w, v⟫ * I) • f v` tends to 0 wrt `cocompact V`. Note that this is primarily
of interest as a preparatory step for the more general result
`tendsto_integral_exp_inner_smul_cocompact` in which `f` can be arbitrary. -/
theorem tendsto_integral_exp_inner_smul_cocompact_of_continuous_compact_support (hf1 : Continuous f)
    (hf2 : HasCompactSupport f) :
    Tendsto (fun w : V => ∫ v : V, 𝐞 (-⟪v, w⟫) • f v) (cocompact V) (𝓝 0)

{E : Type u_1}
{V : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : V → E}
[NormedAddCommGroup V]
[MeasurableSpace V]
[BorelSpace V]
[InnerProductSpace ℝ V]
[FiniteDimensional ℝ V]
(hf1 : Continuous f)
(hf2 : HasCompactSupport f)

Filter.Tendsto (fun w => ∫ (v : V), 𝐞 (-⟪v, w⟫_ℝ) • f v) (Filter.cocompact V) (𝓝 0)


@[simp]
theorem eventually_eventually_nhds {p : X → Prop} :
    (∀ᶠ y in 𝓝 x, ∀ᶠ x in 𝓝 y, p x) ↔ ∀ᶠ x in 𝓝 x, p x

{X : Type u}
{x : X}
[TopologicalSpace X]
{p : X → Prop}

(∀ᶠ (y : X) in 𝓝 x, ∀ᶠ (x : X) in 𝓝 y, p x) ↔ ∀ᶠ (x : X) in 𝓝 x, p x


@[reassoc (attr := simp)]
lemma ι_mapMap (i : I) (j : J) (hij : p i = j) :
    X.ιMapObj p i j hij ≫ mapMap φ p j = φ i ≫ Y.ιMapObj p i j hij

{I : Type u_1}
{J : Type u_2}
{C : Type u_4}
[CategoryTheory.Category.{u_5, u_4} C]
{X Y : CategoryTheory.GradedObject I C}
(φ : X ⟶ Y)
(p : I → J)
[X.HasMap p]
[Y.HasMap p]
(i : I)
(j : J)
(hij : p i = j)

CategoryTheory.CategoryStruct.comp (X.ιMapObj p i j hij) (CategoryTheory.GradedObject.mapMap φ p j) =
  CategoryTheory.CategoryStruct.comp (φ i) (Y.ιMapObj p i j hij)


@[field_simps]
lemma pow_ne_zero (n : ℕ) (h : a ≠ 0) : a ^ n ≠ 0

{M₀ : Type u_2}
[MonoidWithZero M₀]
{a : M₀}
[NoZeroDivisors M₀]
(n : ℕ)
(h : a ≠ 0)


protected theorem Associated.dvd [Monoid α] {a b : α} : a ~ᵤ b → a ∣ b


@[simp] theorem coe_cast (h : n = m) (i : Fin n) : (cast h i : Nat) = i


theorem comp_sub_left (hf : IntervalIntegrable f volume a b) (c : ℝ) :
    IntervalIntegrable (fun x => f (c - x)) volume (c - a) (c - b)

(hf : IntervalIntegrable f MeasureTheory.volume a b)

IntervalIntegrable (fun x => f (c - x)) MeasureTheory.volume (c - a) (c - b)


theorem exists_lt_nnnorm_lt {r₁ r₂ : ℝ≥0} (h : r₁ < r₂) : ∃ x : α, r₁ < ‖x‖₊ ∧ ‖x‖₊ < r₂

(α : Type u_1)
[DenselyNormedField α]
{r₁ r₂ : ℝ≥0}
(h : r₁ < r₂)

∃ x, r₁ < ‖x‖₊ ∧ ‖x‖₊ < r₂


theorem lt_sqrt_of_sq_lt (h : x ^ 2 < y) : x < √y


theorem Basis.det_reindex {ι' : Type*} [Fintype ι'] [DecidableEq ι'] (b : Basis ι R M) (v : ι' → M)
    (e : ι ≃ ι') : (b.reindex e).det v = b.det (v ∘ e)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_4}
[DecidableEq ι]
[Fintype ι]
{ι' : Type u_6}
[Fintype ι']
[DecidableEq ι']
(b : Basis ι R M)
(v : ι' → M)
(e : ι ≃ ι')


theorem tendsto_nhds_unique_of_frequently_eq [T2Space X] {f g : Y → X} {l : Filter Y} {a b : X}
    (ha : Tendsto f l (𝓝 a)) (hb : Tendsto g l (𝓝 b)) (hfg : ∃ᶠ x in l, f x = g x) : a = b

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T2Space X]
{f g : Y → X}
{l : Filter Y}
{a b : X}
(ha : Filter.Tendsto f l (𝓝 a))
(hb : Filter.Tendsto g l (𝓝 b))
(hfg : ∃ᶠ (x : Y) in l, f x = g x)


theorem nonneg_iff_ne_neg_one {a : SignType} : 0 ≤ a ↔ a ≠ -1


@[simp]
theorem left_triangle : whiskerRight adj.unit F ≫ whiskerLeft F adj.counit = 𝟙 _

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D C}
(adj : F ⊣ G)

CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight adj.unit F) (CategoryTheory.whiskerLeft F adj.counit) =
  CategoryTheory.CategoryStruct.id ((CategoryTheory.Functor.id C).comp F)


theorem assert_neg {p : Prop} {f : p → Part α} (h : ¬p) : assert p f = none

{α : Type u_1}
{p : Prop}
{f : p → Part α}
(h : ¬p)


lemma rdrop_append_of_le_length {l₁ l₂ : List α} (k : ℕ) :
    k ≤ length l₂ → List.rdrop (l₁ ++ l₂) k = l₁ ++ List.rdrop l₂ k

k ≤ l₂.length → (l₁ ++ l₂).rdrop k = l₁ ++ l₂.rdrop k


/-- If `E` is an `F`-algebra, there exists an `F`-linear isomorphism from `F` to `E` (namely,
`E` is a free `F`-module of rank one), then the algebra map from `F` to `E` is bijective. -/
theorem bijective_algebraMap_of_linearEquiv (b : F ≃ₗ[F] E) :
    Function.Bijective (algebraMap F E)

{F : Type u_1}
{E : Type u_2}
[CommSemiring F]
[Semiring E]
[Algebra F E]
(b : F ≃ₗ[F] E)


lemma disjoint_of_map {α β : Type*} {F G : Filter α} {f : α → β}
    (h : Disjoint (map f F) (map f G)) : Disjoint F G

(h : Disjoint (Filter.map f F) (Filter.map f G))


/-- The product of two `n`-smooth numbers is an `n`-smooth number. -/
theorem mul_mem_smoothNumbers {m₁ m₂ n : ℕ}
    (hm1 : m₁ ∈ n.smoothNumbers) (hm2 : m₂ ∈ n.smoothNumbers) : m₁ * m₂ ∈ n.smoothNumbers


@[to_additive]
theorem IsPWO.mul [OrderedCancelCommMonoid α] (hs : s.IsPWO) (ht : t.IsPWO) : IsPWO (s * t)

{α : Type u_1}
{s t : Set α}
[OrderedCancelCommMonoid α]
(hs : s.IsPWO)
(ht : t.IsPWO)


@[simp]
theorem cyclicPermutations_nil : cyclicPermutations ([] : List α) = [[]]


lemma IsRatCondKernelCDFAux.iInf_rat_gt_eq (hf : IsRatCondKernelCDFAux f κ ν) [IsFiniteKernel κ]
    [IsFiniteKernel ν] (a : α) :
    ∀ᵐ t ∂(ν a), ∀ q : ℚ, ⨅ r : Ioi q, f (a, t) r = f (a, t) q

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

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDFAux f κ ν)

∀ᵐ (t : β) ∂ν a, ∀ (q : ℚ), ⨅ r, f (a, t) ↑r = f (a, t) q


theorem map_add_eq_of_lt_left {x y : R} (h : v x < v y) :
    v (x + y) = v x

{R : Type u_3}
{Γ₀ : Type u_4}
[LinearOrderedAddCommGroupWithTop Γ₀]
[Ring R]
(v : AddValuation R Γ₀)
{x y : R}
(h : v x < v y)


theorem memℒp_zero (f : α →ₛ E) (μ : Measure α) : Memℒp f 0 μ

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
(f : MeasureTheory.SimpleFunc α E)
(μ : MeasureTheory.Measure α)


@[to_additive]
theorem lintegral_lintegral_mul_inv [IsMulLeftInvariant ν] (f : G → G → ℝ≥0∞)
    (hf : AEMeasurable (uncurry f) (μ.prod ν)) :
    (∫⁻ x, ∫⁻ y, f (y * x) x⁻¹ ∂ν ∂μ) = ∫⁻ x, ∫⁻ y, f x y ∂ν ∂μ

(hf : AEMeasurable (Function.uncurry f) (μ.prod ν))

∫⁻ (x : G), ∫⁻ (y : G), f (y * x) x⁻¹ ∂ν ∂μ = ∫⁻ (x : G), ∫⁻ (y : G), f x y ∂ν ∂μ


@[simp]
theorem duplicate_cons_self_iff : x ∈+ x :: l ↔ x ∈ l


theorem zeroLocus_anti_mono {I J : Ideal (MvPolynomial σ k)} (h : I ≤ J) :
    zeroLocus J ≤ zeroLocus I

{k : Type u_1}
[Field k]
{σ : Type u_2}
{I J : Ideal (MvPolynomial σ k)}
(h : I ≤ J)

MvPolynomial.zeroLocus J ≤ MvPolynomial.zeroLocus I


/-- Alternative constructor for `IsColimit`,
providing a morphism of cocones rather than a morphism between the cocone points
and separately the factorisation condition.
-/
@[simps]
def mkCoconeMorphism {t : Cocone F} (desc : ∀ s : Cocone F, t ⟶ s)
    (uniq' : ∀ (s : Cocone F) (m : t ⟶ s), m = desc s) : IsColimit t

(desc : (s : CategoryTheory.Limits.Cocone F) → t ⟶ s)

(uniq' : ∀ (s : CategoryTheory.Limits.Cocone F) (m : t ⟶ s), m = desc s)

(CategoryTheory.Limits.IsColimit.mkCoconeMorphism desc uniq').desc s = (desc s).hom


protected theorem Dom.bind {o : Part α} (h : o.Dom) (f : α → Part β) : o.bind f = f (o.get h)

{α : Type u_1}
{β : Type u_2}
{o : Part α}
(h : o.Dom)
(f : α → Part β)


theorem tails_reverse (l : List α) : tails (reverse l) = reverse (map reverse l.inits)

l.reverse.tails = (List.map List.reverse l.inits).reverse


@[field_simps]
theorem sub_div' (a b c : K) (hc : c ≠ 0) : b - a / c = (b * c - a) / c

{K : Type u_3}
[Field K]
(a b c : K)
(hc : c ≠ 0)


theorem exists_forall_mem_of_hasBasis_mem_blimsup {l : Filter β} {b : ι → Set β} {q : ι → Prop}
    (hl : l.HasBasis q b) {u : β → Set α} {p : β → Prop} {x : α} (hx : x ∈ blimsup u l p) :
    ∃ f : { i | q i } → β, ∀ i, x ∈ u (f i) ∧ p (f i) ∧ f i ∈ b i

{α : Type u_1}
{β : Type u_2}
{ι : Type u_4}
{l : Filter β}
{b : ι → Set β}
{q : ι → Prop}
(hl : l.HasBasis q b)
{u : β → Set α}
{p : β → Prop}
{x : α}
(hx : x ∈ Filter.blimsup u l p)

∃ f, ∀ (i : ↑{i | q i}), x ∈ u (f i) ∧ p (f i) ∧ f i ∈ b ↑i


/-- The opposite of an `R[I]` is ring equivalent to
the `AddMonoidAlgebra Rᵐᵒᵖ I` over the opposite ring, taking elements to their opposite. -/
@[simps! (config := { simpRhs := true }) apply symm_apply]
protected noncomputable def opRingEquiv [AddCommMonoid G] :
    k[G]ᵐᵒᵖ ≃+* kᵐᵒᵖ[G]

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[AddCommMonoid G]

∀ (a : G →₀ kᵐᵒᵖ), AddMonoidAlgebra.opRingEquiv.symm a = MulOpposite.op (Finsupp.mapRange MulOpposite.unop ⋯ a)


@[simp]
theorem kerLift_mk (r : R) : kerLift f (Ideal.Quotient.mk (ker f) r) = f r

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

f.kerLift ((Ideal.Quotient.mk (RingHom.ker f)) r) = f r


theorem card_Ioo : (Ioo f g).card = (∏ i ∈ f.support ∪ g.support, (Icc (f i) (g i)).card) - 2

{ι : Type u_1}
{α : Type u_2}
[PartialOrder α]
[Zero α]
[LocallyFiniteOrder α]
(f g : ι →₀ α)

(Finset.Ioo f g).card = ∏ i ∈ f.support ∪ g.support, (Finset.Icc (f i) (g i)).card - 2


/-- `f` is eventually bounded if and only if, there exists an admissible set on which it is
bounded. -/
theorem isBounded_iff : f.IsBounded r ↔ ∃ s ∈ f.sets, ∃ b, s ⊆ { x | r x b }

{α : Type u_1}
{r : α → α → Prop}
{f : Filter α}

Filter.IsBounded r f ↔ ∃ s ∈ f.sets, ∃ b, s ⊆ {x | r x b}


protected theorem injective (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) : Injective (s.restrict f)

(hc : Subsingleton E ∨ c < ‖↑f'.symm‖₊⁻¹)


theorem pow_le_one : ∀ n : ℕ, 0 ≤ a → a ≤ 1 → a ^ n ≤ 1

{R : Type u_3}
[OrderedSemiring R]
{a : R}
(n : ℕ)


theorem _root_.Finset.sum_single_ite [Fintype n] (a : R) (i : n) :
    (∑ x : n, Finsupp.single x (if i = x then a else 0)) = Finsupp.single i a

{R : Type u_1}
{n : Type u_3}
[DecidableEq n]
[Semiring R]
[Fintype n]
(a : R)
(i : n)

∑ x : n, Finsupp.single x (if i = x then a else 0) = Finsupp.single i a


@[to_additive sum_antidiagonal_choose_succ_nsmul]
theorem prod_antidiagonal_pow_choose_succ {M : Type*} [CommMonoid M] (f : ℕ → ℕ → M) (n : ℕ) :
    (∏ ij ∈ antidiagonal (n + 1), f ij.1 ij.2 ^ (n + 1).choose ij.1) =
      (∏ ij ∈ antidiagonal n, f ij.1 (ij.2 + 1) ^ n.choose ij.1) *
        ∏ ij ∈ antidiagonal n, f (ij.1 + 1) ij.2 ^ n.choose ij.2

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

∏ ij ∈ Finset.antidiagonal (n + 1), f ij.1 ij.2 ^ (n + 1).choose ij.1 =
  (∏ ij ∈ Finset.antidiagonal n, f ij.1 (ij.2 + 1) ^ n.choose ij.1) *
    ∏ ij ∈ Finset.antidiagonal n, f (ij.1 + 1) ij.2 ^ n.choose ij.2


protected lemma forall_congr (h : ∀ a, p a ↔ q (e a)) : (∀ a, p a) ↔ ∀ b, q b

{α : Sort u}
{β : Sort v}
{p : α → Prop}
{q : β → Prop}
(e : α ≃ β)
(h : ∀ (a : α), p a ↔ q (e a))


/-- Construct a multicofork using a collection `π` of morphisms. -/
@[simps]
def ofπ (I : MultispanIndex.{w} C) (P : C) (π : ∀ b, I.right b ⟶ P)
    (w : ∀ a, I.fst a ≫ π (I.fstFrom a) = I.snd a ≫ π (I.sndFrom a)) : Multicofork I

(I : CategoryTheory.Limits.MultispanIndex C)

(w :
  ∀ (a : I.L),
    CategoryTheory.CategoryStruct.comp (I.fst a) (π (I.fstFrom a)) =
      CategoryTheory.CategoryStruct.comp (I.snd a) (π (I.sndFrom a)))

(CategoryTheory.Limits.Multicofork.ofπ I P π w).pt = P


theorem norm_def : ‖f‖ = sInf { c | 0 ≤ c ∧ ∀ x, ‖f x‖ ≤ c * ‖x‖ }

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

‖f‖ = sInf {c | 0 ≤ c ∧ ∀ (x : V₁), ‖f x‖ ≤ c * ‖x‖}


theorem ConcaveOn.subset {t : Set E} (hf : ConcaveOn 𝕜 t f) (hst : s ⊆ t) (hs : Convex 𝕜 s) :
    ConcaveOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[SMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Set E}
(hf : ConcaveOn 𝕜 t f)
(hst : s ⊆ t)
(hs : Convex 𝕜 s)


@[to_additive]
theorem tprod_inv : ∏' b, (f b)⁻¹ = (∏' b, f b)⁻¹

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f : β → α}
[T2Space α]


/-- Special case of the sandwich lemma; see `tendsto_of_tendsto_of_tendsto_of_le_of_le'` for the
general case. -/
lemma squeeze_zero' {α} {f g : α → ℝ} {t₀ : Filter α} (hf : ∀ᶠ t in t₀, 0 ≤ f t)
    (hft : ∀ᶠ t in t₀, f t ≤ g t) (g0 : Tendsto g t₀ (𝓝 0)) : Tendsto f t₀ (𝓝 0)

{α : Type u_3}
{f g : α → ℝ}
{t₀ : Filter α}
(hf : ∀ᶠ (t : α) in t₀, 0 ≤ f t)
(hft : ∀ᶠ (t : α) in t₀, f t ≤ g t)
(g0 : Filter.Tendsto g t₀ (𝓝 0))


/-- A measure `μ` is called a probability measure if `μ univ = 1`. -/
class IsProbabilityMeasure (μ : Measure α) : Prop where
  measure_univ : μ univ = 1

[self : MeasureTheory.IsProbabilityMeasure μ]


theorem finite_prod : (s ×ˢ t).Finite ↔ (s.Finite ∨ t = ∅) ∧ (t.Finite ∨ s = ∅)

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}


/-- Euler's limit formula for the complex Gamma function. -/
theorem GammaSeq_tendsto_Gamma (s : ℂ) : Tendsto (GammaSeq s) atTop (𝓝 <| Gamma s)

Filter.Tendsto s.GammaSeq Filter.atTop (𝓝 (Complex.Gamma s))


@[simp]
theorem cancel_right (hf : Surjective f) : g₁.comp f = g₂.comp f ↔ g₁ = g₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CoheytingAlgebra α]
[CoheytingAlgebra β]
[CoheytingAlgebra γ]
{f : CoheytingHom α β}
{g₁ g₂ : CoheytingHom β γ}
(hf : Function.Surjective ⇑f)


/-- Permuting the columns changes the sign of the determinant. -/
theorem det_permute (σ : Perm n) (M : Matrix n n R) :
    (M.submatrix σ id).det = Perm.sign σ * M.det

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(σ : Equiv.Perm n)
(M : Matrix n n R)

(M.submatrix (⇑σ) id).det = ↑↑(Equiv.Perm.sign σ) * M.det


@[simp]
theorem Ico_sub_Ico_right (a b c : α) : Ico a b - Ico c b = Ico a (min b c)

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

Multiset.Ico a b - Multiset.Ico c b = Multiset.Ico a (min b c)


/-- For any circle integrable function `f`, the power series `cauchyPowerSeries f c R`, `R > 0`,
converges to the Cauchy integral `(2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z` on the open
disc `Metric.ball c R`. -/
theorem hasSum_cauchyPowerSeries_integral {f : ℂ → E} {c : ℂ} {R : ℝ} {w : ℂ}
    (hf : CircleIntegrable f c R) (hw : abs w < R) :
    HasSum (fun n => cauchyPowerSeries f c R n fun _ => w)
      ((2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - (c + w))⁻¹ • f z)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : ℂ → E}
{c : ℂ}
{R : ℝ}
{w : ℂ}
(hf : CircleIntegrable f c R)
(hw : Complex.abs w < R)

HasSum (fun n => (cauchyPowerSeries f c R n) fun x => w)
  ((2 * ↑π * Complex.I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - (c + w))⁻¹ • f z)


lemma toPartENat_le_iff_of_lt_aleph0 {c c' : Cardinal} (hc' : c' < ℵ₀) :
    toPartENat c ≤ toPartENat c' ↔ c ≤ c'

{c c' : Cardinal.{u_1}}
(hc' : c' < Cardinal.aleph0)

Cardinal.toPartENat c ≤ Cardinal.toPartENat c' ↔ c ≤ c'


@[simp] protected theorem one_mul (a : Rat) : 1 * a = a


@[simp]
theorem adjMatrix_mulVec_apply [NonAssocSemiring α] (v : V) (vec : V → α) :
    (G.adjMatrix α *ᵥ vec) v = ∑ u ∈ G.neighborFinset v, vec u

{V : Type u_1}
{α : Type u_2}
(G : SimpleGraph V)
[DecidableRel G.Adj]
[Fintype V]
[NonAssocSemiring α]
(v : V)
(vec : V → α)

(SimpleGraph.adjMatrix α G *ᵥ vec) v = ∑ u ∈ G.neighborFinset v, vec u


/-- Entourages are neighborhoods of the diagonal. -/
theorem iSup_nhds_le_uniformity : ⨆ x : α, 𝓝 (x, x) ≤ 𝓤 α


@[simp]
theorem incl_coe : (I.incl.toLinearMap : I →ₗ[R] L) = (I : Submodule R L).subtype

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(I : LieIdeal R L)

↑I.incl = (lieIdealSubalgebra R L I).subtype


/-- A class for unbundled homs used to define a category. `hom` must
take two types `α`, `β` and instances of the corresponding structures,
and return a predicate on `α → β`. -/
class UnbundledHom {c : Type u → Type u} (hom : ∀ ⦃α β⦄, c α → c β → (α → β) → Prop) : Prop where
  hom_id : ∀ {α} (ia : c α), hom ia ia id
  hom_comp : ∀ {α β γ} {Iα : c α} {Iβ : c β} {Iγ : c γ} {g : β → γ} {f : α → β} (_ : hom Iβ Iγ g)
      (_ : hom Iα Iβ f), hom Iα Iγ (g ∘ f)

{hom : ⦃α β : Type u⦄ → c α → c β → (α → β) → Prop}

[self : CategoryTheory.UnbundledHom hom]


theorem UpperSemicontinuousAt.upperSemicontinuousWithinAt (s : Set α)
    (h : UpperSemicontinuousAt f x) : UpperSemicontinuousWithinAt f s x

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


theorem lor_assoc (n m k : ℕ) : (n ||| m) ||| k = n ||| (m ||| k)


theorem pdf_of_not_aemeasurable {_ : MeasurableSpace Ω} {ℙ : Measure Ω} {μ : Measure E}
    {X : Ω → E} (hX : ¬AEMeasurable X ℙ) : pdf X ℙ μ =ᵐ[μ] 0

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]

∀ {x : MeasurableSpace Ω} {ℙ : MeasureTheory.Measure Ω} {μ : MeasureTheory.Measure E} {X : Ω → E},
  ¬AEMeasurable X ℙ → MeasureTheory.pdf X ℙ μ =ᵐ[μ] 0


theorem ihom_coev_app (F G : D ⥤ C) : (ihom.coev F).app G = (closedUnit F).app G

{D : Type u_1}
{C : Type u_2}
[CategoryTheory.Groupoid D]
[CategoryTheory.Category.{u_4, u_2} C]
[CategoryTheory.MonoidalCategory C]
[CategoryTheory.MonoidalClosed C]
(F G : D ⥤ C)

(CategoryTheory.ihom.coev F).app G = F.closedUnit.app G


/-- Given linear maps `f : M → P`, `g : N → Q`, if we identify `M ⊗ N` with `N ⊗ M` and `P ⊗ Q`
with `Q ⊗ P`, then this lemma states that `f ⊗ g = g ⊗ f`. -/
lemma map_comp_comm_eq (f : M →ₗ[R] P) (g : N →ₗ[R] Q) :
    map f g ∘ₗ TensorProduct.comm R N M = TensorProduct.comm R Q P ∘ₗ map g f

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

TensorProduct.map f g ∘ₗ ↑(TensorProduct.comm R N M) = ↑(TensorProduct.comm R Q P) ∘ₗ TensorProduct.map g f


theorem differentiableOn_arcsin : DifferentiableOn ℝ arcsin {-1, 1}ᶜ


@[continuity]
theorem continuous_sup [Sup L] [ContinuousSup L] : Continuous fun p : L × L => p.1 ⊔ p.2

{L : Type u_1}
[TopologicalSpace L]
[Sup L]
[ContinuousSup L]


lemma coe_mul_eq_bind {a : α} (ha : a ≠ 0) : ∀ b, (a * b : WithTop α) = b.bind fun b ↦ ↑(a * b)

{α : Type u_1}
[DecidableEq α]
[MulZeroClass α]
{a : α}
(ha : a ≠ 0)
(b : WithTop α)

↑a * b = Option.bind b fun b => some (a * b)


theorem exists_mem_cons {p : α → Prop} {a : α} {l : List α} :
    (∃ x, ∃ _ : x ∈ a :: l, p x) ↔ p a ∨ ∃ x, ∃ _ : x ∈ l, p x

{α : Type u_1}
{p : α → Prop}
{a : α}
{l : List α}


theorem mk_iUnion_le_sum_mk {α ι : Type u} {f : ι → Set α} : #(⋃ i, f i) ≤ sum fun i => #(f i)

Cardinal.mk ↑(⋃ i, f i) ≤ Cardinal.sum fun i => Cardinal.mk ↑(f i)


theorem ConvexOn.le_left_of_right_le'' (hf : ConvexOn 𝕜 s f) (hx : x ∈ s) (hz : z ∈ s) (hxy : x ≤ y)
    (hyz : y < z) (h : f z ≤ f y) : f y ≤ f x

{𝕜 : Type u_1}
{β : Type u_5}
[LinearOrderedField 𝕜]
[LinearOrderedCancelAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{x y z : 𝕜}
{s : Set 𝕜}
{f : 𝕜 → β}
(hf : ConvexOn 𝕜 s f)
(hx : x ∈ s)
(hz : z ∈ s)
(hxy : x ≤ y)
(hyz : y < z)
(h : f z ≤ f y)


lemma map_prodMkLeft (γ : Type*) [MeasurableSpace γ] (κ : Kernel α β)
    {f : β → δ} (hf : Measurable f) :
    map (prodMkLeft γ κ) f hf = prodMkLeft γ (map κ f hf)

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{δ : Type u_4}
{mδ : MeasurableSpace δ}
(γ : Type u_6)
[MeasurableSpace γ]
(κ : ProbabilityTheory.Kernel α β)
{f : β → δ}
(hf : Measurable f)

(ProbabilityTheory.Kernel.prodMkLeft γ κ).map f hf = ProbabilityTheory.Kernel.prodMkLeft γ (κ.map f hf)


/-- `lift.{max u v, u}` equals `lift.{v, u}`. -/
-- @[simp] -- Porting note: simp lemma never applies, tested
theorem lift_umax : lift.{max u v, u} = lift.{v, u}

Ordinal.lift.{max u v, u} = Ordinal.lift.{v, u}


@[ext] theorem ext {f g : Equiv α β} (H : ∀ x, f x = g x) : f = g

{α : Sort u}
{β : Sort v}
{f g : α ≃ β}
(H : ∀ (x : α), f x = g x)


theorem nhds_left_sup_nhds_right' (a : α) : 𝓝[≤] a ⊔ 𝓝[>] a = 𝓝 a

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


theorem not_nat_primrec_ack_self : ¬Nat.Primrec fun n => ack n n


/-- Equality of maps out of an adic completion can be checked on Cauchy sequences. -/
theorem map_ext {f g : AdicCompletion I M → N}
    (h : ∀ (a : AdicCauchySequence I M),
      f (AdicCompletion.mk I M a) = g (AdicCompletion.mk I M a)) :
    f = g

(h : ∀ (a : AdicCompletion.AdicCauchySequence I M), f ((AdicCompletion.mk I M) a) = g ((AdicCompletion.mk I M) a))


theorem parallel_iff_direction_eq_and_eq_bot_iff_eq_bot {s₁ s₂ : AffineSubspace k P} :
    s₁ ∥ s₂ ↔ s₁.direction = s₂.direction ∧ (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₁ s₂ : AffineSubspace k P}


@[to_additive]
lemma comp_def {X Y Z : CommGrp} {f : X ⟶ Y} {g : Y ⟶ Z} : f ≫ g = g.comp f


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


@[simp]
theorem associator_inv_apply {M N K : ModuleCat.{u} R} (m : M) (n : N) (k : K) :
    ((α_ M N K).inv : M ⊗ N ⊗ K ⟶ (M ⊗ N) ⊗ K) (m ⊗ₜ (n ⊗ₜ k)) = m ⊗ₜ n ⊗ₜ k

{R : Type u}
[CommRing R]
{M N K : ModuleCat R}
(m : ↑M)
(n : ↑N)
(k : ↑K)

(CategoryTheory.MonoidalCategory.associator M N K).inv (m ⊗ₜ[R] n ⊗ₜ[R] k) = (m ⊗ₜ[R] n) ⊗ₜ[R] k


theorem Nontrivial.exists_ne (hs : s.Nontrivial) (z) : ∃ x ∈ s, x ≠ z

{α : Type u}
{s : Set α}
(hs : s.Nontrivial)
(z : α)


@[local simp]
private theorem zero_lt_pow (n : Nat) : 0 < 2^n


theorem nonempty_iff_ne_empty {s : Finset α} : s.Nonempty ↔ s ≠ ∅


private lemma span_range_relation_eq_ker_localizationAway :
    Ideal.span { C r * X () - 1 } =
      RingHom.ker (aeval (S₁ := S) (Generators.localizationAway r).val)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(r : R)
[IsLocalization.Away r S]

Ideal.span {MvPolynomial.C r * MvPolynomial.X () - 1} =
  RingHom.ker (MvPolynomial.aeval (Algebra.Generators.localizationAway r).val)


theorem IsMittagLeffler.toPreimages (h : F.IsMittagLeffler) : (F.toPreimages s).IsMittagLeffler

{J : Type u}
[CategoryTheory.Category.{u_1, u} J]
(F : J ⥤ Type v)
{i : J}
(s : Set (F.obj i))
[CategoryTheory.IsCofilteredOrEmpty J]
(h : F.IsMittagLeffler)


theorem st_le_of_le {x y : ℝ*} (hix : ¬Infinite x) (hiy : ¬Infinite y) : x ≤ y → st x ≤ st y

{x y : ℝ*}
(hix : ¬x.Infinite)
(hiy : ¬y.Infinite)


@[to_additive]
lemma preimage_image_coe (s : Set G) : ((↑) : G → Q) ⁻¹' ((↑) '' s) = N * s

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

QuotientAddGroup.mk ⁻¹' (QuotientAddGroup.mk '' s) = ↑N + s


theorem lt_nfpBFamily {a b} :
    a < nfpBFamily.{u, v} o f b ↔ ∃ l, a < List.foldr (familyOfBFamily o f) b l

{f : (b : Ordinal.{u}) → b < o → Ordinal.{max u v} → Ordinal.{max u v}}

a < o.nfpBFamily f b ↔ ∃ l, a < List.foldr (o.familyOfBFamily f) b l


/-- If a sequence `f` with non-negative terms is dominated by a sequence `g` with summable
series and at least one term of `f` is strictly smaller than the corresponding term in `g`,
then the series of `f` is strictly smaller than the series of `g`. -/
theorem tsum_lt_tsum_of_nonneg {i : ℕ} {f g : ℕ → ℝ} (h0 : ∀ b : ℕ, 0 ≤ f b)
    (h : ∀ b : ℕ, f b ≤ g b) (hi : f i < g i) (hg : Summable g) : ∑' n, f n < ∑' n, g n

{i : ℕ}
{f g : ℕ → ℝ}
(h0 : ∀ (b : ℕ), 0 ≤ f b)
(h : ∀ (b : ℕ), f b ≤ g b)
(hi : f i < g i)
(hg : Summable g)


theorem isPiSystem_Ioo_rat :
    IsPiSystem (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) (b : ℝ)})

IsPiSystem (⋃ a, ⋃ b, ⋃ (_ : a < b), {Set.Ioo ↑a ↑b})


@[simp, norm_cast] lemma coe_sup (s t : CompactOpens α) : ↑(s ⊔ t) = (s ∪ t : Set α)

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


/-- A continuous map of affine spaces. -/
structure ContinuousAffineMap (R : Type*) {V W : Type*} (P Q : Type*) [Ring R] [AddCommGroup V]
  [Module R V] [TopologicalSpace P] [AddTorsor V P] [AddCommGroup W] [Module R W]
  [TopologicalSpace Q] [AddTorsor W Q] extends P →ᵃ[R] Q where
  cont : Continuous toFun

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
{Q : Type u_5}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
[TopologicalSpace Q]
[AddTorsor W Q]
(self : P →ᴬ[R] Q)


lemma surjectiveOnStalks_of_isLocalization [IsLocalization M S] :
    SurjectiveOnStalks (algebraMap R S)

{R : Type u_1}
[CommRing R]
(M : Submonoid R)
(S : Type u_2)
[CommRing S]
[Algebra R S]
[IsLocalization M S]


theorem τ_symm_apply_fromCoset : Equiv.symm τ (fromCoset ⟨f.range, 1, one_leftCoset _⟩) = ∞

(Equiv.symm (Grp.SurjectiveOfEpiAuxs.tau f))
    (Grp.SurjectiveOfEpiAuxs.XWithInfinity.fromCoset ⟨↑(MonoidHom.range f), ⋯⟩) =
  Grp.SurjectiveOfEpiAuxs.XWithInfinity.infinity


@[to_additive (attr := simp)] lemma unop_toSubmonoid (H : Subgroup Gᵐᵒᵖ) :
    H.unop.toSubmonoid = H.toSubmonoid.unop

{G : Type u_2}
[AddGroup G]
(H : AddSubgroup Gᵃᵒᵖ)


theorem toFinsupp_cons_eq_single_add_embDomain {R : Type*} [AddZeroClass R] (x : R) (xs : List R)
    [DecidablePred (getD (x::xs) · 0 ≠ 0)] [DecidablePred (getD xs · 0 ≠ 0)] :
    toFinsupp (x::xs) =
      Finsupp.single 0 x + (toFinsupp xs).embDomain ⟨Nat.succ, Nat.succ_injective⟩

[DecidablePred fun x_1 => (x :: xs).getD x_1 0 ≠ 0]

[DecidablePred fun x => xs.getD x 0 ≠ 0]

(x :: xs).toFinsupp =
  Finsupp.single 0 x + Finsupp.embDomain { toFun := Nat.succ, inj' := Nat.succ_injective } xs.toFinsupp


/-- An n-ary version of `Set.mul_mem_mul`. -/
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
    (hg : ∀ i ∈ t, g i ∈ f i) : (t.map g).prod ∈ (t.map f).prod

{ι : Type u_1}
{α : Type u_2}
[CommMonoid α]
(t : Multiset ι)
(f : ι → Set α)
(g : ι → α)
(hg : ∀ i ∈ t, g i ∈ f i)

(Multiset.map g t).prod ∈ (Multiset.map f t).prod


lemma succAbove_castSucc_of_le (p i : Fin n) (h : p ≤ i) : succAbove p.castSucc i = i.succ


@[simp] theorem forM_cons [Monad m] (f : α → m PUnit) (a : α) (as : List α) : forM (a::as) f = f a >>= fun _ => forM as f

{m : Type u_1 → Type u_2}
{α : Type u_3}
[Monad m]
(f : α → m PUnit)
(a : α)
(as : List α)


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

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

ContDiff 𝕜 (↑(n + k)) f₂ → ContDiff 𝕜 (↑n) (deriv^[k] f₂)


/-- In a (weakly) locally compact R₁ space, each point admits a compact closed neighborhood. -/
theorem exists_mem_nhds_isCompact_isClosed (x : X) : ∃ K ∈ 𝓝 x, IsCompact K ∧ IsClosed K

{X : Type u_1}
[TopologicalSpace X]
[R1Space X]
[WeaklyLocallyCompactSpace X]
(x : X)


theorem IsSeparable.image {β : Type*} [TopologicalSpace β] {s : Set α} (hs : IsSeparable s)
    {f : α → β} (hf : Continuous f) : IsSeparable (f '' s)

{α : Type u}
[t : TopologicalSpace α]
{β : Type u_2}
[TopologicalSpace β]
{s : Set α}
(hs : TopologicalSpace.IsSeparable s)
{f : α → β}
(hf : Continuous f)


/-- The tangent of an angle in a right-angled triangle multiplied by the adjacent side equals
the opposite side. -/
theorem tan_oangle_add_left_mul_norm_of_oangle_eq_pi_div_two {x y : V}
    (h : o.oangle x y = ↑(π / 2)) : Real.Angle.tan (o.oangle (x + y) y) * ‖y‖ = ‖x‖

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


@[simp]
lemma coe_dual_one :
    (dual A K (1 : FractionalIdeal B⁰ L) : Submodule B L) = 1ᵛ

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

↑(FractionalIdeal.dual A K 1) = Submodule.traceDual A K 1


@[simp]
theorem dualEquivDual_apply (φ : Module.Dual K W) :
    W.dualEquivDual φ = ⟨W.dualLift φ, mem_range.2 ⟨φ, rfl⟩⟩

{K : Type u}
{V : Type v}
[Field K]
[AddCommGroup V]
[Module K V]
{W : Subspace K V}
(φ : Module.Dual K ↥W)


@[simp]
theorem sign_refl : sign (Equiv.refl α) = 1

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


@[simp]
theorem cliqueFreeOn_singleton : G.CliqueFreeOn {a} n ↔ 1 < n

{α : Type u_1}
(G : SimpleGraph α)
{a : α}
{n : ℕ}


theorem restrictTotalDegree_le_restrictDegree (m : ℕ) :
    restrictTotalDegree σ R m ≤ restrictDegree σ R m

(σ : Type u)
(R : Type v)
[CommSemiring R]
(m : ℕ)

MvPolynomial.restrictTotalDegree σ R m ≤ MvPolynomial.restrictDegree σ R m


/-- A morphism between two commutative squares consists of 4 morphisms
which extend these two squares into a commuting cube. -/
@[ext]
structure Hom (sq₁ sq₂ : Square C) where
  /-- the top-left morphism -/
  τ₁ : sq₁.X₁ ⟶ sq₂.X₁
  /-- the top-right morphism -/
  τ₂ : sq₁.X₂ ⟶ sq₂.X₂
  /-- the bottom-left morphism -/
  τ₃ : sq₁.X₃ ⟶ sq₂.X₃
  /-- the bottom-right morphism -/
  τ₄ : sq₁.X₄ ⟶ sq₂.X₄
  comm₁₂ : sq₁.f₁₂ ≫ τ₂ = τ₁ ≫ sq₂.f₁₂ := by aesop_cat
  comm₁₃ : sq₁.f₁₃ ≫ τ₃ = τ₁ ≫ sq₂.f₁₃ := by aesop_cat
  comm₂₄ : sq₁.f₂₄ ≫ τ₄ = τ₂ ≫ sq₂.f₂₄ := by aesop_cat
  comm₃₄ : sq₁.f₃₄ ≫ τ₄ = τ₃ ≫ sq₂.f₃₄ := by aesop_cat

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{sq₁ sq₂ : CategoryTheory.Square C}
(self : sq₁.Hom sq₂)

CategoryTheory.CategoryStruct.comp sq₁.f₃₄ self.τ₄ = CategoryTheory.CategoryStruct.comp self.τ₃ sq₂.f₃₄


theorem succ_ascFactorial (n : ℕ) :
    ∀ k, n * n.succ.ascFactorial k = (n + k) * n.ascFactorial k


/-- Two finite Borel measures are equal if the integrals of all bounded continuous functions with
respect to both agree. -/
theorem ext_of_forall_lintegral_eq_of_IsFiniteMeasure {Ω : Type*}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [BorelSpace Ω] {μ ν : Measure Ω} [IsFiniteMeasure μ]
    (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) :
    μ = ν

(h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ (x : Ω), ↑(f x) ∂μ = ∫⁻ (x : Ω), ↑(f x) ∂ν)


theorem hasFDerivAt_of_tendstoLocallyUniformlyOn [NeBot l] {s : Set E} (hs : IsOpen s)
    (hf' : TendstoLocallyUniformlyOn f' g' l s) (hf : ∀ n, ∀ x ∈ s, HasFDerivAt (f n) (f' n x) x)
    (hfg : ∀ x ∈ s, Tendsto (fun n => f n x) l (𝓝 (g x))) (hx : x ∈ s) :
    HasFDerivAt g (g' x) x

(hf : ∀ (n : ι), ∀ x ∈ s, HasFDerivAt (f n) (f' n x) x)

(hfg : ∀ x ∈ s, Filter.Tendsto (fun n => f n x) l (𝓝 (g x)))


/-- The order of the product of two formal power series
 is at least the sum of their orders. -/
theorem order_mul_ge (φ ψ : R⟦X⟧) : order φ + order ψ ≤ order (φ * ψ)

{R : Type u_1}
[Semiring R]
(φ ψ : PowerSeries R)


@[to_additive]
theorem le_iff_exists_mul : a ≤ b ↔ ∃ c, b = a * c

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a b : α}


@[simp]
theorem DirectSum.coeAlgHom_of [AddMonoid ι] [CommSemiring S] [Semiring R] [Algebra S R]
    (A : ι → Submodule S R) [SetLike.GradedMonoid A] (i : ι) (x : A i) :
    DirectSum.coeAlgHom A (DirectSum.of (fun i => A i) i x) = x

{ι : Type u_1}
{S : Type u_3}
{R : Type u_4}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring S]
[Semiring R]
[Algebra S R]
(A : ι → Submodule S R)
[SetLike.GradedMonoid A]
(i : ι)
(x : ↥(A i))

(DirectSum.coeAlgHom A) ((DirectSum.of (fun i => ↥(A i)) i) x) = ↑x


theorem isLindelof_diagonal [LindelofSpace X] : IsLindelof (diagonal X)

{X : Type u}
[TopologicalSpace X]
[LindelofSpace X]


theorem isClosed_ker [T1Space M₂] [FunLike F M₁ M₂] [ContinuousSemilinearMapClass F σ₁₂ M₁ M₂]
    (f : F) :
    IsClosed (ker f : Set M₁)


theorem pow_padicValNat_dvd {n : ℕ} : p ^ padicValNat p n ∣ n


@[simp]
theorem roots_X_sub_C (r : R) : roots (X - C r) = {r}

{R : Type u}
[CommRing R]
[IsDomain R]
(r : R)

(Polynomial.X - Polynomial.C r).roots = {r}


@[simp]
theorem op_top : (⊤ : Subalgebra R A).op = ⊤

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]


theorem eq_pell_lem : ∀ (n) (b : ℤ√(d a1)), 1 ≤ b → IsPell b →
    b ≤ pellZd a1 n → ∃ n, b = pellZd a1 n

1 ≤ b → Pell.IsPell b → b ≤ Pell.pellZd a1 n → ∃ n, b = Pell.pellZd a1 n


theorem algebraicIndependent_iff :
    AlgebraicIndependent R x ↔
      ∀ p : MvPolynomial ι R, MvPolynomial.aeval (x : ι → A) p = 0 → p = 0

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]

AlgebraicIndependent R x ↔ ∀ (p : MvPolynomial ι R), (MvPolynomial.aeval x) p = 0 → p = 0


@[to_additive]
theorem mul_injective_of_disjoint {H₁ H₂ : Subgroup G} (h : Disjoint H₁ H₂) :
    Function.Injective (fun g => g.1 * g.2 : H₁ × H₂ → G)

{G : Type u_1}
[AddGroup G]
{H₁ H₂ : AddSubgroup G}
(h : Disjoint H₁ H₂)


theorem Embedding.age_subset_age (MN : M ↪[L] N) : L.age M ⊆ L.age N

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{N : Type w}
[L.Structure N]
(MN : M ↪[L] N)


theorem lt_of_neg_of_one_div_lt_one_div (hb : b < 0) (h : 1 / a < 1 / b) : b < a

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(hb : b < 0)
(h : 1 / a < 1 / b)


theorem det_matrixToStdBasis :
    (matrixToStdBasis K).det = (2⁻¹ * I) ^ NrComplexPlaces K

(K : Type u_1)
[Field K]
[NumberField K]

(NumberField.mixedEmbedding.matrixToStdBasis K).det = (2⁻¹ * Complex.I) ^ NumberField.InfinitePlace.NrComplexPlaces K


theorem fst_sSup [SupSet α] [SupSet β] (s : Set (α × β)) : (sSup s).fst = sSup (Prod.fst '' s)

{α : Type u_1}
{β : Type u_2}
[SupSet α]
[SupSet β]
(s : Set (α × β))


@[simp]
protected theorem map_neg {F : Type*} [Ring β] [FunLike F α β] [RingHomClass F α β]
    (f : F) (u : αˣ) : map (f : α →* β) (-u) = -map (f : α →* β) u

{α : Type u}
{β : Type v}
[Ring α]
{F : Type u_1}
[Ring β]
[FunLike F α β]
[RingHomClass F α β]
(f : F)
(u : αˣ)


{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(r : ℚ)


@[to_additive]
theorem subset_union {H K L : S} : (H : Set G) ⊆ K ∪ L ↔ H ≤ K ∨ H ≤ L

{G : Type u_1}
[AddGroup G]
{S : Type u_6}
[SetLike S G]
[AddSubgroupClass S G]
{H K L : S}

↑H ⊆ ↑K ∪ ↑L ↔ H ≤ K ∨ H ≤ L


/-- A restatement of `Types.Limit.map_π_apply` that uses `Pi.π` and `Pi.map`. -/
@[simp 1001]
theorem pi_map_π_apply {β : Type v} [Small.{u} β] {f g : β → Type u}
    (α : ∀ j, f j ⟶ g j) (b : β) (x) :
    (Pi.π g b : ∏ᶜ g → g b) (Pi.map α x) = α b ((Pi.π f b : ∏ᶜ f → f b) x)

{β : Type v}
[Small.{u, v} β]
{f g : β → Type u}
(α : (j : β) → f j ⟶ g j)
(b : β)
(x : ∏ᶜ f)

CategoryTheory.Limits.Pi.π g b (CategoryTheory.Limits.Pi.map α x) = α b (CategoryTheory.Limits.Pi.π f b x)


/--
The `Fin.castSucc_ne_zero_iff` in `Lean` only applies in `Fin (n+1)`.
This one instead uses a `NeZero n` typeclass hypothesis.
-/
theorem castSucc_ne_zero_iff' [NeZero n] (a : Fin n) : castSucc a ≠ 0 ↔ a ≠ 0


/-- If `K / E / F` is a ring extension tower, `L` is a subalgebra of `K / F`,
then `[E[L] : E] ≤ [L : F]`. -/
lemma Subalgebra.adjoin_rank_le {F : Type*} (E : Type*) {K : Type*}
    [CommRing F] [StrongRankCondition F] [CommRing E] [StrongRankCondition E] [Ring K]
    [SMul F E] [Algebra E K] [Algebra F K] [IsScalarTower F E K]
    (L : Subalgebra F K) [Module.Free F L] :
    Module.rank E (Algebra.adjoin E (L : Set K)) ≤ Module.rank F L

{F : Type u_5}
(E : Type u_6)
{K : Type u_7}
[CommRing F]
[StrongRankCondition F]
[CommRing E]
[StrongRankCondition E]
[Ring K]
[SMul F E]
[Algebra E K]
[Algebra F K]
[IsScalarTower F E K]
(L : Subalgebra F K)
[Module.Free F ↥L]

Module.rank E ↥(Algebra.adjoin E ↑L) ≤ Module.rank F ↥L


@[simp] theorem get_mk {α} (f : Unit → α) : (Thunk.mk f).get = f ()


theorem convexBodyLT_convex : Convex ℝ (convexBodyLT K f)

(f : NumberField.InfinitePlace K → NNReal)

Convex ℝ (NumberField.mixedEmbedding.convexBodyLT K f)


a < UInt8.size → ↑(UInt8.ofNat a).val = a


@[simp]
theorem sSup_apply (ms : Set (OuterMeasure α)) (s : Set α) :
    (sSup ms) s = ⨆ m ∈ ms, (m : OuterMeasure α) s

(ms : Set (MeasureTheory.OuterMeasure α))


/-- The intrinsic interior of a nonempty convex set is nonempty. -/
protected theorem Set.Nonempty.intrinsicInterior (hscv : Convex ℝ s) (hsne : s.Nonempty) :
    (intrinsicInterior ℝ s).Nonempty

{V : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[FiniteDimensional ℝ V]
{s : Set V}
(hscv : Convex ℝ s)
(hsne : s.Nonempty)


theorem _root_.Function.update_exp {ι : Type*} {𝔸 : ι → Type*} [Finite ι] [DecidableEq ι]
    [∀ i, NormedRing (𝔸 i)] [∀ i, NormedAlgebra 𝕂 (𝔸 i)] [∀ i, CompleteSpace (𝔸 i)] (x : ∀ i, 𝔸 i)
    (j : ι) (xj : 𝔸 j) :
    Function.update (exp 𝕂 x) j (exp 𝕂 xj) = exp 𝕂 (Function.update x j xj)

(𝕂 : Type u_1)
[RCLike 𝕂]
{ι : Type u_4}
{𝔸 : ι → Type u_5}
[Finite ι]
[DecidableEq ι]
[(i : ι) → NormedRing (𝔸 i)]
[(i : ι) → NormedAlgebra 𝕂 (𝔸 i)]
[∀ (i : ι), CompleteSpace (𝔸 i)]
(x : (i : ι) → 𝔸 i)
(j : ι)
(xj : 𝔸 j)

Function.update (NormedSpace.exp 𝕂 x) j (NormedSpace.exp 𝕂 xj) = NormedSpace.exp 𝕂 (Function.update x j xj)


theorem Integrable.integrable_convolution (hf : Integrable f μ)
    (hg : Integrable g μ) : Integrable (f ⋆[L, μ] g) μ

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
(L : E →L[𝕜] E' →L[𝕜] F)
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[NormedSpace ℝ F]
[AddGroup G]
[MeasurableAdd₂ G]
[MeasurableNeg G]
[MeasureTheory.SFinite μ]
[μ.IsAddRightInvariant]
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g μ)

MeasureTheory.Integrable (MeasureTheory.convolution f g L μ) μ


/-- The angle between two vectors is `θ` if and only if they are nonzero and the second vector
is the first rotated by `θ` and scaled by a positive real, or `θ` and at least one of the
vectors are zero. -/
theorem oangle_eq_iff_eq_pos_smul_rotation_or_eq_zero {x y : V} (θ : Real.Angle) :
    o.oangle x y = θ ↔
      (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r : ℝ, 0 < r ∧ y = r • o.rotation θ x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)

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

o.oangle x y = θ ↔ (x ≠ 0 ∧ y ≠ 0 ∧ ∃ r, 0 < r ∧ y = r • (o.rotation θ) x) ∨ θ = 0 ∧ (x = 0 ∨ y = 0)


protected lemma Subsingleton.pairwise [Subsingleton α] : Pairwise r

{α : Type u_1}
{r : α → α → Prop}
[Subsingleton α]


/-- Eta rule for costructured arrows. -/
@[simps!]
def eta (f : CostructuredArrow S T) : f ≅ mk f.hom

(f : CategoryTheory.CostructuredArrow S T)


@[to_additive]
theorem measure_preimage_smul_null (h : μ s = 0) (c : G) : μ ((c • ·) ⁻¹' s) = 0

[MeasureTheory.SMulInvariantMeasure G α μ]


/-- `F.mapTriangle` commutes with the rotation of triangles. -/
@[simps!]
def mapTriangleRotateIso :
    F.mapTriangle ⋙ Pretriangulated.rotate D ≅
      Pretriangulated.rotate C ⋙ F.mapTriangle

(X : CategoryTheory.Pretriangulated.Triangle C)

(F.mapTriangleRotateIso.inv.app X).hom₂ = CategoryTheory.CategoryStruct.id (F.obj X.obj₃)


@[simp]
theorem keys_erase (a : α) (s : Finmap β) : (erase a s).keys = s.keys.erase a

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

(Finmap.erase a s).keys = s.keys.erase a


theorem encard_preimage_of_injective_subset_range (hf : f.Injective) (ht : t ⊆ range f) :
    (f ⁻¹' t).encard = t.encard

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


@[simp]
theorem reverse_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).reverse = p.reverse.copy hv hu

{V : Type u}
{G : SimpleGraph V}
{u v u' v' : V}
(p : G.Walk u v)
(hu : u = u')
(hv : v = v')


/-- A conditionally complete lattice is a lattice in which
every nonempty subset which is bounded above has a supremum, and
every nonempty subset which is bounded below has an infimum.
Typical examples are real numbers or natural numbers.

To differentiate the statements from the corresponding statements in (unconditional)
complete lattices, we prefix sInf and subₛ by a c everywhere. The same statements should
hold in both worlds, sometimes with additional assumptions of nonemptiness or
boundedness. -/
class ConditionallyCompleteLattice (α : Type*) extends Lattice α, SupSet α, InfSet α where
  /-- `a ≤ sSup s` for all `a ∈ s`. -/
  le_csSup : ∀ s a, BddAbove s → a ∈ s → a ≤ sSup s
  /-- `sSup s ≤ a` for all `a ∈ upperBounds s`. -/
  csSup_le : ∀ s a, Set.Nonempty s → a ∈ upperBounds s → sSup s ≤ a
  /-- `sInf s ≤ a` for all `a ∈ s`. -/
  csInf_le : ∀ s a, BddBelow s → a ∈ s → sInf s ≤ a
  /-- `a ≤ sInf s` for all `a ∈ lowerBounds s`. -/
  le_csInf : ∀ s a, Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s

{α : Type u_5}
[self : ConditionallyCompleteLattice α]
(s : Set α)
(a : α)


@[simp]
theorem sInf_toSubmonoid (s : Set (Subring R)) :
    (sInf s).toSubmonoid = ⨅ t ∈ s, t.toSubmonoid

{R : Type u}
[Ring R]
(s : Set (Subring R))


theorem cons_val_zero' (h : 0 < m.succ) (x : α) (u : Fin m → α) : vecCons x u ⟨0, h⟩ = x

{α : Type u}
{m : ℕ}
(h : 0 < m.succ)
(x : α)
(u : Fin m → α)


theorem le_gfp {a : α} (h : a ≤ f a) : a ≤ gfp f

{α : Type u}
[CompleteLattice α]
(f : α →o α)
{a : α}
(h : a ≤ f a)


@[simp]
lemma image_subtype_val_Ico_Ici {a b : α} (c : Ico a b) : Subtype.val '' Ici c = Ico c.1 b

{α : Type u_1}
[Preorder α]
{a b : α}
(c : ↑(Set.Ico a b))

Subtype.val '' Set.Ici c = Set.Ico (↑c) b


@[to_additive]
theorem smul_ae_eq_self_of_mem_zpowers (hs : (x • s : Set α) =ᵐ[μ] s)
    (hy : y ∈ Subgroup.zpowers x) : (y • s : Set α) =ᵐ[μ] s

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

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.SMulInvariantMeasure G α μ] {x_1 y : G}
  {s : Set α}, x_1 • s =ᵐ[μ] s → y ∈ Subgroup.zpowers x_1 → y • s =ᵐ[μ] s


theorem fg_ker_comp {R S A : Type*} [CommRing R] [CommRing S] [CommRing A] (f : R →+* S)
    (g : S →+* A) (hf : f.ker.FG) (hg : g.ker.FG) (hsur : Function.Surjective f) :
    (g.comp f).ker.FG

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[CommRing R]
[CommRing S]
[CommRing A]
(f : R →+* S)
(g : S →+* A)
(hf : (RingHom.ker f).FG)
(hg : (RingHom.ker g).FG)
(hsur : Function.Surjective ⇑f)


@[to_additive]
theorem nnnorm_le_mul_nnnorm_add (a b : E) : ‖a‖₊ ≤ ‖a * b‖₊ + ‖b‖₊

{E : Type u_6}
[SeminormedGroup E]
(a b : E)

‖a‖₊ ≤ ‖a * b‖₊ + ‖b‖₊


@[to_additive]
theorem exponent_pos : 0 < exponent G ↔ ExponentExists G

0 < AddMonoid.exponent G ↔ AddMonoid.ExponentExists G


@[simp]
theorem frontier_setOf_le_re (a : ℝ) : frontier { z : ℂ | a ≤ z.re } = { z | z.re = a }

frontier {z | a ≤ z.re} = {z | z.re = a}


@[simp]
private theorem pairMap_involutive : (pairMap σ).Involutive


theorem prodMap_def : prodMap f g = (f.comp (fst R S)).prod (g.comp (snd R S))

{R : Type u_3}
{R' : Type u_4}
{S : Type u_5}
{S' : Type u_6}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
[NonUnitalNonAssocSemiring R']
[NonUnitalNonAssocSemiring S']
(f : R →ₙ+* R')
(g : S →ₙ+* S')

f.prodMap g = (f.comp (NonUnitalRingHom.fst R S)).prod (g.comp (NonUnitalRingHom.snd R S))


/-- The characteristic polynomial of `fibRec` is `X² - (X + 1)`. -/
theorem fibRec_charPoly_eq {β : Type*} [CommRing β] :
    fibRec.charPoly = X ^ 2 - (X + (1 : β[X]))

fibRec.charPoly = Polynomial.X ^ 2 - (Polynomial.X + 1)


theorem nthHomSeq_one : nthHomSeq f_compat 1 ≈ 1

(f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1)


@[to_additive]
theorem inv_eq_iff_eq_inv : a⁻¹ = b ↔ a = b⁻¹

{G : Type u_3}
[InvolutiveNeg G]
{a b : G}


theorem zero_quot : (⟨Quot.mk _ 0⟩ : RingQuot r) = 0

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

{ toQuot := Quot.mk (RingQuot.Rel r) 0 } = 0


/-- Given `F : J ⥤ PresheafOfModules.{v} R`, this is the `BundledCorePresheafOfModules R` which
corresponds to the presheaf of modules which sends `X` to the colimit of `F ⋙ evaluation R X`. -/
@[simps]
noncomputable def colimitBundledCore : BundledCorePresheafOfModules R

[{X Y : Cᵒᵖ} →
    (f : X ⟶ Y) →
      CategoryTheory.Limits.PreservesColimit (F ⋙ PresheafOfModules.evaluation R Y)
        (ModuleCat.restrictScalars (R.map f))]

[∀ (X : Cᵒᵖ), CategoryTheory.Limits.HasColimit (F ⋙ PresheafOfModules.evaluation R X)]

(PresheafOfModules.colimitBundledCore F).map f =
  CategoryTheory.Limits.colimMap (CategoryTheory.whiskerLeft F (PresheafOfModules.restriction R f)) ≫
    (CategoryTheory.preservesColimitIso (ModuleCat.restrictScalars (R.map f))
        (F ⋙ PresheafOfModules.evaluation R Y)).inv


@[to_additive (attr := simp)]
theorem mker_swap : MonoidHom.mker (swap M N) = ⊥

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]

MonoidHom.mker (Monoid.Coprod.swap M N) = ⊥


theorem deriv_isNormal (f) : IsNormal (deriv f)


theorem degree_pow_le_of_le {a : WithBot ℕ} (b : ℕ) (hp : degree p ≤ a) :
    degree (p ^ b) ≤ b * a

{R : Type u}
[Semiring R]
{p : R[X]}
{a : WithBot ℕ}
(b : ℕ)
(hp : p.degree ≤ a)


/-- **Equality case of the Rearrangement Inequality**: Pointwise multiplication of `f` and `g`,
which monovary together, is unchanged by a permutation if and only if `f` and `g ∘ σ` monovary
together. Stated by permuting the entries of `g`. -/
theorem Monovary.sum_mul_comp_perm_eq_sum_mul_iff (hfg : Monovary f g) :
    ∑ i, f i * g (σ i) = ∑ i, f i * g i ↔ Monovary f (g ∘ σ)

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{σ : Equiv.Perm ι}
{f g : ι → α}
[Fintype ι]
(hfg : Monovary f g)

∑ i : ι, f i * g (σ i) = ∑ i : ι, f i * g i ↔ Monovary f (g ∘ ⇑σ)


∀ {x : NonAssocSemiring α}, 1 = RingHom.id α


@[simp]
theorem AddMonoidAlgebra.toDirectSum_toAddMonoidAlgebra (f : AddMonoidAlgebra M ι) :
    f.toDirectSum.toAddMonoidAlgebra = f

{ι : Type u_1}
{M : Type u_3}
[DecidableEq ι]
[Semiring M]
[(m : M) → Decidable (m ≠ 0)]
(f : AddMonoidAlgebra M ι)


@[simp]
theorem nodup_cons {a : α} {l : List α} : Nodup (a :: l) ↔ a ∉ l ∧ Nodup l


@[simp]
theorem integrableOn_finite_biUnion {s : Set β} (hs : s.Finite) {t : β → Set α} :
    IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, IntegrableOn f (t i) μ

{α : Type u_1}
{β : Type u_2}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{μ : MeasureTheory.Measure α}
{s : Set β}
(hs : s.Finite)
{t : β → Set α}

MeasureTheory.IntegrableOn f (⋃ i ∈ s, t i) μ ↔ ∀ i ∈ s, MeasureTheory.IntegrableOn f (t i) μ


theorem functorPullback_comp (R : Sieve ((F ⋙ G).obj X)) :
    R.functorPullback (F ⋙ G) = (R.functorPullback G).functorPullback F

(R : CategoryTheory.Sieve ((F.comp G).obj X))

CategoryTheory.Sieve.functorPullback (F.comp G) R =
  CategoryTheory.Sieve.functorPullback F (CategoryTheory.Sieve.functorPullback G R)


theorem iUnion_mono {s t : ι → Set α} (h : ∀ i, s i ⊆ t i) : ⋃ i, s i ⊆ ⋃ i, t i

{α : Type u_1}
{ι : Sort u_4}
{s t : ι → Set α}
(h : ∀ (i : ι), s i ⊆ t i)


@[simp]
theorem coe_mk_mk (f : I → X) (h₁) (h₂ : f 0 = x) (h₃ : f 1 = y) :
    ⇑(mk ⟨f, h₁⟩ h₂ h₃ : Path x y) = f

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(f : ↑I → X)
(h₁ : Continuous f)
(h₂ : f 0 = x)
(h₃ : f 1 = y)

⇑{ toFun := f, continuous_toFun := h₁, source' := h₂, target' := h₃ } = f


theorem Periodic.sub_nsmul_eq [AddGroup α] (h : Periodic f c) (n : ℕ) : f (x - n • c) = f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[AddGroup α]
(h : Function.Periodic f c)
(n : ℕ)


lemma ringChar_ne_one [Nontrivial R] : ringChar R ≠ 1

{R : Type u_1}
[NonAssocSemiring R]
[Nontrivial R]


@[simp]
theorem mulLeft_one : mulLeft R (1 : A) = LinearMap.id

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]


/-- Open elements of `𝓤 α` form a basis of `𝓤 α`. -/
theorem uniformity_hasBasis_open : HasBasis (𝓤 α) (fun V : Set (α × α) => V ∈ 𝓤 α ∧ IsOpen V) id

(𝓤 α).HasBasis (fun V => V ∈ 𝓤 α ∧ IsOpen V) id


@[simp]
theorem indexOf_cons_self (a : α) (l : List α) : indexOf a (a :: l) = 0

{α : Type u}
[DecidableEq α]
(a : α)
(l : List α)


theorem emod_ofNat_nonneg {x : Nat} {y : Int} : 0 ≤ (x : Int) % y


theorem integral_Icc_eq_integral_Ico : ∫ t in Icc x y, f t ∂μ = ∫ t in Ico x y, f t ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{μ : MeasureTheory.Measure X}
[PartialOrder X]
{x y : X}
[MeasureTheory.NoAtoms μ]

∫ (t : X) in Set.Icc x y, f t ∂μ = ∫ (t : X) in Set.Ico x y, f t ∂μ


@[simp, norm_cast]
theorem _root_.Subalgebra.coe_valA (p : Subalgebra R A) :
    (p.valA : p →ₐ[R] A) = p.subtype

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
[Algebra R A]
(p : Subalgebra R A)


theorem pi_pi_le (m : ∀ i, OuterMeasure (α i)) (s : ∀ i, Set (α i)) :
    OuterMeasure.pi m (pi univ s) ≤ ∏ i, m i (s i)

(m : (i : ι) → MeasureTheory.OuterMeasure (α i))

(MeasureTheory.OuterMeasure.pi m) (Set.univ.pi s) ≤ ∏ i : ι, (m i) (s i)


@[to_additive (attr := congr)]
theorem noncommProd_congr {s₁ s₂ : Finset α} {f g : α → β} (h₁ : s₁ = s₂)
    (h₂ : ∀ x ∈ s₂, f x = g x) (comm) :
    noncommProd s₁ f comm =
      noncommProd s₂ g fun x hx y hy h => by
        dsimp only
        rw [← h₂ _ hx, ← h₂ _ hy]
        subst h₁
        exact comm hx hy h

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

s₁.noncommProd f comm = s₂.noncommProd g ⋯


theorem tendsto_nhds_top_mono' [TopologicalSpace β] [Preorder β] [OrderTop β] [OrderTopology β]
    {l : Filter α} {f g : α → β} (hf : Tendsto f l (𝓝 ⊤)) (hg : f ≤ g) : Tendsto g l (𝓝 ⊤)

{α : Type u}
{β : Type v}
[TopologicalSpace β]
[Preorder β]
[OrderTop β]
[OrderTopology β]
{l : Filter α}
{f g : α → β}
(hf : Filter.Tendsto f l (𝓝 ⊤))
(hg : f ≤ g)


lemma uniformContinuous_nndist : UniformContinuous fun p : α × α => nndist p.1 p.2

UniformContinuous fun p => nndist p.1 p.2


@[simp]
theorem next (α : Type*) [AddRightCancelSemigroup α] [One α] (i : α) :
    (ComplexShape.up α).next i = i + 1

(α : Type u_2)
[AddRightCancelSemigroup α]
[One α]
(i : α)


@[nolint unusedHavesSuffices]
theorem toPGame_def (o : Ordinal) :
    have : IsWellOrder o.out.α (· < ·) := isWellOrder_out_lt o
    o.toPGame = ⟨o.out.α, PEmpty, fun x => (typein (· < ·) x).toPGame, PEmpty.elim⟩

let_fun this := ⋯;
o.toPGame =
  SetTheory.PGame.mk (Quotient.out o).α PEmpty.{u_1 + 1} (fun x => (Ordinal.typein (fun x x_1 => x < x_1) x).toPGame)
    PEmpty.elim


@[to_additive]
theorem smul_apply [SMul R Y] (r : R) (f : LocallyConstant X Y) (x : X) : (r • f) x = r • f x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{R : Type u_4}
[SMul R Y]
(r : R)
(f : LocallyConstant X Y)
(x : X)


@[to_additive]
theorem center_le_centralizer (S) : center M ≤ centralizer S

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

Subsemigroup.center M ≤ Subsemigroup.centralizer S


@[simp]
protected theorem Multiset.exists_coe (p : m → Prop) :
    (∃ x : m, p x) ↔ ∃ (x : α) (i : Fin (m.count x)), p ⟨x, i⟩

{α : Type u_1}
[DecidableEq α]
{m : Multiset α}
(p : m.ToType → Prop)


theorem aeval_rename [Algebra R S] : aeval g (rename k p) = aeval (g ∘ k) p

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
{S : Type u_5}
[CommSemiring R]
[CommSemiring S]
(k : σ → τ)
(g : τ → S)
(p : MvPolynomial σ R)
[Algebra R S]

(MvPolynomial.aeval g) ((MvPolynomial.rename k) p) = (MvPolynomial.aeval (g ∘ k)) p


@[rclike_simps, norm_cast]
theorem norm_ofReal (r : ℝ) : ‖(r : K)‖ = |r|


/-- Bounding the norm of the iterated derivative of `B (f x) (g x)` within a set in terms of the
iterated derivatives of `f` and `g` when `B` is bilinear. This lemma is an auxiliary version
assuming all spaces live in the same universe, to enable an induction. Use instead
`ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear` that removes this assumption. -/
theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu Fu Gu : Type u}
    [NormedAddCommGroup Du] [NormedSpace 𝕜 Du] [NormedAddCommGroup Eu] [NormedSpace 𝕜 Eu]
    [NormedAddCommGroup Fu] [NormedSpace 𝕜 Fu] [NormedAddCommGroup Gu] [NormedSpace 𝕜 Gu]
    (B : Eu →L[𝕜] Fu →L[𝕜] Gu) {f : Du → Eu} {g : Du → Fu} {n : ℕ} {s : Set Du} {x : Du}
    (hf : ContDiffOn 𝕜 n f s) (hg : ContDiffOn 𝕜 n g s) (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) :
    ‖iteratedFDerivWithin 𝕜 n (fun y => B (f y) (g y)) s x‖ ≤
      ‖B‖ * ∑ i ∈ Finset.range (n + 1), (n.choose i : ℝ) * ‖iteratedFDerivWithin 𝕜 i f s x‖ *
        ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{Du Eu Fu Gu : Type u}
[NormedAddCommGroup Du]
[NormedSpace 𝕜 Du]
[NormedAddCommGroup Eu]
[NormedSpace 𝕜 Eu]
[NormedAddCommGroup Fu]
[NormedSpace 𝕜 Fu]
[NormedAddCommGroup Gu]
[NormedSpace 𝕜 Gu]
(B : Eu →L[𝕜] Fu →L[𝕜] Gu)
{f : Du → Eu}
{g : Du → Fu}
{n : ℕ}
{s : Set Du}
{x : Du}
(hf : ContDiffOn 𝕜 (↑n) f s)
(hg : ContDiffOn 𝕜 (↑n) g s)
(hs : UniqueDiffOn 𝕜 s)
(hx : x ∈ s)

‖iteratedFDerivWithin 𝕜 n (fun y => (B (f y)) (g y)) s x‖ ≤
  ‖B‖ *
    ∑ i ∈ Finset.range (n + 1),
      ↑(n.choose i) * ‖iteratedFDerivWithin 𝕜 i f s x‖ * ‖iteratedFDerivWithin 𝕜 (n - i) g s x‖


theorem AntilipschitzWith.edist_ne_top [PseudoEMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
    {f : α → β} (h : AntilipschitzWith K f) (x y : α) : edist x y ≠ ⊤

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoMetricSpace β]
{K : ℝ≥0}
{f : α → β}
(h : AntilipschitzWith K f)
(x y : α)


lemma nmem_nonZeroDivisorsRight_iff {r : M₀} :
    r ∉ nonZeroDivisorsRight M₀ ↔ {s | r * s = 0 ∧ s ≠ 0}.Nonempty

(M₀ : Type u_1)
[MonoidWithZero M₀]
{r : M₀}


nonrec theorem integral_finset_sum {ι} {s : Finset ι} {f : ι → ℝ → E}
    (h : ∀ i ∈ s, IntervalIntegrable (f i) μ a b) :
    ∫ x in a..b, ∑ i ∈ s, f i x ∂μ = ∑ i ∈ s, ∫ x in a..b, f i x ∂μ

∫ (x : ℝ) in a..b, ∑ i ∈ s, f i x ∂μ = ∑ i ∈ s, ∫ (x : ℝ) in a..b, f i x ∂μ


theorem rotate_edges {u v : V} (c : G.Walk v v) (h : u ∈ c.support) :
    (c.rotate h).edges ~r c.edges

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


theorem of_ufd_of_unique_irreducible [UniqueFactorizationMonoid R] (h₁ : ∃ p : R, Irreducible p)
    (h₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q) :
    HasUnitMulPowIrreducibleFactorization R


theorem mem_lifts (p : S[X]) : p ∈ lifts f ↔ ∃ q : R[X], map f q = p

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

p ∈ Polynomial.lifts f ↔ ∃ q, Polynomial.map f q = p


/-- **Krull's intersection theorem** for noetherian local rings. -/
theorem Ideal.iInf_pow_eq_bot_of_localRing [IsNoetherianRing R] [LocalRing R] (h : I ≠ ⊤) :
    ⨅ i : ℕ, I ^ i = ⊥

{R : Type u}
[CommRing R]
(I : Ideal R)
[IsNoetherianRing R]
[LocalRing R]
(h : I ≠ ⊤)


/-- `val_v(v^n) = n` for every `n ∈ ℤ`. -/
theorem count_zpow_self (n : ℤ) :
    count K v ((v.asIdeal : FractionalIdeal R⁰ K) ^ n) = n

(v : IsDedekindDomain.HeightOneSpectrum R)

FractionalIdeal.count K v (↑v.asIdeal ^ n) = n


/-- The additive equivalence `Cochain K L n ≃+ Cochain (K⟦a⟧) L n'` when `n + a = n'` and
the category is `R`-linear. -/
@[simps!]
def leftShiftLinearEquiv (n a n' : ℤ) (hn : n + a = n') :
    Cochain K L n ≃ₗ[R] Cochain (K⟦a⟧) L n'

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(R : Type u_1)
[Ring R]
[CategoryTheory.Linear R C]
(K L : CochainComplex C ℤ)
(n a n' : ℤ)
(hn : n + a = n')

∀ (a_1 : CochainComplex.HomComplex.Cochain K L n),
  (CochainComplex.HomComplex.Cochain.leftShiftLinearEquiv R K L n a n' hn) a_1 = a_1.leftShift a n' hn


theorem mem_lift' {t : Set α} (ht : t ∈ f) : h t ∈ f.lift' h

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{h : Set α → Set β}
{t : Set α}
(ht : t ∈ f)


@[simp]
theorem image_symm_image {α β} (e : α ≃ β) (s : Set β) : e '' (e.symm '' s) = s

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


protected theorem add_mul [Fintype m] (L M : Matrix l m α) (N : Matrix m n α) :
    (L + M) * N = L * N + M * N

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype m]
(L M : Matrix l m α)
(N : Matrix m n α)


lemma mapsTo_of_subsingleton' [Subsingleton β] (f : α → β) (h : s.Nonempty → t.Nonempty) :
    MapsTo f s t

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
[Subsingleton β]
(f : α → β)
(h : s.Nonempty → t.Nonempty)


theorem lt_def (x y : PartENat) : x < y ↔ ∃ hx : x.Dom, ∀ hy : y.Dom, x.get hx < y.get hy

x < y ↔ ∃ (hx : x.Dom), ∀ (hy : y.Dom), x.get hx < y.get hy


@[reassoc (attr := simp)]
lemma ιFunctorObj_πFunctorObj : ιFunctorObj f πX ≫ πFunctorObj f πX = πX

[CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete (CategoryTheory.SmallObject.FunctorObjIndex f πX)) C]

[CategoryTheory.Limits.HasPushout (CategoryTheory.SmallObject.functorObjTop f πX)
    (CategoryTheory.SmallObject.functorObjLeft f πX)]

CategoryTheory.CategoryStruct.comp (CategoryTheory.SmallObject.ιFunctorObj f πX)
    (CategoryTheory.SmallObject.πFunctorObj f πX) =
  πX


@[simp] lemma supClosed_empty : SupClosed (∅ : Set α)


theorem Integrable.integral_eq_integral_meas_le
    (f_intble : Integrable f μ) (f_nn : 0 ≤ᵐ[μ] f) :
    ∫ ω, f ω ∂μ = ∫ t in Set.Ioi 0, ENNReal.toReal (μ {a : α | t ≤ f a})

(f_intble : MeasureTheory.Integrable f μ)

∫ (ω : α), f ω ∂μ = ∫ (t : ℝ) in Set.Ioi 0, (μ {a | t ≤ f a}).toReal


theorem StrictConvexOn.convex_lt (hf : StrictConvexOn 𝕜 s f) (r : β) :
    Convex 𝕜 ({ x ∈ s | f x < r })

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : StrictConvexOn 𝕜 s f)
(r : β)


/-- Typeclass for a trivial star operation. This is mostly meant for `ℝ`.
-/
class TrivialStar (R : Type u) [Star R] : Prop where
  /-- Condition that star is trivial-/
  star_trivial : ∀ r : R, star r = r

{R : Type u}
[Star R]
[self : TrivialStar R]
(r : R)


theorem exists_subset_nhds_of_compactSpace [CompactSpace X] [Nonempty ι]
    {V : ι → Set X} (hV : Directed (· ⊇ ·) V) (hV_closed : ∀ i, IsClosed (V i)) {U : Set X}
    (hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x) : ∃ i, V i ⊆ U

(hV : Directed (fun x x_1 => x ⊇ x_1) V)


theorem pdf_toReal_ae_eq {X : Ω → E} {s : Set E} (hms : MeasurableSet s)
    (hX : IsUniform X s ℙ μ) :
    (fun x => (pdf X ℙ μ x).toReal) =ᵐ[μ] fun x =>
      (s.indicator ((μ s)⁻¹ • (1 : E → ℝ≥0∞)) x).toReal

{E : Type u_1}
[MeasurableSpace E]
{μ : MeasureTheory.Measure E}
{Ω : Type u_2}

∀ {x : MeasurableSpace Ω} {ℙ : MeasureTheory.Measure Ω} {X : Ω → E} {s : Set E},
  MeasurableSet s →
    MeasureTheory.pdf.IsUniform X s ℙ μ →
      (fun x_1 => (MeasureTheory.pdf X ℙ μ x_1).toReal) =ᵐ[μ] fun x => (s.indicator ((μ s)⁻¹ • 1) x).toReal


theorem rpow_eq_nhds_of_pos {p : ℝ × ℝ} (hp_fst : 0 < p.fst) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2)

(fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (Real.log x.1 * x.2)


/-- The isomorphism between the short complex attached to
two isomorphic distinguished triangles. -/
@[simps!]
def shortComplexOfDistTriangleIsoOfIso {T T' : Triangle C} (e : T ≅ T') (hT : T ∈ distTriang C) :
    shortComplexOfDistTriangle T hT ≅ shortComplexOfDistTriangle T'
      (isomorphic_distinguished _ hT _ e.symm)

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

{T T' : CategoryTheory.Pretriangulated.Triangle C}

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.Pretriangulated.shortComplexOfDistTriangleIsoOfIso e hT).hom.τ₂ = e.hom.hom₂


/-- This is almost a duplicate of `IsIntegrallyClosedIn.integralClosure_eq_bot`,
except the `NoZeroSMulDivisors` hypothesis isn't inferred automatically from `IsFractionRing`. -/
@[simp]
theorem integralClosure_eq_bot : integralClosure R K = ⊥

(R : Type u_1)
[CommRing R]
[iic : IsIntegrallyClosed R]
(K : Type u_3)
[CommRing K]
[Algebra R K]
[ifr : IsFractionRing R K]


lemma specializingMap_iff_closure_singleton (hf : Continuous f) :
    SpecializingMap f ↔ ∀ x, f '' closure {x} = closure {f x}

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

SpecializingMap f ↔ ∀ (x : X), f '' closure {x} = closure {f x}


/-- The upper central series of a group is an ascending central series. -/
theorem upperCentralSeries_isAscendingCentralSeries :
    IsAscendingCentralSeries (upperCentralSeries G)


theorem tendstoLocallyUniformlyOn_TFAE [LocallyCompactSpace α] (G : ι → α → β) (g : α → β)
    (p : Filter ι) (hs : IsOpen s) :
    List.TFAE [
      TendstoLocallyUniformlyOn G g p s,
      ∀ K, K ⊆ s → IsCompact K → TendstoUniformlyOn G g p K,
      ∀ x ∈ s, ∃ v ∈ 𝓝[s] x, TendstoUniformlyOn G g p v]

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{s : Set α}
[TopologicalSpace α]
[LocallyCompactSpace α]
(G : ι → α → β)
(g : α → β)
(p : Filter ι)
(hs : IsOpen s)

[TendstoLocallyUniformlyOn G g p s, ∀ K ⊆ s, IsCompact K → TendstoUniformlyOn G g p K,
    ∀ x ∈ s, ∃ v ∈ 𝓝[s] x, TendstoUniformlyOn G g p v].TFAE


protected theorem ScottContinuous.monotone (h : ScottContinuous f) : Monotone f

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(h : ScottContinuous f)


@[to_additive (attr := simp)]
lemma Homeomorph.coe_mulRight (a : G) : ⇑(Homeomorph.mulRight a) = (· * a)

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

⇑(Homeomorph.addRight a) = fun x => x + a


/-- An auxiliary lemma used in the proof of `ContinuousMap.idealOfSet_ofIdeal_eq_closure` which may
be useful on its own. -/
theorem exists_mul_le_one_eqOn_ge (f : C(X, ℝ≥0)) {c : ℝ≥0} (hc : 0 < c) :
    ∃ g : C(X, ℝ≥0), (∀ x : X, (g * f) x ≤ 1) ∧ {x : X | c ≤ f x}.EqOn (g * f) 1

{X : Type u_1}
[TopologicalSpace X]
(f : C(X, ℝ≥0))
{c : ℝ≥0}
(hc : 0 < c)

∃ g, (∀ (x : X), (g * f) x ≤ 1) ∧ Set.EqOn (⇑(g * f)) 1 {x | c ≤ f x}


@[reassoc]
theorem leftUnitor_inv_naturality {f g : a ⟶ b} (η : f ⟶ g) :
    η ≫ (λ_ g).inv = (λ_ f).inv ≫ 𝟙 a ◁ η

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

CategoryTheory.CategoryStruct.comp η (CategoryTheory.Bicategory.leftUnitor g).inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.leftUnitor f).inv
    (CategoryTheory.Bicategory.whiskerLeft (CategoryTheory.CategoryStruct.id a) η)


theorem infinitesimal_zero : Infinitesimal 0


/-- A `Matroid α` is a ground set `E` of type `Set α`, and a nonempty collection of its subsets
  satisfying the exchange property and the maximal subset property. Each such set is called a
  `Base` of `M`. An `Indep`endent set is just a set contained in a base, but we include this
  predicate as a structure field for better definitional properties.

  In most cases, using this definition directly is not the best way to construct a matroid,
  since it requires specifying both the bases and independent sets. If the bases are known,
  use `Matroid.ofBase` or a variant. If just the independent sets are known,
  define an `IndepMatroid`, and then use `IndepMatroid.matroid`.
  -/
@[ext] structure Matroid (α : Type _) where
  /-- `M` has a ground set `E`. -/
  (E : Set α)
  /-- `M` has a predicate `Base` definining its bases. -/
  (Base : Set α → Prop)
  /-- `M` has a predicate `Indep` defining its independent sets. -/
  (Indep : Set α → Prop)
  /-- The `Indep`endent sets are those contained in `Base`s. -/
  (indep_iff' : ∀ ⦃I⦄, Indep I ↔ ∃ B, Base B ∧ I ⊆ B)
  /-- There is at least one `Base`. -/
  (exists_base : ∃ B, Base B)
  /-- For any bases `B`, `B'` and `e ∈ B \ B'`, there is some `f ∈ B' \ B` for which `B-e+f`
    is a base. -/
  (base_exchange : Matroid.ExchangeProperty Base)
  /-- Every independent subset `I` of a set `X` for is contained in a maximal independent
    subset of `X`. -/
  (maximality : ∀ X, X ⊆ E → Matroid.ExistsMaximalSubsetProperty Indep X)
  /-- Every base is contained in the ground set. -/
  (subset_ground : ∀ B, Base B → B ⊆ E)


theorem ediam_image [SemilinearIsometryClass 𝓕 σ₁₂ E E₂] (f : 𝓕) (s : Set E) :
    EMetric.diam (f '' s) = EMetric.diam s

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
{𝓕 : Type u_10}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
[FunLike 𝓕 E E₂]
[SemilinearIsometryClass 𝓕 σ₁₂ E E₂]
(f : 𝓕)
(s : Set E)


theorem perpBisector_nonempty : (perpBisector p₁ p₂ : Set P).Nonempty

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ : P}


@[simp]
theorem quotEquivQuotMap_apply_mk (f g : R[X]) (I : Ideal R) :
    AdjoinRoot.quotEquivQuotMap f I (Ideal.Quotient.mk (Ideal.map (of f) I) (AdjoinRoot.mk f g)) =
      Ideal.Quotient.mk (Ideal.span ({Polynomial.map (Ideal.Quotient.mk I) f} : Set (R ⧸ I)[X]))
      (g.map (Ideal.Quotient.mk I))

{R : Type u}
[CommRing R]
(f g : R[X])
(I : Ideal R)

(AdjoinRoot.quotEquivQuotMap f I) ((Ideal.Quotient.mk (Ideal.map (AdjoinRoot.of f) I)) ((AdjoinRoot.mk f) g)) =
  (Ideal.Quotient.mk (Ideal.span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) g)


theorem hasFDerivAt_polarCoord_symm (p : ℝ × ℝ) :
    HasFDerivAt polarCoord.symm
      (LinearMap.toContinuousLinearMap (Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ)
        !![cos p.2, -p.1 * sin p.2; sin p.2, p.1 * cos p.2])) p

HasFDerivAt (↑polarCoord.symm)
  (LinearMap.toContinuousLinearMap
    ((Matrix.toLin (Basis.finTwoProd ℝ) (Basis.finTwoProd ℝ))
      !![Real.cos p.2, -p.1 * Real.sin p.2; Real.sin p.2, p.1 * Real.cos p.2]))
  p


/-- The limit bicone for the biproduct over an index type with exactly one term. -/
@[simps]
def limitBiconeOfUnique : LimitBicone f

(CategoryTheory.Limits.limitBiconeOfUnique f).bicone.ι j = CategoryTheory.eqToHom ⋯


@[simp]
theorem sInter_empty : ⋂₀ ∅ = (univ : Set α)


/-- Given a basis, any orientation equals the orientation given by that basis or its negation. -/
theorem orientation_eq_or_eq_neg (e : Basis ι R M) (x : Orientation R M ι) :
    x = e.orientation ∨ x = -e.orientation

{R : Type u_1}
[LinearOrderedCommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_3}
[Fintype ι]
[DecidableEq ι]
(e : Basis ι R M)
(x : Orientation R M ι)


@[aesop safe destruct (rule_sets := [CategoryTheory])]
lemma false_of_from_star {X : C} (f : star ⟶ of X) : False

(f : CategoryTheory.WithTerminal.star ⟶ CategoryTheory.WithTerminal.of X)


/-- Extract the underlying inequality from a morphism in a preorder category.
-/
theorem leOfHom {x y : X} (h : x ⟶ y) : x ≤ y

{X : Type u}
[Preorder X]
{x y : X}
(h : x ⟶ y)


theorem small_fullSubcategory_cofilteredClosure :
    Small.{max v w} (FullSubcategory (CofilteredClosure f))

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

Small.{max v w, u} (CategoryTheory.FullSubcategory (CategoryTheory.IsCofiltered.CofilteredClosure f))


theorem numeric_of_isEmpty (x : PGame) [IsEmpty x.LeftMoves] [IsEmpty x.RightMoves] : Numeric x

(x : SetTheory.PGame)
[IsEmpty x.LeftMoves]
[IsEmpty x.RightMoves]


@[to_additive (attr := simp)]
theorem prod_replicate (n : ℕ) (a : M) : (replicate n a).prod = a ^ n

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


lemma dvd_iff_le_div_mul (n d : ℕ) : d ∣ n ↔ n ≤ n / d * d


theorem inner_self_eq_norm_mul_norm (x : E) : re ⟪x, x⟫ = ‖x‖ * ‖x‖

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


/-- There exists a vertex of minimal degree. Note the assumption of being nonempty is necessary, as
the lemma implies there exists a vertex. -/
theorem exists_minimal_degree_vertex [DecidableRel G.Adj] [Nonempty V] :
    ∃ v, G.minDegree = G.degree v

{V : Type u_1}
(G : SimpleGraph V)
[Fintype V]
[DecidableRel G.Adj]
[Nonempty V]


theorem Set.Finite.exists_ge [IsDirected α (· ≥ ·)] {s : Set α} (hs : s.Finite) :
    ∃ M, ∀ i ∈ s, M ≤ i

{α : Type u_1}
[Nonempty α]
[Preorder α]
[IsDirected α fun x x_1 => x ≥ x_1]
{s : Set α}
(hs : s.Finite)


theorem norm_ofSubsingleton_id_le [Subsingleton ι] (i : ι) :
    ‖ofSubsingleton 𝕜 G G i (.id _ _)‖ ≤ 1

(𝕜 : Type u)
{ι : Type v}
(G : Type wG)
[Fintype ι]
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup G]
[NormedSpace 𝕜 G]
[Subsingleton ι]
(i : ι)

‖(ContinuousMultilinearMap.ofSubsingleton 𝕜 G G i) (ContinuousLinearMap.id 𝕜 G)‖ ≤ 1


theorem OneOneReducible.to_many_one {α β} [Primcodable α] [Primcodable β] {p : α → Prop}
    {q : β → Prop} : p ≤₁ q → p ≤₀ q

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{p : α → Prop}
{q : β → Prop}

p ≤₁ q → p ≤₀ q


theorem hasFiniteIntegral_restrict_of_bounded [NormedAddCommGroup E] {f : α → E} {s : Set α}
    {μ : Measure α} {C} (hs : μ s < ∞) (hf : ∀ᵐ x ∂μ.restrict s, ‖f x‖ ≤ C) :
    HasFiniteIntegral f (μ.restrict s)

(hf : ∀ᵐ (x : α) ∂μ.restrict s, ‖f x‖ ≤ C)

MeasureTheory.HasFiniteIntegral f (μ.restrict s)


theorem _root_.IsClosed.measure_eq_univ_iff_eq [OpensMeasurableSpace X] [IsFiniteMeasure μ]
    (hF : IsClosed F) :
    μ F = μ univ ↔ F = univ

{X : Type u_1}
[TopologicalSpace X]
{m : MeasurableSpace X}
{μ : MeasureTheory.Measure X}
[μ.IsOpenPosMeasure]
{F : Set X}
[OpensMeasurableSpace X]
[MeasureTheory.IsFiniteMeasure μ]
(hF : IsClosed F)


theorem eq_univ_of_forall {A : Class.{u}} : (∀ x : ZFSet, A x) → A = univ


theorem fract_eq_self {x : E} : fract b x = x ↔ x ∈ fundamentalDomain b

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
{b : Basis ι K E}
[FloorRing K]
[Fintype ι]
{x : E}

Zspan.fract b x = x ↔ x ∈ Zspan.fundamentalDomain b


/-- A topological ring is nonarchimedean if its underlying topological additive
  group is nonarchimedean. -/
class NonarchimedeanRing (R : Type*) [Ring R] [TopologicalSpace R] extends TopologicalRing R :
  Prop where
  is_nonarchimedean : ∀ U ∈ 𝓝 (0 : R), ∃ V : OpenAddSubgroup R, (V : Set R) ⊆ U

{R : Type u_1}
[Ring R]
[TopologicalSpace R]
[self : NonarchimedeanRing R]
(U : Set R)

U ∈ 𝓝 0 → ∃ V, ↑V ⊆ U


theorem Complex.cos_eq_tsum' (z : ℂ) :
    Complex.cos z = ∑' n : ℕ, (z * Complex.I) ^ (2 * n) / ↑(2 * n)!

Complex.cos z = ∑' (n : ℕ), (z * Complex.I) ^ (2 * n) / ↑(2 * n)!


/-- Like `FamilyDef`, but `β` is an `outParam`. -/
class FamilyOut {α : Type u} (Fam : α → Type v) (a : α) (β : outParam $ Type v) : Prop where
  family_key_eq_type : Fam a = β

{α : Type u}
{Fam : α → Type v}
{a : α}
{β : outParam (Type v)}
[self : Lake.FamilyOut Fam a β]


theorem one_lt_rpow {x : ℝ≥0} {z : ℝ} (hx : 1 < x) (hz : 0 < z) : 1 < x ^ z


/-- Coercion of a `NormedAddGroupHom` is an `AddMonoidHom`. Similar to `AddMonoidHom.coeFn`. -/
@[simps]
def coeFnAddHom : (α →ᵇ β) →+ α → β

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[AddMonoid β]
[BoundedAdd β]
[ContinuousAdd β]

∀ (a : BoundedContinuousFunction α β) (a_1 : α), BoundedContinuousFunction.coeFnAddHom a a_1 = a a_1


/-- If `P` is a point on the line `AB` and `Q` is equidistant from `A` and `B`, then
`AP * BP = abs (BQ ^ 2 - PQ ^ 2)`. -/
theorem mul_dist_eq_abs_sub_sq_dist {a b p q : P} (hp : ∃ k : ℝ, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p))
    (hq : dist a q = dist b q) : dist a p * dist b p = |dist b q ^ 2 - dist p q ^ 2|

(hp : ∃ k, k ≠ 1 ∧ b -ᵥ p = k • (a -ᵥ p))


lemma condIndepSets_iff (s1 s2 : Set (Set Ω)) (hs1 : ∀ s ∈ s1, MeasurableSet s)
    (hs2 : ∀ s ∈ s2, MeasurableSet s) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndepSets m' hm' s1 s2 μ ↔ ∀ (t1 t2 : Set Ω) (_ : t1 ∈ s1) (_ : t2 ∈ s2),
      (μ⟦t1 ∩ t2 | m'⟧) =ᵐ[μ] (μ⟦t1 | m'⟧) * (μ⟦t2 | m'⟧)

{Ω : Type u_1}
(m' : MeasurableSpace Ω)
{mΩ : MeasurableSpace Ω}
[StandardBorelSpace Ω]
[Nonempty Ω]
(hm' : m' ≤ mΩ)
(s1 s2 : Set (Set Ω))
(hs1 : ∀ s ∈ s1, MeasurableSet s)
(hs2 : ∀ s ∈ s2, MeasurableSet s)
(μ : MeasureTheory.Measure Ω)
[MeasureTheory.IsFiniteMeasure μ]

ProbabilityTheory.CondIndepSets m' hm' s1 s2 μ ↔
  ∀ (t1 t2 : Set Ω),
    t1 ∈ s1 →
      t2 ∈ s2 → μ[(t1 ∩ t2).indicator fun ω => 1|m'] =ᵐ[μ] μ[t1.indicator fun ω => 1|m'] * μ[t2.indicator fun ω => 1|m']


theorem Matrix.isAdjointPair_equiv (P : Matrix n n R) (h : IsUnit P) :
    (Pᵀ * J * P).IsAdjointPair (Pᵀ * J * P) A₁ A₂ ↔
      J.IsAdjointPair J (P * A₁ * P⁻¹) (P * A₂ * P⁻¹)

{R : Type u_1}
{n : Type u_12}
[CommRing R]
[Fintype n]
(J A₁ A₂ : Matrix n n R)
[DecidableEq n]
(P : Matrix n n R)
(h : IsUnit P)


protected theorem add_lt_add_left [LT α] [CovariantClass α α (· + ·) (· < ·)] (ha : a ≠ ⊤)
    (h : b < c) : a + b < a + c

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


@[simp]
theorem symm_symm (e : M₁ ≃SL[σ₁₂] M₂) : e.symm.symm = e

{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₂)


theorem Finset.centerMass_empty : (∅ : Finset ι).centerMass w z = 0

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
(w : ι → R)
(z : ι → E)


@[simp]
theorem mk_X_0 : (mk X₀ X₁ X₂ d₀ d₁ s succ).X 0 = X₀

(succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0)

(CochainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ).X 0 = X₀


@[simp]
theorem nhds_true : 𝓝 True = pure True


theorem Finite.toFinset_eq_toFinset {s : Set α} [Fintype s] (h : s.Finite) :
    h.toFinset = s.toFinset

{α : Type u}
{s : Set α}
[Fintype ↑s]
(h : s.Finite)


/-- The intersection of an indexed set of submonoids of a monoid `M` is a submonoid of `M`. -/
@[to_additive
      "The intersection of an indexed set of `AddSubmonoid`s of an `AddMonoid` `M` is
      an `AddSubmonoid` of `M`."]
theorem IsSubmonoid.iInter {ι : Sort*} {s : ι → Set M} (h : ∀ y : ι, IsSubmonoid (s y)) :
    IsSubmonoid (Set.iInter s)

{M : Type u_1}
[AddMonoid M]
{ι : Sort u_3}
{s : ι → Set M}
(h : ∀ (y : ι), IsAddSubmonoid (s y))


lemma exp_mul (x : EReal) (y : ℝ) : exp (x * y) = (exp x) ^ y


theorem wronskian_neg_right (a b : R[X]) : wronskian a (-b) = -wronskian a b

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


theorem ofDirectSum_comp_toDirectSum :
    ofDirectSum.comp toDirectSum = AlgHom.id R (TensorAlgebra R M)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]

TensorAlgebra.ofDirectSum.comp TensorAlgebra.toDirectSum = AlgHom.id R (TensorAlgebra R M)


@[simp] lemma image_add_right_Icc (a b c : α) : (Icc a b).image (· + c) = Icc (a + c) (b + c)

{α : Type u_2}
[OrderedCancelAddCommMonoid α]
[ExistsAddOfLE α]
[LocallyFiniteOrder α]
[DecidableEq α]
(a b c : α)

Finset.image (fun x => x + c) (Finset.Icc a b) = Finset.Icc (a + c) (b + c)


@[simp]
theorem restrict_univ (f : α →ₛ β) : restrict f univ = f

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Zero β]
(f : MeasureTheory.SimpleFunc α β)


@[simp]
theorem map_bot (f : A →ₙₐ[R] B) : (⊥ : NonUnitalSubalgebra R A).map f = ⊥

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