@[reassoc]
theorem μ_inv_naturality {m n : M} {X Y : C} (f : X ⟶ Y) :
    (F.μIso m n).inv.app X ≫ (F.obj n).map ((F.obj m).map f) =
      (F.obj _).map f ≫ (F.μIso m n).inv.app Y

(F : CategoryTheory.MonoidalFunctor M (CategoryTheory.Functor C C))

CategoryTheory.CategoryStruct.comp ((F.μIso m n).inv.app X) ((F.obj n).map ((F.obj m).map f)) =
  CategoryTheory.CategoryStruct.comp ((F.obj (CategoryTheory.MonoidalCategory.tensorObj m n)).map f)
    ((F.μIso m n).inv.app Y)


@[to_additive]
theorem unop_bijective : Bijective (unop : αᵐᵒᵖ → α)


/-- The inductively defined equivalence closure of a binary relation r is the infimum
    of the set of all equivalence relations containing r. -/
theorem eqvGen_eq (r : α → α → Prop) :
    EqvGen.Setoid r = sInf { s : Setoid α | ∀ ⦃x y⦄, r x y → s.Rel x y }

EqvGen.Setoid r = sInf {s | ∀ ⦃x y : α⦄, r x y → s.Rel x y}


theorem singleton_mem_nhdsWithin_of_mem_discrete {s : Set X} [DiscreteTopology s] {x : X}
    (hx : x ∈ s) : {x} ∈ 𝓝[s] x

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
[DiscreteTopology ↑s]
{x : X}
(hx : x ∈ s)


theorem _root_.IsFractional.inf_right {I : Submodule R P} :
    IsFractional S I → ∀ J, IsFractional S (I ⊓ J)

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

IsFractional S I → ∀ (J : Submodule R P), IsFractional S (I ⊓ J)


theorem Tendsto.pi_map_coprodᵢ {g : ∀ i, Filter (β i)} (h : ∀ i, Tendsto (m i) (f i) (g i)) :
    Tendsto (fun k : ∀ i, α i => fun i => m i (k i)) (Filter.coprodᵢ f) (Filter.coprodᵢ g)

(h : ∀ (i : ι), Filter.Tendsto (m i) (f i) (g i))

Filter.Tendsto (fun k i => m i (k i)) (Filter.coprodᵢ f) (Filter.coprodᵢ g)


@[simp]
theorem realize_relabel {m n : ℕ} {φ : L.BoundedFormula α n} {g : α → β ⊕ (Fin m)} {v : β → M}
    {xs : Fin (m + n) → M} :
    (φ.relabel g).Realize v xs ↔
      φ.Realize (Sum.elim v (xs ∘ Fin.castAdd n) ∘ g) (xs ∘ Fin.natAdd m)

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{β : Type v'}
{m n : ℕ}
{φ : L.BoundedFormula α n}
{g : α → β ⊕ Fin m}
{v : β → M}
{xs : Fin (m + n) → M}

(FirstOrder.Language.BoundedFormula.relabel g φ).Realize v xs ↔
  φ.Realize (Sum.elim v (xs ∘ Fin.castAdd n) ∘ g) (xs ∘ Fin.natAdd m)


/--
The multiplicative congruences on `M` bijects to the multiplicative congruences on `Mᵐᵒᵖ`
-/
@[to_additive (attr := simps) "The additive congruences on `M` bijects to the additive congruences
on `Mᵃᵒᵖ`"]
def orderIsoOp : Con M ≃o Con Mᵐᵒᵖ


theorem _root_.Wbtw.wOppSide₁₃ {s : AffineSubspace R P} {x y z : P} (h : Wbtw R x y z)
    (hy : y ∈ s) : s.WOppSide x z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y z : P}
(h : Wbtw R x y z)
(hy : y ∈ s)


@[to_additive]
theorem inter_div_union_subset_union : s₁ ∩ s₂ / (t₁ ∪ t₂) ⊆ s₁ / t₁ ∪ s₂ / t₂

{α : Type u_2}
[DecidableEq α]
[Sub α]
{s₁ s₂ t₁ t₂ : Finset α}

s₁ ∩ s₂ - (t₁ ∪ t₂) ⊆ s₁ - t₁ ∪ (s₂ - t₂)


@[simp]
theorem CNFRec_zero {C : Ordinal → Sort*} (b : Ordinal) (H0 : C 0)
    (H : ∀ o, o ≠ 0 → C (o % b ^ log b o) → C o) : @CNFRec b C H0 H 0 = H0

(H : (o : Ordinal.{u_2}) → o ≠ 0 → C (o % b ^ Ordinal.log b o) → C o)


theorem arg_of_re_nonneg {x : ℂ} (hx : 0 ≤ x.re) : arg x = Real.arcsin (x.im / abs x)

x.arg = Real.arcsin (x.im / Complex.abs x)


theorem cotangentIdeal_square (I : Ideal R) : I.cotangentIdeal ^ 2 = ⊥


theorem IntegrableOn.mono_measure (h : IntegrableOn f s ν) (hμ : μ ≤ ν) : IntegrableOn f s μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s : Set α}
{μ ν : MeasureTheory.Measure α}
(h : MeasureTheory.IntegrableOn f s ν)
(hμ : μ ≤ ν)


theorem exists_gcf_pair_rat_eq_nth_conts :
    ∃ conts : Pair ℚ, (of v).conts n = (conts.map (↑) : Pair K)

{K : Type u_1}
[LinearOrderedField K]
[FloorRing K]
(v : K)
(n : ℕ)

∃ conts, (GenContFract.of v).conts n = GenContFract.Pair.map Rat.cast conts


@[to_additive (attr := simp)]
theorem mem_comap {S : Subsemigroup N} {f : M →ₙ* N} {x : M} : x ∈ S.comap f ↔ f x ∈ S

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{S : Subsemigroup N}
{f : M →ₙ* N}
{x : M}


theorem mk_wcovBy_mk_iff_right : (a, b₁) ⩿ (a, b₂) ↔ b₁ ⩿ b₂

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[PartialOrder β]
{a : α}
{b₁ b₂ : β}


/-- A prefunctor induces a map of `Quiver.Star` at every vertex. -/
@[simps]
def Prefunctor.star (u : U) : Quiver.Star u → Quiver.Star (φ.obj u)

{U : Type u_1}
[Quiver U]
{V : Type u_2}
[Quiver V]
(φ : U ⥤q V)
(u : U)

∀ (a : Quiver.Star u), (φ.star u a).fst = φ.obj a.fst


/-- `Equiv.mulLeft₀` as an `OrderIso` on a `LinearOrderedCommGroupWithZero.`.

Note that `OrderIso.mulLeft₀` refers to the `LinearOrderedField` version. -/
@[simps! (config := { simpRhs := true }) apply toEquiv]
def OrderIso.mulLeft₀' {a : α} (ha : a ≠ 0) : α ≃o α

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a : α}
(ha : a ≠ 0)
(x : α)


/-- Group equivalence between `G ≃+c[a, a] G` and the units of `G →+c[a, a] G`. -/
@[simps!]
def equivUnits : (G ≃+c[a, a] G) ≃* (G →+c[a, a] G)ˣ

∀ (a_1 : G ≃+c[a, a] G) (a_2 : G), ↑(AddConstEquiv.equivUnits a_1) a_2 = a_1 a_2


theorem mul_max_of_nonneg [PosMulMono α]
    (b c : α) (ha : 0 ≤ a) : a * max b c = max (a * b) (a * c)

{α : Type u}
[Semiring α]
[LinearOrder α]
{a : α}
[PosMulMono α]
(b c : α)
(ha : 0 ≤ a)


@[simp]
theorem divMonomial_monomial (a : σ →₀ ℕ) : monomial a 1 /ᵐᵒⁿᵒᵐⁱᵃˡ a = (1 : MvPolynomial σ R)

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
(a : σ →₀ ℕ)

((MvPolynomial.monomial a) 1).divMonomial a = 1


@[to_additive]
theorem mul_right_comm : ∀ a b c : G, a * b * c = a * c * b

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


@[to_additive] lemma Monovary.div_right (h₁ : Monovary f g₁) (h₂ : Antivary f g₂) :
    Monovary f (g₁ / g₂)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedCommGroup α]
[LinearOrderedCommGroup β]
{f : ι → α}
{g₁ g₂ : ι → β}
(h₁ : Monovary f g₁)
(h₂ : Antivary f g₂)


theorem Restriction.eq_restrict (h : N ≤r M) : M ↾ N.E = N

{α : Type u_1}
{M N : Matroid α}
(h : N.Restriction M)


theorem hitting_eq_sInf (ω : Ω) : hitting u s ⊥ ⊤ ω = sInf {i : ι | u i ω ∈ s}

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[CompleteLattice ι]
{u : ι → Ω → β}
{s : Set β}
(ω : Ω)

MeasureTheory.hitting u s ⊥ ⊤ ω = sInf {i | u i ω ∈ s}


/-- Fixing submonoid of iUnion is intersection -/
theorem fixingSubmonoid_iUnion {ι : Sort*} {s : ι → Set α} :
    fixingSubmonoid M (⋃ i, s i) = ⨅ i, fixingSubmonoid M (s i)

(M : Type u_1)
(α : Type u_2)
[Monoid M]
[MulAction M α]
{ι : Sort u_3}
{s : ι → Set α}


@[simp] theorem toBialgEquiv_trans (e : X ≅ Y) (f : Y ≅ Z) :
    toBialgEquiv (e ≪≫ f) = e.toBialgEquiv.trans f.toBialgEquiv

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

(e ≪≫ f).toBialgEquiv = e.toBialgEquiv.trans f.toBialgEquiv


theorem IsHermitian.fromBlocks₂₂ [Fintype n] [DecidableEq n] (A : Matrix m m 𝕜) (B : Matrix m n 𝕜)
    {D : Matrix n n 𝕜} (hD : D.IsHermitian) :
    (Matrix.fromBlocks A B Bᴴ D).IsHermitian ↔ (A - B * D⁻¹ * Bᴴ).IsHermitian

{m : Type u_2}
{n : Type u_3}
{𝕜 : Type u_5}
[CommRing 𝕜]
[StarRing 𝕜]
[Fintype n]
[DecidableEq n]
(A : Matrix m m 𝕜)
(B : Matrix m n 𝕜)
{D : Matrix n n 𝕜}
(hD : D.IsHermitian)

(Matrix.fromBlocks A B B.conjTranspose D).IsHermitian ↔ (A - B * D⁻¹ * B.conjTranspose).IsHermitian


theorem mem_openSegment_iff_div : x ∈ openSegment 𝕜 y z ↔
    ∃ a b : 𝕜, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedSemifield 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{x y z : E}

x ∈ openSegment 𝕜 y z ↔ ∃ a b, 0 < a ∧ 0 < b ∧ (a / (a + b)) • y + (b / (a + b)) • z = x


theorem mem_perfectClosure_iff_pow_mem (q : ℕ) [ExpChar F q] {x : E} :
    x ∈ perfectClosure F E ↔ ∃ n : ℕ, x ^ q ^ n ∈ (algebraMap F E).range

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
(q : ℕ)
[ExpChar F q]
{x : E}

x ∈ perfectClosure F E ↔ ∃ n, x ^ q ^ n ∈ (algebraMap F E).range


theorem rightMoves_add_cases {x y : PGame} (k) {P : (x + y).RightMoves → Prop}
    (hl : ∀ j, P <| toRightMovesAdd (Sum.inl j)) (hr : ∀ j, P <| toRightMovesAdd (Sum.inr j)) :
    P k

(hl : ∀ (j : x.RightMoves), P (SetTheory.PGame.toRightMovesAdd (Sum.inl j)))

(hr : ∀ (j : y.RightMoves), P (SetTheory.PGame.toRightMovesAdd (Sum.inr j)))


@[simp] lemma neg_τ₂ (φ : S₁ ⟶ S₂) : (-φ).τ₂ = -φ.τ₂

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


lemma toInteger_isPrimitiveRoot {k : ℕ+} (hζ : IsPrimitiveRoot ζ k) :
    IsPrimitiveRoot hζ.toInteger k

{K : Type u}
[Field K]
{ζ : K}
{k : ℕ+}
(hζ : IsPrimitiveRoot ζ ↑k)


lemma embedding_toContinuousMap : Embedding ((↑) : C(X, R)₀ → C(X, R))

{X : Type u_1}
{R : Type u_3}
[Zero X]
[Zero R]
[TopologicalSpace X]
[TopologicalSpace R]


/-- Subfield closure of a set is monotone in its argument: if `s ⊆ t`,
then `closure s ≤ closure t`. -/
theorem closure_mono ⦃s t : Set K⦄ (h : s ⊆ t) : closure s ≤ closure t

{K : Type u}
[DivisionRing K]
⦃s t : Set K⦄
(h : s ⊆ t)


theorem Wbtw.left_ne_right_of_ne_left {x y z : P} (h : Wbtw R x y z) (hne : y ≠ x) : x ≠ z

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x y z : P}
(h : Wbtw R x y z)
(hne : y ≠ x)


theorem normal_of_normalizer_normal {p : ℕ} [Fact p.Prime] [Finite (Sylow p G)] (P : Sylow p G)
    (hn : (↑P : Subgroup G).normalizer.Normal) : (↑P : Subgroup G).Normal

{G : Type u}
[Group G]
{p : ℕ}
[Fact (Nat.Prime p)]
[Finite (Sylow p G)]
(P : Sylow p G)
(hn : (↑P).normalizer.Normal)


/-- A mono factorisation of `g ≫ f`, where `g` is an isomorphism,
gives a mono factorisation of `f`. -/
@[simps]
def ofIsoComp {X' : C} (g : X' ⟶ X) [IsIso g] (F : MonoFactorisation (g ≫ f)) :
    MonoFactorisation f

(F : CategoryTheory.Limits.MonoFactorisation (g ≫ f))

(CategoryTheory.Limits.MonoFactorisation.ofIsoComp g F).I = F.I


theorem UInt8.toNat_zero : (0 : UInt8).toNat = 0


theorem unbounded_lt_Ioi [SemilatticeSup α] [NoMaxOrder α] (a : α) :
    Unbounded (· < ·) (Ioi a)

{α : Type u_1}
[SemilatticeSup α]
[NoMaxOrder α]
(a : α)

Set.Unbounded (fun x x_1 => x < x_1) (Set.Ioi a)


/-- The differential in the complex of inhomogeneous cochains used to
calculate group cohomology. -/
@[simps]
def d [Monoid G] (n : ℕ) (A : Rep k G) : ((Fin n → G) → A) →ₗ[k] (Fin (n + 1) → G) → A

{k G : Type u}
[CommRing k]
[Monoid G]
(n : ℕ)
(A : Rep k G)
(f : (Fin n → G) → CoeSort.coe A)
(g : Fin (n + 1) → G)

(inhomogeneousCochains.d n A) f g =
  (A.ρ (g 0)) (f fun i => g i.succ) + ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g)


/-- An inner product with a sum on the right, `Finsupp` version. -/
theorem Finsupp.inner_sum {ι : Type*} (l : ι →₀ 𝕜) (v : ι → E) (x : E) :
    ⟪x, l.sum fun (i : ι) (a : 𝕜) => a • v i⟫ = l.sum fun (i : ι) (a : 𝕜) => a • ⟪x, v i⟫

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
(l : ι →₀ 𝕜)
(v : ι → E)
(x : E)

⟪x, l.sum fun i a => a • v i⟫_𝕜 = l.sum fun i a => a • ⟪x, v i⟫_𝕜


@[simp, fun_prop]
protected theorem Differentiable.fst (h : Differentiable 𝕜 f₂) :
    Differentiable 𝕜 fun x => (f₂ x).1

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f₂ : E → F × G}
(h : Differentiable 𝕜 f₂)


@[simp] theorem sigmaCongrRight_symm {α} {β : α → Sort _} (F : ∀ a, Perm (β a)) :
    (sigmaCongrRight F).symm = sigmaCongrRight fun a => (F a).symm

{α : Type u_1}
{β : α → Type u_2}
(F : (a : α) → Equiv.Perm (β a))

Equiv.symm (Equiv.Perm.sigmaCongrRight F) = Equiv.Perm.sigmaCongrRight fun a => Equiv.symm (F a)


lemma range_lift : (lift L ι G f g Hg).toHom.range = ⨆ i, (g i).toHom.range

[DirectedSystem G fun i j h => ⇑(f i j h)]

(Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), (g j) ((f i j hij) x) = (g i) x)

(FirstOrder.Language.DirectLimit.lift L ι G f g Hg).toHom.range = ⨆ i, (g i).toHom.range


/-- Build an isomorphism in the category `CommMonCat` from a `MulEquiv` between `CommMonoid`s. -/
@[to_additive (attr := simps) AddEquiv.toAddCommMonCatIso]
def MulEquiv.toCommMonCatIso (e : X ≃* Y) : CommMonCat.of X ≅ CommMonCat.of Y

{X Y : Type u}
[CommMonoid X]
[CommMonoid Y]
(e : X ≃* Y)

e.toCommMonCatIso.hom = CommMonCat.ofHom e.toMonoidHom


theorem iSup_lintegral_le {ι : Sort*} (f : ι → α → ℝ≥0∞) :
    ⨆ i, ∫⁻ a, f i a ∂μ ≤ ∫⁻ a, ⨆ i, f i a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{ι : Sort u_5}
(f : ι → α → ℝ≥0∞)

⨆ i, ∫⁻ (a : α), f i a ∂μ ≤ ∫⁻ (a : α), ⨆ i, f i a ∂μ


/-- For each object in `C`, there is a triangle of the form `(X,X,0,𝟙 X,0,0)`
-/
@[simps!]
def contractibleTriangle (X : C) : Triangle C

(CategoryTheory.Pretriangulated.contractibleTriangle X).mor₁ = 𝟙 X


lemma ModularGroup_T_pow_mem_Gamma (N M : ℤ) (hNM : N ∣ M) :
    (ModularGroup.T ^ M) ∈ Gamma (Int.natAbs N)

ModularGroup.T ^ M ∈ CongruenceSubgroup.Gamma N.natAbs


theorem ofNat_val_natCast {n x y : Nat} (h : y = x % (n + 1)):
    @Nat.cast Int instNatCastInt (@Fin.val (n + 1) (OfNat.ofNat x)) = OfNat.ofNat y


@[to_additive]
theorem antisymm (h₁₂ : Red L₁ L₂) (h₂₁ : Red L₂ L₁) : L₁ = L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
(h₁₂ : FreeAddGroup.Red L₁ L₂)
(h₂₁ : FreeAddGroup.Red L₂ L₁)


@[to_additive]
theorem le_of_le_mul_of_le_one_left [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (h : a ≤ b * c)
    (hle : c ≤ 1) :
    a ≤ b

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


@[simp]
theorem preimage_closedBall (x : E) (r : ℝ) :
    f ⁻¹' Metric.closedBall (f x) r = Metric.closedBall x r

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗᵢ[σ₁₂] E₂)
(x : E)
(r : ℝ)

⇑f ⁻¹' Metric.closedBall (f x) r = Metric.closedBall x r


theorem GoodProducts.linearIndependentSingleton :
    LinearIndependent ℤ (eval ({fun _ ↦ false} : Set (I → Bool)))

LinearIndependent ℤ (Profinite.NobelingProof.GoodProducts.eval {fun x => false})


@[simp] theorem size_zipWithIndex (as : Array α) : as.zipWithIndex.size = as.size


private theorem order_add_of_order_eq.aux (φ ψ : R⟦X⟧) (_h : order φ ≠ order ψ)
    (H : order φ < order ψ) : order (φ + ψ) ≤ order φ ⊓ order ψ

{R : Type u_1}
[Semiring R]
(φ ψ : PowerSeries R)
(_h : φ.order ≠ ψ.order)
(H : φ.order < ψ.order)


@[simp] lemma infClosed_preimage_toDual {s : Set αᵒᵈ} :
    InfClosed (toDual ⁻¹' s) ↔ SupClosed s

{α : Type u_2}
[Lattice α]
{s : Set αᵒᵈ}

InfClosed (⇑OrderDual.toDual ⁻¹' s) ↔ SupClosed s


theorem subtype_comp_inclusion (p q : Submodule R M) (h : p ≤ q) :
    q.subtype.comp (inclusion h) = p.subtype

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p q : Submodule R M)
(h : p ≤ q)

q.subtype ∘ₗ Submodule.inclusion h = p.subtype


theorem toLp_def [NormedField 𝕜] [NormedSpace 𝕜 E] (f : C(α, E)) :
    toLp (E := E) p μ 𝕜 f =
      BoundedContinuousFunction.toLp (E := E) p μ 𝕜 (linearIsometryBoundedOfCompact α E 𝕜 f)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[TopologicalSpace α]
[BorelSpace α]
[SecondCountableTopologyEither α E]
[CompactSpace α]
[MeasureTheory.IsFiniteMeasure μ]
{𝕜 : Type u_5}
[Fact (1 ≤ p)]
[NormedField 𝕜]
[NormedSpace 𝕜 E]
(f : C(α, E))

(ContinuousMap.toLp p μ 𝕜) f =
  (BoundedContinuousFunction.toLp p μ 𝕜) ((ContinuousMap.linearIsometryBoundedOfCompact α E 𝕜) f)


theorem exists_dist_lt_le (hδ : 0 < δ) (hε : 0 ≤ ε) (h : dist x z < ε + δ) :
    ∃ y, dist x y < δ ∧ dist y z ≤ ε

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{x z : E}
{δ ε : ℝ}
(hδ : 0 < δ)
(hε : 0 ≤ ε)
(h : dist x z < ε + δ)


protected theorem neg_add_cancel_left (a b : Int) : -a + (a + b) = b


theorem integral_congr_ae' (h : ∀ᵐ x ∂μ, x ∈ Ioc a b → f x = g x)
    (h' : ∀ᵐ x ∂μ, x ∈ Ioc b a → f x = g x) : ∫ x in a..b, f x ∂μ = ∫ x in a..b, g x ∂μ

(h : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Ioc a b → f x = g x)

(h' : ∀ᵐ (x : ℝ) ∂μ, x ∈ Set.Ioc b a → f x = g x)

∫ (x : ℝ) in a..b, f x ∂μ = ∫ (x : ℝ) in a..b, g x ∂μ


theorem N₂Γ₂_compatible_with_N₁Γ₀ (K : ChainComplex C ℕ) :
    N₂Γ₂.hom.app ((toKaroubi _).obj K) = N₂Γ₂ToKaroubiIso.hom.app K ≫ N₁Γ₀.hom.app K

AlgebraicTopology.DoldKan.N₂Γ₂.hom.app ((CategoryTheory.Idempotents.toKaroubi (ChainComplex C ℕ)).obj K) =
  AlgebraicTopology.DoldKan.N₂Γ₂ToKaroubiIso.hom.app K ≫ AlgebraicTopology.DoldKan.N₁Γ₀.hom.app K


theorem of_split [FormallySmooth R P] (g : A →ₐ[R] P ⧸ (RingHom.ker f.toRingHom) ^ 2)
    (hg : f.kerSquareLift.comp g = AlgHom.id R A) : FormallySmooth R A

(g : A →ₐ[R] P ⧸ RingHom.ker f.toRingHom ^ 2)


theorem evalRingHom_zero : evalRingHom 0 = constantCoeff

Polynomial.evalRingHom 0 = Polynomial.constantCoeff


@[simp]
theorem im_star : star a.im = -a.im


/-- `L/F` is a normal closure of `K/F` if the minimal polynomial of every element of `K` over `F`
  splits in `L`, and `L` is generated by roots of such minimal polynomials over `F`.
  (Since the minimal polynomial of a transcendental element is 0,
  the normal closure of `K/F` is the same as the normal closure over `F`
  of the algebraic closure of `F` in `K`.) -/
class IsNormalClosure : Prop where
  splits (x : K) : (minpoly F x).Splits (algebraMap F L)
  adjoin_rootSet : ⨆ x : K, adjoin F ((minpoly F x).rootSet L) = ⊤

{F : Type u_1}
{K : Type u_2}
{L : Type u_3}
[Field F]
[Field K]
[Field L]
[Algebra F K]
[Algebra F L]
[self : IsNormalClosure F K L]
(x : K)

Polynomial.Splits (algebraMap F L) (minpoly F x)


@[to_additive nsmul_zero, simp] lemma one_pow : ∀ n, (1 : M) ^ n = 1


theorem sub_add_inter (s t : Multiset α) : s - t + s ∩ t = s

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


theorem boundary_inf_le : ∂ (a ⊓ b) ≤ ∂ a ⊔ ∂ b

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

∂ (a ⊓ b) ≤ ∂ a ⊔ ∂ b


@[simp]
theorem edgeSet_sup : (G₁ ⊔ G₂).edgeSet = G₁.edgeSet ∪ G₂.edgeSet


theorem _root_.Complex.Gamma_ofReal (s : ℝ) : Complex.Gamma (s : ℂ) = Gamma s


/-- The constant functor `Jᵒᵖ ⥤ Cᵒᵖ` sending everything to `op X`
is (naturally isomorphic to) the opposite of the constant functor `J ⥤ C` sending everything to `X`.
-/
@[simps]
def opObjOp (X : C) : (const Jᵒᵖ).obj (op X) ≅ ((const J).obj X).op

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₂}
[CategoryTheory.Category.{v₂, u₂} C]
(X : C)
(j : Jᵒᵖ)

(CategoryTheory.Functor.const.opObjOp X).inv.app j = 𝟙 (((CategoryTheory.Functor.const J).obj X).op.obj j)


theorem HasFiniteIntegral.mono' {f : α → β} {g : α → ℝ} (hg : HasFiniteIntegral g μ)
    (h : ∀ᵐ a ∂μ, ‖f a‖ ≤ g a) : HasFiniteIntegral f μ

(hg : MeasureTheory.HasFiniteIntegral g μ)


@[to_additive nnnorm_le_pi_nnnorm]
lemma nnnorm_le_pi_nnnorm' (i : ι) : ‖f i‖₊ ≤ ‖f‖₊

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedGroup (π i)]
(f : (i : ι) → π i)
(i : ι)

‖f i‖₊ ≤ ‖f‖₊


@[simp]
theorem isPath_iff_eq_nil {u : V} (p : G.Walk u u) : p.IsPath ↔ p = nil

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


@[to_additive]
theorem mulSupport_mulIndicator_subset : mulSupport (s.mulIndicator f) ⊆ s

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


@[to_additive (attr := simp)]
theorem unsym_eq_one_iff [One α] (a : αˢʸᵐ) : unsym a = 1 ↔ a = 1


theorem geom_sum_Ico_le_of_lt_one [LinearOrderedField α] {x : α} (hx : 0 ≤ x) (h'x : x < 1)
    {m n : ℕ} : ∑ i ∈ Ico m n, x ^ i ≤ x ^ m / (1 - x)

{α : Type u}
[LinearOrderedField α]
{x : α}
(hx : 0 ≤ x)
(h'x : x < 1)
{m n : ℕ}

∑ i ∈ Finset.Ico m n, x ^ i ≤ x ^ m / (1 - x)


theorem mem_uIcc_of_le (ha : a ≤ x) (hb : x ≤ b) : x ∈ [[a, b]]

{α : Type u_2}
[Lattice α]
[LocallyFiniteOrder α]
{a b x : α}
(ha : a ≤ x)
(hb : x ≤ b)


@[to_additive]
protected theorem finset_prod' {γ} [CommMonoid β] [ContinuousMul β] {U : γ → ι → Ω → β}
    {s : Finset γ} (h : ∀ c ∈ s, ProgMeasurable f (U c)) : ProgMeasurable f (∏ c ∈ s, U c)

{U : γ → ι → Ω → β}

(h : ∀ c ∈ s, MeasureTheory.ProgMeasurable f (U c))

MeasureTheory.ProgMeasurable f (∑ c ∈ s, U c)


/-- If a function `f` is continuous on an open interval
and tends to the same value at its endpoints,
then it has a local extremum on this open interval. -/
lemma exists_isLocalExtr_Ioo_of_tendsto (hab : a < b) (hfc : ContinuousOn f (Ioo a b))
    (ha : Tendsto f (𝓝[>] a) (𝓝 l)) (hb : Tendsto f (𝓝[<] b) (𝓝 l)) :
    ∃ c ∈ Ioo a b, IsLocalExtr f c

{X : Type u_1}
{Y : Type u_2}
[ConditionallyCompleteLinearOrder X]
[DenselyOrdered X]
[TopologicalSpace X]
[OrderTopology X]
[LinearOrder Y]
[TopologicalSpace Y]
[OrderTopology Y]
{f : X → Y}
{a b : X}
{l : Y}
(hab : a < b)
(hfc : ContinuousOn f (Set.Ioo a b))
(ha : Filter.Tendsto f (𝓝[>] a) (𝓝 l))
(hb : Filter.Tendsto f (𝓝[<] b) (𝓝 l))


theorem Submartingale.stoppedValue_leastGE_eLpNorm_le' [IsFiniteMeasure μ]
    (hf : Submartingale f ℱ μ) (hr : 0 ≤ r) (hf0 : f 0 = 0)
    (hbdd : ∀ᵐ ω ∂μ, ∀ i, |f (i + 1) ω - f i ω| ≤ R) (i : ℕ) :
    eLpNorm (stoppedValue f (leastGE f r i)) 1 μ ≤
      ENNReal.toNNReal (2 * μ Set.univ * ENNReal.ofReal (r + R))

{f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

(hbdd : ∀ᵐ (ω : Ω) ∂μ, ∀ (i : ℕ), |f (i + 1) ω - f i ω| ≤ ↑R)

MeasureTheory.eLpNorm (MeasureTheory.stoppedValue f (MeasureTheory.leastGE f r i)) 1 μ ≤
  ↑(2 * μ Set.univ * ENNReal.ofReal (r + ↑R)).toNNReal


@[reassoc]
theorem associator_inv_naturality_right (f : a ⟶ b) (g : b ⟶ c) {h h' : c ⟶ d} (η : h ⟶ h') :
    f ◁ g ◁ η ≫ (α_ f g h').inv = (α_ f g h).inv ≫ (f ≫ g) ◁ η

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.whiskerLeft g η))
    (CategoryTheory.Bicategory.associator f g h').inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f g h).inv
    (CategoryTheory.Bicategory.whiskerLeft (CategoryTheory.CategoryStruct.comp f g) η)


protected theorem IsRotated.cyclicPermutations {l l' : List α} (h : l ~r l') :
    l.cyclicPermutations ~r l'.cyclicPermutations

{α : Type u}
{l l' : List α}
(h : l ~r l')


/-- `chainSup hu c hc ne hfin hU` is an upper bound of the chain `c`. -/
theorem le_chainSup {c : Set (PartialRefinement u s)} (hc : IsChain (· ≤ ·) c) (ne : c.Nonempty)
    (hfin : ∀ x ∈ s, { i | x ∈ u i }.Finite) (hU : s ⊆ ⋃ i, u i) {v} (hv : v ∈ c) :
    v ≤ chainSup c hc ne hfin hU

{c : Set (ShrinkingLemma.PartialRefinement u s)}

{v : ShrinkingLemma.PartialRefinement u s}

v ≤ ShrinkingLemma.PartialRefinement.chainSup c hc ne hfin hU


theorem insertWith.valid [IsTotal α (· ≤ ·)] [@DecidableRel α (· ≤ ·)] (f : α → α) (x : α)
    (hf : ∀ y, x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x) {t} (h : Valid t) : Valid (insertWith f x t)

(hf : ∀ (y : α), x ≤ y ∧ y ≤ x → x ≤ f y ∧ f y ≤ x)


theorem proj_symm_apply {x : B × F} (hx : x ∈ e.target) :
    proj (e.toPartialHomeomorph.symm x) = x.1

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{x : B × F}
(hx : x ∈ e.target)


/-- Extending a cone by a composition is the same as extending the cone twice. -/
@[simps!]
def extendComp (s : Cone F) {X Y : C} (f : X ⟶ Y) (g : Y ⟶ s.pt) :
    s.extend (f ≫ g) ≅ (s.extend g).extend f

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(s : CategoryTheory.Limits.Cone F)
{X Y : C}
(f : X ⟶ Y)
(g : Y ⟶ s.pt)

(CategoryTheory.Limits.Cones.extendComp s f g).hom.hom = 𝟙 X


theorem comp₂_eq_mk (g : β → γ → δ) (hg : Continuous (uncurry g)) (f₁ : α →ₘ[μ] β)
    (f₂ : α →ₘ[μ] γ) : comp₂ g hg f₁ f₂ = mk (fun a => g (f₁ a) (f₂ a))
      (hg.comp_aestronglyMeasurable (f₁.aestronglyMeasurable.prod_mk f₂.aestronglyMeasurable))

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
(g : β → γ → δ)
(hg : Continuous (Function.uncurry g))
(f₁ : α →ₘ[μ] β)
(f₂ : α →ₘ[μ] γ)

MeasureTheory.AEEqFun.comp₂ g hg f₁ f₂ = MeasureTheory.AEEqFun.mk (fun a => g (↑f₁ a) (↑f₂ a)) ⋯


@[simp]
protected theorem kahler (w z : ℂ) : Complex.orientation.kahler w z = conj w * z

(Complex.orientation.kahler w) z = (starRingEnd ℂ) w * z


@[to_additive]
theorem MonoidHom.map_cyclic {G : Type*} [Group G] [h : IsCyclic G] (σ : G →* G) :
    ∃ m : ℤ, ∀ g : G, σ g = g ^ m

{G : Type u_1}
[Group G]
[h : IsCyclic G]
(σ : G →* G)


theorem closure_reProdIm (s t : Set ℝ) : closure (s ×ℂ t) = closure s ×ℂ closure t


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


theorem card_rootsOfUnity (n : ℕ+) : Fintype.card (rootsOfUnity n ℂ) = n


/-- For a functor `G : J ⥤ K ⥤ C`, its limit `K ⥤ C` is given by `(G' : K ⥤ J ⥤ C) ⋙ lim`.
Note that this does not require `K` to be small.
-/
@[simps!]
def limitIsoSwapCompLim [HasLimitsOfShape J C] (G : J ⥤ K ⥤ C) :
    limit G ≅ curry.obj (Prod.swap K J ⋙ uncurry.obj G) ⋙ lim

(CategoryTheory.Limits.limitIsoSwapCompLim G).inv.app X =
  CategoryTheory.Limits.limMap ((CategoryTheory.flipIsoCurrySwapUncurry G).inv.app X) ≫
    (CategoryTheory.Limits.limitObjIsoLimitCompEvaluation G X).inv


@[to_additive (attr := simp)]
theorem lift_quot_mk {φ : G →* M} (HN : N ≤ φ.ker) (g : G) :
    lift N φ HN (Quot.mk _ g : Q) = φ g

{G : Type u}
[AddGroup G]
(N : AddSubgroup G)
[nN : N.Normal]
{M : Type x}
[AddMonoid M]
{φ : G →+ M}
(HN : N ≤ φ.ker)
(g : G)

(QuotientAddGroup.lift N φ HN) (Quot.mk Setoid.r g) = φ g


@[simp]
theorem lower_mem_Icc (I : Box ι) : I.lower ∈ Box.Icc I


@[simp]
theorem csSup_Ico [DenselyOrdered α] (h : a < b) : sSup (Ico a b) = b

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


/-- If a function is `C^n` on a set with `n ≥ 1`, then it is differentiable there. -/
theorem ContDiffOn.differentiableOn (h : ContDiffOn 𝕜 n f s) (hn : 1 ≤ n) :
    DifferentiableOn 𝕜 f s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{n : ℕ∞}
(h : ContDiffOn 𝕜 n f s)
(hn : 1 ≤ n)


@[simp]
lemma DifferentiableAt.sub_iff_left (hg : DifferentiableAt 𝕜 g x) :
    DifferentiableAt 𝕜 (fun y => f y - g y) x ↔ DifferentiableAt 𝕜 f x

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


nonrec theorem ZeroAtFilter.add [TopologicalSpace β] [AddZeroClass β] [ContinuousAdd β]
    {l : Filter α} {f g : α → β} (hf : ZeroAtFilter l f) (hg : ZeroAtFilter l g) :
    ZeroAtFilter l (f + g)

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
[AddZeroClass β]
[ContinuousAdd β]
{l : Filter α}
{f g : α → β}
(hf : l.ZeroAtFilter f)
(hg : l.ZeroAtFilter g)


/-- The image of `ExteriorAlgebra.ιMulti R n` is contained in the `n`th exterior power. -/
lemma ιMulti_range (n : ℕ) :
    Set.range (ιMulti R n (M := M)) ⊆ ↑(⋀[R]^n M)

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

Set.range ⇑(ExteriorAlgebra.ιMulti R n) ⊆ ↑(⋀[R]^n M)


theorem Periodic.neg_nat_mul [Ring α] (h : Periodic f c) (n : ℕ) : Periodic f (-(n * c))

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


theorem degree_add_C (hp : 0 < degree p) : degree (p + C a) = degree p

{R : Type u}
{a : R}
[Semiring R]
{p : R[X]}
(hp : 0 < p.degree)


theorem abelian_iff_derived_one_eq_bot : IsLieAbelian I ↔ derivedSeriesOfIdeal R L 1 I = ⊥

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

IsLieAbelian ↥↑I ↔ LieAlgebra.derivedSeriesOfIdeal R L 1 I = ⊥


theorem biInf_inf {p : ι → Prop} {f : ∀ i, p i → α} {a : α} (h : ∃ i, p i) :
    (⨅ (i) (h : p i), f i h) ⊓ a = ⨅ (i) (h : p i), f i h ⊓ a

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
{p : ι → Prop}
{f : (i : ι) → p i → α}
{a : α}
(h : ∃ i, p i)

(⨅ i, ⨅ (h : p i), f i h) ⊓ a = ⨅ i, ⨅ (h : p i), f i h ⊓ a


lemma restrict_comap (μ : Measure β) (s : Set α) :
    (μ.comap f).restrict s = (μ.restrict (f '' s)).comap f

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
{m1 : MeasurableSpace β}
{f : α → β}
(hf : MeasurableEmbedding f)
(μ : MeasureTheory.Measure β)
(s : Set α)

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


@[simp] lemma isNonZero_neg {α : Weight K H L} : (-α).IsNonZero ↔ α.IsNonZero

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


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

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : β →. γ)
(g : α →. β)
(a : α)


theorem Integrable.prod_smul {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
    {f : α → 𝕜} {g : β → E} (hf : Integrable f μ) (hg : Integrable g ν) :
    Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν)

{α : Type u_1}
{β : Type u_3}
{E : Type u_6}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[NormedAddCommGroup E]
[MeasureTheory.SFinite ν]
{𝕜 : Type u_7}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
{f : α → 𝕜}
{g : β → E}
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g ν)

MeasureTheory.Integrable (fun z => f z.1 • g z.2) (μ.prod ν)


theorem lintegral_rpow_nnnorm_eq_rpow_eLpNorm' {f : α → F} (hq0_lt : 0 < q) :
    ∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ q ∂μ = eLpNorm' f q μ ^ q

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}
(hq0_lt : 0 < q)

∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ = MeasureTheory.eLpNorm' f q μ ^ q


/-- Except possibly for itself, the neighbours of `t` in `G.replaceVertex s t` are the neighbours of
`s` in `G`. -/
lemma adj_replaceVertex_iff_of_ne_right {w : V} (hw : w ≠ t) :
    (G.replaceVertex s t).Adj t w ↔ G.Adj s w

{V : Type u_1}
[DecidableEq V]
(G : SimpleGraph V)
(s : V)
{t w : V}
(hw : w ≠ t)


protected theorem id : Computable (@id α)


/-- This mathematically trivial result is complementary to `norm_eq_one` below. -/
theorem norm_eq_neg_one_pow (hζ : IsPrimitiveRoot ζ 2) [IsDomain L] :
    norm K ζ = (-1 : K) ^ finrank K L

{K : Type u}
{L : Type v}
[CommRing L]
{ζ : L}
[Field K]
[Algebra K L]
(hζ : IsPrimitiveRoot ζ 2)
[IsDomain L]

(Algebra.norm K) ζ = (-1) ^ FiniteDimensional.finrank K L


@[simp] lemma add_modEq_left : n + a ≡ a [MOD n]


@[to_additive (attr := simp) toProd_nsmul]
theorem toProd_pow : (s ^ n).toProd = s.toProd ^ n

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

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


/-- Subtracting the second vector passed to `oangle` from the first vector does not change the
sign of the angle. -/
@[simp]
theorem oangle_sign_sub_left (x y : V) : (o.oangle (x - y) y).sign = (o.oangle x y).sign

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


theorem mul_scalar_mul [Monoid α] (x : Holor α []) (y : Holor α ds) :
    x ⊗ y = x ⟨[], Forall₂.nil⟩ • y

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


@[to_additive (attr := simp)]
theorem zpow_smul_mod_minimalPeriod (n : ℤ) :
    a ^ (n % (minimalPeriod (a • ·) b : ℤ)) • b = a ^ n • b

{α : Type v}
{G : Type u}
[AddGroup G]
[AddAction G α]
(a : G)
(b : α)
(n : ℤ)

(n % ↑(Function.minimalPeriod (fun x => a +ᵥ x) b)) • a +ᵥ b = n • a +ᵥ b


theorem set_biInter_inter (s t : Finset α) (u : α → Set β) :
    ⋂ x ∈ s ∪ t, u x = (⋂ x ∈ s, u x) ∩ ⋂ x ∈ t, u x

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
(s t : Finset α)
(u : α → Set β)


lemma δ_descCochain (n' : ℤ) (hn' : n + 1 = n') :
    δ n n' (descCochain φ α β h) =
      (fst φ).1.comp (δ m n α +
          n'.negOnePow • (Cochain.ofHom φ).comp β (zero_add n)) (by omega) +
      (snd φ).comp (δ n n' β) (zero_add n')

(α : CochainComplex.HomComplex.Cochain F K m)

(β : CochainComplex.HomComplex.Cochain G K n)

CochainComplex.HomComplex.δ n n' (CochainComplex.mappingCone.descCochain φ α β h) =
  (↑(CochainComplex.mappingCone.fst φ)).comp
      (CochainComplex.HomComplex.δ m n α + n'.negOnePow • (CochainComplex.HomComplex.Cochain.ofHom φ).comp β ⋯) ⋯ +
    (CochainComplex.mappingCone.snd φ).comp (CochainComplex.HomComplex.δ n n' β) ⋯


/-- The value of `χ₄ n`, for `n : ℤ`, depends only on `n % 4`. -/
theorem χ₄_int_mod_four (n : ℤ) : χ₄ n = χ₄ (n % 4 : ℤ)


@[simp]
theorem codeSupp_zero (k) : codeSupp Code.zero' k = trStmts₁ (trNormal Code.zero' k) ∪ contSupp k

Turing.PartrecToTM2.codeSupp Turing.ToPartrec.Code.zero' k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal Turing.ToPartrec.Code.zero' k) ∪
    Turing.PartrecToTM2.contSupp k


/-- The sum of two lower semicontinuous functions is lower semicontinuous. Formulated with
`[ContinuousAdd]`. The primed version of the lemma uses an explicit continuity assumption on
addition, for application to `EReal`. -/
theorem LowerSemicontinuousOn.add {f g : α → γ} (hf : LowerSemicontinuousOn f s)
    (hg : LowerSemicontinuousOn g s) : LowerSemicontinuousOn (fun z => f z + g z) s

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
{γ : Type u_4}
[LinearOrderedAddCommMonoid γ]
[TopologicalSpace γ]
[OrderTopology γ]
[ContinuousAdd γ]
{f g : α → γ}
(hf : LowerSemicontinuousOn f s)
(hg : LowerSemicontinuousOn g s)


theorem surjOn_Ioi_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f)
    (a : α) : SurjOn f (Ioi a) (Ioi (f a))

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

Set.SurjOn f (Set.Ioi a) (Set.Ioi (f a))


@[simp]
theorem cancel_right (hg : Surjective g) : f.comp g = f'.comp g ↔ f = f'

{R₁ : Type u_2}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M₁ : Type u_10}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
{module_M₁ : Module R₁ M₁}
{module_M₂ : Module R₂ M₂}
{module_M₃ : Module R₃ M₃}
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
{f : M₂ →ₛₗ[σ₂₃] M₃}
{g : M₁ →ₛₗ[σ₁₂] M₂}
{f' : M₂ →ₛₗ[σ₂₃] M₃}
(hg : Function.Surjective ⇑g)


@[to_additive]
theorem Pi.mulSingle_inv [∀ i, Group <| f i] (i : I) (x : f i) :
    mulSingle i x⁻¹ = (mulSingle i x)⁻¹

{I : Type u}
{f : I → Type v}
[DecidableEq I]
[(i : I) → Group (f i)]
(i : I)
(x : f i)

Pi.mulSingle i x⁻¹ = (Pi.mulSingle i x)⁻¹


theorem erase_insert {a : α} {s : Finset α} (h : a ∉ s) : erase (insert a s) a = s

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


/-- Multiplication of analytic functions (valued in a normed `𝕜`-algebra) is analytic. -/
lemma AnalyticAt.mul {f g : E → A} {z : E} (hf : AnalyticAt 𝕜 f z) (hg : AnalyticAt 𝕜 g z) :
    AnalyticAt 𝕜 (fun x ↦ f x * g x) z

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{A : Type u_8}
[NormedRing A]
[NormedAlgebra 𝕜 A]
{f g : E → A}
{z : E}
(hf : AnalyticAt 𝕜 f z)
(hg : AnalyticAt 𝕜 g z)


protected theorem Filter.EventuallyEq.deriv (h : f₁ =ᶠ[𝓝 x] f) : deriv f₁ =ᶠ[𝓝 x] deriv f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : 𝕜 → F}
{x : 𝕜}
(h : f₁ =ᶠ[𝓝 x] f)


theorem Associates.le_singleton_iff (x : A) (n : ℕ) (I : Ideal A) :
    Associates.mk I ^ n ≤ Associates.mk (Ideal.span {x}) ↔ x ∈ I ^ n

{A : Type u_2}
[CommRing A]
[IsDedekindDomain A]
(x : A)
(n : ℕ)
(I : Ideal A)


theorem exp_sub : exp (x - y) = exp x / exp y

Real.exp (x - y) = Real.exp x / Real.exp y


theorem add_apply [AddZeroClass β] [ContinuousAdd β] (f g : C₀(α, β)) : (f + g) x = f x + g x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
(x : α)
[AddZeroClass β]
[ContinuousAdd β]
(f g : α →C₀ β)


@[to_additive]
theorem mulRothNumber_spec :
    ∃ t ⊆ s, t.card = mulRothNumber s ∧ ThreeGPFree (t : Set α)

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

∃ t ⊆ s, t.card = addRothNumber s ∧ ThreeAPFree ↑t


theorem iterate_verschiebung_mul (x y : 𝕎 R) (i j : ℕ) :
    verschiebung^[i] x * verschiebung^[j] y =
      verschiebung^[i + j] (frobenius^[j] x * frobenius^[i] y)

{p : ℕ}
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CharP R p]
(x y : WittVector p R)
(i j : ℕ)

(⇑WittVector.verschiebung)^[i] x * (⇑WittVector.verschiebung)^[j] y =
  (⇑WittVector.verschiebung)^[i + j] ((⇑WittVector.frobenius)^[j] x * (⇑WittVector.frobenius)^[i] y)


/-- A group homomorphism sends inverses to inverses. -/
@[to_additive "An additive group homomorphism sends negations to negations."]
theorem map_inv (hf : IsGroupHom f) (a : α) : f a⁻¹ = (f a)⁻¹

{α : Type u}
{β : Type v}
[Group α]
[Group β]
{f : α → β}
(hf : IsGroupHom f)
(a : α)


theorem bsup_succ_of_mono {o : Ordinal} {f : ∀ a < succ o, Ordinal}
    (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) : bsup _ f = f o (lt_succ o)

{f : (a : Ordinal.{u_4}) → a < Order.succ o → Ordinal.{max u_4 u_5}}

(hf : ∀ {i j : Ordinal.{u_4}} (hi : i < Order.succ o) (hj : j < Order.succ o), i ≤ j → f i hi ≤ f j hj)


@[simp]
theorem valuation_map_mul {x y : ℚ_[p]} (hx : x ≠ 0) (hy : y ≠ 0) :
    valuation (x * y : ℚ_[p]) = valuation x + valuation y

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{x y : ℚ_[p]}
(hx : x ≠ 0)
(hy : y ≠ 0)

(x * y).valuation = x.valuation + y.valuation


@[to_additive] lemma min_le_max_of_mul_le_mul
    [CovariantClass α α (· * ·) (· < ·)] [CovariantClass α α (swap (· * ·)) (· < ·)]
    (h : a * b ≤ c * d) : min a b ≤ max c d

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

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


/-- The "restriction" functor along a monoid homomorphism `f : G ⟶ H`,
taking actions of `H` to actions of `G`.

(This makes sense for any homomorphism, but the name is natural when `f` is a monomorphism.)
-/
@[simps]
def res {G H : MonCat} (f : G ⟶ H) : Action V H ⥤ Action V G

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

∀ {X Y : Action V H} (p : X ⟶ Y), ((Action.res V f).map p).hom = p.hom


lemma isSheafProfinite
    [∀ Y, HasLimitsOfShape (StructuredArrow Y profiniteToCompHaus.{u}.op) A] :
    Presheaf.IsSheaf (coherentTopology Profinite)
    (profiniteToCompHaus.op ⋙ X.val)

[∀ (Y : CompHausᵒᵖ), CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.StructuredArrow Y profiniteToCompHaus.op) A]

CategoryTheory.Presheaf.IsSheaf (CategoryTheory.coherentTopology Profinite) (profiniteToCompHaus.op ⋙ X.val)


/-- An element `a` of a semigroup with a distributive negation divides the negation of an element
`b` iff `a` divides `b`. -/
@[simp]
theorem dvd_neg : a ∣ -b ↔ a ∣ b

{α : Type u_1}
[Semigroup α]
[HasDistribNeg α]
{a b : α}


/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E → F} (fa : AnalyticOn 𝕜 f univ) : Continuous f

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(fa : AnalyticOn 𝕜 f Set.univ)


@[simp]
theorem X_ne_zero [Nontrivial R] : (X : R⟦X⟧) ≠ 0

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


theorem diag_inter : (s ∩ t).diag = s.diag ∩ t.diag

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


theorem get_last {as : List α} {i : Fin (length (as ++ [a]))} (h : ¬ i.1 < as.length) : (as ++ [a] : List _).get i = a

{α : Type u_1}
{a : α}
{as : List α}
{i : Fin (as ++ [a]).length}
(h : ¬↑i < as.length)


lemma continuous_from_uCompactlyGeneratedSpace {X : Type w} [TopologicalSpace X]
    [UCompactlyGeneratedSpace.{u} X] {Y : Type*} [TopologicalSpace Y] (f : X → Y)
      (h : ∀ (S : CompHaus.{u}) (g : C(S, X)), Continuous (f ∘ g)) : Continuous f

(h : ∀ (S : CompHaus) (g : C(↑S.toTop, X)), Continuous (f ∘ ⇑g))


@[to_additive (attr := simp)]
theorem mk_zpow (a : G) (n : ℤ) : ((a ^ n : G) : Q) = (a : Q) ^ n

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


/-- For any endomorphism of an Artinian module, any sufficiently high iterate has codisjoint kernel
and range. -/
theorem eventually_codisjoint_ker_pow_range_pow (f : M →ₗ[R] M) :
    ∀ᶠ n in atTop, Codisjoint (LinearMap.ker (f ^ n)) (LinearMap.range (f ^ n))

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsArtinian R M]
(f : M →ₗ[R] M)

∀ᶠ (n : ℕ) in Filter.atTop, Codisjoint (LinearMap.ker (f ^ n)) (LinearMap.range (f ^ n))


@[simp]
lemma δ_eq_zero {n : ℤ} (z : Cocycle F G n) (m : ℤ) : δ n m (z : Cochain F G n) = 0

(z : CochainComplex.HomComplex.Cocycle F G n)


theorem measurable_spanningSets (μ : Measure α) [SigmaFinite μ] (i : ℕ) :
    MeasurableSet (spanningSets μ i)

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]
(i : ℕ)

MeasurableSet (MeasureTheory.spanningSets μ i)


@[to_additive]
theorem ContinuousWithinAt.smul (hf : ContinuousWithinAt f s b) (hg : ContinuousWithinAt g s b) :
    ContinuousWithinAt (fun x => f x • g x) s b

{M : Type u_1}
{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace M]
[TopologicalSpace X]
[TopologicalSpace Y]
[SMul M X]
[ContinuousSMul M X]
{f : Y → M}
{g : Y → X}
{b : Y}
{s : Set Y}
(hf : ContinuousWithinAt f s b)
(hg : ContinuousWithinAt g s b)


theorem nhdsWithin_coe (s : Set (OnePoint X)) (x : X) : 𝓝[s] ↑x = map (↑) (𝓝[(↑) ⁻¹' s] x)

{X : Type u_1}
[TopologicalSpace X]
(s : Set (OnePoint X))
(x : X)

𝓝[s] ↑x = Filter.map OnePoint.some (𝓝[OnePoint.some ⁻¹' s] x)


theorem dvd_of_ysq_dvd {n t} (h : yn a1 n * yn a1 n ∣ yn a1 t) : yn a1 n ∣ t

(h : Pell.yn a1 n * Pell.yn a1 n ∣ Pell.yn a1 t)


theorem moveLeft_lf {x : PGame} : ∀ i, x.moveLeft i ⧏ x


@[simp] theorem associator_inv_apply_2 {X Y Z : Type u} {x} :
    (((α_ X Y Z).inv : X ⊗ Y ⊗ Z → (X ⊗ Y) ⊗ Z) x).2 = x.2.2


theorem image_insert_eq {f : α → β} {a : α} {s : Set α} :
    f '' insert a s = insert (f a) (f '' s)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{a : α}
{s : Set α}


lemma ringEquivCongr_intCast {a b : ℕ} (h : a = b) (z : ℤ) :
    ZMod.ringEquivCongr h z = z


@[simp] theorem size_reverse (a : Array α) : a.reverse.size = a.size


theorem coe_fill {a : α} {i : Fin (n + 1)} {m : Sym α (n - i)} :
    (fill a i m : Multiset α) = m + replicate i a

↑(Sym.fill a i m) = ↑m + ↑(Sym.replicate (↑i) a)


@[simp] lemma antidiagonal_filter_snd_le_of_le {n k : ℕ} (h : k ≤ n) :
    (antidiagonal n).filter (fun a ↦ a.snd ≤ k) = (antidiagonal k).map
      (Embedding.prodMap ⟨_, add_left_injective (n - k)⟩ (Embedding.refl ℕ))

Finset.filter (fun a => a.2 ≤ k) (Finset.antidiagonal n) =
  Finset.map ({ toFun := fun x => x + (n - k), inj' := ⋯ }.prodMap (Function.Embedding.refl ℕ)) (Finset.antidiagonal k)


theorem toNonUnitalSemiring_injective :
    Function.Injective (@toNonUnitalSemiring R)


theorem colimit_eq_iff {i j : J} {xi : F.obj i} {xj : F.obj j} :
    colimit.ι F i xi = colimit.ι F j xj ↔
      ∃ (k : _) (f : i ⟶ k) (g : j ⟶ k), F.map f xi = F.map g xj

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ Type u)
[CategoryTheory.IsFilteredOrEmpty J]
[CategoryTheory.Limits.HasColimit F]
{i j : J}
{xi : F.obj i}
{xj : F.obj j}

CategoryTheory.Limits.colimit.ι F i xi = CategoryTheory.Limits.colimit.ι F j xj ↔ ∃ k f g, F.map f xi = F.map g xj


@[simp]
theorem dedup_cons_of_mem {a : α} {s : Multiset α} : a ∈ s → dedup (a ::ₘ s) = dedup s

{α : Type u_1}
[DecidableEq α]
{a : α}
{s : Multiset α}


/-- The isomorphism `mapBifunctorMapObj F p X₁ Y₁ ≅ mapBifunctorMapObj F p X₂ Y₂`
induced by isomorphisms `X₁ ≅ X₂` and `Y₁ ≅ Y₂`. -/
@[simps]
noncomputable def mapBifunctorMapMapIso (e : X₁ ≅ X₂) (e' : Y₁ ≅ Y₂) :
    mapBifunctorMapObj F p X₁ Y₁ ≅ mapBifunctorMapObj F p X₂ Y₂

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

{X₁ X₂ : CategoryTheory.GradedObject I C₁}

{Y₁ Y₂ : CategoryTheory.GradedObject J C₂}

[(((CategoryTheory.GradedObject.mapBifunctor F I J).obj X₁).obj Y₁).HasMap p]

[(((CategoryTheory.GradedObject.mapBifunctor F I J).obj X₂).obj Y₂).HasMap p]

(CategoryTheory.GradedObject.mapBifunctorMapMapIso F p e e').inv i =
  CategoryTheory.GradedObject.mapBifunctorMapMap F p e.inv e'.inv i


theorem setToL1SCLM_add_left (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (f : α →₁ₛ[μ] E) :
    setToL1SCLM α E μ (hT.add hT') f = setToL1SCLM α E μ hT f + setToL1SCLM α E μ hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hT' : MeasureTheory.DominatedFinMeasAdditive μ T' C')

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

(MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ ⋯) f =
  (MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT) f + (MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT') f


theorem nhds_bot : 𝓝 (⊥ : EReal) = ⨅ (a) (_ : a ≠ ⊥), 𝓟 (Iio a)


/-- `bindOnSupport` reduces to `bind` if `f` doesn't depend on the additional hypothesis. -/
@[simp]
theorem bindOnSupport_eq_bind (p : PMF α) (f : α → PMF β) :
    (p.bindOnSupport fun a _ => f a) = p.bind f

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

(p.bindOnSupport fun a x => f a) = p.bind f


protected theorem mul_sub_right_distrib (n m k : Nat) : (n - m) * k = n * k - m * k


@[to_additive]
theorem orderOf_eq_card_of_forall_mem_zpowers [Fintype α] {g : α} (hx : ∀ x, x ∈ zpowers g) :
    orderOf g = Fintype.card α

(hx : ∀ (x : α), x ∈ Subgroup.zpowers g)


theorem restrict_iUnion_ae [Countable ι] {s : ι → Set α} (hd : Pairwise (AEDisjoint μ on s))
    (hm : ∀ i, NullMeasurableSet (s i) μ) : μ.restrict (⋃ i, s i) = sum fun i => μ.restrict (s i)

(hd : Pairwise (MeasureTheory.AEDisjoint μ on s))

(hm : ∀ (i : ι), MeasureTheory.NullMeasurableSet (s i) μ)

μ.restrict (⋃ i, s i) = MeasureTheory.Measure.sum fun i => μ.restrict (s i)


/-- For normed groups, an operator is zero iff its norm vanishes. -/
theorem opNorm_zero_iff {V₁ V₂ : Type*} [NormedAddCommGroup V₁] [NormedAddCommGroup V₂]
    {f : NormedAddGroupHom V₁ V₂} : ‖f‖ = 0 ↔ f = 0

{V₁ : Type u_5}
{V₂ : Type u_6}
[NormedAddCommGroup V₁]
[NormedAddCommGroup V₂]
{f : NormedAddGroupHom V₁ V₂}


/-- Express Fourier coefficients of `f` on an interval in terms of those of its derivative. -/
theorem fourierCoeffOn_of_hasDeriv_right {a b : ℝ} (hab : a < b) {f f' : ℝ → ℂ}
    {n : ℤ} (hn : n ≠ 0)
    (hf : ContinuousOn f [[a, b]])
    (hff' : ∀ x, x ∈ Ioo (min a b) (max a b) → HasDerivWithinAt f (f' x) (Ioi x) x)
    (hf' : IntervalIntegrable f' volume a b) :
    fourierCoeffOn hab f n = 1 / (-2 * π * I * n) *
      (fourier (-n) (a : AddCircle (b - a)) * (f b - f a) - (b - a) * fourierCoeffOn hab f' n)

(hff' : ∀ x ∈ Set.Ioo (min a b) (max a b), HasDerivWithinAt f (f' x) (Set.Ioi x) x)

(hf' : IntervalIntegrable f' MeasureTheory.volume a b)

fourierCoeffOn hab f n =
  1 / (-2 * ↑π * Complex.I * ↑n) * ((fourier (-n)) ↑a * (f b - f a) - (↑b - ↑a) * fourierCoeffOn hab f' n)


@[simp]
lemma rpow_ofNat (x : ℝ≥0) (n : ℕ) [n.AtLeastTwo] :
    x ^ (no_index (OfNat.ofNat n) : ℝ) = x ^ (OfNat.ofNat n : ℕ)


/-- If `1 ≤ n`, then `seminormFromConst_seq c f 1 n = 1`. -/
theorem seminormFromConst_seq_one (n : ℕ) (hn : 1 ≤ n) : seminormFromConst_seq c f 1 n = 1

{R : Type u_1}
[CommRing R]
{c : R}
{f : RingSeminorm R}
(hc : f c ≠ 0)
(hpm : IsPowMul ⇑f)
(n : ℕ)
(hn : 1 ≤ n)


theorem Adapted.isStoppingTime_crossing (hf : Adapted ℱ f) :
    IsStoppingTime ℱ (upperCrossingTime a b f N n) ∧
      IsStoppingTime ℱ (lowerCrossingTime a b f N n)

{Ω : Type u_1}
{m0 : MeasurableSpace Ω}
{a b : ℝ}
{f : ℕ → Ω → ℝ}
{N n : ℕ}
{ℱ : MeasureTheory.Filtration ℕ m0}
(hf : MeasureTheory.Adapted ℱ f)

MeasureTheory.IsStoppingTime ℱ (MeasureTheory.upperCrossingTime a b f N n) ∧
  MeasureTheory.IsStoppingTime ℱ (MeasureTheory.lowerCrossingTime a b f N n)


@[to_additive (attr := simp)]
theorem inv_inv_iff : Commute a⁻¹ b⁻¹ ↔ Commute a b

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


@[simp]
theorem rangeFactorization_coe (f : ι → β) (a : ι) : (rangeFactorization f a : β) = f a

{β : Type u_2}
{ι : Sort u_4}
(f : ι → β)
(a : ι)


theorem not_mem_of_max_lt {s : Finset α} {a b : α} (h₁ : b < a) (h₂ : s.max = ↑b) : a ∉ s

{α : Type u_2}
[LinearOrder α]
{s : Finset α}
{a b : α}
(h₁ : b < a)
(h₂ : s.max = ↑b)


@[simp]
theorem inr_top [LE α] [LE β] [OrderTop β] : toLex (inr ⊤ : α ⊕ β) = ⊤

{α : Type u_1}
{β : Type u_2}
[LE α]
[LE β]
[OrderTop β]


/-- The set of Liouville numbers has Lebesgue measure zero. -/
@[simp]
theorem volume_setOf_liouville : volume { x : ℝ | Liouville x } = 0

MeasureTheory.volume {x | Liouville x} = 0


@[to_additive]
theorem EventuallyEq.div [Div β] {f f' g g' : α → β} {l : Filter α} (h : f =ᶠ[l] g)
    (h' : f' =ᶠ[l] g') : (fun x => f x / f' x) =ᶠ[l] fun x => g x / g' x

{α : Type u}
{β : Type v}
[Div β]
{f f' g g' : α → β}
{l : Filter α}
(h : f =ᶠ[l] g)
(h' : f' =ᶠ[l] g')


/-- The currying functor, taking a functor `(C × D) ⥤ E` and producing a functor `C ⥤ (D ⥤ E)`.
-/
@[simps! obj_obj_obj obj_obj_map obj_map_app map_app_app]
def curry : (C × D ⥤ E) ⥤ C ⥤ D ⥤ E

{C : Type u₂}
[CategoryTheory.Category.{v₂, u₂} C]
{D : Type u₃}
[CategoryTheory.Category.{v₃, u₃} D]
{E : Type u₄}
[CategoryTheory.Category.{v₄, u₄} E]
(F : CategoryTheory.Functor (C × D) E)
(X : C)

∀ {X_1 Y : D} (g : X_1 ⟶ Y), ((CategoryTheory.curry.obj F).obj X).map g = F.map (CategoryTheory.CategoryStruct.id X, g)


/-- The data we need to pick a normal form for words in the pushout. We need to pick a
canonical element of each coset. We also need all the maps in the diagram to be injective  -/
structure Transversal : Type _ where
  /-- All maps in the diagram are injective -/
  injective : ∀ i, Injective (φ i)
  /-- The underlying set, containing exactly one element of each coset of the base group -/
  set : ∀ i, Set (G i)
  /-- The chosen element of the base group itself is the identity -/
  one_mem : ∀ i, 1 ∈ set i
  /-- We have exactly one element of each coset of the base group -/
  compl : ∀ i, IsComplement (φ i).range (set i)

(self : Monoid.PushoutI.NormalWord.Transversal φ)

Subgroup.IsComplement (↑(φ i).range) (self.set i)


theorem succ_pred_eq_of_pos : ∀ {n}, 0 < n → succ (pred n) = n


@[simps]
instance homCategory (𝒳 : BasedCategory.{v₂, u₂} 𝒮) (𝒴 : BasedCategory.{v₃, u₃} 𝒮) :
    Category (𝒳 ⥤ᵇ 𝒴)

{𝒮 : Type u₁}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
(𝒳 : CategoryTheory.BasedCategory 𝒮)
(𝒴 : CategoryTheory.BasedCategory 𝒮)
(F : CategoryTheory.BasedFunctor 𝒳 𝒴)

CategoryTheory.CategoryStruct.id F = CategoryTheory.BasedNatTrans.id F


@[to_additive]
theorem Integrable.comp_mul_left {f : G → F} [IsMulLeftInvariant μ] (hf : Integrable f μ) (g : G) :
    Integrable (fun t => f (g * t)) μ

{G : Type u_4}
{F : Type u_6}
[MeasurableSpace G]
[NormedAddCommGroup F]
{μ : MeasureTheory.Measure G}
[Group G]
[MeasurableMul G]
{f : G → F}
[μ.IsMulLeftInvariant]
(hf : MeasureTheory.Integrable f μ)
(g : G)

MeasureTheory.Integrable (fun t => f (g * t)) μ


@[simp]
theorem not_isComplex_iff_isReal {w : InfinitePlace K} : ¬IsComplex w ↔ IsReal w

{K : Type u_2}
[Field K]
{w : NumberField.InfinitePlace K}


/-- Add extra prefix to context-free producing. -/
lemma Produces.append_left {v w : List (Symbol T g.NT)}
    (hvw : g.Produces v w) (p : List (Symbol T g.NT)) :
    g.Produces (p ++ v) (p ++ w)

{T : Type uT}
{g : ContextFreeGrammar T}
{v w : List (Symbol T g.NT)}
(hvw : g.Produces v w)
(p : List (Symbol T g.NT))


@[simp]
theorem ofRealAm_coe : ⇑ofRealAm = ((↑) : ℝ → ℂ)


@[to_additive]
theorem one_lt_of_lt_mul_right [ContravariantClass α α (· * ·) (· < ·)] {a b : α} (h : a < a * b) :
    1 < b

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


theorem head_terminates_iff (s : WSeq α) : Terminates (head s) ↔ Terminates (destruct s)


theorem coe_injective : @Function.Injective (SummableFamily Γ R α) (α → HahnSeries Γ R) (⇑)

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommMonoid R]
{α : Type u_3}


theorem map_isPrime_of_surjective {f : F} (hf : Function.Surjective f) {I : Ideal R} [H : IsPrime I]
    (hk : RingHom.ker f ≤ I) : IsPrime (map f I)

{R : Type u_1}
{S : Type u_2}
{F : Type u_3}
[Ring R]
[Ring S]
[FunLike F R S]
[rc : RingHomClass F R S]
{f : F}
(hf : Function.Surjective ⇑f)
{I : Ideal R}
[H : I.IsPrime]
(hk : RingHom.ker f ≤ I)


theorem elim_const_const (c : γ) :
    Sum.elim (const _ c : α → γ) (const _ c : β → γ) = const _ c

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

Sum.elim (Function.const α c) (Function.const β c) = Function.const (α ⊕ β) c


protected theorem mul_ne_zero : n ≠ 0 → m ≠ 0 → n * m ≠ 0


@[simp]
lemma sFiniteSeq_zero (n : ℕ) : sFiniteSeq (0 : Measure α) n = 0

{α : Type u_1}
{m0 : MeasurableSpace α}
(n : ℕ)


theorem posMulMono_iff_covariant_pos :
    PosMulMono α ↔ CovariantClass α>0 α (fun x y => x * y) (· ≤ ·)

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

PosMulMono α ↔ CovariantClass { x // 0 < x } α (fun x y => ↑x * y) fun x x_1 => x ≤ x_1


theorem dvd_factorial : ∀ {m n}, 0 < m → m ≤ n → m ∣ n !


theorem approx_mono (c : CU P) (x : X) : Monotone fun n => c.approx n x

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

Monotone fun n => Urysohns.CU.approx n c x


theorem mem_reesAlgebra_iff_support (f : R[X]) :
    f ∈ reesAlgebra I ↔ ∀ i ∈ f.support, f.coeff i ∈ I ^ i

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


theorem act_rel_of_rel_of_act_rel (ab : r a b) (rl : r (μ m b) c) : r (μ m a) c

{M : Type u_1}
{N : Type u_2}
{μ : M → N → N}
{r : N → N → Prop}
[CovariantClass M N μ r]
[IsTrans N r]
(m : M)
{a b c : N}
(ab : r a b)
(rl : r (μ m b) c)


/-- The functor `SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ)` which maps
`X` to the formal direct factor of `K[X]` defined by `PInfty`. -/
@[simps]
def N₁ : SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ)

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(X : CategoryTheory.SimplicialObject C)

(AlgebraicTopology.DoldKan.N₁.obj X).p = AlgebraicTopology.DoldKan.PInfty


@[simp] theorem head?_nil : @head? α [] = none


@[simp]
theorem neg_pi_div_two_lt_arcsin {x : ℝ} : -(π / 2) < arcsin x ↔ -1 < x


/-- To construct an isomorphism of costructured arrows,
we need an isomorphism of the objects underlying the source,
and to check that the triangle commutes.
-/
@[simps!]
def isoMk {f f' : CostructuredArrow S T} (g : f.left ≅ f'.left)
    (w : S.map g.hom ≫ f'.hom = f.hom := by aesop_cat) : f ≅ f'

{f f' : CategoryTheory.CostructuredArrow S T}

(w : CategoryTheory.CategoryStruct.comp (S.map g.hom) f'.hom = f.hom := by aesop_cat)

(CategoryTheory.CostructuredArrow.isoMk g w).inv.left = g.inv


theorem comul_comp_fst :
    comul ∘ₗ .fst R A B = TensorProduct.map (.fst R A B) (.fst R A B) ∘ₗ comul

(R : Type u)
(A : Type v)
(B : Type w)
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[Coalgebra R A]
[Coalgebra R B]

Coalgebra.comul ∘ₗ LinearMap.fst R A B =
  TensorProduct.map (LinearMap.fst R A B) (LinearMap.fst R A B) ∘ₗ Coalgebra.comul


theorem mem_span_singleton_sup {S : Type*} [CommSemiring S] {x y : S} {I : Ideal S} :
    x ∈ Ideal.span {y} ⊔ I ↔ ∃ a : S, ∃ b ∈ I, a * y + b = x

{S : Type u_1}
[CommSemiring S]
{x y : S}
{I : Ideal S}

x ∈ Ideal.span {y} ⊔ I ↔ ∃ a, ∃ b ∈ I, a * y + b = x


theorem Subspace.exists_eq_top_of_biUnion_eq_univ (hcovers : ⋃ p ∈ s, (p : Set E) = Set.univ) :
    ∃ p ∈ s, p = ⊤

{k : Type u_1}
{E : Type u_2}
[DivisionRing k]
[Infinite k]
[AddCommGroup E]
[Module k E]
{s : Finset (Subspace k E)}
(hcovers : ⋃ p ∈ s, ↑p = Set.univ)


/-- Reinterpret `G ≃+ H` as `Multiplicative G ≃* Multiplicative H`. -/
@[simps]
def AddEquiv.toMultiplicative [AddZeroClass G] [AddZeroClass H] :
    G ≃+ H ≃ (Multiplicative G ≃* Multiplicative H)

(f : Multiplicative G ≃* Multiplicative H)

(AddEquiv.toMultiplicative.symm f).symm a = (AddMonoidHom.toMultiplicative.symm f.symm.toMonoidHom) a


theorem coeFn_compQuasiMeasurePreserving (g : β →ₘ[ν] γ) (hf : QuasiMeasurePreserving f μ ν) :
    g.compQuasiMeasurePreserving f hf =ᵐ[μ] g ∘ f

(hf : MeasureTheory.Measure.QuasiMeasurePreserving f μ ν)

↑(g.compQuasiMeasurePreserving f hf) =ᵐ[μ] ↑g ∘ f


@[simp]
theorem out_top : (⊤ : Associates α).out = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]


theorem isLocalMaxOn_const {b : β} : IsLocalMaxOn (fun _ => b) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{s : Set α}
{a : α}
{b : β}


/-- If two additive homomorphisms from `α →₀ M` are equal on each `single a b`,
then they are equal.

We formulate this using equality of `AddMonoidHom`s so that `ext` tactic can apply a type-specific
extensionality lemma after this one.  E.g., if the fiber `M` is `ℕ` or `ℤ`, then it suffices to
verify `f (single a 1) = g (single a 1)`. -/
@[ext high]
theorem addHom_ext' [AddZeroClass N] ⦃f g : (α →₀ M) →+ N⦄
    (H : ∀ x, f.comp (singleAddHom x) = g.comp (singleAddHom x)) : f = g

(H : ∀ (x : α), f.comp (Finsupp.singleAddHom x) = g.comp (Finsupp.singleAddHom x))


theorem leval_coe_eq_smeval {R : Type*} [Semiring R] (r : R) :
    ⇑(leval r) = fun p => p.smeval r

⇑(Polynomial.leval r) = fun p => p.smeval r


theorem Perm.foldr_eq {f : α → β → β} {l₁ l₂ : List α} (lcomm : LeftCommutative f) (p : l₁ ~ l₂) :
    ∀ b, foldr f b l₁ = foldr f b l₂

{α : Type u_1}
{β : Type u_2}
{f : α → β → β}
{l₁ l₂ : List α}
(lcomm : LeftCommutative f)
(p : l₁.Perm l₂)
(b : β)


@[to_additive]
theorem powers_eq_top_of_prime_card {G : Type*} [Group G] {_ : Fintype G} {p : ℕ}
    [hp : Fact p.Prime] (h : Fintype.card G = p) {g : G} (hg : g ≠ 1) : Submonoid.powers g = ⊤

∀ {x : Fintype G} {p : ℕ} [hp : Fact (Nat.Prime p)],
  Fintype.card G = p → ∀ {g : G}, g ≠ 0 → AddSubmonoid.multiples g = ⊤


@[to_additive]
lemma fst_mem_orbit_of_mem_orbit {x y : α × β} (h : x ∈ MulAction.orbit M y) :
    x.1 ∈ MulAction.orbit M y.1

{M : Type u}
[Monoid M]
{α : Type v}
[MulAction M α]
{β : Type u_1}
[MulAction M β]
{x y : α × β}
(h : x ∈ MulAction.orbit M y)


theorem simpleFunc_bot' {α} [Nonempty β] (f : @SimpleFunc α ⊥ β) :
    ∃ c, f = @SimpleFunc.const α _ ⊥ c

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

∃ c, f = MeasureTheory.SimpleFunc.const α c


@[simp]
theorem conj_mul (z w : 𝔻) : (z * w).conj = z.conj * w.conj


/-- If a function converges to a nonzero value, its inverse converges to the inverse of this value.
We use the name `Filter.Tendsto.inv₀` as `Filter.Tendsto.inv` is already used in multiplicative
topological groups. -/
theorem Filter.Tendsto.inv₀ {a : G₀} (hf : Tendsto f l (𝓝 a)) (ha : a ≠ 0) :
    Tendsto (fun x => (f x)⁻¹) l (𝓝 a⁻¹)

{α : Type u_1}
{G₀ : Type u_3}
[Zero G₀]
[Inv G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
{l : Filter α}
{f : α → G₀}
{a : G₀}
(hf : Filter.Tendsto f l (𝓝 a))
(ha : a ≠ 0)

Filter.Tendsto (fun x => (f x)⁻¹) l (𝓝 a⁻¹)


theorem elim_comp₂ (h : α → β → γ) {f : γ → α} {x : α} {g : γ → β} {y : β}
    {i : Option γ} : (i.elim (h x y) fun j => h (f j) (g j)) = h (i.elim x f) (i.elim y g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(h : α → β → γ)
{f : γ → α}
{x : α}
{g : γ → β}
{y : β}
{i : Option γ}


@[simp]
theorem pointwise_smul_le_pointwise_smul_iff₀ {a : M} (ha : a ≠ 0) {S T : Subring R} :
    a • S ≤ a • T ↔ S ≤ T

{M : Type u_1}
{R : Type u_2}
[GroupWithZero M]
[Ring R]
[MulSemiringAction M R]
{a : M}
(ha : a ≠ 0)
{S T : Subring R}


/-- Formula for `hurwitzZetaOdd` as a Dirichlet series in the convergence range (sum over `ℤ`). -/
theorem hasSum_int_hurwitzZetaOdd (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℤ ↦ SignType.sign (n + a) / (↑|n + a| : ℂ) ^ s / 2) (hurwitzZetaOdd a s)

HasSum (fun n => ↑(SignType.sign (↑n + a)) / ↑|↑n + a| ^ s / 2) (HurwitzZeta.hurwitzZetaOdd (↑a) s)


/-- If an element `x` is a root of a polynomial `p`, then the minimal polynomial of `x` divides `p`.
See also `minpoly.isIntegrallyClosed_dvd` which relaxes the assumptions on `A` in exchange for
stronger assumptions on `B`. -/
theorem dvd {p : A[X]} (hp : Polynomial.aeval x p = 0) : minpoly A x ∣ p

(A : Type u_1)
{B : Type u_2}
[Field A]
[Ring B]
[Algebra A B]
(x : B)
{p : A[X]}
(hp : (Polynomial.aeval x) p = 0)


theorem image_preimage_eq_of_subset {f : α → β} {s : Set β} (hs : s ⊆ range f) :
    f '' (f ⁻¹' s) = s

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s : Set β}
(hs : s ⊆ Set.range f)


theorem support_normed_eq : Function.support (f.normed μ) = Metric.ball c f.rOut


@[simp]
theorem count_inter (a : α) (s t : Multiset α) : count a (s ∩ t) = min (count a s) (count a t)

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

Multiset.count a (s ∩ t) = min (Multiset.count a s) (Multiset.count a t)


lemma differentiable_completedHurwitzZetaOdd (a : UnitAddCircle) :
    Differentiable ℂ (completedHurwitzZetaOdd a)

Differentiable ℂ (HurwitzZeta.completedHurwitzZetaOdd a)


@[to_additive (attr := simp)]
lemma fiberEquivKer_symm_apply (f : α →* H) (a : α) (g : f.ker) :
    (f.fiberEquivKer a).symm g = a * g

{α : Type u_1}
[AddGroup α]
{H : Type u_2}
[AddGroup H]
(f : α →+ H)
(a : α)
(g : ↥f.ker)


@[to_additive (attr := simp)]
theorem mem_orbit (a : α) (m : M) : m • a ∈ orbit M a

{M : Type u}
[Monoid M]
{α : Type v}
[MulAction M α]
(a : α)
(m : M)


theorem insert_WF [BEq α] [Hashable α] {m : Imp α β} {k v}
    (h : m.buckets.WF) : (insert m k v).buckets.WF

{α : Type u_1}
{β : Type u_2}
[BEq α]
[Hashable α]
{m : Batteries.HashMap.Imp α β}
{k : α}
{v : β}
(h : m.buckets.WF)


@[to_additive]
theorem lift_unique {j : N →* P} (hj : ∀ x, j (f.toMap x) = g x) : f.lift hg = j

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{g : M →+ P}
(hg : ∀ (y : ↥S), IsAddUnit (g ↑y))
{j : N →+ P}
(hj : ∀ (x : M), j (f.toMap x) = g x)


lemma surjective_iff_isField [IsDomain R] : Function.Surjective (algebraMap R K) ↔ IsField R

{R : Type u_1}
[CommRing R]
{K : Type u_5}
[CommRing K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]

Function.Surjective ⇑(algebraMap R K) ↔ IsField R


protected theorem not_iff : ¬IsPrimitiveRoot ζ k ↔ orderOf ζ ≠ k

{M : Type u_1}
[CommMonoid M]
{k : ℕ}
{ζ : M}


/-- Auxiliary definition for `FunctorialFactorizationData.functorCategory`. -/
@[simps]
def functorCategory.Z : Arrow (J ⥤ C) ⥤ J ⥤ C

{W₁ W₂ : CategoryTheory.MorphismProperty C}

(data : W₁.FunctorialFactorizationData W₂)

∀ {X Y : CategoryTheory.Arrow (CategoryTheory.Functor J C)} (τ : X ⟶ Y) (j : J),
  ((CategoryTheory.MorphismProperty.FunctorialFactorizationData.functorCategory.Z data J).map τ).app j =
    data.mapZ { left := τ.left.app j, right := τ.right.app j, w := ⋯ }


/-- If `X` is a sequential space
and `S` contains each set of the form `insert x (Set.range u)`
where `u : ℕ → X` is a sequence and `x` is its limit,
then topology on `X` is generated by its restrictions to the sets of `S`. -/
lemma of_seq [SequentialSpace X]
    (h : ∀ ⦃u : ℕ → X⦄ ⦃x : X⦄, Tendsto u atTop (𝓝 x) → insert x (range u) ∈ S) :
    RestrictGenTopology S

(h : ∀ ⦃u : ℕ → X⦄ ⦃x : X⦄, Filter.Tendsto u Filter.atTop (𝓝 x) → insert x (Set.range u) ∈ S)


/-- Reinterpret `α →* β` as `Additive α →+ Additive β`. -/
@[simps]
def MonoidHom.toAdditive [MulOneClass α] [MulOneClass β] :
    (α →* β) ≃ (Additive α →+ Additive β)

{α : Type u}
{β : Type v}
[MulOneClass α]
[MulOneClass β]
(f : Additive α →+ Additive β)
(a : α)

(MonoidHom.toAdditive.symm f) a = Additive.toMul (f (Additive.ofMul a))


@[simp] nonrec theorem sub_self_im : a - a.im = a.re


@[simp]
theorem coe_sub_bot (x : ℝ) : (x : EReal) - ⊥ = ⊤


/-- If `I` is boundaryless, `M` has full interior. -/
lemma interior_eq_univ : I.interior M = univ

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


theorem mk_embedding_le_arrow : #(α ↪ β') ≤ #(α → β')


@[simp]
lemma toColumns₂_fromColumns (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R) :
    toColumns₂ (fromColumns A₁ A₂) = A₂

{R : Type u_1}
{m : Type u_2}
{n₁ : Type u_6}
{n₂ : Type u_7}
(A₁ : Matrix m n₁ R)
(A₂ : Matrix m n₂ R)


@[simp]
theorem mul_le_mul_left_of_neg [ExistsAddOfLE α] [PosMulStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    {a b c : α} (h : c < 0) : c * a ≤ c * b ↔ b ≤ a

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

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


@[simp]
theorem nnnorm_mul (a b : α) : ‖a * b‖₊ = ‖a‖₊ * ‖b‖₊

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

‖a * b‖₊ = ‖a‖₊ * ‖b‖₊


theorem diagonal_kronecker_diagonal [MulZeroClass α] [DecidableEq m] [DecidableEq n] (a : m → α)
    (b : n → α) : diagonal a ⊗ₖ diagonal b = diagonal fun mn => a mn.1 * b mn.2

{α : Type u_2}
{m : Type u_9}
{n : Type u_10}
[MulZeroClass α]
[DecidableEq m]
[DecidableEq n]
(a : m → α)
(b : n → α)

Matrix.kroneckerMap (fun x x_1 => x * x_1) (Matrix.diagonal a) (Matrix.diagonal b) =
  Matrix.diagonal fun mn => a mn.1 * b mn.2


theorem eventually_splitMany_inf_eq_filter (π : Prepartition I) :
    ∀ᶠ t : Finset (ι × ℝ) in atTop,
      π ⊓ splitMany I t = (splitMany I t).filter fun J => ↑J ⊆ π.iUnion

{ι : Type u_1}
{I : BoxIntegral.Box ι}
[Finite ι]
(π : BoxIntegral.Prepartition I)

∀ᶠ (t : Finset (ι × ℝ)) in Filter.atTop,
  π ⊓ BoxIntegral.Prepartition.splitMany I t = (BoxIntegral.Prepartition.splitMany I t).filter fun J => ↑J ⊆ π.iUnion


theorem tsum_schlomilch_le {C : ℕ} (hf : ∀ ⦃m n⦄, 1 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n)
    (h_nonneg : ∀ n, 0 ≤ f n) (hu : Monotone u) (h_succ_diff : SuccDiffBounded C u) :
    ∑' k : ℕ, (u (k + 1) - u k) * f (u k) ≤ (u 1 - u 0) * f (u 0) + C * ∑' k, f k

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


@[to_additive (attr := simp)]
theorem smul_mk : a • mk i b = ⟨i, a • b⟩

{ι : Type u_1}
{M : Type u_2}
{α : ι → Type u_4}
[(i : ι) → SMul M (α i)]
(a : M)
(i : ι)
(b : α i)


/-- The universal property of the free magma expressing its adjointness. -/
@[to_additive (attr := simps symm_apply)
"The universal property of the free additive magma expressing its adjointness."]
def lift : (α → β) ≃ (FreeMagma α →ₙ* β)

{α : Type u}
{β : Type v}
[Add β]
(F : AddHom (FreeAddMagma α) β)

∀ (a : α), FreeAddMagma.lift.symm F a = (⇑F ∘ FreeAddMagma.of) a


theorem lt_sqrt (hx : 0 ≤ x) : x < √y ↔ x ^ 2 < y


theorem pow_lt_iff_lt_clog {b : ℕ} (hb : 1 < b) {x y : ℕ} : b ^ y < x ↔ y < clog b x


/-- `x ↦ fderivWithin 𝕜 (f x) t (g x) (k x)` is smooth at a point within a set. -/
theorem ContDiffWithinAt.fderivWithin_apply {f : E → F → G} {g k : E → F} {t : Set F} {n : ℕ∞}
    (hf : ContDiffWithinAt 𝕜 n (Function.uncurry f) (s ×ˢ t) (x₀, g x₀))
    (hg : ContDiffWithinAt 𝕜 m g s x₀) (hk : ContDiffWithinAt 𝕜 m k s x₀) (ht : UniqueDiffOn 𝕜 t)
    (hmn : m + 1 ≤ n) (hx₀ : x₀ ∈ s) (hst : s ⊆ g ⁻¹' t) :
    ContDiffWithinAt 𝕜 m (fun x => fderivWithin 𝕜 (f x) t (g x) (k x)) s x₀

ContDiffWithinAt 𝕜 m (fun x => (fderivWithin 𝕜 (f x) t (g x)) (k x)) s x₀


theorem inseparable_iff_mem_closure :
    (x ~ᵢ y) ↔ x ∈ closure ({y} : Set X) ∧ y ∈ closure ({x} : Set X)

{X : Type u_1}
[TopologicalSpace X]
{x y : X}

(x ~ᵢ y) ↔ x ∈ closure {y} ∧ y ∈ closure {x}


@[to_additive]
theorem IsComplement'.symm (h : IsComplement' H K) : IsComplement' K H

{G : Type u_1}
[AddGroup G]
{H K : AddSubgroup G}
(h : H.IsComplement' K)


@[simp]
theorem restrict_biUnion (πi : ∀ J, Prepartition J) (hJ : J ∈ π) :
    (π.biUnion πi).restrict J = πi J

(πi : (J : BoxIntegral.Box ι) → BoxIntegral.Prepartition J)


theorem card_Icc_of_le (h : a ≤ b + 1) : ((Icc a b).card : ℤ) = b + 1 - a


@[simp]
lemma DifferentiableOn.sub_iff_left (hg : DifferentiableOn 𝕜 g s) :
    DifferentiableOn 𝕜 (fun y => f y - g y) s ↔ DifferentiableOn 𝕜 f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{s : Set E}
(hg : DifferentiableOn 𝕜 g s)


theorem iteratedFDeriv_add_apply' {i : ℕ} {f g : E → F} (hf : ContDiff 𝕜 i f)
    (hg : ContDiff 𝕜 i g) :
    iteratedFDeriv 𝕜 i (fun x => f x + g x) x = iteratedFDeriv 𝕜 i f x + iteratedFDeriv 𝕜 i g x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{i : ℕ}
{f g : E → F}
(hf : ContDiff 𝕜 (↑i) f)
(hg : ContDiff 𝕜 (↑i) g)


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

{α : Type u}
(minAx : Order.Coframe.MinimalAxioms α)
{s : Set α}
{b : α}


@[simp]
theorem map_id : map (fun i ↦ (LinearMap.id : s i →ₗ[R] s i)) = .id

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]

(PiTensorProduct.map fun i => LinearMap.id) = LinearMap.id


lemma toMvPolynomial_mul (M : Matrix m n R) (N : Matrix n o R) (i : m) :
    (M * N).toMvPolynomial i = bind₁ N.toMvPolynomial (M.toMvPolynomial i)

{m : Type u_1}
{n : Type u_2}
{o : Type u_3}
{R : Type u_4}
[Fintype n]
[Fintype o]
[CommSemiring R]
(M : Matrix m n R)
(N : Matrix n o R)
(i : m)

(M * N).toMvPolynomial i = (MvPolynomial.bind₁ N.toMvPolynomial) (M.toMvPolynomial i)


@[simp] lemma keysLookupEquiv_symm_apply_lookup :
    ∀ (f : {f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1}) a,
      (keysLookupEquiv.symm f).lookup a = f.1.2 a

(f : { f // ∀ (i : α), (f.2 i).isSome = true ↔ i ∈ f.1 })

Finmap.lookup a (Finmap.keysLookupEquiv.symm f) = (↑f).2 a


protected theorem differentiableWithinAt : DifferentiableWithinAt 𝕜 (fun x => p.eval x) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
(p : 𝕜[X])

DifferentiableWithinAt 𝕜 (fun x => Polynomial.eval x p) s x


theorem zpow_sub {A : M} (ha : IsUnit A.det) (z1 z2 : ℤ) : A ^ (z1 - z2) = A ^ z1 / A ^ z2

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
{A : Matrix n' n' R}
(ha : IsUnit A.det)
(z1 z2 : ℤ)


theorem mem_lift_of_splits_of_roots_mem_range [Algebra R K] {f : K[X]}
    (hs : f.Splits (RingHom.id K)) (hm : f.Monic) (hr : ∀ a ∈ f.roots, a ∈ (algebraMap R K).range) :
    f ∈ Polynomial.lifts (algebraMap R K)

(hs : Polynomial.Splits (RingHom.id K) f)


theorem coe_apply (e : M₁ ≃SL[σ₁₂] M₂) (b : M₁) : (e : M₁ →SL[σ₁₂] M₂) b = e b

{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₂)
(b : M₁)


@[simp]
theorem blockDiagonal'_diagonal [∀ i, DecidableEq (m' i)] (d : ∀ i, m' i → α) :
    (blockDiagonal' fun k => diagonal (d k)) = diagonal fun ik => d ik.1 ik.2

{o : Type u_4}
{m' : o → Type u_7}
{α : Type u_12}
[DecidableEq o]
[Zero α]
[(i : o) → DecidableEq (m' i)]
(d : (i : o) → m' i → α)

(Matrix.blockDiagonal' fun k => Matrix.diagonal (d k)) = Matrix.diagonal fun ik => d ik.fst ik.snd


theorem op_sInf (S : Set (Subring R)) : (sInf S).op = sInf (.unop ⁻¹' S)

{R : Type u_2}
[Ring R]
(S : Set (Subring R))


@[simp] theorem toFin_sub (x y : BitVec n) : (x - y).toFin = toFin x - toFin y


/-- An alternative formula for the braiding isomorphism which swaps a binary biproduct,
using the fact that the biproduct is a coproduct.
-/
@[simps]
def biprod.braiding' (P Q : C) : P ⊞ Q ≅ Q ⊞ P

(CategoryTheory.Limits.biprod.braiding' P Q).hom =
  CategoryTheory.Limits.biprod.desc CategoryTheory.Limits.biprod.inr CategoryTheory.Limits.biprod.inl


@[reassoc]
lemma pullback.map_comp {X Y Z X' Y' Z' X'' Y'' Z'' : C}
    {f : X ⟶ Z} {g : Y ⟶ Z} {f' : X' ⟶ Z'} {g' : Y' ⟶ Z'} {f'' : X'' ⟶ Z''} {g'' : Y'' ⟶ Z''}
    (i₁ : X ⟶ X') (j₁ : X' ⟶ X'') (i₂ : Y ⟶ Y') (j₂ : Y' ⟶ Y'') (i₃ : Z ⟶ Z') (j₃ : Z' ⟶ Z'')
    [HasPullback f g] [HasPullback f' g'] [HasPullback f'' g'']
    (e₁ e₂ e₃ e₄) :
    pullback.map f g f' g' i₁ i₂ i₃ e₁ e₂ ≫ pullback.map f' g' f'' g'' j₁ j₂ j₃ e₃ e₄ =
      pullback.map f g f'' g'' (i₁ ≫ j₁) (i₂ ≫ j₂) (i₃ ≫ j₃)
        (by rw [reassoc_of% e₁, e₃, Category.assoc])
        (by rw [reassoc_of% e₂, e₄, Category.assoc])

CategoryTheory.Limits.pullback.map f g f' g' i₁ i₂ i₃ e₁ e₂ ≫
    CategoryTheory.Limits.pullback.map f' g' f'' g'' j₁ j₂ j₃ e₃ e₄ =
  CategoryTheory.Limits.pullback.map f g f'' g'' (i₁ ≫ j₁) (i₂ ≫ j₂) (i₃ ≫ j₃) ⋯ ⋯


/-- A natural isomorphism `L₁ ≅ L₂` induces an equivalence of categories
    `Comma L₁ R ≌ Comma L₂ R`. -/
@[simps!]
def mapLeftIso (i : L₁ ≅ L₂) : Comma L₁ R ≌ Comma L₂ R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(i : L₁ ≅ L₂)

∀ {X Y : CategoryTheory.Comma L₁ R} (f : X ⟶ Y), ((CategoryTheory.Comma.mapLeftIso R i).functor.map f).left = f.left


theorem singleton_hasGroupoid {f : α → H} (h : OpenEmbedding f) (G : StructureGroupoid H)
    [ClosedUnderRestriction G] : @HasGroupoid _ _ _ _ h.singletonChartedSpace G

{H : Type u}
[TopologicalSpace H]
{α : Type u_5}
[TopologicalSpace α]
[Nonempty α]
{f : α → H}
(h : OpenEmbedding f)
(G : StructureGroupoid H)
[ClosedUnderRestriction G]


theorem unifIntegrable_zero_meas [MeasurableSpace α] {p : ℝ≥0∞} {f : ι → α → β} :
    UnifIntegrable f p (0 : Measure α)

{α : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[NormedAddCommGroup β]
[MeasurableSpace α]
{p : ℝ≥0∞}
{f : ι → α → β}


@[simp]
theorem fst_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').1 = p₁.1 -ᵥ p₂.1

{G : Type u_1}
{G' : Type u_2}
{P : Type u_3}
{P' : Type u_4}
[AddGroup G]
[AddGroup G']
[AddTorsor G P]
[AddTorsor G' P']
(p₁ p₂ : P × P')


/--
The Schnirelmann density of the set of naturals which are `1 mod m` is `m⁻¹`, for any `m ≠ 1`.

Note that if `m = 1`, this set is empty.
-/
lemma schnirelmannDensity_setOf_mod_eq_one {m : ℕ} (hm : m ≠ 1) :
    schnirelmannDensity {n | n % m = 1} = (m⁻¹ : ℝ)

schnirelmannDensity {n | n % m = 1} = (↑m)⁻¹


theorem IsCompactOperator.comp_clm [AddCommMonoid M₂] [Module R₂ M₂] {f : M₂ → M₃}
    (hf : IsCompactOperator f) (g : M₁ →SL[σ₁₂] M₂) : IsCompactOperator (f ∘ g)

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
{M₂ : Type u_5}
{M₃ : Type u_6}
[TopologicalSpace M₁]
[TopologicalSpace M₂]
[TopologicalSpace M₃]
[AddCommMonoid M₁]
[Module R₁ M₁]
[AddCommMonoid M₂]
[Module R₂ M₂]
{f : M₂ → M₃}
(hf : IsCompactOperator f)
(g : M₁ →SL[σ₁₂] M₂)


theorem aemeasurable_restrict_of_measurable_subtype {s : Set α} (hs : MeasurableSet s)
    (hf : Measurable fun x : s => f x) : AEMeasurable f (μ.restrict s)

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : MeasurableSet s)
(hf : Measurable fun x => f ↑x)


theorem sigma_nonempty_iff : (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t : (i : ι) → Set (α i)}


theorem mul_def (l m : Language α) : l * m = image2 (· ++ ·) l m

l * m = Set.image2 (fun x x_1 => x ++ x_1) l m


@[to_additive]
theorem Subgroup.topologicalClosure_minimal (s : Subgroup G) {t : Subgroup G} (h : s ≤ t)
    (ht : IsClosed (t : Set G)) : s.topologicalClosure ≤ t

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
(s : Subgroup G)
{t : Subgroup G}
(h : s ≤ t)
(ht : IsClosed ↑t)


lemma cfcₙ_apply : cfcₙ f a = cfcₙHom (a := a) ha ⟨⟨_, hf.restrict⟩, hf0⟩

(hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac)

cfcₙ f a = (cfcₙHom ha) { toFun := (σₙ R a).restrict f, continuous_toFun := ⋯, map_zero' := hf0 }


@[simp]
theorem ball_zero : ball x 0 = ∅

{α : Type u}
[PseudoEMetricSpace α]
{x : α}


@[simp]
theorem limit.lift_map {F G : J ⥤ C} [HasLimit F] [HasLimit G] (c : Cone F) (α : F ⟶ G) :
    limit.lift F c ≫ limMap α = limit.lift G ((Cones.postcompose α).obj c)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : J ⥤ C}
[CategoryTheory.Limits.HasLimit F]
[CategoryTheory.Limits.HasLimit G]
(c : CategoryTheory.Limits.Cone F)
(α : F ⟶ G)

CategoryTheory.Limits.limit.lift F c ≫ CategoryTheory.Limits.limMap α =
  CategoryTheory.Limits.limit.lift G ((CategoryTheory.Limits.Cones.postcompose α).obj c)


lemma Finite.exists_not_mem (hs : s.Finite) : ∃ a, a ∉ s

{α : Type u}
{s : Set α}
[Infinite α]
(hs : s.Finite)


/-- Also see `rank_quotient_add_rank`. -/
theorem rank_quotient_add_rank_of_divisionRing (p : Submodule K V) :
    Module.rank K (V ⧸ p) + Module.rank K p = Module.rank K V

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(p : Submodule K V)

Module.rank K (V ⧸ p) + Module.rank K ↥p = Module.rank K V


@[simp]
theorem algEquivOfLinearEquivTensorProduct_apply (f h_mul h_one x) :
    (algEquivOfLinearEquivTensorProduct f h_mul h_one : A ⊗[R] B ≃ₐ[S] C) x = f x

(h_mul : ∀ (a₁ a₂ : A) (b₁ b₂ : B), f ((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) = f (a₁ ⊗ₜ[R] b₁) * f (a₂ ⊗ₜ[R] b₂))

(Algebra.TensorProduct.algEquivOfLinearEquivTensorProduct f h_mul h_one) x = f x


@[to_additive (attr := simp)]
theorem mul_mk : mk L₁ * mk L₂ = mk (L₁ ++ L₂)

FreeAddGroup.mk L₁ + FreeAddGroup.mk L₂ = FreeAddGroup.mk (L₁ ++ L₂)


theorem idealFactorsEquivOfQuotEquiv_mem_normalizedFactors_of_mem_normalizedFactors (hJ : J ≠ ⊥)
    {L : Ideal R} (hL : L ∈ normalizedFactors I) :
    ↑(idealFactorsEquivOfQuotEquiv f ⟨L, dvd_of_mem_normalizedFactors hL⟩)
      ∈ normalizedFactors J

(hL : L ∈ UniqueFactorizationMonoid.normalizedFactors I)

↑((idealFactorsEquivOfQuotEquiv f) ⟨L, ⋯⟩) ∈ UniqueFactorizationMonoid.normalizedFactors J


protected theorem Function.Embedding.countable [Countable β] (f : α ↪ β) : Countable α

{α : Sort u}
{β : Sort v}
[Countable β]
(f : α ↪ β)


@[reassoc (attr := simp)]
lemma π_descH (k : h.K ⟶ A) (hk : h.f' ≫ k = 0) : h.π ≫ h.descH k hk = k

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

CategoryTheory.CategoryStruct.comp h.π (h.descH k hk) = k


/-- If an ideal does not contain any coercions of natural numbers other than zero, then its quotient
inherits the characteristic of the underlying ring. -/
theorem quotient' {R : Type*} [CommRing R] (p : ℕ) [CharP R p] (I : Ideal R)
    (h : ∀ x : ℕ, (x : R) ∈ I → (x : R) = 0) : CharP (R ⧸ I) p

{R : Type u_1}
[CommRing R]
(p : ℕ)
[CharP R p]
(I : Ideal R)
(h : ∀ (x : ℕ), ↑x ∈ I → ↑x = 0)


theorem isPell_iff_mem_unitary : ∀ {b : ℤ√d}, IsPell b ↔ b ∈ unitary (ℤ√d)


protected theorem unique (g : FreeAbelianGroup α →+ β) (hg : ∀ x, g (of x) = f x) {x} :
    g x = lift f x

(hg : ∀ (x : α), g (FreeAbelianGroup.of x) = f x)


theorem Continuous.mapsTo_connectedComponentIn [TopologicalSpace β] {f : α → β} {s : Set α}
    (h : Continuous f) {a : α} (hx : a ∈ s) :
    MapsTo f (connectedComponentIn s a) (connectedComponentIn (f '' s) (f a))

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
(h : Continuous f)
{a : α}
(hx : a ∈ s)

Set.MapsTo f (connectedComponentIn s a) (connectedComponentIn (f '' s) (f a))


theorem perm_option_to_list {o₁ o₂ : Option α} : o₁.toList ~ o₂.toList ↔ o₁ = o₂


@[to_additive (attr := simp)]
theorem iUnion_smul_set (s : Set α) (t : Set β) : ⋃ a ∈ s, a • t = s • t

{α : Type u_2}
{β : Type u_3}
[SMul α β]
(s : Set α)
(t : Set β)


/-- If elements `p,q` of `FreeAddMonoid (R × Π i, s i)` lift elements `x,y` of `⨂[R] i, s i`
respectively, then `p + q` lifts `x + y`.
-/
lemma lifts_add {x y : ⨂[R] i, s i} {p q : FreeAddMonoid (R × Π i, s i)}
    (hp : p ∈ lifts x) (hq : q ∈ lifts y) : p + q ∈ lifts (x + y)

{p q : FreeAddMonoid (R × ((i : ι) → s i))}


@[simp]
theorem partiallyWellOrderedOn_bUnion (s : Finset ι) {f : ι → Set α} :
    (⋃ i ∈ s, f i).PartiallyWellOrderedOn r ↔ ∀ i ∈ s, (f i).PartiallyWellOrderedOn r

{ι : Type u_1}
{α : Type u_2}
{r : α → α → Prop}
(s : Finset ι)
{f : ι → Set α}


/-- If a topological space admits an atlas with locally compact charts, then the space itself
is locally compact. -/
theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompactSpace M

(H : Type u)
(M : Type u_2)
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[LocallyCompactSpace H]


@[simp]
theorem forget₂_Mon_obj_one (A : CommMon_ C) : ((forget₂Mon_ C).obj A).one = A.one

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

((CommMon_.forget₂Mon_ C).obj A).one = A.one


lemma not_fermatLastTheoremFor_one : ¬ FermatLastTheoremFor 1


@[simp]
theorem strictMonoOn_comp_ofDual_iff : StrictMonoOn (f ∘ ofDual) s ↔ StrictAntiOn f s

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

StrictMonoOn (f ∘ ⇑OrderDual.ofDual) s ↔ StrictAntiOn f s


@[reassoc (attr := simp)]
lemma _root_.CategoryTheory.Iso.inv_hom_id_triangle_hom₃ {A B : Triangle C} (e : A ≅ B) :
    e.inv.hom₃ ≫ e.hom.hom₃ = 𝟙 _

{A B : CategoryTheory.Pretriangulated.Triangle C}


theorem lowerSemicontinuous_biSup {p : ι → Prop} {f : ∀ i, p i → α → δ}
    (h : ∀ i hi, LowerSemicontinuous (f i hi)) :
    LowerSemicontinuous fun x' => ⨆ (i) (hi), f i hi x'

(h : ∀ (i : ι) (hi : p i), LowerSemicontinuous (f i hi))

LowerSemicontinuous fun x' => ⨆ i, ⨆ (hi : p i), f i hi x'


/-- Functor composition induces a functor on simplicial objects. -/
@[simps!]
def whiskering (D : Type*) [Category D] : (C ⥤ D) ⥤ SimplicialObject C ⥤ SimplicialObject D

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(D : Type u_1)
[CategoryTheory.Category.{u_2, u_1} D]
(H : C ⥤ D)
(F : SimplexCategoryᵒᵖ ⥤ C)

∀ {X Y : SimplexCategoryᵒᵖ} (f : X ⟶ Y),
  (((CategoryTheory.SimplicialObject.whiskering C D).obj H).obj F).map f = H.map (F.map f)


/-- See `intervalIntegrable_cpow'` for a version with a weaker hypothesis on `r`, but assuming the
measure is volume. -/
theorem intervalIntegrable_cpow {r : ℂ} (h : 0 ≤ r.re ∨ (0 : ℝ) ∉ [[a, b]]) :
    IntervalIntegrable (fun x : ℝ => (x : ℂ) ^ r) μ a b

IntervalIntegrable (fun x => ↑x ^ r) μ a b


protected theorem eq_of_le_of_lt_succ (h₁ : n ≤ m) (h₂ : m < n + 1) : m = n

{n m : Nat}
(h₁ : n ≤ m)
(h₂ : m < n + 1)


@[simp] theorem beq_refl (a : Nat) : Nat.beq a a = true


/-- An inductive-like property for the objects of a connected category.
If the set `p` is nonempty, and `p` is closed under morphisms of `J`,
then `p` contains all of `J`.

The converse is given in `IsConnected.of_induct`.
-/
theorem induct_on_objects [IsPreconnected J] (p : Set J) {j₀ : J} (h0 : j₀ ∈ p)
    (h1 : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), j₁ ∈ p ↔ j₂ ∈ p) (j : J) : j ∈ p

(h1 : ∀ {j₁ j₂ : J}, (j₁ ⟶ j₂) → (j₁ ∈ p ↔ j₂ ∈ p))


/-- The equivalence `(ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n` obtained
by reversing the arrows. -/
@[simps!]
def opEquivalence : (ComposableArrows C n)ᵒᵖ ≌ ComposableArrows Cᵒᵖ n

(X : (CategoryTheory.Functor (Fin (n + 1)) C)ᵒᵖ)

(CategoryTheory.ComposableArrows.opEquivalence C n).unitIso.inv.app X =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.whiskerLeft (⋯.functor.comp (CategoryTheory.orderDualEquivalence (Fin (n + 1))).functor)
        (((CategoryTheory.orderDualEquivalence (Fin (n + 1))).inverse.comp ⋯.functor).comp
              (Opposite.unop X)).rightOpLeftOpIso.inv).op
    ((CategoryTheory.Equivalence.adjointifyη
              (CategoryTheory.NatIso.ofComponents
                (fun F =>
                  (((CategoryTheory.orderDualEquivalence (Fin (n + 1))).symm.trans
                            Fin.revOrderIso.equivalence).symm.funInvIdAssoc
                      F).symm)
                ⋯)
              (CategoryTheory.NatIso.ofComponents
                (fun F =>
                  ((CategoryTheory.orderDualEquivalence (Fin (n + 1))).symm.trans
                          Fin.revOrderIso.equivalence).symm.invFunIdAssoc
                    F)
                ⋯)).hom.app
        (Opposite.unop X)).op


/-- `S : IntermediateField K L` is a subset of `L` such that there is a field
tower `L / S / K`. -/
structure IntermediateField extends Subalgebra K L where
  inv_mem' : ∀ x ∈ carrier, x⁻¹ ∈ carrier

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(self : IntermediateField K L)
(x : L)


theorem exists_set_mem_of_union_eq_top {ι : Type*} (t : Set ι) (s : ι → Set β)
    (w : ⋃ i ∈ t, s i = ⊤) (x : β) : ∃ i ∈ t, x ∈ s i

{β : Type u_2}
{ι : Type u_11}
(t : Set ι)
(s : ι → Set β)
(w : ⋃ i ∈ t, s i = ⊤)
(x : β)


theorem div_le_iff₀ (hc : c ≠ 0) : a / c ≤ b ↔ a ≤ b * c

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b c : α}
(hc : c ≠ 0)


@[to_additive (attr := simp)]
theorem reduce_toWord : ∀ x : FreeGroup α, reduce (toWord x) = toWord x

{α : Type u}
[DecidableEq α]
(x : FreeAddGroup α)


lemma uIoc_comm (a b : α) : Ι a b = Ι b a

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


/-- Given an open subgroup `U` and an element `r` of a nonarchimedean ring, there is an open
  subgroup `V` such that `r • V` is contained in `U`. -/
theorem left_mul_subset (U : OpenAddSubgroup R) (r : R) :
    ∃ V : OpenAddSubgroup R, r • (V : Set R) ⊆ U

{R : Type u_1}
[Ring R]
[TopologicalSpace R]
[NonarchimedeanRing R]
(U : OpenAddSubgroup R)
(r : R)

∃ V, r • ↑V ⊆ ↑U


/-- `f : ℂ → E` is analytic at `z` iff it's differentiable near `z` -/
theorem analyticAt_iff_eventually_differentiableAt {f : ℂ → E} {c : ℂ} :
    AnalyticAt ℂ f c ↔ ∀ᶠ z in 𝓝 c, DifferentiableAt ℂ f z

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[CompleteSpace E]
{f : ℂ → E}
{c : ℂ}

AnalyticAt ℂ f c ↔ ∀ᶠ (z : ℂ) in 𝓝 c, DifferentiableAt ℂ f z


@[simp]
theorem sorted_nil : Sorted r []


theorem mono_of_mono_map (F : C ⥤ D) [ReflectsMonomorphisms F] {X Y : C} {f : X ⟶ Y}
    (h : Mono (F.map f)) : Mono f

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


/-- A specific witness of `pfilter.directed` when `P` has meets. -/
theorem inf_mem (hx : x ∈ F) (hy : y ∈ F) : x ⊓ y ∈ F

{P : Type u_1}
[SemilatticeInf P]
{x y : P}
{F : Order.PFilter P}
(hx : x ∈ F)
(hy : y ∈ F)


theorem iUnion_range_eq_sUnion {α β : Type*} (C : Set (Set α)) {f : ∀ s : C, β → (s : Type _)}
    (hf : ∀ s : C, Surjective (f s)) : ⋃ y : β, range (fun s : C => (f s y).val) = ⋃₀C

(hf : ∀ (s : ↑C), Function.Surjective (f s))

(⋃ y, Set.range fun s => ↑(f s y)) = ⋃₀ C


theorem ofLine_mem {f : ℝ → X} (hf : ContinuousOn f I) (h₀ : f 0 = x) (h₁ : f 1 = y) :
    ∀ t, ofLine hf h₀ h₁ t ∈ f '' I

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{f : ℝ → X}
(hf : ContinuousOn f I)
(h₀ : f 0 = x)
(h₁ : f 1 = y)
(t : ↑I)


@[simp]
lemma restrict_compl_singleton (a : α) : μ.restrict ({a}ᶜ) = μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
(a : α)


lemma nndist_pi_eq_iff {f g : ∀ b, π b} {r : ℝ≥0} (hr : 0 < r) :
    nndist f g = r ↔ (∃ i, nndist (f i) (g i) = r) ∧ ∀ b, nndist (f b) (g b) ≤ r

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

nndist f g = r ↔ (∃ i, nndist (f i) (g i) = r) ∧ ∀ (b : β), nndist (f b) (g b) ≤ r


theorem IsPartition.biUnionTagged {π : Prepartition I} (h : IsPartition π)
    {πi : ∀ J, TaggedPrepartition J} (hi : ∀ J ∈ π, (πi J).IsPartition) :
    (π.biUnionTagged πi).IsPartition

{πi : (J : BoxIntegral.Box ι) → BoxIntegral.TaggedPrepartition J}


@[simp]
theorem isSquare_ofNat_iff {n : ℕ} :
    IsSquare (no_index (OfNat.ofNat n) : ℤ) ↔ IsSquare (OfNat.ofNat n : ℕ)

IsSquare (OfNat.ofNat n) ↔ IsSquare (OfNat.ofNat n)


theorem aemeasurable_withDensity_ennreal_iff' {f : α → ℝ≥0}
    (hf : AEMeasurable f μ) {g : α → ℝ≥0∞} :
    AEMeasurable g (μ.withDensity fun x => (f x : ℝ≥0∞)) ↔
      AEMeasurable (fun x => (f x : ℝ≥0∞) * g x) μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0}
(hf : AEMeasurable f μ)
{g : α → ℝ≥0∞}

AEMeasurable g (μ.withDensity fun x => ↑(f x)) ↔ AEMeasurable (fun x => ↑(f x) * g x) μ


theorem biInf_le_nhds : ∀ x : ℝ≥0∞, ⨅ ε > 0, 𝓟 (Icc (x - ε) (x + ε)) ≤ 𝓝 x

⨅ ε, ⨅ (_ : ε > 0), 𝓟 (Set.Icc (x - ε) (x + ε)) ≤ 𝓝 x


@[simp] theorem run_get [Monad m] (s : σ)    : (get : StateT σ m σ).run s = pure (s, s)

{m : Type u_1 → Type u_2}
{σ : Type u_1}
[Monad m]
(s : σ)


lemma KaehlerDifferential.mvPolynomialBasis_repr_symm_single (σ) (i) (x) :
    (mvPolynomialBasis R σ).repr.symm (Finsupp.single i x) = x • D R (MvPolynomial σ R) (.X i)

(R : Type u)
[CommRing R]
(σ : Type u_1)
(i : σ)
(x : MvPolynomial σ R)

(KaehlerDifferential.mvPolynomialBasis R σ).repr.symm (Finsupp.single i x) =
  x • (KaehlerDifferential.D R (MvPolynomial σ R)) (MvPolynomial.X i)


theorem mono (hs : IsAntichain r₁ s) (h : r₂ ≤ r₁) : IsAntichain r₂ s

{α : Type u_1}
{r₁ r₂ : α → α → Prop}
{s : Set α}
(hs : IsAntichain r₁ s)
(h : r₂ ≤ r₁)


@[deprecated eq_of_val_eq (since := "2024-02-15")]
theorem eq_of_veq : i.val = j.val → i = j


@[to_additive]
theorem map_iSup_comap_of_surjective (S : ι → Submonoid N) : (⨆ i, (S i).comap f).map f = iSup S

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

AddSubmonoid.map f (⨆ i, AddSubmonoid.comap f (S i)) = iSup S


@[to_additive]
theorem index_dvd_card : H.index ∣ Nat.card G

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


/-- The category of cocones on `F` is just the comma category `(F ↓ Δ)`, where `Δ` is the constant
    functor. -/
@[simps! (config := { notRecursive := [`PLift, `ULift] })]
def Cocone.equivStructuredArrow (F : J ⥤ C) : Cocone F ≌ StructuredArrow F (const J)

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

((CategoryTheory.Limits.Cocone.equivStructuredArrow F).unitIso.inv.app X).hom = CategoryTheory.CategoryStruct.id X.pt


/-- A language homomorphism is injective when all the maps between symbol types are. -/
protected structure Injective : Prop where
  onFunction {n} : Function.Injective fun f : L.Functions n => onFunction ϕ f
  onRelation {n} : Function.Injective fun R : L.Relations n => onRelation ϕ R

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{ϕ : L →ᴸ L'}
(self : ϕ.Injective)
{n : ℕ}

Function.Injective fun R => ϕ.onRelation R


protected lemma DirectedOn.le_sSup (hd : DirectedOn (· ≤ ·) d) (ha : a ∈ d) : a ≤ sSup d

(hd : DirectedOn (fun x x_1 => x ≤ x_1) d)


theorem adjoin_le {S : NonUnitalStarSubalgebra R A} {s : Set A} (hs : s ⊆ S) : adjoin R s ≤ S

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
{S : NonUnitalStarSubalgebra R A}
{s : Set A}
(hs : s ⊆ ↑S)


/-- Torsion groups are closed under extensions. -/
@[to_additive AddIsTorsion.extension_closed "Additive torsion groups are closed under extensions."]
theorem IsTorsion.extension_closed {f : G →* H} (hN : N = f.ker) (tH : IsTorsion H)
    (tN : IsTorsion N) : IsTorsion G

{G : Type u_1}
{H : Type u_2}
[Group G]
{N : Subgroup G}
[Group H]
{f : G →* H}
(hN : N = f.ker)
(tH : Monoid.IsTorsion H)
(tN : Monoid.IsTorsion ↥N)


theorem Balanced.starConvex (hs : Balanced ℝ s) : StarConvex ℝ 0 s

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{s : Set E}
(hs : Balanced ℝ s)


/-- A choice-free shortcut instance. -/
@[to_additive "A choice-free shortcut instance."]
theorem OrderedCommGroup.to_contravariantClass_left_le (α : Type u) [OrderedCommGroup α] :
    ContravariantClass α α (· * ·) (· ≤ ·)

ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1


@[simp]
lemma withDensity_one (κ : Kernel α β) [IsSFiniteKernel κ] :
    Kernel.withDensity κ 1 = κ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsSFiniteKernel κ]


protected theorem completeSpace [CompleteSpace β] (e : α ≃ᵢ β) : CompleteSpace α

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[CompleteSpace β]
(e : α ≃ᵢ β)


theorem divX_mul_X_add (p : R[X]) : divX p * X + C (p.coeff 0) = p

p.divX * Polynomial.X + Polynomial.C (p.coeff 0) = p


theorem dvd_iff_dvd_digits_sum (b b' : ℕ) (h : b' % b = 1) (n : ℕ) :
    b ∣ n ↔ b ∣ (digits b' n).sum


theorem size_eq_natSize : ∀ n, (size n : ℕ) = natSize n


lemma geo_series [Nontrivial β] (x : β) (hx1 : abv x < 1) :
    IsCauSeq abv fun n ↦ ∑ m ∈ range n, x ^ m

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
[Archimedean α]
[Nontrivial β]
(x : β)
(hx1 : abv x < 1)

IsCauSeq abv fun n => ∑ m ∈ Finset.range n, x ^ m


@[simp]
theorem comp_id (f : FrameHom α β) : f.comp (FrameHom.id α) = f

{α : Type u_2}
{β : Type u_3}
[CompleteLattice α]
[CompleteLattice β]
(f : FrameHom α β)


lemma IsUpperSet.upperBounds_subset (hs : IsUpperSet s) : s.Nonempty → upperBounds s ⊆ s

{α : Type u_1}
[Preorder α]
{s : Set α}
(hs : IsUpperSet s)


lemma isClopen_sphere {r : ℝ} (hr : r ≠ 0) : IsClopen (sphere x r)

{X : Type u_1}
[PseudoMetricSpace X]
[IsUltrametricDist X]
(x : X)
{r : ℝ}
(hr : r ≠ 0)


@[simp]
theorem Complex.orthonormalBasisOneI_repr_apply (z : ℂ) :
    Complex.orthonormalBasisOneI.repr z = ![z.re, z.im]


theorem eq_or_principal [IsWellOrder β s] (f : r ≼i s) :
    Surjective f ∨ ∃ b, ∀ x, s x b ↔ ∃ y, f y = x

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder β s]
(f : r ≼i s)

Function.Surjective ⇑f ∨ ∃ b, ∀ (x : β), s x b ↔ ∃ y, f y = x


@[simp]
lemma ltByCases_lt (h : x < y) {h₁ : x < y → P} {h₂ : x = y → P} {h₃ : y < x → P} :
    ltByCases x y h₁ h₂ h₃ = h₁ h

{α : Type u_2}
[LinearOrder α]
{P : Sort u_5}
{x y : α}
(h : x < y)
{h₁ : x < y → P}
{h₂ : x = y → P}
{h₃ : y < x → P}


@[simp]
protected lemma _root_.IsSelfAdjoint.log {a : A} : IsSelfAdjoint (log a)


theorem iIndepFun.indepFun_prod_mk [IsMarkovKernel κ] (hf_Indep : iIndepFun m f κ μ)
    (hf_meas : ∀ i, Measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) :
    IndepFun (fun a => (f i a, f j a)) (f k) κ μ

(hf_Indep : ProbabilityTheory.Kernel.iIndepFun m f κ μ)

ProbabilityTheory.Kernel.IndepFun (fun a => (f i a, f j a)) (f k) κ μ


@[simp]
lemma add_hom (α β : Ext X Y n) : (α + β).hom = α.hom + β.hom

(α β : CategoryTheory.Abelian.Ext X Y n)


theorem freeOn_indep (hIE : I ⊆ E) : (freeOn E).Indep I

{α : Type u_1}
{E I : Set α}
(hIE : I ⊆ E)


theorem OrderIso.isCompl_iff {x y : α} : IsCompl x y ↔ IsCompl (f x) (f y)

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
[BoundedOrder α]
[BoundedOrder β]
(f : α ≃o β)
{x y : α}


@[csimp]
theorem iota_eq_iotaTR : @iota = @iotaTR


theorem _root_.Pi.orthonormalBasis.toBasis {η : Type*} [Fintype η] {ι : η → Type*}
    [∀ i, Fintype (ι i)] {𝕜 : Type*} [RCLike 𝕜] {E : η → Type*} [∀ i, NormedAddCommGroup (E i)]
    [∀ i, InnerProductSpace 𝕜 (E i)] (B : ∀ i, OrthonormalBasis (ι i) 𝕜 (E i)) :
    (Pi.orthonormalBasis B).toBasis =
      ((Pi.basis fun i : η ↦ (B i).toBasis).map (WithLp.linearEquiv 2 _ _).symm)

(B : (i : η) → OrthonormalBasis (ι i) 𝕜 (E i))

(Pi.orthonormalBasis B).toBasis = (Pi.basis fun i => (B i).toBasis).map (WithLp.linearEquiv 2 𝕜 ((j : η) → E j)).symm


/-- `LinearMap.bound_of_ball_bound` is a version of this over arbitrary nontrivially normed fields.
It produces a less precise bound so we keep both versions. -/
theorem LinearMap.bound_of_ball_bound' {r : ℝ} (r_pos : 0 < r) (c : ℝ) (f : E →ₗ[𝕜] 𝕜)
    (h : ∀ z ∈ closedBall (0 : E) r, ‖f z‖ ≤ c) (z : E) : ‖f z‖ ≤ c / r * ‖z‖

(h : ∀ z ∈ Metric.closedBall 0 r, ‖f z‖ ≤ c)


theorem one_right {a : α} (ha : ¬IsUnit a) : multiplicity a 1 = 0

{α : Type u_1}
[CommMonoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a : α}
(ha : ¬IsUnit a)


theorem algebraMap_apply {r : R} : algebraMap R (HahnSeries Γ A) r = C (algebraMap R A r)

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[CommSemiring R]
{A : Type u_5}
[Semiring A]
[Algebra R A]
{r : R}

(algebraMap R (HahnSeries Γ A)) r = HahnSeries.C ((algebraMap R A) r)


/-- This is the key lemma used to establish the instance `Unitization.instCstarRing`
(i.e., proving that the norm on `Unitization 𝕜 E` satisfies the C⋆-property). We split this one
out so that declaring the `CstarRing` instance doesn't time out. -/
theorem Unitization.norm_splitMul_snd_sq (x : Unitization 𝕜 E) :
    ‖(Unitization.splitMul 𝕜 E x).snd‖ ^ 2 ≤ ‖(Unitization.splitMul 𝕜 E (star x * x)).snd‖

(𝕜 : Type u_1)
{E : Type u_2}
[DenselyNormedField 𝕜]
[NonUnitalNormedRing E]
[StarRing E]
[CstarRing E]
[NormedSpace 𝕜 E]
[IsScalarTower 𝕜 E E]
[SMulCommClass 𝕜 E E]
[StarRing 𝕜]
[StarModule 𝕜 E]
(x : Unitization 𝕜 E)

‖((Unitization.splitMul 𝕜 E) x).2‖ ^ 2 ≤ ‖((Unitization.splitMul 𝕜 E) (x⋆ * x)).2‖


theorem generateFrom_generatePiSystem_eq {α} {g : Set (Set α)} :
    generateFrom (generatePiSystem g) = generateFrom g

MeasurableSpace.generateFrom (generatePiSystem g) = MeasurableSpace.generateFrom g


@[simp]
theorem map_id : map (@id α) = id


@[simp]
theorem coe_ringHom_trans [NonAssocSemiring S'] (e₁ : R ≃+* S) (e₂ : S ≃+* S') :
    (e₁.trans e₂ : R →+* S') = (e₂ : S →+* S').comp ↑e₁

{R : Type u_4}
{S : Type u_5}
{S' : Type u_6}
[NonAssocSemiring R]
[NonAssocSemiring S]
[NonAssocSemiring S']
(e₁ : R ≃+* S)
(e₂ : S ≃+* S')


theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}

e.IsImage s t ↔ e.source ∩ ↑e ⁻¹' t = e.source ∩ s


theorem not_sat_of_isImpossible (h : isImpossible c) {t} : ¬ c.sat t

{c : Lean.Omega.Constraint}
(h : c.isImpossible = true)
{t : Int}


@[to_additive (attr := simp)]
theorem noncommProd_singleton (a : α) (f : α → β) :
    noncommProd ({a} : Finset α) f
        (by
          norm_cast
          exact Set.pairwise_singleton _ _) =
      f a

{α : Type u_3}
{β : Type u_4}
[AddMonoid β]
(a : α)
(f : α → β)


lemma LeftHomologyData.exact_map_iff (h : S.LeftHomologyData) (F : C ⥤ D)
    [F.PreservesZeroMorphisms] [h.IsPreservedBy F] [(S.map F).HasHomology] :
    (S.map F).Exact ↔ IsZero (F.obj h.H)

(S.map F).Exact ↔ CategoryTheory.Limits.IsZero (F.obj h.H)


theorem of_isInitial {X : C} (h : IsInitial X) : IsCofiltered C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{X : C}
(h : CategoryTheory.Limits.IsInitial X)


@[simp] theorem ofNat_one  : ((1 : Nat) : Int) = 1


theorem tail'_iff : TransGen r a c ↔ ∃ b, ReflTransGen r a b ∧ r b c

{α : Type u_1}
{r : α → α → Prop}
{a c : α}

Relation.TransGen r a c ↔ ∃ b, Relation.ReflTransGen r a b ∧ r b c


/-- The category of types has `X × Y`, the usual cartesian product,
as the binary product of `X` and `Y`.
-/
@[simps]
def binaryProductLimitCone (X Y : Type u) : Limits.LimitCone (pair X Y)

(CategoryTheory.Limits.Types.binaryProductLimitCone X Y).isLimit = CategoryTheory.Limits.Types.binaryProductLimit X Y


@[simp]
theorem map₂_mk_top_top_eq_top : Submodule.map₂ (mk R M N) ⊤ ⊤ = ⊤

(R : Type u_1)
[CommSemiring R]
(M : Type u_4)
(N : Type u_5)
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]

Submodule.map₂ (TensorProduct.mk R M N) ⊤ ⊤ = ⊤