@[simp]
theorem div_const {𝕜 : Type*} {f : ℝ → 𝕜} [NormedField 𝕜] (h : IntervalIntegrable f μ a b)
    (c : 𝕜) : IntervalIntegrable (fun x => f x / c) μ a b

{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
{𝕜 : Type u_6}
{f : ℝ → 𝕜}
[NormedField 𝕜]
(h : IntervalIntegrable f μ a b)
(c : 𝕜)


@[simp]
theorem pushoutCoconeOfRightIso_inr : (pushoutCoconeOfRightIso f g).inr = inv g ≫ f

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

(CategoryTheory.Limits.pushoutCoconeOfRightIso f g).inr = CategoryTheory.inv g ≫ f


theorem comp_sup_eq_sup_comp_of_is_total [SemilatticeSup β] [OrderBot β] (g : α → β)
    (mono_g : Monotone g) (bot : g ⊥ = ⊥) : g (s.sup f) = s.sup (g ∘ f)

{α : Type u_2}
{β : Type u_3}
{ι : Type u_5}
[LinearOrder α]
[OrderBot α]
{s : Finset ι}
{f : ι → α}
[SemilatticeSup β]
[OrderBot β]
(g : α → β)
(mono_g : Monotone g)
(bot : g ⊥ = ⊥)


lemma hasSum_nat_cosKernel₀ (a : ℝ) {t : ℝ} (ht : 0 < t) :
    HasSum (fun n : ℕ ↦ 2 * Real.cos (2 * π * a * (n + 1)) * rexp (-π * (n + 1) ^ 2 * t))
    (cosKernel a t - 1)

HasSum (fun n => 2 * Real.cos (2 * π * a * (↑n + 1)) * rexp (-π * (↑n + 1) ^ 2 * t)) (HurwitzZeta.cosKernel (↑a) t - 1)


theorem isUnit_iff_range_eq_top [FiniteDimensional K V] (f : V →ₗ[K] V) :
    IsUnit f ↔ (LinearMap.range f) = ⊤

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
(f : V →ₗ[K] V)


@[to_additive]
theorem Inducing.multipliable_iff_tprod_comp_mem_range [CommMonoid γ] [TopologicalSpace γ]
    [T2Space γ] {G} [FunLike G α γ] [MonoidHomClass G α γ] {g : G} (hg : Inducing g) (f : β → α) :
    Multipliable f ↔ Multipliable (g ∘ f) ∧ ∏' i, g (f i) ∈ Set.range g

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
[AddCommMonoid γ]
[TopologicalSpace γ]
[T2Space γ]
{G : Type u_5}
[FunLike G α γ]
[AddMonoidHomClass G α γ]
{g : G}
(hg : Inducing ⇑g)
(f : β → α)

Summable f ↔ Summable (⇑g ∘ f) ∧ ∑' (i : β), g (f i) ∈ Set.range ⇑g


@[simp] lemma coe_chainTop : (chainTop α β : L → R) = (chainTopCoeff α β : ℤ) • α + β

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(α : L → R)
(β : LieModule.Weight R L M)

⇑(LieModule.chainTop α β) = ↑(LieModule.chainTopCoeff α β) • α + ⇑β


theorem chainHeight_union_le : (s ∪ t).chainHeight ≤ s.chainHeight + t.chainHeight

{α : Type u_1}
{s t : Set α}
[Preorder α]


theorem add_mul_left_left_iff : IsRelPrime (x + y * z) y ↔ IsRelPrime x y


@[to_additive]
theorem univ_subgroup : IsNormalSubgroup (@univ G)


theorem Fintype.not_isField_of_card_not_prime_pow {α} [Fintype α] [Ring α] :
    ¬IsPrimePow ‖α‖ → ¬IsField α


/-- Variant of `le_mul_of_one_le_left` for `b` non-positive instead of non-negative. -/
theorem mul_le_of_one_le_left [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hb : b ≤ 0) (h : 1 ≤ a) : a * b ≤ b

[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 toBialgHom_eq_coe (f : A ≃ₐc[R] B) : f.toBialgHom = f

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(f : A ≃ₐc[R] B)


lemma nilRank_eq_polyCharpoly_natTrailingDegree (b : Basis ι R L) :
    nilRank φ = (polyCharpoly φ b).natTrailingDegree

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{ι : Type u_5}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Fintype ι]
[DecidableEq ι]
[Module.Free R M]
[Module.Finite R M]
[Module.Finite R L]
[Module.Free R L]
[Nontrivial R]
(b : Basis ι R L)

φ.nilRank = (φ.polyCharpoly b).natTrailingDegree


@[simp] lemma nnnorm_toDual (x : E) : ‖toDual x‖₊ = ‖x‖₊


@[fun_prop]
theorem IsBoundedBilinearMap.hasStrictFDerivAt (h : IsBoundedBilinearMap 𝕜 b) (p : E × F) :
    HasStrictFDerivAt b (h.deriv p) p

{𝕜 : 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]
{b : E × F → G}
(h : IsBoundedBilinearMap 𝕜 b)
(p : E × F)


/-- Given an ideal `𝓟` of a commutative semiring `R`, we say that a polynomial `f : R[X]`
is *Eisenstein at `𝓟`* if `f.leadingCoeff ∉ 𝓟`, `∀ n, n < f.natDegree → f.coeff n ∈ 𝓟` and
`f.coeff 0 ∉ 𝓟 ^ 2`. -/
@[mk_iff]
structure IsEisensteinAt [CommSemiring R] (f : R[X]) (𝓟 : Ideal R) : Prop where
  leading : f.leadingCoeff ∉ 𝓟
  mem : ∀ {n}, n < f.natDegree → f.coeff n ∈ 𝓟
  not_mem : f.coeff 0 ∉ 𝓟 ^ 2

{R : Type u}
[CommSemiring R]
{f : R[X]}
{𝓟 : Ideal R}
(self : f.IsEisensteinAt 𝓟)


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

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

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


@[simp]
theorem coe_toSubmodule_eq_iff : (N : Submodule R M) = (N' : Submodule R M) ↔ N = N'

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N N' : LieSubmodule R L M)


theorem mem_of_mem_inter_right {a : α} {s₁ s₂ : Finset α} (h : a ∈ s₁ ∩ s₂) : a ∈ s₂

{α : Type u_1}
[DecidableEq α]
{a : α}
{s₁ s₂ : Finset α}
(h : a ∈ s₁ ∩ s₂)


lemma Pi.uniformSpace_comap_restrict_sUnion (𝔖 : Set (Set ι)) :
    UniformSpace.comap (⋃₀ 𝔖).restrict (Pi.uniformSpace (fun i : (⋃₀ 𝔖) ↦ α i)) =
    ⨅ S ∈ 𝔖, UniformSpace.comap S.restrict (Pi.uniformSpace (fun i : S ↦ α i))

{ι : Type u_1}
(α : ι → Type u)
[U : (i : ι) → UniformSpace (α i)]
(𝔖 : Set (Set ι))

UniformSpace.comap (⋃₀ 𝔖).restrict (Pi.uniformSpace fun i => α ↑i) =
  ⨅ S ∈ 𝔖, UniformSpace.comap S.restrict (Pi.uniformSpace fun i => α ↑i)


@[to_additive IsOfFinAddOrder.prod_mk]
theorem IsOfFinOrder.prod_mk : IsOfFinOrder a → IsOfFinOrder b → IsOfFinOrder (a, b)

{α : Type u_4}
{β : Type u_5}
[AddMonoid α]
[AddMonoid β]
{a : α}
{b : β}

IsOfFinAddOrder a → IsOfFinAddOrder b → IsOfFinAddOrder (a, b)


@[simp]
theorem out_eq (q : Trunc α) : mk q.out = q


@[to_additive (attr := measurability)]
theorem measurableSet_mulSupport [One β] [MeasurableSingletonClass β] (hf : Measurable f) :
    MeasurableSet (mulSupport f)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
[Zero β]
[MeasurableSingletonClass β]
(hf : Measurable f)


theorem apply_eq_iff_eq (e : P₁ ≃ᵃ[k] P₂) {p₁ p₂ : P₁} : e p₁ = e p₂ ↔ p₁ = p₂

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{V₁ : Type u_6}
{V₂ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(e : P₁ ≃ᵃ[k] P₂)
{p₁ p₂ : P₁}


@[to_additive]
theorem sSup_div : sSup (s / t) = sSup s / sInf t

[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 Schnirelmann density of any finset is `0`. -/
lemma schnirelmannDensity_finset (A : Finset ℕ) : schnirelmannDensity A = 0


theorem Prime.pow_dvd_iff_le_factorization {p k n : ℕ} (pp : Prime p) (hn : n ≠ 0) :
    p ^ k ∣ n ↔ k ≤ n.factorization p

{p k n : ℕ}
(pp : Nat.Prime p)
(hn : n ≠ 0)


theorem uIoc_ae_eq_interval [LinearOrder α] {a b : α} : Ι a b =ᵐ[μ] [[a, b]]

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


theorem DifferentiableOn.ccosh (hc : DifferentiableOn ℂ f s) :
    DifferentiableOn ℂ (fun x => Complex.cosh (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{s : Set E}
(hc : DifferentiableOn ℂ f s)


theorem pumping_lemma [Fintype σ] {x : List α} (hx : x ∈ M.accepts)
    (hlen : Fintype.card (Set σ) ≤ List.length x) :
    ∃ a b c,
      x = a ++ b ++ c ∧
        a.length + b.length ≤ Fintype.card (Set σ) ∧ b ≠ [] ∧ {a} * {b}∗ * {c} ≤ M.accepts

(hlen : Fintype.card (Set σ) ≤ x.length)


theorem sinh_ofReal_re (x : ℝ) : (sinh x).re = Real.sinh x


theorem Zigzag.symm {j₁ j₂ : J} (h : Zigzag j₁ j₂) : Zigzag j₂ j₁

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{j₁ j₂ : J}
(h : CategoryTheory.Zigzag j₁ j₂)


lemma NNReal.closedBall_zero_eq_Icc' (c : ℝ≥0) :
    Metric.closedBall (0 : ℝ≥0) c.toReal = Set.Icc 0 c


/-- $\lim_{x\to-\infty}|x|=+\infty$ -/
theorem tendsto_abs_atBot_atTop : Tendsto (abs : α → α) atBot atTop

{α : Type u_3}
[LinearOrderedAddCommGroup α]

Filter.Tendsto abs Filter.atBot Filter.atTop


@[fun_prop]
theorem Differentiable.comp {g : F → G} (hg : Differentiable 𝕜 g) (hf : Differentiable 𝕜 f) :
    Differentiable 𝕜 (g ∘ f)

{𝕜 : 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 : F → G}
(hg : Differentiable 𝕜 g)
(hf : Differentiable 𝕜 f)


/-- `LocallyConstant.comap` as a `MonoidHom`. -/
@[to_additive (attr := simps) "`LocallyConstant.comap` as an `AddMonoidHom`."]
def comapMonoidHom [MulOneClass Z]  (f : C(X, Y)) :
    LocallyConstant Y Z →* LocallyConstant X Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{Z : Type u_6}
[MulOneClass Z]
(f : C(X, Y))
(g : LocallyConstant Y Z)

(LocallyConstant.comapMonoidHom f) g = LocallyConstant.comap f g


lemma sphere_subset_ball {r R : ℝ} (h : r < R) : sphere x r ⊆ ball x R

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{r R : ℝ}
(h : r < R)


@[simp]
theorem laurentAux_algebraMap : laurentAux r (algebraMap _ _ p) = algebraMap _ _ (taylor r p)

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

(RatFunc.laurentAux r) ((algebraMap (Polynomial R) (RatFunc R)) p) =
  (algebraMap (Polynomial R) (RatFunc R)) ((Polynomial.taylor r) p)


@[to_additive]
theorem noncommProd_insert_of_not_mem' [DecidableEq α] (s : Finset α) (a : α) (f : α → β) (comm)
    (ha : a ∉ s) :
    noncommProd (insert a s) f comm =
      noncommProd s f (comm.mono fun _ => mem_insert_of_mem) * f a

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

(insert a s).noncommProd f comm = s.noncommProd f ⋯ * f a


/-- The union of the extensive and regular coverages generates the coherent topology on `C`. -/
theorem extensive_regular_generate_coherent [Preregular C] [FinitaryPreExtensive C] :
    ((extensiveCoverage C) ⊔ (regularCoverage C)).toGrothendieck =
    (coherentTopology C)

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preregular C]
[CategoryTheory.FinitaryPreExtensive C]

CategoryTheory.Coverage.toGrothendieck C (CategoryTheory.extensiveCoverage C ⊔ CategoryTheory.regularCoverage C) =
  CategoryTheory.coherentTopology C


theorem iInf₂_sup_eq {f : ∀ i, κ i → α} (a : α) : (⨅ (i) (j), f i j) ⊔ a = ⨅ (i) (j), f i j ⊔ a

{α : Type u}
{ι : Sort w}
{κ : ι → Sort w'}
[Order.Coframe α]
{f : (i : ι) → κ i → α}
(a : α)

(⨅ i, ⨅ j, f i j) ⊔ a = ⨅ i, ⨅ j, f i j ⊔ a


lemma StrictAntiOn.image_Ioc_subset (h : StrictAntiOn f (Icc a b)) :
    f '' Ioc a b ⊆ Ico (f b) (f a)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[PartialOrder α]
[Preorder β]
{a b : α}
(h : StrictAntiOn f (Set.Icc a b))


@[simp]
theorem length_empty : f.length ∅ = 0


theorem finiteAtBot {m0 : MeasurableSpace α} (μ : Measure α) : μ.FiniteAtFilter ⊥

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


@[simp, mfld_simps]
theorem mem_localTrivAt_baseSet : b ∈ (Z.localTrivAt b).baseSet

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)
(b : B)


/-- The sine of an angle in a right-angled triangle multiplied by the hypotenuse equals the
opposite side. -/
theorem sin_oangle_left_mul_dist_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : Real.Angle.sin (∡ p₃ p₁ p₂) * dist p₁ p₃ = dist p₃ p₂

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

(∡ p₃ p₁ p₂).sin * dist p₁ p₃ = dist p₃ p₂


protected theorem Connected.boxProd (hG : G.Connected) (hH : H.Connected) : (G □ H).Connected

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{H : SimpleGraph β}
(hG : G.Connected)
(hH : H.Connected)


/-- A ring hom `α →+* β` can equivalently be viewed as a ring hom `αᵐᵒᵖ →+* βᵐᵒᵖ`. This is the
action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[simps!]
def RingHom.op {α β} [NonAssocSemiring α] [NonAssocSemiring β] :
    (α →+* β) ≃ (αᵐᵒᵖ →+* βᵐᵒᵖ)

{α : Type u_2}
{β : Type u_3}
[NonAssocSemiring α]
[NonAssocSemiring β]
(f : αᵐᵒᵖ →+* βᵐᵒᵖ)

∀ (a : α), (RingHom.op.symm f) a = MulOpposite.unop (f (MulOpposite.op a))


theorem opNNNorm_le_of_lipschitz {f : E →SL[σ₁₂] F} {K : ℝ≥0} (hf : LipschitzWith K f) :
    ‖f‖₊ ≤ K

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
{f : E →SL[σ₁₂] F}
{K : ℝ≥0}
(hf : LipschitzWith K ⇑f)


/-- The composition of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.comp {s : Set E} {t : Set F} {g : F → G} {f : E → F} (hg : ContDiffOn 𝕜 n g t)
    (hf : ContDiffOn 𝕜 n f s) (st : s ⊆ f ⁻¹' t) : ContDiffOn 𝕜 n (g ∘ f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{s : Set E}
{t : Set F}
{g : F → G}
{f : E → F}
(hg : ContDiffOn 𝕜 n g t)
(hf : ContDiffOn 𝕜 n f s)
(st : s ⊆ f ⁻¹' t)


protected theorem zsmul_mem {x : R} (hx : x ∈ s) (n : ℤ) : n • x ∈ s

{R : Type u}
[Ring R]
(s : Subring R)
{x : R}
(hx : x ∈ s)
(n : ℤ)


theorem take_eq_nil_of_eq_nil : ∀ {as : List α} {i}, as = [] → as.take i = []


theorem HasBasis.isCountablyGenerated [Countable ι] {f : Filter α} {p : ι → Prop} {s : ι → Set α}
    (h : f.HasBasis p s) : f.IsCountablyGenerated

{α : Type u_1}
{ι : Type u_4}
[Countable ι]
{f : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(h : f.HasBasis p s)


/-- If `s` is a limit binary fan over `X` and `Y`, then every pair of morphisms `f : W ⟶ X` and
    `g : W ⟶ Y` induces a morphism `l : W ⟶ s.pt` satisfying `l ≫ s.fst = f` and `l ≫ s.snd = g`.
    -/
@[simps]
def BinaryFan.IsLimit.lift' {W X Y : C} {s : BinaryFan X Y} (h : IsLimit s) (f : W ⟶ X)
    (g : W ⟶ Y) : { l : W ⟶ s.pt // l ≫ s.fst = f ∧ l ≫ s.snd = g }

{s : CategoryTheory.Limits.BinaryFan X Y}

↑(CategoryTheory.Limits.BinaryFan.IsLimit.lift' h f g) = h.lift (CategoryTheory.Limits.BinaryFan.mk f g)


@[simp] theorem cond_true_same  : ∀(c b : Bool), cond c c b = (c || b)


theorem compare_eq_iff_eq {a b : α} : (compare a b = .eq) ↔ a = b


/-- If the codomain of a continuous injective function has discrete topology,
then so does the domain.

See also `Embedding.discreteTopology` for an important special case. -/
theorem DiscreteTopology.of_continuous_injective
    {β : Type*} [TopologicalSpace α] [TopologicalSpace β] [DiscreteTopology β] {f : α → β}
    (hc : Continuous f) (hinj : Injective f) : DiscreteTopology α

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
[DiscreteTopology β]
{f : α → β}
(hc : Continuous f)
(hinj : Function.Injective f)


theorem ne_neg_of_mem_sphere {r : ℝ} (hr : r ≠ 0) (x : sphere (0 : E) r) : x ≠ -x

(𝕜 : Type u_1)
{E : Type u_3}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CharZero 𝕜]
{r : ℝ}
(hr : r ≠ 0)
(x : ↑(Metric.sphere 0 r))


/-- The square with `0 : 0 ⟶ 0` on the left and `𝟙 X` on the right is a pullback square. -/
@[simp]
theorem zero_left (X : C) : IsPullback (0 : 0 ⟶ X) (0 : (0 : C) ⟶ 0) (𝟙 X) (0 : 0 ⟶ X)


protected lemma covariantClass_add_le [AddZeroClass α] [CovariantClass α α (· + ·) (· ≤ ·)]
    (h : ∀ a : α, 0 ≤ a) : CovariantClass (WithZero α) (WithZero α) (· + ·) (· ≤ ·)

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

CovariantClass (WithZero α) (WithZero α) (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1


@[simp] theorem iff_and_self : ∀(a b : Bool), (b = (a && b)) ↔ (b → a)


/-- An orbit is a block -/
theorem isFixedBlock_orbit (a : X) : IsFixedBlock G (orbit G a)

{G : Type u_1}
[Group G]
{X : Type u_2}
[MulAction G X]
(a : X)

MulAction.IsFixedBlock G (MulAction.orbit G a)


@[simp]
theorem symm_refl (α : Type*) [LE α] : (refl α).symm = refl α

(OrderIso.refl α).symm = OrderIso.refl α


protected theorem aestronglyMeasurable' (h : IntervalIntegrable f μ a b) :
    AEStronglyMeasurable f (μ.restrict (Ioc b a))

{E : Type u_3}
[NormedAddCommGroup E]
{f : ℝ → E}
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
(h : IntervalIntegrable f μ a b)

MeasureTheory.AEStronglyMeasurable f (μ.restrict (Set.Ioc b a))


theorem surjOn_log' : SurjOn log (Iio 0) univ

Set.SurjOn Real.log (Set.Iio 0) Set.univ


/--
An isomorphism in `Dial C` can be induced by isomorphisms on the source and target,
which respect the respective relations on `X` and `Y`.
-/
@[simps] def isoMk {X Y : Dial C} (e₁ : X.src ≅ Y.src) (e₂ : X.tgt ≅ Y.tgt)
    (eq : X.rel = (Subobject.pullback (prod.map e₁.hom e₂.hom)).obj Y.rel) : X ≅ Y

(eq : X.rel = (CategoryTheory.Subobject.pullback (CategoryTheory.Limits.prod.map e₁.hom e₂.hom)).obj Y.rel)

(CategoryTheory.Dial.isoMk e₁ e₂ eq).inv.f = e₁.inv


@[simp]
theorem zero_divMonomial (s : σ →₀ ℕ) : (0 : MvPolynomial σ R) /ᵐᵒⁿᵒᵐⁱᵃˡ s = 0

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


@[reassoc (attr := simp)]
lemma d_snd_v' (n : ℤ) :
    (mappingCone φ).d (n - 1) n ≫ (snd φ).v n n (add_zero n) =
    (fst φ : Cochain (mappingCone φ) F 1).v (n - 1) n (by omega) ≫ φ.f n +
      (snd φ).v (n - 1) (n - 1) (add_zero _) ≫ G.d (n - 1) n

(CochainComplex.mappingCone φ).d (n - 1) n ≫ (CochainComplex.mappingCone.snd φ).v n n ⋯ =
  (↑(CochainComplex.mappingCone.fst φ)).v (n - 1) n ⋯ ≫ φ.f n +
    (CochainComplex.mappingCone.snd φ).v (n - 1) (n - 1) ⋯ ≫ G.d (n - 1) n


theorem ext_iff {f g : ⨁ i, M i} : f = g ↔ ∀ i, component R ι M i f = component R ι M i g

(R : Type u)
[Semiring R]
{ι : Type v}
{M : ι → Type w}
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
{f g : DirectSum ι fun i => M i}

f = g ↔ ∀ (i : ι), (DirectSum.component R ι M i) f = (DirectSum.component R ι M i) g


lemma prod_ne_zero (hL : (0 : M₀) ∉ l) : l.prod ≠ 0

{M₀ : Type u_4}
[MonoidWithZero M₀]
{l : List M₀}
[Nontrivial M₀]
[NoZeroDivisors M₀]
(hL : 0 ∉ l)


theorem lt_div_iff' {a b r : ℝ≥0} (hr : r ≠ 0) : a < b / r ↔ r * a < b


@[to_additive (attr := simp)]
protected theorem map_smul : map (fun b => a • b) f = a • f

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f : Filter β}
{a : α}


theorem hasBiproductsOfShape_of_equiv {K : Type w'} [HasBiproductsOfShape K C] (e : J ≃ K) :
    HasBiproductsOfShape J C


@[to_additive (attr := simp)]
theorem prod_const_one : (∏ _x ∈ s, (1 : β)) = 1

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
[CommMonoid β]


theorem HasBasis.exists_iff (hl : l.HasBasis p s) {P : Set α → Prop}
    (mono : ∀ ⦃s t⦄, s ⊆ t → P t → P s) : (∃ s ∈ l, P s) ↔ ∃ i, p i ∧ P (s i)

(mono : ∀ ⦃s t : Set α⦄, s ⊆ t → P t → P s)


@[to_additive]
theorem inv_def (w : FreeMonoid (G ⊕ H)) :
    (mk w)⁻¹ = mk (ofList (w.toList.map (Sum.map Inv.inv Inv.inv)).reverse)

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
(w : FreeMonoid (G ⊕ H))

(Monoid.Coprod.mk w)⁻¹ =
  Monoid.Coprod.mk (FreeMonoid.ofList (List.map (Sum.map Inv.inv Inv.inv) (FreeMonoid.toList w)).reverse)


/-- A strong epimorphism that is a monomorphism is an isomorphism. -/
theorem isIso_of_mono_of_strongEpi (f : P ⟶ Q) [Mono f] [StrongEpi f] : IsIso f

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


@[simp, to_additive existing]
theorem sym_inv [Inv α] (a : α) : sym a⁻¹ = (sym a)⁻¹


theorem Group.exponent_dvd_nat_card : Monoid.exponent G ∣ Nat.card G


/-- (Impl)
Construct the colimiting algebra from the map `λ : TL ⟶ L` given by `lambda`. We are required to
show it satisfies the two algebra laws, which follow from the algebra laws for the image of `D` and
our `commuting` lemma.
-/
@[simps]
def coconePoint : Algebra T

{D : CategoryTheory.Functor J T.Algebra}

(c : CategoryTheory.Limits.Cocone (D.comp T.forget))

[CategoryTheory.Limits.PreservesColimit (D.comp T.forget) T.toFunctor]

[CategoryTheory.Limits.PreservesColimit ((D.comp T.forget).comp T.toFunctor) T.toFunctor]

(CategoryTheory.Monad.ForgetCreatesColimits.coconePoint c t).A = c.pt


@[simp]
theorem think_bind (c) (f : α → Computation β) : bind (think c) f = think (bind c f)

{α : Type u}
{β : Type v}
(c : Computation α)
(f : α → Computation β)


theorem hcomp {p₀ p₁ : Path x₀ x₁} {q₀ q₁ : Path x₁ x₂} (hp : p₀.Homotopic p₁)
    (hq : q₀.Homotopic q₁) : (p₀.trans q₀).Homotopic (p₁.trans q₁)

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ x₂ : X}
{p₀ p₁ : Path x₀ x₁}
{q₀ q₁ : Path x₁ x₂}
(hp : p₀.Homotopic p₁)
(hq : q₀.Homotopic q₁)


/-- `inl_` is the functor `X ↦ inl X`. -/
@[simps]
def inl_ : C ⥤ C ⊕ D

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

(CategoryTheory.Sum.inl_ C D).obj X = Sum.inl X


theorem hasDerivAt_mul_const (c : 𝕜) : HasDerivAt (fun x => x * c) c x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
(c : 𝕜)


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

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


lemma mono_homologyMap_mor₂_iff :
    Mono ((homologyFunctor C n₀).map T.mor₂) ↔ (homologyFunctor C n₀).map T.mor₁ = 0

(T : CategoryTheory.Pretriangulated.Triangle (DerivedCategory C))

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.Mono ((DerivedCategory.homologyFunctor C n₀).map T.mor₂) ↔
  (DerivedCategory.homologyFunctor C n₀).map T.mor₁ = 0


@[simp]
theorem swap_inv (x y : α) : (swap x y)⁻¹ = swap x y


@[to_additive (attr := simp)]
theorem aemeasurable_inv_iff {G : Type*} [Group G] [MeasurableSpace G] [MeasurableInv G]
    {f : α → G} : AEMeasurable (fun x => (f x)⁻¹) μ ↔ AEMeasurable f μ

{α : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{G : Type u_4}
[AddGroup G]
[MeasurableSpace G]
[MeasurableNeg G]
{f : α → G}

AEMeasurable (fun x => -f x) μ ↔ AEMeasurable f μ


@[reassoc]
lemma InjectiveResolution.iso_inv_naturality {X Y : C} (f : X ⟶ Y)
    (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0) :
    I.iso.inv ≫ (injectiveResolutions C).map f =
      (HomotopyCategory.quotient _ _).map φ ≫ J.iso.inv

(I : CategoryTheory.InjectiveResolution X)

(J : CategoryTheory.InjectiveResolution Y)

I.iso.inv ≫ (CategoryTheory.injectiveResolutions C).map f =
  (HomotopyCategory.quotient C (ComplexShape.up ℕ)).map φ ≫ J.iso.inv


theorem linearIndependent_subtype {s : Set M} :
    LinearIndependent R (fun x => x : s → M) ↔
      ∀ l ∈ Finsupp.supported R R s, (Finsupp.total M M R id) l = 0 → l = 0

{R : Type u_2}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set M}

(LinearIndependent R fun (x : ↑s) => ↑x) ↔ ∀ l ∈ Finsupp.supported R R s, (Finsupp.total M M R id) l = 0 → l = 0


@[norm_cast]
theorem lt_to_nat {m n : PosNum} : (m : ℕ) < n ↔ m < n


/-- Note this is more general than `IsSelfAdjoint.conjugate` as `B` can be rectangular. -/
theorem isHermitian_mul_mul_conjTranspose [Fintype m] {A : Matrix m m α} (B : Matrix n m α)
    (hA : A.IsHermitian) : (B * A * Bᴴ).IsHermitian

{α : Type u_1}
{m : Type u_3}
{n : Type u_4}
[NonUnitalSemiring α]
[StarRing α]
[Fintype m]
{A : Matrix m m α}
(B : Matrix n m α)
(hA : A.IsHermitian)


theorem CovBy.Ico_eq (h : a ⋖ b) : Ico a b = {a}

{α : Type u_1}
[PartialOrder α]
{a b : α}
(h : a ⋖ b)


/-- A natural isomorphism between the functor `map (F ⋙ G) ` and `map F ⋙ map G `. -/
@[simps!]
def mapComp {D E : Type*} [Category D] [Category E] (F : C ⥤ D) (G : D ⥤ E) :
    map (F ⋙ G) ≅ map F ⋙ map G

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
{E : Type u_2}
[CategoryTheory.Category.{u_3, u_1} D]
[CategoryTheory.Category.{u_4, u_2} E]
(F : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
(X : CategoryTheory.WithInitial C)

(CategoryTheory.WithInitial.mapComp F G).inv.app X =
  (match X with
    | CategoryTheory.WithInitial.of x => CategoryTheory.Iso.refl (CategoryTheory.WithInitial.of (G.obj (F.obj x)))
    | CategoryTheory.WithInitial.star => CategoryTheory.Iso.refl CategoryTheory.WithInitial.star).inv


theorem rootMultiplicity_eq_multiplicity [DecidableEq R] [@DecidableRel R[X] (· ∣ ·)]
    (p : R[X]) (a : R) :
    rootMultiplicity a p =
      if h0 : p = 0 then 0 else (multiplicity (X - C a) p).get (multiplicity_X_sub_C_finite a h0)

{R : Type u}
[Ring R]
[DecidableEq R]
[DecidableRel fun x x_1 => x ∣ x_1]
(p : R[X])
(a : R)

Polynomial.rootMultiplicity a p = if h0 : p = 0 then 0 else (multiplicity (Polynomial.X - Polynomial.C a) p).get ⋯


@[to_additive]
theorem mul_right_inj (h : IsUnit a) : a * b = a * c ↔ b = c

{M : Type u_1}
[AddMonoid M]
{a b c : M}
(h : IsAddUnit a)


/-- Auxiliary definition for `CategoryTheory.Functor.closed`.
The internal hom functor `F ⟶[C] -` -/
@[simps!]
def closedIhom (F : D ⥤ C) : (D ⥤ C) ⥤ D ⥤ C

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

(F.closedIhom.obj Y).obj X = (CategoryTheory.ihom (F.obj X)).obj (Y.obj X)


theorem principal_mul_omega_opow_opow (o : Ordinal) : Principal (· * ·) (omega^omega^o)

Ordinal.Principal (fun x x_1 => x * x_1) (Ordinal.omega ^ Ordinal.omega ^ o)


@[simp, norm_cast]
theorem dist_le_coe {x y : α} {c : ℝ≥0} : dist x y ≤ c ↔ nndist x y ≤ c

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{c : ℝ≥0}


theorem IicExtend_of_le (f : Iic b → β) (hx : b ≤ x) : IicExtend f x = f ⟨b, le_rfl⟩

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{b x : α}
(f : ↑(Set.Iic b) → β)
(hx : b ≤ x)


@[to_additive (attr := simp)]
theorem mul_apply [∀ i, Mul <| f i] : (x * y) i = x i * y i

{I : Type u}
{f : I → Type v₁}
(x y : (i : I) → f i)
(i : I)
[(i : I) → Add (f i)]


theorem IsIntegralClosure.comap_lt_comap {I J : Ideal A} [I.IsPrime] (I_lt_J : I < J) :
    I.comap (algebraMap R A) < J.comap (algebraMap R A)

{R : Type u_1}
[CommRing R]
(S : Type u_2)
[CommRing S]
[Algebra R S]
{A : Type u_3}
[CommRing A]
[Algebra R A]
[Algebra A S]
[IsScalarTower R A S]
[IsIntegralClosure A R S]
{I J : Ideal A}
[I.IsPrime]
(I_lt_J : I < J)

Ideal.comap (algebraMap R A) I < Ideal.comap (algebraMap R A) J


protected theorem seq_eq {α β ε : Type u} [Monad m] (mf : ExceptT ε m (α → β)) (x : ExceptT ε m α) : mf <*> x = mf >>= fun f => f <$> x

{m : Type u → Type u_1}
{α β ε : Type u}
[Monad m]
(mf : ExceptT ε m (α → β))
(x : ExceptT ε m α)

(Seq.seq mf fun x_1 => x) = do
  let f ← mf
  f <$> x


/-- The frontier of the (open) thickening of a set is contained in an `EMetric.infEdist` level
set. -/
theorem frontier_thickening_subset (E : Set α) {δ : ℝ} :
    frontier (thickening δ E) ⊆ { x : α | infEdist x E = ENNReal.ofReal δ }

{α : Type u}
[PseudoEMetricSpace α]
(E : Set α)
{δ : ℝ}

frontier (Metric.thickening δ E) ⊆ {x | EMetric.infEdist x E = ENNReal.ofReal δ}


/-- Build a `QuadraticForm.IsometryEquiv` from an isomorphism in the category
`QuadraticModuleCat R`. -/
@[simps]
def toIsometryEquiv (i : X ≅ Y) : X.form.IsometryEquiv Y.form

{R : Type u}
[CommRing R]
{X Y : QuadraticModuleCat R}
(i : X ≅ Y)
(a : ↑X.toModuleCat)

i.toIsometryEquiv a = i.hom.toIsometry a


@[simp]
theorem isFixedPt_prod_map (x : α × β) :
    IsFixedPt (Prod.map f g) x ↔ IsFixedPt f x.1 ∧ IsFixedPt g x.2

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

Function.IsFixedPt (Prod.map f g) x ↔ Function.IsFixedPt f x.1 ∧ Function.IsFixedPt g x.2


@[simp] lemma natAbs_ofNat' (n : ℕ) : natAbs (ofNat n) = n


theorem antitone' [Subsingleton β] (f : α → β) : Antitone f

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


lemma baseChange_negAddY (x₁ x₂ y₁ L : A) :
    (W.baseChange B).toAffine.negAddY (f x₁) (f x₂) (f y₁) (f L) =
      f ((W.baseChange A).toAffine.negAddY x₁ x₂ y₁ L)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type s}
[CommRing S]
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)
(x₁ x₂ y₁ L : A)

(WeierstrassCurve.baseChange W B).toAffine.negAddY (f x₁) (f x₂) (f y₁) (f L) =
  f ((WeierstrassCurve.baseChange W A).toAffine.negAddY x₁ x₂ y₁ L)


theorem mk_subset_mk_lt_cof {α : Type*} (h : ∀ x < #α, (2^x) < #α) :
    #{ s : Set α // #s < cof (#α).ord } = #α


theorem zpow_add_one {A : M} (h : IsUnit A.det) : ∀ n : ℤ, A ^ (n + 1) = A ^ n * A

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


@[to_additive]
theorem prod_range_zero (f : ℕ → β) : ∏ k ∈ range 0, f k = 1

{β : Type u_4}
[AddCommMonoid β]
(f : ℕ → β)


theorem mem_join : ∀ {L : Array (Array α)}, a ∈ L.join ↔ ∃ l, l ∈ L ∧ a ∈ l

{α : Type u_1}
{a : α}
{L : Array (Array α)}


lemma dvd_zsmul_of_dvd [NonUnitalRing R] {x y : R} (z : ℤ) (h : x ∣ y) : x ∣ z • y

{R : Type u_1}
[NonUnitalRing R]
{x y : R}
(z : ℤ)
(h : x ∣ y)


theorem restrict_eq_self {i : Set α} (hi : MeasurableSet i) {j : Set α} (hj : MeasurableSet j)
    (hij : j ⊆ i) : v.restrict i j = v j

{α : Type u_1}
[MeasurableSpace α]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(v : MeasureTheory.VectorMeasure α M)
{i : Set α}
(hi : MeasurableSet i)
{j : Set α}
(hj : MeasurableSet j)
(hij : j ⊆ i)


@[simp]
lemma uniformEquicontinuousOn_empty [h : IsEmpty ι] (F : ι → β → α) (S : Set β) :
    UniformEquicontinuousOn F S

{ι : Type u_1}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
[h : IsEmpty ι]
(F : ι → β → α)
(S : Set β)


theorem forall_coord_eq_zero_iff {x : M} : (∀ i, b.coord i x = 0) ↔ x = 0

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


@[to_additive (attr := simp)]
theorem fst_comp_inr : (fst M N).comp (inr M N) = 1

{M : Type u_5}
{N : Type u_6}
[AddZeroClass M]
[AddZeroClass N]

(AddMonoidHom.fst M N).comp (AddMonoidHom.inr M N) = 0


/-- A simplicial category is a category `C` that is enriched over the
category of simplicial sets in such a way that morphisms in
`C` identify to the `0`-simplices of the enriched hom. -/
class SimplicialCategory extends EnrichedCategory SSet.{v} C where
  /-- morphisms identify to `0`-simplices of the enriched hom -/
  homEquiv (K L : C) : (K ⟶ L) ≃ (𝟙_ SSet.{v} ⟶ EnrichedCategory.Hom K L)
  homEquiv_id (K : C) : homEquiv K K (𝟙 K) = eId SSet K := by aesop_cat
  homEquiv_comp {K L M : C} (f : K ⟶ L) (g : L ⟶ M) :
    homEquiv K M (f ≫ g) = (λ_ _).inv ≫ (homEquiv K L f ⊗ homEquiv L M g) ≫
      eComp SSet K L M := by aesop_cat

[self : CategoryTheory.SimplicialCategory C]

(CategoryTheory.SimplicialCategory.homEquiv K M) (f ≫ g) =
  (λ_ (𝟙_ SSet)).inv ≫
    ((CategoryTheory.SimplicialCategory.homEquiv K L) f ⊗ (CategoryTheory.SimplicialCategory.homEquiv L M) g) ≫
      CategoryTheory.eComp SSet K L M


theorem flag_le_iff (b : Basis (Fin n) R M) {k p} :
    b.flag k ≤ p ↔ ∀ i : Fin n, i.castSucc < k → b i ∈ p

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{n : ℕ}
(b : Basis (Fin n) R M)
{k : Fin (n + 1)}
{p : Submodule R M}

b.flag k ≤ p ↔ ∀ (i : Fin n), i.castSucc < k → b i ∈ p


theorem integralSum_fiberwise {α} (g : Box ι → α) (f : ℝⁿ → E) (vol : ι →ᵇᵃ E →L[ℝ] F)
    (π : TaggedPrepartition I) :
    (∑ y ∈ π.boxes.image g, integralSum f vol (π.filter (g · = y))) = integralSum f vol π

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
{α : Type u_1}
(g : BoxIntegral.Box ι → α)
(f : (ι → ℝ) → E)
(vol : ι →ᵇᵃ[⊤] E →L[ℝ] F)
(π : BoxIntegral.TaggedPrepartition I)

∑ y ∈ Finset.image g π.boxes, BoxIntegral.integralSum f vol (π.filter fun x => g x = y) =
  BoxIntegral.integralSum f vol π


@[simp] theorem cond_false_same : ∀(c b : Bool), cond c b c = (c && b)


theorem bind_decode_iff {f : α → β → Option σ} :
    (Primrec₂ fun a n => (@decode β _ n).bind (f a)) ↔ Primrec₂ f

{α : Type u_1}
{β : Type u_2}
{σ : Type u_5}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α → β → Option σ}

(Primrec₂ fun a n => (Encodable.decode n).bind (f a)) ↔ Primrec₂ f


protected theorem Commute.geom_sum₂_Ico [DivisionRing α] {x y : α} (h : Commute x y) (hxy : x ≠ y)
    {m n : ℕ} (hmn : m ≤ n) :
    (∑ i ∈ Finset.Ico m n, x ^ i * y ^ (n - 1 - i)) = (x ^ n - y ^ (n - m) * x ^ m) / (x - y)

{α : Type u}
[DivisionRing α]
{x y : α}
(h : Commute x y)
(hxy : x ≠ y)
{m n : ℕ}
(hmn : m ≤ n)

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


@[simp]
theorem addVal_apply_of_ne {x : HahnSeries Γ R} (hx : x ≠ 0) : addVal Γ R x = x.order

{Γ : Type u_1}
{R : Type u_2}
[LinearOrderedCancelAddCommMonoid Γ]
[Ring R]
[IsDomain R]
{x : HahnSeries Γ R}
(hx : x ≠ 0)


theorem SigmaCompactSpace.of_countable (S : Set (Set X)) (Hc : S.Countable)
    (Hcomp : ∀ s ∈ S, IsCompact s) (HU : ⋃₀ S = univ) : SigmaCompactSpace X

{X : Type u_1}
[TopologicalSpace X]
(S : Set (Set X))
(Hc : S.Countable)
(Hcomp : ∀ s ∈ S, IsCompact s)
(HU : ⋃₀ S = Set.univ)


@[simp]
theorem symm_toLinearEquiv (e : A ≃ₗc[R] B) :
    e.symm = (e : A ≃ₗ[R] B).symm

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[AddCommMonoid B]
[Module R A]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(e : A ≃ₗc[R] B)


@[simp]
theorem comp_assoc (f : γ →𝒄 φ) (g : β →𝒄 γ) (h : α →𝒄 β) : f.comp (g.comp h) = (f.comp g).comp h

{α : Type u}
{β : Type v}
{γ : Type u_3}
{φ : Type u_4}
[OmegaCompletePartialOrder α]
[OmegaCompletePartialOrder β]
[OmegaCompletePartialOrder γ]
[OmegaCompletePartialOrder φ]
(f : γ →𝒄 φ)
(g : β →𝒄 γ)
(h : α →𝒄 β)


@[simp]
theorem head_cons (a : α) (s) : head (cons a s) = some a

{α : Type u}
(a : α)
(s : Stream'.Seq α)


@[reassoc (attr := simp)]
theorem ι_fstSigmaMap (b) : Sigma.ι I.left b ≫ I.fstSigmaMap = I.fst b ≫ Sigma.ι I.right _

(I : CategoryTheory.Limits.MultispanIndex C)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Sigma.ι I.left b) I.fstSigmaMap =
  CategoryTheory.CategoryStruct.comp (I.fst b) (CategoryTheory.Limits.Sigma.ι I.right (I.fstFrom b))


theorem lift_surjective_iff :
    Surjective (lift hg : S → P) ↔ ∀ v : P, ∃ x : R × M, v * g x.2 = g x.1

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
{g : R →+* P}
(hg : ∀ (y : ↥M), IsUnit (g ↑y))

Function.Surjective ⇑(IsLocalization.lift hg) ↔ ∀ (v : P), ∃ x, v * g ↑x.2 = g x.1


theorem map_ne_zero_of_mem_nonZeroDivisors [Nontrivial M] [ZeroHomClass F M M'] (g : F)
    (hg : Function.Injective (g : M → M')) {x : M} (h : x ∈ M⁰) : g x ≠ 0

{M : Type u_2}
{M' : Type u_3}
{F : Type u_7}
[MonoidWithZero M]
[MonoidWithZero M']
[FunLike F M M']
[Nontrivial M]
[ZeroHomClass F M M']
(g : F)
(hg : Function.Injective ⇑g)
{x : M}
(h : x ∈ M⁰)


@[simp]
theorem forall_fin_zero_pi {α : Fin 0 → Sort*} {P : (∀ i, α i) → Prop} :
    (∀ x, P x) ↔ P finZeroElim

{α : Fin 0 → Sort u_1}
{P : ((i : Fin 0) → α i) → Prop}

(∀ (x : (i : Fin 0) → α i), P x) ↔ P finZeroElim


lemma Antitone.isCoboundedUnder_ge_of_isCobounded {f : R → S} (f_decr : Antitone f)
    [NeBot F] (cobdd : IsCobounded (· ≤ ·) F) :
    F.IsCoboundedUnder (· ≥ ·) f

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

Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) F f


theorem getLsb_sshiftRight (x : BitVec w) (s i : Nat) :
    getLsb (x.sshiftRight s) i =
      (!decide (w ≤ i) && if s + i < w then x.getLsb (s + i) else x.msb)

(x.sshiftRight s).getLsb i = (!decide (w ≤ i) && if s + i < w then x.getLsb (s + i) else x.msb)


theorem exists_mem_and_smul_eq_self_of_fg_of_le_smul {R : Type*} [CommRing R] {M : Type*}
    [AddCommGroup M] [Module R M] (I : Ideal R) (N : Submodule R M) (hn : N.FG) (hin : N ≤ I • N) :
    ∃ r ∈ I, ∀ n ∈ N, r • n = n

{R : Type u_3}
[CommRing R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
(I : Ideal R)
(N : Submodule R M)
(hn : N.FG)
(hin : N ≤ I • N)


theorem setToFun_toL1 (hT : DominatedFinMeasAdditive μ T C) (hf : Integrable f μ) :
    setToFun μ T hT (hf.toL1 f) = setToFun μ T hT f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

MeasureTheory.setToFun μ T hT ↑↑(MeasureTheory.Integrable.toL1 f hf) = MeasureTheory.setToFun μ T hT f


theorem iff_isSplitMono_eq_zero {X Y : C} (f : X ⟶ Y) [IsSplitMono f] : IsZero X ↔ f = 0


@[simp]
theorem invFun_eq_symm (f : R ≃+* S) : EquivLike.inv f = f.symm

{R : Type u_4}
{S : Type u_5}
[Mul R]
[Mul S]
[Add R]
[Add S]
(f : R ≃+* S)


theorem lt_def {x y : ONote} : x < y ↔ repr x < repr y


/-- In a linearly ordered additive commutative group with the order topology, if `f` tends to `C`
and `g` tends to `atBot` then `f + g` tends to `atBot`. -/
theorem Filter.Tendsto.add_atBot {C : α} (hf : Tendsto f l (𝓝 C)) (hg : Tendsto g l atBot) :
    Tendsto (fun x => f x + g x) l atBot

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[LinearOrderedAddCommGroup α]
[OrderTopology α]
{l : Filter β}
{f g : β → α}
{C : α}
(hf : Filter.Tendsto f l (𝓝 C))
(hg : Filter.Tendsto g l Filter.atBot)

Filter.Tendsto (fun x => f x + g x) l Filter.atBot


theorem intValuation_le_iff_coeff_lt_eq_zero {d : ℕ} (f : K⟦X⟧) :
    Valued.v (f : LaurentSeries K) ≤ Multiplicative.ofAdd (-d : ℤ) ↔
      ∀ n : ℕ, n < d → coeff K n f = 0

(K : Type u_2)
[Field K]
{d : ℕ}
(f : PowerSeries K)

Valued.v ((HahnSeries.ofPowerSeries ℤ K) f) ≤ ↑(Multiplicative.ofAdd (-↑d)) ↔ ∀ n < d, (PowerSeries.coeff K n) f = 0


/-- `Matrix.blockDiagonal` as an `AddMonoidHom`. -/
@[simps]
def blockDiagonalAddMonoidHom [AddZeroClass α] :
    (o → Matrix m n α) →+ Matrix (m × o) (n × o) α

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

(Matrix.blockDiagonalAddMonoidHom m n o α) M = Matrix.blockDiagonal M


/-- The triangle in the standard simplex with vertices `k`, `k+1`, and `k+2`.

This constructor assumes `0 < i < n`,
which is the type of horn that occurs in the horn-filling condition of quasicategories. -/
@[simps]
def primitiveTriangle {n : ℕ} (i : Fin (n+4))
    (h₀ : 0 < i) (hₙ : i < Fin.last (n+3))
    (k : ℕ) (h : k < n+2) : Λ[n+3, i] _[2]

↑(SSet.horn.primitiveTriangle i h₀ hₙ k h) = SSet.standardSimplex.triangle ⟨k, ⋯⟩ ⟨k + 1, ⋯⟩ ⟨k + 2, ⋯⟩ ⋯ ⋯


theorem Ioo_coe_top : Ioo (a : WithTop α) ⊤ = (Ioi a).map Embedding.some

(α : Type u_1)
[PartialOrder α]
[OrderTop α]
[LocallyFiniteOrder α]
(a : α)

Finset.Ioo ↑a ⊤ = Finset.map Function.Embedding.some (Finset.Ioi a)


theorem u_ciInf (gc : GaloisConnection l u) {f : ι → β} (hf : BddBelow (range f)) :
    u (⨅ i, f i) = ⨅ i, u (f i)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
[Nonempty ι]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{f : ι → β}
(hf : BddBelow (Set.range f))


@[to_additive]
theorem image_mulSingle_Icc_left (i : ι) (a : α i) :
    Pi.mulSingle i '' Icc a 1 = Icc (Pi.mulSingle i a) 1

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → Zero (α i)]
(i : ι)
(a : α i)

Pi.single i '' Set.Icc a 0 = Set.Icc (Pi.single i a) 0


/-- If `F ≤ E` are two intermediate fields of `L / K` such that `[E : K] ≤ [F : K]` are finite,
then `F = E`. -/
theorem eq_of_le_of_finrank_le [hfin : FiniteDimensional K E] (h_le : F ≤ E)
    (h_finrank : finrank K E ≤ finrank K F) : F = E

(h_finrank : FiniteDimensional.finrank K ↥E ≤ FiniteDimensional.finrank K ↥F)


theorem condexpInd_smul' [NormedSpace ℝ F] [SMulCommClass ℝ 𝕜 F] (c : 𝕜) (x : F) :
    condexpInd F hm μ s (c • x) = c • condexpInd F hm μ s x

{α : Type u_1}
{F : Type u_3}
{𝕜 : Type u_7}
[RCLike 𝕜]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
[NormedSpace ℝ F]
[SMulCommClass ℝ 𝕜 F]
(c : 𝕜)
(x : F)

(MeasureTheory.condexpInd F hm μ s) (c • x) = c • (MeasureTheory.condexpInd F hm μ s) x


@[simp]
theorem inv_ofNat_num (a : ℕ) [a.AtLeastTwo] : (no_index (OfNat.ofNat a : ℚ))⁻¹.num = 1


theorem Monotone.map_csInf {β : Type*} [ConditionallyCompleteLattice β] {f : α → β}
    (hf : Monotone f) (hs : s.Nonempty) : f (sInf s) = sInf (f '' s)

{α : Type u_1}
[ConditionallyCompleteLinearOrder α]
{s : Set α}
[IsWellOrder α fun x x_1 => x < x_1]
{β : Type u_5}
[ConditionallyCompleteLattice β]
{f : α → β}
(hf : Monotone f)
(hs : s.Nonempty)


/-- `Finsupp.single 1` as an `AlgHom` -/
@[simps! apply]
def singleOneAlgHom {A : Type*} [CommSemiring k] [Semiring A] [Algebra k A] [Monoid G] :
    A →ₐ[k] MonoidAlgebra A G

{k : Type u₁}
{G : Type u₂}
{A : Type u_3}
[CommSemiring k]
[Semiring A]
[Algebra k A]
[Monoid G]

∀ (a : A), MonoidAlgebra.singleOneAlgHom a = Finsupp.single 1 a


/-- The map `Square Cᵒᵖ → Square C` which switches `X₁` and `X₃`, but
does not move `X₂` and `X₃`. -/
@[simps]
protected def unop (sq : Square Cᵒᵖ) : Square C

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(sq : CategoryTheory.Square Cᵒᵖ)


/-- If a product of a `Finset` of size at most 1 has a given value, so
do the terms in that product. -/
@[to_additive eq_of_card_le_one_of_sum_eq "If a sum of a `Finset` of size at most 1 has a given
value, so do the terms in that sum."]
theorem eq_of_card_le_one_of_prod_eq {s : Finset α} (hc : s.card ≤ 1) {f : α → β} {b : β}
    (h : ∏ x ∈ s, f x = b) : ∀ x ∈ s, f x = b

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
{s : Finset α}
(hc : s.card ≤ 1)
{f : α → β}
{b : β}
(h : ∏ x ∈ s, f x = b)
(x : α)


lemma shiftIso_add_hom_app (n m a a' a'' : M) (ha' : n + a = a') (ha'' : m + a' = a'') (X : C) :
    (F.shiftIso (m + n) a a'' (by rw [add_assoc, ha', ha''])).hom.app X =
      (shift F a).map ((shiftFunctorAdd C m n).hom.app X) ≫
        (shiftIso F n a a' ha').hom.app ((shiftFunctor C m).obj X) ≫
          (shiftIso F m a' a'' ha'').hom.app X

{C : Type u_1}
{A : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_5, u_2} A]
(F : C ⥤ A)
{M : Type u_3}
[AddMonoid M]
[CategoryTheory.HasShift C M]
[F.ShiftSequence M]
(n m a a' a'' : M)
(ha' : n + a = a')
(ha'' : m + a' = a'')
(X : C)

(F.shiftIso (m + n) a a'' ⋯).hom.app X =
  (F.shift a).map ((CategoryTheory.shiftFunctorAdd C m n).hom.app X) ≫
    (F.shiftIso n a a' ha').hom.app ((CategoryTheory.shiftFunctor C m).obj X) ≫ (F.shiftIso m a' a'' ha'').hom.app X


/-- **Fundamental theorem of calculus-1**, strict differentiability at filter in both endpoints.

If `f` is a measurable function integrable on `a..b`, `(lb, lb')` is an `intervalIntegral.FTCFilter`
pair around `b`, and `f` has a finite limit `c` almost surely at `lb'`, then
`(∫ x in a..v, f x) - ∫ x in a..u, f x = (v - u) • c + o(‖v - u‖)` as `u` and `v` tend to `lb`.

This lemma could've been formulated using `HasStrictDerivAtFilter` if we had this definition. -/
theorem integral_sub_integral_sub_linear_isLittleO_of_tendsto_ae_right
    (hab : IntervalIntegrable f volume a b) (hmeas : StronglyMeasurableAtFilter f lb')
    (hf : Tendsto f (lb' ⊓ ae volume) (𝓝 c)) (hu : Tendsto u lt lb) (hv : Tendsto v lt lb) :
    (fun t => ((∫ x in a..v t, f x) - ∫ x in a..u t, f x) - (v t - u t) • c) =o[lt] (v - u)

(hab : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas : StronglyMeasurableAtFilter f lb' MeasureTheory.volume)

(hf : Filter.Tendsto f (lb' ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 c))

(fun t => ((∫ (x : ℝ) in a..v t, f x) - ∫ (x : ℝ) in a..u t, f x) - (v t - u t) • c) =o[lt] (v - u)


/-- Conjugation by a unit preserves the spectrum, inverse on left. -/
@[simp]
lemma spectrum.units_conjugate' {a : A} {u : Aˣ} :
    spectrum R (u⁻¹ * a * u) = spectrum R a

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Ring A]
[Algebra R A]
{a : A}
{u : Aˣ}

spectrum R (↑u⁻¹ * a * ↑u) = spectrum R a


@[simp, norm_cast]
theorem cast_lt_one : (n : α) < 1 ↔ n = 0

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


/-- If `f ≫ g = 0` implies `g = 0` for all `g`, then `g` is a monomorphism. -/
theorem epi_of_zero_cancel {X Y : C} (f : X ⟶ Y)
    (hf : ∀ (Z : C) (g : Y ⟶ Z) (_ : f ≫ g = 0), g = 0) : Epi f

(hf : ∀ (Z : C) (g : Y ⟶ Z), f ≫ g = 0 → g = 0)


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

{G : Type u_4}
{F : Type u_6}
[MeasurableSpace G]
[NormedAddCommGroup F]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[MeasurableAdd G]
{f : G → F}
[μ.IsAddRightInvariant]
(hf : MeasureTheory.Integrable f μ)
(g : G)

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


@[to_additive two_nsmul_sup_eq_add_add_abs_sub]
lemma sup_sq_eq_mul_mul_mabs_div (a b : α) : (a ⊔ b) ^ 2 = a * b * |b / a|ₘ

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


theorem derivedSeries_normal (n : ℕ) : (derivedSeries G n).Normal


@[simp]
theorem ord_compl_of_not_prime (n p : ℕ) (hp : ¬p.Prime) : ord_compl[p] n = n


theorem absNorm_eq' {I : FractionalIdeal R⁰ K} (a : R⁰) (I₀ : Ideal R)
    (h : a • (I : Submodule R K) = Submodule.map (Algebra.linearMap R K) I₀) :
    absNorm I = (Ideal.absNorm I₀ : ℚ) / |Algebra.norm ℤ (a : R)|

{I : FractionalIdeal (nonZeroDivisors R) K}

(h : a • ↑I = Submodule.map (Algebra.linearMap R K) I₀)

FractionalIdeal.absNorm I = ↑(Ideal.absNorm I₀) / ↑|(Algebra.norm ℤ) ↑a|


theorem convex_hyperplane {f : E → β} (h : IsLinearMap 𝕜 f) (r : β) : Convex 𝕜 { w | f w = r }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[OrderedAddCommMonoid β]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{f : E → β}
(h : IsLinearMap 𝕜 f)
(r : β)


lemma IsCondKernelCDF.toKernel_apply {hf : IsCondKernelCDF f κ ν} (p : α × β) :
    hf.toKernel f p = (f p).measure

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}

∀ {x : MeasurableSpace β} {f : α × β → StieltjesFunction} {κ : ProbabilityTheory.Kernel α (β × ℝ)}
  {ν : ProbabilityTheory.Kernel α β} {hf : ProbabilityTheory.IsCondKernelCDF f κ ν} (p : α × β),
  (ProbabilityTheory.IsCondKernelCDF.toKernel f hf) p = (f p).measure


/-- When `f` is an epimorphism, the cokernel of `f ≫ g` is isomorphic to the cokernel of `g`.
-/
@[simps]
def cokernelEpiComp {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [Epi f] [HasCokernel g] :
    cokernel (f ≫ g) ≅ cokernel g

(CategoryTheory.Limits.cokernelEpiComp f g).hom =
  CategoryTheory.Limits.cokernel.desc (f ≫ g) (CategoryTheory.Limits.cokernel.π g) ⋯


lemma opcyclesMap_eq [S₁.HasRightHomology] [S₂.HasRightHomology] :
    opcyclesMap φ = h₁.opcyclesIso.hom ≫ γ.φQ ≫ h₂.opcyclesIso.inv

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

CategoryTheory.ShortComplex.opcyclesMap φ =
  CategoryTheory.CategoryStruct.comp h₁.opcyclesIso.hom (CategoryTheory.CategoryStruct.comp γ.φQ h₂.opcyclesIso.inv)


lemma compl_mem_compls : a ∈ s → aᶜ ∈ sᶜˢ

{α : Type u_2}
[BooleanAlgebra α]
{s : Finset α}
{a : α}


@[reassoc (attr := simp)]
theorem biproduct_ι_comp_leftDistributor_hom {J : Type} [Fintype J] (X : C) (f : J → C) (j : J) :
    (X ◁ biproduct.ι _ j) ≫ (leftDistributor X f).hom = biproduct.ι (fun j => X ⊗ f j) j

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.Limits.biproduct.ι f j))
    (CategoryTheory.leftDistributor X f).hom =
  CategoryTheory.Limits.biproduct.ι (fun j => CategoryTheory.MonoidalCategory.tensorObj X (f j)) j


lemma measurableSet_enumerateCountable_countableGeneratingSet
    (α : Type*) [MeasurableSpace α] [CountablyGenerated α] (n : ℕ) :
    MeasurableSet (enumerateCountable (countable_countableGeneratingSet (α := α)) ∅ n)

(α : Type u_3)
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]
(n : ℕ)

MeasurableSet (Set.enumerateCountable ⋯ ∅ n)


@[reassoc (attr := simp)]
theorem ι_gluedIso_inv (i : D.J) : (D.mapGlueData F).ι i ≫ (D.gluedIso F).inv = F.map (D.ι i)

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

CategoryTheory.CategoryStruct.comp ((D.mapGlueData F).ι i) (D.gluedIso F).inv = F.map (D.ι i)


theorem star'_quot (hr : ∀ a b, r a b → r (star a) (star b)) {a} :
    (star' r hr ⟨Quot.mk _ a⟩ : RingQuot r) = ⟨Quot.mk _ (star a)⟩

(hr : ∀ (a b : R), r a b → r (star a) (star b))

RingQuot.star' r hr { toQuot := Quot.mk (RingQuot.Rel r) a } = { toQuot := Quot.mk (RingQuot.Rel r) (star a) }


@[to_additive HasSum.of_nat_of_neg_add_one]
lemma HasProd.of_nat_of_neg_add_one {f : ℤ → M}
    (hf₁ : HasProd (fun n : ℕ ↦ f n) m) (hf₂ : HasProd (fun n : ℕ ↦ f (-(n + 1))) m') :
    HasProd f (m * m')

(hf₂ : HasProd (fun n => f (-(↑n + 1))) m')


theorem Disjoint.dual [SemilatticeInf α] [OrderBot α] {a b : α} :
    Disjoint a b → Codisjoint (toDual a) (toDual b)

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b : α}

Disjoint a b → Codisjoint (OrderDual.toDual a) (OrderDual.toDual b)


/-- The evaluation map is continuous, as a joint function of `u` and `x`. -/
@[continuity]
theorem continuous_eval : Continuous fun p : (α →ᵇ β) × α => p.1 p.2

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


/-- Flipping commutative squares is an auto-equivalence. -/
@[simps]
def flipEquivalence : Square C ≌ Square C

{C : Type u}
[CategoryTheory.Category.{v, u} C]

CategoryTheory.Square.flipEquivalence.counitIso =
  CategoryTheory.Iso.refl (CategoryTheory.Square.flipFunctor.comp CategoryTheory.Square.flipFunctor)


@[symm]
protected theorem AntivaryOn.symm (h : AntivaryOn f g s) : AntivaryOn g f s

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[LinearOrder β]
{f : ι → α}
{g : ι → β}
{s : Set ι}
(h : AntivaryOn f g s)


@[to_additive]
theorem smul_set_mono : s ⊆ t → a • s ⊆ a • t

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


protected theorem Nat.lt_or_ge (n m : Nat) : Or (LT.lt n m) (GE.ge n m)


@[to_additive]
theorem mul_div_right_comm : a * b / c = a / c * b

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


lemma factorization_eq_one_of_squarefree (hn : Squarefree n) (hp : p.Prime) (hpn : p ∣ n) :
    factorization n p = 1

{n p : ℕ}
(hn : Squarefree n)
(hp : Nat.Prime p)
(hpn : p ∣ n)


theorem mul_single_apply_of_not_exists_mul [Mul G] (r : k) {g g' : G} (x : MonoidAlgebra k G)
    (h : ¬∃ d, g' = d * g) : (x * single g r) g' = 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Mul G]
(r : k)
{g g' : G}
(x : MonoidAlgebra k G)
(h : ¬∃ d, g' = d * g)


/-- A split mono `f` equalizes `(retraction f ≫ f)` and `(𝟙 Y)`.
Here we build the cone, and show in `isSplitMonoEqualizes` that it is a limit cone.
-/
-- @[simps (config := { rhsMd := semireducible })] Porting note: no semireducible
@[simps!]
noncomputable def coneOfIsSplitMono : Fork (𝟙 Y) (retraction f ≫ f)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.IsSplitMono f]

∀ (X_1 : CategoryTheory.Limits.WalkingParallelPair),
  (CategoryTheory.Limits.coneOfIsSplitMono f).π.app X_1 =
    CategoryTheory.Limits.WalkingParallelPair.rec (motive := fun t =>
      X_1 = t →
        (X ⟶
          (CategoryTheory.Limits.parallelPair (CategoryTheory.CategoryStruct.id Y)
                (CategoryTheory.CategoryStruct.comp (CategoryTheory.retraction f) f)).obj
            X_1))
      (fun h => ⋯ ▸ f) (fun h => ⋯ ▸ f) X_1 ⋯


theorem BijOn.injOn (h : BijOn f s t) : InjOn f s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
(h : Set.BijOn f s t)


/-- A category is (finitary) pre-extensive if it has finite coproducts,
and binary coproducts are universal. -/
class FinitaryPreExtensive (C : Type u) [Category.{v} C] : Prop where
  [hasFiniteCoproducts : HasFiniteCoproducts C]
  [hasPullbacksOfInclusions : HasPullbacksOfInclusions C]
  /-- In a finitary extensive category, all coproducts are van Kampen-/
  universal' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsUniversalColimit c

[self : CategoryTheory.FinitaryPreExtensive C]


/-- Scott-continuity takes on a simpler form in complete partial orders. -/
lemma CompletePartialOrder.scottContinuous {f : α → β} :
    ScottContinuous f ↔
    ∀ ⦃d : Set α⦄, d.Nonempty → DirectedOn (· ≤ ·) d → IsLUB (f '' d) (f (sSup d))

{α : Type u_2}
{β : Type u_3}
[CompletePartialOrder α]
[Preorder β]
{f : α → β}

ScottContinuous f ↔ ∀ ⦃d : Set α⦄, d.Nonempty → DirectedOn (fun x x_1 => x ≤ x_1) d → IsLUB (f '' d) (f (sSup d))


@[simp]
theorem hom_inv_id_app_apply (α : F ≅ G) (X) (x) : α.inv.app X (α.hom.app X x) = x

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


/-- An isomorphism `X ⟶ Y` is an open cover of `Y`. -/
@[simps J obj map]
def openCoverOfIsIso {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso f] : OpenCover.{v} Y

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
[CategoryTheory.IsIso f]

(AlgebraicGeometry.Scheme.openCoverOfIsIso f).J = PUnit.{v + 1}


theorem nhds_top_basis : (𝓝 ∞).HasBasis (fun a => a < ∞) fun a => Ioi a

(𝓝 ⊤).HasBasis (fun a => a < ⊤) fun a => Set.Ioi a


theorem of_not_not [Decidable p] : ¬ ¬ p → p


/-- Two (finite) ℤ-bases have the same discriminant. -/
theorem discr_eq_discr [Fintype ι] (b : Basis ι ℤ A) (b' : Basis ι ℤ A) :
    Algebra.discr ℤ b = Algebra.discr ℤ b'

(A : Type u)
{ι : Type w}
[DecidableEq ι]
[CommRing A]
[Fintype ι]
(b b' : Basis ι ℤ A)

Algebra.discr ℤ ⇑b = Algebra.discr ℤ ⇑b'


@[simp]
theorem empty_right (s : Set X) : IsMetricSeparated s ∅

{X : Type u_1}
[EMetricSpace X]
(s : Set X)


theorem isRegular_aleph'_succ {o : Ordinal} (h : ω ≤ o) : IsRegular (aleph' (succ o))


@[simp]
theorem bit_zero : bit false 0 = 0


theorem orderTopology_of_nhds_abs {α : Type*} [TopologicalSpace α] [LinearOrderedAddCommGroup α]
    (h_nhds : ∀ a : α, 𝓝 a = ⨅ r > 0, 𝓟 { b | |a - b| < r }) : OrderTopology α


@[simp] protected theorem deriv : deriv f x = f.linear 1

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


/-- The value of a martingale `f` at a stopping time `τ` bounded by `n` is the conditional
expectation of `f n` with respect to the σ-algebra generated by `τ`. -/
theorem stoppedValue_ae_eq_condexp_of_le_const_of_countable_range (h : Martingale f ℱ μ)
    (hτ : IsStoppingTime ℱ τ) (hτ_le : ∀ x, τ x ≤ n) (h_countable_range : (Set.range τ).Countable)
    [SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le))] :
    stoppedValue f τ =ᵐ[μ] μ[f n|hτ.measurableSpace]

MeasureTheory.stoppedValue f τ =ᵐ[μ] μ[f n|hτ.measurableSpace]


theorem isOption_neg {x y : PGame} : IsOption x (-y) ↔ IsOption (-x) y


protected theorem IsGLB.insert [SemilatticeInf γ] (a) {b} {s : Set γ} (hs : IsGLB s b) :
    IsGLB (insert a s) (a ⊓ b)

{γ : Type w}
[SemilatticeInf γ]
(a : γ)
{b : γ}
{s : Set γ}
(hs : IsGLB s b)


@[simp]
theorem coe_prodComm : ⇑(prodComm : α × β ≃o β × α) = Prod.swap

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]


/-- The non-zero non-`N`-smooth numbers are `≥ N`. -/
lemma smoothNumbers_compl (N : ℕ) : (N.smoothNumbers)ᶜ \ {0} ⊆ {n | N ≤ n}


/-- The sine of the angle between three points is 1 if and only if the angle is π / 2. -/
nonrec theorem sin_eq_one_iff_angle_eq_pi_div_two {p₁ p₂ p₃ : P} :
    Real.sin (∠ p₁ p₂ p₃) = 1 ↔ ∠ p₁ p₂ p₃ = π / 2

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

Real.sin (EuclideanGeometry.angle p₁ p₂ p₃) = 1 ↔ EuclideanGeometry.angle p₁ p₂ p₃ = π / 2


theorem ne_of_gt {a b : Nat} (h : b < a) : a ≠ b


theorem selfAdjointPart_comp_subtype_selfAdjoint :
    (selfAdjointPart R).comp (selfAdjoint.submodule R A).subtype = .id

(R : Type u_1)
{A : Type u_2}
[Semiring R]
[StarMul R]
[TrivialStar R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid A]
[StarModule R A]
[Invertible 2]

selfAdjointPart R ∘ₗ (selfAdjoint.submodule R A).subtype = LinearMap.id


/-- The basis constructed by `isUnitSMul` has vectors given by a diagonal matrix. -/
@[simp]
theorem toMatrix_isUnitSMul [DecidableEq ι] (e : Basis ι R₂ M₂) {w : ι → R₂}
    (hw : ∀ i, IsUnit (w i)) : e.toMatrix (e.isUnitSMul hw) = diagonal w

{ι : Type u_1}
{R₂ : Type u_7}
{M₂ : Type u_8}
[CommRing R₂]
[AddCommGroup M₂]
[Module R₂ M₂]
[DecidableEq ι]
(e : Basis ι R₂ M₂)
{w : ι → R₂}
(hw : ∀ (i : ι), IsUnit (w i))

e.toMatrix ⇑(e.isUnitSMul hw) = Matrix.diagonal w


theorem Free.map_eq_map (f : α → β) (xs : List α) :
    f <$> xs = (FreeMonoid.toList (FreeMonoid.map f (FreeMonoid.ofList xs)))

{α β : Type u}
(f : α → β)
(xs : List α)

f <$> xs = FreeMonoid.toList ((FreeMonoid.map f) (FreeMonoid.ofList xs))


theorem isHermitian {M : Matrix n n R} (hM : M.PosSemidef) : M.IsHermitian

{n : Type u_2}
{R : Type u_3}
[Fintype n]
[CommRing R]
[PartialOrder R]
[StarRing R]
{M : Matrix n n R}
(hM : M.PosSemidef)


/--
`LawfulLeftIdentify op o` indicates `o` is a verified left identity of
`op`.
-/
class LawfulLeftIdentity (op : α → β → β) (o : outParam α) extends LeftIdentity op o : Prop where
  /-- Left identity `o` is an identity. -/
  left_id : ∀ a, op o a = a

{α : Sort u}
{β : Sort u_1}
{op : α → β → β}
{o : outParam α}
[self : Std.LawfulLeftIdentity op o]
(a : β)


/-- If the `Traversable t'` instance has the properties that `map`,
`map_const`, and `traverse` are equal to the ones that come from
carrying the traversable functor structure from `t` over the
equivalences, then the fact that `t` is a lawful traversable functor
carries over as well. -/
protected theorem isLawfulTraversable' [Traversable t']
    (h₀ : ∀ {α β} (f : α → β), map f = Equiv.map eqv f)
    (h₁ : ∀ {α β} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f)
    (h₂ : ∀ {F : Type u → Type u} [Applicative F],
      ∀ [LawfulApplicative F] {α β} (f : α → F β), traverse f = Equiv.traverse eqv f) :
    LawfulTraversable t'

(h₀ : ∀ {α β : Type u} (f : α → β), Functor.map f = Equiv.map eqv f)

(h₁ : ∀ {α β : Type u} (f : β), Functor.mapConst f = (Equiv.map eqv ∘ Function.const α) f)

(h₂ :
  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),
    traverse f = Equiv.traverse eqv f)


@[simp]
theorem toReal_zero : toReal 0 = 0


theorem cons_isCycle {u v : V} (p : G.Path v u) (h : G.Adj u v)
    (he : ¬s(u, v) ∈ (p : G.Walk v u).edges) : (Walk.cons h ↑p).IsCycle

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Path v u)
(h : G.Adj u v)
(he : s(u, v) ∉ (↑p).edges)


theorem mem_lpMeas_indicatorConstLp {m m0 : MeasurableSpace α} (hm : m ≤ m0) {μ : Measure α}
    {s : Set α} (hs : MeasurableSet[m] s) (hμs : μ s ≠ ∞) {c : F} :
    indicatorConstLp p (hm s hs) hμs c ∈ lpMeas F 𝕜 m p μ

{α : Type u_1}
{F : Type u_3}
{𝕜 : Type u_5}
{p : ℝ≥0∞}
[RCLike 𝕜]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{m m0 : MeasurableSpace α}
(hm : m ≤ m0)
{μ : MeasureTheory.Measure α}
{s : Set α}
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
{c : F}

MeasureTheory.indicatorConstLp p ⋯ hμs c ∈ MeasureTheory.lpMeas F 𝕜 m p μ


@[ext] theorem ext ⦃inst₁ inst₂ : NonUnitalNonAssocRing R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂

{R : Type u}
⦃inst₁ inst₂ : NonUnitalNonAssocRing R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_mul : HMul.hMul = HMul.hMul)


lemma unitization_norm_def (x : WithLp 1 (Unitization 𝕜 A)) :
    ‖x‖ = ‖(WithLp.equiv 1 _ x).fst‖ + ‖(WithLp.equiv 1 _ x).snd‖

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

‖x‖ = ‖((WithLp.equiv 1 (Unitization 𝕜 A)) x).fst‖ + ‖((WithLp.equiv 1 (Unitization 𝕜 A)) x).snd‖


lemma lowerCentralSeries_one_inf_center_le_ker_traceForm :
    lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L ≤ LinearMap.ker (traceForm R L M)

(R : Type u_1)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[Module.Free R M]
[Module.Finite R M]
[LieAlgebra.IsNilpotent R L]
[IsDomain R]
[IsPrincipalIdealRing R]

(lieIdealSubalgebra R L (LieModule.lowerCentralSeries R L L 1 ⊓ LieAlgebra.center R L)).toSubmodule ≤
  LinearMap.ker (LieModule.traceForm R L M)


{α : Type u_1}
{β : Type u_2}
(r : Rel α β)


@[simp] lemma compProd_zero_left (κ : Kernel α β) : (0 : Measure α) ⊗ₘ κ = 0

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


/-- Typeclass for finite index subgroups. -/
class FiniteIndex : Prop where
  /-- The subgroup has finite index -/
  finiteIndex : H.index ≠ 0

{G : Type u_1}
[Group G]
{H : Subgroup G}
[self : H.FiniteIndex]


theorem finite_range_ite {p : α → Prop} [DecidablePred p] {f g : α → β} (hf : (range f).Finite)
    (hg : (range g).Finite) : (range fun x => if p x then f x else g x).Finite

{α : Type u}
{β : Type v}
{p : α → Prop}
[DecidablePred p]
{f g : α → β}
(hf : (Set.range f).Finite)
(hg : (Set.range g).Finite)

(Set.range fun x => if p x then f x else g x).Finite


theorem mapIdxMGo_eq_mapIdxMAuxSpec
    [LawfulMonad m] {β} (f : ℕ → α → m β) (arr : Array β) (as : List α) :
    mapIdxM.go f as arr = (arr.toList ++ ·) <$> mapIdxMAuxSpec f arr.size as

{α : Type u}
{m : Type u → Type v}
[Monad m]
[LawfulMonad m]
{β : Type u}
(f : ℕ → α → m β)
(arr : Array β)
(as : List α)

List.mapIdxM.go f as arr = (fun x => arr.toList ++ x) <$> List.mapIdxMAuxSpec f arr.size as


@[to_additive]
theorem mem_inv : s ∈ f⁻¹ ↔ Inv.inv ⁻¹' s ∈ f

{α : Type u_2}
[Neg α]
{f : Filter α}
{s : Set α}


theorem y_dvd_iff (m n) : yn a1 m ∣ yn a1 n ↔ m ∣ n


@[simp]
theorem coe_mul (e e' : P ≃ᵃⁱ[𝕜] P) : ⇑(e * e') = e ∘ e'

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(e e' : P ≃ᵃⁱ[𝕜] P)


theorem iUnion_Ico_intCast : ⋃ n : ℤ, Ico (n : α) (n + 1) = Set.univ

(α : Type u_1)
[LinearOrderedRing α]
[Archimedean α]


/-- **Minkowski inequality**: the `L_p` seminorm of the sum of two vectors is less than or equal
to the sum of the `L_p`-seminorms of the summands. A version for `ℝ`-valued nonnegative
functions. -/
theorem Lp_add_le_of_nonneg (hp : 1 ≤ p) (hf : ∀ i ∈ s, 0 ≤ f i) (hg : ∀ i ∈ s, 0 ≤ g i) :
    (∑ i ∈ s, (f i + g i) ^ p) ^ (1 / p) ≤
      (∑ i ∈ s, f i ^ p) ^ (1 / p) + (∑ i ∈ s, g i ^ p) ^ (1 / p)

{ι : Type u}
(s : Finset ι)
{f g : ι → ℝ}
{p : ℝ}
(hp : 1 ≤ p)
(hf : ∀ i ∈ s, 0 ≤ f i)
(hg : ∀ i ∈ s, 0 ≤ g i)


theorem verts_spanningCoe_injective :
    (fun G' : Subgraph G => (G'.verts, G'.spanningCoe)).Injective

Function.Injective fun G' => (G'.verts, G'.spanningCoe)


theorem Forall.imp (h : ∀ x, p x → q x) : ∀ {l : List α}, Forall p l → Forall q l

{α : Type u}
{p q : α → Prop}
(h : ∀ (x : α), p x → q x)
{l : List α}


@[to_additive]
theorem ContMDiffAt.div {f g : M → G} {x₀ : M} (hf : ContMDiffAt I' I n f x₀)
    (hg : ContMDiffAt I' I n g x₀) : ContMDiffAt I' I n (fun x => f x / g x) x₀

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[Group G]
[LieGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{n : ℕ∞}
{f g : M → G}
{x₀ : M}
(hf : ContMDiffAt I' I n f x₀)
(hg : ContMDiffAt I' I n g x₀)


theorem irreducible_iff_prime_of_exists_unique_irreducible_factors [CancelCommMonoidWithZero α]
    (eif : ∀ a : α, a ≠ 0 → ∃ f : Multiset α, (∀ b ∈ f, Irreducible b) ∧ f.prod ~ᵤ a)
    (uif :
      ∀ f g : Multiset α,
        (∀ x ∈ f, Irreducible x) →
          (∀ x ∈ g, Irreducible x) → f.prod ~ᵤ g.prod → Multiset.Rel Associated f g)
    (p : α) : Irreducible p ↔ Prime p

(eif : ∀ (a : α), a ≠ 0 → ∃ f, (∀ b ∈ f, Irreducible b) ∧ f.prod ~ᵤ a)

(uif :
  ∀ (f g : Multiset α),
    (∀ x ∈ f, Irreducible x) → (∀ x ∈ g, Irreducible x) → f.prod ~ᵤ g.prod → Multiset.Rel Associated f g)


/-- If `R` and `S` are rings, `p` is in the subring of polynomials that lift if and only if it is in
the subsemiring of polynomials that lift. -/
theorem lifts_iff_liftsRing (p : S[X]) : p ∈ lifts f ↔ p ∈ liftsRing f

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

p ∈ Polynomial.lifts f ↔ p ∈ Polynomial.liftsRing f


/--
We say that `P : MorphismProperty Scheme` is local at the source if
1. `P` respects isomorphisms.
2. `P` holds for `𝒰.map i ≫ f` for an open cover `𝒰` of `X` iff `P` holds for `f : X ⟶ Y`.
Also see `IsLocalAtSource.mk'` for a convenient constructor.
-/
class IsLocalAtSource (P : MorphismProperty Scheme) : Prop where
  /-- `P` respects isomorphisms. -/
  respectsIso : P.RespectsIso := by infer_instance
  /-- `P` holds for `f ∣_ U` for an open cover `U` of `Y` if and only if `P` holds for `f`.  -/
  iff_of_openCover' :
    ∀ {X Y : Scheme.{u}} (f : X ⟶ Y) (𝒰 : Scheme.OpenCover.{u} X),
      P f ↔ ∀ i, P (𝒰.map i ≫ f)

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

[self : AlgebraicGeometry.IsLocalAtSource P]


lemma isComplex₁ (S : ComposableArrows C 1) : S.IsComplex

(S : CategoryTheory.ComposableArrows C 1)


/-- The non-unital subsemiring generated by a set includes the set. -/
@[simp, aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_closure {s : Set R} : s ⊆ closure s

{R : Type u}
[NonUnitalNonAssocSemiring R]
{s : Set R}


@[simp]
theorem insertNth_length_self (l : List α) (x : α) : insertNth l.length x l = l ++ [x]


theorem Basis.insert_dep (hI : M.Basis I X) (he : e ∈ X \ I) : M.Dep (insert e I)

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
{e : α}
(hI : M.Basis I X)
(he : e ∈ X \ I)


@[simp]
theorem symm_apply_apply (e : M₁ ≃SL[σ₁₂] M₂) (b : M₁) : e.symm (e b) = 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₁)


lemma LinearIndependent.finrank_eq_zero_of_infinite {ι} [Nontrivial R] [Infinite ι] {v : ι → M}
    (hv : LinearIndependent R v) : finrank R M = 0

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{ι : Type u_1}
[Nontrivial R]
[Infinite ι]
{v : ι → M}
(hv : LinearIndependent R v)


theorem div {x y : R} (hx : IsSelfAdjoint x) (hy : IsSelfAdjoint y) : IsSelfAdjoint (x / y)

{R : Type u_1}
[Semifield R]
[StarRing R]
{x y : R}
(hx : IsSelfAdjoint x)
(hy : IsSelfAdjoint y)


/-- The rank of a module, defined as a term of type `Cardinal`.

We define this as the supremum of the cardinalities of linearly independent subsets.

For a free module over any ring satisfying the strong rank condition
(e.g. left-noetherian rings, commutative rings, and in particular division rings and fields),
this is the same as the dimension of the space (i.e. the cardinality of any basis).

In particular this agrees with the usual notion of the dimension of a vector space.

-/
protected irreducible_def Module.rank : Cardinal

(R : Type u_1)
(M : Type u_2)
[Semiring R]
[AddCommMonoid M]
[Module R M]


@[simp]
theorem coeff_eq_d : P.toPoly.coeff 0 = P.d

{R : Type u_1}
{P : Cubic R}
[Semiring R]


theorem map_sup [SemilatticeSup α] [LinearOrder β] [FunLike F β α]
    [RelHomClass F (· > ·) (· > ·)] (a : F) (m n : β) :
    a (m ⊔ n) = a m ⊔ a n

[RelHomClass F (fun x x_1 => x > x_1) fun x x_1 => x > x_1]


theorem quasiIso_forget₂_εToSingle₀ :
    QuasiIso (((forget₂ _ (ModuleCat.{u} k)).mapHomologicalComplex _).map (εToSingle₀ k G))

QuasiIso
  (((CategoryTheory.forget₂ (Rep k G) (ModuleCat k)).mapHomologicalComplex (ComplexShape.down ℕ)).map
    (groupCohomology.resolution.εToSingle₀ k G))


/-- A contractible space is one that is homotopy equivalent to `Unit`. -/
class ContractibleSpace (X : Type*) [TopologicalSpace X] : Prop where
  hequiv_unit' : Nonempty (X ≃ₕ Unit)

{X : Type u_1}
[TopologicalSpace X]
[self : ContractibleSpace X]


theorem extend_mono {s₁ s₂ : Set α} (h₁ : MeasurableSet s₁) (hs : s₁ ⊆ s₂) :
    extend m s₁ ≤ extend m s₂

{m : (s : Set α) → MeasurableSet s → ℝ≥0∞}

(mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), MeasurableSet (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) ⋯ = ∑' (i : ℕ), m (f i) ⋯)

MeasureTheory.extend m s₁ ≤ MeasureTheory.extend m s₂


nonrec theorem IsBaseChange.lift_eq (g : M →ₗ[R] Q) (x : M) : h.lift g (f x) = g x

{R : Type u_1}
{M : Type v₁}
{N : Type v₂}
{S : Type v₃}
[AddCommMonoid M]
[AddCommMonoid N]
[CommSemiring R]
[CommSemiring S]
[Algebra R S]
[Module R M]
[Module R N]
[Module S N]
[IsScalarTower R S N]
{f : M →ₗ[R] N}
(h : IsBaseChange S f)
{Q : Type u_3}
[AddCommMonoid Q]
[Module S Q]
[Module R Q]
[IsScalarTower R S Q]
(g : M →ₗ[R] Q)
(x : M)


theorem order_eq_orderTop_of_ne {x : HahnSeries Γ R} (hx : x ≠ 0) : order x = orderTop x

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
[Zero Γ]
{x : HahnSeries Γ R}
(hx : x ≠ 0)


lemma max_min_distrib_left (a b c : α) : max a (min b c) = min (max a b) (max a c)

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


@[simp]
theorem cancel_iso_inv_right {X Y Z : C} (f f' : X ⟶ Y) (g : Z ≅ Y) :
    f ≫ g.inv = f' ≫ g.inv ↔ f = f'

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

CategoryTheory.CategoryStruct.comp f g.inv = CategoryTheory.CategoryStruct.comp f' g.inv ↔ f = f'


/-- The natural transformation `K.homologyι i : K.homology i ⟶ K.opcycles i`
for all `K : HomologicalComplex C c`. -/
@[simps]
noncomputable def natTransHomologyι [CategoryWithHomology C] :
    homologyFunctor C c i ⟶ opcyclesFunctor C c i

(HomologicalComplex.natTransHomologyι C c i).app K = K.homologyι i


theorem transpose_comp (u : M' →ₗ[R] M'') (v : M →ₗ[R] M') :
    transpose (R := R) (u.comp v) = (transpose (R := R) v).comp (transpose (R := R) u)

{R : Type uR}
{M : Type uM}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{M' : Type uM'}
[AddCommMonoid M']
[Module R M']
{M'' : Type uM''}
[AddCommMonoid M'']
[Module R M'']
(u : M' →ₗ[R] M'')
(v : M →ₗ[R] M')

Module.Dual.transpose (u ∘ₗ v) = Module.Dual.transpose v ∘ₗ Module.Dual.transpose u


lemma pos_of_ne_zero {n : ℕ} {a : Fin (n + 1)} (h : a ≠ 0) :
    0 < a


theorem coe_le_iff {x : WithTop α} : ↑a ≤ x ↔ ∀ b : α, x = ↑b → a ≤ b

{α : Type u_1}
{a : α}
[LE α]
{x : WithTop α}


theorem pow_right (H : IsRelPrime x y) : IsRelPrime x (y ^ n)

{α : Type u_1}
[CommMonoid α]
[DecompositionMonoid α]
{x y : α}
{n : ℕ}
(H : IsRelPrime x y)


@[to_additive (attr := simp)]
theorem oreDiv_one_smul (r : M) (x : X[S⁻¹]) : (r /ₒ (1 : S)) • x = r • x

{M : Type u_3}
{X : Type u_4}
[Monoid M]
{S : Submonoid M}
[OreLocalization.OreSet S]
[MulAction M X]
(r : M)
(x : OreLocalization S X)


instance isAsymm (r : α → α → Prop) [IsAsymm α r] : IsAsymm (List α) (Lex r)

{α : Type u}
(r : α → α → Prop)
[IsAsymm α r]

∀ (x x_1 : List α), List.Lex r x x_1 → List.Lex r x_1 x → False


theorem limZero_congr {f g : CauSeq β abv} (h : f ≈ g) : LimZero f ↔ LimZero g

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{f g : CauSeq β abv}
(h : f ≈ g)


/-- In a finite-dimensional inner product space, the dimension of the orthogonal complement of the
span of a nonzero vector is one less than the dimension of the space. -/
theorem finrank_orthogonal_span_singleton {n : ℕ} [_i : Fact (finrank 𝕜 E = n + 1)] {v : E}
    (hv : v ≠ 0) : finrank 𝕜 (𝕜 ∙ v)ᗮ = n

[_i : Fact (FiniteDimensional.finrank 𝕜 E = n + 1)]

FiniteDimensional.finrank 𝕜 ↥(Submodule.span 𝕜 {v})ᗮ = n


theorem differentiableAt_cos : DifferentiableAt ℝ cos x


@[simp]
theorem extend_apply' (g : α → γ) (e' : β → γ) (b : β) (hb : ¬∃ a, f a = b) :
    extend f g e' b = e' b

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β}
(g : α → γ)
(e' : β → γ)
(b : β)
(hb : ¬∃ a, f a = b)


@[simp]
theorem map_id : (map (RingHom.id R) : R⟦X⟧ → R⟦X⟧) = id


theorem zero_zeroAtFilter [Zero β] [TopologicalSpace β] (l : Filter α) :
    ZeroAtFilter l (0 : α → β)

{α : Type u_2}
{β : Type u_3}
[Zero β]
[TopologicalSpace β]
(l : Filter α)


theorem ConnectedSpace.infinite [ConnectedSpace X] [Nontrivial X] [T1Space X] : Infinite X

{X : Type u_1}
[TopologicalSpace X]
[ConnectedSpace X]
[Nontrivial X]
[T1Space X]


lemma sdiff_sup_lowerClosure (hts : t ⊆ s) (hst : ∀ b ∈ s, ∀ c ∈ t, c ≤ b → b ∈ t) :
    s.sdiff t ⊔ lowerClosure t = s

{α : Type u_1}
[Preorder α]
{s : LowerSet α}
{t : Set α}
(hts : t ⊆ ↑s)
(hst : ∀ b ∈ s, ∀ c ∈ t, c ≤ b → b ∈ t)


theorem regularSpace_induced (f : Y → X) : @RegularSpace Y (induced f ‹_›)

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


@[simp]
theorem lift_mk_shrink' (α : Type u) [Small.{v} α] :
    Cardinal.lift.{u} #(Shrink.{v} α) = Cardinal.lift.{v} #α

Cardinal.lift.{u, v} (Cardinal.mk (Shrink.{v, u} α)) = Cardinal.lift.{v, u} (Cardinal.mk α)


/-- The multiplication operation for tensor products of externally `ι`-graded algebras. -/
noncomputable irreducible_def gradedMul :
    letI AB := DirectSum _ 𝒜 ⊗[R] DirectSum _ ℬ
    letI : Module R AB := TensorProduct.leftModule
    AB →ₗ[R] AB →ₗ[R] AB

(R : Type u_7)
{ι : Type u_8}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
(𝒜 : ι → Type u_9)
(ℬ : ι → Type u_10)
[CommRing R]
[(i : ι) → AddCommGroup (𝒜 i)]
[(i : ι) → AddCommGroup (ℬ i)]
[(i : ι) → Module R (𝒜 i)]
[(i : ι) → Module R (ℬ i)]
[DirectSum.GRing 𝒜]
[DirectSum.GRing ℬ]
[DirectSum.GAlgebra R 𝒜]
[DirectSum.GAlgebra R ℬ]

TensorProduct.gradedMul R 𝒜 ℬ =
  TensorProduct.curry
    (TensorProduct.map (LinearMap.mul' R (⨁ (i : ι), 𝒜 i)) (LinearMap.mul' R (⨁ (i : ι), ℬ i)) ∘ₗ
      ↑(TensorProduct.assoc R (⨁ (i : ι), 𝒜 i) (⨁ (i : ι), 𝒜 i) ((⨁ (i : ι), ℬ i) ⊗[R] ⨁ (i : ι), ℬ i)).symm ∘ₗ
        LinearMap.lTensor (⨁ (i : ι), 𝒜 i)
            (↑(TensorProduct.assoc R (⨁ (i : ι), 𝒜 i) (⨁ (i : ι), ℬ i) (⨁ (i : ι), ℬ i)) ∘ₗ
              LinearMap.rTensor (⨁ (i : ι), ℬ i) ↑(TensorProduct.gradedComm R ℬ 𝒜) ∘ₗ
                ↑(TensorProduct.assoc R (DirectSum ι ℬ) (DirectSum ι 𝒜) (DirectSum ι ℬ)).symm) ∘ₗ
          ↑(TensorProduct.assoc R (DirectSum ι 𝒜) (DirectSum ι ℬ) (DirectSum ι 𝒜 ⊗[R] DirectSum ι ℬ)))


/-- Given a function `f : C → G` from a category to a group, we get a functor
    `C ⥤ G` sending any morphism `x ⟶ y` to `f y * (f x)⁻¹`. -/
@[simps]
def differenceFunctor (f : C → G) : C ⥤ SingleObj G

{G : Type u}
[Group G]
{C : Type v}
[CategoryTheory.Category.{w, v} C]
(f : C → G)
{x y : C}

∀ (x_1 : x ⟶ y), (CategoryTheory.SingleObj.differenceFunctor f).map x_1 = f y * (f x)⁻¹


@[simp]
theorem degree_C (ha : a ≠ 0) : degree (C a) = (0 : WithBot ℕ)

{R : Type u}
{a : R}
[Semiring R]
(ha : a ≠ 0)


@[simp]
lemma toKaehler_cotangentSpaceBasis (i) :
    P.toKaehler (P.cotangentSpaceBasis i) = D R S (P.val i)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
(i : P.vars)

P.toKaehler (P.cotangentSpaceBasis i) = (KaehlerDifferential.D R S) (P.val i)


theorem independent_iff_coe_toSubmodule {ι : Type*} {N : ι → LieSubmodule R L M} :
    CompleteLattice.Independent N ↔ CompleteLattice.Independent fun i ↦ (N i : Submodule R M)

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{ι : Type u_1}
{N : ι → LieSubmodule R L M}

CompleteLattice.Independent N ↔ CompleteLattice.Independent fun i => ↑(N i)


@[simp]
lemma inr_snd_assoc {K : CochainComplex C ℤ} {d e : ℤ} (γ : Cochain G K d) (he : 0 + d = e) :
    (Cochain.ofHom (inr φ)).comp ((snd φ).comp γ he) (by simp only [← he, zero_add]) = γ

(γ : CochainComplex.HomComplex.Cochain G K d)

(CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.inr φ)).comp
    ((CochainComplex.mappingCone.snd φ).comp γ he) ⋯ =
  γ


@[simp]
theorem coe_liftLie_eq_lift_coe (f : M →ₗ⁅R,L⁆ N →ₗ[R] P) :
    ⇑(liftLie R L M N P f) = lift R L M N P f

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

⇑((TensorProduct.LieModule.liftLie R L M N P) f) = ⇑((TensorProduct.LieModule.lift R L M N P) ↑f)


theorem HasStrictFDerivAt.csin (hf : HasStrictFDerivAt f f' x) :
    HasStrictFDerivAt (fun x => Complex.sin (f x)) (Complex.cos (f x) • f') x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{f' : E →L[ℂ] ℂ}
{x : E}
(hf : HasStrictFDerivAt f f' x)


theorem map_eq (f g : X ⟶ Y) (h : f = g) : map f = map g

{X Y : TopCat}
(f g : X ⟶ Y)
(h : f = g)

TopologicalSpace.Opens.map f = TopologicalSpace.Opens.map g


theorem clog_of_two_le {b n : ℕ} (hb : 1 < b) (hn : 2 ≤ n) :
    clog b n = clog b ((n + b - 1) / b) + 1

Nat.clog b n = Nat.clog b ((n + b - 1) / b) + 1


@[simp] lemma op_rightUnitor (X : C) : (ρ_ X).op = (ρ_ (op X)).symm

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

(CategoryTheory.MonoidalCategory.rightUnitor X).op = (CategoryTheory.MonoidalCategory.rightUnitor (Opposite.op X)).symm


theorem bmex_le_of_ne {o : Ordinal} {f : ∀ a < o, Ordinal} {a} (ha : ∀ i hi, f i hi ≠ a) :
    bmex o f ≤ a

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

(ha : ∀ (i : Ordinal.{u_4}) (hi : i < o), f i hi ≠ a)


theorem not_mem_nil (a : α) : a ∉ @nil α


@[simp] theorem run_bind [Monad m] (x : ReaderT ρ m α) (f : α → ReaderT ρ m β) (ctx : ρ)
    : (x >>= f).run ctx = x.run ctx >>= λ a => (f a).run ctx

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

(x >>= f).run ctx = do
  let a ← x.run ctx
  (f a).run ctx


theorem mem_pointwise_smul_iff_inv_smul_mem₀ {a : M} (ha : a ≠ 0) (S : Subring R) (x : R) :
    x ∈ a • S ↔ a⁻¹ • x ∈ S

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

x ∈ a • S ↔ a⁻¹ • x ∈ S


/-- **Ruzsa's triangle inequality**. Mul-div-mul version. -/
@[to_additive "**Ruzsa's triangle inequality**. Add-sub-add version."]
theorem ruzsa_triangle_inequality_mul_div_mul (A B C : Finset α) :
    (A * C).card * B.card ≤ (A / B).card * (B * C).card

{α : Type u_1}
[AddCommGroup α]
[DecidableEq α]
(A B C : Finset α)

(A + C).card * B.card ≤ (A - B).card * (B + C).card


theorem mk_preimage_prod_right_eq_if [DecidablePred (· ∈ s)] :
    Prod.mk a ⁻¹' s ×ˢ t = if a ∈ s then t else ∅

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{a : α}
[DecidablePred fun x => x ∈ s]


theorem mul_lt_mul_of_pos [PosMulStrictMono α] [MulPosStrictMono α]
    (h₁ : a < b) (h₂ : c < d) (a0 : 0 < a) (d0 : 0 < d) : a * c < b * d

{α : Type u_1}
{a b c d : α}
[Mul α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[MulPosStrictMono α]
(h₁ : a < b)
(h₂ : c < d)
(a0 : 0 < a)
(d0 : 0 < d)


theorem comp_map {α β γ : Type _} (f : α → β) (g : β → γ) (x : F α) :
    (g ∘ f) <$> x = g <$> f <$> x

{F : Type u → Type u}
[q : QPF F]
{α β γ : Type u}
(f : α → β)
(g : β → γ)
(x : F α)


theorem dropLast_subset (l : List α) : l.dropLast ⊆ l


/-- The forgetful functor from comonoid objects to the ambient category. -/
@[simps]
def forget : Comon_ C ⥤ C

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

∀ {X Y : Comon_ C} (f : X ⟶ Y), (Comon_.forget C).map f = f.hom


@[simp]
theorem IsBoundedBilinearMap.deriv_apply (h : IsBoundedBilinearMap 𝕜 f) (p q : E × F) :
    h.deriv p q = f (p.1, q.2) + f (q.1, p.2)

{𝕜 : 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 : IsBoundedBilinearMap 𝕜 f)
(p q : E × F)


theorem reverse_leadingCoeff (f : R[X]) : f.reverse.leadingCoeff = f.trailingCoeff

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


theorem card_lt_of_surjective_not_injective [Fintype α] [Fintype β] (f : α → β)
    (h : Function.Surjective f) (h' : ¬Function.Injective f) : card β < card α

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(f : α → β)
(h : Function.Surjective f)
(h' : ¬Function.Injective f)


@[to_additive]
theorem image_inv : (s.image fun x => x⁻¹) = s⁻¹

{α : Type u_2}
[DecidableEq α]
[Inv α]
{s : Finset α}


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

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


@[simp]
theorem coe_set_mk (S : AddSubmonoid M) (h) : ((⟨S, h⟩ : Submodule R M) : Set M) = S

(h : ∀ (c : R) {x : M}, x ∈ S.carrier → c • x ∈ S.carrier)

↑{ toAddSubmonoid := S, smul_mem' := h } = ↑S


protected theorem add_assoc (x y z : BitVec n) : x + y + z = x + (y + z)


theorem logb_surjective : Surjective (logb b)

{b : ℝ}
(b_pos : 0 < b)
(b_ne_one : b ≠ 1)


theorem setOfIdeal_ofSet_of_isOpen {s : Set X} (hs : IsOpen s) : setOfIdeal (idealOfSet 𝕜 s) = s

{X : Type u_1}
(𝕜 : Type u_2)
[RCLike 𝕜]
[TopologicalSpace X]
[CompactSpace X]
[T2Space X]
{s : Set X}
(hs : IsOpen s)

ContinuousMap.setOfIdeal (ContinuousMap.idealOfSet 𝕜 s) = s


protected theorem uniformContinuous_symm (h : α ≃ᵤ β) : UniformContinuous h.symm

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)


theorem lsub_le_iff {ι : Type u} {f : ι → Ordinal.{max u v}} {a} :
    lsub.{_, v} f ≤ a ↔ ∀ i, f i < a

{ι : Type u}
{f : ι → Ordinal.{max u v}}
{a : Ordinal.{max v u}}


/-- A weighted sum of pairwise subtractions, where the point on the right is constant and the
sum of the weights is 0. -/
theorem sum_smul_vsub_const_eq_weightedVSub (w : ι → k) (p₁ : ι → P) (p₂ : P)
    (h : ∑ i ∈ s, w i = 0) : (∑ i ∈ s, w i • (p₁ i -ᵥ p₂)) = s.weightedVSub p₁ w

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

∑ i ∈ s, w i • (p₁ i -ᵥ p₂) = (s.weightedVSub p₁) w


/-- Any member of `L : List (List α))` is a sublist of `L.join` -/
lemma sublist_join (L : List (List α)) {s : List α} (hs : s ∈ L) :
    s.Sublist L.join

{α : Type u_1}
(L : List (List α))
{s : List α}
(hs : s ∈ L)


theorem range_subset_iff : range f ⊆ s ↔ ∀ y, f y ∈ s

{α : Type u_1}
{ι : Sort u_4}
{f : ι → α}
{s : Set α}


@[simp]
theorem mk_set {α : Type u} : #(Set α) = 2 ^ #α


/-- This condition expresses that inclusion morphisms into coproducts are monomorphisms. -/
class MonoCoprod : Prop where
  /-- the left inclusion of a colimit binary cofan is mono -/
  binaryCofan_inl : ∀ ⦃A B : C⦄ (c : BinaryCofan A B) (_ : IsColimit c), Mono c.inl

[self : CategoryTheory.Limits.MonoCoprod C]

(c : CategoryTheory.Limits.BinaryCofan A B)

CategoryTheory.Limits.IsColimit c → CategoryTheory.Mono c.inl


@[to_additive]
lemma mulIndicator_biUnion_apply (s : Finset ι) (t : ι → Set κ) {f : κ → β}
    (h : (s : Set ι).PairwiseDisjoint t) (x : κ) :
    mulIndicator (⋃ i ∈ s, t i) f x = ∏ i ∈ s, mulIndicator (t i) f x

{ι : Type u_1}
{β : Type u_4}
[CommMonoid β]
{κ : Type u_7}
(s : Finset ι)
(t : ι → Set κ)
{f : κ → β}
(h : (↑s).PairwiseDisjoint t)
(x : κ)

(⋃ i ∈ s, t i).mulIndicator f x = ∏ i ∈ s, (t i).mulIndicator f x


@[simp]
theorem neg_apply (f : M →SL[σ₁₂] M₂) (x : M) : (-f) x = -f x

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_5}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[TopologicalAddGroup M₂]
(f : M →SL[σ₁₂] M₂)
(x : M)


@[simp]
theorem linfty_opNorm_row (v : n → α) : ‖row ι v‖ = ∑ i, ‖v i‖

{n : Type u_4}
{α : Type u_5}
{ι : Type u_7}
[Fintype n]
[Unique ι]
[SeminormedAddCommGroup α]
(v : n → α)


theorem erase_cons [BEq α] (a b : α) (l : List α) :
    (b :: l).erase a = if b == a then l else b :: l.erase a

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

(b :: l).erase a = ite ((b == a) = true) l (b :: l.erase a)


theorem _root_.Measurable.setLIntegral_kernel_prod_left {f : β → α → ℝ≥0∞}
    (hf : Measurable (uncurry f)) {s : Set β} (hs : MeasurableSet s) :
    Measurable fun b => ∫⁻ a in s, f a b ∂κ b

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
[ProbabilityTheory.IsSFiniteKernel κ]
{f : β → α → ℝ≥0∞}
(hf : Measurable (Function.uncurry f))
{s : Set β}
(hs : MeasurableSet s)

Measurable fun b => ∫⁻ (a : β) in s, f a b ∂κ b


@[to_additive (attr := simp)]
theorem head_mul (x y : FreeSemigroup α) : (x * y).1 = x.1


lemma ab_exact_iff :
    S.Exact ↔ ∀ (x₂ : S.X₂) (_ : S.g x₂ = 0), ∃ (x₁ : S.X₁), S.f x₁ = x₂

S.Exact ↔ ∀ (x₂ : ↑S.X₂), S.g x₂ = 0 → ∃ x₁, S.f x₁ = x₂


/-- If `C` is equivalent to `D`, then `E ⥤ C` is equivalent to `E ⥤ D`. -/
@[simps! functor inverse unitIso counitIso]
def congrRight (e : C ≌ D) : E ⥤ C ≌ E ⥤ D

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

e.congrRight.functor = (CategoryTheory.whiskeringRight E C D).obj e.functor


theorem l_ciSup (gc : GaloisConnection l u) {f : ι → α} (hf : BddAbove (range f)) :
    l (⨆ i, f i) = ⨆ i, l (f i)

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
[Nonempty ι]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{f : ι → α}
(hf : BddAbove (Set.range f))


theorem ext [FormallyUnramified R A] (hI : IsNilpotent I) {g₁ g₂ : A →ₐ[R] B}
    (H : ∀ x, Ideal.Quotient.mk I (g₁ x) = Ideal.Quotient.mk I (g₂ x)) : g₁ = g₂

(H : ∀ (x : A), (Ideal.Quotient.mk I) (g₁ x) = (Ideal.Quotient.mk I) (g₂ x))


@[simp] lemma toOption_isSome (o : Part α) [Decidable o.Dom] : o.toOption.isSome ↔ o.Dom

{α : Type u_1}
(o : Part α)
[Decidable o.Dom]


theorem expSeries_div_hasSum_exp_of_mem_ball [CompleteSpace 𝔸] (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasSum (fun n => x ^ n / n !) (exp 𝕂 x)

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

HasSum (fun n => x ^ n / ↑n.factorial) (NormedSpace.exp 𝕂 x)


@[to_additive (attr := simp, to_additive) (reorder := 1 2, 4 5) ofDual_smul]
theorem ofDual_pow [Pow α β] (a : αᵒᵈ) (b : β) : ofDual (a ^ b) = ofDual a ^ b

{β : Type u_2}
{α : Type u_1}
[VAdd β α]
(b : β)
(a : αᵒᵈ)

OrderDual.ofDual (b +ᵥ a) = b +ᵥ OrderDual.ofDual a


@[simp]
theorem erase_single_same (i : ι) (x : β i) : (single i x).erase i = 0

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

DFinsupp.erase i (DFinsupp.single i x) = 0


@[to_additive (attr := simp)]
theorem image_op_mul : op '' (s * t) = op '' t * op '' s

AddOpposite.op '' (s + t) = AddOpposite.op '' t + AddOpposite.op '' s


@[simp]
theorem constantCoeff_wittStructureRat_zero (Φ : MvPolynomial idx ℚ) :
    constantCoeff (wittStructureRat p Φ 0) = constantCoeff Φ

(p : ℕ)
{idx : Type u_2}
[hp : Fact (Nat.Prime p)]
(Φ : MvPolynomial idx ℚ)

MvPolynomial.constantCoeff (wittStructureRat p Φ 0) = MvPolynomial.constantCoeff Φ


/-- The type of compact sets with nonempty interior of a topological space.
See also `TopologicalSpace.Compacts` and `TopologicalSpace.NonemptyCompacts`. -/
structure PositiveCompacts (α : Type*) [TopologicalSpace α] extends Compacts α where
  interior_nonempty' : (interior carrier).Nonempty

(self : TopologicalSpace.PositiveCompacts α)


/-- Similar to `MvPolynomial.induction_on` but only a weak form of `h_add` is required. -/
theorem induction_on''' {M : MvPolynomial σ R → Prop} (p : MvPolynomial σ R) (h_C : ∀ a, M (C a))
    (h_add_weak :
      ∀ (a : σ →₀ ℕ) (b : R) (f : (σ →₀ ℕ) →₀ R),
        a ∉ f.support → b ≠ 0 → M f → M ((show (σ →₀ ℕ) →₀ R from monomial a b) + f)) :
    M p

(h_add_weak :
  ∀ (a : σ →₀ ℕ) (b : R) (f : (σ →₀ ℕ) →₀ R),
    a ∉ f.support →
      b ≠ 0 →
        M f →
          M
            ((let_fun this := (MvPolynomial.monomial a) b;
              this) +
              f))


theorem mfderivWithin_congr (hs : UniqueMDiffWithinAt I s x) (hL : ∀ x ∈ s, f₁ x = f x)
    (hx : f₁ x = f x) : mfderivWithin I I' f₁ s x = (mfderivWithin I I' f s x : _)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f f₁ : M → M'}
{x : M}
{s : Set M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(hs : UniqueMDiffWithinAt I s x)
(hL : ∀ x ∈ s, f₁ x = f x)
(hx : f₁ x = f x)

mfderivWithin I I' f₁ s x = mfderivWithin I I' f s x


@[to_additive]
theorem map_le_range (H : Subgroup G) : map f H ≤ f.range

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)
(H : AddSubgroup G)


theorem algHom_ext_iff {φ₁ φ₂ : k[G] →ₐ[k] A} :
    (∀ x, φ₁ (Finsupp.single x 1) = φ₂ (Finsupp.single x 1)) ↔ φ₁ = φ₂

{k : Type u₁}
{G : Type u₂}
[CommSemiring k]
[AddMonoid G]
{A : Type u₃}
[Semiring A]
[Algebra k A]
{φ₁ φ₂ : AddMonoidAlgebra k G →ₐ[k] A}

(∀ (x : G), φ₁ (Finsupp.single x 1) = φ₂ (Finsupp.single x 1)) ↔ φ₁ = φ₂


theorem closure_union (s t : Set R) : closure (s ∪ t) = closure s ⊔ closure t

{R : Type u}
[NonUnitalNonAssocRing R]
(s t : Set R)

NonUnitalSubring.closure (s ∪ t) = NonUnitalSubring.closure s ⊔ NonUnitalSubring.closure t


@[simp]
theorem toNat_lift_add_lift {a : Cardinal.{u}} {b : Cardinal.{v}} (ha : a < ℵ₀) (hb : b < ℵ₀) :
    toNat (lift.{v} a + lift.{u} b) = toNat a + toNat b

{a : Cardinal.{u}}
{b : Cardinal.{v}}
(ha : a < Cardinal.aleph0)
(hb : b < Cardinal.aleph0)

Cardinal.toNat (Cardinal.lift.{v, u} a + Cardinal.lift.{u, v} b) = Cardinal.toNat a + Cardinal.toNat b


@[to_additive]
theorem finprod_mem_finset_product₃ {γ : Type*} (s : Finset (α × β × γ)) (f : α × β × γ → M) :
    (∏ᶠ (abc) (_ : abc ∈ s), f abc) = ∏ᶠ (a) (b) (c) (_ : (a, b, c) ∈ s), f (a, b, c)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[CommMonoid M]
{γ : Type u_7}
(s : Finset (α × β × γ))
(f : α × β × γ → M)

∏ᶠ (abc : α × β × γ) (_ : abc ∈ s), f abc = ∏ᶠ (a : α) (b : β) (c : γ) (_ : (a, b, c) ∈ s), f (a, b, c)


lemma natTrailingDegree_ne_zero : natTrailingDegree p ≠ 0 ↔ p ≠ 0 ∧ coeff p 0 = 0

p.natTrailingDegree ≠ 0 ↔ p ≠ 0 ∧ p.coeff 0 = 0


/-- Induction principle to build a sequence, by adding one point at a time satisfying a given
relation with respect to all the previously chosen points.

More precisely, Assume that, for any finite set `s`, one can find another point satisfying
some relation `r` with respect to all the points in `s`. Then one may construct a
function `f : ℕ → α` such that `r (f m) (f n)` holds whenever `m < n`.
We also ensure that all constructed points satisfy a given predicate `P`. -/
theorem exists_seq_of_forall_finset_exists {α : Type*} (P : α → Prop) (r : α → α → Prop)
    (h : ∀ s : Finset α, (∀ x ∈ s, P x) → ∃ y, P y ∧ ∀ x ∈ s, r x y) :
    ∃ f : ℕ → α, (∀ n, P (f n)) ∧ ∀ m n, m < n → r (f m) (f n)

(h : ∀ (s : Finset α), (∀ x ∈ s, P x) → ∃ y, P y ∧ ∀ x ∈ s, r x y)

∃ f, (∀ (n : ℕ), P (f n)) ∧ ∀ (m n : ℕ), m < n → r (f m) (f n)


protected theorem preconnectedSpace [PreconnectedSpace α] (di : DenseInducing i) :
    PreconnectedSpace β

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{i : α → β}
[PreconnectedSpace α]
(di : DenseInducing i)


@[to_additive]
theorem pow_ne_one_of_lt_orderOf (n0 : n ≠ 0) (h : n < orderOf x) : x ^ n ≠ 1

{G : Type u_1}
[AddMonoid G]
{x : G}
{n : ℕ}
(n0 : n ≠ 0)
(h : n < addOrderOf x)


theorem quotDualCoannihilatorToDual_nondegenerate (W : Submodule R (Dual R M)) :
    W.quotDualCoannihilatorToDual.Nondegenerate

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(W : Submodule R (Module.Dual R M))


theorem gc_map_comap (f : L →ₐ[K] L') : GaloisConnection (map f) (comap f)

{K : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
(f : L →ₐ[K] L')

GaloisConnection (IntermediateField.map f) (IntermediateField.comap f)


/-- `t` is in the shadow of `𝒜` iff we can add an element to it so that the resulting finset is in
`𝒜`. -/
lemma mem_shadow_iff_insert_mem : t ∈ ∂ 𝒜 ↔ ∃ a ∉ t, insert a t ∈ 𝒜

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


@[simp]
theorem nullHomotopicMap'_f_eq_zero {k₀ : ι} (hk₀ : ∀ l : ι, ¬c.Rel k₀ l)
    (hk₀' : ∀ l : ι, ¬c.Rel l k₀) (h : ∀ i j, c.Rel j i → (C.X i ⟶ D.X j)) :
    (nullHomotopicMap' h).f k₀ = 0

(h : (i j : ι) → c.Rel j i → (C.X i ⟶ D.X j))


@[simp]
theorem Ioo_eq_zero (h : ¬a < b) : Ioo a b = 0

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


protected theorem Nonempty.sym (h : s.Nonempty) (n : ℕ) : (s.sym n).Nonempty

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(h : s.Nonempty)
(n : ℕ)


@[mono]
theorem succPNat_mono : Monotone succPNat


/-- Functional equation for the even Hurwitz zeta function with poles removed (alternative form). -/
lemma completedCosZeta₀_one_sub (a : UnitAddCircle) (s : ℂ) :
    completedCosZeta₀ a (1 - s) = completedHurwitzZetaEven₀ a s

HurwitzZeta.completedCosZeta₀ a (1 - s) = HurwitzZeta.completedHurwitzZetaEven₀ a s


theorem Filter.Tendsto.cpow {l : Filter α} {f g : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 a))
    (hg : Tendsto g l (𝓝 b)) (ha : a ∈ slitPlane) :
    Tendsto (fun x => f x ^ g x) l (𝓝 (a ^ b))

{α : Type u_1}
{l : Filter α}
{f g : α → ℂ}
{a b : ℂ}
(hf : Filter.Tendsto f l (𝓝 a))
(hg : Filter.Tendsto g l (𝓝 b))
(ha : a ∈ Complex.slitPlane)

Filter.Tendsto (fun x => f x ^ g x) l (𝓝 (a ^ b))


theorem xor_left_injective {n : ℕ} : Function.Injective fun m => m ^^^ n


theorem mul_le_max (a b : Cardinal) : a * b ≤ max (max a b) ℵ₀


lemma integrable_density (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) {s : Set β} (hs : MeasurableSet s) :
    Integrable (fun x ↦ density κ ν a x s) (ν a)

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

MeasureTheory.Integrable (fun x => κ.density ν a x s) (ν a)


/-- `(x, y) ↦ x ^ y` is strictly differentiable at `p : ℝ × ℝ` such that `p.fst < 0`. -/
theorem hasStrictFDerivAt_rpow_of_neg (p : ℝ × ℝ) (hp : p.1 < 0) :
    HasStrictFDerivAt (fun x : ℝ × ℝ => x.1 ^ x.2)
      ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
        (p.1 ^ p.2 * log p.1 - exp (log p.1 * p.2) * sin (p.2 * π) * π) •
          ContinuousLinearMap.snd ℝ ℝ ℝ) p

HasStrictFDerivAt (fun x => x.1 ^ x.2)
  ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
    (p.1 ^ p.2 * Real.log p.1 - rexp (Real.log p.1 * p.2) * Real.sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
  p


@[simp, norm_cast]
theorem cast_intCast' (k : ℤ) : (cast (k : ZMod n) : R) = k

{n : ℕ}
{R : Type u_1}
[Ring R]
[CharP R n]
(k : ℤ)


/-- A matroid as defined by the independence axioms. This is the same thing as a `Matroid`,
  and so does not need its own API; it exists to make it easier to construct a matroid from its
  independent sets. The constructed `IndepMatroid` can then be converted into a matroid
  with `IndepMatroid.matroid`. -/
structure IndepMatroid (α : Type*) where
  /-- The ground set -/
  (E : Set α)
  /-- The independence predicate -/
  (Indep : Set α → Prop)
  (indep_empty : Indep ∅)
  (indep_subset : ∀ ⦃I J⦄, Indep J → I ⊆ J → Indep I)
  (indep_aug : ∀⦃I B⦄, Indep I → I ∉ maximals (· ⊆ ·) {I | Indep I} →
      B ∈ maximals (· ⊆ ·) {I | Indep I} → ∃ x ∈ B \ I, Indep (insert x I))
  (indep_maximal : ∀ X, X ⊆ E → ExistsMaximalSubsetProperty Indep X)
  (subset_ground : ∀ I, Indep I → I ⊆ E)

{α : Type u_2}
(self : IndepMatroid α)
(X : Set α)

X ⊆ self.E → Matroid.ExistsMaximalSubsetProperty self.Indep X


@[simp]
theorem setIntegral_deterministic {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [CompleteSpace E] {f : β → E} {g : α → β} {a : α} (hg : Measurable g)
    [MeasurableSingletonClass β] (s : Set β) [Decidable (g a ∈ s)] :
    ∫ x in s, f x ∂deterministic g hg a = if g a ∈ s then f (g a) else 0

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{f : β → E}
{g : α → β}
{a : α}
(hg : Measurable g)
[MeasurableSingletonClass β]
(s : Set β)
[Decidable (g a ∈ s)]

∫ (x : β) in s, f x ∂(ProbabilityTheory.Kernel.deterministic g hg) a = if g a ∈ s then f (g a) else 0


theorem exists_mem_adjoin_mul_eq_pow_natDegree_le {x : S} (hx : aeval x f = 0) (hmo : f.Monic)
    (hf : f.IsWeaklyEisensteinAt (Submodule.span R {p})) :
    ∀ i, (f.map (algebraMap R S)).natDegree ≤ i →
        ∃ y ∈ adjoin R ({x} : Set S), (algebraMap R S) p * y = x ^ i

(Polynomial.map (algebraMap R S) f).natDegree ≤ i → ∃ y ∈ Algebra.adjoin R {x}, (algebraMap R S) p * y = x ^ i


@[to_additive]
theorem inv_lt_iff_one_lt_mul : a⁻¹ < b ↔ 1 < b * a

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


lemma nonneg_iff_isPositive (f : E →L[𝕜] E) : 0 ≤ f ↔ f.IsPositive

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


@[to_additive (attr := simp)]
theorem threeGPFree_empty : ThreeGPFree (∅ : Set α)


theorem det_units_conj (M : (Matrix m m R)ˣ) (N : Matrix m m R) :
    det ((M : Matrix _ _ _) * N * (↑M⁻¹ : Matrix _ _ _)) = det N

{m : Type u_1}
[DecidableEq m]
[Fintype m]
{R : Type v}
[CommRing R]
(M : (Matrix m m R)ˣ)
(N : Matrix m m R)


@[simp]
theorem lTensor_counit_comul (a : A) : counit.lTensor A (comul a) = a ⊗ₜ[R] 1

{R : Type u}
{A : Type v}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Coalgebra R A]
(a : A)

(LinearMap.lTensor A Coalgebra.counit) (Coalgebra.comul a) = a ⊗ₜ[R] 1


theorem mul_cancel_right_coe_nonZeroDivisors {x y : R} {c : R⁰} : x * c = y * c ↔ x = y

{R : Type u_5}
[Ring R]
{x y : R}
{c : ↥R⁰}


theorem GradedAlgebra.ι_apply (m : M) :
    GradedAlgebra.ι Q m = DirectSum.of (fun i => ↥(evenOdd Q i)) 1 ⟨ι Q m, ι_mem_evenOdd_one Q m⟩

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

(CliffordAlgebra.GradedAlgebra.ι Q) m =
  (DirectSum.of (fun i => ↥(CliffordAlgebra.evenOdd Q i)) 1) ⟨(CliffordAlgebra.ι Q) m, ⋯⟩


theorem coe_iterateFrobenius : iterateFrobenius R p n = (frobenius R p)^[n]

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

⇑(iterateFrobenius R p n) = (⇑(frobenius R p))^[n]


theorem le_arcsin_iff_sin_le' {x y : ℝ} (hx : x ∈ Ioc (-(π / 2)) (π / 2)) :
    x ≤ arcsin y ↔ sin x ≤ y