@[simp]
-- Porting note: had to add an extra coercion arrow on the right hand side.
theorem coe_quotQuotEquivQuotOfLEₐ_symm (h : I ≤ J) :
    ⇑(quotQuotEquivQuotOfLEₐ R h).symm = ⇑(quotQuotEquivQuotOfLE h).symm

(R : Type u)
{A : Type u_1}
[CommSemiring R]
[CommRing A]
[Algebra R A]
{I J : Ideal A}
(h : I ≤ J)

⇑(DoubleQuot.quotQuotEquivQuotOfLEₐ R h).symm = ⇑(DoubleQuot.quotQuotEquivQuotOfLE h).symm


/-- The special adjoint functor theorem: if `G : D ⥤ C` preserves limits and `D` is complete,
well-powered and has a small coseparating set, then `G` has a left adjoint.
-/
lemma isRightAdjoint_of_preservesLimits_of_isCoseparating [HasLimits D] [WellPowered D]
    {𝒢 : Set D} [Small.{v} 𝒢] (h𝒢 : IsCoseparating 𝒢) (G : D ⥤ C) [PreservesLimits G] :
    G.IsRightAdjoint


@[to_additive (attr := simp)]
lemma mul_of {A : Type*} [Monoid A] (a b : A) :
    @HMul.hMul (MonCat.of A) (MonCat.of A) (MonCat.of A) _ a b = a * b


protected lemma comp {R₁ R₂ R₃ A : Type*} [Semifield R₁] [Field R₂] [Field R₃]
    [NonUnitalRing A] [Module R₁ A] [Module R₂ A] [Module R₃ A] [Algebra R₁ R₂] [Algebra R₂ R₃]
    [Algebra R₁ R₃] [IsScalarTower R₁ R₂ R₃] [IsScalarTower R₂ R₃ A] [IsScalarTower R₃ A A]
    [SMulCommClass R₃ A A] {a : A} {f : R₃ → R₂} {g : R₂ → R₁} {e : R₃ → R₁} (hfge : g ∘ f = e)
    (hf : QuasispectrumRestricts a f) (hg : QuasispectrumRestricts a g) :
    QuasispectrumRestricts a e

{R₁ : Type u_6}
{R₂ : Type u_7}
{R₃ : Type u_8}
{A : Type u_9}
[Semifield R₁]
[Field R₂]
[Field R₃]
[NonUnitalRing A]
[Module R₁ A]
[Module R₂ A]
[Module R₃ A]
[Algebra R₁ R₂]
[Algebra R₂ R₃]
[Algebra R₁ R₃]
[IsScalarTower R₁ R₂ R₃]
[IsScalarTower R₂ R₃ A]
[IsScalarTower R₃ A A]
[SMulCommClass R₃ A A]
{a : A}
{f : R₃ → R₂}
{g : R₂ → R₁}
{e : R₃ → R₁}
(hfge : g ∘ f = e)
(hf : QuasispectrumRestricts a f)
(hg : QuasispectrumRestricts a g)


/--
The dual basis of a powerbasis `{1, x, x²...}` under the trace form is `aᵢ / f'(x)`,
with `f` being the minimal polynomial of `x` and `f / (X - x) = ∑ aᵢxⁱ`.
-/
lemma traceForm_dualBasis_powerBasis_eq [FiniteDimensional K L] [Algebra.IsSeparable K L]
    (pb : PowerBasis K L) (i) :
    (Algebra.traceForm K L).dualBasis (traceForm_nondegenerate K L) pb.basis i =
      (minpolyDiv K pb.gen).coeff i / aeval pb.gen (derivative <| minpoly K pb.gen)

{K : Type u_4}
{L : Type u_5}
[Field K]
[Field L]
[Algebra K L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
(pb : PowerBasis K L)
(i : Fin pb.dim)

((Algebra.traceForm K L).dualBasis ⋯ pb.basis) i =
  (minpolyDiv K pb.gen).coeff ↑i / (Polynomial.aeval pb.gen) (Polynomial.derivative (minpoly K pb.gen))


lemma exactAt_iff :
    K.ExactAt i ↔ (K.sc i).Exact


/-- The `balLeft` function preserves the ordering invariants. -/
protected theorem Ordered.balLeft {l : RBNode α} {v : α} {r : RBNode α}
    (lv : l.All (cmpLT cmp · v)) (vr : r.All (cmpLT cmp v ·))
    (hl : l.Ordered cmp) (hr : r.Ordered cmp) : (balLeft l v r).Ordered cmp

(lv : Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp x v) l)

(vr : Batteries.RBNode.All (fun x => Batteries.RBNode.cmpLT cmp v x) r)

Batteries.RBNode.Ordered cmp (l.balLeft v r)


@[reassoc]
lemma map_comp (i j k : ℕ) (hij : i ≤ j) (hjk : j ≤ k) :
    map f i k (hij.trans hjk) = map f i j hij ≫ map f j k hjk

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X : ℕ → C}
(f : (n : ℕ) → X n ⟶ X (n + 1))
(i j k : ℕ)
(hij : i ≤ j)
(hjk : j ≤ k)

CategoryTheory.Functor.OfSequence.map f i k ⋯ =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Functor.OfSequence.map f i j hij)
    (CategoryTheory.Functor.OfSequence.map f j k hjk)


@[simp] theorem congr_refl_refl : congr (.refl R M) (.refl R N) = .refl R _

{R : Type u_1}
[CommSemiring R]
{M : Type u_4}
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]

TensorProduct.congr (LinearEquiv.refl R M) (LinearEquiv.refl R N) = LinearEquiv.refl R (TensorProduct R M N)


lemma Cotangent.mk_surjective : Function.Surjective (mk (P := P))

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}


@[simp]
theorem toLinearPMap_graph_eq (g : Submodule R (E × F))
    (hg : ∀ (x : E × F) (_hx : x ∈ g) (_hx' : x.fst = 0), x.snd = 0) :
    g.toLinearPMap.graph = g

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
(g : Submodule R (E × F))
(hg : ∀ x ∈ g, x.1 = 0 → x.2 = 0)


theorem opNorm_le_iff {f : E →SL[σ₁₂] F} {M : ℝ} (hMp : 0 ≤ M) :
    ‖f‖ ≤ M ↔ ∀ x, ‖f x‖ ≤ M * ‖x‖

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
{f : E →SL[σ₁₂] F}
{M : ℝ}
(hMp : 0 ≤ M)


lemma norm_term_le_of_re_le_re (f : ℕ → ℂ) {s s' : ℂ} (h : s.re ≤ s'.re) (n : ℕ) :
    ‖term f s' n‖ ≤ ‖term f s n‖

‖LSeries.term f s' n‖ ≤ ‖LSeries.term f s n‖


theorem Differentiable.dist (hf : Differentiable ℝ f) (hg : Differentiable ℝ g)
    (hne : ∀ x, f x ≠ g x) : Differentiable ℝ fun y => dist (f y) (g y)

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
(hf : Differentiable ℝ f)
(hg : Differentiable ℝ g)
(hne : ∀ (x : G), f x ≠ g x)


theorem not_cliqueFree_card_of_top_embedding [Fintype α] (f : (⊤ : SimpleGraph α) ↪g G) :
    ¬G.CliqueFree (card α)

{α : Type u_1}
{G : SimpleGraph α}
[Fintype α]
(f : ⊤ ↪g G)


theorem coe_injective : Function.Injective ((↑) : (M₁ →SL[σ₁₂] M₂) → M₁ →ₛₗ[σ₁₂] M₂)

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]


@[simp]
theorem succ'_pred' (n) : succ' (pred' n) = n


theorem deriv_eq_derivFamily (f : Ordinal → Ordinal) : deriv f = derivFamily fun _ : Unit => f

Ordinal.deriv f = Ordinal.derivFamily fun x => f


protected theorem HasFPowerSeriesAt.deriv (h : HasFPowerSeriesAt f p x) :
    deriv f x = p 1 fun _ => 1

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : FormalMultilinearSeries 𝕜 𝕜 F}
{f : 𝕜 → F}
{x : 𝕜}
(h : HasFPowerSeriesAt f p x)


theorem ne_iff {β : α → Sort*} {f₁ f₂ : ∀ a, β a} : f₁ ≠ f₂ ↔ ∃ a, f₁ a ≠ f₂ a

{α : Sort u_1}
{β : α → Sort u_4}
{f₁ f₂ : (a : α) → β a}

f₁ ≠ f₂ ↔ ∃ a, f₁ a ≠ f₂ a


theorem ofConjAct_mul (x y : ConjAct G) : ofConjAct (x * y) = ofConjAct x * ofConjAct y

{G : Type u_3}
[DivInvMonoid G]
(x y : ConjAct G)

ConjAct.ofConjAct (x * y) = ConjAct.ofConjAct x * ConjAct.ofConjAct y


lemma Triangle.eqToHom_hom₁ {A B : Triangle C} (h : A = B) :
    (eqToHom h).hom₁ = eqToHom (by subst h; rfl)

{A B : CategoryTheory.Pretriangulated.Triangle C}

(CategoryTheory.eqToHom h).hom₁ = CategoryTheory.eqToHom ⋯


@[simp]
theorem log2_zero : Nat.log2 0 = 0


lemma uIoc_subset_uIoc_of_uIcc_subset_uIcc {a b c d : α}
    (h : [[a, b]] ⊆ [[c, d]]) : Ι a b ⊆ Ι c d

{α : Type u_1}
[LinearOrder α]
{a b c d : α}
(h : Set.uIcc a b ⊆ Set.uIcc c d)


@[simp]
theorem dualPairing_apply (v x) : dualPairing R M v x = v x

(R : Type uR)
(M : Type uM)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(v : Module.Dual R M)
(x : M)


/-- A dilation scales the diameter of the range by `ratio f`. -/
theorem ediam_range : EMetric.diam (range (f : α → β)) = ratio f * EMetric.diam (univ : Set α)

{α : Type u_1}
{β : Type u_2}
{F : Type u_4}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[FunLike F α β]
[DilationClass F α β]
(f : F)

EMetric.diam (Set.range ⇑f) = ↑(Dilation.ratio f) * EMetric.diam Set.univ


@[simp]
theorem isUnit_zero_iff : IsUnit (0 : M₀) ↔ (0 : M₀) = 1


@[to_additive]
theorem le_comap_map {f : M →ₙ* N} : S ≤ (S.map f).comap f

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
(S : Subsemigroup M)
{f : M →ₙ* N}

S ≤ Subsemigroup.comap f (Subsemigroup.map f S)


@[to_additive (attr := simp)]
lemma units_zpow_right {a : M} {x y : Mˣ} (h : SemiconjBy a x y) :
    ∀ m : ℤ, SemiconjBy a ↑(x ^ m) ↑(y ^ m)

{M : Type u_1}
[AddMonoid M]
{a : M}
{x y : AddUnits M}
(h : AddSemiconjBy a ↑x ↑y)
(m : ℤ)


protected theorem prop (a : Fin n) : a.val < n


@[reassoc (attr := simp)]
theorem isoPullback_inv_fst (h : IsPullback fst snd f g) [HasPullback f g] :
    h.isoPullback.inv ≫ fst = pullback.fst _ _

(h : CategoryTheory.IsPullback fst snd f g)

h.isoPullback.inv ≫ fst = CategoryTheory.Limits.pullback.fst f g


/-- If a left-invariant measure gives finite mass to a set with nonempty interior, then
it gives finite mass to any compact set. -/
@[to_additive
"If a left-invariant measure gives finite mass to a set with nonempty interior, then it gives finite
mass to any compact set."]
theorem measure_lt_top_of_isCompact_of_isMulLeftInvariant' {U : Set G}
    (hU : (interior U).Nonempty) (h : μ U ≠ ∞) {K : Set G} (hK : IsCompact K) : μ K < ∞

{G : Type u_2}
[MeasurableSpace G]
[TopologicalSpace G]
[BorelSpace G]
{μ : MeasureTheory.Measure G}
[Group G]
[TopologicalGroup G]
[μ.IsMulLeftInvariant]
{U : Set G}
(hU : (interior U).Nonempty)
(h : μ U ≠ ⊤)
{K : Set G}
(hK : IsCompact K)


theorem blockDiagonal'_apply' (M : ∀ i, Matrix (m' i) (n' i) α) (k i k' j) :
    blockDiagonal' M ⟨k, i⟩ ⟨k', j⟩ =
      if h : k = k' then M k i (cast (congr_arg n' h.symm) j) else 0

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

Matrix.blockDiagonal' M ⟨k, i⟩ ⟨k', j⟩ = if h : k = k' then M k i (cast ⋯ j) else 0


@[to_additive]
theorem comp_symm_eq {α : Type*} (e : M ≃* N) (f : N → α) (g : M → α) :
    g ∘ e.symm = f ↔ g = f ∘ e

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
{α : Type u_12}
(e : M ≃+ N)
(f : N → α)
(g : M → α)


@[to_additive (attr := simp)] theorem multipliable_extend_one {g : β → γ} (hg : Injective g) :
    Multipliable (extend g f 1) ↔ Multipliable f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{g : β → γ}
(hg : Function.Injective g)

Multipliable (Function.extend g f 1) ↔ Multipliable f


@[simp]
theorem sInf_coe (P : Set (Submodule R M)) : (↑(sInf P) : Set M) = ⋂ p ∈ P, ↑p

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(P : Set (Submodule R M))


@[to_additive]
theorem epi_iff_range_eq_top : Epi f ↔ f.range = ⊤

CategoryTheory.Epi f ↔ AddMonoidHom.range f = ⊤


lemma away_of_isIdempotentElem {R S} [CommRing R] [CommRing S] [Algebra R S]
    {e : R} (he : IsIdempotentElem e)
    (H : RingHom.ker (algebraMap R S) = Ideal.span {1 - e})
    (H' : Function.Surjective (algebraMap R S)) :
    IsLocalization.Away e S

(H' : Function.Surjective ⇑(algebraMap R S))


theorem toFunLinear_mul_tmul_mul_aux_2 (k : ℕ) (a₁ a₂ : A) (p₁ p₂ : R[X]) :
    a₁ * a₂ * (algebraMap R A) ((p₁ * p₂).coeff k) =
      (Finset.antidiagonal k).sum fun x =>
        a₁ * (algebraMap R A) (coeff p₁ x.1) * (a₂ * (algebraMap R A) (coeff p₂ x.2))

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]
[Semiring A]
[Algebra R A]
(k : ℕ)
(a₁ a₂ : A)
(p₁ p₂ : R[X])

a₁ * a₂ * (algebraMap R A) ((p₁ * p₂).coeff k) =
  ∑ x ∈ Finset.antidiagonal k, a₁ * (algebraMap R A) (p₁.coeff x.1) * (a₂ * (algebraMap R A) (p₂.coeff x.2))


/-- Validity for a substring. -/
structure Valid (s : Substring) : Prop where
  /-- The start position of a valid substring is valid. -/
  startValid : s.startPos.Valid s.str
  /-- The stop position of a valid substring is valid. -/
  stopValid : s.stopPos.Valid s.str
  /-- The stop position of a substring is at least the start. -/
  le : s.startPos ≤ s.stopPos


/-- Arithmetic progressions of length three are preserved under `2`-Freiman homomorphisms. -/
@[to_additive]
lemma IsMulFreimanHom.threeGPFree (hf : IsMulFreimanHom 2 s t f) (hf' : s.InjOn f)
    (ht : ThreeGPFree t) : ThreeGPFree s

{α : Type u_2}
{β : Type u_3}
[CommMonoid α]
[CommMonoid β]
{s : Set α}
{t : Set β}
{f : α → β}
(hf : IsMulFreimanHom 2 s t f)
(hf' : Set.InjOn f s)
(ht : ThreeGPFree t)


/-- A module is a generalization of vector spaces to a scalar semiring.
  It consists of a scalar semiring `R` and an additive monoid of "vectors" `M`,
  connected by a "scalar multiplication" operation `r • x : M`
  (where `r : R` and `x : M`) with some natural associativity and
  distributivity axioms similar to those on a ring. -/
@[ext]
class Module (R : Type u) (M : Type v) [Semiring R] [AddCommMonoid M] extends
  DistribMulAction R M where
  /-- Scalar multiplication distributes over addition from the right. -/
  protected add_smul : ∀ (r s : R) (x : M), (r + s) • x = r • x + s • x
  /-- Scalar multiplication by zero gives zero. -/
  protected zero_smul : ∀ x : M, (0 : R) • x = 0

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[self : Module R M]
(r s : R)
(x : M)


@[simp]
theorem isHermitian_conjTranspose_iff (A : Matrix n n α) : Aᴴ.IsHermitian ↔ A.IsHermitian

{α : Type u_1}
{n : Type u_4}
[InvolutiveStar α]
(A : Matrix n n α)


@[reassoc (attr := simp)]
lemma inrCompHomotopy_hom_desc_hom (hc : ∀ j, ∃ i, c.Rel i j) (i j : ι) :
    (inrCompHomotopy φ hc).hom i j ≫ (desc φ α hα).f j = hα.hom i j

(HomologicalComplex.homotopyCofiber.inrCompHomotopy φ hc).hom i j ≫
    (HomologicalComplex.homotopyCofiber.desc φ α hα).f j =
  hα.hom i j


theorem offDiag_filter_lt_eq_filter_le {ι}
    [PartialOrder ι] [DecidableEq ι]
    [DecidableRel (LE.le (α := ι))] [DecidableRel (LT.lt (α := ι))]
    (s : Finset ι) :
    s.offDiag.filter (fun i => i.1 < i.2) = s.offDiag.filter (fun i => i.1 ≤ i.2)

{ι : Type u_4}
[PartialOrder ι]
[DecidableEq ι]
[DecidableRel LE.le]
[DecidableRel LT.lt]
(s : Finset ι)

Finset.filter (fun i => i.1 < i.2) s.offDiag = Finset.filter (fun i => i.1 ≤ i.2) s.offDiag


@[to_additive (attr := simp)]
theorem closure_closure_coe_preimage {s : Set M} :
    closure ((Subtype.val : closure s → M) ⁻¹' s) = ⊤

Subsemigroup.closure (Subtype.val ⁻¹' s) = ⊤


@[ext]
protected theorem ext {s₁ s₂ : Stream' α} : (∀ n, get s₁ n = get s₂ n) → s₁ = s₂

(∀ (n : ℕ), s₁.get n = s₂.get n) → s₁ = s₂


theorem image2_union_right : image2 f s (t ∪ t') = image2 f s t ∪ image2 f s t'

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

Set.image2 f s (t ∪ t') = Set.image2 f s t ∪ Set.image2 f s t'


@[simp]
theorem mapRange.linearMap_id :
    (mapRange.linearMap fun i => (LinearMap.id : β₂ i →ₗ[R] _)) = LinearMap.id

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

(DFinsupp.mapRange.linearMap fun i => LinearMap.id) = LinearMap.id


theorem USize.toNat_mul (x y : USize) : (x * y).toNat = (x.toNat * y.toNat) % USize.size

(x * y).toNat = x.toNat * y.toNat % USize.size


@[simp]
lemma aeval_val_σ (s) : aeval P.val (P.σ s) = s

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


theorem single_zero_smul_coeff {Γ} [OrderedAddCommMonoid Γ] [AddAction Γ Γ']
    [IsOrderedCancelVAdd Γ Γ'] [MulZeroClass R] [SMulWithZero R V] {r : R}
    {x : HahnModule Γ' R V} {a : Γ'} :
    ((of R).symm ((HahnSeries.single 0 r : HahnSeries Γ R) • x)).coeff a =
    r • ((of R).symm x).coeff a

{Γ' : Type u_2}
{R : Type u_3}
{V : Type u_4}
[PartialOrder Γ']
[AddCommMonoid V]
{Γ : Type u_5}
[OrderedAddCommMonoid Γ]
[AddAction Γ Γ']
[IsOrderedCancelVAdd Γ Γ']
[MulZeroClass R]
[SMulWithZero R V]
{r : R}
{x : HahnModule Γ' R V}
{a : Γ'}

((HahnModule.of R).symm ((HahnSeries.single 0) r • x)).coeff a = r • ((HahnModule.of R).symm x).coeff a


@[measurability, fun_prop]
theorem AEMeasurable.nnnorm {f : β → α} {μ : Measure β} (hf : AEMeasurable f μ) :
    AEMeasurable (fun a => ‖f a‖₊) μ

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[NormedAddCommGroup α]
[OpensMeasurableSpace α]
[MeasurableSpace β]
{f : β → α}
{μ : MeasureTheory.Measure β}
(hf : AEMeasurable f μ)


theorem Filter.Tendsto.exists_within_forall_ge [LinearOrder β] {s : Set α} (hs : s.Nonempty)
    {f : α → β} (hf : Filter.Tendsto f Filter.cofinite Filter.atBot) :
    ∃ a₀ ∈ s, ∀ a ∈ s, f a ≤ f a₀


theorem sizeUpTo_ofLength_le (i : ℕ) (h : c.length ≤ i) : c.sizeUpTo i = n

{n : ℕ}
(c : Composition n)
(i : ℕ)
(h : c.length ≤ i)


@[simp] lemma compl_subset_compl : sᶜ ⊆ tᶜ ↔ t ⊆ s

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

sᶜ ⊆ tᶜ ↔ t ⊆ s


@[reassoc (attr := simp)]
theorem section_comp_right (f g : A ⟶ B) [IsReflexivePair f g] : commonSection f g ≫ g = 𝟙 B

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{A B : C}
(f g : A ⟶ B)
[CategoryTheory.IsReflexivePair f g]

CategoryTheory.CategoryStruct.comp (CategoryTheory.commonSection f g) g = CategoryTheory.CategoryStruct.id B


lemma isClique_insert_of_not_mem (ha : a ∉ s) :
    G.IsClique (insert a s) ↔ G.IsClique s ∧ ∀ b ∈ s, G.Adj a b

{α : Type u_1}
{G : SimpleGraph α}
{s : Set α}
{a : α}
(ha : a ∉ s)


@[simp]
theorem cpow_zero (x : ℂ) : x ^ (0 : ℂ) = 1


theorem inner_self_re_eq_norm (x : E) : re ⟪x, x⟫ = ‖⟪x, x⟫‖

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


@[to_additive (attr := simp 1100)]
theorem closedBall_mul_singleton : closedBall x δ * {y} = closedBall (x * y) δ

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

Metric.closedBall x δ + {y} = Metric.closedBall (x + y) δ


theorem isRat_eq_false [Ring α] [CharZero α] : {a b : α} → {na nb : ℤ} → {da db : ℕ} →
    IsRat a na da → IsRat b nb db →
    decide (Int.mul na (.ofNat db) = Int.mul nb (.ofNat da)) = false → ¬a = b

{α : Type u_1}
[Ring α]
[CharZero α]
{a b : α}
{na nb : ℤ}
{da db : ℕ}

Mathlib.Meta.NormNum.IsRat a na da →
  Mathlib.Meta.NormNum.IsRat b nb db → decide (na.mul (Int.ofNat db) = nb.mul (Int.ofNat da)) = false → ¬a = b


theorem le_of_mul_le_mul_left {a b c : Int} (w : a * b ≤ a * c) (h : 0 < a) : b ≤ c


lemma le_traceDual_comm {I J : Submodule B L} :
    I ≤ Jᵛ ↔ J ≤ Iᵛ

{A : Type u_1}
{K : Type u_2}
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
{I J : Submodule B L}

I ≤ Submodule.traceDual A K J ↔ J ≤ Submodule.traceDual A K I


theorem Reflexive.comap (h : Reflexive r) (f : α → β) : Reflexive (r on f)

{α : Type u_1}
{β : Type u_2}
{r : β → β → Prop}
(h : Reflexive r)
(f : α → β)


/-- The functor `F.mapTriangle` commutes with the shift. -/
@[simps!]
noncomputable def mapTriangleCommShiftIso (n : ℤ) :
    Triangle.shiftFunctor C n ⋙ F.mapTriangle ≅ F.mapTriangle ⋙ Triangle.shiftFunctor D n

(X : CategoryTheory.Pretriangulated.Triangle C)

((F.mapTriangleCommShiftIso n).hom.app X).hom₁ = (F.commShiftIso n).hom.app X.obj₁


@[simp]
theorem isBigO_abs_right : (f =O[l] fun x => |u x|) ↔ f =O[l] u

{α : Type u_1}
{E : Type u_3}
[Norm E]
{f : α → E}
{l : Filter α}
{u : α → ℝ}


@[to_additive (attr := simp 1100)]
theorem coe_toMulHom {f : M ≃* N} : (f.toMulHom : M → N) = f

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
{f : M ≃* N}


@[to_additive]
theorem prod_finset_product' (r : Finset (γ × α)) (s : Finset γ) (t : γ → Finset α)
    (h : ∀ p : γ × α, p ∈ r ↔ p.1 ∈ s ∧ p.2 ∈ t p.1) {f : γ → α → β} :
    ∏ p ∈ r, f p.1 p.2 = ∏ c ∈ s, ∏ a ∈ t c, f c a

(h : ∀ (p : γ × α), p ∈ r ↔ p.1 ∈ s ∧ p.2 ∈ t p.1)

{f : γ → α → β}


@[to_additive IsOpen.left_addCoset]
theorem IsOpen.leftCoset {U : Set G} (h : IsOpen U) (x : G) : IsOpen (x • U)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[ContinuousAdd G]
{U : Set G}
(h : IsOpen U)
(x : G)


/-- An isometry induces an isometric isomorphism between the source space and the
range of the isometry. -/
@[simps! (config := { simpRhs := true }) toEquiv apply]
def Isometry.isometryEquivOnRange [EMetricSpace α] [PseudoEMetricSpace β] {f : α → β}
    (h : Isometry f) : α ≃ᵢ range f

{α : Type u}
{β : Type v}
[EMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
(h : Isometry f)
(a : α)


@[simp]
theorem deriv_neg' : deriv (Neg.neg : 𝕜 → 𝕜) = fun _ => -1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]


@[simp]
theorem map_rightInverse_iff {f : α → β} {g : β → α} :
    RightInverse (map f) (map g) ↔ RightInverse f g

{α : Type u}
{β : Type v}
{f : α → β}
{g : β → α}

Function.RightInverse (List.map f) (List.map g) ↔ Function.RightInverse f g


@[to_additive] -- Porting note (#10618): simp can prove this (so removed simp)
theorem powCoprime_inv {G : Type*} [Group G] (h : (Nat.card G).Coprime n) {g : G} :
    powCoprime h g⁻¹ = (powCoprime h g)⁻¹

{n : ℕ}
{G : Type u_6}
[Group G]
(h : (Nat.card G).Coprime n)
{g : G}

(powCoprime h) g⁻¹ = ((powCoprime h) g)⁻¹


@[refl]
theorem refl (Q : QuadraticMap R M N) : Q.Equivalent Q

{R : Type u_2}
{M : Type u_4}
{N : Type u_9}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)


theorem bind_eq_some' {x : Option α} {f : α → Option β} {b : β} :
    x.bind f = some b ↔ ∃ a, x = some a ∧ f a = some b

{α : Type u_1}
{β : Type u_2}
{x : Option α}
{f : α → Option β}
{b : β}


theorem rpow_le_rpow_of_exponent_ge {x : ℝ≥0} {y z : ℝ} (hx0 : 0 < x) (hx1 : x ≤ 1) (hyz : z ≤ y) :
    x ^ y ≤ x ^ z


theorem univ_mem' (h : ∀ a, a ∈ s) : s ∈ f

{α : Type u}
{f : Filter α}
{s : Set α}
(h : ∀ (a : α), a ∈ s)


/-- Premature version of the lemma. Prefer using `left_invariant` instead. -/
theorem left_invariant' :
    𝒅ₕ (smoothLeftMul_one I g) (Derivation.evalAt (1 : G) ↑X) = Derivation.evalAt g ↑X

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_4}
[TopologicalSpace G]
[ChartedSpace H G]
[Monoid G]
[SmoothMul I G]
(g : G)
(X : LeftInvariantDerivation I G)

(𝒅ₕ ⋯) ((Derivation.evalAt 1) ↑X) = (Derivation.evalAt g) ↑X


theorem leftInvSeq_concat (ω : List B) (i : B) :
    lis (ω.concat i) = (lis ω).concat ((π ω) * (s i) * (π ω)⁻¹)

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

cs.leftInvSeq (ω.concat i) = (cs.leftInvSeq ω).concat (cs.wordProd ω * cs.simple i * (cs.wordProd ω)⁻¹)


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

⦃f : α × β → E⦄

(h1f : MeasureTheory.AEStronglyMeasurable f (μ.prod ν))

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


theorem tendstoInMeasure_iff_norm [SeminormedAddCommGroup E] {l : Filter ι} {f : ι → α → E}
    {g : α → E} :
    TendstoInMeasure μ f l g ↔
      ∀ ε, 0 < ε → Tendsto (fun i => μ { x | ε ≤ ‖f i x - g x‖ }) l (𝓝 0)

{α : Type u_1}
{ι : Type u_2}
{E : Type u_3}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[SeminormedAddCommGroup E]
{l : Filter ι}
{f : ι → α → E}
{g : α → E}

MeasureTheory.TendstoInMeasure μ f l g ↔ ∀ (ε : ℝ), 0 < ε → Filter.Tendsto (fun i => μ {x | ε ≤ ‖f i x - g x‖}) l (𝓝 0)


lemma ofArrows_eq_ofObjects {X : C} (hX : IsTerminal X)
    {I : Type*} (Y : I → C) (f : ∀ i, Y i ⟶ X) :
    ofArrows Y f = ofObjects Y X

(hX : CategoryTheory.Limits.IsTerminal X)

CategoryTheory.Sieve.ofArrows Y f = CategoryTheory.Sieve.ofObjects Y X


/-- If `f : G → H` is a multiplicative homomorphism between two monoids, then
`Finsupp.mapDomain f` is an algebra homomorphism between their monoid algebras. -/
@[simps!]
def mapDomainAlgHom (k A : Type*) [CommSemiring k] [Semiring A] [Algebra k A] {H F : Type*}
    [Monoid H] [FunLike F G H] [MonoidHomClass F G H] (f : F) :
    MonoidAlgebra A G →ₐ[k] MonoidAlgebra A H

{G : Type u₂}
[Monoid G]
(k : Type u_4)
(A : Type u_5)
[CommSemiring k]
[Semiring A]
[Algebra k A]
{H : Type u_6}
{F : Type u_7}
[Monoid H]
[FunLike F G H]
[MonoidHomClass F G H]
(f : F)

∀ (a : G →₀ A), (MonoidAlgebra.mapDomainAlgHom k A f) a = Finsupp.mapDomain (⇑f) a


theorem preimage_image_preimage {f : α → β} {s : Set β} : f ⁻¹' (f '' (f ⁻¹' s)) = f ⁻¹' s

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


@[simp]
theorem eventually_map {P : β → Prop} : (∀ᶠ b in map m f, P b) ↔ ∀ᶠ a in f, P (m a)

{α : Type u}
{β : Type v}
{f : Filter α}
{m : α → β}
{P : β → Prop}

(∀ᶠ (b : β) in Filter.map m f, P b) ↔ ∀ᶠ (a : α) in f, P (m a)


theorem frontier_setOf_le_re_and_le_im (a b : ℝ) :
    frontier { z | a ≤ re z ∧ b ≤ im z } = { z | a ≤ re z ∧ im z = b ∨ re z = a ∧ b ≤ im z }

frontier {z | a ≤ z.re ∧ b ≤ z.im} = {z | a ≤ z.re ∧ z.im = b ∨ z.re = a ∧ b ≤ z.im}


@[to_additive]
theorem ciInf_div (hf : BddBelow (range f)) (a : G) : (⨅ i, f i) / a = ⨅ i, f i / a

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


/-- Applying a linear map at `v : M`, seen as `S`-linear map from `M →ₗ[R] M₂` to `M₂`.

 See `LinearMap.applyₗ` for a version where `S = R`. -/
@[simps]
def applyₗ' : M →+ (M →ₗ[R] M₂) →ₗ[S] M₂

{R : Type u_1}
(S : Type u_4)
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring S]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
[Module S M₂]
[SMulCommClass R S M₂]
(v : M)
(f : M →ₗ[R] M₂)


theorem trans_assoc (e₁ : P₁ ≃ᵃ[k] P₂) (e₂ : P₂ ≃ᵃ[k] P₃) (e₃ : P₃ ≃ᵃ[k] P₄) :
    (e₁.trans e₂).trans e₃ = e₁.trans (e₂.trans e₃)

{k : Type u_1}
{P₁ : Type u_2}
{P₂ : Type u_3}
{P₃ : Type u_4}
{P₄ : Type u_5}
{V₁ : Type u_6}
{V₂ : Type u_7}
{V₃ : Type u_8}
{V₄ : Type u_9}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
[AddCommGroup V₃]
[Module k V₃]
[AffineSpace V₃ P₃]
[AddCommGroup V₄]
[Module k V₄]
[AffineSpace V₄ P₄]
(e₁ : P₁ ≃ᵃ[k] P₂)
(e₂ : P₂ ≃ᵃ[k] P₃)
(e₃ : P₃ ≃ᵃ[k] P₄)


@[to_additive]
theorem ball_div_singleton : ball x δ / {y} = ball (x / y) δ

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

Metric.ball x δ - {y} = Metric.ball (x - y) δ


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

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


lemma inclusion_injective (h : L ≤ M) : Injective <| inclusion h

{α : Type u_2}
[Lattice α]
{L M : Sublattice α}
(h : L ≤ M)


/-- **Removable singularity** theorem: if `s` is a neighborhood of `c : ℂ`, a function `f : ℂ → E`
is complex differentiable on `s \ {c}`, and $f(z) - f(c)=o((z-c)^{-1})$, then `f` redefined to be
equal to `limUnder (𝓝[≠] c) f` at `c` is complex differentiable on `s`. -/
theorem differentiableOn_update_limUnder_of_isLittleO {f : ℂ → E} {s : Set ℂ} {c : ℂ} (hc : s ∈ 𝓝 c)
    (hd : DifferentiableOn ℂ f (s \ {c}))
    (ho : (fun z => f z - f c) =o[𝓝[≠] c] fun z => (z - c)⁻¹) :
    DifferentiableOn ℂ (update f c (limUnder (𝓝[≠] c) f)) s

DifferentiableOn ℂ (Function.update f c (limUnder (𝓝[≠] c) f)) s


/-- Paste two pushout squares "horizontally" to obtain another pushout square.

The objects in the statement fit into the following diagram:
```
X₁₁ - h₁₁ -> X₁₂ - h₁₂ -> X₁₃
|            |            |
v₁₁          v₁₂          v₁₃
↓            ↓            ↓
X₂₁ - h₂₁ -> X₂₂ - h₂₂ -> X₂₃
```
-/
theorem paste_horiz {X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₁₂ : X₁₂ ⟶ X₁₃}
    {h₂₁ : X₂₁ ⟶ X₂₂} {h₂₂ : X₂₂ ⟶ X₂₃} {v₁₁ : X₁₁ ⟶ X₂₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₁₃ : X₁₃ ⟶ X₂₃}
    (s : IsPushout h₁₁ v₁₁ v₁₂ h₂₁) (t : IsPushout h₁₂ v₁₂ v₁₃ h₂₂) :
    IsPushout (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂)

{X₁₁ X₁₂ X₁₃ X₂₁ X₂₂ X₂₃ : C}

{h₁₁ : X₁₁ ⟶ X₁₂}

{h₁₂ : X₁₂ ⟶ X₁₃}

{h₂₁ : X₂₁ ⟶ X₂₂}

{h₂₂ : X₂₂ ⟶ X₂₃}

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

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

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

(s : CategoryTheory.IsPushout h₁₁ v₁₁ v₁₂ h₂₁)

(t : CategoryTheory.IsPushout h₁₂ v₁₂ v₁₃ h₂₂)

CategoryTheory.IsPushout (h₁₁ ≫ h₁₂) v₁₁ v₁₃ (h₂₁ ≫ h₂₂)


protected theorem compl (h : e.IsImage s t) : e.IsImage sᶜ tᶜ

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{e : PartialHomeomorph X Y}
{s : Set X}
{t : Set Y}
(h : e.IsImage s t)


theorem add_apply (g₁ g₂ : α →₀ M) (a : α) : (g₁ + g₂) a = g₁ a + g₂ a

{α : Type u_1}
{M : Type u_5}
[AddZeroClass M]
(g₁ g₂ : α →₀ M)
(a : α)


theorem contMDiffWithinAt_iff_of_mem_source' {x' : M} {y : M'} (hx : x' ∈ (chartAt H x).source)
    (hy : f x' ∈ (chartAt H' y).source) :
    ContMDiffWithinAt I I' n f s x' ↔
      ContinuousWithinAt f s x' ∧
        ContDiffWithinAt 𝕜 n (extChartAt I' y ∘ f ∘ (extChartAt I x).symm)
          ((extChartAt I x).target ∩ (extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source))
          (extChartAt I x x')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I 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']
[SmoothManifoldWithCorners I' M']
{f : M → M'}
{s : Set M}
{x : M}
{n : ℕ∞}
{x' : M}
{y : M'}
(hx : x' ∈ (chartAt H x).source)
(hy : f x' ∈ (chartAt H' y).source)

ContMDiffWithinAt I I' n f s x' ↔
  ContinuousWithinAt f s x' ∧
    ContDiffWithinAt 𝕜 n (↑(extChartAt I' y) ∘ f ∘ ↑(extChartAt I x).symm)
      ((extChartAt I x).target ∩ ↑(extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' y).source)) (↑(extChartAt I x) x')


lemma finSuccEquiv_coeff_isHomogeneous {N : ℕ} {φ : MvPolynomial (Fin (N+1)) R} {n : ℕ}
    (hφ : φ.IsHomogeneous n) (i j : ℕ) (h : i + j = n) :
    ((finSuccEquiv _ _ φ).coeff i).IsHomogeneous j

{R : Type u_3}
[CommSemiring R]
{N : ℕ}
{φ : MvPolynomial (Fin (N + 1)) R}
{n : ℕ}
(hφ : φ.IsHomogeneous n)
(i j : ℕ)
(h : i + j = n)

(((MvPolynomial.finSuccEquiv R N) φ).coeff i).IsHomogeneous j


/-- Fractions which differ by a factor of the numerator can be proven equal if
those factors expand to equal elements of `R`. -/
@[to_additive "Differences whose minuends differ by a common summand can be proven equal if
those summands expand to equal elements of `R`."]
protected theorem eq_of_num_factor_eq {r r' r₁ r₂ : R} {s t : S} (h : t * r = t * r') :
    r₁ * r * r₂ /ₒ s = r₁ * r' * r₂ /ₒ s

{R : Type u_1}
[AddMonoid R]
{S : AddSubmonoid R}
[AddOreLocalization.AddOreSet S]
{r r' r₁ r₂ : R}
{s t : ↥S}
(h : ↑t + r = ↑t + r')


theorem exists_mem_subset_iff : (∃ t ∈ f, t ⊆ s) ↔ s ∈ f


theorem _root_.WithSeminorms.uniformEquicontinuous_iff_exists_continuous_seminorm {κ : Type*}
    {q : SeminormFamily 𝕜₂ F ι'} [UniformSpace E] [UniformAddGroup E] [u : UniformSpace F]
    [hu : UniformAddGroup F] (hq : WithSeminorms q) [ContinuousSMul 𝕜 E]
    (f : κ → E →ₛₗ[σ₁₂] F) :
    UniformEquicontinuous ((↑) ∘ f) ↔
    ∀ i, ∃ p : Seminorm 𝕜 E, Continuous p ∧ ∀ k, (q i).comp (f k) ≤ p

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_5}
{F : Type u_6}
{ι' : Type u_9}
[NontriviallyNormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[NontriviallyNormedField 𝕜₂]
[AddCommGroup F]
[Module 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
[Nonempty ι']
{κ : Type u_10}
{q : SeminormFamily 𝕜₂ F ι'}
[UniformSpace E]
[UniformAddGroup E]
[u : UniformSpace F]
[hu : UniformAddGroup F]
(hq : WithSeminorms q)
[ContinuousSMul 𝕜 E]
(f : κ → E →ₛₗ[σ₁₂] F)

UniformEquicontinuous (DFunLike.coe ∘ f) ↔ ∀ (i : ι'), ∃ p, Continuous ⇑p ∧ ∀ (k : κ), (q i).comp (f k) ≤ p


theorem mk_union_of_disjoint {α : Type u} {S T : Set α} (H : Disjoint S T) :
    #(S ∪ T : Set α) = #S + #T

Cardinal.mk ↑(S ∪ T) = Cardinal.mk ↑S + Cardinal.mk ↑T


/-- If `f` has sum `a`, then `exp ∘ f` has product `exp a`. -/
lemma HasSum.cexp {ι : Type*} {f : ι → ℂ} {a : ℂ} (h : HasSum f a) : HasProd (cexp ∘ f) (cexp a)

{ι : Type u_1}
{f : ι → ℂ}
{a : ℂ}
(h : HasSum f a)

HasProd (Complex.exp ∘ f) (Complex.exp a)


theorem sInf_neBot_of_directed' {s : Set (Filter α)} (hne : s.Nonempty) (hd : DirectedOn (· ≥ ·) s)
    (hbot : ⊥ ∉ s) : NeBot (sInf s)

(hd : DirectedOn (fun x x_1 => x ≥ x_1) s)


@[ext]
lemma ext {a₁ a₂ : FiniteAdeleRing R K} (h : (a₁ : K_hat R K) = a₂) : a₁ = a₂

{a₁ a₂ : DedekindDomain.FiniteAdeleRing R K}


theorem ceil_add_le (a b : α) : ⌈a + b⌉₊ ≤ ⌈a⌉₊ + ⌈b⌉₊

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
(a b : α)

⌈a + b⌉₊ ≤ ⌈a⌉₊ + ⌈b⌉₊


/-- Predicate for maps which preserve a multiplication. -/
@[to_additive]
structure IsMulHom {α β : Type*} [Mul α] [Mul β] (f : α → β) : Prop where
  /-- The proposition that `f` preserves multiplication. -/
  map_mul : ∀ x y, f (x * y) = f x * f y

{α : Type u_1}
{β : Type u_2}
[Mul α]
[Mul β]
{f : α → β}
(self : IsMulHom f)
(x y : α)


theorem ker_apply_mk_out' {f : α → β} (a : α) :
    f (Quotient.mk _ a : Quotient <| Setoid.ker f).out' = f a

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(a : α)


/-- A semi-ring of sets `C` is a family of sets containing `∅`, stable by intersection and such that
for all `s, t ∈ C`, `s \ t` is equal to a disjoint union of finitely many sets in `C`. -/
structure IsSetSemiring (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  inter_mem : ∀ s ∈ C, ∀ t ∈ C, s ∩ t ∈ C
  diff_eq_sUnion' : ∀ s ∈ C, ∀ t ∈ C,
    ∃ I : Finset (Set α), ↑I ⊆ C ∧ PairwiseDisjoint (I : Set (Set α)) id ∧ s \ t = ⋃₀ I

{α : Type u_1}
{C : Set (Set α)}
(self : MeasureTheory.IsSetSemiring C)
(s : Set α)

s ∈ C → ∀ t ∈ C, ∃ I, ↑I ⊆ C ∧ (↑I).PairwiseDisjoint id ∧ s \ t = ⋃₀ ↑I


theorem iff_lintegral_lt_top {f : α →ₛ ℝ≥0∞} (hf : ∀ᵐ a ∂μ, f a ≠ ∞) :
    f.FinMeasSupp μ ↔ f.lintegral μ < ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : MeasureTheory.SimpleFunc α ℝ≥0∞}
(hf : ∀ᵐ (a : α) ∂μ, ↑f a ≠ ⊤)


/-- The kernel of `f.op` is the opposite of `cokernel f`. -/
@[simps!]
def kernelOpOp : kernel f.op ≅ Opposite.op (cokernel f)

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

(CategoryTheory.kernelOpOp f).inv = CategoryTheory.Limits.kernel.lift f.op (CategoryTheory.Limits.cokernel.π f).op ⋯


@[simp]
theorem top_toSubring {R A : Type*} [CommRing R] [NonUnitalNonAssocRing A] [Module R A]
    [IsScalarTower R A A] [SMulCommClass R A A] :
    (⊤ : NonUnitalSubalgebra R A).toNonUnitalSubring = ⊤

{R : Type u_2}
{A : Type u_3}
[CommRing R]
[NonUnitalNonAssocRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]


@[instance]
theorem nhdsWithin_Iio_neBot [NeZero x] : (𝓝[<] x).NeBot


@[simp]
theorem toSheafedSpace_toPresheafedSpace : (toSheafedSpace Y f).toPresheafedSpace = X

{X : AlgebraicGeometry.PresheafedSpace C}

[H : AlgebraicGeometry.PresheafedSpace.IsOpenImmersion f]

(AlgebraicGeometry.PresheafedSpace.IsOpenImmersion.toSheafedSpace Y f).toPresheafedSpace = X


@[simp]
theorem digits_of_lt (b x : ℕ) (hx : x ≠ 0) (hxb : x < b) : digits b x = [x]


theorem comap_sup_map_of_injective (p q : Submodule R M) : (p.map f ⊔ q.map f).comap f = p ⊔ q

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

Submodule.comap f (Submodule.map f p ⊔ Submodule.map f q) = p ⊔ q


/-- If `f₁ = f₂` and `g₁ = g₂`, we may construct a canonical
isomorphism `pullback f₁ g₁ ≅ pullback f₂ g₂` -/
@[simps! hom]
def pullback.congrHom {X Y Z : C} {f₁ f₂ : X ⟶ Z} {g₁ g₂ : Y ⟶ Z} (h₁ : f₁ = f₂) (h₂ : g₁ = g₂)
    [HasPullback f₁ g₁] [HasPullback f₂ g₂] : pullback f₁ g₁ ≅ pullback f₂ g₂

(CategoryTheory.Limits.pullback.congrHom h₁ h₂).hom =
  CategoryTheory.Limits.pullback.map f₁ g₁ f₂ g₂ (𝟙 X) (𝟙 Y) (𝟙 Z) ⋯ ⋯


theorem inv_mul_le_iff' (h : 0 < b) : b⁻¹ * a ≤ c ↔ a ≤ c * b

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c : α}
(h : 0 < b)


theorem map_subtype_le (p' : Submodule R p) : map p.subtype p' ≤ p

{R : Type u_1}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p : Submodule R M)
(p' : Submodule R ↥p)


/-- Given a multilinear map in `n` variables, if one restricts it to `k` variables putting `z` on
the other coordinates, then the resulting restricted function satisfies an inequality
`‖f.restr v‖ ≤ C * ‖z‖^(n-k) * Π ‖v i‖` if the original function satisfies `‖f v‖ ≤ C * Π ‖v i‖`. -/
theorem restr_norm_le {k n : ℕ} (f : (MultilinearMap 𝕜 (fun _ : Fin n => G) G' : _))
    (s : Finset (Fin n)) (hk : s.card = k) (z : G) {C : ℝ} (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖)
    (v : Fin k → G) : ‖f.restr s hk z v‖ ≤ C * ‖z‖ ^ (n - k) * ∏ i, ‖v i‖

(H : ∀ (m : Fin n → G), ‖f m‖ ≤ C * ∏ i : Fin n, ‖m i‖)

‖(f.restr s hk z) v‖ ≤ C * ‖z‖ ^ (n - k) * ∏ i : Fin k, ‖v i‖


/-- Functors from `Discrete PUnit` are equivalent to the category itself. -/
@[simps]
def equiv : Discrete PUnit.{w + 1} ⥤ C ≌ C

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

CategoryTheory.Functor.equiv.counitIso = CategoryTheory.NatIso.ofComponents CategoryTheory.Iso.refl ⋯


theorem zpow_apply [DivInvMonoid β] (z : ℤ) (f : α →ₛ β) (a : α) : (f ^ z) a = f a ^ z

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[DivInvMonoid β]
(z : ℤ)
(f : MeasureTheory.SimpleFunc α β)
(a : α)


/-- Any bounded continuous nonnegative f such that `f ≥ 1` on K gives an upper bound on the
content of K; namely `λ(K) ≤ Λ f`. -/
theorem rieszContentAux_le {K : Compacts X} {f : X →ᵇ ℝ≥0} (h : ∀ x ∈ K, (1 : ℝ≥0) ≤ f x) :
    rieszContentAux Λ K ≤ Λ f

{X : Type u_1}
[TopologicalSpace X]
(Λ : (X →ᵇ ℝ≥0) →ₗ[ℝ≥0] ℝ≥0)
{K : TopologicalSpace.Compacts X}
{f : X →ᵇ ℝ≥0}
(h : ∀ x ∈ K, 1 ≤ f x)


theorem lcs_le_lcs_of_is_nilpotent_span_sup_eq_top {n i j : ℕ}
    (hxn : toEnd R L M x ^ n = 0) (hIM : lowerCentralSeries R L M i ≤ I.lcs M j) :
    lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1)

(hxI : Submodule.span R {x} ⊔ (lieIdealSubalgebra R L I).toSubmodule = ⊤)

(hxn : (LieModule.toEnd R L M) x ^ n = 0)

(hIM : LieModule.lowerCentralSeries R L M i ≤ I.lcs M j)

LieModule.lowerCentralSeries R L M (i + n) ≤ I.lcs M (j + 1)


theorem isClosed_iff_sup :
    IsClosed s ↔
      ∀ {ι : Type u}, Nonempty ι → ∀ f : ι → Ordinal, (∀ i, f i ∈ s) → sup.{u, u} f ∈ s

IsClosed s ↔ ∀ {ι : Type u}, Nonempty ι → ∀ (f : ι → Ordinal.{u}), (∀ (i : ι), f i ∈ s) → Ordinal.sup f ∈ s


@[simp] theorem arrowCongr'_refl {α β : Type*} :
    arrowCongr' (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α → β)

(Equiv.refl α).arrowCongr' (Equiv.refl β) = Equiv.refl (α → β)


lemma sum_mul_boole (s : Finset ι) (f : ι → α) (i : ι) :
    ∑ j ∈ s, f j * ite (i = j) 1 0 = ite (i ∈ s) (f i) 0

{ι : Type u_1}
{α : Type u_2}
[NonAssocSemiring α]
[DecidableEq ι]
(s : Finset ι)
(f : ι → α)
(i : ι)

(∑ j ∈ s, f j * if i = j then 1 else 0) = if i ∈ s then f i else 0


/-- Given a colimit cocone over `G : D ⥤ E` we can construct a colimit cocone over `F ⋙ G`. -/
@[simps]
def colimitCoconeComp (t : ColimitCocone G) : ColimitCocone (F ⋙ G)

(t : CategoryTheory.Limits.ColimitCocone G)

(CategoryTheory.Functor.Final.colimitCoconeComp F t).cocone = CategoryTheory.Limits.Cocone.whisker F t.cocone


/-- `star` as a `MulAut` for commutative `R`. -/
@[simps apply]
def starMulAut [CommSemigroup R] [StarMul R] : MulAut R

{R : Type u}
[CommSemigroup R]
[StarMul R]


@[simp]
theorem irrational_rat_add_iff : Irrational (q + x) ↔ Irrational x


theorem comp_assoc {I : Type u → Type t} [Applicative I]
    (η'' : ApplicativeTransformation H I) (η' : ApplicativeTransformation G H)
    (η : ApplicativeTransformation F G) : (η''.comp η').comp η = η''.comp (η'.comp η)

{F : Type u → Type v}
[Applicative F]
{G : Type u → Type w}
[Applicative G]
{H : Type u → Type s}
[Applicative H]
{I : Type u → Type t}
[Applicative I]
(η'' : ApplicativeTransformation H I)
(η' : ApplicativeTransformation G H)
(η : ApplicativeTransformation F G)


/-- Composition of triangle morphisms gives a triangle morphism.
-/
@[simps]
def TriangleMorphism.comp (f : TriangleMorphism T₁ T₂) (g : TriangleMorphism T₂ T₃) :
    TriangleMorphism T₁ T₃

{T₁ T₂ T₃ : CategoryTheory.Pretriangulated.Triangle C}

(f : CategoryTheory.Pretriangulated.TriangleMorphism T₁ T₂)

(g : CategoryTheory.Pretriangulated.TriangleMorphism T₂ T₃)


@[simp] lemma not_even_one : ¬Even (1 : ℤ)


/-- The L-series of a Dirichlet character `χ` and of the twist of `μ` by `χ` are multiplicative
inverses. -/
lemma LSeries.mul_mu_eq_one {N : ℕ} (χ : DirichletCharacter ℂ N) {s : ℂ}
    (hs : 1 < s.re) : L ↗χ s * L (↗χ * ↗μ) s = 1

L (fun n => χ ↑n) s * L ((fun n => χ ↑n) * fun n => ↑(ArithmeticFunction.moebius n)) s = 1


theorem mem_rangeIcc_apply_iff : a ∈ f.rangeIcc g i ↔ f i ≤ a ∧ a ≤ g i

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Zero (α i)]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
{f g : Π₀ (i : ι), α i}
{i : ι}
{a : α i}

a ∈ (f.rangeIcc g) i ↔ f i ≤ a ∧ a ≤ g i


/-- If `B` is a cyclotomic extension of `A` given by roots of unity of order in `S ∪ T`, then `B`
is a cyclotomic extension of `adjoin A { b : B | ∃ a : ℕ+, a ∈ S ∧ b ^ (a : ℕ) = 1 }` given by
roots of unity of order in `T`. -/
theorem union_right [h : IsCyclotomicExtension (S ∪ T) A B] :
    IsCyclotomicExtension T (adjoin A {b : B | ∃ a : ℕ+, a ∈ S ∧ b ^ (a : ℕ) = 1}) B

(S T : Set ℕ+)
(A : Type u)
(B : Type v)
[CommRing A]
[CommRing B]
[Algebra A B]
[h : IsCyclotomicExtension (S ∪ T) A B]

IsCyclotomicExtension T (↥(Algebra.adjoin A {b | ∃ a ∈ S, b ^ ↑a = 1})) B


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

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


protected theorem add_pos_of_pos_of_nonneg {a b : Int} (ha : 0 < a) (hb : 0 ≤ b) : 0 < a + b


/-- The vector span of the opposite face lies in the direction
orthogonal to an altitude. -/
theorem vectorSpan_isOrtho_altitude_direction {n : ℕ} (s : Simplex ℝ P (n + 1)) (i : Fin (n + 2)) :
    vectorSpan ℝ (s.points '' ↑(Finset.univ.erase i)) ⟂ (s.altitude i).direction

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{n : ℕ}
(s : Affine.Simplex ℝ P (n + 1))
(i : Fin (n + 2))


theorem image_const_add_Iio : (fun x => a + x) '' Iio b = Iio (a + b)

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

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


theorem mem_chartAt_ind_source (x : M) (hx : x ∈ s) : x ∈ (chartAt H (fs.c (fs.ind x hx))).source

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
(fs : SmoothBumpCovering ι I M s)
(x : M)
(hx : x ∈ s)


@[fun_prop]
protected theorem Differentiable.iterate {f : E → E} (hf : Differentiable 𝕜 f) (n : ℕ) :
    Differentiable 𝕜 f^[n]

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : E → E}
(hf : Differentiable 𝕜 f)
(n : ℕ)


theorem mul_gauge_le_norm (hs : Metric.ball (0 : E) r ⊆ s) : r * gauge s x ≤ ‖x‖

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
{r : ℝ}
{x : E}
(hs : Metric.ball 0 r ⊆ s)


theorem left_dom_of_mod_dom [Mod α] {a b : Part α} (hab : Dom (a % b)) : a.Dom

{α : Type u_1}
[Mod α]
{a b : Part α}
(hab : (a % b).Dom)


theorem u_sInf {s : Set β} : u (sInf s) = ⨅ a ∈ s, u a

{α : Type u}
{β : Type v}
[CompleteLattice α]
[CompleteLattice β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{s : Set β}


lemma mem_countablePartitionSet (n : ℕ) (a : α) : a ∈ countablePartitionSet n a

[h : MeasurableSpace.CountablyGenerated α]

a ∈ MeasurableSpace.countablePartitionSet n a


@[simp]
theorem ofComponents.app (app' : ∀ X : C, F.obj X ≅ G.obj X) (naturality) (X) :
    (ofComponents app' naturality).app X = app' X

(naturality : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app' Y).hom = (app' X).hom ≫ G.map f)

(CategoryTheory.NatIso.ofComponents app' naturality).app X = app' X


theorem invertible_unique {α : Type u} [Monoid α] (a b : α) [Invertible a] [Invertible b]
    (h : a = b) : ⅟ a = ⅟ b


lemma UniformConcaveOn.neg (hf : UniformConcaveOn s φ f) : UniformConvexOn s φ (-f)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{φ : ℝ → ℝ}
{s : Set E}
{f : E → ℝ}
(hf : UniformConcaveOn s φ f)


theorem Monotone.mul_const_of_nonpos [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hf : Monotone f) (ha : a ≤ 0) : Antitone fun x => f x * a

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

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


protected theorem ContDiffWithinAt.inversion (hc : ContDiffWithinAt ℝ n c s a)
    (hR : ContDiffWithinAt ℝ n R s a) (hx : ContDiffWithinAt ℝ n x s a) (hne : x a ≠ c a) :
    ContDiffWithinAt ℝ n (fun a ↦ inversion (c a) (R a) (x a)) s a

{E : Type u_1}
{F : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{c x : E → F}
{R : E → ℝ}
{s : Set E}
{a : E}
{n : ℕ∞}
(hc : ContDiffWithinAt ℝ n c s a)
(hR : ContDiffWithinAt ℝ n R s a)
(hx : ContDiffWithinAt ℝ n x s a)
(hne : x a ≠ c a)

ContDiffWithinAt ℝ n (fun a => EuclideanGeometry.inversion (c a) (R a) (x a)) s a


theorem nontrivial_iff_exists_ne (x : α) : Nontrivial α ↔ ∃ y, y ≠ x


@[simp]
theorem arg_coe_angle_toReal_eq_arg (z : ℂ) : (arg z : Real.Angle).toReal = arg z


theorem add (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f + g) ℱ μ

{Ω : Type u_1}
{E : Type u_2}
{ι : Type u_3}
[Preorder ι]
{m0 : MeasurableSpace Ω}
{μ : MeasureTheory.Measure Ω}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{f g : ι → Ω → E}
{ℱ : MeasureTheory.Filtration ι m0}
(hf : MeasureTheory.Martingale f ℱ μ)
(hg : MeasureTheory.Martingale g ℱ μ)


@[simp]
theorem smul_inf (a : α) (S T : Subgroup G) : a • (S ⊓ T) = a • S ⊓ a • T

{α : Type u_1}
{G : Type u_2}
[Group G]
[Group α]
[MulDistribMulAction α G]
(a : α)
(S T : Subgroup G)


theorem sub_pow_char [CommRing R] {p : ℕ} [Fact p.Prime] [CharP R p] (x y : R) :
    (x - y) ^ p = x ^ p - y ^ p

(R : Type u_1)
[CommRing R]
{p : ℕ}
[Fact (Nat.Prime p)]
[CharP R p]
(x y : R)


lemma le_sub_one_iff : m ≤ n - 1 ↔ m < n


@[to_additive] lemma MonoidHomClass.isMulFreimanHom [FunLike F α β] [MonoidHomClass F α β] (f : F)
    (hfAB : MapsTo f A B) : IsMulFreimanHom n A B f

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[AddCommMonoid α]
[AddCommMonoid β]
{A : Set α}
{B : Set β}
{n : ℕ}
[FunLike F α β]
[AddMonoidHomClass F α β]
(f : F)
(hfAB : Set.MapsTo (⇑f) A B)


lemma exists_image_eq_and_injOn : ∃ u, f '' u =  f '' s ∧ InjOn f u

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


/-- A "continuous induction principle" for a closed interval: if a set `s` meets `[a, b]`
on a closed subset, contains `a`, and for any `a ≤ x < y ≤ b`, `x ∈ s`, the set `s ∩ (x, y]`
is not empty, then `[a, b] ⊆ s`. -/
theorem IsClosed.Icc_subset_of_forall_exists_gt {a b : α} {s : Set α} (hs : IsClosed (s ∩ Icc a b))
    (ha : a ∈ s) (hgt : ∀ x ∈ s ∩ Ico a b, ∀ y ∈ Ioi x, (s ∩ Ioc x y).Nonempty) : Icc a b ⊆ s

(hgt : ∀ x ∈ s ∩ Set.Ico a b, ∀ y ∈ Set.Ioi x, (s ∩ Set.Ioc x y).Nonempty)


theorem IsCompactOperator.smul {S : Type*} [Monoid S] [DistribMulAction S M₂]
    [ContinuousConstSMul S M₂] {f : M₁ → M₂} (hf : IsCompactOperator f) (c : S) :
    IsCompactOperator (c • f)

{M₁ : Type u_5}
{M₂ : Type u_6}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[TopologicalSpace M₂]
[AddCommMonoid M₂]
{S : Type u_9}
[Monoid S]
[DistribMulAction S M₂]
[ContinuousConstSMul S M₂]
{f : M₁ → M₂}
(hf : IsCompactOperator f)
(c : S)


lemma count_ne_zero {I : FractionalIdeal R⁰ K} (hI : I ≠ 0) :
    count K v I = ((Associates.mk v.asIdeal).count (Associates.mk
      (choose (choose_spec (exists_eq_spanSingleton_mul I)))).factors -
      (Associates.mk v.asIdeal).count
        (Associates.mk (Ideal.span {choose (exists_eq_spanSingleton_mul I)})).factors : ℤ)

(v : IsDedekindDomain.HeightOneSpectrum R)

FractionalIdeal.count K v I =
  ↑((Associates.mk v.asIdeal).count (Associates.mk (Classical.choose ⋯)).factors) -
    ↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {Classical.choose ⋯})).factors)


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

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


theorem cast_eq_val [NeZero n] (a : ZMod n) : (cast a : R) = a.val

{n : ℕ}
{R : Type u_1}
[AddGroupWithOne R]
[NeZero n]
(a : ZMod n)


theorem map_le_iff_le_comap {f : R →+* S} {s : Subsemiring R} {t : Subsemiring S} :
    s.map f ≤ t ↔ s ≤ t.comap f

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{f : R →+* S}
{s : Subsemiring R}
{t : Subsemiring S}

Subsemiring.map f s ≤ t ↔ s ≤ Subsemiring.comap f t


@[to_additive (attr := simp)]
theorem one_le_mul_self_iff : 1 ≤ a * a ↔ 1 ≤ a

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


theorem real_smul_negPart_nonneg (r : ℝ) (hr : 0 ≤ r) :
    (r • j).negPart = r.toNNReal • j.negPart

(j : MeasureTheory.JordanDecomposition α)


theorem eventually_left_inverse (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) a) :
    ∀ᶠ x in 𝓝 a, hf.localInverse f f' a (f x) = x

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

∀ᶠ (x : E) in 𝓝 a, HasStrictFDerivAt.localInverse f f' a hf (f x) = x


theorem IsRelPrime.dvd_of_dvd_mul_left (H1 : IsRelPrime x y) (H2 : x ∣ y * z) : x ∣ z

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


theorem coe_injective : Function.Injective ((↑) : (𝓞 K)ˣ → K)

Function.Injective fun x => (algebraMap (𝓞 K) K) ↑x


/-- The default cost structure, for which all operations cost `1`. -/
@[simps]
def defaultCost [DecidableEq α] : Cost α α ℕ

∀ (x : α), Levenshtein.defaultCost.delete x = 1


@[simp]
theorem seq_up (f : α → β) (x : α) : (PLift.up f).seq (fun _ => PLift.up x) = PLift.up (f x)

{α : Sort u}
{β : Sort v}
(f : α → β)
(x : α)

({ down := f }.seq fun x_1 => { down := x }) = { down := f x }


@[simp]
theorem adjMatrix_vecMul_apply [NonAssocSemiring α] (v : V) (vec : V → α) :
    (vec ᵥ* G.adjMatrix α) v = ∑ u ∈ G.neighborFinset v, vec u

{V : Type u_1}
{α : Type u_2}
(G : SimpleGraph V)
[DecidableRel G.Adj]
[Fintype V]
[NonAssocSemiring α]
(v : V)
(vec : V → α)

(vec ᵥ* SimpleGraph.adjMatrix α G) v = ∑ u ∈ G.neighborFinset v, vec u


theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : ℕ) :
    spectralRadius 𝕜 a ≤ (‖a ^ (n + 1)‖₊ : ℝ≥0∞) ^ (1 / (n + 1) : ℝ) *
      (‖(1 : A)‖₊ : ℝ≥0∞) ^ (1 / (n + 1) : ℝ)

(𝕜 : Type u_1)
{A : Type u_2}
[NormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
(a : A)
(n : ℕ)

spectralRadius 𝕜 a ≤ ↑‖a ^ (n + 1)‖₊ ^ (1 / (↑n + 1)) * ↑‖1‖₊ ^ (1 / (↑n + 1))


protected theorem min_comm (a b : Int) : min a b = min b a


/-- Given f : Y ⟶ X, this is the obvious functor from (T/X)/f to T/Y -/
@[simps]
def iteratedSliceForward : Over f ⥤ Over f.left

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X : T}
(f : CategoryTheory.Over X)

∀ {X_1 Y : CategoryTheory.Over f} (κ : X_1 ⟶ Y), f.iteratedSliceForward.map κ = CategoryTheory.Over.homMk κ.left.left ⋯


lemma hasHomology_of_iso (e : S₁ ≅ S₂) [HasHomology S₁] : HasHomology S₂


@[simp]
theorem keys_singleton (a : α) (b : β a) : (singleton a b).keys = [a]

{α : Type u}
{β : α → Type v}
(a : α)
(b : β a)


/-- The preimage of a subsingleton under an injective map is a subsingleton. -/
theorem Subsingleton.preimage {s : Set β} (hs : s.Subsingleton) {f : α → β}
    (hf : Function.Injective f) : (f ⁻¹' s).Subsingleton

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


/-- `reduce` is idempotent, i.e. the maximal reduction of the maximal reduction of a word is the
  maximal reduction of the word. -/
@[to_additive (attr := simp) "`reduce` is idempotent, i.e. the maximal reduction of the maximal
  reduction of a word is the maximal reduction of the word."]
theorem reduce.idem : reduce (reduce L) = reduce L

{α : Type u}
{L : List (α × Bool)}
[DecidableEq α]

FreeAddGroup.reduce (FreeAddGroup.reduce L) = FreeAddGroup.reduce L


theorem HasBasis.inf_neBot_iff (hl : l.HasBasis p s) :
    NeBot (l ⊓ l') ↔ ∀ ⦃i⦄, p i → ∀ ⦃s'⦄, s' ∈ l' → (s i ∩ s').Nonempty

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

(l ⊓ l').NeBot ↔ ∀ ⦃i : ι⦄, p i → ∀ ⦃s' : Set α⦄, s' ∈ l' → (s i ∩ s').Nonempty


@[fun_prop]
lemma continuous_realContinuousMapZeroOfNNReal (φ : C(X, ℝ≥0)₀ →⋆ₙₐ[ℝ≥0] A)
    (hφ : Continuous φ) : Continuous φ.realContinuousMapZeroOfNNReal

(φ : ContinuousMapZero X NNReal →⋆ₙₐ[NNReal] A)


@[to_additive (attr := simp)]
theorem mker_inr : mker (inr M N) = ⊥

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

AddMonoidHom.mker (AddMonoidHom.inr M N) = ⊥


theorem foldrM_eq_foldrM_data [Monad m]
    (f : α → β → m β) (init : β) (arr : Array α) :
    arr.foldrM f init = arr.data.foldrM f init

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
(f : α → β → m β)
(init : β)
(arr : Array α)

Array.foldrM f init arr arr.size = List.foldrM f init arr.data


/-- The functor `Comma L R ⥤ Comma L R` induced by the identity natural transformation on `R` is
    naturally isomorphic to the identity functor. -/
@[simps!]
def mapRightId : mapRight L (𝟙 R) ≅ 𝟭 _

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

((CategoryTheory.Comma.mapRightId L R).hom.app X).left = CategoryTheory.CategoryStruct.id X.left


theorem roots_X_pow (n : ℕ) : (X ^ n : R[X]).roots = n • ({0} : Multiset R)

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


@[simp]
theorem add_mem_centralizer [Distrib M] (ha : a ∈ centralizer S) (hb : b ∈ centralizer S) :
    a + b ∈ centralizer S

{M : Type u_1}
{S : Set M}
{a b : M}
[Distrib M]
(ha : a ∈ S.centralizer)
(hb : b ∈ S.centralizer)


lemma IsEquipartition.card_biUnion_offDiag_le' (hP : P.IsEquipartition) :
    ((P.parts.biUnion offDiag).card : 𝕜) ≤ A.card * (A.card + P.parts.card) / P.parts.card

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
[DecidableEq α]
{A : Finset α}
{P : Finpartition A}
(hP : P.IsEquipartition)

↑(P.parts.biUnion Finset.offDiag).card ≤ ↑A.card * (↑A.card + ↑P.parts.card) / ↑P.parts.card


/-- If `m` is a proper divisor of `n`, then `X ^ m - 1` divides
`∏ i ∈ Nat.properDivisors n, cyclotomic i R`. -/
theorem X_pow_sub_one_dvd_prod_cyclotomic (R : Type*) [CommRing R] {n m : ℕ} (hpos : 0 < n)
    (hm : m ∣ n) (hdiff : m ≠ n) : X ^ m - 1 ∣ ∏ i ∈ Nat.properDivisors n, cyclotomic i R

(R : Type u_1)
[CommRing R]
{n m : ℕ}
(hpos : 0 < n)
(hm : m ∣ n)
(hdiff : m ≠ n)

Polynomial.X ^ m - 1 ∣ ∏ i ∈ n.properDivisors, Polynomial.cyclotomic i R


@[simp]
theorem add_apply (Q Q' : QuadraticMap R M N) (x : M) : (Q + Q') x = Q x + Q' x

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(Q Q' : QuadraticMap R M N)
(x : M)


theorem Faithful.of_comp_eq {H : C ⥤ E} [ℋ : H.Faithful] (h : F ⋙ G = H) : F.Faithful

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{F : CategoryTheory.Functor C D}
{G : CategoryTheory.Functor D E}
{H : CategoryTheory.Functor C E}
[ℋ : H.Faithful]
(h : F.comp G = H)


/-- A point in `K` with the orthogonality property (here characterized in terms of `Kᗮ`) must be the
orthogonal projection. -/
theorem eq_orthogonalProjection_of_mem_orthogonal {u v : E} (hv : v ∈ K)
    (hvo : u - v ∈ Kᗮ) : (orthogonalProjection K u : E) = v

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{K : Submodule 𝕜 E}
[HasOrthogonalProjection K]
{u v : E}
(hv : v ∈ K)
(hvo : u - v ∈ Kᗮ)


lemma d₂_eq_zero' (i₁ : I₁) {i₂ i₂' : I₂} (h : c₂.Rel i₂ i₂') (i₁₂ : I₁₂)
    (h' : ComplexShape.π c₁ c₂ c₁₂ ⟨i₁, i₂'⟩ ≠ i₁₂) :
    K.d₂ c₁₂ i₁ i₂ i₁₂ = 0

{C : Type u_1}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Preadditive C]
{I₁ : Type u_2}
{I₂ : Type u_3}
{I₁₂ : Type u_4}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
(K : HomologicalComplex₂ C c₁ c₂)
(c₁₂ : ComplexShape I₁₂)
[DecidableEq I₁₂]
[TotalComplexShape c₁ c₂ c₁₂]
[K.HasTotal c₁₂]
(i₁ : I₁)
{i₂ i₂' : I₂}
(h : c₂.Rel i₂ i₂')
(i₁₂ : I₁₂)
(h' : c₁.π c₂ c₁₂ (i₁, i₂') ≠ i₁₂)


@[simp]
theorem cons_inter_of_neg {a} (s : Multiset α) {t} : a ∉ t → (a ::ₘ s) ∩ t = s ∩ t

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


theorem isEquiv_of_map_strictMono [LinearOrderedCommMonoidWithZero Γ₀]
    [LinearOrderedCommMonoidWithZero Γ'₀] [Ring R] {v : Valuation R Γ₀} (f : Γ₀ →*₀ Γ'₀)
    (H : StrictMono f) : IsEquiv (v.map f H.monotone) v

{R : Type u_3}
{Γ₀ : Type u_4}
{Γ'₀ : Type u_5}
[LinearOrderedCommMonoidWithZero Γ₀]
[LinearOrderedCommMonoidWithZero Γ'₀]
[Ring R]
{v : Valuation R Γ₀}
(f : Γ₀ →*₀ Γ'₀)
(H : StrictMono ⇑f)


theorem ext_iff {inst₁ inst₂ : CommSemiring R} :
    inst₁ = inst₂ ↔
      (local_hAdd[R, inst₁] = local_hAdd[R, inst₂]) ∧
      (local_hMul[R, inst₁] = local_hMul[R, inst₂])

{R : Type u}
{inst₁ inst₂ : CommSemiring R}

inst₁ = inst₂ ↔ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul


@[simp]
theorem fract_intCast (z : ℤ) : fract (z : α) = 0

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(z : ℤ)


theorem commutator_comm_le : ⁅H₁, H₂⁆ ≤ ⁅H₂, H₁⁆

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

⁅H₁, H₂⁆ ≤ ⁅H₂, H₁⁆


theorem isLUB_csSup (ne : s.Nonempty) (H : BddAbove s) : IsLUB s (sSup s)

{α : Type u_1}
[ConditionallyCompleteLattice α]
{s : Set α}
(ne : s.Nonempty)
(H : BddAbove s)


/-- If `f : M → N` is a submultiplicative function, `f (x * y) ≤ f x * f y`, `f 1 = 1`, and `g i`,
`i ∈ s`, is a finite family of elements of `M`, then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_of_subadditive]
theorem le_prod_of_submultiplicative (f : M → N) (h_one : f 1 = 1)
    (h_mul : ∀ x y, f (x * y) ≤ f x * f y) (s : Finset ι) (g : ι → M) :
    f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

(h_mul : ∀ (x y : M), f (x * y) ≤ f x * f y)


theorem le_total (f g : CauSeq α abs) : f ≤ g ∨ g ≤ f

{α : Type u_1}
[LinearOrderedField α]
(f g : CauSeq α abs)


@[reassoc (attr := simp)]
lemma inr_f_descShortComplex_f (n : ℤ) : (inr S.f).f n ≫ (descShortComplex S).f n = S.g.f n

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

(CochainComplex.mappingCone.inr S.f).f n ≫ (CochainComplex.mappingCone.descShortComplex S).f n = S.g.f n


@[simp]
theorem erase_zero (i : ι) : erase i (0 : Π₀ i, β i) = 0

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → Zero (β i)]
(i : ι)


theorem exp_nsmul (n : ℕ) (x : 𝔸) : exp 𝕂 (n • x) = exp 𝕂 x ^ n

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
[CompleteSpace 𝔸]
(n : ℕ)
(x : 𝔸)

NormedSpace.exp 𝕂 (n • x) = NormedSpace.exp 𝕂 x ^ n


/-- A fiberwise linear inverse to `e`. -/
@[simps!]
protected def symmₗ (e : Pretrivialization F (π F E)) [e.IsLinear R] (b : B) : F →ₗ[R] E b

(e : Pretrivialization F Bundle.TotalSpace.proj)

(Pretrivialization.symmₗ R e b) y = e.symm b y


@[ext]
protected theorem ext {p q : PMF α} (h : ∀ x, p x = q x) : p = q

{α : Type u_1}
{p q : PMF α}
(h : ∀ (x : α), p x = q x)


theorem hasGroupoid_inf_iff {G₁ G₂ : StructureGroupoid H} : HasGroupoid M (G₁ ⊓ G₂) ↔
    HasGroupoid M G₁ ∧ HasGroupoid M G₂

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{G₁ G₂ : StructureGroupoid H}


theorem mapRange_smul {_ : Monoid R} [AddMonoid M] [DistribMulAction R M] [AddMonoid N]
    [DistribMulAction R N] {f : M → N} {hf : f 0 = 0} (c : R) (v : α →₀ M)
    (hsmul : ∀ x, f (c • x) = c • f x) : mapRange f hf (c • v) = c • mapRange f hf v

{α : Type u_1}
{M : Type u_5}
{N : Type u_7}
{R : Type u_11}

∀ {x : Monoid R} [inst : AddMonoid M] [inst_1 : DistribMulAction R M] [inst_2 : AddMonoid N]
  [inst_3 : DistribMulAction R N] {f : M → N} {hf : f 0 = 0} (c : R) (v : α →₀ M),
  (∀ (x_1 : M), f (c • x_1) = c • f x_1) → Finsupp.mapRange f hf (c • v) = c • Finsupp.mapRange f hf v


theorem inf_lie : ⁅I ⊓ J, N⁆ ≤ ⁅I, N⁆ ⊓ ⁅J, N⁆

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


@[simp]
theorem natDegree_X_pow : natDegree ((X : R[X]) ^ n) = n

{R : Type u}
[Semiring R]
[Nontrivial R]
(n : ℕ)


@[simp]
theorem coe_mk (f : L₁ → L₂) (h₁ h₂ h₃) : ((⟨⟨⟨f, h₁⟩, h₂⟩, h₃⟩ : L₁ →ₗ⁅R⁆ L₂) : L₁ → L₂) = f

(h₁ : ∀ (x y : L₁), f (x + y) = f x + f y)

(h₂ :
  ∀ (m : R) (x : L₁),
    { toFun := f, map_add' := h₁ }.toFun (m • x) = (RingHom.id R) m • { toFun := f, map_add' := h₁ }.toFun x)

(h₃ :
  ∀ {x y : L₁},
    { toFun := f, map_add' := h₁, map_smul' := h₂ }.toFun ⁅x, y⁆ =
      ⁅{ toFun := f, map_add' := h₁, map_smul' := h₂ }.toFun x,
        { toFun := f, map_add' := h₁, map_smul' := h₂ }.toFun y⁆)

⇑{ toFun := f, map_add' := h₁, map_smul' := h₂, map_lie' := h₃ } = f


/-- De Morgan's law for boolean and -/
@[simp] theorem not_and : ∀ (x y : Bool), (!(x && y)) = (!x || !y)


/-- A slight generalisation of the **Marica-Schönheim Inequality**. -/
lemma Finset.le_card_diffs_mul_card_diffs (s t : Finset α) :
    s.card * t.card ≤ (s \\ t).card * (t \\ s).card

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


/-- The elliptic curve mapped over a ring homomorphism `φ : R →+* A`. -/
@[simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def map : EllipticCurve A

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


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

{M : Type u_1}
[AddMonoid M]
{a : M}
(h : IsAddUnit a)


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

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


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

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


theorem blimsup_eq_iInf_biSup {f : Filter β} {p : β → Prop} {u : β → α} :
    blimsup u f p = ⨅ s ∈ f, ⨆ (b) (_ : p b ∧ b ∈ s), u b

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : Filter β}
{p : β → Prop}
{u : β → α}

Filter.blimsup u f p = ⨅ s ∈ f, ⨆ b, ⨆ (_ : p b ∧ b ∈ s), u b


theorem eq_const_of_unique {β : Sort*} [Unique α] (f : α → β) : f = Function.const α (f default)

{α : Sort u_1}
{β : Sort u_2}
[Unique α]
(f : α → β)


@[simp] theorem homTensorHomMap_apply (f : M →ₗ[A] P) (g : N →ₗ[R] Q) :
    homTensorHomMap R A B M N P Q (f ⊗ₜ g) = map f g

{R : Type uR}
{A : Type uA}
{B : Type uB}
{M : Type uM}
{N : Type uN}
{P : Type uP}
{Q : Type uQ}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[Module B P]
[IsScalarTower R A P]
[IsScalarTower R B P]
[SMulCommClass A B P]
[AddCommMonoid Q]
[Module R Q]
(f : M →ₗ[A] P)
(g : N →ₗ[R] Q)

(TensorProduct.AlgebraTensorModule.homTensorHomMap R A B M N P Q) (f ⊗ₜ[R] g) =
  TensorProduct.AlgebraTensorModule.map f g


lemma pow_abs (a : α) (n : ℕ) : |a| ^ n = |a ^ n|

{α : Type u_1}
[LinearOrderedRing α]
(a : α)
(n : ℕ)


@[simp]
lemma self_mul_conjTranspose_eq_zero {A : Matrix m n R} : A * Aᴴ = 0 ↔ A = 0

{m : Type u_1}
{n : Type u_2}
{R : Type u_4}
[Fintype n]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
{A : Matrix m n R}


lemma singleObjApplyIsoOfEq_inv_single_map (j : J) {X Y : C} (f : X ⟶ Y) (i : J) (h : i = j) :
    (singleObjApplyIsoOfEq j X i h).inv ≫ (single j).map f i =
      f ≫ (singleObjApplyIsoOfEq j Y i h).inv

{J : Type u_1}
{C : Type u_2}
[CategoryTheory.Category.{u_3, u_2} C]
[CategoryTheory.Limits.HasInitial C]
[DecidableEq J]
(j : J)
{X Y : C}
(f : X ⟶ Y)
(i : J)
(h : i = j)

CategoryTheory.CategoryStruct.comp (CategoryTheory.GradedObject.singleObjApplyIsoOfEq j X i h).inv
    ((CategoryTheory.GradedObject.single j).map f i) =
  CategoryTheory.CategoryStruct.comp f (CategoryTheory.GradedObject.singleObjApplyIsoOfEq j Y i h).inv


@[simp] lemma support_div (f g : ι → G₀) : support (fun a ↦ f a / g a) = support f ∩ support g

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

(Function.support fun a => f a / g a) = Function.support f ∩ Function.support g


theorem rel_sequence {r : β → β → Prop} {f : α → β} (hf : Directed r f) (a : α) :
    r (f a) (f (hf.sequence f (encode a + 1)))

{α : Type u_1}
{β : Type u_2}
[Encodable α]
[Inhabited α]
{r : β → β → Prop}
{f : α → β}
(hf : Directed r f)
(a : α)

r (f a) (f (Directed.sequence f hf (Encodable.encode a + 1)))


@[to_additive (attr := simp)]
theorem mul_eq_one_iff : a * b = 1 ↔ a = 1 ∧ b = 1

{α : Type u}
[CanonicallyOrderedCommMonoid α]
{a b : α}


/-- `ContinuousMap.compStarAlgHom'` sends the identity continuous map to the identity
`StarAlgHom` -/
theorem compStarAlgHom'_id : compStarAlgHom' 𝕜 A (ContinuousMap.id X) = StarAlgHom.id 𝕜 C(X, A)

{X : Type u_1}
[TopologicalSpace X]
(𝕜 : Type u_4)
[CommSemiring 𝕜]
(A : Type u_5)
[TopologicalSpace A]
[Semiring A]
[TopologicalSemiring A]
[Star A]
[ContinuousStar A]
[Algebra 𝕜 A]

ContinuousMap.compStarAlgHom' 𝕜 A (ContinuousMap.id X) = StarAlgHom.id 𝕜 C(X, A)


theorem min_top_right [OrderTop α] (a : α) : min a ⊤ = a

{α : Type u}
[LinearOrder α]
[OrderTop α]
(a : α)


theorem comp_iff {r : α → Prop → Prop} : r ∘r (· ↔ ·) = r

(Relation.Comp r fun x x_1 => x ↔ x_1) = r


/-- Convex **Jensen's inequality**, `Finset.centerMass` version. -/
theorem ConvexOn.map_centerMass_le (hf : ConvexOn 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i)
    (h₁ : 0 < ∑ i ∈ t, w i) (hmem : ∀ i ∈ t, p i ∈ s) :
    f (t.centerMass w p) ≤ t.centerMass w (f ∘ p)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
{ι : Type u_5}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[OrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
{t : Finset ι}
{w : ι → 𝕜}
{p : ι → E}
(hf : ConvexOn 𝕜 s f)
(h₀ : ∀ i ∈ t, 0 ≤ w i)
(h₁ : 0 < ∑ i ∈ t, w i)
(hmem : ∀ i ∈ t, p i ∈ s)


theorem mul_inv' (u : G₀ˣ) : u * (u : G₀)⁻¹ = 1

{G₀ : Type u_3}
[GroupWithZero G₀]
(u : G₀ˣ)


@[to_additive]
protected theorem Filter.EventuallyEq.mulSupport [One β] {f g : α → β} {l : Filter α}
    (h : f =ᶠ[l] g) :
    Function.mulSupport f =ᶠ[l] Function.mulSupport g

{α : Type u_1}
{β : Type u_2}
[One β]
{f g : α → β}
{l : Filter α}
(h : f =ᶠ[l] g)


/-- The kernel of `g.unop` is the opposite of `cokernel g`. -/
@[simps!]
def kernelUnopOp : Opposite.op (kernel g.unop) ≅ cokernel g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
{A B : Cᵒᵖ}
(g : A ⟶ B)

(CategoryTheory.kernelUnopOp g).inv = CategoryTheory.Limits.cokernel.desc g (CategoryTheory.Limits.kernel.ι g.unop).op ⋯


@[to_additive (attr := simp)]
theorem inr_apply (y) : inr M N y = (1, y)

{M : Type u_5}
{N : Type u_6}
[AddZeroClass M]
[AddZeroClass N]
(y : N)


/-- A natural isomorphism `L₁ ≅ L₂` induces an equivalence of categories
    `Comma L₁ R ≌ Comma L₂ R`. -/
@[simps!]
def mapLeftIso (i : L₁ ≅ L₂) : Comma L₁ R ≌ Comma L₂ R

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(R : CategoryTheory.Functor B T)
{L₁ L₂ : CategoryTheory.Functor A T}
(i : L₁ ≅ L₂)

∀ {X Y : CategoryTheory.Comma L₁ R} (f : X ⟶ Y), ((CategoryTheory.Comma.mapLeftIso R i).functor.map f).right = f.right


theorem Ioo_subset_Ioc_union_Ioo : Ioo a c ⊆ Ioc a b ∪ Ioo b c

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


@[simp] theorem zero_divInt (n) : 0 /. n = 0


theorem upperSemicontinuous_ciInf {f : ι → α → δ'} (bdd : ∀ x, BddBelow (range fun i => f i x))
    (h : ∀ i, UpperSemicontinuous (f i)) : UpperSemicontinuous fun x' => ⨅ i, f i x'

{f : ι → α → δ'}

(bdd : ∀ (x : α), BddBelow (Set.range fun i => f i x))

(h : ∀ (i : ι), UpperSemicontinuous (f i))


/-- Translation in the domain does not change the derivative. -/
lemma deriv_comp_const_add {𝕜 : Type*} [NontriviallyNormedField 𝕜] (a x : 𝕜) {𝕜' : Type*}
    [NormedAddCommGroup 𝕜'] [NormedSpace 𝕜 𝕜'] {h : 𝕜 → 𝕜'}
    (hh : DifferentiableAt 𝕜 h (a + x)) :
    deriv (fun x ↦ h (a + x)) x = deriv h (a + x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
(a x : 𝕜)
{𝕜' : Type u_2}
[NormedAddCommGroup 𝕜']
[NormedSpace 𝕜 𝕜']
{h : 𝕜 → 𝕜'}
(hh : DifferentiableAt 𝕜 h (a + x))

deriv (fun x => h (a + x)) x = deriv h (a + x)


/-- Let `R` be a topological ring such that zero is not an isolated point (e.g., a nontrivially
normed field, see `NormedField.punctured_nhds_neBot`). Let `M` be a nontrivial module over `R`
such that `c • x = 0` implies `c = 0 ∨ x = 0`. Then `M` has no isolated points. We formulate this
using `NeBot (𝓝[≠] x)`.

This lemma is not an instance because Lean would need to find `[ContinuousSMul ?m_1 M]` with
unknown `?m_1`. We register this as an instance for `R = ℝ` in `Real.punctured_nhds_module_neBot`.
One can also use `haveI := Module.punctured_nhds_neBot R M` in a proof.
-/
theorem Module.punctured_nhds_neBot [Nontrivial M] [NeBot (𝓝[≠] (0 : R))] [NoZeroSMulDivisors R M]
    (x : M) : NeBot (𝓝[≠] x)

(R : Type u_1)
(M : Type u_2)
[Ring R]
[TopologicalSpace R]
[TopologicalSpace M]
[AddCommGroup M]
[ContinuousAdd M]
[Module R M]
[ContinuousSMul R M]
[Nontrivial M]
[(𝓝[≠] 0).NeBot]
[NoZeroSMulDivisors R M]
(x : M)


theorem IsSt.mul {x y : ℝ*} {r s : ℝ} (hxr : IsSt x r) (hys : IsSt y s) : IsSt (x * y) (r * s)

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


@[to_additive (attr := simp)]
theorem elim_one_mulSingle [DecidableEq α] [DecidableEq β] [One γ] (i : β) (c : γ) :
    Sum.elim (1 : α → γ) (Pi.mulSingle i c) = Pi.mulSingle (Sum.inr i) c

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq α]
[DecidableEq β]
[Zero γ]
(i : β)
(c : γ)

Sum.elim 0 (Pi.single i c) = Pi.single (Sum.inr i) c


theorem prefix_iff_eq_append : l₁ <+: l₂ ↔ l₁ ++ drop (length l₁) l₂ = l₂

l₁ <+: l₂ ↔ l₁ ++ List.drop l₁.length l₂ = l₂


theorem getElem_insertNth_add_succ (l : List α) (x : α) (n k : ℕ) (hk' : n + k < l.length)
    (hk : n + k + 1 < (insertNth n x l).length := (by
      rwa [length_insertNth _ _ (by omega), Nat.succ_lt_succ_iff])) :
    (insertNth n x l)[n + k + 1] = l[n + k]

(hk : n + k + 1 < (List.insertNth n x l).length := ⋯)

(List.insertNth n x l)[n + k + 1] = l[n + k]


@[aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_adjoin (s : Set A) : s ⊆ adjoin R s

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


@[reassoc]
theorem whiskerRight_comp_symm {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c) (h : c ⟶ d) :
    η ▷ g ▷ h = (α_ f g h).hom ≫ η ▷ (g ≫ h) ≫ (α_ f' g h).inv

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c d : B}
{f f' : a ⟶ b}
(η : f ⟶ f')
(g : b ⟶ c)
(h : c ⟶ d)

CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.whiskerRight η g) h =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator f g h).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.whiskerRight η (CategoryTheory.CategoryStruct.comp g h))
      (CategoryTheory.Bicategory.associator f' g h).inv)


/-- Given a closed nonempty subset `s` of `Π (n : ℕ), E n`, there exists a Lipschitz retraction
onto this set, i.e., a Lipschitz map with range equal to `s`, equal to the identity on `s`. -/
theorem exists_lipschitz_retraction_of_isClosed {s : Set (∀ n, E n)} (hs : IsClosed s)
    (hne : s.Nonempty) :
    ∃ f : (∀ n, E n) → ∀ n, E n, (∀ x ∈ s, f x = x) ∧ range f = s ∧ LipschitzWith 1 f

{E : ℕ → Type u_1}
[(n : ℕ) → TopologicalSpace (E n)]
[∀ (n : ℕ), DiscreteTopology (E n)]
{s : Set ((n : ℕ) → E n)}
(hs : IsClosed s)
(hne : s.Nonempty)

∃ f, (∀ x ∈ s, f x = x) ∧ Set.range f = s ∧ LipschitzWith 1 f


@[to_additive]
theorem range_subset_insert_image_mulSupport (f : α → M) :
    range f ⊆ insert 1 (f '' mulSupport f)

{α : Type u_1}
{M : Type u_5}
[One M]
(f : α → M)

Set.range f ⊆ insert 1 (f '' Function.mulSupport f)


theorem filter_eq_bot_of_isEmpty [IsEmpty α] (f : Filter α) : f = ⊥


@[simp]
theorem stalkToFiberRingHom_germ (U : Opens (PrimeSpectrum.Top R)) (x : U)
    (s : (structureSheaf R).1.obj (op U)) :
    stalkToFiberRingHom R x ((structureSheaf R).presheaf.germ x s) = s.1 x

(U : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

(s : ↑((AlgebraicGeometry.Spec.structureSheaf R).val.obj (Opposite.op U)))

(AlgebraicGeometry.StructureSheaf.stalkToFiberRingHom R ↑x)
    (((AlgebraicGeometry.Spec.structureSheaf R).presheaf.germ x) s) =
  ↑s x


@[simp]
theorem WalkingPair.equivBool_apply_left : WalkingPair.equivBool left = true

CategoryTheory.Limits.WalkingPair.equivBool CategoryTheory.Limits.WalkingPair.left = true


theorem isRegular_compl (a : α) : IsRegular aᶜ

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


/-- Symmetric entourages form a basis of `𝓤 α` -/
theorem UniformSpace.hasBasis_symmetric :
    (𝓤 α).HasBasis (fun s : Set (α × α) => s ∈ 𝓤 α ∧ SymmetricRel s) id

(𝓤 α).HasBasis (fun s => s ∈ 𝓤 α ∧ SymmetricRel s) id


/-- When `E` is a topological module over a topological ring `R`, the class `SeparatingDual R E`
registers that continuous linear forms on `E` separate points of `E`. -/
@[mk_iff separatingDual_def]
class SeparatingDual (R V : Type*) [Ring R] [AddCommGroup V] [TopologicalSpace V]
    [TopologicalSpace R] [Module R V] : Prop :=
  /-- Any nonzero vector can be mapped by a continuous linear map to a nonzero scalar. -/
  exists_ne_zero' : ∀ (x : V), x ≠ 0 → ∃ f : V →L[R] R, f x ≠ 0

(R : Type u_1)
(V : Type u_2)
[Ring R]
[AddCommGroup V]
[TopologicalSpace V]
[TopologicalSpace R]
[Module R V]

SeparatingDual R V ↔ ∀ (x : V), x ≠ 0 → ∃ f, f x ≠ 0


theorem one_le_inv₀ (ha : a ≠ 0) : 1 ≤ a⁻¹ ↔ a ≤ 1

{α : Type u_1}
[LinearOrderedCommGroupWithZero α]
{a : α}
(ha : a ≠ 0)

1 ≤ a⁻¹ ↔ a ≤ 1


theorem mem_disjSum : x ∈ s.disjSum t ↔ (∃ a, a ∈ s ∧ inl a = x) ∨ ∃ b, b ∈ t ∧ inr b = x

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : Finset β}
{x : α ⊕ β}

x ∈ s.disjSum t ↔ (∃ a ∈ s, Sum.inl a = x) ∨ ∃ b ∈ t, Sum.inr b = x


/-- A graph isomorphism induces an equivalence of neighbor sets. -/
@[simps]
def mapNeighborSet (v : V) : G.neighborSet v ≃ G'.neighborSet (f v)

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G ≃g G')
(v : V)
(w : ↑(G.neighborSet v))


/-- Given an element `a : A` of an `S`-algebra, where `S` is itself an `R`-algebra, we say that
the spectrum of `a` restricts via a function `f : S → R` if `f` is a left inverse of
`algebraMap R S`, and `f` is a right inverse of `algebraMap R S` on `spectrum S a`.

For example, when `f = Complex.re` (so `S := ℂ` and `R := ℝ`), `SpectrumRestricts a f` means that
the `ℂ`-spectrum of `a` is contained within `ℝ`. This arises naturally when `a` is selfadjoint
and `A` is a C⋆-algebra.

This is the property allows us to restrict a continuous functional calculus over `S` to a
continuous functional calculus over `R`. -/
structure QuasispectrumRestricts
    {R S A : Type*} [CommSemiring R] [CommSemiring S] [NonUnitalRing A]
    [Module R A] [Module S A] [Algebra R S] (a : A) (f : S → R) : Prop where
  /-- `f` is a right inverse of `algebraMap R S` when restricted to `quasispectrum S a`. -/
  rightInvOn : (quasispectrum S a).RightInvOn f (algebraMap R S)
  /-- `f` is a left inverse of `algebraMap R S`. -/
  left_inv : Function.LeftInverse f (algebraMap R S)

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[CommSemiring R]
[CommSemiring S]
[NonUnitalRing A]
[Module R A]
[Module S A]
[Algebra R S]
{a : A}
{f : S → R}
(self : QuasispectrumRestricts a f)

Set.RightInvOn f (⇑(algebraMap R S)) (quasispectrum S a)


theorem DifferentiableOn.exp (hc : DifferentiableOn ℝ f s) :
    DifferentiableOn ℝ (fun x => Real.exp (f x)) s

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


theorem lub_Iio_eq_self_or_Iio_eq_Iic [PartialOrder γ] {j : γ} (i : γ) (hj : IsLUB (Iio i) j) :
    j = i ∨ Iio i = Iic j

{γ : Type w}
[PartialOrder γ]
{j : γ}
(i : γ)
(hj : IsLUB (Set.Iio i) j)


/-- If a function has a non-zero strict derivative at all points, then it is an open map. -/
theorem isOpenMap_of_hasStrictDerivAt {f' : 𝕜 → 𝕜}
    (hf : ∀ x, HasStrictDerivAt f (f' x) x) (h0 : ∀ x, f' x ≠ 0) : IsOpenMap f

(hf : ∀ (x : 𝕜), HasStrictDerivAt f (f' x) x)


theorem lcm_dvd_lcm_mul_right_right [GCDMonoid α] (m n k : α) : lcm m n ∣ lcm m (n * k)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(m n k : α)


@[simp]
theorem reindex_trans {l₂ o₂ : Type*} (eₘ : m ≃ l) (eₙ : n ≃ o) (eₘ₂ : l ≃ l₂) (eₙ₂ : o ≃ o₂) :
    (reindex eₘ eₙ).trans (reindex eₘ₂ eₙ₂) =
      (reindex (eₘ.trans eₘ₂) (eₙ.trans eₙ₂) : Matrix m n α ≃ _)

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
{l₂ : Type u_10}
{o₂ : Type u_11}
(eₘ : m ≃ l)
(eₙ : n ≃ o)
(eₘ₂ : l ≃ l₂)
(eₙ₂ : o ≃ o₂)

(Matrix.reindex eₘ eₙ).trans (Matrix.reindex eₘ₂ eₙ₂) = Matrix.reindex (eₘ.trans eₘ₂) (eₙ.trans eₙ₂)


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

{succ : (n : Nat) → (i : Fin n) → motive n i → motive n.succ i.succ}


@[to_additive Filter.HasBasis.cobounded_of_norm]
lemma Filter.HasBasis.cobounded_of_norm' {ι : Sort*} {p : ι → Prop} {s : ι → Set ℝ}
    (h : HasBasis atTop p s) : HasBasis (cobounded E) p fun i ↦ norm ⁻¹' s i

{E : Type u_3}
[SeminormedGroup E]
{ι : Sort u_6}
{p : ι → Prop}
{s : ι → Set ℝ}
(h : Filter.atTop.HasBasis p s)

(Bornology.cobounded E).HasBasis p fun i => norm ⁻¹' s i


@[reassoc (attr := simp)]
theorem diagonalObjPullbackFstIso_inv_fst_snd {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) :
    (diagonalObjPullbackFstIso f g).inv ≫ pullback.fst _ _ ≫ pullback.snd _ _ =
      pullback.fst _ _ ≫ pullback.fst _ _

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

(CategoryTheory.Limits.diagonalObjPullbackFstIso f g).inv ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.fst f g)
        (CategoryTheory.Limits.pullback.fst f g) ≫
      CategoryTheory.Limits.pullback.snd f g =
  CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.snd g g ≫ g) f ≫
    CategoryTheory.Limits.pullback.fst g g


theorem EqOn.congr_antitoneOn (h : s.EqOn f₁ f₂) : AntitoneOn f₁ s ↔ AntitoneOn f₂ s

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


@[to_additive]
theorem pure_bind (f : α → FreeGroup β) (x) : pure x >>= f = f x

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


@[simp]
lemma preimage_coe_Ico_top (x : ℝ) : Real.toEReal ⁻¹' Ico x ⊤ = Ici x

Real.toEReal ⁻¹' Set.Ico ↑x ⊤ = Set.Ici x


protected theorem lt_succ {r : α → α → Prop} (wf : WellFounded r) {x : α} (h : ∃ y, r x y) :
    r x (wf.succ x)

{α : Type u_1}
{r : α → α → Prop}
(wf : WellFounded r)
{x : α}
(h : ∃ y, r x y)


lemma Triangle.isIso_of_isIsos {A B : Triangle C} (f : A ⟶ B)
    (h₁ : IsIso f.hom₁) (h₂ : IsIso f.hom₂) (h₃ : IsIso f.hom₃) : IsIso f

{A B : CategoryTheory.Pretriangulated.Triangle C}


@[simp] theorem negSucc_not_pos (n : Nat) : 0 < -[n+1] ↔ False


/-- The natural transformation `π₁ ⟶ π₂` induced by `S.f` for all `S : ShortComplex C`. -/
@[simps] def π₁Toπ₂ : (π₁ : _ ⥤ C) ⟶ π₂

CategoryTheory.ShortComplex.π₁Toπ₂.app S = S.f


theorem inl_mul_eq_smul [Semiring R] [AddCommMonoid M] [Module R M] [Module Rᵐᵒᵖ M]
    (r : R) (x : tsze R M) :
    inl r * x = r •> x

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[Module Rᵐᵒᵖ M]
(r : R)
(x : tsze R M)


theorem Subtype.irreducibleSpace (h : IsIrreducible s) : IrreducibleSpace s

{X : Type u_1}
[TopologicalSpace X]
{s : Set X}
(h : IsIrreducible s)


theorem not_isSome_iff_eq_none : ¬o.isSome ↔ o = none

∀ {α : Type u_1} {o : Option α}, ¬o.isSome = true ↔ o = none


theorem mem_union_left (t : Finset α) (h : a ∈ s) : a ∈ s ∪ t

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


/-- If `S` is a sub-`R`-algebra of `A` and `S` is finitely-generated as an `R`-module,
  then all elements of `S` are integral over `R`. -/
theorem IsIntegral.of_mem_of_fg {A} [Ring A] [Algebra R A] (S : Subalgebra R A)
    (HS : S.toSubmodule.FG) (x : A) (hx : x ∈ S) : IsIntegral R x

{R : Type u_1}
[CommRing R]
{A : Type u_5}
[Ring A]
[Algebra R A]
(S : Subalgebra R A)
(HS : (Subalgebra.toSubmodule S).FG)
(x : A)
(hx : x ∈ S)


@[simp]
theorem compl_diagonal_mem_prod {l₁ l₂ : Filter α} : (diagonal α)ᶜ ∈ l₁ ×ˢ l₂ ↔ Disjoint l₁ l₂

(Set.diagonal α)ᶜ ∈ l₁ ×ˢ l₂ ↔ Disjoint l₁ l₂


theorem moveRight_nim {o : Ordinal} (i) : (nim o).moveRight (toRightMovesNim i) = nim i

(SetTheory.PGame.nim o).moveRight (SetTheory.PGame.toRightMovesNim i) = SetTheory.PGame.nim ↑i


theorem IsOpen.strictConvex_iff (h : IsOpen s) : StrictConvex 𝕜 s ↔ Convex 𝕜 s

{𝕜 : Type u_1}
{E : Type u_3}
[OrderedSemiring 𝕜]
[TopologicalSpace E]
[AddCommMonoid E]
[Module 𝕜 E]
{s : Set E}
(h : IsOpen s)


theorem compl_setOf {α} (p : α → Prop) : { a | p a }ᶜ = { a | ¬p a }


theorem gcd_ne_zero_of_right (hp : q ≠ 0) : GCDMonoid.gcd p q ≠ 0

{R : Type u_1}
[EuclideanDomain R]
[GCDMonoid R]
{p q : R}
(hp : q ≠ 0)


/-- **First moment method**. An integrable function is smaller than its mean on a set of positive
measure. -/
theorem measure_le_setAverage_pos (hμ : μ s ≠ 0) (hμ₁ : μ s ≠ ∞) (hf : IntegrableOn f s μ) :
    0 < μ ({x ∈ s | f x ≤ ⨍ a in s, f a ∂μ})

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{f : α → ℝ}
(hμ : μ s ≠ 0)
(hμ₁ : μ s ≠ ⊤)
(hf : MeasureTheory.IntegrableOn f s μ)

0 < μ {x | x ∈ s ∧ f x ≤ ⨍ (a : α) in s, f a ∂μ}


theorem IsMaxOn.bicomp_mono [Preorder δ] {op : β → γ → δ}
    (hop : ((· ≤ ·) ⇒ (· ≤ ·) ⇒ (· ≤ ·)) op op) (hf : IsMaxOn f s a) {g : α → γ}
    (hg : IsMaxOn g s a) : IsMaxOn (fun x => op (f x) (g x)) s a

{op : β → γ → δ}

(hop : ((fun x x_1 => x ≤ x_1) ⇒ (fun x x_1 => x ≤ x_1) ⇒ fun x x_1 => x ≤ x_1) op op)


@[to_additive]
theorem image_smul_product : ((s ×ˢ t).image fun x : α × β => x.fst • x.snd) = s • t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[SMul α β]
{s : Finset α}
{t : Finset β}

Finset.image (fun x => x.1 • x.2) (s ×ˢ t) = s • t


(A : SimplicialObject.Splitting.IndexSet Δ)


/-- The composition of `C^n` functions on domains is `C^n`. -/
theorem ContDiffOn.comp' {s : Set E} {t : Set F} {g : F → G} {f : E → F} (hg : ContDiffOn 𝕜 n g t)
    (hf : ContDiffOn 𝕜 n f s) : ContDiffOn 𝕜 n (g ∘ f) (s ∩ f ⁻¹' t)

{𝕜 : 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]
{n : ℕ∞}
{s : Set E}
{t : Set F}
{g : F → G}
{f : E → F}
(hg : ContDiffOn 𝕜 n g t)
(hf : ContDiffOn 𝕜 n f s)


@[rclike_simps] -- porting note (#10618): was `simp`
theorem normSq_inv (z : K) : normSq z⁻¹ = (normSq z)⁻¹


@[simp] lemma supClosed (L : Sublattice α) : SupClosed (L : Set α)

{α : Type u_2}
[Lattice α]
(L : Sublattice α)


lemma sub_mem {x y} (hx : x ∈ I) (hy : y ∈ I) : x - y ∈ I

{R : Type u_1}
[NonUnitalNonAssocRing R]
(I : TwoSidedIdeal R)
{x y : R}
(hx : x ∈ I)
(hy : y ∈ I)


theorem Continuous.integrableAt_nhds [TopologicalSpace α] [SecondCountableTopologyEither α E]
    [OpensMeasurableSpace α] {μ : Measure α} [IsLocallyFiniteMeasure μ] {f : α → E}
    (hf : Continuous f) (a : α) : IntegrableAtFilter f (𝓝 a) μ

MeasureTheory.IntegrableAtFilter f (𝓝 a) μ


theorem StrictAntiOn.comp [Preorder α] [Preorder β] [Preorder γ] {g : β → γ} {f : α → β} {s : Set α}
    {t : Set β} (hg : StrictAntiOn g t) (hf : StrictAntiOn f s) (hs : Set.MapsTo f s t) :
    StrictMonoOn (g ∘ f) s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Preorder α]
[Preorder β]
[Preorder γ]
{g : β → γ}
{f : α → β}
{s : Set α}
{t : Set β}
(hg : StrictAntiOn g t)
(hf : StrictAntiOn f s)
(hs : Set.MapsTo f s t)


@[simp]
theorem bddAbove_image (e : α ≃o β) {s : Set α} : BddAbove (e '' s) ↔ BddAbove s

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
(e : α ≃o β)
{s : Set α}


/-- The equivalence of categories `(C ⥤ Karoubi D) ≌ (Karoubi C ⥤ Karoubi D)`. -/
@[simps]
def karoubiUniversal₁ : C ⥤ Karoubi D ≌ Karoubi C ⥤ Karoubi D

(C : Type u_1)
(D : Type u_2)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]

(CategoryTheory.Idempotents.karoubiUniversal₁ C D).functor = CategoryTheory.Idempotents.functorExtension₁ C D


theorem get?_mem {s : WSeq α} {a n} : some a ∈ get? s n → a ∈ s

{α : Type u}
{s : Stream'.WSeq α}
{a : α}
{n : ℕ}


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

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


/-- Rescaling a set by a factor `r` multiplies its measure by `abs (r ^ dim)`. -/
@[simp]
theorem addHaar_smul (r : ℝ) (s : Set E) :
    μ (r • s) = ENNReal.ofReal (abs (r ^ finrank ℝ E)) * μ s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[MeasurableSpace E]
[BorelSpace E]
[FiniteDimensional ℝ E]
(μ : MeasureTheory.Measure E)
[μ.IsAddHaarMeasure]
(r : ℝ)
(s : Set E)

μ (r • s) = ENNReal.ofReal |r ^ FiniteDimensional.finrank ℝ E| * μ s


theorem Metric.uniformity_eq_comap_nhds_zero :
    𝓤 α = comap (fun p : α × α => dist p.1 p.2) (𝓝 (0 : ℝ))

𝓤 α = Filter.comap (fun p => dist p.1 p.2) (𝓝 0)


theorem card_Icc : (Icc a b).card = if h : a.1 = b.1 then (Icc (h.rec a.2) b.2).card else 0

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → Preorder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(a b : (i : ι) × α i)

(Finset.Icc a b).card = if h : a.fst = b.fst then (Finset.Icc (h ▸ a.snd) b.snd).card else 0


theorem eq_of_nhds_neBot [T2Space X] {x y : X} (h : NeBot (𝓝 x ⊓ 𝓝 y)) : x = y

{X : Type u_1}
[TopologicalSpace X]
[T2Space X]
{x y : X}
(h : (𝓝 x ⊓ 𝓝 y).NeBot)


@[to_additive]
protected lemma inv_mul_eq_one (h : IsUnit a) : a⁻¹ * b = 1 ↔ a = b

{α : Type u}
[DivisionMonoid α]
{a b : α}
(h : IsUnit a)


theorem continuous_sSup_rng {t₁ : TopologicalSpace α} {t₂ : Set (TopologicalSpace β)}
    {t : TopologicalSpace β} (h₁ : t ∈ t₂) (hf : Continuous[t₁, t] f) :
    Continuous[t₁, sSup t₂] f

{α : Type u}
{β : Type v}
{f : α → β}
{t₁ : TopologicalSpace α}
{t₂ : Set (TopologicalSpace β)}
{t : TopologicalSpace β}
(h₁ : t ∈ t₂)
(hf : Continuous f)


@[simp] theorem getLsb_extract (hi lo : Nat) (x : BitVec n) (i : Nat) :
    getLsb (extractLsb hi lo x) i = (i ≤ (hi-lo) && getLsb x (lo+i))

{n : Nat}
(hi lo : Nat)
(x : BitVec n)
(i : Nat)

(BitVec.extractLsb hi lo x).getLsb i = (decide (i ≤ hi - lo) && x.getLsb (lo + i))


@[to_additive]
theorem Group.rank_congr [Group.FG G] [Group.FG G'] (f : G ≃* G') : Group.rank G = Group.rank G'

{G : Type u_3}
[AddGroup G]
{G' : Type u_5}
[AddGroup G']
[AddGroup.FG G]
[AddGroup.FG G']
(f : G ≃+ G')


@[simp]
theorem _root_.aemeasurable_union_iff {s t : Set α} :
    AEMeasurable f (μ.restrict (s ∪ t)) ↔
      AEMeasurable f (μ.restrict s) ∧ AEMeasurable f (μ.restrict t)

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
{s t : Set α}


@[simp] theorem isPrefixOf_nil_left [BEq α] : isPrefixOf ([] : List α) l = true


/-- A substructure of a structure `M` is a set closed under application of function symbols. -/
structure Substructure where
  carrier : Set M
  fun_mem : ∀ {n}, ∀ f : L.Functions n, ClosedUnder f carrier

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
(self : L.Substructure M)
{n : ℕ}
(f : L.Functions n)


theorem ι_normNoninc : (ι f g).NormNoninc

{V : Type u_1}
{W : Type u_2}
[SeminormedAddCommGroup V]
[SeminormedAddCommGroup W]
{f g : NormedAddGroupHom V W}


theorem eq_zero_or_opow_omega_le_of_mul_eq_right {a b : Ordinal} (hab : a * b = b) :
    b = 0 ∨ (a^omega.{u}) ≤ b


theorem card_sigma : #(Σn, L.Term (α ⊕ (Fin n))) = max ℵ₀ #(α ⊕ (Σi, L.Functions i))

Cardinal.mk ((n : ℕ) × L.Term (α ⊕ Fin n)) = max Cardinal.aleph0 (Cardinal.mk (α ⊕ (i : ℕ) × L.Functions i))


@[to_additive]
theorem card_pow_eq_card_pow_card_univ [∀ k : ℕ, DecidablePred (· ∈ S ^ k)] :
    ∀ k, Fintype.card G ≤ k → Fintype.card (↥(S ^ k)) = Fintype.card (↥(S ^ Fintype.card G))

[(k : ℕ) → DecidablePred fun x => x ∈ k • S]

Fintype.card G ≤ k → Fintype.card ↑(k • S) = Fintype.card ↑(Fintype.card G • S)


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

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


@[reassoc (attr := simp)]
lemma pushforwardPullbackAdjunction_unit_pullback_map_germToPullbackStalk
    (f : X ⟶ Y) (F : Y.Presheaf C) (U : Opens X) (x : U) (V : Opens Y)
    (hV : U ≤ (Opens.map f).obj V) :
    ((pushforwardPullbackAdjunction C f).unit.app F).app (op V) ≫
      ((pullback C f).obj F).map (homOfLE hV).op ≫ germToPullbackStalk C f F U x =
        F.germ ⟨f x, hV x.2⟩

(hV : U ≤ (TopologicalSpace.Opens.map f).obj V)

((TopCat.Presheaf.pushforwardPullbackAdjunction C f).unit.app F).app (Opposite.op V) ≫
    ((TopCat.Presheaf.pullback C f).obj F).map (CategoryTheory.homOfLE hV).op ≫
      TopCat.Presheaf.germToPullbackStalk C f F U x =
  F.germ ⟨f ↑x, ⋯⟩


theorem map_int_add [AddCommGroupWithOne G] [AddGroupWithOne H] [AddConstMapClass F G H 1 1]
    (f : F) (n : ℤ) (x : G) : f (↑n + x) = f x + n

{F : Type u_1}
{G : Type u_2}
{H : Type u_3}
[FunLike F G H]
[AddCommGroupWithOne G]
[AddGroupWithOne H]
[AddConstMapClass F G H 1 1]
(f : F)
(n : ℤ)
(x : G)


theorem CovBy.unique_right (hb : a ⋖ b) (hc : a ⋖ c) : b = c

{α : Type u_1}
[LinearOrder α]
{a b c : α}
(hb : a ⋖ b)
(hc : a ⋖ c)


/-- In finite dimensions, over an algebraically closed field, every linear endomorphism has an
eigenvalue. -/
theorem exists_eigenvalue [IsAlgClosed K] [FiniteDimensional K V] [Nontrivial V] (f : End K V) :
    ∃ c : K, f.HasEigenvalue c

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
[IsAlgClosed K]
[FiniteDimensional K V]
[Nontrivial V]
(f : Module.End K V)


@[simp, norm_cast]
theorem coe_finset_inf (f : ι → Closeds α) (s : Finset ι) :
    (↑(s.inf f) : Set α) = s.inf ((↑) ∘ f)

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


@[simp]
theorem succ_singleton {n : ℕ} : Ico n (n + 1) = [n]


/-- The image under a monoid hom of the submonoid generated by a set equals the submonoid generated
    by the image of the set. -/
@[to_additive
      "The image under an `AddMonoid` hom of the `AddSubmonoid` generated by a set equals
      the `AddSubmonoid` generated by the image of the set."]
theorem map_mclosure (f : F) (s : Set M) : (closure s).map f = closure (f '' s)

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_5}
[FunLike F M N]
[mc : MonoidHomClass F M N]
(f : F)
(s : Set M)

Submonoid.map f (Submonoid.closure s) = Submonoid.closure (⇑f '' s)


@[simp]
theorem contMDiffAt_transDiffeomorph_right {f : M' → M} {x} :
    ContMDiffAt I' (I.transDiffeomorph e) n f x ↔ ContMDiffAt I' I n f x

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


theorem DifferentiableAt.const_cpow (hf : DifferentiableAt ℂ f x) (h0 : c ≠ 0 ∨ f x ≠ 0) :
    DifferentiableAt ℂ (fun x => c ^ f x) x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{x : E}
{c : ℂ}
(hf : DifferentiableAt ℂ f x)
(h0 : c ≠ 0 ∨ f x ≠ 0)


theorem exists_lt_of_lt_ciSup' {f : ι → α} {a : α} (h : a < ⨆ i, f i) : ∃ i, a < f i

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLinearOrderBot α]
{f : ι → α}
{a : α}
(h : a < ⨆ i, f i)


/-- Contravariantly associated to each functor `J ⥤ C`, we have the `C`-copresheaf consisting of
cocones with a given cocone point.
-/
@[simps!]
def cocones : (J ⥤ C)ᵒᵖ ⥤ C ⥤ Type max u₁ v₃

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

∀ {X Y : (J ⥤ C)ᵒᵖ} (f : X ⟶ Y) (X_1 : C)
  (a : (CategoryTheory.coyoneda.obj X).obj ((CategoryTheory.Functor.const J).obj X_1)) (X_2 : J),
  (((CategoryTheory.cocones J C).map f).app X_1 a).app X_2 = f.unop.app X_2 ≫ a.app X_2


theorem unbounded_le_inter_lt [LinearOrder α] (a : α) :
    Unbounded (· ≤ ·) (s ∩ { b | a < b }) ↔ Unbounded (· ≤ ·) s

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

Set.Unbounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a < b}) ↔ Set.Unbounded (fun x x_1 => x ≤ x_1) s


private theorem adF_of_eq_eq_zero (i : B) (h : A i i = 2) : adF R A ⟨i, i⟩ = 0

(R : Type u)
{B : Type v}
[CommRing R]
(A : Matrix B B ℤ)
(i : B)
(h : A i i = 2)

CartanMatrix.Relations.adF R A (i, i) = 0


theorem le_orthogonal_orthogonal (b : B.IsRefl) : N ≤ B.orthogonal (B.orthogonal N)

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
{N : Submodule R M}
(b : B.IsRefl)


@[simp]
theorem ForgetEnrichment.of_to (X : ForgetEnrichment W C) :
    ForgetEnrichment.of W (ForgetEnrichment.to W X) = X

(X : CategoryTheory.ForgetEnrichment W C)

CategoryTheory.ForgetEnrichment.of W (CategoryTheory.ForgetEnrichment.to W X) = X


@[simp] lemma coe_toBotHom (f : SupBotHom α β) : ⇑f.toBotHom = f

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


/--
The analogue of `Quot.sound`: If `a` and `b` are related by the equivalence relation,
then they have equal equivalence classes.
-/
theorem sound {α : Sort u} {s : Setoid α} {a b : α} : a ≈ b → Quotient.mk s a = Quotient.mk s b


/-- If `μ` is a finite measure and the indicators of measurable sets `Aᵢ` tend pointwise
almost everywhere to the indicator of a measurable set `A`, then the measures `μ Aᵢ` tend to
the measure `μ A`. -/
lemma tendsto_measure_of_ae_tendsto_indicator_of_isFiniteMeasure [IsCountablyGenerated L]
    {μ : Measure α} [IsFiniteMeasure μ] (A_mble : MeasurableSet A)
    (As_mble : ∀ i, MeasurableSet (As i)) (h_lim : ∀ᵐ x ∂μ, ∀ᶠ i in L, x ∈ As i ↔ x ∈ A) :
    Tendsto (fun i ↦ μ (As i)) L (𝓝 (μ A))

(As_mble : ∀ (i : ι), MeasurableSet (As i))

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

Filter.Tendsto (fun i => μ (As i)) L (𝓝 (μ A))


@[simp]
theorem inf_eq_inter : (Inf.inf : Finset α → Finset α → Finset α) = Inter.inter


theorem eq_of_prime_pow_eq' (hp₁ : Prime p₁) (hp₂ : Prime p₂) (hk₁ : 0 < k₂)
    (h : p₁ ^ k₁ = p₂ ^ k₂) : p₁ = p₂

{R : Type u_5}
[CancelCommMonoidWithZero R]
[Unique Rˣ]
{p₁ p₂ : R}
{k₁ k₂ : ℕ}
(hp₁ : Prime p₁)
(hp₂ : Prime p₂)
(hk₁ : 0 < k₂)
(h : p₁ ^ k₁ = p₂ ^ k₂)


theorem inclusion.coe_eq (s : SubMulAction M α) :
    ⇑s.inclusion = Subtype.val

{M : Type u_1}
{α : Type u_2}
[Monoid M]
[MulAction M α]
(s : SubMulAction M α)


theorem nonempty_of_not_bddAbove [ha : Nonempty α] (h : ¬BddAbove s) : s.Nonempty

{α : Type u}
[Preorder α]
{s : Set α}
[ha : Nonempty α]
(h : ¬BddAbove s)


@[simp]
theorem equiv_trans (f : α ≃ₜ β) (g : β ≃ₜ γ) :
    Compacts.equiv (f.trans g) = (Compacts.equiv f).trans (Compacts.equiv g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
(f : α ≃ₜ β)
(g : β ≃ₜ γ)

TopologicalSpace.Compacts.equiv (f.trans g) =
  (TopologicalSpace.Compacts.equiv f).trans (TopologicalSpace.Compacts.equiv g)


theorem mul_mem_mul {r s} (hr : r ∈ I) (hs : s ∈ J) : r * s ∈ I * J

{R : Type u}
[CommSemiring R]
{I J : Ideal R}
{r s : R}
(hr : r ∈ I)
(hs : s ∈ J)


protected theorem le_of_not_le {a b : Nat} (h : ¬ b ≤ a) : a ≤ b


@[simp]
theorem mul_integral_comp_mul_left : (c * ∫ x in a..b, f (c * x)) = ∫ x in c * a..c * b, f x

c * ∫ (x : ℝ) in a..b, f (c * x) = ∫ (x : ℝ) in c * a..c * b, f x


theorem findIdx_get {xs : List α} {w : xs.findIdx p < xs.length} :
    p (xs.get ⟨xs.findIdx p, w⟩)

{α : Type u_1}
{p : α → Bool}
{xs : List α}
{w : List.findIdx p xs < xs.length}

p (xs.get ⟨List.findIdx p xs, w⟩) = true


theorem GHSpace.toGHSpace_rep (p : GHSpace) : toGHSpace p.Rep = p


/-- The embedding `α → FreeSemigroup α`. -/
@[to_additive (attr := simps) "The embedding `α → FreeAddSemigroup α`."]
def of (x : α) : FreeSemigroup α


@[simp]
theorem inv_right_iff₀ : Commute a b⁻¹ ↔ Commute a b

{G₀ : Type u_3}
[GroupWithZero G₀]
{a b : G₀}


theorem neg_eq_neg_one_mul (a : α) : -a = -1 * a

{α : Type u}
[MulOneClass α]
[HasDistribNeg α]
(a : α)


theorem right_assoc' :
    (_ ◁ T.mul) ≫ actRight P Q =
      (α_ _ T.X T.X).inv ≫ (actRight P Q ▷ T.X) ≫ actRight P Q

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

Bimod.TensorBimod.X P Q ◁ T.mul ≫ Bimod.TensorBimod.actRight P Q =
  (α_ (Bimod.TensorBimod.X P Q) T.X T.X).inv ≫ Bimod.TensorBimod.actRight P Q ▷ T.X ≫ Bimod.TensorBimod.actRight P Q


theorem surjective_of_iterate_surjective {n : ℕ} (hn : n ≠ 0) (h : Surjective (f' ^ n)) :
    Surjective f'

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f' : M →ₗ[R] M}
{n : ℕ}
(hn : n ≠ 0)
(h : Function.Surjective ⇑(f' ^ n))


theorem sInter_subset_of_mem {S : Set (Set α)} {t : Set α} (tS : t ∈ S) : ⋂₀ S ⊆ t

{α : Type u_1}
{S : Set (Set α)}
{t : Set α}
(tS : t ∈ S)


@[simp]
theorem mapMono_δ₀ {n : ℕ} : mapMono K (δ (0 : Fin (n + 2))) = K.d (n + 1) n

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(K : ChainComplex C ℕ)
{n : ℕ}

AlgebraicTopology.DoldKan.Γ₀.Obj.Termwise.mapMono K (SimplexCategory.δ 0) = K.d (n + 1) n


theorem IsPreirreducible.interior (ht : IsPreirreducible t) : IsPreirreducible (interior t)

{X : Type u_1}
[TopologicalSpace X]
{t : Set X}
(ht : IsPreirreducible t)


/-- If a set of functions is equicontinuous at some `x₀`, its closure for the product topology is
also equicontinuous at `x₀`. -/
protected theorem Set.EquicontinuousAt.closure {A : Set (X → α)} {x₀ : X}
    (hA : A.EquicontinuousAt x₀) : (closure A).EquicontinuousAt x₀

{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{A : Set (X → α)}
{x₀ : X}
(hA : A.EquicontinuousAt x₀)


@[to_additive]
theorem smul_mem_smul : a ∈ s → b ∈ t → a • b ∈ s • t

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


theorem degree_C_mul_T_le (n : ℤ) (a : R) : degree (C a * T n) ≤ n

{R : Type u_1}
[Semiring R]
(n : ℤ)
(a : R)

(LaurentPolynomial.C a * LaurentPolynomial.T n).degree ≤ ↑n