theorem lineDeriv_neg : lineDeriv 𝕜 f x (-v) = - lineDeriv 𝕜 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}
{x v : E}

lineDeriv 𝕜 f x (-v) = -lineDeriv 𝕜 f x v


@[simp]
theorem top_add_top : (⊤ : EReal) + ⊤ = ⊤


theorem proj_dioph_of_nat {n : ℕ} (m : ℕ) [IsLT m n] : DiophFn fun v : Vector3 ℕ n => v &m

Dioph.DiophFn fun v => v (Fin2.ofNat' m)


/-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G

{n : ℕ}
{G : Type u_6}
[AddGroup G]
(h : (Nat.card G).Coprime n)
(g : G)

(nsmulCoprime h).symm g = (Nat.card G).gcdB n • g


theorem nat_omega_rec' (f : β → σ) {m : β → ℕ} {l : β → List β} {g : β → List σ → Option σ}
    (hm : Primrec m) (hl : Primrec l) (hg : Primrec₂ g)
    (Ord : ∀ b, ∀ b' ∈ l b, m b' < m b)
    (H : ∀ b, g b ((l b).map f) = some (f b)) : Primrec f

(Ord : ∀ (b b' : β), b' ∈ l b → m b' < m b)

(H : ∀ (b : β), g b (List.map f (l b)) = some (f b))


theorem frontier_inter_subset (s t : Set X) :
    frontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t

{X : Type u}
[TopologicalSpace X]
(s t : Set X)


theorem card_image₂_le (f : α → β → γ) (s : Finset α) (t : Finset β) :
    (image₂ f s t).card ≤ s.card * t.card

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
(f : α → β → γ)
(s : Finset α)
(t : Finset β)

(Finset.image₂ f s t).card ≤ s.card * t.card


theorem isAffineOpen_bot (X : Scheme) : IsAffineOpen (⊥ : X.Opens)


theorem subtype_injective {P Q : Sylow p G} {hP : ↑P ≤ N} {hQ : ↑Q ≤ N}
    (h : P.subtype hP = Q.subtype hQ) : P = Q

{p : ℕ}
{G : Type u_1}
[Group G]
{N : Subgroup G}
{P Q : Sylow p G}
{hP : ↑P ≤ N}
{hQ : ↑Q ≤ N}
(h : P.subtype hP = Q.subtype hQ)


theorem limsup_finset_sup [ConditionallyCompleteLinearOrder β] [OrderBot β] {f : Filter α}
    {F : ι → α → β} {s : Finset ι}
    (h₁ : ∀ i ∈ s, f.IsCoboundedUnder (· ≤ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault)
    (h₂ : ∀ i ∈ s, f.IsBoundedUnder (· ≤ ·) (F i) := by exact fun _ _ ↦ by isBoundedDefault) :
    limsup (fun a ↦ sup s (fun i ↦ F i a)) f = sup s (fun i ↦ limsup (F i) f)

{F : ι → α → β}

(h₁ : ∀ i ∈ s, Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f (F i) := by exact fun _ _ ↦ by isBoundedDefault)

(h₂ : ∀ i ∈ s, Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f (F i) := by exact fun _ _ ↦ by isBoundedDefault)

Filter.limsup (fun a => s.sup fun i => F i a) f = s.sup fun i => Filter.limsup (F i) f


/-- An alias of `MeasureTheory.MeasurePreserving.comp` with a convenient defeq and argument order
for `MeasurableEquiv` -/
protected theorem trans {e : α ≃ᵐ β} {e' : β ≃ᵐ γ}
    {μa : Measure α} {μb : Measure β} {μc : Measure γ}
    (h : MeasurePreserving e μa μb) (h' : MeasurePreserving e' μb μc) :
    MeasurePreserving (e.trans e') μa μc

{e : α ≃ᵐ β}

(h : MeasureTheory.MeasurePreserving (⇑e) μa μb)

(h' : MeasureTheory.MeasurePreserving (⇑e') μb μc)

MeasureTheory.MeasurePreserving (⇑(e.trans e')) μa μc


/-- A version of `WithTop.map` for `OneHom`s. -/
@[to_additive (attr := simps (config := .asFn))
  "A version of `WithTop.map` for `ZeroHom`s"]
protected def _root_.OneHom.withTopMap {M N : Type*} [One M] [One N] (f : OneHom M N) :
    OneHom (WithTop M) (WithTop N)

{M : Type u_1}
{N : Type u_2}
[One M]
[One N]
(f : OneHom M N)


@[simp]
theorem coe_mk (s : Compacts α) (h) : (mk s h : Set α) = s

{α : Type u_1}
[TopologicalSpace α]
(s : TopologicalSpace.Compacts α)
(h : s.carrier.Nonempty)

↑{ toCompacts := s, nonempty' := h } = ↑s


theorem locallySmall_of_faithful {C : Type u} [Category.{v} C] {D : Type u'} [Category.{v'} D]
    (F : C ⥤ D) [F.Faithful] [LocallySmall.{w} D] : LocallySmall.{w} C

[CategoryTheory.LocallySmall.{w, v', u'} D]


/-- If `e : C ≌ D` is an equivalence of categories, then `functoriality F e.functor` induces an
equivalence between cocones over `F` and cocones over `F ⋙ e.functor`.
-/
@[simps]
def functorialityEquivalence (e : C ≌ D) : Cocone F ≌ Cocone (F ⋙ e.functor)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(F : J ⥤ C)
(e : C ≌ D)

(CategoryTheory.Limits.Cocones.functorialityEquivalence F e).functor =
  CategoryTheory.Limits.Cocones.functoriality F e.functor


@[to_additive (attr := simp)]
theorem mk_val (u : αˣ) (y h₁ h₂) : mk (u : α) y h₁ h₂ = u

{α : Type u}
[Monoid α]
(u : αˣ)
(y : α)
(h₁ : ↑u * y = 1)
(h₂ : y * ↑u = 1)

{ val := ↑u, inv := y, val_inv := h₁, inv_val := h₂ } = u


@[to_additive]
lemma comp_eq_one_iff [One β] [One γ] (f : α → β) {g : β → γ} (hg : Injective g) (hg0 : g 1 = 1) :
    g ∘ f = 1 ↔ f = 1

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Zero β]
[Zero γ]
(f : α → β)
{g : β → γ}
(hg : Function.Injective g)
(hg0 : g 0 = 0)


theorem exists_mem_cons_of {p : α → Prop} {a : α} (l : List α) (h : p a) : ∃ x ∈ a :: l, p x

{α : Type u}
{p : α → Prop}
{a : α}
(l : List α)
(h : p a)


@[simp]
theorem mk_finsupp_lift_of_infinite' (α : Type u) (β : Type v) [Nonempty α] [Zero β] [Infinite β] :
    #(α →₀ β) = max (lift.{v} #α) (lift.{u} #β)

#(α →₀ β) = max (Cardinal.lift.{v, u} #α) (Cardinal.lift.{u, v} #β)


@[to_additive]
private theorem card_orderOf_eq_totient_aux₁ :
    ∀ {d : ℕ},
      d ∣ Fintype.card α →
        0 < (univ.filter fun a : α => orderOf a = d).card →
          (univ.filter fun a : α => orderOf a = d).card = φ d

(hn : ∀ (n : ℕ), 0 < n → (Finset.filter (fun a => a ^ n = 1) Finset.univ).card ≤ n)

d ∣ Fintype.card α →
  0 < (Finset.filter (fun a => orderOf a = d) Finset.univ).card →
    (Finset.filter (fun a => orderOf a = d) Finset.univ).card = d.totient


/-- The *Euler Product* for a multiplicative arithmetic function `f` with values in a
complete normed commutative ring `R`: if `‖f ·‖` is summable, then
`∏' p : Nat.Primes, ∑' e, f (p ^ e) = ∑' n, f n`.
This version is stated in the form of convergence of finite partial products. -/
nonrec theorem IsMultiplicative.eulerProduct {f : ArithmeticFunction R} (hf : f.IsMultiplicative)
    (hsum : Summable (‖f ·‖)) :
    Tendsto (fun n : ℕ ↦ ∏ p ∈ primesBelow n, ∑' e, f (p ^ e)) atTop (𝓝 (∑' n, f n))

{R : Type u_1}
[NormedCommRing R]
[CompleteSpace R]
{f : ArithmeticFunction R}
(hf : f.IsMultiplicative)
(hsum : Summable fun x => ‖f x‖)

Filter.Tendsto (fun n => ∏ p ∈ n.primesBelow, ∑' (e : ℕ), f (p ^ e)) Filter.atTop (𝓝 (∑' (n : ℕ), f n))


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

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

(AlgebraicTopology.DoldKan.N₁.obj X).X = AlgebraicTopology.AlternatingFaceMapComplex.obj X


@[simp]
theorem fastGrowing_one : fastGrowing 1 = fun n => 2 * n


lemma smul_min_of_nonpos (ha : a ≤ 0) (b₁ b₂ : β) : a • min b₁ b₂ = max (a • b₁) (a • b₂)

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[PosSMulMono α β]
{a : α}
(ha : a ≤ 0)
(b₁ b₂ : β)


theorem toIocMod_eq_sub (a b : α) : toIocMod hp a b = toIocMod hp 0 (b - a) + a

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


lemma equiv_zero_of_Z_eq_zero {P : Fin 3 → F} (h : W.Nonsingular P) (hPz : P z = 0) :
    P ≈ ![0, 1, 0]

{F : Type u}
[Field F]
{W : WeierstrassCurve.Projective F}
{P : Fin 3 → F}
(h : W.Nonsingular P)
(hPz : P 2 = 0)


theorem conj (w : W) : cs.IsReflection (w * t * w⁻¹)

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
{cs : CoxeterSystem M W}
{t : W}
(ht : cs.IsReflection t)
(w : W)


theorem equicontinuousOn_iInf_rng {u : κ → UniformSpace α'} {F : ι → X → α'}
    {S : Set X} :
    EquicontinuousOn (uα := ⨅ k, u k) F S ↔ ∀ k, EquicontinuousOn (uα := u k) F S

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α' : Type u_8}
[tX : TopologicalSpace X]
{u : κ → UniformSpace α'}
{F : ι → X → α'}
{S : Set X}

EquicontinuousOn F S ↔ ∀ (k : κ), EquicontinuousOn F S


theorem associated_toQuadraticMap (B : BilinMap R M R) (x y : M) :
    associatedHom S B.toQuadraticMap x y = ⅟ (2 : R) • (B x y + B y x)

(S : Type u_1)
{R : Type u_3}
{M : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[CommSemiring S]
[Algebra S R]
[Invertible 2]
(B : LinearMap.BilinMap R M R)
(x y : M)

(((QuadraticMap.associatedHom S) B.toQuadraticMap) x) y = ⅟2 • ((B x) y + (B y) x)


protected theorem dvd_add_right {a b c : Int} (H : a ∣ b) : a ∣ b + c ↔ a ∣ c


theorem induction {C : α → Prop} (a : α) (h : ∀ x, (∀ y, r y x → C y) → C x) : C a

(h : ∀ (x : α), (∀ (y : α), r y x → C y) → C x)


theorem ball_mono {p : Seminorm 𝕜 E} {r₁ r₂ : ℝ} (h : r₁ ≤ r₂) : p.ball x r₁ ⊆ p.ball x r₂

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
{x : E}
{p : Seminorm 𝕜 E}
{r₁ r₂ : ℝ}
(h : r₁ ≤ r₂)


@[to_additive]
theorem noncommPiCoprod_mrange :
    MonoidHom.mrange (noncommPiCoprod ϕ hcomm) = ⨆ i : ι, MonoidHom.mrange (ϕ i)

{hcomm : Pairwise fun i j => ∀ (x : N i) (y : N j), AddCommute ((ϕ i) x) ((ϕ j) y)}

AddMonoidHom.mrange (AddMonoidHom.noncommPiCoprod ϕ hcomm) = ⨆ i, AddMonoidHom.mrange (ϕ i)


theorem DenseRange.closure_range (h : DenseRange f) : closure (range f) = univ

{X : Type u_1}
[TopologicalSpace X]
{α : Type u_4}
{f : α → X}
(h : DenseRange f)


theorem ofBijective_apply [NonUnitalRingHomClass F R S] (f : F) (hf : Function.Bijective f)
    (x : R) : ofBijective f hf x = f x

{F : Type u_1}
{R : Type u_4}
{S : Type u_5}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(f : F)
(hf : Function.Bijective ⇑f)
(x : R)


/-- If a function is differentiable inside a convex set with nonempty interior, and has a second
derivative at a point of this convex set, then this second derivative is symmetric. -/
theorem Convex.second_derivative_within_at_symmetric {s : Set E} (s_conv : Convex ℝ s)
    (hne : (interior s).Nonempty) {f : E → F} {f' : E → E →L[ℝ] F} {f'' : E →L[ℝ] E →L[ℝ] F}
    (hf : ∀ x ∈ interior s, HasFDerivAt f (f' x) x) {x : E} (xs : x ∈ s)
    (hx : HasFDerivWithinAt f' f'' (interior s) x) (v w : E) : f'' v w = f'' w v


/-- On a metric space `X` with a measure `μ`, consider for each `x : X` a family of measurable sets
with nonempty interiors, called `setsAt x`. This family is a Vitali family if it satisfies the
following property: consider a (possibly non-measurable) set `s`, and for any `x` in `s` a
subfamily `f x` of `setsAt x` containing sets of arbitrarily small diameter. Then one can extract
a disjoint subfamily covering almost all `s`.

Vitali families are provided by covering theorems such as the Besicovitch covering theorem or the
Vitali covering theorem. They make it possible to formulate general versions of theorems on
differentiations of measure that apply in both contexts.
-/
-- Porting note(#5171): this linter isn't ported yet.
-- @[nolint has_nonempty_instance]
structure VitaliFamily {m : MeasurableSpace α} (μ : Measure α) where
  /-- Sets of the family "centered" at a given point. -/
  setsAt :  α → Set (Set α)
  /-- All sets of the family are measurable. -/
  measurableSet : ∀ x : α, ∀ s ∈ setsAt x, MeasurableSet s
  /-- All sets of the family have nonempty interior. -/
  nonempty_interior : ∀ x : α, ∀ s ∈ setsAt x, (interior s).Nonempty
  /-- For any closed ball around `x`, there exists a set of the family contained in this ball. -/
  nontrivial : ∀ (x : α), ∀ ε > (0 : ℝ), ∃ s ∈ setsAt x, s ⊆ closedBall x ε
  /-- Consider a (possibly non-measurable) set `s`,
  and for any `x` in `s` a subfamily `f x` of `setsAt x`
  containing sets of arbitrarily small diameter.
  Then one can extract a disjoint subfamily covering almost all `s`. -/
  covering : ∀ (s : Set α) (f : α → Set (Set α)),
    (∀ x ∈ s, f x ⊆ setsAt x) → (∀ x ∈ s, ∀ ε > (0 : ℝ), ∃ a ∈ f x, a ⊆ closedBall x ε) →
    ∃ t : Set (α × Set α), (∀ p ∈ t, p.1 ∈ s) ∧ (t.PairwiseDisjoint fun p ↦ p.2) ∧
      (∀ p ∈ t, p.2 ∈ f p.1) ∧ μ (s \ ⋃ p ∈ t, p.2) = 0

{α : Type u_1}
[MetricSpace α]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(self : VitaliFamily μ)
(x : α)
(s : Set α)

s ∈ self.setsAt x → (interior s).Nonempty


@[to_additive]
theorem pairwise_disjoint_Ioo_zpow :
    Pairwise (Disjoint on fun n : ℤ => Ioo (b ^ n) (b ^ (n + 1)))

{α : Type u_1}
[OrderedCommGroup α]
(b : α)

Pairwise (Disjoint on fun n => Set.Ioo (b ^ n) (b ^ (n + 1)))


/-- In a bicategory, we can compose the 1-morphisms `f : a ⟶ b` and `g : b ⟶ c` to obtain
a 1-morphism `f ≫ g : a ⟶ c`. This composition does not need to be strictly associative,
but there is a specified associator, `α_ f g h : (f ≫ g) ≫ h ≅ f ≫ (g ≫ h)`.
There is an identity 1-morphism `𝟙 a : a ⟶ a`, with specified left and right unitor
isomorphisms `λ_ f : 𝟙 a ≫ f ≅ f` and `ρ_ f : f ≫ 𝟙 a ≅ f`.
These associators and unitors satisfy the pentagon and triangle equations.

See https://ncatlab.org/nlab/show/bicategory.
-/
@[nolint checkUnivs]
class Bicategory (B : Type u) extends CategoryStruct.{v} B where
  -- category structure on the collection of 1-morphisms:
  homCategory : ∀ a b : B, Category.{w} (a ⟶ b) := by infer_instance
  -- left whiskering:
  whiskerLeft {a b c : B} (f : a ⟶ b) {g h : b ⟶ c} (η : g ⟶ h) : f ≫ g ⟶ f ≫ h
  -- right whiskering:
  whiskerRight {a b c : B} {f g : a ⟶ b} (η : f ⟶ g) (h : b ⟶ c) : f ≫ h ⟶ g ≫ h
  -- associator:
  associator {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) : (f ≫ g) ≫ h ≅ f ≫ g ≫ h
  -- left unitor:
  leftUnitor {a b : B} (f : a ⟶ b) : 𝟙 a ≫ f ≅ f
  -- right unitor:
  rightUnitor {a b : B} (f : a ⟶ b) : f ≫ 𝟙 b ≅ f
  -- axioms for left whiskering:
  whiskerLeft_id : ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), whiskerLeft f (𝟙 g) = 𝟙 (f ≫ g) := by
    aesop_cat
  whiskerLeft_comp :
    ∀ {a b c} (f : a ⟶ b) {g h i : b ⟶ c} (η : g ⟶ h) (θ : h ⟶ i),
      whiskerLeft f (η ≫ θ) = whiskerLeft f η ≫ whiskerLeft f θ := by
    aesop_cat
  id_whiskerLeft :
    ∀ {a b} {f g : a ⟶ b} (η : f ⟶ g),
      whiskerLeft (𝟙 a) η = (leftUnitor f).hom ≫ η ≫ (leftUnitor g).inv := by
    aesop_cat
  comp_whiskerLeft :
    ∀ {a b c d} (f : a ⟶ b) (g : b ⟶ c) {h h' : c ⟶ d} (η : h ⟶ h'),
      whiskerLeft (f ≫ g) η =
        (associator f g h).hom ≫ whiskerLeft f (whiskerLeft g η) ≫ (associator f g h').inv := by
    aesop_cat
  -- axioms for right whiskering:
  id_whiskerRight : ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c), whiskerRight (𝟙 f) g = 𝟙 (f ≫ g) := by
    aesop_cat
  comp_whiskerRight :
    ∀ {a b c} {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h) (i : b ⟶ c),
      whiskerRight (η ≫ θ) i = whiskerRight η i ≫ whiskerRight θ i := by
    aesop_cat
  whiskerRight_id :
    ∀ {a b} {f g : a ⟶ b} (η : f ⟶ g),
      whiskerRight η (𝟙 b) = (rightUnitor f).hom ≫ η ≫ (rightUnitor g).inv := by
    aesop_cat
  whiskerRight_comp :
    ∀ {a b c d} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c) (h : c ⟶ d),
      whiskerRight η (g ≫ h) =
        (associator f g h).inv ≫ whiskerRight (whiskerRight η g) h ≫ (associator f' g h).hom := by
    aesop_cat
  -- associativity of whiskerings:
  whisker_assoc :
    ∀ {a b c d} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g') (h : c ⟶ d),
      whiskerRight (whiskerLeft f η) h =
        (associator f g h).hom ≫ whiskerLeft f (whiskerRight η h) ≫ (associator f g' h).inv := by
    aesop_cat
  -- exchange law of left and right whiskerings:
  whisker_exchange :
    ∀ {a b c} {f g : a ⟶ b} {h i : b ⟶ c} (η : f ⟶ g) (θ : h ⟶ i),
      whiskerLeft f θ ≫ whiskerRight η i = whiskerRight η h ≫ whiskerLeft g θ := by
    aesop_cat
  -- pentagon identity:
  pentagon :
    ∀ {a b c d e} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e),
      whiskerRight (associator f g h).hom i ≫
          (associator f (g ≫ h) i).hom ≫ whiskerLeft f (associator g h i).hom =
        (associator (f ≫ g) h i).hom ≫ (associator f g (h ≫ i)).hom := by
    aesop_cat
  -- triangle identity:
  triangle :
    ∀ {a b c} (f : a ⟶ b) (g : b ⟶ c),
      (associator f (𝟙 b) g).hom ≫ whiskerLeft f (leftUnitor g).hom
      = whiskerRight (rightUnitor f).hom g := by
    aesop_cat

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

CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.CategoryStruct.comp η θ) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft f η)
    (CategoryTheory.Bicategory.whiskerLeft f θ)


@[to_additive]
protected theorem right_comm (h : Commute b c) (a : S) : a * b * c = a * c * b

{S : Type u_3}
[AddSemigroup S]
{b c : S}
(h : AddCommute b c)
(a : S)


/-- If a function is continuous on an open set `s`, then it is strongly measurable at the filter
`𝓝 x` for all `x ∈ s` if either the source space or the target space is second-countable. -/
theorem ContinuousOn.stronglyMeasurableAtFilter [TopologicalSpace α] [OpensMeasurableSpace α]
    [TopologicalSpace β] [PseudoMetrizableSpace β] [SecondCountableTopologyEither α β] {f : α → β}
    {s : Set α} {μ : Measure α} (hs : IsOpen s) (hf : ContinuousOn f s) :
    ∀ x ∈ s, StronglyMeasurableAtFilter f (𝓝 x) μ

x ∈ s → StronglyMeasurableAtFilter f (𝓝 x) μ


theorem Real.nndist_eq' (x y : ℝ) : nndist x y = Real.nnabs (y - x)


theorem nonMemberSubfamily_union (a : α) (𝒜 ℬ : Finset (Finset α)) :
    (𝒜 ∪ ℬ).nonMemberSubfamily a = 𝒜.nonMemberSubfamily a ∪ ℬ.nonMemberSubfamily a

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

Finset.nonMemberSubfamily a (𝒜 ∪ ℬ) = Finset.nonMemberSubfamily a 𝒜 ∪ Finset.nonMemberSubfamily a ℬ


/-- The commutator of direct product is contained in the direct product of the commutators.

See `commutator_pi_pi_of_finite` for equality given `Fintype η`.
-/
theorem commutator_pi_pi_le {η : Type*} {Gs : η → Type*} [∀ i, Group (Gs i)]
    (H K : ∀ i, Subgroup (Gs i)) :
    ⁅Subgroup.pi Set.univ H, Subgroup.pi Set.univ K⁆ ≤ Subgroup.pi Set.univ fun i => ⁅H i, K i⁆

{η : Type u_4}
{Gs : η → Type u_5}
[(i : η) → Group (Gs i)]
(H K : (i : η) → Subgroup (Gs i))


@[to_additive exists_open_nhds_zero_half]
theorem exists_open_nhds_one_split {s : Set M} (hs : s ∈ 𝓝 (1 : M)) :
    ∃ V : Set M, IsOpen V ∧ (1 : M) ∈ V ∧ ∀ v ∈ V, ∀ w ∈ V, v * w ∈ s

{M : Type u_3}
[TopologicalSpace M]
[AddZeroClass M]
[ContinuousAdd M]
{s : Set M}
(hs : s ∈ 𝓝 0)

∃ V, IsOpen V ∧ 0 ∈ V ∧ ∀ v ∈ V, ∀ w ∈ V, v + w ∈ s


@[to_additive (attr := simp) sub_mem_addCentralizer]
lemma div_mem_centralizer (ha : a ∈ centralizer S) (hb : b ∈ centralizer S) :
    a / b ∈ centralizer S

{M : Type u_1}
{S : Set M}
[Group M]
{a b : M}
(ha : a ∈ S.centralizer)
(hb : b ∈ S.centralizer)


/-- The constant term of `cyclotomic n R` is `1` if `2 ≤ n`. -/
theorem cyclotomic_coeff_zero (R : Type*) [CommRing R] {n : ℕ} (hn : 1 < n) :
    (cyclotomic n R).coeff 0 = 1

(R : Type u_1)
[CommRing R]
{n : ℕ}
(hn : 1 < n)


@[to_additive]
theorem mulSupport_mulSingle_one : mulSupport (mulSingle a (1 : B)) = ∅

{A : Type u_1}
{B : Type u_2}
[DecidableEq A]
[One B]
{a : A}

Function.mulSupport (Pi.mulSingle a 1) = ∅


theorem memℒp_one_iff_integrable {f : α → β} : Memℒp f 1 μ ↔ Integrable f μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f : α → β}

MeasureTheory.Memℒp f 1 μ ↔ MeasureTheory.Integrable f μ


theorem infsep_pair : ({x, y} : Set α).infsep = dist x y

{α : Type u_1}
[PseudoMetricSpace α]
{x y : α}


theorem deriv_sqrt_mul_log (x : ℝ) :
    deriv (fun x => √x * log x) x = (2 + log x) / (2 * √x)

deriv (fun x => √x * Real.log x) x = (2 + Real.log x) / (2 * √x)


nonrec theorem ContinuousAt.div_const {a : α} (hf : ContinuousAt f a) (y : G₀) :
    ContinuousAt (fun x => f x / y) a

{α : Type u_1}
{G₀ : Type u_3}
[DivInvMonoid G₀]
[TopologicalSpace G₀]
[ContinuousMul G₀]
{f : α → G₀}
[TopologicalSpace α]
{a : α}
(hf : ContinuousAt f a)
(y : G₀)


theorem le_zeroLocus_iff_le_vanishingIdeal {V : Set (σ → k)} {I : Ideal (MvPolynomial σ k)} :
    V ≤ zeroLocus I ↔ I ≤ vanishingIdeal V

{k : Type u_1}
[Field k]
{σ : Type u_2}
{V : Set (σ → k)}
{I : Ideal (MvPolynomial σ k)}

V ≤ MvPolynomial.zeroLocus I ↔ I ≤ MvPolynomial.vanishingIdeal V


theorem BilinForm.mul_toMatrix' (B : BilinForm R₂ (n → R₂)) (M : Matrix n n R₂) :
    M * BilinForm.toMatrix' B = BilinForm.toMatrix' (B.compLeft (Matrix.toLin' Mᵀ))

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(B : LinearMap.BilinForm R₂ (n → R₂))
(M : Matrix n n R₂)

M * LinearMap.BilinForm.toMatrix' B = LinearMap.BilinForm.toMatrix' (B.compLeft (Matrix.toLin' M.transpose))


@[simp]
theorem nontrivial_iff : Nontrivial (Submodule R M) ↔ Nontrivial M

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


@[simp]
theorem sup_le {s : Multiset α} {a : α} : s.sup ≤ a ↔ ∀ b ∈ s, b ≤ a

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
{s : Multiset α}
{a : α}


@[simp]
theorem floorRing_floor_eq : @FloorRing.floor = @Int.floor


lemma Nonempty.of_diffs_right : (s \\ t).Nonempty → t.Nonempty

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{s t : Finset α}


protected theorem div_le_iff {x y z : ℝ≥0∞} (h1 : y ≠ 0) (h2 : y ≠ ∞) :
    x / y ≤ z ↔ x ≤ z * y

{x y z : ENNReal}
(h1 : y ≠ 0)
(h2 : y ≠ ⊤)


theorem congr' {s : Set H} {x : H} {f g : H → H'} (h : f =ᶠ[𝓝 x] g) (hP : P g s x) : P f s x

{H : Type u_1}
{H' : Type u_3}
[TopologicalSpace H]
[TopologicalSpace H']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
(hG : G.LocalInvariantProp G' P)
{s : Set H}
{x : H}
{f g : H → H'}
(h : f =ᶠ[𝓝 x] g)
(hP : P g s x)


theorem bernoulli_expectation {p : ℝ≥0∞} (h : p ≤ 1) :
    ∫ b, cond b 1 0 ∂((bernoulli p h).toMeasure) = p.toReal

∫ (b : Bool), bif b then 1 else 0 ∂(PMF.bernoulli p h).toMeasure = p.toReal


@[simp]
lemma shiftFunctor_obj_d' (K : CochainComplex C ℤ) (n i j : ℤ) :
    ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj K).d i j =
      n.negOnePow • K.d _ _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K : CochainComplex C ℤ)
(n i j : ℤ)

((CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj K).d i j =
  n.negOnePow • K.d (i + { as := n }.as) (j + { as := n }.as)


theorem zero_memℓp : Memℓp (0 : ∀ i, E i) p

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]


lemma IsMatching.coeSubgraph {G' : Subgraph G} {M : Subgraph G'.coe} (hM : M.IsMatching) :
    M.coeSubgraph.IsMatching

{V : Type u_1}
{G : SimpleGraph V}
{G' : G.Subgraph}
{M : G'.coe.Subgraph}
(hM : M.IsMatching)


lemma uniformEquicontinuous_restrict_iff (F : ι → β → α) {S : Set β} :
    UniformEquicontinuous (S.restrict ∘ F) ↔ UniformEquicontinuousOn F S

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


theorem prod_sUnion {s : Set α} {C : Set (Set β)} : s ×ˢ ⋃₀C = ⋃₀((fun t => s ×ˢ t) '' C)

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


theorem of_sub_nat (m : ℕ) (h : Irrational (x - m)) : Irrational x

{x : ℝ}
(m : ℕ)
(h : Irrational (x - ↑m))


/-- The definition of `cosh` in terms of `exp`. -/
theorem cosh_eq (x : ℝ) : cosh x = (exp x + exp (-x)) / 2

Real.cosh x = (Real.exp x + Real.exp (-x)) / 2


theorem ncard_ne_zero_of_mem {a : α} (h : a ∈ s) (hs : s.Finite := by toFinite_tac) : s.ncard ≠ 0

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


@[to_additive (attr := simp, norm_cast)]
theorem val_lt_val [Monoid α] [Preorder α] {a b : αˣ} : (a : α) < b ↔ a < b

{α : Type u_1}
[AddMonoid α]
[Preorder α]
{a b : AddUnits α}


theorem eval₂Hom_zero_apply (f : R →+* S₂) (p : MvPolynomial σ R) :
    eval₂Hom f (0 : σ → S₂) p = f (constantCoeff p)

{R : Type u}
{S₂ : Type w}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₂]
(f : R →+* S₂)
(p : MvPolynomial σ R)

(MvPolynomial.eval₂Hom f 0) p = f (MvPolynomial.constantCoeff p)


/-- Upper bound for the summand `|c * z + d| ^ (-k)`, as a product of a function of `z` and a
function of `c, d`. -/
lemma summand_bound {k : ℝ} (hk : 0 ≤ k) (x : Fin 2 → ℤ) :
    Complex.abs (x 0 * z + x 1) ^ (-k) ≤ (r z) ^ (-k) * ‖x‖ ^ (-k)

(z : ℍ)
{k : ℝ}
(hk : 0 ≤ k)
(x : Fin 2 → ℤ)

Complex.abs (↑(x 0) * ↑z + ↑(x 1)) ^ (-k) ≤ EisensteinSeries.r z ^ (-k) * ‖x‖ ^ (-k)


theorem UpperSemicontinuous.upperSemicontinuousAt (h : UpperSemicontinuous f) (x : α) :
    UpperSemicontinuousAt f x

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


/-- The localization functor to the constructed localized category for a morphism property
that has left calculus of fractions. -/
@[simps obj]
def Q : C ⥤ Localization W

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
(W : CategoryTheory.MorphismProperty C)
[W.HasLeftCalculusOfFractions]
(X : C)

(CategoryTheory.MorphismProperty.LeftFraction.Localization.Q W).obj X = X


theorem IsEquipartition.card_parts_eq_average (hP : P.IsEquipartition) (ht : t ∈ P.parts) :
    t.card = s.card / P.parts.card ∨ t.card = s.card / P.parts.card + 1

{α : Type u_1}
[DecidableEq α]
{s t : Finset α}
{P : Finpartition s}
(hP : P.IsEquipartition)
(ht : t ∈ P.parts)


theorem norm_indicator_le_of_subset (h : s ⊆ t) (f : α → E) (a : α) :
    ‖indicator s f a‖ ≤ ‖indicator t f a‖

{α : Type u_1}
{E : Type u_2}
[SeminormedAddCommGroup E]
{s t : Set α}
(h : s ⊆ t)
(f : α → E)
(a : α)


theorem sin_sub : sin (x - y) = sin x * cos y - cos x * sin y

Complex.sin (x - y) = Complex.sin x * Complex.cos y - Complex.cos x * Complex.sin y


@[simp]
lemma piScalarRight_apply (x : N ⊗[R] (ι → R)) :
    piScalarRight R S N ι x = piScalarRightHom R S N ι x

(R : Type u_1)
[CommSemiring R]
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
(N : Type u_3)
[AddCommMonoid N]
[Module R N]
[Module S N]
[IsScalarTower R S N]
(ι : Type u_4)
[Fintype ι]
[DecidableEq ι]
(x : TensorProduct R N (ι → R))

(TensorProduct.piScalarRight R S N ι) x = (TensorProduct.piScalarRightHom R S N ι) x


theorem commutator_le_map_commutator {f : G →* G'} {K₁ K₂ : Subgroup G'} (h₁ : K₁ ≤ H₁.map f)
    (h₂ : K₂ ≤ H₂.map f) : ⁅K₁, K₂⁆ ≤ ⁅H₁, H₂⁆.map f

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
{H₁ H₂ : Subgroup G}
{f : G →* G'}
{K₁ K₂ : Subgroup G'}
(h₁ : K₁ ≤ Subgroup.map f H₁)
(h₂ : K₂ ≤ Subgroup.map f H₂)


theorem monotone_filter_left (p : α → Bool) ⦃l l' : List α⦄ (h : l ⊆ l') :
    filter p l ⊆ filter p l'

{α : Type u}
(p : α → Bool)
⦃l l' : List α⦄
(h : l ⊆ l')


@[simp]
theorem union_eq_right {s t : Set α} : s ∪ t = t ↔ s ⊆ t


@[simp]
theorem seq_pure (f : Filter (α → β)) (a : α) : seq f (pure a) = map (fun g : α → β => g a) f

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

f.seq (pure a) = Filter.map (fun g => g a) f


theorem left_distrib (x y z : X q) : x * (y + z) = x * y + x * z


@[simp, norm_cast]
theorem coe_le_coe (n k : ℕ+) : (n : ℕ) ≤ k ↔ n ≤ k

↑n ≤ ↑k ↔ n ≤ k


lemma div_eq_self : m / n = m ↔ m = 0 ∨ n = 1


/-- The open sets of an open subscheme corresponds to the open sets containing in the image. -/
@[simps]
def IsOpenImmersion.opensEquiv {X Y : Scheme.{u}} (f : X ⟶ Y) [IsOpenImmersion f] :
    X.Opens ≃ { U : Y.Opens // U ≤ f.opensRange }

(U : { U // U ≤ AlgebraicGeometry.Scheme.Hom.opensRange f })

(AlgebraicGeometry.IsOpenImmersion.opensEquiv f).symm U = (TopologicalSpace.Opens.map f.val.base).obj ↑U


/-- `IsIntegralClosure A R B` is the characteristic predicate stating `A` is
the integral closure of `R` in `B`,
i.e. that an element of `B` is integral over `R` iff it is an element of (the image of) `A`.
-/
class IsIntegralClosure (A R B : Type*) [CommRing R] [CommSemiring A] [CommRing B] [Algebra R B]
  [Algebra A B] : Prop where
  algebraMap_injective' : Function.Injective (algebraMap A B)
  isIntegral_iff : ∀ {x : B}, IsIntegral R x ↔ ∃ y, algebraMap A B y = x

{A : Type u_1}
{R : Type u_2}
{B : Type u_3}
[CommRing R]
[CommSemiring A]
[CommRing B]
[Algebra R B]
[Algebra A B]
[self : IsIntegralClosure A R B]
{x : B}

IsIntegral R x ↔ ∃ y, (algebraMap A B) y = x


theorem continuousAt_eraseIdx {n : ℕ} {i : Fin (n + 1)} :
    ∀ {l : Vector α (n + 1)}, ContinuousAt (Vector.eraseIdx i) l

{α : Type u_1}
[TopologicalSpace α]
{n : ℕ}
{i : Fin (n + 1)}
{l : Mathlib.Vector α (n + 1)}

ContinuousAt (Mathlib.Vector.eraseIdx i) l


theorem gcd_dvd_gcd_mul_left_right [GCDMonoid α] (m n k : α) : gcd m n ∣ gcd m (k * n)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(m n k : α)


@[simp]
theorem coe_X : ((X : RatFunc F) : LaurentSeries F) = single 1 1


theorem monovary_const_right (f : ι → α) (b : β) : Monovary f (const ι b)

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
(f : ι → α)
(b : β)


@[to_additive]
theorem div_le_iff_le_mul : a / c ≤ b ↔ a ≤ b * c

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


/--
Given a limit cone for the pair `f g : X ⟶ Y`, for any `Z`, morphisms from `Z` to its point are in
bijection with morphisms `h : Z ⟶ X` such that `h ≫ f = h ≫ g`.
Further, this bijection is natural in `Z`: see `Fork.IsLimit.homIso_natural`.
This is a special case of `IsLimit.homIso'`, often useful to construct adjunctions.
-/
@[simps]
def Fork.IsLimit.homIso {X Y : C} {f g : X ⟶ Y} {t : Fork f g} (ht : IsLimit t) (Z : C) :
    (Z ⟶ t.pt) ≃ { h : Z ⟶ X // h ≫ f = h ≫ g }

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
{f g : X ⟶ Y}
{t : CategoryTheory.Limits.Fork f g}
(ht : CategoryTheory.Limits.IsLimit t)
(Z : C)
(k : Z ⟶ t.pt)

↑((CategoryTheory.Limits.Fork.IsLimit.homIso ht Z) k) = CategoryTheory.CategoryStruct.comp k t.ι


@[simp]
theorem smul_mem_pointwise_smul_iff {a : M} {S : Ideal R} {x : R} : a • x ∈ a • S ↔ x ∈ S

{M : Type u_1}
{R : Type u_2}
[Group M]
[CommRing R]
[MulSemiringAction M R]
{a : M}
{S : Ideal R}
{x : R}


/-- Construct a cone on `F` from an object of the category `(Δ ↓ F)`. This is part of an
    equivalence, see `Cone.equivCostructuredArrow`. -/
@[simps]
def Cone.fromCostructuredArrow (F : J ⥤ C) : CostructuredArrow (const J) F ⥤ Cone F

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

∀ {X Y : CategoryTheory.CostructuredArrow (CategoryTheory.Functor.const J) F} (f : X ⟶ Y),
  ((CategoryTheory.Limits.Cone.fromCostructuredArrow F).map f).hom = f.left


lemma bot_mul' : ∀ (b : WithBot α), ⊥ * b = if b = 0 then 0 else ⊥

{α : Type u_1}
[DecidableEq α]
[MulZeroClass α]
(b : WithBot α)


@[ext]
lemma from_single_hom_ext {K : HomologicalComplex V c} {j : ι} {A : V}
    {f g : (single V c j).obj A ⟶ K} (hfg : f.f j = g.f j) : f = g

{f g : (HomologicalComplex.single V c j).obj A ⟶ K}


@[simp]
theorem coe_of {f : α → β} (hf : IsSemiringHom f) : ⇑(of hf) = f

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


@[simp]
theorem foldl_argAux_eq_none : l.foldl (argAux r) o = none ↔ l = [] ∧ o = none

{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
{l : List α}
{o : Option α}

List.foldl (List.argAux r) o l = none ↔ l = [] ∧ o = none


theorem sum_bool (f : Bool → Measure α) : sum f = f true + f false

{α : Type u_1}
{m0 : MeasurableSpace α}
(f : Bool → MeasureTheory.Measure α)

MeasureTheory.Measure.sum f = f true + f false


@[to_additive (attr := simp)]
theorem mem_top (x : G) : x ∈ (⊤ : OpenSubgroup G)

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
(x : G)


theorem mem_kernMap {s : Set β} : s ∈ kernMap m f ↔ ∃ t ∈ f, kernImage m t = s

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

s ∈ Filter.kernMap m f ↔ ∃ t ∈ f, Set.kernImage m t = s


@[simp]
lemma of_comul {X : Type v} [AddCommGroup X] [Module R X] [Coalgebra R X] :
    Coalgebra.comul (A := of R X) = Coalgebra.comul (R := R) (A := X)

{R : Type u}
[CommRing R]
{X : Type v}
[AddCommGroup X]
[Module R X]
[Coalgebra R X]


lemma subset_of_subset_of_eq (hab : a ⊆ b) (hbc : b = c) : a ⊆ c

{α : Type u}
[HasSubset α]
{a b c : α}
(hab : a ⊆ b)
(hbc : b = c)


theorem stepAux_read (f : Γ → Stmt'₁) (v : σ) (L R : ListBlank Γ) :
    stepAux (read dec f) v (trTape' enc0 L R) = stepAux (f R.head) v (trTape' enc0 L R)

(enc0 : enc default = Mathlib.Vector.replicate n false)

(f : Γ → Turing.TM1.Stmt Bool Turing.TM1to1.Λ' σ)

Turing.TM1.stepAux (Turing.TM1to1.read dec f) v (Turing.TM1to1.trTape' enc0 L R) =
  Turing.TM1.stepAux (f R.head) v (Turing.TM1to1.trTape' enc0 L R)


theorem rpow_neg (x : ℝ≥0∞) (y : ℝ) : x ^ (-y) = (x ^ y)⁻¹


/-- The assertion that a square has a `LiftStruct`. -/
class HasLift : Prop where
  /-- Square has a `LiftStruct`. -/
  exists_lift : Nonempty sq.LiftStruct

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{A B X Y : C}
{f : A ⟶ X}
{i : A ⟶ B}
{p : X ⟶ Y}
{g : B ⟶ Y}
{sq : CategoryTheory.CommSq f i p g}
[self : sq.HasLift]


@[simp]
protected theorem map_add (f : α → β) (x y : FreeAbelianGroup α) :
    f <$> (x + y) = f <$> x + f <$> y

{α β : Type u}
(f : α → β)
(x y : FreeAbelianGroup α)


/-- A *cocompact continuous map* is a continuous function between topological spaces which
tends to the cocompact filter along the cocompact filter. Functions for which preimages of compact
sets are compact always satisfy this property, and the converse holds for cocompact continuous maps
when the codomain is Hausdorff (see `CocompactMap.tendsto_of_forall_preimage` and
`CocompactMap.isCompact_preimage`).

Cocompact maps thus generalise proper maps, with which they correspond when the codomain is
Hausdorff. -/
structure CocompactMap (α : Type u) (β : Type v) [TopologicalSpace α] [TopologicalSpace β] extends
  ContinuousMap α β : Type max u v where
  /-- The cocompact filter on `α` tends to the cocompact filter on `β` under the function -/
  cocompact_tendsto' : Tendsto toFun (cocompact α) (cocompact β)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
(self : CocompactMap α β)

Filter.Tendsto self.toFun (Filter.cocompact α) (Filter.cocompact β)


@[simp]
lemma natDegree_Ψ₃ (h : (3 : R) ≠ 0) : W.Ψ₃.natDegree = 4

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
(h : 3 ≠ 0)


@[to_additive]
protected theorem Inseparable.pow {M : Type*} [Monoid M] [TopologicalSpace M] [ContinuousMul M]
    {a b : M} (h : Inseparable a b) (n : ℕ) : Inseparable (a ^ n) (b ^ n)

{M : Type u_6}
[Monoid M]
[TopologicalSpace M]
[ContinuousMul M]
{a b : M}
(h : Inseparable a b)
(n : ℕ)


@[norm_cast]
theorem coe_eq_coe {x y : X} : (x : OnePoint X) = y ↔ x = y


@[simp]
theorem memberSubfamily_nonMemberSubfamily : (𝒜.nonMemberSubfamily a).memberSubfamily a = ∅

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

Finset.memberSubfamily a (Finset.nonMemberSubfamily a 𝒜) = ∅


theorem Real.isTopologicalBasis_Ioo_rat :
    @IsTopologicalBasis ℝ _ (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) b})

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


/-- In a quiver with involutive inverses, the star and costar at every vertex are equivalent.
This map is induced by `Quiver.reverse`. -/
@[simps]
def Quiver.starEquivCostar (u : U) : Quiver.Star u ≃ Quiver.Costar u

{U : Type u_1}
[Quiver U]
[Quiver.HasInvolutiveReverse U]
(u : U)
(e : Quiver.Star u)

((Quiver.starEquivCostar u) e).fst = e.fst


theorem measure_biUnion_finset {s : Finset ι} {f : ι → Set α} (hd : PairwiseDisjoint (↑s) f)
    (hm : ∀ b ∈ s, MeasurableSet (f b)) : μ (⋃ b ∈ s, f b) = ∑ p ∈ s, μ (f p)

{α : Type u_1}
{ι : Type u_5}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Finset ι}
{f : ι → Set α}
(hd : (↑s).PairwiseDisjoint f)
(hm : ∀ b ∈ s, MeasurableSet (f b))


@[to_additive (attr := simp)]
theorem coe_mrange (f : F) : (mrange f : Set N) = Set.range f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_5}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
(f : F)


@[simp]
theorem mapAccumr₂_mapAccumr₂_right_left (f₁ : α → γ → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ) :
    (mapAccumr₂ f₁ xs (mapAccumr₂ f₂ xs ys s₂).snd s₁)
    = let m := mapAccumr₂ (fun x y (s₁, s₂) =>
                let r₂ := f₂ x y s₂
                let r₁ := f₁ x r₂.snd s₁
                ((r₁.fst, r₂.fst), r₁.snd)
              )
            xs ys (s₁, s₂)
    (m.fst.fst, m.snd)

{α : Type}
{n : ℕ}
{β : Type}
(xs : Mathlib.Vector α n)
(ys : Mathlib.Vector β n)
{γ σ₁ φ σ₂ : Type}
{s₂ : σ₂}
{s₁ : σ₁}
(f₁ : α → γ → σ₁ → σ₁ × φ)
(f₂ : α → β → σ₂ → σ₂ × γ)

Mathlib.Vector.mapAccumr₂ f₁ xs (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2 s₁ =
  let m :=
    Mathlib.Vector.mapAccumr₂
      (fun x y x_1 =>
        match x_1 with
        | (s₁, s₂) =>
          let r₂ := f₂ x y s₂;
          let r₁ := f₁ x r₂.2 s₁;
          ((r₁.1, r₂.1), r₁.2))
      xs ys (s₁, s₂);
  (m.1.1, m.2)


@[to_additive (attr := fun_prop)]
theorem ContinuousAt.pow {f : X → M} {x : X} (hf : ContinuousAt f x) (n : ℕ) :
    ContinuousAt (fun x => f x ^ n) x

{M : Type u_3}
{X : Type u_5}
[TopologicalSpace X]
[TopologicalSpace M]
[AddMonoid M]
[ContinuousAdd M]
{f : X → M}
{x : X}
(hf : ContinuousAt f x)
(n : ℕ)


@[simp]
theorem empty_ssubset : ∅ ⊂ s ↔ s.Nonempty


/-- Every functor indexing a wide (co)equalizer is naturally isomorphic (actually, equal) to a
    `parallelFamily` -/
@[simps!]
def diagramIsoParallelFamily (F : WalkingParallelFamily J ⥤ C) :
    F ≅ parallelFamily fun j => F.map (line j)

(F : CategoryTheory.Functor (CategoryTheory.Limits.WalkingParallelFamily J) C)

(X : CategoryTheory.Limits.WalkingParallelFamily J)

(CategoryTheory.Limits.diagramIsoParallelFamily F).inv.app X = CategoryTheory.eqToHom ⋯


protected theorem lt_asymm : ∀ {x y : Bool}, x < y → ¬ y < x


theorem DifferentiableOn.of_dslope (h : DifferentiableOn 𝕜 (dslope f a) s) :
    DifferentiableOn 𝕜 f s

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → E}
{a : 𝕜}
{s : Set 𝕜}
(h : DifferentiableOn 𝕜 (dslope f a) s)


theorem IndepSets.union {s₁ s₂ s' : Set (Set Ω)} (h₁ : IndepSets s₁ s' μ) (h₂ : IndepSets s₂ s' μ) :
    IndepSets (s₁ ∪ s₂) s' μ

(h₁ : ProbabilityTheory.IndepSets s₁ s' μ)

(h₂ : ProbabilityTheory.IndepSets s₂ s' μ)

ProbabilityTheory.IndepSets (s₁ ∪ s₂) s' μ


theorem diff_mem_nhdsWithin_diff {x : α} {s t : Set α} (hs : s ∈ 𝓝[t] x) (t' : Set α) :
    s \ t' ∈ 𝓝[t \ t'] x

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{s t : Set α}
(hs : s ∈ 𝓝[t] x)
(t' : Set α)


theorem le_comap_map : I ≤ (I.map f).comap f

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
{f : F}
{I : Ideal R}


@[simp, norm_cast] lemma den_natCast (n : ℕ) : den n = 1


theorem mem_maximals_iff : x ∈ maximals r s ↔ x ∈ s ∧ ∀ ⦃y⦄, y ∈ s → r x y → x = y

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{x : α}
[IsAntisymm α r]

x ∈ maximals r s ↔ x ∈ s ∧ ∀ ⦃y : α⦄, y ∈ s → r x y → x = y


theorem small_iff_lift_mk_lt_univ {α : Type u} :
    Small.{v} α ↔ Cardinal.lift.{v+1,_} #α < univ.{v, max u (v + 1)}

Small.{v, u} α ↔ Cardinal.lift.{v + 1, u} #α < Cardinal.univ.{v, max u (v + 1)}


theorem N₁Γ₀_inv_app (K : ChainComplex C ℕ) :
    N₁Γ₀.inv.app K = (toKaroubi _).map (Γ₀NondegComplexIso K).inv ≫
        (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.hom

AlgebraicTopology.DoldKan.N₁Γ₀.inv.app K =
  (CategoryTheory.Idempotents.toKaroubi (ChainComplex C ℕ)).map (AlgebraicTopology.DoldKan.Γ₀NondegComplexIso K).inv ≫
    (AlgebraicTopology.DoldKan.Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.hom


theorem range_top_iff_surjective (f : A →ₐ[R] B) :
    f.range = (⊤ : Subalgebra R B) ↔ Function.Surjective f

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


theorem leadingCoeff_isUnit (hp : p.IsUnitTrinomial) : IsUnit p.leadingCoeff

{p : Polynomial ℤ}
(hp : p.IsUnitTrinomial)


{R : Type u}
[CommSemiring R]
(I : Ideal R)


protected theorem injective (e : α ≃ᵐ β) : Injective e

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
(e : α ≃ᵐ β)


theorem prod_apply [e₁.IsLinear 𝕜] [e₂.IsLinear 𝕜] {x : B} (hx₁ : x ∈ e₁.baseSet)
    (hx₂ : x ∈ e₂.baseSet) (v₁ : E₁ x) (v₂ : E₂ x) :
    prod e₁ e₂ ⟨x, (v₁, v₂)⟩ =
      ⟨x, e₁.continuousLinearEquivAt 𝕜 x hx₁ v₁, e₂.continuousLinearEquivAt 𝕜 x hx₂ v₂⟩

[TopologicalSpace (Bundle.TotalSpace F₁ E₁)]

[TopologicalSpace (Bundle.TotalSpace F₂ E₂)]

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

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

↑(e₁.prod e₂) { proj := x, snd := (v₁, v₂) } =
  (x, (Trivialization.continuousLinearEquivAt 𝕜 e₁ x hx₁) v₁, (Trivialization.continuousLinearEquivAt 𝕜 e₂ x hx₂) v₂)


theorem mk' : ValidFor l r ⟨⟨l.reverse ++ r⟩, ⟨utf8Len l.reverse⟩⟩

String.Iterator.ValidFor l r { s := { data := l.reverse ++ r }, i := { byteIdx := String.utf8Len l.reverse } }


protected theorem IsClique.finsetMap {f : α ↪ β} {s : Finset α} (h : G.IsClique s) :
    (G.map f).IsClique (s.map f)

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
{f : α ↪ β}
{s : Finset α}
(h : G.IsClique ↑s)

(SimpleGraph.map f G).IsClique ↑(Finset.map f s)


theorem IsClosed.inter (h₁ : IsClosed s₁) (h₂ : IsClosed s₂) : IsClosed (s₁ ∩ s₂)

{X : Type u}
{s₁ s₂ : Set X}
[TopologicalSpace X]
(h₁ : IsClosed s₁)
(h₂ : IsClosed s₂)


theorem le_mex_of_forall {ι : Type u} {f : ι → Ordinal.{max u v}} {a : Ordinal}
    (H : ∀ b < a, ∃ i, f i = b) : a ≤ mex.{_, v} f

{ι : Type u}
{f : ι → Ordinal.{max u v}}
{a : Ordinal.{max u v}}
(H : ∀ b < a, ∃ i, f i = b)


theorem mem_graph_snd_inj (f : E →ₗ.[R] F) {x y : E} {x' y' : F} (hx : (x, x') ∈ f.graph)
    (hy : (y, y') ∈ f.graph) (hxy : x = y) : x' = y'

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(f : E →ₗ.[R] F)
{x y : E}
{x' y' : F}
(hx : (x, x') ∈ f.graph)
(hy : (y, y') ∈ f.graph)
(hxy : x = y)


/-- Build an isomorphism in the category `CoalgebraCat R` from a
`CoalgEquiv`. -/
@[simps]
def toCoalgebraCatIso (e : X ≃ₗc[R] Y) : CoalgebraCat.of R X ≅ CoalgebraCat.of R Y

{R : Type u}
[CommRing R]
{X Y : Type v}
[AddCommGroup X]
[Module R X]
[AddCommGroup Y]
[Module R Y]
[Coalgebra R X]
[Coalgebra R Y]
(e : X ≃ₗc[R] Y)


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


@[simp]
theorem RCLike.inner_apply (x y : 𝕜) : ⟪x, y⟫ = conj x * y


lemma mkOfObjOfMapSucc_map_succ (i : ℕ) (hi : i < n := by valid) :
    (mkOfObjOfMapSucc obj mapSucc).map' i (i + 1) = mapSucc ⟨i, hi⟩

(mapSucc : (i : Fin n) → obj i.castSucc ⟶ obj i.succ)

(CategoryTheory.ComposableArrows.mkOfObjOfMapSucc obj mapSucc).map' i (i + 1) ⋯ hi = mapSucc ⟨i, hi⟩


/-- Loop from a generalized loop by currying $I^N → X$ into $I → (I^{N\setminus\{j\}} → X)$. -/
@[simps]
def toLoop (i : N) (p : Ω^ N X x) : Ω (Ω^ { j // j ≠ i } X x) const

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
(i : N)
(p : ↑(Ω^ N X x))
(t : ↑I)

↑((GenLoop.toLoop i p) t) = ((↑p).comp (Cube.insertAt i).toContinuousMap).curry t


/-- A `MorphComponents` can be postcomposed with a morphism. -/
@[simps]
def postComp : MorphComponents X n Z'

(f : AlgebraicTopology.DoldKan.MorphComponents X n Z)


theorem fst_eq_coprod : fst R M M₂ = coprod LinearMap.id 0

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

LinearMap.fst R M M₂ = LinearMap.id.coprod 0


theorem exists_mem_factors {x : α} (hx : x ≠ 0) (h : ¬IsUnit x) : ∃ p, p ∈ factors x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{x : α}
(hx : x ≠ 0)
(h : ¬IsUnit x)

∃ p, p ∈ UniqueFactorizationMonoid.factors x


/-- A finite setoid partition furnishes a finpartition -/
@[simps]
def IsPartition.finpartition {c : Finset (Set α)} (hc : Setoid.IsPartition (c : Set (Set α))) :
    Finpartition (Set.univ : Set α)

{α : Type u_1}
{c : Finset (Set α)}
(hc : Setoid.IsPartition ↑c)


theorem degree_quadratic_lt_degree_C_mul_X_cb (ha : a ≠ 0) :
    degree (C b * X ^ 2 + C c * X + C d) < degree (C a * X ^ 3)

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

(Polynomial.C b * Polynomial.X ^ 2 + Polynomial.C c * Polynomial.X + Polynomial.C d).degree <
  (Polynomial.C a * Polynomial.X ^ 3).degree


/-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M` and a map of `CommMonoid`s
`g : M →* P` such that `g(S) ⊆ Units P`, `f x = f y → g x = g y` for all `x y : M`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M` and a map of
`AddCommMonoid`s `g : M →+ P` such that `g(S) ⊆ AddUnits P`, `f x = f y → g x = g y`
for all `x y : M`."]
theorem eq_of_eq (hg : ∀ y : S, IsUnit (g y)) {x y} (h : f.toMap x = f.toMap y) : g x = g y

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


theorem Finset.Nonempty.csInf_mem {s : Finset α} (h : s.Nonempty) : sInf (s : Set α) ∈ s

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


/-- An equivalence of Lie algebra modules is a linear equivalence which is also a morphism of
Lie algebra modules. -/
structure LieModuleEquiv extends M →ₗ⁅R,L⁆ N where
  /-- The inverse function of an equivalence of Lie modules -/
  invFun : N → M
  /-- The inverse function of an equivalence of Lie modules is a left inverse of the underlying
  function. -/
  left_inv : Function.LeftInverse invFun toFun
  /-- The inverse function of an equivalence of Lie modules is a right inverse of the underlying
  function. -/
  right_inv : Function.RightInverse invFun toFun

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(self : M ≃ₗ⁅R,L⁆ N)


@[simp, norm_cast]
theorem coe_empty : ↑(∅ : ZFSet.{u}) = (∅ : Class.{u})


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

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


theorem ofAdd_image_multiples_eq_powers_ofAdd [AddMonoid A] {x : A} :
    Multiplicative.ofAdd '' (AddSubmonoid.multiples x : Set A) =
      Submonoid.powers (Multiplicative.ofAdd x)

⇑Multiplicative.ofAdd '' ↑(AddSubmonoid.multiples x) = ↑(Submonoid.powers (Multiplicative.ofAdd x))


theorem zpow_apply_eq_self_of_apply_eq_self {x : α} (hfx : f x = x) : ∀ n : ℤ, (f ^ n) x = x

{α : Type u_1}
{f : Equiv.Perm α}
{x : α}
(hfx : f x = x)
(n : ℤ)


@[to_additive (attr := simp)]
theorem mul_eq_empty : s * t = ∅ ↔ s = ∅ ∨ t = ∅


/-- The good products span all of `LocallyConstant C ℤ` if `C` is closed. -/
theorem GoodProducts.span (hC : IsClosed C) :
    ⊤ ≤ Submodule.span ℤ (Set.range (eval C))

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
(C : Set (I → Bool))
(hC : IsClosed C)

⊤ ≤ Submodule.span ℤ (Set.range (Profinite.NobelingProof.GoodProducts.eval C))


theorem Ioc_coe_coe : Ioc (a : WithTop α) b = (Ioc a b).map Embedding.some

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

Finset.Ioc ↑a ↑b = Finset.map Function.Embedding.some (Finset.Ioc a b)


theorem sin_sub : sin (x - y) = sin x * cos y - cos x * sin y

Real.sin (x - y) = Real.sin x * Real.cos y - Real.cos x * Real.sin y


theorem eventually_liminf_le (hf : IsBoundedUnder (· ≥ ·) f u := by isBoundedDefault) :
    ∀ᶠ b in f, f.liminf u ≤ u b

(hf : Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) f u := by isBoundedDefault)

∀ᶠ (b : β) in f, Filter.liminf u f ≤ u b


theorem coord_self : (coord R M x h) (⟨x, Submodule.mem_span_singleton_self x⟩ : R ∙ x) = 1

(R : Type u_1)
(M : Type u_4)
[Ring R]
[AddCommGroup M]
[Module R M]
[NoZeroSMulDivisors R M]
(x : M)
(h : x ≠ 0)


theorem not_mem_mono {s t : Finset α} (h : s ⊆ t) {a : α} : a ∉ t → a ∉ s

{α : Type u_1}
{s t : Finset α}
(h : s ⊆ t)
{a : α}


theorem ContDiffAt.comp_contMDiffAt {g : F → F'} {f : M → F} {x : M} (hg : ContDiffAt 𝕜 n g (f x))
    (hf : ContMDiffAt I 𝓘(𝕜, F) n f x) : ContMDiffAt I 𝓘(𝕜, F') n (g ∘ f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{F : Type u_8}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{F' : Type u_11}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{n : ℕ∞}
{g : F → F'}
{f : M → F}
{x : M}
(hg : ContDiffAt 𝕜 n g (f x))
(hf : ContMDiffAt I 𝓘(𝕜, F) n f x)


theorem getI_append_right (l l' : List α) (n : ℕ) (h : l.length ≤ n) :
    (l ++ l').getI n = l'.getI (n - l.length)

{α : Type u}
[Inhabited α]
(l l' : List α)
(n : ℕ)
(h : l.length ≤ n)


@[simp]
theorem infEdist_iUnion (f : ι → Set α) (x : α) : infEdist x (⋃ i, f i) = ⨅ i, infEdist x (f i)

{ι : Sort u_1}
{α : Type u}
[PseudoEMetricSpace α]
(f : ι → Set α)
(x : α)

EMetric.infEdist x (⋃ i, f i) = ⨅ i, EMetric.infEdist x (f i)


theorem IntegrableOn.continuousOn_mul [T2Space X] (hg : ContinuousOn g K)
    (hg' : IntegrableOn g' K μ) (hK : IsCompact K) : IntegrableOn (fun x => g x * g' x) K μ

(hg' : MeasureTheory.IntegrableOn g' K μ)

MeasureTheory.IntegrableOn (fun x => g x * g' x) K μ


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

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

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


@[simp] theorem get!_eq_get (s : String) (p : Pos) : get! s p = get s p


@[to_additive]
protected theorem semiconjBy {a b : S} (h : Commute a b) : SemiconjBy a b b

{S : Type u_3}
[Mul S]
{a b : S}
(h : Commute a b)


/-- Modules that have a basis are projective. -/
theorem projective_of_free {ι : Type u'} (b : Basis ι R M) : Projective M

{R : Type u}
[Ring R]
{M : ModuleCat R}
{ι : Type u'}
(b : Basis ι R ↑M)


theorem add_pf_add_overlap
    (_ : a₁ + b₁ = c₁) (_ : a₂ + b₂ = c₂) : (a₁ + a₂ : R) + (b₁ + b₂) = c₁ + c₂

{R : Type u_1}
[CommSemiring R]
{a₁ a₂ b₁ b₂ c₁ c₂ : R}

a₁ + b₁ = c₁ → a₂ + b₂ = c₂ → a₁ + a₂ + (b₁ + b₂) = c₁ + c₂


theorem nat_mul_inj {n : ℕ} {a b : R} (h : (n : R) * a = (n : R) * b) : n = 0 ∨ a = b

{R : Type u_1}
[NonAssocRing R]
[NoZeroDivisors R]
[CharZero R]
{n : ℕ}
{a b : R}
(h : ↑n * a = ↑n * b)


theorem preimage_inversion_perpBisector_inversion (hR : R ≠ 0) (hy : y ≠ c) :
    inversion c R ⁻¹' perpBisector c (inversion c R y) = sphere y (dist y c) \ {c}

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c y : P}
{R : ℝ}
(hR : R ≠ 0)
(hy : y ≠ c)

EuclideanGeometry.inversion c R ⁻¹' ↑(AffineSubspace.perpBisector c (EuclideanGeometry.inversion c R y)) =
  Metric.sphere y (dist y c) \ {c}


@[to_additive]
theorem map_mul_right_eq_self (μ : Measure G) [IsMulRightInvariant μ] (g : G) : map (· * g) μ = μ

{G : Type u_2}
[MeasurableSpace G]
[Add G]
(μ : MeasureTheory.Measure G)
[μ.IsAddRightInvariant]
(g : G)

MeasureTheory.Measure.map (fun x => x + g) μ = μ


theorem integral_Ici_eq_integral_Ioi : ∫ t in Ici x, f t ∂μ = ∫ t in Ioi x, f t ∂μ

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

∫ (t : X) in Set.Ici x, f t ∂μ = ∫ (t : X) in Set.Ioi x, f t ∂μ


@[to_additive]
theorem max_mul_mul_right (a b c : α) : max (a * c) (b * c) = max a b * c

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


theorem MeasurableSet.sInter {s : Set (Set α)} (hs : s.Countable) (h : ∀ t ∈ s, MeasurableSet t) :
    MeasurableSet (⋂₀ s)

{α : Type u_1}
{m : MeasurableSpace α}
{s : Set (Set α)}
(hs : s.Countable)
(h : ∀ t ∈ s, MeasurableSet t)


@[reassoc (attr := simp)]
lemma rightHomologyι_comp_fromOpcycles :
    S.rightHomologyι ≫ S.fromOpcycles = 0

CategoryTheory.CategoryStruct.comp S.rightHomologyι S.fromOpcycles = 0


protected lemma div_le_self' (m n : ℕ) : m / n ≤ m


@[simp]
theorem gold_sub_goldConj : φ - ψ = √5


theorem card_nthRoots_subgroup_units [Fintype G] [DecidableEq G] (f : G →* R) (hf : Injective f)
    {n : ℕ} (hn : 0 < n) (g₀ : G) :
    Finset.card (Finset.univ.filter (fun g ↦ g^n = g₀)) ≤ Multiset.card (nthRoots n (f g₀))

{R : Type u_1}
{G : Type u_2}
[CommRing R]
[IsDomain R]
[Group G]
[Fintype G]
[DecidableEq G]
(f : G →* R)
(hf : Function.Injective ⇑f)
{n : ℕ}
(hn : 0 < n)
(g₀ : G)

(Finset.filter (fun g => g ^ n = g₀) Finset.univ).card ≤ Multiset.card (Polynomial.nthRoots n (f g₀))


theorem ClassGroup.mk_eq_one_iff {I : (FractionalIdeal R⁰ K)ˣ} :
    ClassGroup.mk I = 1 ↔ (I : Submodule R K).IsPrincipal

{R : Type u_1}
{K : Type u_2}
[CommRing R]
[Field K]
[Algebra R K]
[IsFractionRing R K]
[IsDomain R]
{I : (FractionalIdeal R⁰ K)ˣ}


/-- An induction principle for closure membership. If `p` holds for `1` and all elements of
`k` and their inverse, and is preserved under multiplication, then `p` holds for all elements of
the closure of `k`. -/
@[to_additive (attr := elab_as_elim)
  "An induction principle for additive closure membership. If `p` holds for `0` and all
  elements of `k` and their negation, and is preserved under addition, then `p` holds for all
  elements of the additive closure of `k`."]
theorem closure_induction'' {p : (g : G) → g ∈ closure s → Prop}
    (mem : ∀ x (hx : x ∈ s), p x (subset_closure hx))
    (inv_mem : ∀ x (hx : x ∈ s), p x⁻¹ (inv_mem (subset_closure hx)))
    (one : p 1 (one_mem _))
    (mul : ∀ x y hx hy, p x hx → p y hy → p (x * y) (mul_mem hx hy))
    {x} (h : x ∈ closure s) : p x h

{p : (g : G) → g ∈ AddSubgroup.closure s → Prop}

(inv_mem : ∀ (x : G) (hx : x ∈ s), p (-x) ⋯)

(mul : ∀ (x y : G) (hx : x ∈ AddSubgroup.closure s) (hy : y ∈ AddSubgroup.closure s), p x hx → p y hy → p (x + y) ⋯)


theorem Left.pow_lt_one_iff [CovariantClass M M (· * ·) (· < ·)] {n : ℕ} {x : M} (hn : 0 < n) :
    x ^ n < 1 ↔ x < 1

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


@[to_additive]
theorem Ultrafilter.eventually_mul {M} [Mul M] (U V : Ultrafilter M) (p : M → Prop) :
    (∀ᶠ m in ↑(U * V), p m) ↔ ∀ᶠ m in U, ∀ᶠ m' in V, p (m * m')

{M : Type u_1}
[Mul M]
(U V : Ultrafilter M)
(p : M → Prop)

(∀ᶠ (m : M) in ↑(U * V), p m) ↔ ∀ᶠ (m : M) in ↑U, ∀ᶠ (m' : M) in ↑V, p (m * m')


/-- The cartesian product of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.prod {s : Set E} {f : E → F} {g : E → G} (hf : ContDiffOn 𝕜 n f s)
    (hg : ContDiffOn 𝕜 n g s) : ContDiffOn 𝕜 n (fun x : E => (f x, g x)) s

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


theorem isPreconnected_iUnion {ι : Sort*} {s : ι → Set α} (h₁ : (⋂ i, s i).Nonempty)
    (h₂ : ∀ i, IsPreconnected (s i)) : IsPreconnected (⋃ i, s i)

{α : Type u}
[TopologicalSpace α]
{ι : Sort u_3}
{s : ι → Set α}
(h₁ : (⋂ i, s i).Nonempty)
(h₂ : ∀ (i : ι), IsPreconnected (s i))


/-- A retract of a flat `R`-module is flat. -/
lemma of_retract [f : Flat R M] (i : N →ₗ[R] M) (r : M →ₗ[R] N) (h : r.comp i = LinearMap.id) :
    Flat R N

(R : Type u)
(M : Type v)
[CommRing R]
[AddCommGroup M]
[Module R M]
(N : Type w)
[AddCommGroup N]
[Module R N]
[f : Module.Flat R M]
(i : N →ₗ[R] M)
(r : M →ₗ[R] N)
(h : r ∘ₗ i = LinearMap.id)


theorem dvd_of_mul_right_dvd (h : a * b ∣ c) : a ∣ c

{α : Type u_1}
[Semigroup α]
{a b c : α}
(h : a * b ∣ c)


@[simp]
theorem toSubmodule_eq_top {S : Subalgebra R A} : Subalgebra.toSubmodule S = ⊤ ↔ S = ⊤

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{S : Subalgebra R A}


@[simp]
theorem one_lt_ofNat : 1 < (no_index (OfNat.ofNat n : α))

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


protected theorem coe_two : ((2 : ℝ≥0) : ℝ) = 2


/-- A product over an index type with exactly one term is just the object over that term. -/
@[simps!]
def productUniqueIso : ∏ᶜ f ≅ f default

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

(CategoryTheory.Limits.productUniqueIso f).hom =
  CategoryTheory.Limits.limit.π (CategoryTheory.Discrete.functor f) default


lemma ShortComplex.exact_iff_exact_up_to_refinements :
    S.Exact ↔ ∀ ⦃A : C⦄ (x₂ : A ⟶ S.X₂) (_ : x₂ ≫ S.g = 0),
      ∃ (A' : C) (π : A' ⟶ A) (_ : Epi π) (x₁ : A' ⟶ S.X₁), π ≫ x₂ = x₁ ≫ S.f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
(S : CategoryTheory.ShortComplex C)

S.Exact ↔
  ∀ ⦃A : C⦄ (x₂ : A ⟶ S.X₂),
    CategoryTheory.CategoryStruct.comp x₂ S.g = 0 →
      ∃ A' π,
        ∃ (_ : CategoryTheory.Epi π),
          ∃ x₁, CategoryTheory.CategoryStruct.comp π x₂ = CategoryTheory.CategoryStruct.comp x₁ S.f


lemma covBy_iff : s ⋖ t ↔ ∃ a, a ::ₘ s = t


theorem monotone_app (f : β → α → γ) (b : β) (hf : Monotone fun a b ↦ f b a) : Monotone (f b)

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder α]
[Preorder γ]
(f : β → α → γ)
(b : β)
(hf : Monotone fun a b => f b a)


theorem InjOn.mem_image_iff {x} (hf : InjOn f s) (hs : s₁ ⊆ s) (hx : x ∈ s) :
    f x ∈ f '' s₁ ↔ x ∈ s₁

{α : Type u_1}
{β : Type u_2}
{s s₁ : Set α}
{f : α → β}
{x : α}
(hf : Set.InjOn f s)
(hs : s₁ ⊆ s)
(hx : x ∈ s)


theorem Functor.map_comp_map (f : α → β) (g : β → γ) :
    ((g <$> ·) ∘ (f <$> ·) : F α → F γ) = ((g ∘ f) <$> ·)

{F : Type u → Type v}
{α β γ : Type u}
[Functor F]
[LawfulFunctor F]
(f : α → β)
(g : β → γ)


theorem SupIndep.product {s : Finset ι} {t : Finset ι'} {f : ι × ι' → α}
    (hs : s.SupIndep fun i => t.sup fun i' => f (i, i'))
    (ht : t.SupIndep fun i' => s.sup fun i => f (i, i')) : (s ×ˢ t).SupIndep f

{f : ι × ι' → α}


/-- An algebra of sets is closed by difference. -/
theorem diff_mem (h𝒜 : IsSetAlgebra 𝒜) (s_mem : s ∈ 𝒜) (t_mem : t ∈ 𝒜) :
    s \ t ∈ 𝒜

{α : Type u_1}
{𝒜 : Set (Set α)}
{s t : Set α}
(h𝒜 : MeasureTheory.IsSetAlgebra 𝒜)
(s_mem : s ∈ 𝒜)
(t_mem : t ∈ 𝒜)


/-- Local instance for `TransOrd (ord.on f)`. -/
theorem TransOrd.instOn [ord : Ord β] [TransOrd β] (f : α → β) : @TransOrd _ (ord.on f)

{β : Type u_1}
{α : Type u_2}
[ord : Ord β]
[Batteries.TransOrd β]
(f : α → β)


theorem nine_dvd_iff (n : ℕ) : 9 ∣ n ↔ 9 ∣ (digits 10 n).sum


/-- The region between two measurable functions on a measurable set is measurable;
a version for the region together with the graphs of both functions. -/
theorem measurableSet_region_between_cc (hf : Measurable f) (hg : Measurable g)
    (hs : MeasurableSet s) :
    MeasurableSet { p : α × ℝ | p.fst ∈ s ∧ p.snd ∈ Icc (f p.fst) (g p.fst) }

{α : Type u_1}
[MeasurableSpace α]
{f g : α → ℝ}
{s : Set α}
(hf : Measurable f)
(hg : Measurable g)
(hs : MeasurableSet s)

MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Icc (f p.1) (g p.1)}


theorem generatePiSystem_eq {α} {S : Set (Set α)} (h_pi : IsPiSystem S) : generatePiSystem S = S

{α : Type u_1}
{S : Set (Set α)}
(h_pi : IsPiSystem S)


/-- If functions `f'` and `f` are inverse on `s` and `t`, `f` maps `s` into `t`, and `f'` maps `t`
into `s`, then `f` is a bijection between `s` and `t`. The `mapsTo` arguments can be deduced from
`surjOn` statements using `LeftInvOn.mapsTo` and `RightInvOn.mapsTo`. -/
theorem bijOn (h : InvOn f' f s t) (hf : MapsTo f s t) (hf' : MapsTo f' t s) : BijOn f s t

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
{f' : β → α}
(h : Set.InvOn f' f s t)
(hf : Set.MapsTo f s t)
(hf' : Set.MapsTo f' t s)


@[to_additive addCHaar_self]
theorem chaar_self (K₀ : PositiveCompacts G) : chaar K₀ K₀.toCompacts = 1

(K₀ : TopologicalSpace.PositiveCompacts G)

MeasureTheory.Measure.haar.addCHaar K₀ K₀.toCompacts = 1


/-- The antidiagonal of `0` is the list `[(0, 0)]` -/
@[simp]
theorem antidiagonal_zero : antidiagonal 0 = [(0, 0)]


/-- A nondegenerate quadratic form on the complex numbers is equivalent to
the sum of squares, i.e. `weightedSumSquares` with weight `fun (i : ι) => 1`. -/
theorem equivalent_sum_squares {M : Type*} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
    (Q : QuadraticForm ℂ M) (hQ : (associated (R := ℂ) Q).SeparatingLeft) :
    Equivalent Q (weightedSumSquares ℂ (1 : Fin (FiniteDimensional.finrank ℂ M) → ℂ))

(hQ : LinearMap.SeparatingLeft (QuadraticMap.associated Q))

QuadraticMap.Equivalent Q (QuadraticMap.weightedSumSquares ℂ 1)


@[to_additive]
theorem lt_mul_of_one_le_of_lt [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c : α} (ha : 1 ≤ a)
    (hbc : b < c) :
    b < a * c

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


@[simp]
theorem toReal_pow (a : ℝ≥0∞) (n : ℕ) : (a ^ n).toReal = a.toReal ^ n


/-- When `t` is supported on `s`, `f ∈ s.dfinsupp t` precisely means that `f` is pointwise in `t`.
-/
@[simp]
theorem mem_dfinsupp_iff_of_support_subset {t : Π₀ i, Finset (α i)} (ht : t.support ⊆ s) :
    f ∈ s.dfinsupp t ↔ ∀ i, f i ∈ t i

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → Zero (α i)]
{s : Finset ι}
{f : Π₀ (i : ι), α i}
[(i : ι) → DecidableEq (α i)]
{t : Π₀ (i : ι), Finset (α i)}
(ht : t.support ⊆ s)

f ∈ s.dfinsupp ⇑t ↔ ∀ (i : ι), f i ∈ t i


lemma const_le_elim_iff {b : β} {v₁ : α₁ → β} {v₂ : α₂ → β} :
    Function.const _ b ≤ Sum.elim v₁ v₂ ↔ Function.const _ b ≤ v₁ ∧ Function.const _ b ≤ v₂

{β : Type u_3}
{α₁ : Type u_5}
{α₂ : Type u_6}
[LE β]
{b : β}
{v₁ : α₁ → β}
{v₂ : α₂ → β}

Function.const (α₁ ⊕ α₂) b ≤ Sum.elim v₁ v₂ ↔ Function.const α₁ b ≤ v₁ ∧ Function.const α₂ b ≤ v₂


/-- Assumes right covariance. -/
theorem Right.mul_lt_one_of_le_of_lt_of_nonneg [MulPosMono α] (ha : a ≤ 1) (hb : b < 1)
    (b0 : 0 ≤ b) : a * b < 1

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[MulPosMono α]
(ha : a ≤ 1)
(hb : b < 1)
(b0 : 0 ≤ b)


/-- Iff version of extensionality rule for congruence relations. -/
@[to_additive "Iff version of extensionality rule for additive congruence relations."]
protected theorem ext_iff {c d : Con M} : c = d ↔ (∀ x y, c x y ↔ d x y)


protected lemma BijOn.extendDomain (h : BijOn g s t) :
    BijOn (g.extendDomain f) ((↑) ∘ f '' s) ((↑) ∘ f '' t)

{α : Type u_1}
{β : Type u_2}
{p : β → Prop}
[DecidablePred p]
{f : α ≃ Subtype p}
{g : Equiv.Perm α}
{s t : Set α}
(h : Set.BijOn (⇑g) s t)

Set.BijOn (⇑(g.extendDomain f)) (Subtype.val ∘ ⇑f '' s) (Subtype.val ∘ ⇑f '' t)


@[simp]
theorem zpow_neg_natCast (A : M) (n : ℕ) : A ^ (-n : ℤ) = (A ^ n)⁻¹

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


theorem induction {Y : C} {n q : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish q φ) :
    HigherFacesVanish (q + 1) (φ ≫ (𝟙 _ + Hσ q).f (n + 1))

(v : AlgebraicTopology.DoldKan.HigherFacesVanish q φ)

AlgebraicTopology.DoldKan.HigherFacesVanish (q + 1)
  (φ ≫ (𝟙 (AlgebraicTopology.AlternatingFaceMapComplex.obj X) + AlgebraicTopology.DoldKan.Hσ q).f (n + 1))


theorem Tendsto.isLindelof_insert_range_of_coLindelof {f : X → Y} {y}
    (hf : Tendsto f (coLindelof X) (𝓝 y)) (hfc : Continuous f) :
    IsLindelof (insert y (range f))

(hf : Filter.Tendsto f (Filter.coLindelof X) (𝓝 y))


@[simp]
theorem deleteEdges_spanningCoe_eq :
    G'.spanningCoe.deleteEdges s = (G'.deleteEdges s).spanningCoe

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
(s : Set (Sym2 V))


/-- `Fintype α` means that `α` is finite, i.e. there are only
  finitely many distinct elements of type `α`. The evidence of this
  is a finset `elems` (a list up to permutation without duplicates),
  together with a proof that everything of type `α` is in the list. -/
class Fintype (α : Type*) where
  /-- The `Finset` containing all elements of a `Fintype` -/
  elems : Finset α
  /-- A proof that `elems` contains every element of the type -/
  complete : ∀ x : α, x ∈ elems

{α : Type u_4}
[self : Fintype α]
(x : α)


lemma ContextFreeGrammar.reverse_derives (g : ContextFreeGrammar T) {s : List (Symbol T g.NT)}
    (hgs : g.reverse.Derives [Symbol.nonterminal g.reverse.initial] s) :
    g.Derives [Symbol.nonterminal g.initial] s.reverse


theorem integral_rpow_mul_exp_neg_rpow {p q : ℝ} (hp : 0 < p) (hq : - 1 < q) :
    ∫ x in Ioi (0 : ℝ), x ^ q * exp (- x ^ p) = (1 / p) * Gamma ((q + 1) / p)

∫ (x : ℝ) in Set.Ioi 0, x ^ q * rexp (-x ^ p) = 1 / p * Real.Gamma ((q + 1) / p)


lemma desc_f (p q : ℤ) (hpq : p + 1 = q) :
    (desc φ α β eq).f p = (fst φ).1.v p q hpq ≫ α.v q p (by omega) +
      (snd φ).v p p (add_zero p) ≫ β.f p

(α : CochainComplex.HomComplex.Cochain F K (-1))

(eq : CochainComplex.HomComplex.δ (-1) 0 α = CochainComplex.HomComplex.Cochain.ofHom (φ ≫ β))

(CochainComplex.mappingCone.desc φ α β eq).f p =
  (↑(CochainComplex.mappingCone.fst φ)).v p q hpq ≫ α.v q p ⋯ + (CochainComplex.mappingCone.snd φ).v p p ⋯ ≫ β.f p


theorem vecMul_fromBlocks [Fintype n] [Fintype o] [NonUnitalNonAssocSemiring α] (A : Matrix n l α)
    (B : Matrix n m α) (C : Matrix o l α) (D : Matrix o m α) (x : n ⊕ o → α) :
    x ᵥ* fromBlocks A B C D =
      Sum.elim ((x ∘ Sum.inl) ᵥ* A + (x ∘ Sum.inr) ᵥ* C)
        ((x ∘ Sum.inl) ᵥ* B + (x ∘ Sum.inr) ᵥ* D)

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
[Fintype n]
[Fintype o]
[NonUnitalNonAssocSemiring α]
(A : Matrix n l α)
(B : Matrix n m α)
(C : Matrix o l α)
(D : Matrix o m α)
(x : n ⊕ o → α)

x ᵥ* Matrix.fromBlocks A B C D = Sum.elim (x ∘ Sum.inl ᵥ* A + x ∘ Sum.inr ᵥ* C) (x ∘ Sum.inl ᵥ* B + x ∘ Sum.inr ᵥ* D)


@[simp]
lemma fst_zero : fst (0 : Kernel α (β × γ)) = 0

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


theorem Memℒp.sub {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) : Memℒp (f - g) p μ

{α : Type u_1}
{E : Type u_2}
{m : MeasurableSpace α}
[NormedAddCommGroup E]
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
{f g : α → E}
(hf : MeasureTheory.Memℒp f p μ)
(hg : MeasureTheory.Memℒp g p μ)


theorem le_natCast_sub (m n : ℕ) : (m - n : ℤ) ≤ ↑(m - n : ℕ)


theorem Preorder.ext {A B : Preorder α}
    (H : ∀ x y : α, (haveI := A; x ≤ y) ↔ x ≤ y) : A = B

{α : Type u_2}
{A B : Preorder α}
(H : ∀ (x y : α), x ≤ y ↔ x ≤ y)


/-- A morphism of seminormed abelian groups is a bounded group homomorphism. -/
structure NormedAddGroupHom (V W : Type*) [SeminormedAddCommGroup V]
  [SeminormedAddCommGroup W] where
  /-- The function underlying a `NormedAddGroupHom` -/
  toFun : V → W
  /-- A `NormedAddGroupHom` is additive. -/
  map_add' : ∀ v₁ v₂, toFun (v₁ + v₂) = toFun v₁ + toFun v₂
  /-- A `NormedAddGroupHom` is bounded. -/
  bound' : ∃ C, ∀ v, ‖toFun v‖ ≤ C * ‖v‖

{V : Type u_1}
{W : Type u_2}
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
(self : NormedAddGroupHom V W)

∃ C, ∀ (v : V), ‖self.toFun v‖ ≤ C * ‖v‖


lemma IsMeasurableRatCDF.continuousWithinAt_stieltjesFunctionAux_Ici (a : α) (x : ℝ) :
    ContinuousWithinAt (IsMeasurableRatCDF.stieltjesFunctionAux f a) (Ici x) x

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)

ContinuousWithinAt (ProbabilityTheory.IsMeasurableRatCDF.stieltjesFunctionAux f a) (Set.Ici x) x


/-- A functor `G : (C, J) ⥤ (D, K)` between sites is *cover-preserving*
if for all covering sieves `R` in `C`, `R.functorPushforward G` is a covering sieve in `D`.
-/
-- Porting note(#5171): removed `@[nolint has_nonempty_instance]`
structure CoverPreserving (G : C ⥤ D) : Prop where
  cover_preserve : ∀ {U : C} {S : Sieve U} (_ : S ∈ J U), S.functorPushforward G ∈ K (G.obj U)

{J : CategoryTheory.GrothendieckTopology C}

{K : CategoryTheory.GrothendieckTopology D}

(self : CategoryTheory.CoverPreserving J K G)

S ∈ J.sieves U → CategoryTheory.Sieve.functorPushforward G S ∈ K.sieves (G.obj U)


theorem Surjective.preimage_subset_preimage_iff {s t : Set β} (hf : Surjective f) :
    f ⁻¹' s ⊆ f ⁻¹' t ↔ s ⊆ t

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{s t : Set β}
(hf : Function.Surjective f)


@[simp] lemma mem_Ioo : x ∈ Ioo a b ↔ a < x ∧ x < b

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


/-- `Fin.sigma_eq_of_eq_comp_cast` as an `iff`. -/
theorem sigma_eq_iff_eq_comp_cast {α : Type*} {a b : Σii, Fin ii → α} :
    a = b ↔ ∃ h : a.fst = b.fst, a.snd = b.snd ∘ Fin.cast h

{α : Type u_1}
{a b : (ii : ℕ) × (Fin ii → α)}

a = b ↔ ∃ (h : a.fst = b.fst), a.snd = b.snd ∘ Fin.cast h


theorem HasDerivWithinAt.congr_deriv (h : HasDerivWithinAt f f' s x) (h' : f' = g') :
    HasDerivWithinAt f g' s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' g' : F}
{x : 𝕜}
{s : Set 𝕜}
(h : HasDerivWithinAt f f' s x)
(h' : f' = g')


theorem IsPrimePow.pow {n : R} (hn : IsPrimePow n) {k : ℕ} (hk : k ≠ 0) : IsPrimePow (n ^ k)

{R : Type u_1}
[CommMonoidWithZero R]
{n : R}
(hn : IsPrimePow n)
{k : ℕ}
(hk : k ≠ 0)


@[to_additive]
theorem SubgroupNormal.mem_comm {H K : Subgroup G} (hK : H ≤ K) [hN : (H.subgroupOf K).Normal]
    {a b : G} (hb : b ∈ K) (h : a * b ∈ H) : b * a ∈ H

{G : Type u_1}
[AddGroup G]
{H K : AddSubgroup G}
(hK : H ≤ K)
[hN : (H.addSubgroupOf K).Normal]
{a b : G}
(hb : b ∈ K)
(h : a + b ∈ H)


@[simp]
theorem differentiableAt_neg_iff : DifferentiableAt 𝕜 (fun y => -f y) x ↔ DifferentiableAt 𝕜 f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}


theorem lt_add_succ (a : Int) (n : Nat) : a < a + Nat.succ n


protected theorem exact {p p' : α × α} (h : Sym2.mk p = Sym2.mk p') : Sym2.Rel α p p'

{α : Type u_1}
{p p' : α × α}
(h : Sym2.mk p = Sym2.mk p')


theorem inv_le_of_le_mul {r p : ℝ≥0} (h : 1 ≤ r * p) : r⁻¹ ≤ p


theorem mul_apply (f g : Perm α) (x) : (f * g) x = f (g x)

{α : Type u}
(f g : Equiv.Perm α)
(x : α)


/-- The type of bounded order homomorphisms from `α` to `β`. -/
structure BoundedOrderHom (α β : Type*) [Preorder α] [Preorder β] [BoundedOrder α]
  [BoundedOrder β] extends OrderHom α β where
  /-- The function preserves the top element. The preferred spelling is `map_top`. -/
  map_top' : toFun ⊤ = ⊤
  /-- The function preserves the bottom element. The preferred spelling is `map_bot`. -/
  map_bot' : toFun ⊥ = ⊥

{α : Type u_6}
{β : Type u_7}
[Preorder α]
[Preorder β]
[BoundedOrder α]
[BoundedOrder β]
(self : BoundedOrderHom α β)


protected theorem pow_mem {x : L} (hx : x ∈ S) (n : ℤ) : x ^ n ∈ S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)
{x : L}
(hx : x ∈ S)
(n : ℤ)


/--
If `L` preserves the appropriate colimit, then given a colimit cocone for `F ⋙ fst L R : J ⥤ L` and
a cocone for `F ⋙ snd L R : J ⥤ R` we can build a cocone for `F` which will turn out to be a
colimit cocone.
-/
@[simps]
def coconeOfPreserves [PreservesColimit (F ⋙ fst L R) L] {c₁ : Cocone (F ⋙ fst L R)}
    (t₁ : IsColimit c₁) (c₂ : Cocone (F ⋙ snd L R)) : Cocone F

(F : CategoryTheory.Functor J (CategoryTheory.Comma L R))

[CategoryTheory.Limits.PreservesColimit (F.comp (CategoryTheory.Comma.fst L R)) L]

{c₁ : CategoryTheory.Limits.Cocone (F.comp (CategoryTheory.Comma.fst L R))}

(t₁ : CategoryTheory.Limits.IsColimit c₁)

(c₂ : CategoryTheory.Limits.Cocone (F.comp (CategoryTheory.Comma.snd L R)))

(CategoryTheory.Comma.coconeOfPreserves F t₁ c₂).pt.right = c₂.pt


lemma getD_minimum?_eq_untop'_minimum (l : List α) (d : α) :
    l.minimum?.getD d = l.minimum.untop' d

{α : Type u_1}
[LinearOrder α]
(l : List α)
(d : α)

l.minimum?.getD d = WithTop.untop' d l.minimum


/-- Given two maps `r : I₁ × I₂ × I₃ → J` and `π : I₁ × I₃ → J`, this structure is the
input in the formulation of the triangle equality `mapBifunctor_triangle` which
relates the left and right unitor and the associator for `GradedObject.mapBifunctor`. -/
structure TriangleIndexData (r : I₁ × I₂ × I₃ → J) (π : I₁ × I₃ → J) where
  /-- a map `I₁ × I₂ → I₁` -/
  p₁₂ : I₁ × I₂ → I₁
  hp₁₂ (i : I₁ × I₂ × I₃) : π ⟨p₁₂ ⟨i.1, i.2.1⟩, i.2.2⟩ = r i
  /-- a map `I₂ × I₃ → I₃` -/
  p₂₃ : I₂ × I₃ → I₃
  hp₂₃ (i : I₁ × I₂ × I₃) : π ⟨i.1, p₂₃ i.2⟩ = r i
  h₁ (i₁ : I₁) : p₁₂ (i₁, 0) = i₁
  h₃ (i₃ : I₃) : p₂₃ (0, i₃) = i₃

(self : CategoryTheory.GradedObject.TriangleIndexData r π)


theorem list_prod_map_rpow' {ι} (l : List ι) (f : ι → ℝ≥0) (r : ℝ) :
    (l.map (f · ^ r)).prod = (l.map f).prod ^ r

{ι : Type u_1}
(l : List ι)
(f : ι → ℝ≥0)
(r : ℝ)

(List.map (fun x => f x ^ r) l).prod = (List.map f l).prod ^ r


@[simp]
theorem snd_add [Add R] [Add A] (x₁ x₂ : Unitization R A) : (x₁ + x₂).snd = x₁.snd + x₂.snd

{R : Type u_3}
{A : Type u_4}
[Add R]
[Add A]
(x₁ x₂ : Unitization R A)


/-- A topological group which is weakly locally compact is automatically locally compact. -/
@[to_additive
  (attr := deprecated WeaklyLocallyCompactSpace.locallyCompactSpace (since := "2024-01-28"))]
theorem instLocallyCompactSpaceOfWeaklyOfGroup [WeaklyLocallyCompactSpace G] :
    LocallyCompactSpace G

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
[WeaklyLocallyCompactSpace G]


@[simp]
lemma tensorQuotEquivQuotSMul_symm_mk (I : Ideal R) (x : M) :
    (tensorQuotEquivQuotSMul M I).symm (Submodule.Quotient.mk x) = x ⊗ₜ[R] 1

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(I : Ideal R)
(x : M)


/-- An equalizer of an idempotent morphism and the identity is split mono. -/
@[simps]
def splitMonoOfIdempotentOfIsLimitFork {X : C} {f : X ⟶ X} (hf : f ≫ f = f) {c : Fork (𝟙 X) f}
    (i : IsLimit c) : SplitMono c.ι

(hf : CategoryTheory.CategoryStruct.comp f f = f)

{c : CategoryTheory.Limits.Fork (CategoryTheory.CategoryStruct.id X) f}

(CategoryTheory.Limits.splitMonoOfIdempotentOfIsLimitFork C hf i).retraction =
  i.lift (CategoryTheory.Limits.Fork.ofι f ⋯)


theorem inclusionBoolΓ'_injective : Function.Injective inclusionBoolΓ'


theorem approx_nonneg (c : CU P) (n : ℕ) (x : X) : 0 ≤ c.approx n x

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


theorem _root_.Finset.infsep_pos_iff_nontrivial (s : Finset α) :
    0 < (s : Set α).infsep ↔ (s : Set α).Nontrivial

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


@[simp] theorem map_join (f : α → β) (L : List (List α)) : map f (join L) = join (map (map f) L)

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(L : List (List α))

List.map f L.join = (List.map (List.map f) L).join


theorem degree_of_b_eq_zero' : (toPoly ⟨0, 0, c, d⟩).degree ≤ 1

{ a := 0, b := 0, c := c, d := d }.toPoly.degree ≤ 1


theorem isLittleO_const_mul_right_iff {g : α → 𝕜} {c : 𝕜} (hc : c ≠ 0) :
    (f =o[l] fun x => c * g x) ↔ f =o[l] g

{α : Type u_1}
{E : Type u_3}
{𝕜 : Type u_15}
[Norm E]
[NormedDivisionRing 𝕜]
{f : α → E}
{l : Filter α}
{g : α → 𝕜}
{c : 𝕜}
(hc : c ≠ 0)


protected theorem add_div : (a + b) / c = a / c + b / c


@[simp]
theorem rootMultiplicity_zero {x : R} : rootMultiplicity x 0 = 0


theorem induction_linear {P : PolynomialModule R M → Prop} (f : PolynomialModule R M) (h0 : P 0)
    (hadd : ∀ f g, P f → P g → P (f + g)) (hsingle : ∀ a b, P (single R a b)) : P f

(hadd : ∀ (f g : PolynomialModule R M), P f → P g → P (f + g))

(hsingle : ∀ (a : ℕ) (b : M), P ((PolynomialModule.single R a) b))


/--
The categories of coherent sheaves and extensive sheaves on `C` are equivalent if `C` is
preregular, finitary extensive, and every object is projective.
-/
@[simps]
def coherentExtensiveEquivalence [Preregular C] [FinitaryExtensive C] [∀ (X : C), Projective X] :
    Sheaf (coherentTopology C) A ≌ Sheaf (extensiveTopology C) A

[∀ (X : C), CategoryTheory.Projective X]

(F : CategoryTheory.Sheaf (CategoryTheory.coherentTopology C) A)

(CategoryTheory.Presheaf.coherentExtensiveEquivalence.functor.obj F).val = F.val


theorem neg_normalize (n d z) : -normalize n d z = normalize (-n) d z

-Rat.normalize n d z = Rat.normalize (-n) d z


@[simp]
theorem toNat_add (hc : c < ℵ₀) (hd : d < ℵ₀) : toNat (c + d) = toNat c + toNat d

{c d : Cardinal.{u}}
(hc : c < Cardinal.aleph0)
(hd : d < Cardinal.aleph0)

Cardinal.toNat (c + d) = Cardinal.toNat c + Cardinal.toNat d


theorem eq_of_isNilpotent_sub_of_isIdempotentElem_of_commute {e₁ e₂ : R}
    (he₁ : IsIdempotentElem e₁) (he₂ : IsIdempotentElem e₂) (H : IsNilpotent (e₁ - e₂))
    (H' : Commute e₁ e₂) :
    e₁ = e₂

{R : Type u_1}
[Ring R]
{e₁ e₂ : R}
(he₁ : IsIdempotentElem e₁)
(he₂ : IsIdempotentElem e₂)
(H : IsNilpotent (e₁ - e₂))
(H' : Commute e₁ e₂)


theorem range_coe (f : M →[L] N) : (range f : Set N) = Set.range f

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
(f : L.Hom M N)


/-- If `E` is a vector space over two division rings `R` and `S`, then scalar multiplications
agree on rational numbers in `R` and `S`. -/
theorem ratCast_smul_eq {E : Type*} (R S : Type*) [AddCommGroup E] [DivisionRing R]
    [DivisionRing S] [Module R E] [Module S E] (r : ℚ) (x : E) : (r : R) • x = (r : S) • x

{E : Type u_3}
(R : Type u_4)
(S : Type u_5)
[AddCommGroup E]
[DivisionRing R]
[DivisionRing S]
[Module R E]
[Module S E]
(r : ℚ)
(x : E)


private theorem soln_unique (z : ℤ_[p]) (hev : F.eval z = 0)
    (hnlt : ‖z - a‖ < ‖F.derivative.eval a‖) : z = soln

(hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2)

(hnlt : ‖z - a‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖)


/-- A pointed map of `Inhabited` types is a map that sends one default value to the other. -/
structure PointedMap.{u, v} (Γ : Type u) (Γ' : Type v) [Inhabited Γ] [Inhabited Γ'] :
    Type max u v where
  /-- The map underlying this instance. -/
  f : Γ → Γ'
  map_pt' : f default = default

{Γ : Type u}
{Γ' : Type v}
[Inhabited Γ]
[Inhabited Γ']
(self : Turing.PointedMap Γ Γ')


theorem iff_eventually_eq (f : X → Y) : IsLocallyConstant f ↔ ∀ x, ∀ᶠ y in 𝓝 x, f y = f x

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

IsLocallyConstant f ↔ ∀ (x : X), ∀ᶠ (y : X) in 𝓝 x, f y = f x


theorem dual_indep_iff_exists' : (M✶.Indep I) ↔ I ⊆ M.E ∧ (∃ B, M.Base B ∧ Disjoint I B)

{α : Type u_1}
{M : Matroid α}
{I : Set α}

M✶.Indep I ↔ I ⊆ M.E ∧ ∃ B, M.Base B ∧ Disjoint I B


@[to_additive]
theorem map_units (f : LocalizationMap S N) (y : S) : IsUnit (f.toMap y)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
(y : ↥S)


/-- The top submodule is linearly equivalent to the module.

This is the module version of `AddSubmonoid.topEquiv`. -/
@[simps]
def topEquiv : (⊤ : Submodule R M) ≃ₗ[R] M

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


@[simp]
theorem coe_zero : ⇑(0 : A →ₑ+[φ] B) = 0

{M : Type u_1}
[Monoid M]
{N : Type u_2}
[Monoid N]
{φ : M →* N}
{A : Type u_4}
[AddMonoid A]
[DistribMulAction M A]
{B : Type u_5}
[AddMonoid B]
[DistribMulAction N B]


@[simp] theorem add_eval (l₁ l₂ : LinearCombo) (v : Coeffs) :
    (l₁ + l₂).eval v = l₁.eval v + l₂.eval v

(l₁ l₂ : Lean.Omega.LinearCombo)
(v : Lean.Omega.Coeffs)


/-- The cofork which describes the counit of the adjunction: the morphism from the coequalizer of
this pair to this morphism is the counit.
-/
@[simps!]
def counitCofork (B : D) :
    Cofork (F.map (G.map (adj.counit.app B)))
      (adj.counit.app (F.obj (G.obj B)))

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

(CategoryTheory.Monad.MonadicityInternal.counitCofork adj B).pt = B


theorem degMatrix_mulVec_apply [NonAssocSemiring R] (v : V) (vec : V → R) :
    (G.degMatrix R *ᵥ vec) v = G.degree v * vec v

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

(SimpleGraph.degMatrix R G *ᵥ vec) v = ↑(G.degree v) * vec v


@[simp]
theorem antidiagonalTuple_zero_succ (n : ℕ) : antidiagonalTuple 0 (n + 1) = []

List.Nat.antidiagonalTuple 0 (n + 1) = []


theorem ker_transferSylow_disjoint (Q : Subgroup G) (hQ : IsPGroup p Q) :
    Disjoint (transferSylow P hP).ker Q

(hP : (↑P).normalizer ≤ Subgroup.centralizer ↑P)

Disjoint (MonoidHom.transferSylow P hP).ker Q


@[reassoc]
lemma LeftHomologyData.leftHomologyIso_hom_naturality
    (h₁ : S₁.LeftHomologyData) (h₂ : S₂.LeftHomologyData) :
    h₁.homologyIso.hom ≫ leftHomologyMap' φ h₁ h₂ =
      homologyMap φ ≫ h₂.homologyIso.hom

CategoryTheory.CategoryStruct.comp h₁.homologyIso.hom (CategoryTheory.ShortComplex.leftHomologyMap' φ h₁ h₂) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap φ) h₂.homologyIso.hom


@[to_additive]
theorem mul_mem_mul : s ∈ f → t ∈ g → s * t ∈ f * g

{α : Type u_2}
[Add α]
{f g : Filter α}
{s t : Set α}


@[simp] lemma two_dvd_ne_zero : ¬2 ∣ n ↔ n % 2 = 1


@[simp]
theorem SpecMap_ΓSpecIso_hom (R : CommRingCat.{u}) :
    Spec.map ((Scheme.ΓSpecIso R).hom) = adjunction.unit.app (Spec R)

AlgebraicGeometry.Spec.map (AlgebraicGeometry.Scheme.ΓSpecIso R).hom =
  AlgebraicGeometry.ΓSpec.adjunction.unit.app (AlgebraicGeometry.Spec R)


@[measurability]
theorem Measurable.clog : Measurable fun x => Complex.log (f x)

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → ℂ}
(hf : Measurable f)


/-- If `K` is a compact set in an R₁ space and `s ⊇ K` is a Borel measurable superset,
then `s` includes the closure of `K` as well. -/
theorem IsCompact.closure_subset_measurableSet [R1Space γ] {K s : Set γ} (hK : IsCompact K)
    (hs : MeasurableSet s) (hKs : K ⊆ s) : closure K ⊆ s

{γ : Type u_3}
[TopologicalSpace γ]
[MeasurableSpace γ]
[BorelSpace γ]
[R1Space γ]
{K s : Set γ}
(hK : IsCompact K)
(hs : MeasurableSet s)
(hKs : K ⊆ s)


/-- The isomorphism between points of limit kernel forks induced by an isomorphism
in the category of arrows. -/
@[simps]
def mapIsoOfIsLimit {kf : KernelFork f} {kf' : KernelFork f'}
    (hf : IsLimit kf) (hf' : IsLimit kf')
    (φ : Arrow.mk f ≅ Arrow.mk f') : kf.pt ≅ kf'.pt

{kf : CategoryTheory.Limits.KernelFork f}

{kf' : CategoryTheory.Limits.KernelFork f'}

(hf' : CategoryTheory.Limits.IsLimit kf')

(φ : CategoryTheory.Arrow.mk f ≅ CategoryTheory.Arrow.mk f')

(CategoryTheory.Limits.KernelFork.mapIsoOfIsLimit hf hf' φ).inv = kf'.mapOfIsLimit hf φ.inv


theorem ncard_eq_of_bijective {n : ℕ} (f : ∀ i, i < n → α)
    (hf : ∀ a ∈ s, ∃ i, ∃ h : i < n, f i h = a) (hf' : ∀ (i) (h : i < n), f i h ∈ s)
    (f_inj : ∀ (i j) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j) : s.ncard = n

(hf : ∀ a ∈ s, ∃ i, ∃ (h : i < n), f i h = a)

(hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s)

(f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j)


@[simp]
theorem mapDomain_equiv_apply {f : α ≃ β} (x : α →₀ M) (a : β) :
    mapDomain f x a = x (f.symm a)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{f : α ≃ β}
(x : α →₀ M)
(a : β)

(Finsupp.mapDomain (⇑f) x) a = x (f.symm a)


@[simp] theorem length_erase_of_mem [LawfulBEq α] {a : α} {l : List α} (h : a ∈ l) :
    length (l.erase a) = Nat.pred (length l)

{α : Type u_1}
[BEq α]
[LawfulBEq α]
{a : α}
{l : List α}
(h : a ∈ l)


theorem col_eq_prod {μ : YoungDiagram} {j : ℕ} : μ.col j = Finset.range (μ.colLen j) ×ˢ {j}


theorem not_fuzzy_of_le {x y : PGame} (h : x ≤ y) : ¬x ‖ y


@[simp]
theorem edgeDensity_empty_left (t : Finset β) : edgeDensity r ∅ t = 0

{α : Type u_4}
{β : Type u_5}
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]
(t : Finset β)


theorem derivative_rootMultiplicity_of_root_of_mem_nonZeroDivisors
    {p : R[X]} {t : R} (hpt : Polynomial.IsRoot p t)
    (hnzd : (p.rootMultiplicity t : R) ∈ nonZeroDivisors R) :
    (derivative p).rootMultiplicity t = p.rootMultiplicity t - 1

(hnzd : ↑(Polynomial.rootMultiplicity t p) ∈ nonZeroDivisors R)

Polynomial.rootMultiplicity t (Polynomial.derivative p) = Polynomial.rootMultiplicity t p - 1


@[simp]
protected theorem disjointed {f : ℕ → Set α} (h : ∀ i, NullMeasurableSet (f i) μ) (n) :
    NullMeasurableSet (disjointed f n) μ

(h : ∀ (i : ℕ), MeasureTheory.NullMeasurableSet (f i) μ)

MeasureTheory.NullMeasurableSet (disjointed f n) μ


@[to_additive (attr := simp) le_add_iff_nonneg_left]
theorem le_mul_iff_one_le_left' [CovariantClass α α (swap (· * ·)) (· ≤ ·)]
    [ContravariantClass α α (swap (· * ·)) (· ≤ ·)] (a : α) {b : α} :
    a ≤ b * a ↔ 1 ≤ b

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

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


@[to_additive]
theorem uniformGroup_sInf {us : Set (UniformSpace β)} (h : ∀ u ∈ us, @UniformGroup β u _) :
    @UniformGroup β (sInf us) _

{β : Type u_2}
[AddGroup β]
{us : Set (UniformSpace β)}
(h : ∀ u ∈ us, UniformAddGroup β)


@[to_additive]
theorem lowerClosure_mul : ↑(lowerClosure s) * t = lowerClosure (s * t)

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

↑(lowerClosure s) + t = ↑(lowerClosure (s + t))


@[simp]
theorem restrict_ite (f g : α → β) (s : Set α) [∀ x, Decidable (x ∈ s)] :
    (s.restrict fun a => if a ∈ s then f a else g a) = s.restrict f

{α : Type u_1}
{β : Type u_2}
(f g : α → β)
(s : Set α)
[(x : α) → Decidable (x ∈ s)]


/--
If `x` is a point in the basic open set `D(f)` where `f` is a homogeneous element of positive
degree, then the homogeneously localized ring `A⁰ₓ` has the universal property of the localization
of `A⁰_f` at `φ(x)` where `φ : Proj|D(f) ⟶ Spec A⁰_f` is the morphism of locally ringed space
constructed as above.
-/
lemma isLocalization_atPrime (f) (x : pbo f) {m} (f_deg : f ∈ 𝒜 m) (hm : 0 < m) :
    @IsLocalization (Away 𝒜 f) _ ((toSpec 𝒜 f).1.base x).asIdeal.primeCompl
      (AtPrime 𝒜 x.1.asHomogeneousIdeal.toIdeal) _
      (mapId 𝒜 (Submonoid.powers_le.mpr x.2)).toAlgebra

(x : ↥(ProjectiveSpectrum.basicOpen 𝒜 f))

IsLocalization ((AlgebraicGeometry.ProjectiveSpectrum.Proj.toSpec 𝒜 f).val.base x).asIdeal.primeCompl
  (HomogeneousLocalization.AtPrime 𝒜 (↑x).asHomogeneousIdeal.toIdeal)


lemma SurjOn.prodMap (h₁ : SurjOn f₁ s₁ t₁) (h₂ : SurjOn f₂ s₂ t₂) :
    SurjOn (fun x ↦ (f₁ x.1, f₂ x.2)) (s₁ ×ˢ s₂) (t₁ ×ˢ t₂)

{α₁ : Type u_6}
{α₂ : Type u_7}
{β₁ : Type u_8}
{β₂ : Type u_9}
{s₁ : Set α₁}
{s₂ : Set α₂}
{t₁ : Set β₁}
{t₂ : Set β₂}
{f₁ : α₁ → β₁}
{f₂ : α₂ → β₂}
(h₁ : Set.SurjOn f₁ s₁ t₁)
(h₂ : Set.SurjOn f₂ s₂ t₂)

Set.SurjOn (fun x => (f₁ x.1, f₂ x.2)) (s₁ ×ˢ s₂) (t₁ ×ˢ t₂)


@[simp] lemma tensorRId_apply (Q₁ : QuadraticForm R M₁) (x : M₁ ⊗[R] R) :
    tensorRId Q₁ x = TensorProduct.rid R M₁ x

{R : Type uR}
{M₁ : Type uM₁}
[CommRing R]
[AddCommGroup M₁]
[Module R M₁]
[Invertible 2]
(Q₁ : QuadraticForm R M₁)
(x : M₁ ⊗[R] R)

Q₁.tensorRId x = (TensorProduct.rid R M₁) x


/-- A set in a nontrivial densely linear ordered type is dense in the sense of topology if and only
if for any `a < b` there exists `c ∈ s`, `a < c < b`. Each implication requires less typeclass
assumptions. -/
theorem dense_iff_exists_between [OrderTopology α] [DenselyOrdered α] [Nontrivial α] {s : Set α} :
    Dense s ↔ ∀ a b, a < b → ∃ c ∈ s, a < c ∧ c < b

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[Nontrivial α]
{s : Set α}

Dense s ↔ ∀ (a b : α), a < b → ∃ c ∈ s, a < c ∧ c < b


/-- Extended norm on a vector space. As in the case of normed spaces, we require only
`‖c • x‖ ≤ ‖c‖ * ‖x‖` in the definition, then prove an equality in `map_smul`. -/
structure ENorm (𝕜 : Type*) (V : Type*) [NormedField 𝕜] [AddCommGroup V] [Module 𝕜 V] where
  toFun : V → ℝ≥0∞
  eq_zero' : ∀ x, toFun x = 0 → x = 0
  map_add_le' : ∀ x y : V, toFun (x + y) ≤ toFun x + toFun y
  map_smul_le' : ∀ (c : 𝕜) (x : V), toFun (c • x) ≤ ‖c‖₊ * toFun x

{𝕜 : Type u_1}
{V : Type u_2}
[NormedField 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
(self : ENorm 𝕜 V)
(c : 𝕜)
(x : V)


theorem continuous_coe : Continuous ((↑) : α → Completion α)


/-- The restriction of a function onto the preimage of a set. -/
@[simps!]
def restrictPreimage (t : Set β) (f : α → β) : f ⁻¹' t → t

{α : Type u}
{β : Type v}
(t : Set β)
(f : α → β)

∀ (a : ↑(f ⁻¹' t)), ↑(t.restrictPreimage f a) = f ↑a


@[simp]
theorem aevalTower_comp_C : (aevalTower g y : R[X] →+* A').comp C = g

{R : Type u}
{S : Type v}
{A' : Type u_1}
[CommSemiring R]
[CommSemiring A']
[CommSemiring S]
[Algebra S R]
[Algebra S A']
(g : R →ₐ[S] A')
(y : A')

(↑(Polynomial.aevalTower g y)).comp Polynomial.C = ↑g


@[to_additive (attr := gcongr) sub_le_sub_left]
theorem div_le_div_left' (h : a ≤ b) (c : α) : c / b ≤ c / a

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


/-- Constructs an equivalence between distributive lattices from an order isomorphism between them.
-/
@[simps]
def Iso.mk {α β : DistLat.{u}} (e : α ≃o β) : α ≅ β


@[to_additive (attr := norm_cast)]
theorem coe_mk (x : G) (hx : x ∈ H) : ((⟨x, hx⟩ : H) : G) = x

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


theorem logb_pos (hx : 1 < x) : 0 < logb b x


/-- Congruence relations are reflexive. -/
@[to_additive "Additive congruence relations are reflexive."]
protected theorem refl (x) : c x x

{M : Type u_1}
[Add M]
(c : AddCon M)
(x : M)


theorem normalized_count_X_eq_of_coe {P : k[X]} (hP : P ≠ 0) :
    Multiset.count PowerSeries.X (normalizedFactors (P : k⟦X⟧)) =
      Multiset.count Polynomial.X (normalizedFactors P)

{k : Type u_2}
[Field k]
{P : Polynomial k}
(hP : P ≠ 0)

Multiset.count PowerSeries.X (UniqueFactorizationMonoid.normalizedFactors ↑P) =
  Multiset.count Polynomial.X (UniqueFactorizationMonoid.normalizedFactors P)


@[simp]
theorem measure_univ_pos : 0 < μ univ ↔ μ ≠ 0

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


/-- A `σ₁₂`-semilinear isometric embedding of a normed `R`-module into an `R₂`-module. -/
structure LinearIsometry (σ₁₂ : R →+* R₂) (E E₂ : Type*) [SeminormedAddCommGroup E]
  [SeminormedAddCommGroup E₂] [Module R E] [Module R₂ E₂] extends E →ₛₗ[σ₁₂] E₂ where
  norm_map' : ∀ x, ‖toLinearMap x‖ = ‖x‖

{R : Type u_1}
{R₂ : Type u_2}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
{E : Type u_11}
{E₂ : Type u_12}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(self : E →ₛₗᵢ[σ₁₂] E₂)
(x : E)


theorem ceil_eq_iff (hn : n ≠ 0) : ⌈a⌉₊ = n ↔ ↑(n - 1) < a ∧ a ≤ n

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
{n : ℕ}
(hn : n ≠ 0)


theorem image₂_left_comm {γ : Type*} {u : Finset γ} {f : α → δ → ε} {g : β → γ → δ}
    {f' : α → γ → δ'} {g' : β → δ' → ε} (h_left_comm : ∀ a b c, f a (g b c) = g' b (f' a c)) :
    image₂ f s (image₂ g t u) = image₂ g' t (image₂ f' s u)

{f : α → δ → ε}

{g : β → γ → δ}

(h_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c))

Finset.image₂ f s (Finset.image₂ g t u) = Finset.image₂ g' t (Finset.image₂ f' s u)


theorem Base.basis_of_restriction (hI : N.Base I) (hNM : N ≤r M) : M.Basis I N.E

{α : Type u_1}
{M : Matroid α}
{I : Set α}
{N : Matroid α}
(hI : N.Base I)
(hNM : N.Restriction M)


@[to_additive (attr := ext)]
theorem CancelCommMonoid.ext {M : Type*} ⦃m₁ m₂ : CancelCommMonoid M⦄
    (h_mul : (letI := m₁; HMul.hMul : M → M → M) = (letI := m₂; HMul.hMul : M → M → M)) :
    m₁ = m₂

{M : Type u_1}
⦃m₁ m₂ : CancelCommMonoid M⦄
(h_mul : HMul.hMul = HMul.hMul)


@[simp] lemma subset_latticeClosure : s ⊆ latticeClosure s


@[simp]
theorem nnnorm_algebraMap_nnreal (x : ℝ≥0) : ‖algebraMap ℝ≥0 𝕜' x‖₊ = x

(𝕜' : Type u_2)
[SeminormedRing 𝕜']
[NormOneClass 𝕜']
[NormedAlgebra ℝ 𝕜']
(x : ℝ≥0)


@[simp]
theorem coe_map (f : R →+* S) (s : Subring R) : (s.map f : Set S) = f '' s

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


@[to_additive (attr := simp)]
lemma stabilizer_empty : stabilizer G (∅ : Set α) = ⊤

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


theorem IsExtrOn.hasLineDerivAt_eq_zero (h : IsExtrOn f s a) (hd : HasLineDerivAt ℝ f f' a b)
    (h' : ∀ᶠ t : ℝ in 𝓝 0, a + t • b ∈ s) : f' = 0

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
{f : E → ℝ}
{s : Set E}
{a b : E}
{f' : ℝ}
(h : IsExtrOn f s a)
(hd : HasLineDerivAt ℝ f f' a b)
(h' : ∀ᶠ (t : ℝ) in 𝓝 0, a + t • b ∈ s)


@[simp]
theorem map_inv_le_iff (f : F) {a : α} {b : β} : EquivLike.inv f b ≤ a ↔ b ≤ f a

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
[EquivLike F α β]
[OrderIsoClass F α β]
(f : F)
{a : α}
{b : β}


lemma forall_rel_cons_ext {r : ∀ ⦃i⦄, α i → α i → Prop} {a₁ a₂ : α i} {f₁ f₂ : ∀ j ∈ l, α j}
    (ha : r a₁ a₂) (hf : ∀ (i : ι) (hi : i ∈ l), r (f₁ i hi) (f₂ i hi)) :
    ∀ j hj, r (cons _ _ a₁ f₁ j hj) (cons _ _ a₂ f₂ j hj)

r (List.Pi.cons i l a₁ f₁ j hj) (List.Pi.cons i l a₂ f₂ j hj)


@[simp]
theorem mem_Iic_iff : b ∈ Iic a ↔ b ≤ a


@[to_additive (attr := simp) sub_sub_sub_cancel_right]
theorem div_div_div_cancel_right' (a b c : G) : a / c / (b / c) = a / b


theorem exp_conj' (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
    exp 𝕂 (U⁻¹ * A * U) = U⁻¹ * exp 𝕂 A * U

(𝕂 : Type u_1)
{m : Type u_2}
{𝔸 : Type u_6}
[RCLike 𝕂]
[Fintype m]
[DecidableEq m]
[NormedCommRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(U A : Matrix m m 𝔸)
(hy : IsUnit U)

NormedSpace.exp 𝕂 (U⁻¹ * A * U) = U⁻¹ * NormedSpace.exp 𝕂 A * U


@[to_additive]
theorem smul {α M : Type*} [MulOneClass M] [SMul α M] [IsScalarTower α M M] (c : Con M) (a : α)
    {w x : M} (h : c w x) : c (a • w) (a • x)

{α : Type u_4}
{M : Type u_5}
[AddZeroClass M]
[VAdd α M]
[VAddAssocClass α M M]
(c : AddCon M)
(a : α)
{w x : M}
(h : c w x)


/-- `coprod F G` is a colimit cocone. -/
@[simps]
def binaryCoproductColimit : IsColimit (binaryCoproductCocone F G)

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

(s : CategoryTheory.Limits.BinaryCofan F G)

(CategoryTheory.FunctorToTypes.binaryCoproductColimit F G).desc s =
  CategoryTheory.FunctorToTypes.coprod.desc s.inl s.inr


/-- The `orthogonalProjection` lies in the orthogonal subspace. -/
theorem orthogonalProjection_mem_orthogonal (s : AffineSubspace ℝ P) [Nonempty s]
    [HasOrthogonalProjection s.direction] (p : P) :
    ↑(orthogonalProjection s p) ∈ mk' p s.directionᗮ

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(s : AffineSubspace ℝ P)
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]
(p : P)

↑((EuclideanGeometry.orthogonalProjection s) p) ∈ AffineSubspace.mk' p s.directionᗮ


@[simp]
theorem emod_abs (a b : ℤ) : a % |b| = a % b


@[simp, norm_cast]
theorem cast_inj {m n : ℕ} : (m : R) = n ↔ m = n

{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]
{m n : ℕ}


@[simp] lemma map_dblXYZ : dblXYZ (W'.map f) (f ∘ P) = f ∘ dblXYZ W' P

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{S : Type u_1}
[CommRing S]
(f : R →+* S)
(P : Fin 3 → R)

WeierstrassCurve.Jacobian.dblXYZ (WeierstrassCurve.map W' f) (⇑f ∘ P) = ⇑f ∘ W'.dblXYZ P


lemma Finset.centerMass_smul_left {c : R'} [Module R' R] [Module R' E] [SMulCommClass R' R R]
    [IsScalarTower R' R R] [SMulCommClass R R' E] [IsScalarTower R' R E] (hc : c ≠ 0) :
    t.centerMass (c • w) z = t.centerMass w z

{R : Type u_1}
{R' : Type u_2}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[LinearOrderedField R']
[AddCommGroup E]
[Module R E]
(t : Finset ι)
{w : ι → R}
(z : ι → E)
{c : R'}
[Module R' R]
[Module R' E]
[SMulCommClass R' R R]
[IsScalarTower R' R R]
[SMulCommClass R R' E]
[IsScalarTower R' R E]
(hc : c ≠ 0)


theorem mul_right_strictMono [IsDedekindDomain A] {I : FractionalIdeal A⁰ K} (hI : I ≠ 0) :
    StrictMono (· * I)

{A : Type u_2}
{K : Type u_3}
[CommRing A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
[IsDedekindDomain A]
{I : FractionalIdeal A⁰ K}
(hI : I ≠ 0)


theorem wittNeg_vars (n : ℕ) : (wittNeg p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)

(WittVector.wittNeg p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)


/-- **Łoś's Theorem**: A sentence is true in an ultraproduct if and only if the set of structures
it is true in is in the ultrafilter. -/
theorem sentence_realize (φ : L.Sentence) :
    (u : Filter α).Product M ⊨ φ ↔ ∀ᶠ a : α in u, M a ⊨ φ

{α : Type u_1}
{M : α → Type u_2}
{u : Ultrafilter α}
{L : FirstOrder.Language}
[(a : α) → L.Structure (M a)]
[∀ (a : α), Nonempty (M a)]
(φ : L.Sentence)

(↑u).Product M ⊨ φ ↔ ∀ᶠ (a : α) in ↑u, M a ⊨ φ


@[simp, norm_cast]
theorem disjoint_withBotCoe {I J : WithBot (Box ι)} :
    Disjoint (I : Set (ι → ℝ)) J ↔ Disjoint I J

{ι : Type u_1}
{I J : WithBot (BoxIntegral.Box ι)}


@[simp, norm_cast]
theorem cast_fract (x : ℚ) : (↑(fract x) : α) = fract (x : α)

{α : Type u_1}
[LinearOrderedField α]
[FloorRing α]
(x : ℚ)


@[to_additive (attr := simp)]
theorem OneHom.one_comp [One M] [One N] [One P] (f : OneHom M N) :
    (1 : OneHom N P).comp f = 1

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[One M]
[One N]
[One P]
(f : OneHom M N)


lemma forall_mem_insertNone {s : Finset α} {p : Option α → Prop} :
    (∀ a ∈ insertNone s, p a) ↔ p none ∧ ∀ a ∈ s, p a

{α : Type u_1}
{s : Finset α}
{p : Option α → Prop}

(∀ a ∈ Finset.insertNone s, p a) ↔ p none ∧ ∀ a ∈ s, p (some a)


theorem hasFDerivAt_cpow {p : ℂ × ℂ} (hp : p.1 ∈ slitPlane) :
    HasFDerivAt (fun x : ℂ × ℂ => x.1 ^ x.2)
      ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℂ ℂ ℂ +
        (p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℂ ℂ ℂ) p

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

HasFDerivAt (fun x => x.1 ^ x.2)
  ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℂ ℂ ℂ +
    (p.1 ^ p.2 * Complex.log p.1) • ContinuousLinearMap.snd ℂ ℂ ℂ)
  p