@[simp]
theorem snd_comp_prod [Module R₁ M₂] [Module R₁ M₃] (f : M₁ →L[R₁] M₂) (g : M₁ →L[R₁] M₃) :
    (snd R₁ M₂ M₃).comp (f.prod g) = g

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

(ContinuousLinearMap.snd R₁ M₂ M₃).comp (f.prod g) = g


theorem IsPrime.radical_le_iff (hJ : IsPrime J) : I.radical ≤ J ↔ I ≤ J

{R : Type u}
[CommSemiring R]
{I J : Ideal R}
(hJ : J.IsPrime)


/-- Comparison test of convergence of `ℝ≥0`-valued series. -/
theorem exists_le_hasSum_of_le {f g : β → ℝ≥0} {r : ℝ≥0} (hgf : ∀ b, g b ≤ f b) (hfr : HasSum f r) :
    ∃ p ≤ r, HasSum g p

{β : Type u_2}
{f g : β → ℝ≥0}
{r : ℝ≥0}
(hgf : ∀ (b : β), g b ≤ f b)
(hfr : HasSum f r)


@[simp]
theorem map_neg (x : R) : v (-x) = v x

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)
(x : R)


@[simp] lemma greatestFib_pos : 0 < greatestFib n ↔ 0 < n


theorem TransGen.lift {p : β → β → Prop} {a b : α} (f : α → β) (h : ∀ a b, r a b → p (f a) (f b))
    (hab : TransGen r a b) : TransGen p (f a) (f b)

(h : ∀ (a b : α), r a b → p (f a) (f b))


lemma isOpen_slitPlane : IsOpen slitPlane


theorem HasLines.exists_bijective_of_card_eq [HasLines P L] [Fintype P] [Fintype L]
    (h : Fintype.card P = Fintype.card L) :
    ∃ f : L → P, Function.Bijective f ∧ ∀ l, pointCount P l = lineCount L (f l)

{P : Type u_1}
{L : Type u_2}
[Membership P L]
[Configuration.HasLines P L]
[Fintype P]
[Fintype L]
(h : Fintype.card P = Fintype.card L)

∃ f, Function.Bijective f ∧ ∀ (l : L), Configuration.pointCount P l = Configuration.lineCount L (f l)


@[to_additive]
theorem ofMulEquivOfLocalizations_eq {k : N ≃* P} :
    (f.ofMulEquivOfLocalizations k).toMap = k.toMonoidHom.comp f.toMap

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{k : N ≃+ P}

(f.ofAddEquivOfLocalizations k).toMap = k.toAddMonoidHom.comp f.toMap


@[simp]
theorem coe_subtype : ⇑s.subtype = ((↑) : s → R)

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


@[simp]
lemma image_val_union_self_right_eq : A ∪ ↑D = A


@[deprecated isBoundedUnder_of (since := "2024-06-07")]
lemma Filter.isBounded_ge_map_of_bounded_range {ι : Type*} (F : Filter ι) {f : ι → ℝ}
    (h : Bornology.IsBounded (Set.range f)) :
    (F.map f).IsBounded (· ≥ ·)

{ι : Type u_1}
(F : Filter ι)
{f : ι → ℝ}
(h : Bornology.IsBounded (Set.range f))

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


/-- Formula for `cosZeta` as a Dirichlet series in the convergence range, with sum over `ℤ`. -/
lemma hasSum_int_cosZeta (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℤ ↦ cexp (2 * π * I * a * n) / ↑|n| ^ s / 2) (cosZeta a s)

HasSum (fun n => cexp (2 * ↑π * Complex.I * ↑a * ↑n) / ↑|n| ^ s / 2) (HurwitzZeta.cosZeta (↑a) s)


theorem IsNormal.bsup {f : Ordinal.{max u v} → Ordinal.{max u w}} (H : IsNormal f)
    {o : Ordinal.{u}} :
    ∀ (g : ∀ a < o, Ordinal), o ≠ 0 → f (bsup.{_, v} o g) = bsup.{_, w} o fun a h => f (g a h)

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

o ≠ 0 → f (o.bsup g) = o.bsup fun a h => f (g a h)


/--
`LawfulBEq α` is a typeclass which asserts that the `BEq α` implementation
(which supplies the `a == b` notation) coincides with logical equality `a = b`.
In other words, `a == b` implies `a = b`, and `a == a` is true.
-/
class LawfulBEq (α : Type u) [BEq α] : Prop where
  /-- If `a == b` evaluates to `true`, then `a` and `b` are equal in the logic. -/
  eq_of_beq : {a b : α} → a == b → a = b
  /-- `==` is reflexive, that is, `(a == a) = true`. -/
  protected rfl : {a : α} → a == a

{α : Type u}
[BEq α]
[self : LawfulBEq α]
{a : α}


theorem im_smul_eq_div_normSq (g : GL(2, ℝ)⁺) (z : ℍ) :
    (g • z).im = det ↑ₘg * z.im / Complex.normSq (denom g z)

(g • z).im = (↑↑g).det * z.im / Complex.normSq (UpperHalfPlane.denom g z)


theorem monomial_single_add : monomial (Finsupp.single n e + s) a = X n ^ e * monomial s a

{R : Type u}
{σ : Type u_1}
{a : R}
{e : ℕ}
{n : σ}
{s : σ →₀ ℕ}
[CommSemiring R]

(MvPolynomial.monomial (Finsupp.single n e + s)) a = MvPolynomial.X n ^ e * (MvPolynomial.monomial s) a


@[simp]
theorem coe_bot : ⇑(⊥ : Seminorm 𝕜 E) = 0

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]


theorem modifyNth_eq_take_drop (f : α → α) :
    ∀ n l, modifyNth f n l = take n l ++ modifyHead f (drop n l)

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

List.modifyNth f n l = List.take n l ++ List.modifyHead f (List.drop n l)


theorem iInf_plift_up (f : PLift ι → α) : ⨅ i, f (PLift.up i) = ⨅ i, f i

{α : Type u_1}
{ι : Sort u_5}
[InfSet α]
(f : PLift ι → α)


/-- Each element of the group defines a semiring isomorphism. -/
@[simps!]
def MulSemiringAction.toRingEquiv [MulSemiringAction G R] (x : G) : R ≃+* R

(G : Type u_1)
[Group G]
(R : Type u_2)
[Semiring R]
[MulSemiringAction G R]
(x : G)

∀ (a : R), (MulSemiringAction.toRingEquiv G R x) a = x • a


@[to_additive]
theorem prod_take_ofFn {n : ℕ} (f : Fin n → α) (i : ℕ) :
    ((ofFn f).take i).prod = ∏ j ∈ Finset.univ.filter fun j : Fin n => j.val < i, f j

{α : Type u_1}
[AddCommMonoid α]
{n : ℕ}
(f : Fin n → α)
(i : ℕ)

(List.take i (List.ofFn f)).sum = ∑ j ∈ Finset.filter (fun j => ↑j < i) Finset.univ, f j


@[simp]
theorem incl_coe : (N.incl : N →ₗ[R] M) = (N : Submodule R M).subtype

{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 hasSum_im {f : α → ℂ} {x : ℂ} (h : HasSum f x) : HasSum (fun x => (f x).im) x.im

{α : Type u_1}
{f : α → ℂ}
{x : ℂ}
(h : HasSum f x)


theorem isUnit_iff_isUnit_val (f : HomogeneousLocalization.AtPrime 𝒜 𝔭) :
    IsUnit f.val ↔ IsUnit f

IsUnit (HomogeneousLocalization.val f) ↔ IsUnit f


@[simp, norm_cast]
theorem coe_mul (z1 z2 : ℤ_[p]) : ((z1 * z2 : ℤ_[p]) : ℚ_[p]) = z1 * z2

{p : ℕ}
[Fact (Nat.Prime p)]
(z1 z2 : ℤ_[p])


/-- Use the above equivalence to prove we have a limit. -/
theorem has_over_limit_discrete_of_widePullback_limit {B : C} (F : Discrete J ⥤ Over B)
    [HasLimit (widePullbackDiagramOfDiagramOver B F)] : HasLimit F

(F : CategoryTheory.Discrete J ⥤ CategoryTheory.Over B)

[CategoryTheory.Limits.HasLimit (CategoryTheory.Over.ConstructProducts.widePullbackDiagramOfDiagramOver B F)]


theorem negPart_map_norm (f : α →ₛ ℝ) : (negPart f).map norm = negPart f

{α : Type u_1}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α ℝ)

MeasureTheory.SimpleFunc.map norm f.negPart = f.negPart


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

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

∀ {X Y : CategoryTheory.Discrete PUnit.{w + 1} × C} (f : X ⟶ Y), (CategoryTheory.prod.leftUnitor C).map f = f.2


theorem not_isSuccLimit_of_noMax [NoMinOrder α] [NoMaxOrder α] : ¬IsSuccLimit a

{α : Type u_1}
[Preorder α]
{a : α}
[SuccOrder α]
[IsSuccArchimedean α]
[NoMinOrder α]
[NoMaxOrder α]


theorem contDiffAt_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) {n : ℕ∞} : ContDiffAt ℝ n arcsin x


@[to_additive]
theorem isClosed_mulTSupport (f : X → α) : IsClosed (mulTSupport f)

{X : Type u_1}
{α : Type u_2}
[One α]
[TopologicalSpace X]
(f : X → α)


@[simp]
theorem sInter_range (f : ι → Set β) : ⋂₀ range f = ⋂ x, f x

{β : Type u_2}
{ι : Sort u_4}
(f : ι → Set β)


theorem covariantClass_le_of_lt [PartialOrder N] [CovariantClass M N μ (· < ·)] :
    CovariantClass M N μ (· ≤ ·)

[CovariantClass M N μ fun x x_1 => x < x_1]

CovariantClass M N μ fun x x_1 => x ≤ x_1


@[fun_prop]
theorem HasFDerivWithinAt.continuousMultilinear_apply_const (hc : HasFDerivWithinAt c c' s x)
    (u : ∀ i, M i) :
    HasFDerivWithinAt (fun y ↦ (c y) u) (c'.flipMultilinear u) s x

{c : E → ContinuousMultilinearMap 𝕜 M H}

{c' : E →L[𝕜] ContinuousMultilinearMap 𝕜 M H}

HasFDerivWithinAt (fun y => (c y) u) (c'.flipMultilinear u) s x


theorem IsCompactOperator.image_subset_compact_of_isVonNBounded {f : M₁ →ₛₗ[σ₁₂] M₂}
    (hf : IsCompactOperator f) {S : Set M₁} (hS : IsVonNBounded 𝕜₁ S) :
    ∃ K : Set M₂, IsCompact K ∧ f '' S ⊆ K

{𝕜₁ : Type u_1}
{𝕜₂ : Type u_2}
[NontriviallyNormedField 𝕜₁]
[SeminormedRing 𝕜₂]
{σ₁₂ : 𝕜₁ →+* 𝕜₂}
{M₁ : Type u_3}
{M₂ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module 𝕜₁ M₁]
[Module 𝕜₂ M₂]
[ContinuousConstSMul 𝕜₂ M₂]
{f : M₁ →ₛₗ[σ₁₂] M₂}
(hf : IsCompactOperator ⇑f)
{S : Set M₁}
(hS : Bornology.IsVonNBounded 𝕜₁ S)


@[simp]
theorem toMul_ofMul (x : α) : toMul (ofMul x) = x


theorem isIntegral_respectsIso : RespectsIso fun f => f.IsIntegral

RingHom.RespectsIso fun {R S} [CommRing R] [CommRing S] f => f.IsIntegral


theorem smul_coeff_order_add_order {Γ} [LinearOrderedCancelAddCommMonoid Γ] [Zero R]
    [SMulWithZero R V] (x : HahnSeries Γ R) (y : HahnModule Γ R V) :
    ((of R).symm (x • y)).coeff (x.order + ((of R).symm y).order) =
    x.leadingCoeff • ((of R).symm y).leadingCoeff

{R : Type u_3}
{V : Type u_4}
[AddCommMonoid V]
{Γ : Type u_5}
[LinearOrderedCancelAddCommMonoid Γ]
[Zero R]
[SMulWithZero R V]
(x : HahnSeries Γ R)
(y : HahnModule Γ R V)

((HahnModule.of R).symm (x • y)).coeff (x.order + ((HahnModule.of R).symm y).order) =
  x.leadingCoeff • ((HahnModule.of R).symm y).leadingCoeff


/-- Under the isometric isomorphism `fourierBasis` from `Lp ℂ 2 haarAddCircle` to `ℓ²(ℤ, ℂ)`, the
`i`-th coefficient is `fourierCoeff f i`, i.e., the integral over `AddCircle T` of
`fun t => fourier (-i) t * f t` with respect to the Haar measure of total mass 1. -/
theorem fourierBasis_repr (f : Lp ℂ 2 <| @haarAddCircle T hT) (i : ℤ) :
    fourierBasis.repr f i = fourierCoeff f i

(f : ↥(MeasureTheory.Lp ℂ 2 AddCircle.haarAddCircle))

↑(fourierBasis.repr f) i = fourierCoeff (↑↑f) i


theorem forall_prop_of_false {p : Prop} {q : p → Prop} (hn : ¬p) : (∀ h' : p, q h') ↔ True


/-- `F⟮x⟯ / F` is a purely inseparable extension if and only if the mininal polynomial of `x`
has separable degree one. -/
theorem isPurelyInseparable_adjoin_simple_iff_natSepDegree_eq_one {x : E} :
    IsPurelyInseparable F F⟮x⟯ ↔ (minpoly F x).natSepDegree = 1

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
{x : E}

IsPurelyInseparable F ↥F⟮x⟯ ↔ (minpoly F x).natSepDegree = 1


/-- The splitting of the short complex `S.op` deduced from a splitting of `S`. -/
@[simps]
def op (h : Splitting S) : Splitting S.op

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
(h : S.Splitting)


/-- Constructive information associated with a partition of a type `α` indexed by another type `ι`,
`s : ι → Set α`.

`IndexedPartition.index` sends an element to its index, while `IndexedPartition.some` sends
an index to an element of the corresponding set.

This type is primarily useful for definitional control of `s` - if this is not needed, then
`Setoid.ker index` by itself may be sufficient. -/
structure IndexedPartition {ι α : Type*} (s : ι → Set α) where
  /-- two indexes are equal if they are equal in membership  -/
  eq_of_mem : ∀ {x i j}, x ∈ s i → x ∈ s j → i = j
  /-- sends an index to an element of the corresponding set-/
  some : ι → α
  /-- membership invariance for `some`-/
  some_mem : ∀ i, some i ∈ s i
  /-- index for type `α`-/
  index : α → ι
  /-- membership invariance for `index`-/
  mem_index : ∀ x, x ∈ s (index x)

{ι : Type u_1}
{α : Type u_2}
{s : ι → Set α}
(self : IndexedPartition s)
{x : α}
{i j : ι}


theorem lex_lt_of_lt [PartialOrder N] (r) [IsStrictOrder α r] {x y : α →₀ N} (hlt : x < y) :
    Pi.Lex r (· < ·) x y

{α : Type u_1}
{N : Type u_2}
[Zero N]
[PartialOrder N]
(r : α → α → Prop)
[IsStrictOrder α r]
{x y : α →₀ N}
(hlt : x < y)

Pi.Lex r (fun {i} x x_1 => x < x_1) ⇑x ⇑y


/-- A set is preirreducible if and only if
for every cover by two closed sets, it is contained in one of the two covering sets. -/
theorem isPreirreducible_iff_closed_union_closed :
    IsPreirreducible s ↔
      ∀ z₁ z₂ : Set X, IsClosed z₁ → IsClosed z₂ → s ⊆ z₁ ∪ z₂ → s ⊆ z₁ ∨ s ⊆ z₂

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

IsPreirreducible s ↔ ∀ (z₁ z₂ : Set X), IsClosed z₁ → IsClosed z₂ → s ⊆ z₁ ∪ z₂ → s ⊆ z₁ ∨ s ⊆ z₂


@[to_additive nsmul_left_strictMono]
theorem pow_right_strictMono' [CovariantClass M M (· * ·) (· < ·)] {a : M} (ha : 1 < a) :
    StrictMono ((a ^ ·) : ℕ → M)

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

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


theorem condexp_condexp_of_le {m₁ m₂ m0 : MeasurableSpace α} {μ : Measure α} (hm₁₂ : m₁ ≤ m₂)
    (hm₂ : m₂ ≤ m0) [SigmaFinite (μ.trim hm₂)] : μ[μ[f|m₂]|m₁] =ᵐ[μ] μ[f|m₁]


theorem re_eq_norm_of_mul_conj (x : K) : re (x * conj x) = ‖x * conj x‖

RCLike.re (x * (starRingEnd K) x) = ‖x * (starRingEnd K) x‖


@[to_additive]
theorem UniformCauchySeqOn.mul (hf : UniformCauchySeqOn f l s) (hf' : UniformCauchySeqOn f' l s) :
    UniformCauchySeqOn (f * f') l s

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{ι : Type u_3}
{l : Filter ι}
{f f' : ι → β → α}
{s : Set β}
(hf : UniformCauchySeqOn f l s)
(hf' : UniformCauchySeqOn f' l s)


@[simp]
theorem UpperSet.iInf_Ici (s : Set α) : ⨅ a ∈ s, UpperSet.Ici a = upperClosure s


theorem sum_range_choose_halfway (m : Nat) : (∑ i ∈ range (m + 1), choose (2 * m + 1) i) = 4 ^ m

∑ i ∈ Finset.range (m + 1), (2 * m + 1).choose i = 4 ^ m


@[to_additive]
lemma eq_of_prod_take_eq [LeftCancelMonoid M] {L L' : List M} (h : L.length = L'.length)
    (h' : ∀ i ≤ L.length, (L.take i).prod = (L'.take i).prod) : L = L'

(h' : ∀ i ≤ L.length, (List.take i L).sum = (List.take i L').sum)


@[simp] lemma head_neg (a : Fin n.succ → α) : vecHead (-a) = -vecHead a

{α : Type u_1}
{n : ℕ}
[Neg α]
(a : Fin n.succ → α)


lemma continuousOn_toReal : ContinuousOn ENNReal.toReal { a | a ≠ ∞ }


@[simp]
lemma Isometry.snd_comp_inr (Q₂ : QuadraticMap R M₂ P) :
    (snd M₁ Q₂).comp (inr (0 : QuadraticMap R M₁ P) Q₂) = .id _

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R P]
(Q₂ : QuadraticMap R M₂ P)

(QuadraticMap.Isometry.snd M₁ Q₂).comp (QuadraticMap.Isometry.inr 0 Q₂) = QuadraticMap.Isometry.id Q₂


@[to_additive]
theorem smul_apply [SMul R M] [ContinuousConstSMul R M] (c : R) (f : C(α, M)) (a : α) :
    (c • f) a = c • f a

{α : Type u_1}
[TopologicalSpace α]
{R : Type u_3}
{M : Type u_5}
[TopologicalSpace M]
[VAdd R M]
[ContinuousConstVAdd R M]
(c : R)
(f : C(α, M))
(a : α)


theorem sum_antidiagonal_choose_add (d n : ℕ) :
    (Finset.sum (antidiagonal n) fun ij => (d + ij.2).choose d) =
    (d + n).choose d + (d + n).choose (succ d)

∑ ij ∈ Finset.antidiagonal n, (d + ij.2).choose d = (d + n).choose d + (d + n).choose d.succ


@[simp]
theorem lowerClosure_sUnion (S : Set (Set α)) : lowerClosure (⋃₀ S) = ⨆ s ∈ S, lowerClosure s

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


protected theorem Submodule.finsupp_sum_mem {ι β : Type*} [Zero β] (S : Submodule R M) (f : ι →₀ β)
    (g : ι → β → M) (h : ∀ c, f c ≠ 0 → g c (f c) ∈ S) : f.sum g ∈ S

(f : ι →₀ β)

(h : ∀ (c : ι), f c ≠ 0 → g c (f c) ∈ S)


@[simp]
theorem _root_.MeasureTheory.OuterMeasure.toMeasure_top :
    (⊤ : OuterMeasure α).toMeasure (by rw [OuterMeasure.top_caratheodory]; exact le_top) =
      (⊤ : Measure α)


/-- To construct an isomorphism between forks,
it suffices to give an isomorphism between the cone points
and check that it commutes with the `ι` morphisms.
-/
@[simps]
def Fork.ext {s t : Fork f g} (i : s.pt ≅ t.pt) (w : i.hom ≫ t.ι = s.ι := by aesop_cat) :
    s ≅ t

(w : CategoryTheory.CategoryStruct.comp i.hom t.ι = s.ι := by aesop_cat)

(CategoryTheory.Limits.Fork.ext i w).inv = CategoryTheory.Limits.Fork.mkHom i.inv ⋯


private theorem b_id_helper {a b : ℕ} (ha : 2 ≤ a) (hb : 2 < b) : 2 ≤ (a ^ b + 1) / (a + 1)


@[to_additive]
theorem isLocallyFiniteMeasure_of_smulInvariant (hU : IsOpen U) (hne : U.Nonempty) (hμU : μ U ≠ ∞) :
    IsLocallyFiniteMeasure μ

[MeasureTheory.VAddInvariantMeasure G α μ]


theorem sign_neg_coe_nonpos_of_nonneg_of_le_pi {θ : ℝ} (h0 : 0 ≤ θ) (hpi : θ ≤ π) :
    (-θ : Angle).sign ≤ 0


@[reassoc (attr := simp)]
theorem CokernelCofork.condition (s : CokernelCofork f) : f ≫ s.π = 0

(s : CategoryTheory.Limits.CokernelCofork f)

f ≫ CategoryTheory.Limits.Cofork.π s = 0


@[simp]
theorem cast_toZModPow (m n : ℕ) (h : m ≤ n) (x : ℤ_[p]) :
    ZMod.cast (toZModPow n x) = toZModPow m x

{p : ℕ}
[hp_prime : Fact (Nat.Prime p)]
(m n : ℕ)
(h : m ≤ n)
(x : ℤ_[p])

((PadicInt.toZModPow n) x).cast = (PadicInt.toZModPow m) x


theorem mem_cons_self (v : Vector α n) : a ∈ (a ::ᵥ v).toList

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


theorem StrictConvexOn.sub_concaveOn (hf : StrictConvexOn 𝕜 s f) (hg : ConcaveOn 𝕜 s g) :
    StrictConvexOn 𝕜 s (f - g)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommGroup β]
[SMul 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f g : E → β}
(hf : StrictConvexOn 𝕜 s f)
(hg : ConcaveOn 𝕜 s g)


@[simp]
theorem lift_univ : lift.{w} univ.{u, v} = univ.{u, max v w}

Cardinal.lift.{w, max (u + 1) v} Cardinal.univ.{u, v} = Cardinal.univ.{u, max v w}


@[simp]
theorem disjoint_union_right [DecidableEq α] {s t u : Multiset α} :
    Disjoint s (t ∪ u) ↔ Disjoint s t ∧ Disjoint s u

{α : Type u_1}
[DecidableEq α]
{s t u : Multiset α}

s.Disjoint (t ∪ u) ↔ s.Disjoint t ∧ s.Disjoint u


@[simp]
theorem destruct_cons (a : α) : ∀ s, destruct (cons a s) = some (a, s)

{α : Type u}
(a : α)
(s : Stream'.Seq α)

(Stream'.Seq.cons a s).destruct = some (a, s)


@[simp]
theorem thickening_union (δ : ℝ) (s t : Set α) :
    thickening δ (s ∪ t) = thickening δ s ∪ thickening δ t

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

Metric.thickening δ (s ∪ t) = Metric.thickening δ s ∪ Metric.thickening δ t


@[simp]
theorem prop_fst : TwoPointing.prop.fst = False


@[reassoc (attr := simp)]
lemma inl_desc (hP : IsPushout f g inl inr) {W : C} (h : X ⟶ W) (k : Y ⟶ W)
    (w : f ≫ h = g ≫ k) : inl ≫ hP.desc h k w = h

(hP : CategoryTheory.IsPushout f g inl inr)


lemma nonsingularLift_negMap {P : PointClass F} (hP : W.NonsingularLift P) :
    W.NonsingularLift <| W.negMap P

{P : WeierstrassCurve.Jacobian.PointClass F}


@[simp]
theorem Ioc_eq_zero_iff : Ioc a b = 0 ↔ ¬a < b

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


theorem prod_comp_prodMap (f : T →ₙ+* R) (g : T →ₙ+* S) (f' : R →ₙ+* R') (g' : S →ₙ+* S') :
    (f'.prodMap g').comp (f.prod g) = (f'.comp f).prod (g'.comp g)

{R : Type u_3}
{R' : Type u_4}
{S : Type u_5}
{S' : Type u_6}
{T : Type u_7}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
[NonUnitalNonAssocSemiring R']
[NonUnitalNonAssocSemiring S']
[NonUnitalNonAssocSemiring T]
(f : T →ₙ+* R)
(g : T →ₙ+* S)
(f' : R →ₙ+* R')
(g' : S →ₙ+* S')


theorem Iso.to_eq {x y : X} (f : x ≅ y) : x = y

{X : Type u}
[PartialOrder X]
{x y : X}
(f : x ≅ y)


/-- Normalized GCD monoid: a `CancelCommMonoidWithZero` with normalization and `gcd`
(greatest common divisor) and `lcm` (least common multiple) operations. In this setting `gcd` and
`lcm` form a bounded lattice on the associated elements where `gcd` is the infimum, `lcm` is the
supremum, `1` is bottom, and `0` is top. The type class focuses on `gcd` and we derive the
corresponding `lcm` facts from `gcd`.
-/
class NormalizedGCDMonoid (α : Type*) [CancelCommMonoidWithZero α] extends NormalizationMonoid α,
  GCDMonoid α where
  /-- The GCD is normalized to itself. -/
  normalize_gcd : ∀ a b, normalize (gcd a b) = gcd a b
  /-- The LCM is normalized to itself. -/
  normalize_lcm : ∀ a b, normalize (lcm a b) = lcm a b

{α : Type u_2}
[CancelCommMonoidWithZero α]
[self : NormalizedGCDMonoid α]
(a b : α)


lemma strictAnti_smul_left (ha : a < 0) : StrictAnti ((a • ·) : β → β)

{α : Type u_1}
{β : Type u_2}
{a : α}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulStrictMono α β]
(ha : a < 0)


theorem aecover_Ioo_of_Icc : AECover (μ.restrict <| Ioo A B) l fun i => Icc (a i) (b i)

{α : Type u_1}
{ι : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{l : Filter ι}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
[OpensMeasurableSpace α]
{a b : ι → α}
{A B : α}
(ha : Filter.Tendsto a l (𝓝 A))
(hb : Filter.Tendsto b l (𝓝 B))

MeasureTheory.AECover (μ.restrict (Set.Ioo A B)) l fun i => Set.Icc (a i) (b i)


/-- `Solution'` is a tuple given by a solution to `a ^ 3 + b ^ 3 = u * c ^ 3`,
where `a`, `b`, `c` and `u` are as in `FermatLastTheoremForThreeGen`.
See `Solution` for the actual structure on which we will do the descent. -/
structure Solution' where
  a : 𝓞 K
  b : 𝓞 K
  c : 𝓞 K
  u : (𝓞 K)ˣ
  ha : ¬ λ ∣ a
  hb : ¬ λ ∣ b
  hc : c ≠ 0
  coprime : IsCoprime a b
  hcdvd : λ ∣ c
  H : a ^ 3 + b ^ 3 = u * c ^ 3

(self : FermatLastTheoremForThreeGen.Solution' hζ)


@[simp]
theorem coe_set_mk (S : Subring K) (h) : ((⟨S, h⟩ : Subfield K) : Set K) = S

{K : Type u}
[DivisionRing K]
(S : Subring K)
(h : ∀ x ∈ S.carrier, x⁻¹ ∈ S.carrier)


theorem Disjoint.mono_left (h : a ≤ b) : Disjoint b c → Disjoint a c

{α : Type u_1}
[PartialOrder α]
[OrderBot α]
{a b c : α}
(h : a ≤ b)


@[fun_prop]
protected theorem hasStrictFDerivAt : HasStrictFDerivAt iso (iso : E →L[𝕜] F) x

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


@[simp]
theorem image_const_add_Ici : (fun x => a + x) '' Ici b = Ici (a + b)

{M : Type u_1}
[OrderedCancelAddCommMonoid M]
[ExistsAddOfLE M]
(a b : M)

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


theorem expSeries_sum_eq_div (x : 𝔸) : (expSeries 𝕂 𝔸).sum x = ∑' n : ℕ, x ^ n / n !

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[Field 𝕂]
[DivisionRing 𝔸]
[Algebra 𝕂 𝔸]
[TopologicalSpace 𝔸]
[TopologicalRing 𝔸]
(x : 𝔸)

(NormedSpace.expSeries 𝕂 𝔸).sum x = ∑' (n : ℕ), x ^ n / ↑n.factorial


lemma dualSubmodule_dualSubmodule_of_basis
    {ι} [Finite ι] (hB : B.Nondegenerate) (hB' : B.IsSymm) (b : Basis ι S M) :
    B.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b)

{R : Type u_4}
{S : Type u_2}
{M : Type u_3}
[CommRing R]
[Field S]
[AddCommGroup M]
[Algebra R S]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(B : LinearMap.BilinForm S M)
{ι : Type u_1}
[Finite ι]
(hB : B.Nondegenerate)
(hB' : B.IsSymm)
(b : Basis ι S M)

B.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)


theorem Wbtw.swap_left_iff [NoZeroSMulDivisors R V] {x y z : P} (h : Wbtw R x y z) :
    Wbtw R y x z ↔ x = y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[NoZeroSMulDivisors R V]
{x y z : P}
(h : Wbtw R x y z)


@[simp]
theorem lift_symm_apply (F : UniversalEnvelopingAlgebra R L →ₐ[R] A) :
    (lift R).symm F = (F : UniversalEnvelopingAlgebra R L →ₗ⁅R⁆ A).comp (ι R)

(UniversalEnvelopingAlgebra.lift R).symm F = F.toLieHom.comp (UniversalEnvelopingAlgebra.ι R)


@[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}
[AddGroup G]
[AddGroup G']
(e : G ≃+ G')
(H : AddSubgroup G)
(g : ↥(AddSubgroup.map (↑e) H))

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


@[simp]
theorem map_sub (f : L₁ →ₗ⁅R⁆ L₂) (x y : L₁) : f (x - y) = f x - f y

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


theorem rootSet_monomial [CommRing S] [IsDomain S] [Algebra R S] {n : ℕ} (hn : n ≠ 0) {a : R}
    (ha : a ≠ 0) : (monomial n a).rootSet S = {0}

{R : Type u}
{S : Type v}
[Field R]
[CommRing S]
[IsDomain S]
[Algebra R S]
{n : ℕ}
(hn : n ≠ 0)
{a : R}
(ha : a ≠ 0)

((Polynomial.monomial n) a).rootSet S = {0}


/-- The identity and the complex conjugation are the only two `ℝ`-algebra homomorphisms of `ℂ`. -/
theorem real_algHom_eq_id_or_conj (f : ℂ →ₐ[ℝ] ℂ) : f = AlgHom.id ℝ ℂ ∨ f = conjAe


theorem mem_append_right {a : α} (l₁ : List α) {l₂ : List α} (h : a ∈ l₂) : a ∈ l₁ ++ l₂

{α : Type u_1}
{a : α}
(l₁ : List α)
{l₂ : List α}
(h : a ∈ l₂)


@[simp]
theorem Cofork.π_precompose {f' g' : X ⟶ Y} {α : parallelPair f g ⟶ parallelPair f' g'}
    {c : Cofork f' g'} : Cofork.π ((Cocones.precompose α).obj c) = α.app _ ≫ c.π

{α : CategoryTheory.Limits.parallelPair f g ⟶ CategoryTheory.Limits.parallelPair f' g'}

{c : CategoryTheory.Limits.Cofork f' g'}

CategoryTheory.Limits.Cofork.π ((CategoryTheory.Limits.Cocones.precompose α).obj c) =
  CategoryTheory.CategoryStruct.comp (α.app CategoryTheory.Limits.WalkingParallelPair.one) c.π


lemma eq_of_forall_subset_iff (h : ∀ u, s ⊆ u ↔ t ⊆ u) : s = t

{α : Type u}
{s t : Set α}
(h : ∀ (u : Set α), s ⊆ u ↔ t ⊆ u)


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

⇑(UniformEquiv.finTwoArrow α) = fun f => (f 0, f 1)


theorem coe_of_mul_apply_add [AddLeftCancelMonoid ι] [SetLike.GradedMonoid A] {i : ι} (r : A i)
    (r' : ⨁ i, A i) (j : ι) : ((of (fun i => A i) i r * r') (i + j) : R) = r * r' j

{ι : Type u_1}
{σ : Type u_2}
{R : Type u_4}
[DecidableEq ι]
[Semiring R]
[SetLike σ R]
[AddSubmonoidClass σ R]
(A : ι → σ)
[AddLeftCancelMonoid ι]
[SetLike.GradedMonoid A]
{i : ι}
(r : ↥(A i))
(r' : ⨁ (i : ι), ↥(A i))
(j : ι)

↑(((DirectSum.of (fun i => ↥(A i)) i) r * r') (i + j)) = ↑r * ↑(r' j)


theorem mem_cons_of_mem {a b : α} {s : Multiset α} (h : a ∈ s) : a ∈ b ::ₘ s

{α : Type u_1}
{a b : α}
{s : Multiset α}
(h : a ∈ s)


@[ext] theorem types_ext {α β : Type u} (f g : α ⟶ β) (h : ∀ a : α, f a = g a) : f = g

{α β : Type u}
(f g : α ⟶ β)
(h : ∀ (a : α), f a = g a)


theorem support_hsum_subset {s : SummableFamily Γ R α} : s.hsum.support ⊆ ⋃ a : α, (s a).support

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddCommMonoid R]
{α : Type u_3}
{s : HahnSeries.SummableFamily Γ R α}


/-- `Multicofork.toSigmaCofork` as a functor. -/
@[simps]
noncomputable def toSigmaCoforkFunctor : Multicofork I ⥤ Cofork I.fstSigmaMap I.sndSigmaMap

(I : CategoryTheory.Limits.MultispanIndex C)

{K₁ K₂ : CategoryTheory.Limits.Multicofork I}

(I.toSigmaCoforkFunctor.map f).hom = f.hom


theorem image_subset_image_iff {f : α → β} (hf : Injective f) : f '' s ⊆ f '' t ↔ s ⊆ t

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


@[reassoc (attr := simp)]
theorem adjunction_unit_naturality {X Y : Scheme.{u}} (f : X ⟶ Y) :
    f ≫ ΓSpec.adjunction.unit.app Y = ΓSpec.adjunction.unit.app X ≫ Spec.map (f.app ⊤)

{X Y : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)

CategoryTheory.CategoryStruct.comp f (AlgebraicGeometry.ΓSpec.adjunction.unit.app Y) =
  CategoryTheory.CategoryStruct.comp (AlgebraicGeometry.ΓSpec.adjunction.unit.app X)
    (AlgebraicGeometry.Spec.map (AlgebraicGeometry.Scheme.Hom.app f ⊤))


@[simp]
theorem mul_snd (x y : X q) : (x * y).2 = x.1 * y.2 + x.2 * y.1


@[simp]
theorem teichmuller_coeff_zero (r : R) : (teichmuller p r).coeff 0 = r

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

((WittVector.teichmuller p) r).coeff 0 = r


theorem snd_embedding_of_left_embedding {X Y S : TopCat} {f : X ⟶ S} (H : Embedding f) (g : Y ⟶ S) :
    Embedding <| ⇑(pullback.snd f g)

{X Y S : TopCat}
{f : X ⟶ S}
(H : Embedding ⇑f)
(g : Y ⟶ S)

Embedding ⇑(CategoryTheory.Limits.pullback.snd f g)


@[simp, norm_cast]
theorem coe_inj {f g : A →A[R] B} : (f : A →ₐ[R] B) = g ↔ f = g

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[TopologicalSpace A]
{B : Type u_3}
[Semiring B]
[TopologicalSpace B]
[Algebra R A]
[Algebra R B]
{f g : A →A[R] B}


theorem UniqueMDiffWithinAt.mono (h : UniqueMDiffWithinAt I s x) (st : s ⊆ t) :
    UniqueMDiffWithinAt I t x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{x : M}
{s t : Set M}
(h : UniqueMDiffWithinAt I s x)
(st : s ⊆ t)


/-- Subtracting the second vector passed to `oangle` from a multiple of the first vector negates
the sign of the angle. -/
@[simp]
theorem oangle_sign_smul_sub_right (x y : V) (r : ℝ) :
    (o.oangle x (r • x - y)).sign = -(o.oangle x y).sign

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


theorem comp_surjective {f : A →+* B} {g : B →+* C} (hf : f.FinitePresentation) (hg : Surjective g)
    (hker : g.ker.FG) : (g.comp f).FinitePresentation

{A : Type u_1}
{B : Type u_2}
{C : Type u_3}
[CommRing A]
[CommRing B]
[CommRing C]
{f : A →+* B}
{g : B →+* C}
(hf : f.FinitePresentation)
(hg : Function.Surjective ⇑g)
(hker : (RingHom.ker g).FG)


@[simp]
lemma isNilpotent_toMatrix_iff (b : Basis ι R M) (f : M →ₗ[R] M) :
    IsNilpotent (toMatrix b b f) ↔ IsNilpotent f

{R : Type u_1}
[CommSemiring R]
{ι : Type u_3}
{M : Type u_4}
[Fintype ι]
[DecidableEq ι]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(f : M →ₗ[R] M)

IsNilpotent ((LinearMap.toMatrix b b) f) ↔ IsNilpotent f


(l : Type u_1)
(R : Type u_2)
[DecidableEq l]
[CommRing R]
[Fintype l]


/-- **The Schröder-Bernstein Theorem**:
Given injections `α → β` and `β → α`, we can get a bijection `α → β`. -/
theorem schroeder_bernstein {f : α → β} {g : β → α} (hf : Function.Injective f)
    (hg : Function.Injective g) : ∃ h : α → β, Bijective h

{α : Type u}
{β : Type v}
{f : α → β}
{g : β → α}
(hf : Function.Injective f)
(hg : Function.Injective g)


theorem ContinuousLinearMap.isBoundedBilinearMap (f : E →L[𝕜] F →L[𝕜] G) :
    IsBoundedBilinearMap 𝕜 fun x : E × F => f x.1 x.2

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(f : E →L[𝕜] F →L[𝕜] G)

IsBoundedBilinearMap 𝕜 fun x => (f x.1) x.2


theorem trinomial_middle_coeff (hkm : k < m) (hmn : m < n) :
    (trinomial k m n u v w).coeff m = v

{R : Type u_1}
[Semiring R]
{k m n : ℕ}
{u v w : R}
(hkm : k < m)
(hmn : m < n)

(Polynomial.trinomial k m n u v w).coeff m = v


@[fun_prop]
theorem DifferentiableAt.sub_const (hf : DifferentiableAt 𝕜 f x) (c : F) :
    DifferentiableAt 𝕜 (fun y => f y - c) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
(hf : DifferentiableAt 𝕜 f x)
(c : F)


theorem rpow_le_one_of_one_le_of_nonpos {x : ℝ≥0} {z : ℝ} (hx : 1 ≤ x) (hz : z ≤ 0) : x ^ z ≤ 1


@[to_additive (attr := simp) abs_nonneg] lemma one_le_mabs (a : α) : 1 ≤ |a|ₘ

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

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


theorem existsUnique_sub_zsmul_mem_Ico {a : α} (ha : 0 < a) (b c : α) :
    ∃! m : ℤ, b - m • a ∈ Set.Ico c (c + a)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[Archimedean α]
{a : α}
(ha : 0 < a)
(b c : α)


@[simp]
theorem mem_compl : a ∈ sᶜ ↔ a ∉ s

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

a ∈ sᶜ ↔ a ∉ s


theorem mul_eq_mul_left (h0 : a ≠ 0) (hinf : a ≠ ∞) : a * b = a * c ↔ b = c

{a b c : ℝ≥0∞}
(h0 : a ≠ 0)
(hinf : a ≠ ⊤)


/-- If `C` is equivalent to `D`, then `E ⥤ C` is equivalent to `E ⥤ D`. -/
@[simps! functor inverse unitIso counitIso]
def congrRight (e : C ≌ D) : E ⥤ C ≌ E ⥤ D

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

e.congrRight.unitIso =
  CategoryTheory.Equivalence.adjointifyη
    (CategoryTheory.NatIso.ofComponents
      (fun F => F.rightUnitor.symm ≪≫ CategoryTheory.isoWhiskerLeft F e.unitIso ≪≫ F.associator e.functor e.inverse) ⋯)
    (CategoryTheory.NatIso.ofComponents
      (fun F => F.associator e.inverse e.functor ≪≫ CategoryTheory.isoWhiskerLeft F e.counitIso ≪≫ F.rightUnitor) ⋯)


theorem totalVariation_absolutelyContinuous_iff (s : SignedMeasure α) (μ : Measure α) :
    s.totalVariation ≪ μ ↔
      s.toJordanDecomposition.posPart ≪ μ ∧ s.toJordanDecomposition.negPart ≪ μ

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


theorem BinaryFan.isLimit_iff_isIso_snd {X Y : C} (h : IsTerminal X) (c : BinaryFan X Y) :
    Nonempty (IsLimit c) ↔ IsIso c.snd

(h : CategoryTheory.Limits.IsTerminal X)

(c : CategoryTheory.Limits.BinaryFan X Y)

Nonempty (CategoryTheory.Limits.IsLimit c) ↔ CategoryTheory.IsIso c.snd


theorem hom_right_act_hom' :
    ((P.tensorBimod Q).tensorBimod L).actRight ≫ hom P Q L =
      (hom P Q L ▷ U.X) ≫ (P.tensorBimod (Q.tensorBimod L)).actRight

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

((P.tensorBimod Q).tensorBimod L).actRight ≫ Bimod.AssociatorBimod.hom P Q L =
  Bimod.AssociatorBimod.hom P Q L ▷ U.X ≫ (P.tensorBimod (Q.tensorBimod L)).actRight


@[simp, norm_cast]
theorem cast_finsupp_sum [DivisionRing R] [CharZero R] (g : α → M → ℚ) :
    (↑(f.sum g) : R) = f.sum fun a b => ↑(g a b)

{α : Type u_1}
{M : Type u_5}
{R : Type u_11}
[Zero M]
(f : α →₀ M)
[DivisionRing R]
[CharZero R]
(g : α → M → ℚ)


protected theorem sub_le_iff_le_add {a b c : Nat} : a - b ≤ c ↔ a ≤ c + b


theorem real_inner_self_nonpos {x : F} : ⟪x, x⟫_ℝ ≤ 0 ↔ x = 0

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{x : F}


theorem Tendsto.eventually {f : α → β} {l₁ : Filter α} {l₂ : Filter β} {p : β → Prop}
    (hf : Tendsto f l₁ l₂) (h : ∀ᶠ y in l₂, p y) : ∀ᶠ x in l₁, p (f x)

{α : Type u}
{β : Type v}
{f : α → β}
{l₁ : Filter α}
{l₂ : Filter β}
{p : β → Prop}
(hf : Filter.Tendsto f l₁ l₂)
(h : ∀ᶠ (y : β) in l₂, p y)


theorem balancedCore_empty : balancedCore 𝕜 (∅ : Set E) = ∅

{𝕜 : Type u_1}
{E : Type u_2}
[SeminormedRing 𝕜]
[SMul 𝕜 E]


theorem cos_two_mul : cos (2 * x) = 2 * cos x ^ 2 - 1

Complex.cos (2 * x) = 2 * Complex.cos x ^ 2 - 1


theorem IsMax.fst (hx : IsMax x) : IsMax x.1

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


/-- In the specific case of continuous multilinear maps on spaces indexed by `Fin (n+1)`, where one
can build an element of `(i : Fin (n+1)) → M i` using `cons`, one can express directly the
additivity of a multilinear map along the first variable. -/
theorem cons_add (f : ContinuousMultilinearMap R M M₂) (m : ∀ i : Fin n, M i.succ) (x y : M 0) :
    f (cons (x + y) m) = f (cons x m) + f (cons y m)

[(i : Fin n.succ) → AddCommMonoid (M i)]

[(i : Fin n.succ) → TopologicalSpace (M i)]

f (Fin.cons (x + y) m) = f (Fin.cons x m) + f (Fin.cons y m)


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

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


@[simp, nolint simpNF] lemma disjiUnion_filter_eq (s : Finset α) (t : Finset β) (f : α → β) :
    t.disjiUnion (fun a ↦ s.filter (f · = a)) pairwiseDisjoint_fibers =
      s.filter fun c ↦ f c ∈ t

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

t.disjiUnion (fun a => Finset.filter (fun x => f x = a) s) ⋯ = Finset.filter (fun c => f c ∈ t) s


theorem finite_or_infinite (α : Sort*) : Finite α ∨ Infinite α


nonrec theorem continuousOn_const_smul_iff (hc : IsUnit c) :
    ContinuousOn (fun x => c • f x) s ↔ ContinuousOn f s

{M : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Monoid M]
[TopologicalSpace α]
[MulAction M α]
[ContinuousConstSMul M α]
[TopologicalSpace β]
{f : β → α}
{c : M}
{s : Set β}
(hc : IsUnit c)


/-- This universal property states that a functor `L : C ⥤ D` inverts morphisms
in `W` and the all functors `D ⥤ E` (for a fixed category `E`) uniquely factors
through `L`. -/
structure StrictUniversalPropertyFixedTarget where
  /-- the functor `L` inverts `W` -/
  inverts : W.IsInvertedBy L
  /-- any functor `C ⥤ E` which inverts `W` can be lifted as a functor `D ⥤ E`  -/
  lift : ∀ (F : C ⥤ E) (_ : W.IsInvertedBy F), D ⥤ E
  /-- there is a factorisation involving the lifted functor  -/
  fac : ∀ (F : C ⥤ E) (hF : W.IsInvertedBy F), L ⋙ lift F hF = F
  /-- uniqueness of the lifted functor -/
  uniq : ∀ (F₁ F₂ : D ⥤ E) (_ : L ⋙ F₁ = L ⋙ F₂), F₁ = F₂

(self : CategoryTheory.Localization.StrictUniversalPropertyFixedTarget L W E)


theorem Filter.TendstoNhdsWithinIoi.mul_const [MulPosStrictMono 𝕜] [MulPosReflectLT 𝕜]
    (h : Tendsto f l (𝓝[>] c)) : Tendsto (fun a => f a * b) l (𝓝[>] (c * b))

{α : Type u_2}
{𝕜 : Type u_6}
[Preorder 𝕜]
[Zero 𝕜]
[Mul 𝕜]
[TopologicalSpace 𝕜]
[ContinuousMul 𝕜]
{l : Filter α}
{f : α → 𝕜}
{b c : 𝕜}
(hb : 0 < b)
[MulPosStrictMono 𝕜]
[MulPosReflectLT 𝕜]
(h : Filter.Tendsto f l (𝓝[>] c))

Filter.Tendsto (fun a => f a * b) l (𝓝[>] (c * b))


@[to_additive neg_le_iff_add_nonneg]
theorem inv_le_iff_one_le_mul : a⁻¹ ≤ b ↔ 1 ≤ b * a

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


theorem tendstoLocallyUniformlyOn_iff_forall_isCompact [LocallyCompactSpace α] (hs : IsOpen s) :
    TendstoLocallyUniformlyOn F f p s ↔ ∀ K, K ⊆ s → IsCompact K → TendstoUniformlyOn F f p K

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

TendstoLocallyUniformlyOn F f p s ↔ ∀ K ⊆ s, IsCompact K → TendstoUniformlyOn F f p K


theorem toSubmonoid_injective : Function.Injective (toSubmonoid : Subsemiring R → Submonoid R)


lemma gaussianPDF_def (μ : ℝ) (v : ℝ≥0) :
    gaussianPDF μ v = fun x ↦ ENNReal.ofReal (gaussianPDFReal μ v x)

ProbabilityTheory.gaussianPDF μ v = fun x => ENNReal.ofReal (ProbabilityTheory.gaussianPDFReal μ v x)


theorem isGLB_sInf (s : Set α) : IsGLB s (sInf s)

{α : Type u_1}
[CompleteSemilatticeInf α]
(s : Set α)


@[simp]
theorem norm_inv (a : α) : ‖a⁻¹‖ = ‖a‖⁻¹

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

‖a⁻¹‖ = ‖a‖⁻¹


theorem nth_mem_of_lt_card {n : ℕ} (hf : (setOf p).Finite) (hlt : n < hf.toFinset.card) :
    p (nth p n)

{p : ℕ → Prop}
{n : ℕ}
(hf : (setOf p).Finite)
(hlt : n < hf.toFinset.card)


/-- The triangles of consisting of a morphism in `H` and the maps to `sup O H` commute.
-/
theorem toSup_commutes {X Y : C} (mX : X ∈ O) (mY : Y ∈ O) {f : X ⟶ Y}
    (mf : (⟨X, Y, mX, mY, f⟩ : Σ' (X Y : C) (_ : X ∈ O) (_ : Y ∈ O), X ⟶ Y) ∈ H) :
    f ≫ toSup O H mY = toSup O H mX

CategoryTheory.CategoryStruct.comp f (CategoryTheory.IsFiltered.toSup O H mY) = CategoryTheory.IsFiltered.toSup O H mX


@[simp, mfld_simps]
theorem coe_coe_symm : (e.toPartialEquiv.symm : Y → X) = e.symm

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


/-- Show that the response for left provided by `leftResponse` preserves the left-player-wins
condition. -/
theorem leftResponse_spec {x : PGame} (h : 0 ≤ x) (j : x.RightMoves) :
    0 ≤ (x.moveRight j).moveLeft (leftResponse h j)

{x : SetTheory.PGame}
(h : 0 ≤ x)
(j : x.RightMoves)

0 ≤ (x.moveRight j).moveLeft (SetTheory.PGame.leftResponse h j)


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

{M : Type u_1}
[Add M]
(S : AddSubsemigroup M)


/-- The measurable superset `toMeasurable μ t` of `t` (which has the same measure as `t`)
satisfies, for any measurable set `s`, the equality `μ (toMeasurable μ t ∩ s) = μ (t ∩ s)`.
This only holds when `μ` is s-finite -- for example for σ-finite measures. For a version without
this assumption (but requiring that `t` has finite measure), see `measure_toMeasurable_inter`. -/
theorem measure_toMeasurable_inter_of_sFinite [SFinite μ] {s : Set α} (hs : MeasurableSet s)
    (t : Set α) : μ (toMeasurable μ t ∩ s) = μ (t ∩ s)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.SFinite μ]
{s : Set α}
(hs : MeasurableSet s)
(t : Set α)

μ (MeasureTheory.toMeasurable μ t ∩ s) = μ (t ∩ s)


/-- If twice the oriented angles between two triples of points are equal, one triple is affinely
independent if and only if the other is. -/
theorem affineIndependent_iff_of_two_zsmul_oangle_eq {p₁ p₂ p₃ p₄ p₅ p₆ : P}
    (h : (2 : ℤ) • ∡ p₁ p₂ p₃ = (2 : ℤ) • ∡ p₄ p₅ p₆) :
    AffineIndependent ℝ ![p₁, p₂, p₃] ↔ AffineIndependent ℝ ![p₄, p₅, p₆]

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


@[simp]
theorem nhdsSet_univ : 𝓝ˢ (univ : Set X) = ⊤


@[to_additive]
theorem inv_mul_self (a : G) : a⁻¹ * a = 1


@[simp] theorem sub_eq_top_iff {a b : WithTop α} : a - b = ⊤ ↔ a = ⊤ ∧ b ≠ ⊤

{α : Type u_1}
[Sub α]
[Bot α]
{a b : WithTop α}


theorem IsAntichain.least_iff (hs : IsAntichain (· ≤ ·) s) : IsLeast s a ↔ s = {a}

(hs : IsAntichain (fun x x_1 => x ≤ x_1) s)


theorem biSup_const {ι : Sort _} {a : α} {s : Set ι} (hs : s.Nonempty) : ⨆ i ∈ s, a = a

{α : Type u_1}
[CompleteLattice α]
{ι : Type u_9}
{a : α}
{s : Set ι}
(hs : s.Nonempty)


lemma setIntegral_stieltjesOfMeasurableRat [IsFiniteKernel κ] (hf : IsRatCondKernelCDF f κ ν)
    (a : α) (x : ℝ) {s : Set β} (hs : MeasurableSet s) :
    ∫ b in s, stieltjesOfMeasurableRat f hf.measurable (a, b) x ∂(ν a)
      = (κ a (s ×ˢ Iic x)).toReal

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

{f : α × β → ℚ → ℝ}

(hf : ProbabilityTheory.IsRatCondKernelCDF f κ ν)

∫ (b : β) in s, ↑(ProbabilityTheory.stieltjesOfMeasurableRat f ⋯ (a, b)) x ∂ν a = ((κ a) (s ×ˢ Set.Iic x)).toReal


theorem support_smul {γ : Type w} [Semiring γ] [∀ i, AddCommMonoid (β i)] [∀ i, Module γ (β i)]
    [∀ (i : ι) (x : β i), Decidable (x ≠ 0)] (b : γ) (v : Π₀ i, β i) :
    (b • v).support ⊆ v.support

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


theorem coe_cons (s : Sym α n) (a : α) : (a ::ₛ s : Multiset α) = a ::ₘ s

{α : Type u_1}
{n : ℕ}
(s : Sym α n)
(a : α)


theorem univ_pi_Ioc_ae_eq_Icc {f g : ∀ i, α i} :
    (pi univ fun i => Ioc (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g

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

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

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

(Set.univ.pi fun i => Set.Ioc (f i) (g i)) =ᵐ[MeasureTheory.Measure.pi μ] Set.Icc f g


@[simp]
theorem sdiff_adj (x y : SimpleGraph V) (v w : V) : (x \ y).Adj v w ↔ x.Adj v w ∧ ¬y.Adj v w

{V : Type u}
(x y : SimpleGraph V)
(v w : V)


@[to_additive]
theorem _root_.SubmonoidClass.finsupp_prod_mem {S : Type*} [SetLike S N] [SubmonoidClass S N]
    (s : S) (f : α →₀ M) (g : α → M → N) (h : ∀ c, f c ≠ 0 → g c (f c) ∈ s) : f.prod g ∈ s

(h : ∀ (c : α), f c ≠ 0 → g c (f c) ∈ s)


theorem ContDiff.clm_apply {f : E → F →L[𝕜] G} {g : E → F} {n : ℕ∞} (hf : ContDiff 𝕜 n f)
    (hg : ContDiff 𝕜 n g) : ContDiff 𝕜 n fun x => (f x) (g x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F →L[𝕜] G}
{g : E → F}
{n : ℕ∞}
(hf : ContDiff 𝕜 n f)
(hg : ContDiff 𝕜 n g)


/-- A σ-compact set `s` is Lindelöf-/
theorem IsSigmaCompact.isLindelof (hs : IsSigmaCompact s) :
    IsLindelof s

{X : Type u}
[TopologicalSpace X]
{s : Set X}
(hs : IsSigmaCompact s)


/-- On an open set, `f : ℂ → E` is analytic iff it is differentiable -/
theorem analyticOn_iff_differentiableOn {f : ℂ → E} {s : Set ℂ} (o : IsOpen s) :
    AnalyticOn ℂ f s ↔ DifferentiableOn ℂ f s

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
[CompleteSpace E]
{f : ℂ → E}
{s : Set ℂ}
(o : IsOpen s)


theorem lt_add_of_tsub_lt_left (h : a - b < c) : a < b + c

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


theorem mem_Lp_iff_eLpNorm_lt_top {f : α →ₘ[μ] E} : f ∈ Lp E p μ ↔ eLpNorm f p μ < ∞

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

f ∈ MeasureTheory.Lp E p μ ↔ MeasureTheory.eLpNorm (↑f) p μ < ⊤


@[simp]
theorem finSumFinEquiv_apply_right (i : Fin n) :
    (finSumFinEquiv (Sum.inr i) : Fin (m + n)) = Fin.natAdd m i

finSumFinEquiv (Sum.inr i) = Fin.natAdd m i


@[to_additive]
theorem index_inf_ne_zero (hH : H.index ≠ 0) (hK : K.index ≠ 0) : (H ⊓ K).index ≠ 0

{G : Type u_1}
[AddGroup G]
{H K : AddSubgroup G}
(hH : H.index ≠ 0)
(hK : K.index ≠ 0)


theorem le_or_eq_of_le_add_one {m n : Nat} (h : m ≤ n + 1) : m ≤ n ∨ m = n + 1


@[instance]
theorem punctured_nhds_neBot (x : α) : NeBot (𝓝[≠] x)

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


@[to_additive nsmul_right_mono]
theorem pow_left_mono (n : ℕ) : Monotone fun a : M => a ^ n

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

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


@[to_additive]
theorem mulIndicator_union_of_disjoint (h : Disjoint s t) (f : α → M) :
    mulIndicator (s ∪ t) f = fun a => mulIndicator s f a * mulIndicator t f a

{α : Type u_1}
{M : Type u_4}
[AddZeroClass M]
{s t : Set α}
(h : Disjoint s t)
(f : α → M)

(s ∪ t).indicator f = fun a => s.indicator f a + t.indicator f a


/-- The forgetful functor from `Scheme` to `LocallyRingedSpace`. -/
@[simps!]
def forgetToLocallyRingedSpace : Scheme ⥤ LocallyRingedSpace

AlgebraicGeometry.Scheme.forgetToLocallyRingedSpace.obj self = self.toLocallyRingedSpace


/-- Transport dependent functions through an equivalence of the base space.
-/
@[simps]
def piCongrLeft' (P : α → Sort*) (e : α ≃ β) : (∀ a, P a) ≃ ∀ b, P (e.symm b)

{α : Sort u_2}
{β : Sort u_3}
(P : α → Sort u_1)
(e : α ≃ β)
(f : (a : α) → P a)
(x : β)

(Equiv.piCongrLeft' P e) f x = f (e.symm x)


@[simp]
theorem compLinearMap_apply (g : MultilinearMap R M₁' M₂) (f : ∀ i, M₁ i →ₗ[R] M₁' i)
    (m : ∀ i, M₁ i) : g.compLinearMap f m = g fun i => f i (m i)

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
{M₁' : ι → Type u_1}
[(i : ι) → AddCommMonoid (M₁' i)]
[(i : ι) → Module R (M₁' i)]
(g : MultilinearMap R M₁' M₂)
(f : (i : ι) → M₁ i →ₗ[R] M₁' i)
(m : (i : ι) → M₁ i)

(g.compLinearMap f) m = g fun i => (f i) (m i)


theorem coeff_eq_zero : p.coeff n = 0 ↔ p n = 0

{𝕜 : Type u}
{E : Type v}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{p : FormalMultilinearSeries 𝕜 𝕜 E}
{n : ℕ}


@[simp] protected theorem div_neg : ∀ a b : Int, a.div (-b) = -(a.div b)


theorem not_minimal {a b c : ℤ} (h : Minimal a b c) (ha2 : a % 2 = 1) (hc : 0 < c) : False

{a b c : ℤ}
(h : Fermat42.Minimal a b c)
(ha2 : a % 2 = 1)
(hc : 0 < c)


/-- Equivalence between all dependent finitely supported functions `f : Π₀ i, β i` and type
of pairs `⟨s : Finset ι, f : ∀ i : s, {x : β i // x ≠ 0}⟩`. -/
@[simps! apply_fst apply_snd_coe]
def sigmaFinsetFunEquiv : (Π₀ i, β i) ≃ Σ s : Finset ι, ∀ i : s, {x : β i // x ≠ 0}

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

∀ (a : Π₀ (i : ι), β i), (DFinsupp.sigmaFinsetFunEquiv a).fst = a.support


@[simp]
theorem invOf_inj [Monoid α] {a b : α} [Invertible a] [Invertible b] : ⅟ a = ⅟ b ↔ a = b

{α : Type u}
[Monoid α]
{a b : α}
[Invertible a]
[Invertible b]


theorem ofReal_injective : Function.Injective ((↑) : ℝ → K)


theorem ContMDiffWithinAt.continuousWithinAt (hf : ContMDiffWithinAt I I' n f s x) :
    ContinuousWithinAt f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{s : Set M}
{x : M}
{n : ℕ∞}
(hf : ContMDiffWithinAt I I' n f s x)


theorem cos_nat_mul_two_pi_add_pi (n : ℕ) : cos (n * (2 * π) + π) = -1

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


/-- The functor picking out the `i`-th object of a complex. -/
@[simps]
def eval (i : ι) : HomologicalComplex V c ⥤ V

(HomologicalComplex.eval V c i).obj C = C.X i


theorem intervalIntegrable_one_div (h : ∀ x : ℝ, x ∈ [[a, b]] → f x ≠ 0)
    (hf : ContinuousOn f [[a, b]]) : IntervalIntegrable (fun x => 1 / f x) μ a b


@[to_additive]
theorem comap_equiv_eq_map_symm' (f : N ≃* G) (K : Subgroup G) :
    K.comap f.toMonoidHom = K.map f.symm.toMonoidHom

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

Subgroup.comap f.toMonoidHom K = Subgroup.map f.symm.toMonoidHom K


theorem bot_lt_of_maximal (M : Ideal R) [hm : M.IsMaximal] (non_field : ¬IsField R) : ⊥ < M

{R : Type u}
[CommSemiring R]
[Nontrivial R]
(M : Ideal R)
[hm : M.IsMaximal]
(non_field : ¬IsField R)


theorem sublist_of_subperm_of_sorted [IsAntisymm α r] {l₁ l₂ : List α} (hp : l₁ <+~ l₂)
    (hs₁ : l₁.Sorted r) (hs₂ : l₂.Sorted r) : l₁ <+ l₂

{α : Type u}
{r : α → α → Prop}
[IsAntisymm α r]
{l₁ l₂ : List α}
(hp : l₁.Subperm l₂)
(hs₁ : List.Sorted r l₁)
(hs₂ : List.Sorted r l₂)


/-- Any two functors to `Discrete PUnit` are isomorphic. -/
@[simps!]
def punitExt (F G : C ⥤ Discrete PUnit.{w + 1}) : F ≅ G

(F G : CategoryTheory.Functor C (CategoryTheory.Discrete PUnit.{w + 1}))


@[simp] theorem ushiftRight_eq (x : BitVec w) (n : Nat)   : BitVec.ushiftRight x n = x >>> n


@[simp]
theorem coe_constVSub (p : P) : ⇑(constVSub 𝕜 p) = (p -ᵥ ·)

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(p : P)

⇑(AffineIsometryEquiv.constVSub 𝕜 p) = fun x => p -ᵥ x


/-- The projection from a trivial fiber bundle to its base is continuous. -/
protected theorem continuous_proj (h : IsHomeomorphicTrivialFiberBundle F proj) :
    Continuous proj


lemma isCoprime_row (A : SL(2, R)) (i : Fin 2) : IsCoprime (A i 0) (A i 1)

(A : Matrix.SpecialLinearGroup (Fin 2) R)


theorem hasFiniteIntegral_iff_ofReal {f : α → ℝ} (h : 0 ≤ᵐ[μ] f) :
    HasFiniteIntegral f μ ↔ (∫⁻ a, ENNReal.ofReal (f a) ∂μ) < ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(h : 0 ≤ᵐ[μ] f)

MeasureTheory.HasFiniteIntegral f μ ↔ ∫⁻ (a : α), ENNReal.ofReal (f a) ∂μ < ⊤


theorem degree_X_pow_le (n : ℕ) : degree (X ^ n : R[X]) ≤ n


@[simp]
lemma shiftFunctor_eq (n : ℤ) :
    CategoryTheory.shiftFunctor (Triangle C) n = Triangle.shiftFunctor C n

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

CategoryTheory.shiftFunctor (CategoryTheory.Pretriangulated.Triangle C) n =
  CategoryTheory.Pretriangulated.Triangle.shiftFunctor C n


lemma dvd_pow (hab : a ∣ b) : ∀ {n : ℕ} (_ : n ≠ 0), a ∣ b ^ n

{α : Type u_1}
[Monoid α]
{a b : α}
(hab : a ∣ b)
{n : ℕ}


@[simp]
theorem nonempty_encodable : Nonempty (Encodable α) ↔ Countable α


@[simp, norm_cast]
theorem const_inj [NeBot l] {a b : β} : (↑a : Germ l β) = ↑b ↔ a = b

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[l.NeBot]
{a b : β}


theorem factors_span_eq {p : K[X]} : factors (span {p}) = (factors p).map (fun q ↦ span {q})

UniqueFactorizationMonoid.factors (Ideal.span {p}) =
  Multiset.map (fun q => Ideal.span {q}) (UniqueFactorizationMonoid.factors p)


theorem finset_sup_div {α} {f : α → ℝ≥0} {s : Finset α} (r : ℝ≥0) :
    s.sup f / r = s.sup fun a => f a / r

{α : Type u_1}
{f : α → ℝ≥0}
{s : Finset α}
(r : ℝ≥0)


@[simp] theorem intCast_num (a : Int) : (a : Rat).num = a


/-- Bijection obtained by separating the term of index `none` of a dfinsupp over `Option ι`.

This is the dfinsupp version of `Equiv.piOptionEquivProd`. -/
@[simps]
noncomputable def equivProdDFinsupp [∀ i, Zero (α i)] :
    (Π₀ i, α i) ≃ α none × Π₀ i, α (some i)

{ι : Type u}
{α : Option ι → Type v}
[(i : Option ι) → Zero (α i)]
(f : Π₀ (i : Option ι), α i)

DFinsupp.equivProdDFinsupp f = (f none, DFinsupp.comapDomain some ⋯ f)


/-- `C` is cofiltered if and only if for every functor `F : J ⥤ C` from a finite category there is
    some `X : C` such that `lim Hom(X, F·)` is nonempty. -/
theorem IsCofiltered.iff_nonempty_limit : IsCofiltered C ↔
    ∀ {J : Type v} [SmallCategory J] [FinCategory J] (F : J ⥤ C),
      ∃ (X : C), Nonempty (limit (F ⋙ coyoneda.obj (op X)))

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

CategoryTheory.IsCofiltered C ↔
  ∀ {J : Type v} [inst : CategoryTheory.SmallCategory J] [inst_1 : CategoryTheory.FinCategory J] (F : J ⥤ C),
    ∃ X, Nonempty (CategoryTheory.Limits.limit (F ⋙ CategoryTheory.coyoneda.obj (Opposite.op X)))


/-- A bicategory structure on the oplax functors between bicategories. -/
-- Porting note: verified that projections are correct and changed @[simps] to @[simps!]
@[simps!]
instance OplaxFunctor.bicategory : Bicategory (OplaxFunctor B C)

(B : Type u₁)
[CategoryTheory.Bicategory B]
(C : Type u₂)
[CategoryTheory.Bicategory C]
(a b : CategoryTheory.OplaxFunctor B C)

∀ {X Y Z : a ⟶ b} (Γ : CategoryTheory.OplaxNatTrans.Modification X Y)
  (Δ : CategoryTheory.OplaxNatTrans.Modification Y Z) (a_1 : B),
  (CategoryTheory.CategoryStruct.comp Γ Δ).app a_1 = CategoryTheory.CategoryStruct.comp (Γ.app a_1) (Δ.app a_1)


@[to_additive (attr := simp)]
lemma op_eq_one_iff [One α] (a : α) : op a = 1 ↔ a = 1


/--
`HasAffineProperty P Q` is a type class asserting that `P` is local at the target, and over affine
schemes, it is equivalent to `Q : AffineTargetMorphismProperty`.
To make the proofs easier, we state it instead as
1. `Q` is local at the target
2. `P f` if and only if `∀ U, Q (f ∣_ U)` ranging over all affine opens of `U`.
See `HasAffineProperty.iff`.
-/
class HasAffineProperty (P : MorphismProperty Scheme)
    (Q : outParam AffineTargetMorphismProperty) : Prop where
  isLocal_affineProperty : Q.IsLocal
  eq_targetAffineLocally' : P = targetAffineLocally Q

(P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme)

{Q : outParam AlgebraicGeometry.AffineTargetMorphismProperty}

[self : AlgebraicGeometry.HasAffineProperty P Q]


lemma Indep.basis_closure (hI : M.Indep I) : M.Basis I (M.closure I)

{α : Type u_2}
{M : Matroid α}
{I : Set α}
(hI : M.Indep I)


@[to_additive]
theorem csInf_mul (hs₀ : s.Nonempty) (hs₁ : BddBelow s) (ht₀ : t.Nonempty) (ht₁ : BddBelow t) :
    sInf (s * t) = sInf s * sInf t

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

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


/-- If `M'` is a two-sided inverse for `M` (indexed differently), `det (M * N * M') = det N`.

See `Matrix.det_conj` and `Matrix.det_conj'` for the case when `M' = M⁻¹` or vice versa. -/
theorem det_conj_of_mul_eq_one [DecidableEq m] [DecidableEq n] {M : Matrix m n A}
    {M' : Matrix n m A} {N : Matrix n n A} (hMM' : M * M' = 1) (hM'M : M' * M = 1) :
    det (M * N * M') = det N

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


theorem eventuallyEq_one_of_mem_ball (h : x ∈ ball c f.rIn) : f =ᶠ[𝓝 x] 1

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
{c : E}
(f : ContDiffBump c)
{x : E}
(h : x ∈ Metric.ball c f.rIn)


/-- A cocone extended by an isomorphism is isomorphic to the original cone. -/
@[simps]
def extendIso (s : Cocone F) {X : C} (f : s.pt ≅ X) : s ≅ s.extend f.hom

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(s : CategoryTheory.Limits.Cocone F)
{X : C}
(f : s.pt ≅ X)

(CategoryTheory.Limits.Cocones.extendIso s f).inv.hom = f.inv


theorem Multiset.mem_of_mem_toEnumFinset {p : α × ℕ} (h : p ∈ m.toEnumFinset) : p.1 ∈ m

{α : Type u_1}
[DecidableEq α]
{m : Multiset α}
{p : α × ℕ}
(h : p ∈ m.toEnumFinset)


/-- Weighted generalized mean inequality, version for sums over finite sets, with `ℝ≥0`-valued
functions and real exponents. -/
theorem arith_mean_le_rpow_mean (w z : ι → ℝ≥0) (hw' : ∑ i ∈ s, w i = 1) {p : ℝ} (hp : 1 ≤ p) :
    ∑ i ∈ s, w i * z i ≤ (∑ i ∈ s, w i * z i ^ p) ^ (1 / p)

{ι : Type u}
(s : Finset ι)
(w z : ι → ℝ≥0)
(hw' : ∑ i ∈ s, w i = 1)
{p : ℝ}
(hp : 1 ≤ p)


lemma span_smul_eq
    (s : Set R) (N : Submodule R M) :
    Ideal.span s • N = s • N

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(s : Set R)
(N : Submodule R M)


@[simp, norm_cast] lemma coe_divNat (n d : ℕ) : (divNat n d : ℚ) = .divInt n d


@[simp, norm_cast]
theorem coeComplex_mul (z w : ℂ) : ↑(z * w) = (z * w : ℍ)


/-- The functor which sends a triangle `X ⟶ Y ⟶ Z ⟶ X⟦1⟧` in `C` to the triangle
`op Z ⟶ op Y ⟶ op X ⟶ (op Z)⟦1⟧` in `Cᵒᵖ` (without introducing signs). -/
@[simps]
noncomputable def functor : (Triangle C)ᵒᵖ ⥤ Triangle Cᵒᵖ

{T₁ T₂ : (CategoryTheory.Pretriangulated.Triangle C)ᵒᵖ}

((CategoryTheory.Pretriangulated.TriangleOpEquivalence.functor C).map φ).hom₁ = φ.unop.hom₃.op


theorem meas_eLpNormEssSup_lt {f : α → F} : μ { y | eLpNormEssSup f μ < ‖f y‖₊ } = 0

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f : α → F}

μ {y | MeasureTheory.eLpNormEssSup f μ < ↑‖f y‖₊} = 0


theorem setIntegral_eq_of_subset_of_ae_diff_eq_zero_aux (hts : s ⊆ t)
    (h't : ∀ᵐ x ∂μ, x ∈ t \ s → f x = 0) (haux : StronglyMeasurable f)
    (h'aux : IntegrableOn f t μ) : ∫ x in t, f x ∂μ = ∫ x in s, f x ∂μ

(h't : ∀ᵐ (x : X) ∂μ, x ∈ t \ s → f x = 0)

(haux : MeasureTheory.StronglyMeasurable f)

(h'aux : MeasureTheory.IntegrableOn f t μ)

∫ (x : X) in t, f x ∂μ = ∫ (x : X) in s, f x ∂μ


@[to_additive]
theorem sup_eq_closure (H H' : Subgroup G) : H ⊔ H' = closure ((H : Set G) ∪ (H' : Set G))

{G : Type u_1}
[Group G]
(H H' : Subgroup G)


/-- A satellite configuration is a configuration of `N+1` points that shows up in the inductive
construction for the Besicovitch covering theorem. It depends on some parameter `τ ≥ 1`.

This is a family of balls (indexed by `i : Fin N.succ`, with center `c i` and radius `r i`) such
that the last ball intersects all the other balls (condition `inter`),
and given any two balls there is an order between them, ensuring that the first ball does not
contain the center of the other one, and the radius of the second ball can not be larger than
the radius of the first ball (up to a factor `τ`). This order corresponds to the order of choice
in the inductive construction: otherwise, the second ball would have been chosen before.
This is the condition `h`.

Finally, the last ball is chosen after all the other ones, meaning that `h` can be strengthened
by keeping only one side of the alternative in `hlast`.
-/
structure Besicovitch.SatelliteConfig (α : Type*) [MetricSpace α] (N : ℕ) (τ : ℝ) where
  c : Fin N.succ → α
  r : Fin N.succ → ℝ
  rpos : ∀ i, 0 < r i
  h : Pairwise fun i j =>
    r i ≤ dist (c i) (c j) ∧ r j ≤ τ * r i ∨ r j ≤ dist (c j) (c i) ∧ r i ≤ τ * r j
  hlast : ∀ i < last N, r i ≤ dist (c i) (c (last N)) ∧ r (last N) ≤ τ * r i
  inter : ∀ i < last N, dist (c i) (c (last N)) ≤ r i + r (last N)

(self : Besicovitch.SatelliteConfig α N τ)

i < Fin.last N → dist (self.c i) (self.c (Fin.last N)) ≤ self.r i + self.r (Fin.last N)


@[simp]
theorem midpoint_sub_add (x y : V) : midpoint R (x - y) (x + y) = x

(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x y : V)


@[to_additive add_prehaar_le_addIndex]
theorem prehaar_le_index (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G)
    (hU : (interior U).Nonempty) : prehaar (K₀ : Set G) U K ≤ index (K : Set G) K₀

(K₀ : TopologicalSpace.PositiveCompacts G)

MeasureTheory.Measure.haar.prehaar (↑K₀) U K ≤ ↑(MeasureTheory.Measure.haar.index ↑K ↑K₀)


@[simp]
theorem mapRange.linearEquiv_symm (e : ∀ i, β₁ i ≃ₗ[R] β₂ i) :
    (mapRange.linearEquiv e).symm = mapRange.linearEquiv fun i => (e i).symm

{ι : Type u_1}
{R : Type u_2}
[Semiring R]
{β₁ : ι → Type u_7}
{β₂ : ι → Type u_8}
[(i : ι) → AddCommMonoid (β₁ i)]
[(i : ι) → AddCommMonoid (β₂ i)]
[(i : ι) → Module R (β₁ i)]
[(i : ι) → Module R (β₂ i)]
(e : (i : ι) → β₁ i ≃ₗ[R] β₂ i)

(DFinsupp.mapRange.linearEquiv e).symm = DFinsupp.mapRange.linearEquiv fun i => (e i).symm


@[to_additive (attr := deprecated IsCompact.measure_closure (since := "2024-01-28"))]
lemma _root_.IsCompact.measure_closure_eq_of_group {k : Set G} (hk : IsCompact k) (μ : Measure G) :
    μ (closure k) = μ k

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
[Group G]
[TopologicalGroup G]
{k : Set G}
(hk : IsCompact k)
(μ : MeasureTheory.Measure G)


lemma val_one'' : ∀ {n}, n ≠ 1 → (1 : ZMod n).val = 1


theorem prod_antilipschitzWith_equiv [PseudoEMetricSpace α] [PseudoEMetricSpace β] :
    AntilipschitzWith ((2 : ℝ≥0) ^ (1 / p).toReal) (WithLp.equiv p (α × β))

(p : ℝ≥0∞)
(α : Type u_2)
(β : Type u_3)
[hp : Fact (1 ≤ p)]
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]

AntilipschitzWith (2 ^ (1 / p).toReal) ⇑(WithLp.equiv p (α × β))


@[simp]
lemma homologyMap_neg : homologyMap (-φ) i = -homologyMap φ i

{C : Type u_1}
{ι : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{c : ComplexShape ι}
{K L : HomologicalComplex C c}
(φ : K ⟶ L)
(i : ι)
[K.HasHomology i]
[L.HasHomology i]

HomologicalComplex.homologyMap (-φ) i = -HomologicalComplex.homologyMap φ i


@[to_additive (attr := simp)]
theorem _root_.Submonoid.exponent_top :
    Monoid.exponent (⊤ : Submonoid G) = Monoid.exponent G


lemma coe_basis : (CoordinateRing.basis W : Fin 2 → W.CoordinateRing) = ![1, mk W Y]

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

⇑(WeierstrassCurve.Affine.CoordinateRing.basis W) = ![1, (WeierstrassCurve.Affine.CoordinateRing.mk W) Y]


/-- The union of finitely many Gδ sets is a Gδ set, `Set.sUnion` version. -/
theorem IsGδ.sUnion {S : Set (Set X)} (hS : S.Finite) (h : ∀ s ∈ S, IsGδ s) : IsGδ (⋃₀ S)

{X : Type u_1}
[TopologicalSpace X]
{S : Set (Set X)}
(hS : S.Finite)
(h : ∀ s ∈ S, IsGδ s)


@[simp]
theorem iUnion_left_iff [Countable ι] {s : ι → Set α} :
    AEDisjoint μ (⋃ i, s i) t ↔ ∀ i, AEDisjoint μ (s i) t

{ι : Type u_1}
{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{t : Set α}
[Countable ι]
{s : ι → Set α}

MeasureTheory.AEDisjoint μ (⋃ i, s i) t ↔ ∀ (i : ι), MeasureTheory.AEDisjoint μ (s i) t


theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Supermartingale f ℱ μ) :
    Supermartingale (c • f) ℱ μ

(hf : MeasureTheory.Supermartingale f ℱ μ)

MeasureTheory.Supermartingale (c • f) ℱ μ


theorem coeFn_negPart (f : Lp ℝ p μ) : ∀ᵐ a ∂μ, negPart f a = -min (f a) 0

{α : Type u_1}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
(f : ↥(MeasureTheory.Lp ℝ p μ))

∀ᵐ (a : α) ∂μ, ↑↑(MeasureTheory.Lp.negPart f) a = -min (↑↑f a) 0


theorem lcm_eq_nat_lcm (m n : ℕ) : lcm m n = Nat.lcm m n


theorem toRel_symmetric (s : Set (Sym2 α)) : Symmetric (ToRel s)


@[simp] lemma Even.add_one (h : Even a) : Odd (a + 1)

{α : Type u_2}
[Semiring α]
{a : α}
(h : Even a)


/-- Version of `tprod_eq_mul_tprod_ite` for `CommMonoid` rather than `CommGroup`.
Requires a different convergence assumption involving `Function.update`. -/
@[to_additive "Version of `tsum_eq_add_tsum_ite` for `AddCommMonoid` rather than `AddCommGroup`.
Requires a different convergence assumption involving `Function.update`."]
theorem tprod_eq_mul_tprod_ite' [DecidableEq β] {f : β → α} (b : β)
    (hf : Multipliable (update f b 1)) :
    ∏' x, f x = f b * ∏' x, ite (x = b) 1 (f x)

(hf : Multipliable (Function.update f b 1))

∏' (x : β), f x = f b * ∏' (x : β), if x = b then 1 else f x


theorem tensorRightHomEquiv_symm_naturality {X X' Y Y' Z : C} [ExactPairing Y Y'] (f : X ⟶ X')
    (g : X' ⟶ Z ⊗ Y') :
    (tensorRightHomEquiv X Y Y' Z).symm (f ≫ g) =
      f ▷ Y ≫ (tensorRightHomEquiv X' Y Y' Z).symm g

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

(CategoryTheory.tensorRightHomEquiv X Y Y' Z).symm (f ≫ g) =
  f ▷ Y ≫ (CategoryTheory.tensorRightHomEquiv X' Y Y' Z).symm g


protected theorem fact_zero_lt_one : Fact ((0 : ℝ) < 1)


@[simp] protected lemma sdiff_idem (s : UpperSet α) (t : Set α) : (s.sdiff t).sdiff t = s.sdiff t

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


theorem IsLocalExtrOn.on_subset {t : Set α} (hf : IsLocalExtrOn f t a) (h : s ⊆ t) :
    IsLocalExtrOn f s a

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


theorem prod_eq_prod_iff_of_nonempty (h : (s ×ˢ t).Nonempty) :
    s ×ˢ t = s₁ ×ˢ t₁ ↔ s = s₁ ∧ t = t₁

{α : Type u_1}
{β : Type u_2}
{s s₁ : Set α}
{t t₁ : Set β}
(h : (s ×ˢ t).Nonempty)


theorem edist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
    edist x y = (∑ i, edist (x i) (y i) ^ 2) ^ (1 / 2 : ℝ)

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

edist x y = (∑ i : ι, edist (x i) (y i) ^ 2) ^ (1 / 2)


@[simp]
theorem sym_succ : s.sym (n + 1) = s.sup fun a ↦ (s.sym n).image <| Sym.cons a

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{n : ℕ}

s.sym (n + 1) = s.sup fun a => Finset.image (Sym.cons a) (s.sym n)


@[simp, norm_cast]
theorem coe_smul (c : 𝕜) (f : Lp.simpleFunc E p μ) :
    ((c • f : Lp.simpleFunc E p μ) : Lp E p μ) = c • (f : Lp E p μ)

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


lemma dualSubmodule_flip_dualSubmodule_of_basis {ι : Type*} [Finite ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.flip.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b)

{R : Type u_4}
{S : Type u_2}
{M : Type u_3}
[CommRing R]
[Field S]
[AddCommGroup M]
[Algebra R S]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(B : LinearMap.BilinForm S M)
{ι : Type u_1}
[Finite ι]
(hB : B.Nondegenerate)
(b : Basis ι S M)

B.flip.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)


/--
If the msb is `true`, the arithmetic shift right equals negating,
then logical shifting right, then negating again.
The double negation preserves the lower bits that have been shifted,
and the outer negation ensures that the high bits are '1'. -/
theorem sshiftRight_eq_of_msb_true {x : BitVec w} {s : Nat} (h : x.msb = true) :
    (x.sshiftRight s) = ~~~((~~~x) >>> s)

{w : Nat}
{x : BitVec w}
{s : Nat}
(h : x.msb = true)


@[to_additive (attr := simp)]
theorem fromLeftInv_mul (x : S.leftInv) : (S.fromLeftInv x : M) * x = 1

{M : Type u_1}
[AddCommMonoid M]
(S : AddSubmonoid M)
(x : ↥S.leftNeg)


@[simp] protected theorem le_refl : ∀ (x : Bool), x ≤ x


lemma toAdd_pow (a : Multiplicative ℤ) (b : ℕ) : toAdd (a ^ b) = toAdd a * b

Multiplicative.toAdd (a ^ b) = Multiplicative.toAdd a * ↑b


@[to_additive]
theorem reduce.not {p : Prop} :
    ∀ {L₁ L₂ L₃ : List (α × Bool)} {x b}, reduce L₁ = L₂ ++ (x, b) :: (x, !b) :: L₃ → p

{α : Type u}
[DecidableEq α]
{p : Prop}
{L₁ L₂ L₃ : List (α × Bool)}
{x : α}
{b : Bool}

FreeAddGroup.reduce L₁ = L₂ ++ (x, b) :: (x, !b) :: L₃ → p


lemma Algebra.intNorm_eq_norm [Module.Free A B] : Algebra.intNorm A B = Algebra.norm A

[Algebra.IsSeparable (FractionRing A) (FractionRing B)]


theorem toAddSubmonoid_le : p.toAddSubmonoid ≤ q.toAddSubmonoid ↔ p ≤ q

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p q : Submodule R M}


theorem cmp_eq (m n) : cmp m n = Ordering.eq ↔ m = n


theorem finite_pow {p a : α} (hp : Prime p) : ∀ {k : ℕ} (_ : Finite p a), Finite p (a ^ k)

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

multiplicity.Finite p a → multiplicity.Finite p (a ^ k)


theorem apply_eq_iff_eq_symm_apply (e : α ≃o β) (x : α) (y : β) : e x = y ↔ x = e.symm y

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)
(x : α)
(y : β)


theorem rpow_self_rpow_inv {y : ℝ} (hy : y ≠ 0) (x : ℝ≥0) : (x ^ (1 / y)) ^ y = x


@[to_additive]
theorem nnnorm_prod_le (s : Finset ι) (f : ι → E) : ‖∏ a ∈ s, f a‖₊ ≤ ∑ a ∈ s, ‖f a‖₊

{ι : Type u_4}
{E : Type u_6}
[SeminormedCommGroup E]
(s : Finset ι)
(f : ι → E)

‖∏ a ∈ s, f a‖₊ ≤ ∑ a ∈ s, ‖f a‖₊


theorem neg_quot {R : Type uR} [Ring R] (r : R → R → Prop) {a} :
    (-⟨Quot.mk _ a⟩ : RingQuot r) = ⟨Quot.mk _ (-a)⟩

{R : Type uR}
[Ring R]
(r : R → R → Prop)
{a : R}

-{ toQuot := Quot.mk (RingQuot.Rel r) a } = { toQuot := Quot.mk (RingQuot.Rel r) (-a) }


theorem mul_lt_aleph0 {a b : Cardinal} (ha : a < ℵ₀) (hb : b < ℵ₀) : a * b < ℵ₀

{a b : Cardinal.{u_1}}
(ha : a < Cardinal.aleph0)
(hb : b < Cardinal.aleph0)


@[simp]
theorem torsionBySet.mk_smul (I : Ideal R) (b : R) (x : torsionBySet R M I) :
    Ideal.Quotient.mk I b • x = b • x

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(I : Ideal R)
(b : R)
(x : ↥(Submodule.torsionBySet R M ↑I))


/-- The piecewise multiplication from the `Mul` instance, as a bundled homomorphism. -/
@[simps]
def gMulHom {i j} : A i →+ A j →+ A (i + j)

((DirectSum.gMulHom A) a) b = GradedMonoid.GMul.mul a b


theorem Pairwise.imp₂ (H : ∀ a b, R a b → S a b → T a b)
    (hR : Pairwise R l) (hS : l.Pairwise S) : l.Pairwise T

∀ {α : Type u_1} {R S T : α → α → Prop} {l : List α},
  (∀ (a b : α), R a b → S a b → T a b) → List.Pairwise R l → List.Pairwise S l → List.Pairwise T l


theorem two_le_natDegree_iff (int : IsIntegral A x) :
    2 ≤ (minpoly A x).natDegree ↔ x ∉ (algebraMap A B).range

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[Ring B]
[Algebra A B]
{x : B}
[Nontrivial B]
(int : IsIntegral A x)


@[simp]
theorem map_X : ∀ n : σ, map f (X n : MvPolynomial σ R) = X n

{R : Type u}
{S₁ : Type v}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
(f : R →+* S₁)
(n : σ)

(MvPolynomial.map f) (MvPolynomial.X n) = MvPolynomial.X n


theorem HasDerivWithinAt.sqrt (hf : HasDerivWithinAt f f' s x) (hx : f x ≠ 0) :
    HasDerivWithinAt (fun y => √(f y)) (f' / (2 * √(f x))) s x

{f : ℝ → ℝ}
{s : Set ℝ}
{f' x : ℝ}
(hf : HasDerivWithinAt f f' s x)
(hx : f x ≠ 0)


/-- **Ruzsa's triangle inequality**. Div-div-mul version. -/
@[to_additive "**Ruzsa's triangle inequality**. Sub-sub-add version."]
theorem card_div_mul_le_card_div_mul_card_mul (A B C : Finset α) :
    (A / C).card * B.card ≤ (A / B).card * (B * C).card

{α : Type u_1}
[AddCommGroup α]
[DecidableEq α]
(A B C : Finset α)

(A - C).card * B.card ≤ (A - B).card * (B + C).card


theorem num_den_reduced (x : K) : IsRelPrime (num A x) (den A x)

(A : Type u_4)
[CommRing A]
[IsDomain A]
[UniqueFactorizationMonoid A]
{K : Type u_5}
[Field K]
[Algebra A K]
[IsFractionRing A K]
(x : K)

IsRelPrime (IsFractionRing.num A x) ↑(IsFractionRing.den A x)


theorem endomorphism_simple_eq_smul_id {X : C} [Simple X] [FiniteDimensional 𝕜 (X ⟶ X)]
    (f : X ⟶ X) : ∃ c : 𝕜, c • 𝟙 X = f

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
(𝕜 : Type u_2)
[Field 𝕜]
[IsAlgClosed 𝕜]
[CategoryTheory.Linear 𝕜 C]
[CategoryTheory.Limits.HasKernels C]
{X : C}
[CategoryTheory.Simple X]
[FiniteDimensional 𝕜 (X ⟶ X)]
(f : X ⟶ X)

∃ c, c • CategoryTheory.CategoryStruct.id X = f


@[simp]
theorem toLex_ofLex (a : Lex α) : toLex (ofLex a) = a


@[simp] theorem getMsb_ofBoolListLE :
    (ofBoolListLE bs).getMsb i = (decide (i < bs.length) && bs.getD (bs.length - 1 - i) false)

(BitVec.ofBoolListLE bs).getMsb i = (decide (i < bs.length) && bs.getD (bs.length - 1 - i) false)


theorem sublists_append (l₁ l₂ : List α) :
    sublists (l₁ ++ l₂) = (sublists l₂) >>= (fun x => (sublists l₁).map (· ++ x))

(l₁ ++ l₂).sublists = do
  let x ← l₂.sublists
  List.map (fun x_1 => x_1 ++ x) l₁.sublists


theorem kroneckerMap_reindex_right (f : α → β → γ) (em : m ≃ m') (en : n ≃ n') (M : Matrix l l' α)
    (N : Matrix m n β) :
    kroneckerMap f M (reindex em en N) =
      reindex ((Equiv.refl _).prodCongr em) ((Equiv.refl _).prodCongr en) (kroneckerMap f M N)

{α : Type u_2}
{β : Type u_4}
{γ : Type u_6}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{l' : Type u_14}
{m' : Type u_15}
{n' : Type u_16}
(f : α → β → γ)
(em : m ≃ m')
(en : n ≃ n')
(M : Matrix l l' α)
(N : Matrix m n β)

Matrix.kroneckerMap f M ((Matrix.reindex em en) N) =
  (Matrix.reindex ((Equiv.refl l).prodCongr em) ((Equiv.refl l').prodCongr en)) (Matrix.kroneckerMap f M N)


theorem comap_embedding_atBot [Preorder β] [Preorder γ] {e : β → γ}
    (hm : ∀ b₁ b₂, e b₁ ≤ e b₂ ↔ b₁ ≤ b₂) (hu : ∀ c, ∃ b, e b ≤ c) : comap e atBot = atBot

(hm : ∀ (b₁ b₂ : β), e b₁ ≤ e b₂ ↔ b₁ ≤ b₂)

Filter.comap e Filter.atBot = Filter.atBot


theorem sigma_insert {a : ∀ i, α i} :
    s.sigma (fun i ↦ insert (a i) (t i)) = (fun i ↦ ⟨i, a i⟩) '' s ∪ s.sigma t

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

(s.sigma fun i => insert (a i) (t i)) = (fun i => ⟨i, a i⟩) '' s ∪ s.sigma t


@[measurability]
theorem measurable_sinh : Measurable sinh


theorem sup_inf_distrib_right (s : Finset ι) (f : ι → α) (a : α) :
    s.sup f ⊓ a = s.sup fun i => f i ⊓ a

{α : Type u_2}
{ι : Type u_5}
[DistribLattice α]
[OrderBot α]
(s : Finset ι)
(f : ι → α)
(a : α)


theorem eqId_iff_len_eq : A.EqId ↔ A.1.unop.len = Δ.unop.len

(A : SimplicialObject.Splitting.IndexSet Δ)

A.EqId ↔ (Opposite.unop A.fst).len = (Opposite.unop Δ).len


/-- The universal property of `𝕎 R` as projective limit of truncated Witt vector rings. -/
@[simps]
def liftEquiv : { f : ∀ k, S →+* TruncatedWittVector p k R // ∀ (k₁ k₂) (hk : k₁ ≤ k₂),
    (TruncatedWittVector.truncate hk).comp (f k₂) = f k₁ } ≃ (S →+* 𝕎 R)

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{R : Type u_1}
[CommRing R]
{S : Type u_2}
[Semiring S]
(g : S →+* 𝕎 R)
(k : ℕ)

↑(WittVector.liftEquiv.symm g) k = (WittVector.truncate k).comp g


/-- The characteristic `p` version of `peval_polyOfInterest` -/
theorem peval_polyOfInterest' (n : ℕ) (x y : 𝕎 k) :
    peval (polyOfInterest p n) ![fun i => x.coeff i, fun i => y.coeff i] =
      (x * y).coeff (n + 1) - y.coeff (n + 1) * x.coeff 0 ^ p ^ (n + 1) -
        x.coeff (n + 1) * y.coeff 0 ^ p ^ (n + 1)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[CommRing k]
[CharP k p]
(n : ℕ)
(x y : WittVector p k)

WittVector.peval (WittVector.polyOfInterest p n) ![fun i => x.coeff i, fun i => y.coeff i] =
  (x * y).coeff (n + 1) - y.coeff (n + 1) * x.coeff 0 ^ p ^ (n + 1) - x.coeff (n + 1) * y.coeff 0 ^ p ^ (n + 1)


/-- If `f : 𝕜 → 𝕜` is strictly concave, then for any point `a` the slope of the secant line of `f`
through `a` and `b` is strictly antitone with respect to `b`. -/
theorem StrictConcaveOn.secant_strict_mono (hf : StrictConcaveOn 𝕜 s f) {a x y : 𝕜} (ha : a ∈ s)
    (hx : x ∈ s) (hy : y ∈ s) (hxa : x ≠ a) (hya : y ≠ a) (hxy : x < y) :
    (f y - f a) / (y - a) < (f x - f a) / (x - a)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{s : Set 𝕜}
{f : 𝕜 → 𝕜}
(hf : StrictConcaveOn 𝕜 s f)
{a x y : 𝕜}
(ha : a ∈ s)
(hx : x ∈ s)
(hy : y ∈ s)
(hxa : x ≠ a)
(hya : y ≠ a)
(hxy : x < y)


@[to_additive norm_sub_norm_le]
theorem norm_sub_norm_le' (a b : E) : ‖a‖ - ‖b‖ ≤ ‖a / b‖

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

‖a‖ - ‖b‖ ≤ ‖a - b‖


@[to_additive]
theorem mem_smul : b ∈ s • t ↔ ∃ x ∈ s, ∃ y ∈ t, x • y = b

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

b ∈ s +ᵥ t ↔ ∃ x ∈ s, ∃ y ∈ t, x +ᵥ y = b


theorem toList'_map (l : List α) (s : WSeq α) :
    Computation.corec (fun ⟨l, s⟩ =>
      match Seq.destruct s with
      | none => Sum.inl l.reverse
      | some (none, s') => Sum.inr (l, s')
      | some (some a, s') => Sum.inr (a :: l, s')) (l, s) = (l.reverse ++ ·) <$> toList s

{α : Type u}
(l : List α)
(s : Stream'.WSeq α)

Computation.corec
    (fun x =>
      match x with
      | (l, s) =>
        match Stream'.Seq.destruct s with
        | none => Sum.inl l.reverse
        | some (none, s') => Sum.inr (l, s')
        | some (some a, s') => Sum.inr (a :: l, s'))
    (l, s) =
  (fun x => l.reverse ++ x) <$> s.toList


protected theorem t1Space [T1Space X] (h : X ≃ₜ Y) : T1Space Y

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


theorem Finset.cast_card [CommSemiring R] (s : Finset α) : (s.card : R) = ∑ a ∈ s, 1

{α : Type u_3}
{R : Type u_5}
[CommSemiring R]
(s : Finset α)


@[simp] theorem intCast_den (a : Int) : (a : Rat).den = 1


theorem map_mem_map {f : P →ₐ[R] P'} (h : Function.Injective f) {x : P} {I : FractionalIdeal S P} :
    f x ∈ map f I ↔ x ∈ I

{R : Type u_1}
[CommRing R]
{S : Submonoid R}
{P : Type u_2}
[CommRing P]
[Algebra R P]
{P' : Type u_3}
[CommRing P']
[Algebra R P']
{f : P →ₐ[R] P'}
(h : Function.Injective ⇑f)
{x : P}
{I : FractionalIdeal S P}


@[simp]
theorem iterateFrobenius_one : iterateFrobenius R p 1 = frobenius R p

(R : Type u)
[CommSemiring R]
(p : ℕ)
[ExpChar R p]


@[simp]
theorem support_copy {u v u' v'} (p : G.Walk u v) (hu : u = u') (hv : v = v') :
    (p.copy hu hv).support = p.support

{V : Type u}
{G : SimpleGraph V}
{u v u' v' : V}
(p : G.Walk u v)
(hu : u = u')
(hv : v = v')


lemma IsMeasurableRatCDF.measure_stieltjesFunction_Iic (a : α) (x : ℝ) :
    (hf.stieltjesFunction a).measure (Iic x) = ENNReal.ofReal (hf.stieltjesFunction a x)

{f : α → ℚ → ℝ}

(hf : ProbabilityTheory.IsMeasurableRatCDF f)

(hf.stieltjesFunction a).measure (Set.Iic x) = ENNReal.ofReal (↑(hf.stieltjesFunction a) x)


@[to_additive] lemma zpow_zpow_self : Commute (a ^ m) (a ^ n)

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


@[to_additive (attr := simp) addCentralizer_addCentralizer_addCentralizer]
lemma centralizer_centralizer_centralizer (S : Set M) :
    S.centralizer.centralizer.centralizer = S.centralizer


theorem EqOn.surjOn_iff (h : EqOn f₁ f₂ s) : SurjOn f₁ s t ↔ SurjOn f₂ s t

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


theorem tanh_eq_sinh_div_cosh : tanh x = sinh x / cosh x

Complex.tanh x = Complex.sinh x / Complex.cosh x


/-- An algebra is algebraic if and only if it is algebraic as a subalgebra. -/
theorem Algebra.isAlgebraic_iff : Algebra.IsAlgebraic R A ↔ (⊤ : Subalgebra R A).IsAlgebraic

{R : Type u}
{A : Type v}
[CommRing R]
[Ring A]
[Algebra R A]


/-- The map `Square Cᵒᵖ → Square C` which switches `X₁` and `X₃`, but
does not move `X₂` and `X₃`. -/
@[simps]
protected def unop (sq : Square Cᵒᵖ) : Square C

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(sq : CategoryTheory.Square Cᵒᵖ)


theorem min_abs_abs_le_abs_min : min |a| |b| ≤ |min a b|

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


/-- The operator norm of the second projection `E × F → F` is exactly 1 if `F` is nontrivial. -/
@[simp] lemma norm_snd [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
    [NormedAddCommGroup F] [NormedSpace 𝕜 F] [Nontrivial F]  :
    ‖snd 𝕜 E F‖ = 1

(𝕜 : Type u_1)
(E : Type u_2)
(F : Type u_3)
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[Nontrivial F]


theorem ofSubtype_apply_of_not_mem (f : Perm (Subtype p)) (ha : ¬p a) : ofSubtype f a = a

{α : Type u}
{p : α → Prop}
[DecidablePred p]
{a : α}
(f : Equiv.Perm (Subtype p))
(ha : ¬p a)


theorem isTheta_const_smul_right [NormedSpace 𝕜 F'] {c : 𝕜} (hc : c ≠ 0) :
    (f =Θ[l] fun x ↦ c • g' x) ↔ f =Θ[l] g'

{α : Type u_1}
{E : Type u_3}
{F' : Type u_7}
{𝕜 : Type u_14}
[Norm E]
[SeminormedAddCommGroup F']
[NormedField 𝕜]
{f : α → E}
{g' : α → F'}
{l : Filter α}
[NormedSpace 𝕜 F']
{c : 𝕜}
(hc : c ≠ 0)

(f =Θ[l] fun x => c • g' x) ↔ f =Θ[l] g'


@[ext] theorem ext ⦃inst₁ inst₂ : Semiring R⦄
    (h_add : local_hAdd[R, inst₁] = local_hAdd[R, inst₂])
    (h_mul : local_hMul[R, inst₁] = local_hMul[R, inst₂]) :
    inst₁ = inst₂

{R : Type u}
⦃inst₁ inst₂ : Semiring R⦄
(h_add : HAdd.hAdd = HAdd.hAdd)
(h_mul : HMul.hMul = HMul.hMul)


@[to_additive]
theorem iUnion_div (s : ι → Set α) (t : Set α) : (⋃ i, s i) / t = ⋃ i, s i / t

{α : Type u_2}
{ι : Sort u_5}
[Div α]
(s : ι → Set α)
(t : Set α)


@[simp]
theorem top_def : (⊤ : Setoid α).Rel = ⊤


theorem surjective_pi_map {F : ∀ i, f i → g i} (hF : ∀ i, Surjective (F i)) :
    Surjective fun x : ∀ i, f i => fun i => F i (x i)

(hF : ∀ (i : I), Function.Surjective (F i))

Function.Surjective fun x i => F i (x i)


/-- The product of two strictly antitone functions is strictly antitone. -/
@[to_additive add "The sum of two strictly antitone functions is strictly antitone."]
theorem StrictAntiOn.mul' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· < ·)] (hf : StrictAntiOn f s) (hg : StrictAntiOn g s) :
    StrictAntiOn (fun x => f x * g x) s

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

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


theorem lt_omega {o : Ordinal} : o < ω ↔ ∃ n : ℕ, o = n


theorem isDetecting_unop_iff (𝒢 : Set Cᵒᵖ) : IsDetecting 𝒢.unop ↔ IsCodetecting 𝒢

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(𝒢 : Set Cᵒᵖ)

CategoryTheory.IsDetecting 𝒢.unop ↔ CategoryTheory.IsCodetecting 𝒢


@[to_additive]
theorem mrange_top_iff_surjective {f : F} : mrange f = (⊤ : Submonoid N) ↔ Function.Surjective f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_5}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}

AddMonoidHom.mrange f = ⊤ ↔ Function.Surjective ⇑f


@[simp, norm_cast]
theorem coe_neg (x : s) : (↑(-x) : K) = -↑x

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


/-- If a product of integers is `-1`, then at least one factor must be `-1`. -/
theorem neg_one_mem_of_prod_eq_neg_one {l : List ℤ} (h : l.prod = -1) : (-1 : ℤ) ∈ l


{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a b : α}


@[simp]
theorem pushoutCoconeOfRightIso_ι_app_right :
    (pushoutCoconeOfRightIso f g).ι.app right = inv g ≫ f

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

(CategoryTheory.Limits.pushoutCoconeOfRightIso f g).ι.app CategoryTheory.Limits.WalkingSpan.right =
  CategoryTheory.inv g ≫ f


theorem adjoin_rank_le_of_isAlgebraic_right (L : IntermediateField F K)
    [halg : Algebra.IsAlgebraic F L] :
    Module.rank E (adjoin E (L : Set K)) ≤ Module.rank F L

{F : Type u_1}
[Field F]
(E : Type u_2)
[Field E]
[Algebra F E]
{K : Type u_3}
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]
(L : IntermediateField F K)
[halg : Algebra.IsAlgebraic F ↥L]

Module.rank E ↥(IntermediateField.adjoin E ↑L) ≤ Module.rank F ↥L


@[simp] theorem bne_eq_false_iff_eq [BEq α] [LawfulBEq α] (a b : α) :
    (a != b) = false ↔ a = b

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


/-- The kernel of `biproduct.π f i` is `⨁ Subtype.restrict {i}ᶜ f`. -/
@[simps!]
def kernelBiproductπIso : kernel (biproduct.π f i) ≅ ⨁ Subtype.restrict (fun j => j ≠ i) f

[CategoryTheory.Limits.HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)]

(CategoryTheory.Limits.kernelBiproductπIso f i).inv =
  CategoryTheory.Limits.limit.lift (CategoryTheory.Limits.parallelPair (CategoryTheory.Limits.biproduct.π f i) 0)
    (CategoryTheory.Limits.KernelFork.ofι (CategoryTheory.Limits.biproduct.fromSubtype f fun j => ¬j = i) ⋯)


theorem adjoin_toSubmodule (s : Set A) :
    (adjoin R s).toSubmodule = Submodule.span R (NonUnitalSubsemiring.closure s : Set A)

(R : Type u)
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(s : Set A)

(NonUnitalAlgebra.adjoin R s).toSubmodule = Submodule.span R ↑(NonUnitalSubsemiring.closure s)


private lemma HasDerivAt.complex_of_real {f : ℂ → ℂ} {g : ℝ → ℝ} {g' s : ℝ}
    (hf : DifferentiableAt ℂ f s) (hg : HasDerivAt g g' s) (hfg : ∀ s : ℝ, f ↑s = ↑(g s)) :
    HasDerivAt f ↑g' s

{f : ℂ → ℂ}
{g : ℝ → ℝ}
{g' s : ℝ}
(hf : DifferentiableAt ℂ f ↑s)
(hg : HasDerivAt g g' s)
(hfg : ∀ (s : ℝ), f ↑s = ↑(g s))


theorem lt_ofDual_iff {a : WithTop α} {b : WithBot αᵒᵈ} :
    a < WithBot.ofDual b ↔ b < WithTop.toDual a

{α : Type u_1}
[LT α]
{a : WithTop α}
{b : WithBot αᵒᵈ}


/-- `LocallyConstant.congrLeft` as a linear equivalence. -/
@[simps!]
def congrLeftₗ (R : Type*) [Semiring R] [AddCommMonoid Z] [Module R Z] (e : X ≃ₜ Y) :
    LocallyConstant X Z ≃ₗ[R] LocallyConstant Y Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{Z : Type u_6}
(R : Type u_7)
[Semiring R]
[AddCommMonoid Z]
[Module R Z]
(e : X ≃ₜ Y)
(g : LocallyConstant X Z)

∀ (a : Y), ((LocallyConstant.congrLeftₗ R e) g) a = g (e.symm a)


theorem isOpenMap_ofDual : IsOpenMap (ofDual : Xᵒᵈ → X)


theorem mul_polyOfInterest_vars (n : ℕ) :
    ((p : 𝕄) ^ (n + 1) * polyOfInterest p n).vars ⊆ univ ×ˢ range (n + 1)

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

(↑p ^ (n + 1) * WittVector.polyOfInterest p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)


theorem isBigOWith_const_const (c : E) {c' : F''} (hc' : c' ≠ 0) (l : Filter α) :
    IsBigOWith (‖c‖ / ‖c'‖) l (fun _x : α => c) fun _x => c'

{α : Type u_1}
{E : Type u_3}
{F'' : Type u_10}
[Norm E]
[NormedAddCommGroup F'']
(c : E)
{c' : F''}
(hc' : c' ≠ 0)
(l : Filter α)

Asymptotics.IsBigOWith (‖c‖ / ‖c'‖) l (fun _x => c) fun _x => c'


/-- If a function `f` is strictly monotone on a left neighborhood of `a` and the image of this
neighborhood under `f` includes `Iio (f a)`, then `f` is continuous at `a` from the left. -/
theorem StrictMonoOn.continuousWithinAt_left_of_surjOn {f : α → β} {s : Set α} {a : α}
    (h_mono : StrictMonoOn f s) (hs : s ∈ 𝓝[≤] a) (hfs : SurjOn f s (Iio (f a))) :
    ContinuousWithinAt f (Iic a) a

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[LinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
{s : Set α}
{a : α}
(h_mono : StrictMonoOn f s)
(hs : s ∈ 𝓝[≤] a)
(hfs : Set.SurjOn f s (Set.Iio (f a)))


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

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


theorem twoBlockTriangular_det (M : Matrix m m R) (p : m → Prop) [DecidablePred p]
    (h : ∀ i, ¬p i → ∀ j, p j → M i j = 0) :
    M.det = (toSquareBlockProp M p).det * (toSquareBlockProp M fun i => ¬p i).det

(h : ∀ (i : m), ¬p i → ∀ (j : m), p j → M i j = 0)

M.det = (M.toSquareBlockProp p).det * (M.toSquareBlockProp fun i => ¬p i).det


theorem sizeOf_kerase [SizeOf (Sigma β)] (x : α)
    (xs : List (Sigma β)) : SizeOf.sizeOf (List.kerase x xs) ≤ SizeOf.sizeOf xs

{α : Type u}
{β : α → Type v}
[DecidableEq α]
[SizeOf (Sigma β)]
(x : α)
(xs : List (Sigma β))


lemma rightHomologyMap_congr (h : Homotopy φ₁ φ₂) [S₁.HasRightHomology] [S₂.HasRightHomology] :
    rightHomologyMap φ₁ = rightHomologyMap φ₂

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

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

CategoryTheory.ShortComplex.rightHomologyMap φ₁ = CategoryTheory.ShortComplex.rightHomologyMap φ₂


theorem USize.size_eq : USize.size = 2 ^ System.Platform.numBits


theorem inf_sigma [SemilatticeInf β] [OrderTop β] :
    (s.sigma t).inf f = s.inf fun i => (t i).inf fun b => f ⟨i, b⟩

{ι : Type u_1}
{α : ι → Type u_2}
{β : Type u_3}
(s : Finset ι)
(t : (i : ι) → Finset (α i))
(f : (i : ι) × α i → β)
[SemilatticeInf β]
[OrderTop β]


theorem maximals_eq_maximals_of_subset_of_forall [IsTrans α r] (hts : t ⊆ s)
    (h : ∀ x ∈ s, ∃ y ∈ t, r x y) : maximals r s = maximals r t

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}
[IsAntisymm α r]
[IsTrans α r]
(hts : t ⊆ s)
(h : ∀ x ∈ s, ∃ y ∈ t, r x y)


/-- The `stalkToFiber` map is surjective at `x` if
every point in the fiber `T x` has an allowed section passing through it.
-/
theorem stalkToFiber_surjective (P : LocalPredicate T) (x : X)
    (w : ∀ t : T x, ∃ (U : OpenNhds x) (f : ∀ y : U.1, T y) (_ : P.pred f), f ⟨x, U.2⟩ = t) :
    Function.Surjective (stalkToFiber P x)

(w : ∀ (t : T x), ∃ U f, ∃ (_ : P.pred f), f ⟨x, ⋯⟩ = t)

Function.Surjective (TopCat.stalkToFiber P x)


theorem CondIndepFun.comp {γ γ' : Type*} {_mβ : MeasurableSpace β} {_mβ' : MeasurableSpace β'}
    {_mγ : MeasurableSpace γ} {_mγ' : MeasurableSpace γ'} {φ : β → γ} {ψ : β' → γ'}
    (hfg : CondIndepFun m' hm' f g μ) (hφ : Measurable φ) (hψ : Measurable ψ) :
    CondIndepFun m' hm' (φ ∘ f) (ψ ∘ g) μ

(hfg : ProbabilityTheory.CondIndepFun m' hm' f g μ)

ProbabilityTheory.CondIndepFun m' hm' (φ ∘ f) (ψ ∘ g) μ


theorem tsum_coe_ne_top_iff_summable {f : β → ℝ≥0} : (∑' b, (f b : ℝ≥0∞)) ≠ ∞ ↔ Summable f


@[simp]
lemma Isometry.fst_comp_inr (Q₁ : QuadraticMap R M₁ P) :
    (fst M₂ Q₁).comp (inr Q₁ (0 : QuadraticMap R M₂ P)) = 0

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R P]
(Q₁ : QuadraticMap R M₁ P)

(QuadraticMap.Isometry.fst M₂ Q₁).comp (QuadraticMap.Isometry.inr Q₁ 0) = 0


@[simp]
theorem pi_inf_principal_pi_neBot [∀ i, NeBot (f i)] {I : Set ι} :
    NeBot (pi f ⊓ 𝓟 (I.pi s)) ↔ ∀ i ∈ I, NeBot (f i ⊓ 𝓟 (s i))

{ι : Type u_1}
{α : ι → Type u_2}
{f : (i : ι) → Filter (α i)}
{s : (i : ι) → Set (α i)}
[∀ (i : ι), (f i).NeBot]
{I : Set ι}

(Filter.pi f ⊓ 𝓟 (I.pi s)).NeBot ↔ ∀ i ∈ I, (f i ⊓ 𝓟 (s i)).NeBot


@[simp]
theorem himp_iff_imp (p q : Prop) : p ⇨ q ↔ p → q


@[simp]
lemma reverse_iSup {ι : Sort*} (l : ι → Language α) : (⨆ i, l i).reverse = ⨆ i, (l i).reverse

{α : Type u_1}
{ι : Sort u_4}
(l : ι → Language α)


@[simp]
theorem lift_comp_inr : (lift f₁ f₂ h).comp inr = f₂

(h : ∀ (g : G), f₁.comp (MulEquiv.toMonoidHom (φ g)) = (MulEquiv.toMonoidHom (MulAut.conj (f₂ g))).comp f₁)

(SemidirectProduct.lift f₁ f₂ h).comp SemidirectProduct.inr = f₂


@[simp]
theorem equivOfRoot_gen (pb : PowerBasis A S) (pb' : PowerBasis A S')
    (h₁ : aeval pb.gen (minpoly A pb'.gen) = 0) (h₂ : aeval pb'.gen (minpoly A pb.gen) = 0) :
    pb.equivOfRoot pb' h₁ h₂ pb.gen = pb'.gen

(h₁ : (Polynomial.aeval pb.gen) (minpoly A pb'.gen) = 0)

(h₂ : (Polynomial.aeval pb'.gen) (minpoly A pb.gen) = 0)

(pb.equivOfRoot pb' h₁ h₂) pb.gen = pb'.gen


/-- Given a sieve `S` on `X : C`, a presheaf `P : Cᵒᵖ ⥤ A`, and an object `E` of `A`,
    the cones over the natural diagram `S.arrows.diagram.op ⋙ P` associated to `S` and `P`
    with cone point `E` are in 1-1 correspondence with sieve_compatible family of elements
    for the sieve `S` and the presheaf of types `Hom (E, P -)`. -/
@[simps]
def conesEquivSieveCompatibleFamily :
    (S.arrows.diagram.op ⋙ P).cones.obj E ≃
      { x : FamilyOfElements (P ⋙ coyoneda.obj E) (S : Presieve X) // x.SieveCompatible }

(π : (S.arrows.diagram.op.comp P).cones.obj E)

↑((CategoryTheory.Presheaf.conesEquivSieveCompatibleFamily P S E) π) f h =
  π.app (Opposite.op { obj := CategoryTheory.Over.mk f, property := h })


/-- The morphism `m` in a factorisation `f = e ≫ m` through a monomorphism is uniquely
determined. -/
@[ext]
theorem ext {F F' : MonoFactorisation f} (hI : F.I = F'.I)
    (hm : F.m = eqToHom hI ≫ F'.m) : F = F'

{F F' : CategoryTheory.Limits.MonoFactorisation f}

(hm : F.m = CategoryTheory.eqToHom hI ≫ F'.m)


/-- The prelax functor from `Cat` to `Cat` defined with `WithInitial`. -/
@[simps]
def prelaxfunctor : PrelaxFunctor Cat Cat

∀ {X Y : CategoryTheory.Cat} (F : CategoryTheory.Functor ↑X ↑Y),
  CategoryTheory.WithInitial.prelaxfunctor.map F = CategoryTheory.WithInitial.map F


lemma rnDeriv_pos [HaveLebesgueDecomposition μ ν] (hμν : μ ≪ ν) :
    ∀ᵐ x ∂μ, 0 < μ.rnDeriv ν x

{α : Type u_1}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[μ.HaveLebesgueDecomposition ν]
(hμν : μ ≪ ν)


lemma mul_div_cancel_left_of_imp (h : a = 0 → b = 0) : a * b / a = b

{G₀ : Type u_3}
[CommGroupWithZero G₀]
{a b : G₀}
(h : a = 0 → b = 0)


lemma negOnePow_def (n : ℤ) : n.negOnePow = (-1 : ℤˣ) ^ n


@[simp]
theorem linear_bijective_iff (f : P1 →ᵃ[k] P2) :
    Function.Bijective f.linear ↔ Function.Bijective f

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]
(f : P1 →ᵃ[k] P2)

Function.Bijective ⇑f.linear ↔ Function.Bijective ⇑f


/-- A filter `F` on a type `α` is a collection of sets of `α` which contains the whole `α`,
is upwards-closed, and is stable under intersection. We do not forbid this collection to be
all sets of `α`. -/
structure Filter (α : Type*) where
  /-- The set of sets that belong to the filter. -/
  sets : Set (Set α)
  /-- The set `Set.univ` belongs to any filter. -/
  univ_sets : Set.univ ∈ sets
  /-- If a set belongs to a filter, then its superset belongs to the filter as well. -/
  sets_of_superset {x y} : x ∈ sets → x ⊆ y → y ∈ sets
  /-- If two sets belong to a filter, then their intersection belongs to the filter as well. -/
  inter_sets {x y} : x ∈ sets → y ∈ sets → x ∩ y ∈ sets


/-- The integrals of thickened indicators of a closed set against a finite measure tend to the
measure of the closed set if the thickening radii tend to zero. -/
theorem tendsto_lintegral_thickenedIndicator_of_isClosed {Ω : Type*} [MeasurableSpace Ω]
    [PseudoEMetricSpace Ω] [OpensMeasurableSpace Ω] (μ : Measure Ω) [IsFiniteMeasure μ] {F : Set Ω}
    (F_closed : IsClosed F) {δs : ℕ → ℝ} (δs_pos : ∀ n, 0 < δs n)
    (δs_lim : Tendsto δs atTop (𝓝 0)) :
    Tendsto (fun n ↦ lintegral μ fun ω ↦ (thickenedIndicator (δs_pos n) F ω : ℝ≥0∞)) atTop
      (𝓝 (μ F))

{δs : ℕ → ℝ}

(δs_lim : Filter.Tendsto δs Filter.atTop (𝓝 0))

Filter.Tendsto (fun n => ∫⁻ (ω : Ω), ↑((thickenedIndicator ⋯ F) ω) ∂μ) Filter.atTop (𝓝 (μ F))


theorem infsep_pair_eq_toReal : ({x, y} : Set α).infsep = (edist x y).toReal

{α : Type u_1}
[PseudoEMetricSpace α]
{x y : α}


@[to_additive (attr := simp)]
theorem val_inv_mul (h : IsUnit a) : ↑h.unit⁻¹ * a = 1

{M : Type u_1}
[Monoid M]
{a : M}
(h : IsUnit a)


theorem pairwise_union :
    (s ∪ t).Pairwise r ↔
    s.Pairwise r ∧ t.Pairwise r ∧ ∀ a ∈ s, ∀ b ∈ t, a ≠ b → r a b ∧ r b a

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}


protected theorem ediv_eq_iff_eq_mul_right {a b c : Int}
    (H : b ≠ 0) (H' : b ∣ a) : a / b = c ↔ a = b * c


/-- Projection of `Set.Finite` to its `Finite` instance.
This is intended to be used with dot notation.
See also `Set.Finite.Fintype` and `Set.Finite.nonempty_fintype`. -/
protected theorem Finite.to_subtype {s : Set α} (h : s.Finite) : Finite s


theorem bddAbove_Icc : BddAbove (Icc a b)


/-- The equivalence between `Bipointed` and itself induced by `Prod.swap` both ways. -/
@[simps!]
def swapEquiv : Bipointed ≌ Bipointed

∀ (a : ((𝟭 Bipointed).obj X).X),
  (Bipointed.swapEquiv.unitIso.hom.app X).toFun a =
    (𝟙 (Bipointed.swap.obj (Bipointed.swap.obj X))).toFun
      (({ toFun := id, map_fst := ⋯, map_snd := ⋯ } ≫
            Bipointed.swap.map { toFun := id, map_fst := ⋯, map_snd := ⋯ } ≫
              Bipointed.swap.map (Bipointed.swap.map { toFun := id, map_fst := ⋯, map_snd := ⋯ })).toFun
        a)


/-- `LinearMap.inl` as an isometry. -/
@[simps!]
def Isometry.inl (Q₁ : QuadraticMap R M₁ P) (Q₂ : QuadraticMap R M₂ P) : Q₁ →qᵢ (Q₁.prod Q₂)

{R : Type u_2}
{M₁ : Type u_3}
{M₂ : Type u_4}
{P : Type u_7}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid P]
[Module R M₁]
[Module R M₂]
[Module R P]
(Q₁ : QuadraticMap R M₁ P)
(Q₂ : QuadraticMap R M₂ P)
(i : M₁)

(QuadraticMap.Isometry.inl Q₁ Q₂) i = (i, 0)


theorem isSymmetric_zero : (0 : E →ₗ[𝕜] E).IsSymmetric

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]


/-- Typeclass for an extension being a separable closure. -/
class IsSepClosure [Algebra k K] : Prop where
  sep_closed : IsSepClosed K
  separable : Algebra.IsSeparable k K

{k : Type u}
[Field k]
{K : Type v}
[Field K]
[Algebra k K]
[self : IsSepClosure k K]


theorem sin_two_mul : sin (2 * x) = 2 * sin x * cos x

Complex.sin (2 * x) = 2 * Complex.sin x * Complex.cos x


theorem norm_comp_le_of_le {g : NormedAddGroupHom V₂ V₃} {C₁ C₂ : ℝ} (hg : ‖g‖ ≤ C₂)
    (hf : ‖f‖ ≤ C₁) : ‖g.comp f‖ ≤ C₂ * C₁

{V₁ : Type u_2}
{V₂ : Type u_3}
{V₃ : Type u_4}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
[SeminormedAddCommGroup V₃]
{f : NormedAddGroupHom V₁ V₂}
{g : NormedAddGroupHom V₂ V₃}
{C₁ C₂ : ℝ}
(hg : ‖g‖ ≤ C₂)
(hf : ‖f‖ ≤ C₁)


theorem equiv_snd_eq_inv_mul (g : G) : ↑(hST.equiv g).snd = ((hST.equiv g).fst : G)⁻¹ * g

{G : Type u_1}
[Group G]
{S T : Set G}
(hST : Subgroup.IsComplement S T)
(g : G)

↑(hST.equiv g).2 = (↑(hST.equiv g).1)⁻¹ * g


/-- Two `LinearMap`s from a quotient module are equal if their compositions with
`submodule.mkQ` are equal.

See note [partially-applied ext lemmas]. -/
@[ext 1100] -- Porting note: increase priority so this applies before `LinearMap.ext`
theorem linearMap_qext ⦃f g : M ⧸ p →ₛₗ[τ₁₂] M₂⦄ (h : f.comp p.mkQ = g.comp p.mkQ) : f = g

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
{R₂ : Type u_3}
{M₂ : Type u_4}
[Ring R₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
⦃f g : M ⧸ p →ₛₗ[τ₁₂] M₂⦄
(h : f.comp p.mkQ = g.comp p.mkQ)


theorem div_add_mod' (m k : R) : m / k * k + m % k = m

{R : Type u}
[EuclideanDomain R]
(m k : R)


@[simp]
theorem iUnion_Ico_coe_nat : ⋃ n : ℕ, Ico a n = Ici a \ {∞}


protected theorem continuous (f : α →ᵇ β) : Continuous f

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


@[simp]
theorem coe_mk : ⇑(γ : C(I, X)) = γ

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
(γ : Path x y)


/-- Constructor for isomorphisms in `ComposableArrows C 1`. -/
@[simps!]
def isoMk₁ {F G : ComposableArrows C 1}
    (left : F.obj' 0 ≅ G.obj' 0) (right : F.obj' 1 ≅ G.obj' 1)
    (w : F.map' 0 1 ≫ right.hom = left.hom ≫ G.map' 0 1 := by aesop_cat) :
    F ≅ G

{F G : CategoryTheory.ComposableArrows C 1}

(w :
  CategoryTheory.CategoryStruct.comp (F.map' 0 1 ⋯ ⋯) right.hom =
    CategoryTheory.CategoryStruct.comp left.hom (G.map' 0 1 ⋯ ⋯) := by
  aesop_cat)

(CategoryTheory.ComposableArrows.isoMk₁ left right w).inv.app i =
  match i with
  | ⟨0, isLt⟩ => left.inv
  | ⟨1, isLt⟩ => right.inv


@[simp]
theorem mem_comap {x : L} : x ∈ comap f J ↔ f x ∈ J

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


@[simp]
theorem mulRight_apply (u : Rˣ) (x : R) : mulRight u x = x * u

{R : Type u_1}
[Semiring R]
(u : Rˣ)
(x : R)


theorem isCompact_iff_compactSpace : IsCompact s ↔ CompactSpace s

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


@[simp]
theorem nilradical_eq_zero (R : Type*) [CommSemiring R] [IsReduced R] : nilradical R = 0

(R : Type u_3)
[CommSemiring R]
[IsReduced R]


@[simp]
theorem restrict_singleton (μ : Measure α) (a : α) : μ.restrict {a} = μ {a} • dirac a

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

μ.restrict {a} = μ {a} • MeasureTheory.Measure.dirac a


@[simp]
theorem liftQ_apply (f : M →ₛₗ[τ₁₂] M₂) {h} (x : M) : p.liftQ f h (Quotient.mk x) = f x

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)
{R₂ : Type u_3}
{M₂ : Type u_4}
[Ring R₂]
[AddCommGroup M₂]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
(f : M →ₛₗ[τ₁₂] M₂)
{h : p ≤ LinearMap.ker f}
(x : M)

(p.liftQ f h) (Submodule.Quotient.mk x) = f x