lemma sInf_equiv {S : Set (Setoid α)} {x y : α} :
    letI := sInf S
    x ≈ y ↔ ∀ s ∈ S, s.Rel x y

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


theorem nodup_range (n : ℕ) : Nodup (range n)


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

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


@[to_additive]
theorem Multipliable.trans_div (hg : Multipliable g) (hfg : Multipliable fun b ↦ f b / g b) :
    Multipliable f

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f g : β → α}
(hg : Multipliable g)
(hfg : Multipliable fun b => f b / g b)


/-- A mixin for left cancellative multiplication by nonzero elements. -/
class IsLeftCancelMulZero (M₀ : Type u) [Mul M₀] [Zero M₀] : Prop where
  /-- Multiplication by a nonzero element is left cancellative. -/
  protected mul_left_cancel_of_ne_zero : ∀ {a b c : M₀}, a ≠ 0 → a * b = a * c → b = c

{M₀ : Type u}
[Mul M₀]
[Zero M₀]
[self : IsLeftCancelMulZero M₀]
{a b c : M₀}


/-- Two affine maps from a Pi-tyoe of modules `(i : ι) → φv i` are equal if they are equal in their
  operation on `Pi.single` and at zero. Analogous to `LinearMap.pi_ext`. See also `pi_ext_nonempty`,
  which instead of agrement at zero requires `Nonempty ι`. -/
theorem pi_ext_zero (h : ∀ i x, f (Pi.single i x) = g (Pi.single i x)) (h₂ : f 0 = g 0) :
    f = g

(h : ∀ (i : ι) (x : φv i), f (Pi.single i x) = g (Pi.single i x))


theorem coe_toContinuousMap (F : HomotopyWith f₀ f₁ P) : ⇑F.toContinuousMap = F

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f₀ f₁ : C(X, Y)}
{P : C(X, Y) → Prop}
(F : f₀.HomotopyWith f₁ P)


theorem Quotient.mk'_eq_mk [s : Setoid α] : Quotient.mk' = Quotient.mk s


theorem support_smul {S₁ : Type*} [SMulZeroClass S₁ R] {a : S₁} {f : MvPolynomial σ R} :
    (a • f).support ⊆ f.support

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{S₁ : Type u_2}
[SMulZeroClass S₁ R]
{a : S₁}
{f : MvPolynomial σ R}


/-- If `gcd(|G|,n)=1` then the `n`th power map is a bijection -/
@[to_additive (attr := simps) "If `gcd(|G|,n)=1` then the smul by `n` is a bijection"]
noncomputable def powCoprime {G : Type*} [Group G] (h : (Nat.card G).Coprime n) : G ≃ G

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

(powCoprime h).symm g = g ^ (Nat.card G).gcdB n


protected theorem Nat.lt_irrefl (n : Nat) : Not (LT.lt n n)


@[simp, norm_cast]
theorem coe_inf (a b : Regular α) : (↑(a ⊓ b) : α) = (a : α) ⊓ b

{α : Type u_1}
[HeytingAlgebra α]
(a b : Heyting.Regular α)


/-- An equivalent definition for prime powers: `n` is a prime power iff there is a prime `p` and a
natural `k` such that `n` can be written as `p^(k+1)`. -/
theorem isPrimePow_iff_pow_succ : IsPrimePow n ↔ ∃ (p : R) (k : ℕ), Prime p ∧ p ^ (k + 1) = n

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

IsPrimePow n ↔ ∃ p k, Prime p ∧ p ^ (k + 1) = n


theorem one_lt_rpow_of_pos_of_lt_one_of_neg (hx1 : 0 < x) (hx2 : x < 1) (hz : z < 0) :
    1 < x ^ z


protected theorem neg {B : BilinForm R₁ M₁} (hB : B.IsRefl) : (-B).IsRefl

{R₁ : Type u_3}
{M₁ : Type u_4}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
{B : LinearMap.BilinForm R₁ M₁}
(hB : B.IsRefl)


/-- Given a diagram `CostructuredArrow F X`s, we may obtain a cocone with cone point `X`. -/
@[simps!]
def Cocone.fromCostructuredArrow (F : C ⥤ D) {X : D} (G : J ⥤ CostructuredArrow F X) :
    Cocone (G ⋙ CostructuredArrow.proj F X ⋙ F)

(G : CategoryTheory.Functor J (CategoryTheory.CostructuredArrow F X))

(CategoryTheory.Limits.Cocone.fromCostructuredArrow F G).ι.app j = (G.obj j).hom


theorem dense_pi {ι : Type*} {α : ι → Type*} [∀ i, TopologicalSpace (α i)] {s : ∀ i, Set (α i)}
    (I : Set ι) (hs : ∀ i ∈ I, Dense (s i)) : Dense (pi I s)

{ι : Type u_7}
{α : ι → Type u_8}
[(i : ι) → TopologicalSpace (α i)]
{s : (i : ι) → Set (α i)}
(I : Set ι)
(hs : ∀ i ∈ I, Dense (s i))


theorem nfp_eq_self {f : Ordinal → Ordinal} {a} (h : f a = a) : nfp f a = a

{f : Ordinal.{u_1} → Ordinal.{u_1}}
{a : Ordinal.{u_1}}
(h : f a = a)


/-- For every unbounded operator `f` the submodule `f.domain` is a core of its closure.

Note that we don't require that `f` is closable, due to the definition of the closure. -/
theorem closureHasCore (f : E →ₗ.[R] F) : f.closure.HasCore f.domain

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


@[to_additive]
theorem hasProd_iff_hasProd {g : γ → α}
    (h₁ : ∀ u : Finset γ, ∃ v : Finset β, ∀ v', v ⊆ v' →
      ∃ u', u ⊆ u' ∧ ∏ x ∈ u', g x = ∏ b ∈ v', f b)
    (h₂ : ∀ v : Finset β, ∃ u : Finset γ, ∀ u', u ⊆ u' →
      ∃ v', v ⊆ v' ∧ ∏ b ∈ v', f b = ∏ x ∈ u', g x) :
    HasProd f a ↔ HasProd g a

(h₁ : ∀ (u : Finset γ), ∃ v, ∀ (v' : Finset β), v ⊆ v' → ∃ u', u ⊆ u' ∧ ∏ x ∈ u', g x = ∏ b ∈ v', f b)

(h₂ : ∀ (v : Finset β), ∃ u, ∀ (u' : Finset γ), u ⊆ u' → ∃ v', v ⊆ v' ∧ ∏ b ∈ v', f b = ∏ x ∈ u', g x)


/-- Additive subgroups of an additive group `A` are isomorphic to subgroups of `Multiplicative A`.
-/
@[simps!]
def AddSubgroup.toSubgroup : AddSubgroup A ≃o Subgroup (Multiplicative A)

{A : Type u_4}
[AddGroup A]
(S : Subgroup (Multiplicative A))

↑((RelIso.symm AddSubgroup.toSubgroup) S) = ⇑Additive.toMul ⁻¹' ↑S


theorem Balanced.smul_congr (hs : Balanced 𝕜 A) (h : ‖a‖ = ‖b‖) : a • A = b • A

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{A : Set E}
{a b : 𝕜}
(hs : Balanced 𝕜 A)
(h : ‖a‖ = ‖b‖)


@[to_additive]
theorem Integrable.comp_inv [IsInvInvariant μ] {f : G → F} (hf : Integrable f μ) :
    Integrable (fun t => f t⁻¹) μ

{G : Type u_4}
{F : Type u_6}
[MeasurableSpace G]
[NormedAddCommGroup F]
{μ : MeasureTheory.Measure G}
[Group G]
[MeasurableInv G]
[μ.IsInvInvariant]
{f : G → F}
(hf : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun t => f t⁻¹) μ


@[measurability]
theorem Measurable.inf (hf : Measurable f) (hg : Measurable g) : Measurable fun a => f a ⊓ g a

{M : Type u_1}
[MeasurableSpace M]
{α : Type u_2}
{m : MeasurableSpace α}
{f g : α → M}
[Inf M]
[MeasurableInf₂ M]
(hf : Measurable f)
(hg : Measurable g)


theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) :
    μ (f ⁻¹' s) = ν (g ⁻¹' s)

(h : ProbabilityTheory.IdentDistrib f g μ ν)


theorem exists_mem_eq_inf' (f : ι → α) : ∃ i, i ∈ s ∧ s.inf' H f = f i

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
{s : Finset ι}
(H : s.Nonempty)
(f : ι → α)


@[to_additive, field_simps] -- The attributes are out of order on purpose
theorem inv_eq_one_div (x : G) : x⁻¹ = 1 / x


/-- Inversion `x ↦ x⁻¹` as an `IsometryEquiv`. -/
@[to_additive (attr := simps! apply toEquiv) "Negation `x ↦ -x` as an `IsometryEquiv`."]
def inv : G ≃ᵢ G

(G : Type v)
[AddGroup G]
[PseudoEMetricSpace G]
[IsometricVAdd G G]
[IsometricVAdd Gᵃᵒᵖ G]


@[simp]
theorem op_unop (S : Subsemiring Rᵐᵒᵖ) : S.unop.op = S

{R : Type u_2}
[NonAssocSemiring R]
(S : Subsemiring Rᵐᵒᵖ)


@[simp]
lemma mem_comk {p : Set α → Prop} {he hmono hunion s} :
    s ∈ comk p he hmono hunion ↔ p sᶜ

{hmono : ∀ (t : Set α), p t → ∀ s ⊆ t, p s}

{hunion : ∀ (s : Set α), p s → ∀ (t : Set α), p t → p (s ∪ t)}

s ∈ Filter.comk p he hmono hunion ↔ p sᶜ


lemma sigma_mk_preimage_image_eq_self : Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s

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


@[simp, rclike_simps, norm_cast]
theorem imCLM_coe : ((imCLM : K →L[ℝ] ℝ) : K →ₗ[ℝ] ℝ) = imLm


@[simp]
theorem Rat.comap_cast_atTop [LinearOrderedField R] [Archimedean R] :
    comap ((↑) : ℚ → R) atTop = atTop

{R : Type u_2}
[LinearOrderedField R]
[Archimedean R]

Filter.comap Rat.cast Filter.atTop = Filter.atTop


@[simp]
theorem mem_op {x : Rᵐᵒᵖ} {S : Subsemiring R} : x ∈ S.op ↔ x.unop ∈ S

{R : Type u_2}
[NonAssocSemiring R]
{x : Rᵐᵒᵖ}
{S : Subsemiring R}


@[simp]
theorem smul_X (m : M) : (m • X : R[X]) = X

{M : Type u_1}
[Monoid M]
{R : Type u_2}
[Semiring R]
[MulSemiringAction M R]
(m : M)


@[to_additive (attr := simp)]
theorem coprodAssoc_symm_apply_inr_inl (x : N) :
    (coprodAssoc M N P).symm (inr (inl x)) = inl (inr x)

{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
[AddMonoid M]
[AddMonoid N]
[AddMonoid P]
(x : N)

(AddMonoid.MulEquiv.coprodAssoc M N P).symm (AddMonoid.Coprod.inr (AddMonoid.Coprod.inl x)) =
  AddMonoid.Coprod.inl (AddMonoid.Coprod.inr x)


theorem le_iff_eq (h : a ≤ b) : b ≤ a ↔ b = a

{α : Type u_2}
[PartialOrder α]
{a b : α}
(h : a ≤ b)


theorem log_pos (hx : 1 < x) : 0 < log x


theorem IsMarkovKernel.comapRight (κ : Kernel α β) (hf : MeasurableEmbedding f)
    (hκ : ∀ a, κ a (Set.range f) = 1) : IsMarkovKernel (comapRight κ hf)

(hκ : ∀ (a : α), (κ a) (Set.range f) = 1)


/-- The subgroup generated by a set includes the set. -/
@[to_additive (attr := simp, aesop safe 20 apply (rule_sets := [SetLike]))
  "The `AddSubgroup` generated by a set includes the set."]
theorem subset_closure : k ⊆ closure k


theorem orthonormal_sUnion_of_directed {s : Set (Set E)} (hs : DirectedOn (· ⊆ ·) s)
    (h : ∀ a ∈ s, Orthonormal 𝕜 (fun x => ((x : a) : E))) :
    Orthonormal 𝕜 (fun x => x : ⋃₀ s → E)

(hs : DirectedOn (fun x x_1 => x ⊆ x_1) s)

(h : ∀ a ∈ s, Orthonormal 𝕜 fun x => ↑x)


@[simp] theorem coe_ne_top : (r : ℝ≥0∞) ≠ ∞


@[simp] lemma map_add_right_Icc (a b c : α) :
    (Icc a b).map (addRightEmbedding c) = Icc (a + c) (b + c)

{α : Type u_2}
[OrderedCancelAddCommMonoid α]
[ExistsAddOfLE α]
[LocallyFiniteOrder α]
(a b c : α)

Finset.map (addRightEmbedding c) (Finset.Icc a b) = Finset.Icc (a + c) (b + c)


@[simp]
theorem inv_hom_id_apply {X Y : Type u} (f : X ≅ Y) (y : Y) : f.hom (f.inv y) = y


/-- The composition `l ∘ f` where `l : F → E` and `f : 𝕜 → F`, has a derivative within a set
equal to the Fréchet derivative of `l` applied to the derivative of `f`. -/
theorem HasFDerivWithinAt.comp_hasDerivWithinAt_of_eq {t : Set F}
    (hl : HasFDerivWithinAt l l' t y)
    (hf : HasDerivWithinAt f f' s x) (hst : MapsTo f s t) (hy : y = f x) :
    HasDerivWithinAt (l ∘ f) (l' f') s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f : 𝕜 → F}
{f' : F}
(x : 𝕜)
{s : Set 𝕜}
{l : F → E}
{l' : F →L[𝕜] E}
{y : F}
{t : Set F}
(hl : HasFDerivWithinAt l l' t y)
(hf : HasDerivWithinAt f f' s x)
(hst : Set.MapsTo f s t)
(hy : y = f x)


/-- **Diagonalization theorem**, **spectral theorem** for matrices; A hermitian matrix can be
diagonalized by a change of basis. For the spectral theorem on linear maps, see
`LinearMap.IsSymmetric.eigenvectorBasis_apply_self_apply`.-/
theorem spectral_theorem :
    A = (eigenvectorUnitary hA : Matrix n n 𝕜) * diagonal (RCLike.ofReal ∘ hA.eigenvalues)
      * (star (eigenvectorUnitary hA : Matrix n n 𝕜))

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
[DecidableEq n]
(hA : A.IsHermitian)

A = ↑hA.eigenvectorUnitary * Matrix.diagonal (RCLike.ofReal ∘ hA.eigenvalues) * star ↑hA.eigenvectorUnitary


theorem rename_eval₂ (g : τ → MvPolynomial σ R) :
    rename k (p.eval₂ C (g ∘ k)) = (rename k p).eval₂ C (rename k ∘ g)

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
(k : σ → τ)
(p : MvPolynomial σ R)
(g : τ → MvPolynomial σ R)

(MvPolynomial.rename k) (MvPolynomial.eval₂ MvPolynomial.C (g ∘ k) p) =
  MvPolynomial.eval₂ MvPolynomial.C (⇑(MvPolynomial.rename k) ∘ g) ((MvPolynomial.rename k) p)


lemma not_mem_of_mem_diff_closure (he : e ∈ M.E \ M.closure X) : e ∉ X

{α : Type u_2}
{M : Matroid α}
{X : Set α}
{e : α}
(he : e ∈ M.E \ M.closure X)


/-- If a Lipschitz functions has line derivatives in a dense set of directions, all of them given by
a single continuous linear map `L`, then it admits `L` as Fréchet derivative. -/
theorem hasFderivAt_of_hasLineDerivAt_of_closure {f : E → F}
    (hf : LipschitzWith C f) {s : Set E} (hs : sphere 0 1 ⊆ closure s)
    {L : E →L[ℝ] F} {x : E} (hL : ∀ v ∈ s, HasLineDerivAt ℝ f (L v) x v) :
    HasFDerivAt f L x


theorem cof_bsup_le {o : Ordinal} {f : ∀ a < o, Ordinal} :
    (∀ i h, f i h < bsup.{u, u} o f) → cof (bsup.{u, u} o f) ≤ o.card

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

(∀ (i : Ordinal.{u}) (h : i < o), f i h < o.bsup f) → (o.bsup f).cof ≤ o.card


/--
Cost structure for strings, where cost is the length of the token.
-/
@[simps!]
def stringLengthCost : Cost String String ℕ

Levenshtein.stringLengthCost.delete a = a.length


@[simp]
theorem add_apply (f g : CuspForm Γ k) (z : ℍ) : (f + g) z = f z + g z

{Γ : Subgroup SL(2, ℤ)}
{k : ℤ}
(f g : CuspForm Γ k)
(z : ℍ)


/-- There is a rational power between any two positive elements of an archimedean ordered field. -/
theorem exists_rat_pow_btwn {α : Type*} [LinearOrderedField α] [Archimedean α] (hn : n ≠ 0)
    {x y : α} (h : x < y) (hy : 0 < y) : ∃ q : ℚ, 0 < q ∧ x < (q : α) ^ n ∧ (q : α) ^ n < y

{n : ℕ}
{α : Type u_1}
[LinearOrderedField α]
[Archimedean α]
(hn : n ≠ 0)
{x y : α}
(h : x < y)
(hy : 0 < y)


theorem head_congr : ∀ {s t : WSeq α}, s ~ʷ t → head s ~ head t


@[simp]
theorem toNonneg_of_nonneg {a : α} (h : 0 ≤ a) : toNonneg a = ⟨a, h⟩

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


theorem map_prod_left_eq_zip {l : List α} (f : α → β) :
    (l.map fun x => (x, f x)) = l.zip (l.map f)

{α : Type u}
{β : Type u_1}
{l : List α}
(f : α → β)

List.map (fun x => (x, f x)) l = l.zip (List.map f l)


/-- `Quotient.out'` as a relation embedding between the lift of a relation and the relation. -/
@[simps]
noncomputable def Quotient.out'RelEmbedding {_ : Setoid α} {r : α → α → Prop}
    (H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂) :
    (fun a b => Quotient.liftOn₂' a b r H) ↪r r

∀ {x : Setoid α} {r : α → α → Prop} (H : ∀ (a₁ b₁ a₂ b₂ : α), a₁ ≈ a₂ → b₁ ≈ b₂ → r a₁ b₁ = r a₂ b₂) (a : Quotient x),
  (Quotient.out'RelEmbedding H) a = a.out'


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


@[simp high]
theorem toFinsupp_C_mul_X_pow (a : R) (n : ℕ) :
    Polynomial.toFinsupp (C a * X ^ n) = Finsupp.single n a

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

(Polynomial.C a * Polynomial.X ^ n).toFinsupp = Finsupp.single n a


/-- `HasFTaylorSeriesUpTo n f p` registers the fact that `p 0 = f` and `p (m+1)` is a
derivative of `p m` for `m < n`, and is continuous for `m ≤ n`. This is a predicate analogous to
`HasFDerivAt` but for higher order derivatives.

Notice that `p` does not sum up to `f` on the diagonal (`FormalMultilinearSeries.sum`), even if
`f` is analytic and `n = ∞`: an addition `1/m!` factor on the `m`th term is necessary for that. -/
structure HasFTaylorSeriesUpTo (n : ℕ∞) (f : E → F) (p : E → FormalMultilinearSeries 𝕜 E F) :
  Prop where
  zero_eq : ∀ x, (p x 0).uncurry0 = f x
  fderiv : ∀ m : ℕ, (m : ℕ∞) < n → ∀ x, HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x
  cont : ∀ m : ℕ, (m : ℕ∞) ≤ n → Continuous fun x => p x m

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{f : E → F}
{p : E → FormalMultilinearSeries 𝕜 E F}
(self : HasFTaylorSeriesUpTo n f p)
(m : ℕ)


@[simp]
theorem zero_oreDiv' (s : S) : (0 : R) /ₒ s = 0

{R : Type u_1}
[MonoidWithZero R]
{S : Submonoid R}
[OreLocalization.OreSet S]
(s : ↥S)


lemma isProbabilityMeasureGamma {a r : ℝ} (ha : 0 < a) (hr : 0 < r) :
    IsProbabilityMeasure (gammaMeasure a r)

MeasureTheory.IsProbabilityMeasure (ProbabilityTheory.gammaMeasure a r)


lemma prod_apply (s : Set (α × β)) (s_mble : MeasurableSet s) :
    μ.prod ν s = ENNReal.toNNReal (∫⁻ x, ν.toMeasure (Prod.mk x ⁻¹' s) ∂μ)

{α : Type u_1}
[MeasurableSpace α]
{β : Type u_2}
[MeasurableSpace β]
(μ : MeasureTheory.FiniteMeasure α)
(ν : MeasureTheory.FiniteMeasure β)
(s : Set (α × β))
(s_mble : MeasurableSet s)

(μ.prod ν) s = (∫⁻ (x : α), ↑ν (Prod.mk x ⁻¹' s) ∂↑μ).toNNReal


protected theorem convex (K : ConvexBody V) : Convex ℝ (K : Set V)

{V : Type u_1}
[TopologicalSpace V]
[AddCommGroup V]
[Module ℝ V]
(K : ConvexBody V)


/-- If all multiplications cancel then every element is regular. -/
@[to_additive "If all additions cancel then every element is add-regular."]
theorem IsRegular.all [Mul R] [IsCancelMul R] (g : R) : IsRegular g

{R : Type u_1}
[Add R]
[IsCancelAdd R]
(g : R)


theorem mul_ediv_cancel_of_emod_eq_zero {a b : Int} (H : a % b = 0) : b * (a / b) = a


theorem rel_bot_eq_right_group_rel (H : Subgroup G) :
    (setoid ↑H ↑(⊥ : Subgroup G)).Rel = (QuotientGroup.rightRel H).Rel

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

(Doset.setoid ↑H ↑⊥).Rel = (QuotientGroup.rightRel H).Rel


@[to_additive normal_iff_eq_addCosets]
theorem normal_iff_eq_cosets : s.Normal ↔ ∀ g : α, g • (s : Set α) = op g • s

{α : Type u_1}
[AddGroup α]
(s : AddSubgroup α)

s.Normal ↔ ∀ (g : α), g +ᵥ ↑s = AddOpposite.op g +ᵥ ↑s


@[to_additive ofReal_norm_eq_coe_nnnorm]
theorem ofReal_norm_eq_coe_nnnorm' (a : E) : ENNReal.ofReal ‖a‖ = ‖a‖₊

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


theorem integrable_congr {f g : α → β} (h : f =ᵐ[μ] g) : Integrable f μ ↔ Integrable g μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f g : α → β}
(h : f =ᵐ[μ] g)

MeasureTheory.Integrable f μ ↔ MeasureTheory.Integrable g μ


@[simp]
theorem continuousWithinAt_Ioc_iff_Ioi (h : a < b) :
    ContinuousWithinAt f (Ioc a b) a ↔ ContinuousWithinAt f (Ioi a) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
[TopologicalSpace β]
{a b : α}
{f : α → β}
(h : a < b)

ContinuousWithinAt f (Set.Ioc a b) a ↔ ContinuousWithinAt f (Set.Ioi a) a


/-- If a Lie algebra `L` has non-degenerate Killing form, the only element of a Cartan subalgebra
whose adjoint action on `L` is nilpotent, is the zero element.

Over a perfect field a much stronger result is true, see
`LieAlgebra.IsKilling.isSemisimple_ad_of_mem_isCartanSubalgebra`. -/
lemma eq_zero_of_isNilpotent_ad_of_mem_isCartanSubalgebra {x : L} (hx : x ∈ H)
    (hx' : _root_.IsNilpotent (ad K L x)) : x = 0

(hx' : IsNilpotent ((LieAlgebra.ad K L) x))


@[to_additive]
theorem _root_.Commute.op [Mul α] {x y : α} (h : Commute x y) : Commute (op x) (op y)

{α : Type u_1}
[Mul α]
{x y : α}
(h : Commute x y)

Commute (MulOpposite.op x) (MulOpposite.op y)


@[simp] theorem id_map' [Functor m] [LawfulFunctor m] (x : m α) : (fun a => a) <$> x = x

{m : Type u_1 → Type u_2}
{α : Type u_1}
[Functor m]
[LawfulFunctor m]
(x : m α)


lemma differentiable_hurwitzZetaEven_sub_hurwitzZetaEven (a b : UnitAddCircle) :
    Differentiable ℂ (fun s ↦ hurwitzZetaEven a s - hurwitzZetaEven b s)

Differentiable ℂ fun s => HurwitzZeta.hurwitzZetaEven a s - HurwitzZeta.hurwitzZetaEven b s


theorem kroneckerTMul_assoc (A : Matrix l m α) (B : Matrix n p β) (C : Matrix q r γ) :
    reindex (Equiv.prodAssoc l n q) (Equiv.prodAssoc m p r)
        (((A ⊗ₖₜ[R] B) ⊗ₖₜ[R] C).map (TensorProduct.assoc R α β γ)) =
      A ⊗ₖₜ[R] B ⊗ₖₜ[R] C

(R : Type u_1)
{α : Type u_2}
{β : Type u_4}
{γ : Type u_6}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{p : Type u_11}
{q : Type u_12}
{r : Type u_13}
[CommSemiring R]
[AddCommMonoid α]
[AddCommMonoid β]
[AddCommMonoid γ]
[Module R α]
[Module R β]
[Module R γ]
(A : Matrix l m α)
(B : Matrix n p β)
(C : Matrix q r γ)

(Matrix.reindex (Equiv.prodAssoc l n q) (Equiv.prodAssoc m p r))
    ((Matrix.kroneckerMap (TensorProduct.tmul R) (Matrix.kroneckerMap (TensorProduct.tmul R) A B) C).map
      ⇑(TensorProduct.assoc R α β γ)) =
  Matrix.kroneckerMap (TensorProduct.tmul R) A (Matrix.kroneckerMap (TensorProduct.tmul R) B C)


theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂

{x y₁ y₂ : SetTheory.PGame}
(hx : x.Numeric)
(hy₁ : y₁.Numeric)
(hy₂ : y₂.Numeric)
(he : y₁ ≈ y₂)


@[simp]
theorem toNFA_evalFrom_match (start : Set σ) :
    M.toNFA.evalFrom (M.εClosure start) = M.evalFrom start

{α : Type u}
{σ : Type v}
(M : εNFA α σ)
(start : Set σ)


/-- The relation “there exists an element that semiconjugates `a` to `b`” on a semigroup
is transitive. -/
@[to_additive "The relation “there exists an element that semiconjugates `a` to `b`” on an additive
semigroup is transitive."]
protected theorem transitive : Transitive fun a b : S ↦ ∃ c, SemiconjBy c a b

Transitive fun a b => ∃ c, SemiconjBy c a b


/-- Definition of a (Pre)Galois category. Lenstra, Def 3.1, (G1)-(G3) -/
class PreGaloisCategory (C : Type u₁) [Category.{u₂, u₁} C] : Prop where
  /-- `C` has a terminal object (G1). -/
  hasTerminal : HasTerminal C := by infer_instance
  /-- `C` has pullbacks (G1). -/
  hasPullbacks : HasPullbacks C := by infer_instance
  /-- `C` has finite coproducts (G2). -/
  hasFiniteCoproducts : HasFiniteCoproducts C := by infer_instance
  /-- `C` has quotients by finite groups (G2). -/
  hasQuotientsByFiniteGroups (G : Type u₂) [Group G] [Finite G] :
    HasColimitsOfShape (SingleObj G) C := by infer_instance
  /-- Every monomorphism in `C` induces an isomorphism on a direct summand (G3). -/
  monoInducesIsoOnDirectSummand {X Y : C} (i : X ⟶ Y) [Mono i] : ∃ (Z : C) (u : Z ⟶ Y),
    Nonempty (IsColimit (BinaryCofan.mk i u))

[self : CategoryTheory.PreGaloisCategory C]


lemma eq_of_subset_of_not_ssubset [IsAntisymm α (· ⊆ ·)] (hab : a ⊆ b) (hba : ¬ a ⊂ b) : a = b

[IsNonstrictStrictOrder α (fun x x_1 => x ⊆ x_1) fun x x_1 => x ⊂ x_1]


@[to_additive] lemma MulDissociated.subset {t : Set α} (hst : s ⊆ t) (ht : MulDissociated t) :
    MulDissociated s

{α : Type u_1}
[CommGroup α]
{s t : Set α}
(hst : s ⊆ t)
(ht : MulDissociated t)


/-- Variant of `homMk'` where both objects are applications of `mk`. -/
@[simps]
def mkPostcomp (f : S ⟶ T.obj Y) (g : Y ⟶ Y') : mk f ⟶ mk (f ≫ T.map g)

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

(CategoryTheory.StructuredArrow.mkPostcomp f g).left =
  CategoryTheory.CategoryStruct.id (CategoryTheory.StructuredArrow.mk f).left


@[to_additive sum_boole_nsmul]
theorem prod_pow_boole [DecidableEq α] (s : Finset α) (f : α → β) (a : α) :
    (∏ x ∈ s, f x ^ ite (a = x) 1 0) = ite (a ∈ s) (f a) 1

{α : Type u_3}
{β : Type u_4}
[CommMonoid β]
[DecidableEq α]
(s : Finset α)
(f : α → β)
(a : α)

(∏ x ∈ s, f x ^ if a = x then 1 else 0) = if a ∈ s then f a else 1


/-- Ad hoc class stating that the closure of an upper set is an upper set. This is used to state
lemmas that do not mention algebraic operations for both the additive and multiplicative versions
simultaneously. If you find a satisfying replacement for this typeclass, please remove it! -/
class HasUpperLowerClosure (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where
  isUpperSet_closure : ∀ s : Set α, IsUpperSet s → IsUpperSet (closure s)
  isLowerSet_closure : ∀ s : Set α, IsLowerSet s → IsLowerSet (closure s)
  isOpen_upperClosure : ∀ s : Set α, IsOpen s → IsOpen (upperClosure s : Set α)
  isOpen_lowerClosure : ∀ s : Set α, IsOpen s → IsOpen (lowerClosure s : Set α)

{α : Type u_1}
[TopologicalSpace α]
[Preorder α]
[self : HasUpperLowerClosure α]
(s : Set α)


theorem restrict_strictRestriction {M : Matroid α} (hR : R ⊂ M.E) : M ↾ R <r M

{α : Type u_1}
{R : Set α}
{M : Matroid α}
(hR : R ⊂ M.E)


theorem exists_subtype_range_iff {p : range f → Prop} :
    (∃ a : range f, p a) ↔ ∃ i, p ⟨f i, mem_range_self _⟩

{α : Type u_1}
{ι : Sort u_4}
{f : ι → α}
{p : ↑(Set.range f) → Prop}


protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{K : ℝ≥0}
{s : Set α}
{f : α → β}
(hf : LipschitzOnWith K f s)


theorem symm_mapsTo : MapsTo e.symm e.target e.source

{α : Type u_1}
{β : Type u_2}
(e : PartialEquiv α β)


@[simp] theorem setOf_bot : { _x : α | ⊥ } = ∅


theorem HasDerivWithinAt.mono (h : HasDerivWithinAt f f' t x) (hst : s ⊆ t) :
    HasDerivWithinAt f f' s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
{s t : Set 𝕜}
(h : HasDerivWithinAt f f' t x)
(hst : s ⊆ t)


@[simp]
theorem comp_removeZero (q : FormalMultilinearSeries 𝕜 F G) (p : FormalMultilinearSeries 𝕜 E F) :
    q.comp p.removeZero = q.comp p

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[CommRing 𝕜]
[AddCommGroup E]
[AddCommGroup F]
[AddCommGroup G]
[Module 𝕜 E]
[Module 𝕜 F]
[Module 𝕜 G]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalSpace G]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
[TopologicalAddGroup F]
[ContinuousConstSMul 𝕜 F]
[TopologicalAddGroup G]
[ContinuousConstSMul 𝕜 G]
(q : FormalMultilinearSeries 𝕜 F G)
(p : FormalMultilinearSeries 𝕜 E F)


theorem Ideal.pow_succ_lt_pow {P : Ideal A} [P_prime : P.IsPrime] (hP : P ≠ ⊥) (i : ℕ) :
    P ^ (i + 1) < P ^ i

{A : Type u_2}
[CommRing A]
[IsDedekindDomain A]
{P : Ideal A}
[P_prime : P.IsPrime]
(hP : P ≠ ⊥)
(i : ℕ)


theorem le_of_lf {x y : PGame} (h : x ⧏ y) (ox : Numeric x) (oy : Numeric y) : x ≤ y

{x y : SetTheory.PGame}
(h : x ⧏ y)
(ox : x.Numeric)
(oy : y.Numeric)


lemma gcd_neg' [GCDMonoid α] {a b : α} : Associated (gcd a (-b)) (gcd a b)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[HasDistribNeg α]
[GCDMonoid α]
{a b : α}


/-- If `v` is a valuation on a division ring then `v(x) = 0` iff `x = 0`. -/
-- @[simp] Porting note (#10618): simp can prove this
theorem zero_iff [Nontrivial Γ₀] (v : Valuation K Γ₀) {x : K} : v x = 0 ↔ x = 0

{K : Type u_1}
[DivisionRing K]
{Γ₀ : Type u_4}
[LinearOrderedCommMonoidWithZero Γ₀]
[Nontrivial Γ₀]
(v : Valuation K Γ₀)
{x : K}


theorem cos_nonneg_of_mem_Icc {x : ℝ} (hx : x ∈ Icc (-(π / 2)) (π / 2)) : 0 ≤ cos x

(hx : x ∈ Set.Icc (-(Real.pi / 2)) (Real.pi / 2))


lemma W.isLocallyInjective (hf : J.W f) : Presheaf.IsLocallyInjective J f

{J : CategoryTheory.GrothendieckTopology C}


@[simp]
theorem zero_le_of_isEmpty_rightMoves (x : PGame) [IsEmpty x.RightMoves] : 0 ≤ x

(x : SetTheory.PGame)
[IsEmpty x.RightMoves]


theorem contDiffAt_log {x : ℂ} (h : x ∈ slitPlane) {n : ℕ∞} : ContDiffAt ℂ n log x

{x : ℂ}
(h : x ∈ Complex.slitPlane)
{n : ℕ∞}


protected theorem repr_symm_single (b : HilbertBasis ι 𝕜 E) (i : ι) :
    b.repr.symm (lp.single 2 i (1 : 𝕜)) = b i

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(b : HilbertBasis ι 𝕜 E)
(i : ι)

b.repr.symm (lp.single 2 i 1) = (fun i => b.repr.symm (lp.single 2 i 1)) i


theorem Kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα

(h_indep : ProbabilityTheory.Kernel.iIndep s κ μα)

ProbabilityTheory.Kernel.Indep (Filter.limsup s Filter.atTop) (Filter.limsup s Filter.atTop) κ μα


theorem isReduced_rootSystem : (rootSystem H).IsReduced

{K : Type u_1}
{L : Type u_2}
[Field K]
[CharZero K]
[LieRing L]
[LieAlgebra K L]
[LieAlgebra.IsKilling K L]
[FiniteDimensional K L]
(H : LieSubalgebra K L)
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]


/-- Given a left homology map data for morphism `φ`, this is the induced left homology
map data for `a • φ`. -/
@[simps]
def smul (a : R) : LeftHomologyMapData (a • φ) h₁ h₂

(γ : CategoryTheory.ShortComplex.LeftHomologyMapData φ h₁ h₂)


@[to_additive (attr := simp)]
theorem inv_mul_cancel_right (a b : G) : a * b⁻¹ * b = a


@[simp]
theorem nonempty_ball : (ball x ε).Nonempty ↔ 0 < ε

{α : Type u}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ}


theorem Icc_eq_empty_iff : Icc a b = ∅ ↔ ¬a ≤ b


/-- The function we actually integrate over `[0, 2π]` in the definition of `circleIntegral` is
integrable. -/
theorem out [NormedSpace ℂ E] (hf : CircleIntegrable f c R) :
    IntervalIntegrable (fun θ : ℝ => deriv (circleMap c R) θ • f (circleMap c R θ)) volume 0
      (2 * π)

{E : Type u_1}
[NormedAddCommGroup E]
{f : ℂ → E}
{c : ℂ}
{R : ℝ}
[NormedSpace ℂ E]
(hf : CircleIntegrable f c R)

IntervalIntegrable (fun θ => deriv (circleMap c R) θ • f (circleMap c R θ)) MeasureTheory.volume 0 (2 * π)


lemma directedOn_le_Icc (a b : α) : DirectedOn (· ≤ ·) (Icc a b)

DirectedOn (fun x x_1 => x ≤ x_1) (Set.Icc a b)


@[to_additive (attr := simp)]
theorem dist_mul_left [PseudoMetricSpace M] [Mul M] [IsometricSMul M M] (a b c : M) :
    dist (a * b) (a * c) = dist b c

{M : Type u}
[PseudoMetricSpace M]
[Add M]
[IsometricVAdd M M]
(a b c : M)


@[simp] lemma coe_smul₀ {c : G₀} (hc : c ≠ 0) : ⇑(smul₀ c hc : α ≃ᵐ α) = (c • ·)

{G₀ : Type u_2}
{α : Type u_3}
[MeasurableSpace G₀]
[MeasurableSpace α]
[GroupWithZero G₀]
[MulAction G₀ α]
[MeasurableSMul G₀ α]
{c : G₀}
(hc : c ≠ 0)

⇑(MeasurableEquiv.smul₀ c hc) = fun x => c • x


/-- `MeasureTheory.Lp.compMeasurePreserving` as a linear isometry. -/
@[simps!]
def compMeasurePreservingₗᵢ [Fact (1 ≤ p)] (f : α → β) (hf : MeasurePreserving f μ μb) :
    Lp E p μb →ₗᵢ[𝕜] Lp E p μ

(hf : MeasureTheory.MeasurePreserving f μ μb)

∀ (a : ↥(MeasureTheory.Lp E p μb)),
  ↑((MeasureTheory.Lp.compMeasurePreservingₗᵢ 𝕜 f hf) a) = (↑a).compMeasurePreserving f hf


lemma exact_of_iso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂) (h₁ : S₁.Exact) :
    S₂.Exact

{S₁ S₂ : CategoryTheory.ComposableArrows C n}


@[simp, reassoc] -- reassoc lemma does not need `simp`
theorem comp_appLE {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z) (U V e) :
    (f ≫ g).appLE U V e = g.app U ≫ f.appLE _ V e

(e : V ≤ (TopologicalSpace.Opens.map (f ≫ g).val.base).obj U)

AlgebraicGeometry.Scheme.Hom.appLE (f ≫ g) U V e =
  AlgebraicGeometry.Scheme.Hom.app g U ≫
    AlgebraicGeometry.Scheme.Hom.appLE f ((TopologicalSpace.Opens.map g.val.base).obj U) V e


@[reassoc (attr := simp)]
theorem ofMkLE_comp_ofLE {B A₁ : C} (f : A₁ ⟶ B) [Mono f] (X Y : Subobject B) (h₁ : mk f ≤ X)
    (h₂ : X ≤ Y) : ofMkLE f X h₁ ≫ ofLE X Y h₂ = ofMkLE f Y (h₁.trans h₂)

(h₁ : CategoryTheory.Subobject.mk f ≤ X)

CategoryTheory.CategoryStruct.comp (CategoryTheory.Subobject.ofMkLE f X h₁) (X.ofLE Y h₂) =
  CategoryTheory.Subobject.ofMkLE f Y ⋯


lemma yonedaEquiv_naturality' {X Y : Cᵒᵖ} {F : Cᵒᵖ ⥤ Type v₁} (f : yoneda.obj (unop X) ⟶ F)
    (g : X ⟶ Y) : F.map g (yonedaEquiv f) = yonedaEquiv (yoneda.map g.unop ≫ f)

{F : CategoryTheory.Functor Cᵒᵖ (Type v₁)}

(f : CategoryTheory.yoneda.obj (Opposite.unop X) ⟶ F)

F.map g (CategoryTheory.yonedaEquiv f) =
  CategoryTheory.yonedaEquiv (CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map g.unop) f)


/-- `F.mapTriangle` commutes with the rotation of triangles. -/
@[simps!]
def mapTriangleRotateIso :
    F.mapTriangle ⋙ Pretriangulated.rotate D ≅
      Pretriangulated.rotate C ⋙ F.mapTriangle

(X : CategoryTheory.Pretriangulated.Triangle C)

(F.mapTriangleRotateIso.hom.app X).hom₁ = CategoryTheory.CategoryStruct.id (F.obj X.obj₂)


/-- Rewrite for `InterpStrip` on the open vertical strip. -/
lemma interpStrip_eq_of_mem_verticalStrip (z : ℂ) (hz : z ∈ verticalStrip 0 1) :
    interpStrip f z = (sSupNormIm f 0) ^ (1 - z) * (sSupNormIm f 1) ^ z

(hz : z ∈ Complex.HadamardThreeLines.verticalStrip 0 1)

Complex.HadamardThreeLines.interpStrip f z =
  ↑(Complex.HadamardThreeLines.sSupNormIm f 0) ^ (1 - z) * ↑(Complex.HadamardThreeLines.sSupNormIm f 1) ^ z


theorem Function.Surjective.pathConnectedSpace [PathConnectedSpace X]
    {f : X → Y} (hf : Surjective f) (hf' : Continuous f) : PathConnectedSpace Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[PathConnectedSpace X]
{f : X → Y}
(hf : Function.Surjective f)
(hf' : Continuous f)


lemma slope_lt_deriv (hfc : StrictConvexOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableAt ℝ f y) :
    slope f x y < deriv f y

{S : Set ℝ}
{f : ℝ → ℝ}
{x y : ℝ}
(hfc : StrictConvexOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hfd : DifferentiableAt ℝ f y)


@[simp]
theorem Equiv.optionCongr_one {α : Type*} : (1 : Perm α).optionCongr = 1


theorem comp_single (p : R[X]) (i : ℕ) (m : M) : comp p (single R i m) = p ^ i • single R 0 m

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(p : R[X])
(i : ℕ)
(m : M)

(PolynomialModule.comp p) ((PolynomialModule.single R i) m) = p ^ i • (PolynomialModule.single R 0) m


protected theorem ne_of_lt {a b : String} (h : a < b) : a ≠ b


theorem twoCocycles_map_one_fst (f : twoCocycles A) (g : G) :
    f.1 (1, g) = f.1 (1, 1)

{k G : Type u}
[CommRing k]
[Group G]
{A : Rep k G}
(f : ↥(groupCohomology.twoCocycles A))
(g : G)


theorem Prod.tendsto_iff {X} (seq : X → Y × Z) {f : Filter X} (p : Y × Z) :
    Tendsto seq f (𝓝 p) ↔
      Tendsto (fun n => (seq n).fst) f (𝓝 p.fst) ∧ Tendsto (fun n => (seq n).snd) f (𝓝 p.snd)

{Y : Type v}
{Z : Type u_1}
[TopologicalSpace Y]
[TopologicalSpace Z]
{X : Type u_5}
(seq : X → Y × Z)
{f : Filter X}
(p : Y × Z)

Filter.Tendsto seq f (𝓝 p) ↔
  Filter.Tendsto (fun n => (seq n).1) f (𝓝 p.1) ∧ Filter.Tendsto (fun n => (seq n).2) f (𝓝 p.2)


lemma homologySequence_exact₁ :
    (ShortComplex.mk _ _ (F.homologySequenceδ_comp T hT _ _ h)).Exact

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(CategoryTheory.ShortComplex.mk (F.homologySequenceδ T n₀ n₁ h) ((F.shift n₁).map T.mor₁) ⋯).Exact


/-- If `V : ι → Set X` is a decreasing family of compact sets then any neighborhood of
`⋂ i, V i` contains some `V i`. This is a version of `exists_subset_nhds_of_isCompact'` where we
don't need to assume each `V i` closed because it follows from compactness since `X` is
assumed to be Hausdorff. -/
theorem exists_subset_nhds_of_isCompact [T2Space X] {ι : Type*} [Nonempty ι] {V : ι → Set X}
    (hV : Directed (· ⊇ ·) V) (hV_cpct : ∀ i, IsCompact (V i)) {U : Set X}
    (hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x) : ∃ i, V i ⊆ U

(hV : Directed (fun x x_1 => x ⊇ x_1) V)


theorem unary_relation_sSup_iff {α : Type*} (s : Set (α → Prop)) {a : α} :
    sSup s a ↔ ∃ r : α → Prop, r ∈ s ∧ r a

{α : Type u_9}
(s : Set (α → Prop))
{a : α}


theorem condexpInd_nonneg {E} [NormedLatticeAddCommGroup E] [NormedSpace ℝ E] [OrderedSMul ℝ E]
    (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (x : E) (hx : 0 ≤ x) : 0 ≤ condexpInd E hm μ s x

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
{E : Type u_8}
[NormedLatticeAddCommGroup E]
[NormedSpace ℝ E]
[OrderedSMul ℝ E]
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(x : E)
(hx : 0 ≤ x)

0 ≤ (MeasureTheory.condexpInd E hm μ s) x


theorem tendsto_measure_Ici_atBot [SemilatticeInf α] [h : (atBot : Filter α).IsCountablyGenerated]
    (μ : Measure α) : Tendsto (fun x => μ (Ici x)) atBot (𝓝 (μ univ))

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

Filter.Tendsto (fun x => μ (Set.Ici x)) Filter.atBot (nhds (μ Set.univ))


theorem Wbtw.mem_affineSpan {x y z : P} (h : Wbtw R x y z) : y ∈ line[R, x, z]

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


theorem to_of_int (n : ℤ) : ((n : ZNum) : ℤ) = n


@[simp]
theorem card_addOrderOf_eq_totient {n : ℕ} :
    Nat.card { u : AddCircle p // addOrderOf u = n } = n.totient

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p : 𝕜)
[hp : Fact (0 < p)]
{n : ℕ}

Nat.card { u // addOrderOf u = n } = n.totient


theorem Pairwise.insert_of_not_mem (ha : a ∉ s) (hs : s.Pairwise r) (h : ∀ b ∈ s, r a b ∧ r b a) :
    (insert a s).Pairwise r

{α : Type u_1}
{r : α → α → Prop}
{s : Set α}
{a : α}
(ha : a ∉ s)
(hs : s.Pairwise r)
(h : ∀ b ∈ s, r a b ∧ r b a)


@[simp]
theorem mem_pathComponent_self (x : X) : x ∈ pathComponent x

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


/-- An angle in a non-degenerate right-angled triangle is less than `π / 2`. -/
theorem angle_lt_pi_div_two_of_angle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∠ p₁ p₂ p₃ = π / 2)
    (h0 : p₃ ≠ p₂) : ∠ p₂ p₃ p₁ < π / 2

{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₂)


@[to_additive AntilipschitzWith.le_mul_norm]
theorem AntilipschitzWith.le_mul_norm' {f : E → F} {K : ℝ≥0} (h : AntilipschitzWith K f)
    (hf : f 1 = 1) (x) : ‖x‖ ≤ K * ‖f x‖

{E : Type u_3}
{F : Type u_4}
[SeminormedGroup E]
[SeminormedGroup F]
{f : E → F}
{K : ℝ≥0}
(h : AntilipschitzWith K f)
(hf : f 1 = 1)
(x : E)

‖x‖ ≤ ↑K * ‖f x‖


@[simp]
theorem coe_embedding (i : Fin c.length) (j : Fin (c.blocksFun i)) :
    (c.embedding i j : ℕ) = c.sizeUpTo i + j

{n : ℕ}
(c : Composition n)
(i : Fin c.length)
(j : Fin (c.blocksFun i))

↑((c.embedding i) j) = c.sizeUpTo ↑i + ↑j


@[to_additive FS_iter_tail_sub_FS]
theorem FP_drop_subset_FP {M} [Semigroup M] (a : Stream' M) (n : ℕ) : FP (a.drop n) ⊆ FP a

{M : Type u_1}
[Semigroup M]
(a : Stream' M)
(n : ℕ)

Hindman.FP (Stream'.drop n a) ⊆ Hindman.FP a


theorem map_le_range [RingHomSurjective τ₁₂] {f : F} {p : Submodule R M} : map f p ≤ range f

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_6}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_11}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
[RingHomSurjective τ₁₂]
{f : F}
{p : Submodule R M}


theorem invertible_of_principal (I : FractionalIdeal R₁⁰ K)
    [Submodule.IsPrincipal (I : Submodule R₁ K)] (h : I ≠ 0) : I * I⁻¹ = 1

(K : Type u_3)
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]
(I : FractionalIdeal R₁⁰ K)
[(↑I).IsPrincipal]
(h : I ≠ 0)


/-- Every lower adjoint induces a closure operator given by the composition. This is the partial
order version of the statement that every adjunction induces a monad. -/
@[simps]
def closureOperator : ClosureOperator α

{α : Type u_1}
{β : Type u_4}
[PartialOrder α]
[Preorder β]
{u : β → α}
(l : LowerAdjoint u)
(x : α)

l.closureOperator.IsClosed x = (u (l.toFun x) = x)


@[simp] theorem join_principal_eq_sSup {s : Set (Filter α)} : join (𝓟 s) = sSup s


theorem isBoundedBilinearMap_apply : IsBoundedBilinearMap 𝕜 fun p : (E →L[𝕜] F) × E => p.1 p.2

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]


theorem eps_pos (hPε : 100 ≤ (4 : ℝ) ^ P.parts.card * ε ^ 5) : 0 < ε

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{P : Finpartition Finset.univ}
{ε : ℝ}
(hPε : 100 ≤ 4 ^ P.parts.card * ε ^ 5)


theorem mem_normalizedFactors_eq_of_associated {a b c : α} (ha : a ∈ normalizedFactors c)
    (hb : b ∈ normalizedFactors c) (h : Associated a b) : a = b

(ha : a ∈ UniqueFactorizationMonoid.normalizedFactors c)

(hb : b ∈ UniqueFactorizationMonoid.normalizedFactors c)


/-- The associator for tensor, `(X ⊗ Y) ⊗ Z ≅ X ⊗ (Y ⊗ Z)` in `Dial C`. -/
@[simps!]
def associator (X Y Z : Dial C) : tensorObj (tensorObj X Y) Z ≅ tensorObj X (tensorObj Y Z)

(X.associator Y Z).hom.f =
  CategoryTheory.Limits.prod.lift
    (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.fst)
    (CategoryTheory.Limits.prod.lift
      (CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.fst CategoryTheory.Limits.prod.snd)
      CategoryTheory.Limits.prod.snd)


/-- A constructor for a subbimodule which demands closure under the two sets of scalars
individually, rather than jointly via their tensor product.

Note that `R` plays no role but it is convenient to make this generalisation to support the cases
`R = ℕ` and `R = ℤ` which both show up naturally. See also `Subbimodule.baseChange`. -/
@[simps]
def mk (p : AddSubmonoid M) (hA : ∀ (a : A) {m : M}, m ∈ p → a • m ∈ p)
    (hB : ∀ (b : B) {m : M}, m ∈ p → b • m ∈ p) : Submodule (A ⊗[R] B) M


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

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


/-- The images of disjoint lists under an injective map are disjoint -/
theorem disjoint_map {f : α → β} {s t : List α} (hf : Function.Injective f)
    (h : Disjoint s t) : Disjoint (s.map f) (t.map f)

{α : Type u}
{β : Type v}
{f : α → β}
{s t : List α}
(hf : Function.Injective f)
(h : s.Disjoint t)


@[simp] theorem piCurry_apply {ι : Type*} {κ : ι → Type*} (α : ∀ i, κ i → Type*)
    [∀ i k, AddCommMonoid (α i k)] [∀ i k, Module R (α i k)]
    (f : ∀ x : Σ i, κ i, α x.1 x.2) :
    piCurry R α f = Sigma.curry f

[(i : ι) → (k : κ i) → AddCommMonoid (α i k)]

[(i : ι) → (k : κ i) → Module R (α i k)]

(f : (x : (i : ι) × κ i) → α x.fst x.snd)

(LinearEquiv.piCurry R α) f = Sigma.curry f


theorem finite_range (f : α →ₛ β) : (Set.range f).Finite

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


@[to_additive add_const]
theorem Antitone.mul_const' [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : Antitone f) (a : α) :
    Antitone fun x => f x * a

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


theorem dvd_coord_smul (i : ι) (m : M) (r : R) : r ∣ b.coord i (r • m)

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(i : ι)
(m : M)
(r : R)


theorem induction_linear {p : (α →₀ M) → Prop} (f : α →₀ M) (h0 : p 0)
    (hadd : ∀ f g : α →₀ M, p f → p g → p (f + g)) (hsingle : ∀ a b, p (single a b)) : p f

(hadd : ∀ (f g : α →₀ M), p f → p g → p (f + g))

(hsingle : ∀ (a : α) (b : M), p (Finsupp.single a b))


@[simp]
lemma bliminf_not_inf : bliminf u f (¬p ·) ⊓ bliminf u f p = liminf u f

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

(Filter.bliminf u f fun x => ¬p x) ⊓ Filter.bliminf u f p = Filter.liminf u f


lemma mem_homologicalKernel_iff [F.IsHomological] [F.ShiftSequence ℤ] (X : C) :
    F.homologicalKernel.P X ↔ ∀ (n : ℤ), IsZero ((F.shift n).obj X)

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

F.homologicalKernel.P X ↔ ∀ (n : ℤ), CategoryTheory.Limits.IsZero ((F.shift n).obj X)


theorem IsBigOWith.weaken (h : IsBigOWith c l f g') (hc : c ≤ c') : IsBigOWith c' l f g'

{α : Type u_1}
{E : Type u_3}
{F' : Type u_7}
[Norm E]
[SeminormedAddCommGroup F']
{c c' : ℝ}
{f : α → E}
{g' : α → F'}
{l : Filter α}
(h : Asymptotics.IsBigOWith c l f g')
(hc : c ≤ c')


@[to_additive]
theorem rightRel_apply {x y : α} : @Setoid.r _ (rightRel s) x y ↔ y * x⁻¹ ∈ s

{α : Type u_1}
[Group α]
{s : Subgroup α}
{x y : α}


theorem shiftLeft_eq_mul_pow (m) : ∀ n, m <<< n = m * 2 ^ n


@[to_additive (attr := simp)]
theorem map_of (f : α → β) (x : α) : map f (of x) = of (f x)

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

(FreeAddMonoid.map f) (FreeAddMonoid.of x) = FreeAddMonoid.of (f x)


/-- A morphism of snake inputs involve four morphisms of short complexes
which make the obvious diagram commute. -/
@[ext]
structure Hom :=
  /-- a morphism between the zeroth lines -/
  f₀ : S₁.L₀ ⟶ S₂.L₀
  /-- a morphism between the first lines -/
  f₁ : S₁.L₁ ⟶ S₂.L₁
  /-- a morphism between the second lines -/
  f₂ : S₁.L₂ ⟶ S₂.L₂
  /-- a morphism between the third lines -/
  f₃ : S₁.L₃ ⟶ S₂.L₃
  comm₀₁ : f₀ ≫ S₂.v₀₁ = S₁.v₀₁ ≫ f₁ := by aesop_cat
  comm₁₂ : f₁ ≫ S₂.v₁₂ = S₁.v₁₂ ≫ f₂ := by aesop_cat
  comm₂₃ : f₂ ≫ S₂.v₂₃ = S₁.v₂₃ ≫ f₃ := by aesop_cat

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

CategoryTheory.CategoryStruct.comp self.f₁ S₂.v₁₂ = CategoryTheory.CategoryStruct.comp S₁.v₁₂ self.f₂


protected theorem zpow_add {x : ℝ≥0∞} (hx : x ≠ 0) (h'x : x ≠ ∞) (m n : ℤ) :
    x ^ (m + n) = x ^ m * x ^ n

{x : ENNReal}
(hx : x ≠ 0)
(h'x : x ≠ ⊤)
(m n : ℤ)


@[to_additive (attr := simp)]
lemma mk_zpow [DivInvMonoid M] (a : M) (n : ℤ) : mk (a ^ n) = mk a ^ n

{M : Type u_1}
[SubNegMonoid M]
(a : M)
(n : ℤ)

DomAddAct.mk (n • a) = n • DomAddAct.mk a


lemma Pi.uniformSpace_comap_restrict (S : Set ι) :
    UniformSpace.comap (S.restrict) (Pi.uniformSpace (fun i : S ↦ α i)) =
    ⨅ i ∈ S, UniformSpace.comap (eval i) (U i)

{ι : Type u_1}
(α : ι → Type u)
[U : (i : ι) → UniformSpace (α i)]
(S : Set ι)

UniformSpace.comap S.restrict (Pi.uniformSpace fun i => α ↑i) = ⨅ i ∈ S, UniformSpace.comap (Function.eval i) (U i)


@[to_additive]
theorem finprod_mem_eq_prod_filter (f : α → M) (s : Set α) [DecidablePred (· ∈ s)]
    (hf : (mulSupport f).Finite) :
    ∏ᶠ i ∈ s, f i = ∏ i ∈ Finset.filter (· ∈ s) hf.toFinset, f i

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(f : α → M)
(s : Set α)
[DecidablePred fun x => x ∈ s]
(hf : (Function.mulSupport f).Finite)

∏ᶠ (i : α) (_ : i ∈ s), f i = ∏ i ∈ Finset.filter (fun x => x ∈ s) hf.toFinset, f i


/-- If `x` is a fixed point of `f` and `g` is a left inverse of `f`, then `x` is a fixed
point of `g`. -/
theorem to_leftInverse (hf : IsFixedPt f x) (h : LeftInverse g f) : IsFixedPt g x

{α : Type u}
{f g : α → α}
{x : α}
(hf : Function.IsFixedPt f x)
(h : Function.LeftInverse g f)


theorem isCoatomic_of_orderTop_gt_wellFounded [OrderTop α]
    (h : WellFounded ((· > ·) : α → α → Prop)) : IsCoatomic α

{α : Type u_2}
[PartialOrder α]
[OrderTop α]
(h : WellFounded fun x x_1 => x > x_1)


theorem comap_mono (S T : Subgroupoid D) : S ≤ T → comap φ S ≤ comap φ T

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
(S T : CategoryTheory.Subgroupoid D)

S ≤ T → CategoryTheory.Subgroupoid.comap φ S ≤ CategoryTheory.Subgroupoid.comap φ T


theorem get_mem {o : Part α} (h) : get o h ∈ o


{R : Type u}
[CommSemiring R]
{I J : Ideal R}


theorem tail_eq_of_cons_eq (H : h₁ :: t₁ = h₂ :: t₂) : t₁ = t₂

∀ {α : Type u_1} {h₁ : α} {t₁ : List α} {h₂ : α} {t₂ : List α}, h₁ :: t₁ = h₂ :: t₂ → t₁ = t₂


/-- The image of a strictly convex set under an affine map is strictly convex. -/
theorem StrictConvex.affine_image (hs : StrictConvex 𝕜 s) {f : E →ᵃ[𝕜] F} (hf : IsOpenMap f) :
    StrictConvex 𝕜 (f '' s)

{𝕜 : Type u_1}
{E : Type u_3}
{F : Type u_4}
[OrderedRing 𝕜]
[TopologicalSpace E]
[TopologicalSpace F]
[AddCommGroup E]
[AddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
{s : Set E}
(hs : StrictConvex 𝕜 s)
{f : E →ᵃ[𝕜] F}
(hf : IsOpenMap ⇑f)


/-- The real logarithm function tends to `+∞` at `+∞`. -/
theorem tendsto_log_atTop : Tendsto log atTop atTop

Filter.Tendsto Real.log Filter.atTop Filter.atTop


theorem measurableSet_range_inr [MeasurableSpace α] :
    MeasurableSet (range Sum.inr : Set (α ⊕ β))

{α : Type u_1}
{β : Type u_2}
{mβ : MeasurableSpace β}
[MeasurableSpace α]


@[simp]
theorem succ_coe (a : α) : succ (↑a : WithBot α) = ↑(succ a)

{α : Type u_1}
[Preorder α]
[OrderBot α]
[SuccOrder α]
(a : α)


@[to_additive]
theorem commute_subtype_of_commute
    (hcomm : Pairwise fun i j : ι => ∀ x y : G, x ∈ H i → y ∈ H j → Commute x y) (i j : ι)
    (hne : i ≠ j) :
    ∀ (x : H i) (y : H j), Commute ((H i).subtype x) ((H j).subtype y)

(hcomm : Pairwise fun i j => ∀ (x y : G), x ∈ H i → y ∈ H j → Commute x y)


@[simp]
theorem Complex.volume_closedBall (a : ℂ) (r : ℝ) :
    volume (Metric.closedBall a r) = .ofReal r ^ 2 * NNReal.pi

MeasureTheory.volume (Metric.closedBall a r) = ENNReal.ofReal r ^ 2 * ↑NNReal.pi


/-- Quotienting the `center G` reduces the nilpotency class by 1 -/
theorem nilpotencyClass_quotient_center [hH : IsNilpotent G] :
    Group.nilpotencyClass (G ⧸ center G) = Group.nilpotencyClass G - 1

{G : Type u_1}
[Group G]
[hH : Group.IsNilpotent G]

Group.nilpotencyClass (G ⧸ Subgroup.center G) = Group.nilpotencyClass G - 1


theorem uniformContinuous_inr [Zero R] : UniformContinuous (inr : M → tsze R M)

{R : Type u_3}
{M : Type u_4}
[UniformSpace R]
[UniformSpace M]
[Zero R]


/-- Comparison test of convergence of series of non-negative real numbers. -/
theorem Summable.of_nonneg_of_le {f g : β → ℝ} (hg : ∀ b, 0 ≤ g b) (hgf : ∀ b, g b ≤ f b)
    (hf : Summable f) : Summable g

{β : Type u_2}
{f g : β → ℝ}
(hg : ∀ (b : β), 0 ≤ g b)
(hgf : ∀ (b : β), g b ≤ f b)
(hf : Summable f)


@[simp]
lemma inr_fst_assoc {K : CochainComplex C ℤ} {d e f : ℤ} (γ : Cochain F K d)
    (he : 1 + d = e) (hf : 0 + e = f) :
    (Cochain.ofHom (inr φ)).comp ((fst φ).1.comp γ he) hf = 0

(γ : CochainComplex.HomComplex.Cochain F K d)

(CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.inr φ)).comp
    ((↑(CochainComplex.mappingCone.fst φ)).comp γ he) hf =
  0


theorem trace_apply (x) : trace R S x = LinearMap.trace R S (lmul R S x)

(R : Type u_1)
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
(x : S)

(Algebra.trace R S) x = (LinearMap.trace R S) ((Algebra.lmul R S) x)


@[to_additive (attr := simp)]
protected theorem Units.isUnit [Monoid M] (u : Mˣ) : IsUnit (u : M)


@[to_additive]
theorem finprod_eq_prod_of_fintype [Fintype α] (f : α → M) : ∏ᶠ i : α, f i = ∏ i, f i

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


theorem smeval_ascPochhammer_int_ofNat [NatPowAssoc R] (r : R) : ∀ n : ℕ,
    smeval (ascPochhammer ℤ n) r = smeval (ascPochhammer ℕ n) r

{R : Type u_1}
[NonAssocRing R]
[Pow R ℕ]
[NatPowAssoc R]
(r : R)
(n : ℕ)

(ascPochhammer ℤ n).smeval r = (ascPochhammer ℕ n).smeval r


/-- Convert arrows in the category of groupoids to functors,
which sometimes helps in applying simp lemmas -/
theorem hom_to_functor {C D E : Grpd.{v, u}} (f : C ⟶ D) (g : D ⟶ E) : f ≫ g = f ⋙ g

{C D E : CategoryTheory.Grpd}
(f : C ⟶ D)
(g : D ⟶ E)

CategoryTheory.CategoryStruct.comp f g = CategoryTheory.Functor.comp f g


theorem Spec_iff {R S : CommRingCat.{u}} {φ : R ⟶ S} :
    P (Spec.map φ) ↔ Q φ

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

{Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}


lemma ContinuousOn.finset_sup' (hne : s.Nonempty) (hs : ∀ i ∈ s, ContinuousOn (f i) t) :
    ContinuousOn (s.sup' hne f) t

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


/-- A function `f` satisfies `IsBoundedLinearMap 𝕜 f` if it is linear and satisfies the
inequality `‖f x‖ ≤ M * ‖x‖` for some positive constant `M`. -/
structure IsBoundedLinearMap (𝕜 : Type*) [NormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
  [NormedSpace 𝕜 E] {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] (f : E → F) extends
  IsLinearMap 𝕜 f : Prop where
  bound : ∃ M, 0 < M ∧ ∀ x : E, ‖f x‖ ≤ M * ‖x‖

{𝕜 : Type u_5}
[NormedField 𝕜]
{E : Type u_6}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_7}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
(self : IsBoundedLinearMap 𝕜 f)


theorem IsComplement'.sup_eq_top (h : IsComplement' H K) : H ⊔ K = ⊤

{G : Type u_1}
[Group G]
{H K : Subgroup G}
(h : H.IsComplement' K)


theorem SurjOn.invOn_invFunOn [Nonempty α] (h : SurjOn f s t) :
    InvOn (invFunOn f s) f (invFunOn f s '' t) t

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
[Nonempty α]
(h : Set.SurjOn f s t)

Set.InvOn (Function.invFunOn f s) f (Function.invFunOn f s '' t) t


theorem CommRingCat.comp_eq_ring_hom_comp {R S T : CommRingCat} (f : R ⟶ S) (g : S ⟶ T) :
    f ≫ g = g.comp f


/-- Given a `NonUnitalContinuousFunctionalCalculus S q`. If we form the predicate `p` for `a : A`
characterized by: `q a` and the quasispectrum of `a` restricts to the scalar subring `R` via
`f : C(S, R)`, then we can get a restricted functional calculus
`NonUnitalContinuousFunctionalCalculus R p`. -/
protected theorem cfc (f : C(S, R)) (halg : UniformEmbedding (algebraMap R S)) (h0 : p 0)
    (h : ∀ a, p a ↔ q a ∧ QuasispectrumRestricts a f) (h_cpct : ∀ a, q a → CompactSpace (σₙ S a)) :
    NonUnitalContinuousFunctionalCalculus R p

(halg : UniformEmbedding ⇑(algebraMap R S))

(h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f)

(h_cpct : ∀ (a : A), q a → CompactSpace ↑(quasispectrum S a))


theorem leftAdjointUniq_inv_app {F F' : C ⥤ D} {G : D ⥤ C} (adj1 : F ⊣ G) (adj2 : F' ⊣ G) (x : C) :
    (leftAdjointUniq adj1 adj2).inv.app x = (leftAdjointUniq adj2 adj1).hom.app x

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F F' : C ⥤ D}
{G : D ⥤ C}
(adj1 : F ⊣ G)
(adj2 : F' ⊣ G)
(x : C)

(adj1.leftAdjointUniq adj2).inv.app x = (adj2.leftAdjointUniq adj1).hom.app x


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

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

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


@[aesop safe 20 (rule_sets := [Measurable])]
protected theorem mul [MonoidWithZero β] [ContinuousMul β] (hf : FinStronglyMeasurable f μ)
    (hg : FinStronglyMeasurable g μ) : FinStronglyMeasurable (f * g) μ

(hf : MeasureTheory.FinStronglyMeasurable f μ)

(hg : MeasureTheory.FinStronglyMeasurable g μ)

MeasureTheory.FinStronglyMeasurable (f * g) μ


theorem wronskian_neg_eq (a b : R[X]) : -wronskian a b = wronskian b a

{R : Type u_1}
[CommRing R]
(a b : R[X])


lemma sup_ringCon (I J : TwoSidedIdeal R) : (I ⊔ J).ringCon = I.ringCon ⊔ J.ringCon

(R : Type u_1)
[NonUnitalNonAssocRing R]
(I J : TwoSidedIdeal R)


theorem nnnorm_ofSubsingleton_id [Subsingleton ι] [Nontrivial G] (i : ι) :
    ‖ofSubsingleton 𝕜 G G i (.id _ _)‖₊ = 1

(𝕜 : Type u)
{ι : Type v}
(G : Type wG)
[Fintype ι]
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[Subsingleton ι]
[Nontrivial G]
(i : ι)

‖(ContinuousMultilinearMap.ofSubsingleton 𝕜 G G i) (ContinuousLinearMap.id 𝕜 G)‖₊ = 1


@[to_additive]
theorem smul_set_iInter₂_subset (a : α) (t : ∀ i, κ i → Set β) :
    (a • ⋂ (i) (j), t i j) ⊆ ⋂ (i) (j), a • t i j

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[VAdd α β]
(a : α)
(t : (i : ι) → κ i → Set β)

a +ᵥ ⋂ i, ⋂ j, t i j ⊆ ⋂ i, ⋂ j, a +ᵥ t i j


theorem add_eq_max' {a b : Cardinal} (ha : ℵ₀ ≤ b) : a + b = max a b


theorem Sbtw.trans_wbtw_right_ne [NoZeroSMulDivisors R V] {w x y z : P} (h₁ : Sbtw R w x z)
    (h₂ : Wbtw R x y z) : w ≠ y

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


theorem sumsq_eq_zero (x) : ∀ l, sumsq l x = 0 ↔ l.Forall fun a : Poly α => a x = 0

{α : Type u_1}
(x : α → ℕ)
(l : List (Poly α))

(Poly.sumsq l) x = 0 ↔ List.Forall (fun a => a x = 0) l


theorem rat_rawCast_neg {R} [DivisionRing R] :
    (Rat.rawCast (.negOfNat n) d : R) = Int.rawCast (.negOfNat n) / Nat.rawCast d

{n d : ℕ}
{R : Type u_2}
[DivisionRing R]

Rat.rawCast (Int.negOfNat n) d = (Int.negOfNat n).rawCast / d.rawCast


/--
The `insert` function is balanced if the input is balanced.
(We lose track of both the color and the black-height of the result,
so this is only suitable for use on the root of the tree.)
-/
theorem Balanced.insert {t : RBNode α} (h : t.Balanced c n) :
    ∃ c' n', (insert cmp t v).Balanced c' n'

{α : Type u_1}
{c : Batteries.RBColor}
{n : Nat}
{cmp : α → α → Ordering}
{v : α}
{t : Batteries.RBNode α}
(h : t.Balanced c n)

∃ c' n', (Batteries.RBNode.insert cmp t v).Balanced c' n'


theorem sign_ne_zero_iff {θ : Angle} : θ.sign ≠ 0 ↔ θ ≠ 0 ∧ θ ≠ π

θ.sign ≠ 0 ↔ θ ≠ 0 ∧ θ ≠ ↑π


@[to_additive (attr := fun_prop)]
theorem ContinuousOn.zpow {f : α → G} {s : Set α} (hf : ContinuousOn f s) (z : ℤ) :
    ContinuousOn (fun x => f x ^ z) s

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
[TopologicalSpace α]
{f : α → G}
{s : Set α}
(hf : ContinuousOn f s)
(z : ℤ)


/-- If `f` is a monoid homomorphism then `f (a * b) = f a * f b`. -/
@[to_additive "If `f` is an additive monoid homomorphism then `f (a + b) = f a + f b`."]
protected theorem MonoidHom.map_mul [MulOneClass M] [MulOneClass N] (f : M →* N) (a b : M) :
    f (a * b) = f a * f b

{M : Type u_4}
{N : Type u_5}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
(a b : M)


/-- The pigeonhole principle for finitely many pigeons counted by weight, strict inequality version:
if the total weight of a finite set of pigeons is greater than `n • b`, and they are sorted into
`n` pigeonholes, then for some pigeonhole, the total weight of the pigeons in this pigeonhole is
greater than `b`. -/
theorem exists_lt_sum_fiber_of_maps_to_of_nsmul_lt_sum (hf : ∀ a ∈ s, f a ∈ t)
    (hb : t.card • b < ∑ x ∈ s, w x) : ∃ y ∈ t, b < ∑ x ∈ s.filter fun x => f x = y, w x

{α : Type u}
{β : Type v}
{M : Type w}
[DecidableEq β]
{s : Finset α}
{t : Finset β}
{f : α → β}
{w : α → M}
{b : M}
[LinearOrderedCancelAddCommMonoid M]
(hf : ∀ a ∈ s, f a ∈ t)
(hb : t.card • b < ∑ x ∈ s, w x)

∃ y ∈ t, b < ∑ x ∈ Finset.filter (fun x => f x = y) s, w x


/-- If three points are not collinear, the angle between them is less than π. -/
theorem angle_lt_pi_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear ℝ ({p₁, p₂, p₃} : Set P)) :
    ∠ p₁ p₂ p₃ < π

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}
(h : ¬Collinear ℝ {p₁, p₂, p₃})


@[to_additive]
theorem inv_apply [Inv β] (f : α →ₛ β) (x : α) : f⁻¹ x = (f x)⁻¹

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Inv β]
(f : MeasureTheory.SimpleFunc α β)
(x : α)


theorem upperSemicontinuousWithinAt_iff_limsup_le {f : α → γ} :
    UpperSemicontinuousWithinAt f s x ↔ limsup f (𝓝[s] x) ≤ f x

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{s : Set α}
{γ : Type u_3}
[CompleteLinearOrder γ]
[DenselyOrdered γ]
{f : α → γ}

UpperSemicontinuousWithinAt f s x ↔ Filter.limsup f (𝓝[s] x) ≤ f x


lemma shiftFunctorAdd'_zero_add_inv_app (a : A) (X : C) :
    (shiftFunctorAdd' C 0 a a (zero_add a)).inv.app X =
    ((shiftFunctorZero C A).hom.app X)⟦a⟧'

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
[CategoryTheory.HasShift C A]
(a : A)
(X : C)

(CategoryTheory.shiftFunctorAdd' C 0 a a ⋯).inv.app X =
  (CategoryTheory.shiftFunctor C a).map ((CategoryTheory.shiftFunctorZero C A).hom.app X)


theorem exists_mem (ha : a ∈ s) : ∃ t ∈ P.parts, a ∈ t

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(P : Finpartition s)
{a : α}
(ha : a ∈ s)


lemma Scheme.Hom.embedding {X Y : Scheme} (f : Hom X Y) [IsPreimmersion f] : Embedding f.1.base

{X Y : AlgebraicGeometry.Scheme}
(f : X.Hom Y)
[AlgebraicGeometry.IsPreimmersion f]


theorem zeroLocus_vanishingIdeal_galoisConnection :
    @GaloisConnection (Ideal (MvPolynomial σ k)) (Set (σ → k))ᵒᵈ _ _ zeroLocus vanishingIdeal


/-- The scalar multiplication of a constant and a `C^n` function within a set at a point is `C^n`
within this set at this point. -/
theorem ContDiffWithinAt.const_smul {s : Set E} {f : E → F} {x : E} (c : R)
    (hf : ContDiffWithinAt 𝕜 n f s x) : ContDiffWithinAt 𝕜 n (fun y => c • f y) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{R : Type u_3}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
{s : Set E}
{f : E → F}
{x : E}
(c : R)
(hf : ContDiffWithinAt 𝕜 n f s x)


protected theorem add_right_cancel (h₁ : c ≡ d [ZMOD n]) (h₂ : a + c ≡ b + d [ZMOD n]) :
    a ≡ b [ZMOD n]

{n a b c d : ℤ}
(h₁ : c ≡ d [ZMOD n])
(h₂ : a + c ≡ b + d [ZMOD n])


theorem normalClosure_mono {s t : Set G} : s ⊆ t → normalClosure s ⊆ normalClosure t

s ⊆ t → Group.normalClosure s ⊆ Group.normalClosure t


/-- Every separable polynomial splits in the field extension `f : k →+* K` if `K` is
separably closed.

See also `IsSepClosed.splits_domain` for the case where `k` is separably closed.
-/
theorem IsSepClosed.splits_codomain [IsSepClosed K] {f : k →+* K}
    (p : k[X]) (h : p.Separable) : p.Splits f

{k : Type u}
[Field k]
{K : Type v}
[Field K]
[IsSepClosed K]
{f : k →+* K}
(p : k[X])
(h : p.Separable)


@[simp]
theorem to_from (X : C') : fromShrinkHoms (toShrinkHoms X) = X

(CategoryTheory.ShrinkHoms.toShrinkHoms X).fromShrinkHoms = X


theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius

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


lemma frontier_closedBall_subset_sphere : frontier (closedBall x ε) ⊆ sphere x ε

{α : Type u_2}
[PseudoMetricSpace α]
{x : α}
{ε : ℝ}

frontier (Metric.closedBall x ε) ⊆ Metric.sphere x ε


protected theorem integrable [LE E] (hf : Supermartingale f ℱ μ) (i : ι) : Integrable (f i) μ

(hf : MeasureTheory.Supermartingale f ℱ μ)


theorem toBlock_mul_eq_add {m n k : Type*} [Fintype n] (p : m → Prop) (q : n → Prop)
    [DecidablePred q] (r : k → Prop) (A : Matrix m n R) (B : Matrix n k R) : (A * B).toBlock p r =
    A.toBlock p q * B.toBlock q r + (A.toBlock p fun i => ¬q i) * B.toBlock (fun i => ¬q i) r

{R : Type u_10}
[CommRing R]
{m : Type u_14}
{n : Type u_15}
{k : Type u_16}
[Fintype n]
(p : m → Prop)
(q : n → Prop)
[DecidablePred q]
(r : k → Prop)
(A : Matrix m n R)
(B : Matrix n k R)


@[simp] theorem beq_self_eq_true [BEq α] [LawfulBEq α] (a : α) : (a == a) = true

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


theorem count_singleton [MeasurableSingletonClass α] (a : α) : count ({a} : Set α) = 1

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


@[simp]
theorem stereoToFun_apply (x : E) :
    stereoToFun v x = (2 / ((1 : ℝ) - innerSL ℝ v x)) • orthogonalProjection (ℝ ∙ v)ᗮ x

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{v : E}
(x : E)

stereoToFun v x = (2 / (1 - ((innerSL ℝ) v) x)) • (orthogonalProjection (Submodule.span ℝ {v})ᗮ) x


theorem map_le_comap_of_inv_on (g : G) (I : Ideal R) (hf : Set.LeftInvOn g f I) :
    I.map f ≤ I.comap g

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
(f : F)
{G : Type u_2}
[FunLike G S R]
[rcg : RingHomClass G S R]
(g : G)
(I : Ideal R)
(hf : Set.LeftInvOn ⇑g ⇑f ↑I)


protected theorem LinearMap.hasDerivWithinAt : HasDerivWithinAt e (e 1) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : 𝕜}
{s : Set 𝕜}
(e : 𝕜 →ₗ[𝕜] F)


theorem den_div_eq_of_coprime {a b : ℤ} (hb0 : 0 < b) (h : Nat.Coprime a.natAbs b.natAbs) :
    ((a / b : ℚ).den : ℤ) = b

{a b : ℤ}
(hb0 : 0 < b)
(h : a.natAbs.Coprime b.natAbs)


theorem ppow_mul (x : M) (m n : ℕ+) : x ^ (m * n) = (x ^ m) ^ n

{M : Type u_1}
[Mul M]
[Pow M ℕ+]
[PNatPowAssoc M]
(x : M)
(m n : ℕ+)


lemma monotone_addNSMul (hδ : 0 ≤ δ) : Monotone (addNSMul h δ)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b : α}
(h : a ≤ b)
{δ : α}
(hδ : 0 ≤ δ)


theorem mul_left_strictMono [IsDedekindDomain A] {I : FractionalIdeal A⁰ K} (hI : I ≠ 0) :
    StrictMono (I * ·)

{A : Type u_2}
{K : Type u_3}
[CommRing A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
[IsDedekindDomain A]
{I : FractionalIdeal A⁰ K}
(hI : I ≠ 0)


/-- The `essSup` of a function `g` on the quotient space `G ⧸ Γ` with respect to the pushforward
  of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental domain `𝓕`, is the
  same as the `essSup` of `g`'s lift to the universal cover `G` with respect to `μ`. -/
@[to_additive "The `essSup` of a function `g` on the additive quotient space `G ⧸ Γ` with respect
  to the pushforward of the restriction, `μ_𝓕`, of a right-invariant measure `μ` to a fundamental
  domain `𝓕`, is the same as the `essSup` of `g`'s lift to the universal cover `G` with respect
  to `μ`."]
lemma essSup_comp_quotientGroup_mk [μ.IsMulRightInvariant] {g : G ⧸ Γ → ℝ≥0∞}
    (g_ae_measurable : AEMeasurable g μ_𝓕) : essSup g μ_𝓕 = essSup (fun (x : G) ↦ g x) μ

(h𝓕 : MeasureTheory.IsFundamentalDomain (↥Γ.op) 𝓕 μ)

{g : G ⧸ Γ → ℝ≥0∞}

(g_ae_measurable : AEMeasurable g (MeasureTheory.Measure.map QuotientGroup.mk (μ.restrict 𝓕)))

essSup g (MeasureTheory.Measure.map QuotientGroup.mk (μ.restrict 𝓕)) = essSup (fun x => g ↑x) μ


theorem Commute.sub_dvd_pow_sub_pow [Ring α] {x y : α} (h : Commute x y) (n : ℕ) :
    x - y ∣ x ^ n - y ^ n

{α : Type u}
[Ring α]
{x y : α}
(h : Commute x y)
(n : ℕ)


/-- See also `Order.pred_le_of_wcovBy`. -/
lemma pred_eq_of_covBy (h : a ⋖ b) : pred b = a

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}
(h : a ⋖ b)


theorem _root_.Nat.card_divisors {n : ℕ} (hn : n ≠ 0) :
    n.divisors.card = n.primeFactors.prod (n.factorization · + 1)

n.divisors.card = ∏ x ∈ n.primeFactors, (n.factorization x + 1)


theorem mul2_isPowerOfTwo_of_isPowerOfTwo (h : isPowerOfTwo n) : isPowerOfTwo (n * 2)


theorem integral_finset [MeasurableSingletonClass α] (s : Finset α) (f : α → E)
    (hf : Integrable f (μ.restrict s)) :
    ∫ x in s, f x ∂μ = ∑ x ∈ s, (μ {x}).toReal • f x

(hf : MeasureTheory.Integrable f (μ.restrict ↑s))

∫ (x : α) in ↑s, f x ∂μ = ∑ x ∈ s, (μ {x}).toReal • f x


theorem mk_embedding_eq_zero_iff_lt : #(α ↪ β) = 0 ↔ #β < #α


protected theorem zero_add (x : X[S⁻¹]) : 0 + x = x

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{X : Type u_2}
[AddMonoid X]
[DistribMulAction R X]
(x : OreLocalization S X)


@[simp] protected lemma map_neg : neg (W'.map f) (f ∘ P) = f ∘ W'.neg P

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

WeierstrassCurve.Jacobian.neg (WeierstrassCurve.map W' f) (⇑f ∘ P) = ⇑f ∘ W'.neg P


lemma sqrt_nonneg (q : ℚ) : 0 ≤ Rat.sqrt q


theorem comp_Hσ_eq {Y : C} {n a q : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish q φ)
    (hnaq : n = a + q) :
    φ ≫ (Hσ q).f (n + 1) =
      -φ ≫ X.δ ⟨a + 1, Nat.succ_lt_succ (Nat.lt_succ_iff.mpr (Nat.le.intro hnaq.symm))⟩ ≫
        X.σ ⟨a, Nat.lt_succ_iff.mpr (Nat.le.intro hnaq.symm)⟩

(v : AlgebraicTopology.DoldKan.HigherFacesVanish q φ)

φ ≫ (AlgebraicTopology.DoldKan.Hσ q).f (n + 1) = -φ ≫ X.δ ⟨a + 1, ⋯⟩ ≫ X.σ ⟨a, ⋯⟩


@[simp]
lemma autMap_apply_mul {A B : C} [IsConnected A] [IsGalois B] (f : A ⟶ B) (σ τ : Aut A) :
    autMap f (σ * τ) = autMap f σ * autMap f τ

CategoryTheory.PreGaloisCategory.autMap f (σ * τ) =
  CategoryTheory.PreGaloisCategory.autMap f σ * CategoryTheory.PreGaloisCategory.autMap f τ


@[simp]
theorem vars_X [Nontrivial R] : (X n : MvPolynomial σ R).vars = {n}

{R : Type u}
{σ : Type u_1}
{n : σ}
[CommSemiring R]
[Nontrivial R]


theorem of_smul_measure (c : ℝ≥0∞) (hc_ne_top : c ≠ ∞) (hT : DominatedFinMeasAdditive (c • μ) T C) :
    DominatedFinMeasAdditive μ T (c.toReal * C)

(hT : MeasureTheory.DominatedFinMeasAdditive (c • μ) T C)

MeasureTheory.DominatedFinMeasAdditive μ T (c.toReal * C)


@[simp] lemma hasFPowerSeriesWithinAt_univ {f : E → F} {p : FormalMultilinearSeries 𝕜 E F} {x : E} :
    HasFPowerSeriesWithinAt f p univ x ↔ HasFPowerSeriesAt f p x

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

HasFPowerSeriesWithinAt f p Set.univ x ↔ HasFPowerSeriesAt f p x


protected theorem leftInvOn : LeftInvOn e.symm e e.source

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


theorem mfderivWithin_inter (ht : t ∈ 𝓝 x) :
    mfderivWithin I I' f (s ∩ t) x = mfderivWithin I I' f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f : M → M'}
{x : M}
{s t : Set M}
[Is : SmoothManifoldWithCorners I M]
[I's : SmoothManifoldWithCorners I' M']
(ht : t ∈ 𝓝 x)


/-- The isomorphism between a cone on `F` and an element of the functor `F.cones`. -/
@[simps!]
def equiv (F : J ⥤ C) : Cone F ≅ ΣX, F.cones.obj X

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

((CategoryTheory.Limits.Cone.equiv F).hom c).snd = c.π


theorem factorization_eq_count {n p : α} :
    factorization n p = Multiset.count p (normalizedFactors n)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
[NormalizationMonoid α]
[DecidableEq α]
{n p : α}

(factorization n) p = Multiset.count p (UniqueFactorizationMonoid.normalizedFactors n)


@[reassoc]
lemma multiforkLift_map (i₀ : E.I₀) : multiforkLift c ≫ F.val.map (E.f i₀).op = c.ι i₀

{J : CategoryTheory.GrothendieckTopology C}

(c : CategoryTheory.Limits.Multifork (E.multicospanIndex F.val))

CategoryTheory.CategoryStruct.comp (CategoryTheory.GrothendieckTopology.OneHypercover.multiforkLift c)
    (F.val.map (E.f i₀).op) =
  c.ι i₀


@[to_additive]
theorem mk_smul_indicatorConstLp (c : M)
    {s : Set α} (hs : MeasurableSet s) (hμs : μ s ≠ ∞) (b : E) :
    mk c • indicatorConstLp p hs hμs b =
      indicatorConstLp p (hs.preimage <| measurable_const_smul c)
        (by rwa [SMulInvariantMeasure.measure_preimage_smul c hs]) b

[MeasureTheory.VAddInvariantMeasure M α μ]

DomAddAct.mk c +ᵥ MeasureTheory.indicatorConstLp p hs hμs b = MeasureTheory.indicatorConstLp p ⋯ ⋯ b


@[simp]
theorem coe_toAffineIsometry : ⇑(f.toAffineIsometry : V →ᵃⁱ[𝕜] V₂) = f

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
(f : V →ₗᵢ[𝕜] V₂)


@[simp]
theorem coe_desc {X α β : Type*} [TopologicalSpace X] (f : X → α) (g : α → β)
    (h : LocallyConstant X β) (cond : g ∘ f = h) (inj : Function.Injective g) :
    ⇑(desc f h cond inj) = f

{X : Type u_5}
{α : Type u_6}
{β : Type u_7}
[TopologicalSpace X]
(f : X → α)
(g : α → β)
(h : LocallyConstant X β)
(cond : g ∘ f = ⇑h)
(inj : Function.Injective g)

⇑(LocallyConstant.desc f h cond inj) = f


theorem div_lt_div' (hac : a ≤ c) (hbd : d < b) (c0 : 0 < c) (d0 : 0 < d) : a / b < c / d

{α : Type u_2}
[LinearOrderedSemifield α]
{a b c d : α}
(hac : a ≤ c)
(hbd : d < b)
(c0 : 0 < c)
(d0 : 0 < d)


@[to_additive]
theorem Commute.function_commute_mul_right (h : Commute a b) :
    Function.Commute (· * a) (· * b)

{G : Type u_3}
[AddSemigroup G]
{a b : G}
(h : AddCommute a b)

Function.Commute (fun x => x + a) fun x => x + b


theorem Finite.sUnion {s : Set (Set α)} (hs : s.Finite) (H : ∀ t ∈ s, Set.Finite t) :
    (⋃₀ s).Finite

{α : Type u}
{s : Set (Set α)}
(hs : s.Finite)
(H : ∀ t ∈ s, t.Finite)


theorem radical_le_vanishingIdeal_zeroLocus (I : Ideal (MvPolynomial σ k)) :
    I.radical ≤ vanishingIdeal (zeroLocus I)

{k : Type u_1}
[Field k]
{σ : Type u_2}
(I : Ideal (MvPolynomial σ k))

I.radical ≤ MvPolynomial.vanishingIdeal (MvPolynomial.zeroLocus I)


@[simp]
theorem chain'_singleton (a : α) : Chain' R [a]


nonrec theorem Closeds.compl_compl (s : Closeds α) : s.compl.compl = s

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


theorem MeasurePreserving.setIntegral_image_emb {Y} {_ : MeasurableSpace Y} {f : X → Y} {ν}
    (h₁ : MeasurePreserving f μ ν) (h₂ : MeasurableEmbedding f) (g : Y → E) (s : Set X) :
    ∫ y in f '' s, g y ∂ν = ∫ x in s, g (f x) ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure X}
{Y : Type u_5}

∀ {x : MeasurableSpace Y} {f : X → Y} {ν : MeasureTheory.Measure Y},
  MeasureTheory.MeasurePreserving f μ ν →
    MeasurableEmbedding f → ∀ (g : Y → E) (s : Set X), ∫ (y : Y) in f '' s, g y ∂ν = ∫ (x : X) in s, g (f x) ∂μ


@[simp]
theorem dropUntil_copy {u v w v' w'} (p : G.Walk v w) (hv : v = v') (hw : w = w')
    (h : u ∈ (p.copy hv hw).support) :
    (p.copy hv hw).dropUntil u h = (p.dropUntil u (by subst_vars; exact h)).copy rfl hw

{V : Type u}
{G : SimpleGraph V}
[DecidableEq V]
{u v w v' w' : V}
(p : G.Walk v w)
(hv : v = v')
(hw : w = w')
(h : u ∈ (p.copy hv hw).support)

(p.copy hv hw).dropUntil u h = (p.dropUntil u ⋯).copy ⋯ hw


@[to_additive]
theorem contMDiff_one [One M'] : ContMDiff I I' n (1 : M → M')

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
[Zero M']


@[simp]
lemma shiftIso_zero_hom_app (a : A) (X : C) :
    (F.shiftIso 0 a a (zero_add a)).hom.app X = (shiftFunctorZero D A).hom.app _

(F : CategoryTheory.SingleFunctors C D A)

(F.shiftIso 0 a a ⋯).hom.app X = (CategoryTheory.shiftFunctorZero D A).hom.app ((F.functor a).obj X)


@[to_additive (attr := simp)]
theorem mk_coe (e : M ≃* N) (e' h₁ h₂ h₃) : (⟨⟨e, e', h₁, h₂⟩, h₃⟩ : M ≃* N) = e

(h₃ :
  ∀ (x y : M),
    { toFun := ⇑e, invFun := e', left_inv := h₁, right_inv := h₂ }.toFun (x * y) =
      { toFun := ⇑e, invFun := e', left_inv := h₁, right_inv := h₂ }.toFun x *
        { toFun := ⇑e, invFun := e', left_inv := h₁, right_inv := h₂ }.toFun y)

{ toFun := ⇑e, invFun := e', left_inv := h₁, right_inv := h₂, map_mul' := h₃ } = e


@[simp]
theorem coe_bind (l : List α) (f : α → List β) : (@bind α β l fun a => f a) = l.bind f

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

((↑l).bind fun a => ↑(f a)) = ↑(l.bind f)


/-- The abscissa of absolute convergence of the L-series of the Möbius function is `1`. -/
lemma abscissaOfAbsConv_moebius : abscissaOfAbsConv ↗μ = 1

(LSeries.abscissaOfAbsConv fun n => ↑(ArithmeticFunction.moebius n)) = 1


theorem unop_iSup (S : ι → Subring Rᵐᵒᵖ) : (iSup S).unop = ⨆ i, (S i).unop

{ι : Sort u_1}
{R : Type u_2}
[Ring R]
(S : ι → Subring Rᵐᵒᵖ)


theorem set_range_subset : Set.range (algebraMap K L) ⊆ S

{K : Type u_1}
{L : Type u_2}
[Field K]
[Field L]
[Algebra K L]
(S : IntermediateField K L)


@[reassoc]
lemma ιMapBifunctor_hom₁ (i₁ i₁' : I₁) (i₂ : I₂) (j j' : J)
    (h : ComplexShape.π c₁ c₂ c (i₁', i₂) = j) (h' : c₁.prev i₁' = i₁) :
    ιMapBifunctor K₁ K₂ F c i₁' i₂ j h ≫ hom₁ h₁ f₂ F c j j' = ComplexShape.ε₁ c₁ c₂ c (i₁, i₂) •
      (F.map (h₁.hom i₁' i₁)).app (K₂.X i₂) ≫ (F.obj (L₁.X i₁)).map (f₂.f i₂) ≫
        ιMapBifunctorOrZero L₁ L₂ F c _ _ j'

{C₁ : Type u_1}
{C₂ : Type u_2}
{D : Type u_3}
{I₁ : Type u_4}
{I₂ : Type u_5}
{J : Type u_6}
[CategoryTheory.Category.{u_9, u_1} C₁]
[CategoryTheory.Category.{u_8, u_2} C₂]
[CategoryTheory.Category.{u_7, u_3} D]
[CategoryTheory.Preadditive C₁]
[CategoryTheory.Preadditive C₂]
[CategoryTheory.Preadditive D]
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
{K₁ L₁ : HomologicalComplex C₁ c₁}
{f₁ f₁' : K₁ ⟶ L₁}
(h₁ : Homotopy f₁ f₁')
{K₂ L₂ : HomologicalComplex C₂ c₂}
(f₂ : K₂ ⟶ L₂)
(F : C₁ ⥤ C₂ ⥤ D)
[F.Additive]
[∀ (X₁ : C₁), (F.obj X₁).Additive]
(c : ComplexShape J)
[DecidableEq J]
[TotalComplexShape c₁ c₂ c]
[K₁.HasMapBifunctor K₂ F c]
[L₁.HasMapBifunctor L₂ F c]
(i₁ i₁' : I₁)
(i₂ : I₂)
(j j' : J)
(h : c₁.π c₂ c (i₁', i₂) = j)
(h' : c₁.prev i₁' = i₁)

K₁.ιMapBifunctor K₂ F c i₁' i₂ j h ≫ HomologicalComplex.mapBifunctorMapHomotopy.hom₁ h₁ f₂ F c j j' =
  c₁.ε₁ c₂ c (i₁, i₂) •
    (F.map (h₁.hom i₁' i₁)).app (K₂.X i₂) ≫ (F.obj (L₁.X i₁)).map (f₂.f i₂) ≫ L₁.ιMapBifunctorOrZero L₂ F c i₁ i₂ j'


/--
Given a linear map `l : M → N` over a local ring `(R, 𝔪, k)`
with `M` finite and `N` finite free,
`l` is a split injection if and only if `k ⊗ l` is a (split) injection.
-/
theorem LocalRing.split_injective_iff_lTensor_residueField_injective
    [Module.Finite R M] [Module.Finite R N] [Module.Free R N] (l : M →ₗ[R] N) :
    (∃ l', l' ∘ₗ l = LinearMap.id) ↔ Function.Injective (l.lTensor (ResidueField R))

{R : Type u_1}
[CommRing R]
[LocalRing R]
{M : Type u_2}
{N : Type u_3}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[Module.Finite R M]
[Module.Finite R N]
[Module.Free R N]
(l : M →ₗ[R] N)

(∃ l', l' ∘ₗ l = LinearMap.id) ↔ Function.Injective ⇑(LinearMap.lTensor (LocalRing.ResidueField R) l)


theorem sin_conj : sin (conj x) = conj (sin x)

Complex.sin ((starRingEnd ℂ) x) = (starRingEnd ℂ) (Complex.sin x)


/-- If `φ : S₁ ⟶ S₂` is a morphism of short complexes such that `φ.τ₁` is epi, `φ.τ₂` is an iso
and `φ.τ₃` is mono, then a homology data for `S₂` induces a homology data for `S₁`.
The inverse construction is `ofEpiOfIsIsoOfMono`. -/
@[simps]
noncomputable def ofEpiOfIsIsoOfMono' (φ : S₁ ⟶ S₂) (h : HomologyData S₂)
    [Epi φ.τ₁] [IsIso φ.τ₂] [Mono φ.τ₃] : HomologyData S₁

(CategoryTheory.ShortComplex.HomologyData.ofEpiOfIsIsoOfMono' φ h).left =
  CategoryTheory.ShortComplex.LeftHomologyData.ofEpiOfIsIsoOfMono' φ h.left


@[to_additive]
theorem Filter.EventuallyEq.of_mulIndicator [One β] {l : Filter α} {f : α → β}
    (hf : ∀ᶠ x in l, f x ≠ 1) {s t : Set α} (h : s.mulIndicator f =ᶠ[l] t.mulIndicator f) :
    s =ᶠ[l] t

{α : Type u_1}
{β : Type u_2}
[Zero β]
{l : Filter α}
{f : α → β}
(hf : ∀ᶠ (x : α) in l, f x ≠ 0)
{s t : Set α}
(h : s.indicator f =ᶠ[l] t.indicator f)


theorem HasFDerivWithinAt.arsinh (hf : HasFDerivWithinAt f f' s a) :
    HasFDerivWithinAt (fun x => arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') s a

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{a : E}
{f' : E →L[ℝ] ℝ}
(hf : HasFDerivWithinAt f f' s a)

HasFDerivWithinAt (fun x => Real.arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') s a


theorem ext_iff {x₀ x₁ : PSigma β} : x₀ = x₁ ↔ x₀.1 = x₁.1 ∧ HEq x₀.2 x₁.2

{α : Sort u_1}
{β : α → Sort u_2}
{x₀ x₁ : PSigma β}

x₀ = x₁ ↔ x₀.fst = x₁.fst ∧ HEq x₀.snd x₁.snd


theorem isPreconnected_Ici : IsPreconnected (Ici a)

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[DenselyOrdered α]
{a : α}


theorem frontier_sphere (x : E) {r : ℝ} (hr : r ≠ 0) : frontier (sphere x r) = sphere x r

{E : Type u_1}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
(x : E)
{r : ℝ}
(hr : r ≠ 0)

frontier (Metric.sphere x r) = Metric.sphere x r


lemma iSup_induction {ι} (N : ι → LieSubmodule R L M) {C : M → Prop} {x : M}
    (hx : x ∈ ⨆ i, N i) (hN : ∀ i, ∀ y ∈ N i, C y) (h0 : C 0)
    (hadd : ∀ y z, C y → C z → C (y + z)) : C x

(hadd : ∀ (y z : M), C y → C z → C (y + z))


theorem nextOr_cons_of_ne (xs : List α) (y x d : α) (h : x ≠ y) :
    nextOr (y :: xs) x d = nextOr xs x d

{α : Type u_1}
[DecidableEq α]
(xs : List α)
(y x d : α)
(h : x ≠ y)


/-- `SupHomClass F α β` states that `F` is a type of `⊔`-preserving morphisms.

You should extend this class when you extend `SupHom`. -/
class SupHomClass (F α β : Type*) [Sup α] [Sup β] [FunLike F α β] : Prop where
  /-- A `SupHomClass` morphism preserves suprema. -/
  map_sup (f : F) (a b : α) : f (a ⊔ b) = f a ⊔ f b

{F : Type u_7}
{α : Type u_8}
{β : Type u_9}
[Sup α]
[Sup β]
[FunLike F α β]
[self : SupHomClass F α β]
(f : F)
(a b : α)


{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}


lemma shiftFunctorZero_inv_app_shift (n : A) :
    (shiftFunctorZero C A).inv.app (X⟦n⟧) =
  ((shiftFunctorZero C A).inv.app X)⟦n⟧' ≫ (shiftFunctorComm C n 0).inv.app X

{C : Type u}
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddCommMonoid A]
[CategoryTheory.HasShift C A]
{X : C}
(n : A)

(CategoryTheory.shiftFunctorZero C A).inv.app ((CategoryTheory.shiftFunctor C n).obj X) =
  CategoryTheory.CategoryStruct.comp
    ((CategoryTheory.shiftFunctor C n).map ((CategoryTheory.shiftFunctorZero C A).inv.app X))
    ((CategoryTheory.shiftFunctorComm C n 0).inv.app X)


/-- `extendDomain` as a group homomorphism -/
@[simps]
def extendDomainHom : Perm α →* Perm β

{α : Type u}
{β : Type v}
{p : β → Prop}
[DecidablePred p]
(f : α ≃ Subtype p)
(e : Equiv.Perm α)

(Equiv.Perm.extendDomainHom f) e = e.extendDomain f


@[to_additive]
theorem subset_interior_div_right : s / interior t ⊆ interior (s / t)

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s t : Set G}


theorem mk_cons_eq_insert (c : Sigma β) (l : List (Sigma β)) (h : (c :: l).NodupKeys) :
    (⟨c :: l, h⟩ : AList β) = insert c.1 c.2 ⟨l, nodupKeys_of_nodupKeys_cons h⟩

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(c : Sigma β)
(l : List (Sigma β))
(h : (c :: l).NodupKeys)

{ entries := c :: l, nodupKeys := h } = AList.insert c.fst c.snd { entries := l, nodupKeys := ⋯ }


/-- A version of `measurable_div_const` that assumes `MeasurableMul` instead of
  `MeasurableDiv`. This can be nice to avoid unnecessary type-class assumptions. -/
@[to_additive " A version of `measurable_sub_const` that assumes `MeasurableAdd` instead of
  `MeasurableSub`. This can be nice to avoid unnecessary type-class assumptions. "]
theorem measurable_div_const' {G : Type*} [DivInvMonoid G] [MeasurableSpace G] [MeasurableMul G]
    (g : G) : Measurable fun h => h / g

{G : Type u_2}
[SubNegMonoid G]
[MeasurableSpace G]
[MeasurableAdd G]
(g : G)


@[to_additive (attr := simp)]
theorem symm_mulRight (g : G) : (mulRight g).symm = mulRight g⁻¹

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

(MeasurableEquiv.mulRight g).symm = MeasurableEquiv.mulRight g⁻¹


lemma addY_of_Z_eq_zero_right {P Q : Fin 3 → R} (hQ : W'.Equation Q) (hQz : Q z = 0) :
    W'.addY P Q = (-(Q x * P z)) ^ 3 * P y

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P Q : Fin 3 → R}
(hQ : W'.Equation Q)
(hQz : Q z = 0)


theorem col_eq_zero_of_commute_stdBasisMatrix {i j k : n} {M : Matrix n n α}
    (hM : Commute (stdBasisMatrix i j 1) M) (hki : k ≠ i) : M k i = 0

(hM : Commute (Matrix.stdBasisMatrix i j 1) M)


theorem finite_compl_fixedBy_swap {x y : α} : (fixedBy α (swap x y))ᶜ.Finite

{α : Type u_2}
[DecidableEq α]
{x y : α}

(MulAction.fixedBy α (Equiv.swap x y))ᶜ.Finite


theorem mem_map_equiv {f : R ≃+* S} {K : Subsemiring R} {x : S} :
    x ∈ K.map (f : R →+* S) ↔ f.symm x ∈ K

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{f : R ≃+* S}
{K : Subsemiring R}
{x : S}

x ∈ Subsemiring.map (↑f) K ↔ f.symm x ∈ K


@[simp]
theorem ofDual_apply_coe (a : αᵒᵈ) : WithBot.ofDual (a : WithBot αᵒᵈ) = ofDual a

WithBot.ofDual ↑a = ↑(OrderDual.ofDual a)


theorem tsum_mul_right [T2Space α] : ∑' x, f x * a = (∑' x, f x) * a

{ι : Type u_1}
{α : Type u_4}
[DivisionSemiring α]
[TopologicalSpace α]
[TopologicalSemiring α]
{f : ι → α}
{a : α}
[T2Space α]


protected theorem neg {S : Type*} [AddGroup S] [Mul S] (t : RingCon S)
    {a b} (h : t a b) : t (-a) (-b)

{S : Type u_3}
[AddGroup S]
[Mul S]
(t : RingCon S)
{a b : S}
(h : t a b)


@[elab_without_expected_type]
theorem trans_of [IsTrans α r] {a b c : α} : a ≺ b → b ≺ c → a ≺ c

{α : Sort u}
(r : α → α → Prop)
[IsTrans α r]
{a b c : α}


theorem disjoint_supported_supported {s t : Set α} (h : Disjoint s t) :
    Disjoint (supported M R s) (supported M R t)

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s t : Set α}
(h : Disjoint s t)

Disjoint (Finsupp.supported M R s) (Finsupp.supported M R t)


theorem destruct_map (f : α → β) (s : WSeq α) :
    destruct (map f s) = Computation.map (Option.map (Prod.map f (map f))) (destruct s)

{α : Type u}
{β : Type v}
(f : α → β)
(s : Stream'.WSeq α)

(Stream'.WSeq.map f s).destruct = Computation.map (Option.map (Prod.map f (Stream'.WSeq.map f))) s.destruct


theorem Nodup.inter [DecidableEq α] (l₂ : List α) : Nodup l₁ → Nodup (l₁ ∩ l₂)

{α : Type u}
{l₁ : List α}
[DecidableEq α]
(l₂ : List α)


@[mono]
theorem mono_cast : Monotone (Nat.cast : ℕ → α)

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


theorem exp_neg_mul_sq_isLittleO_exp_neg {b : ℝ} (hb : 0 < b) :
    (fun x : ℝ => exp (-b * x ^ 2)) =o[atTop] fun x : ℝ => exp (-x)

(fun x => rexp (-b * x ^ 2)) =o[Filter.atTop] fun x => rexp (-x)


theorem measure_toMeasurable_add_inter_left {s t : Set α} (hs : MeasurableSet s)
    (ht : (μ + ν) t ≠ ∞) : μ (toMeasurable (μ + ν) t ∩ s) = μ (t ∩ s)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
{s t : Set α}
(hs : MeasurableSet s)
(ht : (μ + ν) t ≠ ⊤)

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


@[simp]
theorem mk_coe (e : α ≃+*o β) (h) : (⟨e, h⟩ : α ≃+*o β) = e

(h : ∀ {a b : α}, (↑e).toFun a ≤ (↑e).toFun b ↔ a ≤ b)

{ toRingEquiv := ↑e, map_le_map_iff' := h } = e


/-- The star algebra homomorphism underlying the instance of the continuous functional
calculus of a Hermitian matrix. This is an auxiliary definition and is not intended
for use outside of this file. -/
@[simps]
noncomputable def cfcAux : C(spectrum ℝ A, ℝ) →⋆ₐ[ℝ] (Matrix n n 𝕜)

{n : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
[Fintype n]
[DecidableEq n]
{A : Matrix n n 𝕜}
(hA : A.IsHermitian)
(g : C(↑(spectrum ℝ A), ℝ))

hA.cfcAux g =
  ↑hA.eigenvectorUnitary * Matrix.diagonal (RCLike.ofReal ∘ ⇑g ∘ fun i => ⟨hA.eigenvalues i, ⋯⟩) *
    star ↑hA.eigenvectorUnitary


theorem cutMap_self (a : α) : cutMap α a = Iio a ∩ range (Rat.cast : ℚ → α)

{α : Type u_2}
[LinearOrderedField α]
(a : α)

LinearOrderedField.cutMap α a = Set.Iio a ∩ Set.range Rat.cast


theorem eq_of_inv_eq_inv {f g : X ⟶ Y} [IsIso f] [IsIso g] (p : inv f = inv g) : f = g

(p : CategoryTheory.inv f = CategoryTheory.inv g)


@[simp]
theorem factorization_div {d n : ℕ} (h : d ∣ n) :
    (n / d).factorization = n.factorization - d.factorization


/-- The standard basis of the endomorphism algebra of a module
induced by a basis of the module.

If `M` is a module with basis `b` indexed by a finite type `ι`,
then `Basis.end b` is the basis of `Module.End R M` indexed by `ι × ι`
where `(i, j)` indexes the linear map that sends `b j` to `b i`
and sends all other basis vectors to `0`.  -/
@[simps! (config := .lemmasOnly) repr_apply repr_symm_apply]
noncomputable
abbrev _root_.Basis.end (b : Basis ι R M) : Basis (ι × ι) R (Module.End R M)

{R : Type u_1}
{M : Type u_2}
{ι : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[Fintype ι]
[DecidableEq ι]
(b : Basis ι R M)

∀ (a : M →ₗ[R] M), b.end.repr a = (Matrix.stdBasis R ι ι).repr ((LinearMap.toMatrix b b) a)


theorem num_mul_den_eq_num_iff_eq' {x y : K} :
    y * algebraMap A K (den A x) = algebraMap A K (num A x) ↔ x = y

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

y * (algebraMap A K) ↑(IsFractionRing.den A x) = (algebraMap A K) (IsFractionRing.num A x) ↔ x = y


theorem StrictMono.prod_map (hf : StrictMono f) (hg : StrictMono g) : StrictMono (Prod.map f g)

{α : Type u}
{β : Type v}
{γ : Type w}
{δ : Type u_2}
[PartialOrder α]
[PartialOrder β]
[Preorder γ]
[Preorder δ]
{f : α → γ}
{g : β → δ}
(hf : StrictMono f)
(hg : StrictMono g)


theorem eq_cons_of_length_one {l : List α} (h : l.length = 1) :
    l = [l.nthLe 0 (by omega)]

{α : Type u}
{l : List α}
(h : l.length = 1)


@[simp]
theorem lookup_empty (a) : lookup a (∅ : Finmap β) = none

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)


@[to_additive VAddAntidiagonal.finite_of_isPWO]
theorem finite_of_isPWO (hs : s.IsPWO) (ht : t.IsPWO) (a) : (smulAntidiagonal s t a).Finite

{G : Type u_1}
{P : Type u_2}
{s : Set G}
{t : Set P}
[PartialOrder G]
[PartialOrder P]
[VAdd G P]
[IsOrderedCancelVAdd G P]
(hs : s.IsPWO)
(ht : t.IsPWO)
(a : P)


theorem mem_brange {o : Ordinal} {f : ∀ a < o, α} {a} : a ∈ brange o f ↔ ∃ i hi, f i hi = a

{α : Type u_1}
{o : Ordinal.{u_4}}
{f : (a : Ordinal.{u_4}) → a < o → α}
{a : α}

a ∈ o.brange f ↔ ∃ i, ∃ (hi : i < o), f i hi = a


protected lemma inv [DecidableEq n] {M : Matrix n n R} (hM : M.PosSemidef) : M⁻¹.PosSemidef

{n : Type u_2}
{R : Type u_3}
[Fintype n]
[CommRing R]
[PartialOrder R]
[StarRing R]
[DecidableEq n]
{M : Matrix n n R}
(hM : M.PosSemidef)


theorem iInter_dite (f : ∀ i, p i → Set α) (g : ∀ i, ¬p i → Set α) :
    ⋂ i, (if h : p i then f i h else g i h) = (⋂ (i) (h : p i), f i h) ∩ ⋂ (i) (h : ¬p i), g i h

{α : Type u_1}
{ι : Sort u_4}
(p : ι → Prop)
[DecidablePred p]
(f : (i : ι) → p i → Set α)
(g : (i : ι) → ¬p i → Set α)

(⋂ i, if h : p i then f i h else g i h) = (⋂ i, ⋂ (h : p i), f i h) ∩ ⋂ i, ⋂ (h : ¬p i), g i h


@[simp]
theorem coe_toNat_eq_self : ENat.toNat n = n ↔ n ≠ ⊤


{ι : Type u_1}
{α : Type u_2}
[Zero α]
[LE α]
{f g : ι →₀ α}


nonrec theorem exp_neg : exp (-x) = (exp x)⁻¹


@[to_additive zsmul_add] lemma mul_zpow : ∀ n : ℤ, (a * b) ^ n = a ^ n * b ^ n

{α : Type u_1}
[SubtractionCommMonoid α]
(a b : α)
(n : ℤ)


theorem sSup_closed_unit_ball_eq_norm {𝕜 𝕜₂ E F : Type*} [NormedAddCommGroup E]
    [SeminormedAddCommGroup F] [DenselyNormedField 𝕜] [NontriviallyNormedField 𝕜₂] {σ₁₂ : 𝕜 →+* 𝕜₂}
    [NormedSpace 𝕜 E] [NormedSpace 𝕜₂ F] [RingHomIsometric σ₁₂] (f : E →SL[σ₁₂] F) :
    sSup ((fun x => ‖f x‖) '' closedBall 0 1) = ‖f‖

{𝕜 : Type u_11}
{𝕜₂ : Type u_12}
{E : Type u_13}
{F : Type u_14}
[NormedAddCommGroup E]
[SeminormedAddCommGroup F]
[DenselyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)

sSup ((fun x => ‖f x‖) '' Metric.closedBall 0 1) = ‖f‖


lemma mono_binaryCofanSum_inl' [MonoCoprod C] (inl : c₁.pt ⟶ c.pt)
    (hinl : ∀ (i₁ : I₁), c₁.inj i₁ ≫ inl = c.inj (Sum.inl i₁)) :
    Mono inl

(c₁ : CategoryTheory.Limits.Cofan (X ∘ Sum.inl))

(c₂ : CategoryTheory.Limits.Cofan (X ∘ Sum.inr))

(hc : CategoryTheory.Limits.IsColimit c)

(hc₁ : CategoryTheory.Limits.IsColimit c₁)

(hc₂ : CategoryTheory.Limits.IsColimit c₂)


/-- The analogue of `Quot.ind`: every element of `Quotient s` is of the form `Quotient.mk s a`. -/
protected theorem ind {α : Sort u} {s : Setoid α} {motive : Quotient s → Prop} : ((a : α) → motive (Quotient.mk s a)) → (q : Quotient s) → motive q

(∀ (a : α), motive (Quotient.mk s a)) → ∀ (q : Quotient s), motive q


lemma mult_comap_le (f : k →+* K) (w : InfinitePlace K) : mult (w.comap f) ≤ mult w

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
(f : k →+* K)
(w : NumberField.InfinitePlace K)


@[simp]
theorem ofAdd_lt {a b : α} : ofAdd a < ofAdd b ↔ a < b

Multiplicative.ofAdd a < Multiplicative.ofAdd b ↔ a < b


/-- Group homomorphisms preserve division. -/
@[to_additive "Additive group homomorphisms preserve subtraction."]
protected theorem map_mul_inv [Group α] [DivisionMonoid β] (f : α →* β) (g h : α) :
    f (g * h⁻¹) = f g * (f h)⁻¹

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[SubtractionMonoid β]
(f : α →+ β)
(g h : α)


@[simp]
theorem preimage_mul_const_Iic (a : α) {c : α} (h : 0 < c) :
    (fun x => x * c) ⁻¹' Iic a = Iic (a / c)

{α : Type u_1}
[LinearOrderedField α]
(a : α)
{c : α}
(h : 0 < c)

(fun x => x * c) ⁻¹' Set.Iic a = Set.Iic (a / c)


@[simp] protected
theorem rank_bot : Module.rank F (⊥ : IntermediateField F E) = 1

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


@[simp, nolint simpNF]
protected lemma neg_nonpos_iff_nonneg : -a ≤ 0 ↔ 0 ≤ a


theorem mk'_mul (x₁ x₂ : R) (y₁ y₂ : M) : mk' S (x₁ * x₂) (y₁ * y₂) = mk' S x₁ y₁ * mk' S x₂ y₂

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

IsLocalization.mk' S (x₁ * x₂) (y₁ * y₂) = IsLocalization.mk' S x₁ y₁ * IsLocalization.mk' S x₂ y₂


/-- This can be used to prove
```lean
example (a b c d : α) [Mul α] [AddCommMonoid α] :
  dot_product ![a, b] ![c, d] = a * c + b * d :=
(dot_productᵣ_eq _ _).symm
```
-/
@[simp]
theorem dotProductᵣ_eq [Mul α] [AddCommMonoid α] {m} (a b : Fin m → α) :
    dotProductᵣ a b = dotProduct a b

{α : Type u_1}
[Mul α]
[AddCommMonoid α]
{m : ℕ}
(a b : Fin m → α)


@[to_additive]
theorem multipliable_iff_tprod_vanishing : Multipliable f ↔
    ∀ e ∈ 𝓝 (1 : α), ∃ s : Finset β, ∀ t : Set β, Disjoint t s → (∏' b : t, f b) ∈ e

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
{f : β → α}
[CompleteSpace α]

Multipliable f ↔ ∀ e ∈ 𝓝 1, ∃ s, ∀ (t : Set β), Disjoint t ↑s → ∏' (b : ↑t), f ↑b ∈ e


/-- A cocone on `F` with cocone point `X` is the same as an element of `lim Hom(F·, X)`,
    naturally in `X`. -/
@[simps!]
noncomputable def yonedaCompLimIsoCocones (F : J ⥤ C) :
    yoneda ⋙ (whiskeringLeft _ _ _).obj F.op ⋙ lim ≅ F.cocones

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

∀
  (a :
    (CategoryTheory.yoneda ⋙ (CategoryTheory.whiskeringLeft Jᵒᵖ Cᵒᵖ (Type v)).obj F.op ⋙ CategoryTheory.Limits.lim).obj
      X)
  (j : J),
  ((CategoryTheory.Limits.yonedaCompLimIsoCocones F).hom.app X a).app j =
    CategoryTheory.Limits.limit.π (F.op ⋙ CategoryTheory.yoneda.obj X) (Opposite.op j) a


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


@[simp, norm_cast]
theorem coe_dfinsupp_sumAddHom [AddZeroClass R] [AddCommMonoid S] [∀ i, AddZeroClass (β i)]
    (f : Π₀ i, β i) (g : ∀ i, β i →+ R →+ S) :
    ⇑(sumAddHom g f) = sumAddHom (fun i => (coeFn R S).comp (g i)) f

{ι : Type u}
{β : ι → Type v}
[DecidableEq ι]
{R : Type u_1}
{S : Type u_2}
[AddZeroClass R]
[AddCommMonoid S]
[(i : ι) → AddZeroClass (β i)]
(f : Π₀ (i : ι), β i)
(g : (i : ι) → β i →+ R →+ S)

⇑((DFinsupp.sumAddHom g) f) = (DFinsupp.sumAddHom fun i => (AddMonoidHom.coeFn R S).comp (g i)) f


/-- The block matrix `A.fromBlocks 0 0 D` is diagonal if `A` and `D` are diagonal. -/
theorem IsDiag.fromBlocks [Zero α] {A : Matrix m m α} {D : Matrix n n α} (ha : A.IsDiag)
    (hd : D.IsDiag) : (A.fromBlocks 0 0 D).IsDiag

{α : Type u_1}
{n : Type u_4}
{m : Type u_5}
[Zero α]
{A : Matrix m m α}
{D : Matrix n n α}
(ha : A.IsDiag)
(hd : D.IsDiag)


@[to_additive (attr := simp)]
theorem smul_orbit (g : G) (a : α) : g • orbit G a = orbit G a

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
(g : G)
(a : α)

g +ᵥ AddAction.orbit G a = AddAction.orbit G a


@[to_additive]
lemma stabilizer_le_aestabilizer (s : Set α) : stabilizer G s ≤ aestabilizer G μ s

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.SMulInvariantMeasure G α μ] (s : Set α),
  MulAction.stabilizer G s ≤ MulAction.aestabilizer G μ s


/--
Ring equivalence are isomorphisms in category of semirings
-/
@[simps]
def _root_.RingEquiv.toSemiRingCatIso {X Y : Type u} [Semiring X] [Semiring Y] (e : X ≃+* Y) :
    SemiRingCat.of X ≅ SemiRingCat.of Y


lemma inf'_image₂_left (g : γ → δ) (h : (image₂ f s t).Nonempty) :
    inf' (image₂ f s t) h g =
      inf' s h.of_image₂_left fun x ↦ inf' t h.of_image₂_right (g <| f x ·)

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{δ : Type u_7}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}
[SemilatticeInf δ]
(g : γ → δ)
(h : (Finset.image₂ f s t).Nonempty)

(Finset.image₂ f s t).inf' h g = s.inf' ⋯ fun x => t.inf' ⋯ fun x_1 => g (f x x_1)


@[simp, norm_cast]
theorem coe_inj {e e' : M₁ ≃SL[σ₁₂] M₂} : (e : M₁ →SL[σ₁₂] M₂) = e' ↔ e = e'

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


/-- When `M` is finite free, the trace of a linear map correspond to the contraction pairing under
the isomorphism `End(M) ≃ M* ⊗ M`-/
@[simp]
theorem trace_eq_contract : LinearMap.trace R M ∘ₗ dualTensorHom R M M = contractLeft R M

(R : Type u_1)
[CommRing R]
(M : Type u_2)
[AddCommGroup M]
[Module R M]
[Module.Free R M]
[Module.Finite R M]


theorem bUnion_ptsOfPeriod : ⋃ n > 0, ptsOfPeriod f n = periodicPts f

⋃ n, ⋃ (_ : n > 0), Function.ptsOfPeriod f n = Function.periodicPts f


/-- The functor `HomologicalComplex (Karoubi C) c ⥤ Karoubi (HomologicalComplex C c)`,
on objects -/
@[simps]
def obj (K : HomologicalComplex (Karoubi C) c) : Karoubi (HomologicalComplex C c)

(K : HomologicalComplex (CategoryTheory.Idempotents.Karoubi C) c)

(CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.Inverse.obj K).X.d i j = (K.d i j).f


theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t

{α : Type u_1}
{β : Type u_2}
{e : PartialEquiv α β}
{s : Set α}
{t : Set β}
(h : e.IsImage s t)


@[simp]
theorem coe_toLinearMap (f : Q₁ →qᵢ Q₂) : ⇑f.toLinearMap = f

{R : Type u_2}
{M₁ : Type u_4}
{M₂ : Type u_5}
{N : Type u_8}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid N]
[Module R M₁]
[Module R M₂]
[Module R N]
{Q₁ : QuadraticMap R M₁ N}
{Q₂ : QuadraticMap R M₂ N}
(f : Q₁ →qᵢ Q₂)


@[to_additive]
theorem eq_prod_range_div {M : Type*} [CommGroup M] (f : ℕ → M) (n : ℕ) :
    f n = f 0 * ∏ i ∈ range n, f (i + 1) / f i

{M : Type u_6}
[CommGroup M]
(f : ℕ → M)
(n : ℕ)

f n = f 0 * ∏ i ∈ Finset.range n, f (i + 1) / f i


theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t

(h : ↑e '' (e.source ∩ s) = e.target ∩ t)


@[to_additive]
private theorem one_mul (s : LowerSet α) : 1 * s = s

{α : Type u_1}
[OrderedCommGroup α]
(s : LowerSet α)


/-- Using `Set.image`, a function between types yields a `sSupHom` between their lattices of
subsets.

See also `CompleteLatticeHom.setPreimage`. -/
@[simps]
def sSupHom.setImage (f : α → β) : sSupHom (Set α) (Set β)

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


theorem mellinConvergent_of_isBigO_rpow [NormedSpace ℂ E] {a b : ℝ} {f : ℝ → E} {s : ℂ}
    (hfc : LocallyIntegrableOn f <| Ioi 0) (hf_top : f =O[atTop] (· ^ (-a)))
    (hs_top : s.re < a) (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s.re) :
    MellinConvergent f s

(hfc : MeasureTheory.LocallyIntegrableOn f (Set.Ioi 0) MeasureTheory.volume)

(hf_top : f =O[Filter.atTop] fun x => x ^ (-a))


theorem list_getI [Inhabited α] : Primrec₂ (@List.getI α _)

{α : Type u_1}
[Primcodable α]
[Inhabited α]


theorem rat_inv_continuous_lemma {β : Type*} [DivisionRing β] (abv : β → α) [IsAbsoluteValue abv]
    {ε K : α} (ε0 : 0 < ε) (K0 : 0 < K) :
    ∃ δ > 0, ∀ {a b : β}, K ≤ abv a → K ≤ abv b → abv (a - b) < δ → abv (a⁻¹ - b⁻¹) < ε

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_3}
[DivisionRing β]
(abv : β → α)
[IsAbsoluteValue abv]
{ε K : α}
(ε0 : 0 < ε)
(K0 : 0 < K)


@[simp] theorem castLT_castAdd (m : Nat) (i : Fin n) :
    castLT (castAdd m i) (castAdd_lt m i) = i


@[to_additive]
theorem Red.exact : mk L₁ = mk L₂ ↔ Join Red L₁ L₂

FreeGroup.mk L₁ = FreeGroup.mk L₂ ↔ Relation.Join FreeGroup.Red L₁ L₂


@[simp]
theorem separatingLeft_congr_iff :
    (e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M)) B).SeparatingLeft ↔ B.SeparatingLeft

{R : Type u_1}
{M : Type u_5}
{Mₗ₁ : Type u_9}
{Mₗ₁' : Type u_10}
{Mₗ₂ : Type u_11}
{Mₗ₂' : Type u_12}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid Mₗ₁]
[AddCommMonoid Mₗ₂]
[AddCommMonoid Mₗ₁']
[AddCommMonoid Mₗ₂']
[Module R Mₗ₁]
[Module R Mₗ₂]
[Module R Mₗ₁']
[Module R Mₗ₂']
{B : Mₗ₁ →ₗ[R] Mₗ₂ →ₗ[R] M}
(e₁ : Mₗ₁ ≃ₗ[R] Mₗ₁')
(e₂ : Mₗ₂ ≃ₗ[R] Mₗ₂')

((e₁.arrowCongr (e₂.arrowCongr (LinearEquiv.refl R M))) B).SeparatingLeft ↔ B.SeparatingLeft


/-- The values of an additive character on an additive group are units. -/
lemma val_isUnit {A M} [AddGroup A] [Monoid M] (φ : AddChar A M) (a : A) : IsUnit (φ a)

{A : Type u_1}
{M : Type u_2}
[AddGroup A]
[Monoid M]
(φ : AddChar A M)
(a : A)