/-- Let `s` be a bounded set in the space of continuous (semi)linear maps `E →SL[σ] F` taking values
in a proper space. Then `s` interpreted as a set in the space of maps `E → F` with topology of
pointwise convergence is precompact: its closure is a compact set. -/
theorem isCompact_closure_image_coe_of_bounded [ProperSpace F] {s : Set (E' →SL[σ₁₂] F)}
    (hb : IsBounded s) : IsCompact (closure (((↑) : (E' →SL[σ₁₂] F) → E' → F) '' s))

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{F : Type u_6}
[NormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{E' : Type u_11}
[SeminormedAddCommGroup E']
[NormedSpace 𝕜 E']
[RingHomIsometric σ₁₂]
[ProperSpace F]
{s : Set (E' →SL[σ₁₂] F)}
(hb : Bornology.IsBounded s)


theorem irrational_sqrt_intCast_iff {z : ℤ} :
    Irrational (√z) ↔ ¬IsSquare z ∧ 0 ≤ z


theorem preimage_compl_eq_image_compl [BooleanAlgebra α] (S : Set α) :
    HasCompl.compl ⁻¹' S = HasCompl.compl '' S

{α : Type u_1}
[BooleanAlgebra α]
(S : Set α)


@[simp]
theorem mk'_eq_zero_iff_eq_zero [Algebra R K] [IsFractionRing R K] {x : R} {y : nonZeroDivisors R} :
    mk' K x y = 0 ↔ x = 0

{R : Type u_1}
[CommRing R]
{K : Type u_5}
[Field K]
[Algebra R K]
[IsFractionRing R K]
{x : R}
{y : ↥(nonZeroDivisors R)}


theorem exists_of_lt : p < q → ∃ x ∈ q, x ∉ p

{A : Type u_1}
{B : Type u_2}
[i : SetLike A B]
{p q : A}


theorem imp_imp_imp {a b c d : Prop} (h₀ : c → a) (h₁ : b → d) : (a → b) → (c → d)


@[simp]
theorem cylinder_zero (x : ∀ n, E n) : cylinder x 0 = univ


@[to_additive]
theorem mem_closure_one_iff_norm {x : E} : x ∈ closure ({1} : Set E) ↔ ‖x‖ = 0

{E : Type u_6}
[SeminormedAddGroup E]
{x : E}


@[to_additive] lemma image_op_inv (s : Finset α) : s⁻¹.image op = (s.image op)⁻¹

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

Finset.image AddOpposite.op (-s) = -Finset.image AddOpposite.op s


@[to_additive]
theorem Equiv.hasProd_iff (e : γ ≃ β) : HasProd (f ∘ e) a ↔ HasProd f a

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[AddCommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a : α}
(e : γ ≃ β)


theorem exists_aeval_eq_zero [IsSepClosed K] [Algebra k K] (p : k[X])
    (hp : p.degree ≠ 0) (hsep : p.Separable) : ∃ x : K, aeval x p = 0

{k : Type u}
[Field k]
(K : Type v)
[Field K]
[IsSepClosed K]
[Algebra k K]
(p : k[X])
(hp : p.degree ≠ 0)
(hsep : p.Separable)


@[to_additive (attr := simp)]
theorem symm_comp_self (e : M ≃* N) : e.symm ∘ e = id

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
(e : M ≃* N)


@[mono]
theorem symmetrize_mono {V W : Set (α × α)} (h : V ⊆ W) : symmetrizeRel V ⊆ symmetrizeRel W

{α : Type ua}
{V W : Set (α × α)}
(h : V ⊆ W)


theorem abs_sub (a b : α) : |a - b| ≤ |a| + |b|

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


/-- An element `k` is compact if and only if any directed set with `sSup` above
`k` already got above `k` at some point in the set. -/
theorem isCompactElement_iff_le_of_directed_sSup_le (k : α) :
    IsCompactElement k ↔
      ∀ s : Set α, s.Nonempty → DirectedOn (· ≤ ·) s → k ≤ sSup s → ∃ x : α, x ∈ s ∧ k ≤ x

(α : Type u_2)
[CompleteLattice α]
(k : α)

CompleteLattice.IsCompactElement k ↔
  ∀ (s : Set α), s.Nonempty → DirectedOn (fun x x_1 => x ≤ x_1) s → k ≤ sSup s → ∃ x ∈ s, k ≤ x


@[simp] theorem toString_toSubstring (s : String) : s.toSubstring.toString = s


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

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

((CategoryTheory.Comma.mapLeftIso R i).counitIso.hom.app X).left = CategoryTheory.CategoryStruct.id X.left


/-- Local unqueness of ODE solutions. -/
theorem ODE_solution_unique_of_eventually
    (hf : ∀ᶠ t in 𝓝 t₀, HasDerivAt f (v t (f t)) t ∧ f t ∈ s t)
    (hg : ∀ᶠ t in 𝓝 t₀, HasDerivAt g (v t (g t)) t ∧ g t ∈ s t)
    (heq : f t₀ = g t₀) : f =ᶠ[𝓝 t₀] g

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

(hf : ∀ᶠ (t : ℝ) in 𝓝 t₀, HasDerivAt f (v t (f t)) t ∧ f t ∈ s t)

(hg : ∀ᶠ (t : ℝ) in 𝓝 t₀, HasDerivAt g (v t (g t)) t ∧ g t ∈ s t)


@[reassoc]
theorem rightUnitor_inv_naturality {X X' : C} (f : X ⟶ X') :
    f ≫ (ρ_ X').inv = (ρ_ X).inv ≫ f ▷ _

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

CategoryTheory.CategoryStruct.comp f (CategoryTheory.MonoidalCategory.rightUnitor X').inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.rightUnitor X).inv
    (CategoryTheory.MonoidalCategory.whiskerRight f (𝟙_ C))


@[simp]
protected theorem inv_mul_cancel (φ : MvPowerSeries σ k) (h : constantCoeff σ k φ ≠ 0) :
    φ⁻¹ * φ = 1

(h : (MvPowerSeries.constantCoeff σ k) φ ≠ 0)


theorem eq_right_or_mem_Ioo_of_mem_Ioc {x : α} (hmem : x ∈ Ioc a b) : x = b ∨ x ∈ Ioo a b

{α : Type u_1}
[PartialOrder α]
{a b x : α}
(hmem : x ∈ Set.Ioc a b)


theorem le_sum_condensed (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) (n : ℕ) :
    (∑ k ∈ range (2 ^ n), f k) ≤ f 0 + ∑ k ∈ range n, 2 ^ k • f (2 ^ k)

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

∑ k ∈ Finset.range (2 ^ n), f k ≤ f 0 + ∑ k ∈ Finset.range n, 2 ^ k • f (2 ^ k)


theorem chain'_range_succ (r : ℕ → ℕ → Prop) (n : ℕ) :
    Chain' r (range n.succ) ↔ ∀ m < n, r m m.succ

List.Chain' r (List.range n.succ) ↔ ∀ m < n, r m m.succ


theorem IsOpen.reProdIm (hs : IsOpen s) (ht : IsOpen t) : IsOpen (s ×ℂ t)

{s t : Set ℝ}
(hs : IsOpen s)
(ht : IsOpen t)


lemma Produces.trans_derives {u v w : List (Symbol T g.NT)}
    (huv : g.Produces u v) (hvw : g.Derives v w) :
    g.Derives u w

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


/--
Giving a continuous map out of a disjoint union is the same as giving a continuous map out of
each term
-/
@[simps]
def piEquiv : (∀ i, C(A, X i)) ≃ C(A, ∀ i, X i)

{I : Type u_5}
(A : Type u_6)
(X : I → Type u_7)
[TopologicalSpace A]
[(i : I) → TopologicalSpace (X i)]
(f : C(A, (i : I) → X i))
(i : I)

(ContinuousMap.piEquiv A X).symm f i = (ContinuousMap.eval i).comp f


/-- The `covolume` can be computed by taking the `volume` of any given fundamental domain `s`. -/
@[to_additive]
lemma IsFundamentalDomain.covolume_eq_volume (ν : Measure α) [Countable G]
    [MeasurableSMul G α] [SMulInvariantMeasure G α ν] {s : Set α}
    (fund_dom_s : IsFundamentalDomain G s ν) : covolume G α ν = ν s

[MeasureTheory.SMulInvariantMeasure G α ν]

(fund_dom_s : MeasureTheory.IsFundamentalDomain G s ν)


/-- Given an equivalence `e : R ≃+* S` of semirings and a subsemiring `s` of `R`,
`subsemiring_map e s` is the induced equivalence between `s` and `s.map e` -/
@[simps!]
def subsemiringMap (e : R ≃+* S) (s : Subsemiring R) : s ≃+* s.map e.toRingHom

(y : ↑(⇑↑e.toAddEquiv '' ↑s.toAddSubmonoid))

↑((e.subsemiringMap s).symm y) = (↑e).symm ↑y


theorem le_nonZeroDivisors_of_noZeroDivisors [NoZeroDivisors M] {S : Submonoid M}
    (hS : (0 : M) ∉ S) : S ≤ M⁰

{M : Type u_2}
[MonoidWithZero M]
[NoZeroDivisors M]
{S : Submonoid M}
(hS : 0 ∉ S)


theorem mem_principal_self (s : Set α) : s ∈ 𝓟 s


theorem homothety_norm [RingHomIsometric σ₁₂] [Nontrivial E] (f : E →SL[σ₁₂] F) {a : ℝ}
    (hf : ∀ x, ‖f x‖ = a * ‖x‖) : ‖f‖ = a

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[Nontrivial E]
(f : E →SL[σ₁₂] F)
{a : ℝ}
(hf : ∀ (x : E), ‖f x‖ = a * ‖x‖)


/-- Existence of projections on complete subspaces.
Let `u` be a point in an inner product space, and let `K` be a nonempty complete subspace.
Then there exists a (unique) `v` in `K` that minimizes the distance `‖u - v‖` to `u`.
This point `v` is usually called the orthogonal projection of `u` onto `K`.
-/
theorem exists_norm_eq_iInf_of_complete_subspace (h : IsComplete (↑K : Set E)) :
    ∀ u : E, ∃ v ∈ K, ‖u - v‖ = ⨅ w : (K : Set E), ‖u - w‖

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(K : Submodule 𝕜 E)
(h : IsComplete ↑K)
(u : E)


/-- If the derivative of a function defined on the real line is integrable close to `-∞`, then
the function has a limit at `-∞`. -/
theorem tendsto_limUnder_of_hasDerivAt_of_integrableOn_Iic [CompleteSpace E]
    (hderiv : ∀ x ∈ Iic a, HasDerivAt f (f' x) x) (f'int : IntegrableOn f' (Iic a)) :
    Tendsto f atBot (𝓝 (limUnder atBot f))

(hderiv : ∀ x ∈ Set.Iic a, HasDerivAt f (f' x) x)

(f'int : MeasureTheory.IntegrableOn f' (Set.Iic a) MeasureTheory.volume)

Filter.Tendsto f Filter.atBot (𝓝 (limUnder Filter.atBot f))


/-- The binary coproduct in the category of a `SemilatticeSup` with `OrderBot` is the same as the
supremum.
-/
@[simp]
theorem coprod_eq_sup [SemilatticeSup α] [OrderBot α] (x y : α) : Limits.coprod x y = x ⊔ y

{α : Type u}
[SemilatticeSup α]
[OrderBot α]
(x y : α)


@[to_additive]
theorem map_mk' (x) (y : S) : f.map hy k (f.mk' x y) = k.mk' (g x) ⟨g y, hy 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}
{T : AddSubmonoid P}
(hy : ∀ (y : ↥S), g ↑y ∈ T)
{Q : Type u_4}
[AddCommMonoid Q]
{k : T.LocalizationMap Q}
(x : M)
(y : ↥S)

(f.map hy k) (f.mk' x y) = k.mk' (g x) ⟨g ↑y, ⋯⟩


@[simp] lemma toColex_ofColex (s : Colex α) : toColex (ofColex s) = s


theorem rat_mul (h : Irrational x) {q : ℚ} (hq : q ≠ 0) : Irrational (q * x)

{x : ℝ}
(h : Irrational x)
{q : ℚ}
(hq : q ≠ 0)


/-- Convergence in Lp implies convergence in measure. -/
theorem tendstoInMeasure_of_tendsto_Lp [hp : Fact (1 ≤ p)] {f : ι → Lp E p μ} {g : Lp E p μ}
    {l : Filter ι} (hfg : Tendsto f l (𝓝 g)) : TendstoInMeasure μ (fun n => f n) l g

{α : Type u_1}
{ι : Type u_2}
{E : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{p : ℝ≥0∞}
[hp : Fact (1 ≤ p)]
{f : ι → ↥(MeasureTheory.Lp E p μ)}
{g : ↥(MeasureTheory.Lp E p μ)}
{l : Filter ι}
(hfg : Filter.Tendsto f l (𝓝 g))

MeasureTheory.TendstoInMeasure μ (fun n => ↑↑(f n)) l ↑↑g


theorem limNthHom_spec (r : R) :
    ∀ ε : ℝ, 0 < ε → ∃ N : ℕ, ∀ n ≥ N, ‖limNthHom f_compat r - nthHom f r n‖ < ε

(f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1)

0 < ε → ∃ N, ∀ n ≥ N, ‖PadicInt.limNthHom f_compat r - ↑(PadicInt.nthHom f r n)‖ < ε


theorem nhds_mkOfNhds_filterBasis (B : α → FilterBasis α) (a : α) (h₀ : ∀ x, ∀ n ∈ B x, x ∈ n)
    (h₁ : ∀ x, ∀ n ∈ B x, ∃ n₁ ∈ B x, ∀ x' ∈ n₁, ∃ n₂ ∈ B x', n₂ ⊆ n) :
    @nhds α (TopologicalSpace.mkOfNhds fun x => (B x).filter) a = (B a).filter

(h₁ : ∀ (x : α), ∀ n ∈ B x, ∃ n₁ ∈ B x, ∀ x' ∈ n₁, ∃ n₂ ∈ B x', n₂ ⊆ n)


theorem partialInv_left {α β} {f : α → β} (I : Injective f) : ∀ x, partialInv f (f x) = some x

{α : Type u_4}
{β : Sort u_5}
{f : α → β}
(I : Function.Injective f)
(x : α)


theorem not_mem_mono (h : s ⊆ t) : a ∉ t → a ∉ s

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


theorem tendsto_testAgainstNN_of_tendsto_normalize_testAgainstNN_of_tendsto_mass {γ : Type*}
    {F : Filter γ} {μs : γ → FiniteMeasure Ω}
    (μs_lim : Tendsto (fun i => (μs i).normalize) F (𝓝 μ.normalize))
    (mass_lim : Tendsto (fun i => (μs i).mass) F (𝓝 μ.mass)) (f : Ω →ᵇ ℝ≥0) :
    Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 (μ.testAgainstNN f))

{μs : γ → MeasureTheory.FiniteMeasure Ω}

(μs_lim : Filter.Tendsto (fun i => (μs i).normalize) F (𝓝 μ.normalize))

(mass_lim : Filter.Tendsto (fun i => (μs i).mass) F (𝓝 μ.mass))

(f : Ω →ᵇ ℝ≥0)

Filter.Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 (μ.testAgainstNN f))


/-- Shifting by `i` and shifting by `j` forms an equivalence when `i + j = 0`. -/
@[simps]
def shiftEquiv' (i j : A) (h : i + j = 0) : C ≌ C

(C : Type u)
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddGroup A]
[CategoryTheory.HasShift C A]
(i j : A)
(h : i + j = 0)

(CategoryTheory.shiftEquiv' C i j h).inverse = CategoryTheory.shiftFunctor C j


/-- If `A` is a topological module over a commutative `R` with trivial star and compatible actions,
then `star` is a continuous linear equivalence. -/
@[simps!]
def starL' (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [TrivialStar R] [AddCommMonoid A]
    [StarAddMonoid A] [Module R A] [StarModule R A] [TopologicalSpace A] [ContinuousStar A] :
    A ≃L[R] A

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[TrivialStar R]
[AddCommMonoid A]
[StarAddMonoid A]
[Module R A]
[StarModule R A]
[TopologicalSpace A]
[ContinuousStar A]

∀ (a : A),
  (starL' R).symm a =
    (starL R).symm ({ toFun := id, map_add' := ⋯, map_smul' := ⋯, invFun := id, left_inv := ⋯, right_inv := ⋯ }.symm a)


@[simp]
lemma compYonedaIsoYonedaCompLan_inv_app_app_apply_eq_id (X : C) :
    ((compYonedaIsoYonedaCompLan F).inv.app X).app (Opposite.op (F.obj X))
      ((F.op.lanUnit.app (yoneda.obj X)).app _ (𝟙 X)) = 𝟙 _

[∀ (P : CategoryTheory.Functor Cᵒᵖ (Type v₁)), F.op.HasLeftKanExtension P]

((CategoryTheory.Presheaf.compYonedaIsoYonedaCompLan F).inv.app X).app (Opposite.op (F.obj X))
    ((F.op.lanUnit.app (CategoryTheory.yoneda.obj X)).app (Opposite.op X) (CategoryTheory.CategoryStruct.id X)) =
  CategoryTheory.CategoryStruct.id (Opposite.unop (Opposite.op (F.obj X)))


/-- A generalization of the fixed point lemma for normal functions: any family of normal functions
    has an unbounded set of common fixed points. -/
theorem fp_family_unbounded (H : ∀ i, IsNormal (f i)) :
    (⋂ i, Function.fixedPoints (f i)).Unbounded (· < ·)

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

Set.Unbounded (fun x x_1 => x < x_1) (⋂ i, Function.fixedPoints (f i))


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

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]
(a : G)
(n : ℕ)


theorem union_left : SeparatedNhds s u → SeparatedNhds t u → SeparatedNhds (s ∪ t) u

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


@[to_additive (attr := simp)]
theorem map_id (S : Submonoid M) : S.map (MonoidHom.id M) = S

{M : Type u_1}
[AddZeroClass M]
(S : AddSubmonoid M)

AddSubmonoid.map (AddMonoidHom.id M) S = S


/-- A closed form for the recurrence relation. -/
theorem closed_form (i : ℕ) : (s i : X q) = (ω : X q) ^ 2 ^ i + (ωb : X q) ^ 2 ^ i

↑(LucasLehmer.s i) = LucasLehmer.X.ω ^ 2 ^ i + LucasLehmer.X.ωb ^ 2 ^ i


theorem roots_expand_map_frobenius : (expand R p f).roots.map (frobenius R p) = p • f.roots

{R : Type u_1}
[CommRing R]
[IsDomain R]
{p : ℕ}
[ExpChar R p]
{f : R[X]}
[PerfectRing R p]

Multiset.map (⇑(frobenius R p)) ((Polynomial.expand R p) f).roots = p • f.roots


theorem mapAccumr₂_bisim {ys : Vector β n} {f₁ : α → β → σ₁ → σ₁ × γ}
    {f₂ : α → β → σ₂ → σ₂ × γ} {s₁ : σ₁} {s₂ : σ₂}
    (R : σ₁ → σ₂ → Prop) (h₀ : R s₁ s₂)
    (hR :  ∀ {s q} a b, R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2) :
    R (mapAccumr₂ f₁ xs ys s₁).1 (mapAccumr₂ f₂ xs ys s₂).1
    ∧ (mapAccumr₂ f₁ xs ys s₁).2 = (mapAccumr₂ f₂ xs ys s₂).2

{f₁ : α → β → σ₁ → σ₁ × γ}

{f₂ : α → β → σ₂ → σ₂ × γ}

(hR : ∀ {s : σ₁} {q : σ₂} (a : α) (b : β), R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2)

R (Mathlib.Vector.mapAccumr₂ f₁ xs ys s₁).1 (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).1 ∧
  (Mathlib.Vector.mapAccumr₂ f₁ xs ys s₁).2 = (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2


theorem decomp (f : V →ᴬ[R] W) : (f : V → W) = f.contLinear + Function.const V (f 0)

{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
[NormedAddCommGroup V]
[NormedAddCommGroup W]
[NormedField R]
[NormedSpace R V]
[NormedSpace R W]
(f : V →ᴬ[R] W)

⇑f = ⇑f.contLinear + Function.const V (f 0)


theorem pairwise_disjoint_of_coe_toFinset_pairwiseDisjoint {α ι} [SemilatticeInf α] [OrderBot α]
    [DecidableEq ι] {l : List ι} {f : ι → α} (hl : (l.toFinset : Set ι).PairwiseDisjoint f)
    (hn : l.Nodup) : l.Pairwise (_root_.Disjoint on f)

{α : Type u_5}
{ι : Type u_6}
[SemilatticeInf α]
[OrderBot α]
[DecidableEq ι]
{l : List ι}
{f : ι → α}
(hl : (↑l.toFinset).PairwiseDisjoint f)
(hn : l.Nodup)


theorem disjoint_right : Disjoint s t ↔ ∀ ⦃a⦄, a ∈ t → a ∉ s


/-- An equivalence of categories induces an equivalences between the respective categories
of homological complex.
-/
@[simps]
def Equivalence.mapHomologicalComplex (e : W₁ ≌ W₂) [e.functor.PreservesZeroMorphisms]
    (c : ComplexShape ι) :
    HomologicalComplex W₁ c ≌ HomologicalComplex W₂ c

(e.mapHomologicalComplex c).functor = e.functor.mapHomologicalComplex c


protected lemma mul_div_mul_comm (hba : b ∣ a) (hdc : d ∣ c) : a * c / (b * d) = a / b * (c / d)

{a b c d : ℕ}
(hba : b ∣ a)
(hdc : d ∣ c)


theorem exists_mul_emod_eq_one_of_coprime {k n : ℕ} (hkn : Coprime n k) (hk : 1 < k) :
    ∃ m, n * m % k = 1

{k n : ℕ}
(hkn : n.Coprime k)
(hk : 1 < k)


@[simp]
theorem lift_comp_mk {f : X → α} (hf : ∀ x y, (x ~ᵢ y) → f x = f y) : lift f hf ∘ mk = f

(hf : ∀ (x y : X), (x ~ᵢ y) → f x = f y)

SeparationQuotient.lift f hf ∘ SeparationQuotient.mk = f


/-- A multiplicative action is isometric if each map `x ↦ c • x` is an isometry. -/
@[to_additive]
class IsometricSMul [PseudoEMetricSpace X] [SMul M X] : Prop where
  protected isometry_smul : ∀ c : M, Isometry ((c • ·) : X → X)

{M : Type u}
{X : Type w}
[PseudoEMetricSpace X]
[SMul M X]
[self : IsometricSMul M X]
(c : M)


/-- A useful lemma when dealing with uniformities. -/
theorem map_swap4_prod {h : Filter γ} {k : Filter δ} :
    map (fun p : (α × β) × γ × δ => ((p.1.1, p.2.1), (p.1.2, p.2.2))) ((f ×ˢ g) ×ˢ (h ×ˢ k)) =
      (f ×ˢ h) ×ˢ (g ×ˢ k)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f : Filter α}
{g : Filter β}
{h : Filter γ}
{k : Filter δ}

Filter.map (fun p => ((p.1.1, p.2.1), p.1.2, p.2.2)) ((f ×ˢ g) ×ˢ h ×ˢ k) = (f ×ˢ h) ×ˢ g ×ˢ k


lemma mkDerivation_one_eq_derivative' : mkDerivation R (1 : R[X]) = derivative'

(Polynomial.mkDerivation R) 1 = Polynomial.derivative'


theorem equiv_limAux (f : CauSeq ℂ Complex.abs) :
    f ≈ CauSeq.const Complex.abs (limAux f)

f ≈ CauSeq.const (⇑Complex.abs) (Complex.limAux f)


@[to_additive (attr := simp)]
theorem ker_codRestrict {S} [SetLike S N] [SubmonoidClass S N] (f : G →* N) (s : S)
    (h : ∀ x, f x ∈ s) : (f.codRestrict s h).ker = f.ker

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{S : Type u_8}
[SetLike S N]
[AddSubmonoidClass S N]
(f : G →+ N)
(s : S)
(h : ∀ (x : G), f x ∈ s)


@[simp] theorem fst_natCast (n : ℕ) : (n : X q).fst = (n : ZMod q)


theorem IsCompact.lift'_closure_nhdsSet {K : Set X} (hK : IsCompact K) :
    (𝓝ˢ K).lift' closure = 𝓝ˢ K

{X : Type u_1}
[TopologicalSpace X]
[RegularSpace X]
{K : Set X}
(hK : IsCompact K)


@[to_additive]
theorem transfer_def [FiniteIndex H] (g : G) : transfer ϕ g = diff ϕ T (g • T)

{G : Type u_1}
[Group G]
{H : Subgroup G}
{A : Type u_2}
[CommGroup A]
(ϕ : ↥H →* A)
(T : ↑(Subgroup.leftTransversals ↑H))
[H.FiniteIndex]
(g : G)

ϕ.transfer g = Subgroup.leftTransversals.diff ϕ T (g • T)


theorem exists_linearIndependent_of_lt_rank [StrongRankCondition R]
    {s : Set M} (hs : LinearIndependent (ι := s) R Subtype.val) :
    ∃ t, s ⊆ t ∧ #t = Module.rank R M ∧ LinearIndependent (ι := t) R Subtype.val

(hs : LinearIndependent (ι := ↑s) R Subtype.val)

∃ t, s ⊆ t ∧ #↑t = Module.rank R M ∧ LinearIndependent (ι := ↑t) R Subtype.val


lemma regularTopology.isLocallySurjective_iff [Preregular C] {F G : Cᵒᵖ ⥤ D} (f : F ⟶ G) :
    Presheaf.IsLocallySurjective (regularTopology C) f ↔
      ∀ (X : C) (y : G.obj ⟨X⟩), (∃ (X' : C) (φ : X' ⟶ X) (_ : EffectiveEpi φ) (x : F.obj ⟨X'⟩),
        f.app ⟨X'⟩ x = G.map ⟨φ⟩ y)

{C : Type u_1}
(D : Type u_2)
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.ConcreteCategory D]
[CategoryTheory.Preregular C]
{F G : Cᵒᵖ ⥤ D}
(f : F ⟶ G)

CategoryTheory.Presheaf.IsLocallySurjective (CategoryTheory.regularTopology C) f ↔
  ∀ (X : C) (y : (CategoryTheory.forget D).obj (G.obj (Opposite.op X))),
    ∃ X' φ, ∃ (_ : CategoryTheory.EffectiveEpi φ), ∃ x, (f.app (Opposite.op X')) x = (G.map (Opposite.op φ)) y


theorem all_ae_ofReal_f_le_bound (h_bound : ∀ n, ∀ᵐ a ∂μ, ‖F n a‖ ≤ bound a)
    (h_lim : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))) :
    ∀ᵐ a ∂μ, ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)

{F : ℕ → α → β}

(h_bound : ∀ (n : ℕ), ∀ᵐ (a : α) ∂μ, ‖F n a‖ ≤ bound a)

(h_lim : ∀ᵐ (a : α) ∂μ, Filter.Tendsto (fun n => F n a) Filter.atTop (𝓝 (f a)))

∀ᵐ (a : α) ∂μ, ENNReal.ofReal ‖f a‖ ≤ ENNReal.ofReal (bound a)


theorem gcd_dvd_iff {a b : ℤ} {n : ℕ} : gcd a b ∣ n ↔ ∃ x y : ℤ, ↑n = a * x + b * y


theorem Bijective.comp_right (hf : Bijective f) : Bijective fun g : β → γ ↦ g ∘ f

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β}
(hf : Function.Bijective f)


/-- A cocone on `F` with cocone point `X` is the same as an element of `lim Hom(F·, X)`,
    naturally in `X`. -/
@[simps!]
noncomputable def yonedaCompLimIsoCocones (F : J ⥤ C) :
    yoneda ⋙ (whiskeringLeft _ _ _).obj F.op ⋙ lim ≅ F.cocones

{J : Type v}
[CategoryTheory.SmallCategory J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : J ⥤ C)
(X : C)

∀ (a : F.cocones.obj X),
  (CategoryTheory.Limits.yonedaCompLimIsoCocones F).inv.app X a =
    (CategoryTheory.Limits.Types.limitEquivSections (F.op ⋙ CategoryTheory.yoneda.obj X)).symm
      ((CategoryTheory.Limits.opCompYonedaSectionsEquiv F X).symm a)


theorem map_sub_rev (x y : V) : e (x - y) = e (y - x)

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


theorem UInt16.toNat_lt (x : UInt16) : x.toNat < 2 ^ 16


theorem extension₂_coe_coe (hf : UniformContinuous <| uncurry f) (a : α) (b : β) :
    pkg.extend₂ pkg' f (ι a) (ι' b) = f a b

{f : α → β → γ}

(hf : UniformContinuous (Function.uncurry f))

pkg.extend₂ pkg' f (pkg.coe a) (pkg'.coe b) = f a b


@[simp]
theorem compl_singleton_mem_nhdsSet_iff [T1Space X] {x : X} {s : Set X} : {x}ᶜ ∈ 𝓝ˢ s ↔ x ∉ s

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{x : X}
{s : Set X}

{x}ᶜ ∈ 𝓝ˢ s ↔ x ∉ s


@[simp]
theorem rightAssocTensor_map {X Y} (f : X ⟶ Y) : (rightAssocTensor C).map f = f.1 ⊗ f.2.1 ⊗ f.2.2

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

(CategoryTheory.MonoidalCategory.rightAssocTensor C).map f =
  CategoryTheory.MonoidalCategory.tensorHom f.1 (CategoryTheory.MonoidalCategory.tensorHom f.2.1 f.2.2)


lemma card_inter (s t : Finset α) : (s ∩ t).card = s.card + t.card - (s ∪ t).card

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


{α : Type u_2}
[Preorder α]
[BoundedOrder α]
[IsSimpleOrder α]
{a b : α}
(h : a < b)


theorem aleph'_isNormal : IsNormal (ord ∘ aleph')

Ordinal.IsNormal (Cardinal.ord ∘ Cardinal.aleph')


@[to_additive (attr := simp, norm_cast)]
lemma coe_mul [Mul α] (a b : α) : (↑(a * b) : WithOne α) = a * b


/-- The trivial monoid object. We later show this is initial in `Mon_ C`.
-/
@[simps]
def trivial : Mon_ C

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


theorem support_zipWith {f : ∀ i, β₁ i → β₂ i → β i} {hf : ∀ i, f i 0 0 = 0} {g₁ : Π₀ i, β₁ i}
    {g₂ : Π₀ i, β₂ i} : (zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support

[(i : ι) → (x : β i) → Decidable (x ≠ 0)]

[(i : ι) → (x : β₁ i) → Decidable (x ≠ 0)]

[(i : ι) → (x : β₂ i) → Decidable (x ≠ 0)]

(DFinsupp.zipWith f hf g₁ g₂).support ⊆ g₁.support ∪ g₂.support


protected theorem AntitoneOn.Iic (hf : AntitoneOn f s) : AntitoneOn (fun x => Iic (f x)) s

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : α → β}
{s : Set α}
(hf : AntitoneOn f s)


theorem equiv (hRA : FiniteType R A) (e : A ≃ₐ[R] B) : FiniteType R B

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(hRA : Algebra.FiniteType R A)
(e : A ≃ₐ[R] B)


@[simp]
theorem truncateFun_one : truncateFun n (1 : 𝕎 R) = 1

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)
(R : Type u_1)
[CommRing R]


theorem IsLocalization.map_units_map_submonoid
    [IsLocalization (Algebra.algebraMapSubmonoid S M) Sₘ] (y : M) :
    IsUnit (algebraMap R Sₘ y)


@[simp]
theorem mem_prod {S : NonUnitalSubalgebra R A} {S₁ : NonUnitalSubalgebra R B} {x : A × B} :
    x ∈ prod S S₁ ↔ x.1 ∈ S ∧ x.2 ∈ S₁

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[NonUnitalNonAssocSemiring B]
[Module R B]
{S : NonUnitalSubalgebra R A}
{S₁ : NonUnitalSubalgebra R B}
{x : A × B}


@[simp]
theorem bot_ne_coe : ⊥ ≠ (a : WithBot α)


theorem map_coord_zero {m : ∀ i, M₁ i} (i : ι) (h : m i = 0) : f m = 0

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
(f : ContinuousMultilinearMap R M₁ M₂)
{m : (i : ι) → M₁ i}
(i : ι)
(h : m i = 0)


theorem isClosed_iff {X : Compactum} (S : Set X) :
    IsClosed S ↔ ∀ F : Ultrafilter X, S ∈ F → X.str F ∈ S

IsClosed S ↔ ∀ (F : Ultrafilter X.A), S ∈ F → X.str F ∈ S


/-- The default cost structure, for which all operations cost `1`. -/
@[simps]
def defaultCost [DecidableEq α] : Cost α α ℕ

∀ (x : α), Levenshtein.defaultCost.insert x = 1


@[simp]
theorem range_inr_inter_range_inl : range (Sum.inr : β → α ⊕ β) ∩ range Sum.inl = ∅

Set.range Sum.inr ∩ Set.range Sum.inl = ∅


protected theorem prod_mk_right (b : β) : LipschitzWith 1 fun a : α => (a, b)

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(b : β)


lemma abs_lt_of_sq_lt_sq' (h : a ^ 2 < b ^ 2) (hb : 0 ≤ b) : -b < a ∧ a < b

{α : Type u_1}
[LinearOrderedRing α]
{a b : α}
(h : a ^ 2 < b ^ 2)
(hb : 0 ≤ b)


theorem toPartialEquiv (h : e.IsImage s t) : e.toPartialEquiv.IsImage s t

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}
(h : e.IsImage s t)


theorem Associated.dvd_iff_dvd_right [Monoid α] {a b c : α} (h : b ~ᵤ c) : a ∣ b ↔ a ∣ c

{α : Type u_1}
[Monoid α]
{a b c : α}
(h : b ~ᵤ c)


theorem right_mem_Icc : b ∈ Icc a b ↔ a ≤ b

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


lemma measurableSet_countableGeneratingSet [MeasurableSpace α] [CountablyGenerated α]
    {s : Set α} (hs : s ∈ countableGeneratingSet α) :
    MeasurableSet s

(hs : s ∈ MeasurableSpace.countableGeneratingSet α)


/-- **Fundamental theorem of calculus-1**, strict differentiability in the right endpoint.

If `f : ℝ → E` is integrable on `a..b` and `f x` has a finite limit `c` almost surely at `b`, then
`u ↦ ∫ x in a..u, f x` has derivative `c` at `b` in the sense of strict differentiability. -/
theorem integral_hasStrictDerivAt_of_tendsto_ae_right (hf : IntervalIntegrable f volume a b)
    (hmeas : StronglyMeasurableAtFilter f (𝓝 b)) (hb : Tendsto f (𝓝 b ⊓ ae volume) (𝓝 c)) :
    HasStrictDerivAt (fun u => ∫ x in a..u, f x) c b

(hf : IntervalIntegrable f MeasureTheory.volume a b)

(hmeas : StronglyMeasurableAtFilter f (𝓝 b) MeasureTheory.volume)

(hb : Filter.Tendsto f (𝓝 b ⊓ MeasureTheory.ae MeasureTheory.volume) (𝓝 c))

HasStrictDerivAt (fun u => ∫ (x : ℝ) in a..u, f x) c b


@[simp]
theorem card_incidenceSet_eq_degree [DecidableEq V] :
    Fintype.card (G.incidenceSet v) = G.degree v

{V : Type u_1}
(G : SimpleGraph V)
(v : V)
[Fintype ↑(G.neighborSet v)]
[DecidableEq V]

Fintype.card ↑(G.incidenceSet v) = G.degree v


theorem eventuallyEq_of_toReal_eventuallyEq {l : Filter α} {f g : α → ℝ≥0∞}
    (hfi : ∀ᶠ x in l, f x ≠ ∞) (hgi : ∀ᶠ x in l, g x ≠ ∞)
    (hfg : (fun x => (f x).toReal) =ᶠ[l] fun x => (g x).toReal) : f =ᶠ[l] g


theorem mem_domain_iff {f : E →ₗ.[R] F} {x : E} : x ∈ f.domain ↔ ∃ y : F, (x, y) ∈ f.graph

{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 : E}


@[simp]
theorem eq_natCast [FunLike F ℕ R] [RingHomClass F ℕ R] (f : F) : ∀ n, f n = n

{R : Type u_3}
{F : Type u_5}
[NonAssocSemiring R]
[FunLike F ℕ R]
[RingHomClass F ℕ R]
(f : F)
(n : ℕ)


/-- If the L-series of `f` is summable at `s` and `re s < re s'`, then the L-series of the
point-wise product of `log` with `f` is summable at `s'`. -/
lemma LSeriesSummable_logMul_of_lt_re {f : ℕ → ℂ} {s : ℂ} (h : abscissaOfAbsConv f < s.re) :
    LSeriesSummable (logMul f) s

(h : LSeries.abscissaOfAbsConv f < ↑s.re)


theorem continuous_id_of_le {t t' : TopologicalSpace α} (h : t ≤ t') : Continuous[t, t'] id

{α : Type u}
{t t' : TopologicalSpace α}
(h : t ≤ t')


theorem not_mem_of_mem_powerset_of_not_mem {s t : Finset α} {a : α} (ht : t ∈ s.powerset)
    (h : a ∉ s) : a ∉ t

{α : Type u_1}
{s t : Finset α}
{a : α}
(ht : t ∈ s.powerset)
(h : a ∉ s)


theorem eq_zero_of_mul_self_eq_zero (h : a * a = 0) : a = 0

{M₀ : Type u_2}
[Mul M₀]
[Zero M₀]
[NoZeroDivisors M₀]
{a : M₀}
(h : a * a = 0)


@[gcongr] protected theorem add_lt_add_left : a ≠ ∞ → b < c → a + b < a + c


/-- If a `E ⋙ F` has a limit, and `E` is an equivalence, we can construct a limit of `F`.
-/
theorem hasLimitOfEquivalenceComp (e : K ≌ J) [HasLimit (e.functor ⋙ F)] : HasLimit F

[CategoryTheory.Limits.HasLimit (e.functor ⋙ F)]


theorem isSeparating_proj_preimage {𝒢 : Set C} (h𝒢 : IsSeparating 𝒢) :
    IsSeparating ((proj S T).obj ⁻¹' 𝒢)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(S : CategoryTheory.Functor C D)
(T : D)
{𝒢 : Set C}
(h𝒢 : CategoryTheory.IsSeparating 𝒢)

CategoryTheory.IsSeparating ((CategoryTheory.CostructuredArrow.proj S T).obj ⁻¹' 𝒢)


@[simp, norm_cast] lemma coe_snd : ⇑(snd (α := α) (β := β)) = Prod.snd

{α : Type u_3}
{β : Type u_4}
[Lattice α]
[Lattice β]


@[to_additive (attr := simp)]
theorem pure_seq {α β : Type u} {f : α → β} {x : FreeMagma α} : pure f <*> x = f <$> x

(Seq.seq (pure f) fun x_1 => x) = f <$> x


theorem natAbs_dvd {a b : Int} : (a.natAbs : Int) ∣ b ↔ a ∣ b


@[to_additive] theorem inducing_mk_symm : Inducing (@mk M).symm


theorem LineDifferentiableWithinAt.hasLineDerivWithinAt (h : LineDifferentiableWithinAt 𝕜 f s x v) :
    HasLineDerivWithinAt 𝕜 f (lineDerivWithin 𝕜 f s x v) s x v


lemma d₂_eq' (i₁ : I₁) {i₂ i₂' : I₂} (h : c₂.Rel i₂ i₂') (i₁₂ : I₁₂) :
    K.d₂ c₁₂ i₁ i₂ i₁₂ = ComplexShape.ε₂ c₁ c₂ c₁₂ ⟨i₁, i₂⟩ • ((K.X i₁).d i₂ i₂' ≫
    K.ιTotalOrZero c₁₂ i₁ i₂' i₁₂)

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
(K : HomologicalComplex₂ C c₁ c₂)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
(i₁ : I₁)
{i₂ i₂' : I₂}
(h : c₂.Rel i₂ i₂')
(i₁₂ : I₁₂)

K.d₂ c₁₂ i₁ i₂ i₁₂ = c₁.ε₂ c₂ c₁₂ (i₁, i₂) • (K.X i₁).d i₂ i₂' ≫ K.ιTotalOrZero c₁₂ i₁ i₂' i₁₂


protected theorem div_eq_of_eq_mul_right {a b c : Int}
    (H1 : b ≠ 0) (H2 : a = b * c) : a.div b = c


@[simp]
theorem coe_comp (hnp : β →+* γ) (hmn : α →+* β) : (hnp.comp hmn : α → γ) = hnp ∘ hmn

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} {x_2 : NonAssocSemiring γ} (hnp : β →+* γ) (hmn : α →+* β),
  ⇑(hnp.comp hmn) = ⇑hnp ∘ ⇑hmn


@[simp]
theorem inl_intCast [AddGroupWithOne R] [AddGroup M] (z : ℤ) : (inl z : tsze R M) = z

{R : Type u}
{M : Type v}
[AddGroupWithOne R]
[AddGroup M]
(z : ℤ)


theorem continuous_of_const (h : ∀ x y, f x = f y) : Continuous f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(h : ∀ (x y : X), f x = f y)


/-- If we remove a smaller interval from a larger, the result is nonempty -/
theorem nonempty_Ico_sdiff {x dx y dy : α} (h : dy < dx) (hx : 0 < dx) :
    Nonempty ↑(Ico x (x + dx) \ Ico y (y + dy))

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{x dx y dy : α}
(h : dy < dx)
(hx : 0 < dx)

Nonempty ↑(Set.Ico x (x + dx) \ Set.Ico y (y + dy))


theorem continuousAt_prod_of_discrete_right [DiscreteTopology β] {f : α × β → γ} {x : α × β} :
    ContinuousAt f x ↔ ContinuousAt (f ⟨·, x.2⟩) x.1

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[DiscreteTopology β]
{f : α × β → γ}
{x : α × β}

ContinuousAt f x ↔ ContinuousAt (fun x_1 => f (x_1, x.2)) x.1


nonrec theorem IsPWO.prod {t : Set β} (hs : s.IsPWO) (ht : t.IsPWO) : IsPWO (s ×ˢ t)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{s : Set α}
{t : Set β}
(hs : s.IsPWO)
(ht : t.IsPWO)


theorem Iio_union_Ioo' (h₁ : c < b) : Iio b ∪ Ioo c d = Iio (max b d)

{α : Type u_1}
[LinearOrder α]
{b c d : α}
(h₁ : c < b)

Set.Iio b ∪ Set.Ioo c d = Set.Iio (max b d)


@[simp]
theorem mk_d_1_0 : (mk X₀ X₁ X₂ d₀ d₁ s succ).d 1 0 = d₀

(succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ ⟶ S.X₁) ×' d₂ ≫ S.f = 0)

(ChainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ).d 1 0 = d₀


@[simp]
theorem logb_abs (x : ℝ) : logb b |x| = logb b x


lemma nhdsWithin_neBot : (𝓝[s] x).NeBot ↔ ∀ ⦃t⦄, t ∈ 𝓝 x → (t ∩ s).Nonempty

{X : Type u}
{x : X}
{s : Set X}
[TopologicalSpace X]

(𝓝[s] x).NeBot ↔ ∀ ⦃t : Set X⦄, t ∈ 𝓝 x → (t ∩ s).Nonempty


theorem comap_inf_principal_neBot_of_image_mem {f : Filter β} {m : α → β} (hf : NeBot f) {s : Set α}
    (hs : m '' s ∈ f) : NeBot (comap m f ⊓ 𝓟 s)

{α : Type u}
{β : Type v}
{f : Filter β}
{m : α → β}
(hf : f.NeBot)
{s : Set α}
(hs : m '' s ∈ f)


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

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

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


theorem single_of_single_apply (a a' : α) (b : M) :
    single a ((single a' b) a) = single a' (single a' b) a

{α : Type u_1}
{M : Type u_5}
[Zero M]
(a a' : α)
(b : M)

Finsupp.single a ((Finsupp.single a' b) a) = (Finsupp.single a' (Finsupp.single a' b)) a


@[simp]
theorem infty_coeFn_natCast (n : ℕ) : ⇑(n : lp B ∞) = n

{I : Type u_3}
{B : I → Type u_4}
[(i : I) → NormedRing (B i)]
[∀ (i : I), NormOneClass (B i)]
(n : ℕ)


@[simp]
theorem zero_comp (g : β →co γ) : (0 : C_c(γ, δ)).comp g = 0

{β : Type u_3}
{γ : Type u_4}
{δ : Type u_5}
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
[Zero δ]
(g : CocompactMap β γ)

CompactlySupportedContinuousMap.comp 0 g = 0


/-- The identity braided monoidal functor. -/
@[simps!]
def id : BraidedFunctor C C

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

(CategoryTheory.BraidedFunctor.id C).μ X Y = 𝟙 (X ⊗ Y)


@[simp]
theorem blockDiag'_transpose (M : Matrix (Σi, m' i) (Σi, n' i) α) (k : o) :
    blockDiag' Mᵀ k = (blockDiag' M k)ᵀ

(M : Matrix ((i : o) × m' i) ((i : o) × n' i) α)


theorem not_specializes_iff_exists_open : ¬x ⤳ y ↔ ∃ S : Set X, IsOpen S ∧ y ∈ S ∧ x ∉ S

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


/-- In a (semi)normed group, inversion `x ↦ x⁻¹` tends to infinity at infinity. -/
@[to_additive "In a (semi)normed group, negation `x ↦ -x` tends to infinity at infinity."]
theorem Filter.tendsto_inv_cobounded : Tendsto Inv.inv (cobounded E) (cobounded E)

Filter.Tendsto Neg.neg (Bornology.cobounded E) (Bornology.cobounded E)


/-- Automorphization of a function into an `R`-`Module` distributes, that is, commutes with the
`R`-scalar multiplication. -/
lemma QuotientGroup.automorphize_smul_left (f : G → M) (g : G ⧸ Γ → R) :
    (QuotientGroup.automorphize ((g ∘ (@Quotient.mk' _ (_)) : G → R) • f) : G ⧸ Γ → M)
      = g • (QuotientGroup.automorphize f : G ⧸ Γ → M)

{M : Type u_11}
[TopologicalSpace M]
[AddCommMonoid M]
[T2Space M]
{R : Type u_12}
[DivisionRing R]
[Module R M]
[ContinuousConstSMul R M]
{G : Type u_13}
[Group G]
{Γ : Subgroup G}
(f : G → M)
(g : G ⧸ Γ → R)

QuotientGroup.automorphize (g ∘ Quotient.mk' • f) = g • QuotientGroup.automorphize f


theorem carrier.asIdeal.homogeneous : (carrier.asIdeal f_deg hm q).IsHomogeneous 𝒜

(q :
  ↑↑(AlgebraicGeometry.Spec.locallyRingedSpaceObj
          (CommRingCat.of (HomogeneousLocalization.Away 𝒜 f))).toPresheafedSpace)

Ideal.IsHomogeneous 𝒜 (AlgebraicGeometry.ProjIsoSpecTopComponent.FromSpec.carrier.asIdeal f_deg hm q)


/-- The base change of a symmetric bilinear form is symmetric. -/
lemma IsSymm.baseChange {B₂ : BilinForm R M₂} (hB₂ : B₂.IsSymm) : (B₂.baseChange A).IsSymm

{R : Type uR}
(A : Type uA)
{M₂ : Type uM₂}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M₂]
[Algebra R A]
[Module R M₂]
{B₂ : LinearMap.BilinForm R M₂}
(hB₂ : LinearMap.IsSymm B₂)

LinearMap.IsSymm (LinearMap.BilinMap.baseChange A B₂)


theorem restrict_Ico_eq_restrict_Icc : μ.restrict (Ico a b) = μ.restrict (Icc a b)

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

μ.restrict (Set.Ico a b) = μ.restrict (Set.Icc a b)


/-- An additive functor induces a functor between homotopy categories. -/
@[simps! obj]
def Functor.mapHomotopyCategory (F : V ⥤ W) [F.Additive] (c : ComplexShape ι) :
    HomotopyCategory V c ⥤ HomotopyCategory W c

(a : CategoryTheory.Quotient (homotopic V c))

(F.mapHomotopyCategory c).obj a = (HomotopyCategory.quotient W c).obj ((F.mapHomologicalComplex c).obj a.as)


/-- `piFinTwoEquiv` as an `IsometryEquiv`. -/
@[simps!]
def piFinTwo (α : Fin 2 → Type*) [∀ i, PseudoEMetricSpace (α i)] : (∀ i, α i) ≃ᵢ α 0 × α 1

[(i : Fin 2) → PseudoEMetricSpace (α i)]

(IsometryEquiv.piFinTwo α) f = (f 0, f 1)


@[simp]
theorem sum.map_inv : sum x⁻¹ = -sum x

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


theorem univ_pi_Iio_ae_eq_Iic {f : ∀ i, α i} :
    (pi univ fun i => Iio (f i)) =ᵐ[Measure.pi μ] Iic f

{μ : (i : ι) → MeasureTheory.Measure (α i)}

[∀ (i : ι), MeasureTheory.SigmaFinite (μ i)]

[∀ (i : ι), MeasureTheory.NoAtoms (μ i)]

(Set.univ.pi fun i => Set.Iio (f i)) =ᵐ[MeasureTheory.Measure.pi μ] Set.Iic f


theorem disjoint_sdiff_iff_le (hz : z ≤ y) (hx : x ≤ y) : Disjoint z (y \ x) ↔ z ≤ x

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]
(hz : z ≤ y)
(hx : x ≤ y)


@[simp]
theorem ceil_add_int (a : α) (z : ℤ) : ⌈a + z⌉ = ⌈a⌉ + z

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)
(z : ℤ)


theorem antilipschitz_of_comap_nhds_le [h : RingHomIsometric σ₁₂] (f : E →ₛₗ[σ₁₂] F)
    (hf : (𝓝 0).comap f ≤ 𝓝 0) : ∃ K, AntilipschitzWith K f

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[h : RingHomIsometric σ₁₂]
(f : E →ₛₗ[σ₁₂] F)
(hf : Filter.comap (⇑f) (𝓝 0) ≤ 𝓝 0)


theorem IsLittleO.trans_le (hfg : f =o[l] g) (hgk : ∀ x, ‖g x‖ ≤ ‖k x‖) : f =o[l] k

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
{G : Type u_5}
[Norm E]
[Norm F]
[Norm G]
{f : α → E}
{g : α → F}
{k : α → G}
{l : Filter α}
(hfg : f =o[l] g)
(hgk : ∀ (x : α), ‖g x‖ ≤ ‖k x‖)


theorem abs_det_basis_change [NoZeroDivisors K] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι ℤ R) (I : FractionalIdeal R⁰ K) (bI : Basis ι ℤ I) :
    |(b.localizationLocalization ℚ ℤ⁰ K).det ((↑) ∘ bI)| = absNorm I

[IsLocalization (Algebra.algebraMapSubmonoid R (nonZeroDivisors ℤ)) K]

(I : FractionalIdeal (nonZeroDivisors R) K)

|(Basis.localizationLocalization ℚ (nonZeroDivisors ℤ) K b).det (Subtype.val ∘ ⇑bI)| = FractionalIdeal.absNorm I


@[to_additive Left.pow_nonneg]
theorem Left.one_le_pow_of_le (hx : 1 ≤ x) : ∀ {n : ℕ}, 1 ≤ x ^ n

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


@[simp, norm_cast]
theorem natCast_mul (m : ℕ) : ∀ n : ℕ, ((m * n : ℕ) : Ordinal) = m * n


/-- An isomorphism of comonads gives a natural isomorphism of the underlying functors.
-/
@[simps!]
def ComonadIso.toNatIso {M N : Comonad C} (h : M ≅ N) : (M : C ⥤ C) ≅ N

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{M N : CategoryTheory.Comonad C}
(h : M ≅ N)

(CategoryTheory.ComonadIso.toNatIso h).hom = h.hom.toNatTrans


@[simp]
theorem le_map₂_iff {h : Filter γ} :
    h ≤ map₂ m f g ↔ ∀ ⦃s⦄, s ∈ f → ∀ ⦃t⦄, t ∈ g → image2 m s t ∈ h

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f : Filter α}
{g : Filter β}
{h : Filter γ}

h ≤ Filter.map₂ m f g ↔ ∀ ⦃s : Set α⦄, s ∈ f → ∀ ⦃t : Set β⦄, t ∈ g → Set.image2 m s t ∈ h


@[simp]
theorem comap_exp_cobounded : comap exp (cobounded ℂ) = comap re atTop

Filter.comap Complex.exp (Bornology.cobounded ℂ) = Filter.comap Complex.re Filter.atTop


theorem Rel.star (hr : ∀ a b, r a b → r (star a) (star b))
    ⦃a b : R⦄ (h : Rel r a b) : Rel r (star a) (star b)

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


theorem Valid'.valid {t o₁ o₂} (h : @Valid' α _ o₁ t o₂) : Valid t

{α : Type u_1}
[Preorder α]
{t : Ordnode α}
{o₁ : WithBot α}
{o₂ : WithTop α}
(h : Ordnode.Valid' o₁ t o₂)


@[to_additive (attr := simp)]
theorem OrderIso.mulLeft_symm (a : α) : (OrderIso.mulLeft a).symm = OrderIso.mulLeft a⁻¹

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


theorem le_iff' : μ₁ ≤ μ₂ ↔ ∀ s, μ₁ s ≤ μ₂ s

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

μ₁ ≤ μ₂ ↔ ∀ (s : Set α), μ₁ s ≤ μ₂ s


theorem eventually_ne_nhdsWithin {x} (hx : x ∈ e.source) :
    ∀ᶠ x' in 𝓝[≠] x, e x' ≠ e x

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : X}
(hx : x ∈ e.source)


@[simp]
theorem rtakeWhile_concat_pos (x : α) (h : p x) :
    rtakeWhile p (l ++ [x]) = rtakeWhile p l ++ [x]

{α : Type u_1}
(p : α → Bool)
(l : List α)
(x : α)
(h : p x = true)

List.rtakeWhile p (l ++ [x]) = List.rtakeWhile p l ++ [x]


/-- `StrongHomClass L F M N` states that `F` is a type of `L`-homomorphisms which preserve
  relations in both directions. -/
class StrongHomClass (L : outParam Language) (F M N : Type*)
  [FunLike F M N] [L.Structure M] [L.Structure N] : Prop where
  map_fun : ∀ (φ : F) {n} (f : L.Functions n) (x), φ (funMap f x) = funMap f (φ ∘ x)
  map_rel : ∀ (φ : F) {n} (r : L.Relations n) (x), RelMap r (φ ∘ x) ↔ RelMap r x

[self : FirstOrder.Language.StrongHomClass L F M N]

FirstOrder.Language.Structure.RelMap r (⇑φ ∘ x) ↔ FirstOrder.Language.Structure.RelMap r x


theorem rank_adjoin_eq_one_iff : Module.rank F (adjoin F S) = 1 ↔ S ⊆ (⊥ : IntermediateField F E)

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

Module.rank F ↥(IntermediateField.adjoin F S) = 1 ↔ S ⊆ ↑⊥


lemma traceForm_comm (x y : L) : traceForm R L M x y = traceForm R L M y x

(R : Type u_1)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(x y : L)

((LieModule.traceForm R L M) x) y = ((LieModule.traceForm R L M) y) x


theorem comp_rightInv_aux1 {n : ℕ} (hn : 0 < n) (p : FormalMultilinearSeries 𝕜 E F)
    (q : FormalMultilinearSeries 𝕜 F E) (v : Fin n → F) :
    p.comp q n v =
      ∑ c ∈ {c : Composition n | 1 < c.length}.toFinset,
          p c.length (q.applyComposition c v) +
        p 1 fun _ => q n v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ}
(hn : 0 < n)
(p : FormalMultilinearSeries 𝕜 E F)
(q : FormalMultilinearSeries 𝕜 F E)
(v : Fin n → F)

(p.comp q n) v = ∑ c ∈ {c | 1 < c.length}.toFinset, (p c.length) (q.applyComposition c v) + (p 1) fun x => (q n) v


protected lemma BddBelow.of_closure : BddBelow (closure s) → BddBelow s

{α : Type u}
[TopologicalSpace α]
[Preorder α]
{s : Set α}


@[to_additive uniformContinuous_const_nsmul]
theorem uniformContinuous_pow_const (n : ℕ) : UniformContinuous fun x : α => x ^ n

{α : Type u_1}
[UniformSpace α]
[Group α]
[UniformGroup α]
(n : ℕ)


lemma nneg_mul_add_sq_of_abs_le_one (n : ℤ) (hx : |x| ≤ 1) : (0 : R) ≤ n * x + n * n

{R : Type u_1}
[LinearOrderedRing R]
{x : R}
(n : ℤ)
(hx : |x| ≤ 1)


theorem pred_iterate (a : ℕ) : ∀ n, pred^[n] a = a - n


@[simp]
theorem coord_apply_ne (h : i ≠ j) : b.coord i (b j) = 0

{ι : Type u_1}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
{i j : ι}
(h : i ≠ j)


/-- The Grothendieck construction is functorial: a natural transformation `α : F ⟶ G` induces
a functor `Grothendieck.map : Grothendieck F ⥤ Grothendieck G`.
-/
@[simps!]
def map (α : F ⟶ G) : Grothendieck F ⥤ Grothendieck G

{F G : CategoryTheory.Functor C CategoryTheory.Cat}

((CategoryTheory.Grothendieck.map α).map f).base = f.base


theorem map_le_iff_le_comap {f : K →+* L} {s : Subfield K} {t : Subfield L} :
    s.map f ≤ t ↔ s ≤ t.comap f

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
{f : K →+* L}
{s : Subfield K}
{t : Subfield L}

Subfield.map f s ≤ t ↔ s ≤ Subfield.comap f t


@[simp]
theorem sub_eq_add (x y : R) : x - y = x + y

{R : Type u_1}
[Ring R]
[CharP R 2]
(x y : R)


theorem mod_four_ne_three_of_sq_eq_neg_sq {x y : ZMod p} (hx : x ≠ 0) (hxy : x ^ 2 = -y ^ 2) :
    p % 4 ≠ 3

{p : ℕ}
[Fact (Nat.Prime p)]
{x y : ZMod p}
(hx : x ≠ 0)
(hxy : x ^ 2 = -y ^ 2)


lemma Antitone.partMap (hg : Antitone g) : Antitone fun x ↦ (g x).map f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Preorder α]
{f : β → γ}
{g : α → Part β}
(hg : Antitone g)


@[simp]
theorem coe_neg (g : SpecialLinearGroup n R) : ↑(-g) = -(g : Matrix n n R)

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
[Fact (Even (Fintype.card n))]
(g : Matrix.SpecialLinearGroup n R)


/--
If `G` preserves the relevant pullbacks and every effective epi in `C` is a quotient map (which is
the case when `C` is `CompHaus` or `Profinite`), then `yonedaPresheaf` satisfies the equalizer
condition which is required to be a sheaf for the regular topology.
-/
theorem equalizerCondition_yonedaPresheaf
    [∀ (Z B : C) (π : Z ⟶ B) [EffectiveEpi π], PreservesLimit (cospan π π) G]
    (hq : ∀ (Z B : C) (π : Z ⟶ B) [EffectiveEpi π], QuotientMap (G.map π)) :
      EqualizerCondition (yonedaPresheaf G X)

[(Z B : C) →
    (π : Z ⟶ B) →
      [inst : CategoryTheory.EffectiveEpi π] →
        CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan π π) G]

(hq : ∀ (Z B : C) (π : Z ⟶ B) [inst : CategoryTheory.EffectiveEpi π], QuotientMap ⇑(G.map π))

CategoryTheory.regularTopology.EqualizerCondition (ContinuousMap.yonedaPresheaf G X)


@[fun_prop]
theorem DifferentiableAt.const_smul (h : DifferentiableAt 𝕜 f x) (c : R) :
    DifferentiableAt 𝕜 (fun y => c • f y) 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}
{R : Type u_6}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
(h : DifferentiableAt 𝕜 f x)
(c : R)


theorem eq_zero_of_hasseDeriv_eq_zero {R} [CommRing R] (f : R[X]) (r : R)
    (h : ∀ k, (hasseDeriv k f).eval r = 0) : f = 0

(h : ∀ (k : ℕ), Polynomial.eval r ((Polynomial.hasseDeriv k) f) = 0)


theorem mem_setOfIdeal {I : Ideal C(X, R)} {x : X} :
    x ∈ setOfIdeal I ↔ ∃ f ∈ I, (f : C(X, R)) x ≠ 0

{X : Type u_1}
{R : Type u_2}
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
{I : Ideal C(X, R)}
{x : X}

x ∈ ContinuousMap.setOfIdeal I ↔ ∃ f ∈ I, f x ≠ 0


/-- The residue of `completedHurwitzZetaEven a s` at `s = 1` is equal to `1`. -/
lemma completedHurwitzZetaEven_residue_one (a : UnitAddCircle) :
    Tendsto (fun s ↦ (s - 1) * completedHurwitzZetaEven a s) (𝓝[≠] 1) (𝓝 1)

Filter.Tendsto (fun s => (s - 1) * HurwitzZeta.completedHurwitzZetaEven a s) (𝓝[≠] 1) (𝓝 1)


theorem covariant_le_of_covariant_lt [PartialOrder N] :
    Covariant M N μ (· < ·) → Covariant M N μ (· ≤ ·)

(M : Type u_1)
(N : Type u_2)
(μ : M → N → N)
[PartialOrder N]

(Covariant M N μ fun x x_1 => x < x_1) → Covariant M N μ fun x x_1 => x ≤ x_1


lemma sqrt_eq (n : ℕ) : sqrt (n * n) = n


@[simp]
theorem nonempty_Ico : (Ico a b).Nonempty ↔ a < b


theorem HasStrictFDerivAt.inner (hf : HasStrictFDerivAt f f' x) (hg : HasStrictFDerivAt g g' x) :
    HasStrictFDerivAt (fun t => ⟪f t, g t⟫) ((fderivInnerCLM 𝕜 (f x, g x)).comp <| f'.prod g') x

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
{f' g' : G →L[ℝ] E}
{x : G}
(hf : HasStrictFDerivAt f f' x)
(hg : HasStrictFDerivAt g g' x)

HasStrictFDerivAt (fun t => ⟪f t, g t⟫_𝕜) ((fderivInnerCLM 𝕜 (f x, g x)).comp (f'.prod g')) x


/-- B. H. Neumann Lemma :
If a finite family of cosets of subgroups covers the group, then at least one
of these subgroups has index not exceeding the number of cosets. -/
@[to_additive]
theorem exists_index_le_card_of_leftCoset_cover :
    ∃ i ∈ s, (H i).FiniteIndex ∧ (H i).index ≤ s.card

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


@[simp, mono]
theorem measure_le_measure_union_right : μ t ≤ μ (s ∪ t)

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s t : Set α}


protected theorem IsPath.takeUntil {u v w : V} {p : G.Walk v w} (hc : p.IsPath)
    (h : u ∈ p.support) : (p.takeUntil u h).IsPath

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w : V}
{p : G.Walk v w}
(hc : p.IsPath)
(h : u ∈ p.support)


@[simp]
theorem toHamming_smul [∀ i, SMul α (β i)] {r : α} {x : ∀ i, β i} :
    toHamming (r • x) = r • toHamming x

{α : Type u_1}
{ι : Type u_2}
{β : ι → Type u_3}
[(i : ι) → SMul α (β i)]
{r : α}
{x : (i : ι) → β i}

Hamming.toHamming (r • x) = r • Hamming.toHamming x


@[norm_cast]
theorem coe_add (a b : R) : (↑(a + b : R) : A) = ↑a + ↑b

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(a b : R)


@[to_additive]
lemma _root_.IsUnit.inv_smul [Monoid α] {a : α} (h : IsUnit a) : h.unit⁻¹ • a = 1

{α : Type u_5}
[AddMonoid α]
{a : α}
(h : IsAddUnit a)


/-- The limit of `n / (n + x)` is 1, for any constant `x` (valid in `ℝ` or any topological division
algebra over `ℝ`, e.g., `ℂ`).

TODO: introduce a typeclass saying that `1 / n` tends to 0 at top, making it possible to get this
statement simultaneously on `ℚ`, `ℝ` and `ℂ`. -/
theorem tendsto_natCast_div_add_atTop {𝕜 : Type*} [DivisionRing 𝕜] [TopologicalSpace 𝕜]
    [CharZero 𝕜] [Algebra ℝ 𝕜] [ContinuousSMul ℝ 𝕜] [TopologicalDivisionRing 𝕜] (x : 𝕜) :
    Tendsto (fun n : ℕ ↦ (n : 𝕜) / (n + x)) atTop (𝓝 1)

{𝕜 : Type u_4}
[DivisionRing 𝕜]
[TopologicalSpace 𝕜]
[CharZero 𝕜]
[Algebra ℝ 𝕜]
[ContinuousSMul ℝ 𝕜]
[TopologicalDivisionRing 𝕜]
(x : 𝕜)

Filter.Tendsto (fun n => ↑n / (↑n + x)) Filter.atTop (𝓝 1)


theorem singletons_open_iff_discrete {X : Type*} [TopologicalSpace X] :
    (∀ a : X, IsOpen ({a} : Set X)) ↔ DiscreteTopology X

(∀ (a : X), IsOpen {a}) ↔ DiscreteTopology X


theorem get?_eq_none : l.get? n = none ↔ length l ≤ n

∀ {α : Type u_1} {l : List α} {n : Nat}, l.get? n = none ↔ l.length ≤ n


/-- `HasFiniteWidePushouts` represents a choice of wide pushout
for every finite collection of morphisms
-/
class HasFiniteWidePushouts : Prop where
  /-- `C` has all wide pushouts any Fintype `J`-/
  out (J : Type) [Finite J] : HasColimitsOfShape (WidePushoutShape J) C

[self : CategoryTheory.Limits.HasFiniteWidePushouts C]

CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Limits.WidePushoutShape J) C


/-- Reinterpret a finitary infimum homomorphism as a finitary supremum homomorphism between the dual
lattices. -/
@[simps]
protected def dual : InfTopHom α β ≃ SupBotHom αᵒᵈ βᵒᵈ

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Top α]
[Inf β]
[Top β]
(f : InfTopHom α β)

(InfTopHom.dual f).toSupHom = InfHom.dual f.toInfHom


@[to_additive (attr := mono)]
theorem mul_subset_mul : s₁ ⊆ t₁ → s₂ ⊆ t₂ → s₁ * s₂ ⊆ t₁ * t₂

{α : Type u_2}
[Add α]
{s₁ s₂ t₁ t₂ : Set α}

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


theorem map_inf_le {f g : Filter α} {m : α → β} : map m (f ⊓ g) ≤ map m f ⊓ map m g

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

Filter.map m (f ⊓ g) ≤ Filter.map m f ⊓ Filter.map m g


lemma setLIntegral_tilted' (f : α → ℝ) (g : α → ℝ≥0∞) {s : Set α} (hs : MeasurableSet s) :
    ∫⁻ x in s, g x ∂(μ.tilted f)
      = ∫⁻ x in s, ENNReal.ofReal (exp (f x) / ∫ x, exp (f x) ∂μ) * g x ∂μ

{α : Type u_1}
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → ℝ)
(g : α → ℝ≥0∞)
{s : Set α}
(hs : MeasurableSet s)

∫⁻ (x : α) in s, g x ∂μ.tilted f = ∫⁻ (x : α) in s, ENNReal.ofReal (rexp (f x) / ∫ (x : α), rexp (f x) ∂μ) * g x ∂μ


@[simp]
theorem powerset_mono : 𝒫 s ⊆ 𝒫 t ↔ s ⊆ t

𝒫 s ⊆ 𝒫 t ↔ s ⊆ t


/-- Transport a monoidal structure along an equivalence of (plain) categories.
-/
@[simps]
def transportStruct (e : C ≌ D) : MonoidalCategoryStruct.{v₂} D

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


@[simp]
theorem includeRight_apply (b : B) : (includeRight : B →ₐ[R] A ⊗[R] B) b = 1 ⊗ₜ b

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

Algebra.TensorProduct.includeRight b = 1 ⊗ₜ[R] b


theorem Compares.ne_lt [Preorder α] : ∀ {o} {a b : α}, Compares o a b → (o ≠ lt ↔ b ≤ a)

{α : Type u_1}
[Preorder α]
{o : Ordering}
{a b : α}

o.Compares a b → (o ≠ Ordering.lt ↔ b ≤ a)


@[simp]
theorem Basis.tensorProduct_apply (b : Basis ι S M) (c : Basis κ R N) (i : ι) (j : κ) :
    Basis.tensorProduct b c (i, j) = b i ⊗ₜ c j

{R : Type u_1}
{S : Type u_2}
{M : Type u_3}
{N : Type u_4}
{ι : Type u_5}
{κ : Type u_6}
[CommSemiring R]
[Semiring S]
[Algebra R S]
[AddCommMonoid M]
[Module R M]
[Module S M]
[IsScalarTower R S M]
[AddCommMonoid N]
[Module R N]
(b : Basis ι S M)
(c : Basis κ R N)
(i : ι)
(j : κ)

(b.tensorProduct c) (i, j) = b i ⊗ₜ[R] c j


@[symm]
theorem JoinedIn.symm (h : JoinedIn F x y) : JoinedIn F y x

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{F : Set X}
(h : JoinedIn F x y)


@[to_additive]
theorem Multiset.prod_eq_prod_toEnumFinset [CommMonoid α] (m : Multiset α) :
    m.prod = ∏ x ∈ m.toEnumFinset, x.1

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


/-- A morphism of snake inputs involve four morphisms of short complexes
which make the obvious diagram commute. -/
@[ext]
structure Hom :=
  /-- a morphism between the zeroth lines -/
  f₀ : S₁.L₀ ⟶ S₂.L₀
  /-- a morphism between the first lines -/
  f₁ : S₁.L₁ ⟶ S₂.L₁
  /-- a morphism between the second lines -/
  f₂ : S₁.L₂ ⟶ S₂.L₂
  /-- a morphism between the third lines -/
  f₃ : S₁.L₃ ⟶ S₂.L₃
  comm₀₁ : f₀ ≫ S₂.v₀₁ = S₁.v₀₁ ≫ f₁ := by aesop_cat
  comm₁₂ : f₁ ≫ S₂.v₁₂ = S₁.v₁₂ ≫ f₂ := by aesop_cat
  comm₂₃ : f₂ ≫ S₂.v₂₃ = S₁.v₂₃ ≫ f₃ := by aesop_cat

{S₁ S₂ : CategoryTheory.ShortComplex.SnakeInput C}

CategoryTheory.CategoryStruct.comp self.f₂ S₂.v₂₃ = CategoryTheory.CategoryStruct.comp S₁.v₂₃ self.f₃


theorem card_subtype_le [Finite α] (p : α → Prop) : Nat.card { x // p x } ≤ Nat.card α

{α : Type u_1}
[Finite α]
(p : α → Prop)


@[simp]
theorem zero_lt_neg_iff {x : PGame} : 0 < -x ↔ x < 0


theorem continuousOn_floor (n : ℤ) :
    ContinuousOn (fun x => floor x : α → α) (Ico n (n + 1) : Set α)

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
(n : ℤ)

ContinuousOn (fun x => ↑⌊x⌋) (Set.Ico (↑n) (↑n + 1))


theorem mapsTo_gaugeRescale_closure {s t : Set E} (hsc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0)
    (htc : Convex ℝ t) (ht₀ : 0 ∈ t) (hta : Absorbent ℝ t) :
    MapsTo (gaugeRescale s t) (closure s) (closure t)

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
{s t : Set E}
(hsc : Convex ℝ s)
(hs₀ : s ∈ 𝓝 0)
(htc : Convex ℝ t)
(ht₀ : 0 ∈ t)
(hta : Absorbent ℝ t)

Set.MapsTo (gaugeRescale s t) (closure s) (closure t)


theorem weightedHomogeneousComponent_apply [DecidableEq M] :
    weightedHomogeneousComponent w n φ =
      ∑ d ∈ φ.support.filter fun d => weight w d = n, monomial d (coeff d φ)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
{σ : Type u_3}
[AddCommMonoid M]
{w : σ → M}
(n : M)
(φ : MvPolynomial σ R)
[DecidableEq M]

(MvPolynomial.weightedHomogeneousComponent w n) φ =
  ∑ d ∈ Finset.filter (fun d => (Finsupp.weight w) d = n) φ.support, (MvPolynomial.monomial d) (MvPolynomial.coeff d φ)


/--
The lower set topology is the topology where the open sets are the lower sets. In general the lower
set topology does not coincide with the lower topology.
-/
protected class IsLowerSet (α : Type*) [t : TopologicalSpace α] [Preorder α] : Prop where
  topology_eq_lowerSetTopology : t = lowerSet α

{α : Type u_4}
[t : TopologicalSpace α]
[Preorder α]
[self : Topology.IsLowerSet α]


/-- The derivative of the terms of an L-series. -/
lemma LSeries.hasDerivAt_term (f : ℕ → ℂ) (n : ℕ) (s : ℂ) :
    HasDerivAt (fun z ↦ term f z n) (-(term (logMul f) s n)) s

HasDerivAt (fun z => LSeries.term f z n) (-LSeries.term (LSeries.logMul f) s n) s


{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{ρ : MeasureTheory.Measure (α × β)}


@[simp, norm_cast]
theorem coe_zero : ((0 : R) : ℍ[R,c₁,c₂]) = 0


private theorem smul_nonneg_of_pos_of_nonneg (ha : 0 < a) (hb : 0 ≤ b) : 0 ≤ a • b

{α : Type u_1}
{β : Type u_2}
[Zero α]
[Zero β]
[SMulZeroClass α β]
[Preorder α]
[Preorder β]
[PosSMulMono α β]
{a : α}
{b : β}
(ha : 0 < a)
(hb : 0 ≤ b)


@[to_additive]
theorem lift.range_eq_closure : (lift f).range = Subgroup.closure (Set.range f)

{α : Type u}
{β : Type v}
[Group β]
{f : α → β}

(FreeGroup.lift f).range = Subgroup.closure (Set.range f)


theorem set_biUnion_finset_image {f : γ → α} {g : α → Set β} {s : Finset γ} :
    ⋃ x ∈ s.image f, g x = ⋃ y ∈ s, g (f y)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[DecidableEq α]
{f : γ → α}
{g : α → Set β}
{s : Finset γ}

⋃ x ∈ Finset.image f s, g x = ⋃ y ∈ s, g (f y)


theorem Real.mul_iSup_of_nonpos (ha : r ≤ 0) (f : ι → ℝ) : (r * ⨆ i, f i) = ⨅ i, r * f i

{ι : Sort u_1}
{r : ℝ}
(ha : r ≤ 0)
(f : ι → ℝ)


theorem units_eq_one [Unique Mˣ] (u : Mˣ) : u = 1

{M : Type u_1}
[Monoid M]
[Unique Mˣ]
(u : Mˣ)


theorem u_iSup_l [CompleteLattice α] [CompleteLattice β] (gi : GaloisCoinsertion l u) {ι : Sort x}
    (f : ι → α) : u (⨆ i, l (f i)) = ⨆ i, f i

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[CompleteLattice α]
[CompleteLattice β]
(gi : GaloisCoinsertion l u)
{ι : Sort x}
(f : ι → α)


/-- Ring equivalence between additive group endomorphisms of an `AddCommGroup` `A` and
`ℤ`-module endomorphisms of `A.` -/
@[simps] def addMonoidEndRingEquivInt (A : Type*) [AddCommGroup A] :
    AddMonoid.End A ≃+* Module.End ℤ A

∀ (a : A →+ A), (addMonoidEndRingEquivInt A) a = (↑(addMonoidHomLequivInt ℤ)).toFun a


theorem UniformInducing.mk' {f : α → β}
    (h : ∀ s, s ∈ 𝓤 α ↔ ∃ t ∈ 𝓤 β, ∀ x y : α, (f x, f y) ∈ t → (x, y) ∈ s) : UniformInducing f

(h : ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ ∃ t ∈ 𝓤 β, ∀ (x y : α), (f x, f y) ∈ t → (x, y) ∈ s)


private theorem ack_strict_mono_left' : ∀ {m₁ m₂} (n), m₁ < m₂ → ack m₁ n < ack m₂ n


/-- An `sl₂` triple within a Lie ring `L` is a triple of elements `h`, `e`, `f` obeying relations
which ensure that the Lie subalgebra they generate is equivalent to `sl₂`. -/
structure IsSl2Triple (h e f : L) : Prop where
  h_ne_zero : h ≠ 0
  lie_e_f : ⁅e, f⁆ = h
  lie_h_e_nsmul : ⁅h, e⁆ = 2 • e
  lie_h_f_nsmul : ⁅h, f⁆ = - (2 • f)

{L : Type u_2}
[LieRing L]
{h e f : L}
(self : IsSl2Triple h e f)


/-- If a product is 1 and the function is 1 except possibly at one
point, it is 1 everywhere on the `Finset`. -/
@[to_additive "If a sum is 0 and the function is 0 except possibly at one
point, it is 0 everywhere on the `Finset`."]
theorem eq_one_of_prod_eq_one {s : Finset α} {f : α → β} {a : α} (hp : ∏ x ∈ s, f x = 1)
    (h1 : ∀ x ∈ s, x ≠ a → f x = 1) : ∀ x ∈ s, f x = 1

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
{s : Finset α}
{f : α → β}
{a : α}
(hp : ∑ x ∈ s, f x = 0)
(h1 : ∀ x ∈ s, x ≠ a → f x = 0)
(x : α)


/-- Replacing both the first and third points by ones on the same lines but the opposite rays
does not change the oriented angle (vertically opposite angles). -/
theorem _root_.Sbtw.oangle_eq_left_right {p₁ p₁' p₂ p₃ p₃' : P} (h₁ : Sbtw ℝ p₁ p₂ p₁')
    (h₃ : Sbtw ℝ p₃ p₂ p₃') : ∡ p₁ p₂ p₃ = ∡ p₁' p₂ p₃'

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


/-- The obvious projection functor from structured arrows. -/
@[simps!]
def proj (S : D) (T : C ⥤ D) : StructuredArrow S T ⥤ C

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit S) T)

(CategoryTheory.StructuredArrow.proj S T).obj X = X.right


@[to_additive]
lemma max_inv_one (a : α) : max a⁻¹ 1 = a⁻¹ * max a 1

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


theorem descPochhammer_smeval_eq_ascPochhammer (r : R) (n : ℕ) :
    (descPochhammer ℤ n).smeval r = (ascPochhammer ℕ n).smeval (r - n + 1)

{R : Type u_1}
[NonAssocRing R]
[Pow R ℕ]
[NatPowAssoc R]
(r : R)
(n : ℕ)

(descPochhammer ℤ n).smeval r = (ascPochhammer ℕ n).smeval (r - ↑n + 1)


/-- For a bounded set `s : Set ℝ`, its `Metric.diam` is equal to `sSup s - sInf s`. -/
theorem diam_eq {s : Set ℝ} (h : Bornology.IsBounded s) : Metric.diam s = sSup s - sInf s


theorem map_map {K L₁ L₂ L₃ : Type*} [Field K] [Field L₁] [Algebra K L₁] [Field L₂] [Algebra K L₂]
    [Field L₃] [Algebra K L₃] (E : IntermediateField K L₁) (f : L₁ →ₐ[K] L₂) (g : L₂ →ₐ[K] L₃) :
    (E.map f).map g = E.map (g.comp f)

{K : Type u_4}
{L₁ : Type u_5}
{L₂ : Type u_6}
{L₃ : Type u_7}
[Field K]
[Field L₁]
[Algebra K L₁]
[Field L₂]
[Algebra K L₂]
[Field L₃]
[Algebra K L₃]
(E : IntermediateField K L₁)
(f : L₁ →ₐ[K] L₂)
(g : L₂ →ₐ[K] L₃)

IntermediateField.map g (IntermediateField.map f E) = IntermediateField.map (g.comp f) E


/-- Two linear isometries are equal if they are equal on basis vectors. -/
theorem Basis.ext_linearIsometry {ι : Type*} (b : Basis ι R E) {f₁ f₂ : E →ₛₗᵢ[σ₁₂] E₂}
    (h : ∀ i, f₁ (b i) = f₂ (b i)) : f₁ = f₂

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
{ι : Type u_11}
(b : Basis ι R E)
{f₁ f₂ : E →ₛₗᵢ[σ₁₂] E₂}
(h : ∀ (i : ι), f₁ (b i) = f₂ (b i))


/-- Subtracting the result of adding a group element produces the same result
as subtracting the points and subtracting that group element. -/
theorem vsub_vadd_eq_vsub_sub (p₁ p₂ : P) (g : G) : p₁ -ᵥ (g +ᵥ p₂) = p₁ -ᵥ p₂ - g

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[T : AddTorsor G P]
(p₁ p₂ : P)
(g : G)


@[to_additive]
theorem mem_smul_set_iff_inv_smul_mem : x ∈ a • A ↔ a⁻¹ • x ∈ A

{α : Type u_2}
{β : Type u_3}
[Group α]
[MulAction α β]
{A : Set β}
{a : α}
{x : β}

x ∈ a • A ↔ a⁻¹ • x ∈ A


theorem flatten_congr {c1 c2 : Computation (WSeq α)} :
    Computation.LiftRel Equiv c1 c2 → flatten c1 ~ʷ flatten c2

{α : Type u}
{c1 c2 : Computation (Stream'.WSeq α)}

Computation.LiftRel Stream'.WSeq.Equiv c1 c2 → Stream'.WSeq.flatten c1 ~ʷ Stream'.WSeq.flatten c2


@[simp]
theorem toDFinsupp_zero [Zero M] : (0 : ι →₀ M).toDFinsupp = 0


@[simp]
theorem ofDual_sup [Inf α] (a b : αᵒᵈ) : ofDual (a ⊔ b) = ofDual a ⊓ ofDual b

OrderDual.ofDual (a ⊔ b) = OrderDual.ofDual a ⊓ OrderDual.ofDual b


theorem Nat.rel_of_forall_rel_succ_of_le_of_le (r : β → β → Prop) [IsRefl β r] [IsTrans β r]
    {f : ℕ → β} {a : ℕ} (h : ∀ n, a ≤ n → r (f n) (f (n + 1)))
    ⦃b c : ℕ⦄ (hab : a ≤ b) (hbc : b ≤ c) : r (f b) (f c)


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

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

((CategoryTheory.curry.obj F).obj X).obj Y = F.obj (X, Y)


/-- A monoid object as a bimodule over itself. -/
@[simps]
def regular : Bimod A A

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


@[to_additive]
theorem const_mul [Mul γ] [MeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
    IdentDistrib (fun x => c * f x) (fun x => c * g x) μ ν

(h : ProbabilityTheory.IdentDistrib f g μ ν)

ProbabilityTheory.IdentDistrib (fun x => c * f x) (fun x => c * g x) μ ν


lemma commute_of_mem_adjoin_singleton_of_commute {a b c : A}
    (hc : c ∈ adjoin R {b}) (h : Commute a b) :
    Commute a c

{R : Type uR}
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{a b c : A}
(hc : c ∈ Algebra.adjoin R {b})
(h : Commute a b)


/-- The condition on a complex shape `c` saying that homotopic maps become equal in
the localized category with respect to quasi-isomorphisms. -/
class ComplexShape.QFactorsThroughHomotopy {ι : Type*} (c : ComplexShape ι)
    (C : Type*) [Category C] [Preadditive C]
    [CategoryWithHomology C] : Prop where
  areEqualizedByLocalization {K L : HomologicalComplex C c} {f g : K ⟶ L} (h : Homotopy f g) :
    AreEqualizedByLocalization (HomologicalComplex.quasiIso C c) f g

{ι : Type u_3}
{c : ComplexShape ι}
{C : Type u_4}
[CategoryTheory.Category.{u_5, u_4} C]
[CategoryTheory.Preadditive C]
[CategoryTheory.CategoryWithHomology C]
[self : c.QFactorsThroughHomotopy C]
{K L : HomologicalComplex C c}
{f g : K ⟶ L}
(h : Homotopy f g)

CategoryTheory.AreEqualizedByLocalization (HomologicalComplex.quasiIso C c) f g


@[simp]
theorem coe_inclusion (h : s ⊆ t) (x : s) : (inclusion h x : α) = (x : α)

{α : Type u_1}
{s t : Set α}
(h : s ⊆ t)
(x : ↑s)


/-- The composition of `C^n` functions within domains at points is `C^n`. -/
theorem ContMDiffWithinAt.comp {t : Set M'} {g : M' → M''} (x : M)
    (hg : ContMDiffWithinAt I' I'' n g t (f x)) (hf : ContMDiffWithinAt I I' n f s x)
    (st : MapsTo f s t) : ContMDiffWithinAt I I'' n (g ∘ f) s x


@[simp] theorem ι_apply (x : ⨁ i, A i) :
  ⟨Quot.mk (Rel <| rel R A) (TensorAlgebra.ι R x)⟩ = ι' R A x

{I : Type u}
[DecidableEq I]
(R : Type v)
[CommSemiring R]
(A : I → Type w)
[(i : I) → Semiring (A i)]
[(i : I) → Algebra R (A i)]
(x : ⨁ (i : I), A i)

{ toQuot := Quot.mk (RingQuot.Rel (LinearAlgebra.FreeProduct.rel R A)) ((TensorAlgebra.ι R) x) } =
  (LinearAlgebra.FreeProduct.ι' R A) x


theorem single_apply {a a' : G} {b : k} [Decidable (a = a')] :
    single a b a' = if a = a' then b else 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
{a a' : G}
{b : k}
[Decidable (a = a')]

(MonoidAlgebra.single a b) a' = if a = a' then b else 0


theorem liftPropWithinAt_congr_iff (h₁ : ∀ y ∈ s, g' y = g y) (hx : g' x = g x) :
    LiftPropWithinAt P g' s x ↔ LiftPropWithinAt P g s x

{H : Type u_1}
{M : Type u_2}
{H' : Type u_3}
{M' : Type u_4}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
[TopologicalSpace H']
[TopologicalSpace M']
[ChartedSpace H' M']
{G : StructureGroupoid H}
{G' : StructureGroupoid H'}
{P : (H → H') → Set H → H → Prop}
{g g' : M → M'}
{s : Set M}
{x : M}
(hG : G.LocalInvariantProp G' P)
(h₁ : ∀ y ∈ s, g' y = g y)
(hx : g' x = g x)

ChartedSpace.LiftPropWithinAt P g' s x ↔ ChartedSpace.LiftPropWithinAt P g s x


theorem transitive_oneOneReducible {α} [Primcodable α] : Transitive (@OneOneReducible α α _ _)


lemma cancel_right {g₁ g₂ : β →*₀ γ} {f : α →*₀ β} (hf : Surjective f) :
    g₁.comp f = g₂.comp f ↔ g₁ = g₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[MulZeroOneClass α]
[MulZeroOneClass β]
[MulZeroOneClass γ]
{g₁ g₂ : β →*₀ γ}
{f : α →*₀ β}
(hf : Function.Surjective ⇑f)


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

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

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


@[simp]
protected theorem extractLsb_ofNat (x n : Nat) (hi lo : Nat) :
  extractLsb hi lo (BitVec.ofNat n x) = .ofNat (hi - lo + 1) ((x % 2^n) >>> lo)

BitVec.extractLsb hi lo (BitVec.ofNat n x) = BitVec.ofNat (hi - lo + 1) ((x % 2 ^ n) >>> lo)


@[simp]
theorem mem_inf_iff : a ∈ s ⊓ t ↔ a ∈ s ∨ a ∈ t

{α : Type u_1}
[LE α]
{s t : UpperSet α}
{a : α}


theorem compare_uc : UniformContinuous compareEquiv


theorem blockTriangular_one : BlockTriangular (1 : Matrix m m R) b

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{b : m → α}
[Preorder α]
[DecidableEq m]


/-- If `A` is subterminal, it is isomorphic to `A ⨯ A`. -/
@[simps!]
def IsSubterminal.isoDiag (hA : IsSubterminal A) [HasBinaryProduct A A] : A ⨯ A ≅ A

hA.isoDiag.hom = CategoryTheory.inv (CategoryTheory.Limits.diag A)


theorem equiv_zero_of_val_eq_of_equiv_zero {f g : PadicSeq p}
    (h : ∀ k, padicNorm p (f k) = padicNorm p (g k)) (hf : f ≈ 0) : g ≈ 0

(h : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k))


theorem tendsto_nhds {f : Filter β} {u : β → α} {a : α} :
    Tendsto u f (𝓝 a) ↔ ∀ ε > 0, ∀ᶠ x in f, dist (u x) a < ε

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
{f : Filter β}
{u : β → α}
{a : α}

Filter.Tendsto u f (𝓝 a) ↔ ∀ ε > 0, ∀ᶠ (x : β) in f, dist (u x) a < ε


@[simp]
theorem end_mem_support {u v : V} (p : G.Walk u v) : v ∈ p.support

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


@[simp] theorem foldrM_nil [Monad m] (f : α → β → m β) (b) : [].foldrM f b = pure b

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
(f : α → β → m β)
(b : β)


/-- Passing from `Mon_ (C ⥤ C)` to `Monad C` is functorial. -/
@[simps]
def monToMonad : Mon_ (C ⥤ C) ⥤ Monad C

{X Y : Mon_ (CategoryTheory.Functor C C)}

((CategoryTheory.Monad.monToMonad C).map f).toNatTrans = f.hom


theorem factorization_eq_zero_iff_remainder {p r : ℕ} (i : ℕ) (pp : p.Prime) (hr0 : r ≠ 0) :
    ¬p ∣ r ↔ (p * i + r).factorization p = 0

{p r : ℕ}
(i : ℕ)
(pp : Nat.Prime p)
(hr0 : r ≠ 0)


@[simp]
theorem size_bit {b n} (h : bit b n ≠ 0) : size (bit b n) = succ (size n)

{b : Bool}
{n : ℕ}
(h : Nat.bit b n ≠ 0)


/-- The function `seminormFromConst' hf1 hc hpm` is bounded above by `x`. -/
theorem seminormFromConst_le_seminorm (x : R) : seminormFromConst' hf1 hc hpm x ≤ f x

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


theorem lt_iff_exists_rat_btwn :
    a < b ↔ ∃ q : ℚ, 0 ≤ q ∧ a < Real.toNNReal q ∧ (Real.toNNReal q : ℝ≥0∞) < b

a < b ↔ ∃ q, 0 ≤ q ∧ a < ↑(↑q).toNNReal ∧ ↑(↑q).toNNReal < b


@[to_additive]
theorem mk_surjective : Surjective (@mk M N _ _)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]


lemma cpow_mul_nat (x y : ℂ) (n : ℕ) : x ^ (y * n) = (x ^ y) ^ n


@[simp]
theorem measure_union_eq_top_iff : μ (s ∪ t) = ∞ ↔ μ s = ∞ ∨ μ t = ∞

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{s t : Set α}

μ (s ∪ t) = ⊤ ↔ μ s = ⊤ ∨ μ t = ⊤


theorem Fintype.card_subtype_eq (y : α) [Fintype { x // x = y }] :
    Fintype.card { x // x = y } = 1

{α : Type u_1}
(y : α)
[Fintype { x // x = y }]


theorem HasDerivWithinAt.limsup_slope_le' (hf : HasDerivWithinAt f f' s x) (hs : x ∉ s)
    (hr : f' < r) : ∀ᶠ z in 𝓝[s] x, slope f x z < r

{f : ℝ → ℝ}
{f' : ℝ}
{s : Set ℝ}
{x r : ℝ}
(hf : HasDerivWithinAt f f' s x)
(hs : x ∉ s)
(hr : f' < r)


/-- Split epimorphisms are also absolute epimorphisms. -/
@[simps]
def SplitEpi.map {X Y : C} {f : X ⟶ Y} (se : SplitEpi f) (F : C ⥤ D) : SplitEpi (F.map f)

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


@[simp]
theorem Cocone.ofCofork_ι {F : WalkingParallelPair ⥤ C} (t : Cofork (F.map left) (F.map right))
    (j) : (Cocone.ofCofork t).ι.app j = eqToHom (by aesop) ≫ t.ι.app j

{F : CategoryTheory.Functor CategoryTheory.Limits.WalkingParallelPair C}

(t :
  CategoryTheory.Limits.Cofork (F.map CategoryTheory.Limits.WalkingParallelPairHom.left)
    (F.map CategoryTheory.Limits.WalkingParallelPairHom.right))

(CategoryTheory.Limits.Cocone.ofCofork t).ι.app j =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) (t.ι.app j)


theorem isPell_norm : ∀ {b : ℤ√d}, IsPell b ↔ b * star b = 1


/-- The predicate corresponding to a base set of the filter defined by an
`IntegrationParams`. It says that

* if `l.bHenstock`, then `π` is a Henstock prepartition, i.e. each tag belongs to the corresponding
  closed box;
* `π` is subordinate to `r`;
* if `l.bDistortion`, then the distortion of each box in `π` is less than or equal to `c`;
* if `l.bDistortion`, then there exists a prepartition `π'` with distortion `≤ c` that covers
  exactly `I \ π.iUnion`.

The last condition is automatically verified for partitions, and is used in the proof of the
Sacks-Henstock inequality to compare two prepartitions covering the same part of the box.

It is also automatically satisfied for any `c > 1`, see TODO section of the module docstring for
details. -/
structure MemBaseSet (l : IntegrationParams) (I : Box ι) (c : ℝ≥0) (r : (ι → ℝ) → Ioi (0 : ℝ))
    (π : TaggedPrepartition I) : Prop where
  protected isSubordinate : π.IsSubordinate r
  protected isHenstock : l.bHenstock → π.IsHenstock
  protected distortion_le : l.bDistortion → π.distortion ≤ c
  protected exists_compl : l.bDistortion → ∃ π' : Prepartition I,
    π'.iUnion = ↑I \ π.iUnion ∧ π'.distortion ≤ c

{ι : Type u_1}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{I : BoxIntegral.Box ι}
{c : ℝ≥0}
{r : (ι → ℝ) → ↑(Set.Ioi 0)}
{π : BoxIntegral.TaggedPrepartition I}
(self : l.MemBaseSet I c r π)


@[to_additive (attr := simp) mod_natCard_zsmul]
lemma zpow_mod_natCard (a : G) (n : ℤ) : a ^ (n % Nat.card G : ℤ) = a ^ n

{G : Type u_1}
[Group G]
(a : G)
(n : ℤ)


theorem factorization_eq_zero_of_lt {n p : ℕ} (h : n < p) : n.factorization p = 0


@[to_additive]
lemma smul_left_injective' [SMul M α] [FaithfulSMul M α] : Injective ((· • ·) : M → α → α)

{M : Type u_1}
{α : Type u_7}
[SMul M α]
[FaithfulSMul M α]


@[simp]
theorem mem_toSet (a u : PSet.{u}) : a ∈ u.toSet ↔ a ∈ u


lemma edgeDisjointTriangles_iff_mem_sym2_subsingleton :
    G.EdgeDisjointTriangles ↔
      ∀ ⦃e : Sym2 α⦄, ¬ e.IsDiag → {s ∈ G.cliqueSet 3 | e ∈ (s : Finset α).sym2}.Subsingleton

G.EdgeDisjointTriangles ↔ ∀ ⦃e : Sym2 α⦄, ¬e.IsDiag → {s | s ∈ G.cliqueSet 3 ∧ e ∈ s.sym2}.Subsingleton


theorem cbiInf_eq_of_not_forall {p : ι → Prop} {f : Subtype p → α} (hp : ¬ (∀ i, p i)) :
    ⨅ (i) (h : p i), f ⟨i, h⟩ = iInf f ⊓ sInf ∅

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrder α]
{p : ι → Prop}
{f : Subtype p → α}
(hp : ¬∀ (i : ι), p i)

⨅ i, ⨅ (h : p i), f ⟨i, h⟩ = iInf f ⊓ sInf ∅


theorem monic_X_pow_sub {n : ℕ} (H : degree p ≤ n) : Monic (X ^ (n + 1) - p)

{R : Type u}
[Ring R]
{p : R[X]}
{n : ℕ}
(H : p.degree ≤ ↑n)


/-- The forgetful functor from bimonoid objects to comonoid objects. -/
@[simps!]
def toComon_ : Bimon_ C ⥤ Comon_ C

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

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


@[to_additive (attr := simp)]
theorem closure_eq_bot_iff : closure k = ⊥ ↔ k ⊆ {1}


theorem equiv_zero_iff_le : (G ≈ 0) ↔ G ≤ 0


theorem utf8Size_eq (c : Char) : c.utf8Size = 1 ∨ c.utf8Size = 2 ∨ c.utf8Size = 3 ∨ c.utf8Size = 4


theorem count_add' (a b : ℕ) : count p (a + b) = count (fun k ↦ p (k + b)) a + count p b

(p : ℕ → Prop)
[DecidablePred p]
(a b : ℕ)

Nat.count p (a + b) = Nat.count (fun k => p (k + b)) a + Nat.count p b


@[simp]
theorem cycleRange_last (n : ℕ) : cycleRange (last n) = finRotate (n + 1)

(Fin.last n).cycleRange = finRotate (n + 1)


theorem curryFinFinset_symm_apply_piecewise_const (hk : s.card = k) (hl : sᶜ.card = l)
    (f : G[×k]→L[𝕜] G[×l]→L[𝕜] G') (x y : G) :
    (curryFinFinset 𝕜 G G' hk hl).symm f (s.piecewise (fun _ => x) fun _ => y) =
      f (fun _ => x) fun _ => y

(f : ContinuousMultilinearMap 𝕜 (fun i => G) (ContinuousMultilinearMap 𝕜 (fun i => G) G'))

((ContinuousMultilinearMap.curryFinFinset 𝕜 G G' hk hl).symm f) (s.piecewise (fun x_1 => x) fun x => y) =
  (f fun x_1 => x) fun x => y


@[to_additive (attr := simp)]
theorem homQuotientZPowOfHom_comp_of_rightInverse (i : Function.RightInverse g f) :
    (homQuotientZPowOfHom f n).comp (homQuotientZPowOfHom g n) = MonoidHom.id _

{A B : Type u}
[CommGroup A]
[CommGroup B]
(f : A →* B)
(g : B →* A)
(n : ℤ)
(i : Function.RightInverse ⇑g ⇑f)

(QuotientGroup.homQuotientZPowOfHom f n).comp (QuotientGroup.homQuotientZPowOfHom g n) =
  MonoidHom.id (B ⧸ (zpowGroupHom n).range)


theorem roots_prod_X_sub_C (s : Finset R) : (s.prod fun a => X - C a).roots = s.val

{R : Type u}
[CommRing R]
[IsDomain R]
(s : Finset R)

(∏ a ∈ s, (Polynomial.X - Polynomial.C a)).roots = s.val


theorem closure.isSubmonoid : IsSubmonoid (closure S)


theorem sup_ite (p : β → Prop) [DecidablePred p] :
    (s.sup fun i => ite (p i) (f i) (g i)) = (s.filter p).sup f ⊔ (s.filter fun i => ¬p i).sup g

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
{s : Finset β}
{f g : β → α}
(p : β → Prop)
[DecidablePred p]

(s.sup fun i => if p i then f i else g i) = (Finset.filter p s).sup f ⊔ (Finset.filter (fun i => ¬p i) s).sup g


@[to_additive]
theorem prod_union [DecidableEq α] (h : Disjoint s₁ s₂) :
    ∏ x ∈ s₁ ∪ s₂, f x = (∏ x ∈ s₁, f x) * ∏ x ∈ s₂, f x

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f : α → β}
[AddCommMonoid β]
[DecidableEq α]
(h : Disjoint s₁ s₂)

∑ x ∈ s₁ ∪ s₂, f x = ∑ x ∈ s₁, f x + ∑ x ∈ s₂, f x


@[simp]
theorem DifferentiableAt.rpow_const (hf : DifferentiableAt ℝ f x) (h : f x ≠ 0 ∨ 1 ≤ p) :
    DifferentiableAt ℝ (fun x => f x ^ p) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{p : ℝ}
(hf : DifferentiableAt ℝ f x)
(h : f x ≠ 0 ∨ 1 ≤ p)


/-- A functor `F : Cᵒᵖ ⥤ Type v₁` is representable if there is object `X` so `F ≅ yoneda.obj X`.

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

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

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


lemma slope_le_of_hasDerivAt (hfc : ConcaveOn ℝ S f)
    (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) (hf' : HasDerivAt f f' x) :
    slope f x y ≤ f'

{S : Set ℝ}
{f : ℝ → ℝ}
{x y f' : ℝ}
(hfc : ConcaveOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hf' : HasDerivAt f f' x)


protected theorem isTopologicalBasis : IsTopologicalBasis (upperBasis α)

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpper α]


/-- Change a cocone on `F.leftOp : Jᵒᵖ ⥤ C` to a cocone on `F : J ⥤ Cᵒᵖ`. -/
@[simps!]
def coneOfCoconeLeftOp (c : Cocone F.leftOp) : Cone F

(c : CategoryTheory.Limits.Cocone F.leftOp)

(CategoryTheory.Limits.coneOfCoconeLeftOp c).π.app X = (c.ι.app (Opposite.op X)).op


lemma ext_cochain_to_iff (i j : ℤ) (hij : i + 1 = j)
    {K : CochainComplex C ℤ} {γ₁ γ₂ : Cochain K (mappingCone φ) i} :
    γ₁ = γ₂ ↔ γ₁.comp (fst φ).1 hij = γ₂.comp (fst φ).1 hij ∧
      γ₁.comp (snd φ) (add_zero i) = γ₂.comp (snd φ) (add_zero i)

{γ₁ γ₂ : CochainComplex.HomComplex.Cochain K (CochainComplex.mappingCone φ) i}

γ₁ = γ₂ ↔
  γ₁.comp (↑(CochainComplex.mappingCone.fst φ)) hij = γ₂.comp (↑(CochainComplex.mappingCone.fst φ)) hij ∧
    γ₁.comp (CochainComplex.mappingCone.snd φ) ⋯ = γ₂.comp (CochainComplex.mappingCone.snd φ) ⋯


theorem testAgainstNN_const (μ : FiniteMeasure Ω) (c : ℝ≥0) :
    μ.testAgainstNN (BoundedContinuousFunction.const Ω c) = c * μ.mass

{Ω : Type u_1}
[MeasurableSpace Ω]
[TopologicalSpace Ω]
(μ : MeasureTheory.FiniteMeasure Ω)
(c : ℝ≥0)


theorem Rel.subRight {a b : lib R X} (c : lib R X) (h : Rel R X a b) : Rel R X (a - c) (b - c)

{R : Type u}
{X : Type v}
[CommRing R]
{a b : lib R X}
(c : lib R X)
(h : FreeLieAlgebra.Rel R X a b)


@[to_additive (attr := simp)] lemma _root_.Function.const_one [One β] : const α (1 : β) = 1


lemma negOnePow_add (n₁ n₂ : ℤ) :
    (n₁ + n₂).negOnePow =  n₁.negOnePow * n₂.negOnePow


@[to_additive]
theorem le_normalizer : H ≤ normalizer H

{G : Type u_1}
[Group G]
{H : Subgroup G}


/-- Lagrange multipliers theorem: if `φ : E → ℝ` has a local extremum on the set `{x | f x = f x₀}`
at `x₀`, and both `f : E → ℝ` and `φ` are strictly differentiable at `x₀`, then there exist
`a b : ℝ` such that `(a, b) ≠ 0` and `a • f' + b • φ' = 0`. -/
theorem IsLocalExtrOn.exists_multipliers_of_hasStrictFDerivAt_1d {f : E → ℝ} {f' : E →L[ℝ] ℝ}
    (hextr : IsLocalExtrOn φ {x | f x = f x₀} x₀) (hf' : HasStrictFDerivAt f f' x₀)
    (hφ' : HasStrictFDerivAt φ φ' x₀) : ∃ a b : ℝ, (a, b) ≠ 0 ∧ a • f' + b • φ' = 0


theorem subset_interior_iff_isOpen : s ⊆ interior s ↔ IsOpen s

{X : Type u}
{s : Set X}
[TopologicalSpace X]


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

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

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

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


protected theorem isMax (a : α) : IsMax a

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


@[to_additive (attr := simp, norm_cast)]
theorem toSubgroup_top : ((⊤ : OpenSubgroup G) : Subgroup G) = ⊤

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]


theorem toMonoidWithZeroHom_injective : Injective (toMonoidWithZeroHom : _ → α →*₀ β)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulZeroOneClass α]
[MulZeroOneClass β]


/-- `Finset.cons` version of `Finset.Ico_insert_right`. -/
theorem Icc_eq_cons_Ico (h : a ≤ b) : Icc a b = (Ico a b).cons b right_not_mem_Ico

{α : Type u_2}
[PartialOrder α]
[LocallyFiniteOrder α]
{a b : α}
(h : a ≤ b)

Finset.Icc a b = Finset.cons b (Finset.Ico a b) ⋯


@[reassoc]
lemma mapComp_assoc_right_inv {c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) :
    F.map f ◁ (F.mapComp g h).inv ≫ (F.mapComp f (g ≫ h)).inv =
    (α_ (F.map f) (F.map g) (F.map h)).inv ≫ (F.mapComp f g).inv ▷ F.map h ≫
    (F.mapComp (f ≫ g) h).inv ≫ F.map₂ (α_ f g h).hom

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.Pseudofunctor B C)
{a b c d : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (F.map f) (F.mapComp g h).inv)
    (F.mapComp f (CategoryTheory.CategoryStruct.comp g h)).inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator (F.map f) (F.map g) (F.map h)).inv
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (F.mapComp f g).inv (F.map h))
      (CategoryTheory.CategoryStruct.comp (F.mapComp (CategoryTheory.CategoryStruct.comp f g) h).inv
        (F.map₂ (CategoryTheory.Bicategory.associator f g h).hom)))


/-- A projective object admits a trivial projective resolution: itself in degree 0. -/
@[simps]
noncomputable def self [Projective Z] : ProjectiveResolution Z

(CategoryTheory.ProjectiveResolution.self Z).complex = (ChainComplex.single₀ C).obj Z


@[simp]
theorem mk_coe (z : 𝔻) (hz : abs (z : ℂ) < 1 := z.abs_lt_one) : mk z hz = z

(z : Complex.UnitDisc)
(hz : Complex.abs ↑z < 1 := ⋯)


theorem singularPart_smul (μ ν : Measure α) (r : ℝ≥0) :
    (r • μ).singularPart ν = r • μ.singularPart ν

{α : Type u_1}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)
(r : ℝ≥0)


theorem le_nhds_of_str_eq {X : Compactum} (F : Ultrafilter X) (x : X) : X.str F = x → ↑F ≤ 𝓝 x

{X : Compactum}
(F : Ultrafilter X.A)
(x : X.A)


@[simp]
theorem sInf_toSubalgebra (S : Set (IntermediateField F E)) :
    (sInf S).toSubalgebra = sInf (toSubalgebra '' S)

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
(S : Set (IntermediateField F E))

(sInf S).toSubalgebra = sInf (IntermediateField.toSubalgebra '' S)


@[to_additive]
theorem inter_smul_union_subset_union : (s₁ ∩ s₂) • (t₁ ∪ t₂) ⊆ s₁ • t₁ ∪ s₂ • t₂

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

s₁ ∩ s₂ +ᵥ (t₁ ∪ t₂) ⊆ s₁ +ᵥ t₁ ∪ (s₂ +ᵥ t₂)


/-- This holds independent of `p` and does not require `[Fact (1 ≤ p)]`. We keep it separate
from `pi_Lp.pseudo_emetric_space` so it can be used also for `p < 1`. -/
protected theorem edist_self (f : PiLp p β) : edist f f = 0

(p : ℝ≥0∞)
{ι : Type u_2}
{β : ι → Type u_4}
[Fintype ι]
[(i : ι) → PseudoEMetricSpace (β i)]
(f : PiLp p β)


@[simp]
theorem star_subset_star [InvolutiveStar α] {s t : Set α} : s⋆ ⊆ t⋆ ↔ s ⊆ t

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


protected theorem projIcc {a b : ℝ} (h : a ≤ b) : LipschitzWith 1 (projIcc a b h)


@[to_additive (attr := simp)] lemma mulDissociated_empty : MulDissociated (∅ : Set α)


theorem support_trinomial' (k m n : ℕ) (x y z : R) :
    Polynomial.support (C x * X ^ k + C y * X ^ m + C z * X ^ n) ⊆ {k, m, n}

{R : Type u}
[Semiring R]
(k m n : ℕ)
(x y z : R)

(Polynomial.C x * Polynomial.X ^ k + Polynomial.C y * Polynomial.X ^ m + Polynomial.C z * Polynomial.X ^ n).support ⊆
  {k, m, n}


theorem mk_apply_of_not_mem {s : Finset ι} {f : ∀ i : (↑s : Set ι), β i.val} {n : ι} (hn : n ∉ s) :
    mk β s f n = 0

{ι : Type v}
{β : ι → Type w}
[(i : ι) → AddCommMonoid (β i)]
[DecidableEq ι]
{s : Finset ι}
{f : (i : ↑↑s) → β ↑i}
{n : ι}
(hn : n ∉ s)


theorem inter_ae_eq_left_of_ae_eq_univ (h : t =ᵐ[μ] univ) : (s ∩ t : Set α) =ᵐ[μ] s

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s t : Set α}
(h : t =ᵐ[μ] Set.univ)


/-- The composition of continuous normed group homs. -/
@[simps!]
protected def comp (g : NormedAddGroupHom V₂ V₃) (f : NormedAddGroupHom V₁ V₂) :
    NormedAddGroupHom V₁ V₃

{V₁ : Type u_2}
{V₂ : Type u_3}
{V₃ : Type u_4}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
[SeminormedAddCommGroup V₃]
(g : NormedAddGroupHom V₂ V₃)
(f : NormedAddGroupHom V₁ V₂)


@[to_additive (attr := simp)]
theorem isBoundedUnder_le_inv [OrderedCommGroup α] {l : Filter β} {u : β → α} :
    (IsBoundedUnder (· ≤ ·) l fun x => (u x)⁻¹) ↔ IsBoundedUnder (· ≥ ·) l u

{α : Type u_1}
{β : Type u_2}
[OrderedAddCommGroup α]
{l : Filter β}
{u : β → α}

(Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l fun x => -u x) ↔ Filter.IsBoundedUnder (fun x x_1 => x ≥ x_1) l u


theorem copy_eq (f : A →⋆ₙₐ[R] B) (f' : A → B) (h : f' = f) : f.copy f' h = f

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[Star B]
(f : A →⋆ₙₐ[R] B)
(f' : A → B)
(h : f' = ⇑f)


@[simp]
theorem cancel_left {g : InfTopHom β γ} {f₁ f₂ : InfTopHom α β} (hg : Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Inf α]
[Top α]
[Inf β]
[Top β]
[Inf γ]
[Top γ]
{g : InfTopHom β γ}
{f₁ f₂ : InfTopHom α β}
(hg : Function.Injective ⇑g)


theorem hasDerivWithinAt_pow (n : ℕ) (x : 𝕜) (s : Set 𝕜) :
    HasDerivWithinAt (fun x : 𝕜 => x ^ n) ((n : 𝕜) * x ^ (n - 1)) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(n : ℕ)
(x : 𝕜)
(s : Set 𝕜)

HasDerivWithinAt (fun x => x ^ n) (↑n * x ^ (n - 1)) s x


theorem deriv_mul_const (hc : DifferentiableAt 𝕜 c x) (d : 𝔸) :
    deriv (fun y => c y * d) x = deriv c x * d

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c : 𝕜 → 𝔸}
(hc : DifferentiableAt 𝕜 c x)
(d : 𝔸)


/-- An induction principle for closure membership for predicates with two arguments.  -/
@[to_additive (attr := elab_as_elim) "An induction principle for additive closure membership for
  predicates with two arguments."]
theorem closure_induction₂ {p : M → M → Prop} {x} {y : M} (hx : x ∈ closure s) (hy : y ∈ closure s)
    (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (Hmul_left : ∀ x y z, p x z → p y z → p (x * y) z)
    (Hmul_right : ∀ x y z, p z x → p z y → p z (x * y)) : p x y

(Hmul_left : ∀ (x y z : M), p x z → p y z → p (x * y) z)

(Hmul_right : ∀ (x y z : M), p z x → p z y → p z (x * y))


lemma Complex.summable_one_div_nat_cpow {p : ℂ} :
    Summable (fun n : ℕ ↦ 1 / (n : ℂ) ^ p) ↔ 1 < re p

(Summable fun n => 1 / ↑n ^ p) ↔ 1 < p.re


theorem splits_of_splits_gcd_left [DecidableEq K] {f g : K[X]} (hf0 : f ≠ 0) (hf : Splits i f) :
    Splits i (EuclideanDomain.gcd f g)

{K : Type v}
{L : Type w}
[Field K]
[Field L]
(i : K →+* L)
[DecidableEq K]
{f g : K[X]}
(hf0 : f ≠ 0)
(hf : Polynomial.Splits i f)

Polynomial.Splits i (EuclideanDomain.gcd f g)


theorem const_mul (x y : β) : const (x * y) = const x * const y

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(x y : β)

CauSeq.const abv (x * y) = CauSeq.const abv x * CauSeq.const abv y


theorem isIntegral_one : IsIntegral R (1 : B)

{R : Type u_1}
{B : Type u_3}
[CommRing R]
[Ring B]
[Algebra R B]


/-- Suppose we have a monoidal equivalence `F : C ≌ D`, with `D` monoidal closed. We can pull the
monoidal closed instance back along the equivalence. For `X, Y, Z : C`, this lemma describes the
resulting uncurrying map `Hom(Y, (X ⟶[C] Z)) → Hom(X ⊗ Y ⟶ Z)`. (`X ⟶[C] Z` is
defined to be `F⁻¹(F(X) ⟶[D] F(Z))`, so uncurrying in `C` is given by essentially conjugating
uncurrying in `D` by `F.`) -/
theorem ofEquiv_uncurry_def {X Y Z : C} :
    letI := ofEquiv F adj
    ∀ (f : Y ⟶ (ihom X).obj Z), MonoidalClosed.uncurry f =
      ((Iso.compInverseIso (H := adj.toEquivalence)
          (MonoidalFunctor.commTensorLeft F X)).inv.app Y) ≫
            (adj.toEquivalence.symm.toAdjunction.homEquiv _ _).symm
              (MonoidalClosed.uncurry ((adj.homEquiv _ _).symm f))

(F : CategoryTheory.MonoidalFunctor C D)

CategoryTheory.MonoidalClosed.uncurry f =
  CategoryTheory.CategoryStruct.comp ((F.commTensorLeft X).compInverseIso.inv.app Y)
    ((adj.toEquivalence.symm.toAdjunction.homEquiv
          ((F.comp (CategoryTheory.MonoidalCategory.tensorLeft (F.obj X))).obj Y) Z).symm
      (CategoryTheory.MonoidalClosed.uncurry
        ((adj.homEquiv Y ((CategoryTheory.ihom (F.obj X)).obj (adj.toEquivalence.symm.inverse.obj Z))).symm f)))


protected theorem Codisjoint.bihimp_right (ha : Codisjoint a b) (hb : Codisjoint a c) :
    Codisjoint a (b ⇔ c)

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


theorem copy_eq (S : NonUnitalStarSubalgebra R A) (s : Set A) (hs : s = ↑S) : S.copy s hs = S

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
(S : NonUnitalStarSubalgebra R A)
(s : Set A)
(hs : s = ↑S)


@[simp]
theorem smeval_zero : (0 : R[X]).smeval x = 0

(R : Type u_1)
[Semiring R]
{S : Type u_2}
[AddCommMonoid S]
[Pow S ℕ]
[MulActionWithZero R S]
(x : S)


@[to_additive]
lemma compHom_smul_def
    {E F G : Type*} [Monoid E] [Monoid F] [MulAction F G] (f : E →* F) (a : E) (x : G) :
    letI : MulAction E G := MulAction.compHom _ f
    a • x = (f a) • x

{E : Type u_11}
{F : Type u_12}
{G : Type u_13}
[Monoid E]
[Monoid F]
[MulAction F G]
(f : E →* F)
(a : E)
(x : G)


@[simp]
theorem sInf_eq_sInter (S : Set (Set α)) : sInf S = ⋂₀ S


@[simp]
theorem apply_zpow_apply_eq_iff (f : Perm α) (n : ℤ) {x : α} :
    f ((f ^ n) x) = (f ^ n) x ↔ f x = x

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


@[simp]
theorem hsum_sub {R : Type*} [Ring R] {s t : SummableFamily Γ R α} :
    (s - t).hsum = s.hsum - t.hsum

{Γ : Type u_1}
[OrderedCancelAddCommMonoid Γ]
{α : Type u_3}
{R : Type u_4}
[Ring R]
{s t : HahnSeries.SummableFamily Γ R α}


@[to_additive mul_zsmul]
lemma zpow_mul' (a : α) (m n : ℤ) : a ^ (m * n) = (a ^ n) ^ m

{α : Type u_1}
[SubtractionMonoid α]
(a : α)
(m n : ℤ)


theorem lift_unique {j : S →+* P} (hj : ∀ x, j ((algebraMap R S) x) = g x) : lift hg = j

(hj : ∀ (x : R), j ((algebraMap R S) x) = g x)


theorem filter_lt_eq_Ioi [DecidablePred (a < ·)] : univ.filter (a < ·) = Ioi a

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrderTop α]
{a : α}
[Fintype α]
[DecidablePred fun x => a < x]

Finset.filter (fun x => a < x) Finset.univ = Finset.Ioi a


@[to_additive]
theorem Continuous.isOpen_mulSupport [T1Space X] [One X] [TopologicalSpace Y] {f : Y → X}
    (hf : Continuous f) : IsOpen (mulSupport f)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T1Space X]
[Zero X]
[TopologicalSpace Y]
{f : Y → X}
(hf : Continuous f)


theorem HasStrictFDerivAt.cexp (hf : HasStrictFDerivAt f f' x) :
    HasStrictFDerivAt (fun x => Complex.exp (f x)) (Complex.exp (f x) • f') x

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


/-- Let `s, t ⊆ X` be two subsets of a topological space `X`.  If `t ⊆ s` and the topology induced
by `X`on `s` is discrete, then also the topology induces on `t` is discrete.  -/
theorem DiscreteTopology.of_subset {X : Type*} [TopologicalSpace X] {s t : Set X}
    (_ : DiscreteTopology s) (ts : t ⊆ s) : DiscreteTopology t

{X : Type u_5}
[TopologicalSpace X]
{s t : Set X}

DiscreteTopology ↑s → t ⊆ s → DiscreteTopology ↑t


theorem one_toPGame_moveLeft (x) : (toPGame 1).moveLeft x = toPGame 0

(Ordinal.toPGame 1).moveLeft x = Ordinal.toPGame 0


@[to_additive]
theorem Antitone.tendsto_mulIndicator {ι} [Preorder ι] [One β] (s : ι → Set α) (hs : Antitone s)
    (f : α → β) (a : α) :
    Tendsto (fun i => mulIndicator (s i) f a) atTop (pure <| mulIndicator (⋂ i, s i) f a)

{α : Type u_1}
{β : Type u_2}
{ι : Type u_5}
[Preorder ι]
[One β]
(s : ι → Set α)
(hs : Antitone s)
(f : α → β)
(a : α)

Filter.Tendsto (fun i => (s i).mulIndicator f a) Filter.atTop (pure ((⋂ i, s i).mulIndicator f a))


theorem conjugate_pos {a : R} (ha : 0 < a) {c : R} (hc : IsRegular c) : 0 < star c * a * c

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{a : R}
(ha : 0 < a)
{c : R}
(hc : IsRegular c)


/-- If `X` is σ-compact, `im f` is σ-compact. -/
lemma isSigmaCompact_range {f : X → Y} (hf : Continuous f) [SigmaCompactSpace X] :
    IsSigmaCompact (range f)

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


lemma exists_isSl2Triple_of_weight_isNonZero {α : Weight K H L} (hα : α.IsNonZero) :
    ∃ h e f : L, IsSl2Triple h e f ∧ e ∈ rootSpace H α ∧ f ∈ rootSpace H (- α)

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

∃ h e f, IsSl2Triple h e f ∧ e ∈ LieAlgebra.rootSpace H ⇑α ∧ f ∈ LieAlgebra.rootSpace H (-⇑α)


@[simp]
theorem coe'_apply_complex {g : SL(2, ℤ)} {i j : Fin 2} :
    (Units.val <| Subtype.val <| coe' g) i j = (Subtype.val g i j : ℂ)


/-- An unordered closed interval is compact. -/
theorem isCompact_uIcc {α : Type*} [LinearOrder α] [TopologicalSpace α] [CompactIccSpace α]
    {a b : α} : IsCompact (uIcc a b)

{α : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[CompactIccSpace α]
{a b : α}


@[to_additive (attr := simp)]
theorem mem_inv {g : G} {S : Submonoid G} : g ∈ S⁻¹ ↔ g⁻¹ ∈ S

{G : Type u_2}
[AddGroup G]
{g : G}
{S : AddSubmonoid G}


@[to_additive]
theorem unop_surjective : Surjective (unop : αᵐᵒᵖ → α)


@[simp] theorem row_eq_zero [Zero α] [Nonempty ι] (v : n → α) : row ι v = 0 ↔ v = 0

{n : Type u_3}
{α : Type v}
{ι : Type u_6}
[Zero α]
[Nonempty ι]
(v : n → α)


theorem image_eq (f : α → β) (s : Set α) : f '' s = (Function.graph f).image s

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


@[simp]
lemma leftShift_zero (a n' : ℤ) (hn' : n + a = n') :
    (0 : Cochain K L n).leftShift a n' hn' = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(K L : CochainComplex C ℤ)
(n a n' : ℤ)
(hn' : n + a = n')

CochainComplex.HomComplex.Cochain.leftShift 0 a n' hn' = 0


/-- The order embedding version of `toPGame`. -/
@[simps]
noncomputable def toPGameEmbedding : Ordinal.{u} ↪o PGame.{u}

∀ (a : Ordinal.{u}), Ordinal.toPGameEmbedding a = a.toPGame


theorem contDiffWithinAt_nat {n : ℕ} :
    ContDiffWithinAt 𝕜 n f s x ↔ ∃ u ∈ 𝓝[insert x s] x,
      ∃ p : E → FormalMultilinearSeries 𝕜 E F, HasFTaylorSeriesUpToOn n f p u

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ}

ContDiffWithinAt 𝕜 (↑n) f s x ↔ ∃ u ∈ 𝓝[insert x s] x, ∃ p, HasFTaylorSeriesUpToOn (↑n) f p u


theorem Embedding.completelyNormalSpace [TopologicalSpace Y] [CompletelyNormalSpace Y] {e : X → Y}
    (he : Embedding e) : CompletelyNormalSpace X

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[CompletelyNormalSpace Y]
{e : X → Y}
(he : Embedding e)


/-- A term of type `HomComplex.Triplet n` consists of two integers `p` and `q`
such that `p + n = q`. (This type is introduced so that the instance
`AddCommGroup (Cochain F G n)` defined below can be found automatically.) -/
structure Triplet (n : ℤ) where
  /-- a first integer -/
  p : ℤ
  /-- a second integer -/
  q : ℤ
  /-- the condition on the two integers -/
  hpq : p + n = q

(self : CochainComplex.HomComplex.Triplet n)


theorem IsClosed.prod {s₁ : Set X} {s₂ : Set Y} (h₁ : IsClosed s₁) (h₂ : IsClosed s₂) :
    IsClosed (s₁ ×ˢ s₂)

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


/-- For type-valued presheaves, the sheaf condition in terms of unique gluings is equivalent to the
usual sheaf condition.
-/
theorem isSheaf_iff_isSheafUniqueGluing_types : F.IsSheaf ↔ F.IsSheafUniqueGluing

{X : TopCat}
(F : TopCat.Presheaf (Type u) X)


/-- The derivative `D_yf(y)` is `C^m` at `x₀`, where the derivative is taken as a continuous
linear map. We have to assume that `f` is `C^n` at `x₀` for some `n ≥ m + 1`.
We have to insert a coordinate change from `x₀` to `x` to make the derivative sensible.
This is a special case of `ContMDiffAt.mfderiv` where `f` does not contain any parameters and
`g = id`.
-/
theorem ContMDiffAt.mfderiv_const {x₀ : M} {f : M → M'} (hf : ContMDiffAt I I' n f x₀)
    (hmn : m + 1 ≤ n) :
    ContMDiffAt I 𝓘(𝕜, E →L[𝕜] E') m (inTangentCoordinates I I' id f (mfderiv I I' f) x₀) 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]
[Is : SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[I's : SmoothManifoldWithCorners I' M']
{m n : ℕ∞}
{x₀ : M}
{f : M → M'}
(hf : ContMDiffAt I I' n f x₀)
(hmn : m + 1 ≤ n)


/-- The canonical isomorphism `Triangle.shiftFunctor C 0 ≅ 𝟭 (Triangle C)`. -/
@[simps!]
noncomputable def Triangle.shiftFunctorZero : Triangle.shiftFunctor C 0 ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Pretriangulated.Triangle.shiftFunctorZero C).hom.app X).hom₂ =
  (CategoryTheory.shiftFunctorZero C ℤ).hom.app X.obj₂