/-- A morphism in `SimplexCategory` is a monomorphism precisely when it is an injective function
-/
theorem mono_iff_injective {n m : SimplexCategory} {f : n ⟶ m} :
    Mono f ↔ Function.Injective f.toOrderHom

CategoryTheory.Mono f ↔ Function.Injective ⇑(SimplexCategory.Hom.toOrderHom f)


@[simp]
theorem comp_id : φ.comp (CoalgHom.id R A) = φ

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(φ : A →ₗc[R] B)


/-- Uniform isomorphism between `α² = Fin 2 → α` and `α × α`. -/
-- Porting note: made `α` explicit
@[simps! (config := .asFn)]
def finTwoArrow (α : Type*) [UniformSpace α] : (Fin 2 → α) ≃ᵤ α × α

⇑(UniformEquiv.finTwoArrow α).symm = fun x => ![x.1, x.2]


@[to_additive]
theorem Infinite.of_smul_set : (a • s).Infinite → s.Infinite

{α : Type u_2}
{β : Type u_3}
[SMul α β]
{s : Set β}
{a : α}


@[fun_prop]
protected theorem differentiableOn : DifferentiableOn 𝕜 iso s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
(iso : E ≃L[𝕜] F)


@[simp]
theorem mem_avoid : c ∈ (P.avoid b).parts ↔ ∃ d ∈ P.parts, ¬d ≤ b ∧ d \ b = c

{α : Type u_1}
[GeneralizedBooleanAlgebra α]
[DecidableEq α]
{a b c : α}
(P : Finpartition a)


@[simp]
theorem id_f : (𝟙 _ : A ⟶ A).1 = 𝟙 A.1

(A : CategoryTheory.Endofunctor.Algebra F)

(CategoryTheory.CategoryStruct.id A).f = CategoryTheory.CategoryStruct.id A.a


theorem writtenInExtChartAt_extChartAt_symm {x : M} {y : E} (h : y ∈ (extChartAt I x).target) :
    writtenInExtChartAt 𝓘(𝕜, E) I (extChartAt I x x) (extChartAt I x).symm y = y

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
{x : M}
{y : E}
(h : y ∈ (extChartAt I x).target)

writtenInExtChartAt 𝓘(𝕜, E) I (↑(extChartAt I x) x) (↑(extChartAt I x).symm) y = y


theorem continuous_iff'_right [TopologicalSpace β] {f : β → α} :
    Continuous f ↔ ∀ b, Tendsto (fun x => (f b, f x)) (𝓝 b) (𝓤 α)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[TopologicalSpace β]
{f : β → α}

Continuous f ↔ ∀ (b : β), Filter.Tendsto (fun x => (f b, f x)) (𝓝 b) (𝓤 α)


theorem eLpNorm_indicator_eq_eLpNorm_restrict {f : α → F} (hs : MeasurableSet s) :
    eLpNorm (s.indicator f) p μ = eLpNorm f p (μ.restrict s)

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{s : Set α}
{f : α → F}
(hs : MeasurableSet s)

MeasureTheory.eLpNorm (s.indicator f) p μ = MeasureTheory.eLpNorm f p (μ.restrict s)


@[simp]
theorem ContinuousMultilinearMap.curry0_apply (x : G') (m : Fin 0 → G) :
    ContinuousMultilinearMap.curry0 𝕜 G x m = x

(𝕜 : Type u)
{G : Type wG}
{G' : Type wG'}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[NormedAddCommGroup G']
[NormedSpace 𝕜 G']
(x : G')
(m : Fin 0 → G)

(ContinuousMultilinearMap.curry0 𝕜 G x) m = x


@[to_additive (attr := simp) smul_ite]
lemma ite_pow (p : Prop) [Decidable p] (a b : α) (c : β) :
    (if p then a else b) ^ c = if p then a ^ c else b ^ c

{α : Type u_1}
{β : Type u_2}
[SMul β α]
(p : Prop)
[Decidable p]
(a b : α)
(c : β)

(c • if p then a else b) = if p then c • a else c • b


@[simp] theorem isSome_getRight?_iff_isRight : x.getRight?.isSome ↔ x.isRight

x.getRight?.isSome = true ↔ x.isRight = true


/-- Multilinear maps over the ring `R`, from `∀ i, M₁ i` to `M₂` where `M₁ i` and `M₂` are modules
over `R`. -/
structure MultilinearMap (R : Type uR) {ι : Type uι} (M₁ : ι → Type v₁) (M₂ : Type v₂) [Semiring R]
  [∀ i, AddCommMonoid (M₁ i)] [AddCommMonoid M₂] [∀ i, Module R (M₁ i)] [Module R M₂] where
  /-- The underlying multivariate function of a multilinear map. -/
  toFun : (∀ i, M₁ i) → M₂
  /-- A multilinear map is additive in every argument. -/
  map_add' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (x y : M₁ i),
      toFun (update m i (x + y)) = toFun (update m i x) + toFun (update m i y)
  /-- A multilinear map is compatible with scalar multiplication in every argument. -/
  map_smul' :
    ∀ [DecidableEq ι] (m : ∀ i, M₁ i) (i : ι) (c : R) (x : M₁ i),
      toFun (update m i (c • x)) = c • toFun (update m i x)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(self : MultilinearMap R M₁ M₂)
[DecidableEq ι]
(m : (i : ι) → M₁ i)
(i : ι)
(x y : M₁ i)

self.toFun (Function.update m i (x + y)) = self.toFun (Function.update m i x) + self.toFun (Function.update m i y)


/-- `ModularFormClass F Γ k` says that `F` is a type of bundled functions that extend
`SlashInvariantFormClass` by requiring that the functions be holomorphic and bounded
at infinity. -/
class ModularFormClass (F : Type*) (Γ : outParam <| Subgroup (SL(2, ℤ))) (k : outParam ℤ)
    [FunLike F ℍ ℂ] extends SlashInvariantFormClass F Γ k : Prop where
  holo : ∀ f : F, MDifferentiable 𝓘(ℂ) 𝓘(ℂ) (f : ℍ → ℂ)
  bdd_at_infty : ∀ (f : F) (A : SL(2, ℤ)), IsBoundedAtImInfty (f ∣[k] A)

{F : Type u_2}
{Γ : outParam (Subgroup SL(2, ℤ))}
{k : outParam ℤ}
[FunLike F ℍ ℂ]
[self : ModularFormClass F Γ k]
(f : F)


@[to_additive (attr := simp)]
theorem toEquiv_mulRight (g : G) : (mulRight g).toEquiv = Equiv.mulRight g

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul G]
(g : G)

(MeasurableEquiv.mulRight g).toEquiv = Equiv.mulRight g


@[fun_prop]
theorem HasStrictFDerivAt.neg (h : HasStrictFDerivAt f f' x) :
    HasStrictFDerivAt (fun x => -f x) (-f') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
(h : HasStrictFDerivAt f f' x)


lemma ih1_neg_right : IH1 x y → IH1 x (-y)

Surreal.Multiplication.IH1 x y → Surreal.Multiplication.IH1 x (-y)


theorem sub_mem_orthogonal_of_inner_right {x y : E} (h : ∀ v : K, ⟪(v : E), x⟫ = ⟪(v : E), y⟫) :
    x - y ∈ Kᗮ

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K : Submodule 𝕜 E}
{x y : E}
(h : ∀ (v : ↥K), ⟪↑v, x⟫_𝕜 = ⟪↑v, y⟫_𝕜)


@[simp]
theorem edges_cons {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    (cons h p).edges = s(u, v) :: p.edges

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

(SimpleGraph.Walk.cons h p).edges = s(u, v) :: p.edges


@[simp]
theorem trivialization_source : (trivialization B F).source = univ

(B : Type u_1)
(F : Type u_2)
[TopologicalSpace B]
[TopologicalSpace F]

(Bundle.Trivial.trivialization B F).source = Set.univ


@[simp]
theorem dimH_bUnion {s : Set ι} (hs : s.Countable) (t : ι → Set X) :
    dimH (⋃ i ∈ s, t i) = ⨆ i ∈ s, dimH (t i)

{ι : Type u_1}
{X : Type u_2}
[EMetricSpace X]
{s : Set ι}
(hs : s.Countable)
(t : ι → Set X)


theorem separable_def' (f : R[X]) : f.Separable ↔ ∃ a b : R[X], a * f + b * (derivative f) = 1

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

f.Separable ↔ ∃ a b, a * f + b * Polynomial.derivative f = 1


theorem fst_eq_snd_of_mono_eq [Mono f] : pullback.fst f f = pullback.snd f f

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

CategoryTheory.Limits.pullback.fst f f = CategoryTheory.Limits.pullback.snd f f


theorem neighborSet_compl (G : SimpleGraph V) (v : V) :
    Gᶜ.neighborSet v = (G.neighborSet v)ᶜ \ {v}

{V : Type u}
(G : SimpleGraph V)
(v : V)


@[simp]
theorem periodicOrbit_eq_nil_iff_not_periodic_pt :
    periodicOrbit f x = Cycle.nil ↔ x ∉ periodicPts f

Function.periodicOrbit f x = Cycle.nil ↔ x ∉ Function.periodicPts f


/-- The associator as a natural isomorphism. -/
@[simps!]
def associatorNatIso : leftAssocTensor C ≅ rightAssocTensor C

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

(CategoryTheory.MonoidalCategory.associatorNatIso C).hom.app X =
  (CategoryTheory.MonoidalCategory.associator X.1 X.2.1 X.2.2).hom


theorem card_support_le_one_iff_monomial {f : R[X]} :
    Finset.card f.support ≤ 1 ↔ ∃ n a, f = monomial n a

{R : Type u}
[Semiring R]
{f : Polynomial R}

f.support.card ≤ 1 ↔ ∃ n a, f = (Polynomial.monomial n) a


theorem eLpNorm_const (c : F) (h0 : p ≠ 0) (hμ : μ ≠ 0) :
    eLpNorm (fun _ : α => c) p μ = (‖c‖₊ : ℝ≥0∞) * μ Set.univ ^ (1 / ENNReal.toReal p)

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
(c : F)
(h0 : p ≠ 0)
(hμ : μ ≠ 0)

MeasureTheory.eLpNorm (fun x => c) p μ = ↑‖c‖₊ * μ Set.univ ^ (1 / p.toReal)


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

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


@[simp]
protected theorem le_sup_iff (ha : ⊥ < a) : a ≤ s.sup f ↔ ∃ b ∈ s, a ≤ f b

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
[OrderBot α]
{s : Finset ι}
{f : ι → α}
{a : α}
(ha : ⊥ < a)


@[simp]
lemma preimage_coe_Iic (y : ℝ) : Real.toEReal ⁻¹' Iic y = Iic y


/-- Families of `AddMonoidHom`s preserving `DirectSum.One.one` and `DirectSum.Mul.mul`
are isomorphic to `RingHom`s on `⨁ i, A i`. This is a stronger version of `DFinsupp.liftAddHom`.
-/
@[simps]
def liftRingHom :
    { f : ∀ {i}, A i →+ R //
        f GradedMonoid.GOne.one = 1 ∧
          ∀ {i j} (ai : A i) (aj : A j), f (GradedMonoid.GMul.mul ai aj) = f ai * f aj } ≃
      ((⨁ i, A i) →+* R)

(f :
  { f //
    f GradedMonoid.GOne.one = 1 ∧ ∀ {i j : ι} (ai : A i) (aj : A j), f (GradedMonoid.GMul.mul ai aj) = f ai * f aj })

DirectSum.liftRingHom f = DirectSum.toSemiring (fun x => ↑f) ⋯ ⋯


theorem LinearMap.toMatrix₂'_mul (B : (n → R) →ₗ[R] (m → R) →ₗ[R] R) (M : Matrix m m' R) :
    toMatrix₂' R B * M = toMatrix₂' R (B.compl₂ <| toLin' M)

{n : Type u_12}
{m : Type u_13}
{m' : Type u_15}
{R : Type u_17}
[CommSemiring R]
[Fintype n]
[Fintype m]
[DecidableEq n]
[DecidableEq m]
[Fintype m']
[DecidableEq m']
(B : (n → R) →ₗ[R] (m → R) →ₗ[R] R)
(M : Matrix m m' R)

(LinearMap.toMatrix₂' R) B * M = (LinearMap.toMatrix₂' R) (B.compl₂ (Matrix.toLin' M))


theorem Heap.WF.merge' (h₁ : s₁.WF le n) (h₂ : s₂.WF le n) :
    (merge le s₁ s₂).WF le n ∧ ((s₁.rankGT n ↔ s₂.rankGT n) → (merge le s₁ s₂).rankGT n)

∀ {α : Type u_1} {le : α → α → Bool} {s₁ s₂ : Batteries.BinomialHeap.Imp.Heap α} {n : Nat},
  Batteries.BinomialHeap.Imp.Heap.WF le n s₁ →
    Batteries.BinomialHeap.Imp.Heap.WF le n s₂ →
      Batteries.BinomialHeap.Imp.Heap.WF le n (Batteries.BinomialHeap.Imp.Heap.merge le s₁ s₂) ∧
        ((s₁.rankGT n ↔ s₂.rankGT n) → (Batteries.BinomialHeap.Imp.Heap.merge le s₁ s₂).rankGT n)


/--
If `B` is a strict bicategory and `I` is a (1-)category, any functor (of 1-categories) `I ⥤ B` can
be promoted to an oplax functor from `LocallyDiscrete I` to `B`.
-/
@[simps]
def Functor.toOplaxFunctor (F : I ⥤ B) : OplaxFunctor (LocallyDiscrete I) B

{I : Type u₁}
[CategoryTheory.Category.{v₁, u₁} I]
{B : Type u₂}
[CategoryTheory.Bicategory B]
[CategoryTheory.Bicategory.Strict B]
(F : CategoryTheory.Functor I B)

∀ {a b : CategoryTheory.LocallyDiscrete I} {f g : a ⟶ b} (η : f ⟶ g), F.toOplaxFunctor.map₂ η = CategoryTheory.eqToHom ⋯


@[reassoc, simp]
theorem id_whiskerLeft {X Y : C} (f : X ⟶ Y) :
    𝟙_ C ◁ f = (λ_ X).hom ≫ f ≫ (λ_ Y).inv

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

CategoryTheory.MonoidalCategory.whiskerLeft (𝟙_ C) f =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.leftUnitor X).hom
    (CategoryTheory.CategoryStruct.comp f (CategoryTheory.MonoidalCategory.leftUnitor Y).inv)


@[to_additive] lemma leOnePart_le_one : a⁻ᵐ ≤ 1 ↔ a⁻¹ ≤ 1

{α : Type u_1}
[Lattice α]
[Group α]
{a : α}

a⁻ᵐ ≤ 1 ↔ a⁻¹ ≤ 1


{K : Type u_3}
[DivisionMonoid K]
[HasDistribNeg K]
{a : K}


@[simps! tensorObj tensorHom tensorUnit whiskerLeft whiskerRight associator]
instance prodMonoidal : MonoidalCategory (C₁ × C₂)

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


@[to_additive]
protected theorem one_def : (1 : R[S⁻¹]) = 1 /ₒ 1

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]


@[simp]
theorem toPartialHomeomorph_target (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) (hs : IsOpen s) :
    (hf.toPartialHomeomorph f s hc hs).target = f '' s

(hc : Subsingleton E ∨ c < ‖↑f'.symm‖₊⁻¹)

(ApproximatesLinearOn.toPartialHomeomorph f s hf hc hs).target = f '' s


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

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


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

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


@[simp]
theorem ofReal_sin_ofReal_re (x : ℝ) : ((sin x).re : ℂ) = sin x


theorem not_isSuccLimit_iff_exists_covBy (a : α) : ¬IsSuccLimit a ↔ ∃ b, b ⋖ a


/-- Euler's product formula for the totient function. -/
theorem totient_eq_div_primeFactors_mul (n : ℕ) :
    φ n = (n / ∏ p ∈ n.primeFactors, p) * ∏ p ∈ n.primeFactors, (p - 1)

n.totient = (n / ∏ p ∈ n.primeFactors, p) * ∏ p ∈ n.primeFactors, (p - 1)


@[simp]
theorem inv_mul_cancel_of_invertible (a : α) [Invertible a] : a⁻¹ * a = 1

{α : Type u}
[GroupWithZero α]
(a : α)
[Invertible a]


theorem FormallyUnramified.iff_subsingleton_kaehlerDifferential :
    FormallyUnramified R S ↔ Subsingleton (Ω[S⁄R])

{R S : Type u}
[CommRing R]
[CommRing S]
[Algebra R S]

Algebra.FormallyUnramified R S ↔ Subsingleton (Ω[S⁄R])


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


/-- Invertibility in the exterior algebra is the same as invertibility of the base ring. -/
@[simps!]
def invertibleAlgebraMapEquiv (r : R) :
    Invertible (algebraMap R (ExteriorAlgebra R M) r) ≃ Invertible r

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

∀ (x : Invertible r),
  (⅟((algebraMap R (ExteriorAlgebra R M)) r)).toQuot =
    Quot.mk (RingQuot.Rel (CliffordAlgebra.Rel 0)) ((algebraMap R (TensorAlgebra R M)) ⅟r)


protected theorem le_of_add_le_add_right {a b c : Nat} : a + b ≤ c + b → a ≤ c


theorem real_inner_eq_re_inner (x y : E) :
    @Inner.inner ℝ E (Inner.rclikeToReal 𝕜 E) x y = re ⟪x, y⟫

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(x y : E)


theorem list_sum_mul_self (l : List R) : l.sum * l.sum = (List.map (fun x => x * x) l).sum

{R : Type u_1}
[CommSemiring R]
[CharP R 2]
(l : List R)


theorem Nonempty.to_subtype : s.Nonempty → Nonempty (↥s)


theorem measure_zero_or_one_of_measurableSet_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    μ t = 0 ∨ μ t = 1

(h_indep : ProbabilityTheory.iIndep s μ)

(hns : Directed (fun x x_1 => x ≤ x_1) ns)


theorem not_infinite_mul {x y : ℝ*} (hx : ¬Infinite x) (hy : ¬Infinite y) : ¬Infinite (x * y)

{x y : ℝ*}
(hx : ¬x.Infinite)
(hy : ¬y.Infinite)


@[simp]
theorem nonempty_pprod {α β} : Nonempty (PProd α β) ↔ Nonempty α ∧ Nonempty β


@[to_additive]
theorem ext_iff₂ {_ : MulOneClass M} {_ : MulOneClass N} {_ : CommMonoid P} {f g : M →* N →* P} :
    f = g ↔ ∀ x y, f x y = g x y

{M : Type uM}
{N : Type uN}
{P : Type uP}

∀ {x : AddZeroClass M} {x_1 : AddZeroClass N} {x_2 : AddCommMonoid P} {f g : M →+ N →+ P},
  f = g ↔ ∀ (x_3 : M) (y : N), (f x_3) y = (g x_3) y


/-- The `Submodule.LinearDisjoint.rank_le_one_of_commute_of_flat_of_self`
for commutative rings. -/
theorem rank_le_one_of_flat_of_self (H : M.LinearDisjoint M) [Module.Flat R M] :
    Module.rank R M ≤ 1

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{M : Submodule R S}
(H : M.LinearDisjoint M)
[Module.Flat R ↥M]


theorem listDecode_encode_list (l : List (L.Term α)) :
    listDecode (l.bind listEncode) = l

{L : FirstOrder.Language}
{α : Type u'}
(l : List (L.Term α))

FirstOrder.Language.Term.listDecode (l.bind FirstOrder.Language.Term.listEncode) = l


theorem OrderIso.concaveOn_symm (f : α ≃o β) (hf : ConvexOn 𝕜 univ f) :
    ConcaveOn 𝕜 univ f.symm

{𝕜 : Type u_1}
{α : Type u_4}
{β : Type u_5}
[OrderedSemiring 𝕜]
[OrderedAddCommMonoid α]
[SMul 𝕜 α]
[OrderedAddCommMonoid β]
[SMul 𝕜 β]
(f : α ≃o β)
(hf : ConvexOn 𝕜 Set.univ ⇑f)


/--
The evaluation functor at `i : I`, sending an `I`-indexed family of objects to the object over `i`.
-/
@[simps]
def eval (i : I) : (∀ i, C i) ⥤ C i

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

∀ {X Y : (i : I) → C i} (α : X ⟶ Y), (CategoryTheory.Pi.eval C i).map α = α i


lemma unzero_mul {x y : WithZero α} (hxy : x * y ≠ 0) :
    unzero hxy = unzero (left_ne_zero_of_mul hxy) * unzero (right_ne_zero_of_mul hxy)

{α : Type u_1}
[Mul α]
{x y : WithZero α}
(hxy : x * y ≠ 0)

WithZero.unzero hxy = WithZero.unzero ⋯ * WithZero.unzero ⋯


theorem UniformSpace.Core.ext :
    ∀ {u₁ u₂ : UniformSpace.Core α}, u₁.uniformity = u₂.uniformity → u₁ = u₂

{α : Type ua}
{u₁ u₂ : UniformSpace.Core α}


lemma comap_surjective [Algebra k K] [Algebra.IsAlgebraic k K] :
    Function.Surjective (comap · (algebraMap k K))

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
[Algebra.IsAlgebraic k K]

Function.Surjective fun x => x.comap (algebraMap k K)


@[simp]
theorem comp_assoc (f : FrameHom γ δ) (g : FrameHom β γ) (h : FrameHom α β) :
    (f.comp g).comp h = f.comp (g.comp h)

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
{δ : Type u_5}
[CompleteLattice α]
[CompleteLattice β]
[CompleteLattice γ]
[CompleteLattice δ]
(f : FrameHom γ δ)
(g : FrameHom β γ)
(h : FrameHom α β)


theorem ContMDiffWithinAt.insert (h : ContMDiffWithinAt I I' n f s x) :
    ContMDiffWithinAt I I' n f (insert x s) 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 : M → M'}
{s : Set M}
{x : M}
{n : ℕ∞}
(h : ContMDiffWithinAt I I' n f s x)


/-- If `u` is a uniform structures on `β` and `f : γ → β`, then
`𝒰(α, γ, comap f u) = comap (fun g ↦ f ∘ g) 𝒰(α, γ, u₁)`. -/
protected theorem comap_eq {f : γ → β} :
    𝒰(α, γ, ‹UniformSpace β›.comap f) = 𝒰(α, β, _).comap (f ∘ ·)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[UniformSpace β]
{f : γ → β}

UniformFun.uniformSpace α γ = UniformSpace.comap (fun x => f ∘ x) (UniformFun.uniformSpace α β)


lemma SupClosed.inter (hs : SupClosed s) (ht : SupClosed t) : SupClosed (s ∩ t)

{α : Type u_2}
[SemilatticeSup α]
{s t : Set α}
(hs : SupClosed s)
(ht : SupClosed t)


@[simp]
theorem coeff_reflect (N : ℕ) (f : R[X]) (i : ℕ) : coeff (reflect N f) i = f.coeff (revAt N i)

{R : Type u_1}
[Semiring R]
(N : ℕ)
(f : Polynomial R)
(i : ℕ)

(Polynomial.reflect N f).coeff i = f.coeff ((Polynomial.revAt N) i)


theorem isUnit_iff {z : ℤ_[p]} : IsUnit z ↔ ‖z‖ = 1

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{z : ℤ_[p]}


theorem differentiableAt_exp {x : ℂ} : DifferentiableAt 𝕜 exp x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 ℂ]
{x : ℂ}


theorem min_orderTop_le_orderTop_add {Γ} [LinearOrder Γ] {x y : HahnSeries Γ R} :
    min x.orderTop y.orderTop ≤ (x + y).orderTop

{R : Type u_2}
[AddMonoid R]
{Γ : Type u_3}
[LinearOrder Γ]
{x y : HahnSeries Γ R}


@[to_additive]
theorem finprod_mem_finset_eq_prod (f : α → M) (s : Finset α) : ∏ᶠ i ∈ s, f i = ∏ i ∈ s, f i

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

∑ᶠ (i : α) (_ : i ∈ s), f i = ∑ i ∈ s, f i


theorem dvd_iff_padicValNat_ne_zero {p n : ℕ} [Fact p.Prime] (hn0 : n ≠ 0) :
    p ∣ n ↔ padicValNat p n ≠ 0

{p n : ℕ}
[Fact (Nat.Prime p)]
(hn0 : n ≠ 0)


theorem antideriv_bernoulliFun (k : ℕ) (x : ℝ) :
    HasDerivAt (fun x => bernoulliFun (k + 1) x / (k + 1)) (bernoulliFun k x) x

HasDerivAt (fun x => bernoulliFun (k + 1) x / (↑k + 1)) (bernoulliFun k x) x


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

{α β : BddDistLat}
(e : ↑α.toDistLat ≃o ↑β.toDistLat)
(a : ↑α.toDistLat)

(BddDistLat.Iso.mk e).hom.toSupHom a = e a


theorem innerDualCone_union (s t : Set H) :
    (s ∪ t).innerDualCone = s.innerDualCone ⊓ t.innerDualCone

{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace ℝ H]
(s t : Set H)


lemma dvd_mul_sub_mul_mul_right_of_dvd {p a b c d x y : R}
    (h1 : p ∣ a * x + b * y) (h2 : p ∣ c * x + d * y) : p ∣ (a * d - b * c) * y

{R : Type u_1}
[CommRing R]
{p a b c d x y : R}
(h1 : p ∣ a * x + b * y)
(h2 : p ∣ c * x + d * y)


theorem one_le_sq_iff {a : R} (ha : 0 ≤ a) : 1 ≤ a ^ 2 ↔ 1 ≤ a

{R : Type u_3}
[LinearOrderedSemiring R]
{a : R}
(ha : 0 ≤ a)


theorem bddAbove_range_comp {ι : Type u} {f : ι → Cardinal.{v}} (hf : BddAbove (range f))
    (g : Cardinal.{v} → Cardinal.{max v w}) : BddAbove (range (g ∘ f))

{ι : Type u}
{f : ι → Cardinal.{v}}
(hf : BddAbove (Set.range f))
(g : Cardinal.{v} → Cardinal.{max v w})


@[simp]
theorem mapMatrix_trans (f : α ≃ₗ[R] β) (g : β ≃ₗ[R] γ) :
    f.mapMatrix.trans g.mapMatrix = ((f.trans g).mapMatrix : Matrix m n α ≃ₗ[R] _)

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
{α : Type v}
{β : Type w}
{γ : Type u_9}
[Semiring R]
[AddCommMonoid α]
[AddCommMonoid β]
[AddCommMonoid γ]
[Module R α]
[Module R β]
[Module R γ]
(f : α ≃ₗ[R] β)
(g : β ≃ₗ[R] γ)

f.mapMatrix ≪≫ₗ g.mapMatrix = (f ≪≫ₗ g).mapMatrix


@[to_additive (attr := simp)]
theorem cancel_left {g : β →*o γ} {f₁ f₂ : α →*o β} (hg : Function.Injective g) :
    g.comp f₁ = g.comp f₂ ↔ f₁ = f₂

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[MulOneClass α]
[MulOneClass β]
[MulOneClass γ]
{g : β →*o γ}
{f₁ f₂ : α →*o β}
(hg : Function.Injective ⇑g)


theorem not_isDiag_mk_of_mem_offDiag {a : α × α} (h : a ∈ s.offDiag) :
    ¬ (Sym2.mk a).IsDiag

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a : α × α}
(h : a ∈ s.offDiag)


theorem pi_of_empty {α : Type*} [Fintype α] [IsEmpty α] {β : α → Type*}
    {m : ∀ a, MeasurableSpace (β a)} (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) :
    Measure.pi μ = dirac x

(μ : (a : α) → MeasureTheory.Measure (β a))

(x : (a : α) → β a := fun a => isEmptyElim a)

MeasureTheory.Measure.pi μ = MeasureTheory.Measure.dirac x


theorem ContMDiffWithinAt.smul {f : M → 𝕜} {g : M → V} (hf : ContMDiffWithinAt I 𝓘(𝕜) n f s x)
    (hg : ContMDiffWithinAt I 𝓘(𝕜, V) n g s x) :
    ContMDiffWithinAt I 𝓘(𝕜, V) n (fun p => f p • g p) s x

(hf : ContMDiffWithinAt I 𝓘(𝕜, 𝕜) n f s x)


theorem Continuous.matrix_elem {A : X → Matrix m n R} (hA : Continuous A) (i : m) (j : n) :
    Continuous fun x => A x i j

{X : Type u_1}
{m : Type u_4}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
{A : X → Matrix m n R}
(hA : Continuous A)
(i : m)
(j : n)


lemma add_of_not_equiv {P Q : Fin 3 → R} (h : ¬P ≈ Q) : W'.add P Q = W'.addXYZ P Q

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P Q : Fin 3 → R}
(h : ¬P ≈ Q)


theorem map₂_le_map₂_right {f : M →ₗ[R] N →ₗ[R] P} {p : Submodule R M} {q₁ q₂ : Submodule R N}
    (h : q₁ ≤ q₂) : map₂ f p q₁ ≤ map₂ f p q₂

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
{f : M →ₗ[R] N →ₗ[R] P}
{p : Submodule R M}
{q₁ q₂ : Submodule R N}
(h : q₁ ≤ q₂)

Submodule.map₂ f p q₁ ≤ Submodule.map₂ f p q₂


theorem measurable_biInf {ι} (s : Set ι) {f : ι → δ → α} (hs : s.Countable)
    (hf : ∀ i ∈ s, Measurable (f i)) : Measurable fun b => ⨅ i ∈ s, f i b

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[MeasurableSpace δ]
[ConditionallyCompleteLinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
{ι : Type u_5}
(s : Set ι)
{f : ι → δ → α}
(hs : s.Countable)
(hf : ∀ i ∈ s, Measurable (f i))


/-- The zero module is linearly disjoint with any other submodules. -/
theorem bot_right : M.LinearDisjoint (⊥ : Submodule R S)

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


@[ext]
protected theorem subsingleton_unique' : ∀ h₁ h₂ : Unique α, h₁ = h₂


@[to_additive]
theorem exists_ne_one_of_prod_ne_one (h : ∏ x ∈ s, f x ≠ 1) : ∃ a ∈ s, f a ≠ 1

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[AddCommMonoid β]
(h : ∑ x ∈ s, f x ≠ 0)


@[simp]
theorem symm_symm (f : M ≃[L] N) :
    f.symm.symm = f

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


theorem hom_comm_apply {A B : Rep k G} (f : A ⟶ B) (g : G) (x : A) :
    f.hom (A.ρ g x) = B.ρ g (f.hom x)

{k G : Type u}
[CommRing k]
[Monoid G]
{A B : Rep k G}
(f : A ⟶ B)
(g : G)
(x : CoeSort.coe A)


@[to_additive]
theorem comap_mul_comap_le [MulHomClass F α β] (m : F) {f g : Filter β} :
    f.comap m * g.comap m ≤ (f * g).comap m

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddZeroClass α]
[AddZeroClass β]
[FunLike F α β]
[AddHomClass F α β]
(m : F)
{f g : Filter β}

Filter.comap (⇑m) f + Filter.comap (⇑m) g ≤ Filter.comap (⇑m) (f + g)


theorem mem_range_self (x : L) : f x ∈ f.range

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{L₂ : Type w}
[LieRing L₂]
[LieAlgebra R L₂]
(f : L →ₗ⁅R⁆ L₂)
(x : L)


@[to_additive]
theorem measurable_measure_mul_right (hs : MeasurableSet s) :
    Measurable fun x => μ ((fun y => y * x) ⁻¹' s)

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
{s : Set G}
(hs : MeasurableSet s)


@[simp]
theorem eta : ∀ x : PSet, mk x.Type x.Func = x


lemma RightHomologyData.mapOpcyclesIso_eq [S.HasRightHomology]
    [F.PreservesRightHomologyOf S] :
    S.mapOpcyclesIso F = (hr.map F).opcyclesIso ≪≫ F.mapIso hr.opcyclesIso.symm


(α : Type u_1)
[Preorder α]
[TopologicalSpace α]
[Topology.IsUpperSet α]


theorem comp_right_hasFDerivWithinAt_iff {f : F → G} {s : Set F} {x : E} {f' : F →L[𝕜] G} :
    HasFDerivWithinAt (f ∘ iso) (f'.comp (iso : E →L[𝕜] F)) (iso ⁻¹' s) x ↔
      HasFDerivWithinAt f f' s (iso x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(iso : E ≃L[𝕜] F)
{f : F → G}
{s : Set F}
{x : E}
{f' : F →L[𝕜] G}

HasFDerivWithinAt (f ∘ ⇑iso) (f'.comp ↑iso) (⇑iso ⁻¹' s) x ↔ HasFDerivWithinAt f f' s (iso x)


protected theorem inf'_comm {t : Finset γ} (hs : s.Nonempty) (ht : t.Nonempty) (f : β → γ → α) :
    (s.inf' hs fun b => t.inf' ht (f b)) = t.inf' ht fun c => s.inf' hs fun b => f b c

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[SemilatticeInf α]
{s : Finset β}
{t : Finset γ}
(hs : s.Nonempty)
(ht : t.Nonempty)
(f : β → γ → α)


theorem _root_.Function.Commute.filter_map {f g : α → α} (h : Function.Commute f g) :
    Function.Commute (map f) (map g)

{α : Type u}
{f g : α → α}
(h : Function.Commute f g)

Function.Commute (Filter.map f) (Filter.map g)


@[reassoc (attr := simp)]
theorem diagonal_snd : diagonal f ≫ pullback.snd _ _ = 𝟙 _

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X Y : C}
(f : X ⟶ Y)
[CategoryTheory.Limits.HasPullback f f]

CategoryTheory.Limits.pullback.diagonal f ≫ CategoryTheory.Limits.pullback.snd f f = 𝟙 X


theorem Disjoint.symm_iff (x y : Finmap β) : Disjoint x y ↔ Disjoint y x

{α : Type u}
{β : α → Type v}
(x y : Finmap β)


theorem revLexAccessible {b} (acb : Acc s b) (aca : (a : α) → Acc r a): (a : α) → Acc (RevLex r s) ⟨a, b⟩

{α : Sort u}
{β : Sort v}
{r : α → α → Prop}
{s : β → β → Prop}
{b : β}
(acb : Acc s b)
(aca : ∀ (a : α), Acc r a)
(a : α)


{α : Type u_1}
[Semifield α]
[LinearOrder α]
[PosMulReflectLT α]
[ZeroLEOneClass α]
{a : α}


@[simp]
theorem sup_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).sup = s₁.sup ⊔ s₂.sup

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
[DecidableEq α]
(s₁ s₂ : Multiset α)


/-- `CharP.quotient_iff`, but stated in terms of inclusions of ideals. -/
theorem quotient_iff_le_ker_natCast {R : Type*} [CommRing R] (n : ℕ) [CharP R n] (I : Ideal R) :
    CharP (R ⧸ I) n ↔ I.comap (Nat.castRingHom R) ≤ RingHom.ker (Nat.castRingHom R)

{R : Type u_1}
[CommRing R]
(n : ℕ)
[CharP R n]
(I : Ideal R)

CharP (R ⧸ I) n ↔ Ideal.comap (Nat.castRingHom R) I ≤ RingHom.ker (Nat.castRingHom R)


theorem convexBodySum_convex : Convex ℝ (convexBodySum K B)

(K : Type u_1)
[Field K]
[NumberField K]
(B : ℝ)

Convex ℝ (NumberField.mixedEmbedding.convexBodySum K B)


lemma isLocallySurjective_of_isLocallySurjective
    {F₁ F₂ F₃ : Cᵒᵖ ⥤ A} (f₁ : F₁ ⟶ F₂) (f₂ : F₂ ⟶ F₃)
    [IsLocallySurjective J (f₁ ≫ f₂)] :
    IsLocallySurjective J f₂

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Presheaf.IsLocallySurjective J (f₁ ≫ f₂)]


theorem IntegralClosure.comap_lt_comap {I J : Ideal (integralClosure R S)} [I.IsPrime]
    (I_lt_J : I < J) :
    I.comap (algebraMap R (integralClosure R S)) < J.comap (algebraMap R (integralClosure R S))

{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
[Algebra R S]
{I J : Ideal ↥(integralClosure R S)}
[I.IsPrime]
(I_lt_J : I < J)

Ideal.comap (algebraMap R ↥(integralClosure R S)) I < Ideal.comap (algebraMap R ↥(integralClosure R S)) J


theorem X_pow_dvd_iff {s : σ} {n : ℕ} {φ : MvPowerSeries σ R} :
    (X s : MvPowerSeries σ R) ^ n ∣ φ ↔ ∀ m : σ →₀ ℕ, m s < n → coeff R m φ = 0

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
{s : σ}
{n : ℕ}
{φ : MvPowerSeries σ R}

MvPowerSeries.X s ^ n ∣ φ ↔ ∀ (m : σ →₀ ℕ), m s < n → (MvPowerSeries.coeff R m) φ = 0


@[simp]
theorem mk_inv (x : ℕ × K) : (mk K p x)⁻¹ = mk K p (x.1, x.2⁻¹)

(K : Type u)
[Field K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(x : ℕ × K)

(PerfectClosure.mk K p x)⁻¹ = PerfectClosure.mk K p (x.1, x.2⁻¹)


/-- The projections of `Functor.pi' F` are isomorphic to the functors of the family `F` -/
@[simps!]
def pi'CompEval {A : Type*} [Category A] (F : ∀ i, A ⥤ C i) (i : I) :
    pi' F ⋙ Pi.eval C i ≅ F i

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(F : (i : I) → CategoryTheory.Functor A (C i))

(CategoryTheory.Functor.pi'CompEval F i).inv.app X = CategoryTheory.CategoryStruct.id ((F i).obj X)


theorem lt_succ_of_lt (h : a < b) : a < succ b


theorem degree_trunc_lt (f : R⟦X⟧) (n) : (trunc n f).degree < n

{R : Type u_1}
[Semiring R]
(f : PowerSeries R)
(n : ℕ)


lemma natCast_eq_natCast' (h : a ≡ b [MOD p]) : (a : R) = b

(R : Type u_1)
[AddMonoidWithOne R]
(p : ℕ)
[CharP R p]
{a b : ℕ}
(h : a ≡ b [MOD p])


@[simp]
theorem biprod.inlCokernelCofork_π : Cofork.π (biprod.inlCokernelCofork X Y) = biprod.snd

CategoryTheory.Limits.Cofork.π (CategoryTheory.Limits.biprod.inlCokernelCofork X Y) = CategoryTheory.Limits.biprod.snd


@[simp]
theorem toNat_add_toNat_neg_eq_norm (n : ℤ) : ↑n.toNat + ↑(-n).toNat = ‖n‖


protected lemma pow_lt_pow_right (ha : 1 < a) (h : m < n) : a ^ m < a ^ n


theorem Bounded.weak_left : ∀ {t : Ordnode α} {o₁ o₂}, Bounded t o₁ o₂ → Bounded t ⊥ o₂

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


@[simp]
theorem induced_top : (⊤ : TopologicalSpace α).induced g = ⊤

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


/-- Every split epi `f` with a kernel induces a binary bicone with `f` as its `snd` and
the kernel map as its `inl`.
We will show in `binary_bicone_of_is_split_mono_of_cokernel` that this binary bicone is in fact
already a biproduct. -/
@[simps]
def binaryBiconeOfIsSplitEpiOfKernel {X Y : C} {f : X ⟶ Y} [IsSplitEpi f] {c : KernelFork f}
    (i : IsLimit c) : BinaryBicone c.pt Y

{c : CategoryTheory.Limits.KernelFork f}

(CategoryTheory.Limits.binaryBiconeOfIsSplitEpiOfKernel i).snd = f


@[simp]
theorem continuousMapOfUnique_apply [Unique X] (y : Y) (x : X) : continuousMapOfUnique y x = y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[Unique X]
(y : Y)
(x : X)

(Homeomorph.continuousMapOfUnique y) x = y


theorem count_le_of_ideal_ge {I J : Ideal T} (h : I ≤ J) (hI : I ≠ ⊥) (K : Ideal T) :
    count K (normalizedFactors J) ≤ count K (normalizedFactors I)

{T : Type u_4}
[CommRing T]
[IsDedekindDomain T]
{I J : Ideal T}
(h : I ≤ J)
(hI : I ≠ ⊥)
(K : Ideal T)

Multiset.count K (UniqueFactorizationMonoid.normalizedFactors J) ≤
  Multiset.count K (UniqueFactorizationMonoid.normalizedFactors I)


@[to_additive]
theorem op_closure (s : Set G) : (closure s).op = closure (MulOpposite.unop ⁻¹' s)

(Subgroup.closure s).op = Subgroup.closure (MulOpposite.unop ⁻¹' s)


@[simp]
theorem embeddingsEquivPrimitiveRoots_apply_coe (C : Type*) [CommRing C] [IsDomain C] [Algebra K C]
    (hirr : Irreducible (cyclotomic n K)) (φ' : L →ₐ[K] C) :
    (hζ.embeddingsEquivPrimitiveRoots C hirr φ' : C) = φ' ζ

(hirr : Irreducible (Polynomial.cyclotomic (↑n) K))

↑((hζ.embeddingsEquivPrimitiveRoots C hirr) φ') = φ' ζ


lemma _root_.MeasurableEquiv.withDensity_ofReal_map_symm_apply_eq_integral_abs_det_fderiv_mul
    (hs : MeasurableSet s) (f : E ≃ᵐ E)
    {g : E → ℝ} (hg : ∀ᵐ x ∂μ, x ∈ f '' s → 0 ≤ g x) (hg_int : IntegrableOn g (f '' s) μ)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) :
    (μ.withDensity (fun x ↦ ENNReal.ofReal (g x))).map f.symm s
      = ENNReal.ofReal (∫ x in s, |(f' x).det| * g (f x) ∂μ)

(hg : ∀ᵐ (x : E) ∂μ, x ∈ ⇑f '' s → 0 ≤ g x)

(hg_int : MeasureTheory.IntegrableOn g (⇑f '' s) μ)

(hf' : ∀ x ∈ s, HasFDerivWithinAt (⇑f) (f' x) s x)

(MeasureTheory.Measure.map (⇑f.symm) (μ.withDensity fun x => ENNReal.ofReal (g x))) s =
  ENNReal.ofReal (∫ (x : E) in s, |(f' x).det| * g (f x) ∂μ)


theorem card_support_eq {n : ℕ} :
    f.support.card = n ↔
      ∃ (k : Fin n → ℕ) (x : Fin n → R) (hk : StrictMono k) (hx : ∀ i, x i ≠ 0),
        f = ∑ i, C (x i) * X ^ k i

{R : Type u_1}
[Semiring R]
{f : R[X]}
{n : ℕ}

f.support.card = n ↔
  ∃ k x, ∃ (_ : StrictMono k) (_ : ∀ (i : Fin n), x i ≠ 0), f = ∑ i : Fin n, Polynomial.C (x i) * Polynomial.X ^ k i


theorem eq_natAbs_of_zero_le {a : Int} (h : 0 ≤ a) : a = natAbs a


theorem toReal_le_of_le_ofReal {a : ℝ≥0∞} {b : ℝ} (hb : 0 ≤ b) (h : a ≤ ENNReal.ofReal b) :
    ENNReal.toReal a ≤ b


protected theorem IsPath.toDeleteEdges (s : Set (Sym2 V))
    {p : G.Walk v w} (h : p.IsPath) (hp) : (p.toDeleteEdges s hp).IsPath

{V : Type u}
(G : SimpleGraph V)
{v w : V}
(s : Set (Sym2 V))
{p : G.Walk v w}
(h : p.IsPath)
(hp : ∀ e ∈ p.edges, e ∉ s)

(SimpleGraph.Walk.toDeleteEdges s p hp).IsPath


theorem succ_ne_succ_iff : succ a ≠ succ b ↔ a ≠ b

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a b : α}
[NoMaxOrder α]


theorem norm_eq_of_isometry {f : NormedAddGroupHom V W} (hf : Isometry f) (v : V) : ‖f v‖ = ‖v‖

{V : Type u_1}
{W : Type u_2}
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
{f : NormedAddGroupHom V W}
(hf : Isometry ⇑f)
(v : V)


/-- Constructs an equivalence between preorders from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : AlexDisc} (e : α ≃ₜ β) : α ≅ β

(AlexDisc.Iso.mk e).hom = e.toContinuousMap


/-- The bijection `I.sections ≃ I.multicospan.sections` when `I : MulticospanIndex (Type u)`
is a multiequalizer diagram in the category of types. -/
@[simps]
def MulticospanIndex.sectionsEquiv :
    I.sections ≃ I.multicospan.sections

(I : CategoryTheory.Limits.MulticospanIndex (Type u))

(I.sectionsEquiv.symm s).val i = ↑s (CategoryTheory.Limits.WalkingMulticospan.left i)


private lemma N_le_P_add_one (i : α) : N i ≤ P i + 1

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(A : Matrix α β ℤ)
(i : α)

(fun i =>
      ∑ j : β,
        ↑⌊(↑(Fintype.card β) * max 1 ‖A‖) ^ (↑(Fintype.card α) / (↑(Fintype.card β) - ↑(Fintype.card α)))⌋₊ * -(A i j)⁻)
    i ≤
  (fun i =>
        ∑ j : β,
          ↑⌊(↑(Fintype.card β) * max 1 ‖A‖) ^ (↑(Fintype.card α) / (↑(Fintype.card β) - ↑(Fintype.card α)))⌋₊ *
            (A i j)⁺)
      i +
    1


theorem tensor_associativity (X₁ X₂ Y₁ Y₂ Z₁ Z₂ : C) :
    (tensor_μ C (X₁, X₂) (Y₁, Y₂) ▷ (Z₁ ⊗ Z₂)) ≫
        tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫ ((α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom) =
      (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫
        ((X₁ ⊗ X₂) ◁ tensor_μ C (Y₁, Y₂) (Z₁, Z₂)) ≫ tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)

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

CategoryTheory.tensor_μ C (X₁, X₂) (Y₁, Y₂) ▷ (Z₁ ⊗ Z₂) ≫
    CategoryTheory.tensor_μ C (X₁ ⊗ Y₁, X₂ ⊗ Y₂) (Z₁, Z₂) ≫ ((α_ X₁ Y₁ Z₁).hom ⊗ (α_ X₂ Y₂ Z₂).hom) =
  (α_ (X₁ ⊗ X₂) (Y₁ ⊗ Y₂) (Z₁ ⊗ Z₂)).hom ≫
    (X₁ ⊗ X₂) ◁ CategoryTheory.tensor_μ C (Y₁, Y₂) (Z₁, Z₂) ≫ CategoryTheory.tensor_μ C (X₁, X₂) (Y₁ ⊗ Z₁, Y₂ ⊗ Z₂)


@[to_additive (attr := simp)]
theorem MonoidHom.map_zpowers (f : G →* N) (x : G) :
    (Subgroup.zpowers x).map f = Subgroup.zpowers (f x)

{G : Type u_1}
[AddGroup G]
{N : Type u_3}
[AddGroup N]
(f : G →+ N)
(x : G)

AddSubgroup.map f (AddSubgroup.zmultiples x) = AddSubgroup.zmultiples (f x)


@[simp]
theorem count_cons_self (a : α) (s : Multiset α) : count a (a ::ₘ s) = count a s + 1

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

Multiset.count a (a ::ₘ s) = Multiset.count a s + 1


theorem of_convs_eq_convs' : (of v).convs = (of v).convs'

{K : Type u_1}
(v : K)
[LinearOrderedField K]
[FloorRing K]

(GenContFract.of v).convs = (GenContFract.of v).convs'


private theorem mul_ne_zero_of_ne_zero_of_pos [OrderedSemiring α] [NoZeroDivisors α]
    {a b : α} (ha : a ≠ 0) (hb : 0 < b) : a * b ≠ 0

{α : Type u_1}
[OrderedSemiring α]
[NoZeroDivisors α]
{a b : α}
(ha : a ≠ 0)
(hb : 0 < b)


@[simp]
theorem dual_Ico : Ico (toDual a) (toDual b) = ofDual ⁻¹' Ioc b a

Set.Ico (OrderDual.toDual a) (OrderDual.toDual b) = ⇑OrderDual.ofDual ⁻¹' Set.Ioc b a


theorem sum_smul_index {S : Type*} [AddCommMonoid S] (p : R[X]) (b : R) (f : ℕ → R → S)
    (hf : ∀ i, f i 0 = 0) : (b • p).sum f = p.sum fun n a => f n (b * a)

{R : Type u}
[Semiring R]
{S : Type u_1}
[AddCommMonoid S]
(p : R[X])
(b : R)
(f : ℕ → R → S)
(hf : ∀ (i : ℕ), f i 0 = 0)


/-- One direction of `contDiffWithinAt_succ_iff_hasFDerivWithinAt`, but where all derivatives
taken within the same set. Version for partial derivatives / functions with parameters.  `f x` is a
`C^n+1` family of functions and `g x` is a `C^n` family of points, then the derivative of `f x` at
`g x` depends in a `C^n` way on `x`. We give a general version of this fact relative to sets which
may not have unique derivatives, in the following form.  If `f : E × F → G` is `C^n+1` at
`(x₀, g(x₀))` in `(s ∪ {x₀}) × t ⊆ E × F` and `g : E → F` is `C^n` at `x₀` within some set `s ⊆ E`,
then there is a function `f' : E → F →L[𝕜] G` that is `C^n` at `x₀` within `s` such that for all `x`
sufficiently close to `x₀` within `s ∪ {x₀}` the function `y ↦ f x y` has derivative `f' x` at `g x`
within `t ⊆ F`.  For convenience, we return an explicit set of `x`'s where this holds that is a
subset of `s ∪ {x₀}`.  We need one additional condition, namely that `t` is a neighborhood of
`g(x₀)` within `g '' s`.  -/
theorem ContDiffWithinAt.hasFDerivWithinAt_nhds {f : E → F → G} {g : E → F} {t : Set F} {n : ℕ}
    {x₀ : E} (hf : ContDiffWithinAt 𝕜 (n + 1) (uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀))
    (hg : ContDiffWithinAt 𝕜 n g s x₀) (hgt : t ∈ 𝓝[g '' s] g x₀) :
    ∃ v ∈ 𝓝[insert x₀ s] x₀, v ⊆ insert x₀ s ∧ ∃ f' : E → F →L[𝕜] G,
      (∀ x ∈ v, HasFDerivWithinAt (f x) (f' x) t (g x)) ∧
        ContDiffWithinAt 𝕜 n (fun x => f' x) s x₀

(hf : ContDiffWithinAt 𝕜 (↑n + 1) (Function.uncurry f) (insert x₀ s ×ˢ t) (x₀, g x₀))

∃ v ∈ 𝓝[insert x₀ s] x₀,
  v ⊆ insert x₀ s ∧
    ∃ f', (∀ x ∈ v, HasFDerivWithinAt (f x) (f' x) t (g x)) ∧ ContDiffWithinAt 𝕜 (↑n) (fun x => f' x) s x₀


private theorem rexp_neg_image_aux : rexp ∘ Neg.neg '' univ = Ioi 0


@[norm_cast] theorem coe_smul (g : G) (b : Basis ι R M) : ⇑(g • b) = g • ⇑b

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{G : Type u_10}
[Group G]
[DistribMulAction G M]
[SMulCommClass G R M]
(g : G)
(b : Basis ι R M)


@[to_additive (attr := measurability)]
theorem AEMeasurable.const_div [MeasurableDiv G] (hf : AEMeasurable f μ) (c : G) :
    AEMeasurable (fun x => c / f x) μ

{G : Type u_2}
{α : Type u_3}
[MeasurableSpace G]
[Sub G]
{m : MeasurableSpace α}
{f : α → G}
{μ : MeasureTheory.Measure α}
[MeasurableSub G]
(hf : AEMeasurable f μ)
(c : G)


/-- The intersection of two submonoids of a monoid `M` is a submonoid of `M`. -/
@[to_additive
      "The intersection of two `AddSubmonoid`s of an `AddMonoid` `M` is an `AddSubmonoid` of M."]
theorem IsSubmonoid.inter {s₁ s₂ : Set M} (is₁ : IsSubmonoid s₁) (is₂ : IsSubmonoid s₂) :
    IsSubmonoid (s₁ ∩ s₂)

{M : Type u_1}
[Monoid M]
{s₁ s₂ : Set M}
(is₁ : IsSubmonoid s₁)
(is₂ : IsSubmonoid s₂)


@[simp, norm_cast]
theorem coe_piecewise : ⇑(x.piecewise y s) = s.piecewise x y

{ι : Type u}
{β : ι → Type v}
[(i : ι) → Zero (β i)]
(x y : Π₀ (i : ι), β i)
(s : Set ι)
[(i : ι) → Decidable (i ∈ s)]


theorem append_inj :
    ∀ {s₁ s₂ t₁ t₂ : List α}, s₁ ++ t₁ = s₂ ++ t₂ → length s₁ = length s₂ → s₁ = s₂ ∧ t₁ = t₂

s₁ ++ t₁ = s₂ ++ t₂ → s₁.length = s₂.length → s₁ = s₂ ∧ t₁ = t₂


@[fun_prop]
theorem HasStrictFDerivAt.clm_apply (hc : HasStrictFDerivAt c c' x)
    (hu : HasStrictFDerivAt u u' x) :
    HasStrictFDerivAt (fun y => (c y) (u y)) ((c x).comp u' + c'.flip (u x)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{c : E → G →L[𝕜] H}
{c' : E →L[𝕜] G →L[𝕜] H}
{u : E → G}
{u' : E →L[𝕜] G}
(hc : HasStrictFDerivAt c c' x)
(hu : HasStrictFDerivAt u u' x)


theorem separable_X : (X : R[X]).Separable


@[simp]
theorem sub_comp : (p - q).comp r = p.comp r - q.comp r


theorem image2_inter_union_subset_union :
    image2 f (s ∩ s') (t ∪ t') ⊆ image2 f s t ∪ image2 f s' t'

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{f : α → β → γ}
{s s' : Set α}
{t t' : Set β}

Set.image2 f (s ∩ s') (t ∪ t') ⊆ Set.image2 f s t ∪ Set.image2 f s' t'


theorem Fmla.subsumes_left (f f₁ f₂ : Fmla) (H : f.subsumes (f₁.and f₂)) : f.subsumes f₁

(f f₁ f₂ : Sat.Fmla)
(H : f.subsumes (f₁.and f₂))


theorem cylinder_mem_measurableCylinders (s : Finset ι) (S : Set (∀ i : s, α i))
    (hS : MeasurableSet S) :
    cylinder s S ∈ measurableCylinders α

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → MeasurableSpace (α i)]
(s : Finset ι)
(S : Set ((i : { x // x ∈ s }) → α ↑i))
(hS : MeasurableSet S)

MeasureTheory.cylinder s S ∈ MeasureTheory.measurableCylinders α


@[simp]
theorem image_surjective : Surjective (image f) ↔ Surjective f

Function.Surjective (Set.image f) ↔ Function.Surjective f


/-- If `J` and `K` are equivalent, then if `J` is preconnected then `K` is as well. -/
theorem isPreconnected_of_equivalent {K : Type u₂} [Category.{v₂} K] [IsPreconnected J]
    (e : J ≌ K) : IsPreconnected K

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
[CategoryTheory.IsPreconnected J]
(e : J ≌ K)


lemma exists_lt_succ : (∃ m < n + 1, p m) ↔ (∃ m < n, p m) ∨ p n

(∃ m, m < n + 1 ∧ p m) ↔ (∃ m, m < n ∧ p m) ∨ p n


@[simp]
lemma cyclesMap_id : cyclesMap (𝟙 K) i = 𝟙 _

HomologicalComplex.cyclesMap (𝟙 K) i = 𝟙 (K.cycles i)


theorem smooth_transDiffeomorph_right {f : M' → M} :
    Smooth I' (I.transDiffeomorph e) f ↔ Smooth I' I f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F : Type u_4}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
(e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, F)⟯ F)
{f : M' → M}


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

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

(CategoryTheory.shiftEquiv' C i j h).counitIso = CategoryTheory.shiftFunctorCompIsoId C j i ⋯


@[simp] theorem algebraMap_apply (r : R) (m : M₂) : algebraMap R (M₂ →L[R] M₂) r m = r • m

{R : Type u_1}
[CommRing R]
{M₂ : Type u_3}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M₂]
[TopologicalAddGroup M₂]
[ContinuousConstSMul R M₂]
(r : R)
(m : M₂)

((algebraMap R (M₂ →L[R] M₂)) r) m = r • m


@[simp]
theorem conj_act_eq_conj {G : Type*} [Group G] (x y : Conj G) :
    x ◃ y = ((x : G) * (y : G) * (x : G)⁻¹ : G)

{G : Type u_2}
[Group G]
(x y : Quandle.Conj G)


/--
The discrete condensed object associated to an object of `C` is the constant sheaf at that object.
-/
@[simps!]
noncomputable def LightCondensed.discrete : C ⥤ LightCondensed.{u} C

[CategoryTheory.HasSheafify (CategoryTheory.coherentTopology LightProfinite) C]

∀ {X Y : C} (f : X ⟶ Y),
  (LightCondensed.discrete C).map f =
    (CategoryTheory.presheafToSheaf (CategoryTheory.coherentTopology LightProfinite) C).map
      ((CategoryTheory.Functor.const LightProfiniteᵒᵖ).map f)


@[simp]
theorem lift_lift (a : Ordinal) : lift.{w} (lift.{v} a) = lift.{max v w} a

Ordinal.lift.{w, max v u_3} (Ordinal.lift.{v, u_3} a) = Ordinal.lift.{max v w, u_3} a


theorem det_updateColumn_add (M : Matrix n n R) (j : n) (u v : n → R) :
    det (updateColumn M j <| u + v) = det (updateColumn M j u) + det (updateColumn M j v)

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(M : Matrix n n R)
(j : n)
(u v : n → R)

(M.updateColumn j (u + v)).det = (M.updateColumn j u).det + (M.updateColumn j v).det


theorem sum_right (α) [Finite (α ⊕ β)] : Finite β

{β : Type u_2}
(α : Type u_4)
[Finite (α ⊕ β)]


lemma Indep.closure_inter_eq_inter_closure (h : M.Indep (I ∪ J)) :
    M.closure (I ∩ J) = M.closure I ∩ M.closure J

{α : Type u_2}
{M : Matroid α}
{I J : Set α}
(h : M.Indep (I ∪ J))


theorem ext_iff {f g : r ↪r s} : f = g ↔ ∀ x, f x = g x

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


@[simp]
theorem toEmbedding_embedding_empty (f : M ↪ N) : (Embedding.empty f).toEmbedding = f


theorem ratio_id : ratio (Dilation.id α) = 1


@[rclike_simps, norm_cast]
theorem ofReal_add (r s : ℝ) : ((r + s : ℝ) : K) = r + s


theorem tendsto_support_normed_smallSets {ι} {φ : ι → ContDiffBump c} {l : Filter ι}
    (hφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)) :
    Tendsto (fun i => Function.support fun x => (φ i).normed μ x) l (𝓝 c).smallSets

(hφ : Filter.Tendsto (fun i => (φ i).rOut) l (𝓝 0))

Filter.Tendsto (fun i => Function.support fun x => (φ i).normed μ x) l (𝓝 c).smallSets


@[simp] theorem val_one (n : Nat) : (1 : Fin (n + 2)).val = 1


/-- The functor `F.sheafPushforwardContinuous A J K : Sheaf K A ⥤ Sheaf J A`
is induced by the precomposition with `F.op`. -/
@[simps!]
def sheafPushforwardContinuousCompSheafToPresheafIso :
    F.sheafPushforwardContinuous A J K ⋙ sheafToPresheaf J A ≅
      sheafToPresheaf K A ⋙ (whiskeringLeft _ _ _).obj F.op

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

∀ (X_1 : Cᵒᵖ),
  ((F.sheafPushforwardContinuousCompSheafToPresheafIso A J K).hom.app X).app X_1 =
    CategoryTheory.CategoryStruct.id (X.val.obj (Opposite.op (F.obj (Opposite.unop X_1))))


@[deprecated get_mem (since := "2023-01-05")]
theorem nthLe_mem (l : List α) (n h) : nthLe l n h ∈ l

{α : Type u}
(l : List α)
(n : ℕ)
(h : n < l.length)


/-- Left multiplication by a matrix, as an `AddMonoidHom` from vectors to vectors. -/
@[simps]
def mulVec.addMonoidHomLeft [Fintype n] (v : n → α) : Matrix m n α →+ m → α

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonUnitalNonAssocSemiring α]
[Fintype n]
(v : n → α)
(M : Matrix m n α)

∀ (a : m), (Matrix.mulVec.addMonoidHomLeft v) M a = (M *ᵥ v) a


/-- The distinguished triangle in the derived category associated to a short
exact sequence of cochain complexes. -/
@[simps!]
noncomputable def triangleOfSES : Triangle (DerivedCategory C)

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

(DerivedCategory.triangleOfSES hS).mor₁ = DerivedCategory.Q.map S.f


@[fun_prop]
theorem hasFDerivWithinAt_snd {s : Set (E × F)} :
    HasFDerivWithinAt (@Prod.snd E F) (snd 𝕜 E F) s p

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : E × F}
{s : Set (E × F)}

HasFDerivWithinAt Prod.snd (ContinuousLinearMap.snd 𝕜 E F) s p


theorem coprime_of_dvd' {m n : ℕ} (H : ∀ k, Prime k → k ∣ m → k ∣ n → k ∣ 1) : Coprime m n

(H : ∀ (k : ℕ), Nat.Prime k → k ∣ m → k ∣ n → k ∣ 1)


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

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{x : E}
{s t : Set E}
(h : DifferentiableWithinAt 𝕜 f s x)
(ht : Set.EqOn f₁ f t)
(hx : f₁ x = f x)
(h₁ : t ⊆ s)


lemma mem_coeSubmodule_conductor {L} [CommRing L] [Algebra S L] [Algebra R L]
    [IsScalarTower R S L] [NoZeroSMulDivisors S L] {x : S} {y : L} :
    y ∈ coeSubmodule L (conductor R x) ↔ ∀ z : S,
      y * (algebraMap S L) z ∈ Algebra.adjoin R {algebraMap S L x}

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
{L : Type u_3}
[CommRing L]
[Algebra S L]
[Algebra R L]
[IsScalarTower R S L]
[NoZeroSMulDivisors S L]
{x : S}
{y : L}

y ∈ IsLocalization.coeSubmodule L (conductor R x) ↔
  ∀ (z : S), y * (algebraMap S L) z ∈ Algebra.adjoin R {(algebraMap S L) x}


theorem vector_get {n} : Computable₂ (@Vector.get α n)


theorem map_dualTensorHom (f : Module.Dual R M) (p : P) (g : Module.Dual R N) (q : Q) :
    TensorProduct.map (dualTensorHom R M P (f ⊗ₜ[R] p)) (dualTensorHom R N Q (g ⊗ₜ[R] q)) =
      dualTensorHom R (M ⊗[R] N) (P ⊗[R] Q) (dualDistrib R M N (f ⊗ₜ g) ⊗ₜ[R] p ⊗ₜ[R] q)

{R : Type u}
{M : Type v₁}
{N : Type v₂}
{P : Type v₃}
{Q : Type v₄}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R M]
[Module R N]
[Module R P]
[Module R Q]
(f : Module.Dual R M)
(p : P)
(g : Module.Dual R N)
(q : Q)

TensorProduct.map ((dualTensorHom R M P) (f ⊗ₜ[R] p)) ((dualTensorHom R N Q) (g ⊗ₜ[R] q)) =
  (dualTensorHom R (TensorProduct R M N) (TensorProduct R P Q))
    ((TensorProduct.dualDistrib R M N) (f ⊗ₜ[R] g) ⊗ₜ[R] p ⊗ₜ[R] q)


@[simp]
theorem derivative_C {a : R} : derivative (C a) = 0

Polynomial.derivative (Polynomial.C a) = 0


@[simp]
theorem ofList_nil : ofList [] = (nil : Seq α)


theorem WellFoundedRelation.asymmetric {α : Sort*} [WellFoundedRelation α] {a b : α} :
    WellFoundedRelation.rel a b → ¬ WellFoundedRelation.rel b a

{α : Sort u_1}
[WellFoundedRelation α]
{a b : α}

WellFoundedRelation.rel a b → ¬WellFoundedRelation.rel b a


/-- A nonzero epimorphism from a simple object is an isomorphism. -/
theorem isIso_of_epi_of_nonzero {X Y : C} [Simple X] {f : X ⟶ Y} [Epi f] (w : f ≠ 0) : IsIso f

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


/-- We can clear the denominators of a `Finset`-indexed family of fractions. -/
theorem exist_integer_multiples {ι : Type*} (s : Finset ι) (g : ι → M') :
    ∃ b : S, ∀ i ∈ s, IsInteger f (b.val • g i)

{R : Type u_1}
[CommSemiring R]
(S : Submonoid R)
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{M' : Type u_3}
[AddCommMonoid M']
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
{ι : Type u_4}
(s : Finset ι)
(g : ι → M')

∃ b, ∀ i ∈ s, IsLocalizedModule.IsInteger f (↑b • g i)


theorem reindexRange_repr' (x : M) {bi : M} {i : ι} (h : b i = bi) :
    b.reindexRange.repr x ⟨bi, ⟨i, h⟩⟩ = b.repr x i

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

(b.reindexRange.repr x) ⟨bi, ⋯⟩ = (b.repr x) i


theorem mul_mem (x y : K) : x ∈ A → y ∈ A → x * y ∈ A

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


theorem single_coeff : (single a r).coeff b = if b = a then r else 0

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{a b : Γ}
{r : R}

((HahnSeries.single a) r).coeff b = if b = a then r else 0


@[simp]
theorem dist_vadd_cancel_right (v₁ v₂ : V) (x : P) : dist (v₁ +ᵥ x) (v₂ +ᵥ x) = dist v₁ v₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(v₁ v₂ : V)
(x : P)


@[simp]
protected theorem map_pow (f : M →ₗ[R] M) (g : N →ₗ[R] N) (n : ℕ) :
    map f g ^ n = map (f ^ n) (g ^ n)

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : M →ₗ[R] M)
(g : N →ₗ[R] N)
(n : ℕ)

TensorProduct.map f g ^ n = TensorProduct.map (f ^ n) (g ^ n)


@[to_additive (attr := simp) MeasureTheory.sdiff_addFundamentalFrontier]
theorem sdiff_fundamentalFrontier : s \ fundamentalFrontier G s = fundamentalInterior G s

(G : Type u_1)
{α : Type u_3}
[AddGroup G]
[AddAction G α]
(s : Set α)

s \ MeasureTheory.addFundamentalFrontier G s = MeasureTheory.addFundamentalInterior G s


theorem IsPositive.isSelfAdjoint {T : E →L[𝕜] E} (hT : IsPositive T) : IsSelfAdjoint T

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{T : E →L[𝕜] E}
(hT : T.IsPositive)


/-- If the images by an order embedding of two elements are complements,
then they are themselves complements. -/
lemma IsCompl.of_orderEmbedding [BoundedOrder α] [BoundedOrder β] {a₁ a₂ : α} :
    IsCompl (f a₁) (f a₂) → IsCompl a₁ a₂

{α : Type u_2}
{β : Type u_3}
[PartialOrder α]
[PartialOrder β]
(f : α ↪o β)
[BoundedOrder α]
[BoundedOrder β]
{a₁ a₂ : α}


/-- There is no vector subspace between `p` and `(K ∙ x) ⊔ p`, `CovBy` version. -/
theorem covBy_span_singleton_sup {x : V} {p : Submodule K V} (h : x ∉ p) : CovBy p ((K ∙ x) ⊔ p)

{K : Type u_3}
{V : Type u_6}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{x : V}
{p : Submodule K V}
(h : x ∉ p)


theorem contMDiffAt_iff {n : ℕ∞} {f : M → M'} {x : M} :
    ContMDiffAt I I' n f x ↔
      ContinuousAt f x ∧
        ContDiffWithinAt 𝕜 n (extChartAt I' (f x) ∘ f ∘ (extChartAt I x).symm) (range I)
          (extChartAt I x x)

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

ContMDiffAt I I' n f x ↔
  ContinuousAt f x ∧
    ContDiffWithinAt 𝕜 n (↑(extChartAt I' (f x)) ∘ f ∘ ↑(extChartAt I x).symm) (Set.range ↑I) (↑(extChartAt I x) x)


theorem smul_re (r : R) (z : ℂ) : (r • z).re = r • z.re

{R : Type u_1}
[SMul R ℝ]
(r : R)
(z : ℂ)


/-- Composition by continuous linear equivs on the right respects higher differentiability at a
point. -/
theorem ContinuousLinearEquiv.contDiffAt_comp_iff (e : G ≃L[𝕜] E) :
    ContDiffAt 𝕜 n (f ∘ e) (e.symm x) ↔ ContDiffAt 𝕜 n f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{x : E}
{n : ℕ∞}
(e : G ≃L[𝕜] E)

ContDiffAt 𝕜 n (f ∘ ⇑e) (e.symm x) ↔ ContDiffAt 𝕜 n f x


theorem SmoothAt.div₀ (hf : SmoothAt I' I f a) (hg : SmoothAt I' I g a) (h₀ : g a ≠ 0) :
    SmoothAt I' I (f / g) a

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[GroupWithZero G]
[SmoothInv₀ I G]
[SmoothMul I G]
{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 g : M → G}
{a : M}
(hf : SmoothAt I' I f a)
(hg : SmoothAt I' I g a)
(h₀ : g a ≠ 0)


/-- In a space with the Besicovitch property, any set `s` can be covered with balls whose measures
add up to at most `μ s + ε`, for any positive `ε`. This works even if one restricts the set of
allowed radii around a point `x` to a set `f x` which accumulates at `0`. -/
theorem exists_closedBall_covering_tsum_measure_le (μ : Measure α) [SFinite μ]
    [Measure.OuterRegular μ] {ε : ℝ≥0∞} (hε : ε ≠ 0) (f : α → Set ℝ) (s : Set α)
    (hf : ∀ x ∈ s, ∀ δ > 0, (f x ∩ Ioo 0 δ).Nonempty) :
    ∃ (t : Set α) (r : α → ℝ), t.Countable ∧ t ⊆ s ∧ (∀ x ∈ t, r x ∈ f x) ∧
      (s ⊆ ⋃ x ∈ t, closedBall x (r x)) ∧ (∑' x : t, μ (closedBall x (r x))) ≤ μ s + ε

(hf : ∀ x ∈ s, ∀ δ > 0, (f x ∩ Set.Ioo 0 δ).Nonempty)

∃ t r,
  t.Countable ∧
    t ⊆ s ∧
      (∀ x ∈ t, r x ∈ f x) ∧
        s ⊆ ⋃ x ∈ t, Metric.closedBall x (r x) ∧ ∑' (x : ↑t), μ (Metric.closedBall (↑x) (r ↑x)) ≤ μ s + ε


@[simp, norm_cast]
theorem castNum_and : ∀ m n : Num, ↑(m &&& n) = (↑m &&& ↑n : ℕ)


theorem aevalTower_algebraMap (x : R) : aevalTower g y (algebraMap R R[X] x) = g x

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

(Polynomial.aevalTower g y) ((algebraMap R R[X]) x) = g x


theorem NormedAddGroupHom.extension_unique (f : NormedAddGroupHom G H)
    {g : NormedAddGroupHom (Completion G) H} (hg : ∀ v, f v = g v) : f.extension = g

{g : NormedAddGroupHom (UniformSpace.Completion G) H}


/-- If `u = O(v)` along `l`, then `(u / v) * v = u` eventually at `l`. -/
theorem IsBigO.eventually_mul_div_cancel (h : u =O[l] v) : u / v * v =ᶠ[l] u

{α : Type u_1}
{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
{l : Filter α}
{u v : α → 𝕜}
(h : u =O[l] v)


@[simp]
theorem ones_blocks (n : ℕ) : (ones n).blocks = replicate n (1 : ℕ)

(Composition.ones n).blocks = List.replicate n 1


lemma orbitRelEquiv_apply_mk'' [IsGalois k K] (w : InfinitePlace K) :
    orbitRelEquiv (Quotient.mk'' w) = comap w (algebraMap k K)

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
[IsGalois k K]
(w : NumberField.InfinitePlace K)

NumberField.InfinitePlace.orbitRelEquiv (Quotient.mk'' w) = w.comap (algebraMap k K)


/-- An ideal `I` equals its Jacobson radical if and only if every element outside `I`
also lies outside of a maximal ideal containing `I`. -/
theorem eq_jacobson_iff_not_mem :
    I.jacobson = I ↔ ∀ (x) (_ : x ∉ I), ∃ M : Ideal R, (I ≤ M ∧ M.IsMaximal) ∧ x ∉ M

I.jacobson = I ↔ ∀ x ∉ I, ∃ M, (I ≤ M ∧ M.IsMaximal) ∧ x ∉ M


/-- Writing a liminf as a supremum of infimum, in a (possibly non-complete) conditionally complete
linear order. A reparametrization trick is needed to avoid taking the infimum of sets which are
not bounded below. -/
theorem HasBasis.liminf_eq_ciSup_ciInf {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} [Countable (Subtype p)] [Nonempty (Subtype p)]
    (hv : v.HasBasis p s) {f : ι → α} (hs : ∀ (j : Subtype p), (s j).Nonempty)
    (H : ∃ (j : Subtype p), BddBelow (range (fun (i : s j) ↦ f i))) :
    liminf f v = ⨆ (j : Subtype p), ⨅ (i : s (liminf_reparam f s p j)), f i

(hs : ∀ (j : Subtype p), (s ↑j).Nonempty)

(H : ∃ j, BddBelow (Set.range fun i => f ↑i))


theorem range_subset : Set.range (algebraMap R A) ⊆ S

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
(S : StarSubalgebra R A)


@[simp]
theorem close_close {X : C} (S : Sieve X) : J₁.close (J₁.close S) = J₁.close S

(J₁ : CategoryTheory.GrothendieckTopology C)


/-- Lean takes the unprimed name for `Nat.shiftLeft_eq m n : m <<< n = m * 2 ^ n`. -/
@[simp] lemma shiftLeft_eq' (m n : Nat) : shiftLeft m n = m <<< n


theorem IsPreconnected.Ioi_csInf_subset {s : Set α} (hs : IsPreconnected s) (hb : BddBelow s)
    (ha : ¬BddAbove s) : Ioi (sInf s) ⊆ s

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{s : Set α}
(hs : IsPreconnected s)
(hb : BddBelow s)
(ha : ¬BddAbove s)


/-- A letter only reduces to itself. -/
@[to_additive "A letter only reduces to itself."]
theorem singleton_iff {x} : Red [x] L₁ ↔ L₁ = [x]

{α : Type u}
{L₁ : List (α × Bool)}
{x : α × Bool}


theorem lcm_dvd {a : α} : (∀ b ∈ s, f b ∣ a) → s.lcm f ∣ a

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
{f : β → α}
{a : α}


/-- A measure `μ` on `α ⧸ G` satisfying `QuotientMeasureEqMeasurePreimage` and having finite
covolume is a finite measure. -/
@[to_additive]
theorem QuotientMeasureEqMeasurePreimage.isFiniteMeasure_quotient
    (μ : Measure (Quotient α_mod_G)) [QuotientMeasureEqMeasurePreimage ν μ]
    [hasFun : HasFundamentalDomain G α ν] (h : covolume G α ν ≠ ∞) :
    IsFiniteMeasure μ

[MeasureTheory.SMulInvariantMeasure G α ν]

(μ : MeasureTheory.Measure (Quotient (MulAction.orbitRel G α)))

[hasFun : MeasureTheory.HasFundamentalDomain G α ν]


protected theorem LiftRel.swap (h : LiftRel r s x y) : LiftRel s r x.swap y.swap

∀ {α : Type u_1} {α_1 : Type u_2} {r : α → α_1 → Prop} {β : Type u_3} {β_1 : Type u_4} {s : β → β_1 → Prop} {x : α ⊕ β}
  {y : α_1 ⊕ β_1}, Sum.LiftRel r s x y → Sum.LiftRel s r x.swap y.swap


@[simp]
theorem tan_arg (x : ℂ) : Real.tan (arg x) = x.im / x.re


@[to_additive] theorem embedding_mk : Embedding (@mk M)


theorem mem_zpowers (g : G) : g ∈ zpowers g


theorem Poly.mulMon_denote (ctx : Context) (p : Poly) (k : Nat) (m : Mon) : (p.mulMon k m).denote ctx = p.denote ctx * k * m.denote ctx

(ctx : Nat.Linear.Context)
(p : Nat.SOM.Poly)
(k : Nat)
(m : Nat.SOM.Mon)

Nat.SOM.Poly.denote ctx (p.mulMon k m) = Nat.SOM.Poly.denote ctx p * k * Nat.SOM.Mon.denote ctx m


theorem AlgebraicIndependent.mvPolynomialOptionEquivPolynomialAdjoin_X_some
    (hx : AlgebraicIndependent R x) (i) :
    hx.mvPolynomialOptionEquivPolynomialAdjoin (X (some i)) =
      Polynomial.C (hx.aevalEquiv (X i))

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(hx : AlgebraicIndependent R x)
(i : ι)

hx.mvPolynomialOptionEquivPolynomialAdjoin (MvPolynomial.X (some i)) = Polynomial.C (hx.aevalEquiv (MvPolynomial.X i))


nonrec theorem ContMDiff.prod_mk {f : M → M'} {g : M → N'} (hf : ContMDiff I I' n f)
    (hg : ContMDiff I J' n g) : ContMDiff I (I'.prod J') n fun x => (f x, g 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' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{n : ℕ∞}
{f : M → M'}
{g : M → N'}
(hf : ContMDiff I I' n f)
(hg : ContMDiff I J' n g)


@[simp]
theorem asModuleEquiv_map_smul (r : MonoidAlgebra k G) (x : ρ.asModule) :
    ρ.asModuleEquiv (r • x) = ρ.asAlgebraHom r (ρ.asModuleEquiv x)

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

ρ.asModuleEquiv (r • x) = (ρ.asAlgebraHom r) (ρ.asModuleEquiv x)


@[simp]
theorem toIocDiv_sub_zsmul' (a b : α) (m : ℤ) :
    toIocDiv hp (a - m • p) b = toIocDiv hp a b + m

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


theorem AlternatingMap.map_basis_ne_zero_iff {ι : Type*} [Finite ι] (e : Basis ι R M)
    (f : M [⋀^ι]→ₗ[R] R) : f e ≠ 0 ↔ f ≠ 0

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{ι : Type u_5}
[Finite ι]
(e : Basis ι R M)
(f : M [⋀^ι]→ₗ[R] R)


theorem Fix.ind_rec {α : Type u} (g₁ g₂ : Fix F → α)
    (h : ∀ x : F (Fix F), g₁ <$> x = g₂ <$> x → g₁ (Fix.mk x) = g₂ (Fix.mk x)) :
    ∀ x, g₁ x = g₂ x

(h : ∀ (x : F (QPF.Fix F)), g₁ <$> x = g₂ <$> x → g₁ (QPF.Fix.mk x) = g₂ (QPF.Fix.mk x))


lemma ext {X Y : SemiRingCat} {f g : X ⟶ Y} (w : ∀ x : X, f x = g x) : f = g

{X Y : SemiRingCat}
{f g : X ⟶ Y}
(w : ∀ (x : ↑X), f x = g x)


/-- The composition of homotopy equivalences. -/
@[simps]
def trans (e : HomotopyEquiv S₁ S₂) (e' : HomotopyEquiv S₂ S₃) :
    HomotopyEquiv S₁ S₃

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

(e.trans e').homotopyInvHomId =
  (CategoryTheory.ShortComplex.Homotopy.ofEq ⋯).trans
    (((e.homotopyInvHomId.compRight e'.hom).compLeft e'.inv).trans
      ((CategoryTheory.ShortComplex.Homotopy.ofEq ⋯).trans e'.homotopyInvHomId))


protected theorem congr_arg (f : F) {x y : α} (h₂ : x = y) : f x = f y

{F : Sort u_1}
{α : Sort u_2}
{β : Sort u_3}
[i : FunLike F α β]
(f : F)
{x y : α}
(h₂ : x = y)


@[to_additive]
theorem inducing_embedProduct : Inducing (embedProduct M)

{M : Type u_1}
[TopologicalSpace M]
[Monoid M]


/-- If `(fixedBy α g)ᶜ ⊆ s`, then `g` cannot move a point of `s` outside of `s`. -/
@[to_additive "If `(fixedBy α g)ᶜ ⊆ s`, then `g` cannot move a point of `s` outside of `s`."]
theorem set_mem_fixedBy_of_movedBy_subset {s : Set α} {g : G} (s_subset : (fixedBy α g)ᶜ ⊆ s) :
    s ∈ fixedBy (Set α) g

(s_subset : (AddAction.fixedBy α g)ᶜ ⊆ s)


/-- A side of a right-angled triangle divided by the cosine of the adjacent angle equals the
hypotenuse. -/
theorem dist_div_cos_oangle_right_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P}
    (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) : dist p₃ p₂ / Real.Angle.cos (∡ p₂ p₃ p₁) = dist p₁ p₃

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

dist p₃ p₂ / (∡ p₂ p₃ p₁).cos = dist p₁ p₃


theorem IsVanKampenColimit.map_reflective [HasColimitsOfShape J C]
    {Gl : C ⥤ D} {Gr : D ⥤ C} (adj : Gl ⊣ Gr) [Gr.Full] [Gr.Faithful]
    {F : J ⥤ D} {c : Cocone (F ⋙ Gr)} (H : IsVanKampenColimit c)
    [∀ X (f : X ⟶ Gl.obj c.pt), HasPullback (Gr.map f) (adj.unit.app c.pt)]
    [∀ X (f : X ⟶ Gl.obj c.pt), PreservesLimit (cospan (Gr.map f) (adj.unit.app c.pt)) Gl]
    [∀ X i (f : X ⟶ c.pt), PreservesLimit (cospan f (c.ι.app i)) Gl] :
    IsVanKampenColimit (Gl.mapCocone c)

{c : CategoryTheory.Limits.Cocone (F.comp Gr)}

(H : CategoryTheory.IsVanKampenColimit c)

[∀ (X : D) (f : X ⟶ Gl.obj c.pt), CategoryTheory.Limits.HasPullback (Gr.map f) (adj.unit.app c.pt)]

[(X : D) →
    (f : X ⟶ Gl.obj c.pt) →
      CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan (Gr.map f) (adj.unit.app c.pt)) Gl]

[(X : C) →
    (i : J) → (f : X ⟶ c.pt) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan f (c.ι.app i)) Gl]


theorem map_neg_atTop : map (Neg.neg : β → β) atTop = atBot

Filter.map Neg.neg Filter.atTop = Filter.atBot


theorem t'_jii (i j : D.J) : D.t' j i i = pullback.fst _ _ ≫ D.t j i ≫ inv (pullback.snd _ _)

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
(D : CategoryTheory.GlueData C)
(i j : D.J)

D.t' j i i =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullback.fst (D.f j i) (D.f j i))
    (CategoryTheory.CategoryStruct.comp (D.t j i)
      (CategoryTheory.inv (CategoryTheory.Limits.pullback.snd (D.f i i) (D.f i j))))


theorem nim_fuzzy_zero_of_ne_zero {o : Ordinal} (ho : o ≠ 0) : nim o ‖ 0


@[to_additive (attr := simp)]
theorem map_mul (f : α → β) (x y : FreeGroup α) : f <$> (x * y) = f <$> x * f <$> y

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


/-- The supremum of submodules that form a graded monoid is a subalgebra, and equal to the range of
`DirectSum.coeAlgHom`. -/
theorem Submodule.iSup_eq_toSubmodule_range [AddMonoid ι] [CommSemiring S] [Semiring R]
    [Algebra S R] (A : ι → Submodule S R) [SetLike.GradedMonoid A] :
    ⨆ i, A i = Subalgebra.toSubmodule (DirectSum.coeAlgHom A).range

{ι : Type u_1}
{S : Type u_3}
{R : Type u_4}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring S]
[Semiring R]
[Algebra S R]
(A : ι → Submodule S R)
[SetLike.GradedMonoid A]


theorem NatTrans.Equifibered.whiskerRight {F G : J ⥤ C} {α : F ⟶ G} (hα : Equifibered α)
    (H : C ⥤ D) [∀ (i j : J) (f : j ⟶ i), PreservesLimit (cospan (α.app i) (G.map f)) H] :
    Equifibered (whiskerRight α H)

(hα : CategoryTheory.NatTrans.Equifibered α)

[(i j : J) → (f : j ⟶ i) → CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.cospan (α.app i) (G.map f)) H]

CategoryTheory.NatTrans.Equifibered (CategoryTheory.whiskerRight α H)


theorem cast_injective : Function.Injective (Nat.cast : ℕ → R)

{R : Type u_1}
[AddMonoidWithOne R]
[CharZero R]


theorem sdiff_eq_inter_compl (s t : Finset α) : s \ t = s ∩ tᶜ

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


theorem chain_iff_pairwise [IsTrans α r] : Chain r s ↔ ∀ a ∈ s, ∀ b ∈ s, r a b

{α : Type u_1}
{r : α → α → Prop}
{s : Cycle α}
[IsTrans α r]

Cycle.Chain r s ↔ ∀ a ∈ s, ∀ b ∈ s, r a b


theorem vector_ofFn' {n} : Computable (@Vector.ofFn α n)


@[fun_prop]
theorem DifferentiableAt.continuousMultilinear_apply_const (hc : DifferentiableAt 𝕜 c x)
    (u : ∀ i, M i) :
    DifferentiableAt 𝕜 (fun y ↦ (c y) u) x

{c : E → ContinuousMultilinearMap 𝕜 M H}


lemma subset_singleton_zero_compl {a : A} (ha : IsUnit a) : spectrum R a ⊆ {0}ᶜ

(R : Type u)
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
{a : A}
(ha : IsUnit a)


@[simp]
theorem continuum_toNat : toNat continuum = 0


@[simp]
theorem one_moveLeft (x) : moveLeft 1 x = 0


@[simp]
theorem _root_.Prod.snd_exp [CompleteSpace 𝔹] (x : 𝔸 × 𝔹) : (exp 𝕂 x).snd = exp 𝕂 x.snd

(𝕂 : Type u_1)
{𝔸 : Type u_2}
{𝔹 : Type u_3}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[NormedRing 𝔹]
[NormedAlgebra 𝕂 𝔹]
[CompleteSpace 𝔸]
[CompleteSpace 𝔹]
(x : 𝔸 × 𝔹)

(NormedSpace.exp 𝕂 x).2 = NormedSpace.exp 𝕂 x.2


/-- If there exists a two-sided inverse `M'` for `M` (indexed differently),
then `det (N * M) = det (M * N)`. -/
theorem det_comm' [DecidableEq m] [DecidableEq n] {M : Matrix n m A} {N : Matrix m n A}
    {M' : Matrix m n A} (hMM' : M * M' = 1) (hM'M : M' * M = 1) : det (M * N) = det (N * M)

{A : Type u_5}
[CommRing A]
{m : Type u_6}
{n : Type u_7}
[Fintype m]
[Fintype n]
[DecidableEq m]
[DecidableEq n]
{M : Matrix n m A}
{N M' : Matrix m n A}
(hMM' : M * M' = 1)
(hM'M : M' * M = 1)


theorem zero_apply (a : L) : (0 : LieDerivation R L M) a = 0

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(a : L)


@[to_additive]
theorem map_le_range (H : Subgroup G) : map f H ≤ f.range

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(f : G →* N)
(H : Subgroup G)


theorem _root_.Real.toNNReal_inv {x : ℝ} : Real.toNNReal x⁻¹ = (Real.toNNReal x)⁻¹


@[simp]
theorem LinearMap.toMatrix_basis_equiv [Fintype l] [DecidableEq l] (b : Basis l R M₁)
    (b' : Basis l R M₂) :
    LinearMap.toMatrix b' b (b'.equiv b (Equiv.refl l) : M₂ →ₗ[R] M₁) = 1

{R : Type u_1}
[CommSemiring R]
{l : Type u_2}
{M₁ : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
[Fintype l]
[DecidableEq l]
(b : Basis l R M₁)
(b' : Basis l R M₂)

(LinearMap.toMatrix b' b) ↑(b'.equiv b (Equiv.refl l)) = 1


/-- The identity lax monoidal functor. -/
@[simps]
def id : LaxMonoidalFunctor.{v₁, v₁} C C

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

(CategoryTheory.LaxMonoidalFunctor.id C).ε = 𝟙 (𝟙_ C)


theorem contractLeft_algebraMap_mul (r : R) (b : CliffordAlgebra Q) :
    d⌋(algebraMap _ _ r * b) = algebraMap _ _ r * (d⌋b)

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(d : Module.Dual R M)
(r : R)
(b : CliffordAlgebra Q)

(CliffordAlgebra.contractLeft d) ((algebraMap R (CliffordAlgebra Q)) r * b) =
  (algebraMap R (CliffordAlgebra Q)) r * (CliffordAlgebra.contractLeft d) b


@[simp]
theorem count_apply_finset [MeasurableSingletonClass α] (s : Finset α) :
    count (↑s : Set α) = s.card

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

MeasureTheory.Measure.count ↑s = ↑s.card


theorem untop'_eq_iff {d y : α} {x : WithTop α} : untop' d x = y ↔ x = y ∨ x = ⊤ ∧ y = d

{α : Type u_1}
{d y : α}
{x : WithTop α}

WithTop.untop' d x = y ↔ x = ↑y ∨ x = ⊤ ∧ y = d


theorem IsLittleO.rpow (hr : 0 < r) (hg : 0 ≤ᶠ[l] g) (h : f =o[l] g) :
    (fun x => f x ^ r) =o[l] fun x => g x ^ r

{α : Type u_1}
{r : ℝ}
{l : Filter α}
{f g : α → ℝ}
(hr : 0 < r)
(hg : 0 ≤ᶠ[l] g)
(h : f =o[l] g)


lemma _root_.BoundarylessManifold.isInteriorPoint {x : M} :
    IsInteriorPoint I 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]
[BoundarylessManifold I M]
{x : M}


@[simp]
theorem zero_re : (0 : ℤ√d).re = 0


theorem sqrt_eq_rpow (x : ℝ) : √x = x ^ (1 / (2 : ℝ))


/-- Given a triangle, and a fourth point such that twice the angle between two points of the
triangle at that fourth point equals twice the third angle of the triangle, the fourth point
lies in the circumsphere of the triangle. -/
theorem mem_circumsphere_of_two_zsmul_oangle_eq {t : Triangle ℝ P} {p : P} {i₁ i₂ i₃ : Fin 3}
    (h₁₂ : i₁ ≠ i₂) (h₁₃ : i₁ ≠ i₃) (h₂₃ : i₂ ≠ i₃)
    (h : (2 : ℤ) • ∡ (t.points i₁) p (t.points i₃) =
      (2 : ℤ) • ∡ (t.points i₁) (t.points i₂) (t.points i₃)) : p ∈ t.circumsphere

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

(h : 2 • ∡ (t.points i₁) p (t.points i₃) = 2 • ∡ (t.points i₁) (t.points i₂) (t.points i₃))


@[simp]
theorem frontier_setOf_lt_re (a : ℝ) : frontier { z : ℂ | a < z.re } = { z | z.re = a }

frontier {z | a < z.re} = {z | z.re = a}


theorem algebraicIndependent_subtype {s : Set A} :
    AlgebraicIndependent R ((↑) : s → A) ↔
      ∀ p : MvPolynomial A R, p ∈ MvPolynomial.supported R s → aeval id p = 0 → p = 0

{R : Type u_3}
{A : Type u_5}
[CommRing R]
[CommRing A]
[Algebra R A]
{s : Set A}

AlgebraicIndependent R Subtype.val ↔ ∀ p ∈ MvPolynomial.supported R s, (MvPolynomial.aeval id) p = 0 → p = 0


lemma rpow_inv_lt_iff_of_pos (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x ^ z⁻¹ < y ↔ x < y ^ z


/-- This property of an element `a : α` in a well-ordered type holds iff `a` is a
limit element, i.e. it is not a successor and it is not the smallest element of `α`. -/
class IsWellOrderLimitElement (a : α) : Prop where
  not_bot : ∃ (b : α), b < a
  not_succ (b : α) (hb : b < a) : ∃ (c : α), b < c ∧ c < a

{α : Type u_1}
[LinearOrder α]
{a : α}
[self : IsWellOrderLimitElement a]


/-- The cardinality of the interval (-∞, a]. -/
theorem mk_Iic_real (a : ℝ) : #(Iic a) = 𝔠


protected theorem IsCycleOn.countable (hs : f.IsCycleOn s) : s.Countable

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}
(hs : f.IsCycleOn s)


{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(f : P →ᵃⁱ[𝕜] P₂)


theorem ext₂ {f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P} (H : ∀ m n, f m n = g m n) : f = g

{f g : M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] P}


theorem setAverage_congr (h : s =ᵐ[μ] t) : ⨍ x in s, f x ∂μ = ⨍ x in t, f x ∂μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure α}
{s t : Set α}
{f : α → E}
(h : s =ᵐ[μ] t)

⨍ (x : α) in s, f x ∂μ = ⨍ (x : α) in t, f x ∂μ


theorem HasFiniteIntegral.of_finite [Finite α] [IsFiniteMeasure μ] {f : α → β} :
    HasFiniteIntegral f μ

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


theorem X_inj [Nontrivial R] {s t : σ} : (X s : MvPowerSeries σ R) = X t ↔ s = t

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
[Nontrivial R]
{s t : σ}

MvPowerSeries.X s = MvPowerSeries.X t ↔ s = t


theorem iff_of_iso {A B : Cᵒᵖ ⥤ Type v} (η : A ⟶ B) [IsIso η] : IsIndObject A ↔ IsIndObject B

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

CategoryTheory.Limits.IsIndObject A ↔ CategoryTheory.Limits.IsIndObject B


theorem cast_zero : IsNat (a : R) (nat_lit 0) → a = 0


theorem ext_iff {x y : AdicCauchySequence I M} : x = y ↔ ∀ n, x n = y n

{x y : AdicCompletion.AdicCauchySequence I M}


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

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[AddAction α β]
{A : Set β}
{a : α}
{x : β}


theorem submodulesRingBasis : SubmodulesRingBasis
    (fun (r : R⁰) ↦ Submodule.span (R_hat R K) {((r : R) : FiniteAdeleRing R K)})

(R : Type u_1)
(K : Type u_2)
[CommRing R]
[IsDedekindDomain R]
[Field K]
[Algebra R K]
[IsFractionRing R K]

SubmodulesRingBasis fun r => Submodule.span (DedekindDomain.FiniteIntegralAdeles R K) {↑↑r}


@[deprecated (since := "2024-05-05")] theorem forall₂_of_length_eq_of_nthLe {x y}
    (H : x.length = y.length) (H' : ∀ i h₁ h₂, R (x.nthLe i h₁) (y.nthLe i h₂)) :
    Forall₂ R x y

(H' : ∀ (i : ℕ) (h₁ : i < x.length) (h₂ : i < y.length), R (x.nthLe i h₁) (y.nthLe i h₂))


theorem isSeparator_iff_faithful_coyoneda_obj (G : C) :
    IsSeparator G ↔ (coyoneda.obj (op G)).Faithful

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

CategoryTheory.IsSeparator G ↔ (CategoryTheory.coyoneda.obj (Opposite.op G)).Faithful


@[to_additive (attr := simp)]
theorem infEdist_inv_inv (x : E) (s : Set E) : infEdist x⁻¹ s⁻¹ = infEdist x s

{E : Type u_1}
[SeminormedAddCommGroup E]
(x : E)
(s : Set E)

EMetric.infEdist (-x) (-s) = EMetric.infEdist x s


@[simp]
theorem eval₂_id {g : σ → R} (p : MvPolynomial σ R) : eval₂ (RingHom.id _) g p = eval g p

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{g : σ → R}
(p : MvPolynomial σ R)

MvPolynomial.eval₂ (RingHom.id R) g p = (MvPolynomial.eval g) p


/-- The morphism in `CochainComplex C ℤ` associated to a `0`-cocycle. -/
@[simps]
def homOf (z : Cocycle F G 0) : F ⟶ G

(z : CochainComplex.HomComplex.Cocycle F G 0)


theorem Finite.of_summable_const [LinearOrderedAddCommGroup α] [TopologicalSpace α] [Archimedean α]
    [OrderClosedTopology α] {b : α} (hb : 0 < b) (hf : Summable fun _ : ι ↦ b) :
    Finite ι

{ι : Type u_1}
{α : Type u_3}
[LinearOrderedAddCommGroup α]
[TopologicalSpace α]
[Archimedean α]
[OrderClosedTopology α]
{b : α}
(hb : 0 < b)
(hf : Summable fun x => b)


theorem UInt64.toNat_zero : (0 : UInt64).toNat = 0


lemma sup_edge_of_adj (h : G.Adj s t) : G ⊔ edge s t = G

{V : Type u_1}
(G : SimpleGraph V)
{s t : V}
(h : G.Adj s t)


theorem mul_isClassified (k : ℤ) (hc : h.IsClassified) : (h.mul k).IsClassified

{x y z : ℤ}
(h : PythagoreanTriple x y z)
(k : ℤ)
(hc : h.IsClassified)


theorem ContDiffOn.norm_sq (hf : ContDiffOn ℝ n f s) : ContDiffOn ℝ n (fun y => ‖f y‖ ^ 2) s

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
{s : Set G}
{n : ℕ∞}
(hf : ContDiffOn ℝ n f s)


@[simp]
theorem eval_pow (n : ℕ) : (p ^ n).eval x = p.eval x ^ n

{R : Type u}
[CommSemiring R]
{p : R[X]}
{x : R}
(n : ℕ)

Polynomial.eval x (p ^ n) = Polynomial.eval x p ^ n


@[simp]
theorem mem_nthRoots {n : ℕ} (hn : 0 < n) {a x : R} : x ∈ nthRoots n a ↔ x ^ n = a

{R : Type u}
[CommRing R]
[IsDomain R]
{n : ℕ}
(hn : 0 < n)
{a x : R}


@[simp]
lemma δ_comp_zero_cocycle {n : ℤ} (z₁ : Cochain F G n) (z₂ : Cocycle G K 0) (m : ℤ) :
    δ n m (z₁.comp z₂.1 (add_zero n)) =
      (δ n m z₁).comp z₂.1 (add_zero m)

(z₁ : CochainComplex.HomComplex.Cochain F G n)

(z₂ : CochainComplex.HomComplex.Cocycle G K 0)

CochainComplex.HomComplex.δ n m (z₁.comp ↑z₂ ⋯) = (CochainComplex.HomComplex.δ n m z₁).comp ↑z₂ ⋯


protected theorem pow_mem {x : R} (hx : x ∈ s) (n : ℕ) : x ^ n ∈ s

{R : Type u}
[Ring R]
(s : Subring R)
{x : R}
(hx : x ∈ s)
(n : ℕ)


theorem Tendsto.nhds_atBot [NoMinOrder X] {f : α → X} {l : Filter α} (h : Tendsto f l atBot) :
    Tendsto (𝓝 ∘ f) l (𝓝 atBot)

{α : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
[PartialOrder X]
[OrderTopology X]
[NoMinOrder X]
{f : α → X}
{l : Filter α}
(h : Filter.Tendsto f l Filter.atBot)

Filter.Tendsto (𝓝 ∘ f) l (𝓝 Filter.atBot)


/-- If the indicator functions of a.e.-measurable sets `Aᵢ` converge a.e. to the indicator function
of a set `A` along a nontrivial countably generated filter, then `A` is also a.e.-measurable. -/
lemma nullMeasurableSet_of_tendsto_indicator [NeBot L] {μ : Measure α}
    (As_mble : ∀ i, NullMeasurableSet (As i) μ)
    (h_lim : ∀ᵐ x ∂μ, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
    NullMeasurableSet A μ

(As_mble : ∀ (i : ι), MeasureTheory.NullMeasurableSet (As i) μ)

(h_lim : ∀ᵐ (x : α) ∂μ, ∀ᶠ (i : ι) in L, x ∈ As i ↔ x ∈ A)


/-- The equivalence between the opposite of a product and the product of the opposites. -/
@[simps]
def prodOpEquiv : (C × D)ᵒᵖ ≌ Cᵒᵖ × Dᵒᵖ

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

(CategoryTheory.prodOpEquiv C).unitIso = CategoryTheory.Iso.refl (CategoryTheory.Functor.id (C × D)ᵒᵖ)


theorem pred_ne_self {α : Type*} [NonAssocRing α] [Nontrivial α] (a : α) : a - 1 ≠ a

{α : Type u_2}
[NonAssocRing α]
[Nontrivial α]
(a : α)


theorem tendsto_nhds_Prop {l : Filter α} {p : α → Prop} {q : Prop} :
    Tendsto p l (𝓝 q) ↔ (q → ∀ᶠ x in l, p x)

{α : Type u_1}
{l : Filter α}
{p : α → Prop}
{q : Prop}

Filter.Tendsto p l (𝓝 q) ↔ q → ∀ᶠ (x : α) in l, p x


theorem coverDense_iff_isBasis [Category ι] (B : ι ⥤ Opens X) :
    B.IsCoverDense (Opens.grothendieckTopology X) ↔ Opens.IsBasis (Set.range B.obj)

{X : TopCat}
{ι : Type u_1}
[CategoryTheory.Category.{u_2, u_1} ι]
(B : ι ⥤ TopologicalSpace.Opens ↑X)

B.IsCoverDense (Opens.grothendieckTopology ↑X) ↔ TopologicalSpace.Opens.IsBasis (Set.range B.obj)


@[simp]
theorem mem_carrier {p : SubMulAction R M} {x : M} : x ∈ p.carrier ↔ x ∈ (p : Set M)

{R : Type u}
{M : Type v}
[SMul R M]
{p : SubMulAction R M}
{x : M}


theorem finsum_smul_mem_convex {g : ι → M → F} {t : Set F} {x : M} (hx : x ∈ s)
    (hg : ∀ i, f i x ≠ 0 → g i x ∈ t) (ht : Convex ℝ t) : ∑ᶠ i, f i x • g i x ∈ t

(hg : ∀ (i : ι), (f i) x ≠ 0 → g i x ∈ t)


@[simp]
theorem natCast_toNat (p : ℕ) : ∀ {z : ℤ} (_h : 0 ≤ z), (z.toNat : ZMod p) = z


theorem cast_ne_zero [CharZero α] {n : ℚ} : (n : α) ≠ 0 ↔ n ≠ 0

{α : Type u_3}
[DivisionRing α]
[CharZero α]
{n : ℚ}

↑n ≠ 0 ↔ n ≠ 0


@[simp]
theorem map_comp_apply (f : X ⟶ Y) (g : Y ⟶ Z) (a : F.obj X) :
    (F.map (f ≫ g)) a = (F.map g) ((F.map f) a)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : CategoryTheory.Functor C (Type w))
{X Y Z : C}
(f : X ⟶ Y)
(g : Y ⟶ Z)
(a : F.obj X)

F.map (CategoryTheory.CategoryStruct.comp f g) a = F.map g (F.map f a)


/-- Constructor for short complexes in `ModuleCat.{v} R` taking as inputs
morphisms `f` and `g` and the assumption `LinearMap.range f ≤ LinearMap.ker g`. -/
@[simps]
def moduleCatMkOfKerLERange {X₁ X₂ X₃ : ModuleCat.{v} R} (f : X₁ ⟶ X₂) (g : X₂ ⟶ X₃)
    (hfg : LinearMap.range f ≤ LinearMap.ker g) : ShortComplex (ModuleCat.{v} R)

(CategoryTheory.ShortComplex.moduleCatMkOfKerLERange f g hfg).X₂ = X₂


@[simp] theorem mul_mod_right (m n : Nat) : (m * n) % m = 0


@[simp]
theorem map_def {β} : ((· <$> ·) : (α → β) → Semiquot α → Semiquot β) = map


theorem isOpen_iff_generate_Ici_compl : IsOpen s ↔ GenerateOpen { t | ∃ a, (Ici a)ᶜ = t } s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsLower α]
{s : Set α}

IsOpen s ↔ TopologicalSpace.GenerateOpen {t | ∃ a, (Set.Ici a)ᶜ = t} s


theorem sub_one_cancel : ∀ {a b : Nat}, 0 < a → 0 < b → a - 1 = b - 1 → a = b


@[simp]
theorem rotate'_length_mul (l : List α) : ∀ n : ℕ, l.rotate' (l.length * n) = l


/-- The square of the sine of `π / 3` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_sin_pi_div_three : sin (π / 3) ^ 2 = 3 / 4


theorem inv_lt_one (ha : 1 < a) : a⁻¹ < 1

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(ha : 1 < a)


@[measurability, fun_prop]
theorem measurable_edist_right : Measurable (edist x)

{α : Type u_1}
[PseudoEMetricSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
{x : α}


/-- In a normed vector space `E`, there can be no satellite configuration with `multiplicity E + 1`
points and the parameter `goodτ E`. This will ensure that in the inductive construction to get
the Besicovitch covering families, there will never be more than `multiplicity E` nonempty
families. -/
theorem isEmpty_satelliteConfig_multiplicity :
    IsEmpty (SatelliteConfig E (multiplicity E) (goodτ E))

(E : Type u_1)
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]

IsEmpty (Besicovitch.SatelliteConfig E (Besicovitch.multiplicity E) (Besicovitch.goodτ E))


/-- An irreducible real polynomial has degree at most two. -/
lemma Irreducible.degree_le_two {p : ℝ[X]} (hp : Irreducible p) : degree p ≤ 2


lemma ContinuousOn.finset_inf'_apply (hne : s.Nonempty) (hs : ∀ i ∈ s, ContinuousOn (f i) t) :
    ContinuousOn (fun a ↦ s.inf' hne (f · a)) t

{L : Type u_1}
{X : Type u_2}
[TopologicalSpace L]
[TopologicalSpace X]
{ι : Type u_3}
[SemilatticeInf L]
[ContinuousInf L]
{s : Finset ι}
{f : ι → X → L}
{t : Set X}
(hne : s.Nonempty)
(hs : ∀ i ∈ s, ContinuousOn (f i) t)

ContinuousOn (fun a => s.inf' hne fun x => f x a) t


@[to_additive]
theorem Pi.multipliable {f : ι → ∀ x, π x} : Multipliable f ↔ ∀ x, Multipliable fun i ↦ f i x

{α : Type u_1}
{ι : Type u_5}
{π : α → Type u_6}
[(x : α) → CommMonoid (π x)]
[(x : α) → TopologicalSpace (π x)]
{f : ι → (x : α) → π x}

Multipliable f ↔ ∀ (x : α), Multipliable fun i => f i x


@[simp]
theorem _root_.ContinuousLinearMap.compContinuousMultilinearMap_coe (g : M₂ →L[R] M₃)
    (f : ContinuousMultilinearMap R M₁ M₂) :
    (g.compContinuousMultilinearMap f : (∀ i, M₁ i) → M₃) =
      (g : M₂ → M₃) ∘ (f : (∀ i, M₁ i) → M₂)

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
{M₃ : Type w₃}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[Module R M₃]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
[TopologicalSpace M₃]
(g : M₂ →L[R] M₃)
(f : ContinuousMultilinearMap R M₁ M₂)

⇑(g.compContinuousMultilinearMap f) = ⇑g ∘ ⇑f


@[to_additive]
lemma Filter.tendsto_const_div_iff {G : Type*} [CommGroup G] [TopologicalSpace G] [ContinuousDiv G]
    (b : G) {c : G} {f : α → G} {l : Filter α} :
    Tendsto (fun k : α ↦ b / f k) l (𝓝 (b / c)) ↔ Tendsto f l (𝓝 c)

{α : Type u}
{G : Type u_1}
[CommGroup G]
[TopologicalSpace G]
[ContinuousDiv G]
(b : G)
{c : G}
{f : α → G}
{l : Filter α}

Filter.Tendsto (fun k => b / f k) l (𝓝 (b / c)) ↔ Filter.Tendsto f l (𝓝 c)


@[simp] theorem sigmaCongrRight_trans {α} {β : α → Sort _}
    (F : ∀ a, Perm (β a)) (G : ∀ a, Perm (β a)) :
    (sigmaCongrRight F).trans (sigmaCongrRight G) = sigmaCongrRight fun a => (F a).trans (G a)

{α : Type u_1}
{β : α → Type u_2}
(F G : (a : α) → Equiv.Perm (β a))

Equiv.trans (Equiv.Perm.sigmaCongrRight F) (Equiv.Perm.sigmaCongrRight G) =
  Equiv.Perm.sigmaCongrRight fun a => Equiv.trans (F a) (G a)


/-- The (Bochner) integral of the product of two independent, integrable random
  variables is the product of their integrals. The proof is pedestrian decomposition
  into their positive and negative parts in order to apply `IndepFun.integral_mul_of_nonneg`
  four times. -/
theorem IndepFun.integral_mul_of_integrable (hXY : IndepFun X Y μ) (hX : Integrable X μ)
    (hY : Integrable Y μ) : integral μ (X * Y) = integral μ X * integral μ Y

(hXY : ProbabilityTheory.IndepFun X Y μ)

MeasureTheory.integral μ (X * Y) = MeasureTheory.integral μ X * MeasureTheory.integral μ Y


protected theorem Associated.gcd [GCDMonoid α]
    {a₁ a₂ b₁ b₂ : α} (ha : Associated a₁ a₂) (hb : Associated b₁ b₂) :
    Associated (gcd a₁ b₁) (gcd a₂ b₂)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{a₁ a₂ b₁ b₂ : α}
(ha : Associated a₁ a₂)
(hb : Associated b₁ b₂)


@[simp]
theorem diag_zero [Zero α] : diag (0 : Matrix n n α) = 0


theorem fderivWithin.snd (hs : UniqueDiffWithinAt 𝕜 s x) (h : DifferentiableWithinAt 𝕜 f₂ s x) :
    fderivWithin 𝕜 (fun x => (f₂ x).2) s x = (snd 𝕜 F G).comp (fderivWithin 𝕜 f₂ s x)

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

fderivWithin 𝕜 (fun x => (f₂ x).2) s x = (ContinuousLinearMap.snd 𝕜 F G).comp (fderivWithin 𝕜 f₂ s x)


theorem IsSuffix.eq_of_length (h : l₁ <:+ l₂) : l₁.length = l₂.length → l₁ = l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁ <:+ l₂ → l₁.length = l₂.length → l₁ = l₂


theorem repOfTprodIso_apply (x : TensorProduct k V W) : (repOfTprodIso ρ τ).hom.hom x = x

{k G : Type u}
[CommRing k]
[Monoid G]
{V W : Type u}
[AddCommGroup V]
[AddCommGroup W]
[Module k V]
[Module k W]
(ρ : Representation k G V)
(τ : Representation k G W)
(x : TensorProduct k V W)


/-- A space with `MeasurableSpace` and `TopologicalSpace` structures such that
the `σ`-algebra of measurable sets is exactly the `σ`-algebra generated by open sets. -/
class BorelSpace (α : Type*) [TopologicalSpace α] [MeasurableSpace α] : Prop where
  /-- The measurable sets are exactly the Borel-measurable sets. -/
  measurable_eq : ‹MeasurableSpace α› = borel α

{α : Type u_6}
[TopologicalSpace α]
[MeasurableSpace α]
[self : BorelSpace α]


theorem mul_eq (f g : Conv M N) : f * g = M.comul ≫ f ▷ M.X ≫ N.X ◁ g ≫ N.mul

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{M : Comon_ C}
{N : Mon_ C}
(f g : CategoryTheory.Conv M N)

f * g =
  CategoryTheory.CategoryStruct.comp M.comul
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerRight f M.X)
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerLeft N.X g) N.mul))


theorem HasFDerivAtFilter.congr_of_eventuallyEq (h : HasFDerivAtFilter f f' x L) (hL : f₁ =ᶠ[L] f)
    (hx : f₁ x = f x) : HasFDerivAtFilter f₁ f' x L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{f' : E →L[𝕜] F}
{x : E}
{L : Filter E}
(h : HasFDerivAtFilter f f' x L)
(hL : f₁ =ᶠ[L] f)
(hx : f₁ x = f x)


/-- The equivalence `(X ≅ Y) ≃ (F.obj X ≅ F.obj Y)` given by `h : F.FullyFaithful`. -/
@[simps]
def isoEquiv {X Y : C} : (X ≅ Y) ≃ (F.obj X ≅ F.obj Y)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : CategoryTheory.Functor C D}
(hF : F.FullyFaithful)
{X Y : C}
(i : X ≅ Y)


theorem isReduced_iff : u.IsReduced ↔ u.IsReduced'


protected theorem mul_pow (a b n : Nat) : (a * b) ^ n = a ^ n * b ^ n


@[deprecated getElem_set (since := "2024-06-12")]
theorem get_set {l : List α} {m n} {a : α} (h) :
    (set l m a).get ⟨n, h⟩ = if m = n then a else l.get ⟨n, length_set .. ▸ h⟩

{α : Type u_1}
{l : List α}
{m n : Nat}
{a : α}
(h : n < (l.set m a).length)

(l.set m a).get ⟨n, h⟩ = if m = n then a else l.get ⟨n, ⋯⟩


/-- If `U` is a family of open sets that covers `X`, then `X.restrict U` forms an `X.open_cover`. -/
@[simps! J obj map]
def Scheme.openCoverOfISupEqTop {s : Type*} (X : Scheme.{u}) (U : s → X.Opens)
    (hU : ⨆ i, U i = ⊤) : X.OpenCover

{s : Type u_1}
(X : AlgebraicGeometry.Scheme)
(U : s → X.Opens)
(hU : ⨆ i, U i = ⊤)


@[to_additive]
theorem period_le_orderOf {m : M} (order_pos : 0 < orderOf m) (a : α) :
    period m a ≤ orderOf m

{α : Type v}
{M : Type u}
[Monoid M]
[MulAction M α]
{m : M}
(order_pos : 0 < orderOf m)
(a : α)


/-- When `W` consists of isomorphisms, the identity satisfies the universal property
of the localization. -/
@[simps]
def strictUniversalPropertyFixedTargetId (hW : W ≤ MorphismProperty.isomorphisms C) :
    StrictUniversalPropertyFixedTarget (𝟭 C) W E

(hW : W ≤ CategoryTheory.MorphismProperty.isomorphisms C)

∀ (x : W.IsInvertedBy F), (CategoryTheory.Localization.strictUniversalPropertyFixedTargetId W E hW).lift F x = F


@[csimp] theorem foldr_eq_foldrTR : @foldr = @foldrTR


theorem tendsto_measure_Ioc_atBot [SemilatticeInf α] [NoMinOrder α]
    [(atBot : Filter α).IsCountablyGenerated] (μ : Measure α) (a : α) :
    Tendsto (fun x => μ (Ioc x a)) atBot (𝓝 (μ (Iic a)))

{α : Type u_1}
{m0 : MeasurableSpace α}
[SemilatticeInf α]
[NoMinOrder α]
[Filter.atBot.IsCountablyGenerated]
(μ : MeasureTheory.Measure α)
(a : α)

Filter.Tendsto (fun x => μ (Set.Ioc x a)) Filter.atBot (nhds (μ (Set.Iic a)))


theorem dite_eq_or_eq : (∃ h, dite P A B = A h) ∨ ∃ h, dite P A B = B h

{α : Sort u_1}
(P : Prop)
[Decidable P]
{A : P → α}
{B : ¬P → α}


@[simp]
theorem Tape.move_right_n_head {Γ} [Inhabited Γ] (T : Tape Γ) (i : ℕ) :
    ((Tape.move Dir.right)^[i] T).head = T.nth i

{Γ : Type u_1}
[Inhabited Γ]
(T : Turing.Tape Γ)
(i : ℕ)

((Turing.Tape.move Turing.Dir.right)^[i] T).head = T.nth ↑i


lemma pow (hφ : φ.IsHomogeneous m) (n : ℕ) : (φ ^ n).IsHomogeneous (m * n)

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


theorem rootsOfUnity_le_of_dvd (h : k ∣ l) : rootsOfUnity k M ≤ rootsOfUnity l M

{M : Type u_1}
[CommMonoid M]
{k l : ℕ+}
(h : k ∣ l)


theorem eq_desc_of_comp_eq (g : widePushout _ _ arrows ⟶ X) :
    (∀ j : J, ι arrows j ≫ g = fs j) → head arrows ≫ g = f → g = desc f fs w

[CategoryTheory.Limits.HasWidePushout B objs arrows]

(g : CategoryTheory.Limits.widePushout B objs arrows ⟶ X)

(∀ (j : J), CategoryTheory.Limits.WidePushout.ι arrows j ≫ g = fs j) →
  CategoryTheory.Limits.WidePushout.head arrows ≫ g = f → g = CategoryTheory.Limits.WidePushout.desc f fs w


theorem comp_fst_add_comp_snd [Module R₁ M₂] [Module R₁ M₃] [ContinuousAdd M₃] (f : M₁ →L[R₁] M₃)
    (g : M₂ →L[R₁] M₃) :
    f.comp (ContinuousLinearMap.fst R₁ M₁ M₂) + g.comp (ContinuousLinearMap.snd R₁ M₁ M₂) =
      f.coprod g

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{M₃ : Type u_7}
[TopologicalSpace M₃]
[AddCommMonoid M₃]
[Module R₁ M₁]
[Module R₁ M₂]
[Module R₁ M₃]
[ContinuousAdd M₃]
(f : M₁ →L[R₁] M₃)
(g : M₂ →L[R₁] M₃)


/-- Restating the definition of a colimit cocone in terms of the ∃! operator. -/
theorem existsUnique {t : Cocone F} (h : IsColimit t) (s : Cocone F) :
    ∃! d : t.pt ⟶ s.pt, ∀ j, t.ι.app j ≫ d = s.ι.app j

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

∃! d, ∀ (j : J), t.ι.app j ≫ d = s.ι.app j


@[simp]
lemma homEquiv_refl (f : L₁.obj X ⟶ L₁.obj Y) :
    homEquiv W L₁ L₁ f = f

{C : Type u_1}
{D₁ : Type u_5}
[CategoryTheory.Category.{u_9, u_1} C]
[CategoryTheory.Category.{u_8, u_5} D₁]
(W : CategoryTheory.MorphismProperty C)
(L₁ : CategoryTheory.Functor C D₁)
[L₁.IsLocalization W]
{X Y : C}
(f : L₁.obj X ⟶ L₁.obj Y)

(CategoryTheory.Localization.homEquiv W L₁ L₁) f = f


@[simp]
theorem comp_eq_comp {A A' A'' : Algebra T} (f : A ⟶ A') (g : A' ⟶ A'') :
    Algebra.Hom.comp f g = f ≫ g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T : CategoryTheory.Monad C}
{A A' A'' : T.Algebra}
(f : A ⟶ A')
(g : A' ⟶ A'')

CategoryTheory.Monad.Algebra.Hom.comp f g = CategoryTheory.CategoryStruct.comp f g


theorem le_of_dvd : ∀ {a b : Ordinal}, b ≠ 0 → a ∣ b → a ≤ b
  -- Porting note: `⟨b, rfl⟩ => by` → `⟨b, e⟩ => by subst e`


lemma ne_zero' [CharZero R] : (P.coroot i : N) ≠ 0

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i : ι)
[CharZero R]


lemma Sieve.generateFamily_eq {B : C} {α : Type*} (X : α → C) (π : (a : α) → (X a ⟶ B)) :
    Sieve.generate (Presieve.ofArrows X π) = Sieve.generateFamily X π

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{B : C}
{α : Type u_2}
(X : α → C)
(π : (a : α) → X a ⟶ B)

CategoryTheory.Sieve.generate (CategoryTheory.Presieve.ofArrows X π) = CategoryTheory.Sieve.generateFamily X π


theorem gcd_pos_of_pos_left {m : Nat} (n : Nat) (mpos : 0 < m) : 0 < gcd m n


@[simp]
theorem zero_bind (f : α → FreeAbelianGroup β) : 0 >>= f = 0

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


@[simp] lemma preimage_subtype_val_Iio (a : {x // p x}) : (↑) ⁻¹' (Iio a.1) = Iio a

{α : Type u_1}
[Preorder α]
{p : α → Prop}
(a : { x // p x })


theorem HasFDerivWithinAt.finset_prod [DecidableEq ι] {x : E}
    (hg : ∀ i ∈ u, HasFDerivWithinAt (g i) (g' i) s x) :
    HasFDerivWithinAt (∏ i ∈ u, g i ·) (∑ i ∈ u, (∏ j ∈ u.erase i, g j x) • g' i) s x

HasFDerivWithinAt (fun x => ∏ i ∈ u, g i x) (∑ i ∈ u, (∏ j ∈ u.erase i, g j x) • g' i) s x


@[simp]
theorem finSuccEquivLast_last : finSuccEquivLast (Fin.last n) = none


theorem toPartENat_congr {β : Type v} (e : α ≃ β) : toPartENat #α = toPartENat #β

Cardinal.toPartENat (Cardinal.mk α) = Cardinal.toPartENat (Cardinal.mk β)


theorem length_mul_mod_two (w₁ w₂ : W) : ℓ (w₁ * w₂) % 2 = (ℓ w₁ + ℓ w₂) % 2

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

cs.length (w₁ * w₂) % 2 = (cs.length w₁ + cs.length w₂) % 2


theorem blockDiag_apply (M : Matrix (m × o) (n × o) α) (k : o) (i j) :
    blockDiag M k i j = M (i, k) (j, k)

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type u_12}
(M : Matrix (m × o) (n × o) α)
(k : o)
(i : m)
(j : n)


theorem NeBot.of_vsub_left : (f -ᵥ g : Filter α).NeBot → f.NeBot

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{f g : Filter β}


theorem cg_iff_empty_or_exists_nat_generating_family {N : L.Substructure M} :
    N.CG ↔ N = (∅ : Set M) ∨ ∃ s : ℕ → M, closure L (range s) = N

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]
{N : L.Substructure M}

N.CG ↔ ↑N = ∅ ∨ ∃ s, (FirstOrder.Language.Substructure.closure L).toFun (Set.range s) = N


theorem etrans {a b c : α} : a ≈ b → b ≈ c → a ≈ c

{α : Sort u}
{r : α → α → Prop}
[IsStrictWeakOrder α r]
{a b c : α}

StrictWeakOrder.Equiv a b → StrictWeakOrder.Equiv b c → StrictWeakOrder.Equiv a c