/-- If `p` is an invariant submodule of an endomorphism `f`, then the `μ`-eigenspace of the
restriction of `f` to `p` is a submodule of the `μ`-eigenspace of `f`. -/
theorem eigenspace_restrict_le_eigenspace (f : End R M) {p : Submodule R M} (hfp : ∀ x ∈ p, f x ∈ p)
    (μ : R) : (eigenspace (f.restrict hfp) μ).map p.subtype ≤ f.eigenspace μ

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
(f : Module.End R M)
{p : Submodule R M}
(hfp : ∀ x ∈ p, f x ∈ p)
(μ : R)

Submodule.map p.subtype (Module.End.eigenspace (LinearMap.restrict f hfp) μ) ≤ f.eigenspace μ


@[to_additive Right.pow_neg]
theorem Right.pow_lt_one_of_lt [CovariantClass M M (swap (· * ·)) (· < ·)] {n : ℕ} {x : M}
    (hn : 0 < n) (h : x < 1) : x ^ n < 1

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


theorem le_extendScalars_iff (E' : IntermediateField F L) :
    E' ≤ extendScalars h ↔ E'.restrictScalars K ≤ E

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
{F E : IntermediateField K L}
(h : F ≤ E)
(E' : IntermediateField (↥F) L)

E' ≤ IntermediateField.extendScalars h ↔ IntermediateField.restrictScalars K E' ≤ E


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

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


@[simp] lemma chainTop_zero : chainTop 0 β = β

{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]
(β : LieModule.Weight R L M)


@[local instance]
lemma HasAffineProperty : HasAffineProperty P (sourceAffineLocally Q)

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

{Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}

AlgebraicGeometry.HasAffineProperty P (AlgebraicGeometry.sourceAffineLocally fun {R S} [CommRing R] [CommRing S] => Q)


@[simp]
theorem zero_divOf (g : G) : (0 : k[G]) /ᵒᶠ g = 0

{k : Type u_1}
{G : Type u_2}
[Semiring k]
[AddCancelCommMonoid G]
(g : G)


/-- Taking opposites as an equivalence of powersets. -/
@[simps]
def opEquiv : Set α ≃ Set αᵒᵖ


@[to_additive]
protected theorem continuous_iff {f : X → Mˣ} :
    Continuous f ↔ Continuous (val ∘ f) ∧ Continuous (fun x => ↑(f x)⁻¹ : X → M)

{M : Type u_1}
{X : Type u_2}
[TopologicalSpace M]
[AddMonoid M]
[TopologicalSpace X]
{f : X → AddUnits M}

Continuous f ↔ Continuous (AddUnits.val ∘ f) ∧ Continuous fun x => ↑(-f x)


protected theorem sup_lt {a b c : CauSeq α abs} (ha : a < c) (hb : b < c) : a ⊔ b < c

{α : Type u_1}
[LinearOrderedField α]
{a b c : CauSeq α abs}
(ha : a < c)
(hb : b < c)


theorem smul_mem_pointwise_smul (m : A) (a : α) (S : AddSubmonoid A) : m ∈ S → a • m ∈ a • S

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Monoid α]
[DistribMulAction α A]
(m : A)
(a : α)
(S : AddSubmonoid A)


/-- Note that the `IsScalarTower α β β` typeclass argument is usually satisfied by `Algebra α β`. -/
@[to_additive]
lemma smul_div_assoc [DivInvMonoid β] [SMul α β] [IsScalarTower α β β] (r : α) (x y : β) :
    r • x / y = r • (x / y)

{α : Type u_7}
{β : Type u_8}
[SubNegMonoid β]
[VAdd α β]
[VAddAssocClass α β β]
(r : α)
(x y : β)


/-- If `Irreducible (cyclotomic (p ^ (k + 1)) K)` (in particular for `K = ℚ`) and `p` is a prime,
then the norm of `ζ ^ (p ^ s) - 1` is `p ^ (p ^ s)` if `p ^ (k - s + 1) ≠ 2`. See the next lemmas
for similar results. -/
theorem norm_pow_sub_one_of_prime_pow_ne_two {k s : ℕ} (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1)))
    [hpri : Fact (p : ℕ).Prime] [IsCyclotomicExtension {p ^ (k + 1)} K L]
    (hirr : Irreducible (cyclotomic (↑(p ^ (k + 1)) : ℕ) K)) (hs : s ≤ k)
    (htwo : p ^ (k - s + 1) ≠ 2) : norm K (ζ ^ (p : ℕ) ^ s - 1) = (p : K) ^ (p : ℕ) ^ s

(hirr : Irreducible (Polynomial.cyclotomic (↑(p ^ (k + 1))) K))

(Algebra.norm K) (ζ ^ ↑p ^ s - 1) = ↑↑p ^ ↑p ^ s


@[simp]
theorem gcd_mul_right [NormalizedGCDMonoid α] (a b c : α) :
    gcd (b * a) (c * a) = gcd b c * normalize a

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


@[simp]
theorem bot_mem (s : Ideal P) : ⊥ ∈ s

{P : Type u_1}
[LE P]
[OrderBot P]
(s : Order.Ideal P)


protected theorem subsingleton.symm (e : α ≃ β) [Subsingleton α] : Subsingleton β

{α : Sort u}
{β : Sort v}
(e : α ≃ β)
[Subsingleton α]


@[deprecated ofFn_getElem_eq_map (since := "2024-06-12")]
theorem ofFn_get_eq_map {β : Type*} (l : List α) (f : α → β) : ofFn (f <| l.get ·) = l.map f

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

(List.ofFn fun x => f (l.get x)) = List.map f l


theorem erase_eq_sub_single {β : ι → Type*} [∀ i, AddGroup (β i)] (f : Π₀ i, β i) (i : ι) :
    f.erase i = f - single i (f i)

{ι : Type u}
[DecidableEq ι]
{β : ι → Type u_1}
[(i : ι) → AddGroup (β i)]
(f : Π₀ (i : ι), β i)
(i : ι)

DFinsupp.erase i f = f - DFinsupp.single i (f i)


@[simp]
theorem toZModSubmodule_symm :
    ⇑((toZModSubmodule n).symm : _ ≃o AddSubgroup M) = Submodule.toAddSubgroup

(n : ℕ)
{M : Type u_1}
[AddCommGroup M]
[Module (ZMod n) M]

⇑(AddSubgroup.toZModSubmodule n).symm = Submodule.toAddSubgroup


theorem Nonempty.to_type : s.Nonempty → Nonempty α


theorem singleton_injective : Injective (singleton : α → Set α)


theorem cutExpand_add_left {t u} (s) : CutExpand r (s + t) (s + u) ↔ CutExpand r t u

{α : Type u_1}
{r : α → α → Prop}
{t u : Multiset α}
(s : Multiset α)

Relation.CutExpand r (s + t) (s + u) ↔ Relation.CutExpand r t u


@[simp, nolint simpNF]
theorem apply_subrelIso (f : r ≺i s) (b : {b | s b f.top}) :
    f (f.subrelIso b) = b

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ≺i s)
(b : ↑{b | s b f.top})


theorem nonunits_subset : (A.nonunits : Set K) ⊆ A

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


@[to_additive (attr := simp)]
theorem norm_eq_zero {x : FreeGroup α} : norm x = 0 ↔ x = 1

{α : Type u}
[DecidableEq α]
{x : FreeGroup α}


theorem Iio_injective : Injective (Iio : α → Set α)


theorem isNat_mul {α} [Semiring α] : ∀ {f : α → α → α} {a b : α} {a' b' c : ℕ},
    f = HMul.hMul → IsNat a a' → IsNat b b' → Nat.mul a' b' = c → IsNat (a * b) c

{α : Type u_1}
[Semiring α]
{f : α → α → α}
{a b : α}
{a' b' c : ℕ}

f = HMul.hMul →
  Mathlib.Meta.NormNum.IsNat a a' →
    Mathlib.Meta.NormNum.IsNat b b' → a'.mul b' = c → Mathlib.Meta.NormNum.IsNat (a * b) c


/-- A topological space is σ-compact iff `univ` is σ-compact. -/
lemma isSigmaCompact_univ_iff : IsSigmaCompact (univ : Set X) ↔ SigmaCompactSpace X

IsSigmaCompact Set.univ ↔ SigmaCompactSpace X


lemma eqToHom_codomain_lift_id {p : 𝒳 ⥤ 𝒮} {a b : 𝒳} (hab : a = b) {S : 𝒮} (hS : p.obj b = S) :
    p.IsHomLift (𝟙 S) (eqToHom hab)

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₂} 𝒳]
[CategoryTheory.Category.{v₂, u₁} 𝒮]
{p : 𝒳 ⥤ 𝒮}
{a b : 𝒳}
(hab : a = b)
{S : 𝒮}
(hS : p.obj b = S)

p.IsHomLift (𝟙 S) (CategoryTheory.eqToHom hab)


/-- The subfunctor of `F` obtained by restricting to the preimages of a set `s ∈ F.obj i`. -/
@[simps]
def toPreimages : J ⥤ Type v

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

∀ {X Y : J} (g : X ⟶ Y) (a : ↑(⋂ f, F.map f ⁻¹' s)),
  (F.toPreimages s).map g a = Set.MapsTo.restrict (F.map g) (⋂ f, F.map f ⁻¹' s) (⋂ f, F.map f ⁻¹' s) ⋯ a


/-- `StarAlgEquivClass F R A B` asserts `F` is a type of bundled ⋆-algebra equivalences between
`A` and `B`.

You should also extend this typeclass when you extend `StarAlgEquiv`. -/
class StarAlgEquivClass (F : Type*) (R A B : outParam Type*)
  [Add A] [Mul A] [SMul R A] [Star A] [Add B] [Mul B] [SMul R B]
  [Star B] [EquivLike F A B] [NonUnitalAlgEquivClass F R A B] : Prop where
  /-- By definition, a ⋆-algebra equivalence preserves the `star` operation. -/
  map_star : ∀ (f : F) (a : A), f (star a) = star (f a)

{F : Type u_1}
{R : outParam (Type u_2)}
{A : outParam (Type u_3)}
{B : outParam (Type u_4)}
[Add A]
[Mul A]
[SMul R A]
[Star A]
[Add B]
[Mul B]
[SMul R B]
[Star B]
[EquivLike F A B]
[NonUnitalAlgEquivClass F R A B]
[self : StarAlgEquivClass F R A B]
(f : F)
(a : A)


@[simp]
theorem Nat.castRingHom_nat : Nat.castRingHom ℕ = RingHom.id ℕ


@[simp]
theorem bot_lt_zero : (⊥ : EReal) < 0


theorem head_some_of_head_tail_some {s : WSeq α} {a} (h : some a ∈ head (tail s)) :
    ∃ a', some a' ∈ head s

{α : Type u}
{s : Stream'.WSeq α}
{a : α}
(h : some a ∈ s.tail.head)


theorem dualMap_surjective_of_injective {f : V₁ →ₗ[K] V₂} (hf : Function.Injective f) :
    Function.Surjective f.dualMap

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
{V₂ : Type uV₂}
[AddCommGroup V₁]
[Module K V₁]
[AddCommGroup V₂]
[Module K V₂]
{f : V₁ →ₗ[K] V₂}
(hf : Function.Injective ⇑f)


@[measurability, fun_prop]
theorem Measurable.nndist {f g : β → α} (hf : Measurable f) (hg : Measurable g) :
    Measurable fun b => nndist (f b) (g b)

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace β]
[SecondCountableTopology α]
{f g : β → α}
(hf : Measurable f)
(hg : Measurable g)


theorem pi_Icc_mem_nhds (ha : ∀ i, a i < x i) (hb : ∀ i, x i < b i) : Icc a b ∈ 𝓝 x

{ι : Type u_1}
{π : ι → Type u_2}
[Finite ι]
[(i : ι) → LinearOrder (π i)]
[(i : ι) → TopologicalSpace (π i)]
[∀ (i : ι), OrderTopology (π i)]
{a b x : (i : ι) → π i}
(ha : ∀ (i : ι), a i < x i)
(hb : ∀ (i : ι), x i < b i)


@[simp]
theorem not_irreducible_expand (R p) [CommSemiring R] [Fact p.Prime] [CharP R p] [PerfectRing R p]
    (f : R[X]) : ¬ Irreducible (expand R p f)

(R : Type u_2)
(p : ℕ)
[CommSemiring R]
[Fact (Nat.Prime p)]
[CharP R p]
[PerfectRing R p]
(f : R[X])

¬Irreducible ((Polynomial.expand R p) f)


theorem exists_sum_eq_one_iff_pairwise_coprime' [Fintype I] [Nonempty I] [DecidableEq I] :
    (∃ μ : I → R, (∑ i : I, μ i * ∏ j ∈ {i}ᶜ, s j) = 1) ↔ Pairwise (IsCoprime on s)

{R : Type u}
{I : Type v}
[CommSemiring R]
{s : I → R}
[Fintype I]
[Nonempty I]
[DecidableEq I]

(∃ μ, ∑ i : I, μ i * ∏ j ∈ {i}ᶜ, s j = 1) ↔ Pairwise (IsCoprime on s)


@[simp]
lemma zpowersMulHom_apply (x : α) (n : Multiplicative ℤ) : zpowersMulHom α x n = x ^ toAdd n

{α : Type u_3}
[CommGroup α]
(x : α)
(n : Multiplicative ℤ)

((zpowersMulHom α) x) n = x ^ Multiplicative.toAdd n


theorem and_left_comm : ∀ (x y z : Bool), (x && (y && z)) = (y && (x && z))


@[deprecated divInt_sub_divInt (since := "2024-03-18")]
lemma sub_def'' {a b c d : ℤ} (b0 : b ≠ 0) (d0 : d ≠ 0) :
    a /. b - c /. d = (a * d - c * b) /. (b * d)

Rat.divInt a b - Rat.divInt c d = Rat.divInt (a * d - c * b) (b * d)


/-- Horizontal and vertical composition of squares commutes.-/
theorem leftAdjointSquare.comp_hvcomp
    (α : G₁ ⋙ L₃ ⟶ L₁ ⋙ H₁) (β : H₁ ⋙ L₄ ⟶ L₂ ⋙ K₁)
    (γ : G₂ ⋙ L₅ ⟶ L₃ ⋙ H₂) (δ : H₂ ⋙ L₆ ⟶ L₄ ⋙ K₂) :
    leftAdjointSquare.comp α β γ δ =
      leftAdjointSquare.hcomp (leftAdjointSquare.vcomp α γ) (leftAdjointSquare.vcomp β δ)

{A : Type u₁}
{B : Type u₂}
{C : Type u₃}
{D : Type u₄}
{E : Type u₅}
{F : Type u₆}
{X : Type u₇}
{Y : Type u₈}
{Z : Type u₉}
[CategoryTheory.Category.{v₁, u₁} A]
[CategoryTheory.Category.{v₂, u₂} B]
[CategoryTheory.Category.{v₃, u₃} C]
[CategoryTheory.Category.{v₄, u₄} D]
[CategoryTheory.Category.{v₅, u₅} E]
[CategoryTheory.Category.{v₆, u₆} F]
[CategoryTheory.Category.{v₇, u₇} X]
[CategoryTheory.Category.{v₈, u₈} Y]
[CategoryTheory.Category.{v₉, u₉} Z]
{G₁ : CategoryTheory.Functor A D}
{H₁ : CategoryTheory.Functor B E}
{K₁ : CategoryTheory.Functor C F}
{G₂ : CategoryTheory.Functor D X}
{H₂ : CategoryTheory.Functor E Y}
{K₂ : CategoryTheory.Functor F Z}
{L₁ : CategoryTheory.Functor A B}
{L₂ : CategoryTheory.Functor B C}
{L₃ : CategoryTheory.Functor D E}
{L₄ : CategoryTheory.Functor E F}
{L₅ : CategoryTheory.Functor X Y}
{L₆ : CategoryTheory.Functor Y Z}
(α : G₁.comp L₃ ⟶ L₁.comp H₁)
(β : H₁.comp L₄ ⟶ L₂.comp K₁)
(γ : G₂.comp L₅ ⟶ L₃.comp H₂)
(δ : H₂.comp L₆ ⟶ L₄.comp K₂)

CategoryTheory.leftAdjointSquare.comp α β γ δ =
  CategoryTheory.leftAdjointSquare.hcomp (CategoryTheory.leftAdjointSquare.vcomp α γ)
    (CategoryTheory.leftAdjointSquare.vcomp β δ)


@[simp, mfld_simps]
theorem localTrivAt_def : Z.localTriv (Z.indexAt b) = Z.localTrivAt b

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


/-- If `K` is a compact exhaustion of `α`
and `V i` bounded by `p i` is a basis of entourages of `β`,
then `fun (n, i) ↦ {(f, g) | ∀ x ∈ K n, (f x, g x) ∈ V i}` bounded by `p i`
is a basis of entourages of `C(α, β)`. -/
theorem _root_.CompactExhaustion.hasBasis_compactConvergenceUniformity {ι : Type*}
    {p : ι → Prop} {V : ι → Set (β × β)} (K : CompactExhaustion α) (hb : (𝓤 β).HasBasis p V) :
    HasBasis (𝓤 C(α, β)) (fun i : ℕ × ι ↦ p i.2) fun i ↦
      {fg | ∀ x ∈ K i.1, (fg.1 x, fg.2 x) ∈ V i.2}

{α : Type u₁}
{β : Type u₂}
[TopologicalSpace α]
[UniformSpace β]
{ι : Type u_1}
{p : ι → Prop}
{V : ι → Set (β × β)}
(K : CompactExhaustion α)
(hb : (𝓤 β).HasBasis p V)

(𝓤 C(α, β)).HasBasis (fun i => p i.2) fun i => {fg | ∀ x ∈ K i.1, (fg.1 x, fg.2 x) ∈ V i.2}


theorem strictMonoOn_Ici_of_pred_lt [PredOrder α] [IsPredArchimedean α] {n : α}
    (hψ : ∀ m, n < m → ψ (pred m) < ψ m) : StrictMonoOn ψ (Set.Ici n)

(hψ : ∀ (m : α), n < m → ψ (Order.pred m) < ψ m)


/-- For any `Semiring A`, we collect the homogeneous ideals of `A` into a type. -/
structure HomogeneousIdeal extends Submodule A A where
  is_homogeneous' : Ideal.IsHomogeneous 𝒜 toSubmodule

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


lemma IsPushout.mk (h : IsColimit sq.pushoutCocone) : sq.IsPushout

(h : CategoryTheory.Limits.IsColimit sq.pushoutCocone)


@[simp]
lemma homologyMap_id : homologyMap (𝟙 K) i = 𝟙 _

HomologicalComplex.homologyMap (𝟙 K) i = 𝟙 (K.homology i)


@[simp]
theorem map_injective [Nonempty α] [Nonempty β] {f : α → γ} {g : β → δ} :
    Injective (map f g) ↔ Injective f ∧ Injective g

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[Nonempty α]
[Nonempty β]
{f : α → γ}
{g : β → δ}

Function.Injective (Prod.map f g) ↔ Function.Injective f ∧ Function.Injective g


theorem ofDigits_mod_eq_head! (b : ℕ) (l : List ℕ) : ofDigits b l % b = l.head! % b


@[to_additive (attr := simp)]
theorem inv_mk (f : α → γ) (hf) : (mk f hf : α →ₘ[μ] γ)⁻¹ = mk f⁻¹ hf.inv

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(MeasureTheory.AEEqFun.mk f hf)⁻¹ = MeasureTheory.AEEqFun.mk f⁻¹ ⋯


@[measurability]
theorem measurable_snd {_ : MeasurableSpace α} {_ : MeasurableSpace β} :
    Measurable (Prod.snd : α × β → β)

∀ {x : MeasurableSpace α} {x_1 : MeasurableSpace β}, Measurable Prod.snd


@[simp]
theorem linearIsometryBoundedOfCompact_symm_apply (f : α →ᵇ E) :
    (linearIsometryBoundedOfCompact α E 𝕜).symm f = f.toContinuousMap

{α : Type u_1}
{E : Type u_3}
[TopologicalSpace α]
[CompactSpace α]
[NormedAddCommGroup E]
{𝕜 : Type u_4}
[NormedField 𝕜]
[NormedSpace 𝕜 E]
(f : α →ᵇ E)

(ContinuousMap.linearIsometryBoundedOfCompact α E 𝕜).symm f = f.toContinuousMap


theorem isCoprime_mul_unit_right_left : IsCoprime (y * x) z ↔ IsCoprime y z

{R : Type u_1}
[CommSemiring R]
{x : R}
(hu : IsUnit x)
(y z : R)


@[to_additive]
theorem mono_iff_injective : Mono f ↔ Function.Injective f

CategoryTheory.Mono f ↔ Function.Injective ⇑f


@[simp]
lemma top_apply {X Y : C} (f : X ⟶ Y) : (⊤ : MorphismProperty C) f

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


@[simp]
theorem disjoint_one_right (f : Perm α) : Disjoint f 1


nonrec theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → Matrix m m 𝔸)
    (h : (s : Set ι).Pairwise fun i j => Commute (f i) (f j)) :
    exp 𝕂 (∑ i ∈ s, f i) =
      s.noncommProd (fun i => exp 𝕂 (f i)) fun i hi j hj _ => (h.of_refl hi hj).exp 𝕂

(h : (↑s).Pairwise fun i j => Commute (f i) (f j))

NormedSpace.exp 𝕂 (∑ i ∈ s, f i) = s.noncommProd (fun i => NormedSpace.exp 𝕂 (f i)) ⋯


@[reassoc]
theorem Obj.map_epi_on_summand_id {Δ Δ' : SimplexCategory} (e : Δ' ⟶ Δ) [Epi e] :
    ((Γ₀.splitting K).cofan _).inj (Splitting.IndexSet.id (op Δ)) ≫ (Γ₀.obj K).map e.op =
      ((Γ₀.splitting K).cofan _).inj (Splitting.IndexSet.mk e)

((AlgebraicTopology.DoldKan.Γ₀.splitting K).cofan (Opposite.op Δ)).inj
      (SimplicialObject.Splitting.IndexSet.id (Opposite.op Δ)) ≫
    (AlgebraicTopology.DoldKan.Γ₀.obj K).map e.op =
  ((AlgebraicTopology.DoldKan.Γ₀.splitting K).cofan (Opposite.op Δ')).inj (SimplicialObject.Splitting.IndexSet.mk e)


theorem commutatorElement_def {G : Type*} [Group G] (g₁ g₂ : G) :
    ⁅g₁, g₂⁆ = g₁ * g₂ * g₁⁻¹ * g₂⁻¹

⁅g₁, g₂⁆ = g₁ * g₂ * g₁⁻¹ * g₂⁻¹


theorem aemeasurable_iff_measurable [μ.IsComplete] : AEMeasurable f μ ↔ Measurable f

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
[μ.IsComplete]


@[simp]
theorem toNonarchAddGroupSeminorm_eq_coe : ⇑p.toNonarchAddGroupSeminorm = p

{E : Type u_4}
[AddGroup E]
{p : NonarchAddGroupNorm E}


lemma sum_mul (s : Finset ι) (f : ι → α) (a : α) :
    (∑ i ∈ s, f i) * a = ∑ i ∈ s, f i * a

{ι : Type u_1}
{α : Type u_2}
[NonUnitalNonAssocSemiring α]
(s : Finset ι)
(f : ι → α)
(a : α)


theorem mapEmbedding_injective (f : G ↪g G') (u v : V) :
    Function.Injective (Path.mapEmbedding f : G.Path u v → G'.Path (f u) (f v))

{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
(f : G ↪g G')
(u v : V)


@[to_additive]
theorem mul_inv_eq_iff_eq_mul : a * b⁻¹ = c ↔ a = c * b


@[ext]
theorem ext (S T : J.Cover X) (h : ∀ ⦃Y⦄ (f : Y ⟶ X), S f ↔ T f) : S = T

{J : CategoryTheory.GrothendieckTopology C}

(h : ∀ ⦃Y : C⦄ (f : Y ⟶ X), S.sieve.arrows f ↔ T.sieve.arrows f)


lemma div_mul_cancel_of_imp (h : b = 0 → a = 0) : a / b * b = a

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}
(h : b = 0 → a = 0)


/-- The closure of a sieve is closed. -/
theorem close_isClosed {X : C} (S : Sieve X) : J₁.IsClosed (J₁.close S)

(J₁ : CategoryTheory.GrothendieckTopology C)


@[simp]
lemma Ico_inr_inl : Ico (inrₗ b) (inlₗ a) = ∅

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[OrderTop α]
[OrderBot β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a : α)
(b : β)

Finset.Ico (Sum.inrₗ b) (Sum.inlₗ a) = ∅


/-- Poincaré recurrence theorem. Let `f : α → α` be a conservative dynamical system on a topological
space with second countable topology and measurable open sets. Then almost every point `x : α`
is recurrent: it visits every neighborhood `s ∈ 𝓝 x` infinitely many times. -/
theorem ae_frequently_mem_of_mem_nhds [TopologicalSpace α] [SecondCountableTopology α]
    [OpensMeasurableSpace α] {f : α → α} {μ : Measure α} (h : Conservative f μ) :
    ∀ᵐ x ∂μ, ∀ s ∈ 𝓝 x, ∃ᶠ n in atTop, f^[n] x ∈ s

{α : Type u_2}
[MeasurableSpace α]
[TopologicalSpace α]
[SecondCountableTopology α]
[OpensMeasurableSpace α]
{f : α → α}
{μ : MeasureTheory.Measure α}
(h : MeasureTheory.Conservative f μ)

∀ᵐ (x : α) ∂μ, ∀ s ∈ 𝓝 x, ∃ᶠ (n : ℕ) in Filter.atTop, f^[n] x ∈ s


theorem mul_lt_of_le_of_lt_one' [PosMulStrictMono α] [MulPosMono α] (bc : b ≤ c) (ha : a < 1)
    (a0 : 0 ≤ a) (c0 : 0 < c) : b * a < c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulStrictMono α]
[MulPosMono α]
(bc : b ≤ c)
(ha : a < 1)
(a0 : 0 ≤ a)
(c0 : 0 < c)


/-- (Impl) Construct the lifted cone in `Coalgebra T` which will be limiting. -/
@[simps]
def liftedCone : Cone D

{D : CategoryTheory.Functor J T.Coalgebra}

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

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

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

((CategoryTheory.Comonad.ForgetCreatesLimits'.liftedCone c t).π.app j).f = c.π.app j


theorem mem_coe {x : M} : x ∈ (N : Set M) ↔ x ∈ N

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

x ∈ ↑N ↔ x ∈ N


theorem powersetCard_map {β : Type*} (f : α ↪ β) (n : ℕ) (s : Finset α) :
    powersetCard n (s.map f) = (powersetCard n s).map (mapEmbedding f).toEmbedding

{α : Type u_1}
{β : Type u_2}
(f : α ↪ β)
(n : ℕ)
(s : Finset α)

Finset.powersetCard n (Finset.map f s) = Finset.map (Finset.mapEmbedding f).toEmbedding (Finset.powersetCard n s)


/-- monotonicity of `≤` with respect to `→` -/
theorem le_implies_le_of_le_of_le {a b c d : α} [Preorder α] (hca : c ≤ a) (hbd : b ≤ d) :
    a ≤ b → c ≤ d

{α : Type u_2}
{a b c d : α}
[Preorder α]
(hca : c ≤ a)
(hbd : b ≤ d)


@[deprecated Sorted.rel_get_of_lt (since := "2024-05-08")]
theorem Sorted.rel_nthLe_of_lt {l : List α} (h : l.Sorted r) {a b : ℕ} (ha : a < l.length)
    (hb : b < l.length) (hab : a < b) : r (l.nthLe a ha) (l.nthLe b hb)

{α : Type u}
{r : α → α → Prop}
{l : List α}
(h : List.Sorted r l)
{a b : ℕ}
(ha : a < l.length)
(hb : b < l.length)
(hab : a < b)


@[simp, norm_cast]
theorem coe_mul (f g : CauSeq β abv) : ⇑(f * g) = (f : ℕ → β) * g

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


@[simp]
theorem singleton_apply (ι R : Type*) [Unique ι] [Semiring R] (i) : Basis.singleton ι R i = 1

(ι : Type u_10)
(R : Type u_11)
[Unique ι]
[Semiring R]
(i : ι)


@[to_additive (attr := simp)]
theorem MulHom.coe_copy {_ : Mul M} {_ : Mul N} (f : M →ₙ* N) (f' : M → N) (h : f' = f) :
    (f.copy f' h) = f'

∀ {x : Mul M} {x_1 : Mul N} (f : M →ₙ* N) (f' : M → N) (h : f' = ⇑f), ⇑(f.copy f' h) = f'


@[field_simps 1010]
theorem divp_eq_iff_mul_eq {x : α} {u : αˣ} {y : α} : x /ₚ u = y ↔ y * u = x

{α : Type u}
[Monoid α]
{x : α}
{u : αˣ}
{y : α}


@[simp]
theorem LHom.realize_onFormula [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] (ψ : L.Formula α)
    {v : α → M} : (φ.onFormula ψ).Realize v ↔ ψ.Realize v

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
[L'.Structure M]
(φ : L →ᴸ L')
[φ.IsExpansionOn M]
(ψ : L.Formula α)
{v : α → M}


@[simp, norm_cast]
lemma coe_himp (s t : L.DefinableSet A α) : ↑(s ⇨ t) = (s ⇨ t : Set (α → M))

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{A : Set M}
{α : Type u₁}
(s t : L.DefinableSet A α)


@[to_additive norm_sub_norm_le]
theorem norm_sub_norm_le' (a b : E) : ‖a‖ - ‖b‖ ≤ ‖a / b‖

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

‖a‖ - ‖b‖ ≤ ‖a / b‖


theorem eq_induced_by_maps_to_sierpinski (X : Type*) [t : TopologicalSpace X] :
    t = ⨅ u : Opens X, sierpinskiSpace.induced (· ∈ u)

t = ⨅ u, TopologicalSpace.induced (fun x => x ∈ u) sierpinskiSpace


@[simp]
theorem mem_merge {s : α → α → Bool} : x ∈ merge s l r ↔ x ∈ l ∨ x ∈ r

{α : Type u_1}
{x : α}
{l r : List α}
{s : α → α → Bool}


theorem uncurry_injective : Function.Injective (uncurry : (Y ⟶ A ⟶[C] X) → (A ⊗ Y ⟶ X))

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.MonoidalCategory C]
{A X Y : C}
[CategoryTheory.Closed A]


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

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


theorem fromBlocks_transpose (A : Matrix n l α) (B : Matrix n m α) (C : Matrix o l α)
    (D : Matrix o m α) : (fromBlocks A B C D)ᵀ = fromBlocks Aᵀ Cᵀ Bᵀ Dᵀ

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
(A : Matrix n l α)
(B : Matrix n m α)
(C : Matrix o l α)
(D : Matrix o m α)

(Matrix.fromBlocks A B C D)ᵀ = Matrix.fromBlocks Aᵀ Cᵀ Bᵀ Dᵀ


/-- The ring morphism `A →+* A ⊗[R] B` sending `a` to `a ⊗ₜ 1`. -/
@[simps]
def includeLeftRingHom : A →+* A ⊗[R] B

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
(a : A)

Algebra.TensorProduct.includeLeftRingHom a = a ⊗ₜ[R] 1


theorem tendsto_floor_atBot : Tendsto (floor : α → ℤ) atBot atBot

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]

Filter.Tendsto Int.floor Filter.atBot Filter.atBot


@[to_additive (attr := simp)]
theorem prod_properDivisors_prime_pow {α : Type*} [CommMonoid α] {k p : ℕ} {f : ℕ → α}
    (h : p.Prime) : (∏ x ∈ (p ^ k).properDivisors, f x) = ∏ x ∈ range k, f (p ^ x)

{α : Type u_1}
[AddCommMonoid α]
{k p : ℕ}
{f : ℕ → α}
(h : Nat.Prime p)

∑ x ∈ (p ^ k).properDivisors, f x = ∑ x ∈ Finset.range k, f (p ^ x)


@[simp]
theorem mapAlgEquiv_comp (C : Type z) [Semiring C] [Algebra R C] (f : A ≃ₐ[R] B) (g : B ≃ₐ[R] C) :
    (mapAlgEquiv f).trans (mapAlgEquiv g) = mapAlgEquiv (f.trans g)

{R : Type u}
{A : Type z}
{B : Type u_2}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(C : Type z)
[Semiring C]
[Algebra R C]
(f : A ≃ₐ[R] B)
(g : B ≃ₐ[R] C)

(Polynomial.mapAlgEquiv f).trans (Polynomial.mapAlgEquiv g) = Polynomial.mapAlgEquiv (f.trans g)


theorem Sublist.append_right : l₁ <+ l₂ → ∀ l, l₁ ++ l <+ l₂ ++ l

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁ <+ l₂ → ∀ (l : List α), l₁ ++ l <+ l₂ ++ l


@[simp]
theorem tendsto_sup {f : α → β} {x₁ x₂ : Filter α} {y : Filter β} :
    Tendsto f (x₁ ⊔ x₂) y ↔ Tendsto f x₁ y ∧ Tendsto f x₂ y

{α : Type u}
{β : Type v}
{f : α → β}
{x₁ x₂ : Filter α}
{y : Filter β}

Filter.Tendsto f (x₁ ⊔ x₂) y ↔ Filter.Tendsto f x₁ y ∧ Filter.Tendsto f x₂ y


theorem prime_ideal_of_disjoint_filter_ideal (hFI : Disjoint (F : Set α) (I : Set α)) :
    ∃ J : Ideal α, (IsPrime J) ∧ I ≤ J ∧ Disjoint (F : Set α) J

{α : Type u_1}
[DistribLattice α]
[BoundedOrder α]
{F : Order.PFilter α}
{I : Order.Ideal α}
(hFI : Disjoint ↑F ↑I)


theorem frobeniusRotation_nonzero {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) :
    frobeniusRotation p ha₁ ha₂ ≠ 0

(p : ℕ)
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[Field k]
[CharP k p]
[IsAlgClosed k]
{a₁ a₂ : WittVector p k}
(ha₁ : a₁.coeff 0 ≠ 0)
(ha₂ : a₂.coeff 0 ≠ 0)

WittVector.frobeniusRotation p ha₁ ha₂ ≠ 0


theorem foldr_loop (f : Fin (n+1) → α → α) (x) (h : m+1 ≤ n+1) :
    foldr.loop (n+1) f ⟨m+1, h⟩ x =
      f 0 (foldr.loop n (fun i => f i.succ) ⟨m, Nat.le_of_succ_le_succ h⟩ x)

{n : Nat}
{α : Sort u_1}
{m : Nat}
(f : Fin (n + 1) → α → α)
(x : α)
(h : m + 1 ≤ n + 1)

Fin.foldr.loop (n + 1) f ⟨m + 1, h⟩ x = f 0 (Fin.foldr.loop n (fun i => f i.succ) ⟨m, ⋯⟩ x)


@[simp]
theorem eval_one : (1 : R[X]).eval x = 1


lemma hasDerivAt_Gamma_nat (n : ℕ) :
    HasDerivAt Gamma (n ! * (-γ + harmonic n)) (n + 1)

HasDerivAt Real.Gamma (↑n ! * (-γ + ↑(harmonic n))) (↑n + 1)


@[to_additive]
theorem finprod_eq_prod_of_mulSupport_toFinset_subset (f : α → M) (hf : (mulSupport f).Finite)
    {s : Finset α} (h : hf.toFinset ⊆ s) : ∏ᶠ i, f i = ∏ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(f : α → M)
(hf : (Function.support f).Finite)
{s : Finset α}
(h : hf.toFinset ⊆ s)


/-- If the only elements outside `s` are those left fixed by `σ`, then mapping by `σ` has no effect.
-/
theorem map_perm {σ : Equiv.Perm α} (hs : { a | σ a ≠ a } ⊆ s) : s.map (σ : α ↪ α) = s

{α : Type u_1}
{s : Finset α}
{σ : Equiv.Perm α}
(hs : {a | σ a ≠ a} ⊆ ↑s)


@[to_additive]
theorem AEMeasurable.mul_iff_right {G : Type*} [MeasurableSpace G] [MeasurableSpace α] [CommGroup G]
    [MeasurableMul₂ G] [MeasurableInv G] {μ : Measure α} {f g : α → G} (hf : AEMeasurable f μ) :
    AEMeasurable (f * g) μ ↔ AEMeasurable g μ

{α : Type u_1}
{G : Type u_2}
[MeasurableSpace G]
[MeasurableSpace α]
[CommGroup G]
[MeasurableMul₂ G]
[MeasurableInv G]
{μ : MeasureTheory.Measure α}
{f g : α → G}
(hf : AEMeasurable f μ)


/-- If `f` has an invertible derivative `f'` at `a` in the sense of strict differentiability `(hf)`,
then the inverse function `hf.localInverse f` has derivative `f'.symm` at `f a`. -/
theorem to_localInverse (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) a) :
    HasStrictFDerivAt (hf.localInverse f f' a) (f'.symm : F →L[𝕜] E) (f a)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace E]
{f : E → F}
{f' : E ≃L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f (↑f') a)

HasStrictFDerivAt (HasStrictFDerivAt.localInverse f f' a hf) (↑f'.symm) (f a)


protected theorem continuous {g : X → Y} (hf : LocallyFinite f) (h_cov : ⋃ i, f i = univ)
    (h_cl : ∀ i, IsClosed (f i)) (h_cont : ∀ i, ContinuousOn g (f i)) :
    Continuous g

(h_cont : ∀ (i : ι), ContinuousOn g (f i))


lemma insert_sdiff_insert' (hab : a ≠ b) (ha : a ∉ s) : insert a s \ insert b s = {a}

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}
(hab : a ≠ b)
(ha : a ∉ s)


@[simp]
theorem coordChangeHomeomorph_coe (e₁ e₂ : Trivialization F proj) {b : B} (h₁ : b ∈ e₁.baseSet)
    (h₂ : b ∈ e₂.baseSet) : ⇑(e₁.coordChangeHomeomorph e₂ h₁ h₂) = e₁.coordChange e₂ b

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e₁ e₂ : Trivialization F proj)
{b : B}
(h₁ : b ∈ e₁.baseSet)
(h₂ : b ∈ e₂.baseSet)


@[simp]
lemma image_subtype_val_Ioi_Ioi {a : α} (b : Ioi a) : Subtype.val '' Ioi b = Ioi b.1

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


theorem map_add_left (f₁ f₂ : M →ₗ[A] P) (g : N →ₗ[R] Q) :
    map (f₁ + f₂) g = map f₁ g + map f₂ g

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
{P : Type uP}
{Q : Type uQ}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]
[AddCommMonoid Q]
[Module R Q]
(f₁ f₂ : M →ₗ[A] P)
(g : N →ₗ[R] Q)

TensorProduct.AlgebraTensorModule.map (f₁ + f₂) g =
  TensorProduct.AlgebraTensorModule.map f₁ g + TensorProduct.AlgebraTensorModule.map f₂ g


@[simp]
theorem nil_kunion {l : List (Sigma β)} : kunion [] l = l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{l : List (Sigma β)}


theorem comp_continuousOn_iff {γ} [TopologicalSpace γ] (hf : Isometry f) {g : γ → α} {s : Set γ} :
    ContinuousOn (f ∘ g) s ↔ ContinuousOn g s

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
{γ : Type u_2}
[TopologicalSpace γ]
(hf : Isometry f)
{g : γ → α}
{s : Set γ}


@[simp]
theorem isLittleO_sup : f =o[l ⊔ l'] g ↔ f =o[l] g ∧ f =o[l'] g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{l l' : Filter α}


/-- Intermediate stage of assembling the unit. -/
@[simps]
def unitAuxAuxAux {F : Cᵒᵖ ⥤ Type v} (η : F ⟶ A) (X : C) :
    YonedaCollection (restrictedYonedaObj η) X ≅ F.obj (op X)

{A F : CategoryTheory.Functor Cᵒᵖ (Type v)}

∀ (a : F.obj (Opposite.op X)),
  (CategoryTheory.OverPresheafAux.unitAuxAuxAux η X).inv a = CategoryTheory.OverPresheafAux.unitBackward η X a


@[simp] lemma sum_extend_zero {ι ι' : Type*} {f : ι → ι'} (hf : Injective f) (m : ι → Measure α) :
    sum (Function.extend f m 0) = sum m

{α : Type u_1}
{m0 : MeasurableSpace α}
{ι : Type u_8}
{ι' : Type u_9}
{f : ι → ι'}
(hf : Function.Injective f)
(m : ι → MeasureTheory.Measure α)

MeasureTheory.Measure.sum (Function.extend f m 0) = MeasureTheory.Measure.sum m


theorem type_unit : type (@EmptyRelation Unit) = 1


theorem isPositive_zero : IsPositive (0 : E →L[𝕜] E)

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


@[fun_prop]
theorem DifferentiableWithinAt.prod (hf₁ : DifferentiableWithinAt 𝕜 f₁ s x)
    (hf₂ : DifferentiableWithinAt 𝕜 f₂ s x) :
    DifferentiableWithinAt 𝕜 (fun x : E => (f₁ x, f₂ x)) s x

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

DifferentiableWithinAt 𝕜 (fun x => (f₁ x, f₂ x)) s x


lemma subst_into_smul {α} [AddCommMonoid α]
    (l r tl tr t) (prl : l = tl) (prr : r = tr)
    (prt : @smul α _ tl tr = t) : smul l r = t

(prt : Mathlib.Tactic.Abel.smul tl tr = t)


theorem PerfectSpace.univ_perfect [PerfectSpace α] : Perfect (Set.univ : Set α)

(α : Type u_1)
[TopologicalSpace α]
[PerfectSpace α]


@[to_additive]
theorem elim_inv_inv [Inv γ] : Sum.elim a⁻¹ b⁻¹ = (Sum.elim a b)⁻¹

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(a : α → γ)
(b : β → γ)
[Neg γ]


@[to_additive]
theorem eq_inv_mul_iff_mul_eq : a = b⁻¹ * c ↔ b * a = c


theorem iIndepSet.indep_generateFrom_le [LinearOrder ι] [IsProbabilityMeasure μ] {s : ι → Set Ω}
    (hsm : ∀ n, MeasurableSet (s n)) (hs : iIndepSet s μ) (i : ι) {k : ι} (hk : i < k) :
    Indep (generateFrom {s k}) (generateFrom { t | ∃ j ≤ i, s j = t }) μ

{Ω : Type u_1}
{ι : Type u_2}
{_mΩ : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[LinearOrder ι]
[MeasureTheory.IsProbabilityMeasure μ]
{s : ι → Set Ω}
(hsm : ∀ (n : ι), MeasurableSet (s n))
(hs : ProbabilityTheory.iIndepSet s μ)
(i : ι)
{k : ι}
(hk : i < k)

ProbabilityTheory.Indep (MeasurableSpace.generateFrom {s k}) (MeasurableSpace.generateFrom {t | ∃ j ≤ i, s j = t}) μ


theorem map_codRestrict [RingHomSurjective σ₂₁] (p : Submodule R M) (f : M₂ →ₛₗ[σ₂₁] M) (h p') :
    Submodule.map (codRestrict p f h) p' = comap p.subtype (p'.map f)

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Semiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{σ₂₁ : R₂ →+* R}
[RingHomSurjective σ₂₁]
(p : Submodule R M)
(f : M₂ →ₛₗ[σ₂₁] M)
(h : ∀ (c : M₂), f c ∈ p)
(p' : Submodule R₂ M₂)

Submodule.map (LinearMap.codRestrict p f h) p' = Submodule.comap p.subtype (Submodule.map f p')


theorem orderOf_units_dvd_card_sub_one {p : ℕ} [Fact p.Prime] (u : (ZMod p)ˣ) : orderOf u ∣ p - 1

{p : ℕ}
[Fact (Nat.Prime p)]
(u : (ZMod p)ˣ)


theorem Monotone.quasiconcaveOn (hf : Monotone f) : QuasiconcaveOn 𝕜 univ f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{f : E → β}
(hf : Monotone f)


/-- To prove something for an arbitrary measurable function into `ℝ≥0∞`, it suffices to show
that the property holds for (multiples of) characteristic functions and is closed under addition
and supremum of increasing sequences of functions.

It is possible to make the hypotheses in the induction steps a bit stronger, and such conditions
can be added once we need them (for example in `h_add` it is only necessary to consider the sum of
a simple function with a multiple of a characteristic function and that the intersection
of their images is a subset of `{0}`. -/
@[elab_as_elim]
theorem Measurable.ennreal_induction {α} [MeasurableSpace α] {P : (α → ℝ≥0∞) → Prop}
    (h_ind : ∀ (c : ℝ≥0∞) ⦃s⦄, MeasurableSet s → P (Set.indicator s fun _ => c))
    (h_add :
      ∀ ⦃f g : α → ℝ≥0∞⦄,
        Disjoint (support f) (support g) → Measurable f → Measurable g → P f → P g → P (f + g))
    (h_iSup :
      ∀ ⦃f : ℕ → α → ℝ≥0∞⦄, (∀ n, Measurable (f n)) → Monotone f → (∀ n, P (f n)) →
        P fun x => ⨆ n, f n x)
    ⦃f : α → ℝ≥0∞⦄ (hf : Measurable f) : P f

(h_ind : ∀ (c : ℝ≥0∞) ⦃s : Set α⦄, MeasurableSet s → P (s.indicator fun x => c))

(h_add :
  ∀ ⦃f g : α → ℝ≥0∞⦄,
    Disjoint (Function.support f) (Function.support g) → Measurable f → Measurable g → P f → P g → P (f + g))

(h_iSup :
  ∀ ⦃f : ℕ → α → ℝ≥0∞⦄, (∀ (n : ℕ), Measurable (f n)) → Monotone f → (∀ (n : ℕ), P (f n)) → P fun x => ⨆ n, f n x)

⦃f : α → ℝ≥0∞⦄


theorem isUnit_of_left_inverse (h : B * A = 1) : IsUnit A

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
{A B : Matrix n n α}
(h : B * A = 1)


/-- A separable extension has finite inseparable degree one. -/
theorem Algebra.IsSeparable.finInsepDegree_eq [Algebra.IsSeparable F E] : finInsepDegree F E = 1

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


theorem _root_.Function.Surjective.list_map {f : α → β} (h : Surjective f) :
    Surjective (map f)

{α : Type u}
{β : Type v}
{f : α → β}
(h : Function.Surjective f)


theorem mk_pow [AddMonoid ι] [GMonoid A] {i} (a : A i) (n : ℕ) :
    mk i a ^ n = mk (n • i) (GMonoid.gnpow _ a)

{ι : Type u_1}
(A : ι → Type u_2)
[AddMonoid ι]
[GradedMonoid.GMonoid A]
{i : ι}
(a : A i)
(n : ℕ)

GradedMonoid.mk i a ^ n = GradedMonoid.mk (n • i) (GradedMonoid.GMonoid.gnpow n a)


protected theorem Eq.wcovBy (h : a = b) : a ⩿ b

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


theorem integrable_of_intervalIntegral_norm_bounded (I : ℝ)
    (hfi : ∀ i, IntegrableOn f (Ioc (a i) (b i)) μ) (ha : Tendsto a l atBot)
    (hb : Tendsto b l atTop) (h : ∀ᶠ i in l, (∫ x in a i..b i, ‖f x‖ ∂μ) ≤ I) : Integrable f μ

(hfi : ∀ (i : ι), MeasureTheory.IntegrableOn f (Set.Ioc (a i) (b i)) μ)

(h : ∀ᶠ (i : ι) in l, ∫ (x : ℝ) in a i..b i, ‖f x‖ ∂μ ≤ I)


lemma Cofan.isColimit_iff_isIso_sigmaDesc {f : β → C} [HasCoproduct f] (c : Cofan f) :
    IsIso (Sigma.desc c.inj) ↔ Nonempty (IsColimit c)

{β : Type w}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{f : β → C}
[CategoryTheory.Limits.HasCoproduct f]
(c : CategoryTheory.Limits.Cofan f)

CategoryTheory.IsIso (CategoryTheory.Limits.Sigma.desc c.inj) ↔ Nonempty (CategoryTheory.Limits.IsColimit c)


theorem orderEmbeddingOfSet_range [DecidablePred (· ∈ s)] :
    Set.range (Nat.orderEmbeddingOfSet s) = s

(s : Set ℕ)
[Infinite ↑s]
[DecidablePred fun x => x ∈ s]

Set.range ⇑(Nat.orderEmbeddingOfSet s) = s


@[simp]
theorem subtypePerm_mul (f g : Perm α) (hf hg) :
    (f.subtypePerm hf * g.subtypePerm hg : Perm { x // p x }) =
      (f * g).subtypePerm fun _ => (hg _).trans <| hf _

{α : Type u}
{p : α → Prop}
(f g : Equiv.Perm α)
(hf : ∀ (x : α), p x ↔ p (f x))
(hg : ∀ (x : α), p x ↔ p (g x))

f.subtypePerm hf * g.subtypePerm hg = (f * g).subtypePerm ⋯


lemma CompleteOrthogonalIdempotents.equiv {J} [Fintype J] (i : J ≃ I) :
    CompleteOrthogonalIdempotents (e ∘ i) ↔ CompleteOrthogonalIdempotents e

{R : Type u_1}
[Ring R]
{I : Type u_3}
{e : I → R}
[Fintype I]
{J : Type u_4}
[Fintype J]
(i : J ≃ I)

CompleteOrthogonalIdempotents (e ∘ ⇑i) ↔ CompleteOrthogonalIdempotents e


@[simp] theorem elim_inl (f : α → γ) (g : β → γ) (x : α) :
    Sum.elim f g (inl x) = f x

{α : Type u_1}
{γ : Sort u_2}
{β : Type u_3}
(f : α → γ)
(g : β → γ)
(x : α)


lemma IsPullback.op {sq : Square C} (h : sq.IsPullback) : sq.op.IsPushout

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


/-- The canonical isomorphism `mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧`. -/
@[simps!]
noncomputable def mappingConeHomOfDegreewiseSplitIso :
    mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧

(S : CategoryTheory.ShortComplex (CochainComplex C ℤ))

(σ : (n : ℤ) → (S.map (HomologicalComplex.eval C (ComplexShape.up ℤ) n)).Splitting)

(CochainComplex.mappingConeHomOfDegreewiseSplitIso S σ).hom.f i =
  (CochainComplex.mappingConeHomOfDegreewiseSplitXIso S σ i (i + 1) ⋯).hom


lemma SurjectiveOnStalks.comp (hg : SurjectiveOnStalks g) (hf : SurjectiveOnStalks f) :
    SurjectiveOnStalks (g.comp f)

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
{T : Type u_3}
[CommRing T]
{g : S →+* T}
{f : R →+* S}
(hg : g.SurjectiveOnStalks)
(hf : f.SurjectiveOnStalks)


/-- Given a point in an affine subspace, a vector is in its direction if and only if it results from
subtracting that point on the right. -/
theorem mem_direction_iff_eq_vsub_right {s : AffineSubspace k P} {p : P} (hp : p ∈ s) (v : V) :
    v ∈ s.direction ↔ ∃ p2 ∈ s, v = p2 -ᵥ p

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : AffineSubspace k P}
{p : P}
(hp : p ∈ s)
(v : V)


/-- The integral of an almost-everywhere strongly measurable function over `AddCircle T` is equal
to the integral over an interval (t, t + T] in `ℝ` of its lift to `ℝ`. -/
protected theorem intervalIntegral_preimage (t : ℝ) (f : AddCircle T → E) :
    ∫ a in t..t + T, f a = ∫ b : AddCircle T, f b

(T : ℝ)
[hT : Fact (0 < T)]
{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(t : ℝ)
(f : AddCircle T → E)

∫ (a : ℝ) in t..t + T, f ↑a = ∫ (b : AddCircle T), f b


lemma IsSelfAdjoint.mono {x y : R} (h : x ≤ y) (hx : IsSelfAdjoint x) : IsSelfAdjoint y

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x y : R}
(h : x ≤ y)
(hx : IsSelfAdjoint x)


theorem fderiv.comp_deriv (hl : DifferentiableAt 𝕜 l (f x)) (hf : DifferentiableAt 𝕜 f x) :
    deriv (l ∘ f) x = (fderiv 𝕜 l (f x) : F → E) (deriv f x)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → F}
(x : 𝕜)
{l : F → E}
(hl : DifferentiableAt 𝕜 l (f x))
(hf : DifferentiableAt 𝕜 f x)

deriv (l ∘ f) x = (fderiv 𝕜 l (f x)) (deriv f x)


@[simp]
theorem le_ndinsert_self (a : α) (s : Multiset α) : s ≤ ndinsert a s

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


/-- If `μ` is inner regular for finite measure sets with respect to compact sets,
then any measurable set of finite measure can be approximated by a
compact subset. See also `MeasurableSet.exists_isCompact_lt_add` and
`MeasurableSet.exists_lt_isCompact_of_ne_top`. -/
theorem _root_.MeasurableSet.exists_isCompact_diff_lt [OpensMeasurableSpace α] [T2Space α]
    [InnerRegularCompactLTTop μ]  ⦃A : Set α⦄ (hA : MeasurableSet A) (h'A : μ A ≠ ∞)
    {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ K, K ⊆ A ∧ IsCompact K ∧ μ (A \ K) < ε

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[OpensMeasurableSpace α]
[T2Space α]
[μ.InnerRegularCompactLTTop]
⦃A : Set α⦄
(hA : MeasurableSet A)
(h'A : μ A ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)


lemma extensiveTopology.isLocallySurjective_iff [FinitaryExtensive C]
    {F G : Sheaf (extensiveTopology C) D} (f : F ⟶ G)
      [PreservesFiniteProducts (forget D)] : IsLocallySurjective f ↔
        ∀ (X : C), Function.Surjective (f.val.app (op X))

{F G : CategoryTheory.Sheaf (CategoryTheory.extensiveTopology C) D}

CategoryTheory.Sheaf.IsLocallySurjective f ↔ ∀ (X : C), Function.Surjective ⇑(f.val.app (Opposite.op X))


lemma exists_linearIndependent_of_le_finrank {n : ℕ} (hn : n ≤ finrank R M) :
    ∃ f : Fin n → M, LinearIndependent R f

(hn : n ≤ FiniteDimensional.finrank R M)


@[simp] theorem coe_pred (j : Fin (n + 1)) (h : j ≠ 0) : (j.pred h : Nat) = j - 1


@[simp] lemma castLE_inj {hmn : m ≤ n} {a b : Fin m} : castLE hmn a = castLE hmn b ↔ a = b

Fin.castLE hmn a = Fin.castLE hmn b ↔ a = b


lemma negAddY_self {P : Fin 3 → R} : W'.negAddY P P = 0

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P : Fin 3 → R}


/-- The functor `Arrow (Arrow C) ⥤ Square C` which sends
a morphism `Arrow.mk f ⟶ Arrow.mk g` to the commutative square
with `f` on the left side and `g` on the right side. -/
@[simps!]
def fromArrowArrowFunctor : Arrow (Arrow C) ⥤ Square C

(f : CategoryTheory.Arrow (CategoryTheory.Arrow C))

(CategoryTheory.Square.fromArrowArrowFunctor.obj f).X₁ = f.left.left


/-- When `S₁.f` and `S₂.f` are zero and we have chosen limit kernel forks `c₁` and `c₂`
for `S₁.g` and `S₂.g` respectively, the action on homology of a morphism `φ : S₁ ⟶ S₂` of
short complexes is given by the unique morphism `f : c₁.pt ⟶ c₂.pt` such that
`c₁.ι ≫ φ.τ₂ = f ≫ c₂.ι`. -/
@[simps]
def ofIsLimitKernelFork (φ : S₁ ⟶ S₂)
    (hf₁ : S₁.f = 0) (c₁ : KernelFork S₁.g) (hc₁ : IsLimit c₁)
    (hf₂ : S₂.f = 0) (c₂ : KernelFork S₂.g) (hc₂ : IsLimit c₂) (f : c₁.pt ⟶ c₂.pt)
    (comm : c₁.ι ≫ φ.τ₂ = f ≫ c₂.ι) :
    HomologyMapData φ (HomologyData.ofIsLimitKernelFork S₁ hf₁ c₁ hc₁)
      (HomologyData.ofIsLimitKernelFork S₂ hf₂ c₂ hc₂)

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

(hc₁ : CategoryTheory.Limits.IsLimit c₁)

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

(hc₂ : CategoryTheory.Limits.IsLimit c₂)

(comm :
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Fork.ι c₁) φ.τ₂ =
    CategoryTheory.CategoryStruct.comp f (CategoryTheory.Limits.Fork.ι c₂))

(CategoryTheory.ShortComplex.HomologyMapData.ofIsLimitKernelFork φ hf₁ c₁ hc₁ hf₂ c₂ hc₂ f comm).right =
  CategoryTheory.ShortComplex.RightHomologyMapData.ofIsLimitKernelFork φ hf₁ c₁ hc₁ hf₂ c₂ hc₂ f comm


@[simp]
theorem coe_equivRange (f : E →SL[σ] F) (hinj : Injective f) (hclo : IsClosed (range f)) :
    (f.equivRange hinj hclo : E → LinearMap.range f) = f.rangeRestrict

{𝕜 : Type u_1}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜']
{σ : 𝕜 →+* 𝕜'}
{σ' : 𝕜' →+* 𝕜}
[RingHomInvPair σ σ']
[RingHomInvPair σ' σ]
[RingHomIsometric σ]
[RingHomIsometric σ']
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜' F]
[CompleteSpace F]
[CompleteSpace E]
(f : E →SL[σ] F)
(hinj : Function.Injective ⇑f)
(hclo : IsClosed (Set.range ⇑f))

⇑(f.equivRange hinj hclo) = ⇑f.rangeRestrict


@[simp]
theorem flip_unflip {X α β : Type*} [Finite α] [TopologicalSpace X]
    (f : α → LocallyConstant X β) : (unflip f).flip = f

{X : Type u_5}
{α : Type u_6}
{β : Type u_7}
[Finite α]
[TopologicalSpace X]
(f : α → LocallyConstant X β)


/-- If `f.op` is an isomorphism `f` must be too.
(This cannot be an instance as it would immediately loop!)
-/
theorem isIso_of_op {X Y : C} (f : X ⟶ Y) [IsIso f.op] : IsIso f

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


theorem Sorted.merge : ∀ {l l' : List α}, Sorted r l → Sorted r l' → Sorted r (merge (r · ·) l l')

{α : Type u}
{r : α → α → Prop}
[DecidableRel r]
[IsTotal α r]
[IsTrans α r]
{l l' : List α}

List.Sorted r l → List.Sorted r l' → List.Sorted r (List.merge (fun x x_1 => decide (r x x_1)) l l')


/-- Any number m is less than (b+2)^(number of digits in the base b + 2 representation of m) -/
theorem lt_base_pow_length_digits' {b m : ℕ} : m < (b + 2) ^ (digits (b + 2) m).length


theorem exp_nat_mul (x : ℂ) : ∀ n : ℕ, exp (n * x) = exp x ^ n

Complex.exp (↑n * x) = Complex.exp x ^ n


theorem _root_.IsFractional.pow {I : Submodule R P} (h : IsFractional S I) :
    ∀ n : ℕ, IsFractional S (I ^ n : Submodule R P)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{I : Submodule R P}
(h : IsFractional S I)
(n : ℕ)


theorem vector_length {n} : Primrec (@Vector.length α n)


lemma dist_pi_def (f g : ∀ b, π b) : dist f g = (sup univ fun b => nndist (f b) (g b) : ℝ≥0)

{β : Type u_2}
{π : β → Type u_3}
[Fintype β]
[(b : β) → PseudoMetricSpace (π b)]
(f g : (b : β) → π b)

dist f g = ↑(Finset.univ.sup fun b => nndist (f b) (g b))


@[simp]
theorem add_apply (f g : Poly α) (x : α → ℕ) : (f + g) x = f x + g x

{α : Type u_1}
(f g : Poly α)
(x : α → ℕ)


/-- The functor which sends `S : SnakeInput C` to `S.L₁'` which is
`S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁`. -/
@[simps]
noncomputable def functorL₁' : SnakeInput C ⥤ ShortComplex C

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]

∀ {X Y : CategoryTheory.ShortComplex.SnakeInput C} (f : X ⟶ Y),
  (CategoryTheory.ShortComplex.SnakeInput.functorL₁'.map f).τ₁ = f.f₀.τ₂


/-- `SMulWithZero` is a class consisting of a Type `R` with `0 ∈ R` and a scalar multiplication
of `R` on a Type `M` with `0`, such that the equality `r • m = 0` holds if at least one among `r`
or `m` equals `0`. -/
class SMulWithZero [Zero R] [Zero M] extends SMulZeroClass R M where
  /-- Scalar multiplication by the scalar `0` is `0`. -/
  zero_smul : ∀ m : M, (0 : R) • m = 0

{R : Type u_1}
{M : Type u_3}
[Zero R]
[Zero M]
[self : SMulWithZero R M]
(m : M)


/-- An additive homomorphism `M →+ N` can equivalently be viewed as an additive homomorphism
`Mᵐᵒᵖ →+ Nᵐᵒᵖ`. This is the action of the (fully faithful) `ᵐᵒᵖ`-functor on morphisms. -/
@[simps]
def AddMonoidHom.mulOp {M N} [AddZeroClass M] [AddZeroClass N] : (M →+ N) ≃ (Mᵐᵒᵖ →+ Nᵐᵒᵖ)

{M : Type u_2}
{N : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
(f : Mᵐᵒᵖ →+ Nᵐᵒᵖ)

∀ (a : M), (AddMonoidHom.mulOp.symm f) a = (MulOpposite.unop ∘ ⇑f ∘ MulOpposite.op) a


@[simp]
theorem mem_equalizer (φ ψ : F) (x : A) :
    x ∈ NonUnitalAlgHom.equalizer φ ψ ↔ φ x = ψ x

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
(φ ψ : F)
(x : A)


lemma ne_iff {f g : Π₀ i, β i} : f ≠ g ↔ ∃ i, f i ≠ g i

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
{f g : Π₀ (i : ι), β i}


/-- If `M` is quasicoherent, it is locally generated by sections. -/
@[simps]
def localGeneratorsData (q : M.QuasicoherentData) : M.LocalGeneratorsData

{J : CategoryTheory.GrothendieckTopology C}

[∀ (X : C), (J.over X).HasSheafCompose (CategoryTheory.forget₂ RingCat AddCommGrp)]

[∀ (X : C), CategoryTheory.HasWeakSheafify (J.over X) AddCommGrp]

[∀ (X : C), (J.over X).WEqualsLocallyBijective AddCommGrp]


lemma rpow_le_rpow_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) : x ^ z ≤ y ^ z ↔ y ≤ x


theorem not_summable_iff_tendsto_nat_atTop_of_nonneg {f : ℕ → ℝ} (hf : ∀ n, 0 ≤ f n) :
    ¬Summable f ↔ Tendsto (fun n : ℕ => ∑ i ∈ Finset.range n, f i) atTop atTop

¬Summable f ↔ Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop Filter.atTop


theorem span_eq_bot {s : Set α} : span s = ⊥ ↔ ∀ x ∈ s, (x : α) = 0


@[simp] lemma coe_mul (m n : ℕ) : ↑(m * n) = (m * n : ℕ∞)


theorem FiniteDimensional.complete : CompleteSpace E

(𝕜 : Type u_1)
(E : Type u_2)
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[AddCommGroup E]
[UniformSpace E]
[T2Space E]
[UniformAddGroup E]
[Module 𝕜 E]
[ContinuousSMul 𝕜 E]
[FiniteDimensional 𝕜 E]


@[to_additive (attr := simp) sub_neg "For `a - -b = a + b`, see `sub_neg_eq_add`."]
theorem div_lt_one' : a / b < 1 ↔ a < b

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


protected theorem add_left_cancel_iff {n : Nat} : n + m = n + k ↔ m = k


@[to_additive]
theorem partialProd_succ (f : Fin n → α) (j : Fin n) :
    partialProd f j.succ = partialProd f (Fin.castSucc j) * f j

{α : Type u_1}
[AddMonoid α]
{n : ℕ}
(f : Fin n → α)
(j : Fin n)

Fin.partialSum f j.succ = Fin.partialSum f j.castSucc + f j


theorem disjoint_of_subset_right {s t u : Multiset α} (h : t ⊆ u) (d : Disjoint s u) : Disjoint s t

{α : Type u_1}
{s t u : Multiset α}
(h : t ⊆ u)
(d : s.Disjoint u)


theorem ContinuousAt.comp_upperSemicontinuousWithinAt {g : γ → δ} {f : α → γ}
    (hg : ContinuousAt g (f x)) (hf : UpperSemicontinuousWithinAt f s x) (gmon : Monotone g) :
    UpperSemicontinuousWithinAt (g ∘ f) s x


theorem mem_sUnion_of_mem {x y z : ZFSet} (hy : y ∈ z) (hz : z ∈ x) : y ∈ ⋃₀ x


protected theorem sub_le_sub_iff_left {n m k : Nat} (h : n ≤ k) : k - m ≤ k - n ↔ n ≤ m


theorem liftIco_zero_coe_apply {f : 𝕜 → B} {x : 𝕜} (hx : x ∈ Ico 0 p) : liftIco p 0 f ↑x = f x

{𝕜 : Type u_1}
{B : Type u_2}
[LinearOrderedAddCommGroup 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{p : 𝕜}
[hp : Fact (0 < p)]
[Archimedean 𝕜]
{f : 𝕜 → B}
{x : 𝕜}
(hx : x ∈ Set.Ico 0 p)


@[simp] lemma val_add : (x + y).val = x.val + y.val

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
(x y : P.Cotangent)


theorem eq_δ₀ {n : ℕ} {i : ([n] : SimplexCategory) ⟶ [n + 1]} [Mono i] (hi : Isδ₀ i) :
    i = SimplexCategory.δ 0

{n : ℕ}
{i : [n] ⟶ [n + 1]}
[CategoryTheory.Mono i]
(hi : AlgebraicTopology.DoldKan.Isδ₀ i)


@[to_additive]
lemma piecewise_smul [∀ i, SMul M (α i)] (s : Set ι) [∀ i, Decidable (i ∈ s)]
    (c : M) (f₁ g₁ : ∀ i, α i) : s.piecewise (c • f₁) (c • g₁) = c • s.piecewise f₁ g₁

{ι : Type u_1}
{M : Type u_2}
{α : ι → Type u_4}
[(i : ι) → SMul M (α i)]
(s : Set ι)
[(i : ι) → Decidable (i ∈ s)]
(c : M)
(f₁ g₁ : (i : ι) → α i)


@[ext]
theorem ext {s t : VectorMeasure α M} (h : ∀ i : Set α, MeasurableSet i → s i = t i) : s = t

(h : ∀ (i : Set α), MeasurableSet i → ↑s i = ↑t i)


lemma mem_ker_toLin'_lapMatrix_of_connectedComponent {G : SimpleGraph V} [DecidableRel G.Adj]
    [DecidableEq G.ConnectedComponent] (c : G.ConnectedComponent) :
    (fun i ↦ if connectedComponentMk G i = c then 1 else 0) ∈
      LinearMap.ker (toLin' (lapMatrix ℝ G))

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

(fun i => if G.connectedComponentMk i = c then 1 else 0) ∈ LinearMap.ker (Matrix.toLin' (SimpleGraph.lapMatrix ℝ G))


@[simp]
theorem zero_ndinter (s : Multiset α) : ndinter 0 s = 0

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


theorem inl_eq_inr_of_epi_eq [Epi f] : (pushout.inl _ _ : _ ⟶ pushout f f) = pushout.inr _ _

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

CategoryTheory.Limits.pushout.inl f f = CategoryTheory.Limits.pushout.inr f f


lemma cpow_inv_two_im_eq_neg_sqrt {x : ℂ} (hx : x.im < 0) :
    (x ^ (2⁻¹ : ℂ)).im = -sqrt ((abs x - x.re) / 2)

(x ^ 2⁻¹).im = -√((Complex.abs x - x.re) / 2)


@[simp]
theorem rTensorOne_symm_apply (m : M) : M.rTensorOne.symm m = m ⊗ₜ[R] 1

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
{M : Submodule R S}
(m : ↥M)


@[simp]
theorem upperClosure_prod (s : Set α) (t : Set β) :
    upperClosure (s ×ˢ t) = upperClosure s ×ˢ upperClosure t

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(s : Set α)
(t : Set β)


theorem arctan_add {x y : ℝ} (h : x * y < 1) :
    arctan x + arctan y = arctan ((x + y) / (1 - x * y))

Real.arctan x + Real.arctan y = Real.arctan ((x + y) / (1 - x * y))


/-- The Haudorff edistances of `s` to `t` and of `t` to `s` coincide. -/
theorem hausdorffEdist_comm : hausdorffEdist s t = hausdorffEdist t s

{α : Type u}
[PseudoEMetricSpace α]
{s t : Set α}

EMetric.hausdorffEdist s t = EMetric.hausdorffEdist t s


theorem of_commute [MulOneClass G] {a : G} (h : ∀ a', Commute a a') (f : MonoidAlgebra k G) :
    Commute (of k G a) f

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[MulOneClass G]
{a : G}
(h : ∀ (a' : G), Commute a a')
(f : MonoidAlgebra k G)


@[to_additive (attr := simp)]
theorem smul_pure : f • pure b = f.map (· • b)

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

f +ᵥ pure b = Filter.map (fun x => x +ᵥ b) f


lemma liftAux_map' {Y Y' : C} (f : G.obj Y ⟶ X) (f' : G.obj Y' ⟶ X) {W : C}
    (a : W ⟶ Y) (b : W ⟶ Y') (w : G.map a ≫ f = G.map b ≫ f') :
    liftAux hF α s f ≫ F.map a.op = liftAux hF α s f' ≫ F.map b.op

{J : CategoryTheory.GrothendieckTopology C}

{K : CategoryTheory.GrothendieckTopology D}

(hF : CategoryTheory.Presheaf.IsSheaf J F)

(s : CategoryTheory.Limits.Multifork (S.index R))

CategoryTheory.RanIsSheafOfIsCocontinuous.liftAux hF α s f ≫ F.map a.op =
  CategoryTheory.RanIsSheafOfIsCocontinuous.liftAux hF α s f' ≫ F.map b.op


theorem const_apply (a : α) (b : β) : (const α b) a = b

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

↑(MeasureTheory.SimpleFunc.const α b) a = b


theorem ι_openEmbedding [HasLimits C] (i : D.J) : OpenEmbedding (𝖣.ι i).base

(D : AlgebraicGeometry.PresheafedSpace.GlueData C)


lemma zpow_self₀ (a : G₀) (n : ℤ) : Commute (a ^ n) a

{G₀ : Type u_3}
[GroupWithZero G₀]
(a : G₀)
(n : ℤ)


theorem ringExpChar.of_eq [Ring R] [IsDomain R] {q : ℕ} (h : ringExpChar R = q) : ExpChar R q

{R : Type u}
[Ring R]
[IsDomain R]
{q : ℕ}
(h : ringExpChar R = q)


@[simp]
theorem coe_ennreal_ne_bot (x : ℝ≥0∞) : (x : EReal) ≠ ⊥


lemma map_le_succ (i : ℕ) : map f i (i + 1) (by omega) = f i

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X : ℕ → C}
(f : (n : ℕ) → X n ⟶ X (n + 1))
(i : ℕ)

CategoryTheory.Functor.OfSequence.map f i (i + 1) ⋯ = f i


/-- **Taylor's theorem** with the Cauchy form of the remainder.

We assume that `f` is `n+1`-times continuously differentiable on the closed set `Icc x₀ x` and
`n+1`-times differentiable on the open set `Ioo x₀ x`. Then there exists an `x' ∈ Ioo x₀ x` such
that $$f(x) - (P_n f)(x₀, x) = \frac{f^{(n+1)}(x') (x - x')^n (x-x₀)}{n!},$$
where $P_n f$ denotes the Taylor polynomial of degree $n$ and $f^{(n+1)}$ is the $n+1$-th iterated
derivative. -/
theorem taylor_mean_remainder_cauchy {f : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x)
    (hf : ContDiffOn ℝ n f (Icc x₀ x))
    (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x)) :
    ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x =
      iteratedDerivWithin (n + 1) f (Icc x₀ x) x' * (x - x') ^ n / n ! * (x - x₀)

(hf : ContDiffOn ℝ (↑n) f (Set.Icc x₀ x))

(hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Set.Icc x₀ x)) (Set.Ioo x₀ x))

∃ x' ∈ Set.Ioo x₀ x,
  f x - taylorWithinEval f n (Set.Icc x₀ x) x₀ x =
    iteratedDerivWithin (n + 1) f (Set.Icc x₀ x) x' * (x - x') ^ n / ↑n ! * (x - x₀)


theorem isSolvable_of_comm {G : Type*} [hG : Group G] (h : ∀ a b : G, a * b = b * a) :
    IsSolvable G

{G : Type u_3}
[hG : Group G]
(h : ∀ (a b : G), a * b = b * a)


theorem upperSemicontinuousAt_iInf {f : ι → α → δ} (h : ∀ i, UpperSemicontinuousAt (f i) x) :
    UpperSemicontinuousAt (fun x' => ⨅ i, f i x') x

{f : ι → α → δ}

(h : ∀ (i : ι), UpperSemicontinuousAt (f i) x)


/-- Any matrix power can be computed as the sum of matrix powers less than `Fintype.card n`.

TODO: add the statement for negative powers phrased with `zpow`. -/
theorem pow_eq_aeval_mod_charpoly (M : Matrix n n R) (k : ℕ) :
    M ^ k = aeval M (X ^ k %ₘ M.charpoly)

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)
(k : ℕ)

M ^ k = (Polynomial.aeval M) (Polynomial.X ^ k %ₘ M.charpoly)


@[elab_as_elim]
protected theorem induction_on {C : (⨁ i, β i) → Prop} (x : ⨁ i, β i) (H_zero : C 0)
    (H_basic : ∀ (i : ι) (x : β i), C (of β i x))
    (H_plus : ∀ x y, C x → C y → C (x + y)) : C x

(H_basic : ∀ (i : ι) (x : β i), C ((DirectSum.of β i) x))

(H_plus : ∀ (x y : DirectSum ι fun i => β i), C x → C y → C (x + y))


theorem volume_apply {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] (I : Box ι) (x : E) :
    BoxAdditiveMap.volume I x = (∏ j, (I.upper j - I.lower j)) • x

{ι : Type u_1}
[Fintype ι]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(I : BoxIntegral.Box ι)
(x : E)

(BoxIntegral.BoxAdditiveMap.volume I) x = (∏ j : ι, (I.upper j - I.lower j)) • x


theorem monic_scaleRoots_iff {p : R[X]} (s : R) : Monic (scaleRoots p s) ↔ Monic p

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


/-- An exact pairing is a pair of objects `X Y : C` which admit
  a coevaluation and evaluation morphism which fulfill two triangle equalities. -/
class ExactPairing (X Y : C) where
  /-- Coevaluation of an exact pairing.

  Do not use directly. Use `ExactPairing.coevaluation` instead. -/
  coevaluation' : 𝟙_ C ⟶ X ⊗ Y
  /-- Evaluation of an exact pairing.

  Do not use directly. Use `ExactPairing.evaluation` instead. -/
  evaluation' : Y ⊗ X ⟶ 𝟙_ C
  coevaluation_evaluation' :
    Y ◁ coevaluation' ≫ (α_ _ _ _).inv ≫ evaluation' ▷ Y = (ρ_ Y).hom ≫ (λ_ Y).inv := by
    aesop_cat
  evaluation_coevaluation' :
    coevaluation' ▷ X ≫ (α_ _ _ _).hom ≫ X ◁ evaluation' = (λ_ X).hom ≫ (ρ_ X).inv := by
    aesop_cat

[self : CategoryTheory.ExactPairing X Y]

CategoryTheory.ExactPairing.coevaluation' ▷ X ≫ (α_ X Y X).hom ≫ X ◁ CategoryTheory.ExactPairing.evaluation' =
  (λ_ X).hom ≫ (ρ_ X).inv


theorem zero_descFactorial_succ (k : ℕ) : (0 : ℕ).descFactorial (k + 1) = 0


/-- The functor `Fin n ⥤ Fin (n + 1)` which sends `i` to `i.succ`. -/
@[simps]
def _root_.Fin.succFunctor (n : ℕ) : Fin n ⥤ Fin (n + 1)


theorem Summable.matrix_diagonal [DecidableEq n] {f : X → n → R} (hf : Summable f) :
    Summable fun x => diagonal (f x)

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
[DecidableEq n]
{f : X → n → R}
(hf : Summable f)


@[reassoc (attr := simp)]
theorem Sigma.ι_reindex_hom (b : β) :
    Sigma.ι (f ∘ ε) b ≫ (Sigma.reindex ε f).hom = Sigma.ι f (ε b)

[CategoryTheory.Limits.HasCoproduct (f ∘ ⇑ε)]

CategoryTheory.Limits.Sigma.ι (f ∘ ⇑ε) b ≫ (CategoryTheory.Limits.Sigma.reindex ε f).hom =
  CategoryTheory.Limits.Sigma.ι f (ε b)


@[to_additive]
theorem mem_coe {c : Con M} {x y} : (x, y) ∈ (↑c : Submonoid (M × M)) ↔ (x, y) ∈ c

{M : Type u_1}
[MulOneClass M]
{c : Con M}
{x y : M}


/-- Harmonic series is not unconditionally summable. -/
theorem not_summable_one_div_natCast : ¬Summable (fun n => 1 / n : ℕ → ℝ)


theorem IsLittleO.congr' (h : f₁ =o[l] g₁) (hf : f₁ =ᶠ[l] f₂) (hg : g₁ =ᶠ[l] g₂) : f₂ =o[l] g₂

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{l : Filter α}
{f₁ f₂ : α → E}
{g₁ g₂ : α → F}
(h : f₁ =o[l] g₁)
(hf : f₁ =ᶠ[l] f₂)
(hg : g₁ =ᶠ[l] g₂)


theorem map_coe_atBot_of_Ioo_subset (ha : s ⊆ Ioi a) (hs : ∀ b' > a, ∃ b > a, Ioo a b ⊆ s) :
    map ((↑) : s → α) atBot = 𝓝[>] a

(hs : ∀ b' > a, ∃ b > a, Set.Ioo a b ⊆ s)

Filter.map Subtype.val Filter.atBot = 𝓝[>] a


/-- The `0` element is not `M`-regular, on a non-trivial module. -/
theorem not_zero_iff : ¬IsSMulRegular M (0 : R) ↔ Nontrivial M

{R : Type u_1}
{M : Type u_3}
[MonoidWithZero R]
[Zero M]
[MulActionWithZero R M]


/-- One form of **Cramer's rule**. See `Matrix.mulVec_cramer` for a stronger form. -/
@[simp]
theorem det_smul_inv_mulVec_eq_cramer (A : Matrix n n α) (b : n → α) (h : IsUnit A.det) :
    A.det • A⁻¹ *ᵥ b = cramer A b

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(b : n → α)
(h : IsUnit A.det)


theorem pred_to_nat : ∀ n : Num, (pred n : ℕ) = Nat.pred n


@[simp] lemma induceHom_comp :
    (induceHom ψ ψtr).comp (induceHom φ φst) = induceHom (ψ.comp φ) (ψtr.comp φst)

{V : Type u_1}
{W : Type u_2}
{X : Type u_3}
{G : SimpleGraph V}
{G' : SimpleGraph W}
{G'' : SimpleGraph X}
{s : Set V}
{t : Set W}
{r : Set X}
(φ : G →g G')
(φst : Set.MapsTo (⇑φ) s t)
(ψ : G' →g G'')
(ψtr : Set.MapsTo (⇑ψ) t r)

(SimpleGraph.induceHom ψ ψtr).comp (SimpleGraph.induceHom φ φst) = SimpleGraph.induceHom (ψ.comp φ) ⋯


@[simp]
theorem one_apply (a : α) : (1 : CentroidHom α) a = a

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(a : α)


lemma W_eq_inverseImage_isomorphisms :
    J.W = (MorphismProperty.isomorphisms _).inverseImage (presheafToSheaf J A)

(J : CategoryTheory.GrothendieckTopology C)

J.W =
  (CategoryTheory.MorphismProperty.isomorphisms (CategoryTheory.Sheaf J A)).inverseImage
    (CategoryTheory.presheafToSheaf J A)


theorem exists_ne_zero_mem_ringOfIntegers_of_norm_le {B : ℝ}
    (h : (minkowskiBound K ↑1) ≤ volume (convexBodySum K B)) :
    ∃ a : 𝓞 K, a ≠ 0 ∧ |Algebra.norm ℚ (a : K)| ≤ (B / finrank ℚ K) ^ finrank ℚ K

(h :
  NumberField.mixedEmbedding.minkowskiBound K 1 ≤ MeasureTheory.volume (NumberField.mixedEmbedding.convexBodySum K B))

∃ a, a ≠ 0 ∧ ↑|(Algebra.norm ℚ) ↑a| ≤ (B / ↑(FiniteDimensional.finrank ℚ K)) ^ FiniteDimensional.finrank ℚ K


theorem HasFiniteFPowerSeriesAt.sub (hf : HasFiniteFPowerSeriesAt f pf x n)
    (hg : HasFiniteFPowerSeriesAt g pg x m) :
    HasFiniteFPowerSeriesAt (f - g) (pf - pg) x (max n m)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{pf pg : FormalMultilinearSeries 𝕜 E F}
{x : E}
{n m : ℕ}
(hf : HasFiniteFPowerSeriesAt f pf x n)
(hg : HasFiniteFPowerSeriesAt g pg x m)


/-- Given a free group basis of `G` over `ι`, there is a canonical bijection between maps from `ι`
to a group `H` and morphisms from `G` to `H`. -/
@[simps!]
def lift (b : FreeGroupBasis ι G) : (ι → H) ≃ (G →* H)

{ι : Type u_1}
{G : Type u_3}
{H : Type u_4}
[Group G]
[Group H]
(b : FreeGroupBasis ι G)

∀ (a : ι → H) (a_1 : G), (b.lift a) a_1 = (FreeGroup.lift a) (b.repr a_1)


@[simp] theorem coe_set_mk (S : Subsemiring R) (h) : ((⟨S, h⟩ : Subring R) : Set R) = S

(h : ∀ {x : R}, x ∈ S.carrier → -x ∈ S.carrier)

↑{ toSubsemiring := S, neg_mem' := h } = ↑S


theorem variance_def' [@IsProbabilityMeasure Ω _ ℙ] {X : Ω → ℝ} (hX : Memℒp X 2) :
    Var[X] = 𝔼[X ^ 2] - 𝔼[X] ^ 2

{Ω : Type u_1}
[MeasureTheory.MeasureSpace Ω]
[MeasureTheory.IsProbabilityMeasure ℙ]
{X : Ω → ℝ}
(hX : MeasureTheory.Memℒp X 2 ℙ)

ProbabilityTheory.variance X ℙ = (∫ (a : Ω), (X ^ 2) a) - (∫ (a : Ω), X a) ^ 2


@[simp]
lemma shiftIso_zero_hom_app (a : M) (X : C) :
    (F.shiftIso 0 a a (zero_add a)).hom.app X =
      (shift F a).map ((shiftFunctorZero C M).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]
(a : M)
(X : C)

(F.shiftIso 0 a a ⋯).hom.app X = (F.shift a).map ((CategoryTheory.shiftFunctorZero C M).hom.app X)


@[simp]
theorem iInf_toSubmodule {ι : Sort*} (S : ι → NonUnitalSubalgebra R A) :
    (⨅ i, S i).toSubmodule = ⨅ i, (S i).toSubmodule

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
{ι : Sort u_2}
(S : ι → NonUnitalSubalgebra R A)


theorem Convex.combo_interior_closure_mem_interior {s : Set E} (hs : Convex 𝕜 s) {x y : E}
    (hx : x ∈ interior s) (hy : y ∈ closure s) {a b : 𝕜} (ha : 0 < a) (hb : 0 ≤ b)
    (hab : a + b = 1) : a • x + b • y ∈ interior s

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
{x y : E}
(hx : x ∈ interior s)
(hy : y ∈ closure s)
{a b : 𝕜}
(ha : 0 < a)
(hb : 0 ≤ b)
(hab : a + b = 1)


/-- In the specific case of continuous alternating maps on spaces indexed by `Fin (n+1)`, where one
can build an element of `Π(i : Fin (n+1)), M i` using `cons`, one can express directly the
additivity of an alternating map along the first variable. -/
theorem cons_add (f : ContinuousAlternatingMap R M N (Fin (n + 1))) (m : Fin n → M) (x y : M) :
    f (Fin.cons (x + y) m) = f (Fin.cons x m) + f (Fin.cons y m)

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
{n : ℕ}
(f : M [⋀^Fin (n + 1)]→L[R] N)
(m : Fin n → M)
(x y : M)


@[simp, norm_cast]
theorem val_inv (x : selfAdjoint R) : ↑x⁻¹ = (x : R)⁻¹

{R : Type u_1}
[Field R]
[StarRing R]
(x : ↥(selfAdjoint R))

↑x⁻¹ = (↑x)⁻¹


theorem LinearIndependent.localization_localization {ι : Type*} {v : ι → A}
    (hv : LinearIndependent R v) : LinearIndependent Rₛ ((algebraMap A Aₛ) ∘ v)

[hA : IsLocalization (Algebra.algebraMapSubmonoid A S) Aₛ]

LinearIndependent Rₛ (⇑(algebraMap A Aₛ) ∘ v)


@[to_additive edist_eq_coe_nnnorm]
theorem edist_eq_coe_nnnorm' (x : E) : edist x 1 = (‖x‖₊ : ℝ≥0∞)

{E : Type u_6}
[SeminormedGroup E]
(x : E)


theorem fst_iSup [SupSet α] [SupSet β] (f : ι → α × β) : (iSup f).fst = ⨆ i, (f i).fst

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[SupSet α]
[SupSet β]
(f : ι → α × β)


lemma indicator_eq_sum_attach_single [AddCommMonoid M] {s : Finset α} (f : ∀ a ∈ s, M) :
    indicator s f = ∑ x ∈ s.attach, single ↑x (f x x.2)

{α : Type u_1}
{M : Type u_8}
[AddCommMonoid M]
{s : Finset α}
(f : (a : α) → a ∈ s → M)

Finsupp.indicator s f = ∑ x ∈ s.attach, Finsupp.single (↑x) (f ↑x ⋯)


@[simp]
theorem Equiv.Perm.decomposeFin_symm_apply_succ {n : ℕ} (e : Perm (Fin n)) (p : Fin (n + 1))
    (x : Fin n) : Equiv.Perm.decomposeFin.symm (p, e) x.succ = swap 0 p (e x).succ

{n : ℕ}
(e : Equiv.Perm (Fin n))
(p : Fin (n + 1))
(x : Fin n)

(Equiv.Perm.decomposeFin.symm (p, e)) x.succ = (Equiv.swap 0 p) (e x).succ


theorem isSplittingField_iff {p : F[X]} {K : IntermediateField F E} :
    p.IsSplittingField F K ↔ p.Splits (algebraMap F K) ∧ K = adjoin F (p.rootSet E)

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{p : F[X]}
{K : IntermediateField F E}

Polynomial.IsSplittingField F (↥K) p ↔
  Polynomial.Splits (algebraMap F ↥K) p ∧ K = IntermediateField.adjoin F (p.rootSet E)


@[simp] theorem algebraMap_rat_rat : algebraMap ℚ ℚ = RingHom.id ℚ


@[simp]
theorem ofIsCompl_right_apply (h : IsCompl p q) {φ : p →ₗ[R] F} {ψ : q →ₗ[R] F} (v : q) :
    ofIsCompl h φ ψ (v : E) = ψ v

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{p q : Submodule R E}
(h : IsCompl p q)
{φ : ↥p →ₗ[R] F}
{ψ : ↥q →ₗ[R] F}
(v : ↥q)


theorem equitableOn_iff :
    EquitableOn (s : Set α) f ↔
      ∀ a ∈ s, f a = (∑ i ∈ s, f i) / s.card ∨ f a = (∑ i ∈ s, f i) / s.card + 1

{α : Type u_1}
{s : Finset α}
{f : α → ℕ}

(↑s).EquitableOn f ↔ ∀ a ∈ s, f a = (∑ i ∈ s, f i) / s.card ∨ f a = (∑ i ∈ s, f i) / s.card + 1


lemma coyoneda_exact₂ {X : C} (f : X ⟶ T.obj₂) (hf : f ≫ T.mor₂ = 0) :
    ∃ (g : X ⟶ T.obj₁), f = g ≫ T.mor₁

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


/-- An upper estimate on the complex distance between two points in terms of the hyperbolic distance
and the imaginary part of one of the points. -/
theorem dist_coe_le (z w : ℍ) : dist (z : ℂ) w ≤ w.im * (Real.exp (dist z w) - 1)

dist ↑z ↑w ≤ w.im * (rexp (dist z w) - 1)


theorem Continuous.comp₂ {g : X × Y → Z} (hg : Continuous g) {e : W → X} (he : Continuous e)
    {f : W → Y} (hf : Continuous f) : Continuous fun w => g (e w, f w)

{X : Type u}
{Y : Type v}
{Z : Type u_1}
{W : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[TopologicalSpace W]
{g : X × Y → Z}
(hg : Continuous g)
{e : W → X}
(he : Continuous e)
{f : W → Y}
(hf : Continuous f)


@[simp]
theorem norm_neg (x : ℤ√d) : (-x).norm = x.norm


/-- Graph homomorphisms induce a contravariant function on subgraphs. -/
@[simps]
protected def comap {G' : SimpleGraph W} (f : G →g G') (H : G'.Subgraph) : G.Subgraph

{V : Type u}
{W : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G →g G')
(H : G'.Subgraph)
(u v : V)

(SimpleGraph.Subgraph.comap f H).Adj u v = (G.Adj u v ∧ H.Adj (f u) (f v))


theorem Specializes.map (h : x ⤳ y) (hf : Continuous f) : f x ⤳ f y

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


@[to_additive]
theorem map_eq_bot_iff {f : G →* N} : H.map f = ⊥ ↔ H ≤ f.ker

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


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

{α : Type u_2}
{β : Type u_3}
[InfSet α]
[InfSet β]
(f : sInfHom α β)


theorem get_extract_loop_lt_aux (as bs : Array α) (size start : Nat) (hlt : i < bs.size) :
    i < (extract.loop as size start bs).size

{α : Type u_1}
{i : Nat}
(as bs : Array α)
(size start : Nat)
(hlt : i < bs.size)

i < (Array.extract.loop as size start bs).size


theorem finStronglyMeasurable_mk (hf : AEFinStronglyMeasurable f μ) :
    FinStronglyMeasurable (hf.mk f) μ

(hf : MeasureTheory.AEFinStronglyMeasurable f μ)

MeasureTheory.FinStronglyMeasurable (MeasureTheory.AEFinStronglyMeasurable.mk f hf) μ


lemma mono_right (h : Absorbs M s t₁) (ht : t₂ ⊆ t₁) : Absorbs M s t₂

{M : Type u_1}
{α : Type u_2}
[Bornology M]
[SMul M α]
{s t₁ t₂ : Set α}
(h : Absorbs M s t₁)
(ht : t₂ ⊆ t₁)


protected theorem inv_inl (r : R) :
    (inl r)⁻¹ = (inl (r⁻¹ : R) : tsze R M)

{R : Type u}
{M : Type v}
[DivisionSemiring R]
[AddCommGroup M]
[Module Rᵐᵒᵖ M]
[Module R M]
(r : R)

(TrivSqZeroExt.inl r)⁻¹ = TrivSqZeroExt.inl r⁻¹


theorem toList_asString (l : List Char) : l.asString.toList = l


theorem Measure.toOuterMeasure_injective [MeasurableSpace α] :
    Injective (toOuterMeasure : Measure α → OuterMeasure α)


/-- Let the group `G` be the union of finitely many left cosets `g i • H i`.
If the sum of the inverses of the indexes of the subgroups `H i` is equal to 1,
then the cosets of the subgroups of finite index are pairwise disjoint. -/
@[to_additive]
theorem pairwiseDisjoint_leftCoset_cover_of_sum_inv_index_eq_one
    [DecidablePred (FiniteIndex : Subgroup G → Prop)] :
    ∑ i ∈ s, ((H i).index : ℚ)⁻¹ = 1 →
      Set.PairwiseDisjoint (s.filter (fun i => (H i).FiniteIndex))
        (fun i ↦ g i • (H i : Set G))

(hcovers : ⋃ i ∈ s, g i • ↑(H i) = Set.univ)

∑ i ∈ s, (↑(H i).index)⁻¹ = 1 → (↑(Finset.filter (fun i => (H i).FiniteIndex) s)).PairwiseDisjoint fun i => g i • ↑(H i)


@[simp, norm_cast, rclike_simps]
theorem real_smul_ofReal (r x : ℝ) : r • (x : K) = (r : K) * (x : K)


lemma map_negPolynomial :
    (W.map f).toAffine.negPolynomial = W.negPolynomial.map (mapRingHom f)

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type v}
[CommRing S]
(f : R →+* S)

(WeierstrassCurve.map W f).toAffine.negPolynomial = Polynomial.map (Polynomial.mapRingHom f) W.negPolynomial


lemma isTriangulated_of_iso {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) [F₁.CommShift ℤ] [F₂.CommShift ℤ]
    [NatTrans.CommShift e.hom ℤ] [F₁.IsTriangulated] : F₂.IsTriangulated

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


@[to_additive (attr := simp)]
theorem quot_mk_eq_coe {M : Type*} [Mul M] (c : Con M) (x : M) : Quot.mk c x = (x : c.Quotient)

{M : Type u_4}
[Mul M]
(c : Con M)
(x : M)


/-- The red and the blue arrows in ![this diagram](https://i.imgur.com/mBzV1Rx.png) commute. -/
theorem opensImagePreimageMap_app (i j k : D.J) (U : Opens (D.U i).carrier) :
    D.opensImagePreimageMap i j U ≫ (D.f j k).c.app _ =
      ((π₁ j, i, k) ≫ D.t j i ≫ D.f i j).c.app (op U) ≫
        (π₂⁻¹ j, i, k) (unop _) ≫
          (D.V (j, k)).presheaf.map (eqToHom (opensImagePreimageMap_app' D i j k U).choose)

(D : AlgebraicGeometry.PresheafedSpace.GlueData C)

D.opensImagePreimageMap i j U ≫
    (D.f j k).c.app (Opposite.op ((TopologicalSpace.Opens.map (D.ι j).base).obj (⋯.functor.obj U))) =
  (CategoryTheory.Limits.pullback.fst (D.f j i) (D.f j k) ≫ D.t j i ≫ D.f i j).c.app (Opposite.op U) ≫
    AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.invApp (CategoryTheory.Limits.pullback.snd (D.f j i) (D.f j k))
        (Opposite.unop
          (Opposite.op
            ((TopologicalSpace.Opens.map
                    (CategoryTheory.Limits.pullback.fst (D.f j i) (D.f j k) ≫ D.t j i ≫ D.f i j).base).toPrefunctor.1
              (Opposite.unop (Opposite.op U))))) ≫
      (D.V (j, k)).presheaf.map (CategoryTheory.eqToHom ⋯)


theorem oadd_mul_nfBelow {e₁ n₁ a₁ b₁} (h₁ : NFBelow (oadd e₁ n₁ a₁) b₁) :
    ∀ {o₂ b₂}, NFBelow o₂ b₂ → NFBelow (oadd e₁ n₁ a₁ * o₂) (repr e₁ + b₂)

{e₁ : ONote}
{n₁ : ℕ+}
{a₁ : ONote}
{b₁ : Ordinal.{0}}
(h₁ : (e₁.oadd n₁ a₁).NFBelow b₁)
{o₂ : ONote}
{b₂ : Ordinal.{0}}

o₂.NFBelow b₂ → (e₁.oadd n₁ a₁ * o₂).NFBelow (e₁.repr + b₂)


@[simp] theorem replicate_sublist_replicate {m n} (a : α) :
    replicate m a <+ replicate n a ↔ m ≤ n

List.replicate m a <+ List.replicate n a ↔ m ≤ n


@[simp]
theorem subsingleton_univ_iff : (univ : Set α).Subsingleton ↔ Subsingleton α


theorem toIocMod_le_right (a b : α) : toIocMod hp a b ≤ a + p

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


@[to_additive]
theorem index_comap_of_surjective {f : G' →* G} (hf : Function.Surjective f) :
    (H.comap f).index = H.index

{G : Type u_1}
{G' : Type u_2}
[AddGroup G]
[AddGroup G']
(H : AddSubgroup G)
{f : G' →+ G}
(hf : Function.Surjective ⇑f)


theorem countable_iff_lt_aleph_one {α : Type*} (s : Set α) : s.Countable ↔ #s < aleph 1


lemma exact_iff_isZero_homology [S.HasHomology] :
    S.Exact ↔ IsZero S.homology

S.Exact ↔ CategoryTheory.Limits.IsZero S.homology


theorem Finset.Nonempty.csInf_eq_min' {s : Finset α} (h : s.Nonempty) : sInf ↑s = s.min' h

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
{s : Finset α}
(h : s.Nonempty)


@[simp, norm_cast]
lemma coe_algebraMap (r : R) : (algebraMap R s r : A) = algebraMap R A r

{S : Type u_1}
{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[SetLike S A]
[SubsemiringClass S A]
[hSR : SMulMemClass S R A]
(s : S)
(r : R)

↑((algebraMap R ↥s) r) = (algebraMap R A) r


theorem commensurable_conj {H K : Subgroup G} (g : ConjAct G) :
    Commensurable H K ↔ Commensurable (g • H) (g • K)

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


theorem smul_re (a : ℤ) (b : ℤ√d) : (↑a * b).re = a * b.re


protected theorem polarCoord_apply (a : ℂ) :
    Complex.polarCoord a = (Complex.abs a, Complex.arg a)

↑Complex.polarCoord a = (Complex.abs a, a.arg)


theorem toMatrix_transpose_apply : (e.toMatrix v)ᵀ j = e.repr (v j)

{ι : Type u_1}
{ι' : Type u_2}
{R : Type u_5}
{M : Type u_6}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(e : Basis ι R M)
(v : ι' → M)
(j : ι')


/-- A functorial version of `SimplicialObject.Augmented.rightOp`. -/
@[simps]
def simplicialToCosimplicialAugmented :
    (SimplicialObject.Augmented C)ᵒᵖ ⥤ CosimplicialObject.Augmented Cᵒᵖ

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

∀ {X Y : (CategoryTheory.SimplicialObject.Augmented C)ᵒᵖ} (f : X ⟶ Y),
  ((CategoryTheory.simplicialToCosimplicialAugmented C).map f).right = CategoryTheory.NatTrans.rightOp f.unop.left


/-- Bijection between algebra equivalences and algebra homomorphisms -/
@[simps]
noncomputable def algEquivEquivAlgHom [Algebra.IsAlgebraic K L] :
    (L ≃ₐ[K] L) ≃* (L →ₐ[K] L)

(K : Type u_1)
(L : Type u_2)
[CommRing K]
[Field L]
[Algebra K L]
[NoZeroSMulDivisors K L]
[Algebra.IsAlgebraic K L]
(ϕ : L →ₐ[K] L)

(Algebra.IsAlgebraic.algEquivEquivAlgHom K L).symm ϕ = AlgEquiv.ofBijective ϕ ⋯


/-- A semiring homomorphism is a monoid homomorphism. -/
theorem to_isMonoidHom (hf : IsSemiringHom f) : IsMonoidHom f

{α : Type u}
{β : Type v}
[Semiring α]
[Semiring β]
{f : α → β}
(hf : IsSemiringHom f)


theorem _root_.Orthonormal.linearIsometryEquiv_symm_apply_single_one (h i) :
    (hv.isHilbertSum h).linearIsometryEquiv.symm (lp.single 2 i 1) = v i

(h : ⊤ ≤ (Submodule.span 𝕜 (Set.range v)).topologicalClosure)

⋯.linearIsometryEquiv.symm (lp.single 2 i 1) = v i


theorem threeAPFree_image_sphere :
    ThreeAPFree ((sphere n d k).image (map (2 * d - 1)) : Set ℕ)

ThreeAPFree ↑(Finset.image (⇑(Behrend.map (2 * d - 1))) (Behrend.sphere n d k))


@[simp] theorem coe_rTensor : rTensor M f = (f : N →ₗ[R] P).rTensor M

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

↑(LinearEquiv.rTensor M f) = LinearMap.rTensor M ↑f


@[simp]
theorem symm_mk (f f') (h₁ h₂ h₃ h₄ h₅ h₆) :
    (⟨⟨⟨f, f', h₁, h₂⟩, h₃, h₄⟩, h₅, h₆⟩ : A ≃⋆ₐ[R] B).symm =
      { symm_mk.aux f f' h₁ h₂ h₃ h₄ h₅ h₆ with
        toFun := f'
        invFun := f }

(h₃ :
  ∀ (x y : A),
    { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂ }.toFun (x * y) =
      { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂ }.toFun x *
        { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂ }.toFun y)

(h₄ :
  ∀ (x y : A),
    { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂ }.toFun (x + y) =
      { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂ }.toFun x +
        { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂ }.toFun y)

(h₅ :
  ∀ (a : A),
    { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄ }.toFun (star a) =
      star ({ toFun := f, invFun := f', left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄ }.toFun a))

(h₆ :
  ∀ (r : R) (a : A),
    { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄ }.toFun (r • a) =
      r • { toFun := f, invFun := f', left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄ }.toFun a)

{ toFun := f, invFun := f', left_inv := h₁, right_inv := h₂, map_mul' := h₃, map_add' := h₄, map_star' := h₅,
      map_smul' := h₆ }.symm =
  let __src := StarAlgEquiv.symm_mk.aux f f' h₁ h₂ h₃ h₄ h₅ h₆;
  { toFun := f', invFun := f, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯, map_star' := ⋯,
    map_smul' := ⋯ }


protected theorem coe_add (x y : S) : (↑(x + y) : A) = ↑x + ↑y

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
(S : NonUnitalStarSubalgebra R A)
(x y : ↥S)


@[simp]
theorem ofComponents.hom_app (app : ∀ X : C, F.obj X ≅ G.obj X) (naturality) (unit) (tensor) (X) :
    (ofComponents app naturality unit tensor).hom.app X = (app X).hom

{F G : CategoryTheory.LaxMonoidalFunctor C D}

(naturality : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f)

(tensor :
  ∀ (X Y : C),
    F.μ X Y ≫ (app (CategoryTheory.MonoidalCategory.tensorObj X Y)).hom =
      CategoryTheory.MonoidalCategory.tensorHom (app X).hom (app Y).hom ≫ G.μ X Y)

(CategoryTheory.MonoidalNatIso.ofComponents app naturality unit tensor).hom.app X = (app X).hom


theorem isClosable_iff_exists_closed_extension {f : E →ₗ.[R] F} :
    f.IsClosable ↔ ∃ g : E →ₗ.[R] F, g.IsClosed ∧ f ≤ g

{R : Type u_1}
{E : Type u_2}
{F : Type u_3}
[CommRing R]
[AddCommGroup E]
[AddCommGroup F]
[Module R E]
[Module R F]
[TopologicalSpace E]
[TopologicalSpace F]
[ContinuousAdd E]
[ContinuousAdd F]
[TopologicalSpace R]
[ContinuousSMul R E]
[ContinuousSMul R F]
{f : E →ₗ.[R] F}


theorem associated_map_mk {f : Associates α →* α} (hinv : Function.RightInverse f Associates.mk)
    (a : α) : a ~ᵤ f (Associates.mk a)

(hinv : Function.RightInverse (⇑f) Associates.mk)


/--
Given a limit cone for the family `f : J → (X ⟶ Y)`, for any `Z`, morphisms from `Z` to its point
are in bijection with morphisms `h : Z ⟶ X` such that `∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂`.
Further, this bijection is natural in `Z`: see `Trident.Limits.homIso_natural`.
-/
@[simps]
def Trident.IsLimit.homIso [Nonempty J] {t : Trident f} (ht : IsLimit t) (Z : C) :
    (Z ⟶ t.pt) ≃ { h : Z ⟶ X // ∀ j₁ j₂, h ≫ f j₁ = h ≫ f j₂ }

(h : { h // ∀ (j₁ j₂ : J), CategoryTheory.CategoryStruct.comp h (f j₁) = CategoryTheory.CategoryStruct.comp h (f j₂) })

(CategoryTheory.Limits.Trident.IsLimit.homIso ht Z).symm h = ↑(CategoryTheory.Limits.Trident.IsLimit.lift' ht ↑h ⋯)


@[simp]
theorem mem_genEigenspace (f : End R M) (μ : R) (k : ℕ) (m : M) :
    m ∈ f.genEigenspace μ k ↔ ((f - μ • (1 : End R M)) ^ k) m = 0

{R : Type v}
{M : Type w}
[CommRing R]
[AddCommGroup M]
[Module R M]
(f : Module.End R M)
(μ : R)
(k : ℕ)
(m : M)

m ∈ (f.genEigenspace μ) k ↔ ((f - μ • 1) ^ k) m = 0


theorem isCoatom_of_map_top_of_image [OrderTop α] [OrderTop β] (f : β ↪o α) (htop : f ⊤ = ⊤)
    {b : β} (hb : IsCoatom (f b)) : IsCoatom b

{α : Type u_2}
{β : Type u_3}
[PartialOrder α]
[PartialOrder β]
[OrderTop α]
[OrderTop β]
(f : β ↪o α)
(htop : f ⊤ = ⊤)
{b : β}
(hb : IsCoatom (f b))


@[simp]
theorem comp_one : p.comp 1 = C (p.eval 1)

p.comp 1 = Polynomial.C (Polynomial.eval 1 p)


/-- The image of an element of finite order has finite order. -/
@[to_additive "The image of an element of finite additive order has finite additive order."]
theorem MonoidHom.isOfFinOrder [Monoid H] (f : G →* H) {x : G} (h : IsOfFinOrder x) :
    IsOfFinOrder <| f x

{G : Type u_1}
{H : Type u_2}
[Monoid G]
[Monoid H]
(f : G →* H)
{x : G}
(h : IsOfFinOrder x)


lemma isZero₂_of_isIso₃ (h : IsIso T.mor₃) : IsZero T.obj₂

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


protected theorem le_add_right (h : μ ≤ ν) : μ ≤ ν + ν'

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν ν' : MeasureTheory.Measure α}
(h : μ ≤ ν)


theorem IsPrime.mem_or_mem {I : Ideal α} (hI : I.IsPrime) {x y : α} : x * y ∈ I → x ∈ I ∨ y ∈ I

{α : Type u}
[Semiring α]
{I : Ideal α}
(hI : I.IsPrime)
{x y : α}


@[to_additive (attr := simp)]
theorem comp_one [One β] (x : β → γ) : x ∘ (1 : α → β) = const α (x 1)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Zero β]
(x : β → γ)


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


@[simp]
lemma LinearEquiv.extendScalarsOfSurjective_symm (f : M ≃ₗ[R] N) :
    (f.extendScalarsOfSurjective h).symm = f.symm.extendScalarsOfSurjective h

(h : Function.Surjective ⇑(algebraMap R S))

(LinearEquiv.extendScalarsOfSurjective h f).symm = LinearEquiv.extendScalarsOfSurjective h f.symm


@[simp]
theorem toWithTop_lt {x y : PartENat} [Decidable x.Dom] [Decidable y.Dom] :
    toWithTop x < toWithTop y ↔ x < y


@[to_additive]
theorem prehaar_mono {K₀ : PositiveCompacts G} {U : Set G} (hU : (interior U).Nonempty)
    {K₁ K₂ : Compacts G} (h : (K₁ : Set G) ⊆ K₂.1) :
    prehaar (K₀ : Set G) U K₁ ≤ prehaar (K₀ : Set G) U K₂

{K₀ : TopologicalSpace.PositiveCompacts G}

MeasureTheory.Measure.haar.prehaar (↑K₀) U K₁ ≤ MeasureTheory.Measure.haar.prehaar (↑K₀) U K₂


@[simp]
theorem cof_eq_one_iff_is_succ {o} : cof.{u} o = 1 ↔ ∃ a, o = succ a


theorem derivWithin_inv (x_ne_zero : x ≠ 0) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (fun x => x⁻¹) s x = -(x ^ 2)⁻¹

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
(x_ne_zero : x ≠ 0)
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem addVal_mul {a b : R} :
    addVal R (a * b) = addVal R a + addVal R b

{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]
{a b : R}

(DiscreteValuationRing.addVal R) (a * b) = (DiscreteValuationRing.addVal R) a + (DiscreteValuationRing.addVal R) b


theorem IsIntegral.map_of_comp_eq {R S T U : Type*} [CommRing R] [Ring S]
    [CommRing T] [Ring U] [Algebra R S] [Algebra T U] (φ : R →+* T) (ψ : S →+* U)
    (h : (algebraMap T U).comp φ = ψ.comp (algebraMap R S)) {a : S} (ha : IsIntegral R a) :
    IsIntegral T (ψ a)


theorem ext_iff : Q = Q' ↔ ∀ x, Q x = Q' x

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{Q Q' : QuadraticMap R M N}


theorem Antivary.dual_right : Antivary f g → Monovary f (toDual ∘ g)

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}

Antivary f g → Monovary f (⇑OrderDual.toDual ∘ g)


lemma wellOrderSucc_le {a b : α} (ha : a < b) : wellOrderSucc a ≤ b

{α : Type u_1}
[LinearOrder α]
[IsWellOrder α fun x x_1 => x < x_1]
{a b : α}
(ha : a < b)


lemma unitsMap_comp {d : ℕ} (hm : n ∣ m) (hd : m ∣ d) :
    (unitsMap hm).comp (unitsMap hd) = unitsMap (dvd_trans hm hd)

(ZMod.unitsMap hm).comp (ZMod.unitsMap hd) = ZMod.unitsMap ⋯


@[simp]
theorem map_subtype_coe_factors' {a : α} :
    (factors' a).map (↑) = (factors a).map Associates.mk

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{a : α}

Multiset.map Subtype.val (Associates.factors' a) = Multiset.map Associates.mk (UniqueFactorizationMonoid.factors a)


theorem mem_or_inv_mem (x : K) : x ∈ A ∨ x⁻¹ ∈ A

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

x ∈ A ∨ x⁻¹ ∈ A


theorem evariance_eq_lintegral_ofReal (X : Ω → ℝ) (μ : Measure Ω) :
    evariance X μ = ∫⁻ ω, ENNReal.ofReal ((X ω - μ[X]) ^ 2) ∂μ

{Ω : Type u_1}
{m : MeasurableSpace Ω}
(X : Ω → ℝ)
(μ : MeasureTheory.Measure Ω)

ProbabilityTheory.evariance X μ = ∫⁻ (ω : Ω), ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2) ∂μ


@[simp]
theorem prodMap_comp_comp (f₁ : α →. β) (f₂ : β →. γ) (g₁ : δ →. ε) (g₂ : ε →. ι) :
    (f₂.comp f₁).prodMap (g₂.comp g₁) = (f₂.prodMap g₂).comp (f₁.prodMap g₁)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{ε : Type u_5}
{ι : Type u_6}
(f₁ : α →. β)
(f₂ : β →. γ)
(g₁ : δ →. ε)
(g₂ : ε →. ι)


/-- A complete lattice is said to be compactly generated if any
element is the `sSup` of compact elements. -/
class IsCompactlyGenerated (α : Type*) [CompleteLattice α] : Prop where
  /-- In a compactly generated complete lattice,
    every element is the `sSup` of some set of compact elements. -/
  exists_sSup_eq : ∀ x : α, ∃ s : Set α, (∀ x ∈ s, CompleteLattice.IsCompactElement x) ∧ sSup s = x

{α : Type u_3}
[CompleteLattice α]
[self : IsCompactlyGenerated α]
(x : α)

∃ s, (∀ x ∈ s, CompleteLattice.IsCompactElement x) ∧ sSup s = x


/-- A non-quantitative version of Markov inequality for integrable functions: the measure of points
where `‖f x‖ ≥ ε` is finite for all positive `ε`. -/
theorem Integrable.measure_norm_ge_lt_top {f : α → β} (hf : Integrable f μ) {ε : ℝ} (hε : 0 < ε) :
    μ { x | ε ≤ ‖f x‖ } < ∞

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : α → β}
(hf : MeasureTheory.Integrable f μ)
{ε : ℝ}
(hε : 0 < ε)


theorem setToL1S_add (T : Set α → E →L[ℝ] F) (h_zero : ∀ s, MeasurableSet s → μ s = 0 → T s = 0)
    (h_add : FinMeasAdditive μ T) (f g : α →₁ₛ[μ] E) :
    setToL1S T (f + g) = setToL1S T f + setToL1S T g

(h_zero : ∀ (s : Set α), MeasurableSet s → μ s = 0 → T s = 0)

(h_add : MeasureTheory.FinMeasAdditive μ T)

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

MeasureTheory.L1.SimpleFunc.setToL1S T (f + g) =
  MeasureTheory.L1.SimpleFunc.setToL1S T f + MeasureTheory.L1.SimpleFunc.setToL1S T g


theorem insert_sigma : (insert i s).sigma t = Sigma.mk i '' t i ∪ s.sigma t

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


theorem IsMaxFilter.min (hf : IsMaxFilter f l a) (hg : IsMaxFilter g l a) :
    IsMaxFilter (fun x => min (f x) (g x)) l a

{α : Type u}
{β : Type v}
[LinearOrder β]
{f g : α → β}
{a : α}
{l : Filter α}
(hf : IsMaxFilter f l a)
(hg : IsMaxFilter g l a)


protected theorem one_le_two_pow : 1 ≤ 2 ^ n


protected theorem sub_mul (a b c : Int) : (a - b) * c = a * c - b * c


/-- The set of sums of two squares is closed under multiplication in any commutative ring.
See also `sq_add_sq_mul_sq_add_sq`. -/
theorem sq_add_sq_mul {R} [CommRing R] {a b x y u v : R} (ha : a = x ^ 2 + y ^ 2)
    (hb : b = u ^ 2 + v ^ 2) : ∃ r s : R, a * b = r ^ 2 + s ^ 2

{R : Type u_1}
[CommRing R]
{a b x y u v : R}
(ha : a = x ^ 2 + y ^ 2)
(hb : b = u ^ 2 + v ^ 2)


/-- If `f` tends to negative infinity along a nontrivial filter `l`, then
`fun x ↦ r * f x` tends to negative infinity if and only if `0 < r. `-/
theorem tendsto_const_mul_atBot_iff_pos [NeBot l] (h : Tendsto f l atBot) :
    Tendsto (fun x => r * f x) l atBot ↔ 0 < r

{α : Type u_3}
{β : Type u_4}
[LinearOrderedField α]
{l : Filter β}
{f : β → α}
{r : α}
[l.NeBot]
(h : Filter.Tendsto f l Filter.atBot)

Filter.Tendsto (fun x => r * f x) l Filter.atBot ↔ 0 < r


@[simp] theorem cons_injective {a : α} : Injective (cons a)


/-- `Multicofork.ofSigmaCofork` as a functor. -/
@[simps]
noncomputable def ofSigmaCoforkFunctor : Cofork I.fstSigmaMap I.sndSigmaMap ⥤ Multicofork I

(I : CategoryTheory.Limits.MultispanIndex C)

{K₁ K₂ : CategoryTheory.Limits.Cofork I.fstSigmaMap I.sndSigmaMap}

(I.ofSigmaCoforkFunctor.map f).hom = f.hom


@[to_additive]
theorem hasProd_subtype_iff_mulIndicator {s : Set β} :
    HasProd (f ∘ (↑) : s → α) a ↔ HasProd (s.mulIndicator f) a

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a : α}
{s : Set β}

HasSum (f ∘ Subtype.val) a ↔ HasSum (s.indicator f) a


@[simp]
theorem getLast?_cons_cons (a b : α) (l : List α) :
    getLast? (a :: b :: l) = getLast? (b :: l)

(a :: b :: l).getLast? = (b :: l).getLast?


/-- A global integral curve is injective xor periodic with positive period. -/
lemma IsIntegralCurve.periodic_xor_injective [BoundarylessManifold I M]
    (hγ : IsIntegralCurve γ v)
    (hv : ContMDiff I I.tangent 1 (fun x => (⟨x, v x⟩ : TangentBundle I M))) :
    Xor' (∃ T > 0, Periodic γ T) (Injective γ)

(hv : ContMDiff I I.tangent 1 fun x => { proj := x, snd := v x })

Xor' (∃ T > 0, Function.Periodic γ T) (Function.Injective γ)


@[simp]
theorem support_restriction (p : R[X]) : support (restriction p) = support p


/-- Coerce continuous linear maps to functions. -/
--instance toFun' : CoeFun (M₁ →SL[σ₁₂] M₂) fun _ => M₁ → M₂ := ⟨DFunLike.coe⟩

-- porting note (#10618): was `simp`, now `simp only` proves it
theorem coe_mk (f : M₁ →ₛₗ[σ₁₂] M₂) (h) : (mk f h : M₁ →ₛₗ[σ₁₂] M₂) = f

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(f : M₁ →ₛₗ[σ₁₂] M₂)
(h : Continuous f.toFun)


/-- The `d`th coefficient of a power of a multivariate power series
is the sum, indexed by `finsuppAntidiag (Finset.range n) d`, of products of coefficients  -/
theorem coeff_pow [DecidableEq σ] (f : MvPowerSeries σ R) {n : ℕ} (d : σ →₀ ℕ) :
    coeff R d (f ^ n) =
      ∑ l in finsuppAntidiag (Finset.range n) d,
        ∏ i in Finset.range n, coeff R (l i) f

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
[DecidableEq σ]
(f : MvPowerSeries σ R)
{n : ℕ}
(d : σ →₀ ℕ)

(MvPowerSeries.coeff R d) (f ^ n) =
  ∑ l ∈ (Finset.range n).finsuppAntidiag d, ∏ i ∈ Finset.range n, (MvPowerSeries.coeff R (l i)) f


/-- `legendreSym p a = -1` iff `a` is a nonsquare mod `p`. -/
theorem eq_neg_one_iff {a : ℤ} : legendreSym p a = -1 ↔ ¬IsSquare (a : ZMod p)


/-- If `S` is order-connected and contains two points `x < y`, then `S` is a punctured right
neighbourhood of `x`. -/
lemma mem_nhdsWithin_Ioi [NoMaxOrder α] {S : Set α} (hS : OrdConnected S)
    {x y : α} (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) :
    S ∈ 𝓝[>] x

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[NoMaxOrder α]
{S : Set α}
(hS : S.OrdConnected)
{x y : α}
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)


theorem nhds_eq_update : (𝓝 : Γ₀ → Filter Γ₀) = update pure 0 (⨅ γ ≠ 0, 𝓟 (Iio γ))

{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]

𝓝 = Function.update pure 0 (⨅ γ, ⨅ (_ : γ ≠ 0), 𝓟 (Set.Iio γ))


/-- Predicate for semiring homomorphisms (deprecated -- use the bundled `RingHom` version). -/
structure IsSemiringHom {α : Type u} {β : Type v} [Semiring α] [Semiring β] (f : α → β) : Prop where
  /-- The proposition that `f` preserves the additive identity. -/
  map_zero : f 0 = 0
  /-- The proposition that `f` preserves the multiplicative identity. -/
  map_one : f 1 = 1
  /-- The proposition that `f` preserves addition. -/
  map_add : ∀ x y, f (x + y) = f x + f y
  /-- The proposition that `f` preserves multiplication. -/
  map_mul : ∀ x y, f (x * y) = f x * f y

{α : Type u}
{β : Type v}
[Semiring α]
[Semiring β]
{f : α → β}
(self : IsSemiringHom f)
(x y : α)


theorem derivWithin_div_const (hc : DifferentiableWithinAt 𝕜 c s x)
    (d : 𝕜') (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (fun x => c x / d) s x = derivWithin c s x / d

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{c : 𝕜 → 𝕜'}
(hc : DifferentiableWithinAt 𝕜 c s x)
(d : 𝕜')
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem NF.snd {e n a} (h : NF (oadd e n a)) : NF a

{e : ONote}
{n : ℕ+}
{a : ONote}
(h : (e.oadd n a).NF)


theorem sdiff_ssubset (h : t ⊆ s) (ht : t.Nonempty) : s \ t ⊂ s

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
(h : t ⊆ s)
(ht : t.Nonempty)


theorem integral_cexp_neg_mul_sum_add {ι : Type*} [Fintype ι] (hb : 0 < b.re) (c : ι → ℂ) :
    ∫ v : ι → ℝ, cexp (- b * ∑ i, (v i : ℂ) ^ 2 + ∑ i, c i * v i)
      = (π / b) ^ (Fintype.card ι / 2 : ℂ) * cexp ((∑ i, c i ^ 2) / (4 * b))

{b : ℂ}
{ι : Type u_2}
[Fintype ι]
(hb : 0 < b.re)
(c : ι → ℂ)

∫ (v : ι → ℝ), cexp (-b * ∑ i : ι, ↑(v i) ^ 2 + ∑ i : ι, c i * ↑(v i)) =
  (↑π / b) ^ (↑(Fintype.card ι) / 2) * cexp ((∑ i : ι, c i ^ 2) / (4 * b))


/--
The equivalence between `IrreducibleCloseds α` and `{x : Set α // IsIrreducible x ∧ IsClosed x }`.
-/
@[simps apply symm_apply]
def equivSubtype : IrreducibleCloseds α ≃ { x : Set α // IsIrreducible x ∧ IsClosed x }

(a : TopologicalSpace.IrreducibleCloseds α)

TopologicalSpace.IrreducibleCloseds.equivSubtype a = ⟨a.carrier, ⋯⟩


/-- The image under a monotone function of a set which is bounded above is bounded above. See also
`BddAbove.image2`. -/
theorem map_bddAbove : BddAbove s → BddAbove (f '' s)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(Hf : Monotone f)
{s : Set α}


theorem Small.trans_univLE.{u, v} (α : Type w) [hα : Small.{u} α] [h : UnivLE.{u, v}] :
    Small.{v} α

(α : Type w)
[hα : Small.{u, w} α]
[h : UnivLE.{u, v}]


/-- For a pair of functors `L : C ⥤ D`, `R : D ⥤ C`, an adjunction `h : L ⊣ R` induces a comonad on
the category `D`.
-/
-- Porting note: Specifying simps projections manually to match mathlib3 behavior.
@[simps coe ε δ]
def toComonad (h : L ⊣ R) : Comonad D

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

h.toComonad.δ = CategoryTheory.whiskerRight (CategoryTheory.whiskerLeft R h.unit) L


theorem K'.elim_main (a b c d) : K'.elim a b c d K'.main = a

Turing.PartrecToTM2.K'.elim a b c d Turing.PartrecToTM2.K'.main = a


@[simp]
lemma disjoint_partialSups_left [DistribLattice α] [OrderBot α] {f : ℕ → α} {n : ℕ} {x : α} :
    Disjoint (partialSups f n) x ↔ ∀ k ≤ n, Disjoint (f k) x

{α : Type u_1}
[DistribLattice α]
[OrderBot α]
{f : ℕ → α}
{n : ℕ}
{x : α}

Disjoint ((partialSups f) n) x ↔ ∀ k ≤ n, Disjoint (f k) x


/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : p.fst ∈ slitPlane) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p

{p : ℂ × ℂ}
(hp_fst : p.1 ∈ Complex.slitPlane)


@[to_additive (attr := simp)]
theorem isUnit_iff_singleton : IsUnit s ↔ ∃ a, s = {a}


theorem dist_le_distortion_mul (I : Box ι) (i : ι) :
    dist I.lower I.upper ≤ I.distortion * (I.upper i - I.lower i)

{ι : Type u_1}
[Fintype ι]
(I : BoxIntegral.Box ι)
(i : ι)

dist I.lower I.upper ≤ ↑I.distortion * (I.upper i - I.lower i)


/-- See also `LieModule.isNilpotent_iff_exists_ucs_eq_top`. -/
theorem isNilpotent_iff : IsNilpotent R L M ↔ ∃ k, lowerCentralSeries R L M k = ⊥

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]

LieModule.IsNilpotent R L M ↔ ∃ k, LieModule.lowerCentralSeries R L M k = ⊥


@[simp]
theorem pushoutCocone_inl :
    (pushoutCocone R A B).inl = Algebra.TensorProduct.includeLeftRingHom (A := A)

(R A B : Type u)
[CommRing R]
[CommRing A]
[CommRing B]
[Algebra R A]
[Algebra R B]

(CommRingCat.pushoutCocone R A B).inl = Algebra.TensorProduct.includeLeftRingHom


@[to_additive]
theorem rangeKerLift_surjective : Surjective (rangeKerLift φ)

{G : Type u}
[Group G]
{H : Type v}
[Group H]
(φ : G →* H)


theorem monotone_map : Monotone (MeasurableSpace.map f)

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


@[simp]
theorem vadd_openSegment [AddTorsor G E] [VAddCommClass G E E] (a : G) (b c : E) :
    a +ᵥ openSegment 𝕜 b c = openSegment 𝕜 (a +ᵥ b) (a +ᵥ c)

(𝕜 : Type u_1)
{E : Type u_2}
{G : Type u_4}
[OrderedRing 𝕜]
[AddCommGroup E]
[AddCommGroup G]
[Module 𝕜 E]
[AddTorsor G E]
[VAddCommClass G E E]
(a : G)
(b c : E)


theorem exists_iff {p : Fin n → Prop} : (Exists fun i => p i) ↔ Exists fun i => Exists fun h => p ⟨i, h⟩


lemma Finset.range_succ' {n nn n' : ℕ} (pn : NormNum.IsNat n nn) (pn' : nn = Nat.succ n') :
    Finset.range n = Finset.cons n' (Finset.range n') Finset.not_mem_range_self

{n nn n' : ℕ}
(pn : Mathlib.Meta.NormNum.IsNat n nn)
(pn' : nn = n'.succ)

Finset.range n = Finset.cons n' (Finset.range n') ⋯


theorem weightedHomogeneousComponent_eq_zero_of_not_mem [DecidableEq M]
    (φ : MvPolynomial σ R) (i : M) (hi : i ∉ Finset.image (weight w) φ.support) :
    weightedHomogeneousComponent w i φ = 0

(hi : i ∉ Finset.image (⇑(Finsupp.weight w)) φ.support)

(MvPolynomial.weightedHomogeneousComponent w i) φ = 0


theorem separable_def (f : R[X]) : f.Separable ↔ IsCoprime f (derivative f)

{R : Type u}
[CommSemiring R]
(f : R[X])

f.Separable ↔ IsCoprime f (Polynomial.derivative f)


@[simp] protected theorem sub_zero (n : Nat) : n - 0 = n