/-- Let `S` be an extension of `R` and `Rₘ Sₘ` be localizations at `M` of `R S` respectively.
Then the trace of `a : Sₘ` over `Rₘ` is the trace of `a : S` over `R` if `S` is free as `R`-module.
-/
theorem Algebra.trace_localization [Module.Free R S] [Module.Finite R S] (a : S) :
    Algebra.trace Rₘ Sₘ (algebraMap S Sₘ a) = algebraMap R Rₘ (Algebra.trace R S a)

[IsLocalization (Algebra.algebraMapSubmonoid S M) Sₘ]

(Algebra.trace Rₘ Sₘ) ((algebraMap S Sₘ) a) = (algebraMap R Rₘ) ((Algebra.trace R S) a)


theorem mk_eq_mk'_apply (x y) : mk x y = IsLocalization.mk' (Localization M) x y

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
(x : R)
(y : ↥M)

Localization.mk x y = IsLocalization.mk' (Localization M) x y


theorem succ_pred_prime {p : ℕ} (pp : Prime p) : succ (pred p) = p


theorem setIntegral_trim {X} {m m0 : MeasurableSpace X} {μ : Measure X} (hm : m ≤ m0) {f : X → E}
    (hf_meas : StronglyMeasurable[m] f) {s : Set X} (hs : MeasurableSet[m] s) :
    ∫ x in s, f x ∂μ = ∫ x in s, f x ∂μ.trim hm

(hf_meas : MeasureTheory.StronglyMeasurable f)

∫ (x : X) in s, f x ∂μ = ∫ (x : X) in s, f x ∂μ.trim hm


theorem measure_coe_lt_top (μ : Measure (ι → ℝ)) [IsLocallyFiniteMeasure μ] : μ I < ∞


theorem type_eq_one_of_unique (r) [IsWellOrder α r] [Unique α] : type r = 1

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


@[to_additive (attr := simp)]
theorem toList_of (x : α) : toList (of x) = [x]

FreeAddMonoid.toList (FreeAddMonoid.of x) = [x]


theorem toSubsemiring_injective : Function.Injective (toSubsemiring : Subring R → Subsemiring R)


/-- The red-red invariant is monotonic in `p`. -/
protected theorem RedRed.imp (h : p → q) : RedRed p t n → RedRed q t n

∀ {α : Type u_1} {t : Batteries.RBNode α} {n : Nat},
  (p → q) → Batteries.RBNode.RedRed p t n → Batteries.RBNode.RedRed q t n


theorem succ_eq_succ_iff_of_not_isMax (ha : ¬IsMax a) (hb : ¬IsMax b) :
    succ a = succ b ↔ a = b

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a b : α}
(ha : ¬IsMax a)
(hb : ¬IsMax b)


lemma mod_eq_of_modEq {a b n} (h : a ≡ b [MOD n]) (hb : b < n) : a % n = b

{a b n : ℕ}
(h : a ≡ b [MOD n])
(hb : b < n)


@[simp, nolint simpNF] protected lemma add_eq_zero : m + n = 0 ↔ m = 0 ∧ n = 0


theorem AffineMap.image_convexHull (f : E →ᵃ[𝕜] F) (s : Set E) :
    f '' convexHull 𝕜 s = convexHull 𝕜 (f '' s)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedRing 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
(f : E →ᵃ[𝕜] F)
(s : Set E)

⇑f '' (convexHull 𝕜) s = (convexHull 𝕜) (⇑f '' s)


/-- If a functor preserves span and cospan, then it preserves images.
-/
@[simps!]
def iso {X Y : A} (f : X ⟶ Y) : image (L.map f) ≅ L.obj (image f)

[{X Y Z : A} → (f : X ⟶ Z) → (g : Y ⟶ Z) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan f g) L]

[{X Y Z : A} → (f : X ⟶ Y) → (g : X ⟶ Z) → CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.span f g) L]

(CategoryTheory.PreservesImage.iso L f).inv =
  (CategoryTheory.Limits.StrongEpiMonoFactorisation.mk
          (CategoryTheory.Limits.MonoFactorisation.mk (L.obj (CategoryTheory.Limits.image f))
            (L.map (CategoryTheory.Limits.image.ι f)) (L.map (CategoryTheory.Limits.factorThruImage f))
            ⋯)).toMonoIsImage.lift
    (CategoryTheory.Limits.Image.monoFactorisation (L.map f))


@[to_additive]
theorem BddAbove.mul {s t : Set M} (hs : BddAbove s) (ht : BddAbove t) : BddAbove (s * t)

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

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


theorem dvd_gcd {m n k : ℕ+} (hm : k ∣ m) (hn : k ∣ n) : k ∣ gcd m n


@[to_additive]
protected theorem NeBot.div : NeBot f → NeBot g → NeBot (f / g)


protected lemma preconnected_iff {H : G.Subgraph} :
    H.Preconnected ↔ H.coe.Preconnected

{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}


/-- For an endomorphism of a Noetherian module, any sufficiently large iterate has disjoint kernel
and range. -/
theorem LinearMap.eventually_disjoint_ker_pow_range_pow (f : M →ₗ[R] M) :
    ∀ᶠ n in atTop, Disjoint (LinearMap.ker (f ^ n)) (LinearMap.range (f ^ n))

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

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


/-- The obvious functor `ShortComplex (J ⥤ C) ⥤ J ⥤ ShortComplex C`. -/
@[simps]
def functor : ShortComplex (J ⥤ C) ⥤ J ⥤ ShortComplex C

(S : CategoryTheory.ShortComplex (CategoryTheory.Functor J C))

((CategoryTheory.ShortComplex.FunctorEquivalence.functor J C).obj S).obj j =
  S.map ((CategoryTheory.evaluation J C).obj j)


/-- The right fraction from `X` to `Y` given by a morphism `s : Y ⟶ X` such that `W s`. -/
@[simps]
def ofInv (s : Y ⟶ X) (hs : W s) :
    W.RightFraction X Y

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
{X Y : C}
(s : Y ⟶ X)
(hs : W s)

(CategoryTheory.MorphismProperty.RightFraction.ofInv s hs).f = CategoryTheory.CategoryStruct.id Y


theorem nim_one_moveRight (x) : (nim 1).moveRight x = nim 0

(x : (SetTheory.PGame.nim 1).RightMoves)

(SetTheory.PGame.nim 1).moveRight x = SetTheory.PGame.nim 0


theorem Matrix.toLinAlgEquiv_mul (A B : Matrix n n R) :
    Matrix.toLinAlgEquiv v₁ (A * B) =
      (Matrix.toLinAlgEquiv v₁ A).comp (Matrix.toLinAlgEquiv v₁ B)

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)
(A B : Matrix n n R)

(Matrix.toLinAlgEquiv v₁) (A * B) = (Matrix.toLinAlgEquiv v₁) A ∘ₗ (Matrix.toLinAlgEquiv v₁) B


theorem adjoin_eq_starClosure_adjoin (s : Set A) :
    adjoin R s = (NonUnitalAlgebra.adjoin R s).starClosure

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

NonUnitalStarAlgebra.adjoin R s = (NonUnitalAlgebra.adjoin R s).starClosure


/-- This lemma works in the case in which `ZMod n` is not infinite, i.e. `n ≠ 0`.  The version
where `a ≠ 0` is `addOrderOf_coe'`. -/
@[simp]
theorem addOrderOf_coe (a : ℕ) {n : ℕ} (n0 : n ≠ 0) : addOrderOf (a : ZMod n) = n / n.gcd a


@[simp]
theorem _root_.aestronglyMeasurable_add_measure_iff [PseudoMetrizableSpace β] {ν : Measure α} :
    AEStronglyMeasurable f (μ + ν) ↔ AEStronglyMeasurable f μ ∧ AEStronglyMeasurable f ν

MeasureTheory.AEStronglyMeasurable f (μ + ν) ↔
  MeasureTheory.AEStronglyMeasurable f μ ∧ MeasureTheory.AEStronglyMeasurable f ν


theorem map_comp : map (fun (i : ι) ↦ g i ∘ₗ f i) = map g ∘ₗ map f

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
{t : ι → Type u_11}
{t' : ι → Type u_12}
[(i : ι) → AddCommMonoid (t i)]
[(i : ι) → Module R (t i)]
[(i : ι) → AddCommMonoid (t' i)]
[(i : ι) → Module R (t' i)]
(g : (i : ι) → t i →ₗ[R] t' i)
(f : (i : ι) → s i →ₗ[R] t i)

(PiTensorProduct.map fun i => g i ∘ₗ f i) = PiTensorProduct.map g ∘ₗ PiTensorProduct.map f


theorem StrictConvexOn.add_convexOn (hf : StrictConvexOn 𝕜 s f) (hg : ConvexOn 𝕜 s g) :
    StrictConvexOn 𝕜 s (f + g)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedCancelAddCommMonoid β]
[SMul 𝕜 E]
[DistribMulAction 𝕜 β]
{s : Set E}
{f g : E → β}
(hf : StrictConvexOn 𝕜 s f)
(hg : ConvexOn 𝕜 s g)


/-- The counit isomorphism of the equivalence `equivalence₂` between `A` and `B`. -/
@[simps!]
def equivalence₂CounitIso : (eB.functor ⋙ e'.inverse ⋙ eA.inverse) ⋙ F ⋙ eB.inverse ≅ 𝟭 B

{A : Type u_1}
{A' : Type u_2}
{B : Type u_3}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_6, u_2} A']
[CategoryTheory.Category.{u_7, u_3} B]
[CategoryTheory.Category.{u_8, u_4} B']
{eA : A ≌ A'}
(eB : B ≌ B')
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)
(X : B)

(AlgebraicTopology.DoldKan.Compatibility.equivalence₂CounitIso eB hF).inv.app X =
  eB.unitIso.hom.app X ≫
    eB.inverse.map (e'.counitIso.inv.app (eB.functor.obj X)) ≫
      eB.inverse.map (e'.functor.map (eA.counitIso.inv.app (e'.inverse.obj (eB.functor.obj X)))) ≫
        eB.inverse.map (hF.hom.app (eA.inverse.obj (e'.inverse.obj (eB.functor.obj X))))


/-- The product of a monotone function and a strictly monotone function is strictly monotone. -/
@[to_additive add_strictMono "The sum of a monotone function and a strictly monotone function is
strictly monotone."]
theorem Monotone.mul_strictMono' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : Monotone f)
    (hg : StrictMono g) :
    StrictMono fun x => f x * g x

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

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


theorem isEmpty : ∀ {s}, Valid s → (s.isEmpty ↔ s.toString = "")

s.Valid → (s.isEmpty = true ↔ s.toString = "")


@[simp]
theorem finite_neighborSet_toSubgraph (p : G.Walk u v) : (p.toSubgraph.neighborSet w).Finite

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


theorem lift_unique (F : N ⋊[φ] G →* H) :
    F = lift (F.comp inl) (F.comp inr) fun _ ↦ by ext; simp [inl_aut]

{N : Type u_1}
{G : Type u_2}
{H : Type u_3}
[Group N]
[Group G]
[Group H]
{φ : G →* MulAut N}
(F : N ⋊[φ] G →* H)

F = SemidirectProduct.lift (F.comp SemidirectProduct.inl) (F.comp SemidirectProduct.inr) ⋯


@[simp]
theorem realize_onTerm [L'.Structure M] (φ : L →ᴸ L') [φ.IsExpansionOn M] (t : L.Term α)
    (v : α → M) : (φ.onTerm t).realize v = t.realize v

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

FirstOrder.Language.Term.realize v (φ.onTerm t) = FirstOrder.Language.Term.realize v t


theorem SurjectiveOnWith.surjOn {f : NormedAddGroupHom V₁ V₂} {K : AddSubgroup V₂} {C : ℝ}
    (h : f.SurjectiveOnWith K C) : Set.SurjOn f Set.univ K

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
{f : NormedAddGroupHom V₁ V₂}
{K : AddSubgroup V₂}
{C : ℝ}
(h : f.SurjectiveOnWith K C)


theorem mem_lowerBounds_image (Ha : a ∈ lowerBounds s) : f a ∈ lowerBounds (f '' s)

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


/-- The Weierstrass curve over `R` induced by an admissible linear change of variables
$(X, Y) \mapsto (u^2X + r, u^3Y + u^2sX + t)$ for some $u \in R^\times$ and some $r, s, t \in R$. -/
@[simps]
def variableChange : WeierstrassCurve R

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(C : WeierstrassCurve.VariableChange R)

(W.variableChange C).a₆ =
  ↑C.u⁻¹ ^ 6 * (W.a₆ + C.r * W.a₄ + C.r ^ 2 * W.a₂ + C.r ^ 3 - C.t * W.a₃ - C.t ^ 2 - C.r * C.t * W.a₁)


/-- Type class for noetherian spaces. It is defined to be spaces whose open sets satisfies ACC. -/
@[mk_iff]
class NoetherianSpace : Prop where
  wellFounded_opens : WellFounded ((· > ·) : Opens α → Opens α → Prop)

TopologicalSpace.NoetherianSpace α ↔ WellFounded fun x x_1 => x > x_1


@[to_additive]
theorem inv_div_left : a⁻¹ / b = (b * a)⁻¹

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


@[simp]
theorem evenOdd_comap_reverse (n : ZMod 2) :
    (evenOdd Q n).comap (reverse : CliffordAlgebra Q →ₗ[R] CliffordAlgebra Q) = evenOdd Q n

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

Submodule.comap CliffordAlgebra.reverse (CliffordAlgebra.evenOdd Q n) = CliffordAlgebra.evenOdd Q n


@[simp]
lemma isNClique_singleton : G.IsNClique n {a} ↔ n = 1

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


theorem sum_smul_index [Semiring R] [AddCommMonoid M] {g : α →₀ R} {b : R} {h : α → R → M}
    (h0 : ∀ i, h i 0 = 0) : (b • g).sum h = g.sum fun i a => h i (b * a)

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
[Semiring R]
[AddCommMonoid M]
{g : α →₀ R}
{b : R}
{h : α → R → M}
(h0 : ∀ (i : α), h i 0 = 0)


@[to_additive]
theorem div_def [Div β] (x y : α) :
    letI := Equiv.div e
    x / y = e.symm (e x / e y)

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Div β]
(x y : α)


theorem of_mono {X Y : C} (f : X ⟶ Y) [Mono f] (i : IsZero Y) : IsZero X


theorem bmod_def (x : Int) (m : Nat) : bmod x m =
  if (x % m) < (m + 1) / 2 then
    x % m
  else
    (x % m) - m

x.bmod m = if x % ↑m < (↑m + 1) / 2 then x % ↑m else x % ↑m - ↑m


lemma IsPointwiseRightKanExtension.hasPointwiseRightKanExtension :
    HasPointwiseRightKanExtension L F

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
{E : L.RightExtension F}
(h : E.IsPointwiseRightKanExtension)


/-- `IsSymm X r` means the binary relation `r` on `X` is symmetric. -/
class IsSymm (α : Sort u) (r : α → α → Prop) : Prop where
  symm : ∀ a b, r a b → r b a

{α : Sort u}
{r : α → α → Prop}
[self : IsSymm α r]
(a b : α)


@[simp] theorem mem_join : ∀ {L : List (List α)}, a ∈ L.join ↔ ∃ l, l ∈ L ∧ a ∈ l

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


theorem not_bddAbove_Ici : ¬BddAbove (Ici a)

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


theorem ContinuousAt.restrictPreimage {f : X → Y} {s : Set Y} {x : f ⁻¹' s} (h : ContinuousAt f x) :
    ContinuousAt (s.restrictPreimage f) x

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set Y}
{x : ↑(f ⁻¹' s)}
(h : ContinuousAt f ↑x)


theorem Function.Surjective.isArtinianRing {R} [Ring R] {S} [Ring S] {F}
    [FunLike F R S] [RingHomClass F R S]
    {f : F} (hf : Function.Surjective f) [H : IsArtinianRing R] : IsArtinianRing S

{R : Type u_1}
[Ring R]
{S : Type u_2}
[Ring S]
{F : Type u_3}
[FunLike F R S]
[RingHomClass F R S]
{f : F}
(hf : Function.Surjective ⇑f)
[H : IsArtinianRing R]


/-- A functor `F : C ⥤ Type v₁` is corepresentable if there is object `X` so `F ≅ coyoneda.obj X`.

See <https://stacks.math.columbia.edu/tag/001Q>.
-/
class Corepresentable (F : C ⥤ Type v₁) : Prop where
  /-- `Hom(X,-) ≅ F` via `f` -/
  has_corepresentation : ∃ (X : _), Nonempty (coyoneda.obj X ≅ F)

{F : CategoryTheory.Functor C (Type v₁)}

∃ X, Nonempty (CategoryTheory.coyoneda.obj X ≅ F)


theorem IsOrtho.ge {U V : Submodule 𝕜 E} (h : U ⟂ V) : V ≤ Uᗮ

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{U V : Submodule 𝕜 E}
(h : U ⟂ V)


@[simp] theorem inv_divInt (n d : Int) : (n /. d).inv = d /. n


theorem grundyValue_eq_iff_equiv (G H : PGame) [G.Impartial] [H.Impartial] :
    grundyValue G = grundyValue H ↔ (G ≈ H)


@[to_additive]
theorem le_inv_mul_iff_le : 1 ≤ b⁻¹ * a ↔ b ≤ a

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


/-- Taylor's formula. -/
theorem sum_taylor_eq {R} [CommRing R] (f : R[X]) (r : R) :
    ((taylor r f).sum fun i a => C a * (X - C r) ^ i) = f

{R : Type u_2}
[CommRing R]
(f : Polynomial R)
(r : R)

(((Polynomial.taylor r) f).sum fun i a => Polynomial.C a * (Polynomial.X - Polynomial.C r) ^ i) = f


theorem prod_alternatingWord_eq_mul_pow (i i' : B) (m : ℕ) :
    π (alternatingWord i i' m) = (if Even m then 1 else s i') * (s i * s i') ^ (m / 2)

{B : Type u_1}
{W : Type u_3}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(i i' : B)
(m : ℕ)

cs.wordProd (CoxeterSystem.alternatingWord i i' m) =
  (if Even m then 1 else cs.simple i') * (cs.simple i * cs.simple i') ^ (m / 2)


{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)


@[simp, norm_cast] theorem coe_le_coe : (↑r : ℝ≥0∞) ≤ ↑q ↔ r ≤ q

↑r ≤ ↑q ↔ r ≤ q


@[simp]
theorem id_comp (f : P1 →ᵃ[k] P2) : (id k P2).comp f = f

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
(f : P1 →ᵃ[k] P2)


theorem eq_nil_or_concat : ∀ l : List α, l = [] ∨ ∃ L b, l = concat L b


theorem IsMaxOn.sub (hf : IsMaxOn f s a) (hg : IsMinOn g s a) :
    IsMaxOn (fun x => f x - g x) s a

{α : Type u}
{β : Type v}
[OrderedAddCommGroup β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsMaxOn f s a)
(hg : IsMinOn g s a)


@[simp]
theorem areaForm_rightAngleRotation_right (x y : E) : ω x (J y) = ⟪x, y⟫

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

(o.areaForm x) (o.rightAngleRotation y) = ⟪x, y⟫_ℝ


@[simp]
theorem absNorm_bot : absNorm (⊥ : Ideal S) = 0

{S : Type u_1}
[CommRing S]
[IsDomain S]
[Nontrivial S]
[IsDedekindDomain S]
[Module.Free ℤ S]


/-- When a homology data `h` of a short complex `S` is such that both `h.left` and
`h.right` are preserved by a functor `F`, this is the induced homology data
`h.map F` for the short complex `S.map F`. -/
@[simps]
noncomputable def HomologyData.map (h : S.HomologyData) (F : C ⥤ D) [F.PreservesZeroMorphisms]
    [h.left.IsPreservedBy F] [h.right.IsPreservedBy F] :
    (S.map F).HomologyData


lemma decreasingInduction_succ {n} {motive : (m : ℕ) → m ≤ n + 1 → Sort*} (of_succ self)
    (mn : m ≤ n) (msn : m ≤ n + 1) :
    (decreasingInduction (motive := motive) of_succ self msn : motive m msn) =
      decreasingInduction (motive := fun m h => motive m (le_succ_of_le h))
        (fun i hi => of_succ _ _) (of_succ _ _ self) mn

{motive : (m : ℕ) → m ≤ n + 1 → Sort u_1}

(of_succ : (k : ℕ) → (h : k < n + 1) → motive (k + 1) h → motive k ⋯)

Nat.decreasingInduction of_succ self msn = Nat.decreasingInduction (fun i hi => of_succ i ⋯) (of_succ n ⋯ self) mn


@[simp, norm_cast]
theorem coe_sumElim {α β γ : Type*} [Zero γ] (f : α →₀ γ) (g : β →₀ γ) :
    ⇑(sumElim f g) = Sum.elim f g

{α : Type u_13}
{β : Type u_14}
{γ : Type u_15}
[Zero γ]
(f : α →₀ γ)
(g : β →₀ γ)


/-- When `D` is a braided monoidal category,
commutative monoid objects in `C ⥤ D` are the same thing
as functors from `C` into the commutative monoid objects of `D`.
-/
@[simps]
def commMonFunctorCategoryEquivalence : CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D

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

(CategoryTheory.Monoidal.commMonFunctorCategoryEquivalence C D).unitIso =
  CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.unitIso


lemma ofJ_0_of_three_eq_zero (h3 : (3 : F) = 0) :
    ofJ 0 = @ofJ1728 _ _ (invertibleOfNonzero <| two_or_three_ne_zero.neg_resolve_right h3)

{F : Type u}
[Field F]
[DecidableEq F]
(h3 : 3 = 0)

EllipticCurve.ofJ 0 = EllipticCurve.ofJ1728 F


theorem single_vecMul_diagonal [Fintype n] [DecidableEq n] [NonUnitalNonAssocSemiring R] (v : n → R)
    (j : n) (x : R) : (Pi.single j x) ᵥ* (diagonal v) = Pi.single j (x * v j)

{n : Type u_3}
{R : Type u_7}
[Fintype n]
[DecidableEq n]
[NonUnitalNonAssocSemiring R]
(v : n → R)
(j : n)
(x : R)

Pi.single j x ᵥ* Matrix.diagonal v = Pi.single j (x * v j)


theorem integral_bernoulliFun_eq_zero {k : ℕ} (hk : k ≠ 0) :
    ∫ x : ℝ in (0)..1, bernoulliFun k x = 0

∫ (x : ℝ) in 0 ..1, bernoulliFun k x = 0


@[measurability]
lemma stronglyMeasurable_poissonPMFReal (r : ℝ≥0) : StronglyMeasurable (poissonPMFReal r)


@[simp]
protected theorem ZMod.exponent (n : ℕ) : AddMonoid.exponent (ZMod n) = n


lemma subsingleton_cotangentSpace_iff [IsNoetherianRing R] :
    Subsingleton (CotangentSpace R) ↔ IsField R

{R : Type u_1}
[CommRing R]
[LocalRing R]
[IsNoetherianRing R]

Subsingleton (LocalRing.CotangentSpace R) ↔ IsField R


lemma LSeriesSummable.of_smul {f : ℕ → ℂ} {c s : ℂ} (hc : c ≠ 0) (hf : LSeriesSummable (c • f) s) :
    LSeriesSummable f s


theorem disc_eq_prod_three_roots (ha : P.a ≠ 0) (h3 : (map φ P).roots = {x, y, z}) :
    φ P.disc = (φ P.a * φ P.a * (x - y) * (x - z) * (y - z)) ^ 2

(h3 : (Cubic.map φ P).roots = {x, y, z})


theorem bihimp_right_comm : a ⇔ b ⇔ c = a ⇔ c ⇔ b

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


@[simp]
theorem range_coe (h : X ≃ₜ Y) : range h = univ

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)


/-- If `τ` and `σ` are two stopping times with `σ ≤ τ` and `τ` is bounded, then the value of a
martingale `f` at `σ` is the conditional expectation of its value at `τ` with respect to the
σ-algebra generated by `σ`. -/
theorem stoppedValue_ae_eq_condexp_of_le_of_countable_range (h : Martingale f ℱ μ)
    (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) (hσ_le_τ : σ ≤ τ) (hτ_le : ∀ x, τ x ≤ n)
    (hτ_countable_range : (Set.range τ).Countable) (hσ_countable_range : (Set.range σ).Countable)
    [SigmaFinite (μ.trim (hσ.measurableSpace_le_of_le fun x => (hσ_le_τ x).trans (hτ_le x)))] :
    stoppedValue f σ =ᵐ[μ] μ[stoppedValue f τ|hσ.measurableSpace]

{τ σ : Ω → ι}

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


lemma differentiableAt_completedCosZeta
    (a : UnitAddCircle) {s : ℂ} (hs : s ≠ 0) (hs' : s ≠ 1 ∨ a ≠ 0) :
    DifferentiableAt ℂ (completedCosZeta a) s

DifferentiableAt ℂ (HurwitzZeta.completedCosZeta a) s


/-- If `f` and `g` are two approximate solutions of the same ODE, then the distance between them
can't grow faster than exponentially. This is a simple corollary of Grönwall's inequality, and some
people call this Grönwall's inequality too.

This version assumes all inequalities to be true in some time-dependent set `s t`,
and assumes that the solutions never leave this set. -/
theorem dist_le_of_approx_trajectories_ODE_of_mem
    (hf : ContinuousOn f (Icc a b))
    (hf' : ∀ t ∈ Ico a b, HasDerivWithinAt f (f' t) (Ici t) t)
    (f_bound : ∀ t ∈ Ico a b, dist (f' t) (v t (f t)) ≤ εf)
    (hfs : ∀ t ∈ Ico a b, f t ∈ s t)
    (hg : ContinuousOn g (Icc a b))
    (hg' : ∀ t ∈ Ico a b, HasDerivWithinAt g (g' t) (Ici t) t)
    (g_bound : ∀ t ∈ Ico a b, dist (g' t) (v t (g t)) ≤ εg)
    (hgs : ∀ t ∈ Ico a b, g t ∈ s t)
    (ha : dist (f a) (g a) ≤ δ) :
    ∀ t ∈ Icc a b, dist (f t) (g t) ≤ gronwallBound δ K (εf + εg) (t - a)

(hv : ∀ (t : ℝ), LipschitzOnWith K (v t) (s t))

(hf' : ∀ t ∈ Set.Ico a b, HasDerivWithinAt f (f' t) (Set.Ici t) t)

(f_bound : ∀ t ∈ Set.Ico a b, dist (f' t) (v t (f t)) ≤ εf)

(hg' : ∀ t ∈ Set.Ico a b, HasDerivWithinAt g (g' t) (Set.Ici t) t)

(g_bound : ∀ t ∈ Set.Ico a b, dist (g' t) (v t (g t)) ≤ εg)

t ∈ Set.Icc a b → dist (f t) (g t) ≤ gronwallBound δ (↑K) (εf + εg) (t - a)


/-- Auxiliary typeclass for types with an involutive `Inv`. -/
@[to_additive]
class InvolutiveInv (G : Type*) extends Inv G where
  protected inv_inv : ∀ x : G, x⁻¹⁻¹ = x

{G : Type u_2}
[self : InvolutiveInv G]
(x : G)


theorem dualRestrict_leftInverse (W : Subspace K V) :
    Function.LeftInverse W.dualRestrict W.dualLift

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

Function.LeftInverse ⇑(Submodule.dualRestrict W) ⇑W.dualLift


/-- A monoid object in a functor category induces a functor to the category of monoid objects. -/
@[simps]
def functorObj (A : Mon_ (C ⥤ D)) : C ⥤ Mon_ D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
(A : Mon_ (C ⥤ D))

∀ {X Y : C} (f : X ⟶ Y), ((CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.functorObj A).map f).hom = A.X.map f


theorem sup_inf_self (a b : α) : a ⊔ a ⊓ b = a

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


/-- If a countable family of closed sets cover a dense `Gδ` set, then the union of their interiors
is dense. Formulated here with `⋃`. -/
theorem IsGδ.dense_iUnion_interior_of_closed [Countable ι] {s : Set X} (hs : IsGδ s) (hd : Dense s)
    {f : ι → Set X} (hc : ∀ i, IsClosed (f i)) (hU : s ⊆ ⋃ i, f i) :
    Dense (⋃ i, interior (f i))

{X : Type u_1}
{ι : Sort u_3}
[TopologicalSpace X]
[BaireSpace X]
[Countable ι]
{s : Set X}
(hs : IsGδ s)
(hd : Dense s)
{f : ι → Set X}
(hc : ∀ (i : ι), IsClosed (f i))
(hU : s ⊆ ⋃ i, f i)


run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString


lemma collapse_nonneg (hf : 0 ≤ f) : 0 ≤ collapse 𝒜 a f

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[LinearOrderedCommSemiring β]
{𝒜 : Finset (Finset α)}
{a : α}
{f : Finset α → β}
(hf : 0 ≤ f)


@[simp]
theorem chainHeight_dual : (ofDual ⁻¹' s).chainHeight = s.chainHeight

(⇑OrderDual.ofDual ⁻¹' s).chainHeight = s.chainHeight


/-- Typeclass for a star operation with is involutive.
-/
class InvolutiveStar (R : Type u) extends Star R where
  /-- Involutive condition. -/
  star_involutive : Function.Involutive star


/-- The image of a surjective torsion group homomorphism is torsion. -/
@[to_additive AddIsTorsion.of_surjective
      "The image of a surjective additive torsion group homomorphism is torsion."]
theorem IsTorsion.of_surjective {f : G →* H} (hf : Function.Surjective f) (tG : IsTorsion G) :
    IsTorsion H

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G →* H}
(hf : Function.Surjective ⇑f)
(tG : Monoid.IsTorsion G)


theorem fderivWithin_list_prod' {l : List ι} {x : E}
    (hxs : UniqueDiffWithinAt 𝕜 s x) (h : ∀ i ∈ l, DifferentiableWithinAt 𝕜 (f i ·) s x) :
    fderivWithin 𝕜 (fun x ↦ (l.map (f · x)).prod) s x =
      ∑ i : Fin l.length, ((l.take i).map (f · x)).prod •
        smulRight (fderivWithin 𝕜 (fun x ↦ f (l.get i) x) s x)
          ((l.drop (.succ i)).map (f · x)).prod

(h : ∀ i ∈ l, DifferentiableWithinAt 𝕜 (fun x => f i x) s x)

fderivWithin 𝕜 (fun x => (List.map (fun x_1 => f x_1 x) l).prod) s x =
  ∑ i : Fin l.length,
    (List.map (fun x_1 => f x_1 x) (List.take (↑i) l)).prod •
      (fderivWithin 𝕜 (fun x => f (l.get i) x) s x).smulRight
        (List.map (fun x_1 => f x_1 x) (List.drop (↑i).succ l)).prod


@[simp]
theorem stdBasis_apply_ofIsComplex_snd (x : E K) (w : {w : InfinitePlace K // IsComplex w}) :
    (stdBasis K).repr x (Sum.inr ⟨w, 1⟩) = (x.2 w).im

(x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

((NumberField.mixedEmbedding.stdBasis K).repr x) (Sum.inr (w, 1)) = (x.2 w).im


theorem Subset.antisymm_iff {s₁ s₂ : Finset α} : s₁ = s₂ ↔ s₁ ⊆ s₂ ∧ s₂ ⊆ s₁

s₁ = s₂ ↔ s₁ ⊆ s₂ ∧ s₂ ⊆ s₁


@[simp]
theorem arccos_neg_one : arccos (-1) = π


@[simp]
theorem not_ssubset_empty (s : Finset α) : ¬s ⊂ ∅


@[fun_prop]
theorem Differentiable.smul_const (hc : Differentiable 𝕜 c) (f : F) :
    Differentiable 𝕜 fun y => c y • f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{𝕜' : Type u_6}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : E → 𝕜'}
(hc : Differentiable 𝕜 c)
(f : F)


lemma isUnit_addZ_of_X_ne {P Q : Fin 3 → F} (hx : P x * Q z ^ 2 ≠ Q x * P z ^ 2) :
    IsUnit <| addZ P Q

{F : Type v}
[Field F]
{P Q : Fin 3 → F}
(hx : P x * Q z ^ 2 ≠ Q x * P z ^ 2)

IsUnit (WeierstrassCurve.Jacobian.addZ P Q)


theorem descPochhammer_mul (n m : ℕ) :
    descPochhammer R n * (descPochhammer R m).comp (X - (n : R[X])) = descPochhammer R (n + m)

descPochhammer R n * (descPochhammer R m).comp (Polynomial.X - ↑n) = descPochhammer R (n + m)


@[local simp] theorem ofNat_mul_ofNat (m n : Nat) : (↑m * ↑n : Int) = ↑(m * n)


theorem toFun_eq_coe {f : PseudoEpimorphism α β} : f.toFun = (f : α → β)

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


theorem nonempty_Ioc_subtype (h : a < b) : Nonempty (Ioc a b)

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


theorem principalUnitGroup_injective :
    Function.Injective (principalUnitGroup : ValuationSubring K → Subgroup _)


theorem inf_inf_distrib_left (a b c : α) : a ⊓ (b ⊓ c) = a ⊓ b ⊓ (a ⊓ c)

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


@[simp] lemma removeNth_update (p : Fin (n + 1)) (x) (f : ∀ j, α j) :
    removeNth p (update f p x) = removeNth p f

{n : ℕ}
{α : Fin (n + 1) → Type u}
(p : Fin (n + 1))
(x : α p)
(f : (j : Fin (n + 1)) → α j)

p.removeNth (Function.update f p x) = p.removeNth f


@[simp]
theorem verts_iInf {f : ι → G.Subgraph} : (⨅ i, f i).verts = ⋂ i, (f i).verts

{ι : Sort u_1}
{V : Type u}
{G : SimpleGraph V}
{f : ι → G.Subgraph}


theorem map_bracket_eq : map f ⁅I, N⁆ = ⁅I, map f N⁆

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

LieSubmodule.map f ⁅I, N⁆ = ⁅I, LieSubmodule.map f N⁆


@[simp]
theorem prod_fst_mk {α β : TypeVec n} (i : Fin2 n) (a : α i) (b : β i) :
    TypeVec.prod.fst i (prod.mk i a b) = a

{n : ℕ}
{α β : TypeVec.{u_1} n}
(i : Fin2 n)
(a : α i)
(b : β i)

TypeVec.prod.fst i (TypeVec.prod.mk i a b) = a


theorem posMulReflectLT_iff_contravariant_pos :
    PosMulReflectLT α ↔ ContravariantClass α>0 α (fun x y => x * y) (· < ·)

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

PosMulReflectLT α ↔ ContravariantClass { x // 0 < x } α (fun x y => ↑x * y) fun x x_1 => x < x_1


theorem SuperpolynomialDecay.trans_abs_le (hf : SuperpolynomialDecay l k f)
    (hfg : ∀ x, |g x| ≤ |f x|) : SuperpolynomialDecay l k g

(hf : Asymptotics.SuperpolynomialDecay l k f)


@[simp]
theorem coe_adj_sub (G' : Subgraph G) (u v : G'.verts) (h : G'.coe.Adj u v) : G.Adj u v

{V : Type u}
{G : SimpleGraph V}
(G' : G.Subgraph)
(u v : ↑G'.verts)
(h : G'.coe.Adj u v)


@[simp]
theorem quotientEquivOfIsCompl_apply_mk_coe (h : IsCompl p q) (x : q) :
    quotientEquivOfIsCompl p q h (Quotient.mk x) = x

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
(p q : Submodule R E)
(h : IsCompl p q)
(x : ↥q)

(p.quotientEquivOfIsCompl q h) (Submodule.Quotient.mk ↑x) = x


lemma divisors_filter_dvd_of_dvd {n m : ℕ} (hn : n ≠ 0) (hm : m ∣ n) :
    (n.divisors.filter (· ∣ m)) = m.divisors

Finset.filter (fun x => x ∣ m) n.divisors = m.divisors


/-- In a space with an inner regular measure, any measurable set coincides almost everywhere with
its everywhere positive subset. -/
lemma everywherePosSubset_ae_eq [OpensMeasurableSpace α] [InnerRegular μ] (hs : MeasurableSet s) :
    μ.everywherePosSubset s =ᵐ[μ] s

{α : Type u_1}
[TopologicalSpace α]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s : Set α}
[OpensMeasurableSpace α]
[μ.InnerRegular]
(hs : MeasurableSet s)


@[integral_simps]
theorem integral_neg (f : α →₁[μ] E) : integral (-f) = -integral f

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedSpace ℝ E]
[CompleteSpace E]
(f : ↥(MeasureTheory.Lp E 1 μ))

MeasureTheory.L1.integral (-f) = -MeasureTheory.L1.integral f


theorem mul_nat_iff (hn : n ≠ 0) : LiouvilleWith p (x * n) ↔ LiouvilleWith p x

LiouvilleWith p (x * ↑n) ↔ LiouvilleWith p x


theorem lieIdeal_oper_eq_linear_span' :
    (↑⁅I, N⁆ : Submodule R M) = Submodule.span R { m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m }

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

↑⁅I, N⁆ = Submodule.span R {m | ∃ x ∈ I, ∃ n ∈ N, ⁅x, n⁆ = m}


protected theorem wellFounded : ∀ (_ : r ↪r s) (_ : WellFounded s), WellFounded r

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}


theorem Iic_inter_Ioc_of_le (h : a ≤ c) : Iic a ∩ Ioc b c = Ioc b a

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


/-- In exponential characteristic one, the separable degree equals the degree. -/
theorem HasSeparableContraction.eq_degree {f : F[X]} (hf : HasSeparableContraction 1 f) :
    hf.degree = f.natDegree

(hf : Polynomial.HasSeparableContraction 1 f)


@[to_additive (attr := simp)]
theorem prod_map_mul : (m.map fun i => f i * g i).prod = (m.map f).prod * (m.map g).prod

{ι : Type u_2}
{α : Type u_3}
[CommMonoid α]
{m : Multiset ι}
{f g : ι → α}

(Multiset.map (fun i => f i * g i) m).prod = (Multiset.map f m).prod * (Multiset.map g m).prod


/-- Linear isomorphism obtained by separating the term of index `none` of a direct sum over
`Option ι`. -/
@[simps]
noncomputable def lequivProdDirectSum : (⨁ i, α i) ≃ₗ[R] α none × ⨁ i, α (some i)

(R : Type u)
[Semiring R]
{ι : Type v}
{α : Option ι → Type w}
[(i : Option ι) → AddCommMonoid (α i)]
[(i : Option ι) → Module R (α i)]

∀ (a : α none × DirectSum ι fun i => α (some i)),
  (DirectSum.lequivProdDirectSum R).symm a = DirectSum.addEquivProdDirectSum.invFun a


theorem Subperm.exists_of_length_lt {l₁ l₂ : List α} (s : l₁ <+~ l₂) (h : length l₁ < length l₂) :
    ∃ a, a :: l₁ <+~ l₂

{α : Type u_1}
{l₁ l₂ : List α}
(s : l₁ <+~ l₂)
(h : l₁.length < l₂.length)


/-- **First moment method**. The minimum of an integrable function is smaller than its integral. -/
theorem exists_le_integral (hf : Integrable f μ) : ∃ x, f x ≤ ∫ a, f a ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
[MeasureTheory.IsProbabilityMeasure μ]
(hf : MeasureTheory.Integrable f μ)


theorem le_zero_iff {G : PGame} [G.Impartial] : G ≤ 0 ↔ 0 ≤ G


/-- P3 follows from `IH3` (so P4 (with `y₁` a left option of `y₂`) follows from the induction
  hypothesis). -/
theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)
    (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :
    P3 x₁ x₂ y₁ y₂

(h : ∀ (i : x₂.LeftMoves), Surreal.Multiplication.IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)

(hs : ∀ (i : (-x₁).LeftMoves), Surreal.Multiplication.IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂)


@[simp]
theorem ratio_inv (e : X ≃ᵈ X) : ratio (e⁻¹) = (ratio e)⁻¹

{X : Type u_1}
[PseudoEMetricSpace X]
(e : X ≃ᵈ X)

Dilation.ratio e⁻¹ = (Dilation.ratio e)⁻¹


theorem add_mul_left_left (h : IsRelPrime x y) : IsRelPrime (x + y * z) y

{R : Type u_1}
[CommRing R]
{x y : R}
(z : R)
(h : IsRelPrime x y)


theorem isAmalgamation_sieveExtend {R : Presieve X} (x : FamilyOfElements P R) (t : P.obj (op X))
    (ht : x.IsAmalgamation t) : x.sieveExtend.IsAmalgamation t

{P : CategoryTheory.Functor Cᵒᵖ (Type w)}

(x : CategoryTheory.Presieve.FamilyOfElements P R)


/-- In a space with second countable topology, strongly measurable and measurable are equivalent. -/
theorem _root_.aestronglyMeasurable_iff_aemeasurable [PseudoMetrizableSpace β] [BorelSpace β]
    [SecondCountableTopology β] : AEStronglyMeasurable f μ ↔ AEMeasurable f μ

MeasureTheory.AEStronglyMeasurable f μ ↔ AEMeasurable f μ


/-- Pythagorean theorem, subtracting vectors, if-and-only-if vector angle form. -/
theorem norm_sub_sq_eq_norm_sq_add_norm_sq_iff_angle_eq_pi_div_two (x y : V) :
    ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ angle x y = π / 2

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
(x y : V)

‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ InnerProductGeometry.angle x y = π / 2


theorem linearMapAt_symmₗ (e : Pretrivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) (y : F) : e.linearMapAt R b (e.symmₗ R b y) = y

(e : Pretrivialization F Bundle.TotalSpace.proj)

(Pretrivialization.linearMapAt R e b) ((Pretrivialization.symmₗ R e b) y) = y


theorem core_comp (s : Rel β γ) (t : Set γ) : core (r • s) t = core r (core s t)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(r : Rel α β)
(s : Rel β γ)
(t : Set γ)


theorem mem_maximals_iff_forall_ssubset_not_mem {x : Set α} {s : Set (Set α)} :
    x ∈ maximals (· ⊆ ·) s ↔ x ∈ s ∧ ∀ ⦃y⦄, x ⊂ y → y ∉ s

{α : Type u_1}
{x : Set α}
{s : Set (Set α)}

x ∈ maximals (fun x x_1 => x ⊆ x_1) s ↔ x ∈ s ∧ ∀ ⦃y : Set α⦄, x ⊂ y → y ∉ s


theorem IsLimit.succ_lt {o a : Ordinal} (h : IsLimit o) : a < o → succ a < o


/-- **Zorn's lemma**

If every chain has an upper bound, then there exists a maximal element. -/
theorem exists_maximal_of_chains_bounded (h : ∀ c, IsChain r c → ∃ ub, ∀ a ∈ c, a ≺ ub)
    (trans : ∀ {a b c}, a ≺ b → b ≺ c → a ≺ c) : ∃ m, ∀ a, m ≺ a → a ≺ m

(h : ∀ (c : Set α), IsChain r c → ∃ ub, ∀ a ∈ c, r a ub)

(trans : ∀ {a b c : α}, r a b → r b c → r a c)


theorem mul_lt_mul_right : c ≠ 0 → c ≠ ∞ → (a * c < b * c ↔ a < b)


theorem USize.toNat_div (x y : USize) : (x / y).toNat = x.toNat / y.toNat


@[simp]
theorem coe_prodComm : ⇑(prodComm : R × S ≃+* S × R) = Prod.swap

{R : Type u_3}
{S : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]


lemma smul_lt_smul' [PosSMulStrictMono α β] [SMulPosStrictMono α β] (ha : a₁ < a₂) (hb : b₁ < b₂)
    (h₂ : 0 < a₂) (h₁ : 0 < b₁) : a₁ • b₁ < a₂ • b₂

{α : Type u_1}
{β : Type u_2}
{a₁ a₂ : α}
{b₁ b₂ : β}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[Zero β]
[PosSMulStrictMono α β]
[SMulPosStrictMono α β]
(ha : a₁ < a₂)
(hb : b₁ < b₂)
(h₂ : 0 < a₂)
(h₁ : 0 < b₁)

a₁ • b₁ < a₂ • b₂


@[to_additive (attr := simp)]
theorem smul_inr : a • (inr c : α ⊕ β) = inr (a • c)

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


@[deprecated map_one (since := "2024-06-20")]
protected theorem map_one : e 1 = 1

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


theorem one_div_zpow {A : M} (n : ℤ) : (1 / A) ^ n = 1 / A ^ n

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


@[simp high, nolint simpNF, norm_cast]
theorem cast_natCast (n : ℕ) : ((n : ℤ) : R) = n

{R : Type u}
[AddGroupWithOne R]
(n : ℕ)


lemma strictMono_succAbove (p : Fin (n + 1)) : StrictMono (succAbove p)


@[to_additive (attr := simp, norm_cast)]
lemma coe_eq_one : (a : WithBot α) = 1 ↔ a = 1


@[simp] theorem freeOn_empty (α : Type*) : freeOn (∅ : Set α) = emptyOn α


theorem HasLineDerivAt.lineDifferentiableAt (hf : HasLineDerivAt 𝕜 f f' x v) :
    LineDifferentiableAt 𝕜 f x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f : E → F}
{f' : F}
{x v : E}
(hf : HasLineDerivAt 𝕜 f f' x v)


theorem setToL1S_zero_left' {T : Set α → E →L[ℝ] F}
    (h_zero : ∀ s, MeasurableSet s → μ s < ∞ → T s = 0) (f : α →₁ₛ[μ] E) : setToL1S T f = 0

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

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

MeasureTheory.L1.SimpleFunc.setToL1S T f = 0


protected theorem IsGδ.singleton [T1Space X] (x : X) : IsGδ ({x} : Set X)

{X : Type u_1}
[TopologicalSpace X]
[FirstCountableTopology X]
[T1Space X]
(x : X)


/-- The functor `N` for the equivalence is obtained by composing
`N' : SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ)` and the inverse
of the equivalence `ChainComplex C ℕ ≌ Karoubi (ChainComplex C ℕ)`. -/
@[simps!, nolint unusedArguments]
def N [IsIdempotentComplete C] [HasFiniteCoproducts C] : SimplicialObject C ⥤ ChainComplex C ℕ

CategoryTheory.Idempotents.DoldKan.N.obj X =
  (CategoryTheory.Idempotents.toKaroubiEquivalence (ChainComplex C ℕ)).inverse.obj (AlgebraicTopology.DoldKan.N₁.obj X)


/-- A subring `S` of `R` determines a subring `S.op` of the opposite ring `Rᵐᵒᵖ`. -/
@[simps]
def opEquiv : Subring R ≃o Subring Rᵐᵒᵖ

{R : Type u_2}
[Ring R]
(S : Subring Rᵐᵒᵖ)

(RelIso.symm Subring.opEquiv) S = S.unop


lemma homologyMap_op [HasHomology S₁] [HasHomology S₂] :
    (homologyMap φ).op =
      (S₂.homologyOpIso).inv ≫ homologyMap (opMap φ) ≫ (S₁.homologyOpIso).hom

(CategoryTheory.ShortComplex.homologyMap φ).op =
  CategoryTheory.CategoryStruct.comp S₂.homologyOpIso.inv
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap (CategoryTheory.ShortComplex.opMap φ))
      S₁.homologyOpIso.hom)


theorem lcm_dvd {x y z : R} (hxz : x ∣ z) (hyz : y ∣ z) : lcm x y ∣ z

{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{x y z : R}
(hxz : x ∣ z)
(hyz : y ∣ z)


@[simp]
theorem bind_def {α β} : ((· >>= ·) : Erased α → (α → Erased β) → Erased β) = @bind _ _


/-- Type class for compact spaces. Separation is sometimes included in the definition, especially
in the French literature, but we do not include it here. -/
class CompactSpace : Prop where
  /-- In a compact space, `Set.univ` is a compact set. -/
  isCompact_univ : IsCompact (Set.univ : Set X)

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


/-- Second technical lemma to control the growth of coefficients of the inverse. Bound the explicit
expression for `∑_{k<n+1} aᵏ Qₖ` in terms of a sum of powers of the same sum one step before,
in the specific setup we are interesting in, by reducing to the general bound in
`radius_rightInv_pos_of_radius_pos_aux1`. -/
theorem radius_rightInv_pos_of_radius_pos_aux2 {n : ℕ} (hn : 2 ≤ n + 1)
    (p : FormalMultilinearSeries 𝕜 E F) (i : E ≃L[𝕜] F) {r a C : ℝ} (hr : 0 ≤ r) (ha : 0 ≤ a)
    (hC : 0 ≤ C) (hp : ∀ n, ‖p n‖ ≤ C * r ^ n) :
    ∑ k ∈ Ico 1 (n + 1), a ^ k * ‖p.rightInv i k‖ ≤
      ‖(i.symm : F →L[𝕜] E)‖ * a +
        ‖(i.symm : F →L[𝕜] E)‖ * C *
          ∑ k ∈ Ico 2 (n + 1), (r * ∑ j ∈ Ico 1 n, a ^ j * ‖p.rightInv i j‖) ^ k

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ}
(hn : 2 ≤ n + 1)
(p : FormalMultilinearSeries 𝕜 E F)
(i : E ≃L[𝕜] F)
{r a C : ℝ}
(hr : 0 ≤ r)
(ha : 0 ≤ a)
(hC : 0 ≤ C)
(hp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n)

∑ k ∈ Finset.Ico 1 (n + 1), a ^ k * ‖p.rightInv i k‖ ≤
  ‖↑i.symm‖ * a + ‖↑i.symm‖ * C * ∑ k ∈ Finset.Ico 2 (n + 1), (r * ∑ j ∈ Finset.Ico 1 n, a ^ j * ‖p.rightInv i j‖) ^ k


/-- The tuple `(0)_v` is a finite adèle. -/
theorem zero : (0 : K_hat R K).IsFiniteAdele

{R : Type u_1}
{K : Type u_2}
[CommRing R]
[IsDedekindDomain R]
[Field K]
[Algebra R K]
[IsFractionRing R K]


@[simp]
theorem toFinsupp_sum_eq (s : Multiset α) : s.toFinsupp.sum (fun _ ↦ id) = Multiset.card s

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

((Multiset.toFinsupp s).sum fun x => id) = Multiset.card s


@[simp]
theorem lowerClosure_singleton (a : α) : lowerClosure ({a} : Set α) = LowerSet.Iic a


/-- Given a set of points, together with a chosen base point in this set, if we affinely transport
all other members of the set along the line joining them to this base point, the affine span is
unchanged. -/
theorem affineSpan_eq_affineSpan_lineMap_units [Nontrivial k] {s : Set P} {p : P} (hp : p ∈ s)
    (w : s → Units k) :
    affineSpan k (Set.range fun q : s => AffineMap.lineMap p ↑q (w q : k)) = affineSpan k s

{k : Type u_2}
{V : Type u_3}
{P : Type u_4}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[Nontrivial k]
{s : Set P}
{p : P}
(hp : p ∈ s)
(w : ↑s → kˣ)

affineSpan k (Set.range fun q => (AffineMap.lineMap p ↑q) ↑(w q)) = affineSpan k s


/--
An isomorphism of groups gives an order isomorphism between the lattices of subgroups,
defined by sending subgroups to their inverse images.

See also `MulEquiv.mapSubgroup` which maps subgroups to their forward images.
-/
@[simps]
def comapSubgroup (f : G ≃* H) : Subgroup H ≃o Subgroup G

{G : Type u_1}
[Group G]
{H : Type u_5}
[Group H]
(f : G ≃* H)

∀ (H_1 : Subgroup G), (RelIso.symm f.comapSubgroup) H_1 = Subgroup.comap (↑f.symm) H_1


@[norm_cast, simp]
-- Porting note: using `↑` didn't work, so I needed to explicitly put in the cast myself
theorem coe_inj {a b : R} : (Algebra.cast a : K) = Algebra.cast b ↔ a = b

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


theorem basis_eq_prod_sub_inv_mul_nodal_div (hi : i ∈ s) :
    Lagrange.basis s v i = C (nodalWeight s v i) * (nodal s v / (X - C (v i)))

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{s : Finset ι}
{v : ι → F}
{i : ι}
(hi : i ∈ s)

Lagrange.basis s v i =
  Polynomial.C (Lagrange.nodalWeight s v i) * (Lagrange.nodal s v / (Polynomial.X - Polynomial.C (v i)))


nonrec theorem closure_ball (x : E) {r : ℝ} (h : r ≠ 0) : closure (ball x r) = closedBall x r

{E : Type u_1}
[AddCommGroup E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[T2Space E]
[Module ℝ E]
[ContinuousSMul ℝ E]
[FiniteDimensional ℝ E]
(x : E)
{r : ℝ}
(h : r ≠ 0)

closure (Euclidean.ball x r) = Euclidean.closedBall x r


theorem prodMap_mul (f₁₂ : M →ₗ[R] M) (f₂₃ : M →ₗ[R] M) (g₁₂ : M₂ →ₗ[R] M₂) (g₂₃ : M₂ →ₗ[R] M₂) :
    f₂₃.prodMap g₂₃ * f₁₂.prodMap g₁₂ = (f₂₃ * f₁₂).prodMap (g₂₃ * g₁₂)

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


lemma rightOp_map_unop {F : Cᵒᵖ ⥤ D} {X Y} (f : X ⟶ Y) :
    (F.rightOp.map f).unop = F.map f.op

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


theorem eq_of_forall_rat_lt_iff_lt (h : ∀ q : ℚ, (q : α) < x ↔ (q : α) < y) : x = y

{α : Type u_1}
[LinearOrderedField α]
[Archimedean α]
{x y : α}
(h : ∀ (q : ℚ), ↑q < x ↔ ↑q < y)


theorem one_lt_ncard_iff (hs : s.Finite := by toFinite_tac) :
    1 < s.ncard ↔ ∃ a b, a ∈ s ∧ b ∈ s ∧ a ≠ b

{α : Type u_1}
{s : Set α}
(hs : s.Finite := by toFinite_tac)


theorem fieldRange_le : (algebraMap K L).fieldRange ≤ S.toSubfield

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


theorem tendsto_const_mul_zpow_atTop_zero {n : ℤ} {c : 𝕜} (hn : n < 0) :
    Tendsto (fun x => c * x ^ n) atTop (𝓝 0)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{n : ℤ}
{c : 𝕜}
(hn : n < 0)

Filter.Tendsto (fun x => c * x ^ n) Filter.atTop (𝓝 0)


theorem tendsto_setIntegral_of_monotone {ι : Type*} [Countable ι] [SemilatticeSup ι]
    {s : ι → Set X} (hsm : ∀ i, MeasurableSet (s i)) (h_mono : Monotone s)
    (hfi : IntegrableOn f (⋃ n, s n) μ) :
    Tendsto (fun i => ∫ x in s i, f x ∂μ) atTop (𝓝 (∫ x in ⋃ n, s n, f x ∂μ))

(hfi : MeasureTheory.IntegrableOn f (⋃ n, s n) μ)

Filter.Tendsto (fun i => ∫ (x : X) in s i, f x ∂μ) Filter.atTop (𝓝 (∫ (x : X) in ⋃ n, s n, f x ∂μ))


@[simp, norm_cast]
theorem coe_Ioo (a b : α) : (Ioo a b : Set α) = Set.Ioo a b

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


@[to_additive]
protected lemma div_mul_right (h : IsUnit a) (b : α) : a / (a * b) = 1 / b

{α : Type u}
[DivisionCommMonoid α]
{a : α}
(h : IsUnit a)
(b : α)


@[simp]
theorem equivCongrLeft_apply (f : α ≃ β) (l : α →₀ M) : equivCongrLeft f l = equivMapDomain f l

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[Zero M]
(f : α ≃ β)
(l : α →₀ M)

(Finsupp.equivCongrLeft f) l = Finsupp.equivMapDomain f l


theorem iInf_sup_iInf {ι ι' : Type*} {f : ι → α} {g : ι' → α} :
    ((⨅ i, f i) ⊔ ⨅ i, g i) = ⨅ i : ι × ι', f i.1 ⊔ g i.2

{α : Type u}
[Order.Coframe α]
{ι : Type u_1}
{ι' : Type u_2}
{f : ι → α}
{g : ι' → α}

(⨅ i, f i) ⊔ ⨅ i, g i = ⨅ i, f i.1 ⊔ g i.2


theorem OneOneEquiv.le_congr_left {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]
    {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : OneOneEquiv p q) : p ≤₁ r ↔ q ≤₁ r

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
{p : α → Prop}
{q : β → Prop}
{r : γ → Prop}
(h : OneOneEquiv p q)

p ≤₁ r ↔ q ≤₁ r


lemma isLocallyFaithful : G.IsLocallyFaithful K

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[CategoryTheory.Functor.IsDenseSubsite J K G]


theorem integralClosure_le_span_dualBasis [Algebra.IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    Subalgebra.toSubmodule (integralClosure A L) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b)

(hb_int : ∀ (i : ι), IsIntegral A (b i))

Subalgebra.toSubmodule (integralClosure A L) ≤ Submodule.span A (Set.range ⇑((Algebra.traceForm K L).dualBasis ⋯ b))


lemma densityToFinite_def (μ : Measure α) [SFinite μ] :
    μ.densityToFinite = fun a ↦ ∑' n, (sFiniteSeq μ n).rnDeriv μ.toFinite a

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

μ.densityToFinite = fun a => ∑' (n : ℕ), (MeasureTheory.sFiniteSeq μ n).rnDeriv μ.toFinite a


theorem evaln_bound : ∀ {k c n x}, x ∈ evaln k c n → n < k

{k : ℕ}
{c : Nat.Partrec.Code}
{n x : ℕ}

x ∈ Nat.Partrec.Code.evaln k c n → n < k


@[simp]
theorem cospanCompIso_inv_app_left : (cospanCompIso F f g).inv.app WalkingCospan.left = 𝟙 _

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

(CategoryTheory.Limits.cospanCompIso F f g).inv.app CategoryTheory.Limits.WalkingCospan.left =
  𝟙 ((CategoryTheory.Limits.cospan (F.map f) (F.map g)).obj CategoryTheory.Limits.WalkingCospan.left)


theorem LineDifferentiableWithinAt.congr_mono (h : LineDifferentiableWithinAt 𝕜 f s x v)
    (ht : EqOn f₁ f t) (hx : f₁ x = f x) (h₁ : t ⊆ s) :
    LineDifferentiableWithinAt 𝕜 f₁ t x v


lemma snd_δ_inr : (pullback.snd _ _ : S.P ⟶ _) ≫ S.δ ≫ (pushout.inr _ _ : _ ⟶ S.P') =
    pullback.fst _ _ ≫ S.v₁₂.τ₂ ≫ pushout.inl _ _

(S : CategoryTheory.ShortComplex.SnakeInput C)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.snd S.L₁.g S.v₀₁.τ₃)
    (CategoryTheory.CategoryStruct.comp S.δ (CategoryTheory.Limits.pushout.inr S.L₂.f S.v₂₃.τ₁)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.fst S.L₁.g S.v₀₁.τ₃)
    (CategoryTheory.CategoryStruct.comp S.v₁₂.τ₂ (CategoryTheory.Limits.pushout.inl S.L₂.f S.v₂₃.τ₁))


@[to_additive]
theorem isUnit_iff_exists_inv [CommMonoid M] {a : M} : IsUnit a ↔ ∃ b, a * b = 1

{M : Type u_1}
[AddCommMonoid M]
{a : M}


@[simp]
lemma Ico_inl_inr : Ico (inlₗ a) (inrₗ b) = ((Ici a).disjSum (Iio b)).map toLex.toEmbedding

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

Finset.Ico (Sum.inlₗ a) (Sum.inrₗ b) = Finset.map toLex.toEmbedding ((Finset.Ici a).disjSum (Finset.Iio b))


@[to_additive add_le_of_nonpos_left]
theorem mul_le_of_le_one_left' [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b : α} (h : b ≤ 1) :
    b * a ≤ a

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


protected nonrec theorem SmoothOn.coordChangeL
    (hf : SmoothOn IM IB f s) (he : MapsTo f s e.baseSet) (he' : MapsTo f s e'.baseSet) :
    SmoothOn IM 𝓘(𝕜, F →L[𝕜] F) (fun y ↦ (e.coordChangeL 𝕜 e' (f y) : F →L[𝕜] F)) s

[TopologicalSpace (Bundle.TotalSpace F E)]

{e e' : Trivialization F Bundle.TotalSpace.proj}

SmoothOn IM 𝓘(𝕜, F →L[𝕜] F) (fun y => ↑(Trivialization.coordChangeL 𝕜 e e' (f y))) s


@[simp]
theorem destruct_map (f : α → β) (s) : destruct (map f s) = lmap f (rmap (map f) (destruct s))

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

(Computation.map f s).destruct = Computation.lmap f (Computation.rmap (Computation.map f) s.destruct)


/-- The `averageMap` sends elements of `V` to the subspace of invariants.
-/
theorem averageMap_invariant (v : V) : averageMap ρ v ∈ invariants ρ

{k : Type u_1}
{G : Type u_2}
{V : Type u_3}
[CommSemiring k]
[Group G]
[AddCommMonoid V]
[Module k V]
(ρ : Representation k G V)
[Fintype G]
[Invertible ↑(Fintype.card G)]
(v : V)


theorem Set.MapsTo.closure_of_continuousOn {f : α → β} {s : Set α} {t : Set β} (h : MapsTo f s t)
    (hc : ContinuousOn f (closure s)) : MapsTo f (closure s) (closure t)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
{s : Set α}
{t : Set β}
(h : Set.MapsTo f s t)
(hc : ContinuousOn f (closure s))


lemma smul_pos_iff_of_neg_left (ha : a < 0) : 0 < a • b ↔ b < 0

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulStrictMono α β]
[PosSMulReflectLT α β]
(ha : a < 0)


/-- Left multiplication by a unit of a monoid is a permutation of the underlying type. -/
@[to_additive (attr := simps (config := .asFn) apply)
  "Left addition of an additive unit is a permutation of the underlying type."]
def mulLeft (u : Mˣ) : Equiv.Perm M

{M : Type u_6}
[AddMonoid M]
(u : AddUnits M)


theorem id_def {α : Sort u} (a : α) : id a = a


/-- Equivalences between finite types are the same as isomorphisms in `FintypeCat`. -/
@[simps]
def equivEquivIso {A B : FintypeCat} : A ≃ B ≃ (A ≅ B)

∀ (a : ↑A), (FintypeCat.equivEquivIso.symm i) a = i.hom a


protected theorem hasDerivWithinAt (x : 𝕜) (s : Set 𝕜) :
    HasDerivWithinAt (fun x => p.eval x) (p.derivative.eval x) s x

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

HasDerivWithinAt (fun x => Polynomial.eval x p) (Polynomial.eval x (Polynomial.derivative p)) s x


theorem copy_eq (e : PartialEquiv α β) (f : α → β) (hf : ⇑e = f) (g : β → α) (hg : ⇑e.symm = g)
    (s : Set α) (hs : e.source = s) (t : Set β) (ht : e.target = t) :
    e.copy f hf g hg s hs t ht = e

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)
(f : α → β)
(hf : ↑e = f)
(g : β → α)
(hg : ↑e.symm = g)
(s : Set α)
(hs : e.source = s)
(t : Set β)
(ht : e.target = t)


/-- The top `IntermediateField` is isomorphic to the field.

This is the intermediate field version of `Subalgebra.topEquiv`. -/
@[simps!]
def topEquiv : (⊤ : IntermediateField F E) ≃ₐ[F] E

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]

∀ (a : ↥⊤.toSubalgebra), IntermediateField.topEquiv a = ↑a


/--
A `ProjectiveResolution Z` consists of a bundled `ℕ`-indexed chain complex of projective objects,
along with a quasi-isomorphism to the complex consisting of just `Z` supported in degree `0`.
-/
structure ProjectiveResolution (Z : C) where
  /-- the chain complex involved in the resolution -/
  complex : ChainComplex C ℕ
  /-- the chain complex must be degreewise projective -/
  projective : ∀ n, Projective (complex.X n) := by infer_instance
  /-- the chain complex must have homology -/
  [hasHomology : ∀ i, complex.HasHomology i]
  /-- the morphism to the single chain complex with `Z` in degree `0` -/
  π : complex ⟶ (ChainComplex.single₀ C).obj Z
  /-- the morphism to the single chain complex with `Z` in degree `0` is a quasi-isomorphism -/
  quasiIso : QuasiIso π := by infer_instance

(self : CategoryTheory.ProjectiveResolution Z)


@[simp]
theorem vsub_empty (s : Set β) : s -ᵥ ∅ = ∅

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


theorem mem_map {f : α → β} {y : β} {o : Option α} : y ∈ o.map f ↔ ∃ x ∈ o, f x = y

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{y : β}
{o : Option α}

y ∈ Option.map f o ↔ ∃ x, x ∈ o ∧ f x = y


@[simp]
theorem whiskerRight_f {X₁ X₂ : Center C} (f : X₁ ⟶ X₂) (Y : Center C) : (f ▷ Y).f = f.f ▷ Y.1

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


private theorem ncs_tendsto_const :
    Tendsto (fun i => ‖F.derivative.eval (ncs i)‖) atTop (𝓝 ‖F.derivative.eval a‖)

(ncs_der_val :
  ∀ (n : ℕ), ‖Polynomial.eval (↑ncs n) (Polynomial.derivative F)‖ = ‖Polynomial.eval a (Polynomial.derivative F)‖)

Filter.Tendsto (fun i => ‖Polynomial.eval (↑ncs i) (Polynomial.derivative F)‖) Filter.atTop
  (𝓝 ‖Polynomial.eval a (Polynomial.derivative F)‖)


@[norm_cast]
theorem coe_ennreal_ne_zero {x : ℝ≥0∞} : (x : EReal) ≠ 0 ↔ x ≠ 0

↑x ≠ 0 ↔ x ≠ 0


lemma predAbove_rev_right (p : Fin n) (i : Fin (n + 1)) :
    p.predAbove i.rev = (p.rev.predAbove i).rev


lemma nndist_pi_const_le (a b : α) : (nndist (fun _ : β => a) fun _ => b) ≤ nndist a b

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

(nndist (fun x => a) fun x => b) ≤ nndist a b


lemma stdAddChar_apply (j : ZMod N) : stdAddChar j = ↑(toCircle j)


theorem cauchyPowerSeries_apply (f : ℂ → E) (c : ℂ) (R : ℝ) (n : ℕ) (w : ℂ) :
    (cauchyPowerSeries f c R n fun _ => w) =
      (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (w / (z - c)) ^ n • (z - c)⁻¹ • f z

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : ℂ → E)
(c : ℂ)
(R : ℝ)
(n : ℕ)
(w : ℂ)

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


theorem HasMFDerivWithinAt.congr_mfderiv (h : HasMFDerivWithinAt I I' f s x f') (h' : f' = f₁') :
    HasMFDerivWithinAt I I' f s x f₁'

{f' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}


theorem mem_map_iff_exists_image : t ∈ map m f ↔ ∃ s ∈ f, m '' s ⊆ t

{α : Type u}
{β : Type v}
{f : Filter α}
{m : α → β}
{t : Set β}

t ∈ Filter.map m f ↔ ∃ s ∈ f, m '' s ⊆ t


/-- `n + 1` points are affinely independent if and only if their
`vectorSpan` has dimension `n`. -/
theorem affineIndependent_iff_finrank_vectorSpan_eq [Fintype ι] (p : ι → P) {n : ℕ}
    (hc : Fintype.card ι = n + 1) :
    AffineIndependent k p ↔ finrank k (vectorSpan k (Set.range p)) = n

(k : Type u_1)
{V : Type u_2}
{P : Type u_3}
{ι : Type u_4}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[Fintype ι]
(p : ι → P)
{n : ℕ}
(hc : Fintype.card ι = n + 1)

AffineIndependent k p ↔ FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) = n


theorem det_eq_of_eq_det_one_mul {A B : Matrix n n R} (C : Matrix n n R) (hC : det C = 1)
    (hA : A = C * B) : det A = det B

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
{A B : Matrix n n R}
(C : Matrix n n R)
(hC : C.det = 1)
(hA : A = C * B)


@[simp]
theorem coequalizer.isoTargetOfSelf_hom :
    (coequalizer.isoTargetOfSelf f).hom = coequalizer.desc (𝟙 Y) (by simp)

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

(CategoryTheory.Limits.coequalizer.isoTargetOfSelf f).hom =
  CategoryTheory.Limits.coequalizer.desc (CategoryTheory.CategoryStruct.id Y) ⋯


@[ext]
lemma ext {x y : RelSeries r} (length_eq : x.length = y.length)
    (toFun_eq : x.toFun = y.toFun ∘ Fin.cast (by rw [length_eq])) : x = y

(toFun_eq : x.toFun = y.toFun ∘ Fin.cast ⋯)


@[simp, reassoc]
lemma comp_counit_app (X : E) :
    (adj₁.comp adj₂).counit.app X = H.map (adj₁.counit.app (I.obj X)) ≫ adj₂.counit.app X

[ℰ : CategoryTheory.Category.{v₃, u₃} E]

(adj₁.comp adj₂).counit.app X =
  CategoryTheory.CategoryStruct.comp (H.map (adj₁.counit.app (I.obj X))) (adj₂.counit.app X)


theorem suffixLevenshtein_minimum_le_levenshtein_append (xs ys₁ ys₂) :
    (suffixLevenshtein C xs ys₂).1.minimum ≤ levenshtein C xs (ys₁ ++ ys₂)

(↑(suffixLevenshtein C xs ys₂)).minimum ≤ ↑(levenshtein C xs (ys₁ ++ ys₂))


private irreducible_def add : R[X] → R[X] → R[X]

∀ (x x_1 : R[X]),
  Polynomial.add x x_1 =
    match x, x_1 with
    | { toFinsupp := a }, { toFinsupp := b } => { toFinsupp := a + b }


lemma XIsoOfEq_shift (K : CochainComplex C ℤ) (n : ℤ) {p q : ℤ} (hpq : p = q) :
    (K⟦n⟧).XIsoOfEq hpq = K.XIsoOfEq (show p + n = q + n by rw [hpq])

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K : CochainComplex C ℤ)
(n : ℤ)
{p q : ℤ}
(hpq : p = q)

HomologicalComplex.XIsoOfEq ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj K) hpq =
  HomologicalComplex.XIsoOfEq K ⋯


@[to_additive (attr := simp)]
theorem mem_smulAntidiagonal : x ∈ smulAntidiagonal s t a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 • x.2 = a

{G : Type u_1}
{P : Type u_2}
[VAdd G P]
{s : Set G}
{t : Set P}
{a : P}
{x : G × P}

x ∈ s.vaddAntidiagonal t a ↔ x.1 ∈ s ∧ x.2 ∈ t ∧ x.1 +ᵥ x.2 = a


theorem iSup_le_iSup_of_partialSups_le_partialSups {f g : ℕ → α}
    (h : partialSups f ≤ partialSups g) : ⨆ n, f n ≤ ⨆ n, g n

{α : Type u_1}
[CompleteLattice α]
{f g : ℕ → α}
(h : partialSups f ≤ partialSups g)


@[to_additive (attr := simp)]
theorem inv_singleton (a : α) : ({a} : Set α)⁻¹ = {a⁻¹}

{α : Type u_2}
[InvolutiveInv α]
(a : α)


@[to_additive]
theorem mem_sSup_of_directedOn {K : Set (Subgroup G)} (Kne : K.Nonempty) (hK : DirectedOn (· ≤ ·) K)
    {x : G} : x ∈ sSup K ↔ ∃ s ∈ K, x ∈ s

(hK : DirectedOn (fun x x_1 => x ≤ x_1) K)


theorem left_nhdsWithin_Ioc_neBot {a b : α} (H : a < b) : NeBot (𝓝[Ioc a b] a)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{a b : α}
(H : a < b)


theorem wEquiv.abs' {α : TypeVec n} (x y : q.P.W α)
    (h : MvQPF.abs (q.P.wDest' x) = MvQPF.abs (q.P.wDest' y)) :
    WEquiv x y

(h : MvQPF.abs ((MvQPF.P F).wDest' x) = MvQPF.abs ((MvQPF.P F).wDest' y))


@[simp]
theorem range_quotient_mk [sa : Setoid α] : (range (α := Quotient sa) fun x : α => ⟦x⟧) = univ


/-- If `M` and `M'` are each other's inverse matrices, they provide an equivalence between `n → A`
and `m → A` corresponding to `M.vecMul` and `M'.vecMul`. -/
@[simps]
def Matrix.toLinearEquivRight'OfInv [Fintype n] [DecidableEq n] {M : Matrix m n R}
    {M' : Matrix n m R} (hMM' : M * M' = 1) (hM'M : M' * M = 1) : (n → R) ≃ₗ[R] m → R

{R : Type u_1}
[Semiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype m]
[DecidableEq m]
[Fintype n]
[DecidableEq n]
{M : Matrix m n R}
{M' : Matrix n m R}
(hMM' : M * M' = 1)
(hM'M : M' * M = 1)
(a : n → R)

∀ (a_1 : m), (Matrix.toLinearEquivRight'OfInv hMM' hM'M) a a_1 = (Matrix.toLinearMapRight' M') a a_1


@[to_additive]
theorem IsLowerSet.inv (hs : IsLowerSet s) : IsUpperSet s⁻¹

{α : Type u_1}
[OrderedAddCommGroup α]
{s : Set α}
(hs : IsLowerSet s)


/-- Induction on the `∈` relation. -/
@[elab_as_elim]
theorem inductionOn {p : ZFSet → Prop} (x) (h : ∀ x, (∀ y ∈ x, p y) → p x) : p x

(h : ∀ (x : ZFSet), (∀ y ∈ x, p y) → p x)


@[simp]
theorem mk_dvdNotUnit_mk_iff {a b : α} :
    DvdNotUnit (Associates.mk a) (Associates.mk b) ↔ DvdNotUnit a b

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


theorem normSq_le_normSq_of_re_le_of_im_le {x y : ℂ} (hre : |x.re| ≤ |y.re|)
    (him : |x.im| ≤ |y.im|) : Complex.normSq x ≤ Complex.normSq y


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


theorem GameAdd.snd {a b₁ b₂ : α} (h : rα b₁ b₂) : GameAdd rα s(a, b₁) s(a, b₂)

{α : Type u_1}
{rα : α → α → Prop}
{a b₁ b₂ : α}
(h : rα b₁ b₂)


/-- If the fiber is nonempty, then the projection also is. -/
lemma toPartialEquiv_injective [Nonempty F] :
    Injective (toPartialEquiv : Pretrivialization F proj → PartialEquiv Z (B × F))

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[Nonempty F]


/-- The colimit of a functor from a finite diagram into a `SemilatticeSup` with `OrderBot`
is the supremum of the objects in the image.
-/
theorem finite_colimit_eq_finset_univ_sup [SemilatticeSup α] [OrderBot α] (F : J ⥤ α) :
    colimit F = Finset.univ.sup F.obj

{α : Type u}
{J : Type w}
[CategoryTheory.SmallCategory J]
[CategoryTheory.FinCategory J]
[SemilatticeSup α]
[OrderBot α]
(F : J ⥤ α)

CategoryTheory.Limits.colimit F = Finset.univ.sup F.obj


theorem Nodup.ndinsert (a : α) : Nodup s → Nodup (ndinsert a s)

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


@[simp]
theorem neighborSet_iInf (f : ι → G.Subgraph) (v : V) :
    (⨅ i, f i).neighborSet v = (⋂ i, (f i).neighborSet v) ∩ G.neighborSet v

{ι : Sort u_1}
{V : Type u}
{G : SimpleGraph V}
(f : ι → G.Subgraph)
(v : V)


/-- A metric outer measure is additive on a finite set of pairwise metric separated sets. -/
theorem finset_iUnion_of_pairwise_separated (hm : IsMetric μ) {I : Finset ι} {s : ι → Set X}
    (hI : ∀ i ∈ I, ∀ j ∈ I, i ≠ j → IsMetricSeparated (s i) (s j)) :
    μ (⋃ i ∈ I, s i) = ∑ i ∈ I, μ (s i)


theorem lowerSemicontinuousWithinAt_univ_iff :
    LowerSemicontinuousWithinAt f univ x ↔ LowerSemicontinuousAt f x

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

LowerSemicontinuousWithinAt f Set.univ x ↔ LowerSemicontinuousAt f x


/-- `CompactlySupportedContinuousMapClass F α β` states that `F` is a type of continuous maps with
compact support.

You should also extend this typeclass when you extend `CompactlySupportedContinuousMap`. -/
class CompactlySupportedContinuousMapClass (F : Type*) (α β : outParam <| Type*)
    [TopologicalSpace α] [Zero β] [TopologicalSpace β] [FunLike F α β]
    extends ContinuousMapClass F α β : Prop where
  /-- Each member of the class has compact support. -/
  hasCompactSupport (f : F) : HasCompactSupport f

[self : CompactlySupportedContinuousMapClass F α β]


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

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


@[simp] lemma ker_traceForm_eq_bot_of_isCartanSubalgebra
    [IsNoetherian R L] [IsArtinian R L] (H : LieSubalgebra R L) [H.IsCartanSubalgebra] :
    LinearMap.ker (LieModule.traceForm R H L) = ⊥

(R : Type u_1)
(L : Type u_3)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsKilling R L]
[IsNoetherian R L]
[IsArtinian R L]
(H : LieSubalgebra R L)
[H.IsCartanSubalgebra]

LinearMap.ker (LieModule.traceForm R (↥H) L) = ⊥


@[to_additive]
theorem mul_singleton (a : α) : s * {a} = s.image (· * a)

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

s + {a} = Finset.image (fun x => x + a) s


@[simp] theorem Bool.not_beq_false (b : Bool) : (!(b == false)) = (b == true)


/-- The inductive principle used to prove propositions about the elements of a quotient by a
    congruence relation. -/
@[to_additive (attr := elab_as_elim) "The inductive principle used to prove propositions about
the elements of a quotient by an additive congruence relation."]
protected theorem induction_on {C : c.Quotient → Prop} (q : c.Quotient) (H : ∀ x : M, C x) : C q

{M : Type u_1}
[Mul M]
{c : Con M}
{C : c.Quotient → Prop}
(q : c.Quotient)
(H : ∀ (x : M), C ↑x)


@[simp]
theorem coe_sup (p q : Seminorm 𝕜 E) : ⇑(p ⊔ q) = (p : E → ℝ) ⊔ (q : E → ℝ)

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddGroup E]
[SMul 𝕜 E]
(p q : Seminorm 𝕜 E)


/-- The uncurrying process is a continuous map between function spaces. -/
theorem continuous_uncurry [LocallyCompactSpace X] [LocallyCompactSpace Y] :
    Continuous (uncurry : C(X, C(Y, Z)) → C(X × Y, Z))

{X : Type u_2}
{Y : Type u_3}
{Z : Type u_4}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[LocallyCompactSpace X]
[LocallyCompactSpace Y]


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

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


/-- **First moment method**. The minimum of a measurable function is smaller than its integral,
while avoiding a null set. -/
theorem exists_not_mem_null_le_lintegral (hf : AEMeasurable f μ) (hN : μ N = 0) :
    ∃ x, x ∉ N ∧ f x ≤ ∫⁻ a, f a ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{N : Set α}
{f : α → ℝ≥0∞}
[MeasureTheory.IsProbabilityMeasure μ]
(hf : AEMeasurable f μ)
(hN : μ N = 0)


@[to_additive]
protected theorem mul_right_injective (h : IsUnit a) : Injective (a * ·)

{M : Type u_1}
[Monoid M]
{a : M}
(h : IsUnit a)


@[simp] theorem mk_one : (⟨1, Nat.succ_lt_succ (Nat.succ_pos n)⟩ : Fin (n + 2)) = (1 : Fin _)


theorem map_bracket_eq {I₁ I₂ : LieIdeal R L} (h : Function.Surjective f) :
    map f ⁅I₁, I₂⁆ = ⁅map f I₁, map f I₂⁆

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(f : L →ₗ⁅R⁆ L')
{I₁ I₂ : LieIdeal R L}
(h : Function.Surjective ⇑f)

LieIdeal.map f ⁅I₁, I₂⁆ = ⁅LieIdeal.map f I₁, LieIdeal.map f I₂⁆


theorem enumOrd_isNormal_iff_isClosed (hs : s.Unbounded (· < ·)) :
    IsNormal (enumOrd s) ↔ IsClosed s

(hs : Set.Unbounded (fun x x_1 => x < x_1) s)

Ordinal.IsNormal (Ordinal.enumOrd s) ↔ IsClosed s


@[simp]
theorem comap_id : comap (LinearMap.id : M →ₗ[R] M) p = p

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p : Submodule R M)


theorem le_iff_exists_sup : a ≤ b ↔ ∃ c, b = a ⊔ c

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


theorem cobounded_prod : cobounded (α × β) = (cobounded α).coprod (cobounded β)

{α : Type u_1}
{β : Type u_2}
[Bornology α]
[Bornology β]

Bornology.cobounded (α × β) = (Bornology.cobounded α).coprod (Bornology.cobounded β)


/-- A variant of `Ring.inverse_unit`. -/
@[simp]
theorem Ring.inverse_invertible (x : α) [Invertible x] : Ring.inverse x = ⅟ x

{α : Type u}
[MonoidWithZero α]
(x : α)
[Invertible x]


/-- `Fin.castLE` as an `OrderEmbedding`.

`castLEEmb h i` embeds `i` into a larger `Fin` type. -/
@[simps! apply toEmbedding]
def castLEOrderEmb (h : n ≤ m) : Fin n ↪o Fin m

(Fin.castLEOrderEmb h).toEmbedding = { toFun := Fin.castLE h, inj' := ⋯ }


@[to_additive]
theorem mk_eq_monoidOf_mk'_apply (x y) : mk x y = (monoidOf S).mk' x y

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
(x : M)
(y : ↥S)

AddLocalization.mk x y = (AddLocalization.addMonoidOf S).mk' x y


@[simp, norm_cast]
theorem comp_coe (f : M₁ ≃SL[σ₁₂] M₂) (f' : M₂ ≃SL[σ₂₃] M₃) :
    (f' : M₂ →SL[σ₂₃] M₃).comp (f : M₁ →SL[σ₁₂] M₂) = (f.trans f' : M₁ →SL[σ₁₃] M₃)

{R₁ : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{σ₂₃ : R₂ →+* R₃}
{σ₃₂ : R₃ →+* R₂}
[RingHomInvPair σ₂₃ σ₃₂]
[RingHomInvPair σ₃₂ σ₂₃]
{σ₁₃ : R₁ →+* R₃}
{σ₃₁ : R₃ →+* R₁}
[RingHomInvPair σ₁₃ σ₃₁]
[RingHomInvPair σ₃₁ σ₁₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₂ M₂]
[Module R₃ M₃]
(f : M₁ ≃SL[σ₁₂] M₂)
(f' : M₂ ≃SL[σ₂₃] M₃)


/--
A constructor for lax monoidal functors whose axioms are described by `tensorHom` instead of
`whiskerLeft` and `whiskerRight`.
-/
@[simps]
def LaxMonoidalFunctor.ofTensorHom (F : C ⥤ D)
    /- unit morphism -/
    (ε : 𝟙_ D ⟶ F.obj (𝟙_ C))
    /- tensorator -/
    (μ : ∀ X Y : C, F.obj X ⊗ F.obj Y ⟶ F.obj (X ⊗ Y))
    (μ_natural :
      ∀ {X Y X' Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y'),
        (F.map f ⊗ F.map g) ≫ μ Y Y' = μ X X' ≫ F.map (f ⊗ g) := by
      aesop_cat)
    /- associativity of the tensorator -/
    (associativity :
      ∀ X Y Z : C,
        (μ X Y ⊗ 𝟙 (F.obj Z)) ≫ μ (X ⊗ Y) Z ≫ F.map (α_ X Y Z).hom =
          (α_ (F.obj X) (F.obj Y) (F.obj Z)).hom ≫ (𝟙 (F.obj X) ⊗ μ Y Z) ≫ μ X (Y ⊗ Z) := by
      aesop_cat)
    /- unitality -/
    (left_unitality :
      ∀ X : C, (λ_ (F.obj X)).hom = (ε ⊗ 𝟙 (F.obj X)) ≫ μ (𝟙_ C) X ≫ F.map (λ_ X).hom := by
        aesop_cat)
    (right_unitality :
      ∀ X : C, (ρ_ (F.obj X)).hom = (𝟙 (F.obj X) ⊗ ε) ≫ μ X (𝟙_ C) ≫ F.map (ρ_ X).hom := by
        aesop_cat) :
        LaxMonoidalFunctor C D

(μ :
  (X Y : C) →
    CategoryTheory.MonoidalCategory.tensorObj (F.obj X) (F.obj Y) ⟶
      F.obj (CategoryTheory.MonoidalCategory.tensorObj X Y))

(μ_natural :
  ∀ {X Y X' Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y'),
    CategoryTheory.MonoidalCategory.tensorHom (F.map f) (F.map g) ≫ μ Y Y' =
      μ X X' ≫ F.map (CategoryTheory.MonoidalCategory.tensorHom f g) := by
  aesop_cat)

(associativity :
  ∀ (X Y Z : C),
    CategoryTheory.MonoidalCategory.tensorHom (μ X Y) (𝟙 (F.obj Z)) ≫
        μ (CategoryTheory.MonoidalCategory.tensorObj X Y) Z ≫
          F.map (CategoryTheory.MonoidalCategory.associator X Y Z).hom =
      (CategoryTheory.MonoidalCategory.associator (F.obj X) (F.obj Y) (F.obj Z)).hom ≫
        CategoryTheory.MonoidalCategory.tensorHom (𝟙 (F.obj X)) (μ Y Z) ≫
          μ X (CategoryTheory.MonoidalCategory.tensorObj Y Z) := by
  aesop_cat)

(left_unitality :
  ∀ (X : C),
    (CategoryTheory.MonoidalCategory.leftUnitor (F.obj X)).hom =
      CategoryTheory.MonoidalCategory.tensorHom ε (𝟙 (F.obj X)) ≫
        μ (𝟙_ C) X ≫ F.map (CategoryTheory.MonoidalCategory.leftUnitor X).hom := by
  aesop_cat)

(right_unitality :
  ∀ (X : C),
    (CategoryTheory.MonoidalCategory.rightUnitor (F.obj X)).hom =
      CategoryTheory.MonoidalCategory.tensorHom (𝟙 (F.obj X)) ε ≫
        μ X (𝟙_ C) ≫ F.map (CategoryTheory.MonoidalCategory.rightUnitor X).hom := by
  aesop_cat)

∀ (a : C),
  (CategoryTheory.LaxMonoidalFunctor.ofTensorHom F ε μ μ_natural associativity left_unitality right_unitality).obj a =
    F.obj a


@[simp] lemma compls_subset_compls : s₁ᶜˢ ⊆ s₂ᶜˢ ↔ s₁ ⊆ s₂

{α : Type u_2}
[BooleanAlgebra α]
{s₁ s₂ : Finset α}


/-- We state it as a simp lemma, which is regarded as an involved version of
`id_whiskerRight f g : 𝟙 f ▷ g = 𝟙 (f ≫ g)`.
-/
@[reassoc, simp]
theorem leftUnitor_whiskerRight (f : a ⟶ b) (g : b ⟶ c) :
    (λ_ f).hom ▷ g = (α_ (𝟙 a) f g).hom ≫ (λ_ (f ≫ g)).hom

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

CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.leftUnitor f).hom g =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator (CategoryTheory.CategoryStruct.id a) f g).hom
    (CategoryTheory.Bicategory.leftUnitor (CategoryTheory.CategoryStruct.comp f g)).hom


@[csimp] theorem tails_eq_tailsTR : @tails = @tailsTR


@[to_additive neg_lt]
theorem inv_lt' : a⁻¹ < b ↔ b⁻¹ < a

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

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


theorem abs_toReal_eq_pi_div_two_iff {θ : Angle} :
    |θ.toReal| = π / 2 ↔ θ = (π / 2 : ℝ) ∨ θ = (-π / 2 : ℝ)


theorem zmultiples_natAbs (a : ℤ) :
    AddSubgroup.zmultiples (a.natAbs : ℤ) = AddSubgroup.zmultiples a

AddSubgroup.zmultiples ↑a.natAbs = AddSubgroup.zmultiples a


/-- The only prime divisor of positive prime power `p^k` is `p` itself -/
lemma primeFactors_prime_pow (hk : k ≠ 0) (hp : Prime p) :
    (p ^ k).primeFactors = {p}

{k p : ℕ}
(hk : k ≠ 0)
(hp : Nat.Prime p)


theorem dvd_gcd {i j k : ℤ} (h1 : k ∣ i) (h2 : k ∣ j) : k ∣ gcd i j


theorem supp_quot_supp : supp (v.onQuot le_rfl) = 0

{R : Type u_1}
{Γ₀ : Type u_2}
[CommRing R]
[LinearOrderedCommMonoidWithZero Γ₀]
(v : Valuation R Γ₀)


@[simp]
theorem destutter_eq_nil : ∀ {l : List α}, destutter R l = [] ↔ l = []

{α : Type u_1}
(R : α → α → Prop)
[DecidableRel R]
{l : List α}


theorem foldr_permutationsAux2 (t : α) (ts : List α) (r L : List (List α)) :
    foldr (fun y r => (permutationsAux2 t ts r y id).2) r L =
      (L.bind fun y => (permutationsAux2 t ts [] y id).2) ++ r

{α : Type u_1}
(t : α)
(ts : List α)
(r L : List (List α))

List.foldr (fun y r => (List.permutationsAux2 t ts r y id).2) r L =
  (L.bind fun y => (List.permutationsAux2 t ts [] y id).2) ++ r


@[simp]
theorem germ_comp_stalkToFiberRingHom (U : Opens (PrimeSpectrum.Top R)) (x : U) :
    (structureSheaf R).presheaf.germ x ≫ stalkToFiberRingHom R x = openToLocalization R U x x.2

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(AlgebraicGeometry.Spec.structureSheaf R).presheaf.germ x ≫ AlgebraicGeometry.StructureSheaf.stalkToFiberRingHom R ↑x =
  AlgebraicGeometry.StructureSheaf.openToLocalization R U ↑x ⋯


theorem CPolynomialAt_congr (h : f =ᶠ[𝓝 x] g) : CPolynomialAt 𝕜 f x ↔ CPolynomialAt 𝕜 g x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{x : E}
(h : f =ᶠ[𝓝 x] g)


theorem hasTerminalChangeDiagram (h : HasLimit F₁) : HasLimit F₂

{F₁ : CategoryTheory.Discrete PEmpty.{w + 1} ⥤ C}

{F₂ : CategoryTheory.Discrete PEmpty.{w' + 1} ⥤ C}


/-- An equivalence between `ℕ × ℕ` and `ℕ`. -/
@[simps (config := .asFn)]
def pairEquiv : ℕ × ℕ ≃ ℕ

⇑Nat.pairEquiv = Function.uncurry Nat.pair


/-- If `α` is a linear succ order, `β` is a preorder, and `f : α → β` is an antitone function, then
the intervals `Set.Ioc (f (Order.succ n)) (f n)` are pairwise disjoint. -/
theorem pairwise_disjoint_on_Ioc_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :
    Pairwise (Disjoint on fun n => Ioc (f (succ n)) (f n))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[SuccOrder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)

Pairwise (Disjoint on fun n => Set.Ioc (f (Order.succ n)) (f n))


theorem map_append_stream (f : α → β) :
    ∀ (l : List α) (s : Stream' α), map f (l ++ₛ s) = List.map f l ++ₛ map f s

{α : Type u}
{β : Type v}
(f : α → β)
(l : List α)
(s : Stream' α)

Stream'.map f (l ++ₛ s) = List.map f l ++ₛ Stream'.map f s


theorem norm_setIntegral_le_of_norm_le_const_ae'' {C : ℝ} (hs : μ s < ∞) (hsm : MeasurableSet s)
    (hC : ∀ᵐ x ∂μ, x ∈ s → ‖f x‖ ≤ C) : ‖∫ x in s, f x ∂μ‖ ≤ C * (μ s).toReal

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{s : Set X}
{μ : MeasureTheory.Measure X}
{C : ℝ}
(hs : μ s < ⊤)
(hsm : MeasurableSet s)
(hC : ∀ᵐ (x : X) ∂μ, x ∈ s → ‖f x‖ ≤ C)

‖∫ (x : X) in s, f x ∂μ‖ ≤ C * (μ s).toReal


theorem IsMinOn.sub (hf : IsMinOn f s a) (hg : IsMaxOn g s a) :
    IsMinOn (fun x => f x - g x) s a

{α : Type u}
{β : Type v}
[OrderedAddCommGroup β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsMinOn f s a)
(hg : IsMaxOn g s a)


theorem IsQF.toPrenexImp :
    ∀ {φ ψ : L.BoundedFormula α n}, φ.IsQF → φ.toPrenexImp ψ = φ.toPrenexImpRight ψ

{L : FirstOrder.Language}
{α : Type u'}
{n : ℕ}
{φ ψ : L.BoundedFormula α n}


/-- For every prime `p` dividing the order of a finite group `G` there exists an element of order
`p` in `G`. This is known as Cauchy's theorem. -/
@[to_additive]
theorem _root_.exists_prime_orderOf_dvd_card' {G : Type*} [Group G] [Finite G] (p : ℕ)
    [hp : Fact p.Prime] (hdvd : p ∣ Nat.card G) : ∃ x : G, orderOf x = p

{G : Type u_3}
[Group G]
[Finite G]
(p : ℕ)
[hp : Fact (Nat.Prime p)]
(hdvd : p ∣ Nat.card G)


@[simp]
theorem coe_restrict (f : α →ᵇ β) (s : Set α) : ⇑(f.restrict s) = f ∘ (↑)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
(f : BoundedContinuousFunction α β)
(s : Set α)


theorem mem_iInter_of_mem {s : ι → Set α} {a : α} (h : ∀ i, a ∈ s i) : a ∈ ⋂ i, s i

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


theorem Finite.exists_ge [IsDirected α (· ≥ ·)] (f : β → α) : ∃ M, ∀ i, M ≤ f i

{α : Type u_1}
{β : Type u_2}
[Finite β]
[Nonempty α]
[Preorder α]
[IsDirected α fun x x_1 => x ≥ x_1]
(f : β → α)


lemma disjoint_singleton : Disjoint ({a} : Set α) {b} ↔ a ≠ b


@[to_additive]
theorem inv_mul_le_iff_le_mul' : c⁻¹ * a ≤ b ↔ a ≤ b * c

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


theorem toDual_lt_iff {a : WithBot α} {b : WithTop αᵒᵈ} :
    WithBot.toDual a < b ↔ WithTop.ofDual b < a

{α : Type u_1}
[LT α]
{a : WithBot α}
{b : WithTop αᵒᵈ}


/-- `Sigma.curry` as a monotone function. -/
@[simps]
def monotoneCurry [(x y : _) → Preorder <| γ x y] :
    (∀ x : Σa, β a, γ x.1 x.2) →o ∀ (a) (b : β a), γ a b

[(x : α) → (y : β x) → Preorder (γ x y)]

(f : (x : (a : α) × β a) → γ x.fst x.snd)

(Pi.monotoneCurry α β γ) f x y = Sigma.curry f x y


/-- Any infinite type can be endowed a field structure. -/
theorem Infinite.nonempty_field {α : Type u} [Infinite α] : Nonempty (Field α)


/-- If `g : ℝ → ℝ` is periodic with period `T > 0` and `0 < ∫ x in 0..T, g x`, then
`t ↦ ∫ x in 0..t, g x` tends to `-∞` as `t` tends to `-∞`. -/
theorem tendsto_atBot_intervalIntegral_of_pos (h₀ : 0 < ∫ x in (0)..T, g x) (hT : 0 < T) :
    Tendsto (fun t => ∫ x in (0)..t, g x) atBot atBot

(h_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g MeasureTheory.volume t₁ t₂)

Filter.Tendsto (fun t => ∫ (x : ℝ) in 0 ..t, g x) Filter.atBot Filter.atBot


/-- The normalized Moore complex functor, on objects.
-/
@[simps!]
def obj (X : SimplicialObject C) : ChainComplex C ℕ

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
(X : CategoryTheory.SimplicialObject C)
(i j : ℕ)

(AlgebraicTopology.NormalizedMooreComplex.obj X).d i j =
  if h : i = j + 1 then
    CategoryTheory.eqToHom ⋯ ≫
      match j with
      | 0 =>
        (Finset.univ.inf fun k => CategoryTheory.Limits.kernelSubobject (X.δ k.succ)).arrow ≫
          X.δ 0 ≫ CategoryTheory.inv ⊤.arrow
      | n.succ =>
        (Finset.univ.inf fun k => CategoryTheory.Limits.kernelSubobject (X.δ k.succ)).factorThru
          ((Finset.univ.inf fun k => CategoryTheory.Limits.kernelSubobject (X.δ k.succ)).arrow ≫ X.δ 0) ⋯
  else 0


theorem mem_permutations_of_perm_lemma {is l : List α}
    (H : l ~ [] ++ is → (∃ (ts' : _) (_ : ts' ~ []), l = ts' ++ is) ∨ l ∈ permutationsAux is []) :
    l ~ is → l ∈ permutations is

(H : l.Perm ([] ++ is) → (∃ ts', ∃ (_ : ts'.Perm []), l = ts' ++ is) ∨ l ∈ is.permutationsAux [])


@[simp] lemma infClosed_singleton : InfClosed ({a} : Set α)

{α : Type u_2}
[SemilatticeInf α]
{a : α}


@[simp]
theorem multichoose_eq_multichoose (r : R) (n : ℕ) :
    BinomialRing.multichoose r n = multichoose r n

{R : Type u_1}
[AddCommMonoid R]
[Pow R ℕ]
[BinomialRing R]
(r : R)
(n : ℕ)

BinomialRing.multichoose r n = Ring.multichoose r n


@[simp]
theorem snoc_comp_nat_add {n m : ℕ} {α : Sort _} (f : Fin (m + n) → α) (a : α) :
    (snoc f a : Fin _ → α) ∘ (natAdd m : Fin (n + 1) → Fin (m + n + 1)) =
      snoc (f ∘ natAdd m) a

{n m : ℕ}
{α : Type u_1}
(f : Fin (m + n) → α)
(a : α)

Fin.snoc f a ∘ Fin.natAdd m = Fin.snoc (f ∘ Fin.natAdd m) a


@[simp]
theorem smul_apply (f : SlashInvariantForm Γ k) (n : α) (z : ℍ) : (n • f) z = n • f z

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
{α : Type u_2}
[SMul α ℂ]
[IsScalarTower α ℂ ℂ]
(f : SlashInvariantForm Γ k)
(n : α)
(z : ℍ)


@[simp]
theorem polar_zero_left (y : M) : polar Q 0 y = 0

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)
(y : M)


/-- The infimum of a set of congruence relations is the same as the infimum of the set's image
    under the map to the underlying equivalence relation. -/
theorem sInf_toSetoid (S : Set (RingCon R)) : (sInf S).toSetoid = sInf ((·.toSetoid) '' S)

{R : Type u_2}
[Add R]
[Mul R]
(S : Set (RingCon R))

(sInf S).toSetoid = sInf ((fun x => x.toSetoid) '' S)


theorem map_zero₂ (f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P) (y) : f 0 y = 0

{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
{R₂ : Type u_3}
[Semiring R₂]
{S₂ : Type u_4}
[Semiring S₂]
{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module S N]
[Module R₂ P]
[Module S₂ P]
[SMulCommClass S₂ R₂ P]
{ρ₁₂ : R →+* R₂}
{σ₁₂ : S →+* S₂}
(f : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P)
(y : N)


@[simp]
theorem ι_eq_algebraMap_iff (x : M) (r : R) : ι R x = algebraMap R _ r ↔ x = 0 ∧ r = 0

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(x : M)
(r : R)

(TensorAlgebra.ι R) x = (algebraMap R (TensorAlgebra R M)) r ↔ x = 0 ∧ r = 0


@[simp]
theorem sum_single (f : MonoidAlgebra k G) : f.sum single = f

{k : Type u₁}
{G : Type u₂}
[Semiring k]
(f : MonoidAlgebra k G)


lemma ofCauchy_div (f g) : (⟨f / g⟩ : ℝ) = (⟨f⟩ : ℝ) / (⟨g⟩ : ℝ)

{ cauchy := f / g } = { cauchy := f } / { cauchy := g }


theorem Coprime.gcd_right (k : Nat) (hmn : Coprime m n) : Coprime m (gcd k n)

{m n : Nat}
(k : Nat)
(hmn : m.Coprime n)


@[simp]
theorem coe_coeRingHom [Semiring R] : (coeRingHom l : (α → R) → Germ l R) = ofFun

{α : Type u_1}
{l : Filter α}
{R : Type u_5}
[Semiring R]

⇑(Filter.Germ.coeRingHom l) = Filter.Germ.ofFun


theorem tan_periodic : Function.Periodic tan (π : Angle)


/-- The exponential pdf is nonnegative-/
lemma exponentialPDFReal_nonneg {r : ℝ} (hr : 0 < r) (x : ℝ) :
    0 ≤ exponentialPDFReal r x

0 ≤ ProbabilityTheory.exponentialPDFReal r x


theorem le_hitting {m : ι} (hnm : n ≤ m) (ω : Ω) : n ≤ hitting u s n m ω

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
[ConditionallyCompleteLinearOrder ι]
{u : ι → Ω → β}
{s : Set β}
{n m : ι}
(hnm : n ≤ m)
(ω : Ω)


theorem rank_le_range (f : V →ₗ[K] V') : rank f ≤ Module.rank K V'

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


/-- We say that a type has `MeasurableSup` if `(c ⊔ ·)` and `(· ⊔ c)` are measurable functions.
For a typeclass assuming measurability of `uncurry (· ⊔ ·)` see `MeasurableSup₂`. -/
class MeasurableSup (M : Type*) [MeasurableSpace M] [Sup M] : Prop where
  measurable_const_sup : ∀ c : M, Measurable (c ⊔ ·)
  measurable_sup_const : ∀ c : M, Measurable (· ⊔ c)

{M : Type u_1}
[MeasurableSpace M]
[Sup M]
[self : MeasurableSup M]
(c : M)


/-- The only continuous ring homomorphisms from `ℂ` to `ℂ` are the identity and the complex
conjugation. -/
theorem ringHom_eq_id_or_conj_of_continuous {f : ℂ →+* ℂ} (hf : Continuous f) :
    f = RingHom.id ℂ ∨ f = conj


/-- Evaluate a polynomial `p` in the scalar semiring `R` at an element `x` in the target `S` using
scalar multiple `R`-action. -/
irreducible_def smeval : S

{R : Type u_3}
[Semiring R]
(p : Polynomial R)
{S : Type u_4}
[AddCommMonoid S]
[Pow S ℕ]
[MulActionWithZero R S]
(x : S)

p.smeval x = p.sum (Polynomial.smul_pow x)


theorem splits_prod_iff {ι : Type u} {s : ι → K[X]} {t : Finset ι} :
    (∀ j ∈ t, s j ≠ 0) → ((∏ x ∈ t, s x).Splits i ↔ ∀ j ∈ t, (s j).Splits i)

{K : Type v}
{L : Type w}
[Field K]
[Field L]
(i : K →+* L)
{ι : Type u}
{s : ι → K[X]}
{t : Finset ι}

(∀ j ∈ t, s j ≠ 0) → (Polynomial.Splits i (∏ x ∈ t, s x) ↔ ∀ j ∈ t, Polynomial.Splits i (s j))


@[simp]
theorem foldl_join (f : α → β → α) :
    ∀ (a : α) (L : List (List β)), foldl f a (join L) = foldl (foldl f) a L

{α : Type u}
{β : Type v}
(f : α → β → α)
(a : α)
(L : List (List β))

List.foldl f a L.join = List.foldl (List.foldl f) a L


@[elab_as_elim]
theorem Finite.induction_on {C : Set α → Prop} {s : Set α} (h : s.Finite) (H0 : C ∅)
    (H1 : ∀ {a s}, a ∉ s → Set.Finite s → C s → C (insert a s)) : C s

(H1 : ∀ {a : α} {s : Set α}, a ∉ s → s.Finite → C s → C (insert a s))


/-- The trivial zeroes of the sine zeta function. -/
theorem sinZeta_neg_two_mul_nat_sub_one (a : UnitAddCircle) (n : ℕ) :
    sinZeta a (-2 * n - 1) = 0


lemma shortComplexH0_exact : (shortComplexH0 A).Exact

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)


@[simp]
theorem zero_comp (f : E →ₛₗ[σ₁₂] E₂) : (0 : Seminorm 𝕜₂ E₂).comp f = 0

{𝕜 : Type u_3}
{𝕜₂ : Type u_4}
{E : Type u_7}
{E₂ : Type u_8}
[SeminormedRing 𝕜]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[AddCommGroup E]
[AddCommGroup E₂]
[Module 𝕜 E]
[Module 𝕜₂ E₂]
(f : E →ₛₗ[σ₁₂] E₂)


@[to_additive (attr := simp, norm_cast)]
lemma op_nnratCast [NNRatCast α] (q : ℚ≥0) : op (q : α) = q


theorem reduceOption_concat_of_some (l : List (Option α)) (x : α) :
    (l.concat (some x)).reduceOption = l.reduceOption.concat x

{α : Type u_1}
(l : List (Option α))
(x : α)


theorem Nat.cast_withBot (n : ℕ) : Nat.cast n = WithBot.some n


@[reassoc (attr := simp)]
lemma isoHomologyι_hom_inv_id :
    K.homologyι i ≫ (K.isoHomologyι i j hj h).inv = 𝟙 _

K.homologyι i ≫ (K.isoHomologyι i j hj h).inv = 𝟙 (K.homology i)


@[mono]
protected theorem toFinset_subset_toFinset : hs.toFinset ⊆ ht.toFinset ↔ s ⊆ t

{α : Type u}
{s t : Set α}
{hs : s.Finite}
{ht : t.Finite}


@[simp]
theorem skewAdjointLieSubalgebraEquiv_apply
    (f : skewAdjointLieSubalgebra (B.compl₁₂ (Qₗ := N) (Qₗ' := N) ↑e ↑e)) :
    ↑(skewAdjointLieSubalgebraEquiv B e f) = e.lieConj f

(f : ↥(skewAdjointLieSubalgebra (LinearMap.compl₁₂ B ↑e ↑e)))

↑((skewAdjointLieSubalgebraEquiv B e) f) = e.lieConj ↑f


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

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


theorem has_unit_speed_naturalParameterization (f : α → E) {s : Set α}
    (hf : LocallyBoundedVariationOn f s) {a : α} (as : a ∈ s) :
    HasUnitSpeedOn (naturalParameterization f s a) (variationOnFromTo f s a '' s)

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{a : α}
(as : a ∈ s)


theorem conjugate_le_conjugate {a b : R} (hab : a ≤ b) (c : R) :
    star c * a * c ≤ star c * b * c

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{a b : R}
(hab : a ≤ b)
(c : R)


@[to_additive (attr := simp)]
theorem coe_mul_interval : (↑(s * t) : Interval α) = s * t

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

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


/-- If a localizer morphism `Φ` is a localized equivalence, then it is a right
derivability structure if the categories of right resolutions are connected and the
categories of right resolutions of arrows are nonempty. -/
lemma mk' : Φ.IsRightDerivabilityStructure

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)

[∀ (X₂ : C₂), CategoryTheory.IsConnected (Φ.RightResolution X₂)]


@[simp]
theorem T_pow (m : ℤ) (n : ℕ) : (T m ^ n : R[T;T⁻¹]) = T (n * m)

{R : Type u_1}
[Semiring R]
(m : ℤ)
(n : ℕ)

LaurentPolynomial.T m ^ n = LaurentPolynomial.T (↑n * m)


theorem card_support_eraseLead_add_one (h : f ≠ 0) :
    f.eraseLead.support.card + 1 = f.support.card

{R : Type u_1}
[Semiring R]
{f : R[X]}
(h : f ≠ 0)


@[simp] lemma isClosed_top : c.IsClosed ⊤

{α : Type u_1}
[PartialOrder α]
[OrderTop α]
(c : ClosureOperator α)


@[to_additive] lemma IsMulFreimanHom.mul (h₁ : IsMulFreimanHom n A B₁ f₁)
    (h₂ : IsMulFreimanHom n A B₂ f₂) : IsMulFreimanHom n A (B₁ * B₂) (f₁ * f₂)

{α : Type u_2}
{β : Type u_3}
[AddCommMonoid α]
[AddCommMonoid β]
{A : Set α}
{B₁ B₂ : Set β}
{f₁ f₂ : α → β}
{n : ℕ}
(h₁ : IsAddFreimanHom n A B₁ f₁)
(h₂ : IsAddFreimanHom n A B₂ f₂)


/-- The inverse of a map which preserves multiplication,
preserves multiplication when the target is commutative. -/
@[to_additive
      "The negation of a map which preserves addition, preserves addition
      when the target is commutative."]
theorem inv {α β} [MulOneClass α] [CommGroup β] {f : α → β} (hf : IsMonoidHom f) :
    IsMonoidHom fun a => (f a)⁻¹

{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[CommGroup β]
{f : α → β}
(hf : IsMonoidHom f)


@[simp]
theorem pullbackZeroZeroIso_hom_fst (X Y : C) [HasBinaryProduct X Y] :
    (pullbackZeroZeroIso X Y).hom ≫ prod.fst = pullback.fst 0 0

(CategoryTheory.Limits.pullbackZeroZeroIso X Y).hom ≫ CategoryTheory.Limits.prod.fst =
  CategoryTheory.Limits.pullback.fst 0 0


@[to_additive]
theorem smul_subset_smul_right : s₁ ⊆ s₂ → s₁ • t ⊆ s₂ • t

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s₁ s₂ : Set α}
{t : Set β}

s₁ ⊆ s₂ → s₁ +ᵥ t ⊆ s₂ +ᵥ t


theorem edist_triangle4 (x y z t : α) : edist x t ≤ edist x y + edist y z + edist z t

{α : Type u}
[PseudoEMetricSpace α]
(x y z t : α)


@[simp]
lemma mvPolynomialQuotientEquiv_apply (p : MvPolynomial Unit R) :
    mvPolynomialQuotientEquiv S r (Ideal.Quotient.mk _ p) = aeval (S₁ := S) (fun _ ↦ invSelf r) p

{R : Type u_2}
[CommRing R]
(S : Type u_3)
[CommRing S]
[Algebra R S]
(r : R)
[IsLocalization.Away r S]
(p : MvPolynomial Unit R)

(IsLocalization.Away.mvPolynomialQuotientEquiv S r)
    ((Ideal.Quotient.mk (Ideal.span {MvPolynomial.C r * MvPolynomial.X () - 1})) p) =
  (MvPolynomial.aeval fun x => IsLocalization.Away.invSelf r) p


@[simp]
theorem refl_apply (x : P₁) : refl k P₁ x = x

(k : Type u_1)
(P₁ : Type u_2)
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(x : P₁)


/-- If `C` holds for the `algebraMap` of `r : R` into `ExteriorAlgebra R M`, the `ι` of `x : M`,
and is preserved under addition and muliplication, then it holds for all of `ExteriorAlgebra R M`.
-/
@[elab_as_elim]
theorem induction {C : ExteriorAlgebra R M → Prop}
    (algebraMap : ∀ r, C (algebraMap R (ExteriorAlgebra R M) r)) (ι : ∀ x, C (ι R x))
    (mul : ∀ a b, C a → C b → C (a * b)) (add : ∀ a b, C a → C b → C (a + b))
    (a : ExteriorAlgebra R M) : C a

(algebraMap : ∀ (r : R), C ((algebraMap R (ExteriorAlgebra R M)) r))

(ι : ∀ (x : M), C ((ExteriorAlgebra.ι R) x))

(mul : ∀ (a b : ExteriorAlgebra R M), C a → C b → C (a * b))

(add : ∀ (a b : ExteriorAlgebra R M), C a → C b → C (a + b))


@[simp]
theorem domain_sup (f g : E →ₗ.[R] F)
    (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) :
    (f.sup g h).domain = f.domain ⊔ g.domain

(h : ∀ (x : ↥f.domain) (y : ↥g.domain), ↑x = ↑y → ↑f x = ↑g y)


theorem Duplicate.of_duplicate_cons {y : α} (h : x ∈+ y :: l) (hx : x ≠ y) : x ∈+ l

{α : Type u_1}
{l : List α}
{x y : α}
(h : List.Duplicate x (y :: l))
(hx : x ≠ y)


theorem denote_monomialToExpr (ctx : Context) (k : Nat) (v : Var) : (monomialToExpr k v).denote ctx = k * v.denote ctx

(ctx : Nat.Linear.Context)
(k : Nat)
(v : Nat.Linear.Var)

Nat.Linear.Expr.denote ctx (Nat.Linear.monomialToExpr k v) = k * Nat.Linear.Var.denote ctx v


@[to_additive (attr := simp)]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
    F.map f ≫ coconeMorphism.{v, u} F j' = coconeMorphism F j

{J : Type v}
[CategoryTheory.SmallCategory J]
(F : J ⥤ MonCatMax)
[CategoryTheory.IsFiltered J]
{j j' : J}
(f : j ⟶ j')

F.map f ≫ MonCat.FilteredColimits.coconeMorphism F j' = MonCat.FilteredColimits.coconeMorphism F j


theorem subset_bipolar (s : Set E) : s ⊆ B.flip.polar (B.polar s)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedCommRing 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
(s : Set E)


lemma _root_.MeasureTheory.AEStronglyMeasurable.fourierSMulRight
    [SecondCountableTopologyEither V (W →L[ℝ] ℝ)] [MeasurableSpace V] [BorelSpace V]
    {L : V →L[ℝ] W →L[ℝ] ℝ} {f : V → E} {μ : Measure V}
    (hf : AEStronglyMeasurable f μ) :
    AEStronglyMeasurable (fun v ↦ fourierSMulRight L f v) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun v => VectorFourier.fourierSMulRight L f v) μ


@[reassoc (attr := simp)]
lemma associator_inv_fst_snd (X Y Z : C) :
    (α_ X Y Z).inv ≫ fst _ _ ≫ snd _ _ = snd _ _ ≫ fst _ _

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.ChosenFiniteProducts.fst (CategoryTheory.MonoidalCategory.tensorObj X Y) Z)
      (CategoryTheory.ChosenFiniteProducts.snd X Y)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.ChosenFiniteProducts.snd X (CategoryTheory.MonoidalCategory.tensorObj Y Z))
    (CategoryTheory.ChosenFiniteProducts.fst Y Z)


lemma isTheta_deriv_rpow_p_mul_one_add_smoothingFn {p : ℝ} (hp : p ≠ 0) :
    (fun x => ‖deriv (fun z => z ^ p * (1 + ε z)) x‖) =Θ[atTop] fun z => z ^ (p-1)

(fun x => ‖deriv (fun z => z ^ p * (1 + AkraBazziRecurrence.smoothingFn z)) x‖) =Θ[Filter.atTop] fun z => z ^ (p - 1)


@[simp]
theorem mem_basicOpen_top (f : Γ(X, ⊤)) (x : X) :
    x ∈ X.basicOpen f ↔ IsUnit (X.presheaf.germ (⟨x, trivial⟩ : (⊤ : Opens _)) f)

(X : AlgebraicGeometry.Scheme)
(f : ↑(X.presheaf.obj (Opposite.op ⊤)))
(x : ↑↑X.toPresheafedSpace)

x ∈ X.basicOpen f ↔ IsUnit ((X.presheaf.germ ⟨x, trivial⟩) f)


@[simp] theorem getLast?_reverse (l : List α) : l.reverse.getLast? = l.head?


theorem logb_le_iff_le_rpow (hx : 0 < x) : logb b x ≤ y ↔ x ≤ b ^ y


theorem smul_one_tprod_asModule (r : MonoidAlgebra k G) (x : V) (y : W) :
    -- Porting note: required to since Lean 4 doesn't unfold asModule
    let y' : ρW.asModule := y
    let z : (1 ⊗ ρW).asModule := x ⊗ₜ y
    r • z = x ⊗ₜ (r • y')

{k : Type u_1}
{G : Type u_2}
{V : Type u_3}
{W : Type u_4}
[CommSemiring k]
[Monoid G]
[AddCommMonoid V]
[Module k V]
[AddCommMonoid W]
[Module k W]
(ρW : Representation k G W)
(r : MonoidAlgebra k G)
(x : V)
(y : W)

let y' := y;
let z := x ⊗ₜ[k] y;
r • z = x ⊗ₜ[k] (r • y')


theorem Context.evalList_sort_congr
  (ctx : Context α)
  (h : Commutative ctx.op)
  (h₂ : evalList α ctx a = evalList α ctx b)
  (h₃ : a ≠ [])
  (h₄ : b ≠ [])
  : evalList α ctx (sort.loop a c) = evalList α ctx (sort.loop b c)

(h₂ : Lean.Data.AC.evalList α ctx a = Lean.Data.AC.evalList α ctx b)

Lean.Data.AC.evalList α ctx (Lean.Data.AC.sort.loop a c) = Lean.Data.AC.evalList α ctx (Lean.Data.AC.sort.loop b c)


theorem ext_ring_iff {σ : R →+* R} {f g : R →ₛₗ[σ] M} : f = g ↔ f 1 = g 1

{R : Type u_1}
{M : Type u_9}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{σ : R →+* R}
{f g : R →ₛₗ[σ] M}


@[to_additive]
theorem unop_iInf (S : ι → Submonoid Mᵐᵒᵖ) : (iInf S).unop = ⨅ i, (S i).unop

{ι : Sort u_1}
{M : Type u_2}
[MulOneClass M]
(S : ι → Submonoid Mᵐᵒᵖ)


@[gcongr]
theorem union_subset_union {s₁ s₂ t₁ t₂ : Set α} (h₁ : s₁ ⊆ s₂) (h₂ : t₁ ⊆ t₂) :
    s₁ ∪ t₁ ⊆ s₂ ∪ t₂

{α : Type u}
{s₁ s₂ t₁ t₂ : Set α}
(h₁ : s₁ ⊆ s₂)
(h₂ : t₁ ⊆ t₂)

s₁ ∪ t₁ ⊆ s₂ ∪ t₂


theorem card_subset_divisors_le_length_of_chain {q : Associates M} {n : ℕ}
    {c : Fin (n + 1) → Associates M} (h₂ : ∀ {r}, r ≤ q ↔ ∃ i, r = c i) {m : Finset (Associates M)}
    (hm : ∀ r, r ∈ m → r ≤ q) : m.card ≤ n + 1

(h₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i)


theorem land_assoc (n m k : ℕ) : (n &&& m) &&& k = n &&& (m &&& k)


lemma imaginaryPart_comp_subtype_selfAdjoint :
    imaginaryPart.comp (selfAdjoint.submodule ℝ A).subtype = 0

{A : Type u_1}
[AddCommGroup A]
[Module ℂ A]
[StarAddMonoid A]
[StarModule ℂ A]

imaginaryPart ∘ₗ (selfAdjoint.submodule ℝ A).subtype = 0


theorem HasFDerivAt.hasFDerivAtFilter (h : HasFDerivAt f f' x) (hL : L ≤ 𝓝 x) :
    HasFDerivAtFilter f f' x L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{L : Filter E}
(h : HasFDerivAt f f' x)
(hL : L ≤ 𝓝 x)


@[simp] lemma ofEpiOfIsIsoOfMono_Q : (ofEpiOfIsIsoOfMono φ h).Q = h.Q

(CategoryTheory.ShortComplex.RightHomologyData.ofEpiOfIsIsoOfMono φ h).Q = h.Q