/-- The compatibility of the shift functors on `CochainComplex C ℤ` with respect
to the addition of integers. -/
@[simps!]
def shiftFunctorAdd' (n₁ n₂ n₁₂ : ℤ) (h : n₁ + n₂ = n₁₂) :
    shiftFunctor C n₁₂ ≅ shiftFunctor C n₁ ⋙ shiftFunctor C n₂

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(n₁ n₂ n₁₂ : ℤ)
(h : n₁ + n₂ = n₁₂)
(X : CochainComplex C ℤ)
(i : ℤ)

((CochainComplex.shiftFunctorAdd' C n₁ n₂ n₁₂ h).inv.app X).f i = (HomologicalComplex.XIsoOfEq X ⋯).inv


theorem singleton_sub_eq (a : A) (r : R) : {r} - σ a = σ (↑ₐ r - a)

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
(a : A)
(r : R)

{r} - spectrum R a = spectrum R ((algebraMap R A) r - a)


theorem congr_right (h₁ : LeftInvOn f₁' f₁ s) (heq : EqOn f₁ f₂ s) : LeftInvOn f₁' f₂ s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f₁ f₂ : α → β}
{f₁' : β → α}
(h₁ : Set.LeftInvOn f₁' f₁ s)
(heq : Set.EqOn f₁ f₂ s)


@[simp]
theorem mem_image₂ : c ∈ image₂ f s t ↔ ∃ a ∈ s, ∃ b ∈ t, f a b = c

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

c ∈ Finset.image₂ f s t ↔ ∃ a ∈ s, ∃ b ∈ t, f a b = c


theorem hasBasis_nhds_zero_of_basis [TopologicalSpace F] [TopologicalAddGroup F]
    {ι : Type*} (𝔖 : Set (Set E)) (h𝔖₁ : 𝔖.Nonempty) (h𝔖₂ : DirectedOn (· ⊆ ·) 𝔖) {p : ι → Prop}
    {b : ι → Set F} (h : (𝓝 0 : Filter F).HasBasis p b) :
    (𝓝 (0 : UniformConvergenceCLM σ F 𝔖)).HasBasis
      (fun Si : Set E × ι => Si.1 ∈ 𝔖 ∧ p Si.2)
      fun Si => { f : E →SL[σ] F | ∀ x ∈ Si.1, f x ∈ b Si.2 }

(σ : 𝕜₁ →+* 𝕜₂)

(h𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖)

(𝓝 0).HasBasis (fun Si => Si.1 ∈ 𝔖 ∧ p Si.2) fun Si => {f | ∀ x ∈ Si.1, f x ∈ b Si.2}


@[simp, norm_cast] lemma cast_neg (q : ℚ) : ↑(-q) = (-q : α)


theorem isPartitionDisjUnionOfEqDiff (h : π₂.iUnion = ↑I \ π₁.iUnion) :
    IsPartition (π₁.disjUnion π₂ <| h.symm ▸ disjoint_sdiff_self_right)

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{π₁ π₂ : BoxIntegral.Prepartition I}
(h : π₂.iUnion = ↑I \ π₁.iUnion)


@[to_additive lipschitzWith_one_norm]
theorem lipschitzWith_one_norm' : LipschitzWith 1 (norm : E → ℝ)


@[to_additive]
theorem mem_rightTransversals_iff_existsUnique_quotient_mk''_eq :
    S ∈ rightTransversals (H : Set G) ↔
      ∀ q : Quotient (QuotientGroup.rightRel H), ∃! s : S, Quotient.mk'' s.1 = q

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}
{S : Set G}

S ∈ AddSubgroup.rightTransversals ↑H ↔ ∀ (q : Quotient (QuotientAddGroup.rightRel H)), ∃! s, Quotient.mk'' ↑s = q


lemma pi {J : Type w} {C : J → Type u} {D : J → Type u'}
    [∀ j, Category.{v} (C j)] [∀ j, Category.{v'} (D j)]
    (W : ∀ j, MorphismProperty (C j)) (F : ∀ j, C j ⥤ D j)
    (hF : ∀ j, (W j).IsInvertedBy (F j)) :
    (MorphismProperty.pi W).IsInvertedBy (Functor.pi F)

[(j : J) → CategoryTheory.Category.{v, u} (C j)]

[(j : J) → CategoryTheory.Category.{v', u'} (D j)]

(W : (j : J) → CategoryTheory.MorphismProperty (C j))

(F : (j : J) → CategoryTheory.Functor (C j) (D j))

(hF : ∀ (j : J), (W j).IsInvertedBy (F j))

(CategoryTheory.MorphismProperty.pi W).IsInvertedBy (CategoryTheory.Functor.pi F)


theorem rootSet_def (p : T[X]) (S) [CommRing S] [IsDomain S] [Algebra T S] [DecidableEq S] :
    p.rootSet S = (p.aroots S).toFinset

{T : Type w}
[CommRing T]
(p : Polynomial T)
(S : Type u_1)
[CommRing S]
[IsDomain S]
[Algebra T S]
[DecidableEq S]


theorem repr_symm_single_one : b.repr.symm (Finsupp.single i 1) = b i

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


lemma iInf_sigma' {κ : β → Type*} (f : ∀ i, κ i → α) :
    (⨅ i, ⨅ j, f i j) = ⨅ x : Σ i, κ i, f x.1 x.2

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{κ : β → Type u_9}
(f : (i : β) → κ i → α)


theorem not_implies_eq : (¬ (p → q)) = (p ∧ ¬ q)


theorem IsOpen.and : IsOpen { x | p₁ x } → IsOpen { x | p₂ x } → IsOpen { x | p₁ x ∧ p₂ x }

{X : Type u}
{p₁ p₂ : X → Prop}
[TopologicalSpace X]

IsOpen {x | p₁ x} → IsOpen {x | p₂ x} → IsOpen {x | p₁ x ∧ p₂ x}


theorem map_map [CommSemiring S₂] (g : S₁ →+* S₂) (p : MvPolynomial σ R) :
    map g (map f p) = map (g.comp f) p

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

(MvPolynomial.map g) ((MvPolynomial.map f) p) = (MvPolynomial.map (g.comp f)) p


theorem sub_mul_div (x n p : Nat) (h₁ : n*p ≤ x) : (x - n*p) / n = x / n - p


theorem natDegree_modByMonic_lt (p : R[X]) {q : R[X]} (hmq : Monic q) (hq : q ≠ 1) :
    natDegree (p %ₘ q) < q.natDegree

{R : Type u}
[Ring R]
(p : R[X])
{q : R[X]}
(hmq : q.Monic)
(hq : q ≠ 1)


@[to_additive]
theorem finprod_dmem {s : Set α} [DecidablePred (· ∈ s)] (f : ∀ a : α, a ∈ s → M) :
    (∏ᶠ (a : α) (h : a ∈ s), f a h) = ∏ᶠ (a : α) (_ : a ∈ s), if h' : a ∈ s then f a h' else 1

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
{s : Set α}
[DecidablePred fun x => x ∈ s]
(f : (a : α) → a ∈ s → M)

∑ᶠ (a : α) (h : a ∈ s), f a h = ∑ᶠ (a : α) (_ : a ∈ s), if h' : a ∈ s then f a h' else 0


@[to_additive]
theorem le_of_mul_le_of_one_le_left [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (h : a * b ≤ c)
    (hle : 1 ≤ b) :
    a ≤ c

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


theorem isGLB_sInf (S : Set (Subfield K)) : IsGLB S (sInf S)

{K : Type u}
[DivisionRing K]
(S : Set (Subfield K))


theorem lof_eq_of (i : ι) (b : M i) : lof R ι M i b = of M i b

(R : Type u)
[Semiring R]
(ι : Type v)
[dec_ι : DecidableEq ι]
(M : ι → Type w)
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
(i : ι)
(b : M i)

(DirectSum.lof R ι M i) b = (DirectSum.of M i) b


lemma snoc_zero {α : Type*} (p : Fin 0 → α) (x : α) :
    Fin.snoc p x = fun _ ↦ x


theorem lt_imp_lt_of_le_imp_le {β} [LinearOrder α] [Preorder β] {a b : α} {c d : β}
    (H : a ≤ b → c ≤ d) (h : d < c) : b < a

{α : Type u_2}
{β : Type u_5}
[LinearOrder α]
[Preorder β]
{a b : α}
{c d : β}
(H : a ≤ b → c ≤ d)
(h : d < c)


theorem subset_span_trans {S T U : Set (ℙ K V)} (hST : S ⊆ span T) (hTU : T ⊆ span U) :
    S ⊆ span U

(hST : S ⊆ ↑(Projectivization.Subspace.span T))

(hTU : T ⊆ ↑(Projectivization.Subspace.span U))


theorem Measurable.comp_nullMeasurable {g : β → γ} (hg : Measurable g) (hf : NullMeasurable f μ) :
    NullMeasurable (g ∘ f) μ

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[MeasurableSpace α]
[MeasurableSpace β]
[MeasurableSpace γ]
{f : α → β}
{μ : MeasureTheory.Measure α}
{g : β → γ}
(hg : Measurable g)
(hf : MeasureTheory.NullMeasurable f μ)


@[ext]
theorem coeff_inj : Function.Injective (coeff : HVertexOperator Γ R V W → Γ → (V →ₗ[R] W))

{Γ : Type u_1}
[PartialOrder Γ]
{R : Type u_2}
{V : Type u_3}
{W : Type u_4}
[CommRing R]
[AddCommGroup V]
[Module R V]
[AddCommGroup W]
[Module R W]


@[simp]
theorem minimum_nil : minimum ([] : List α) = ⊤

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]


theorem pseudoEqual_symm {P : C} : Symmetric (PseudoEqual P)

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


@[to_additive]
theorem IsCyclic.card_orderOf_eq_totient [IsCyclic α] [Fintype α] {d : ℕ}
    (hd : d ∣ Fintype.card α) : (univ.filter fun a : α => orderOf a = d).card = totient d

{α : Type u}
[Group α]
[IsCyclic α]
[Fintype α]
{d : ℕ}
(hd : d ∣ Fintype.card α)

(Finset.filter (fun a => orderOf a = d) Finset.univ).card = d.totient


@[simp]
theorem Real.Angle.expMapCircle_zero : Real.Angle.expMapCircle 0 = 1


@[to_additive]
lemma IsFundamentalDomain.quotientMeasure_eq [Countable G] [MeasurableSpace G] {s t : Set α}
    [SMulInvariantMeasure G α μ] [MeasurableSMul G α] (fund_dom_s : IsFundamentalDomain G s μ)
    (fund_dom_t : IsFundamentalDomain G t μ) :
    (μ.restrict s).map π = (μ.restrict t).map π

[MeasureTheory.VAddInvariantMeasure G α μ]

(fund_dom_s : MeasureTheory.IsAddFundamentalDomain G s μ)

(fund_dom_t : MeasureTheory.IsAddFundamentalDomain G t μ)

MeasureTheory.Measure.map (Quotient.mk (AddAction.orbitRel G α)) (μ.restrict s) =
  MeasureTheory.Measure.map (Quotient.mk (AddAction.orbitRel G α)) (μ.restrict t)


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

{α : Type u_2}
(self : IndepMatroid α)
⦃I J : Set α⦄


theorem forall_true_iff' (h : ∀ a, p a ↔ True) : (∀ a, p a) ↔ True

{α : Sort u_1}
{p : α → Prop}
(h : ∀ (a : α), p a ↔ True)


@[to_additive]
theorem prod_univ_four [CommMonoid β] (f : Fin 4 → β) : ∏ i, f i = f 0 * f 1 * f 2 * f 3

{β : Type u_2}
[AddCommMonoid β]
(f : Fin 4 → β)

∑ i : Fin 4, f i = f 0 + f 1 + f 2 + f 3


lemma iSup_coe_lt_top : ⨆ i, (f i : ℕ∞) < ⊤ ↔ BddAbove (range f)

⨆ i, ↑(f i) < ⊤ ↔ BddAbove (Set.range f)


/-- If `ringChar F` is odd, then `quadraticCharFun F a` can be computed in
terms of `a ^ (Fintype.card F / 2)`. -/
theorem quadraticCharFun_eq_pow_of_char_ne_two (hF : ringChar F ≠ 2) {a : F} (ha : a ≠ 0) :
    quadraticCharFun F a = if a ^ (Fintype.card F / 2) = 1 then 1 else -1

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
(hF : ringChar F ≠ 2)
{a : F}
(ha : a ≠ 0)


/-- `X` is a non-Lindelöf topological space if it is not a Lindelöf space. -/
class NonLindelofSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- In a non-Lindelöf space, `Set.univ` is not a Lindelöf set. -/
  nonLindelof_univ : ¬IsLindelof (univ : Set X)

{X : Type u_2}
[TopologicalSpace X]
[self : NonLindelofSpace X]


/-- `x ↦ x⁻¹` as an order-reversing equivalence. -/
@[to_additive (attr := simps!) "`x ↦ -x` as an order-reversing equivalence."]
def OrderIso.inv : α ≃o αᵒᵈ

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

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

∀ (a : α), (OrderIso.inv α) a = OrderDual.toDual a⁻¹


/-- A continuous function with compact support is bounded above. -/
@[to_additive " A continuous function with compact support is bounded above. "]
theorem Continuous.bddAbove_range_of_hasCompactMulSupport [ClosedIciTopology α] [One α]
    {f : β → α} (hf : Continuous f) (h : HasCompactMulSupport f) : BddAbove (range f)

{α : Type u_2}
{β : Type u_3}
[LinearOrder α]
[TopologicalSpace α]
[TopologicalSpace β]
[ClosedIciTopology α]
[One α]
{f : β → α}
(hf : Continuous f)
(h : HasCompactMulSupport f)


/-- A product is regular if and only if the factors are. -/
@[to_additive "A sum is add-regular if and only if the summands are."]
theorem isRegular_mul_iff : IsRegular (a * b) ↔ IsRegular a ∧ IsRegular b

{R : Type u_1}
[AddCommSemigroup R]
{a b : R}

IsAddRegular (a + b) ↔ IsAddRegular a ∧ IsAddRegular b


@[simp]
theorem range_cons {α : Type*} {n : ℕ} (x : α) (b : Fin n → α) :
    Set.range (Fin.cons x b : Fin n.succ → α) = insert x (Set.range b)

{α : Type u_1}
{n : ℕ}
(x : α)
(b : Fin n → α)

Set.range (Fin.cons x b) = insert x (Set.range b)


@[simp]
theorem adjoin_span {s : Set A} : adjoin R (Submodule.span R s : Set A) = adjoin R s

(R : Type uR)
{A : Type uA}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{s : Set A}

Algebra.adjoin R ↑(Submodule.span R s) = Algebra.adjoin R s


/-- If `R` satisfies the rank condition,
then the cardinality of any basis is bounded by the cardinality of any spanning set.
-/
theorem Basis.le_span {J : Set M} (v : Basis ι R M) (hJ : span R J = ⊤) : #(range v) ≤ #J

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
{ι : Type w}
[RankCondition R]
{J : Set M}
(v : Basis ι R M)
(hJ : Submodule.span R J = ⊤)


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


theorem set_biUnion_union (s t : Finset α) (u : α → Set β) :
    ⋃ x ∈ s ∪ t, u x = (⋃ x ∈ s, u x) ∪ ⋃ x ∈ t, u x

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
(s t : Finset α)
(u : α → Set β)


lemma mapHomologicalComplexXIso_eq (n m : ℤ) (hnm : n + 1 = m) :
    mapHomologicalComplexXIso φ H n = mapHomologicalComplexXIso' φ H n m hnm

[HomologicalComplex.HasHomotopyCofiber ((H.mapHomologicalComplex (ComplexShape.up ℤ)).map φ)]

CochainComplex.mappingCone.mapHomologicalComplexXIso φ H n =
  CochainComplex.mappingCone.mapHomologicalComplexXIso' φ H n m hnm


theorem measurable_coe {s : Set α} (hs : MeasurableSet s) : Measurable fun μ : Measure α => μ s

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
(hs : MeasurableSet s)


@[simp]
theorem image_nonempty {f : α → β} {s : Set α} : (f '' s).Nonempty ↔ s.Nonempty

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


/-- **Squeeze theorem** (also known as **sandwich theorem**). This version assumes that inequalities
hold eventually for the filter. -/
theorem tendsto_of_tendsto_of_tendsto_of_le_of_le' [OrderTopology α] {f g h : β → α} {b : Filter β}
    {a : α} (hg : Tendsto g b (𝓝 a)) (hh : Tendsto h b (𝓝 a)) (hgf : ∀ᶠ b in b, g b ≤ f b)
    (hfh : ∀ᶠ b in b, f b ≤ h b) : Tendsto f b (𝓝 a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder α]
[OrderTopology α]
{f g h : β → α}
{b : Filter β}
{a : α}
(hg : Filter.Tendsto g b (𝓝 a))
(hh : Filter.Tendsto h b (𝓝 a))
(hgf : ∀ᶠ (b : β) in b, g b ≤ f b)
(hfh : ∀ᶠ (b : β) in b, f b ≤ h b)


/-- `quotientMap` applied to maximal ideals of a localization is `surjective`.
  The quotient by a maximal ideal is a field, so inverses to elements already exist,
  and the localization necessarily maps the equivalence class of the inverse in the localization -/
theorem surjective_quotientMap_of_maximal_of_localization {I : Ideal S} [I.IsPrime] {J : Ideal R}
    {H : J ≤ I.comap (algebraMap R S)} (hI : (I.comap (algebraMap R S)).IsMaximal) :
    Function.Surjective (Ideal.quotientMap I (algebraMap R S) H)

{H : J ≤ Ideal.comap (algebraMap R S) I}

(hI : (Ideal.comap (algebraMap R S) I).IsMaximal)

Function.Surjective ⇑(Ideal.quotientMap I (algebraMap R S) H)


theorem IsLocalExtrOn.inter (hf : IsLocalExtrOn f s a) (t) : IsLocalExtrOn f (s ∩ t) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsLocalExtrOn f s a)
(t : Set α)


@[simp]
theorem pred_eq_pred : Order.pred = pred


theorem AntisymmRel.trans_wcovBy (hab : AntisymmRel (· ≤ ·) a b) (hbc : b ⩿ c) : a ⩿ c

(hab : AntisymmRel (fun x x_1 => x ≤ x_1) a b)


/-- Order equipped with a sensible predecessor function. -/
@[ext]
class PredOrder (α : Type*) [Preorder α] where
  /-- Predecessor function-/
  pred : α → α
  /-- Proof of basic ordering with respect to `pred`-/
  pred_le : ∀ a, pred a ≤ a
  /-- Proof of interaction between `pred` and minimal element-/
  min_of_le_pred {a} : a ≤ pred a → IsMin a
  /-- Proof that `pred` satisfies ordering invariants between `LT` and `LE`-/
  le_pred_of_lt {a b} : a < b → a ≤ pred b
  /-- Proof that `pred` satisfies ordering invariants between `LE` and `LT`-/
  le_of_pred_lt {a b} : pred a < b → a ≤ b

{α : Type u_3}
[Preorder α]
[self : PredOrder α]
(a : α)


theorem ne_iff_vne (a b : Fin n) : a ≠ b ↔ a.1 ≠ b.1

a ≠ b ↔ ↑a ≠ ↑b


theorem Eq.mpr_not  {p q : Prop} (h₁ : p = q) (h₂ : ¬q) : ¬p


theorem ex_dioph {S : Set (α ⊕ β → ℕ)} : Dioph S → Dioph {v | ∃ x, v ⊗ x ∈ S}


/-- A subsemiring is closed under multiplication. -/
protected theorem mul_mem {x y : R} : x ∈ s → y ∈ s → x * y ∈ s

{R : Type u}
[NonAssocSemiring R]
(s : Subsemiring R)
{x y : R}


@[simp]
theorem X_inv (s : σ) : (X s : MvPowerSeries σ k)⁻¹ = 0

{σ : Type u_1}
{k : Type u_3}
[Field k]
(s : σ)


theorem isLeftDescent_iff_not_isLeftDescent_mul {w : W} {i : B} :
    cs.IsLeftDescent w i ↔ ¬cs.IsLeftDescent (s i * w) i

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
{w : W}
{i : B}

cs.IsLeftDescent w i ↔ ¬cs.IsLeftDescent (cs.simple i * w) i


theorem Bounded.of_gt :
    ∀ {t o₁ o₂} {x : α}, Bounded t o₁ o₂ → Bounded nil x o₂ → All (· > x) t → Bounded t x o₂

{α : Type u_1}
[Preorder α]
{t : Ordnode α}
{o₁ : WithBot α}
{o₂ : WithTop α}
{x : α}

t.Bounded o₁ o₂ → Ordnode.nil.Bounded (↑x) o₂ → Ordnode.All (fun x_1 => x_1 > x) t → t.Bounded (↑x) o₂


/-- If `t` is a subset of `s`, except for one point,
then `insert x s` is a neighborhood of `x` within `t`. -/
theorem insert_mem_nhdsWithin_of_subset_insert [T1Space X] {x y : X} {s t : Set X}
    (hu : t ⊆ insert y s) : insert x s ∈ 𝓝[t] x

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{x y : X}
{s t : Set X}
(hu : t ⊆ insert y s)


/-- A function is `C^(n + 1)` on an open domain if and only if it is
differentiable there, and its derivative (expressed with `fderiv`) is `C^n`. -/
theorem contDiffOn_succ_iff_fderiv_of_isOpen {n : ℕ} (hs : IsOpen s) :
    ContDiffOn 𝕜 (n + 1 : ℕ) f s ↔
      DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 n (fun y => fderiv 𝕜 f y) s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{n : ℕ}
(hs : IsOpen s)

ContDiffOn 𝕜 (↑(n + 1)) f s ↔ DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 (↑n) (fun y => fderiv 𝕜 f y) s


theorem antitone_dual_iff : Antitone (toDual ∘ f ∘ ofDual : αᵒᵈ → βᵒᵈ) ↔ Antitone f

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

Antitone (⇑OrderDual.toDual ∘ f ∘ ⇑OrderDual.ofDual) ↔ Antitone f


lemma dirSupInacc_iff_forall_sSup :
    DirSupInacc s ↔ ∀ ⦃d⦄, d.Nonempty → DirectedOn (· ≤ ·) d → sSup d ∈ s → (d ∩ s).Nonempty

{α : Type u_1}
[CompleteLattice α]
{s : Set α}

DirSupInacc s ↔ ∀ ⦃d : Set α⦄, d.Nonempty → DirectedOn (fun x x_1 => x ≤ x_1) d → sSup d ∈ s → (d ∩ s).Nonempty


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

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

(Matrix.blockDiagAddMonoidHom m n o α) M k = M.blockDiag k


theorem iterate_monotone (n : ℕ) : Monotone fun f : CircleDeg1Lift => f^[n]


lemma HasGoodTrifunctor₂₃Obj.hasMap :
    HasMap ((((mapTrifunctor (bifunctorComp₂₃ F G₂₃) I₁ I₂ I₃).obj X₁).obj X₂).obj X₃) r

(F : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂₃ C₄))

(G₂₃ : CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₂₃))

(ρ₂₃ : CategoryTheory.GradedObject.BifunctorComp₂₃IndexData r)

{X₁ : CategoryTheory.GradedObject I₁ C₁}

{X₂ : CategoryTheory.GradedObject I₂ C₂}

{X₃ : CategoryTheory.GradedObject I₃ C₃}

[(((CategoryTheory.GradedObject.mapBifunctor G₂₃ I₂ I₃).obj X₂).obj X₃).HasMap ρ₂₃.p]

[(((CategoryTheory.GradedObject.mapBifunctor F I₁ ρ₂₃.I₂₃).obj X₁).obj
        (CategoryTheory.GradedObject.mapBifunctorMapObj G₂₃ ρ₂₃.p X₂ X₃)).HasMap
    ρ₂₃.q]

[H : CategoryTheory.GradedObject.HasGoodTrifunctor₂₃Obj F G₂₃ ρ₂₃ X₁ X₂ X₃]

((((CategoryTheory.GradedObject.mapTrifunctor (CategoryTheory.bifunctorComp₂₃ F G₂₃) I₁ I₂ I₃).obj X₁).obj X₂).obj
      X₃).HasMap
  r


@[simp, nolint unusedHavesSuffices]
theorem mem_support_append_iff {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w) :
    t ∈ (p.append p').support ↔ t ∈ p.support ∨ t ∈ p'.support

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


@[to_additive continuous_of_continuousAt_zero₂]
theorem continuous_of_continuousAt_one₂ {H M : Type*} [CommMonoid M] [TopologicalSpace M]
    [ContinuousMul M] [Group H] [TopologicalSpace H] [TopologicalGroup H] (f : G →* H →* M)
    (hf : ContinuousAt (fun x : G × H ↦ f x.1 x.2) (1, 1))
    (hl : ∀ x, ContinuousAt (f x) 1) (hr : ∀ y, ContinuousAt (f · y) 1) :
    Continuous (fun x : G × H ↦ f x.1 x.2)

(hf : ContinuousAt (fun x => (f x.1) x.2) (0, 0))

(hl : ∀ (x : G), ContinuousAt (⇑(f x)) 0)

(hr : ∀ (y : H), ContinuousAt (fun x => (f x) y) 0)


theorem prod_mono_left (t : Subsemiring S) : Monotone fun s : Subsemiring R => s.prod t

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
(t : Subsemiring S)


/-- **Liouville's theorem**: a complex differentiable bounded function is a constant. -/
theorem exists_const_forall_eq_of_bounded {f : E → F} (hf : Differentiable ℂ f)
    (hb : IsBounded (range f)) : ∃ c, ∀ z, f z = c

(hb : Bornology.IsBounded (Set.range f))


@[bv_toNat] theorem lt_def (x y : BitVec n) :
  x < y ↔ x.toNat < y.toNat


theorem fderivWithin_id (hxs : UniqueDiffWithinAt 𝕜 s x) : fderivWithin 𝕜 id s x = id 𝕜 E

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
(hxs : UniqueDiffWithinAt 𝕜 s x)

fderivWithin 𝕜 id s x = ContinuousLinearMap.id 𝕜 E


@[simp]
theorem preimage_sub_const_Ici : (fun x => x - a) ⁻¹' Ici b = Ici (b + a)

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

(fun x => x - a) ⁻¹' Set.Ici b = Set.Ici (b + a)


theorem iff_def  : (a ↔ b) ↔ (a → b) ∧ (b → a)


nonrec theorem IsLocalMinOn.sup (hf : IsLocalMinOn f s a) (hg : IsLocalMinOn g s a) :
    IsLocalMinOn (fun x => f x ⊔ g x) s a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SemilatticeSup β]
{f g : α → β}
{a : α}
{s : Set α}
(hf : IsLocalMinOn f s a)
(hg : IsLocalMinOn g s a)


/-- An equality of subobjects gives an isomorphism of the corresponding objects.
(One could use `underlying.mapIso (eqToIso h))` here, but this is more readable.) -/
@[simps]
def isoOfEq {B : C} (X Y : Subobject B) (h : X = Y) : (X : C) ≅ (Y : C)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{B : C}
(X Y : CategoryTheory.Subobject B)
(h : X = Y)


theorem hIterate_eq {P : Nat → Sort _} (state : ∀(i : Nat), P i)
    {n : Nat} (f : ∀(i : Fin n), P i.val → P (i.val+1)) (s : P 0)
    (init : s = state 0)
    (step : ∀(i : Fin n), f i (state i) = state (i+1)) :
    hIterate P s f = state n

(step : ∀ (i : Fin n), f i (state ↑i) = state (↑i + 1))


theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj' (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms

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

CategoryTheory.Projective P ↔ (CategoryTheory.preadditiveCoyoneda.obj (Opposite.op P)).PreservesEpimorphisms


@[reassoc (attr := simp)]
theorem comp_coconePointUniqueUpToIso_hom {s t : Cocone F} (P : IsColimit s) (Q : IsColimit t)
    (j : J) : s.ι.app j ≫ (coconePointUniqueUpToIso P Q).hom = t.ι.app j

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{s t : CategoryTheory.Limits.Cocone F}
(P : CategoryTheory.Limits.IsColimit s)
(Q : CategoryTheory.Limits.IsColimit t)
(j : J)

s.ι.app j ≫ (P.coconePointUniqueUpToIso Q).hom = t.ι.app j


@[simp 1100]
theorem map_id_obj_unop (U : (Opens X)ᵒᵖ) : (map (𝟙 X)).obj (unop U) = unop U

{X : TopCat}
(U : (TopologicalSpace.Opens ↑X)ᵒᵖ)

(TopologicalSpace.Opens.map (𝟙 X)).obj (Opposite.unop U) = Opposite.unop U


theorem support_scaleRoots_eq (p : R[X]) {s : R} (hs : s ∈ nonZeroDivisors R) :
    (scaleRoots p s).support = p.support

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


@[simp, norm_cast]
theorem coe_smul {_m : MeasurableSpace α} (c : R) (μ : Measure α) : ⇑(c • μ) = c • ⇑μ

{α : Type u_1}
{R : Type u_6}
[SMul R ENNReal]
[IsScalarTower R ENNReal ENNReal]
{_m : MeasurableSpace α}
(c : R)
(μ : MeasureTheory.Measure α)

⇑(c • μ) = c • ⇑μ


theorem ciSup_set_le_iff {ι : Type*} {s : Set ι} {f : ι → α} {a : α} (hs : s.Nonempty)
    (hf : BddAbove (f '' s)) : ⨆ i : s, f i ≤ a ↔ ∀ i ∈ s, f i ≤ a

{α : Type u_1}
[ConditionallyCompleteLattice α]
{ι : Type u_5}
{s : Set ι}
{f : ι → α}
{a : α}
(hs : s.Nonempty)
(hf : BddAbove (f '' s))


@[simp]
theorem norm_prod (s : Finset β) (f : β → α) : ‖∏ b ∈ s, f b‖ = ∏ b ∈ s, ‖f b‖

{α : Type u_1}
{β : Type u_2}
[NormedField α]
(s : Finset β)
(f : β → α)


@[simp] lemma tensorComm_symm (Q₁ : QuadraticForm R M₁) (Q₂ : QuadraticForm R M₂) :
    (tensorComm Q₁ Q₂).symm = tensorComm Q₂ Q₁

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

(Q₁.tensorComm Q₂).symm = Q₂.tensorComm Q₁


/-- If a direct sum of submodules is internal then the submodules span the module. -/
theorem IsInternal.submodule_iSup_eq_top (h : IsInternal A) : iSup A = ⊤

{R : Type u}
[Semiring R]
{ι : Type v}
[dec_ι : DecidableEq ι]
{M : Type u_1}
[AddCommMonoid M]
[Module R M]
{A : ι → Submodule R M}
(h : DirectSum.IsInternal A)


theorem dot_sdiv_left (xs ys : Coeffs) {d : Int} (h : d ∣ xs.gcd) :
    dot (xs.sdiv d) ys = (dot xs ys) / d

(xs ys : Lean.Omega.Coeffs)
{d : Int}
(h : d ∣ ↑xs.gcd)


@[simp] lemma mem_carrier : a ∈ L.carrier ↔ a ∈ L

{α : Type u_2}
[Lattice α]
{L : Sublattice α}
{a : α}


theorem dlookup_kinsert_ne {a a'} {b' : β a'} {l : List (Sigma β)} (h : a ≠ a') :
    dlookup a (kinsert a' b' l) = dlookup a l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a a' : α}
{b' : β a'}
{l : List (Sigma β)}
(h : a ≠ a')

List.dlookup a (List.kinsert a' b' l) = List.dlookup a l


@[simp]
theorem refl_toEquiv : (refl α).toEquiv = Equiv.refl α

(OrderIso.refl α).toEquiv = Equiv.refl α


@[simp]
theorem getElem?_set_eq' (a : α) (n) (l : List α) : (set l n a)[n]? = (fun _ => a) <$> l[n]?

{α : Type u_1}
(a : α)
(n : Nat)
(l : List α)


@[simp]
theorem splitLower_eq_bot {i x} : I.splitLower i x = ⊥ ↔ x ≤ I.lower i

{ι : Type u_1}
{I : BoxIntegral.Box ι}
{i : ι}
{x : ℝ}


@[simp] lemma ofNat_eq_ofENat {m : ℕ} {n : ℕ∞} [m.AtLeastTwo] :
    no_index (OfNat.ofNat m) = (n : Cardinal) ↔ OfNat.ofNat m = n


@[to_additive top_prod]
theorem top_prod (s : Subsemigroup N) : (⊤ : Subsemigroup M).prod s = s.comap (MulHom.snd M N)

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(s : AddSubsemigroup N)

⊤.prod s = AddSubsemigroup.comap (AddHom.snd M N) s


@[to_additive]
theorem mul_def (x y : S) : x * y = ⟨x * y, S.mul_mem x.2 y.2⟩

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


/-- `Finsupp.split` is a linear equivalence between `(Σ i, η i) →₀ N` and `Π₀ i, (η i →₀ N)`. -/
@[simps]
def sigmaFinsuppLequivDFinsupp [AddCommMonoid N] [Module R N] :
    ((Σi, η i) →₀ N) ≃ₗ[R] Π₀ i, η i →₀ N

{ι : Type u_1}
(R : Type u_2)
{η : ι → Type u_4}
{N : Type u_5}
[Semiring R]
[AddCommMonoid N]
[Module R N]
(a : (i : ι) × η i →₀ N)

(sigmaFinsuppLequivDFinsupp R) a = sigmaFinsuppEquivDFinsupp a


theorem map_frobeniusPoly (n : ℕ) :
    MvPolynomial.map (Int.castRingHom ℚ) (frobeniusPoly p n) = frobeniusPolyRat p n

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

(MvPolynomial.map (Int.castRingHom ℚ)) (WittVector.frobeniusPoly p n) = WittVector.frobeniusPolyRat p n


/-- The natural isomorphism from the composition of restrictions along homomorphisms
to the restriction along the composition of homomorphism.
-/
@[simps!]
def resComp {G H K : MonCat} (f : G ⟶ H) (g : H ⟶ K) : res V g ⋙ res V f ≅ res V (f ≫ g)

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
{G H K : MonCat}
(f : G ⟶ H)
(g : H ⟶ K)
(X : Action V K)

((Action.resComp V f g).inv.app X).hom = 𝟙 X.V


theorem pure_le_nhdsWithin {a : α} {s : Set α} (ha : a ∈ s) : pure a ≤ 𝓝[s] a

{α : Type u_1}
[TopologicalSpace α]
{a : α}
{s : Set α}
(ha : a ∈ s)


theorem closure.isSubring : IsSubring (closure s)


theorem sub_submartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
    (hf : Supermartingale f ℱ μ) (hg : Submartingale g ℱ μ) : Supermartingale (f - g) ℱ μ

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

(hf : MeasureTheory.Supermartingale f ℱ μ)

(hg : MeasureTheory.Submartingale g ℱ μ)

MeasureTheory.Supermartingale (f - g) ℱ μ


@[simp]
lemma smul_def (T : CentroidHom α) (a : α) : T • a = T a

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


lemma IsStableUnderLimitsOfShape.lim_map {J : Type*} [Category J]
    (hW : W.IsStableUnderLimitsOfShape J) {X Y : J ⥤ C}
    (f : X ⟶ Y) [HasLimitsOfShape J C] (hf : W.functorCategory _ f) :
    W (lim.map f)


@[simp]
theorem powerSeriesPart_coeff (x : LaurentSeries R) (n : ℕ) :
    PowerSeries.coeff R n x.powerSeriesPart = x.coeff (x.order + n)

{R : Type u_1}
[Semiring R]
(x : LaurentSeries R)
(n : ℕ)

(PowerSeries.coeff R n) x.powerSeriesPart = x.coeff (HahnSeries.order x + ↑n)


theorem ContMDiffAt.congr_of_eventuallyEq (h : ContMDiffAt I I' n f x) (h₁ : f₁ =ᶠ[𝓝 x] f) :
    ContMDiffAt I I' n f₁ x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f f₁ : M → M'}
{x : M}
{n : ℕ∞}
(h : ContMDiffAt I I' n f x)
(h₁ : f₁ =ᶠ[𝓝 x] f)


/-- If two functions `g` and `f` are analytic respectively on `s.image f` and `s`, then `g ∘ f` is
analytic on `s`. -/
theorem AnalyticOn.comp' {s : Set E} {g : F → G} {f : E → F} (hg : AnalyticOn 𝕜 g (s.image f))
    (hf : AnalyticOn 𝕜 f s) : AnalyticOn 𝕜 (g ∘ f) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{g : F → G}
{f : E → F}
(hg : AnalyticOn 𝕜 g (f '' s))
(hf : AnalyticOn 𝕜 f s)


theorem LinearMap.exists_rightInverse_of_surjective (f : V →ₗ[K] V') (hf_surj : range f = ⊤) :
    ∃ g : V' →ₗ[K] V, f.comp g = LinearMap.id

{K : Type u_3}
{V : Type u_4}
{V' : Type u_5}
[DivisionRing K]
[AddCommGroup V]
[AddCommGroup V']
[Module K V]
[Module K V']
(f : V →ₗ[K] V')
(hf_surj : LinearMap.range f = ⊤)


/-- `p → p` -/
@[simp]
theorem himp_self : a ⇨ a = ⊤

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


@[simp]
theorem tail_val : ∀ v : Vector α n.succ, v.tail.val = v.val.tail

{n : ℕ}
{α : Type u_1}
(v : Mathlib.Vector α n.succ)


theorem append_reverse (l : List α) : Palindrome (l ++ reverse l)


theorem pmap_eq_none_iff {h} : pmap f x h = none ↔ x = none

{α : Type u_1}
{β : Type u_2}
{p : α → Prop}
{f : (a : α) → p a → β}
{x : Option α}
{h : ∀ (a : α), a ∈ x → p a}


/-- A homeomorphism of spaces gives an equivalence of categories of presheaves. -/
@[simps!]
def presheafEquivOfIso {X Y : TopCat} (H : X ≅ Y) : X.Presheaf C ≌ Y.Presheaf C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{X Y : TopCat}
(H : X ≅ Y)

∀ (X_1 : (TopologicalSpace.Opens ↑Y)ᵒᵖ ⥤ C) (X_2 : (TopologicalSpace.Opens ↑Y)ᵒᵖ),
  ((TopCat.Presheaf.presheafEquivOfIso C H).counitIso.hom.app X_1).app X_2 = X_1.map (CategoryTheory.eqToHom ⋯)


lemma lawsonClosed_of_lowerClosed (s : Set α) (h : IsClosed (WithLower.ofLower ⁻¹' s)) :
    IsClosed (WithLawson.ofLawson ⁻¹' s)

(h : IsClosed (⇑Topology.WithLower.ofLower ⁻¹' s))

IsClosed (⇑Topology.WithLawson.ofLawson ⁻¹' s)


/-- Two `ConvexCone`s are equal if they have the same elements. -/
@[ext]
theorem ext {S T : ConvexCone 𝕜 E} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{S T : ConvexCone 𝕜 E}
(h : ∀ (x : E), x ∈ S ↔ x ∈ T)


theorem fderivWithin_cos (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    fderivWithin ℝ (fun x => Real.cos (f x)) s x = -Real.sin (f x) • fderivWithin ℝ f s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{x : E}
{s : Set E}
(hf : DifferentiableWithinAt ℝ f s x)
(hxs : UniqueDiffWithinAt ℝ s x)


lemma IsCondKernelCDF.nonneg (hf : IsCondKernelCDF f κ ν) (p : α × β) (x : ℝ) : 0 ≤ f p x

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

(hf : ProbabilityTheory.IsCondKernelCDF f κ ν)


@[simp]
theorem norm_mul (n m : ℤ√d) : norm (n * m) = norm n * norm m


theorem image_upperBounds_subset_upperBounds_image (Hf : MonotoneOn f t) (Hst : s ⊆ t) :
    f '' (upperBounds s ∩ t) ⊆ upperBounds (f '' s)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{s t : Set α}
(Hf : MonotoneOn f t)
(Hst : s ⊆ t)


/-- Bisimulation principle using `map` and `Quot.mk` to match and relate children of two trees. -/
theorem Cofix.bisim_rel {α : TypeVec n} (r : Cofix F α → Cofix F α → Prop)
    (h : ∀ x y, r x y →
      appendFun id (Quot.mk r) <$$> Cofix.dest x = appendFun id (Quot.mk r) <$$> Cofix.dest y) :
    ∀ x y, r x y → x = y

(r : MvQPF.Cofix F α → MvQPF.Cofix F α → Prop)

(h : ∀ (x y : MvQPF.Cofix F α), r x y → (TypeVec.id ::: Quot.mk r) <$$> x.dest = (TypeVec.id ::: Quot.mk r) <$$> y.dest)


@[simp]
theorem eval_C {c : K} : eval f a (C c) = f c

{K : Type u}
[Field K]
{L : Type u}
[Field L]
(f : K →+* L)
(a : L)
{c : K}


theorem card_support_eq_zero {f : Perm α} : f.support.card = 0 ↔ f = 1

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{f : Equiv.Perm α}


@[simp]
theorem not_frequently {p : α → Prop} {f : Filter α} : (¬∃ᶠ x in f, p x) ↔ ∀ᶠ x in f, ¬p x

{α : Type u}
{p : α → Prop}
{f : Filter α}

(¬∃ᶠ (x : α) in f, p x) ↔ ∀ᶠ (x : α) in f, ¬p x


theorem ConcaveOn.lt_right_of_left_lt (hf : ConcaveOn 𝕜 s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s)
    (hz : z ∈ openSegment 𝕜 x y) (hxz : f z < f x) : f y < f z

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedCancelAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConcaveOn 𝕜 s f)
{x y z : E}
(hx : x ∈ s)
(hy : y ∈ s)
(hz : z ∈ openSegment 𝕜 x y)
(hxz : f z < f x)


/-- See also `nonempty_fintype`, `nonempty_denumerable`. -/
theorem nonempty_encodable (α : Type*) [Countable α] : Nonempty (Encodable α)


theorem not_injective_of_ordinal_of_small {α : Type v} [Small.{u} α] (f : Ordinal.{u} → α) :
    ¬Injective f

{α : Type v}
[Small.{u, v} α]
(f : Ordinal.{u} → α)


theorem smul_apply (r : R) (f : A →+ B) (x : A) : (r • f) x = r • f x

{R : Type u_1}
{A : Type u_4}
{B : Type u_5}
[Monoid R]
[AddMonoid A]
[AddCommMonoid B]
[DistribMulAction R B]
(r : R)
(f : A →+ B)
(x : A)


theorem union_le_union_right (h : s ≤ t) (u) : s ∪ u ≤ t ∪ u

{α : Type u_1}
[DecidableEq α]
{s t : Multiset α}
(h : s ≤ t)
(u : Multiset α)


@[to_additive]
theorem mulIndicator_union_mul_inter_apply (f : α → M) (s t : Set α) (a : α) :
    mulIndicator (s ∪ t) f a * mulIndicator (s ∩ t) f a
      = mulIndicator s f a * mulIndicator t f a

{α : Type u_1}
{M : Type u_4}
[MulOneClass M]
(f : α → M)
(s t : Set α)
(a : α)

(s ∪ t).mulIndicator f a * (s ∩ t).mulIndicator f a = s.mulIndicator f a * t.mulIndicator f a


theorem encard_le_coe_iff {k : ℕ} : s.encard ≤ k ↔ s.Finite ∧ ∃ (n₀ : ℕ), s.encard = n₀ ∧ n₀ ≤ k

s.encard ≤ ↑k ↔ s.Finite ∧ ∃ n₀, s.encard = ↑n₀ ∧ n₀ ≤ k


/-- A `Finpartition` constructor which does not insist on `⊥` not being a part. -/
@[simps]
def ofErase [DecidableEq α] {a : α} (parts : Finset α) (sup_indep : parts.SupIndep id)
    (sup_parts : parts.sup id = a) : Finpartition a

{α : Type u_1}
[Lattice α]
[OrderBot α]
[DecidableEq α]
{a : α}
(parts : Finset α)
(sup_indep : parts.SupIndep id)
(sup_parts : parts.sup id = a)

(Finpartition.ofErase parts sup_indep sup_parts).parts = parts.erase ⊥


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

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


theorem DifferentiableOn.csinh (hc : DifferentiableOn ℂ f s) :
    DifferentiableOn ℂ (fun x => Complex.sinh (f x)) s

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


protected theorem Tendsto.eventually_ne_atTop [Preorder β] [NoMaxOrder β] {f : α → β} {l : Filter α}
    (hf : Tendsto f l atTop) (c : β) : ∀ᶠ x in l, f x ≠ c

{α : Type u_3}
{β : Type u_4}
[Preorder β]
[NoMaxOrder β]
{f : α → β}
{l : Filter α}
(hf : Filter.Tendsto f l Filter.atTop)
(c : β)


@[to_additive]
theorem mul_eq_one_iff_eq_inv {a : α} : a * u = 1 ↔ a = ↑u⁻¹

{α : Type u}
[AddMonoid α]
{u : AddUnits α}
{a : α}


@[to_additive (attr := simp)] lemma leOnePart_apply (f : ∀ i, α i) (i : ι) : f⁻ i = (f i)⁻

{ι : Type u_3}
{α : ι → Type u_4}
[(i : ι) → Lattice (α i)]
[(i : ι) → AddCommGroup (α i)]
(f : (i : ι) → α i)
(i : ι)


/-- If the sign of the angle between two vectors is negative, the second vector is nonzero. -/
theorem right_ne_zero_of_oangle_sign_eq_neg_one {x y : V} (h : (o.oangle x y).sign = -1) : y ≠ 0

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


/-- `AddMonoidAlgebra.gradeBy` describe an internally graded algebra. -/
theorem gradeBy.isInternal : DirectSum.IsInternal (gradeBy R f)

{M : Type u_1}
{ι : Type u_2}
{R : Type u_3}
[AddMonoid M]
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring R]
(f : M →+ ι)

DirectSum.IsInternal (AddMonoidAlgebra.gradeBy R ⇑f)


/-- The composition of maps which preserve multiplication, also preserves multiplication. -/
@[to_additive "The composition of addition preserving maps also preserves addition"]
theorem comp {f : α → β} {g : β → γ} (hf : IsMulHom f) (hg : IsMulHom g) : IsMulHom (g ∘ f)

{α : Type u}
{β : Type v}
[Mul α]
[Mul β]
{γ : Type u_1}
[Mul γ]
{f : α → β}
{g : β → γ}
(hf : IsMulHom f)
(hg : IsMulHom g)


@[simp] theorem ite_true (a b : α) : (if True then a else b) = a


theorem mk_proj_snd' (ex : proj x ∈ e.baseSet) : (proj x, (e x).2) = e x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
[TopologicalSpace Z]
(e : Trivialization F proj)
{x : Z}
(ex : proj x ∈ e.baseSet)


theorem eq_iff {x y z w : α} : s(x, y) = s(z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z


theorem exists_st_iff_not_infinite {x : ℝ*} : (∃ r : ℝ, IsSt x r) ↔ ¬Infinite x


theorem results_thinkN {s : Computation α} {a m} :
    ∀ n, Results s a m → Results (thinkN s n) a (m + n)

{α : Type u}
{s : Computation α}
{a : α}
{m : ℕ}
(n : ℕ)

s.Results a m → (s.thinkN n).Results a (m + n)


/-- In a normed ring, the coercion from `Rˣ` (equipped with the induced topology from the
embedding in `R × R`) to `R` is an open embedding. -/
theorem openEmbedding_val : OpenEmbedding (val : Rˣ → R)

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]


@[to_additive (attr := simp)]
theorem clift_apply_inr (f : FreeMonoid (M ⊕ N) →* P) (hM₁ hN₁ hM hN) (x : N) :
    clift f hM₁ hN₁ hM hN (inr x) = f (of (.inr x))

(hM₁ : f (FreeMonoid.of (Sum.inl 1)) = 1)

(hN₁ : f (FreeMonoid.of (Sum.inr 1)) = 1)

(hM : ∀ (x y : M), f (FreeMonoid.of (Sum.inl (x * y))) = f (FreeMonoid.of (Sum.inl x) * FreeMonoid.of (Sum.inl y)))

(hN : ∀ (x y : N), f (FreeMonoid.of (Sum.inr (x * y))) = f (FreeMonoid.of (Sum.inr x) * FreeMonoid.of (Sum.inr y)))

(Monoid.Coprod.clift f hM₁ hN₁ hM hN) (Monoid.Coprod.inr x) = f (FreeMonoid.of (Sum.inr x))


theorem definable_iff_exists_formula_sum :
    A.Definable L s ↔ ∃ φ : L.Formula (A ⊕ α), s = {v | φ.Realize (Sum.elim (↑) v)}

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

A.Definable L s ↔ ∃ φ, s = {v | φ.Realize (Sum.elim Subtype.val v)}


theorem mem_bind' {s : Set β} {f : Filter α} {m : α → Filter β} :
    s ∈ bind f m ↔ { a | s ∈ m a } ∈ f

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


lemma llr_smul_right [IsFiniteMeasure μ] [Measure.HaveLebesgueDecomposition μ ν]
    (hμν : μ ≪ ν) (c : ℝ≥0∞) (hc : c ≠ 0) (hc_ne_top : c ≠ ∞) :
    llr μ (c • ν) =ᵐ[μ] fun x ↦ llr μ ν x - log c.toReal

{α : Type u_1}
{mα : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
[μ.HaveLebesgueDecomposition ν]
(hμν : μ.AbsolutelyContinuous ν)
(c : ℝ≥0∞)
(hc : c ≠ 0)
(hc_ne_top : c ≠ ⊤)

MeasureTheory.llr μ (c • ν) =ᵐ[μ] fun x => MeasureTheory.llr μ ν x - Real.log c.toReal


theorem comap_rel (f : α → β) (r : Setoid β) (x y : α) : (comap f r).Rel x y ↔ r.Rel (f x) (f y)

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(r : Setoid β)
(x y : α)

(Setoid.comap f r).Rel x y ↔ r.Rel (f x) (f y)


/-- If `F` and `G` are naturally isomorphic functors, then they have equivalent categories of
cocones.
-/
@[simps]
def precomposeEquivalence {G : J ⥤ C} (α : G ≅ F) : Cocone F ≌ Cocone G

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
(α : G ≅ F)

(CategoryTheory.Limits.Cocones.precomposeEquivalence α).counitIso =
  CategoryTheory.NatIso.ofComponents
    (fun s =>
      CategoryTheory.Limits.Cocones.ext
        (CategoryTheory.Iso.refl
          ((CategoryTheory.Limits.Cocones.precompose α.inv ⋙ CategoryTheory.Limits.Cocones.precompose α.hom).obj s).pt)
        ⋯)
    ⋯


theorem uniformContinuous_vsub : UniformContinuous fun x : P × P => x.1 -ᵥ x.2

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]


lemma prev_eq_self (c : ComplexShape ι) (j : ι) (hj : ¬ c.Rel (c.prev j) j) :
    c.prev j = j

{ι : Type u_1}
(c : ComplexShape ι)
(j : ι)
(hj : ¬c.Rel (c.prev j) j)


@[to_additive (attr := simp)]
lemma card_four' {G : Type*} [Group G] [Fintype G] [IsKleinFour G] :
    Fintype.card G = 4

{G : Type u_1}
[Group G]
[Fintype G]
[IsKleinFour G]


protected theorem IsSt.lt {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) (hrs : r < s) :
    x < y

{x y : ℝ*}
{r s : ℝ}
(hxr : x.IsSt r)
(hys : y.IsSt s)
(hrs : r < s)


/-- The counit isomorphism of the equivalence of categories `WhiskeringLeftEquivalence W D`. -/
@[simps!]
def counitIso : inverse W D ⋙ functor W D ≅ 𝟭 (W.FunctorsInverting D)

{C : Type uC}
[CategoryTheory.Category.{uC', uC} C]
(W : CategoryTheory.MorphismProperty C)
(D : Type uD)
[CategoryTheory.Category.{uD', uD} D]

(CategoryTheory.Localization.Construction.WhiskeringLeftEquivalence.counitIso W D).inv = CategoryTheory.eqToHom ⋯


@[to_additive (attr := simps tensorObj_as leftUnitor rightUnitor associator) Discrete.addMonoidal]
instance Discrete.monoidal : MonoidalCategory (Discrete M)

(M : Type u)
[Monoid M]
(X : CategoryTheory.Discrete M)

ρ_ X = CategoryTheory.Discrete.eqToIso ⋯


/-- The kernel morphism of a zero morphism is an isomorphism -/
theorem kernel.ι_of_zero : IsIso (kernel.ι (0 : X ⟶ Y))


lemma angle_div_left_eq_angle_mul_right (a x y : ℂ) : angle (x / a) y = angle x (y * a)

InnerProductGeometry.angle (x / a) y = InnerProductGeometry.angle x (y * a)


@[simp, reassoc]
theorem app_invApp (U : Opens Y) :
    f.c.app (op U) ≫ H.invApp ((Opens.map f.base).obj U) =
      Y.presheaf.map
        ((homOfLE (Set.image_preimage_subset f.base U.1)).op :
          op U ⟶ op (opensFunctor f |>.obj ((Opens.map f.base).obj U)))

{X Y : AlgebraicGeometry.PresheafedSpace C}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

f.c.app (Opposite.op U) ≫
    AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.invApp f ((TopologicalSpace.Opens.map f.base).obj U) =
  Y.presheaf.map (CategoryTheory.homOfLE ⋯).op


theorem apply_rangeSplitting (f : α → β) (x : range f) : f (rangeSplitting f x) = x

{α : Type u}
{β : Type v}
(f : α → β)
(x : ↑(Set.range f))


/-- An open set in the indiscrete topology is either empty or the whole space. -/
theorem eq_bot_or_top {α} [t : TopologicalSpace α] (h : t = ⊤) (U : Opens α) : U = ⊥ ∨ U = ⊤

{α : Type u_5}
[t : TopologicalSpace α]
(h : t = ⊤)
(U : TopologicalSpace.Opens α)


theorem contMdiffAt_subtype_iff {n : ℕ∞} {U : Opens M} {f : M → M'} {x : U} :
    ContMDiffAt I I' n (fun x : U ↦ f x) x ↔ ContMDiffAt I I' n f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{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']
{n : ℕ∞}
{U : TopologicalSpace.Opens M}
{f : M → M'}
{x : ↥U}

ContMDiffAt I I' n (fun x => f ↑x) x ↔ ContMDiffAt I I' n f ↑x


@[simp]
theorem ofMul_zpow [DivInvMonoid α] (z : ℤ) (a : α) : ofMul (a ^ z) = z • ofMul a

{α : Type u}
[DivInvMonoid α]
(z : ℤ)
(a : α)

Additive.ofMul (a ^ z) = z • Additive.ofMul a


/-- A partition of `α` does not contain the empty set. -/
theorem nonempty_of_mem_partition {c : Set (Set α)} (hc : IsPartition c) {s} (h : s ∈ c) :
    s.Nonempty

{α : Type u_1}
{c : Set (Set α)}
(hc : Setoid.IsPartition c)
{s : Set α}
(h : s ∈ c)


@[simp]
theorem map_mkQ_eq_top : map p.mkQ p' = ⊤ ↔ p ⊔ p' = ⊤

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p p' : Submodule R M)


theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
    (hx : x ∈ Ioc (I.lower i) (I.upper i)) :
    MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _))

(hx : x ∈ Set.Ioc (I.lower i) (I.upper i))

Set.MapsTo (i.insertNth x) ↑(I.face i) ↑I


@[simp, norm_cast]
theorem natCast_le_iff {m n : ℕ} : (m : EReal) ≤ (n : EReal) ↔ m ≤ n

↑m ≤ ↑n ↔ m ≤ n


/-- Show that the functor given by `rightAdjointOfEquiv` is indeed right adjoint to `F`. Dual
to `adjunctionOfEquivRight`. -/
@[simps!]
def adjunctionOfEquivRight (he : ∀ X' X Y f g, e X' Y (F.map f ≫ g) = f ≫ e X Y g) :
    F ⊣ (rightAdjointOfEquiv e he)

(e : (X : C) → (Y : D) → (F.obj X ⟶ Y) ≃ (X ⟶ G_obj Y))

(he :
  ∀ (X' X : C) (Y : D) (f : X' ⟶ X) (g : F.obj X ⟶ Y),
    (e X' Y) (CategoryTheory.CategoryStruct.comp (F.map f) g) = CategoryTheory.CategoryStruct.comp f ((e X Y) g))

(CategoryTheory.Adjunction.adjunctionOfEquivRight e he).homEquiv X Y = e X Y


theorem continuous_restrictScalars :
    Continuous
      (restrictScalars 𝕜' : ContinuousMultilinearMap 𝕜 E G → ContinuousMultilinearMap 𝕜' E G)

[(i : ι) → SeminormedAddCommGroup (E i)]


theorem HasBasis.eq_generate (h : l.HasBasis p s) : l = generate { U | ∃ i, p i ∧ s i = U }

{α : Type u_1}
{ι : Sort u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(h : l.HasBasis p s)

l = Filter.generate {U | ∃ i, p i ∧ s i = U}


@[simp]
theorem coe_restrictScalars (f : B →A[S] C) :
    (f.restrictScalars R : B →ₐ[R] C) = (f : B →ₐ[S] C).restrictScalars R

{R : Type u_1}
[CommSemiring R]
{S : Type u_3}
[CommSemiring S]
[Algebra R S]
{B : Type u_4}
[Ring B]
[TopologicalSpace B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
{C : Type u_5}
[Ring C]
[TopologicalSpace C]
[Algebra R C]
[Algebra S C]
[IsScalarTower R S C]
(f : B →A[S] C)

↑(ContinuousAlgHom.restrictScalars R f) = AlgHom.restrictScalars R ↑f


@[simp]
theorem app_eq (X : C) : (app τ) (W.Q.obj X) = τ.app X

{F₁ F₂ : CategoryTheory.Functor W.Localization D}

CategoryTheory.Localization.Construction.NatTransExtension.app τ (W.Q.obj X) = τ.app X


theorem AlgebraicIndependent.image_of_comp {ι ι'} (s : Set ι) (f : ι → ι') (g : ι' → A)
    (hs : AlgebraicIndependent R fun x : s => g (f x)) :
    AlgebraicIndependent R fun x : f '' s => g x

(hs : AlgebraicIndependent R fun x => g (f ↑x))


@[simp]
lemma hom_naturality_apply {X Y : LightCondMod.{u} R} (f : X ⟶ Y)  {S T : LightProfiniteᵒᵖ}
    (g : S ⟶ T) (x : X.val.obj S) : f.val.app T (X.val.map g x) = Y.val.map g (f.val.app S x)

(R : Type u)
[Ring R]
{X Y : LightCondMod R}
(f : X ⟶ Y)
{S T : LightProfiniteᵒᵖ}
(g : S ⟶ T)
(x : ↑(X.val.obj S))

(f.val.app T) ((X.val.map g) x) = (Y.val.map g) ((f.val.app S) x)


@[reassoc]
theorem tensor_whiskerLeft_symm (X Y : C) {Z Z' : C} (f : Z ⟶ Z') :
    X ◁ Y ◁ f = (α_ X Y Z).inv ≫ (X ⊗ Y) ◁ f ≫ (α_ X Y Z').hom

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

CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.MonoidalCategory.whiskerLeft Y f) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator X Y Z).inv
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerLeft (CategoryTheory.MonoidalCategory.tensorObj X Y) f)
      (CategoryTheory.MonoidalCategory.associator X Y Z').hom)


@[to_additive]
theorem div_le_div_iff_right (c : α) : a / c ≤ b / c ↔ a ≤ b

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


theorem size_le_array_size {s : Subarray α} : s.size ≤ s.array.size


@[to_additive]
theorem image_mulSingle_uIcc (i : ι) (a b : α i) :
    Pi.mulSingle i '' uIcc a b = uIcc (Pi.mulSingle i a) (Pi.mulSingle i b)

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Lattice (α i)]
[DecidableEq ι]
[(i : ι) → One (α i)]
(i : ι)
(a b : α i)

Pi.mulSingle i '' Set.uIcc a b = Set.uIcc (Pi.mulSingle i a) (Pi.mulSingle i b)


/-- The series `∑ z^n/n` converges to `-log (1-z)` on the open unit disk. -/
lemma hasSum_taylorSeries_neg_log {z : ℂ} (hz : ‖z‖ < 1) :
    HasSum (fun n : ℕ ↦ z ^ n / n) (-log (1 - z))

HasSum (fun n => z ^ n / ↑n) (-Complex.log (1 - z))


/-- The forgetful functor from the category of coalgebras, forgetting the coalgebraic structure. -/
@[simps]
def forget (F : C ⥤ C) : Coalgebra F ⥤ C

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

∀ {X Y : CategoryTheory.Endofunctor.Coalgebra F} (f : X ⟶ Y),
  (CategoryTheory.Endofunctor.Coalgebra.forget F).map f = f.f


@[simp]
theorem card_Ioi : (Ioi a).card = n - 1 - a


/-- If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is
less than the slope of the secant line of `f` on `[y, z]`, then `f` is convex. -/
theorem convexOn_of_slope_mono_adjacent (hs : Convex 𝕜 s)
    (hf :
      ∀ {x y z : 𝕜},
        x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)) :
    ConvexOn 𝕜 s f


@[to_additive]
protected theorem mul_eq_one_iff : s * t = 1 ↔ ∃ a b, s = pure a ∧ t = pure b ∧ a * b = 1

{α : Type u_2}
[OrderedAddCommGroup α]
{s t : NonemptyInterval α}

s + t = 0 ↔ ∃ a b, s = NonemptyInterval.pure a ∧ t = NonemptyInterval.pure b ∧ a + b = 0


theorem Basis.encard_eq_encard (hI : M.Basis I X) (hJ : M.Basis J X) : I.encard = J.encard

{α : Type u_1}
{M : Matroid α}
{I X J : Set α}
(hI : M.Basis I X)
(hJ : M.Basis J X)


theorem Ioc_union_left (hab : a ≤ b) : Ioc a b ∪ {a} = Icc a b

{α : Type u_1}
[PartialOrder α]
{a b : α}
(hab : a ≤ b)


@[to_additive mem_leftAddCoset_iff]
theorem mem_leftCoset_iff (a : α) : x ∈ a • s ↔ a⁻¹ * x ∈ s

{α : Type u_1}
[AddGroup α]
{s : Set α}
{x : α}
(a : α)


lemma riemannZeta_def_of_ne_zero {s : ℂ} (hs : s ≠ 0) :
    riemannZeta s = completedRiemannZeta s / Gammaℝ s

riemannZeta s = completedRiemannZeta s / s.Gammaℝ


/-- Build an isomorphism in the category `CommMonCat` from a `MulEquiv` between `CommMonoid`s. -/
@[to_additive (attr := simps) AddEquiv.toAddCommMonCatIso]
def MulEquiv.toCommMonCatIso (e : X ≃* Y) : CommMonCat.of X ≅ CommMonCat.of Y

{X Y : Type u}
[AddCommMonoid X]
[AddCommMonoid Y]
(e : X ≃+ Y)

e.toAddCommMonCatIso.inv = AddCommMonCat.ofHom e.symm.toAddMonoidHom


/-- The functor `(L, R) ⥤ (L ⋙ F, R ⋙ F)` -/
@[simps]
def post (L : A ⥤ T) (R : B ⥤ T) (F : T ⥤ C) : Comma L R ⥤ Comma (L ⋙ F) (R ⋙ F)

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

((CategoryTheory.Comma.post L R F).obj X).left = X.left


/-- If `φ : S₁ ⟶ S₂` is a morphism of short complexes such that `φ.τ₁` is epi, `φ.τ₂` is an iso
and `φ.τ₃` is mono, then a homology data for `S₂` induces a homology data for `S₁`.
The inverse construction is `ofEpiOfIsIsoOfMono`. -/
@[simps]
noncomputable def ofEpiOfIsIsoOfMono' (φ : S₁ ⟶ S₂) (h : HomologyData S₂)
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] : HomologyData S₁

(CategoryTheory.ShortComplex.HomologyData.ofEpiOfIsIsoOfMono' φ h).iso = h.iso


@[simp]
theorem torsionBySet_singleton_eq : torsionBySet R M {a} = torsionBy R M a

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

Submodule.torsionBySet R M {a} = Submodule.torsionBy R M a


@[simp]
theorem gauge_empty : gauge (∅ : Set E) = 0

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]


/-- A function `f : α → ι` with nonempty codomain takes pairwise equal values on a set `s` if and
only if for some `z` in the codomain, `f` takes value `z` on all `x ∈ s`. See also
`Set.Nonempty.pairwise_eq_iff_exists_eq` for a version that assumes `Set.Nonempty s` instead of
`[Nonempty ι]`. -/
theorem pairwise_eq_iff_exists_eq [Nonempty ι] (s : Set α) (f : α → ι) :
    (s.Pairwise fun x y => f x = f y) ↔ ∃ z, ∀ x ∈ s, f x = z

{α : Type u_1}
{ι : Type u_4}
[Nonempty ι]
(s : Set α)
(f : α → ι)


theorem forall₂_zip : ∀ {l₁ l₂}, Forall₂ R l₁ l₂ → ∀ {a b}, (a, b) ∈ zip l₁ l₂ → R a b

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
{l₁ : List α}
{l₂ : List β}

List.Forall₂ R l₁ l₂ → ∀ {a : α} {b : β}, (a, b) ∈ l₁.zip l₂ → R a b


theorem coe_addEquiv_lpBCF (f : lp (fun _ : α ↦ E) ∞) : (AddEquiv.lpBCF f : α → E) = f

{α : Type u_1}
{E : Type u_2}
[TopologicalSpace α]
[DiscreteTopology α]
[NormedAddCommGroup E]
(f : ↥(lp (fun x => E) ⊤))


theorem Intersecting.exists_card_eq (hs : (s : Set α).Intersecting) :
    ∃ t, s ⊆ t ∧ 2 * t.card = Fintype.card α ∧ (t : Set α).Intersecting

{α : Type u_1}
[BooleanAlgebra α]
[Nontrivial α]
[Fintype α]
{s : Finset α}
(hs : (↑s).Intersecting)

∃ t, s ⊆ t ∧ 2 * t.card = Fintype.card α ∧ (↑t).Intersecting


theorem IsMinOn.comp_antitone (hf : IsMinOn f s a) {g : β → γ} (hg : Antitone g) :
    IsMaxOn (g ∘ f) s a

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder β]
[Preorder γ]
{f : α → β}
{s : Set α}
{a : α}
(hf : IsMinOn f s a)
{g : β → γ}
(hg : Antitone g)


/-- A point in a set is in its affine span. -/
theorem mem_spanPoints (p : P) (s : Set P) : p ∈ s → p ∈ spanPoints k s

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


protected theorem eq (H : B.IsSymm) (x y) : I (B x y) = B y x

{R : Type u_1}
{M : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{I : R →+* R}
{B : M →ₛₗ[I] M →ₗ[R] R}
(H : B.IsSymm)
(x y : M)


@[simp]
theorem LinearEquiv.dualMap_apply (f : M₁ ≃ₗ[R] M₂) (g : Dual R M₂) (x : M₁) :
    f.dualMap g x = g (f x)

{R : Type u}
[CommSemiring R]
{M₁ : Type v}
{M₂ : Type v'}
[AddCommMonoid M₁]
[Module R M₁]
[AddCommMonoid M₂]
[Module R M₂]
(f : M₁ ≃ₗ[R] M₂)
(g : Module.Dual R M₂)
(x : M₁)


@[simp]
lemma section_apply (i : I) : (hx.section_ hY hF).1 (Opposite.op (Y i)) = x i

{J : CategoryTheory.GrothendieckTopology C}

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

{x : CategoryTheory.Presheaf.FamilyOfElementsOnObjects F Y}

(hF : CategoryTheory.Presheaf.IsSheaf J F)

↑(hx.section_ hY hF) (Opposite.op (Y i)) = x i


@[to_additive (attr := simp)]
theorem closure_empty : closure (∅ : Set M) = ⊥


@[simp] lemma toFun_eq_coe (f : SupHom α β) : f.toFun = f

{α : Type u_3}
{β : Type u_4}
[Sup α]
[Sup β]
(f : SupHom α β)


theorem Iic_prod (x : α × β) : Iic x = Iic x.1 ×ˢ Iic x.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(x : α × β)

LowerSet.Iic x = LowerSet.Iic x.1 ×ˢ LowerSet.Iic x.2


theorem Tendsto.isBoundedUnder_le_atBot (h : Tendsto u f atBot) : f.IsBoundedUnder (· ≤ ·) u

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Nonempty α]
{f : Filter β}
{u : β → α}
(h : Filter.Tendsto u f Filter.atBot)

Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) f u


@[simp]
theorem lintegral_eq_zero_iff' {f : α → ℝ≥0∞} (hf : AEMeasurable f μ) :
    ∫⁻ a, f a ∂μ = 0 ↔ f =ᵐ[μ] 0

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : AEMeasurable f μ)


theorem rank_R [Fintype σ] : Module.rank K (R σ K) = Fintype.card (σ → K)

(σ K : Type u)
[Fintype K]
[Field K]
[Fintype σ]

Module.rank K (MvPolynomial.R σ K) = ↑(Fintype.card (σ → K))


@[mono]
theorem mono (ha : μa' ≪ μa) (hb : μb ≪ μb') (h : QuasiMeasurePreserving f μa μb) :
    QuasiMeasurePreserving f μa' μb'

(h : MeasureTheory.Measure.QuasiMeasurePreserving f μa μb)

MeasureTheory.Measure.QuasiMeasurePreserving f μa' μb'


theorem closedBall_comp (p : Seminorm 𝕜₂ E₂) (f : E →ₛₗ[σ₁₂] E₂) (x : E) (r : ℝ) :
    (p.comp f).closedBall x r = f ⁻¹' p.closedBall (f x) r

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

(p.comp f).closedBall x r = ⇑f ⁻¹' p.closedBall (f x) r


theorem tensor_left_iff {X Y : C} (f g : X ⟶ Y) : 𝟙 (𝟙_ C) ⊗ f = 𝟙 (𝟙_ C) ⊗ g ↔ f = g

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

CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id (𝟙_ C)) f =
    CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id (𝟙_ C)) g ↔
  f = g


theorem extraction_of_frequently_atTop' {P : ℕ → Prop} (h : ∀ N, ∃ n > N, P n) :
    ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ n, P (φ n)

{P : ℕ → Prop}
(h : ∀ (N : ℕ), ∃ n > N, P n)


@[simp]
lemma shiftFunctorZero_hom_app_obj_of_induced (X : C) :
    letI := HasShift.induced F A s i
    (shiftFunctorZero D A).hom.app (F.obj X) =
      (i 0).hom.app X ≫ F.map ((shiftFunctorZero C A).hom.app X)

(i : (a : A) → F.comp (s a) ≅ (CategoryTheory.shiftFunctor C a).comp F)

[((CategoryTheory.whiskeringLeft C D D).obj F).Full]

[((CategoryTheory.whiskeringLeft C D D).obj F).Faithful]

(CategoryTheory.shiftFunctorZero D A).hom.app (F.obj X) =
  CategoryTheory.CategoryStruct.comp ((i 0).hom.app X) (F.map ((CategoryTheory.shiftFunctorZero C A).hom.app X))


/-- The triangle `Z₁₂ ⟶ Z₁₃ ⟶ Z₂₃ ⟶ Z₁₂⟦1⟧` given by an octahedron. -/
@[simps!]
def triangle : Triangle C

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

{v₁₂ : X₂ ⟶ Z₁₂}

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₂₃ : X₃ ⟶ Z₂₃}

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

{v₁₃ : X₃ ⟶ Z₁₃}

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(h : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)


theorem lf_asymm {x y : PGame} (ox : Numeric x) (oy : Numeric y) : x ⧏ y → ¬y ⧏ x

{x y : SetTheory.PGame}
(ox : x.Numeric)
(oy : y.Numeric)

x ⧏ y → ¬y ⧏ x


@[simp] theorem perm_replicate {n : Nat} {a : α} {l : List α} :
    l ~ replicate n a ↔ l = replicate n a

{α : Type u_1}
{n : Nat}
{a : α}
{l : List α}

l ~ List.replicate n a ↔ l = List.replicate n a


@[simp] theorem rev_inj {i j : Fin n} : rev i = rev j ↔ i = j


/-- `unitInterval.symm` as a `Homeomorph`. -/
@[simps]
def symmHomeomorph : I ≃ₜ I

∀ (a : ↑unitInterval), unitInterval.symmHomeomorph.symm a = unitInterval.symm a


@[simp, nolint simpNF]
theorem _root_.exists_eq_subtype_mk_iff {a : Subtype p} {b : α} :
    (∃ h : p b, a = Subtype.mk b h) ↔ ↑a = b

{α : Sort u_1}
{p : α → Prop}
{a : Subtype p}
{b : α}


theorem filter_filter (s : Finset α) : (s.filter p).filter q = s.filter fun a => p a ∧ q a

{α : Type u_1}
(p q : α → Prop)
[DecidablePred p]
[DecidablePred q]
(s : Finset α)

Finset.filter q (Finset.filter p s) = Finset.filter (fun a => p a ∧ q a) s


theorem Bijective.comp {g : β → φ} {f : α → β} : Bijective g → Bijective f → Bijective (g ∘ f)

{α : Sort u₁}
{β : Sort u₂}
{φ : Sort u₃}
{g : β → φ}
{f : α → β}

Function.Bijective g → Function.Bijective f → Function.Bijective (g ∘ f)


/-- To every `S : J.Cover X` and presheaf `P`, associate a `MulticospanIndex`. -/
@[simps]
def index {D : Type u₁} [Category.{v₁} D] (S : J.Cover X) (P : Cᵒᵖ ⥤ D) :
    Limits.MulticospanIndex D

{J : CategoryTheory.GrothendieckTopology C}


@[simp, norm_cast]
theorem coe_inv {f : CauSeq β abv} (hf) : ⇑(inv f hf) = (f : ℕ → β)⁻¹

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[DivisionRing β]
{abv : β → α}
[IsAbsoluteValue abv]
{f : CauSeq β abv}
(hf : ¬f.LimZero)


/-- Removing a finite set from a dense set in a space without isolated points, one still
obtains a dense set. -/
theorem Dense.diff_finite [T1Space X] [∀ x : X, NeBot (𝓝[≠] x)] {s : Set X} (hs : Dense s)
    {t : Set X} (ht : t.Finite) : Dense (s \ t)

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
[∀ (x : X), (𝓝[≠] x).NeBot]
{s : Set X}
(hs : Dense s)
{t : Set X}
(ht : t.Finite)


theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasurable f) :
    HasFiniteIntegral f (μ.prod ν) ↔
      (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
        HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ

⦃f : α × β → E⦄

(h1f : MeasureTheory.StronglyMeasurable f)

MeasureTheory.HasFiniteIntegral f (μ.prod ν) ↔
  (∀ᵐ (x : α) ∂μ, MeasureTheory.HasFiniteIntegral (fun y => f (x, y)) ν) ∧
    MeasureTheory.HasFiniteIntegral (fun x => ∫ (y : β), ‖f (x, y)‖ ∂ν) μ


lemma CFC.spectrum_zero_eq [Nontrivial A] :
    spectrum R (0 : A) = {0}

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
[Nontrivial A]


theorem some_spec₂ {α : Sort*} {p : α → Prop} {h : ∃ a, p a} (q : α → Prop)
    (hpq : ∀ a, p a → q a) : q (choose h)

{α : Sort u_2}
{p : α → Prop}
{h : ∃ a, p a}
(q : α → Prop)
(hpq : ∀ (a : α), p a → q a)


/-- If `C` is cofiltered or empty, and we have a left adjoint functor `L : C ⥤ D`, then `D` is
cofiltered or empty. -/
theorem of_isLeftAdjoint (L : C ⥤ D) [L.IsLeftAdjoint] : IsCofilteredOrEmpty D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsCofilteredOrEmpty C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
(L : CategoryTheory.Functor C D)
[L.IsLeftAdjoint]


theorem of_subset_range_algebraMap (hf : f.LeftInverse (algebraMap R S))
    (h : quasispectrum S a ⊆ Set.range (algebraMap R S)) : QuasispectrumRestricts a f

(hf : Function.LeftInverse f ⇑(algebraMap R S))

(h : quasispectrum S a ⊆ Set.range ⇑(algebraMap R S))


/-- A continuous function `f` is locally integrable with respect to any locally finite measure. -/
theorem Continuous.locallyIntegrable [IsLocallyFiniteMeasure μ] [SecondCountableTopologyEither X E]
    (hf : Continuous f) : LocallyIntegrable f μ


theorem image_subset : ((· ⊆ ·) ⇒ (· ⊆ ·)) r.image r.image

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

((fun x x_1 => x ⊆ x_1) ⇒ fun x x_1 => x ⊆ x_1) r.image r.image


theorem appendFun_comp' {α₀ α₁ α₂ : TypeVec n} {β₀ β₁ β₂ : Type*}
    (f₀ : α₀ ⟹ α₁) (f₁ : α₁ ⟹ α₂) (g₀ : β₀ → β₁) (g₁ : β₁ → β₂) :
    (f₁ ::: g₁) ⊚ (f₀ ::: g₀) = (f₁ ⊚ f₀ ::: g₁ ∘ g₀)

{n : ℕ}
{α₀ : TypeVec.{u_1} n}
{α₁ : TypeVec.{u_2} n}
{α₂ : TypeVec.{u_3} n}
{β₀ : Type u_1}
{β₁ : Type u_2}
{β₂ : Type u_3}
(f₀ : α₀.Arrow α₁)
(f₁ : α₁.Arrow α₂)
(g₀ : β₀ → β₁)
(g₁ : β₁ → β₂)

TypeVec.comp (f₁ ::: g₁) (f₀ ::: g₀) = (TypeVec.comp f₁ f₀ ::: g₁ ∘ g₀)


/-- If `f, g` are functions `α → 𝕜`, both continuous on a preconnected set `S`, with
`f ^ 2 = g ^ 2` on `S`, and `g z ≠ 0` all `z ∈ S`, then as soon as `f = g` holds at
one point of `S` it holds for all points. -/
theorem IsPreconnected.eq_of_sq_eq [Field 𝕜] [HasContinuousInv₀ 𝕜] [ContinuousMul 𝕜]
    (hS : IsPreconnected S) (hf : ContinuousOn f S) (hg : ContinuousOn g S)
    (hsq : EqOn (f ^ 2) (g ^ 2) S) (hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0) {y : α} (hy : y ∈ S)
    (hy' : f y = g y) : EqOn f g S

{α : Type u_2}
{𝕜 : Type u_3}
{f g : α → 𝕜}
{S : Set α}
[TopologicalSpace α]
[TopologicalSpace 𝕜]
[T1Space 𝕜]
[Field 𝕜]
[HasContinuousInv₀ 𝕜]
[ContinuousMul 𝕜]
(hS : IsPreconnected S)
(hf : ContinuousOn f S)
(hg : ContinuousOn g S)
(hsq : Set.EqOn (f ^ 2) (g ^ 2) S)
(hg_ne : ∀ {x : α}, x ∈ S → g x ≠ 0)
{y : α}
(hy : y ∈ S)
(hy' : f y = g y)


/-- If `‖f n‖` is `O(n^x)`, then the abscissa of absolute convergence
of `f` is bounded by `x + 1`. -/
lemma LSeries.abscissaOfAbsConv_le_of_isBigO_rpow {f : ℕ → ℂ} {x : ℝ}
    (h : f =O[atTop] fun n ↦ (n : ℝ) ^ x) :
    abscissaOfAbsConv f ≤ x + 1

(h : f =O[Filter.atTop] fun n => ↑n ^ x)


theorem LocallyIntegrable.aestronglyMeasurable [SecondCountableTopology X]
    (hf : LocallyIntegrable f μ) : AEStronglyMeasurable f μ

(hf : MeasureTheory.LocallyIntegrable f μ)


theorem selfZPow_of_neg {n : ℤ} (hn : n < 0) :
    selfZPow x B n = mk' _ (1 : R) (Submonoid.pow x n.natAbs)

{R : Type u_1}
[CommRing R]
(x : R)
(B : Type u_2)
[CommRing B]
[Algebra R B]
[IsLocalization.Away x B]
{n : ℤ}
(hn : n < 0)

selfZPow x B n = IsLocalization.mk' B 1 (Submonoid.pow x n.natAbs)


theorem linearIndependent_of_finite (s : Set M)
    (H : ∀ t ⊆ s, Set.Finite t → LinearIndependent R (fun x => x : t → M)) :
    LinearIndependent R (fun x => x : s → M)

(H : ∀ t ⊆ s, t.Finite → LinearIndependent R fun (x : ↑t) => ↑x)


theorem ball_add_closedBall (hε : 0 < ε) (hδ : 0 ≤ δ) (a b : E) :
    ball a ε + closedBall b δ = ball (a + b) (ε + δ)

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{δ ε : ℝ}
(hε : 0 < ε)
(hδ : 0 ≤ δ)
(a b : E)

Metric.ball a ε + Metric.closedBall b δ = Metric.ball (a + b) (ε + δ)


theorem Kernel.indep_biSup_compl (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) (t : Set ι) :
    Indep (⨆ n ∈ t, s n) (⨆ n ∈ tᶜ, s n) κ μα

(h_indep : ProbabilityTheory.Kernel.iIndep s κ μα)

ProbabilityTheory.Kernel.Indep (⨆ n ∈ t, s n) (⨆ n ∈ tᶜ, s n) κ μα


/-- If a polynomial of degree 2 is always positive, then its discriminant is negative,
at least when the coefficient of the quadratic term is nonzero.
-/
theorem discrim_lt_zero (ha : a ≠ 0) (h : ∀ x : K, 0 < a * x * x + b * x + c) :
    discrim a b c < 0


theorem comap_comp_apply (f : MvPolynomial σ R →ₐ[R] MvPolynomial τ R)
    (g : MvPolynomial τ R →ₐ[R] MvPolynomial υ R) (x : υ → R) :
    comap (g.comp f) x = comap f (comap g x)

MvPolynomial.comap (g.comp f) x = MvPolynomial.comap f (MvPolynomial.comap g x)


lemma chainBotCoeff_of_eq_zsmul_add (β' : Weight K H L) (n : ℤ) (hβ' : (β' : H → K) = n • α + β) :
    chainBotCoeff α β' = chainBotCoeff α β + n

{K : Type u_1}
{L : Type u_2}
[Field K]
[CharZero K]
[LieRing L]
[LieAlgebra K L]
[LieAlgebra.IsKilling K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
(α β : LieModule.Weight K (↥H) L)
(hα : α.IsNonZero)
(β' : LieModule.Weight K (↥H) L)
(n : ℤ)
(hβ' : ⇑β' = n • ⇑α + ⇑β)

↑(LieModule.chainBotCoeff (⇑α) β') = ↑(LieModule.chainBotCoeff (⇑α) β) + n


@[simp]
theorem contSupp_comp (f k) : contSupp (Cont'.comp f k) = codeSupp f k

(f : Turing.ToPartrec.Code)
(k : Turing.PartrecToTM2.Cont')

Turing.PartrecToTM2.contSupp (Turing.PartrecToTM2.Cont'.comp f k) = Turing.PartrecToTM2.codeSupp f k


@[to_additive (attr := simp)]
theorem swap_one [One M] [One N] : (1 : M × N).swap = 1

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


@[to_additive (attr := simp)]
lemma leOnePart_eq_one : a⁻ᵐ = 1 ↔ 1 ≤ a

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


/-- Closure of a substructure `S` equals `S`. -/
@[simp]
theorem closure_eq : closure L (S : Set M) = S

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
(S : L.Substructure M)

(FirstOrder.Language.Substructure.closure L).toFun ↑S = S


theorem comap_le_comap_iff_of_surjective {S T : L.Substructure N} : S.comap f ≤ T.comap f ↔ S ≤ T

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f : L.Hom M N}
(hf : Function.Surjective ⇑f)
{S T : L.Substructure N}

FirstOrder.Language.Substructure.comap f S ≤ FirstOrder.Language.Substructure.comap f T ↔ S ≤ T


@[simp]
lemma MeasurableSet.singleton [MeasurableSpace α] [MeasurableSingletonClass α] (a : α) :
    MeasurableSet {a}

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSingletonClass α]
(a : α)


theorem X_pow_sub_C_ne_zero {n : ℕ} (hn : 0 < n) (a : R) : (X : R[X]) ^ n - C a ≠ 0

{R : Type u}
[Ring R]
[Nontrivial R]
{n : ℕ}
(hn : 0 < n)
(a : R)


theorem unop_inf (S₁ S₂ : Subring Rᵐᵒᵖ) : (S₁ ⊓ S₂).unop = S₁.unop ⊓ S₂.unop

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


@[to_additive]
lemma inf_div_left [SemilatticeInf β] [OrderTop β] (s t : Finset α) (f : α → β) :
    inf (s / t) f = inf s fun x ↦ inf t (f <| x / ·)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Sub α]
[SemilatticeInf β]
[OrderTop β]
(s t : Finset α)
(f : α → β)

(s - t).inf f = s.inf fun x => t.inf fun x_1 => f (x - x_1)


theorem xor_trichotomy {a b c : ℕ} (h : a ≠ b ^^^ c) :
    b ^^^ c < a ∨ a ^^^ c < b ∨ a ^^^ b < c


theorem IsBigOWith.of_const_mul_right {g : α → R} {c : R} (hc' : 0 ≤ c')
    (h : IsBigOWith c' l f fun x => c * g x) : IsBigOWith (c' * ‖c‖) l f g

(h : Asymptotics.IsBigOWith c' l f fun x => c * g x)


@[simp, norm_cast]
theorem coe_cliqueFinset (n : ℕ) : (G.cliqueFinset n : Set (Finset α)) = G.cliqueSet n

{α : Type u_1}
(G : SimpleGraph α)
[Fintype α]
[DecidableEq α]
[DecidableRel G.Adj]
(n : ℕ)


@[simp]
nonrec theorem prev_next (s : Cycle α) : ∀ (hs : Nodup s) (x : α) (hx : x ∈ s),
    s.prev hs (s.next hs x hx) (next_mem s hs x hx) = x

{α : Type u_1}
[DecidableEq α]
(s : Cycle α)
(hs : s.Nodup)
(x : α)
(hx : x ∈ s)


@[to_additive (attr := simp)]
theorem coe_copy (K : Subgroup G) (s : Set G) (hs : s = ↑K) : (K.copy s hs : Set G) = s

{G : Type u_1}
[AddGroup G]
(K : AddSubgroup G)
(s : Set G)
(hs : s = ↑K)


@[reassoc (attr := simp)]
theorem sheafifyMap_sheafifyLift {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R)
    (hR : Presheaf.IsSheaf J R) :
    sheafifyMap J η ≫ sheafifyLift J γ hR = sheafifyLift J (η ≫ γ) hR

(J : CategoryTheory.GrothendieckTopology C)

(hR : CategoryTheory.Presheaf.IsSheaf J R)

CategoryTheory.CategoryStruct.comp (CategoryTheory.sheafifyMap J η) (CategoryTheory.sheafifyLift J γ hR) =
  CategoryTheory.sheafifyLift J (CategoryTheory.CategoryStruct.comp η γ) hR


theorem comap_coe_Ioi_nhdsWithin_Ioi (a : α) : comap ((↑) : Ioi a → α) (𝓝[>] a) = atBot

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

Filter.comap Subtype.val (𝓝[>] a) = Filter.atBot


/-- A convex function on a segment is upper-bounded by the max of its endpoints. -/
theorem ConvexOn.le_on_segment (hf : ConvexOn 𝕜 s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s)
    (hz : z ∈ [x -[𝕜] y]) : f z ≤ max (f x) (f y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
{x y z : E}
(hx : x ∈ s)
(hy : y ∈ s)
(hz : z ∈ [x-[𝕜]y])


/-- If `x` and `y` are both separable elements, then `x + y` is also a separable element. -/
theorem isSeparable_add {x y : E} (hx : IsSeparable F x) (hy : IsSeparable F y) :
    IsSeparable F (x + y)

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
{x y : E}
(hx : IsSeparable F x)
(hy : IsSeparable F y)


@[simp]
lemma Sieve.equalizer_self {U V : C} (f : U ⟶ V) : equalizer f f = ⊤

{C : Type uC}
[CategoryTheory.Category.{vC, uC} C]
{U V : C}
(f : U ⟶ V)


theorem dedup_cons {a : α} {s : Multiset α} : dedup (a ::ₘ s) = ndinsert a (dedup s)

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

(a ::ₘ s).dedup = Multiset.ndinsert a s.dedup


theorem cardDistinctFactors_apply {n : ℕ} : ω n = n.primeFactorsList.dedup.length

ArithmeticFunction.cardDistinctFactors n = n.primeFactorsList.dedup.length


lemma nonneg_of_isNat {n : ℕ} [OrderedSemiring A]
    (h : NormNum.IsNat e n) : 0 ≤ (e : A)

{A : Type u_1}
{e : A}
{n : ℕ}
[OrderedSemiring A]
(h : Mathlib.Meta.NormNum.IsNat e n)


theorem le_pointwise_smul_iff₀ {a : α} (ha : a ≠ 0) {S T : AddSubgroup A} :
    S ≤ a • T ↔ a⁻¹ • S ≤ T

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[GroupWithZero α]
[DistribMulAction α A]
{a : α}
(ha : a ≠ 0)
{S T : AddSubgroup A}

S ≤ a • T ↔ a⁻¹ • S ≤ T


theorem exists_maximalIdeal_pow_eq_of_principal [IsNoetherianRing R] [LocalRing R] [IsDomain R]
    (h' : (maximalIdeal R).IsPrincipal) (I : Ideal R) (hI : I ≠ ⊥) :
    ∃ n : ℕ, I = maximalIdeal R ^ n

(h' : Submodule.IsPrincipal (LocalRing.maximalIdeal R))


/-- The equivalence `Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiCochainComplexEquivalence :
    Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α

(P : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C (ComplexShape.up α)))

(((CategoryTheory.Idempotents.karoubiCochainComplexEquivalence C α).functor.obj P).d i j).f =
  CategoryTheory.CategoryStruct.comp (P.X.d i j) (P.p.f j)


@[to_additive (attr := simp)]
theorem op_unop (x : αᵐᵒᵖ) : op (unop x) = x


@[simp]
theorem Ico_diff_Ioo_self (h : a < b) : Ico a b \ Ioo a b = {a}

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


theorem HasGradientWithinAt.congr_of_mem (h : HasGradientWithinAt f f' s x)
    (hs : ∀ x ∈ s, f₁ x = f x) (hx : x ∈ s) : HasGradientWithinAt f₁ f' s x

{𝕜 : Type u_1}
{F : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 F]
[CompleteSpace F]
{f : F → 𝕜}
{f' x : F}
{s : Set F}
{f₁ : F → 𝕜}
(h : HasGradientWithinAt f f' s x)
(hs : ∀ x ∈ s, f₁ x = f x)
(hx : x ∈ s)


theorem IsInternal.ofBijective_coeLinearMap_of_mem (h : IsInternal A)
    {i : ι} {x : M} (hx : x ∈ A i) :
    (LinearEquiv.ofBijective (coeLinearMap A) h).symm x i = ⟨x, hx⟩

{R : Type u}
[Semiring R]
{ι : Type v}
[dec_ι : DecidableEq ι]
{M : Type u_1}
[AddCommMonoid M]
[Module R M]
{A : ι → Submodule R M}
(h : DirectSum.IsInternal A)
{i : ι}
{x : M}
(hx : x ∈ A i)

((LinearEquiv.ofBijective (DirectSum.coeLinearMap A) h).symm x) i = ⟨x, hx⟩


theorem lintegral_mul_le_one_of_lintegral_rpow_eq_one {p q : ℝ} (hpq : p.IsConjExponent q)
    {f g : α → ℝ≥0∞} (hf : AEMeasurable f μ) (hf_norm : ∫⁻ a, f a ^ p ∂μ = 1)
    (hg_norm : ∫⁻ a, g a ^ q ∂μ = 1) : (∫⁻ a, (f * g) a ∂μ) ≤ 1

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{p q : ℝ}
(hpq : p.IsConjExponent q)
{f g : α → ENNReal}
(hf : AEMeasurable f μ)
(hf_norm : ∫⁻ (a : α), f a ^ p ∂μ = 1)
(hg_norm : ∫⁻ (a : α), g a ^ q ∂μ = 1)


@[to_additive]
theorem op_inf (S₁ S₂ : Subgroup G) : (S₁ ⊓ S₂).op = S₁.op ⊓ S₂.op

{G : Type u_2}
[AddGroup G]
(S₁ S₂ : AddSubgroup G)


@[to_additive (attr := simp, nolint simpNF)]
theorem Finset.tprod_subtype (s : Finset β) (f : β → α) :
    ∏' x : { x // x ∈ s }, f x = ∏ x ∈ s, f x

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
(s : Finset β)
(f : β → α)

∏' (x : { x // x ∈ s }), f ↑x = ∏ x ∈ s, f x


@[simp]
theorem top_σ : (@Realizer.top α).σ = Unit


{α : Type u_1}
[LinearOrderedRing α]
(x : α)


theorem swap_injective : Function.Injective (@swap α β)


/-- The functor from augmented objects to arrows. -/
@[simps!]
def toArrow : Augmented C ⥤ Arrow C

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

∀ {X Y : CategoryTheory.CosimplicialObject.Augmented C} (η : X ⟶ Y),
  (CategoryTheory.CosimplicialObject.Augmented.toArrow.map η).right = η.right.app (SimplexCategory.mk 0)


@[simp]
theorem count_sub (a : α) (s t : Multiset α) : count a (s - t) = count a s - count a t

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

Multiset.count a (s - t) = Multiset.count a s - Multiset.count a t


theorem mapBicone_whisker {K : Type w₂} {g : K ≃ J} {f : J → C} (c : Bicone f) :
    F.mapBicone (c.whisker g) = (F.mapBicone c).whisker g


theorem interior_subset : interior s ⊆ s

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


@[simp]
theorem _root_.Set.up_one : up (1 : Set α) = 1


@[simp]
theorem mem_insertNone {s : Finset α} : ∀ {o : Option α}, o ∈ insertNone s ↔ ∀ a ∈ o, a ∈ s

{α : Type u_1}
{s : Finset α}
{o : Option α}

o ∈ Finset.insertNone s ↔ ∀ a ∈ o, a ∈ s


@[simp]
theorem prev_nat_zero : (ComplexShape.up ℕ).prev 0 = 0


@[to_additive (attr := simp)] -- TODO: make this a scoped instance in the `Pointwise` namespace
lemma mul_neBot_iff : (f * g).NeBot ↔ f.NeBot ∧ g.NeBot


theorem PairwiseDisjoint.elim_set {s : Set ι} {f : ι → Set α} (hs : s.PairwiseDisjoint f) {i j : ι}
    (hi : i ∈ s) (hj : j ∈ s) (a : α) (hai : a ∈ f i) (haj : a ∈ f j) : i = j

{α : Type u_1}
{ι : Type u_4}
{s : Set ι}
{f : ι → Set α}
(hs : s.PairwiseDisjoint f)
{i j : ι}
(hi : i ∈ s)
(hj : j ∈ s)
(a : α)
(hai : a ∈ f i)
(haj : a ∈ f j)


@[simp]
theorem sup_lie : ⁅I ⊔ J, N⁆ = ⁅I, N⁆ ⊔ ⁅J, N⁆

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


lemma desc_f (j k : ι) (hjk : c.Rel j k) :
    (desc φ α hα).f j = fstX φ j _ hjk ≫ hα.hom _ j + sndX φ j ≫ α.f j

(HomologicalComplex.homotopyCofiber.desc φ α hα).f j =
  HomologicalComplex.homotopyCofiber.fstX φ j k hjk ≫ hα.hom k j + HomologicalComplex.homotopyCofiber.sndX φ j ≫ α.f j


@[simp]
theorem truncateFun_zero : truncateFun n (0 : 𝕎 R) = 0

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


/-- If `K / E / F` is a ring extension tower, `L` is a subalgebra of `K / F` which is generated by
`S` as an `F`-module, then `E[L]` is generated by `S` as an `E`-module. -/
theorem Subalgebra.adjoin_eq_span_of_eq_span {S : Set K} (h : toSubmodule L = span F S) :
    toSubmodule (adjoin E (L : Set K)) = span E S

(h : Subalgebra.toSubmodule L = Submodule.span F S)

Subalgebra.toSubmodule (Algebra.adjoin E ↑L) = Submodule.span E S


/-- Inversion on a `Group` or `GroupWithZero` is a permutation of the underlying type. -/
@[to_additive (attr := simps! (config := .asFn) apply)
    "Negation on an `AddGroup` is a permutation of the underlying type."]
protected def inv : Perm G


@[simp]
lemma uIcc_of_le (h : a ≤ b) : [[a, b]] = Icc a b

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


@[simp]
theorem periodicOrbit_length : (periodicOrbit f x).length = minimalPeriod f x

(Function.periodicOrbit f x).length = Function.minimalPeriod f x


theorem iSup_eq_of_forall_le_of_tendsto {x : R} {as : ι → R} (le_x : ∀ i, as i ≤ x) {F : Filter ι}
    [Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) : ⨆ i, as i = x

{ι : Type u_1}
{R : Type u_4}
[CompleteLinearOrder R]
[TopologicalSpace R]
[OrderTopology R]
{x : R}
{as : ι → R}
(le_x : ∀ (i : ι), as i ≤ x)
{F : Filter ι}
[F.NeBot]
(as_lim : Filter.Tendsto as F (𝓝 x))


/-- Construct limit data for a product in `AddCommGrp`, using
`AddCommGrp.of (∀ j, F.obj j)`.
-/
@[simps]
def productLimitCone : Limits.LimitCone (Discrete.functor f)

{J : Type w}
(f : J → AddCommGrp)
(s : CategoryTheory.Limits.Fan f)

(AddCommGrp.HasLimit.productLimitCone f).isLimit.lift s = AddCommGrp.HasLimit.lift f s


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


theorem Codisjoint.ne (ha : a ≠ ⊤) (hab : Codisjoint a b) : a ≠ b

{α : Type u_1}
[PartialOrder α]
[OrderTop α]
{a b : α}
(ha : a ≠ ⊤)
(hab : Codisjoint a b)


@[simp]
theorem Basis.equivFun_ofEquivFun [Finite ι] (e : M ≃ₗ[R] ι → R) :
    (Basis.ofEquivFun e).equivFun = e

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Finite ι]
(e : M ≃ₗ[R] ι → R)


@[simp, norm_cast] lemma coe_negPart (f : α →ᵇ β) : ⇑f⁻ = (⇑f)⁻

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[NormedLatticeAddCommGroup β]
(f : BoundedContinuousFunction α β)


@[to_additive (attr := measurability)]
theorem _root_.Finset.stronglyMeasurable_prod' {ι : Type*} {f : ι → α → M} (s : Finset ι)
    (hf : ∀ i ∈ s, StronglyMeasurable (f i)) : StronglyMeasurable (∏ i ∈ s, f i)

(hf : ∀ i ∈ s, MeasureTheory.StronglyMeasurable (f i))

MeasureTheory.StronglyMeasurable (∑ i ∈ s, f i)


/-- Homotopy between morphisms of short complexes is compatible with addition. -/
@[simps]
def add (h : Homotopy φ₁ φ₂) (h' : Homotopy φ₃ φ₄) : Homotopy (φ₁ + φ₃) (φ₂ + φ₄)

{φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂}

(h : CategoryTheory.ShortComplex.Homotopy φ₁ φ₂)

(h' : CategoryTheory.ShortComplex.Homotopy φ₃ φ₄)


@[simp]
theorem chainHeight_empty : (∅ : Set α).chainHeight = 0


theorem IsStoppingTime.measurableSet_lt_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
    MeasurableSet[f j] {ω | τ ω < i}

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
[TopologicalSpace ι]
[OrderTopology ι]
[FirstCountableTopology ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
{i j : ι}
(hle : i ≤ j)


@[simp]
theorem Ioc_union_Ioc_left : Ioc a c ∪ Ioc b c = Ioc (min a b) c

{α : Type u_1}
[LinearOrder α]
{a b c : α}

Set.Ioc a c ∪ Set.Ioc b c = Set.Ioc (min a b) c


/-- The kernel of `biproduct.toSubtype f p` is `⨁ Subtype.restrict pᶜ f`. -/
@[simps!]
def kernelBiproductToSubtypeIso (p : Set K) :
    kernel (biproduct.toSubtype f p) ≅ ⨁ Subtype.restrict pᶜ f

(CategoryTheory.Limits.kernelBiproductToSubtypeIso f p).hom =
  (CategoryTheory.Limits.KernelFork.IsLimit.ofι (CategoryTheory.Limits.biproduct.fromSubtype f pᶜ) ⋯
        (fun {W} g x => g ≫ CategoryTheory.Limits.biproduct.toSubtype f pᶜ) ⋯ ⋯).lift
    (CategoryTheory.Limits.limit.cone
      (CategoryTheory.Limits.parallelPair (CategoryTheory.Limits.biproduct.toSubtype f p) 0))


theorem isBigO_sub {f : E → F} (h : IsBoundedLinearMap 𝕜 f) (l : Filter E) (x : E) :
    (fun x' => f (x' - x)) =O[l] fun x' => x' - x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(h : IsBoundedLinearMap 𝕜 f)
(l : Filter E)
(x : E)


@[simp]
theorem hasDerivWithinAt_Iio_iff_Iic [PartialOrder 𝕜] :
    HasDerivWithinAt f f' (Iio x) x ↔ HasDerivWithinAt f f' (Iic x) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
[PartialOrder 𝕜]

HasDerivWithinAt f f' (Set.Iio x) x ↔ HasDerivWithinAt f f' (Set.Iic x) x


@[simp] theorem append_sublist_append_right (l) : l₁ ++ l <+ l₂ ++ l ↔ l₁ <+ l₂

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


theorem IsInitial.subsingleton_to (hI : IsInitial I) {A : C} : Subsingleton (A ⟶ I)

(hI : CategoryTheory.Limits.IsInitial I)


lemma isZero₁_iff : IsZero T.obj₁ ↔ (T.mor₁ = 0 ∧ T.mor₃ = 0)

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.Limits.IsZero T.obj₁ ↔ T.mor₁ = 0 ∧ T.mor₃ = 0


protected lemma zero_smul : smul α φ 0 m = 0

{J : CategoryTheory.GrothendieckTopology C}

PresheafOfModules.Sheafify.smul α φ 0 m = 0


@[to_additive]
theorem mulIndicator_inv (s : Set α) (f : α → G) :
    (mulIndicator s fun a => (f a)⁻¹) = fun a => (mulIndicator s f a)⁻¹

{α : Type u_1}
{G : Type u_6}
[AddGroup G]
(s : Set α)
(f : α → G)

(s.indicator fun a => -f a) = fun a => -s.indicator f a


@[to_additive (attr := simp)]
theorem equivLike_inv_eq_symm (f : M ≃* N) : EquivLike.inv f = f.symm

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
(f : M ≃+ N)


theorem NullMeasurable.congr {g : α → β} (hf : NullMeasurable f μ) (hg : f =ᵐ[μ] g) :
    NullMeasurable g μ

{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
{g : α → β}
(hf : MeasureTheory.NullMeasurable f μ)
(hg : f =ᵐ[μ] g)


lemma cfcₙ_mul : cfcₙ (fun x ↦ f x * g x) a = cfcₙ f a * cfcₙ g a

(hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac)

(hg : ContinuousOn g (σₙ R a) := by cfc_cont_tac)

cfcₙ (fun x => f x * g x) a = cfcₙ f a * cfcₙ g a


theorem continuous_coe : Continuous ((↑) : ℍ → ℂ)


theorem coe_continuousLinearEquivAt_eq (e : Trivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) :
    (e.continuousLinearEquivAt R b hb : E b → F) = e.continuousLinearMapAt R b

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

⇑(Trivialization.continuousLinearEquivAt R e b hb) = ⇑(Trivialization.continuousLinearMapAt R e b)


theorem EuclideanSpace.closedBall_zero_eq {n : Type*} [Fintype n] (r : ℝ) (hr : 0 ≤ r) :
    Metric.closedBall (0 : EuclideanSpace ℝ n) r = {x | ∑ i, x i ^ 2 ≤ r ^ 2}

{n : Type u_8}
[Fintype n]
(r : ℝ)
(hr : 0 ≤ r)

Metric.closedBall 0 r = {x | ∑ i : n, x i ^ 2 ≤ r ^ 2}


theorem cmp_swap (m) : ∀ n, (cmp m n).swap = cmp n m


theorem map₂_inf_subset_left : map₂ m (f₁ ⊓ f₂) g ≤ map₂ m f₁ g ⊓ map₂ m f₂ g

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

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


theorem realize_constantsVarsEquivLeft [L[[α]].Structure M]
    [(lhomWithConstants L α).IsExpansionOn M] {n} {t : L[[α]].Term (β ⊕ (Fin n))} {v : β → M}
    {xs : Fin n → M} :
    (constantsVarsEquivLeft t).realize (Sum.elim (Sum.elim (fun a => ↑(L.con a)) v) xs) =
      t.realize (Sum.elim v xs)

{t : (L.withConstants α).Term (β ⊕ Fin n)}

FirstOrder.Language.Term.realize (Sum.elim (Sum.elim (fun a => ↑(L.con a)) v) xs)
    (FirstOrder.Language.Term.constantsVarsEquivLeft t) =
  FirstOrder.Language.Term.realize (Sum.elim v xs) t


@[simp]
theorem coe_prod (K : CompactOpens α) (L : CompactOpens β) :
    (K.prod L : Set (α × β)) = (K : Set α) ×ˢ (L : Set β)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(K : TopologicalSpace.CompactOpens α)
(L : TopologicalSpace.CompactOpens β)


@[to_additive (attr := simp)] lemma div_apply (f g : M →* G) (x : M) : (f / g) x = f x / g x

{M : Type u_3}
{G : Type u_6}
[AddZeroClass M]
[AddCommGroup G]
(f g : M →+ G)
(x : M)


theorem theory_model_iff (f : M ↪ₑ[L] N) (T : L.Theory) : M ⊨ T ↔ N ⊨ T

{L : FirstOrder.Language}
{M : Type u_1}
{N : Type u_2}
[L.Structure M]
[L.Structure N]
(f : M ↪ₑ[L] N)
(T : L.Theory)


@[simp]
theorem union_entries {s₁ s₂ : AList β} : (s₁ ∪ s₂).entries = kunion s₁.entries s₂.entries

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{s₁ s₂ : AList β}

(s₁ ∪ s₂).entries = s₁.entries.kunion s₂.entries


@[simp] theorem casesAuxOn_zero {motive : Nat → Sort _} (zero : motive 0)
    (succ : ∀ n, motive (n+1)) :
    Nat.casesAuxOn 0 zero succ = zero

{motive : Nat → Sort u_1}
(zero : motive 0)
(succ : (n : Nat) → motive (n + 1))


theorem Matrix.blockDiagonal_tsum [DecidableEq p] [T2Space R] {f : X → p → Matrix m n R} :
    blockDiagonal (∑' x, f x) = ∑' x, blockDiagonal (f x)

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{p : Type u_6}
{R : Type u_8}
[AddCommMonoid R]
[TopologicalSpace R]
[DecidableEq p]
[T2Space R]
{f : X → p → Matrix m n R}

Matrix.blockDiagonal (∑' (x : X), f x) = ∑' (x : X), Matrix.blockDiagonal (f x)


theorem lcs_le_iff (k : ℕ) : N₁.lcs k ≤ N₂ ↔ N₁ ≤ N₂.ucs k

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{N₁ N₂ : LieSubmodule R L M}
(k : ℕ)

LieSubmodule.lcs k N₁ ≤ N₂ ↔ N₁ ≤ LieSubmodule.ucs k N₂


@[simp] lemma finRotate_zero : finRotate 0 = Equiv.refl _


theorem homogeneousComponent_isHomogeneous : (homogeneousComponent n φ).IsHomogeneous n

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
(n : ℕ)
(φ : MvPolynomial σ R)

((MvPolynomial.homogeneousComponent n) φ).IsHomogeneous n


private theorem leftInvSeq_eq_reverse_rightInvSeq_reverse (ω : List B) :
    lis ω = (ris ω.reverse).reverse

{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)
(ω : List B)

cs.leftInvSeq ω = (cs.rightInvSeq ω.reverse).reverse


@[simp] lemma Finset.card_pi (s : Finset ι) (t : ∀ i, Finset (α i)) :
    (s.pi t).card = ∏ i ∈ s, card (t i)

{ι : Type u_4}
{α : ι → Type u_6}
[DecidableEq ι]
(s : Finset ι)
(t : (i : ι) → Finset (α i))


theorem strictAnti_mul_left [ExistsAddOfLE α] [PosMulStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· < ·)] [ContravariantClass α α (swap (· + ·)) (· < ·)]
    {a : α} (ha : a < 0) : StrictAnti (a * ·)

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

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


theorem PointedMap.mk_val {Γ Γ'} [Inhabited Γ] [Inhabited Γ'] (f : Γ → Γ') (pt) :
    (PointedMap.mk f pt : Γ → Γ') = f

{Γ : Type u_1}
{Γ' : Type u_2}
[Inhabited Γ]
[Inhabited Γ']
(f : Γ → Γ')
(pt : f default = default)


@[simp]
theorem toSet_empty : toSet ∅ = ∅


/-- A side of a right-angled triangle divided by the sine of the opposite angle equals the
hypotenuse. -/
theorem dist_div_sin_angle_of_angle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∠ p₁ p₂ p₃ = π / 2)
    (h0 : p₁ ≠ p₂ ∨ p₃ = p₂) : dist p₁ p₂ / Real.sin (∠ p₂ p₃ p₁) = dist p₁ p₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}
(h : ∠ p₁ p₂ p₃ = π / 2)
(h0 : p₁ ≠ p₂ ∨ p₃ = p₂)


theorem HasBasis.prod_pprod (hla : la.HasBasis pa sa) (hlb : lb.HasBasis pb sb) :
    (la ×ˢ lb).HasBasis (fun i : PProd ι ι' => pa i.1 ∧ pb i.2) fun i => sa i.1 ×ˢ sb i.2

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{ι' : Sort u_5}
{la : Filter α}
{pa : ι → Prop}
{sa : ι → Set α}
{lb : Filter β}
{pb : ι' → Prop}
{sb : ι' → Set β}
(hla : la.HasBasis pa sa)
(hlb : lb.HasBasis pb sb)

(la ×ˢ lb).HasBasis (fun i => pa i.fst ∧ pb i.snd) fun i => sa i.fst ×ˢ sb i.snd


@[simp]
theorem edist_toLp_zero (f : α → E) (hf : Memℒp f p μ) : edist (hf.toLp f) 0 = eLpNorm f p μ

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

edist (MeasureTheory.Memℒp.toLp f hf) 0 = MeasureTheory.eLpNorm f p μ


private theorem soln_deriv_norm : ‖F.derivative.eval soln‖ = ‖F.derivative.eval a‖

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

‖Polynomial.eval (soln_gen hnorm) (Polynomial.derivative F)‖ = ‖Polynomial.eval a (Polynomial.derivative F)‖


/-- Consider a sigma-compact group acting continuously and transitively on a Baire space. Then
the orbit map is open. This is a version of the open mapping theorem, valid notably for the
action of a sigma-compact locally compact group on a locally compact space. -/
@[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a
Baire space. Then the orbit map is open. This is a version of the open mapping theorem, valid
notably for the action of a sigma-compact locally compact group on a locally compact space."]
theorem isOpenMap_smul_of_sigmaCompact (x : X) : IsOpenMap (fun (g : G) ↦ g • x)

{G : Type u_1}
{X : Type u_2}
[TopologicalSpace G]
[TopologicalSpace X]
[Group G]
[TopologicalGroup G]
[MulAction G X]
[SigmaCompactSpace G]
[BaireSpace X]
[T2Space X]
[ContinuousSMul G X]
[MulAction.IsPretransitive G X]
(x : X)


/-- If `f x y` is continuous in `x` for all `y ∈ s`,
then the set of `x` such that `f x` maps `s` to `t` is closed. -/
lemma IsClosed.setOf_mapsTo {α : Type*} {f : X → α → Z} {s : Set α} {t : Set Z} (ht : IsClosed t)
    (hf : ∀ a ∈ s, Continuous (f · a)) : IsClosed {x | MapsTo (f x) s t}

(hf : ∀ a ∈ s, Continuous fun x => f x a)


@[simp]
theorem coe_mul (e e' : E ≃ₗᵢ[R] E) : ⇑(e * e') = e ∘ e'

{R : Type u_1}
{E : Type u_5}
[Semiring R]
[SeminormedAddCommGroup E]
[Module R E]
(e e' : E ≃ₗᵢ[R] E)


theorem blsub_le_bsup_succ {o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) :
    blsub.{_, v} o f ≤ succ (bsup.{_, v} o f)

(f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v})


/-- A sequence that converges uniformly is also uniformly Cauchy -/
theorem TendstoUniformlyOnFilter.uniformCauchySeqOnFilter (hF : TendstoUniformlyOnFilter F f p p') :
    UniformCauchySeqOnFilter F p p'

{F : ι → α → β}


theorem one_sub_mul (a b : α) : (1 - a) * b = b - a * b


@[reassoc]
theorem leftUnitor_tensor' (X Y : C) :
    (λ_ (X ⊗ Y)).hom = (α_ (𝟙_ C) X Y).inv ≫ ((λ_ X).hom ⊗ 𝟙 Y)

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

(CategoryTheory.MonoidalCategory.leftUnitor (CategoryTheory.MonoidalCategory.tensorObj X Y)).hom =
  (CategoryTheory.MonoidalCategory.associator (𝟙_ C) X Y).inv ≫
    CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.MonoidalCategory.leftUnitor X).hom (𝟙 Y)


@[to_additive]
theorem prod_list_count [DecidableEq α] [CommMonoid α] (s : List α) :
    s.prod = ∏ m ∈ s.toFinset, m ^ s.count m

{α : Type u_3}
[DecidableEq α]
[CommMonoid α]
(s : List α)

s.prod = ∏ m ∈ s.toFinset, m ^ List.count m s


@[simp]
theorem range_toContinuousLinearMap (f : E →ₗ[𝕜] F') :
    range (LinearMap.toContinuousLinearMap f) = range f

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
{F' : Type x}
[AddCommGroup F']
[Module 𝕜 F']
[TopologicalSpace F']
[TopologicalAddGroup F']
[ContinuousSMul 𝕜 F']
[CompleteSpace 𝕜]
[T2Space E]
[FiniteDimensional 𝕜 E]
(f : E →ₗ[𝕜] F')

LinearMap.range (LinearMap.toContinuousLinearMap f) = LinearMap.range f


theorem fg_span {s : Set M} (hs : s.Finite) : FG (span R s)

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set M}
(hs : s.Finite)


theorem normalizeScaleRoots_support : (normalizeScaleRoots p).support ≤ p.support


/-- Construct an isomorphism `H ≅ G.inverse ⋙ F` from an isomorphism `G.functor ⋙ H ≅ F`. -/
@[simps!]
def isoInverseComp {G : C ≌ D} (i : G.functor ⋙ H ≅ F) : H ≅ G.inverse ⋙ F

{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 E}
{H : CategoryTheory.Functor D E}
{G : C ≌ D}
(i : G.functor.comp H ≅ F)
(X : D)

i.isoInverseComp.hom.app X =
  CategoryTheory.CategoryStruct.comp (H.map (G.counitIso.inv.app X)) (i.hom.app (G.inverse.obj X))


@[simp]
theorem Int.castAddHom_int : Int.castAddHom ℤ = AddMonoidHom.id ℤ


theorem compMeasurable_toGerm [MeasurableSpace β] [BorelSpace β] [PseudoMetrizableSpace β]
    [PseudoMetrizableSpace γ] [SecondCountableTopology γ] [MeasurableSpace γ]
    [OpensMeasurableSpace γ] (g : β → γ) (hg : Measurable g) (f : α →ₘ[μ] β) :
    (compMeasurable g hg f).toGerm = f.toGerm.map g

(MeasureTheory.AEEqFun.compMeasurable g hg f).toGerm = Filter.Germ.map g f.toGerm


@[simp]
theorem subset_range_of_surjective {f : α → β} (h : Surjective f) (s : Set β) :
    s ⊆ range f

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


@[simp]
protected theorem le_zero {o : Ordinal} : o ≤ 0 ↔ o = 0


@[simp]
lemma ofSequence_map_homOfLE_succ (n : ℕ) :
    (ofSequence f).map (homOfLE (Nat.le_add_right n 1)) = f n

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

(CategoryTheory.Functor.ofSequence f).map (CategoryTheory.homOfLE ⋯) = f n


@[simp, norm_cast] lemma coe_hnot (G' : G.Finsubgraph) : ↑(￢G') = (￢G' : G.Subgraph)

{V : Type u}
{G : SimpleGraph V}
[Finite V]
(G' : G.Finsubgraph)


@[simp]
lemma rTensor_symm_apply_single (d : σ →₀ ℕ) (s : S) (n : N) :
    rTensor.symm (Finsupp.single d (s ⊗ₜ n)) =
      (monomial d s) ⊗ₜ[R] n

{R : Type u}
{N : Type w}
[CommSemiring R]
{σ : Type u_1}
[DecidableEq σ]
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[AddCommMonoid N]
[Module R N]
(d : σ →₀ ℕ)
(s : S)
(n : N)

MvPolynomial.rTensor.symm (Finsupp.single d (s ⊗ₜ[R] n)) = (MvPolynomial.monomial d) s ⊗ₜ[R] n


theorem toOrderRingHom_injective : Injective (toOrderRingHom : α ≃+*o β → α →+*o β)

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


@[simp] lemma sigma_indep_iff {I} :
    (Matroid.sigma M).Indep I ↔ ∀ i, (M i).Indep (Sigma.mk i ⁻¹' I)

{ι : Type u_1}
{α : ι → Type u_2}
{M : (i : ι) → Matroid (α i)}
{I : Set ((i : ι) × α i)}

(Matroid.sigma M).Indep I ↔ ∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' I)


theorem AnalyticOn.comp {s : Set E} {t : Set F} {g : F → G} {f : E → F} (hg : AnalyticOn 𝕜 g t)
    (hf : AnalyticOn 𝕜 f s) (st : Set.MapsTo f s t) : AnalyticOn 𝕜 (g ∘ f) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{s : Set E}
{t : Set F}
{g : F → G}
{f : E → F}
(hg : AnalyticOn 𝕜 g t)
(hf : AnalyticOn 𝕜 f s)
(st : Set.MapsTo f s t)


/-- Involuting an `ite` of an involuted value `x : α` negates the `Prop` condition in the `ite`. -/
protected theorem ite_not (P : Prop) [Decidable P] (x : α) :
    f (ite P x (f x)) = ite (¬P) x (f x)

{α : Sort u}
{f : α → α}
(h : Function.Involutive f)
(P : Prop)
[Decidable P]
(x : α)

f (if P then x else f x) = if ¬P then x else f x


/-- The natural isomorphism between
pulling back a grading along the identity function,
and the identity functor. -/
@[simps]
def comapId : comap C (id : I → I) ≅ 𝟭 (∀ i, C i)

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(CategoryTheory.Pi.comapId I C).hom.app X i = CategoryTheory.CategoryStruct.id X i


theorem IsMaxFilter.neg (hf : IsMaxFilter f l a) : IsMinFilter (fun x => -f x) l a

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


/-- The linear map built from `TensorProduct.map` corresponds to the matrix built from
`Matrix.kronecker`. -/
theorem TensorProduct.toMatrix_map (f : M →ₗ[R] M') (g : N →ₗ[R] N') :
    toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN') (TensorProduct.map f g) =
      toMatrix bM bM' f ⊗ₖ toMatrix bN bN' g

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{M' : Type u_5}
{N' : Type u_6}
{ι : Type u_7}
{κ : Type u_8}
{ι' : Type u_10}
{κ' : Type u_11}
[DecidableEq ι]
[DecidableEq κ]
[Fintype ι]
[Fintype κ]
[Finite ι']
[Finite κ']
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[AddCommGroup M']
[AddCommGroup N']
[Module R M]
[Module R N]
[Module R M']
[Module R N']
(bM : Basis ι R M)
(bN : Basis κ R N)
(bM' : Basis ι' R M')
(bN' : Basis κ' R N')
(f : M →ₗ[R] M')
(g : N →ₗ[R] N')

(LinearMap.toMatrix (bM.tensorProduct bN) (bM'.tensorProduct bN')) (TensorProduct.map f g) =
  Matrix.kroneckerMap (fun x x_1 => x * x_1) ((LinearMap.toMatrix bM bM') f) ((LinearMap.toMatrix bN bN') g)


nonrec theorem IsLocalMin.add (hf : IsLocalMin f a) (hg : IsLocalMin g a) :
    IsLocalMin (fun x => f x + g x) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[OrderedAddCommMonoid β]
{f g : α → β}
{a : α}
(hf : IsLocalMin f a)
(hg : IsLocalMin g a)


@[to_additive]
theorem preimage_image_mk_eq_iUnion_image (N : Subgroup α) (s : Set α) :
    mk ⁻¹' ((mk : α → α ⧸ N) '' s) = ⋃ x : N, (· * (x : α)) '' s

{α : Type u_1}
[Group α]
(N : Subgroup α)
(s : Set α)

QuotientGroup.mk ⁻¹' (QuotientGroup.mk '' s) = ⋃ x, (fun x_1 => x_1 * ↑x) '' s


theorem covering_disjoint_subtype : Pairwise (Disjoint on fun x : h.index => h.covering x)

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{v : VitaliFamily μ}
{f : α → Set (Set α)}
{s : Set α}
(h : v.FineSubfamilyOn f s)

Pairwise (Disjoint on fun x => h.covering ↑x)


@[to_additive (attr := simp, norm_cast)]
theorem coe_toSubgroup : ((U : Subgroup G) : Set G) = U

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


/-- Composition as a bilinear map. -/
@[simps]
def comp (X Y Z : C) : (X ⟶ Y) →ₗ[S] (Y ⟶ Z) →ₗ[S] X ⟶ Z

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{S : Type w}
[CommSemiring S]
[CategoryTheory.Linear S C]
(X Y Z : C)
(f : X ⟶ Y)

(CategoryTheory.Linear.comp X Y Z) f = CategoryTheory.Linear.leftComp S Z f