(CategoryTheory.CategoryStruct.id X).f = CategoryTheory.CategoryStruct.id X.src


theorem nhds_of_ne_top (xt : x ≠ ∞) : 𝓝 x = ⨅ ε > 0, 𝓟 (Icc (x - ε) (x + ε))


@[to_additive]
theorem nhds_mul (x y : G) : 𝓝 (x * y) = 𝓝 x * 𝓝 y

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(x y : G)


@[reassoc]
theorem colimit.ι_map (j : J) : colimit.ι F j ≫ colim.map α = α.app j ≫ colimit.ι G j

CategoryTheory.Limits.colimit.ι F j ≫ CategoryTheory.Limits.colim.map α = α.app j ≫ CategoryTheory.Limits.colimit.ι G j


theorem zero_of_map_zero (F : C ⥤ D) [PreservesZeroMorphisms F] [Faithful F] {X Y : C} (f : X ⟶ Y)
    (h : F.map f = 0) : f = 0


{L : Type u}
[CommRing L]
[IsDomain L]
(n : ℕ+)

ModularCyclotomicCharacter.toFun n (RingEquiv.refl L) = 1


@[simp]
theorem localInverse_apply_image (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) a) :
    hf.localInverse f f' a (f a) = a

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace E]
{f : E → F}
{f' : E ≃L[𝕜] F}
{a : E}
(hf : HasStrictFDerivAt f (↑f') a)

HasStrictFDerivAt.localInverse f f' a hf (f a) = a


lemma dirSupInacc_of_isOpen (h : IsOpen s) : DirSupInacc s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsScottHausdorff α]
{s : Set α}
(h : IsOpen s)


/-- The *Euler Product* for completely multiplicative functions.

If `f : ℕ →*₀ F`, where `F` is a complete normed field and `‖f ·‖` is summable, then
`∏' p : Nat.Primes, (1 - f p)⁻¹ = ∑' n, f n`. -/
theorem eulerProduct_completely_multiplicative_tprod {f : ℕ →*₀ F} (hsum : Summable (‖f ·‖)) :
    ∏' p : Primes, (1 - f p)⁻¹ = ∑' n, f n

{F : Type u_1}
[NormedField F]
[CompleteSpace F]
{f : ℕ →*₀ F}
(hsum : Summable fun x => ‖f x‖)

∏' (p : Nat.Primes), (1 - f ↑p)⁻¹ = ∑' (n : ℕ), f n


theorem coe_injective : @Injective (L₁ ≃ₗ⁅R⁆ L₂) (L₁ → L₂) (↑)

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
[CommRing R]
[LieRing L₁]
[LieRing L₂]
[LieAlgebra R L₁]
[LieAlgebra R L₂]


@[simp]
theorem mem_mk' {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) {x : R} : x ∈ NonUnitalSubsemiring.mk' s sg hg sa ha ↔ x ∈ s

{R : Type u}
[NonUnitalNonAssocSemiring R]
{s : Set R}
{sg : Subsemigroup R}
(hg : ↑sg = s)
{sa : AddSubmonoid R}
(ha : ↑sa = s)
{x : R}


/-- **The Three Subgroups Lemma** (via the Hall-Witt identity) -/
theorem commutator_commutator_eq_bot_of_rotate (h1 : ⁅⁅H₂, H₃⁆, H₁⁆ = ⊥) (h2 : ⁅⁅H₃, H₁⁆, H₂⁆ = ⊥) :
    ⁅⁅H₁, H₂⁆, H₃⁆ = ⊥

{G : Type u_1}
[Group G]
{H₁ H₂ H₃ : Subgroup G}
(h1 : ⁅⁅H₂, H₃⁆, H₁⁆ = ⊥)
(h2 : ⁅⁅H₃, H₁⁆, H₂⁆ = ⊥)

⁅⁅H₁, H₂⁆, H₃⁆ = ⊥


@[mono]
protected theorem rightLim : Monotone (rightLim f)

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Monotone f)


@[to_additive (attr := simp, norm_cast)]
theorem coe_sInf (S : Set (Submonoid M)) : ((sInf S : Submonoid M) : Set M) = ⋂ s ∈ S, ↑s

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


@[simp]
theorem coe_setBasisOfLinearIndependentOfCardEqFinrank {s : Set V} [Nonempty s] [Fintype s]
    (lin_ind : LinearIndependent K ((↑) : s → V)) (card_eq : s.toFinset.card = finrank K V) :
    ⇑(setBasisOfLinearIndependentOfCardEqFinrank lin_ind card_eq) = ((↑) : s → V)

(lin_ind : LinearIndependent (ι := { x // x ∈ s }) K Subtype.val)

(card_eq : s.toFinset.card = FiniteDimensional.finrank K V)

⇑(setBasisOfLinearIndependentOfCardEqFinrank lin_ind card_eq) = Subtype.val


theorem Fuzzy.not_equiv' {x y : PGame} (h : x ‖ y) : ¬(y ≈ x)


theorem nat_strong_rec (f : α → ℕ → σ) {g : α → List σ → Option σ} (hg : Primrec₂ g)
    (H : ∀ a n, g a ((List.range n).map (f a)) = some (f a n)) : Primrec₂ f

(f : α → ℕ → σ)

(H : ∀ (a : α) (n : ℕ), g a (List.map (f a) (List.range n)) = some (f a n))


theorem toSpanSingleton_surjective {m : M} (hm : m ≠ 0) :
    Function.Surjective (toSpanSingleton R M m)

(R : Type u_2)
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
[IsSimpleModule R M]
{m : M}
(hm : m ≠ 0)

Function.Surjective ⇑(LinearMap.toSpanSingleton R M m)


@[simp]
theorem length_sum (f : ι → NonemptyInterval α) (s : Finset ι) :
    (∑ i ∈ s, f i).length = ∑ i ∈ s, (f i).length

{ι : Type u_1}
{α : Type u_2}
[OrderedAddCommGroup α]
(f : ι → NonemptyInterval α)
(s : Finset ι)


theorem IsPrefix.get_eq {x y : List α} (h : x <+: y) {n} (hn : n < x.length) :
    x.get ⟨n, hn⟩ = y.get ⟨n, hn.trans_le h.length_le⟩

{α : Type u_1}
{x y : List α}
(h : x <+: y)
{n : ℕ}
(hn : n < x.length)


@[simp]
theorem mk_hom_eq_self (f : S.obj Y ⟶ T) : (mk f).hom = f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{T : D}
{Y : C}
{S : CategoryTheory.Functor C D}
(f : S.obj Y ⟶ T)

(CategoryTheory.CostructuredArrow.mk f).hom = f


theorem lowerSemicontinuous_iff_isOpen_preimage :
    LowerSemicontinuous f ↔ ∀ y, IsOpen (f ⁻¹' Ioi y)

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

LowerSemicontinuous f ↔ ∀ (y : β), IsOpen (f ⁻¹' Set.Ioi y)


theorem hasMellin_sub {f g : ℝ → E} {s : ℂ} (hf : MellinConvergent f s)
    (hg : MellinConvergent g s) : HasMellin (fun t => f t - g t) s (mellin f s - mellin g s)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f g : ℝ → E}
{s : ℂ}
(hf : MellinConvergent f s)
(hg : MellinConvergent g s)


@[simp] theorem zero_imI : (0 : ℍ[R]).imI = 0


/-- **Cantor's diagonal argument** implies that there are no surjective functions from `α`
to `Set α`. -/
theorem cantor_surjective {α} (f : α → Set α) : ¬Surjective f


/-- If `f : G → H` is a homomorphism between two magmas, then
`Finsupp.mapDomain f` is a non-unital algebra homomorphism between their magma algebras. -/
@[simps apply]
def mapDomainNonUnitalAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A]
    {G H F : Type*} [Mul G] [Mul H] [FunLike F G H] [MulHomClass F G H] (f : F) :
    MonoidAlgebra A G →ₙₐ[k] MonoidAlgebra A H

(k : Type u_4)
(A : Type u_5)
[CommSemiring k]
[Semiring A]
[Algebra k A]
{G : Type u_6}
{H : Type u_7}
{F : Type u_8}
[Mul G]
[Mul H]
[FunLike F G H]
[MulHomClass F G H]
(f : F)

∀ (a : G →₀ A), (MonoidAlgebra.mapDomainNonUnitalAlgHom k A f) a = (↑(Finsupp.mapDomain.addMonoidHom ⇑f)).toFun a


@[to_additive]
theorem Pi.update_eq_div_mul_mulSingle [∀ i, Group <| f i] (g : ∀ i : I, f i) (x : f i) :
    Function.update g i x = g / mulSingle i (g i) * mulSingle i x

{I : Type u}
{f : I → Type v}
(i : I)
[DecidableEq I]
[(i : I) → Group (f i)]
(g : (i : I) → f i)
(x : f i)

Function.update g i x = g / Pi.mulSingle i (g i) * Pi.mulSingle i x


theorem mul_lt_right₀ (c : α) (h : a < b) (hc : c ≠ 0) : a * c < b * c

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a b : α}
(c : α)
(h : a < b)
(hc : c ≠ 0)


theorem average_eq_integral [IsProbabilityMeasure μ] (f : α → E) : ⨍ x, f x ∂μ = ∫ x, f x ∂μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsProbabilityMeasure μ]
(f : α → E)


theorem eq_of_eqv_lt {α : Sort u} {lt : α → α → Prop} [IsTrichotomous α lt] {a b} :
    a ≈[lt]b → a = b

{α : Sort u}
{lt : α → α → Prop}
[IsTrichotomous α lt]
{a b : α}


/-- If a random variable `f` in `ℝ≥0∞` is independent of an event `T`, then if you restrict the
  random variable to `T`, then `E[f * indicator T c 0]=E[f] * E[indicator T c 0]`. It is useful for
  `lintegral_mul_eq_lintegral_mul_lintegral_of_independent_measurableSpace`. -/
theorem lintegral_mul_indicator_eq_lintegral_mul_lintegral_indicator {Mf mΩ : MeasurableSpace Ω}
    {μ : Measure Ω} (hMf : Mf ≤ mΩ) (c : ℝ≥0∞) {T : Set Ω} (h_meas_T : MeasurableSet T)
    (h_ind : IndepSets {s | MeasurableSet[Mf] s} {T} μ) (h_meas_f : Measurable[Mf] f) :
    (∫⁻ ω, f ω * T.indicator (fun _ => c) ω ∂μ) =
      (∫⁻ ω, f ω ∂μ) * ∫⁻ ω, T.indicator (fun _ => c) ω ∂μ

{f : Ω → ℝ≥0∞}

(h_ind : ProbabilityTheory.IndepSets {s | MeasurableSet s} {T} μ)

∫⁻ (ω : Ω), f ω * T.indicator (fun x => c) ω ∂μ = (∫⁻ (ω : Ω), f ω ∂μ) * ∫⁻ (ω : Ω), T.indicator (fun x => c) ω ∂μ


theorem coe_ennreal_injective : Injective ((↑) : ℝ≥0∞ → EReal)


theorem torusMap_sub_center (c : ℂⁿ) (R : ℝⁿ) (θ : ℝⁿ) : torusMap c R θ - c = torusMap 0 R θ

{n : ℕ}
(c : Fin n → ℂ)
(R θ : Fin n → ℝ)


theorem derivWithin_congr_set (h : s =ᶠ[𝓝 x] t) : derivWithin f s x = derivWithin f t x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s t : Set 𝕜}
(h : s =ᶠ[𝓝 x] t)


theorem isPredLimit_of_pred_ne (h : ∀ b, pred b ≠ a) : IsPredLimit a

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a : α}
(h : ∀ (b : α), Order.pred b ≠ a)


theorem HasFDerivAtFilter.comp {g : F → G} {g' : F →L[𝕜] G} {L' : Filter F}
    (hg : HasFDerivAtFilter g g' (f x) L') (hf : HasFDerivAtFilter f f' x L) (hL : Tendsto f L L') :
    HasFDerivAtFilter (g ∘ f) (g'.comp f') x L

{𝕜 : 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]
{f : E → F}
{f' : E →L[𝕜] F}
(x : E)
{L : Filter E}
{g : F → G}
{g' : F →L[𝕜] G}
{L' : Filter F}
(hg : HasFDerivAtFilter g g' (f x) L')
(hf : HasFDerivAtFilter f f' x L)
(hL : Filter.Tendsto f L L')


/-- Any linear form on a topological vector space over a nontrivially normed field is continuous if
    its kernel is closed. -/
theorem LinearMap.continuous_of_isClosed_ker (l : E →ₗ[𝕜] 𝕜)
    (hl : IsClosed (LinearMap.ker l : Set E)) :
    Continuous l

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
(l : E →ₗ[𝕜] 𝕜)
(hl : IsClosed ↑(LinearMap.ker l))


@[simp]
theorem coe_mkFinConsOfLE {n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O) (b : Basis (Fin n) R N)
    (hNO : N ≤ O) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0)
    (hsp : ∀ z ∈ O, ∃ c : R, z + c • y ∈ N) :
    (mkFinConsOfLE y yO b hNO hli hsp : Fin (n + 1) → O) =
      Fin.cons ⟨y, yO⟩ (Submodule.inclusion hNO ∘ b)

⇑(Basis.mkFinConsOfLE y yO b hNO hli hsp) = Fin.cons ⟨y, yO⟩ (⇑(Submodule.inclusion hNO) ∘ ⇑b)


theorem wbtw_iff_sameRay_vsub {x y z : P} : Wbtw R x y z ↔ SameRay R (y -ᵥ x) (z -ᵥ y)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x y z : P}


/-- `a : α` is a Stieltjes point for `f : α → ℚ → ℝ` if `f a` is monotone with limit 0 at -∞
and 1 at +∞ and satisfies a continuity property. -/
structure IsRatStieltjesPoint (f : α → ℚ → ℝ) (a : α) : Prop where
  mono : Monotone (f a)
  tendsto_atTop_one : Tendsto (f a) atTop (𝓝 1)
  tendsto_atBot_zero : Tendsto (f a) atBot (𝓝 0)
  iInf_rat_gt_eq : ∀ t : ℚ, ⨅ r : Ioi t, f a r = f a t

{f : α → ℚ → ℝ}

(self : ProbabilityTheory.IsRatStieltjesPoint f a)


@[to_additive (attr := simp)]
lemma nndist_unop (x y : αᵐᵒᵖ) : nndist (unop x) (unop y) = nndist x y

{α : Type u_1}
[PseudoMetricSpace α]
(x y : αᵐᵒᵖ)

nndist (MulOpposite.unop x) (MulOpposite.unop y) = nndist x y


theorem foldr_succ_last (f : Fin (n+1) → α → α) (x) :
    foldr (n+1) f x = foldr n (f ·.castSucc) (f (last n) x)

{n : Nat}
{α : Sort u_1}
(f : Fin (n + 1) → α → α)
(x : α)

Fin.foldr (n + 1) f x = Fin.foldr n (fun x => f x.castSucc) (f (Fin.last n) x)


@[to_additive (attr := simp)]
theorem lift_apply_mk (f : M →* P) (g : N →* P) (x : FreeMonoid (M ⊕ N)) :
    lift f g (mk x) = FreeMonoid.lift (Sum.elim f g) x

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass N]
[AddMonoid P]
(f : M →+ P)
(g : N →+ P)
(x : FreeAddMonoid (M ⊕ N))

(AddMonoid.Coprod.lift f g) (AddMonoid.Coprod.mk x) = (FreeAddMonoid.lift (Sum.elim ⇑f ⇑g)) x


/-- A version of `ODE_solution_unique_of_mem_Icc_right` for uniqueness in a closed interval whose
interior contains the initial time. -/
theorem ODE_solution_unique_of_mem_Icc
    (ht : t₀ ∈ Ioo a b)
    (hf : ContinuousOn f (Icc a b))
    (hf' : ∀ t ∈ Ioo a b, HasDerivAt f (v t (f t)) t)
    (hfs : ∀ t ∈ Ioo a b, f t ∈ s t)
    (hg : ContinuousOn g (Icc a b))
    (hg' : ∀ t ∈ Ioo a b, HasDerivAt g (v t (g t)) t)
    (hgs : ∀ t ∈ Ioo a b, g t ∈ s t)
    (heq : f t₀ = g t₀) :
    EqOn f g (Icc a b)

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

(hf' : ∀ t ∈ Set.Ioo a b, HasDerivAt f (v t (f t)) t)

(hg' : ∀ t ∈ Set.Ioo a b, HasDerivAt g (v t (g t)) t)


@[simp]
lemma zero_v {n : ℤ} (p q : ℤ) (hpq : p + n = q) :
    (0 : Cochain F G n).v p q hpq = 0

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

CochainComplex.HomComplex.Cochain.v 0 p q hpq = 0


@[rclike_simps, norm_cast]
theorem ofReal_mul (r s : ℝ) : ((r * s : ℝ) : K) = r * s


theorem Prime.even_iff {p : ℕ} (hp : Prime p) : Even p ↔ p = 2


@[simp]
theorem edist_eq_zero_iff :
    G.edist u v = 0 ↔ u = v

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}


theorem basicOpen_le {U : Opens X} (f : X.presheaf.obj (op U)) : X.basicOpen f ≤ U

{U : TopologicalSpace.Opens ↑↑X.toPresheafedSpace}


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

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


@[simp] theorem mkCoinductiveAux₂_add_one (n) :
    mkCoinductiveAux₂ e zero comm_zero one comm_one succ (n + 1) =
      let I := mkCoinductiveAux₁ e zero one comm_one succ n
      ⟨I.1 ≫ (Q.xPrevIso rfl).inv, (P.xNextIso rfl).hom ≫ I.2.1,
        mkCoinductiveAux₂.proof_5 e zero one comm_one succ n⟩

(comm_one : e.f 1 = zero ≫ Q.d 0 1 + P.d 1 2 ≫ one)

Homotopy.mkCoinductiveAux₂ e zero comm_zero one comm_one succ (n + 1) =
  let I := Homotopy.mkCoinductiveAux₁ e zero one comm_one succ n;
  ⟨I.fst ≫ (HomologicalComplex.xPrevIso Q ⋯).inv, ⟨(HomologicalComplex.xNextIso P ⋯).hom ≫ I.snd.fst, ⋯⟩⟩


theorem linearIndependent_smul {ι : Type v₁} {b : ι → S} {ι' : Type w₁} {c : ι' → A}
    (hb : LinearIndependent R b) (hc : LinearIndependent S c) :
    LinearIndependent R fun p : ι × ι' => b p.1 • c p.2

{R : Type u}
{S : Type v}
{A : Type w}
[Semiring R]
[Semiring S]
[AddCommMonoid A]
[Module R S]
[Module S A]
[Module R A]
[IsScalarTower R S A]
{ι : Type v₁}
{b : ι → S}
{ι' : Type w₁}
{c : ι' → A}
(hb : LinearIndependent R b)
(hc : LinearIndependent S c)

LinearIndependent R fun p => b p.1 • c p.2


theorem range'_append : ∀ s m n step : Nat,
    range' s m step ++ range' (s + step * m) n step = range' s (n + m) step

List.range' s m step ++ List.range' (s + step * m) n step = List.range' s (n + m) step


/-- The equivalence `Nat.equivBitIndices` enumerates `Finset ℕ` in colexicographic order. -/
@[simps] def orderIsoColex : ℕ ≃o Colex ℕ

(Finset.orderIsoColex n).ofColex = Finset.equivBitIndices n


theorem fderivWithin_sqrt (hf : DifferentiableWithinAt ℝ f s x) (hx : f x ≠ 0)
    (hxs : UniqueDiffWithinAt ℝ s x) :
    fderivWithin ℝ (fun x => √(f x)) s x = (1 / (2 * √(f x))) • fderivWithin ℝ f s x

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


@[norm_cast]
theorem normSq_natCast (n : ℕ) : normSq (n : ℍ[R]) = (n : R) ^ 2


theorem leftCosetEquivalence_equiv_fst (g : G) :
    LeftCosetEquivalence K g ((hSK.equiv g).fst : G)

{G : Type u_1}
[Group G]
{K : Subgroup G}
{S : Set G}
(hSK : Subgroup.IsComplement S ↑K)
(g : G)

LeftCosetEquivalence (↑K) g ↑(hSK.equiv g).1


/-- The composite of two `LocalRing.ResidueField.map`s is the `LocalRing.ResidueField.map` of the
composite. -/
theorem map_comp (f : T →+* R) (g : R →+* S) [IsLocalRingHom f] [IsLocalRingHom g] :
    LocalRing.ResidueField.map (g.comp f) =
      (LocalRing.ResidueField.map g).comp (LocalRing.ResidueField.map f)

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
[CommRing R]
[LocalRing R]
[CommRing S]
[LocalRing S]
[CommRing T]
[LocalRing T]
(f : T →+* R)
(g : R →+* S)
[IsLocalRingHom f]
[IsLocalRingHom g]


theorem t'_inv (i j k : D.J) :
    D.t' i j k ≫ (pullbackSymmetry _ _).hom ≫ D.t' j i k ≫ (pullbackSymmetry _ _).hom = 𝟙 _

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

CategoryTheory.CategoryStruct.comp (D.t' i j k)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.pullbackSymmetry (D.f j k) (D.f j i)).hom
      (CategoryTheory.CategoryStruct.comp (D.t' j i k)
        (CategoryTheory.Limits.pullbackSymmetry (D.f i k) (D.f i j)).hom)) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.Limits.pullback (D.f i j) (D.f i k))


theorem reverseAux_reverseAux_nil (as bs : List α) : reverseAux (reverseAux as bs) [] = reverseAux bs as

(as.reverseAux bs).reverseAux [] = bs.reverseAux as


@[simp]
theorem coeff_modMonomial_of_le {s' s : σ →₀ ℕ} (x : MvPolynomial σ R) (h : s ≤ s') :
    coeff s' (x %ᵐᵒⁿᵒᵐⁱᵃˡ s) = 0

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
{s' s : σ →₀ ℕ}
(x : MvPolynomial σ R)
(h : s ≤ s')

MvPolynomial.coeff s' (x.modMonomial s) = 0


@[simp]
theorem mem_toFinset {s : Set α} [Fintype s] {a : α} : a ∈ s.toFinset ↔ a ∈ s

{α : Type u_1}
{s : Set α}
[Fintype ↑s]
{a : α}


@[to_additive (attr := simp)]
theorem preimage_mul_left_ball [IsometricSMul G G] (a b : G) (r : ℝ≥0∞) :
    (a * ·) ⁻¹' ball b r = ball (a⁻¹ * b) r

{G : Type v}
[AddGroup G]
[PseudoEMetricSpace G]
[IsometricVAdd G G]
(a b : G)
(r : ℝ≥0∞)

(fun x => a + x) ⁻¹' EMetric.ball b r = EMetric.ball (-a + b) r


@[to_additive (attr := simp)]
theorem clift_mk :
    clift (mk : FreeMonoid (M ⊕ N) →* M ∗ N) (map_one inl) (map_one inr) (map_mul inl)
      (map_mul inr) = .id _

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

AddMonoid.Coprod.clift AddMonoid.Coprod.mk ⋯ ⋯ ⋯ ⋯ = AddMonoidHom.id (AddMonoid.Coprod M N)


@[ext]
lemma DoubleCentralizer.ext (𝕜 : Type u) (A : Type v) [NontriviallyNormedField 𝕜]
    [NonUnitalNormedRing A] [NormedSpace 𝕜 A] [SMulCommClass 𝕜 A A] [IsScalarTower 𝕜 A A]
    (a b : 𝓜(𝕜, A)) (h : a.toProd = b.toProd) : a = b


@[to_additive]
lemma UniformInducing.uniformContinuousConstSMul [SMul M Y] [UniformContinuousConstSMul M Y]
    {f : X → Y} (hf : UniformInducing f) (hsmul : ∀ (c : M) x, f (c • x) = c • f x) :
    UniformContinuousConstSMul M X

(hsmul : ∀ (c : M) (x : X), f (c +ᵥ x) = c +ᵥ f x)


theorem cos_sub_nat_mul_two_pi (x : ℂ) (n : ℕ) : cos (x - n * (2 * π)) = cos x

Complex.cos (x - ↑n * (2 * ↑Real.pi)) = Complex.cos x


theorem coprime_iff_nat_coprime {a b : ℤ} : IsCoprime a b ↔ Nat.Coprime a.natAbs b.natAbs

IsCoprime a b ↔ a.natAbs.Coprime b.natAbs


theorem integral_smul (c : 𝕜) (f : α →₁ₛ[μ] E) : integral (c • f) = c • integral f

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

MeasureTheory.L1.SimpleFunc.integral (c • f) = c • MeasureTheory.L1.SimpleFunc.integral f


theorem absNorm_ne_zero_iff (I : Ideal S) : Ideal.absNorm I ≠ 0 ↔ Finite (S ⧸ I)

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


lemma Antitone.frequently_ge_map_of_frequently_le {f : R → S} (f_decr : Antitone f)
    {u : R} (frbdd : ∃ᶠ x in F, x ≤ u) :
    ∃ᶠ y in F.map f, f u ≤ y

{R : Type u_6}
{S : Type u_7}
{F : Filter R}
[LinearOrder R]
[LinearOrder S]
{f : R → S}
(f_decr : Antitone f)
{u : R}
(frbdd : ∃ᶠ (x : R) in F, x ≤ u)


/-- The Euler product for Dirichlet L-series, valid for `s.re > 1`.
This version is stated in terms of `HasProd`. -/
theorem dirichletLSeries_eulerProduct_hasProd {N : ℕ} (χ : DirichletCharacter ℂ N)
    (hs : 1 < s.re) :
    HasProd (fun p : Primes ↦ (1 - χ p * (p : ℂ) ^ (-s))⁻¹) (L ↗χ s)

{s : ℂ}
{N : ℕ}
(χ : DirichletCharacter ℂ N)
(hs : 1 < s.re)

HasProd (fun p => (1 - χ ↑↑p * ↑↑p ^ (-s))⁻¹) (L (fun n => χ ↑n) s)


@[simp]
theorem add_re (z w : ℤ√d) : (z + w).re = z.re + w.re


protected theorem injective {f : M' →L[R] N} (h : IsConformalMap f) : Function.Injective f

{R : Type u_1}
{N : Type u_3}
{M' : Type u_5}
[NormedField R]
[SeminormedAddCommGroup N]
[NormedSpace R N]
[NormedAddCommGroup M']
[NormedSpace R M']
{f : M' →L[R] N}
(h : IsConformalMap f)


theorem Prime.left_dvd_or_dvd_right_of_dvd_mul [CancelCommMonoidWithZero α] {p : α} (hp : Prime p)
    {a b : α} : a ∣ p * b → p ∣ a ∨ a ∣ b

{α : Type u_1}
[CancelCommMonoidWithZero α]
{p : α}
(hp : Prime p)
{a b : α}


lemma directedOn_ge_Ici (a : α) : DirectedOn (· ≥ ·) (Ici a)

DirectedOn (fun x x_1 => x ≥ x_1) (Set.Ici a)


@[simp]
theorem nhdsWithin_singleton (a : α) : 𝓝[{a}] a = pure a

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


theorem connectedComponents_lift_unique' {β : Sort*} {g₁ g₂ : ConnectedComponents α → β}
    (hg : g₁ ∘ ((↑) : α → ConnectedComponents α) = g₂ ∘ (↑)) : g₁ = g₂

(hg : g₁ ∘ ConnectedComponents.mk = g₂ ∘ ConnectedComponents.mk)


@[simp]
theorem limitCurrySwapCompLimIsoLimitCurryCompLim_inv_π_π {j} {k} :
    (limitCurrySwapCompLimIsoLimitCurryCompLim G).inv ≫ limit.π _ k ≫ limit.π _ j =
      (limit.π _ j ≫ limit.π _ k : limit (_ ⋙ lim) ⟶ _)

{J K : Type v}
[CategoryTheory.SmallCategory J]
[CategoryTheory.SmallCategory K]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
(G : J × K ⥤ C)
[CategoryTheory.Limits.HasLimits C]
{j : J}
{k : K}

(CategoryTheory.Limits.limitCurrySwapCompLimIsoLimitCurryCompLim G).inv ≫
    CategoryTheory.Limits.limit.π
        (CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ G) ⋙ CategoryTheory.Limits.lim) k ≫
      CategoryTheory.Limits.limit.π ((CategoryTheory.curry.obj (CategoryTheory.Prod.swap K J ⋙ G)).obj k) j =
  CategoryTheory.Limits.limit.π (CategoryTheory.curry.obj G ⋙ CategoryTheory.Limits.lim) j ≫
    CategoryTheory.Limits.limit.π ((CategoryTheory.curry.obj G).obj j) k


/-- If `M` is flat, `N` is contained in `i(R)`, where `i : R → S` is the structure map,
then `M` and `N` are linearly disjoint. -/
theorem of_right_le_one_of_flat (h : N ≤ 1) [Module.Flat R M] :
    M.LinearDisjoint N

{R : Type u}
{S : Type v}
[CommRing R]
[Ring S]
[Algebra R S]
(M N : Submodule R S)
(h : N ≤ 1)
[Module.Flat R ↥M]


theorem le_sSup_image_Icc (h : ContinuousOn f <| Icc a b) (hc : c ∈ Icc a b) :
    f c ≤ sSup (f '' Icc a b)

{α : Type u_2}
{β : Type u_3}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[TopologicalSpace β]
[DenselyOrdered α]
[ConditionallyCompleteLinearOrder β]
[OrderTopology β]
{f : α → β}
{a b c : α}
(h : ContinuousOn f (Set.Icc a b))
(hc : c ∈ Set.Icc a b)


theorem mul_subset_mul {M N : AddSubmonoid R} :
    (↑M : Set R) * (↑N : Set R) ⊆ (↑(M * N) : Set R)

{R : Type u_4}
[NonUnitalNonAssocSemiring R]
{M N : AddSubmonoid R}


/-- Note that the presence of this lemma makes `simp [omega]` form a loop. -/
@[simp]
theorem type_nat_lt : @type ℕ (· < ·) _ = ω

(Ordinal.type fun x x_1 => x < x_1) = Ordinal.omega


@[simp]
theorem nhds_inf (l₁ l₂ : Filter α) : 𝓝 (l₁ ⊓ l₂) = 𝓝 l₁ ⊓ 𝓝 l₂

𝓝 (l₁ ⊓ l₂) = 𝓝 l₁ ⊓ 𝓝 l₂


@[simp]
theorem pairwise_empty (r : α → α → Prop) : (∅ : Set α).Pairwise r


theorem op_inj_iff (x y : α) : op x = op y ↔ x = y


@[simp]
theorem lift_comp_inlHom (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r) :
    (lift f g hg hfg hgf).comp (inlAlgHom S R M) = f

(hfg : ∀ (r : R) (x : M), g (r •> x) = f r * g x)

(hgf : ∀ (r : R) (x : M), g (x <• r) = g x * f r)

(TrivSqZeroExt.lift f g hg hfg hgf).comp (TrivSqZeroExt.inlAlgHom S R M) = f


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

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

(CategoryTheory.Monoidal.comonFunctorCategoryEquivalence C D).functor =
  CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.functor


/-- If `f' : ℂ → E` is a derivative of a complex differentiable function on the circle
`Metric.sphere c |R|`, then `∮ z in C(c, R), f' z = 0`. -/
theorem integral_eq_zero_of_hasDerivWithinAt' {f f' : ℂ → E} {c : ℂ} {R : ℝ}
    (h : ∀ z ∈ sphere c |R|, HasDerivWithinAt f (f' z) (sphere c |R|) z) :
    (∮ z in C(c, R), f' z) = 0

(h : ∀ z ∈ Metric.sphere c |R|, HasDerivWithinAt f (f' z) (Metric.sphere c |R|) z)


@[simp]
theorem add_self_eq_zero_iff_eq_zero {n : ℕ} (hn : Odd n) {a : ZMod n} :
    a + a = 0 ↔ a = 0


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

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


theorem setToSimpleFunc_add_left {m : MeasurableSpace α} (T T' : Set α → F →L[ℝ] F') {f : α →ₛ F} :
    setToSimpleFunc (T + T') f = setToSimpleFunc T f + setToSimpleFunc T' f

{α : Type u_1}
{F : Type u_3}
{F' : Type u_4}
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedAddCommGroup F']
[NormedSpace ℝ F']
{m : MeasurableSpace α}
(T T' : Set α → F →L[ℝ] F')
{f : MeasureTheory.SimpleFunc α F}

MeasureTheory.SimpleFunc.setToSimpleFunc (T + T') f =
  MeasureTheory.SimpleFunc.setToSimpleFunc T f + MeasureTheory.SimpleFunc.setToSimpleFunc T' f


@[simp]
theorem conjugateEquiv_id : conjugateEquiv adj₁ adj₁ (𝟙 _) = 𝟙 _

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

(CategoryTheory.conjugateEquiv adj₁ adj₁) (CategoryTheory.CategoryStruct.id L₁) = CategoryTheory.CategoryStruct.id R₁


theorem extract_gcd {α : Type*} [CancelCommMonoidWithZero α] [GCDMonoid α] (x y : α) :
    ∃ x' y', x = gcd x y * x' ∧ y = gcd x y * y' ∧ IsUnit (gcd x' y')

{α : Type u_2}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(x y : α)


lemma IsOpen.isLocallyClosed (hs : IsOpen s) : IsLocallyClosed s

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
(hs : IsOpen s)


@[simp]
theorem diagram_snd (i j : D.J) : D.diagram.snd ⟨i, j⟩ = D.t i j ≫ D.f j i

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

D.diagram.snd (i, j) = CategoryTheory.CategoryStruct.comp (D.t i j) (D.f j i)


lemma add'_comm (f₁ f₂ : L.obj X ⟶ L.obj Y) :
    add' W f₁ f₂ = add' W f₂ f₁

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_3, u_2} D]
[CategoryTheory.Preadditive C]
{L : CategoryTheory.Functor C D}
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[W.HasLeftCalculusOfFractions]
{X Y : C}
(f₁ f₂ : L.obj X ⟶ L.obj Y)

CategoryTheory.Localization.Preadditive.add' W f₁ f₂ = CategoryTheory.Localization.Preadditive.add' W f₂ f₁


@[simp]
lemma map_b₈ : (W.map φ).b₈ = φ W.b₈

{R : Type u}
[CommRing R]
(W : WeierstrassCurve R)
{A : Type v}
[CommRing A]
(φ : R →+* A)


lemma cons_support : (s.cons y).support ⊆ insert 0 (s.support.map (Fin.succEmb n))

{n : ℕ}
{M : Type u_1}
[Zero M]
{y : M}
{s : Fin n →₀ M}

(Finsupp.cons y s).support ⊆ insert 0 (Finset.map (Fin.succEmb n) s.support)


@[simp]
theorem sInf_toSubmodule (S : Set (Subalgebra R A)) :
    Subalgebra.toSubmodule (sInf S) = sInf (Subalgebra.toSubmodule '' S)

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

Subalgebra.toSubmodule (sInf S) = sInf (⇑Subalgebra.toSubmodule '' S)


lemma generateFrom_countablePartition_le_succ (α : Type*) [MeasurableSpace α] [CountablyGenerated α]
    (n : ℕ) :
    generateFrom (countablePartition α n) ≤ generateFrom (countablePartition α (n + 1))

(α : Type u_3)
[MeasurableSpace α]
[MeasurableSpace.CountablyGenerated α]
(n : ℕ)

MeasurableSpace.generateFrom (MeasurableSpace.countablePartition α n) ≤
  MeasurableSpace.generateFrom (MeasurableSpace.countablePartition α (n + 1))


{R : Type r}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type s}
[CommRing S]
[Algebra R S]
{F : Type u}
[Field F]
[Algebra R F]
[Algebra S F]
[IsScalarTower R S F]
{K : Type v}
[Field K]
[Algebra R K]
[Algebra S K]
[IsScalarTower R S K]
(f : F →ₐ[S] K)

(WeierstrassCurve.Affine.Point.map W f) 0 = 0


@[simp]
theorem AdditiveFunctor.ofLeftExact_map {F G : C ⥤ₗ D} (α : F ⟶ G) :
    (AdditiveFunctor.ofLeftExact C D).map α = α

(CategoryTheory.AdditiveFunctor.ofLeftExact C D).map α = α


lemma fourierIntegralInv_comp_linearIsometry (A : W ≃ₗᵢ[ℝ] V) (f : V → E) (w : W) :
    𝓕⁻ (f ∘ A) w = (𝓕⁻ f) (A w)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MeasurableSpace V]
[BorelSpace V]
[FiniteDimensional ℝ V]
{W : Type u_3}
[NormedAddCommGroup W]
[InnerProductSpace ℝ W]
[MeasurableSpace W]
[BorelSpace W]
[FiniteDimensional ℝ W]
(A : W ≃ₗᵢ[ℝ] V)
(f : V → E)
(w : W)

Real.fourierIntegralInv (f ∘ ⇑A) w = Real.fourierIntegralInv f (A w)


@[simp]
lemma equivFunL_symm_apply_repr (v : Basis ι 𝕜 E) (x : E) :
    v.equivFunL.symm (v.repr x) = x

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
[CompleteSpace 𝕜]
{ι : Type u_1}
[Finite ι]
[T2Space E]
(v : Basis ι 𝕜 E)
(x : E)


theorem wcovBy_congr_left (hab : AntisymmRel (· ≤ ·) a b) : a ⩿ c ↔ b ⩿ c

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


theorem isColimit_exists_rep {D : Cocone F} (hD : IsColimit D) (x : D.pt) :
    ∃ (j : J) (y : F.obj j), D.ι.app j y = x

[CategoryTheory.Limits.PreservesColimit F (CategoryTheory.forget C)]

(hD : CategoryTheory.Limits.IsColimit D)

(x : (CategoryTheory.forget C).obj D.pt)


lemma rank_le_finrank : rank R L M ≤ finrank R M

(R : Type u_1)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[Nontrivial R]
[LieRing L]
[LieAlgebra R L]
[Module.Finite R L]
[Module.Free R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[Module.Finite R M]
[Module.Free R M]

LieModule.rank R L M ≤ FiniteDimensional.finrank R M


theorem IsLindelof.elim_nhds_subcover (hs : IsLindelof s) (U : X → Set X)
    (hU : ∀ x ∈ s, U x ∈ 𝓝 x) :
    ∃ t : Set X, t.Countable ∧ (∀ x ∈ t, x ∈ s) ∧ s ⊆ ⋃ x ∈ t, U x

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : IsLindelof s)
(U : X → Set X)
(hU : ∀ x ∈ s, U x ∈ 𝓝 x)

∃ t, t.Countable ∧ (∀ x ∈ t, x ∈ s) ∧ s ⊆ ⋃ x ∈ t, U x


lemma Monotone.isCoboundedUnder_ge_of_isCobounded {f : R → S} (f_incr : Monotone f)
    [NeBot F] (cobdd : IsCobounded (· ≥ ·) F) :
    F.IsCoboundedUnder (· ≥ ·) f

(cobdd : Filter.IsCobounded (fun x x_1 => x ≥ x_1) F)

Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) F f


theorem IsMaxOn.isExtr (h : IsMaxOn f s a) : IsExtrOn f s a

{α : Type u}
{β : Type v}
[Preorder β]
{f : α → β}
{s : Set α}
{a : α}
(h : IsMaxOn f s a)


theorem lift_iInf_le {f : ι → Filter α} {g : Set α → Filter β} :
    (iInf f).lift g ≤ ⨅ i, (f i).lift g

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{f : ι → Filter α}
{g : Set α → Filter β}


lemma OrthogonalIdempotents.lift_of_isNilpotent_ker_aux
    (h : ∀ x ∈ RingHom.ker f, IsNilpotent x)
    {n} {e : Fin n → S} (he : OrthogonalIdempotents e) (he' : ∀ i, e i ∈ f.range) :
    ∃ e' : Fin n → R, OrthogonalIdempotents e' ∧ f ∘ e' = e

∃ e', OrthogonalIdempotents e' ∧ ⇑f ∘ e' = e


/-- When `g` is an isomorphism, the cokernel of `f ≫ g` is isomorphic to the cokernel of `f`.
-/
@[simps]
def cokernelCompIsIso {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [HasCokernel f] [IsIso g] :
    cokernel (f ≫ g) ≅ cokernel f

(CategoryTheory.Limits.cokernelCompIsIso f g).inv =
  CategoryTheory.Limits.cokernel.desc f (g ≫ CategoryTheory.Limits.cokernel.π (f ≫ g)) ⋯


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

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


theorem norm_eq_sum_mul (f : α →₁ₛ[μ] G) :
    ‖f‖ = ∑ x ∈ (toSimpleFunc f).range, (μ (toSimpleFunc f ⁻¹' {x})).toReal * ‖x‖

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

‖f‖ =
  ∑ x ∈ (MeasureTheory.Lp.simpleFunc.toSimpleFunc f).range,
    (μ (↑(MeasureTheory.Lp.simpleFunc.toSimpleFunc f) ⁻¹' {x})).toReal * ‖x‖


@[simp]
theorem birthday_zero : birthday 0 = 0


lemma parallelPair_initial_mk' {X Y : C} (f g : X ⟶ Y)
    (h₁ : ∀ Z, Nonempty (X ⟶ Z))
    (h₂ : ∀ ⦃Z : C⦄ (i j : X ⟶ Z),
      Zigzag (J := CostructuredArrow (parallelPair f g) Z)
        (mk (Y := zero) i) (mk (Y := zero) j)) :
    (parallelPair f g).Initial

(h₂ :
  ∀ ⦃Z : C⦄ (i j : X ⟶ Z),
    CategoryTheory.Zigzag (CategoryTheory.CostructuredArrow.mk i) (CategoryTheory.CostructuredArrow.mk j))


theorem biInter_le_succ' (u : ℕ → Set α) (n : ℕ) : ⋂ k ≤ n + 1, u k = u 0 ∩ ⋂ k ≤ n, u (k + 1)


theorem max_ack_right (m n₁ n₂ : ℕ) : ack m (max n₁ n₂) = max (ack m n₁) (ack m n₂)


theorem const_succ_apply (α : Type u) {β : Type u} (b : β) (n : ℕ) (x : α) :
    const α b n.succ x = const _ b n

Function.OfArity.const α b n.succ x = Function.OfArity.const α b n


lemma fourierIntegralInv_eq_fourierIntegral_neg (f : V → E) (w : V) :
    𝓕⁻ f w = 𝓕 f (-w)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{V : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MeasurableSpace V]
[BorelSpace V]
[FiniteDimensional ℝ V]
(f : V → E)
(w : V)

Real.fourierIntegralInv f w = Real.fourierIntegral f (-w)


theorem IsRelPrime.mul_dvd_of_left_isPrimal (H : IsRelPrime x y) (H1 : x ∣ z) (H2 : y ∣ z)
    (hx : IsPrimal x) : x * y ∣ z

{α : Type u_1}
[CommMonoid α]
{x y z : α}
(H : IsRelPrime x y)
(H1 : x ∣ z)
(H2 : y ∣ z)
(hx : IsPrimal x)


theorem StronglyMeasurable.apply_continuousLinearMap
    {_m : MeasurableSpace α} {φ : α → F →L[𝕜] E} (hφ : StronglyMeasurable φ) (v : F) :
    StronglyMeasurable fun a => φ a v

(hφ : MeasureTheory.StronglyMeasurable φ)

MeasureTheory.StronglyMeasurable fun a => (φ a) v


@[simp]
theorem generator_mem (S : Submodule R M) [S.IsPrincipal] : generator S ∈ S

{R : Type u}
{M : Type v}
[AddCommGroup M]
[Ring R]
[Module R M]
(S : Submodule R M)
[S.IsPrincipal]


theorem binaryCofan_isColimit_iff {X Y : Type u} (c : BinaryCofan X Y) :
    Nonempty (IsColimit c) ↔
      Injective c.inl ∧ Injective c.inr ∧ IsCompl (Set.range c.inl) (Set.range c.inr)

(c : CategoryTheory.Limits.BinaryCofan X Y)

Nonempty (CategoryTheory.Limits.IsColimit c) ↔
  Function.Injective c.inl ∧ Function.Injective c.inr ∧ IsCompl (Set.range c.inl) (Set.range c.inr)


/-- If `x` and `y` fit within `n` bits, then the result of any bitwise operation on `x` and `y` also
fits within `n` bits -/
theorem bitwise_lt {f x y n} (hx : x < 2 ^ n) (hy : y < 2 ^ n) :
    bitwise f x y < 2 ^ n

{f : Bool → Bool → Bool}
{x y n : ℕ}
(hx : x < 2 ^ n)
(hy : y < 2 ^ n)


theorem lift_obj_functor_obj (X : C) :
    (lift r F H).obj ((functor r).obj X) = F.obj X

(H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂)

(CategoryTheory.Quotient.lift r F H).obj ((CategoryTheory.Quotient.functor r).obj X) = F.obj X


/-- The mutual orthogonal complement of the eigenspaces of a self-adjoint operator on an inner
product space is an invariant subspace of the operator. -/
theorem orthogonalComplement_iSup_eigenspaces_invariant ⦃v : E⦄ (hv : v ∈ (⨆ μ, eigenspace T μ)ᗮ) :
    T v ∈ (⨆ μ, eigenspace T μ)ᗮ

(hv : v ∈ (⨆ μ, Module.End.eigenspace T μ)ᗮ)


@[simp]
theorem equalizer_as_kernel : equalizer.ι f 0 = kernel.ι f

CategoryTheory.Limits.equalizer.ι f 0 = CategoryTheory.Limits.kernel.ι f


@[simp, nolint simpNF]
protected lemma neg_pos : 0 < -a ↔ a < 0


/-- The norm of the components as a euclidean vector equals the norm of the quaternion. -/
theorem norm_piLp_equiv_symm_equivTuple (x : ℍ) :
    ‖(WithLp.equiv 2 (Fin 4 → _)).symm (equivTuple ℝ x)‖ = ‖x‖

‖(WithLp.equiv 2 (Fin 4 → ℝ)).symm ((Quaternion.equivTuple ℝ) x)‖ = ‖x‖


@[to_additive]
theorem smul_set_iInter {ι : Type*}
    (a : α) (t : ι → Set β) : (a • ⋂ i, t i) = ⋂ i, a • t i

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[AddAction α β]
{ι : Type u_5}
(a : α)
(t : ι → Set β)


lemma cfc_comp_polynomial (q : R[X]) (f : R → R) (a : A)
    (hf : ContinuousOn f (q.eval '' (spectrum R a)) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    cfc (f <| q.eval ·) a = cfc f (aeval a q)

(hf : ContinuousOn f ((fun a => Polynomial.eval a q) '' spectrum R a) := by cfc_cont_tac)

cfc (fun x => f (Polynomial.eval x q)) a = cfc f ((Polynomial.aeval a) q)


@[simp, norm_cast]
lemma cast_list_prod [Semiring β] (s : List ℕ) : (↑s.prod : β) = (s.map (↑)).prod

{β : Type u_3}
[Semiring β]
(s : List ℕ)


theorem pow_succ_le_ascFactorial (n : ℕ) : ∀ k : ℕ, n ^ k ≤ n.ascFactorial k


theorem Icc_union_Ici' (h₁ : c ≤ b) : Icc a b ∪ Ici c = Ici (min a c)

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

Set.Icc a b ∪ Set.Ici c = Set.Ici (min a c)


theorem commutator_mem_commutatorSet : ⁅g₁, g₂⁆ ∈ commutatorSet G


@[simp]
theorem Bool.compl_eq_bnot : HasCompl.compl = not


@[to_additive (attr := continuity)]
theorem continuous_zpow : ∀ z : ℤ, Continuous fun a : G => a ^ z

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
(z : ℤ)


@[simp] theorem data_dropWhile (p : Char → Bool) (s : String) :
    (s.dropWhile p).1 = s.1.dropWhile p

(s.dropWhile p).data = List.dropWhile p s.data


theorem pow_apply (e : M ≃ₗ[R] M) (n : ℕ) (m : M) : (e ^ n) m = e^[n] m

{R : Type u_1}
{M : Type u_8}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(e : M ≃ₗ[R] M)
(n : ℕ)
(m : M)


@[to_additive]
theorem Subgroup.topologicalClosure_minimal (s : Subgroup G) {t : Subgroup G} (h : s ≤ t)
    (ht : IsClosed (t : Set G)) : s.topologicalClosure ≤ t

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(s : AddSubgroup G)
{t : AddSubgroup G}
(h : s ≤ t)
(ht : IsClosed ↑t)


@[simp] lemma comp_inf_lift (a b : α) : comp a ⊓ lift b = lift (b \ a)

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

Booleanisation.comp a ⊓ Booleanisation.lift b = Booleanisation.lift (b \ a)


@[simp]
theorem coe_vaddConst (p : P) : ⇑(vaddConst p) = fun v => v +ᵥ p

{G : Type u_1}
{P : Type u_2}
[AddGroup G]
[AddTorsor G P]
(p : P)


@[to_additive] -- This can be proved by `Submonoid.mk_eq_one`
theorem mk_eq_one {g : G} {h} : (⟨g, h⟩ : H) = 1 ↔ g = 1

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
{g : G}
{h : g ∈ H}


@[simp] protected theorem mul_lt_mul_left (a0 : 0 < a) : a * b < a * c ↔ b < c


/-- The point provided by `ContractingWith.fixedPoint` is actually a fixed point. -/
theorem fixedPoint_isFixedPt : IsFixedPt f (fixedPoint f hf)

{α : Type u_1}
[MetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
[Nonempty α]
[CompleteSpace α]

Function.IsFixedPt f (ContractingWith.fixedPoint f hf)


@[simp]
theorem apply_symm_apply (h : α ≃ᵤ β) (x : β) : h (h.symm x) = x

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)
(x : β)


/-- Describes the unit of the adjunction `M ⊗ - ⊣ Hom(M, -)`. Given an `R`-module `N` this should
define a map `N ⟶ Hom(M, M ⊗ N)`, which is given by flipping the arguments in the natural
`R`-bilinear map `M ⟶ N ⟶ M ⊗ N`. -/
theorem ihom_coev_app (M N : ModuleCat.{u} R) :
    (ihom.coev M).app N = (TensorProduct.mk _ _ _).flip

{R : Type u}
[CommRing R]
(M N : ModuleCat R)

(CategoryTheory.ihom.coev M).app N =
  (TensorProduct.mk R ↑(Opposite.unop (Opposite.op M)) ↑((𝟭 (ModuleCat R)).obj N)).flip


lemma IsMarkovKernel.integrable (μ : Measure α) [IsFiniteMeasure μ]
    (κ : Kernel α β) [IsMarkovKernel κ] {s : Set β} (hs : MeasurableSet s) :
    Integrable (fun x => (κ x s).toReal) μ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]
(κ : ProbabilityTheory.Kernel α β)
[ProbabilityTheory.IsMarkovKernel κ]
{s : Set β}
(hs : MeasurableSet s)

MeasureTheory.Integrable (fun x => ((κ x) s).toReal) μ


@[simp]
theorem sup_set_eq_biUnion (s : Finset α) (f : α → Set β) : s.sup f = ⋃ x ∈ s, f x

{α : Type u_2}
{β : Type u_3}
(s : Finset α)
(f : α → Set β)


@[to_additive]
theorem quasiMeasurePreserving_div_of_right_invariant [IsMulRightInvariant μ] :
    QuasiMeasurePreserving (fun p : G × G => p.1 / p.2) (μ.prod ν) μ

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
[MeasurableNeg G]
[μ.IsAddRightInvariant]

MeasureTheory.Measure.QuasiMeasurePreserving (fun p => p.1 - p.2) (μ.prod ν) μ


/-- Build an isomorphism in the category `Semigroup` from a `MulEquiv` between `Semigroup`s. -/
@[to_additive (attr := simps)
  "Build an isomorphism in the category
  `AddSemigroup` from an `AddEquiv` between `AddSemigroup`s."]
def MulEquiv.toSemigrpIso (e : X ≃* Y) : Semigrp.of X ≅ Semigrp.of Y

{X Y : Type u}
[Semigroup X]
[Semigroup Y]
(e : X ≃* Y)

∀ (a : X), e.toSemigrpIso.hom a = e.toFun a


theorem forall_or_exists_not (P : α → Prop) : (∀ a, P a) ∨ ∃ a, ¬ P a


/-- The intersection of an open dense set with a dense set is a dense set. -/
theorem Dense.inter_of_isOpen_left (hs : Dense s) (ht : Dense t) (hso : IsOpen s) :
    Dense (s ∩ t)

{X : Type u}
{s t : Set X}
[TopologicalSpace X]
(hs : Dense s)
(ht : Dense t)
(hso : IsOpen s)


lemma LeftHomologyData.exact_iff [S.HasHomology]
    (h : S.LeftHomologyData) :
    S.Exact ↔ IsZero h.H

S.Exact ↔ CategoryTheory.Limits.IsZero h.H


theorem derivWithin_inter (ht : t ∈ 𝓝 x) : derivWithin f (s ∩ t) x = derivWithin f s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s t : Set 𝕜}
(ht : t ∈ 𝓝 x)


/-- If two points are topologically inseparable,
then they can't be separated by a Borel measurable set. -/
theorem Inseparable.mem_measurableSet_iff {x y : γ} (h : Inseparable x y) {s : Set γ}
    (hs : MeasurableSet s) : x ∈ s ↔ y ∈ s

{γ : Type u_3}
[TopologicalSpace γ]
[MeasurableSpace γ]
[BorelSpace γ]
{x y : γ}
(h : Inseparable x y)
{s : Set γ}
(hs : MeasurableSet s)


protected theorem biUnion {f : ι → Set α} {s : Set ι} (hs : s.Countable)
    (h : ∀ b ∈ s, NullMeasurableSet (f b) μ) : NullMeasurableSet (⋃ b ∈ s, f b) μ

(h : ∀ b ∈ s, MeasureTheory.NullMeasurableSet (f b) μ)

MeasureTheory.NullMeasurableSet (⋃ b ∈ s, f b) μ


theorem zeroLocus_anti_mono {s t : Set A} (h : s ⊆ t) : zeroLocus 𝒜 t ⊆ zeroLocus 𝒜 s

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
{s t : Set A}
(h : s ⊆ t)

ProjectiveSpectrum.zeroLocus 𝒜 t ⊆ ProjectiveSpectrum.zeroLocus 𝒜 s


theorem sup_sdiff_right {α β : Type*} [GeneralizedBooleanAlgebra α] (s : Finset β) (f : β → α)
    (a : α) : (s.sup fun b => f b \ a) = s.sup f \ a

{α : Type u_7}
{β : Type u_8}
[GeneralizedBooleanAlgebra α]
(s : Finset β)
(f : β → α)
(a : α)


/-- Dividing `n` by `p^i` is like truncating the first `i` digits of `n` in base `p`.
-/
lemma self_div_pow_eq_ofDigits_drop {p : ℕ} (i n : ℕ) (h : 2 ≤ p) :
    n / p ^ i = ofDigits p ((p.digits n).drop i)

n / p ^ i = Nat.ofDigits p (List.drop i (p.digits n))


/-- If `d` is a positive integer, then there is a nontrivial solution
to the Pell equation `x^2 - d*y^2 = 1` if and only if `d` is not a square. -/
theorem exists_iff_not_isSquare (h₀ : 0 < d) :
    (∃ x y : ℤ, x ^ 2 - d * y ^ 2 = 1 ∧ y ≠ 0) ↔ ¬IsSquare d

(∃ x y, x ^ 2 - d * y ^ 2 = 1 ∧ y ≠ 0) ↔ ¬IsSquare d


theorem Finite.infinite_compl [Infinite α] {s : Set α} (hs : s.Finite) : sᶜ.Infinite

{α : Type u}
[Infinite α]
{s : Set α}
(hs : s.Finite)


/-- The kernel of the quotient map induced by a congruence relation `c` equals `c`. -/
@[to_additive (attr := simp) "The kernel of the quotient map induced by an additive congruence
relation `c` equals `c`."]
theorem mul_ker_mk_eq : (mulKer ((↑) : M → c.Quotient) fun _ _ => rfl) = c


theorem radical_le_jacobson : radical I ≤ jacobson I


{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a : α}


lemma sqrt_lt_self (h : 1 < n) : sqrt n < n


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

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


lemma single_mul_right (a : α i) : single i (f i * a) = f * single i a

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → MulZeroClass (α i)]
[DecidableEq ι]
{i : ι}
{f : (i : ι) → α i}
(a : α i)

Pi.single i (f i * a) = f * Pi.single i a


/-- Updating a column then removing it is the same as removing it. -/
@[simp]
theorem submatrix_updateColumn_succAbove (A : Matrix m' (Fin n.succ) α) (v : m' → α) (f : o' → m')
    (i : Fin n.succ) : (A.updateColumn i v).submatrix f i.succAbove = A.submatrix f i.succAbove

{α : Type u}
{n : ℕ}
{m' : Type uₘ}
{o' : Type uₒ}
(A : Matrix m' (Fin n.succ) α)
(v : m' → α)
(f : o' → m')
(i : Fin n.succ)


@[norm_cast] lemma cast_mul_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.den : α) ≠ 0) :
    ↑(p * q) = (p * q : α)

{α : Type u_3}
[DivisionRing α]
{p q : ℚ}
(hp : ↑p.den ≠ 0)
(hq : ↑q.den ≠ 0)


@[simp]
theorem coe_rangeSRestrict (f : R →+* S) (x : R) : (f.rangeSRestrict x : S) = f x

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R →+* S)
(x : R)


lemma eq_zero_of_mul_self_add_mul_self_eq_zero [IsRightCancelAdd α] [NoZeroDivisors α]
    [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α]
    [CovariantClass α α (· + ·) (· ≤ ·)] [CovariantClass α α (· + ·) (· < ·)]
    (h : a * a + b * b = 0) : a = 0

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

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


theorem map_div [Field k] (f : R →+* k) : (p / q).map f = p.map f / q.map f

{R : Type u}
{k : Type y}
[Field R]
{p q : R[X]}
[Field k]
(f : R →+* k)

Polynomial.map f (p / q) = Polynomial.map f p / Polynomial.map f q


theorem decomposition.decompose'_eq :
    decomposition.decompose' = fun φ : MvPolynomial σ R =>
      DirectSum.mk (fun i : ℕ => ↥(homogeneousSubmodule σ R i)) (φ.support.image Finsupp.degree)
        fun m => ⟨homogeneousComponent m φ, homogeneousComponent_mem m φ⟩

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]

DirectSum.Decomposition.decompose' = fun φ =>
  (DirectSum.mk (fun i => ↥(MvPolynomial.homogeneousSubmodule σ R i)) (Finset.image Finsupp.degree φ.support)) fun m =>
    ⟨(MvPolynomial.homogeneousComponent ↑m) φ, ⋯⟩


lemma equation_iff (P : Fin 3 → R) : W'.Equation P ↔
    P y ^ 2 + W'.a₁ * P x * P y * P z + W'.a₃ * P y * P z ^ 3
      - (P x ^ 3 + W'.a₂ * P x ^ 2 * P z ^ 2 + W'.a₄ * P x * P z ^ 4 + W'.a₆ * P z ^ 6) = 0

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


/-- A morphism in `Type` is a monomorphism if and only if it is injective.

See <https://stacks.math.columbia.edu/tag/003C>.
-/
theorem mono_iff_injective {X Y : Type u} (f : X ⟶ Y) : Mono f ↔ Function.Injective f

CategoryTheory.Mono f ↔ Function.Injective f


/-- Typeclass for strict monotonicity of scalar multiplication by positive elements on the left,
namely `a₁ < a₂ → a₁ • b < a₂ • b` if `0 < b`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class SMulPosStrictMono : Prop where
  /-- Do not use this. Use `smul_lt_smul_of_pos_right` instead. -/
  protected elim ⦃b : β⦄ (hb : 0 < b) ⦃a₁ a₂ : α⦄ (ha : a₁ < a₂) : a₁ • b < a₂ • b

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


@[to_additive]
theorem exists_one_lt_mul_of_lt' (h : a < b) : ∃ c, 1 < c ∧ a * c = b

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


/-- The bounded supremum of a family of commutative additive submonoids is equal to the range of
`DFinsupp.sumAddHom` composed with `DFinsupp.filterAddMonoidHom`; that is, every element in the
bounded `iSup` can be produced from taking a finite number of non-zero elements from the `S i` that
satisfy `p i`, coercing them to `γ`, and summing them. -/
theorem _root_.AddSubmonoid.bsupr_eq_mrange_dfinsupp_sumAddHom (p : ι → Prop) [DecidablePred p]
    [AddCommMonoid γ] (S : ι → AddSubmonoid γ) :
    ⨆ (i) (_ : p i), S i =
      AddMonoidHom.mrange ((sumAddHom fun i => (S i).subtype).comp (filterAddMonoidHom _ p))

{ι : Type u}
{γ : Type w}
[DecidableEq ι]
(p : ι → Prop)
[DecidablePred p]
[AddCommMonoid γ]
(S : ι → AddSubmonoid γ)

⨆ i, ⨆ (_ : p i), S i =
  AddMonoidHom.mrange
    ((DFinsupp.sumAddHom fun i => (S i).subtype).comp (DFinsupp.filterAddMonoidHom (fun i => ↥(S i)) p))


theorem EventuallyEq.comp₂ {δ} {f f' : α → β} {g g' : α → γ} {l} (Hf : f =ᶠ[l] f') (h : β → γ → δ)
    (Hg : g =ᶠ[l] g') : (fun x => h (f x) (g x)) =ᶠ[l] fun x => h (f' x) (g' x)

{α : Type u}
{β : Type v}
{γ : Type w}
{δ : Type u_2}
{f f' : α → β}
{g g' : α → γ}
{l : Filter α}
(Hf : f =ᶠ[l] f')
(h : β → γ → δ)
(Hg : g =ᶠ[l] g')


@[simp]
theorem toOrderIso_eq_coe (f : α ≃+*o β) : f.toOrderIso = f

{α : Type u_2}
{β : Type u_3}
[Mul α]
[Add α]
[LE α]
[Mul β]
[Add β]
[LE β]
(f : α ≃+*o β)


/-- The equivalence `Square C ≌ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the top morphism of `sq`
to the bottom morphism of `sq`. -/
@[simps]
def arrowArrowEquivalence' : Square C ≌ Arrow (Arrow C)

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


theorem Fintype.card_quotient_lt [Fintype α] {s : Setoid α} [DecidableRel ((· ≈ ·) : α → α → Prop)]
    {x y : α} (h1 : x ≠ y) (h2 : x ≈ y) : Fintype.card (Quotient s) < Fintype.card α

{α : Type u_1}
[Fintype α]
{s : Setoid α}
[DecidableRel fun x x_1 => x ≈ x_1]
{x y : α}
(h1 : x ≠ y)
(h2 : x ≈ y)


/--
If `J` is subcanonical, we obtain a "Yoneda" functor from the defining site
into the sheaf category.
-/
@[simps]
def yoneda (hJ : Subcanonical J) : C ⥤ Sheaf J (Type v)

{J : CategoryTheory.GrothendieckTopology C}

(hJ : CategoryTheory.Sheaf.Subcanonical J)

(hJ.yoneda.obj X).val = CategoryTheory.yoneda.obj X


@[simp]
theorem self_comp_symm (h : X ≃ₜ Y) : h ∘ h.symm = id

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


/--
This is an auxiliary lemma used twice in the definition of  `EffectiveEpiFamilyOfEffectiveEpiDesc`.
It is the `h` hypothesis of `EffectiveEpi.desc` and `EffectiveEpi.fac`.
-/
theorem effectiveEpiFamilyStructOfEffectiveEpiDesc_aux {B : C} {α : Type*} {X : α → C}
    {π : (a : α) → X a ⟶ B} [HasCoproduct X]
    [∀ {Z : C} (g : Z ⟶ ∐ X) (a : α), HasPullback g (Sigma.ι X a)]
    [∀ {Z : C} (g : Z ⟶ ∐ X), HasCoproduct fun a ↦ pullback g (Sigma.ι X a)]
    [∀ {Z : C} (g : Z ⟶ ∐ X), Epi (Sigma.desc fun a ↦ pullback.fst g (Sigma.ι X a))]
    {W : C} {e : (a : α) → X a ⟶ W} (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
      g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) {Z : C}
    {g₁ g₂ : Z ⟶ ∐ fun b ↦ X b} (hg : g₁ ≫ Sigma.desc π = g₂ ≫ Sigma.desc π) :
    g₁ ≫ Sigma.desc e = g₂ ≫ Sigma.desc e

[∀ {Z : C} (g : Z ⟶ ∐ X) (a : α), CategoryTheory.Limits.HasPullback g (CategoryTheory.Limits.Sigma.ι X a)]

[∀ {Z : C} (g : Z ⟶ ∐ X),
    CategoryTheory.Limits.HasCoproduct fun a => CategoryTheory.Limits.pullback g (CategoryTheory.Limits.Sigma.ι X a)]

[∀ {Z : C} (g : Z ⟶ ∐ X),
    CategoryTheory.Epi
      (CategoryTheory.Limits.Sigma.desc fun a =>
        CategoryTheory.Limits.pullback.fst g (CategoryTheory.Limits.Sigma.ι X a))]

(h :
  ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
    CategoryTheory.CategoryStruct.comp g₁ (π a₁) = CategoryTheory.CategoryStruct.comp g₂ (π a₂) →
      CategoryTheory.CategoryStruct.comp g₁ (e a₁) = CategoryTheory.CategoryStruct.comp g₂ (e a₂))

(hg :
  CategoryTheory.CategoryStruct.comp g₁ (CategoryTheory.Limits.Sigma.desc π) =
    CategoryTheory.CategoryStruct.comp g₂ (CategoryTheory.Limits.Sigma.desc π))

CategoryTheory.CategoryStruct.comp g₁ (CategoryTheory.Limits.Sigma.desc e) =
  CategoryTheory.CategoryStruct.comp g₂ (CategoryTheory.Limits.Sigma.desc e)


@[simp, reassoc]
theorem braiding_tensor_right (X Y Z : C) :
    (β_ X (Y ⊗ Z)).hom  =
      (α_ X Y Z).inv ≫ (β_ X Y).hom ▷ Z ≫ (α_ Y X Z).hom ≫
        Y ◁ (β_ X Z).hom ≫ (α_ Y Z X).inv

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


/-- Poincaré recurrence theorem: if `f` is a conservative dynamical system and `s` is a measurable
set, then for `μ`-a.e. `x`, if the orbit of `x` visits `s` at least once, then it visits `s`
infinitely many times.  -/
theorem ae_forall_image_mem_imp_frequently_image_mem (hf : Conservative f μ)
    (hs : NullMeasurableSet s μ) : ∀ᵐ x ∂μ, ∀ k, f^[k] x ∈ s → ∃ᶠ n in atTop, f^[n] x ∈ s

(hs : MeasureTheory.NullMeasurableSet s μ)

∀ᵐ (x : α) ∂μ, ∀ (k : ℕ), f^[k] x ∈ s → ∃ᶠ (n : ℕ) in Filter.atTop, f^[n] x ∈ s


@[to_additive (attr := simp)]
lemma fiberEquivKer_symm_apply (f : α →* H) (a : α) (g : f.ker) :
    (f.fiberEquivKer a).symm g = a * g

{α : Type u_1}
[Group α]
{H : Type u_2}
[Group H]
(f : α →* H)
(a : α)
(g : ↥f.ker)


lemma Pi.isCompact_iff_of_isClosed {s : Set (Π i, X i)} (hs : IsClosed s) :
    IsCompact s ↔ ∀ i, IsCompact (eval i '' s)

{ι : Type u_1}
{X : ι → Type u_2}
[(i : ι) → TopologicalSpace (X i)]
{s : Set ((i : ι) → X i)}
(hs : IsClosed s)

IsCompact s ↔ ∀ (i : ι), IsCompact (Function.eval i '' s)


@[to_additive]
theorem quasiMeasurePreserving_div_left [IsMulLeftInvariant μ] (g : G) :
    QuasiMeasurePreserving (fun h : G => g / h) μ μ

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ : MeasureTheory.Measure G)
[MeasureTheory.SFinite μ]
[MeasurableInv G]
[μ.IsMulLeftInvariant]
(g : G)

MeasureTheory.Measure.QuasiMeasurePreserving (fun h => g / h) μ μ


theorem Adhesive.mono_of_isPushout_of_mono_left [Adhesive C] (H : IsPushout f g h i) [Mono f] :
    Mono i

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
[CategoryTheory.Adhesive C]
(H : CategoryTheory.IsPushout f g h i)
[CategoryTheory.Mono f]


@[simp]
theorem snd_vadd (v : G × G') (p : P × P') : (v +ᵥ p).2 = v.2 +ᵥ p.2

{G : Type u_1}
{G' : Type u_2}
{P : Type u_3}
{P' : Type u_4}
[AddGroup G]
[AddGroup G']
[AddTorsor G P]
[AddTorsor G' P']
(v : G × G')
(p : P × P')


@[to_additive (attr := simp high)]
theorem Finite.toFinset_one (h : (1 : Set α).Finite := finite_one) : h.toFinset = 1

{α : Type u_2}
[One α]
(h : Set.Finite 1 := ⋯)


theorem norm_lt_pow_iff_norm_le_pow_sub_one (x : ℚ_[p]) (n : ℤ) :
    ‖x‖ < (p : ℝ) ^ n ↔ ‖x‖ ≤ (p : ℝ) ^ (n - 1)

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


lemma GeneralizingMap.stableUnderGeneralization_image (hf : GeneralizingMap f) {s : Set X}
    (hs : StableUnderGeneralization s) : StableUnderGeneralization (f '' s)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : GeneralizingMap f)
{s : Set X}
(hs : StableUnderGeneralization s)


theorem Associated.eq_of_normalized
    {a b : α} (h : Associated a b) (ha : normalize a = a) (hb : normalize b = b) :
    a = b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
{a b : α}
(h : Associated a b)
(ha : normalize a = a)
(hb : normalize b = b)


/-- **Zorn's lemma**: A partial order is coatomic if every nonempty chain `c`, `⊤ ∉ c`, has an upper
bound not equal to `⊤`. -/
theorem IsCoatomic.of_isChain_bounded {α : Type*} [PartialOrder α] [OrderTop α]
    (h :
      ∀ c : Set α,
        IsChain (· ≤ ·) c → c.Nonempty → ⊤ ∉ c → ∃ x ≠ ⊤, x ∈ upperBounds c) :
    IsCoatomic α

(h : ∀ (c : Set α), IsChain (fun x x_1 => x ≤ x_1) c → c.Nonempty → ⊤ ∉ c → ∃ x, x ≠ ⊤ ∧ x ∈ upperBounds c)


/-- Given a set `S` and a walk `w` from `u` to `v` such that `u ∈ S` but `v ∉ S`,
there exists a dart in the walk whose start is in `S` but whose end is not. -/
theorem exists_boundary_dart {u v : V} (p : G.Walk u v) (S : Set V) (uS : u ∈ S) (vS : v ∉ S) :
    ∃ d : G.Dart, d ∈ p.darts ∧ d.fst ∈ S ∧ d.snd ∉ S

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
(S : Set V)
(uS : u ∈ S)
(vS : v ∉ S)

∃ d ∈ p.darts, d.toProd.1 ∈ S ∧ d.toProd.2 ∉ S


theorem isUpperSet_iInter₂ {f : ∀ i, κ i → Set α} (hf : ∀ i j, IsUpperSet (f i j)) :
    IsUpperSet (⋂ (i) (j), f i j)

(hf : ∀ (i : ι) (j : κ i), IsUpperSet (f i j))


@[to_additive]
theorem finprod_subtype_eq_finprod_cond (p : α → Prop) :
    ∏ᶠ j : Subtype p, f j = ∏ᶠ (i) (_ : p i), f i

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
(p : α → Prop)

∏ᶠ (j : Subtype p), f ↑j = ∏ᶠ (i : α) (_ : p i), f i


@[simp, rclike_simps] -- Porting note: removed `norm_cast`
theorem ratCast_re (q : ℚ) : re (q : K) = q


/-- The chosen cokernels and kernels of the limits API give a `RightHomologyData` -/
@[simps]
noncomputable def ofHasCokernelOfHasKernel
    [HasCokernel S.f] [HasKernel (cokernel.desc S.f S.g S.zero)] :
    S.RightHomologyData

[CategoryTheory.Limits.HasKernel (CategoryTheory.Limits.cokernel.desc S.f S.g ⋯)]

(CategoryTheory.ShortComplex.RightHomologyData.ofHasCokernelOfHasKernel S).p = CategoryTheory.Limits.cokernel.π S.f


theorem Cauchy.mono {f g : Filter α} [hg : NeBot g] (h_c : Cauchy f) (h_le : g ≤ f) : Cauchy g

{α : Type u}
[uniformSpace : UniformSpace α]
{f g : Filter α}
[hg : g.NeBot]
(h_c : Cauchy f)
(h_le : g ≤ f)


@[simp]
theorem iterate_mod_minimalPeriod_eq : f^[n % minimalPeriod f x] x = f^[n] x

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}

f^[n % Function.minimalPeriod f x] x = f^[n] x


/-- The direction of the affine span of collinear points is finite-dimensional. -/
theorem Collinear.finiteDimensional_direction_affineSpan {s : Set P} (h : Collinear k s) :
    FiniteDimensional k (affineSpan k s).direction

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set P}
(h : Collinear k s)

FiniteDimensional k ↥(affineSpan k s).direction


/-- A Lebesgue Integral from -∞ to y can be expressed as the sum of one from -∞ to 0 and 0 to x -/
lemma lintegral_Iic_eq_lintegral_Iio_add_Icc {y z : ℝ} (f : ℝ → ℝ≥0∞) (hzy : z ≤ y) :
    ∫⁻ x in Iic y, f x = (∫⁻ x in Iio z, f x) + ∫⁻ x in Icc z y, f x

∫⁻ (x : ℝ) in Set.Iic y, f x = (∫⁻ (x : ℝ) in Set.Iio z, f x) + ∫⁻ (x : ℝ) in Set.Icc z y, f x


/-- Negation turns AND into OR, so `¬⟦f₁ ∧ f₂⟧_v ≡ ¬⟦f₁⟧_v ∨ ¬⟦f₂⟧_v`. -/
theorem Fmla.reify_or {f₁ : Fmla} {a : Prop} {f₂ : Fmla} {b : Prop}
    (h₁ : Fmla.reify v f₁ a) (h₂ : Fmla.reify v f₂ b) : Fmla.reify v (f₁.and f₂) (a ∨ b)

{v : Sat.Valuation}
{f₁ : Sat.Fmla}
{a : Prop}
{f₂ : Sat.Fmla}
{b : Prop}
(h₁ : Sat.Fmla.reify v f₁ a)
(h₂ : Sat.Fmla.reify v f₂ b)


theorem HasCompactSupport.smul_right (hf : HasCompactSupport f) : HasCompactSupport (f • f')

{α : Type u_2}
{M : Type u_7}
{R : Type u_9}
[TopologicalSpace α]
[Zero R]
[Zero M]
[SMulWithZero R M]
{f : α → R}
{f' : α → M}
(hf : HasCompactSupport f)


theorem UpperSemicontinuous.isOpen_preimage (hf : UpperSemicontinuous f) (y : β) :
    IsOpen (f ⁻¹' Iio y)

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


/-- Non-dependent recursion principle for `RatFunc K`:
To construct a term of `P : Sort*` out of `x : RatFunc K`,
it suffices to provide a constructor `f : Π (p q : K[X]), P`
and a proof that `f p q = f p' q'` for all `p q p' q'` such that `q' * p = q * p'` where
both `q` and `q'` are not zero divisors, stated as `q ∉ K[X]⁰`, `q' ∉ K[X]⁰`.

If considering `K` as an integral domain, this is the same as saying that
we construct a value of `P` for such elements of `RatFunc K` by setting
`liftOn (p / q) f _ = f p q`.

When `[IsDomain K]`, one can use `RatFunc.liftOn'`, which has the stronger requirement
of `∀ {p q a : K[X]} (hq : q ≠ 0) (ha : a ≠ 0), f (a * p) (a * q) = f p q)`.
-/
protected irreducible_def liftOn {P : Sort v} (x : RatFunc K) (f : K[X] → K[X] → P)
    (H : ∀ {p q p' q'} (_hq : q ∈ K[X]⁰) (_hq' : q' ∈ K[X]⁰), q' * p = q * p' → f p q = f p' q') :
    P

(H : ∀ {p q p' q' : K[X]}, q ∈ K[X]⁰ → q' ∈ K[X]⁰ → q' * p = q * p' → f p q = f p' q')

x.liftOn f H = Localization.liftOn x.toFractionRing (fun p q => f p ↑q) ⋯


@[to_additive]
theorem comap_sup_map_of_injective (S T : Submonoid M) : (S.map f ⊔ T.map f).comap f = S ⊔ T

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_4}
[FunLike F M N]
[mc : MonoidHomClass F M N]
{f : F}
(hf : Function.Injective ⇑f)
(S T : Submonoid M)

Submonoid.comap f (Submonoid.map f S ⊔ Submonoid.map f T) = S ⊔ T


theorem derivWithin_exp (hf : DifferentiableWithinAt ℝ f s x) (hxs : UniqueDiffWithinAt ℝ s x) :
    derivWithin (fun x => Real.exp (f x)) s x = Real.exp (f x) * derivWithin f s x

{f : ℝ → ℝ}
{x : ℝ}
{s : Set ℝ}
(hf : DifferentiableWithinAt ℝ f s x)
(hxs : UniqueDiffWithinAt ℝ s x)


@[simp 900]
theorem sublists'_cons (a : α) (l : List α) :
    sublists' (a :: l) = sublists' l ++ map (cons a) (sublists' l)

(a :: l).sublists' = l.sublists' ++ List.map (List.cons a) l.sublists'


/-- Adding the first vector passed to `oangle` to the second vector does not change the sign of
the angle. -/
@[simp]
theorem oangle_sign_add_right (x y : V) : (o.oangle x (x + y)).sign = (o.oangle x y).sign

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


@[simp] lemma infs_compls_eq_diffs (s t : Finset α) : s ⊼ tᶜˢ = s \\ t

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


theorem one_mem_divisors : 1 ∈ divisors n ↔ n ≠ 0


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

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

(hf : MeasureTheory.Submartingale f ℱ μ)

(hg : MeasureTheory.Submartingale g ℱ μ)


lemma Module.not_mem_support_iff' :
    p ∉ Module.support R M ↔ ∀ m : M, ∃ r ∉ p.asIdeal, r • m = 0

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{p : PrimeSpectrum R}

p ∉ Module.support R M ↔ ∀ (m : M), ∃ r ∉ p.asIdeal, r • m = 0


@[ext]
theorem ext {f g : α ≃o β} (h : (f : α → β) = g) : f = g

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
{f g : α ≃o β}
(h : ⇑f = ⇑g)


/-- **Dynkin's π-λ theorem**:
  Given a collection of sets closed under binary intersections, then the Dynkin system it
  generates is equal to the σ-algebra it generates.
  This result is known as the π-λ theorem.
  A collection of sets closed under binary intersection is called a π-system (often requiring
  additionally that it is non-empty, but we drop this condition in the formalization).
-/
theorem generateFrom_eq {s : Set (Set α)} (hs : IsPiSystem s) :
    generateFrom s = (generate s).toMeasurableSpace fun t₁ t₂ => generate_inter hs

{α : Type u_1}
{s : Set (Set α)}
(hs : IsPiSystem s)

MeasurableSpace.generateFrom s = (MeasurableSpace.DynkinSystem.generate s).toMeasurableSpace ⋯


@[simp]
theorem comapEquiv_coe (f : MvPolynomial σ R ≃ₐ[R] MvPolynomial τ R) :
    (comapEquiv f : (τ → R) → σ → R) = comap f

⇑(MvPolynomial.comapEquiv f) = MvPolynomial.comap ↑f


@[simp]
private lemma auxHom_mk (p : MvPolynomial Unit R) :
    auxHom S r p = aeval (S₁ := S) (fun _ ↦ invSelf r) p

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

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


theorem getLastD_eq_getLast? (a l) : @getLastD α l a = (getLast? l).getD a


/-- A Boolean algebra is a bounded distributive lattice with a complement operator `ᶜ` such that
`x ⊓ xᶜ = ⊥` and `x ⊔ xᶜ = ⊤`. For convenience, it must also provide a set difference operation `\`
and a Heyting implication `⇨` satisfying `x \ y = x ⊓ yᶜ` and `x ⇨ y = y ⊔ xᶜ`.

This is a generalization of (classical) logic of propositions, or the powerset lattice.

Since `BoundedOrder`, `OrderBot`, and `OrderTop` are mixins that require `LE`
to be present at define-time, the `extends` mechanism does not work with them.
Instead, we extend using the underlying `Bot` and `Top` data typeclasses, and replicate the
order axioms of those classes here. A "forgetful" instance back to `BoundedOrder` is provided.
-/
class BooleanAlgebra (α : Type u) extends
    DistribLattice α, HasCompl α, SDiff α, HImp α, Top α, Bot α where
  /-- The infimum of `x` and `xᶜ` is at most `⊥` -/
  inf_compl_le_bot : ∀ x : α, x ⊓ xᶜ ≤ ⊥
  /-- The supremum of `x` and `xᶜ` is at least `⊤` -/
  top_le_sup_compl : ∀ x : α, ⊤ ≤ x ⊔ xᶜ
  /-- `⊤` is the greatest element -/
  le_top : ∀ a : α, a ≤ ⊤
  /-- `⊥` is the least element -/
  bot_le : ∀ a : α, ⊥ ≤ a
  /-- `x \ y` is equal to `x ⊓ yᶜ` -/
  sdiff := fun x y => x ⊓ yᶜ
  /-- `x ⇨ y` is equal to `y ⊔ xᶜ` -/
  himp := fun x y => y ⊔ xᶜ
  /-- `x \ y` is equal to `x ⊓ yᶜ` -/
  sdiff_eq : ∀ x y : α, x \ y = x ⊓ yᶜ := by aesop
  /-- `x ⇨ y` is equal to `y ⊔ xᶜ` -/
  himp_eq : ∀ x y : α, x ⇨ y = y ⊔ xᶜ := by aesop

{α : Type u}
[self : BooleanAlgebra α]
(x : α)


lemma set_smul_eq_map [SMulCommClass R R N] :
    sR • N =
    Submodule.map
      (N.subtype.comp (Finsupp.lsum R <| DistribMulAction.toLinearMap _ _))
      (Finsupp.supported N R sR)

{R : Type u_2}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(sR : Set R)
(N : Submodule R M)
[SMulCommClass R R ↥N]

sR • N = Submodule.map (N.subtype ∘ₗ (Finsupp.lsum R) (DistribMulAction.toLinearMap R ↥N)) (Finsupp.supported (↥N) R sR)


theorem Finite.card_pos [Finite α] [h : Nonempty α] : 0 < Nat.card α

{α : Type u_1}
[Finite α]
[h : Nonempty α]


theorem exists_notConvergentSeq_lt (hε : 0 < ε) (hf : ∀ n, StronglyMeasurable (f n))
    (hg : StronglyMeasurable g) (hsm : MeasurableSet s) (hs : μ s ≠ ∞)
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    ∃ j : ι, μ (s ∩ notConvergentSeq f g n j) ≤ ENNReal.ofReal (ε * 2⁻¹ ^ n)

{f : ι → α → β}

(hf : ∀ (n : ι), MeasureTheory.StronglyMeasurable (f n))

(hg : MeasureTheory.StronglyMeasurable g)

(hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (g x)))

∃ j, μ (s ∩ MeasureTheory.Egorov.notConvergentSeq f g n j) ≤ ENNReal.ofReal (ε * 2⁻¹ ^ n)


/-- The **Schwarz Lemma**: if `f : ℂ → ℂ` sends an open disk with center `0` to itself, then for any
point `z` of this disk we have `abs (f z) ≤ abs z`. -/
theorem abs_le_abs_of_mapsTo_ball_self (hd : DifferentiableOn ℂ f (ball 0 R))
    (h_maps : MapsTo f (ball 0 R) (ball 0 R)) (h₀ : f 0 = 0) (hz : abs z < R) :
    abs (f z) ≤ abs z

(hd : DifferentiableOn ℂ f (Metric.ball 0 R))

(h_maps : Set.MapsTo f (Metric.ball 0 R) (Metric.ball 0 R))


theorem lintegral_mul_const_le (r : ℝ≥0∞) (f : α → ℝ≥0∞) :
    (∫⁻ a, f a ∂μ) * r ≤ ∫⁻ a, f a * r ∂μ

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

(∫⁻ (a : α), f a ∂μ) * r ≤ ∫⁻ (a : α), f a * r ∂μ


/-- A structure encapsulating minimal axioms needed to defined a seminormed vector space, as found
in textbooks. This is meant to be used to easily define `SeminormedAddCommGroup E` instances from
scratch on a type with no preexisting distance or topology. -/
structure SeminormedAddCommGroup.Core (𝕜 : Type*) (E : Type*) [NormedField 𝕜] [AddCommGroup E]
    [Norm E] [Module 𝕜 E] : Prop where
  norm_nonneg (x : E) : 0 ≤ ‖x‖
  norm_smul (c : 𝕜) (x : E) : ‖c • x‖ = ‖c‖ * ‖x‖
  norm_triangle (x y : E) : ‖x + y‖ ≤ ‖x‖ + ‖y‖

(self : SeminormedAddCommGroup.Core 𝕜 E)


@[simp]
theorem sofLeftInverse'_symm_apply {g : S → R} {f : F} (h : Function.LeftInverse g f)
    (x : srange f) : (sofLeftInverse' h).symm x = g x

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
{g : S → R}
{f : F}
(h : Function.LeftInverse g ⇑f)
(x : ↥(NonUnitalRingHom.srange f))

(RingEquiv.sofLeftInverse' h).symm x = g ↑x


@[fun_prop]
theorem DifferentiableWithinAt.sum (h : ∀ i ∈ u, DifferentiableWithinAt 𝕜 (A i) s x) :
    DifferentiableWithinAt 𝕜 (fun y => ∑ i ∈ u, A i y) s x


protected theorem IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :
    (x ∩ y).IsTransitive

{x y : ZFSet}
(hx : x.IsTransitive)
(hy : y.IsTransitive)


theorem range_finite [CompactSpace X] (f : LocallyConstant X Y) : (Set.range f).Finite

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


theorem conjugateEquiv_adjunction_id_symm {L R : C ⥤ C} (adj : L ⊣ R) (α : R ⟶ 𝟭 C) (c : C) :
    ((conjugateEquiv adj Adjunction.id).symm α).app c = adj.unit.app c ≫ α.app (L.obj c)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{L R : CategoryTheory.Functor C C}
(adj : L ⊣ R)
(α : R ⟶ CategoryTheory.Functor.id C)
(c : C)

((CategoryTheory.conjugateEquiv adj CategoryTheory.Adjunction.id).symm α).app c =
  CategoryTheory.CategoryStruct.comp (adj.unit.app c) (α.app (L.obj c))


/-- A linear isomorphism induces an order isomorphism of submodules. -/
@[simps symm_apply apply]
def orderIsoMapComapOfBijective [FunLike F M M₂] [SemilinearMapClass F σ₁₂ M M₂]
    (f : F) (hf : Bijective f) : Submodule R M ≃o Submodule R₂ M₂

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[RingHomSurjective σ₁₂]
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
(f : F)
(hf : Function.Bijective ⇑f)
(p : Submodule R M)

(Submodule.orderIsoMapComapOfBijective f hf) p = Submodule.map f p


@[to_additive (attr := simp)]
theorem ofList_comp_toList : @ofList α ∘ toList = id

⇑FreeAddMonoid.ofList ∘ ⇑FreeAddMonoid.toList = id


@[to_additive]
protected theorem MonoidHom.map_pow [Monoid M] [Monoid N] (f : M →* N) (a : M) (n : ℕ) :
    f (a ^ n) = f a ^ n

{M : Type u_4}
{N : Type u_5}
[Monoid M]
[Monoid N]
(f : M →* N)
(a : M)
(n : ℕ)


@[to_additive tsum_prod']
theorem tprod_prod' {f : β × γ → α} (h : Multipliable f)
    (h₁ : ∀ b, Multipliable fun c ↦ f (b, c)) :
    ∏' p, f p = ∏' (b) (c), f (b, c)

{f : β × γ → α}

(h₁ : ∀ (b : β), Multipliable fun c => f (b, c))


/-- If `F : ι → X → α` is an equicontinuous family of functions,
`f : X → α` is a continuous function, and `l` is a filter on `ι`,
then `{x | Filter.Tendsto (F · x) l (𝓝 (f x))}` is a closed set. -/
theorem Equicontinuous.isClosed_setOf_tendsto {l : Filter ι} {F : ι → X → α} {f : X → α}
    (hF : Equicontinuous F) (hf : Continuous f) :
    IsClosed {x | Tendsto (F · x) l (𝓝 (f x))}

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{l : Filter ι}
{F : ι → X → α}
{f : X → α}
(hF : Equicontinuous F)
(hf : Continuous f)

IsClosed {x | Filter.Tendsto (fun x_1 => F x_1 x) l (nhds (f x))}


/-- The identity functor on `C`, viewed as a functor from `C` to its monoidal opposite. -/
@[simps obj map] -- need to specify `obj, map` or else we generate `mopFunctor_obj_unmop`
def mopFunctor : C ⥤ Cᴹᵒᵖ

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

(CategoryTheory.mopFunctor C).obj unmop = { unmop := unmop }


theorem lim_inv {f : CauSeq β abv} (hf : ¬LimZero f) : lim (inv f hf) = (lim f)⁻¹

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


@[simp]
theorem mk_add [∀ i, AddZeroClass (β i)] {s : Finset ι} {x y : ∀ i : (↑s : Set ι), β i} :
    mk s (x + y) = mk s x + mk s y

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
{s : Finset ι}
{x y : (i : ↑↑s) → β ↑i}

DFinsupp.mk s (x + y) = DFinsupp.mk s x + DFinsupp.mk s y


lemma norm_snd_le (x : E × F) : ‖x.2‖ ≤ ‖x‖

{E : Type u_2}
{F : Type u_3}
[Norm E]
[Norm F]
(x : E × F)


@[simp]
theorem ofLinearMap_id (map_one) (map_mul) :
    ofLinearMap LinearMap.id map_one map_mul = AlgHom.id R A

(map_mul : ∀ (x y : A), LinearMap.id (x * y) = LinearMap.id x * LinearMap.id y)

AlgHom.ofLinearMap LinearMap.id map_one map_mul = AlgHom.id R A


@[simp]
theorem length_eq_zero_iff {w : W} : ℓ w = 0 ↔ w = 1

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


/-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe :
    (FullSubcategory fun f : Over Y => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) ≌
    OpensLeCover U

{X : TopCat}
{ι : Type w}
(U : ι → TopologicalSpace.Opens ↑X)
{Y : TopologicalSpace.Opens ↑X}
(hY : Y = iSup U)

(TopCat.Presheaf.generateEquivalenceOpensLe U hY).unitIso = CategoryTheory.eqToIso ⋯


lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g

(S : CategoryTheory.ShortComplex (ModuleCat R))


/-- Auxiliary definition for `grothendieckTypeToCat`, to speed up elaboration. -/
@[simps!]
def grothendieckTypeToCatFunctor : Grothendieck (G ⋙ typeToCat) ⥤ G.Elements

(X : CategoryTheory.Grothendieck (G.comp CategoryTheory.typeToCat))

((CategoryTheory.Grothendieck.grothendieckTypeToCatFunctor G).obj X).fst = X.base


theorem range_comp [RingHomSurjective τ₁₂] [RingHomSurjective τ₂₃] [RingHomSurjective τ₁₃]
    (f : M →ₛₗ[τ₁₂] M₂) (g : M₂ →ₛₗ[τ₂₃] M₃) : range (g.comp f : M →ₛₗ[τ₁₃] M₃) = map g (range f)

{R : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
{M : Type u_6}
{M₂ : Type u_7}
{M₃ : Type u_8}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R₂ M₂]
[Module R₃ M₃]
{τ₁₂ : R →+* R₂}
{τ₂₃ : R₂ →+* R₃}
{τ₁₃ : R →+* R₃}
[RingHomCompTriple τ₁₂ τ₂₃ τ₁₃]
[RingHomSurjective τ₁₂]
[RingHomSurjective τ₂₃]
[RingHomSurjective τ₁₃]
(f : M →ₛₗ[τ₁₂] M₂)
(g : M₂ →ₛₗ[τ₂₃] M₃)

LinearMap.range (g.comp f) = Submodule.map g (LinearMap.range f)


/-- Although not explicitly stated, the assumptions of lemma `nat_degree_mul_C_eq_of_mul_ne_zero`
force the polynomial `p` to be non-zero, via `p.leading_coeff ≠ 0`.
-/
theorem natDegree_mul_C_eq_of_mul_ne_zero (h : p.leadingCoeff * a ≠ 0) :
    (p * C a).natDegree = p.natDegree

{R : Type u}
{a : R}
[Semiring R]
{p : R[X]}
(h : p.leadingCoeff * a ≠ 0)

(p * Polynomial.C a).natDegree = p.natDegree


@[deprecated shiftRight_add (since := "2024-06-02")]
theorem shiftRight_shiftRight {w : Nat} (x : BitVec w) (n m : Nat) :
    (x >>> n) >>> m = x >>> (n + m)


@[simps!]
instance : MonoidalCategoryStruct (Dial C)

∀ (x x_1 : CategoryTheory.Dial C) (f : x ⟶ x_1),
  (CategoryTheory.MonoidalCategory.whiskerLeft X f).F =
    CategoryTheory.Limits.prod.lift
      (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.fst)
      (CategoryTheory.CategoryStruct.comp
        (CategoryTheory.Limits.prod.map CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.snd) f.F)


@[simp]
theorem take_zero (s : Stream' α) : take 0 s = []


@[simp, norm_cast]
theorem op_coe (S : Subalgebra R A) : S.op = MulOpposite.unop ⁻¹' (S : Set A)

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


/--
As `simp` does not index foralls, this `@[simp]` lemma is tried on every `forall` expression.
This is not ideal, and likely a performance issue, but it is difficult to remove this attribute at this time.
-/
@[simp] theorem forall_exists_index {q : (∃ x, p x) → Prop} :
    (∀ h, q h) ↔ ∀ x (h : p x), q ⟨x, h⟩

{α : Sort u_1}
{p : α → Prop}
{q : (∃ x, p x) → Prop}

(∀ (h : ∃ x, p x), q h) ↔ ∀ (x : α) (h : p x), q ⋯


theorem sSup_image2 {f : β → γ → α} {s : Set β} {t : Set γ} :
    sSup (image2 f s t) = ⨆ (a ∈ s) (b ∈ t), f a b

{α : Type u_1}
{β : Type u_2}
{γ : Type u_4}
[CompleteLattice α]
{f : β → γ → α}
{s : Set β}
{t : Set γ}

sSup (Set.image2 f s t) = ⨆ a ∈ s, ⨆ b ∈ t, f a b


/-- The infinite part of the product formula : for `x ∈ K`, we have `Π_w ‖x‖_w = |norm(x)|` where
`‖·‖_w` is the normalized absolute value for `w`.  -/
theorem prod_eq_abs_norm (x : K) :
    ∏ w : InfinitePlace K, w x ^ mult w = abs (Algebra.norm ℚ x)

{K : Type u_2}
[Field K]
[NumberField K]
(x : K)

∏ w : NumberField.InfinitePlace K, w x ^ w.mult = ↑|(Algebra.norm ℚ) x|


@[to_additive (attr := simp)]
theorem dist_self_mul_right (a b : E) : dist a (a * b) = ‖b‖

{E : Type u_3}
[SeminormedAddCommGroup E]
(a b : E)


@[to_additive]
theorem le_iff {c d : Con M} : c ≤ d ↔ (c : Submonoid (M × M)) ≤ d

{M : Type u_1}
[MulOneClass M]
{c d : Con M}

c ≤ d ↔ ↑c ≤ ↑d


/-- A bicategory is called `Strict` if the left unitors, the right unitors, and the associators are
isomorphisms given by equalities.
-/
class Bicategory.Strict : Prop where
  /-- Identity morphisms are left identities for composition. -/
  id_comp : ∀ {a b : B} (f : a ⟶ b), 𝟙 a ≫ f = f := by aesop_cat
  /-- Identity morphisms are right identities for composition. -/
  comp_id : ∀ {a b : B} (f : a ⟶ b), f ≫ 𝟙 b = f := by aesop_cat
  /-- Composition in a bicategory is associative. -/
  assoc : ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), (f ≫ g) ≫ h = f ≫ g ≫ h := by
    aesop_cat
  /-- The left unitors are given by equalities -/
  leftUnitor_eqToIso : ∀ {a b : B} (f : a ⟶ b), λ_ f = eqToIso (id_comp f) := by aesop_cat
  /-- The right unitors are given by equalities -/
  rightUnitor_eqToIso : ∀ {a b : B} (f : a ⟶ b), ρ_ f = eqToIso (comp_id f) := by aesop_cat
  /-- The associators are given by equalities -/
  associator_eqToIso :
    ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d), α_ f g h = eqToIso (assoc f g h) := by
    aesop_cat

[self : CategoryTheory.Bicategory.Strict B]

CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.id b) = f


@[simp, norm_cast]
theorem coe_comap (S : NonUnitalStarSubalgebra R B) (f : F) : comap f S = f ⁻¹' (S : Set B)

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[Module R B]
[Star B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
[NonUnitalStarAlgHomClass F R A B]
(S : NonUnitalStarSubalgebra R B)
(f : F)

↑(NonUnitalStarSubalgebra.comap f S) = ⇑f ⁻¹' ↑S


protected theorem isOpen (U : Opens α) : IsOpen (U : Set α)

{α : Type u_2}
[TopologicalSpace α]
(U : TopologicalSpace.Opens α)


theorem find_of_valid (p s) : find s p = ⟨utf8Len (s.1.takeWhile (!p ·))⟩

s.find p = { byteIdx := String.utf8Len (List.takeWhile (fun x => !p x) s.data) }


theorem isRadical_iff_pow_one_lt (k : ℕ) (hk : 1 < k) : I.IsRadical ↔ ∀ r, r ^ k ∈ I → r ∈ I

{R : Type u}
[CommSemiring R]
{I : Ideal R}
(k : ℕ)
(hk : 1 < k)

I.IsRadical ↔ ∀ (r : R), r ^ k ∈ I → r ∈ I


/-- The tensor product expressed as a functor. -/
@[simps]
def tensor : C × C ⥤ C

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

(CategoryTheory.MonoidalCategory.tensor C).obj X = CategoryTheory.MonoidalCategory.tensorObj X.1 X.2


theorem eq_zero_or_pos : ∀ a : Ordinal, a = 0 ∨ 0 < a


@[simp]
theorem sigma_union : s.sigma (fun i ↦ t₁ i ∪ t₂ i) = s.sigma t₁ ∪ s.sigma t₂

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t₁ t₂ : (i : ι) → Set (α i)}

(s.sigma fun i => t₁ i ∪ t₂ i) = s.sigma t₁ ∪ s.sigma t₂


lemma isIso_ranCounit_app_of_isDenseSubsite (Y : Sheaf J A) (U X) :
    IsIso ((yoneda.map ((G.op.ranCounit.app Y.val).app (op U))).app (op X))

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

[∀ (X : Dᵒᵖ), CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.StructuredArrow X G.op) A]

[CategoryTheory.Functor.IsDenseSubsite J K G]

CategoryTheory.IsIso ((CategoryTheory.yoneda.map ((G.op.ranCounit.app Y.val).app (Opposite.op U))).app (Opposite.op X))


@[simp, nolint simpNF] protected lemma add_eq_left : a + b = a ↔ b = 0


@[simp]
theorem toQuaternion_comp_ofQuaternion :
    toQuaternion.comp ofQuaternion = AlgHom.id R ℍ[R,c₁,c₂]

CliffordAlgebraQuaternion.toQuaternion.comp CliffordAlgebraQuaternion.ofQuaternion =
  AlgHom.id R (QuaternionAlgebra R c₁ c₂)


theorem valuation_map_add {x y : ℚ_[p]} (hxy : x + y ≠ 0) :
    min (valuation x) (valuation y) ≤ valuation (x + y : ℚ_[p])

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{x y : ℚ_[p]}
(hxy : x + y ≠ 0)

min x.valuation y.valuation ≤ (x + y).valuation


theorem invFunOn_eq (h : ∃ a ∈ s, f a = b) : f (invFunOn f s b) = b

{α : Type u_1}
{β : Type u_2}
[Nonempty α]
{s : Set α}
{f : α → β}
{b : β}
(h : ∃ a ∈ s, f a = b)


@[simp]
lemma preNormEDS'_zero : preNormEDS' b c d 0 = 0


/-- `ContinuousMap.Homotopy f₀ f₁` is the type of homotopies from `f₀` to `f₁`.

When possible, instead of parametrizing results over `(f : Homotopy f₀ f₁)`,
you should parametrize over `{F : Type*} [HomotopyLike F f₀ f₁] (f : F)`.

When you extend this structure, make sure to extend `ContinuousMap.HomotopyLike`. -/
structure Homotopy (f₀ f₁ : C(X, Y)) extends C(I × X, Y) where
  /-- value of the homotopy at 0 -/
  map_zero_left : ∀ x, toFun (0, x) = f₀ x
  /-- value of the homotopy at 1 -/
  map_one_left : ∀ x, toFun (1, x) = f₁ x

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
(self : f₀.Homotopy f₁)
(x : X)


@[simp]
theorem curryLeft_add {n : ℕ} (f g : M'' [⋀^Fin n.succ]→ₗ[R'] N'') :
    curryLeft (f + g) = curryLeft f + curryLeft g

{R' : Type u_10}
{M'' : Type u_11}
{N'' : Type u_13}
[CommSemiring R']
[AddCommMonoid M'']
[AddCommMonoid N'']
[Module R' M'']
[Module R' N'']
{n : ℕ}
(f g : M'' [⋀^Fin n.succ]→ₗ[R'] N'')

(f + g).curryLeft = f.curryLeft + g.curryLeft


@[simp]
theorem coe_add (v w : VectorMeasure α M) : ⇑(v + w) = v + w

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
[ContinuousAdd M]
(v w : MeasureTheory.VectorMeasure α M)


theorem trNormal_run {k : K} (s : StAct₂ k) (q : Stmt₂) :
    trNormal (stRun s q) = goto fun _ _ ↦ go k s q

{K : Type u_1}
{Γ : K → Type u_2}
{Λ : Type u_3}
{σ : Type u_4}
{k : K}
(s : Turing.TM2to1.StAct k)
(q : Turing.TM2.Stmt Γ Λ σ)

Turing.TM2to1.trNormal (Turing.TM2to1.stRun s q) = Turing.TM1.Stmt.goto fun x x => Turing.TM2to1.Λ'.go k s q


theorem sigmaCongrRight_symm {α} {β₁ β₂ : α → Type*} (F : ∀ a, β₁ a ≃ β₂ a) :
    (sigmaCongrRight F).symm = sigmaCongrRight fun a => (F a).symm

{α : Type u_3}
{β₁ : α → Type u_1}
{β₂ : α → Type u_2}
(F : (a : α) → β₁ a ≃ β₂ a)

(Equiv.sigmaCongrRight F).symm = Equiv.sigmaCongrRight fun a => (F a).symm


lemma unop_distinguished (T : Triangle Cᵒᵖ) (hT : T ∈ distTriang Cᵒᵖ) :
    ((triangleOpEquivalence C).inverse.obj T).unop ∈ distTriang C

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

(T : CategoryTheory.Pretriangulated.Triangle Cᵒᵖ)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

Opposite.unop ((CategoryTheory.Pretriangulated.triangleOpEquivalence C).inverse.obj T) ∈
  CategoryTheory.Pretriangulated.distinguishedTriangles


@[simp]
theorem subset_sSup_def [Inhabited s] :
    @sSup s _ = fun t =>
      if ht : t.Nonempty ∧ BddAbove t ∧ sSup ((↑) '' t : Set α) ∈ s
      then ⟨sSup ((↑) '' t : Set α), ht.2.2⟩
      else default

{α : Type u_2}
(s : Set α)
[Preorder α]
[SupSet α]
[Inhabited ↑s]

sSup = fun t =>
  if ht : t.Nonempty ∧ BddAbove t ∧ sSup (Subtype.val '' t) ∈ s then ⟨sSup (Subtype.val '' t), ⋯⟩ else default


@[to_additive]
lemma tprod_of_nat_of_neg [T2Space G] {f : ℤ → G}
    (hf₁ : Multipliable fun n : ℕ ↦ f n) (hf₂ : Multipliable fun n : ℕ ↦ f (-n)) :
    ∏' n : ℤ, f n = (∏' n : ℕ, f n) * (∏' n : ℕ, f (-n)) / f 0

{G : Type u_2}
[AddCommGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
[T2Space G]
{f : ℤ → G}
(hf₁ : Summable fun n => f ↑n)
(hf₂ : Summable fun n => f (-↑n))


@[to_additive sum_le_sum_of_ne_zero]
theorem prod_le_prod_of_ne_one' (h : ∀ x ∈ s, f x ≠ 1 → x ∈ t) :
    ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x

{ι : Type u_1}
{M : Type u_4}
[CanonicallyOrderedAddCommMonoid M]
{f : ι → M}
{s t : Finset ι}
(h : ∀ x ∈ s, f x ≠ 0 → x ∈ t)


theorem degree_X_pow_sub_C {n : ℕ} (hn : 0 < n) (a : R) : degree ((X : R[X]) ^ n - C a) = n

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

(Polynomial.X ^ n - Polynomial.C a).degree = ↑n


@[simp] lemma mk_lt_mk (hs_sup hs_inf ht_sup ht_inf) :
    mk s hs_sup hs_inf < mk t ht_sup ht_inf ↔ s ⊂ t

{α : Type u_2}
[Lattice α]
{s t : Set α}
(hs_sup : SupClosed s)
(hs_inf : InfClosed s)
(ht_sup : SupClosed t)
(ht_inf : InfClosed t)

{ carrier := s, supClosed' := hs_sup, infClosed' := hs_inf } <
    { carrier := t, supClosed' := ht_sup, infClosed' := ht_inf } ↔
  s ⊂ t


/-- The element `0` is `M`-regular when `M` is trivial. -/
theorem zero [sM : Subsingleton M] : IsSMulRegular M (0 : R)

{R : Type u_1}
{M : Type u_3}
[MonoidWithZero R]
[Zero M]
[MulActionWithZero R M]
[sM : Subsingleton M]


/-- The canonical continuous multilinear map from `E = Πᵢ Eᵢ` to `⨂[𝕜] i, Eᵢ`.
-/
@[simps!]
noncomputable def tprodL : ContinuousMultilinearMap 𝕜 E (⨂[𝕜] i, E i)

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

∀ (a : (i : ι) → E i), (PiTensorProduct.tprodL 𝕜) a = (PiTensorProduct.tprod 𝕜) a


@[to_additive]
theorem Homeomorph.mulLeft_symm (a : G) : (Homeomorph.mulLeft a).symm = Homeomorph.mulLeft a⁻¹

{G : Type w}
[TopologicalSpace G]
[Group G]
[ContinuousMul G]
(a : G)


protected theorem sub_pos_of_lt {a b : Int} (h : b < a) : 0 < a - b


theorem derivedSeries_of_bot_eq_bot (k : ℕ) : derivedSeriesOfIdeal R L k ⊥ = ⊥

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(k : ℕ)

LieAlgebra.derivedSeriesOfIdeal R L k ⊥ = ⊥


/-- A module with a nonzero vector `v` has dimension 1 iff every vector is a multiple of `v`.
-/
theorem finrank_eq_one_iff_of_nonzero' (v : V) (nz : v ≠ 0) :
    finrank K V = 1 ↔ ∀ w : V, ∃ c : K, c • v = w

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(v : V)
(nz : v ≠ 0)

FiniteDimensional.finrank K V = 1 ↔ ∀ (w : V), ∃ c, c • v = w


theorem ext_iff : (∀ i j, M i j = N i j) ↔ M = N

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{M N : Matrix m n α}

(∀ (i : m) (j : n), M i j = N i j) ↔ M = N


@[to_additive]
theorem image_pow_subset (n : ℕ) (hm : 0 < m) :
    (fun (y : A) => y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (m * δ)

{A : Type u_1}
[SeminormedAddCommGroup A]
{m : ℕ}
(δ : ℝ)
(n : ℕ)
(hm : 0 < m)

(fun y => m • y) '' approxAddOrderOf A (n * m) δ ⊆ approxAddOrderOf A n (↑m * δ)


theorem rel_filter {p : α → Bool} {q : β → Bool}
    (hpq : (R ⇒ (· ↔ ·)) (fun x => p x) (fun x => q x)) :
    (Forall₂ R ⇒ Forall₂ R) (filter p) (filter q)

(hpq : (R ⇒ fun x x_1 => x ↔ x_1) (fun x => p x = true) fun x => q x = true)

(List.Forall₂ R ⇒ List.Forall₂ R) (List.filter p) (List.filter q)


theorem Valid'.eraseMin_aux {s l} {x : α} {r o₁ o₂} (H : Valid' o₁ (.node s l x r) o₂) :
    Valid' ↑(findMin' l x) (@eraseMin α (.node' l x r)) o₂ ∧
      size (.node' l x r) = size (eraseMin (.node' l x r)) + 1

(H : Ordnode.Valid' o₁ (Ordnode.node s l x r) o₂)

Ordnode.Valid' (↑(l.findMin' x)) (l.node' x r).eraseMin o₂ ∧ (l.node' x r).size = (l.node' x r).eraseMin.size + 1


/-- (Impl) Construct the lifted cocone in `Algebra T` which will be colimiting. -/
@[simps]
def liftedCocone : Cocone D

{D : CategoryTheory.Functor J T.Algebra}

(c : CategoryTheory.Limits.Cocone (D.comp T.forget))

[CategoryTheory.Limits.PreservesColimit (D.comp T.forget) T.toFunctor]

[CategoryTheory.Limits.PreservesColimit ((D.comp T.forget).comp T.toFunctor) T.toFunctor]

(CategoryTheory.Monad.ForgetCreatesColimits.liftedCocone c t).pt =
  CategoryTheory.Monad.ForgetCreatesColimits.coconePoint c t


@[to_additive]
theorem closedBall_one_mul_singleton : closedBall 1 δ * {x} = closedBall x δ

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(x : E)

Metric.closedBall 0 δ + {x} = Metric.closedBall x δ


@[fun_prop]
theorem differentiableOn_snd {s : Set (E × F)} : DifferentiableOn 𝕜 Prod.snd s

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


theorem lifts_iff_coeff_lifts (p : S[X]) : p ∈ lifts f ↔ ∀ n : ℕ, p.coeff n ∈ Set.range f

{R : Type u}
[Semiring R]
{S : Type v}
[Semiring S]
{f : R →+* S}
(p : S[X])

p ∈ Polynomial.lifts f ↔ ∀ (n : ℕ), p.coeff n ∈ Set.range ⇑f


theorem closedBall_finset_sup (p : ι → Seminorm 𝕜 E) (s : Finset ι) (x : E) {r : ℝ} (hr : 0 ≤ r) :
    closedBall (s.sup p) x r = s.inf fun i => closedBall (p i) x r

{𝕜 : Type u_3}
{E : Type u_7}
{ι : Type u_12}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : ι → Seminorm 𝕜 E)
(s : Finset ι)
(x : E)
{r : ℝ}
(hr : 0 ≤ r)

(s.sup p).closedBall x r = s.inf fun i => (p i).closedBall x r


theorem insert_diff_self_of_not_mem {a : α} {s : Set α} (h : a ∉ s) : insert a s \ {a} = s

{α : Type u}
{a : α}
{s : Set α}
(h : a ∉ s)


@[simp] theorem ofInt_den : (ofInt n : Rat).den = 1


theorem gaugeRescale_self_apply {s : Set E} (hsa : Absorbent ℝ s) (hsb : IsVonNBounded ℝ s)
    (x : E) : gaugeRescale s s x = x

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[T1Space E]
{s : Set E}
(hsa : Absorbent ℝ s)
(hsb : Bornology.IsVonNBounded ℝ s)
(x : E)


@[simp]
theorem sup_iterate_eq_nfp (f : Ordinal.{u} → Ordinal.{u}) :
    (fun a => sup fun n : ℕ => f^[n] a) = nfp f

(fun a => Ordinal.sup fun n => f^[n] a) = Ordinal.nfp f


@[simp]
theorem liftIsometry_symm_apply (l : (⨂[𝕜] i, E i) →L[𝕜] F) :
    (liftIsometry 𝕜 E F).symm l = l.compContinuousMultilinearMap (tprodL 𝕜)

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

(PiTensorProduct.liftIsometry 𝕜 E F).symm l = l.compContinuousMultilinearMap (PiTensorProduct.tprodL 𝕜)


@[simp]
theorem roots_C_mul (p : R[X]) (ha : a ≠ 0) : (C a * p).roots = p.roots

{R : Type u}
{a : R}
[CommRing R]
[IsDomain R]
(p : Polynomial R)
(ha : a ≠ 0)


theorem trans {q' : Set α → Prop} (H : InnerRegularWRT μ p q) (H' : InnerRegularWRT μ q q') :
    InnerRegularWRT μ p q'

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p q q' : Set α → Prop}
(H : μ.InnerRegularWRT p q)
(H' : μ.InnerRegularWRT q q')


@[simp] theorem length_mapVal : (mapVal f l).length = l.length

∀ {α : Type u_1} {β : Type u_2} {β_1 : Type u_3} {f : α → β → β_1} {l : Batteries.AssocList α β},
  (Batteries.AssocList.mapVal f l).length = l.length


theorem toGroup.unique (g : PresentedGroup rels →* G)
    (hg : ∀ x : α, g (PresentedGroup.of x) = f x) : ∀ {x}, g x = toGroup h x

(h : ∀ r ∈ rels, (FreeGroup.lift f) r = 1)

(hg : ∀ (x : α), g (PresentedGroup.of x) = f x)


/-- The image of a 1-pre-hypercover by a functor. -/
@[simps]
def map : PreOneHypercover (F.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{X : C}
(E : CategoryTheory.PreOneHypercover X)
(F : CategoryTheory.Functor C D)

∀ (x x_1 : E.I₀) (j : E.I₁ x x_1), (E.map F).Y j = F.obj (E.Y j)


theorem _root_.AddAction.orbitZMultiplesEquiv_symm_apply' {α β : Type*} [AddGroup α] (a : α)
    [AddAction α β] (b : β) (k : ℤ) :
    (AddAction.orbitZMultiplesEquiv a b).symm k =
      k • (⟨a, mem_zmultiples a⟩ : zmultiples a) +ᵥ ⟨b, AddAction.mem_orbit_self b⟩

{α : Type u_5}
{β : Type u_6}
[AddGroup α]
(a : α)
[AddAction α β]
(b : β)
(k : ℤ)

(AddAction.orbitZMultiplesEquiv a b).symm ↑k = k • ⟨a, ⋯⟩ +ᵥ ⟨b, ⋯⟩


/-- An exponential lower bound on the central binomial coefficient.
This bound is weaker than `Nat.four_pow_lt_mul_centralBinom`, but it is of historical interest
because it appears in Erdős's proof of Bertrand's postulate.
-/
theorem four_pow_le_two_mul_self_mul_centralBinom :
    ∀ (n : ℕ) (_ : 0 < n), 4 ^ n ≤ 2 * n * centralBinom n


@[to_additive]
theorem isOpen_of_mem_nhds [ContinuousMul G] (H : Subgroup G) {g : G} (hg : (H : Set G) ∈ 𝓝 g) :
    IsOpen (H : Set G)

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
[ContinuousAdd G]
(H : AddSubgroup G)
{g : G}
(hg : ↑H ∈ 𝓝 g)


@[simp]
theorem irrational_sub_nat_iff : Irrational (x - n) ↔ Irrational x


/-- A functor `G : C ⥤ D` sends cones over `F` to cones over `F ⋙ G` functorially. -/
@[simps]
def functoriality : Cone F ⥤ Cone (F ⋙ G)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(F : J ⥤ C)
(G : C ⥤ D)
(A : CategoryTheory.Limits.Cone F)

((CategoryTheory.Limits.Cones.functoriality F G).obj A).pt = G.obj A.pt


theorem sq_eq_normSq : a ^ 2 = normSq a ↔ a = a.re

{R : Type u_1}
[LinearOrderedCommRing R]
{a : ℍ[R]}

a ^ 2 = ↑(Quaternion.normSq a) ↔ a = ↑a.re


@[to_additive (attr := simp)]
theorem toLex_one [One α] : toLex (1 : α) = 1


/-- Let `S` be an `R`-algebra, `M` a submonoid of `S`, `S' = M⁻¹S`.
Suppose the image of some `x : S` falls in the adjoin of some finite `s ⊆ S'` over `R`,
and `A` is an `R`-subalgebra of `S` containing both `M` and the numerators of `s`.
Then, there exists some `m : M` such that `m • x` falls in `A`.
-/
theorem IsLocalization.exists_smul_mem_of_mem_adjoin [Algebra R S] [Algebra R S']
    [IsScalarTower R S S'] (M : Submonoid S) [IsLocalization M S'] (x : S) (s : Finset S')
    (A : Subalgebra R S) (hA₁ : (IsLocalization.finsetIntegerMultiple M s : Set S) ⊆ A)
    (hA₂ : M ≤ A.toSubmonoid) (hx : algebraMap S S' x ∈ Algebra.adjoin R (s : Set S')) :
    ∃ m : M, m • x ∈ A

(hA₁ : ↑(IsLocalization.finsetIntegerMultiple M s) ⊆ ↑A)

(hx : (algebraMap S S') x ∈ Algebra.adjoin R ↑s)


/-- The left inverse unitor `C ⥤ 1 × C` -/
@[simps]
def leftInverseUnitor : C ⥤ Discrete (PUnit : Type w) × C

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

(CategoryTheory.prod.leftInverseUnitor C).obj X = ({ as := PUnit.unit }, X)


theorem continuousOn_to_generateFrom_iff {s : Set α} {T : Set (Set β)} {f : α → β} :
    @ContinuousOn α β _ (.generateFrom T) f s ↔ ∀ x ∈ s, ∀ t ∈ T, f x ∈ t → f ⁻¹' t ∈ 𝓝[s] x

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

ContinuousOn f s ↔ ∀ x ∈ s, ∀ t ∈ T, f x ∈ t → f ⁻¹' t ∈ 𝓝[s] x


/-- An unbundled version of `repr_eq_iff` -/
theorem repr_apply_eq (f : M → ι → R) (hadd : ∀ x y, f (x + y) = f x + f y)
    (hsmul : ∀ (c : R) (x : M), f (c • x) = c • f x) (f_eq : ∀ i, f (b i) = Finsupp.single i 1)
    (x : M) (i : ι) : b.repr x i = f x i

(hadd : ∀ (x y : M), f (x + y) = f x + f y)

(f_eq : ∀ (i : ι), f (b i) = ⇑(Finsupp.single i 1))


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

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


@[continuity]
theorem Continuous.matrix_trace [Fintype n] [AddCommMonoid R] [ContinuousAdd R]
    {A : X → Matrix n n R} (hA : Continuous A) : Continuous fun x => trace (A x)

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Fintype n]
[AddCommMonoid R]
[ContinuousAdd R]
{A : X → Matrix n n R}
(hA : Continuous A)


@[simp]
theorem coe_toBialgHom : ⇑(e : A →ₐc[R] B) = e

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(e : A ≃ₐc[R] B)


@[simp]
theorem iUnion_split (I : Box ι) (i : ι) (x : ℝ) : (split I i x).iUnion = I

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

(BoxIntegral.Prepartition.split I i x).iUnion = ↑I


/-- **Minkowski inequality**: the `L_p` seminorm of the sum of two vectors is less than or equal
to the sum of the `L_p`-seminorms of the summands. A version for `ℝ≥0∞` valued nonnegative
functions. -/
theorem Lp_add_le (hp : 1 ≤ p) :
    (∑ i ∈ s, (f i + g i) ^ p) ^ (1 / p) ≤
      (∑ i ∈ s, f i ^ p) ^ (1 / p) + (∑ i ∈ s, g i ^ p) ^ (1 / p)

{ι : Type u}
(s : Finset ι)
(f g : ι → ℝ≥0∞)
{p : ℝ}
(hp : 1 ≤ p)


theorem LinearMap.finrank_range_le [Module.Finite R M] (f : M →ₗ[R] M') :
    finrank R (LinearMap.range f) ≤ finrank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
{M' : Type u_1}
[AddCommGroup M']
[Module R M']
[Module.Finite R M]
(f : M →ₗ[R] M')

FiniteDimensional.finrank R ↥(LinearMap.range f) ≤ FiniteDimensional.finrank R M


theorem iterate_succ' (n : ℕ) : f^[n.succ] = f ∘ f^[n]


@[simp]
theorem max_zero_add_max_neg_zero_eq_abs_self (a : α) : max a 0 + max (-a) 0 = |a|

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


@[to_additive]
theorem isMinimal_iff_closed_smul_invariant [ContinuousConstSMul M α] :
    IsMinimal M α ↔ ∀ s : Set α, IsClosed s → (∀ c : M, c • s ⊆ s) → s = ∅ ∨ s = univ

(M : Type u_1)
{α : Type u_3}
[AddMonoid M]
[TopologicalSpace α]
[AddAction M α]
[ContinuousConstVAdd M α]

AddAction.IsMinimal M α ↔ ∀ (s : Set α), IsClosed s → (∀ (c : M), c +ᵥ s ⊆ s) → s = ∅ ∨ s = Set.univ


theorem lcm_def : s.lcm f = (s.1.map f).lcm

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


/-- A `SubNegMonoid` is an `AddMonoid` with unary `-` and binary `-` operations
satisfying `sub_eq_add_neg : ∀ a b, a - b = a + -b`.

The default for `sub` is such that `a - b = a + -b` holds by definition.

Adding `sub` as a field rather than defining `a - b := a + -b` allows us to
avoid certain classes of unification failures, for example:
Let `foo X` be a type with a `∀ X, Sub (Foo X)` instance but no
`∀ X, Neg (Foo X)`. Suppose we also have an instance
`∀ X [Cromulent X], AddGroup (Foo X)`. Then the `(-)` coming from
`AddGroup.sub` cannot be definitionally equal to the `(-)` coming from
`Foo.Sub`.

In the same way, adding a `zsmul` field makes it possible to avoid definitional failures
in diamonds. See the definition of `AddMonoid` and Note [forgetful inheritance] for more
explanations on this.
-/
class SubNegMonoid (G : Type u) extends AddMonoid G, Neg G, Sub G where
  protected sub := SubNegMonoid.sub'
  protected sub_eq_add_neg : ∀ a b : G, a - b = a + -b := by intros; rfl
  /-- Multiplication by an integer.
  Set this to `zsmulRec` unless `Module` diamonds are possible. -/
  protected zsmul : ℤ → G → G
  protected zsmul_zero' : ∀ a : G, zsmul 0 a = 0 := by intros; rfl
  protected zsmul_succ' (n : ℕ) (a : G) :
      zsmul (Int.ofNat n.succ) a = zsmul (Int.ofNat n) a + a := by
    intros; rfl
  protected zsmul_neg' (n : ℕ) (a : G) : zsmul (Int.negSucc n) a = -zsmul n.succ a := by
    intros; rfl

{G : Type u}
[self : SubNegMonoid G]
(a : G)


theorem iterate_left {g : ℕ → α → α} (H : ∀ n, Semiconj f (g n) (g <| n + 1)) (n k : ℕ) :
    Semiconj f^[n] (g k) (g <| n + k)

{g : ℕ → α → α}

(H : ∀ (n : ℕ), Function.Semiconj f (g n) (g (n + 1)))

Function.Semiconj f^[n] (g k) (g (n + k))


@[simp]
theorem nonempty_ordConnectedComponent : (ordConnectedComponent s x).Nonempty ↔ x ∈ s

{α : Type u_1}
[LinearOrder α]
{s : Set α}
{x : α}

(s.ordConnectedComponent x).Nonempty ↔ x ∈ s


@[simp]
theorem coe_foldl (f : β → α → β) (H : RightCommutative f) (b : β) (l : List α) :
    foldl f H b l = l.foldl f b

{α : Type u_1}
{β : Type v}
(f : β → α → β)
(H : RightCommutative f)
(b : β)
(l : List α)

Multiset.foldl f H b ↑l = List.foldl f b l