theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries 𝕜 E F) {r : ℝ≥0} (h : ↑r < p.radius) :
    Summable fun n : ℕ => ‖p n‖₊ * r ^ n

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : FormalMultilinearSeries 𝕜 E F)
{r : ℝ≥0}
(h : ↑r < p.radius)


theorem nonpos_of_mul_nonneg_left [PosMulStrictMono α]
    (h : 0 ≤ a * b) (hb : b < 0) : a ≤ 0

{α : Type u}
[Semiring α]
[LinearOrder α]
{a b : α}
[PosMulStrictMono α]
(h : 0 ≤ a * b)
(hb : b < 0)


theorem mem_zeroRootSubalgebra (x : L) :
    x ∈ zeroRootSubalgebra R L H ↔ ∀ y : H, ∃ k : ℕ, (toEnd R H L y ^ k) x = 0

(R : Type u_1)
(L : Type u_2)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
[LieAlgebra.IsNilpotent R ↥H]
(x : L)

x ∈ LieAlgebra.zeroRootSubalgebra R L H ↔ ∀ (y : ↥H), ∃ k, ((LieModule.toEnd R (↥H) L) y ^ k) x = 0


lemma continuous_iff_continuous_dist [TopologicalSpace β] {f : β → α} :
    Continuous f ↔ Continuous fun x : β × β => dist (f x.1) (f x.2)

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

Continuous f ↔ Continuous fun x => dist (f x.1) (f x.2)


/-- `WittVector.frobenius` as an equiv. -/
@[simps (config := .asFn)]
def frobeniusEquiv [PerfectRing R p] : WittVector p R ≃+* WittVector p R

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

⇑(WittVector.frobeniusEquiv p R) = ⇑WittVector.frobenius


theorem isNat_dvd_false : {a b : ℕ} → {a' b' c : ℕ} →
    IsNat a a' → IsNat b b' → Nat.mod b' a' = Nat.succ c → ¬a ∣ b

Mathlib.Meta.NormNum.IsNat a a' → Mathlib.Meta.NormNum.IsNat b b' → b'.mod a' = c.succ → ¬a ∣ b


@[simp]
theorem toEquiv_refl : (refl k P₁).toEquiv = Equiv.refl P₁

{k : Type u_1}
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AddTorsor V₁ P₁]
[TopologicalSpace P₁]

(↑(ContinuousAffineEquiv.refl k P₁)).toEquiv = Equiv.refl P₁


@[simp]
theorem coe_toSubmonoid : (s.toSubmonoid : Set K) = s

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


@[simp]
theorem lowerClosure_prod (s : Set α) (t : Set β) :
    lowerClosure (s ×ˢ t) = lowerClosure s ×ˢ lowerClosure t

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(s : Set α)
(t : Set β)


@[reassoc (attr := simp)]
theorem biproductComparison_π (j : J) :
    biproductComparison F f ≫ biproduct.π _ j = F.map (biproduct.π f j)

[CategoryTheory.Limits.HasBiproduct (F.obj ∘ f)]

F.biproductComparison f ≫ CategoryTheory.Limits.biproduct.π (F.obj ∘ f) j =
  F.map (CategoryTheory.Limits.biproduct.π f j)


protected theorem comp (hg : IsLocalHomeomorphOn g t) (hf : IsLocalHomeomorphOn f s)
    (h : Set.MapsTo f s t) : IsLocalHomeomorphOn (g ∘ f) s

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{g : Y → Z}
{f : X → Y}
{s : Set X}
{t : Set Y}
(hg : IsLocalHomeomorphOn g t)
(hf : IsLocalHomeomorphOn f s)
(h : Set.MapsTo f s t)


@[simp]
theorem coe_map (S : NonUnitalStarSubalgebra R A) (f : F) : map f S = f '' S

{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 A)
(f : F)

↑(NonUnitalStarSubalgebra.map f S) = ⇑f '' ↑S


theorem union_ae_eq_right : (s ∪ t : Set α) =ᵐ[μ] t ↔ μ (s \ t) = 0

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


lemma cfcₙ_const_mul_id (r : R) (a : A) (ha : p a := by cfc_tac) : cfcₙ (r * ·) a = r • a


lemma isSemisimple_iff :
    f.IsSemisimple ↔ ∀ p : Submodule R M, p ≤ p.comap f → ∃ q, q ≤ q.comap f ∧ IsCompl p q

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}

f.IsSemisimple ↔ ∀ p ≤ Submodule.comap f p, ∃ q ≤ Submodule.comap f q, IsCompl p q


theorem map {M N : Type*} [Monoid M] [Monoid N] {F : Type*} [FunLike F M N] [MonoidHomClass F M N]
    (f : F) {x y : M} (ha : Associated x y) : Associated (f x) (f y)

{M : Type u_5}
{N : Type u_6}
[Monoid M]
[Monoid N]
{F : Type u_7}
[FunLike F M N]
[MonoidHomClass F M N]
(f : F)
{x y : M}
(ha : x ~ᵤ y)


@[simp]
theorem mk_zero_smul {i} (a : A 0) (b : A i) : mk _ (a • b) = mk _ a * mk _ b

{ι : Type u_1}
{A : ι → Type u_2}
[AddZeroClass ι]
[GradedMonoid.GMul A]
{i : ι}
(a : A 0)
(b : A i)

GradedMonoid.mk i (a • b) = GradedMonoid.mk 0 a * GradedMonoid.mk i b


lemma cfc_eq_cfc_iff_eqOn : cfc f a = cfc g a ↔ (spectrum R a).EqOn f g

(hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac)

(hg : ContinuousOn g (spectrum R a) := by cfc_cont_tac)

cfc f a = cfc g a ↔ Set.EqOn f g (spectrum R a)


@[to_additive]
theorem IsCompact.closedBall_one_mul (hs : IsCompact s) (hδ : 0 ≤ δ) :
    closedBall 1 δ * s = cthickening δ s

{E : Type u_1}
[SeminormedCommGroup E]
{δ : ℝ}
{s : Set E}
(hs : IsCompact s)
(hδ : 0 ≤ δ)

Metric.closedBall 1 δ * s = Metric.cthickening δ s


{α : Type u}
[PartialOrder α]
[OrderTop α]
{a : α}
(h : ⊤ ≤ a)


@[simp]
lemma snd_zero : snd (0 : Kernel α (β × γ)) = 0

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


/-- The preimage of the normalizer is contained in the normalizer of the preimage. -/
@[to_additive "The preimage of the normalizer is contained in the normalizer of the preimage."]
theorem le_normalizer_comap (f : N →* G) :
    H.normalizer.comap f ≤ (H.comap f).normalizer

{G : Type u_1}
[AddGroup G]
{H : AddSubgroup G}
{N : Type u_5}
[AddGroup N]
(f : N →+ G)

AddSubgroup.comap f H.normalizer ≤ (AddSubgroup.comap f H).normalizer


@[simp]
theorem deriv_sinh (hc : DifferentiableAt ℝ f x) :
    deriv (fun x => Real.sinh (f x)) x = Real.cosh (f x) * deriv f x

{f : ℝ → ℝ}
{x : ℝ}
(hc : DifferentiableAt ℝ f x)


/-- Also see `Ideal.isIdempotentElem_iff_eq_bot_or_top` for integral domains. -/
theorem Ideal.isIdempotentElem_iff_eq_bot_or_top_of_localRing {R} [CommRing R]
    [IsNoetherianRing R] [LocalRing R] (I : Ideal R) :
    IsIdempotentElem I ↔ I = ⊥ ∨ I = ⊤

{R : Type u_1}
[CommRing R]
[IsNoetherianRing R]
[LocalRing R]
(I : Ideal R)


/-- Map `WithTerminal` with respect to a functor `F : C ⥤ D`. -/
@[simps]
def map {D : Type*} [Category D] (F : C ⥤ D) : WithTerminal C ⥤ WithTerminal D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u_1}
[CategoryTheory.Category.{u_2, u_1} D]
(F : CategoryTheory.Functor C D)
{X Y : CategoryTheory.WithTerminal C}
(f : X ⟶ Y)

(CategoryTheory.WithTerminal.map F).map f =
  match X, Y, f with
  | CategoryTheory.WithTerminal.of x, CategoryTheory.WithTerminal.of y, f => F.map (CategoryTheory.WithTerminal.down f)
  | CategoryTheory.WithTerminal.of a, CategoryTheory.WithTerminal.star, x => PUnit.unit
  | CategoryTheory.WithTerminal.star, CategoryTheory.WithTerminal.star, x => PUnit.unit


@[simp]
theorem extend_apply_coe (F : Homotopy f₀ f₁) (t : I) (x : X) : F.extend t x = F (t, x)

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


/-- If `f` is closable, then the closure is closed. -/
theorem IsClosable.closure_isClosed {f : E →ₗ.[R] F} (hf : f.IsClosable) : f.closure.IsClosed

{R : Type u_1}
{E : Type u_2}
{F : Type u_3}
[CommRing R]
[AddCommGroup E]
[AddCommGroup F]
[Module R E]
[Module R F]
[TopologicalSpace E]
[TopologicalSpace F]
[ContinuousAdd E]
[ContinuousAdd F]
[TopologicalSpace R]
[ContinuousSMul R E]
[ContinuousSMul R F]
{f : E →ₗ.[R] F}
(hf : f.IsClosable)


/-- The inverse of an atlas member is `C^n` for any `n`. -/
theorem contMDiffOn_symm_of_mem_maximalAtlas (h : e ∈ maximalAtlas I M) :
    ContMDiffOn I I n e.symm e.target

(h : e ∈ SmoothManifoldWithCorners.maximalAtlas I M)


@[simp] theorem UInt32.toUInt64_toNat (x : UInt32) : x.toUInt64.toNat = x.toNat


@[simp]
theorem Module.Ray.map_apply (e : M ≃ₗ[R] N) (v : M) (hv : v ≠ 0) :
    Module.Ray.map e (rayOfNeZero _ v hv) = rayOfNeZero _ (e v) (e.map_ne_zero_iff.2 hv)

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
(e : M ≃ₗ[R] N)
(v : M)
(hv : v ≠ 0)

(Module.Ray.map e) (rayOfNeZero R v hv) = rayOfNeZero R (e v) ⋯


@[simp] theorem inf_mk [SemilatticeInf α] (a b : α) : s(a, b).inf = a ⊓ b

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


@[simp 1100]
theorem norm_nat (n : ℕ) : ‖(n : ℂ)‖ = n


@[simp]
theorem coe_inf (I J : HomogeneousIdeal 𝒜) : (↑(I ⊓ J) : Set A) = ↑I ∩ ↑J

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
(I J : HomogeneousIdeal 𝒜)


/-- See also `Finset.prodMk_inf'_inf'`. -/
-- @[simp] -- TODO: Why does `Prod.map_apply` simplify the LHS?
lemma inf'_prodMap (hst : (s ×ˢ t).Nonempty) (f : ι → α) (g : κ → β) :
    inf' (s ×ˢ t) hst (Prod.map f g) = (inf' s hst.fst f, inf' t hst.snd g)

{ι : Type u_7}
{κ : Type u_8}
{α : Type u_9}
{β : Type u_10}
[SemilatticeInf α]
[SemilatticeInf β]
{s : Finset ι}
{t : Finset κ}
(hst : (s ×ˢ t).Nonempty)
(f : ι → α)
(g : κ → β)

(s ×ˢ t).inf' hst (Prod.map f g) = (s.inf' ⋯ f, t.inf' ⋯ g)


@[simp, norm_cast] lemma coe_one : ⇑(1 : Perm α) = id


@[fun_prop]
theorem continuousOn_cos {s : Set ℂ} : ContinuousOn cos s


/-- Deprecated. Use `WfDvdMonoid.max_power_factor` instead. -/
@[deprecated WfDvdMonoid.max_power_factor (since := "2024-03-01")]
theorem max_power_factor {a₀ x : R} (h : a₀ ≠ 0) (hx : Irreducible x) :
    ∃ n : ℕ, ∃ a : R, ¬x ∣ a ∧ a₀ = x ^ n * a

{R : Type u_2}
[CancelCommMonoidWithZero R]
[UniqueFactorizationMonoid R]
{a₀ x : R}
(h : a₀ ≠ 0)
(hx : Irreducible x)


theorem iInf_le_iInf₂ (κ : ι → Sort*) (f : ι → α) : ⨅ i, f i ≤ ⨅ (i) (_ : κ i), f i

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(κ : ι → Sort u_9)
(f : ι → α)


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

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


lemma toAffine_of_Z_ne_zero {P : Fin 3 → F} (hP : W.Nonsingular P) (hPz : P z ≠ 0) :
    toAffine W P = .some ((nonsingular_of_Z_ne_zero hPz).mp hP)

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hP : W.Nonsingular P)
(hPz : P z ≠ 0)

WeierstrassCurve.Jacobian.Point.toAffine W P = WeierstrassCurve.Affine.Point.some ⋯


theorem nndist_eq_nnnorm_vsub' (x y : P) : nndist x y = ‖y -ᵥ x‖₊

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


@[simp, norm_cast]
theorem coe_sInf {S : Set (Closeds α)} : (↑(sInf S) : Set α) = ⋂ i ∈ S, ↑i

{α : Type u_2}
[TopologicalSpace α]
{S : Set (TopologicalSpace.Closeds α)}


@[simp]
theorem mem_prod {s : LowerSet α} {t : LowerSet β} : x ∈ s ×ˢ t ↔ x.1 ∈ s ∧ x.2 ∈ t

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{x : α × β}
{s : LowerSet α}
{t : LowerSet β}


theorem tendsto_inv₀_cobounded : Tendsto Inv.inv (cobounded α) (𝓝 0)

Filter.Tendsto Inv.inv (Bornology.cobounded α) (𝓝 0)


/-- Lift two monoid equivalences `e : M ≃* N` and `e' : M' ≃* N'` to a monoid equivalence
`(M ∗ M') ≃* (N ∗ N')`. -/
@[to_additive (attr := simps! (config := .asFn)) "Lift two additive monoid
equivalences `e : M ≃+ N` and `e' : M' ≃+ N'` to an additive monoid equivalence
`(AddMonoid.Coprod M M') ≃+ (AddMonoid.Coprod N N')`."]
def coprodCongr (e : M ≃* N) (e' : M' ≃* N') : (M ∗ M') ≃* (N ∗ N')

{M : Type u_1}
{N : Type u_2}
{M' : Type u_3}
{N' : Type u_4}
[MulOneClass M]
[MulOneClass N]
[MulOneClass M']
[MulOneClass N']
(e : M ≃* N)
(e' : M' ≃* N')

⇑(Monoid.MulEquiv.coprodCongr e e') = ⇑(Monoid.Coprod.map ↑e ↑e')


/-- The converse of this lemma is `MeasureTheory.submartingale_of_setIntegral_le`. -/
theorem setIntegral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ)
    {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : MeasurableSet[ℱ i] s) :
    ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f j ω ∂μ

{f : ι → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

∫ (ω : Ω) in s, f i ω ∂μ ≤ ∫ (ω : Ω) in s, f j ω ∂μ


theorem associated_pow_irreducible {x : R} (hx : x ≠ 0) {ϖ : R} (hirr : Irreducible ϖ) :
    ∃ n : ℕ, Associated x (ϖ ^ n)

{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]
{x : R}
(hx : x ≠ 0)
{ϖ : R}
(hirr : Irreducible ϖ)


theorem monomial_dvd_monomial {r s : R} {i j : σ →₀ ℕ} :
    monomial i r ∣ monomial j s ↔ (s = 0 ∨ i ≤ j) ∧ r ∣ s

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
{r s : R}
{i j : σ →₀ ℕ}

(MvPolynomial.monomial i) r ∣ (MvPolynomial.monomial j) s ↔ (s = 0 ∨ i ≤ j) ∧ r ∣ s


@[to_additive (attr := simp)] theorem swap_comp_inl : (swap M N).comp inl = inr

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

(AddMonoid.Coprod.swap M N).comp AddMonoid.Coprod.inl = AddMonoid.Coprod.inr


@[simp, norm_cast]
theorem coe_intCast (z : ℤ) : ⇑(z : CentroidHom α) = z • (CentroidHom.id α)

{α : Type u_5}
[NonUnitalNonAssocRing α]
(z : ℤ)


theorem offDiag_insert (has : a ∉ s) : (insert a s).offDiag = s.offDiag ∪ {a} ×ˢ s ∪ s ×ˢ {a}

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(a : α)
(has : a ∉ s)


@[reassoc]
theorem curry_natural_left (f : X ⟶ X') (g : A ⊗ X' ⟶ Y) : curry (_ ◁ f ≫ g) = f ≫ curry g

(g : CategoryTheory.MonoidalCategory.tensorObj A X' ⟶ Y)

CategoryTheory.MonoidalClosed.curry
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerLeft A f) g) =
  CategoryTheory.CategoryStruct.comp f (CategoryTheory.MonoidalClosed.curry g)


theorem strictAnti_snd : StrictAnti (Prod.snd ∘ toProd : Concept α β r → Set β)

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}


lemma coborder_inter_closure :
    coborder s ∩ closure s = s

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


@[simp]
theorem valuationOfNeZeroToFun_eq (x : Kˣ) :
    (v.valuationOfNeZeroToFun x : ℤₘ₀) = v.valuation (x : K)

(v : IsDedekindDomain.HeightOneSpectrum R)

↑(v.valuationOfNeZeroToFun x) = v.valuation ↑x


/-- If `t` has the red-red invariant, then setting the root to black yields a balanced tree. -/
protected theorem RedRed.setBlack : t.RedRed p n → ∃ n', (setBlack t).Balanced black n'

∀ {α : Type u_1} {t : Batteries.RBNode α} {p : Prop} {n : Nat},
  Batteries.RBNode.RedRed p t n → ∃ n', t.setBlack.Balanced Batteries.RBColor.black n'


@[to_additive]
lemma tprod_subtype_le {κ γ : Type*} [OrderedCommGroup γ] [UniformSpace γ] [UniformGroup γ]
    [OrderClosedTopology γ] [CompleteSpace γ] (f : κ → γ) (β : Set κ) (h : ∀ a : κ, 1 ≤ f a)
    (hf : Multipliable f) : (∏' (b : β), f b) ≤ (∏' (a : κ), f a)

{κ : Type u_4}
{γ : Type u_5}
[OrderedAddCommGroup γ]
[UniformSpace γ]
[UniformAddGroup γ]
[OrderClosedTopology γ]
[CompleteSpace γ]
(f : κ → γ)
(β : Set κ)
(h : ∀ (a : κ), 0 ≤ f a)
(hf : Summable f)


@[simp]
theorem toIocMod_add_right (a b : α) : toIocMod hp a (b + p) = toIocMod hp a b

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


@[to_additive (attr := ext 1100)]
theorem hom_ext {f g : AssocQuotient α →ₙ* β} (h : f.comp of = g.comp of) : f = g

{f g : AddHom (AddMagma.FreeAddSemigroup α) β}

(h : f.comp AddMagma.FreeAddSemigroup.of = g.comp AddMagma.FreeAddSemigroup.of)


/-- An intermediate equivalence `A ≅ B'` whose functor is `F` and whose inverse is
`e'.inverse ⋙ eA.inverse`. -/
@[simps! functor]
def equivalence₁ : A ≌ B'

{A : Type u_1}
{A' : Type u_2}
{B' : Type u_4}
[CategoryTheory.Category.{u_5, u_1} A]
[CategoryTheory.Category.{u_6, u_2} A']
[CategoryTheory.Category.{u_7, u_4} B']
{eA : A ≌ A'}
{e' : A' ≌ B'}
{F : A ⥤ B'}
(hF : eA.functor ⋙ e'.functor ≅ F)

(AlgebraicTopology.DoldKan.Compatibility.equivalence₁ hF).functor = F


@[to_additive] theorem of_mulHom_image [DecidableEq H] (f : G →ₙ* H)
    (hf : ∀ ⦃a b c d : G⦄, a * b = c * d → f a = f c ∧ f b = f d → a = c ∧ b = d)
    (h : UniqueMul (A.image f) (B.image f) (f a0) (f b0)) : UniqueMul A B a0 b0

(hf : ∀ ⦃a b c d : G⦄, a + b = c + d → f a = f c ∧ f b = f d → a = c ∧ b = d)

(h : UniqueAdd (Finset.image (⇑f) A) (Finset.image (⇑f) B) (f a0) (f b0))


theorem coe_ne_one {x : Icc (0 : α) 1} : (x : α) ≠ 1 ↔ x ≠ 1

{α : Type u_1}
[OrderedSemiring α]
{x : ↑(Set.Icc 0 1)}

↑x ≠ 1 ↔ x ≠ 1


@[simp]
theorem erase_singleton (a : α) : ({a} : Multiset α).erase a = 0


theorem rank_eq (h : Acc r a) :
    h.rank = Ordinal.sup.{u, u} fun b : { b // r b a } => Order.succ (h.inv b.2).rank

{α : Type u}
{r : α → α → Prop}
{a : α}
(h : Acc r a)

h.rank = Ordinal.sup fun b => Order.succ ⋯.rank


/-- Compatible families of elements for a presheaf of types `P` and a presieve `R`
    are in 1-1 correspondence with compatible families for the same presheaf and
    the sieve generated by `R`, through extension and restriction. -/
@[simps]
noncomputable def compatibleEquivGenerateSieveCompatible :
    { x : FamilyOfElements P R // x.Compatible } ≃
      { x : FamilyOfElements P (generate R : Presieve X) // x.Compatible }

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

↑(CategoryTheory.Presieve.compatibleEquivGenerateSieveCompatible x) = (↑x).sieveExtend


theorem volume_preserving_piUnique (π : ι → Type*) [Unique ι] [∀ i, MeasureSpace (π i)] :
    MeasurePreserving (MeasurableEquiv.piUnique π) volume volume

[(i : ι) → MeasureTheory.MeasureSpace (π i)]

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.piUnique π)) MeasureTheory.volume MeasureTheory.volume


@[to_additive (attr := simp, norm_cast)]
theorem coe_list_prod (s : List (Finset α)) : (↑s.prod : Set α) = (s.map (↑)).prod

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


@[simp]
theorem smul_apply (r : R) (p : AddGroupSeminorm E) (x : E) : (r • p) x = r • p x

{R : Type u_2}
{E : Type u_4}
[AddGroup E]
[SMul R ℝ]
[SMul R ℝ≥0]
[IsScalarTower R ℝ≥0 ℝ]
(r : R)
(p : AddGroupSeminorm E)
(x : E)


@[simp]
theorem aeval_mem_adjoin_singleton :
    aeval x p ∈ Algebra.adjoin R {x}

(R : Type u)
{A : Type z}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{p : R[X]}
(x : A)

(Polynomial.aeval x) p ∈ Algebra.adjoin R {x}


theorem exists_int_lt (x : α) : ∃ n : ℤ, (n : α) < x

{α : Type u_1}
[StrictOrderedRing α]
[Archimedean α]
(x : α)


theorem le_toOuterMeasure_caratheodory (μ : Measure α) : ms ≤ μ.toOuterMeasure.caratheodory

{α : Type u_1}
[ms : MeasurableSpace α]
(μ : MeasureTheory.Measure α)


@[simp] lemma support_inv (f : ι → G₀) : support (fun a ↦ (f a)⁻¹) = support f

{ι : Type u_1}
{G₀ : Type u_3}
[GroupWithZero G₀]
(f : ι → G₀)

(Function.support fun a => (f a)⁻¹) = Function.support f


/-- Commutativity of actions is a symmetric relation. This lemma can't be an instance because this
would cause a loop in the instance search graph. -/
@[to_additive]
lemma SMulCommClass.symm (M N α : Type*) [SMul M α] [SMul N α] [SMulCommClass M N α] :
    SMulCommClass N M α

(M : Type u_11)
(N : Type u_12)
(α : Type u_13)
[VAdd M α]
[VAdd N α]
[VAddCommClass M N α]


lemma Module.ulift_injective_of_injective [Small.{v} R]
    (inj : Module.Injective R M) :
    Module.Injective R (ULift.{v'} M)

(R : Type u)
[Ring R]
{M : Type v}
[AddCommGroup M]
[Module R M]
[Small.{v, u} R]
(inj : Module.Injective R M)


@[simp]
theorem product_singleton : ({a} : Multiset α) ×ˢ ({b} : Multiset β) = {(a, b)}

{α : Type u_1}
{β : Type v}
(a : α)
(b : β)


theorem Ico_eq_image_ssubsets (h : s ⊆ t) : Ico s t = (t \ s).ssubsets.image (s ∪ ·)

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

Finset.Ico s t = Finset.image (fun x => s ∪ x) (t \ s).ssubsets


@[ext]
lemma hom_ext {X Y : Augmented C} (f g : X ⟶ Y) (h₁ : f.left = g.left) (h₂ : f.right = g.right) :
    f = g

{X Y : CategoryTheory.CosimplicialObject.Augmented C}


/-- `RatFunc.mk (p q : K[X])` is `p / q` as a rational function.

If `q = 0`, then `mk` returns 0.

This is an auxiliary definition used to define an `Algebra` structure on `RatFunc`;
the `simp` normal form of `mk p q` is `algebraMap _ _ p / algebraMap _ _ q`.
-/
protected irreducible_def mk (p q : K[X]) : RatFunc K

{K : Type u_1}
[CommRing K]
[IsDomain K]
(p q : K[X])

RatFunc.mk p q = { toFractionRing := (algebraMap K[X] (FractionRing K[X])) p / (algebraMap K[X] (FractionRing K[X])) q }


theorem gc_map_comap (f : K →+* L) : GaloisConnection (map f) (comap f)

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
(f : K →+* L)

GaloisConnection (Subfield.map f) (Subfield.comap f)


/-- The RHS is a noncomputable version of `Nat.floorRoot` with better order theoretical
properties. -/
lemma floorRoot_def :
    floorRoot n a = if n = 0 ∨ a = 0 then 0 else (a.factorization ⌊/⌋ n).prod (· ^ ·)

n.floorRoot a = if n = 0 ∨ a = 0 then 0 else (a.factorization ⌊/⌋ n).prod fun x x_1 => x ^ x_1


@[to_additive (attr := simp)]
theorem subgroupMap_symm_apply (e : G ≃* G') (H : Subgroup G) (g : H.map (e : G →* G')) :
    (e.subgroupMap H).symm g = ⟨e.symm g, SetLike.mem_coe.1 <| Set.mem_image_equiv.1 g.2⟩

{G : Type u_1}
{G' : Type u_2}
[Group G]
[Group G']
(e : G ≃* G')
(H : Subgroup G)
(g : ↥(Subgroup.map (↑e) H))

(e.subgroupMap H).symm g = ⟨e.symm ↑g, ⋯⟩


theorem measure_compl (h₁ : MeasurableSet s) (h_fin : μ s ≠ ∞) : μ sᶜ = μ univ - μ s

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(h₁ : MeasurableSet s)
(h_fin : μ s ≠ ⊤)


lemma rTensor_apply_X_tmul (s : σ) (n : N) (d : σ →₀ ℕ) :
    rTensor (X s ⊗ₜ[R] n) d = if Finsupp.single s 1 = d then (1 : S) ⊗ₜ[R] n else 0

{R : Type u}
{N : Type w}
[CommSemiring R]
{σ : Type u_1}
[DecidableEq σ]
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[AddCommMonoid N]
[Module R N]
(s : σ)
(n : N)
(d : σ →₀ ℕ)

(MvPolynomial.rTensor (MvPolynomial.X s ⊗ₜ[R] n)) d = if Finsupp.single s 1 = d then 1 ⊗ₜ[R] n else 0


@[to_additive (attr := simp)]
theorem map_mul [MulHomClass F M N] (f : F) (x y : M) : f (x * y) = f x * f y

{M : Type u_4}
{N : Type u_5}
{F : Type u_9}
[Add M]
[Add N]
[FunLike F M N]
[AddHomClass F M N]
(f : F)
(x y : M)


lemma log_inv {x : ℝ≥0∞} : log x⁻¹ = - log x


theorem le_liminf_of_le {f : Filter β} {u : β → α} {a}
    (hf : f.IsCoboundedUnder (· ≥ ·) u := by isBoundedDefault)
    (h : ∀ᶠ n in f, a ≤ u n) : a ≤ liminf u f

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


/-- Complement to a singleton is dense if and only if the singleton is not an open set. -/
theorem dense_compl_singleton_iff_not_open :
    Dense ({x}ᶜ : Set X) ↔ ¬IsOpen ({x} : Set X)

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


@[to_additive (attr := simp)]
theorem ediam_smul [SMul M X] [IsometricSMul M X] (c : M) (s : Set X) :
    EMetric.diam (c • s) = EMetric.diam s

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


theorem IsIntegralClosure.range_le_span_dualBasis [Algebra.IsSeparable K L] {ι : Type*} [Fintype ι]
    [DecidableEq ι] (b : Basis ι K L) (hb_int : ∀ i, IsIntegral A (b i)) [IsIntegrallyClosed A] :
    LinearMap.range ((Algebra.linearMap C L).restrictScalars A) ≤
    Submodule.span A (Set.range <| (traceForm K L).dualBasis (traceForm_nondegenerate K L) b)

(hb_int : ∀ (i : ι), IsIntegral A (b i))

LinearMap.range (↑A (Algebra.linearMap C L)) ≤ Submodule.span A (Set.range ⇑((Algebra.traceForm K L).dualBasis ⋯ b))


/--
We can upgrade `F` to a monoidal functor from `D` to `E` with the induced structure.
-/
@[simps]
def fromInduced [MonoidalCategoryStruct D] (F : D ⥤ C) [F.Faithful]
    (fData : InducingFunctorData F) :
    letI := induced F fData
    MonoidalFunctor D C

(fData : CategoryTheory.Monoidal.InducingFunctorData F)

(CategoryTheory.Monoidal.fromInduced F fData).μ X Y = (fData.μIso X Y).hom


theorem fuzzy_zero_iff_gf : G ‖ 0 ↔ 0 ⧏ G


@[to_additive]
theorem dist_eq_norm_div' (a b : E) : dist a b = ‖b / a‖

{E : Type u_6}
[SeminormedAddGroup E]
(a b : E)


theorem isCompact_iUnion {ι : Sort*} {f : ι → Set X} [Finite ι] (h : ∀ i, IsCompact (f i)) :
    IsCompact (⋃ i, f i)

{X : Type u}
[TopologicalSpace X]
{ι : Sort u_2}
{f : ι → Set X}
[Finite ι]
(h : ∀ (i : ι), IsCompact (f i))


protected theorem injective (e : E) : Function.Injective e

{E : Sort u_1}
{α : Sort u_3}
{β : Sort u_4}
[iE : EquivLike E α β]
(e : E)


theorem CommApplicative.commutative_map {m : Type u → Type v} [h : Applicative m]
    [CommApplicative m] {α β γ} (a : m α) (b : m β) {f : α → β → γ} :
  f <$> a <*> b = flip f <$> b <*> a

{m : Type u → Type v}
[h : Applicative m]
[CommApplicative m]
{α β γ : Type u}
(a : m α)
(b : m β)
{f : α → β → γ}

(Seq.seq (f <$> a) fun x => b) = Seq.seq (flip f <$> b) fun x => a


@[reassoc (attr := simp)]
lemma commShiftIso_hom_naturality {X Y : C} (f : X ⟶ Y) (a : A) :
    F.map (f⟦a⟧') ≫ (F.commShiftIso a).hom.app Y =
      (F.commShiftIso a).hom.app X ≫ (F.map f)⟦a⟧'

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_7, u_2} D]
(F : CategoryTheory.Functor C D)
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[F.CommShift A]
{X Y : C}
(f : X ⟶ Y)
(a : A)

CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.shiftFunctor C a).map f)) ((F.commShiftIso a).hom.app Y) =
  CategoryTheory.CategoryStruct.comp ((F.commShiftIso a).hom.app X) ((CategoryTheory.shiftFunctor D a).map (F.map f))


/-- An additive character on `ZMod n` is nontrivial iff it takes a value `≠ 1` on `1`. -/
theorem zmod_char_ne_one_iff (n : ℕ) [NeZero n] (ψ : AddChar (ZMod n) C) : ψ ≠ 1 ↔ ψ 1 ≠ 1

{C : Type v}
[CommMonoid C]
(n : ℕ)
[NeZero n]
(ψ : AddChar (ZMod n) C)

ψ ≠ 1 ↔ ψ 1 ≠ 1


theorem get?_eq_some : l.get? n = some a ↔ ∃ h, get l ⟨n, h⟩ = a

∀ {α : Type u_1} {a : α} {l : List α} {n : Nat}, l.get? n = some a ↔ ∃ h, l.get ⟨n, h⟩ = a


@[simp]
theorem deriv_add_const' (c : F) : (deriv fun y => f y + c) = deriv f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
(c : F)


theorem decompose_of_mem {x : M} {i : ι} (hx : x ∈ ℳ i) :
    decompose ℳ x = DirectSum.of (fun i ↦ ℳ i) i ⟨x, hx⟩

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommMonoid M]
[SetLike σ M]
[AddSubmonoidClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
{x : M}
{i : ι}
(hx : x ∈ ℳ i)

(DirectSum.decompose ℳ) x = (DirectSum.of (fun i => ↥(ℳ i)) i) ⟨x, hx⟩


@[to_additive]
theorem finiteIndex_of_finite_quotient [Finite (G ⧸ H)] : FiniteIndex H

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)
[Finite (G ⧸ H)]


theorem coe_mul (x y : (𝓞 K)ˣ) : ((x * y : (𝓞 K)ˣ) : K) = (x : K) * (y : K)

(algebraMap (𝓞 K) K) ↑(x * y) = (algebraMap (𝓞 K) K) ↑x * (algebraMap (𝓞 K) K) ↑y


theorem cauchySeq_iff {u : ℕ → α} :
    CauchySeq u ↔ ∀ V ∈ 𝓤 α, ∃ N, ∀ k ≥ N, ∀ l ≥ N, (u k, u l) ∈ V

{α : Type u}
[uniformSpace : UniformSpace α]
{u : ℕ → α}


theorem isComplete_iUnion_separated {ι : Sort*} {s : ι → Set α} (hs : ∀ i, IsComplete (s i))
    {U : Set (α × α)} (hU : U ∈ 𝓤 α) (hd : ∀ (i j : ι), ∀ x ∈ s i, ∀ y ∈ s j, (x, y) ∈ U → i = j) :
    IsComplete (⋃ i, s i)


theorem Fin.conjTranspose_circulant [Star α] :
    ∀ {n} (v : Fin n → α), (circulant v)ᴴ = circulant (star fun i => v (-i))

{α : Type u_1}
[Star α]
{n : ℕ}
(v : Fin n → α)

(Matrix.circulant v).conjTranspose = Matrix.circulant (star fun i => v (-i))


@[to_additive (attr := simp)]
theorem noncommCoprod_comp_inr : (f.noncommCoprod g comm).comp (inr M N) = g

(comm : ∀ (m : M) (n : N), AddCommute (f m) (g n))

(f.noncommCoprod g comm).comp (AddMonoidHom.inr M N) = g


theorem map_bind (m : Multiset α) (n : α → Multiset β) (f : β → γ) :
    map f (bind m n) = bind m fun a => map f (n a)

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
(m : Multiset α)
(n : α → Multiset β)
(f : β → γ)

Multiset.map f (m.bind n) = m.bind fun a => Multiset.map f (n a)


/-- In a Noetherian space, every closed set is a finite union of irreducible closed sets. -/
theorem NoetherianSpace.exists_finset_irreducible [NoetherianSpace α] (s : Closeds α) :
    ∃ S : Finset (Closeds α), (∀ k : S, IsIrreducible (k : Set α)) ∧ s = S.sup id

{α : Type u_1}
[TopologicalSpace α]
[TopologicalSpace.NoetherianSpace α]
(s : TopologicalSpace.Closeds α)

∃ S, (∀ (k : { x // x ∈ S }), IsIrreducible ↑↑k) ∧ s = S.sup id


theorem option_getD {f : α → Option β} {g : α → β} (hf : Computable f) (hg : Computable g) :
    Computable fun a => (f a).getD (g a)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{f : α → Option β}
{g : α → β}
(hf : Computable f)
(hg : Computable g)


@[simps!]
instance : Category (Augmented C)

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

∀ {X Y Z : CategoryTheory.Comma (𝟭 (CategoryTheory.SimplicialObject C)) (CategoryTheory.SimplicialObject.const C)}
  (f : X ⟶ Y) (g : Y ⟶ Z), (f ≫ g).right = f.right ≫ g.right


lemma abs_le_one_iff_mul_self_le_one : |a| ≤ 1 ↔ a * a ≤ 1

{α : Type u_1}
[LinearOrderedRing α]
{a : α}


protected theorem congr_arg {f : A₁ ≃ₐ[R] A₂} {x x' : A₁} : x = x' → f x = f x'

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
{f : A₁ ≃ₐ[R] A₂}
{x x' : A₁}


lemma preimage_insertNth_Icc_of_mem {i : Fin (n + 1)} {x : α i} {q₁ q₂ : ∀ j, α j}
    (hx : x ∈ Icc (q₁ i) (q₂ i)) :
    i.insertNth x ⁻¹' Icc q₁ q₂ = Icc (fun j ↦ q₁ (i.succAbove j)) fun j ↦ q₂ (i.succAbove j)

{n : ℕ}
{α : Fin (n + 1) → Type u_1}
[(i : Fin (n + 1)) → Preorder (α i)]
{i : Fin (n + 1)}
{x : α i}
{q₁ q₂ : (j : Fin (n + 1)) → α j}
(hx : x ∈ Set.Icc (q₁ i) (q₂ i))

i.insertNth x ⁻¹' Set.Icc q₁ q₂ = Set.Icc (fun j => q₁ (i.succAbove j)) fun j => q₂ (i.succAbove j)


@[reassoc (attr := simp)]
lemma pOpcyclesIso_hom_inv_id :
    K.pOpcycles j ≫ (K.pOpcyclesIso i j hi h).inv = 𝟙 _

K.pOpcycles j ≫ (K.pOpcyclesIso i j hi h).inv = 𝟙 (K.X j)


lemma IsPointwiseRightKanExtensionAt.hasPointwiseRightKanExtensionAt
    {Y : D} (h : E.IsPointwiseRightKanExtensionAt Y) :
    HasPointwiseRightKanExtensionAt L F Y


lemma dvd_sum (h : ∀ i ∈ s, a ∣ f i) : a ∣ ∑ i ∈ s, f i

{ι : Type u_1}
{α : Type u_2}
{s : Finset ι}
{a : α}
{f : ι → α}
[NonUnitalSemiring α]
(h : ∀ i ∈ s, a ∣ f i)


lemma ideal_fg_of_isFinite [P.IsFinite] : P.ker.FG

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(P : Algebra.Presentation R S)
[P.IsFinite]


theorem Monotone.le_map_sSup [CompleteLattice β] {s : Set α} {f : α → β} (hf : Monotone f) :
    ⨆ a ∈ s, f a ≤ f (sSup s)

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


/-- Given a valuation v : R → Γ₀ and a ring homomorphism O →+* R, we say that O is the integers of v
if f is injective, and its range is exactly `v.integer`. -/
structure Integers : Prop where
  hom_inj : Function.Injective (algebraMap O R)
  map_le_one : ∀ x, v (algebraMap O R x) ≤ 1
  exists_of_le_one : ∀ ⦃r⦄, v r ≤ 1 → ∃ x, algebraMap O R x = r

{R : Type u}
{Γ₀ : Type v}
[CommRing R]
[LinearOrderedCommGroupWithZero Γ₀]
{v : Valuation R Γ₀}
{O : Type w}
[CommRing O]
[Algebra O R]
(self : v.Integers O)


/-- `D ⋙ forget T` has a limit, then `D` has a limit. -/
theorem hasLimit_of_comp_forget_hasLimit (D : J ⥤ Algebra T) [HasLimit (D ⋙ forget T)] :
    HasLimit D

(D : CategoryTheory.Functor J T.Algebra)


protected lemma mul_nonneg_iff_of_pos_right (hb : 0 < b) : 0 ≤ a * b ↔ 0 ≤ a


/-- If `μ` is inner regular for finite measure sets with respect to compact sets,
then any measurable set of finite measure can be approximated by a compact closed subset.
Compared to `MeasurableSet.exists_isCompact_lt_add`,
this version additionally assumes that `α` is an R₁ space with Borel σ-algebra.
-/
theorem _root_.MeasurableSet.exists_isCompact_isClosed_lt_add
    [InnerRegularCompactLTTop μ] [R1Space α] [BorelSpace α]
    ⦃A : Set α⦄ (hA : MeasurableSet A) (h'A : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ K, K ⊆ A ∧ IsCompact K ∧ IsClosed K ∧ μ A < μ K + ε

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[μ.InnerRegularCompactLTTop]
[R1Space α]
[BorelSpace α]
⦃A : Set α⦄
(hA : MeasurableSet A)
(h'A : μ A ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ K ⊆ A, IsCompact K ∧ IsClosed K ∧ μ A < μ K + ε


theorem sSameSide_vadd_right_iff {s : AffineSubspace R P} {x y : P} {v : V} (hv : v ∈ s.direction) :
    s.SSameSide x (v +ᵥ y) ↔ s.SSameSide x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
{v : V}
(hv : v ∈ s.direction)


lemma ofJ_1728_of_two_eq_zero (h2 : (2 : F) = 0) :
    ofJ 1728 = @ofJ0 _ _ (invertibleOfNonzero <| two_or_three_ne_zero.neg_resolve_left h2)

{F : Type u}
[Field F]
[DecidableEq F]
(h2 : 2 = 0)

EllipticCurve.ofJ 1728 = EllipticCurve.ofJ0 F


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


theorem IsRelPrime.dvd_of_dvd_mul_left_of_isPrimal (H1 : IsRelPrime x y) (H2 : x ∣ y * z)
    (h : IsPrimal x) : x ∣ z

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


/-- X `HasPDF` if there is a pdf `f` such that `map X ℙ = μ.withDensity f`. -/
theorem hasPDF_of_map_eq_withDensity {X : Ω → E} {ℙ : Measure Ω} {μ : Measure E}
    (hX : AEMeasurable X ℙ) (f : E → ℝ≥0∞) (hf : AEMeasurable f μ) (h : map X ℙ = μ.withDensity f) :
    HasPDF X ℙ μ

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]

∀ {x : MeasurableSpace Ω} {X : Ω → E} {ℙ : MeasureTheory.Measure Ω} {μ : MeasureTheory.Measure E},
  AEMeasurable X ℙ →
    ∀ (f : E → ℝ≥0∞), AEMeasurable f μ → MeasureTheory.Measure.map X ℙ = μ.withDensity f → MeasureTheory.HasPDF X ℙ μ


@[simp, nolint simpNF] -- Porting note: LHS doesn't simplify.
theorem approxOn_comp {γ : Type*} [MeasurableSpace γ] {f : β → α} (hf : Measurable f) {g : γ → β}
    (hg : Measurable g) {s : Set α} {y₀ : α} (h₀ : y₀ ∈ s) [SeparableSpace s] (n : ℕ) :
    approxOn (f ∘ g) (hf.comp hg) s y₀ h₀ n = (approxOn f hf s y₀ h₀ n).comp g hg

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[PseudoEMetricSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace β]
{γ : Type u_7}
[MeasurableSpace γ]
{f : β → α}
(hf : Measurable f)
{g : γ → β}
(hg : Measurable g)
{s : Set α}
{y₀ : α}
(h₀ : y₀ ∈ s)
[TopologicalSpace.SeparableSpace ↑s]
(n : ℕ)

MeasureTheory.SimpleFunc.approxOn (f ∘ g) ⋯ s y₀ h₀ n = (MeasureTheory.SimpleFunc.approxOn f hf s y₀ h₀ n).comp g hg


theorem restrict_Ioc_eq_restrict_Icc : μ.restrict (Ioc a b) = μ.restrict (Icc a b)

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

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


@[simp]
theorem coe_of (X : Type u) [TopologicalSpace X] : (of X : Type u) = X


protected theorem measurable_coe (κ : Kernel α β) {s : Set β} (hs : MeasurableSet s) :
    Measurable fun a => κ a s

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel α β)
{s : Set β}
(hs : MeasurableSet s)


/-- An [exhaustion by compact sets](https://en.wikipedia.org/wiki/Exhaustion_by_compact_sets) of a
topological space is a sequence of compact sets `K n` such that `K n ⊆ interior (K (n + 1))` and
`⋃ n, K n = univ`.

If `X` is a locally compact sigma compact space, then `CompactExhaustion.choice X` provides
a choice of an exhaustion by compact sets. This choice is also available as
`(default : CompactExhaustion X)`. -/
structure CompactExhaustion (X : Type*) [TopologicalSpace X] where
  /-- The sequence of compact sets that form a compact exhaustion. -/
  toFun : ℕ → Set X
  /-- The sets in the compact exhaustion are in fact compact. -/
  isCompact' : ∀ n, IsCompact (toFun n)
  /-- The sets in the compact exhaustion form a sequence:
    each set is contained in the interior of the next. -/
  subset_interior_succ' : ∀ n, toFun n ⊆ interior (toFun (n + 1))
  /-- The union of all sets in a compact exhaustion equals the entire space. -/
  iUnion_eq' : ⋃ n, toFun n = univ

{X : Type u_4}
[TopologicalSpace X]
(self : CompactExhaustion X)
(n : ℕ)

self.toFun n ⊆ interior (self.toFun (n + 1))


theorem eq_two_pow_or_exists_odd_prime_and_dvd (n : ℕ) :
    (∃ k : ℕ, n = 2 ^ k) ∨ ∃ p, Nat.Prime p ∧ p ∣ n ∧ Odd p

(∃ k, n = 2 ^ k) ∨ ∃ p, Nat.Prime p ∧ p ∣ n ∧ Odd p


/-- Let the group `G` be the union of finitely many left cosets `g i • H i`.
Then the cosets of subgroups of infinite index may be omitted from the covering. -/
@[to_additive]
theorem leftCoset_cover_filter_FiniteIndex
    [DecidablePred (FiniteIndex : Subgroup G → Prop)] :
    ⋃ k ∈ s.filter (fun i => (H i).FiniteIndex), g k • (H k : Set G) = Set.univ

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

⋃ k ∈ Finset.filter (fun i => (H i).FiniteIndex) s, g k +ᵥ ↑(H k) = Set.univ


@[simp, norm_cast]
theorem coe_finset_sup (f : ι → Opens α) (s : Finset ι) : (↑(s.sup f) : Set α) = s.sup ((↑) ∘ f)

{ι : Type u_1}
{α : Type u_2}
[TopologicalSpace α]
(f : ι → TopologicalSpace.Opens α)
(s : Finset ι)


theorem Lex.acc_single (hbot : ∀ ⦃i a⦄, ¬s i a 0) (hs : ∀ i, WellFounded (s i))
    [DecidableEq ι] {i : ι} (hi : Acc (rᶜ ⊓ (· ≠ ·)) i) :
    ∀ a, Acc (DFinsupp.Lex r s) (single i a)

(hi : Acc (rᶜ ⊓ fun x x_1 => x ≠ x_1) i)

Acc (DFinsupp.Lex r s) (DFinsupp.single i a)


theorem restrict_add (v w : VectorMeasure α M) (i : Set α) :
    (v + w).restrict i = v.restrict i + w.restrict i

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


private lemma min_ne_of_lt_of_ne (ha : c < a) (hb : b ≠ c) : min a b ≠ c

{R : Type u_2}
[LinearOrder R]
{a b c : R}
(ha : c < a)
(hb : b ≠ c)


nonrec theorem pair {f : α → β} {g : α → γ} (hf : Computable f) (hg : Computable g) :
    Computable fun a => (f a, g a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
{f : α → β}
{g : α → γ}
(hf : Computable f)
(hg : Computable g)


/-- A `V`-functor `F` between `V`-enriched categories
has a `V`-morphism from `X ⟶[V] Y` to `F.obj X ⟶[V] F.obj Y`,
satisfying the usual axioms.
-/
structure EnrichedFunctor (C : Type u₁) [EnrichedCategory V C] (D : Type u₂)
    [EnrichedCategory V D] where
  obj : C → D
  map : ∀ X Y : C, (X ⟶[V] Y) ⟶ obj X ⟶[V] obj Y
  map_id : ∀ X : C, eId V X ≫ map X X = eId V (obj X) := by aesop_cat
  map_comp :
    ∀ X Y Z : C,
      eComp V X Y Z ≫ map X Z = (map X Y ⊗ map Y Z) ≫ eComp V (obj X) (obj Y) (obj Z) := by
    aesop_cat

(self : CategoryTheory.EnrichedFunctor V C D)

CategoryTheory.CategoryStruct.comp (CategoryTheory.eComp V X Y Z) (self.map X Z) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom (self.map X Y) (self.map Y Z))
    (CategoryTheory.eComp V (self.obj X) (self.obj Y) (self.obj Z))


lemma mul_top_of_neg : ∀ {x : EReal}, x < 0 → x * ⊤ = ⊥


theorem continuous_of_continuous_eval [TopologicalSpace α] {g : α → WeakDual 𝕜 E}
    (h : ∀ y, Continuous fun a => (g a) y) : Continuous g

(h : ∀ (y : E), Continuous fun a => (g a) y)


theorem natAbs_abs (a : ℤ) : natAbs |a| = natAbs a


theorem injective_splitCenterBox (I : Box ι) : Injective I.splitCenterBox


/-- The non-zero `•`-divisors with `•` as right multiplication correspond with the non-zero
divisors. Note that the `MulOpposite` is needed because we defined `nonZeroDivisors` with
multiplication on the right. -/
lemma nonZeroSMulDivisors_mulOpposite_eq_op_nonZeroDivisors :
    Rᵐᵒᵖ ⁰[R] = R⁰.op


@[to_additive MeasureTheory.addFundamentalInterior_subset]
theorem fundamentalInterior_subset : fundamentalInterior G s ⊆ s

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

MeasureTheory.fundamentalInterior G s ⊆ s


/--
Effective epi families in a precoherent category are transitive, in the sense that an
`EffectiveEpiFamily` and an `EffectiveEpiFamily` over each member, the composition is an
`EffectiveEpiFamily`.
Note: The finiteness condition is an artifact of the proof and is probably unnecessary.
-/
theorem EffectiveEpiFamily.transitive_of_finite {α : Type} [Finite α] {Y : α → C}
    (π : (a : α) → (Y a ⟶ X)) (h : EffectiveEpiFamily Y π) {β : α → Type} [∀ (a : α), Finite (β a)]
    {Y_n : (a : α) → β a → C} (π_n : (a : α) → (b : β a) → (Y_n a b ⟶ Y a))
    (H : ∀ a, EffectiveEpiFamily (Y_n a) (π_n a)) :
    EffectiveEpiFamily
      (fun (c : Σ a, β a) => Y_n c.fst c.snd) (fun c => π_n c.fst c.snd ≫ π c.fst)

(h : CategoryTheory.EffectiveEpiFamily Y π)

(π_n : (a : α) → (b : β a) → Y_n a b ⟶ Y a)

(H : ∀ (a : α), CategoryTheory.EffectiveEpiFamily (Y_n a) (π_n a))

CategoryTheory.EffectiveEpiFamily (fun c => Y_n c.fst c.snd) fun c =>
  CategoryTheory.CategoryStruct.comp (π_n c.fst c.snd) (π c.fst)


theorem subset_inter {l l₁ l₂ : List α} (h₁ : l ⊆ l₁) (h₂ : l ⊆ l₂) : l ⊆ l₁ ∩ l₂

{α : Type u_1}
[DecidableEq α]
{l l₁ l₂ : List α}
(h₁ : l ⊆ l₁)
(h₂ : l ⊆ l₂)


@[csimp] private theorem Float.val_eq : @Float.val = Float.valImpl


theorem opNorm_smul_le {𝕜' : Type*} [NormedField 𝕜'] [NormedSpace 𝕜' F] [SMulCommClass 𝕜₂ 𝕜' F]
    (c : 𝕜') (f : E →SL[σ₁₂] F) : ‖c • f‖ ≤ ‖c‖ * ‖f‖

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
{𝕜' : Type u_11}
[NormedField 𝕜']
[NormedSpace 𝕜' F]
[SMulCommClass 𝕜₂ 𝕜' F]
(c : 𝕜')
(f : E →SL[σ₁₂] F)

‖c • f‖ ≤ ‖c‖ * ‖f‖


lemma Antivary.div_left₀ (hf₁ : 0 ≤ f₁) (hf₂ : StrongLT 0 f₂) (h₁ : Antivary f₁ g)
    (h₂ : Monovary f₂ g) : Antivary (f₁ / f₂) g

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{f₁ f₂ : ι → α}
{g : ι → β}
(hf₁ : 0 ≤ f₁)
(hf₂ : StrongLT 0 f₂)
(h₁ : Antivary f₁ g)
(h₂ : Monovary f₂ g)


theorem totient_gcd_mul_totient_mul (a b : ℕ) : φ (a.gcd b) * φ (a * b) = φ a * φ b * a.gcd b

(a.gcd b).totient * (a * b).totient = a.totient * b.totient * a.gcd b


/-- `(1 : FractionalIdeal S P)` is defined as the R-submodule `f(R) ≤ P`.

However, this is not definitionally equal to `1 : Submodule R P`,
which is proved in the actual `simp` lemma `coe_one`. -/
theorem coe_one_eq_coeSubmodule_top : ↑(1 : FractionalIdeal S P) = coeSubmodule P (⊤ : Ideal R)

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]


/-- The functor which maps `S : SnakeInput C` to the diagram
`S.L₀.X₁ ⟶ S.L₀.X₂ ⟶ S.L₀.X₃ ⟶ S.L₃.X₁ ⟶ S.L₃.X₂ ⟶ S.L₃.X₃`. -/
@[simps]
noncomputable def composableArrowsFunctor : SnakeInput C ⥤ ComposableArrows C 5

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]

∀ {X Y : CategoryTheory.ShortComplex.SnakeInput C} (f : X ⟶ Y),
  CategoryTheory.ShortComplex.SnakeInput.composableArrowsFunctor.map f =
    CategoryTheory.ComposableArrows.homMk₅ f.f₀.τ₁ f.f₀.τ₂ f.f₀.τ₃ f.f₃.τ₁ f.f₃.τ₂ f.f₃.τ₃ ⋯ ⋯ ⋯ ⋯ ⋯


theorem nhds_eq (x : CofiniteTopology X) : 𝓝 x = pure x ⊔ cofinite


@[simp] theorem and_self (p : Prop) : (p ∧ p) = p


theorem exists_primitive_element_of_finite_intermediateField
    [Finite (IntermediateField F E)] (K : IntermediateField F E) : ∃ α : E, F⟮α⟯ = K

(F : Type u_1)
(E : Type u_2)
[Field F]
[Field E]
[Algebra F E]
[Finite (IntermediateField F E)]
(K : IntermediateField F E)

∃ α, F⟮α⟯ = K


@[simp]
theorem blockDiag'_blockDiagonal' [DecidableEq o] (M : ∀ i, Matrix (m' i) (n' i) α) :
    blockDiag' (blockDiagonal' M) = M

{o : Type u_4}
{m' : o → Type u_7}
{n' : o → Type u_8}
{α : Type u_12}
[Zero α]
[DecidableEq o]
(M : (i : o) → Matrix (m' i) (n' i) α)

(Matrix.blockDiagonal' M).blockDiag' = M


theorem star_dotProduct : star v ⬝ᵥ w = star (star w ⬝ᵥ v)

{m : Type u_2}
{α : Type v}
[Fintype m]
[NonUnitalSemiring α]
[StarRing α]
(v w : m → α)


theorem filter_curry (f : α × β →₀ M) (p : α → Prop) [DecidablePred p] :
    (f.filter fun a : α × β => p a.1).curry = f.curry.filter p

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(f : α × β →₀ M)
(p : α → Prop)
[DecidablePred p]

(Finsupp.filter (fun a => p a.1) f).curry = Finsupp.filter p f.curry


@[to_additive]
theorem comap_injective_of_surjective : Function.Injective (comap f)

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{f : M →ₙ* N}
(hf : Function.Surjective ⇑f)


theorem lt_castPred_succ_iff {a b : Fin (n + 1)} (ha : succ a ≠ last (n + 1)) :
    b < (succ a).castPred ha ↔ b ≤ a

{n : ℕ}
{a b : Fin (n + 1)}
(ha : a.succ ≠ Fin.last (n + 1))


theorem restrict_iUnion_congr [Countable ι] {s : ι → Set α} :
    μ.restrict (⋃ i, s i) = ν.restrict (⋃ i, s i) ↔ ∀ i, μ.restrict (s i) = ν.restrict (s i)

{α : Type u_2}
{ι : Type u_6}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[Countable ι]
{s : ι → Set α}

μ.restrict (⋃ i, s i) = ν.restrict (⋃ i, s i) ↔ ∀ (i : ι), μ.restrict (s i) = ν.restrict (s i)


theorem hasPushout_of_preservesPushout [HasPushout f g] : HasPushout (G.map f) (G.map g)

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.span f g) G]

CategoryTheory.Limits.HasPushout (G.map f) (G.map g)


theorem principal_add_of_principal_mul {o : Ordinal} (ho : Principal (· * ·) o) (ho₂ : o ≠ 2) :
    Principal (· + ·) o

(ho : Ordinal.Principal (fun x x_1 => x * x_1) o)

Ordinal.Principal (fun x x_1 => x + x_1) o


/-- The abelian coimage in a functor category can be calculated componentwise. -/
@[simps!]
def coimageObjIso : (Abelian.coimage α).obj X ≅ Abelian.coimage (α.app X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type w}
[CategoryTheory.Category.{z, w} D]
[CategoryTheory.Abelian D]
{F G : CategoryTheory.Functor C D}
(α : F ⟶ G)
(X : C)

(CategoryTheory.Abelian.FunctorCategory.coimageObjIso α X).hom =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.PreservesCokernel.iso ((CategoryTheory.evaluation C D).obj X)
        (CategoryTheory.Limits.kernel.ι α)).hom
    (CategoryTheory.Limits.cokernel.map ((CategoryTheory.Limits.kernel.ι α).app X)
      (CategoryTheory.Limits.kernel.ι (α.app X))
      (CategoryTheory.Limits.kernelComparison α ((CategoryTheory.evaluation C D).obj X))
      (CategoryTheory.CategoryStruct.id (F.obj X)) ⋯)


/-- A monoid object internal to a monoidal category.

When the monoidal category is preadditive, this is also sometimes called an "algebra object".
-/
structure Mon_ where
  X : C
  one : 𝟙_ C ⟶ X
  mul : X ⊗ X ⟶ X
  one_mul : (one ▷ X) ≫ mul = (λ_ X).hom := by aesop_cat
  mul_one : (X ◁ one) ≫ mul = (ρ_ X).hom := by aesop_cat
  -- Obviously there is some flexibility stating this axiom.
  -- This one has left- and right-hand sides matching the statement of `Monoid.mul_assoc`,
  -- and chooses to place the associator on the right-hand side.
  -- The heuristic is that unitors and associators "don't have much weight".
  mul_assoc : (mul ▷ X) ≫ mul = (α_ X X X).hom ≫ (X ◁ mul) ≫ mul := by aesop_cat

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

self.X ◁ self.one ≫ self.mul = (ρ_ self.X).hom


theorem cardinal_mk_lift_le_max :
    Cardinal.lift.{u} #{ x : A // IsAlgebraic R x } ≤ max (Cardinal.lift.{v} #R) ℵ₀

(R : Type u)
(A : Type v)
[CommRing R]
[CommRing A]
[IsDomain A]
[Algebra R A]
[NoZeroSMulDivisors R A]

Cardinal.lift.{u, v} #{ x // IsAlgebraic R x } ≤ max (Cardinal.lift.{v, u} #R) ℵ₀


/-- A set is contained in its own closed thickening. -/
theorem self_subset_cthickening {δ : ℝ} (E : Set α) : E ⊆ cthickening δ E

{α : Type u}
[PseudoEMetricSpace α]
{δ : ℝ}
(E : Set α)


theorem map_filter {f : α ≃ β} {p : α → Prop} [DecidablePred p] :
    (s.filter p).map f.toEmbedding = (s.map f.toEmbedding).filter (p ∘ f.symm)

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{f : α ≃ β}
{p : α → Prop}
[DecidablePred p]

Finset.map f.toEmbedding (Finset.filter p s) = Finset.filter (p ∘ ⇑f.symm) (Finset.map f.toEmbedding s)


/-- Given a pullback in `C`, construct a binary product in `C/B`. -/
theorem over_binaryProduct_of_pullback [HasPullbacks C] {B : C} : HasBinaryProducts (Over B)

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


@[simp]
theorem truncateFun_out (x : TruncatedWittVector p n R) : x.out.truncateFun n = x

{p n : ℕ}
{R : Type u_1}
[CommRing R]
(x : TruncatedWittVector p n R)


theorem strictMonoOn_projIcc : StrictMonoOn (projIcc a b h) (Icc a b)

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

StrictMonoOn (Set.projIcc a b h) (Set.Icc a b)


@[simp]
-- Porting note (#11215): TODO get rid of `(id X : C)` somehow?
theorem composePath_id {X : Paths C} : composePath (𝟙 X) = 𝟙 (id X : C)

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

CategoryTheory.composePath (CategoryTheory.CategoryStruct.id X) = CategoryTheory.CategoryStruct.id (id X)


@[simp] theorem forget_obj (R : CommRingCat) : (forget _).obj R = R

(CategoryTheory.forget CommRingCat).obj R = ↑R


@[to_additive]
theorem subgroupMap_surjective (f : G →* G') (H : Subgroup G) :
    Function.Surjective (f.subgroupMap H)

{G : Type u_1}
{G' : Type u_2}
[AddGroup G]
[AddGroup G']
(f : G →+ G')
(H : AddSubgroup G)


theorem eq_symm_apply (e : M₁ ≃SL[σ₁₂] M₂) {x y} : y = e.symm x ↔ e y = x

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{σ₂₁ : R₂ →+* R₁}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]
(e : M₁ ≃SL[σ₁₂] M₂)
{x : M₂}
{y : M₁}


@[simp]
theorem mem_mk {a : α} {s nd} : a ∈ @Finset.mk α s nd ↔ a ∈ s

{α : Type u_1}
{a : α}
{s : Multiset α}
{nd : s.Nodup}


@[simp]
theorem single_mul_single [Mul G] {a₁ a₂ : G} {b₁ b₂ : k} :
    single a₁ b₁ * single a₂ b₂ = single (a₁ * a₂) (b₁ * b₂)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Mul G]
{a₁ a₂ : G}
{b₁ b₂ : k}

MonoidAlgebra.single a₁ b₁ * MonoidAlgebra.single a₂ b₂ = MonoidAlgebra.single (a₁ * a₂) (b₁ * b₂)


lemma completeSpace_prod_of_nonempty [UniformSpace β] [Nonempty α] [Nonempty β] :
    CompleteSpace (α × β) ↔ CompleteSpace α ∧ CompleteSpace β

{α : Type u}
{β : Type v}
[uniformSpace : UniformSpace α]
[UniformSpace β]
[Nonempty α]
[Nonempty β]


lemma top_ne_pointwise_smul_of_mem_jacobson_annihilator [Nontrivial M]
    [Module.Finite R M] {r} (h : r ∈ (Module.annihilator R M).jacobson) :
    (⊤ : Submodule R M) ≠ r • ⊤


theorem IsClopen.prod {t : Set Y} (hs : IsClopen s) (ht : IsClopen t) : IsClopen (s ×ˢ t)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{t : Set Y}
(hs : IsClopen s)
(ht : IsClopen t)


/-- Construct an isomorphism of monoids by giving an isomorphism between the underlying objects
and checking compatibility with unit and multiplication only in the forward direction.
-/
@[simps]
def mkIso {M N : Mon_ C} (f : M.X ≅ N.X) (one_f : M.one ≫ f.hom = N.one := by aesop_cat)
    (mul_f : M.mul ≫ f.hom = (f.hom ⊗ f.hom) ≫ N.mul := by aesop_cat) : M ≅ N

(Mon_.mkIso f one_f mul_f).inv.hom = f.inv


lemma regularityReduced_le : G.regularityReduced P ε δ ≤ G

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
[DecidableEq α]
{A : Finset α}
{P : Finpartition A}
{G : SimpleGraph α}
[DecidableRel G.Adj]
{ε δ : 𝕜}

SimpleGraph.regularityReduced P G ε δ ≤ G


/-- There are `⌈(b - v) / r⌉ - ⌈(a - v) / r⌉` numbers congruent to `v` mod `r` in `[a, b)`,
if `a ≤ b`. `Nat` version of `Int.Ico_filter_modEq_card`. -/
theorem Ico_filter_modEq_card (v : ℕ) : ((Ico a b).filter (· ≡ v [MOD r])).card =
    max (⌈(b - v) / (r : ℚ)⌉ - ⌈(a - v) / (r : ℚ)⌉) 0

↑(Finset.filter (fun x => x ≡ v [MOD r]) (Finset.Ico a b)).card = max (⌈(↑b - ↑v) / ↑r⌉ - ⌈(↑a - ↑v) / ↑r⌉) 0


@[to_additive (attr := simp)]
theorem mul_left_inj (a : G) {b c : G} : b * a = c * a ↔ b = c

{G : Type u_3}
[Mul G]
[IsRightCancelMul G]
(a : G)
{b c : G}


@[simp] theorem runK_bind_get (f : σ → StateCpsT σ m β) (s : σ) (k : β → σ → m γ) : (get >>= f).runK s k = (f s).runK s k

{σ : Type u}
{m : Type u → Type v}
{β γ : Type u}
(f : σ → StateCpsT σ m β)
(s : σ)
(k : β → σ → m γ)


theorem omega_le_oadd (e n a) : ω ^ repr e ≤ repr (oadd e n a)


theorem Squash.ind {α : Type u} {motive : Squash α → Prop} (h : ∀ (a : α), motive (Squash.mk a)) : ∀ (q : Squash α), motive q

{α : Type u}
{motive : Squash α → Prop}
(h : ∀ (a : α), motive (Squash.mk a))
(q : Squash α)


@[simp]
lemma opcyclesMap_id [HasRightHomology S] :
    opcyclesMap (𝟙 S) = 𝟙 _

CategoryTheory.ShortComplex.opcyclesMap (CategoryTheory.CategoryStruct.id S) =
  CategoryTheory.CategoryStruct.id S.opcycles


lemma smul_mem_W_iff {X Y : C} (f : X ⟶ Y) (n : ℤˣ) :
    S.W (n • f) ↔ S.W f

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

(S : CategoryTheory.Triangulated.Subcategory C)


theorem IsPrimePow.not_unit {n : R} (h : IsPrimePow n) : ¬IsUnit n

{R : Type u_1}
[CommMonoidWithZero R]
{n : R}
(h : IsPrimePow n)


@[to_additive (attr := simp)]
theorem div_neBot_iff : (f / g).NeBot ↔ f.NeBot ∧ g.NeBot


@[simp]
theorem iterate_comp_eval₂ (k : ℕ) (t : S) :
    eval₂ f t (p.comp^[k] q) = (fun x => eval₂ f x p)^[k] (eval₂ f t q)

{R : Type u}
{S : Type v}
[Semiring R]
{p q : R[X]}
[CommSemiring S]
(f : R →+* S)
(k : ℕ)
(t : S)

Polynomial.eval₂ f t (p.comp^[k] q) = (fun x => Polynomial.eval₂ f x p)^[k] (Polynomial.eval₂ f t q)


theorem map_iInf_comap_of_surjective {ι : Sort*} (S : ι → Submodule R₂ M₂) :
    (⨅ i, (S i).comap f).map f = iInf S

{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₂}
{F : Type u_9}
[FunLike F M M₂]
[SemilinearMapClass F σ₁₂ M M₂]
[RingHomSurjective σ₁₂]
{f : F}
(hf : Function.Surjective ⇑f)
{ι : Sort u_10}
(S : ι → Submodule R₂ M₂)

Submodule.map f (⨅ i, Submodule.comap f (S i)) = iInf S


/-- The map `v ↦ v +ᵥ b` as an affine equivalence between a module `V` and an affine space `P` with
tangent space `V`. -/
@[simps! linear apply symm_apply]
def vaddConst (b : P₁) : V₁ ≃ᵃ[k] P₁

(k : Type u_1)
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(b : P₁)

(AffineEquiv.vaddConst k b).linear = LinearEquiv.refl k V₁


/-- `CompatiblePreserving` functors indeed preserve compatible families. -/
theorem Presieve.FamilyOfElements.Compatible.functorPushforward :
    (x.functorPushforward G).Compatible

{K : CategoryTheory.GrothendieckTopology D}

(hG : CategoryTheory.CompatiblePreserving K G)

{x : CategoryTheory.Presieve.FamilyOfElements (G.op ⋙ ℱ.val) T}


theorem le_iff_sub_nonneg {x y : PGame} : x ≤ y ↔ 0 ≤ y - x


@[simp]
theorem mem_top {x : A} : x ∈ (⊤ : StarSubalgebra R A)

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[StarRing R]
[Semiring A]
[Algebra R A]
[StarRing A]
[StarModule R A]
{x : A}


lemma homotopyEquivalences_le_quasiIso [CategoryWithHomology C] :
    homotopyEquivalences C c ≤ quasiIso C c

{ι : Type u_1}
(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(c : ComplexShape ι)
[CategoryTheory.CategoryWithHomology C]

HomologicalComplex.homotopyEquivalences C c ≤ HomologicalComplex.quasiIso C c


theorem add_smul : (r + s) • x = r • x + s • x

{R : Type u_2}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(r s : R)
(x : M)


theorem map_smul_of_tower {R'} [SMul R' A] [SMul R' B] [LinearMap.CompatibleSMul A B R' R] (r : R')
    (x : A) : φ (r • x) = r • φ x

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(φ : A →ₐ[R] B)
{R' : Type u_1}
[SMul R' A]
[SMul R' B]
[LinearMap.CompatibleSMul A B R' R]
(r : R')
(x : A)


lemma degree_norm_ne_one [IsDomain R] (x : W.CoordinateRing) :
    (Algebra.norm R[X] x).degree ≠ 1

{R : Type u}
[CommRing R]
{W : WeierstrassCurve.Affine R}
[IsDomain R]
(x : W.CoordinateRing)


theorem mem_filter_of_mem {a : α} {l} (m : a ∈ l) (h : p a) : a ∈ filter p l

{α : Type u_1}
{p : α → Prop}
[DecidablePred p]
{a : α}
{l : Multiset α}
(m : a ∈ l)
(h : p a)


@[simp]
theorem deriv_pow' : (deriv fun x : 𝕜 => x ^ n) = fun x => (n : 𝕜) * x ^ (n - 1)

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

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


theorem lt.elim {a b : ℤ} (h : a < b) {P : Prop} (h' : ∀ n : ℕ, a + ↑(Nat.succ n) = b → P) : P

{a b : ℤ}
(h : a < b)
{P : Prop}
(h' : ∀ (n : ℕ), a + ↑n.succ = b → P)


@[to_additive (attr := simp)]
theorem mrange_mk : MonoidHom.mrange (@mk M N _ _) = ⊤

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


theorem comp_update {α' : Sort*} {β : Sort*} (f : α' → β) (g : α → α') (i : α) (v : α') :
    f ∘ update g i v = update (f ∘ g) i (f v)

{α : Sort u}
[DecidableEq α]
{α' : Sort u_1}
{β : Sort u_2}
(f : α' → β)
(g : α → α')
(i : α)
(v : α')

f ∘ Function.update g i v = Function.update (f ∘ g) i (f v)


@[simp]
theorem coeff_coe_powerSeries (x : PowerSeries R) (n : ℕ) :
    HahnSeries.coeff (x : LaurentSeries R) n = PowerSeries.coeff R n x

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

((HahnSeries.ofPowerSeries ℤ R) x).coeff ↑n = (PowerSeries.coeff R n) x


/-- We have that `η ^ 2 + η + 1 = 0`. -/
lemma eta_sq_add_eta_add_one : (η : 𝓞 K) ^ 2 + η + 1 = 0

{K : Type u_1}
[Field K]
{ζ : K}
(hζ : IsPrimitiveRoot ζ ↑3)


/-- Characterization of uniform equicontinuity for families of functions taking values in a
(pseudo) metric space. -/
theorem uniformEquicontinuous_iff_right {ι : Type*} [UniformSpace β] {F : ι → β → α} :
    UniformEquicontinuous F ↔ ∀ ε > 0, ∀ᶠ xy : β × β in 𝓤 β, ∀ i, dist (F i xy.1) (F i xy.2) < ε

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
{ι : Type u_4}
[UniformSpace β]
{F : ι → β → α}

UniformEquicontinuous F ↔ ∀ ε > 0, ∀ᶠ (xy : β × β) in 𝓤 β, ∀ (i : ι), dist (F i xy.1) (F i xy.2) < ε


@[to_additive]
lemma compl_mul_closure_one_eq {t : Set G} (ht : t * (closure {1} : Set G) = t) :
    tᶜ * (closure {1} : Set G) = tᶜ

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{t : Set G}
(ht : t + closure {0} = t)


@[simp]
theorem algEquivOfLinearEquivTripleTensorProduct_apply (f h_mul h_one x) :
    (algEquivOfLinearEquivTripleTensorProduct f h_mul h_one : (A ⊗[R] B) ⊗[R] C ≃ₐ[R] D) x = f x

(h_mul :
  ∀ (a₁ a₂ : A) (b₁ b₂ : B) (c₁ c₂ : C),
    f (((a₁ * a₂) ⊗ₜ[R] (b₁ * b₂)) ⊗ₜ[R] (c₁ * c₂)) = f ((a₁ ⊗ₜ[R] b₁) ⊗ₜ[R] c₁) * f ((a₂ ⊗ₜ[R] b₂) ⊗ₜ[R] c₂))

(Algebra.TensorProduct.algEquivOfLinearEquivTripleTensorProduct f h_mul h_one) x = f x


theorem coimageImageComparison_app' :
    (coimageImageComparison α).app X =
      (coimageObjIso α X).hom ≫ coimageImageComparison (α.app X) ≫ (imageObjIso α X).inv

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type w}
[CategoryTheory.Category.{z, w} D]
[CategoryTheory.Abelian D]
{F G : CategoryTheory.Functor C D}
(α : F ⟶ G)
(X : C)

(CategoryTheory.Abelian.coimageImageComparison α).app X =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Abelian.FunctorCategory.coimageObjIso α X).hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Abelian.coimageImageComparison (α.app X))
      (CategoryTheory.Abelian.FunctorCategory.imageObjIso α X).inv)


/-- The canonical functor `Karoubi (Karoubi C) ⥤ Karoubi C` -/
@[simps]
def inverse : Karoubi (Karoubi C) ⥤ Karoubi C

(P : CategoryTheory.Idempotents.Karoubi (CategoryTheory.Idempotents.Karoubi C))

((CategoryTheory.Idempotents.KaroubiKaroubi.inverse C).obj P).X = P.X.X


theorem measure_zero_of_dimH_lt {μ : Measure X} {d : ℝ≥0} (h : μ ≪ μH[d]) {s : Set X}
    (hd : dimH s < d) : μ s = 0

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{μ : MeasureTheory.Measure X}
{d : ℝ≥0}
(h : μ ≪ μH[↑d])
{s : Set X}
(hd : dimH s < ↑d)


/-- The *adjoint action* of a rack on itself is `op'`, and the adjoint
action of `x ◃ y` is the conjugate of the action of `y` by the action
of `x`. It is another way to understand the self-distributivity axiom.

This is used in the natural rack homomorphism `toConj` from `R` to
`Conj (R ≃ R)` defined by `op'`.
-/
theorem ad_conj {R : Type*} [Rack R] (x y : R) : act' (x ◃ y) = act' x * act' y * (act' x)⁻¹

Rack.act' (x ◃ y) = Rack.act' x * Rack.act' y * (Rack.act' x)⁻¹


theorem smul_mem (t : R) {x : L} (h : x ∈ L') : t • x ∈ L'

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(L' : LieSubalgebra R L)
(t : R)
{x : L}
(h : x ∈ L')


theorem measure_ball_pos (x : X) {r : ℝ≥0∞} (hr : r ≠ 0) : 0 < μ (ball x r)

{X : Type u_1}
[PseudoEMetricSpace X]
{m : MeasurableSpace X}
(μ : MeasureTheory.Measure X)
[μ.IsOpenPosMeasure]
(x : X)
{r : ℝ≥0∞}
(hr : r ≠ 0)


@[gcongr]
theorem inf_le_inf_right (a : α) {b c : α} (h : b ≤ c) : b ⊓ a ≤ c ⊓ a

{α : Type u}
[SemilatticeInf α]
(a : α)
{b c : α}
(h : b ≤ c)


/-- A finite dimensional submodule over `ℝ` or `ℂ` is `Submodule.ClosedComplemented`. -/
lemma Submodule.ClosedComplemented.of_finiteDimensional (p : Submodule 𝕜 F)
    [FiniteDimensional 𝕜 p] : p.ClosedComplemented

{𝕜 : Type u_1}
[RCLike 𝕜]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(p : Submodule 𝕜 F)
[FiniteDimensional 𝕜 ↥p]


theorem lawful_beq_subsingleton {α : Type*} (inst1 : BEq α) (inst2 : BEq α)
    [@LawfulBEq α inst1] [@LawfulBEq α inst2] :
    inst1 = inst2

{α : Type u_1}
(inst1 inst2 : BEq α)
[LawfulBEq α]
[LawfulBEq α]


/-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y')

{X : Type u_1}
{X' : Type u_2}
{Y : Type u_3}
{Y' : Type u_4}
[TopologicalSpace X]
[TopologicalSpace X']
[TopologicalSpace Y]
[TopologicalSpace Y']
(eX : PartialHomeomorph X X')
(eY : PartialHomeomorph Y Y')

↑(eX.prod eY) = fun p => (↑eX p.1, ↑eY p.2)


@[simp] lemma analyticWithinAt_univ {f : E → F} {x : E} :
    AnalyticWithinAt 𝕜 f univ x ↔ AnalyticAt 𝕜 f x

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

AnalyticWithinAt 𝕜 f Set.univ x ↔ AnalyticAt 𝕜 f x


@[simp]
theorem adjoin_eq_bot_iff : adjoin F S = ⊥ ↔ S ⊆ (⊥ : IntermediateField F E)

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

IntermediateField.adjoin F S = ⊥ ↔ S ⊆ ↑⊥


theorem sub_self {X Y : C} (a : X ⟶ Y) : a - a = 0


theorem one_div_pow_lt_one_div_pow_of_lt (a1 : 1 < a) {m n : ℕ} (mn : m < n) :
    1 / a ^ n < 1 / a ^ m

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(a1 : 1 < a)
{m n : ℕ}
(mn : m < n)


theorem RightInverse.surjective {f : α → β} {g : β → α} (h : RightInverse g f) : Surjective f

{α : Sort u₁}
{β : Sort u₂}
{f : α → β}
{g : β → α}
(h : Function.RightInverse g f)


/-- Right-exactness of tensor product -/
lemma lTensor_mkQ (N : Submodule R M) :
    ker (lTensor Q (N.mkQ)) = range (lTensor Q N.subtype)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(Q : Type u_5)
[AddCommGroup Q]
[Module R Q]
(N : Submodule R M)

LinearMap.ker (LinearMap.lTensor Q N.mkQ) = LinearMap.range (LinearMap.lTensor Q N.subtype)


private theorem bracket_def (x : A ⊗[R] L) (m : A ⊗[R] M) : ⁅x, m⁆ = bracket' R A L M x m

(R : Type u_1)
(A : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[CommRing A]
[Algebra R A]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
(x : A ⊗[R] L)
(m : A ⊗[R] M)

⁅x, m⁆ = ((LieAlgebra.ExtendScalars.bracket' R A L M) x) m


@[to_additive]
protected theorem left_comm (h : IsMulCentral a) (b c) : a * (b * c) = b * (a * c)

{M : Type u_1}
{a : M}
[Add M]
(h : IsAddCentral a)
(b c : M)


/-- A sequence `f` with values in an additive topological group `R` is summable on the
residue class of `k` mod `m` if and only if `f (m*n + k)` is summable. -/
lemma summable_indicator_mod_iff_summable {R : Type*} [AddCommGroup R] [TopologicalSpace R]
    [TopologicalAddGroup R] (m : ℕ) [hm : NeZero m] (k : ℕ) (f : ℕ → R) :
    Summable ({n : ℕ | (n : ZMod m) = k}.indicator f) ↔ Summable fun n ↦ f (m * n + k)

{R : Type u_1}
[AddCommGroup R]
[TopologicalSpace R]
[TopologicalAddGroup R]
(m : ℕ)
[hm : NeZero m]
(k : ℕ)
(f : ℕ → R)

Summable ({n | ↑n = ↑k}.indicator f) ↔ Summable fun n => f (m * n + k)


@[to_additive]
theorem orbit_eq_univ [IsPretransitive M α] (a : α) : orbit M a = Set.univ

(M : Type u)
[AddMonoid M]
{α : Type v}
[AddAction M α]
[AddAction.IsPretransitive M α]
(a : α)


theorem map_isLeast (hf : RightOrdContinuous f) {s : Set α} {x : α} (h : IsLeast s x) :
    IsLeast (f '' s) (f x)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : RightOrdContinuous f)
{s : Set α}
{x : α}
(h : IsLeast s x)


theorem of_comp_finite {f : A →ₐ[R] B} {g : B →ₐ[R] C} (h : (g.comp f).Finite) : g.Finite

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommRing R]
[CommRing A]
[CommRing B]
[CommRing C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
{f : A →ₐ[R] B}
{g : B →ₐ[R] C}
(h : (g.comp f).Finite)


theorem coe_injective' [Fact (Irreducible f)] : Function.Injective ((↑) : K → AdjoinRoot f)

{K : Type w}
[Field K]
{f : K[X]}
[Fact (Irreducible f)]


/-- Pointwise infimum of two monotone functions is a monotone function. -/
protected theorem inf [Preorder α] [SemilatticeInf β] {f g : α → β} (hf : Antitone f)
    (hg : Antitone g) :
    Antitone (f ⊓ g)

{α : Type u}
{β : Type v}
[Preorder α]
[SemilatticeInf β]
{f g : α → β}
(hf : Antitone f)
(hg : Antitone g)


@[simp]
theorem mem_ofCardinalInter {l : Set (Set α)} (hc : 2 < c)
    (hl : ∀ S : Set (Set α), (#S < c) → S ⊆ l → ⋂₀ S ∈ l) (h_mono : ∀ s t, s ∈ l → s ⊆ t → t ∈ l)
    {s : Set α} : s ∈ Filter.ofCardinalInter l hc hl h_mono ↔ s ∈ l

(hl : ∀ (S : Set (Set α)), #↑S < c → S ⊆ l → ⋂₀ S ∈ l)

(h_mono : ∀ (s t : Set α), s ∈ l → s ⊆ t → t ∈ l)


@[to_additive]
theorem one_div_mul_one_div : 1 / a * (1 / b) = 1 / (a * b)

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


@[simp]
theorem BilinForm.toMatrix'_comp (B : BilinForm R₂ (n → R₂)) (l r : (o → R₂) →ₗ[R₂] n → R₂) :
    BilinForm.toMatrix' (B.comp l r) =
      (LinearMap.toMatrix' l)ᵀ * BilinForm.toMatrix' B * LinearMap.toMatrix' r

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
{o : Type u_12}
[Fintype n]
[Fintype o]
[DecidableEq n]
[DecidableEq o]
(B : LinearMap.BilinForm R₂ (n → R₂))
(l r : (o → R₂) →ₗ[R₂] n → R₂)

LinearMap.BilinForm.toMatrix' (B.comp l r) =
  (LinearMap.toMatrix' l).transpose * LinearMap.BilinForm.toMatrix' B * LinearMap.toMatrix' r


@[to_additive]
theorem mem_iInf {ι : Sort*} {S : ι → Submonoid M} {x : M} : (x ∈ ⨅ i, S i) ↔ ∀ i, x ∈ S i

{M : Type u_1}
[MulOneClass M]
{ι : Sort u_4}
{S : ι → Submonoid M}
{x : M}


@[simp]
theorem dom_some (x : ℕ) : (some x).Dom


theorem isIrreducible_irreducibleComponent {x : X} : IsIrreducible (irreducibleComponent x)

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


@[to_additive mul_nsmul] lemma pow_mul (a : M) (m : ℕ) : ∀ n, a ^ (m * n) = (a ^ m) ^ n

{M : Type u_2}
[Monoid M]
(a : M)
(m n : ℕ)


@[simp]
theorem snd_ssubset_snd_iff : c.snd ⊂ d.snd ↔ d < c

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
{c d : Concept α β r}


/-- Composing the preadditive yoneda embedding with the forgetful functor yields the regular
Yoneda embedding.
-/
@[simp]
theorem whiskering_preadditiveCoyoneda :
    preadditiveCoyoneda ⋙
        (whiskeringRight C AddCommGrp (Type v)).obj (forget AddCommGrp) =
      coyoneda

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

CategoryTheory.preadditiveCoyoneda.comp
    ((CategoryTheory.whiskeringRight C AddCommGrp (Type v)).obj (CategoryTheory.forget AddCommGrp)) =
  CategoryTheory.coyoneda


/-- In a (nontrivial) complex Banach algebra, every element has nonempty spectrum. -/
protected theorem nonempty : (spectrum ℂ a).Nonempty

{A : Type u_2}
[NormedRing A]
[NormedAlgebra ℂ A]
[CompleteSpace A]
[Nontrivial A]
(a : A)


theorem supIndep_torsionBy : S.SupIndep fun i => torsionBy R M <| q i

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{ι : Type u_3}
{S : Finset ι}
{q : ι → R}
(hq : (↑S).Pairwise (IsCoprime on q))

S.SupIndep fun i => Submodule.torsionBy R M (q i)


theorem lhomWithConstants_injective : (L.lhomWithConstants α).Injective


theorem integrable_withDensity_iff_integrable_coe_smul₀ {f : α → ℝ≥0} (hf : AEMeasurable f μ)
    {g : α → E} :
    Integrable g (μ.withDensity fun x => f x) ↔ Integrable (fun x => (f x : ℝ) • g x) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : α → ℝ≥0}
(hf : AEMeasurable f μ)
{g : α → E}

MeasureTheory.Integrable g (μ.withDensity fun x => ↑(f x)) ↔ MeasureTheory.Integrable (fun x => ↑(f x) • g x) μ


/-- Analytic functions on products are analytic in the second coordinate -/
theorem AnalyticAt.curry_right {f : E × F → G} {p : E × F} (fa : AnalyticAt 𝕜 f p) :
    AnalyticAt 𝕜 (fun y ↦ f (p.1, y)) p.2

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
{G : Type u_5}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E × F → G}
{p : E × F}
(fa : AnalyticAt 𝕜 f p)


/-- This is the computation performed in the proof of [Halmos, §60 Th. A]. -/
@[to_additive "This is the computation performed in the proof of [Halmos, §60 Th. A]."]
theorem measure_mul_lintegral_eq [IsMulLeftInvariant ν] (sm : MeasurableSet s) (f : G → ℝ≥0∞)
    (hf : Measurable f) : (μ s * ∫⁻ y, f y ∂ν) = ∫⁻ x, ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
{s : Set G}
[MeasurableInv G]
[μ.IsMulLeftInvariant]
[ν.IsMulLeftInvariant]
(sm : MeasurableSet s)
(f : G → ℝ≥0∞)
(hf : Measurable f)

μ s * ∫⁻ (y : G), f y ∂ν = ∫⁻ (x : G), ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ


theorem digits_eq_cons_digits_div {b n : ℕ} (h : 1 < b) (w : n ≠ 0) :
    digits b n = (n % b) :: digits b (n / b)


theorem Inducing.isPreconnected_image [TopologicalSpace β] {s : Set α} {f : α → β}
    (hf : Inducing f) : IsPreconnected (f '' s) ↔ IsPreconnected s

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
{s : Set α}
{f : α → β}
(hf : Inducing f)


theorem X_sub_C_pow_dvd_iff {p : R[X]} {t : R} {n : ℕ} :
    (X - C t) ^ n ∣ p ↔ X ^ n ∣ p.comp (X + C t)

{R : Type u}
[CommRing R]
{p : R[X]}
{t : R}
{n : ℕ}

(Polynomial.X - Polynomial.C t) ^ n ∣ p ↔ Polynomial.X ^ n ∣ p.comp (Polynomial.X + Polynomial.C t)


theorem image_symm_preimage {α β} {f : α → β} (hf : Injective f) (u s : Set α) :
    (fun x => (Set.image f s hf).symm x : f '' s → α) ⁻¹' u = Subtype.val ⁻¹' (f '' u)

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

(fun x => ↑((Equiv.Set.image f s hf).symm x)) ⁻¹' u = Subtype.val ⁻¹' (f '' u)


theorem noncommFoldr_eq_foldr (s : Multiset α) (h : LeftCommutative f) (b : β) :
    noncommFoldr f s (fun x _ y _ _ => h x y) b = foldr f h b s

{α : Type u_3}
{β : Type u_4}
(f : α → β → β)
(s : Multiset α)
(h : LeftCommutative f)
(b : β)

Multiset.noncommFoldr f s ⋯ b = Multiset.foldr f h b s


theorem dite_cond_eq_false {α : Sort u} {c : Prop} {_ : Decidable c} {t : c → α} {e : ¬ c → α} (h : c = False) : (dite c t e) = e (of_eq_false h)

∀ {x : Decidable c} {t : c → α} {e : ¬c → α} (h : c = False), dite c t e = e ⋯


theorem eval_continuous (y : F) : Continuous fun x : WeakBilin B => B x y

{𝕜 : Type u_2}
{E : Type u_5}
{F : Type u_6}
[TopologicalSpace 𝕜]
[CommSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[AddCommMonoid F]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
(y : F)


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

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : γ →. δ)
(g : β →. γ)
(h : α →. β)


{α : Type u}
{β : Type v}
[Preorder α]
[PartialOrder β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)


theorem finrank_eq_zero_of_basis_imp_false (h : ∀ s : Finset M, Basis.{v} (s : Set M) R M → False) :
    finrank R M = 0

(h : ∀ (s : Finset M), Basis (↑↑s) R M → False)


theorem symmDiff_right_comm : a ∆ b ∆ c = a ∆ c ∆ b

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


theorem conjTranspose_smul_self [Mul α] [StarMul α] (c : α) (M : Matrix m n α) :
    (c • M)ᴴ = MulOpposite.op (star c) • Mᴴ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Mul α]
[StarMul α]
(c : α)
(M : Matrix m n α)


theorem finitePresentation : Algebra.FinitePresentation R (AdjoinRoot f)


@[simp]
theorem conj_apply [Group G] (g h : G) : conj g h = g * h * g⁻¹


@[to_additive]
theorem Function.Injective.isOfFinOrder_iff [Monoid H] {f : G →* H} (hf : Injective f) :
    IsOfFinOrder (f x) ↔ IsOfFinOrder x

{G : Type u_1}
{H : Type u_2}
[Monoid G]
{x : G}
[Monoid H]
{f : G →* H}
(hf : Function.Injective ⇑f)


theorem moveLeft_nim {o : Ordinal} (i) : (nim o).moveLeft (toLeftMovesNim i) = nim i

(SetTheory.PGame.nim o).moveLeft (SetTheory.PGame.toLeftMovesNim i) = SetTheory.PGame.nim ↑i


@[simp]
theorem ComponentCompl.mem_supp_iff {v : V} {C : ComponentCompl G K} :
    v ∈ C ↔ ∃ vK : v ∉ K, G.componentComplMk vK = C

{V : Type u}
{G : SimpleGraph V}
{K : Set V}
{v : V}
{C : G.ComponentCompl K}

v ∈ C ↔ ∃ (vK : v ∉ K), G.componentComplMk vK = C


@[simp] theorem is_le' {a : Fin n} : a ≤ n


theorem tendstoLocallyUniformlyOn_iff_filter :
    TendstoLocallyUniformlyOn F f p s ↔ ∀ x ∈ s, TendstoUniformlyOnFilter F f p (𝓝[s] x)

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{p : Filter ι}
[TopologicalSpace α]


theorem ord_cof (hf : IsFundamentalSequence a o f) :
    IsFundamentalSequence a a.cof.ord fun i hi => f i (hi.trans_le (by rw [hf.cof_eq]))

{f : (b : Ordinal.{u}) → b < o → Ordinal.{u}}

a.IsFundamentalSequence a.cof.ord fun i hi => f i ⋯


theorem mem_carrier {s : NonUnitalStarSubsemiring R} {x : R} : x ∈ s.carrier ↔ x ∈ s

{R : Type v}
[NonUnitalNonAssocSemiring R]
[StarRing R]
{s : NonUnitalStarSubsemiring R}
{x : R}


theorem sin_ne_zero_iff {x : ℝ} : sin x ≠ 0 ↔ ∀ n : ℤ, (n : ℝ) * π ≠ x

Real.sin x ≠ 0 ↔ ∀ (n : ℤ), ↑n * Real.pi ≠ x


theorem geom_le {u : ℕ → ℝ} {c : ℝ} (hc : 0 ≤ c) (n : ℕ) (h : ∀ k < n, c * u k ≤ u (k + 1)) :
    c ^ n * u 0 ≤ u n


theorem Filter.limUnder_eq_iff {f : Filter Y} [NeBot f] {g : Y → X} (h : ∃ x, Tendsto g f (𝓝 x))
    {x} : @limUnder _ _ _ ⟨x⟩ f g = x ↔ Tendsto g f (𝓝 x)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[T2Space X]
{f : Filter Y}
[f.NeBot]
{g : Y → X}
(h : ∃ x, Filter.Tendsto g f (𝓝 x))
{x : X}

limUnder f g = x ↔ Filter.Tendsto g f (𝓝 x)


theorem mem_extremePoints : x ∈ A.extremePoints 𝕜 ↔
    x ∈ A ∧ ∀ᵉ (x₁ ∈ A) (x₂ ∈ A), x ∈ openSegment 𝕜 x₁ x₂ → x₁ = x ∧ x₂ = x

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{A : Set E}
{x : E}

x ∈ Set.extremePoints 𝕜 A ↔ x ∈ A ∧ ∀ x₁ ∈ A, ∀ x₂ ∈ A, x ∈ openSegment 𝕜 x₁ x₂ → x₁ = x ∧ x₂ = x


@[simp]
theorem curry_uncurry (f : X ⟶ A ⟶[C] Y) : curry (uncurry f) = f

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

CategoryTheory.MonoidalClosed.curry (CategoryTheory.MonoidalClosed.uncurry f) = f


@[simp] theorem SatisfiesM_StateT_eq [Monad m] [LawfulMonad m] :
    SatisfiesM (m := StateT ρ m) (α := α) p x ↔ ∀ s, SatisfiesM (m := m) (p ·.1) (x s)

{m : Type u_1 → Type u_2}
{α ρ : Type u_1}
{p : α → Prop}
{x : StateT ρ m α}
[Monad m]
[LawfulMonad m]

SatisfiesM p x ↔ ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s)


theorem neg_congr {R} [Ring R] {a a' b : R} (_ : a = a')
    (_ : -a' = b) : (-a : R) = b


Complex.tan (x + y) = (Complex.tan x + Complex.tan y) / (1 - Complex.tan x * Complex.tan y)


theorem StableUnderBaseChange.diagonal (hP : StableUnderBaseChange P) [P.RespectsIso] :
    P.diagonal.StableUnderBaseChange

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasPullbacks C]
{P : CategoryTheory.MorphismProperty C}
(hP : P.StableUnderBaseChange)
[P.RespectsIso]


lemma lt_last_iff_ne_last {a : Fin (n + 1)} : a < last n ↔ a ≠ last n


@[to_additive]
theorem tprod_eq_zero_mul'
    {f : ℕ → M} (hf : Multipliable (fun n ↦ f (n + 1))) :
    ∏' b, f b = f 0 * ∏' b, f (b + 1)

{M : Type u_1}
[CommMonoid M]
[TopologicalSpace M]
[T2Space M]
[ContinuousMul M]
{f : ℕ → M}
(hf : Multipliable fun n => f (n + 1))


/-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : X ≃ₜ Y)
(s : Set X)
(hs : IsOpen s)
(t : Set Y)
(h : ⇑e '' s = t)

(e.toPartialHomeomorphOfImageEq s hs t h).toPartialEquiv = e.toPartialEquivOfImageEq s t h


@[to_additive]
theorem comap_inf (S T : Subsemigroup N) (f : M →ₙ* N) : (S ⊓ T).comap f = S.comap f ⊓ T.comap f

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
(S T : AddSubsemigroup N)
(f : AddHom M N)

AddSubsemigroup.comap f (S ⊓ T) = AddSubsemigroup.comap f S ⊓ AddSubsemigroup.comap f T


/--
The map `Aᵢ ⟶ ⨂ᵢ Aᵢ` given by `a ↦ 1 ⊗ ... ⊗ a ⊗ 1 ⊗ ...`
-/
@[simps]
def singleAlgHom [DecidableEq ι] (i : ι) : A i →ₐ[R] ⨂[R] i, A i

{ι : Type u_1}
{R : Type u_3}
{A : ι → Type u_4}
[CommSemiring R]
[(i : ι) → Semiring (A i)]
[(i : ι) → Algebra R (A i)]
[DecidableEq ι]
(i : ι)
(a : A i)

(PiTensorProduct.singleAlgHom i) a = (PiTensorProduct.tprod R) ((MonoidHom.mulSingle A i) a)


theorem EqOn.trans (h₁ : EqOn f₁ f₂ s) (h₂ : EqOn f₂ f₃ s) : EqOn f₁ f₃ s

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


/-- The diagram of the multifork attached to a presheaf
`F : Cᵒᵖ ⥤ A`, `S : C` and `E : PreOneHypercover S`. -/
@[simps]
def multicospanIndex (F : Cᵒᵖ ⥤ A) : MulticospanIndex A

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{A : Type u_1}
[CategoryTheory.Category.{u_2, u_1} A]
{S : C}
(E : CategoryTheory.PreOneHypercover S)
(F : CategoryTheory.Functor Cᵒᵖ A)


protected theorem «forall» {p : G.ConnectedComponent → Prop} :
    (∀ c : G.ConnectedComponent, p c) ↔ ∀ v, p (G.connectedComponentMk v)

{V : Type u}
{G : SimpleGraph V}
{p : G.ConnectedComponent → Prop}

(∀ (c : G.ConnectedComponent), p c) ↔ ∀ (v : V), p (G.connectedComponentMk v)


/-- Define the first primitive quadratic character on `ZMod 8`, `χ₈`.
It corresponds to the extension `ℚ(√2)/ℚ`. -/
@[simps]
def χ₈ : MulChar (ZMod 8) ℤ


/-- This lemma shows that `Inf` and `restrict` commute for measures. -/
theorem restrict_sInf_eq_sInf_restrict {m0 : MeasurableSpace α} {m : Set (Measure α)}
    (hm : m.Nonempty) (ht : MeasurableSet t) :
    (sInf m).restrict t = sInf ((fun μ : Measure α => μ.restrict t) '' m)

{α : Type u_2}
{t : Set α}
{m0 : MeasurableSpace α}
{m : Set (MeasureTheory.Measure α)}
(hm : m.Nonempty)
(ht : MeasurableSet t)

(sInf m).restrict t = sInf ((fun μ => μ.restrict t) '' m)


/-- **Taylor's theorem** with the general mean value form of the remainder.

We assume that `f` is `n+1`-times continuously differentiable in the closed set `Icc x₀ x` and
`n+1`-times differentiable on the open set `Ioo x₀ x`, and `g` is a differentiable function on
`Ioo x₀ x` and continuous on `Icc x₀ x`. Then there exists an `x' ∈ Ioo x₀ x` such that
$$f(x) - (P_n f)(x₀, x) = \frac{(x - x')^n}{n!} \frac{g(x) - g(x₀)}{g' x'},$$
where $P_n f$ denotes the Taylor polynomial of degree $n$. -/
theorem taylor_mean_remainder {f : ℝ → ℝ} {g g' : ℝ → ℝ} {x x₀ : ℝ} {n : ℕ} (hx : x₀ < x)
    (hf : ContDiffOn ℝ n f (Icc x₀ x))
    (hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Icc x₀ x)) (Ioo x₀ x))
    (gcont : ContinuousOn g (Icc x₀ x))
    (gdiff : ∀ x_1 : ℝ, x_1 ∈ Ioo x₀ x → HasDerivAt g (g' x_1) x_1)
    (g'_ne : ∀ x_1 : ℝ, x_1 ∈ Ioo x₀ x → g' x_1 ≠ 0) :
    ∃ x' ∈ Ioo x₀ x, f x - taylorWithinEval f n (Icc x₀ x) x₀ x =
    ((x - x') ^ n / n ! * (g x - g x₀) / g' x') • iteratedDerivWithin (n + 1) f (Icc x₀ x) x'

(hf : ContDiffOn ℝ (↑n) f (Set.Icc x₀ x))

(hf' : DifferentiableOn ℝ (iteratedDerivWithin n f (Set.Icc x₀ x)) (Set.Ioo x₀ x))

(gdiff : ∀ x_1 ∈ Set.Ioo x₀ x, HasDerivAt g (g' x_1) x_1)

(g'_ne : ∀ x_1 ∈ Set.Ioo x₀ x, g' x_1 ≠ 0)

∃ x' ∈ Set.Ioo x₀ x,
  f x - taylorWithinEval f n (Set.Icc x₀ x) x₀ x =
    ((x - x') ^ n / ↑n ! * (g x - g x₀) / g' x') • iteratedDerivWithin (n + 1) f (Set.Icc x₀ x) x'


theorem fderivWithin_multiset_prod [DecidableEq ι] {u : Multiset ι} {x : E}
    (hxs : UniqueDiffWithinAt 𝕜 s x) (h : ∀ i ∈ u, DifferentiableWithinAt 𝕜 (g i ·) s x) :
    fderivWithin 𝕜 (fun x ↦ (u.map (g · x)).prod) s x =
      (u.map fun i ↦ ((u.erase i).map (g · x)).prod • fderivWithin 𝕜 (g i) s x).sum

(h : ∀ i ∈ u, DifferentiableWithinAt 𝕜 (fun x => g i x) s x)

fderivWithin 𝕜 (fun x => (Multiset.map (fun x_1 => g x_1 x) u).prod) s x =
  (Multiset.map (fun i => (Multiset.map (fun x_1 => g x_1 x) (u.erase i)).prod • fderivWithin 𝕜 (g i) s x) u).sum


/-- The values of a Dirichlet character with target a normed field have norm bounded by `1`. -/
lemma norm_le_one (a : ZMod n) : ‖χ a‖ ≤ 1

{F : Type u_1}
[NormedField F]
{n : ℕ}
(χ : DirichletCharacter F n)
(a : ZMod n)


theorem map_ofDual_max (s : Finset αᵒᵈ) : s.max.map ofDual = (s.image ofDual).min

{α : Type u_2}
[LinearOrder α]
(s : Finset αᵒᵈ)

WithBot.map (⇑OrderDual.ofDual) s.max = (Finset.image (⇑OrderDual.ofDual) s).min


theorem insert_def (a : α) (s : Finset α) : insert a s = ⟨_, s.2.ndinsert a⟩

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

insert a s = { val := Multiset.ndinsert a s.val, nodup := ⋯ }


theorem _root_.Nat.le_div_two_iff_mul_two_le {n m : ℕ} : m ≤ n / 2 ↔ (m : ℤ) * 2 ≤ n


theorem image_add_const_Iic : (fun x => x + a) '' Iic b = Iic (b + a)

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

(fun x => x + a) '' Set.Iic b = Set.Iic (b + a)


theorem log_of_right_le_one (b : ℕ) {r : R} (hr : r ≤ 1) : log b r = -Nat.clog b ⌈r⁻¹⌉₊

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b : ℕ)
{r : R}
(hr : r ≤ 1)


/-- # mkArray -/

@[simp] theorem mkArray_data (n : Nat) (v : α) : (mkArray n v).data = List.replicate n v


@[simp] theorem ofNat_snd (n : ℕ) [n.AtLeastTwo] :
    (no_index (OfNat.ofNat n) : X q).snd = 0


theorem natCast_def (n : ℕ) : (n : A ⊗[R] B) = (n : A) ⊗ₜ (1 : B)

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[AddCommMonoidWithOne A]
[Module R A]
[AddCommMonoidWithOne B]
[Module R B]
(n : ℕ)


@[ext]
lemma ext (β : BasedNatTrans F G) (h : α.toNatTrans = β.toNatTrans) : α = β

(α β : CategoryTheory.BasedNatTrans F G)


@[to_additive]
theorem closure_smul (c : G) (s : Set α) : closure (c • s) = c • closure s

{α : Type u_2}
{G : Type u_4}
[TopologicalSpace α]
[AddGroup G]
[AddAction G α]
[ContinuousConstVAdd G α]
(c : G)
(s : Set α)


@[simp]
theorem Colimit.ι_desc_apply' (F : J ⥤ Type v) (s : Cocone F) (j : J) (x : F.obj j) :
    colimit.desc F s (colimit.ι F j x) = s.ι.app j x

{J : Type v}
[CategoryTheory.Category.{w, v} J]
(F : J ⥤ Type v)
(s : CategoryTheory.Limits.Cocone F)
(j : J)
(x : F.obj j)

CategoryTheory.Limits.colimit.desc F s (CategoryTheory.Limits.colimit.ι F j x) = s.ι.app j x


/-- A structure on an Oplax natural transformation that promotes it to a strong natural
transformation.

See `StrongNatTrans.mkOfOplax`. -/
structure StrongCore {F G : OplaxFunctor B C} (η : OplaxNatTrans F G) where
  naturality {a b : B} (f : a ⟶ b) : F.map f ≫ η.app b ≅ η.app a ≫ G.map f
  naturality_hom {a b : B} (f : a ⟶ b) : (naturality f).hom = η.naturality f := by aesop_cat

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
{F G : CategoryTheory.OplaxFunctor B C}
{η : CategoryTheory.OplaxNatTrans F G}
(self : η.StrongCore)
{a b : B}
(f : a ⟶ b)

(self.naturality f).hom = η.naturality f


@[simp]
theorem cons_reverseAux {u v w x : V} (p : G.Walk u v) (q : G.Walk w x) (h : G.Adj w u) :
    (cons h p).reverseAux q = p.reverseAux (cons (G.symm h) q)

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

(SimpleGraph.Walk.cons h p).reverseAux q = p.reverseAux (SimpleGraph.Walk.cons ⋯ q)


theorem Iso.isZero_iff {X Y : C} (e : X ≅ Y) : IsZero X ↔ IsZero Y

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

CategoryTheory.Limits.IsZero X ↔ CategoryTheory.Limits.IsZero Y


theorem secondCountableTopology_source [SecondCountableTopology Y] :
    SecondCountableTopology e.source

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
[SecondCountableTopology Y]


theorem tendsto_log_nhdsWithin_zero : Tendsto log (𝓝[≠] 0) atBot

Filter.Tendsto Real.log (𝓝[≠] 0) Filter.atBot


theorem mapsTo_iUnion₂_iUnion₂ {s : ∀ i, κ i → Set α} {t : ∀ i, κ i → Set β} {f : α → β}
    (H : ∀ i j, MapsTo f (s i j) (t i j)) : MapsTo f (⋃ (i) (j), s i j) (⋃ (i) (j), t i j)

(H : ∀ (i : ι) (j : κ i), Set.MapsTo f (s i j) (t i j))

Set.MapsTo f (⋃ i, ⋃ j, s i j) (⋃ i, ⋃ j, t i j)


@[to_additive]
theorem smul_ball_one : x • ball (1 : E) δ = ball x δ

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


@[simp]
theorem map_of (f : α → β) (y : α) : f <$> of y = of (f y)

f <$> FreeAbelianGroup.of y = FreeAbelianGroup.of (f y)


lemma homMk'_mk_comp (f : S.obj Y ⟶ T) (g : Y' ⟶ Y) (g' : Y'' ⟶ Y') :
    homMk' (mk f) (g' ≫ g) = eqToHom (by simp) ≫ homMk' (mk (S.map g ≫ f)) g' ≫ homMk' (mk f) g

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

(CategoryTheory.CostructuredArrow.mk f).homMk' (CategoryTheory.CategoryStruct.comp g' g) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
    (CategoryTheory.CategoryStruct.comp
      ((CategoryTheory.CostructuredArrow.mk (CategoryTheory.CategoryStruct.comp (S.map g) f)).homMk' g')
      ((CategoryTheory.CostructuredArrow.mk f).homMk' g))


@[aesop unsafe 15% (rule_sets := [Matroid])]
theorem Basis.left_subset_ground (hI : M.Basis I X) : I ⊆ M.E

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


@[simp]
theorem card_Ioo : (Ioo a b).card = b - a - 1


@[norm_cast]
theorem nat_succ (n : ℕ) : (n.succ : Cardinal) = succ ↑n


@[simp]
theorem cycle_singleton (a : α) : cycle [a] (by simp) = const a


theorem auxEquiv_symm_one : (auxEquiv R 𝒜 ℬ).symm 1 = 1

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]

(GradedTensorProduct.auxEquiv R 𝒜 ℬ).symm 1 = 1


/-- Points of a finite set can be separated by open sets from each other. -/
theorem Set.Finite.t2_separation [T2Space X] {s : Set X} (hs : s.Finite) :
    ∃ U : X → Set X, (∀ x, x ∈ U x ∧ IsOpen (U x)) ∧ s.PairwiseDisjoint U

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
{s : Set X}
(hs : s.Finite)

∃ U, (∀ (x : X), x ∈ U x ∧ IsOpen (U x)) ∧ s.PairwiseDisjoint U


theorem sum_totient' (n : ℕ) : (∑ m ∈ (range n.succ).filter (· ∣ n), φ m) = n

∑ m ∈ Finset.filter (fun x => x ∣ n) (Finset.range n.succ), m.totient = n


/-- The `atBot` filter for an open interval `Ioo a b` comes from the right-neighbourhoods filter at
the left endpoint in the ambient order. -/
theorem comap_coe_Ioo_nhdsWithin_Ioi (a b : α) : comap ((↑) : Ioo a b → α) (𝓝[>] a) = atBot

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

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


theorem galoisConnection_mul_div {k : ℕ} (h : 0 < k) :
    GaloisConnection (fun n => n * k) fun n => n / k


theorem eLpNormEssSup_const_smul (c : 𝕜) (f : α → F) :
    eLpNormEssSup (c • f) μ = (‖c‖₊ : ℝ≥0∞) * eLpNormEssSup f μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NormedDivisionRing 𝕜]
[Module 𝕜 F]
[BoundedSMul 𝕜 F]
(c : 𝕜)
(f : α → F)

MeasureTheory.eLpNormEssSup (c • f) μ = ↑‖c‖₊ * MeasureTheory.eLpNormEssSup f μ


@[simp]
theorem range_incl : N.incl.range = N

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


theorem Finite.einfsep_exists_of_nontrivial (hsf : s.Finite) (hs : s.Nontrivial) :
    ∃ x ∈ s, ∃ y ∈ s, x ≠ y ∧ s.einfsep = edist x y

{α : Type u_1}
[EDist α]
{s : Set α}
(hsf : s.Finite)
(hs : s.Nontrivial)


lemma zero_not_mem_coeffs (p : MvPolynomial σ R) : 0 ∉ p.coeffs

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


lemma connected_iff_forall_exists_walk_subgraph (H : G.Subgraph) :
    H.Connected ↔
      H.verts.Nonempty ∧
        ∀ {u v}, u ∈ H.verts → v ∈ H.verts → ∃ p : G.Walk u v, p.toSubgraph ≤ H

{V : Type u}
{G : SimpleGraph V}
(H : G.Subgraph)

H.Connected ↔ H.verts.Nonempty ∧ ∀ {u v : V}, u ∈ H.verts → v ∈ H.verts → ∃ p, p.toSubgraph ≤ H


theorem minFac_prime {n : ℕ} (n1 : n ≠ 1) : Prime (minFac n)


/-- `x^m`, `m : ℤ` is convex on `(0, +∞)` for all `m`. -/
lemma convexOn_zpow : ∀ n : ℤ, ConvexOn 𝕜 (Ioi 0) fun x : 𝕜 ↦ x ^ n

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
(n : ℤ)


theorem foldl_toList (f : α → β → α) (xs : t β) (x : α) :
    foldl f x xs = List.foldl f x (toList xs)

{α β : Type u}
{t : Type u → Type u}
[Traversable t]
[LawfulTraversable t]
(f : α → β → α)
(xs : t β)
(x : α)

Traversable.foldl f x xs = List.foldl f x (Traversable.toList xs)


theorem isAlgebraic_nat [Nontrivial R] (n : ℕ) : IsAlgebraic R (n : A)

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]
[Nontrivial R]
(n : ℕ)


/-- Given a neighborhood `s` of the origin in a normed space `E`, the dual norms
of all elements of the polar `polar 𝕜 s` are bounded by a constant. -/
theorem isBounded_polar_of_mem_nhds_zero {s : Set E} (s_nhd : s ∈ 𝓝 (0 : E)) :
    IsBounded (polar 𝕜 s)

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
(s_nhd : s ∈ 𝓝 0)

Bornology.IsBounded (NormedSpace.polar 𝕜 s)


@[simp] theorem inv_zero : (0 : ℝ≥0∞)⁻¹ = ∞


theorem _root_.String.valid_toSubstring (s : String) : Valid s


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

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


theorem _root_.Continuous.convolution_integrand_fst [ContinuousSub G] (hg : Continuous g) (t : G) :
    Continuous fun x => L (f t) (g (x - t))

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
(L : E →L[𝕜] E' →L[𝕜] F)
[AddGroup G]
[TopologicalSpace G]
[ContinuousSub G]
(hg : Continuous g)
(t : G)

Continuous fun x => (L (f t)) (g (x - t))


theorem _root_.MeasureTheory.Integrable.integral_condexpKernel [NormedSpace ℝ F]
    (hf_int : Integrable f μ) :
    Integrable (fun ω => ∫ y, f y ∂condexpKernel μ m ω) μ

{Ω : Type u_1}
{F : Type u_2}
{m : MeasurableSpace Ω}
[mΩ : MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
[NormedAddCommGroup F]
{f : Ω → F}
[NormedSpace ℝ F]
(hf_int : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun ω => ∫ (y : Ω), f y ∂(ProbabilityTheory.condexpKernel μ m) ω) μ


@[simp]
theorem liftPred_coe {p : β → Prop} {f : α → β} : LiftPred p (f : Germ l β) ↔ ∀ᶠ x in l, p (f x)

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{p : β → Prop}
{f : α → β}

Filter.Germ.LiftPred p ↑f ↔ ∀ᶠ (x : α) in l, p (f x)


@[simp]
theorem eventually_mem_nhds : (∀ᶠ x' in 𝓝 x, s ∈ 𝓝 x') ↔ s ∈ 𝓝 x

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

(∀ᶠ (x' : X) in 𝓝 x, s ∈ 𝓝 x') ↔ s ∈ 𝓝 x


lemma singularPart_of_subset_mutuallySingularSetSlice [IsFiniteKernel κ]
    [IsFiniteKernel η] {a : α} {s : Set γ} (hsm : MeasurableSet s)
    (hs : s ⊆ mutuallySingularSetSlice κ η a) :
    singularPart κ η a s = κ a s

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

(hs : s ⊆ κ.mutuallySingularSetSlice η a)


@[simp]
theorem get_multiplicity_self {a : α} (ha : Finite a a) : get (multiplicity a a) ha = 1

{α : Type u_1}
[CancelCommMonoidWithZero α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a : α}
(ha : multiplicity.Finite a a)


@[to_additive nsmul_le_nsmul_left_of_nonpos]
theorem pow_le_pow_right_of_le_one' {a : M} {n m : ℕ} (ha : a ≤ 1) (h : n ≤ m) : a ^ m ≤ a ^ n

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


/-- Exactness of `L₀.X₃ ⟶ L₃.X₁ ⟶ L₃.X₂`. -/
lemma L₂'_exact : S.L₂'.Exact

(S : CategoryTheory.ShortComplex.SnakeInput C)


theorem mul_le_max_of_aleph0_le_right {a b : Cardinal} (h : ℵ₀ ≤ b) : a * b ≤ max a b


/-- Evaluation of the trivial character -/
lemma one_apply {x : R} (hx : IsUnit x) : (1 : MulChar R R') x = 1

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommMonoidWithZero R']
{x : R}
(hx : IsUnit x)


theorem invOf_fromBlocks₁₁_eq (A : Matrix m m α) (B : Matrix m n α) (C : Matrix n m α)
    (D : Matrix n n α) [Invertible A] [Invertible (D - C * ⅟ A * B)]
    [Invertible (fromBlocks A B C D)] :
    ⅟ (fromBlocks A B C D) =
      fromBlocks (⅟ A + ⅟ A * B * ⅟ (D - C * ⅟ A * B) * C * ⅟ A) (-(⅟ A * B * ⅟ (D - C * ⅟ A * B)))
        (-(⅟ (D - C * ⅟ A * B) * C * ⅟ A)) (⅟ (D - C * ⅟ A * B))

[Invertible (Matrix.fromBlocks A B C D)]

⅟(Matrix.fromBlocks A B C D) =
  Matrix.fromBlocks (⅟A + ⅟A * B * ⅟(D - C * ⅟A * B) * C * ⅟A) (-(⅟A * B * ⅟(D - C * ⅟A * B)))
    (-(⅟(D - C * ⅟A * B) * C * ⅟A)) ⅟(D - C * ⅟A * B)


@[simp]
theorem coe_copy (f : α →Co β) (f' : α → β) (h : f' = f) : ⇑(f.copy f' h) = f'

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
(f : α →Co β)
(f' : α → β)
(h : f' = ⇑f)


@[simp]
theorem mk'_mul_mk'_eq_one (x y : M) : mk' S (x : R) y * mk' S (y : R) x = 1

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x y : ↥M)

IsLocalization.mk' S (↑x) y * IsLocalization.mk' S (↑y) x = 1


theorem ae_ae_eq_of_ae_eq_uncurry {f g : α → β → γ} (h : uncurry f =ᵐ[μ.prod ν] uncurry g) :
    ∀ᵐ x ∂μ, f x =ᵐ[ν] g x

{f g : α → β → γ}

(h : Function.uncurry f =ᵐ[μ.prod ν] Function.uncurry g)


/-- `OrderDual` as a functor. -/
@[simps]
def dual : SemilatInfCat ⥤ SemilatSupCat

{X Y : SemilatInfCat}
(a : InfTopHom X.X Y.X)

SemilatInfCat.dual.map a = InfTopHom.dual a


@[simp]
lemma snd_swapRight (κ : Kernel α (β × γ)) : snd (swapRight κ) = fst κ

(κ : ProbabilityTheory.Kernel α (β × γ))


theorem forall_generateFrom_mem_iff_mem_iff {S : Set (Set α)} {x y : α} :
    (∀ s, MeasurableSet[generateFrom S] s → (x ∈ s ↔ y ∈ s)) ↔ (∀ s ∈ S, x ∈ s ↔ y ∈ s)

{α : Type u_1}
{S : Set (Set α)}
{x y : α}

(∀ (s : Set α), MeasurableSet s → (x ∈ s ↔ y ∈ s)) ↔ ∀ s ∈ S, x ∈ s ↔ y ∈ s


theorem eq_zero_of_mem_fdo_of_T_zpow_mem_fdo {n : ℤ} (hz : z ∈ 𝒟ᵒ) (hg : T ^ n • z ∈ 𝒟ᵒ) :
    n = 0

(hg : ModularGroup.T ^ n • z ∈ ModularGroup.fdo)


/-- Let `E` be a linear subspace in a real vector space.
If `E` has codimension at least two, its complement is connected. -/
theorem isConnected_compl_of_one_lt_codim {E : Submodule ℝ F} (hcodim : 1 < Module.rank ℝ (F ⧸ E)) :
    IsConnected (Eᶜ : Set F)

{F : Type u_1}
[AddCommGroup F]
[Module ℝ F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul ℝ F]
{E : Submodule ℝ F}
(hcodim : 1 < Module.rank ℝ (F ⧸ E))


@[simp]
theorem Path.cast_nil {u u' : U} (hu : u = u') : (Path.nil : Path u u).cast hu hu = Path.nil

{U : Type u_1}
[Quiver U]
{u u' : U}
(hu : u = u')

Quiver.Path.cast hu hu Quiver.Path.nil = Quiver.Path.nil


theorem exists_or_eq_self_of_eraseP (p) (l : List α) :
    l.eraseP p = l ∨
    ∃ a l₁ l₂, (∀ b ∈ l₁, ¬p b) ∧ p a ∧ l = l₁ ++ a :: l₂ ∧ l.eraseP p = l₁ ++ l₂

{α : Type u_1}
(p : α → Bool)
(l : List α)

List.eraseP p l = l ∨
  ∃ a l₁ l₂, (∀ (b : α), b ∈ l₁ → ¬p b = true) ∧ p a = true ∧ l = l₁ ++ a :: l₂ ∧ List.eraseP p l = l₁ ++ l₂


/-- Writing a limsup as an infimum of supremum, in a (possibly non-complete) conditionally complete
linear order. A reparametrization trick is needed to avoid taking the supremum of sets which are
not bounded below. -/
theorem HasBasis.limsup_eq_ite {v : Filter ι} {p : ι' → Prop} {s : ι' → Set ι}
    [Countable (Subtype p)] [Nonempty (Subtype p)] (hv : v.HasBasis p s) (f : ι → α) :
    limsup f v = if ∃ (j : Subtype p), s j = ∅ then sInf univ else
      if ∀ (j : Subtype p), ¬BddAbove (range (fun (i : s j) ↦ f i)) then sInf ∅
      else ⨅ (j : Subtype p), ⨆ (i : s (limsup_reparam f s p j)), f i

{α : Type u_1}
{ι : Type u_4}
{ι' : Type u_5}
[ConditionallyCompleteLinearOrder α]
{v : Filter ι}
{p : ι' → Prop}
{s : ι' → Set ι}
[Countable (Subtype p)]
[Nonempty (Subtype p)]
(hv : v.HasBasis p s)
(f : ι → α)

Filter.limsup f v =
  if ∃ j, s ↑j = ∅ then sInf Set.univ
  else if ∀ (j : Subtype p), ¬BddAbove (Set.range fun i => f ↑i) then sInf ∅ else ⨅ j, ⨆ i, f ↑i


/-- The function `(1 + t/x) ^ x` tends to `exp t` at `+∞` for naturals `x`. -/
theorem tendsto_one_plus_div_pow_exp (t : ℝ) :
    Tendsto (fun x : ℕ => (1 + t / (x : ℝ)) ^ x) atTop (𝓝 (Real.exp t))

Filter.Tendsto (fun x => (1 + t / ↑x) ^ x) Filter.atTop (𝓝 (rexp t))


/-- If `f` is `ℝ`-valued and integrable, then for any `c > 0` the set `{x | f x > c}` has finite
measure. -/
lemma Integrable.measure_gt_lt_top {f : α → ℝ} (hf : Integrable f μ) {ε : ℝ} (ε_pos : 0 < ε) :
    μ {a : α | ε < f a} < ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : MeasureTheory.Integrable f μ)
{ε : ℝ}
(ε_pos : 0 < ε)


theorem Sbtw.trans_right_left {w x y z : P} (h₁ : Sbtw R w x z) (h₂ : Sbtw R x y z) :
    Sbtw R w x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{w x y z : P}
(h₁ : Sbtw R w x z)
(h₂ : Sbtw R x y z)


/-- The pseudofunctor from `Cat` to `Cat` defined with `WithTerminal`. -/
@[simps]
def pseudofunctor : Pseudofunctor Cat Cat

CategoryTheory.WithTerminal.pseudofunctor.mapId C = CategoryTheory.WithTerminal.mapId ↑C


@[simp]
theorem sign_symm_trans_trans [DecidableEq β] [Fintype β] (f : Perm α) (e : α ≃ β) :
    sign ((e.symm.trans f).trans e) = sign f

{α : Type u}
[DecidableEq α]
{β : Type v}
[Fintype α]
[DecidableEq β]
[Fintype β]
(f : Equiv.Perm α)
(e : α ≃ β)

Equiv.Perm.sign ((e.symm.trans f).trans e) = Equiv.Perm.sign f