theorem ContinuousAt.prod_map' {f : X → Z} {g : Y → W} {x : X} {y : Y} (hf : ContinuousAt f x)
    (hg : ContinuousAt g y) : ContinuousAt (fun p : X × Y => (f p.1, g p.2)) (x, y)

{X : Type u}
{Y : Type v}
{Z : Type u_1}
{W : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[TopologicalSpace W]
{f : X → Z}
{g : Y → W}
{x : X}
{y : Y}
(hf : ContinuousAt f x)
(hg : ContinuousAt g y)

ContinuousAt (fun p => (f p.1, g p.2)) (x, y)


theorem geom_mean_le_arith_mean2_weighted {w₁ w₂ p₁ p₂ : ℝ} (hw₁ : 0 ≤ w₁) (hw₂ : 0 ≤ w₂)
    (hp₁ : 0 ≤ p₁) (hp₂ : 0 ≤ p₂) (hw : w₁ + w₂ = 1) : p₁ ^ w₁ * p₂ ^ w₂ ≤ w₁ * p₁ + w₂ * p₂


/-- A morphism of bimodule objects. -/
@[ext]
structure Hom (M N : Bimod A B) where
  hom : M.X ⟶ N.X
  left_act_hom : M.actLeft ≫ hom = (A.X ◁ hom) ≫ N.actLeft := by aesop_cat
  right_act_hom : M.actRight ≫ hom = (hom ▷ B.X) ≫ N.actRight := by aesop_cat

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{A B : Mon_ C}
{M N : Bimod A B}
(self : M.Hom N)

M.actLeft ≫ self.hom = A.X ◁ self.hom ≫ N.actLeft


@[to_additive]
theorem toList_map (f : α → β) (xs : FreeMonoid α) : toList (map f xs) = xs.toList.map f

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

FreeAddMonoid.toList ((FreeAddMonoid.map f) xs) = List.map f (FreeAddMonoid.toList xs)


nonrec theorem Disjoint.orderOf {σ τ : Perm α} (hστ : Disjoint σ τ) :
    orderOf (σ * τ) = Nat.lcm (orderOf σ) (orderOf τ)

{α : Type u}
{σ τ : Equiv.Perm α}
(hστ : σ.Disjoint τ)

orderOf (σ * τ) = (orderOf σ).lcm (orderOf τ)


theorem tan_sub_pi (x : ℝ) : tan (x - π) = tan x


lemma degree_eq_card_sub_part_card : G.degree s = Fintype.card V - (h.finpartition.part s).card

{V : Type u_1}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{r : ℕ}
{s : V}
(h : G.IsTuranMaximal r)


theorem measure_univ {l u : ℝ} (hfl : Tendsto f atBot (𝓝 l)) (hfu : Tendsto f atTop (𝓝 u)) :
    f.measure univ = ofReal (u - l)

(hfl : Filter.Tendsto (↑f) Filter.atBot (𝓝 l))

(hfu : Filter.Tendsto (↑f) Filter.atTop (𝓝 u))

f.measure Set.univ = ENNReal.ofReal (u - l)


@[simp]
theorem id_apply (a : α) : BiheytingHom.id α a = a

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


/-- Avoid in favor of `Nat.factorial_mul_ascFactorial'` if you can. ℕ-division isn't worth it. -/
theorem ascFactorial_eq_div' (n k : ℕ) (h : 0 < n) :
    n.ascFactorial k = (n + k - 1)! / (n - 1) !

n.ascFactorial k = (n + k - 1).factorial / (n - 1).factorial


@[simp]
lemma toNNReal_neg_one : (-1 : C(X, ℝ)).toNNReal = 0


/-- If `R → S → T` is a tower of algebras, a family of generators `R[X] → T`
gives a family of generators `S[X] → T`. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def extendScalars (P : Generators R T) : Generators S T

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

(Algebra.Generators.extendScalars S P).vars = P.vars


theorem mk_eq_iff (x y : ℕ × K) :
    mk K p x = mk K p y ↔ ∃ z, (frobenius K p)^[y.1 + z] x.2 = (frobenius K p)^[x.1 + z] y.2

(K : Type u)
[CommRing K]
(p : ℕ)
[Fact (Nat.Prime p)]
[CharP K p]
(x y : ℕ × K)

PerfectClosure.mk K p x = PerfectClosure.mk K p y ↔
  ∃ z, (⇑(frobenius K p))^[y.1 + z] x.2 = (⇑(frobenius K p))^[x.1 + z] y.2


@[to_additive] lemma mulEnergy_eq_sum_sq [Fintype α] (s t : Finset α) :
    Eₘ[s, t] = ∑ a, ((s ×ˢ t).filter fun (x, y) ↦ x * y = a).card ^ 2

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

s.addEnergy t =
  ∑ a : α,
    (Finset.filter (fun x => Finset.addEnergy_eq_sum_sq'.match_1 (fun x => Prop) x fun x y => x + y = a)
          (s ×ˢ t)).card ^
      2


lemma indicator_smul_left (s : Set α) (r : α → R) (f : α → M) :
    indicator s (fun a ↦ r a • f a) = fun a ↦ indicator s r a • f a

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero R]
[Zero M]
[SMulWithZero R M]
(s : Set α)
(r : α → R)
(f : α → M)

(s.indicator fun a => r a • f a) = fun a => s.indicator r a • f a


theorem eventually_filterAt_mem_setsAt (x : α) : ∀ᶠ a in v.filterAt x, a ∈ v.setsAt x

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(v : VitaliFamily μ)
(x : α)

∀ᶠ (a : Set α) in v.filterAt x, a ∈ v.setsAt x


/-- Note that the identity is a cycle on any subsingleton set, but not a cycle. -/
protected theorem IsCycleOn.subtypePerm (hf : f.IsCycleOn s) :
    (f.subtypePerm fun _ => hf.apply_mem_iff.symm : Perm s).IsCycleOn _root_.Set.univ

{α : Type u_2}
{f : Equiv.Perm α}
{s : Set α}
(hf : f.IsCycleOn s)


@[to_additive]
theorem eq_inv_mul_of_mul_eq (h : b * a = c) : a = b⁻¹ * c

{G : Type u_3}
[AddGroup G]
{a b c : G}
(h : b + a = c)


@[simp, norm_cast]
lemma mk_apply (μ : Measure Ω) (hμ) (s : Set Ω) :
    DFunLike.coe (F := FiniteMeasure Ω) ⟨μ, hμ⟩ s = (μ s).toNNReal

{Ω : Type u_1}
[MeasurableSpace Ω]
(μ : MeasureTheory.Measure Ω)
(hμ : MeasureTheory.IsFiniteMeasure μ)
(s : Set Ω)


theorem toPartENat_lift (c : Cardinal.{v}) : toPartENat (lift.{u, v} c) = toPartENat c

Cardinal.toPartENat (Cardinal.lift.{u, v} c) = Cardinal.toPartENat c


/-- The second projection `Triangle C ⥤ C`. -/
@[simps]
def π₂ : Triangle C ⥤ C

(T : CategoryTheory.Pretriangulated.Triangle C)

CategoryTheory.Pretriangulated.Triangle.π₂.obj T = T.obj₂


theorem uIcc_subset_uIcc_iff_le' :
    [[a₁, b₁]] ⊆ [[a₂, b₂]] ↔ a₂ ⊓ b₂ ≤ a₁ ⊓ b₁ ∧ a₁ ⊔ b₁ ≤ a₂ ⊔ b₂

{α : Type u_2}
[Lattice α]
[LocallyFiniteOrder α]
{a₁ a₂ b₁ b₂ : α}


private theorem add_left_aux7 (y z : E) :
    ‖(I : 𝕜) • y + 2 • z‖ * ‖(I : 𝕜) • y + 2 • z‖ =
    2 * (‖(I : 𝕜) • y + z‖ * ‖(I : 𝕜) • y + z‖ + ‖z‖ * ‖z‖) - ‖(I : 𝕜) • y‖ * ‖(I : 𝕜) • y‖

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[InnerProductSpaceable E]
(y z : E)

‖RCLike.I • y + 2 • z‖ * ‖RCLike.I • y + 2 • z‖ =
  2 * (‖RCLike.I • y + z‖ * ‖RCLike.I • y + z‖ + ‖z‖ * ‖z‖) - ‖RCLike.I • y‖ * ‖RCLike.I • y‖


/-- A total complex shape for three complexes shapes `c₁`, `c₂`, `c₁₂` on three types
`I₁`, `I₂` and `I₁₂` consists of the data and properties that will allow the construction
of a total complex functor `HomologicalComplex₂ C c₁ c₂ ⥤ HomologicalComplex C c₁₂` which
sends `K` to a complex which in degree `i₁₂ : I₁₂` consists of the coproduct
of the `(K.X i₁).X i₂` such that `π ⟨i₁, i₂⟩ = i₁₂`. -/
class TotalComplexShape  where
  /-- a map on indices -/
  π : I₁ × I₂ → I₁₂
  /-- the sign of the horizontal differential in the total complex -/
  ε₁ : I₁ × I₂ → ℤˣ
  /-- the sign of the vertical differential in the total complex -/
  ε₂ : I₁ × I₂ → ℤˣ
  rel₁ {i₁ i₁' : I₁} (h : c₁.Rel i₁ i₁') (i₂ : I₂) : c₁₂.Rel (π ⟨i₁, i₂⟩) (π ⟨i₁', i₂⟩)
  rel₂ (i₁ : I₁) {i₂ i₂' : I₂} (h : c₂.Rel i₂ i₂') : c₁₂.Rel (π ⟨i₁, i₂⟩) (π ⟨i₁, i₂'⟩)
  ε₂_ε₁ {i₁ i₁' : I₁} {i₂ i₂' : I₂} (h₁ : c₁.Rel i₁ i₁') (h₂ : c₂.Rel i₂ i₂') :
    ε₂ ⟨i₁, i₂⟩ * ε₁ ⟨i₁, i₂'⟩ = - ε₁ ⟨i₁, i₂⟩ * ε₂ ⟨i₁', i₂⟩

{I₁ : Type u_1}
{I₂ : Type u_2}
{I₁₂ : Type u_3}
{c₁ : ComplexShape I₁}
{c₂ : ComplexShape I₂}
{c₁₂ : ComplexShape I₁₂}
[self : TotalComplexShape c₁ c₂ c₁₂]
(i₁ : I₁)
{i₂ i₂' : I₂}
(h : c₂.Rel i₂ i₂')

c₁₂.Rel (TotalComplexShape.π c₁ c₂ c₁₂ (i₁, i₂)) (TotalComplexShape.π c₁ c₂ c₁₂ (i₁, i₂'))


/-- The image of `seminormFromConst_seq c f x` is bounded below by zero. -/
theorem seminormFromConst_bddBelow (x : R) :
    BddBelow (Set.range (seminormFromConst_seq c f x))

{R : Type u_1}
[CommRing R]
(c : R)
(f : RingSeminorm R)
(x : R)


@[to_additive]
lemma isUnit_ofPowEqOne (ha : a ^ n = 1) (hn : n ≠ 0) : IsUnit a

{M : Type u_1}
[AddMonoid M]
{n : ℕ}
{a : M}
(ha : n • a = 0)
(hn : n ≠ 0)


@[to_additive (attr := simp)]
theorem mul_eq_empty : s * t = ∅ ↔ s = ∅ ∨ t = ∅


@[simp] theorem ofBddAugment_E (E : Set α) Indep indep_empty indep_subset indep_aug
    indep_bdd subset_ground : (IndepMatroid.ofBddAugment
      E Indep indep_empty indep_subset indep_aug indep_bdd subset_ground).E = E

(indep_subset : ∀ ⦃I J : Set α⦄, Indep J → I ⊆ J → Indep I)

(indep_aug : ∀ ⦃I J : Set α⦄, Indep I → Indep J → I.encard < J.encard → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))

(indep_bdd : ∃ n, ∀ (I : Set α), Indep I → I.encard ≤ ↑n)

(subset_ground : ∀ (I : Set α), Indep I → I ⊆ E)


@[simp]
theorem imK_star : (star a).imK = -a.imK

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])


theorem div_le_div_of_nonpos_of_le (hc : c ≤ 0) (h : b ≤ a) : a / c ≤ b / c

{α : Type u_2}
[LinearOrderedField α]
{a b c : α}
(hc : c ≤ 0)
(h : b ≤ a)


theorem hasFPowerSeriesOnBall_changeOrigin (k : ℕ) (hr : 0 < p.radius) :
    HasFPowerSeriesOnBall (fun x => p.changeOrigin x k) (p.changeOriginSeries k) 0 p.radius

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
(p : FormalMultilinearSeries 𝕜 E F)
(k : ℕ)
(hr : 0 < p.radius)


theorem _root_.Real.le_coe_toNNReal (r : ℝ) : r ≤ Real.toNNReal r


@[simp, norm_cast]
theorem div_to_nat : ∀ n d, ((n / d : Num) : ℕ) = n / d


@[to_additive (attr := simp)]
theorem OneHom.one_apply [One M] [One N] (x : M) : (1 : OneHom M N) x = 1

{M : Type u_4}
{N : Type u_5}
[Zero M]
[Zero N]
(x : M)


/-- The **Ahlswede-Zhang Identity**. -/
lemma infSum_eq_one (h𝒜₁ : 𝒜.Nonempty) (h𝒜₀ : ∅ ∉ 𝒜) : infSum 𝒜 = 1

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{𝒜 : Finset (Finset α)}
[Nonempty α]
(h𝒜₁ : 𝒜.Nonempty)
(h𝒜₀ : ∅ ∉ 𝒜)


@[simp]
theorem mapRange.linearEquiv_refl :
    mapRange.linearEquiv (LinearEquiv.refl R M) = LinearEquiv.refl R (α →₀ M)

{α : Type u_1}
{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]

Finsupp.mapRange.linearEquiv (LinearEquiv.refl R M) = LinearEquiv.refl R (α →₀ M)


/-- If `f,g` is reflexive, then `g,f` is reflexive. -/
theorem IsReflexivePair.swap [IsReflexivePair f g] : IsReflexivePair g f

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


@[simp]
theorem coe_lift_symm_apply (F : Sym2 α → β) (a₁ a₂ : α) :
    (lift.symm F : α → α → β) a₁ a₂ = F s(a₁, a₂)

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


/-- Every functor indexing a wide (co)equalizer is naturally isomorphic (actually, equal) to a
    `parallelFamily` -/
@[simps!]
def diagramIsoParallelFamily (F : WalkingParallelFamily J ⥤ C) :
    F ≅ parallelFamily fun j => F.map (line j)

(F : CategoryTheory.Functor (CategoryTheory.Limits.WalkingParallelFamily J) C)

(X : CategoryTheory.Limits.WalkingParallelFamily J)

(CategoryTheory.Limits.diagramIsoParallelFamily F).hom.app X = CategoryTheory.eqToHom ⋯


theorem succ_ne_last_of_lt {p i : Fin n} (h : i < p) : succ i ≠ last n


@[simp]
lemma one_toLinearMap :
    (1 : A₁ ≃ₐ[R] A₁).toLinearMap = 1

{R : Type uR}
{A₁ : Type uA₁}
[CommSemiring R]
[Semiring A₁]
[Algebra R A₁]


@[to_additive]
theorem orderOf_map_dvd {H : Type*} [Monoid H] (ψ : G →* H) (x : G) :
    orderOf (ψ x) ∣ orderOf x

{G : Type u_1}
[Monoid G]
{H : Type u_6}
[Monoid H]
(ψ : G →* H)
(x : G)


theorem setCurr (h : ValidFor l (c :: r) it) :
    ValidFor l (c :: r) (it.setCurr c)

(h : String.Iterator.ValidFor l (c :: r) it)

String.Iterator.ValidFor l (c :: r) (it.setCurr c)


theorem rank_real_complex'.{u} : Cardinal.lift.{u} (Module.rank ℝ ℂ) = 2

Cardinal.lift.{u, 0} (Module.rank ℝ ℂ) = 2


@[simp]
theorem sym_unsym (a : α) : sym (unsym a) = a


theorem isUnit_toStalk (x : PrimeSpectrum.Top R) (f : x.asIdeal.primeCompl) :
    IsUnit (toStalk R x (f : R))

(x : ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

IsUnit ((AlgebraicGeometry.StructureSheaf.toStalk R x) ↑f)


@[simp]
theorem cofinite_eq_bot [Finite α] : @cofinite α = ⊥


@[to_additive (attr := simp)]
theorem snd_comp_toProd : (MonoidHom.snd M N).comp toProd = snd

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

(AddMonoidHom.snd M N).comp AddMonoid.Coprod.toSum = AddMonoid.Coprod.snd


@[simp] theorem casesDiagOn_zero_succ {motive : Nat → Nat → Sort _} (zero_zero : motive 0 0)
    (zero_succ : ∀ n, motive 0 (n+1)) (succ_zero : ∀ m, motive (m+1) 0)
    (succ_succ : ∀ m n, motive (m+1) (n+1)) (n) :
    Nat.casesDiagOn 0 (n+1) zero_zero zero_succ succ_zero succ_succ = zero_succ n

(zero_succ : (n : Nat) → motive 0 (n + 1))

(succ_zero : (m : Nat) → motive (m + 1) 0)

(succ_succ : (m n : Nat) → motive (m + 1) (n + 1))

Nat.casesDiagOn 0 (n + 1) zero_zero zero_succ succ_zero succ_succ = zero_succ n


theorem expSeries_hasSum_exp_of_mem_ball (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasSum (fun n => expSeries 𝕂 𝔸 n fun _ => x) (exp 𝕂 x)

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝔸).radius)

HasSum (fun n => (NormedSpace.expSeries 𝕂 𝔸 n) fun x_1 => x) (NormedSpace.exp 𝕂 x)


/-- The constant function with value `x : ℂ` as a modular form of weight 0 and any level. -/
@[simps! (config := .asFn) toFun toSlashInvariantForm]
def const (x : ℂ) : ModularForm Γ 0

(ModularForm.const x).toSlashInvariantForm = SlashInvariantForm.const x


theorem constOn_of_comp (cont : ContinuousOn g s)
    (he : ∀ a ∈ s, ∀ a' ∈ s, p (g a) = p (g a'))
    {a a'} (ha : a ∈ s) (ha' : a' ∈ s) : g a = g a'


theorem lt_sup_iff_not_mem {I : Submodule R M} {a : M} : (I < I ⊔ R ∙ a) ↔ a ∉ I

{R : Type u_1}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{I : Submodule R M}
{a : M}


theorem isLUB_le_iff (h : IsLUB s a) : a ≤ b ↔ b ∈ upperBounds s

{α : Type u}
[Preorder α]
{s : Set α}
{a b : α}
(h : IsLUB s a)


/--
The condition `Precoherent C` is essentially the minimal condition required to define the
coherent coverage on `C`.
-/
class Precoherent : Prop where
  /--
  Given an effective epi family `π₁` over `B₁` and a morphism `f : B₂ ⟶ B₁`, there exists
  an effective epi family `π₂` over `B₂`, such that `π₂` factors through `π₁`.
  -/
  pullback {B₁ B₂ : C} (f : B₂ ⟶ B₁) :
    ∀ (α : Type) [Finite α] (X₁ : α → C) (π₁ : (a : α) → (X₁ a ⟶ B₁)),
      EffectiveEpiFamily X₁ π₁ →
    ∃ (β : Type) (_ : Finite β) (X₂ : β → C) (π₂ : (b : β) → (X₂ b ⟶ B₂)),
      EffectiveEpiFamily X₂ π₂ ∧
      ∃ (i : β → α) (ι : (b :  β) → (X₂ b ⟶ X₁ (i b))),
      ∀ (b : β), ι b ≫ π₁ _ = π₂ _ ≫ f

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[self : CategoryTheory.Precoherent C]
{B₁ B₂ : C}
(f : B₂ ⟶ B₁)
(α : Type)
[Finite α]
(X₁ : α → C)
(π₁ : (a : α) → X₁ a ⟶ B₁)

CategoryTheory.EffectiveEpiFamily X₁ π₁ →
  ∃ β,
    ∃ (_ : Finite β),
      ∃ X₂ π₂,
        CategoryTheory.EffectiveEpiFamily X₂ π₂ ∧
          ∃ i ι,
            ∀ (b : β), CategoryTheory.CategoryStruct.comp (ι b) (π₁ (i b)) = CategoryTheory.CategoryStruct.comp (π₂ b) f


/-- The convergent of `GenContFract.of v` at step `n - 1` is exactly `v` if the
`IntFractPair.stream` of the corresponding continued fraction terminated at step `n`. -/
theorem of_correctness_of_nth_stream_eq_none (nth_stream_eq_none : IntFractPair.stream v n = none) :
    v = (of v).convs (n - 1)

(nth_stream_eq_none : GenContFract.IntFractPair.stream v n = none)


@[to_additive (attr := simp, norm_cast)]
theorem val_eq_one {a : αˣ} : (a : α) = 1 ↔ a = 1

{α : Type u}
[AddMonoid α]
{a : AddUnits α}


theorem LiftRel.trans (R : α → α → Prop) (H : Transitive R) : Transitive (LiftRel R)

{α : Type u}
(R : α → α → Prop)
(H : Transitive R)


theorem minimum_ne_top_of_ne_nil (h : l ≠ []) : l.minimum ≠ ⊤

{α : Type u_1}
[LinearOrder α]
{l : List α}
(h : l ≠ [])


/-- The normal form for words in the pushout. Every element of the pushout is the product of an
element of the base group and a word made up of letters each of which is in the transversal. -/
structure _root_.Monoid.PushoutI.NormalWord (d : Transversal φ) extends CoprodI.Word G where
  /-- Every `NormalWord` is the product of an element of the base group and a word made up
  of letters each of which is in the transversal. `head` is that element of the base group. -/
  head : H
  /-- All letter in the word are in the transversal. -/
  normalized : ∀ i g, ⟨i, g⟩ ∈ toList → g ∈ d.set i

{d : Monoid.PushoutI.NormalWord.Transversal φ}


@[simp]
theorem conj_re (z : ℂ) : (conj z).re = z.re


@[reassoc, elementwise] -- @[simp] -- Porting note (#10618): simp can prove this
theorem comm_from (f : Hom C₁ C₂) (i : ι) : f.f i ≫ C₂.dFrom i = C₁.dFrom i ≫ f.next i


@[simp]
theorem swap_wcovBy_swap : x.swap ⩿ y.swap ↔ x ⩿ y

{α : Type u_1}
{β : Type u_2}
[PartialOrder α]
[PartialOrder β]
{x y : α × β}


@[simp] -- Should be replaced with `SemilinearIsometryClass.nnorm_map` when `lean4#3107` is fixed.
theorem nnnorm_map (x : E) : ‖f x‖₊ = ‖x‖₊

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗᵢ[σ₁₂] E₂)
(x : E)

‖f x‖₊ = ‖x‖₊


lemma commShiftIso_comp_hom_app [F.CommShift A] [G.CommShift A] (a : A) (X : C) :
    (commShiftIso (F ⋙ G) a).hom.app X =
      G.map ((commShiftIso F a).hom.app X) ≫ (commShiftIso G a).hom.app (F.obj X)

{C : Type u_1}
{D : Type u_2}
{E : Type u_3}
[CategoryTheory.Category.{u_6, u_1} C]
[CategoryTheory.Category.{u_7, u_2} D]
[CategoryTheory.Category.{u_8, u_3} E]
(F : CategoryTheory.Functor C D)
(G : CategoryTheory.Functor D E)
{A : Type u_4}
[AddMonoid A]
[CategoryTheory.HasShift C A]
[CategoryTheory.HasShift D A]
[CategoryTheory.HasShift E A]
[F.CommShift A]
[G.CommShift A]
(a : A)
(X : C)

((F.comp G).commShiftIso a).hom.app X =
  CategoryTheory.CategoryStruct.comp (G.map ((F.commShiftIso a).hom.app X)) ((G.commShiftIso a).hom.app (F.obj X))


lemma aeval_apply_smul_mem_of_le_comap (f : Module.End R M) (hq : q ≤ q.comap f) :
    aeval f p m ∈ q

{R : Type u}
{M : Type u_3}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{q : Submodule R M}
{m : M}
(hm : m ∈ q)
(p : R[X])
(f : Module.End R M)
(hq : q ≤ Submodule.comap f q)


@[simp]
theorem pi_apply (f : (i : ι) → M₂ →ₗ[R] φ i) (c : M₂) (i : ι) : pi f c i = f i c

{R : Type u}
{M₂ : Type w}
{ι : Type x}
[Semiring R]
[AddCommMonoid M₂]
[Module R M₂]
{φ : ι → Type i}
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(f : (i : ι) → M₂ →ₗ[R] φ i)
(c : M₂)
(i : ι)


theorem integral_nonpos_of_ae {f : α → ℝ} (hf : f ≤ᵐ[μ] 0) : ∫ a, f a ∂μ ≤ 0

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


@[to_additive]
theorem mulSupport_mulSingle_subset : mulSupport (mulSingle a b) ⊆ {a}

{A : Type u_1}
{B : Type u_2}
[DecidableEq A]
[Zero B]
{a : A}
{b : B}


@[simp]
theorem symm_trans_apply (h₁ : α ≃ᵢ β) (h₂ : β ≃ᵢ γ) (x : γ) :
    (h₁.trans h₂).symm x = h₁.symm (h₂.symm x)

{α : Type u}
{β : Type v}
{γ : Type w}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
[PseudoEMetricSpace γ]
(h₁ : α ≃ᵢ β)
(h₂ : β ≃ᵢ γ)
(x : γ)


@[simp] lemma addSubmonoid_closure_range_pow {n : ℕ} (hn : Even n) :
    closure (range fun x : ℤ ↦ x ^ n) = nonneg _

AddSubmonoid.closure (Set.range fun x => x ^ n) = AddSubmonoid.nonneg ℤ


@[mono]
theorem cast_mono : Monotone ((↑) : ℚ → K)


theorem eq_zero_iff {I : FractionalIdeal S P} : I = 0 ↔ ∀ x ∈ I, x = (0 : P)

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


@[ext] theorem eq_of_getLsb_eq {x y : BitVec w}
    (pred : ∀(i : Fin w), x.getLsb i.val = y.getLsb i.val) : x = y

(pred : ∀ (i : Fin w), x.getLsb ↑i = y.getLsb ↑i)


@[simp]
theorem Tape.write_mk' {Γ} [Inhabited Γ] (a b : Γ) (L R : ListBlank Γ) :
    (Tape.mk' L (R.cons a)).write b = Tape.mk' L (R.cons b)

{Γ : Type u_1}
[Inhabited Γ]
(a b : Γ)
(L R : Turing.ListBlank Γ)

Turing.Tape.write b (Turing.Tape.mk' L (Turing.ListBlank.cons a R)) = Turing.Tape.mk' L (Turing.ListBlank.cons b R)


theorem mul_eq_zero_of_right (a : M₀) {b : M₀} (h : b = 0) : a * b = 0

{M₀ : Type u_1}
[MulZeroClass M₀]
(a : M₀)
{b : M₀}
(h : b = 0)


/-- The coproduct of the cocompact filters on two topological spaces is the cocompact filter on
their product. -/
theorem Filter.coprod_cocompact :
    (Filter.cocompact X).coprod (Filter.cocompact Y) = Filter.cocompact (X × Y)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem nhdsSet_eq_comap (hf : Inducing f) (s : Set X) :
    𝓝ˢ s = comap f (𝓝ˢ (f '' s))

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


/-- If `I` is an ideal, and `pᵢ` is a finite family of polynomials each satisfying
`∀ k, (pᵢ)ₖ ∈ Iⁿⁱ⁻ᵏ` for some `nᵢ`, then `p = ∏ pᵢ` also satisfies `∀ k, pₖ ∈ Iⁿ⁻ᵏ` with `n = ∑ nᵢ`.
-/
theorem _root_.Polynomial.coeff_prod_mem_ideal_pow_tsub {ι : Type*} (s : Finset ι) (f : ι → R[X])
    (I : Ideal R) (n : ι → ℕ) (h : ∀ i ∈ s, ∀ (k), (f i).coeff k ∈ I ^ (n i - k)) (k : ℕ) :
    (s.prod f).coeff k ∈ I ^ (s.sum n - k)

(h : ∀ i ∈ s, ∀ (k : ℕ), (f i).coeff k ∈ I ^ (n i - k))


/-- The equivalence between isomorphisms in `CompactlyGenerated` and homeomorphisms
of topological spaces. -/
@[simps]
def isoEquivHomeo {X Y : CompactlyGenerated.{u, w}} : (X ≅ Y) ≃ (X ≃ₜ Y)

CompactlyGenerated.isoEquivHomeo f = CompactlyGenerated.homeoOfIso f


protected theorem LTCmp.compareOfLessAndEq
    [LT α] [DecidableRel (LT.lt (α := α))] [DecidableEq α]
    (lt_irrefl : ∀ x : α, ¬x < x)
    (lt_trans : ∀ {x y z : α}, x < y → y < z → x < z)
    (lt_antisymm : ∀ {x y : α}, ¬x < y → ¬y < x → x = y) :
    LTCmp (α := α) (compareOfLessAndEq · ·)

Batteries.LTCmp fun x x_1 => compareOfLessAndEq x x_1


theorem _root_.Bornology.IsBounded.subset_closedBall (h : IsBounded s) (c : α) :
    ∃ r, s ⊆ closedBall c r

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
(h : Bornology.IsBounded s)
(c : α)


@[to_additive]
theorem TendstoUniformly.mul (hf : TendstoUniformly f g l) (hf' : TendstoUniformly f' g' l) :
    TendstoUniformly (f * f') (g * g') l

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[Group α]
[UniformGroup α]
{ι : Type u_3}
{l : Filter ι}
{f f' : ι → β → α}
{g g' : β → α}
(hf : TendstoUniformly f g l)
(hf' : TendstoUniformly f' g' l)


@[simp]
theorem AddMonoidAlgebra.toDirectSum_single (i : ι) (m : M) :
    AddMonoidAlgebra.toDirectSum (Finsupp.single i m) = DirectSum.of _ i m

{ι : Type u_1}
{M : Type u_3}
[DecidableEq ι]
[Semiring M]
(i : ι)
(m : M)

AddMonoidAlgebra.toDirectSum (Finsupp.single i m) = (DirectSum.of (fun i => M) i) m


{P : Type u_1}
[Preorder P]
(D : Order.Cofinal P)
(x : P)


@[simp]
theorem comp_id (f : LocallyBoundedMap α β) : f.comp (LocallyBoundedMap.id α) = f

{α : Type u_2}
{β : Type u_3}
[Bornology α]
[Bornology β]
(f : LocallyBoundedMap α β)


theorem homOfElement_eq_iff {X : Type u} (x y : X) : homOfElement x = homOfElement y ↔ x = y

CategoryTheory.homOfElement x = CategoryTheory.homOfElement y ↔ x = y


@[simp]
theorem toMeasure_ofFinset_apply [MeasurableSpace α] (ht : MeasurableSet t) :
    (ofFinset f s h h').toMeasure t = ∑' x, t.indicator f x

{α : Type u_1}
{f : α → ENNReal}
{s : Finset α}
(h : ∑ a ∈ s, f a = 1)
(h' : ∀ a ∉ s, f a = 0)
(t : Set α)
[MeasurableSpace α]
(ht : MeasurableSet t)

(PMF.ofFinset f s h h').toMeasure t = ∑' (x : α), t.indicator f x


theorem tendsto_toReal_iff {ι} {fi : Filter ι} {f : ι → ℝ≥0∞} (hf : ∀ i, f i ≠ ∞) {x : ℝ≥0∞}
    (hx : x ≠ ∞) : Tendsto (fun n => (f n).toReal) fi (𝓝 x.toReal) ↔ Tendsto f fi (𝓝 x)

{ι : Type u_4}
{fi : Filter ι}
{f : ι → ℝ≥0∞}
(hf : ∀ (i : ι), f i ≠ ⊤)
{x : ℝ≥0∞}
(hx : x ≠ ⊤)

Filter.Tendsto (fun n => (f n).toReal) fi (𝓝 x.toReal) ↔ Filter.Tendsto f fi (𝓝 x)


theorem nnnorm_lt_iff {r : ℝ≥0} (hr : 0 < r) {A : Matrix m n α} :
    ‖A‖₊ < r ↔ ∀ i j, ‖A i j‖₊ < r

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
{r : ℝ≥0}
(hr : 0 < r)
{A : Matrix m n α}

‖A‖₊ < r ↔ ∀ (i : m) (j : n), ‖A i j‖₊ < r


@[simp, mfld_simps]
theorem localTriv_symm_apply (p : B × F) :
    (Z.localTriv i).toPartialHomeomorph.symm p = ⟨p.1, Z.coordChange i (Z.indexAt p.1) p.1 p.2⟩

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i : ι)
(p : B × F)

↑(Z.localTriv i).symm p = { proj := p.1, snd := Z.coordChange i (Z.indexAt p.1) p.1 p.2 }


theorem ext_iff {f g : A ≃⋆ₐ[R] B} : f = g ↔ ∀ a, f a = g a

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
[Add A]
[Add B]
[Mul A]
[Mul B]
[SMul R A]
[SMul R B]
[Star A]
[Star B]
{f g : A ≃⋆ₐ[R] B}


theorem isArtinian_iff_wellFounded :
    IsArtinian R M ↔ WellFounded ((· < ·) : Submodule R M → Submodule R M → Prop)

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]

IsArtinian R M ↔ WellFounded fun x x_1 => x < x_1


@[to_additive]
lemma isOfFinOrder_iff_zpow_eq_one {G} [Group G] {x : G} :
    IsOfFinOrder x ↔ ∃ (n : ℤ), n ≠ 0 ∧ x ^ n = 1

IsOfFinAddOrder x ↔ ∃ n, n ≠ 0 ∧ n • x = 0


/-- Intermediate lemma for `unifTight_of_tendsto_Lp`. -/
private theorem unifTight_of_tendsto_Lp_zero (hp' : p ≠ ∞) (hf : ∀ n, Memℒp (f n) p μ)
    (hf_tendsto : Tendsto (fun n ↦ eLpNorm (f n) p μ) atTop (𝓝 0)) : UnifTight f p μ

{f : ℕ → α → β}

(hf : ∀ (n : ℕ), MeasureTheory.Memℒp (f n) p μ)

(hf_tendsto : Filter.Tendsto (fun n => MeasureTheory.eLpNorm (f n) p μ) Filter.atTop (nhds 0))


@[simp]
lemma preNormEDS'_four : preNormEDS' b c d 4 = d


@[to_additive]
lemma Nat.Coprime.orderOf_pow (h : (orderOf y).Coprime m) : orderOf (y ^ m) = orderOf y

{G : Type u_1}
[AddMonoid G]
{y : G}
{m : ℕ}
(h : (addOrderOf y).Coprime m)


/-- A skyscraper presheaf is a presheaf supported at a single point: if `p₀ ∈ X` is a specified
point, then the skyscraper presheaf `𝓕` with value `A` is defined by `U ↦ A` if `p₀ ∈ U` and
`U ↦ *` if `p₀ ∉ A` where `*` is some terminal object.
-/
@[simps]
def skyscraperPresheaf : Presheaf C X

[(U : TopologicalSpace.Opens ↑X) → Decidable (p₀ ∈ U)]

(skyscraperPresheaf p₀ A).map i =
  if h : p₀ ∈ Opposite.unop V then CategoryTheory.eqToHom ⋯
  else (⋯ ▸ CategoryTheory.Limits.terminalIsTerminal).from ((fun U => if p₀ ∈ Opposite.unop U then A else ⊤_ C) U)


@[simp]
theorem smul_apply {x : HahnSeries Γ R} {s : SummableFamily Γ R α} {a : α} : (x • s) a = x * s a

{Γ : Type u_1}
{R : Type u_2}
[OrderedCancelAddCommMonoid Γ]
[Semiring R]
{α : Type u_3}
{x : HahnSeries Γ R}
{s : HahnSeries.SummableFamily Γ R α}
{a : α}


@[reassoc (attr := simp)]
theorem toPlus_naturality {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) :
    η ≫ J.toPlus Q = J.toPlus _ ≫ J.plusMap η

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

CategoryTheory.CategoryStruct.comp η (J.toPlus Q) = CategoryTheory.CategoryStruct.comp (J.toPlus P) (J.plusMap η)


protected theorem eq_iff_le_and_ge : ∀{a b : Nat}, a = b ↔ a ≤ b ∧ b ≤ a


@[simp] theorem ofFinset_indep [DecidableEq α] (E : Set α) Indep indep_empty indep_subset indep_aug
    subset_ground {I : Finset α} : (IndepMatroid.ofFinset
      E Indep indep_empty indep_subset indep_aug subset_ground).Indep I ↔ Indep I

(indep_subset : ∀ ⦃I J : Finset α⦄, Indep J → I ⊆ J → Indep I)

(indep_aug : ∀ ⦃I J : Finset α⦄, Indep I → Indep J → I.card < J.card → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))

(subset_ground : ∀ ⦃I : Finset α⦄, Indep I → ↑I ⊆ E)

(IndepMatroid.ofFinset E Indep indep_empty indep_subset indep_aug subset_ground).Indep ↑I ↔ Indep I


@[simp] theorem sign_of_add_one (x : Nat) : Int.sign (x + 1) = 1


theorem coe_center : ↑(center R) = Set.center R

(R : Type u)
[NonUnitalNonAssocSemiring R]

↑(NonUnitalSubsemiring.center R) = Set.center R


@[simp, norm_cast]
theorem toENNReal_mul (m n : ℕ∞) : ↑(m * n) = (m * n : ℝ≥0∞)


theorem nmul_lt_nmul_of_pos_right (h₁ : a < b) (h₂ : 0 < c) : a ⨳ c < b ⨳ c

{a b c : Ordinal.{u}}
(h₁ : a < b)
(h₂ : 0 < c)


@[higher_order tsnd_comp_tsnd]
theorem comp_tsnd {α β₀ β₁ β₂} (g : β₀ → F β₁) (g' : β₁ → G β₂) (x : t α β₀) :
    Comp.mk (tsnd g' <$> tsnd g x) = tsnd (Comp.mk ∘ map g' ∘ g) x

{t : Type u → Type u → Type u}
[Bitraversable t]
{F G : Type u → Type u}
[Applicative F]
[Applicative G]
[LawfulBitraversable t]
[LawfulApplicative F]
[LawfulApplicative G]
{α β₀ β₁ β₂ : Type u}
(g : β₀ → F β₁)
(g' : β₁ → G β₂)

Functor.Comp.mk ∘ Functor.map (Bitraversable.tsnd g') ∘ Bitraversable.tsnd g =
  Bitraversable.tsnd (Functor.Comp.mk ∘ Functor.map g' ∘ g)


@[simp]
theorem frobenius_norm_diagonal [DecidableEq n] (v : n → α) :
    ‖diagonal v‖ = ‖(WithLp.equiv 2 _).symm v‖

{n : Type u_4}
{α : Type u_5}
[Fintype n]
[SeminormedAddCommGroup α]
[DecidableEq n]
(v : n → α)

‖Matrix.diagonal v‖ = ‖(WithLp.equiv 2 (n → α)).symm v‖


/-- A symmetric linear map `T` is zero if and only if `⟪T x, x⟫_ℝ = 0` for all `x`.
See `inner_map_self_eq_zero` for the complex version without the symmetric assumption. -/
theorem IsSymmetric.inner_map_self_eq_zero {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) :
    (∀ x, ⟪T x, x⟫ = 0) ↔ T = 0

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{T : E →ₗ[𝕜] E}
(hT : T.IsSymmetric)


@[simp, norm_cast] lemma coe_comap (L : Sublattice β) (f : LatticeHom α β) : L.comap f = f ⁻¹' L

{α : Type u_2}
{β : Type u_3}
[Lattice α]
[Lattice β]
(L : Sublattice β)
(f : LatticeHom α β)


@[simp]
theorem nnnorm_ofSubsingleton [Subsingleton ι] (i : ι) (f : G →L[𝕜] G') :
    ‖ofSubsingleton 𝕜 G G' i f‖₊ = ‖f‖₊

{𝕜 : Type u}
{ι : Type v}
{G : Type wG}
{G' : Type wG'}
[Fintype ι]
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup G]
[NormedSpace 𝕜 G]
[SeminormedAddCommGroup G']
[NormedSpace 𝕜 G']
[Subsingleton ι]
(i : ι)
(f : G →L[𝕜] G')

‖(ContinuousMultilinearMap.ofSubsingleton 𝕜 G G' i) f‖₊ = ‖f‖₊


@[simp]
theorem div_spanSingleton (J : FractionalIdeal R₁⁰ K) (d : K) :
    J / spanSingleton R₁⁰ d = spanSingleton R₁⁰ d⁻¹ * J

{R₁ : Type u_3}
[CommRing R₁]
{K : Type u_4}
[Field K]
[Algebra R₁ K]
[IsFractionRing R₁ K]
[IsDomain R₁]
(J : FractionalIdeal R₁⁰ K)
(d : K)

J / FractionalIdeal.spanSingleton R₁⁰ d = FractionalIdeal.spanSingleton R₁⁰ d⁻¹ * J


@[simp] lemma op_whiskerLeft (X : C) {Y Z : C} (f : Y ⟶ Z) :
    (X ◁ f).op = op X ◁ f.op

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

(CategoryTheory.MonoidalCategory.whiskerLeft X f).op = CategoryTheory.MonoidalCategory.whiskerLeft (Opposite.op X) f.op


/-- A category is (finitary) pre-extensive if it has finite coproducts,
and binary coproducts are universal. -/
class FinitaryPreExtensive (C : Type u) [Category.{v} C] : Prop where
  [hasFiniteCoproducts : HasFiniteCoproducts C]
  [hasPullbacksOfInclusions : HasPullbacksOfInclusions C]
  /-- In a finitary extensive category, all coproducts are van Kampen-/
  universal' : ∀ {X Y : C} (c : BinaryCofan X Y), IsColimit c → IsUniversalColimit c

[self : CategoryTheory.FinitaryPreExtensive C]


theorem SimpleFunc.coe_toLargerSpace_eq (hm : m ≤ m0) (f : @SimpleFunc β m γ) :
    ⇑(f.toLargerSpace hm) = f

{β : Type u_7}
{γ : Type u_8}
{m m0 : MeasurableSpace β}
(hm : m ≤ m0)
(f : MeasureTheory.SimpleFunc β γ)

↑(MeasureTheory.SimpleFunc.toLargerSpace hm f) = ↑f


theorem lt_rootMultiplicity_iff_isRoot_iterate_derivative_of_mem_nonZeroDivisors'
    {p : R[X]} {t : R} {n : ℕ} (h : p ≠ 0)
    (hnzd : ∀ m ≤ n, m ≠ 0 → (m : R) ∈ nonZeroDivisors R) :
    n < p.rootMultiplicity t ↔ ∀ m ≤ n, (derivative^[m] p).IsRoot t

(hnzd : ∀ m ≤ n, m ≠ 0 → ↑m ∈ nonZeroDivisors R)

n < Polynomial.rootMultiplicity t p ↔ ∀ m ≤ n, ((⇑Polynomial.derivative)^[m] p).IsRoot t


theorem map₂_sup_left (f : M →ₗ[R] N →ₗ[R] P) (p₁ p₂ : Submodule R M) (q : Submodule R N) :
    map₂ f (p₁ ⊔ p₂) q = map₂ f p₁ q ⊔ map₂ f p₂ q

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
{P : Type u_4}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : M →ₗ[R] N →ₗ[R] P)
(p₁ p₂ : Submodule R M)
(q : Submodule R N)

Submodule.map₂ f (p₁ ⊔ p₂) q = Submodule.map₂ f p₁ q ⊔ Submodule.map₂ f p₂ q


@[simp] theorem prodRight_symm_tmul (m₁ : M₁) (m₂ : M₂) (m₃ : M₃) :
    (prodRight R M₁ M₂ M₃).symm (m₁ ⊗ₜ m₂, m₁ ⊗ₜ m₃) = (m₁ ⊗ₜ (m₂, m₃))

(R : Type uR)
(M₁ : Type uM₁)
(M₂ : Type uM₂)
(M₃ : Type uM₃)
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M₁]
[Module R M₂]
[Module R M₃]
(m₁ : M₁)
(m₂ : M₂)
(m₃ : M₃)

(TensorProduct.prodRight R M₁ M₂ M₃).symm (m₁ ⊗ₜ[R] m₂, m₁ ⊗ₜ[R] m₃) = m₁ ⊗ₜ[R] (m₂, m₃)


theorem natTrailingDegree_eq_of_trailingDegree_eq [Semiring S] {q : S[X]}
    (h : trailingDegree p = trailingDegree q) : natTrailingDegree p = natTrailingDegree q

(h : p.trailingDegree = q.trailingDegree)


@[to_additive AddSemiconjBy.prod]
theorem SemiconjBy.prod {x y z : M × N}
    (hm : SemiconjBy x.1 y.1 z.1) (hn : SemiconjBy x.2 y.2 z.2) : SemiconjBy x y z

{M : Type u_5}
{N : Type u_6}
[Mul M]
[Mul N]
{x y z : M × N}
(hm : SemiconjBy x.1 y.1 z.1)
(hn : SemiconjBy x.2 y.2 z.2)


/-- The cardinality of the interval (a, ∞). -/
theorem mk_Ioi_real (a : ℝ) : #(Ioi a) = 𝔠


@[simp]
theorem coeff_zero (i : Fin n) : (0 : TruncatedWittVector p n R).coeff i = 0

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)
(R : Type u_1)
[CommRing R]
(i : Fin n)


@[simp] lemma unmop_inv_associator (X Y Z : Cᴹᵒᵖ) :
    (α_ X Y Z).inv.unmop = (α_ (unmop Z) (unmop Y) (unmop X)).hom

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
(X Y Z : Cᴹᵒᵖ)

(CategoryTheory.MonoidalCategory.associator X Y Z).inv.unmop =
  (CategoryTheory.MonoidalCategory.associator Z.unmop Y.unmop X.unmop).hom


/-- Roger's fixed-point theorem: Any total, computable `f` has a fixed point: That is, under the
interpretation given by `Nat.Partrec.Code.eval`, there is a code `c` such that `c` and `f c` have
the same evaluation.
-/
theorem fixed_point {f : Code → Code} (hf : Computable f) : ∃ c : Code, eval (f c) = eval c

{f : Nat.Partrec.Code → Nat.Partrec.Code}


@[to_additive]
theorem comp₂_left (hf : HasCompactMulSupport f)
    (hf₂ : HasCompactMulSupport f₂) (hm : m 1 1 = 1) :
    HasCompactMulSupport fun x => m (f x) (f₂ x)

{α : Type u_2}
{β : Type u_4}
{γ : Type u_5}
{δ : Type u_6}
[TopologicalSpace α]
[One β]
[One γ]
[One δ]
{f : α → β}
{f₂ : α → γ}
{m : β → γ → δ}
(hf : HasCompactMulSupport f)
(hf₂ : HasCompactMulSupport f₂)
(hm : m 1 1 = 1)


@[to_additive (attr := simp, norm_cast)]
theorem coe_inf : (↑(U ⊓ V) : Set G) = (U : Set G) ∩ V

{G : Type u_1}
[Group G]
[TopologicalSpace G]
{U V : OpenSubgroup G}


@[simp]
theorem insepDegree_bot : insepDegree F (⊥ : IntermediateField F E) = 1

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


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

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


/-- The inverse of a map which preserves multiplication,
preserves multiplication when the target is commutative. -/
@[to_additive
      "The negation of a map which preserves addition, preserves addition
      when the target is commutative."]
theorem inv {α β} [MulOneClass α] [CommGroup β] {f : α → β} (hf : IsMonoidHom f) :
    IsMonoidHom fun a => (f a)⁻¹

{α : Type u_1}
{β : Type u_2}
[AddZeroClass α]
[AddCommGroup β]
{f : α → β}
(hf : IsAddMonoidHom f)


@[simp, norm_cast]
theorem tendsto_coe_nhds_top {f : α → ℝ≥0} {l : Filter α} :
    Tendsto (fun x => (f x : ℝ≥0∞)) l (𝓝 ∞) ↔ Tendsto f l atTop

{α : Type u_1}
{f : α → ℝ≥0}
{l : Filter α}

Filter.Tendsto (fun x => ↑(f x)) l (𝓝 ⊤) ↔ Filter.Tendsto f l Filter.atTop


theorem integrable_comp_snd_map_prod_mk_iff {Ω} {_ : MeasurableSpace Ω} {X : Ω → β} {μ : Measure Ω}
    (hX : Measurable X) {f : Ω → F} :
    Integrable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω)) ↔ Integrable f μ

{β : Type u_2}
{F : Type u_4}
[NormedAddCommGroup F]
{mβ : MeasurableSpace β}
{Ω : Type u_5}

∀ {x : MeasurableSpace Ω} {X : Ω → β} {μ : MeasureTheory.Measure Ω},
  Measurable X →
    ∀ {f : Ω → F},
      MeasureTheory.Integrable (fun x => f x.2) (MeasureTheory.Measure.map (fun ω => (X ω, ω)) μ) ↔
        MeasureTheory.Integrable f μ


@[reassoc (attr := simp)]
theorem limit.lift_π {F : J ⥤ C} [HasLimit F] (c : Cone F) (j : J) :
    limit.lift F c ≫ limit.π F j = c.π.app j

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

CategoryTheory.Limits.limit.lift F c ≫ CategoryTheory.Limits.limit.π F j = c.π.app j


/-- A `RightCancelSemigroup` is a semigroup such that `a * b = c * b` implies `a = c`. -/
@[ext]
class RightCancelSemigroup (G : Type u) extends Semigroup G where
  protected mul_right_cancel : ∀ a b c : G, a * b = c * b → a = c

{G : Type u}
[self : RightCancelSemigroup G]
(a b c : G)


theorem op_sSup (S : Set (Subsemiring R)) : (sSup S).op = sSup (.unop ⁻¹' S)

{R : Type u_2}
[NonAssocSemiring R]
(S : Set (Subsemiring R))

(sSup S).op = sSup (Subsemiring.unop ⁻¹' S)


protected theorem disjoint (h : SeparatedNhds s t) : Disjoint s t

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


@[simp, norm_cast]
theorem coe_union (s₁ s₂ : Finset α) : ↑(s₁ ∪ s₂) = (s₁ ∪ s₂ : Set α)

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

↑(s₁ ∪ s₂) = ↑s₁ ∪ ↑s₂


theorem lintegral_add_right' (f : α → ℝ≥0∞) {g : α → ℝ≥0∞} (hg : AEMeasurable g μ) :
    ∫⁻ a, f a + g a ∂μ = ∫⁻ a, f a ∂μ + ∫⁻ a, g a ∂μ

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

∫⁻ (a : α), f a + g a ∂μ = ∫⁻ (a : α), f a ∂μ + ∫⁻ (a : α), g a ∂μ


protected theorem map_neg (x : E) : f (-x) = -f x

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗᵢ[σ₁₂] E₂)
(x : E)


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

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{f : α → β}
{x : α}
{s t : Set α}
(h : LowerSemicontinuousWithinAt f s x)
(hst : t ⊆ s)


@[simp]
theorem mul_moveRight_inl {x y : PGame} {i j} :
    (x * y).moveRight (toRightMovesMul (Sum.inl (i, j))) =
      x.moveLeft i * y + x * y.moveRight j - x.moveLeft i * y.moveRight j

{x y : SetTheory.PGame}
{i : x.LeftMoves}
{j : y.RightMoves}

(x * y).moveRight (SetTheory.PGame.toRightMovesMul (Sum.inl (i, j))) =
  x.moveLeft i * y + x * y.moveRight j - x.moveLeft i * y.moveRight j


/-- Auxiliary lemma for `trace_eq_matrix_trace`. -/
theorem trace_eq_matrix_trace_of_finset {s : Finset M} (b : Basis s R M) (f : M →ₗ[R] M) :
    trace R M f = Matrix.trace (LinearMap.toMatrix b b f)

(R : Type u)
[CommSemiring R]
{M : Type v}
[AddCommMonoid M]
[Module R M]
{s : Finset M}
(b : Basis { x // x ∈ s } R M)
(f : M →ₗ[R] M)

(LinearMap.trace R M) f = ((LinearMap.toMatrix b b) f).trace


/-- Build an isomorphism in the category `CommMonCat` from a `MulEquiv` between `CommMonoid`s. -/
@[to_additive (attr := simps) AddEquiv.toAddCommMonCatIso]
def MulEquiv.toCommMonCatIso (e : X ≃* Y) : CommMonCat.of X ≅ CommMonCat.of Y

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

e.toCommMonCatIso.inv = CommMonCat.ofHom e.symm.toMonoidHom


@[simp]
theorem rmatch_iff_matches' (P : RegularExpression α) (x : List α) :
    P.rmatch x ↔ x ∈ P.matches'

{α : Type u_1}
[dec : DecidableEq α]
(P : RegularExpression α)
(x : List α)


@[simp]
theorem unionComplToSubordinate_boxes (π₁ : TaggedPrepartition I) (π₂ : Prepartition I)
    (hU : π₂.iUnion = ↑I \ π₁.iUnion) (r : (ι → ℝ) → Ioi (0 : ℝ)) :
    (π₁.unionComplToSubordinate π₂ hU r).boxes = π₁.boxes ∪ (π₂.toSubordinate r).boxes

{ι : Type u_1}
[Fintype ι]
{I : BoxIntegral.Box ι}
(π₁ : BoxIntegral.TaggedPrepartition I)
(π₂ : BoxIntegral.Prepartition I)
(hU : π₂.iUnion = ↑I \ π₁.iUnion)
(r : (ι → ℝ) → ↑(Set.Ioi 0))


theorem continuous_gaugeRescale {s t : Set E} (hs : Convex ℝ s) (hs₀ : s ∈ 𝓝 0)
    (ht : Convex ℝ t) (ht₀ : t ∈ 𝓝 0) (htb : IsVonNBounded ℝ t) :
    Continuous (gaugeRescale s t)

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[T1Space E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
{s t : Set E}
(hs : Convex ℝ s)
(hs₀ : s ∈ 𝓝 0)
(ht : Convex ℝ t)
(ht₀ : t ∈ 𝓝 0)
(htb : Bornology.IsVonNBounded ℝ t)


@[to_additive]
theorem smul {α M : Type*} [MulOneClass M] [SMul α M] [IsScalarTower α M M] (c : Con M) (a : α)
    {w x : M} (h : c w x) : c (a • w) (a • x)

{α : Type u_4}
{M : Type u_5}
[MulOneClass M]
[SMul α M]
[IsScalarTower α M M]
(c : Con M)
(a : α)
{w x : M}
(h : c w x)


theorem natTrailingDegree_le_of_ne_zero (h : coeff p n ≠ 0) : natTrailingDegree p ≤ n

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}
(h : p.coeff n ≠ 0)


theorem einfsep_lt_top_iff : s.einfsep < ∞ ↔ s.Nontrivial

{α : Type u_1}
[PseudoMetricSpace α]
{s : Set α}


@[simp]
theorem equivFunOnFinite_symm_single [DecidableEq α] [Finite α] (x : α) (m : M) :
    Finsupp.equivFunOnFinite.symm (Pi.single x m) = Finsupp.single x m

{α : Type u_1}
{M : Type u_5}
[Zero M]
[DecidableEq α]
[Finite α]
(x : α)
(m : M)


theorem radical_eq_jacobson [H : IsJacobson R] (I : Ideal R) : I.radical = I.jacobson

{R : Type u_1}
[CommRing R]
[H : Ideal.IsJacobson R]
(I : Ideal R)


theorem isBounded_iff_subset_smul_ball {s : Set E} :
    Bornology.IsBounded s ↔ ∃ a : 𝕜, s ⊆ a • Metric.ball (0 : E) 1

(𝕜 : Type u_1)
{E : Type u_3}
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}

Bornology.IsBounded s ↔ ∃ a, s ⊆ a • Metric.ball 0 1


/-- Any equivalence relation containing (⟶) holds for all pairs of a connected category. -/
theorem equiv_relation [IsPreconnected J] (r : J → J → Prop) (hr : _root_.Equivalence r)
    (h : ∀ {j₁ j₂ : J} (_ : j₁ ⟶ j₂), r j₁ j₂) : ∀ j₁ j₂ : J, r j₁ j₂

(h : ∀ {j₁ j₂ : J}, (j₁ ⟶ j₂) → r j₁ j₂)


/-- If a multilinear map satisfies an inequality `‖f m‖ ≤ C * ∏ i, ‖m i‖`, then it is
continuous. -/
theorem continuous_of_bound (C : ℝ) (H : ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖) : Continuous f

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

(H : ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖)


/-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that `f(S) ⊆ Nˣ`, for all
`y, z ∈ S`, we have `(f y)⁻¹ = (f z)⁻¹ → f y = f z`. -/
@[to_additive
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `y, z ∈ S`, we have `- (f y) = - (f z) → f y = f z`."]
theorem inv_inj {f : M →* N} (hf : ∀ y : S, IsUnit (f y)) {y z : S}
    (h : (IsUnit.liftRight (f.restrict S) hf y)⁻¹ = (IsUnit.liftRight (f.restrict S) hf z)⁻¹) :
      f y = f z

(h : -(IsAddUnit.liftRight (f.restrict S) hf) y = -(IsAddUnit.liftRight (f.restrict S) hf) z)


@[simp]
theorem lift_coe (x : ℤ) : lift n f (x : ZMod n) = f.val x

(n : ℕ)
{A : Type u_2}
[AddGroup A]
(f : { f // f ↑n = 0 })
(x : ℤ)


theorem Specializes.snd {a b : X × Y} (h : a ⤳ b) : a.2 ⤳ b.2

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{a b : X × Y}
(h : a ⤳ b)


lemma cfc_map_polynomial (q : R[X]) (f : R → R) (a : A) (ha : p a := by cfc_tac)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) :
    cfc (fun x ↦ q.eval (f x)) a = aeval (cfc f a) q

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


theorem of_injective (i : ι) : Function.Injective (of : M i →* _)

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
(i : ι)


theorem exists_pos_real_of_irrational_root {α : ℝ} (ha : Irrational α) {f : ℤ[X]} (f0 : f ≠ 0)
    (fa : eval α (map (algebraMap ℤ ℝ) f) = 0) :
    ∃ A : ℝ, 0 < A ∧ ∀ a : ℤ, ∀ b : ℕ,
      (1 : ℝ) ≤ ((b : ℝ) + 1) ^ f.natDegree * (|α - a / (b + 1)| * A)

(fa : Polynomial.eval α (Polynomial.map (algebraMap ℤ ℝ) f) = 0)


@[to_additive (attr := simp)]
protected theorem div_eq_one {s : S} : (s : R) /ₒ s = 1

{R : Type u_1}
[Monoid R]
{S : Submonoid R}
[OreLocalization.OreSet S]
{s : ↥S}


@[simp] theorem intersperse_cons₂ (sep : α) :
    (x::y::zs).intersperse sep = x::sep::((y::zs).intersperse sep)

{α : Type u}
{x y : α}
{zs : List α}
(sep : α)

List.intersperse sep (x :: y :: zs) = x :: sep :: List.intersperse sep (y :: zs)


theorem le_iff_le (e : α ≃o β) {x y : α} : e x ≤ e y ↔ x ≤ y

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


@[to_additive]
theorem prod_coe_sort : ∏ i : s, f i = ∏ i ∈ s, f i

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

∑ i : { x // x ∈ s }, f ↑i = ∑ i ∈ s, f i


theorem rpow_inv_le_iff {x y : ℝ≥0} {z : ℝ} (hz : 0 < z) : x ^ z⁻¹ ≤ y ↔ x ≤ y ^ z


theorem scheme_eq_of_locallyRingedSpace_eq {X Y : Scheme.{u}}
    (H : X.toLocallyRingedSpace = Y.toLocallyRingedSpace) : X = Y


/-- An ideal on an order `P` is a subset of `P` that is
  - nonempty
  - upward directed (any pair of elements in the ideal has an upper bound in the ideal)
  - downward closed (any element less than an element of the ideal is in the ideal). -/
structure Ideal (P) [LE P] extends LowerSet P where
  /-- The ideal is nonempty. -/
  nonempty' : carrier.Nonempty
  /-- The ideal is upward directed. -/
  directed' : DirectedOn (· ≤ ·) carrier

{P : Type u_2}
[LE P]
(self : Order.Ideal P)


theorem essSup_map_measure (hg : AEMeasurable g (Measure.map f μ)) (hf : AEMeasurable f μ) :
    essSup g (Measure.map f μ) = essSup (g ∘ f) μ

(hg : AEMeasurable g (MeasureTheory.Measure.map f μ))

essSup g (MeasureTheory.Measure.map f μ) = essSup (g ∘ f) μ


/-- A homotopy between two morphisms of short complexes `S₁ ⟶ S₂` consists of various
maps and conditions which will be sufficient to show that they induce the same morphism
in homology. -/
@[ext]
structure Homotopy where
  /-- a morphism `S₁.X₁ ⟶ S₂.X₁` -/
  h₀ : S₁.X₁ ⟶ S₂.X₁
  h₀_f : h₀ ≫ S₂.f = 0 := by aesop_cat
  /-- a morphism `S₁.X₂ ⟶ S₂.X₁` -/
  h₁ : S₁.X₂ ⟶ S₂.X₁
  /-- a morphism `S₁.X₃ ⟶ S₂.X₂` -/
  h₂ : S₁.X₃ ⟶ S₂.X₂
  /-- a morphism `S₁.X₃ ⟶ S₂.X₃` -/
  h₃ : S₁.X₃ ⟶ S₂.X₃
  g_h₃ : S₁.g ≫ h₃ = 0 := by aesop_cat
  comm₁ : φ₁.τ₁ = S₁.f ≫ h₁ + h₀ + φ₂.τ₁ := by aesop_cat
  comm₂ : φ₁.τ₂ = S₁.g ≫ h₂ + h₁ ≫ S₂.f + φ₂.τ₂ := by aesop_cat
  comm₃ : φ₁.τ₃ = h₃ + h₂ ≫ S₂.g + φ₂.τ₃ := by aesop_cat

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

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

CategoryTheory.CategoryStruct.comp S₁.g self.h₃ = 0


@[simp]
theorem integral_cos_sq : ∫ x in a..b, cos x ^ 2 = (cos b * sin b - cos a * sin a + b - a) / 2

∫ (x : ℝ) in a..b, Real.cos x ^ 2 = (Real.cos b * Real.sin b - Real.cos a * Real.sin a + b - a) / 2


lemma Sigma.map'_id_id {f : α → C} [HasCoproduct f] :
    Sigma.map' id (fun a => 𝟙 (f a)) = 𝟙 (∐ f)

{α : Type w₂}
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{f : α → C}
[CategoryTheory.Limits.HasCoproduct f]

(CategoryTheory.Limits.Sigma.map' id fun a => 𝟙 (f a)) = 𝟙 (∐ f)


theorem projective_iff_preservesEpimorphisms_preadditiveCoyoneda_obj (P : C) :
    Projective P ↔ (preadditiveCoyoneda.obj (op P)).PreservesEpimorphisms

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

CategoryTheory.Projective P ↔ (CategoryTheory.preadditiveCoyoneda.obj (Opposite.op P)).PreservesEpimorphisms


@[simp] theorem toHopfAlgebraCatIso_refl :
    toHopfAlgebraCatIso (BialgEquiv.refl R X) = .refl _

{R : Type u}
[CommRing R]
{X : Type v}
[Ring X]
[HopfAlgebra R X]

(BialgEquiv.refl R X).toHopfAlgebraCatIso = CategoryTheory.Iso.refl (HopfAlgebraCat.of R X)


/-- For every prepartition `π` of `I` there exists a prepartition that covers exactly
`I \ π.iUnion`. -/
theorem exists_iUnion_eq_diff (π : Prepartition I) :
    ∃ π' : Prepartition I, π'.iUnion = ↑I \ π.iUnion

{ι : Type u_1}
{I : BoxIntegral.Box ι}
[Finite ι]
(π : BoxIntegral.Prepartition I)


theorem of_arrow {f g : Arrow C} (h : f ⟶ g) : CommSq f.hom h.left h.right g.hom

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{f g : CategoryTheory.Arrow C}
(h : f ⟶ g)

CategoryTheory.CommSq f.hom h.left h.right g.hom


@[simp]
theorem map_map (g : β →o γ) (f : α →o β) (s : Interval α) : (s.map f).map g = s.map (g.comp f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Preorder α]
[Preorder β]
[Preorder γ]
(g : β →o γ)
(f : α →o β)
(s : Interval α)

Interval.map g (Interval.map f s) = Interval.map (g.comp f) s


lemma _root_.CovBy.exists_finset_cons (h : s ⋖ t) : ∃ a, ∃ ha : a ∉ s, s.cons a ha = t

{α : Type u_1}
{s t : Finset α}
(h : s ⋖ t)

∃ a, ∃ (ha : a ∉ s), Finset.cons a s ha = t


@[to_additive]
theorem forall_coe_one_iff_one (f : α →ᵇ β) : (∀ x, f x = 1) ↔ f = 1

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
[Zero β]
(f : BoundedContinuousFunction α β)


theorem smul_injective (s : S) : Function.Injective fun m : M' => s • m

{R : Type u_1}
[CommSemiring R]
{S : Submonoid R}
{M : Type u_2}
{M' : Type u_3}
[AddCommMonoid M]
[AddCommMonoid M']
[Module R M]
[Module R M']
(f : M →ₗ[R] M')
[IsLocalizedModule S f]
(s : ↥S)


@[norm_cast 500]
theorem cast_succ (n : ℕ) : ((succ n : ℕ) : R) = n + 1

{R : Type u_1}
[AddMonoidWithOne R]
(n : ℕ)


lemma measure_symmDiff_le (s t u : Set α) :
    μ (s ∆ u) ≤ μ (s ∆ t) + μ (t ∆ u)

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(s t u : Set α)

μ (symmDiff s u) ≤ μ (symmDiff s t) + μ (symmDiff t u)


theorem singletonSubgraph_eq_induce {v : V} :
    G.singletonSubgraph v = (⊤ : G.Subgraph).induce {v}

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


lemma nat_lit_mul_eq_nsmul [n.AtLeastTwo] : no_index (OfNat.ofNat n) * r = n • r

{R : Type u_1}
[NonAssocSemiring R]
(r : R)
(n : ℕ)
[n.AtLeastTwo]


@[simp]
theorem mapEquiv_refl : mapEquiv AlgEquiv.refl = RingEquiv.refl (FractionalIdeal S P)

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

FractionalIdeal.mapEquiv AlgEquiv.refl = RingEquiv.refl (FractionalIdeal S P)


@[to_additive] lemma MonovaryOn.div_left (h₁ : MonovaryOn f₁ g s) (h₂ : AntivaryOn f₂ g s) :
    MonovaryOn (f₁ / f₂) g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommGroup α]
[OrderedAddCommGroup β]
{s : Set ι}
{f₁ f₂ : ι → α}
{g : ι → β}
(h₁ : MonovaryOn f₁ g s)
(h₂ : AntivaryOn f₂ g s)


theorem infty_equiv_isometry [∀ i, PseudoEMetricSpace (β i)] :
    Isometry (WithLp.equiv ∞ (∀ i, β i))

{ι : Type u_2}
(β : ι → Type u_4)
[Fintype ι]
[(i : ι) → PseudoEMetricSpace (β i)]

Isometry ⇑(WithLp.equiv ⊤ ((i : ι) → β i))


/-- Two functions monovary iff the rearrangement inequality holds. -/
lemma monovary_iff_mul_rearrangement :
    Monovary f g ↔ ∀ i j, f i * g j + f j * g i ≤ f i * g i + f j * g j

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{f g : ι → α}

Monovary f g ↔ ∀ (i j : ι), f i * g j + f j * g i ≤ f i * g i + f j * g j


theorem prime_pow_coprime_prod_of_coprime_insert [DecidableEq α] {s : Finset α} (i : α → ℕ) (p : α)
    (hps : p ∉ s) (is_prime : ∀ q ∈ insert p s, Prime q)
    (is_coprime : ∀ᵉ (q ∈ insert p s) (q' ∈ insert p s), q ∣ q' → q = q') :
    IsRelPrime (p ^ i p) (∏ p' ∈ s, p' ^ i p')

(is_coprime : ∀ q ∈ insert p s, ∀ q' ∈ insert p s, q ∣ q' → q = q')


theorem sup_toSubalgebra_of_isAlgebraic_left [Algebra.IsAlgebraic K E1] :
    (E1 ⊔ E2).toSubalgebra = E1.toSubalgebra ⊔ E2.toSubalgebra

{K : Type u_3}
{L : Type u_4}
[Field K]
[Field L]
[Algebra K L]
(E1 E2 : IntermediateField K L)
[Algebra.IsAlgebraic K ↥E1]


@[simp]
lemma sectionsMap_comp {M N P : SheafOfModules.{v} R} (f : M ⟶ N) (g : N ⟶ P) (s : M.sections) :
    sectionsMap (f ≫ g) s = sectionsMap g (sectionsMap f s)

{J : CategoryTheory.GrothendieckTopology C}

SheafOfModules.sectionsMap (f ≫ g) s = SheafOfModules.sectionsMap g (SheafOfModules.sectionsMap f s)


@[simp, measurability] theorem measurableSet_top {s : Set α} : MeasurableSet[⊤] s


theorem Set.MapsTo.closure_of_continuousWithinAt {f : α → β} {s : Set α} {t : Set β}
    (h : MapsTo f s t) (hc : ∀ x ∈ closure s, ContinuousWithinAt f s x) :
    MapsTo f (closure s) (closure t)


@[to_additive]
theorem map_finsupp_prod [Zero M] [CommMonoid N] [CommMonoid P] {H : Type*}
    [FunLike H N P] [MonoidHomClass H N P]
    (h : H) (f : α →₀ M) (g : α → M → N) : h (f.prod g) = f.prod fun a b => h (g a b)

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
{P : Type u_11}
[Zero M]
[CommMonoid N]
[CommMonoid P]
{H : Type u_16}
[FunLike H N P]
[MonoidHomClass H N P]
(h : H)
(f : α →₀ M)
(g : α → M → N)


theorem log_nonpos_iff (hx : 0 < x) : log x ≤ 0 ↔ x ≤ 1


@[simp]
lemma basis_zero : CoordinateRing.basis W 0 = 1

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

(WeierstrassCurve.Affine.CoordinateRing.basis W) 0 = 1


@[simp]
theorem Icc_eq_zero_of_lt (h : b < a) : Icc a b = 0

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrder α]
{a b : α}
(h : b < a)


lemma isVonNBounded_pi_iff {𝕜 ι : Type*} {E : ι → Type*} [NormedDivisionRing 𝕜]
    [∀ i, AddCommGroup (E i)] [∀ i, Module 𝕜 (E i)] [∀ i, TopologicalSpace (E i)]
    {S : Set (∀ i, E i)} : IsVonNBounded 𝕜 S ↔ ∀ i, IsVonNBounded 𝕜 (eval i '' S)

{𝕜 : Type u_7}
{ι : Type u_8}
{E : ι → Type u_9}
[NormedDivisionRing 𝕜]
[(i : ι) → AddCommGroup (E i)]
[(i : ι) → Module 𝕜 (E i)]
[(i : ι) → TopologicalSpace (E i)]
{S : Set ((i : ι) → E i)}

Bornology.IsVonNBounded 𝕜 S ↔ ∀ (i : ι), Bornology.IsVonNBounded 𝕜 (Function.eval i '' S)


theorem negSucc_inj : negSucc m = negSucc n ↔ m = n


protected theorem hasFDerivAt (x : 𝕜) :
    HasFDerivAt (fun x => p.eval x) (smulRight (1 : 𝕜 →L[𝕜] 𝕜) (p.derivative.eval x)) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(p : 𝕜[X])
(x : 𝕜)

HasFDerivAt (fun x => Polynomial.eval x p)
  (ContinuousLinearMap.smulRight 1 (Polynomial.eval x (Polynomial.derivative p))) x


theorem IsAtom.of_isAtom_coe_Iic {a : Set.Iic x} (ha : IsAtom a) : IsAtom (a : α)

{α : Type u_2}
[Preorder α]
[OrderBot α]
{x : α}
{a : ↑(Set.Iic x)}
(ha : IsAtom a)


/-- We state it as a simp lemma, which is regarded as an involved version of
`id_whiskerRight X Y : 𝟙 X ▷ Y = 𝟙 (X ⊗ Y)`.
-/
@[reassoc, simp]
theorem leftUnitor_whiskerRight (X Y : C) :
    (λ_ X).hom ▷ Y = (α_ (𝟙_ C) X Y).hom ≫ (λ_ (X ⊗ Y)).hom

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

CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.leftUnitor X).hom Y =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.associator (𝟙_ C) X Y).hom
    (CategoryTheory.MonoidalCategory.leftUnitor (CategoryTheory.MonoidalCategory.tensorObj X Y)).hom


/-- A (positive) natural number `n` is a sum of two squares if and only if the exponent of
every prime `q` such that `q % 4 = 3` in the prime factorization of `n` is even.
(The assumption `0 < n` is not present, since for `n = 0`, both sides are satisfied;
the right hand side holds, since `padicValNat q 0 = 0` by definition.) -/
theorem Nat.eq_sq_add_sq_iff {n : ℕ} :
    (∃ x y : ℕ, n = x ^ 2 + y ^ 2) ↔ ∀ {q : ℕ}, q.Prime → q % 4 = 3 → Even (padicValNat q n)

(∃ x y, n = x ^ 2 + y ^ 2) ↔ ∀ {q : ℕ}, Nat.Prime q → q % 4 = 3 → Even (padicValNat q n)


theorem epi_iff_surjective : Epi f ↔ Function.Surjective f

CategoryTheory.Epi f ↔ Function.Surjective ⇑f


theorem cardinal_mk_le_finrank [Module.Finite R M]
    {ι : Type w} {b : ι → M} (h : LinearIndependent R b) : #ι ≤ finrank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
[Module.Finite R M]
{ι : Type w}
{b : ι → M}
(h : LinearIndependent R b)


/-- Let `f` be a function continuous on a convex (or, equivalently, connected) subset `D`
of the real line. If `f` is differentiable on the interior of `D` and `f'` is nonpositive, then
`f` is an antitone function on `D`. -/
lemma antitoneOn_of_hasDerivWithinAt_nonpos {D : Set ℝ} (hD : Convex ℝ D) {f f' : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf' : ∀ x ∈ interior D, HasDerivWithinAt f (f' x) (interior D) x)
    (hf'₀ : ∀ x ∈ interior D, f' x ≤ 0) : AntitoneOn f D


theorem disjoint_list_sum_left {a : Multiset α} {l : List (Multiset α)} :
    Multiset.Disjoint l.sum a ↔ ∀ b ∈ l, Multiset.Disjoint b a

{α : Type u_3}
{a : Multiset α}
{l : List (Multiset α)}

l.sum.Disjoint a ↔ ∀ b ∈ l, b.Disjoint a


@[to_additive] lemma lt_or_lt_of_div_lt_div : a / d < b / c → a < b ∨ c < d

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


lemma eval_det_add_X_smul (A : Matrix n n R[X]) (M : Matrix n n R) :
    (det (A + (X : R[X]) • M.map C)).eval 0 = (det A).eval 0

{R : Type u}
[CommRing R]
{n : Type v}
[DecidableEq n]
[Fintype n]
(A : Matrix n n R[X])
(M : Matrix n n R)

Polynomial.eval 0 (A + Polynomial.X • M.map ⇑Polynomial.C).det = Polynomial.eval 0 A.det


/-- A *uniformly convex space* is a real normed space where the triangle inequality is strict with a
uniform bound. Namely, over the `x` and `y` of norm `1`, `‖x + y‖` is uniformly bounded above
by a constant `< 2` when `‖x - y‖` is uniformly bounded below by a positive constant. -/
class UniformConvexSpace (E : Type*) [SeminormedAddCommGroup E] : Prop where
  uniform_convex : ∀ ⦃ε : ℝ⦄,
    0 < ε → ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y⦄, ‖y‖ = 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ

{E : Type u_1}
[SeminormedAddCommGroup E]
[self : UniformConvexSpace E]
⦃ε : ℝ⦄

0 < ε → ∃ δ, 0 < δ ∧ ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → ε ≤ ‖x - y‖ → ‖x + y‖ ≤ 2 - δ


/-- If a family is convex independent, a point in the family is in the convex hull of some of the
points given by a subset of the index type if and only if the point's index is in this subset. -/
@[simp]
protected theorem ConvexIndependent.mem_convexHull_iff {p : ι → E} (hc : ConvexIndependent 𝕜 p)
    (s : Set ι) (i : ι) : p i ∈ convexHull 𝕜 (p '' s) ↔ i ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
{ι : Type u_3}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{p : ι → E}
(hc : ConvexIndependent 𝕜 p)
(s : Set ι)
(i : ι)


@[ext]
lemma leftHomology_ext {A : C} (f₁ f₂ : S.leftHomology ⟶ A)
    (h : S.leftHomologyπ ≫ f₁ = S.leftHomologyπ ≫ f₂) : f₁ = f₂

(h : CategoryTheory.CategoryStruct.comp S.leftHomologyπ f₁ = CategoryTheory.CategoryStruct.comp S.leftHomologyπ f₂)


/-- If `K / E / F` is a field extension tower, `S ⊂ K` is such that `F(S) = K`,
then `E(S) = K`. -/
theorem adjoin_eq_top_of_adjoin_eq_top [Algebra E K] [IsScalarTower F E K]
    {S : Set K} (hprim : adjoin F S = ⊤) : adjoin E S = ⊤

(hprim : IntermediateField.adjoin F S = ⊤)


theorem IsRefl.reflexive [IsRefl α r] : Reflexive r

{α : Type u_1}
{r : α → α → Prop}
[IsRefl α r]


lemma functorMap_comm :
    functorObjLeft f πX ≫ functorMapTgt f πX πY φ hφ =
      functorMapSrc f πX πY φ hφ ≫ functorObjLeft f πY

[CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete (CategoryTheory.SmallObject.FunctorObjIndex f πX)) C]

[CategoryTheory.Limits.HasColimitsOfShape (CategoryTheory.Discrete (CategoryTheory.SmallObject.FunctorObjIndex f πY)) C]

(hφ : CategoryTheory.CategoryStruct.comp φ πY = πX)

CategoryTheory.CategoryStruct.comp (CategoryTheory.SmallObject.functorObjLeft f πX)
    (CategoryTheory.SmallObject.functorMapTgt f πX πY φ hφ) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.SmallObject.functorMapSrc f πX πY φ hφ)
    (CategoryTheory.SmallObject.functorObjLeft f πY)


@[simp]
theorem inr_zero [Zero R] [Zero M] : (inr 0 : tsze R M) = 0

(R : Type u)
{M : Type v}
[Zero R]
[Zero M]


@[reassoc (attr := simp)]
theorem pentagon_inv_hom_hom_hom_hom (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e) :
    (α_ f g h).inv ▷ i ≫ (α_ (f ≫ g) h i).hom ≫ (α_ f g (h ≫ i)).hom =
      (α_ f (g ≫ h) i).hom ≫ f ◁ (α_ g h i).hom

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

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.associator f g h).inv i)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.associator (CategoryTheory.CategoryStruct.comp f g) h i).hom
      (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.comp h i)).hom) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.comp g h) i).hom
    (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.associator g h i).hom)


theorem init_sub (x y : 𝕎 R) (n : ℕ) : init n (x - y) = init n (init n x - init n y)

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

WittVector.init n (x - y) = WittVector.init n (WittVector.init n x - WittVector.init n y)


@[simp] lemma dens_singleton (a : α) : dens ({a} : Finset α) = (Fintype.card α : ℚ≥0)⁻¹


theorem mul_div_assoc (x : R) {y z : R} (h : z ∣ y) : x * y / z = x * (y / z)

{R : Type u}
[EuclideanDomain R]
(x : R)
{y z : R}
(h : z ∣ y)


@[to_additive (attr := simp, norm_cast)]
theorem val_mul : (↑(a * b) : α) = a * b


theorem ContDiffOn.sinh {n} (hf : ContDiffOn ℝ n f s) :
    ContDiffOn ℝ n (fun x => Real.sinh (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
{n : ℕ∞}
(hf : ContDiffOn ℝ n f s)


@[to_additive (attr := simp)]
theorem op_unop (S : Subgroup Gᵐᵒᵖ) : S.unop.op = S

{G : Type u_2}
[Group G]
(S : Subgroup Gᵐᵒᵖ)


@[simp]
theorem toNNReal_prod {ι : Type*} {s : Finset ι} {f : ι → ℝ≥0∞} :
    (∏ i ∈ s, f i).toNNReal = ∏ i ∈ s, (f i).toNNReal

{ι : Type u_1}
{s : Finset ι}
{f : ι → ℝ≥0∞}


theorem add_pow_expChar [CommSemiring R] {q : ℕ} [hR : ExpChar R q]
    (x y : R) : (x + y) ^ q = x ^ q + y ^ q

(R : Type u)
[CommSemiring R]
{q : ℕ}
[hR : ExpChar R q]
(x y : R)


@[simp]
theorem diag_smul [SMul R α] (r : R) (A : Matrix n n α) : diag (r • A) = r • diag A

{n : Type u_3}
{R : Type u_7}
{α : Type v}
[SMul R α]
(r : R)
(A : Matrix n n α)


lemma cons' {r : R} {rs : List R} (h1 : IsSMulRegular M r)
    (h2 : IsWeaklyRegular (QuotSMulTop r M)
            (rs.map (Ideal.Quotient.mk (Ideal.span {r})))) :
    IsWeaklyRegular M (r :: rs)

(h2 : RingTheory.Sequence.IsWeaklyRegular (QuotSMulTop r M) (List.map (⇑(Ideal.Quotient.mk (Ideal.span {r}))) rs))

RingTheory.Sequence.IsWeaklyRegular M (r :: rs)


@[simp]
theorem adjoinIntegral_coe :
    (adjoinIntegral S x hx : Submodule R P) =
      (Subalgebra.toSubmodule (Algebra.adjoin R ({x} : Set P)))

{R : Type u_1}
[CommRing R]
(S : Submonoid R)
{P : Type u_2}
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(x : P)
(hx : IsIntegral R x)

↑(FractionalIdeal.adjoinIntegral S x hx) = Subalgebra.toSubmodule (Algebra.adjoin R {x})


lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ≥0 univ fun x : ℝ≥0 ↦ x ^ p

ConcaveOn NNReal Set.univ fun x => x ^ p


theorem abs_toReal_coe_eq_self_iff {θ : ℝ} : |(θ : Angle).toReal| = θ ↔ 0 ≤ θ ∧ θ ≤ π


theorem Multiplicative.isSubmonoid_iff {s : Set A} :
    @IsSubmonoid (Multiplicative A) _ s ↔ IsAddSubmonoid s

{A : Type u_2}
[AddMonoid A]
{s : Set A}


theorem mem_nhdsWithin_iff : s ∈ 𝓝[t] x ↔ ∃ ε > 0, ball x ε ∩ t ⊆ s

{α : Type u}
[PseudoEMetricSpace α]
{x : α}
{s t : Set α}

s ∈ 𝓝[t] x ↔ ∃ ε > 0, EMetric.ball x ε ∩ t ⊆ s


/-- Given a continuous `R`-multilinear map `f` taking values in `R`, `f.smulRight z` is the
continuous multilinear map sending `m` to `f m • z`. -/
@[simps! toMultilinearMap apply]
def smulRight : ContinuousMultilinearMap R M₁ M₂

{R : Type u}
{ι : Type v}
{M₁ : ι → Type w₁}
{M₂ : Type w₂}
[CommSemiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
[TopologicalSpace R]
[(i : ι) → TopologicalSpace (M₁ i)]
[TopologicalSpace M₂]
[ContinuousSMul R M₂]
(f : ContinuousMultilinearMap R M₁ R)
(z : M₂)

∀ (a : (i : ι) → M₁ i), (f.smulRight z) a = f a • z


@[to_additive]
theorem mulSupport_div : (mulSupport fun x => f x / g x) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_1}
{G : Type u_9}
[DivisionMonoid G]
(f g : α → G)

(Function.mulSupport fun x => f x / g x) ⊆ Function.mulSupport f ∪ Function.mulSupport g


@[simp]
nonrec theorem map_id (f : Ultrafilter α) : f.map id = f


theorem _root_.isStrongAntichain_insert :
    IsStrongAntichain r (insert a s) ↔
      IsStrongAntichain r s ∧ ∀ ⦃b⦄, b ∈ s → a ≠ b → ∀ c, ¬r a c ∨ ¬r b c

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

IsStrongAntichain r (insert a s) ↔ IsStrongAntichain r s ∧ ∀ ⦃b : α⦄, b ∈ s → a ≠ b → ∀ (c : α), ¬r a c ∨ ¬r b c


@[simps]
instance hasForgetToLat : HasForget₂ HeytAlg BddDistLat

CategoryTheory.HasForget₂.forget₂.obj X = BddDistLat.of ↑X


/-- The scalar action via `Mul.toSMul` is transformed by the same map as the elements
of the matrix, when `f` preserves multiplication. -/
theorem map_smul' [Mul α] [Mul β] (f : α → β) (r : α) (A : Matrix n n α)
    (hf : ∀ a₁ a₂, f (a₁ * a₂) = f a₁ * f a₂) : (r • A).map f = f r • A.map f

(hf : ∀ (a₁ a₂ : α), f (a₁ * a₂) = f a₁ * f a₂)


@[ext]
lemma hom_ext {X Y : Sheaf J A} (x y : X ⟶ Y) (h : x.val = y.val) : x = y

{J : CategoryTheory.GrothendieckTopology C}


@[norm_cast]
theorem coe_multiset_sum (s : Multiset ℚ≥0) : (s.sum : ℚ) = (s.map (↑)).sum

↑s.sum = (Multiset.map NNRat.cast s).sum


theorem cycleFactorsFinset_eq_empty_iff {f : Perm α} : cycleFactorsFinset f = ∅ ↔ f = 1

{α : Type u_2}
[DecidableEq α]
[Fintype α]
{f : Equiv.Perm α}


@[to_additive (attr := simp)]
theorem map_mul_left_nhds (x y : G) : map (x * ·) (𝓝 y) = 𝓝 (x * y)

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
(x y : G)

Filter.map (fun x_1 => x * x_1) (𝓝 y) = 𝓝 (x * y)


theorem isOpen_iff_forall_mem_open : IsOpen s ↔ ∀ x ∈ s, ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t

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

IsOpen s ↔ ∀ x ∈ s, ∃ t ⊆ s, IsOpen t ∧ x ∈ t


theorem symmₗ_linearMapAt (e : Pretrivialization F (π F E)) [e.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet) (y : E b) : e.symmₗ R b (e.linearMapAt R b y) = y

(e : Pretrivialization F Bundle.TotalSpace.proj)

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


@[simp] theorem cast_natAdd_left {n m m' : Nat} (i : Fin n) (h : m' + n = m + n) :
    cast h (natAdd m' i) = natAdd m i

Fin.cast h (Fin.natAdd m' i) = Fin.natAdd m i


@[continuity]
theorem _root_.Continuous.path_eval {Y} [TopologicalSpace Y] {f : Y → Path x y} {g : Y → I}
    (hf : Continuous f) (hg : Continuous g) : Continuous fun y => f y (g y)

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{Y : Type u_4}
[TopologicalSpace Y]
{f : Y → Path x y}
{g : Y → ↑I}
(hf : Continuous f)
(hg : Continuous g)


@[simp]
theorem toMonoidWithZeroHom_eq_coe (f : α →*₀o β) : f.toMonoidWithZeroHom = f

{α : Type u_2}
{β : Type u_3}
{hα : Preorder α}
{hα' : MulZeroOneClass α}
{hβ : Preorder β}
{hβ' : MulZeroOneClass β}
(f : α →*₀o β)


theorem bagInter_nil_iff_inter_nil : ∀ l₁ l₂ : List α, l₁.bagInter l₂ = [] ↔ l₁ ∩ l₂ = []

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


theorem HasDerivWithinAt.complexToReal_fderiv' {f : ℂ → E} {s : Set ℂ} {x : ℂ} {f' : E}
    (h : HasDerivWithinAt f f' s x) :
    HasFDerivWithinAt f (reCLM.smulRight f' + I • imCLM.smulRight f') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : ℂ → E}
{s : Set ℂ}
{x : ℂ}
{f' : E}
(h : HasDerivWithinAt f f' s x)

HasFDerivWithinAt f (Complex.reCLM.smulRight f' + Complex.I • Complex.imCLM.smulRight f') s x


@[simp]
theorem image2_empty_left : image2 f ∅ t = ∅

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


@[simp]
theorem comp_apply {R S T : CommRingCat} (f : R ⟶ S) (g : S ⟶ T) (x : R) :
    (f ≫ g) x = g (f x)

{R S T : CommRingCat}
(f : R ⟶ S)
(g : S ⟶ T)
(x : ↑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)


theorem _root_.Filter.IsBoundedUnder.isBigO_const (h : IsBoundedUnder (· ≤ ·) l (norm ∘ f))
    {c : F''} (hc : c ≠ 0) : f =O[l] fun _x => c

(h : Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f))


/-- A special case for when `b₁` has grade 0. -/
theorem tmul_zero_coe_mul_coe_tmul {i₂ : ι} (a₁ : A) (b₁ : ℬ 0) (a₂ : 𝒜 i₂) (b₂ : B) :
    (a₁ ᵍ⊗ₜ[R] (b₁ : B) * (a₂ : A) ᵍ⊗ₜ[R] b₂ : 𝒜 ᵍ⊗[R] ℬ) =
      ((a₁ * a₂ : A) ᵍ⊗ₜ (b₁ * b₂ : B))

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
{i₂ : ι}
(a₁ : A)
(b₁ : ↥(ℬ 0))
(a₂ : ↥(𝒜 i₂))
(b₂ : B)

a₁ ᵍ⊗ₜ[R] ↑b₁ * ↑a₂ ᵍ⊗ₜ[R] b₂ = (a₁ * ↑a₂) ᵍ⊗ₜ[R] (↑b₁ * b₂)


theorem lt_of_mul_lt_mul_right [MulPosReflectLT α] (h : b * a < c * a) (a0 : 0 ≤ a) : b < c

{α : Type u_1}
{a b c : α}
[Mul α]
[Zero α]
[Preorder α]
[MulPosReflectLT α]
(h : b * a < c * a)
(a0 : 0 ≤ a)


@[simp, mono]
theorem pred_le_pred {a b : α} (h : a ≤ b) : pred a ≤ pred b

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


/-- The category of `MonoOver α`, for `α : Type u`, is equivalent to the partial order `Set α`.
-/
@[simps]
noncomputable def Types.monoOverEquivalenceSet (α : Type u) : MonoOver α ≌ Set α

(Types.monoOverEquivalenceSet α).counitIso = CategoryTheory.NatIso.ofComponents (fun s => CategoryTheory.eqToIso ⋯) ⋯


theorem two_nsmul_lie_lmul_lmul_add_add_eq_zero (a b c : A) :
    2 • (⁅L a, L (b * c)⁆ + ⁅L b, L (c * a)⁆ + ⁅L c, L (a * b)⁆) = 0

{A : Type u_1}
[NonUnitalNonAssocCommRing A]
[IsCommJordan A]
(a b c : A)


theorem sup_lt_of_lt_sdiff_right (h : x < z \ y) (hyz : y ≤ z) : x ⊔ y < z

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]
(h : x < z \ y)
(hyz : y ≤ z)


@[simp]
theorem tendsto_bot {f : α → β} {l : Filter β} : Tendsto f ⊥ l

{α : Type u}
{β : Type v}
{f : α → β}
{l : Filter β}


theorem RelEmbedding.inter_preimage_maximals_eq (f : r ↪r s) (x : Set α) (y : Set β) :
    x ∩ f⁻¹' (maximals s ((f '' x) ∩ y)) = maximals r (x ∩ f ⁻¹' y)

{α : Type u_1}
{β : Type u_2}
{r : α → α → Prop}
{s : β → β → Prop}
(f : r ↪r s)
(x : Set α)
(y : Set β)

x ∩ ⇑f ⁻¹' maximals s (⇑f '' x ∩ y) = maximals r (x ∩ ⇑f ⁻¹' y)


@[to_additive (attr := simp)]
theorem coe_inf (p p' : Subgroup G) : ((p ⊓ p' : Subgroup G) : Set G) = (p : Set G) ∩ p'

{G : Type u_1}
[AddGroup G]
(p p' : AddSubgroup G)


theorem comap_unop_mul :
    comap (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ).symm : Aᵐᵒᵖ →ₗ[R] A) (M * N) =
      comap (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ).symm : Aᵐᵒᵖ →ₗ[R] A) N *
        comap (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ).symm : Aᵐᵒᵖ →ₗ[R] A) M

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]
(M N : Submodule R A)

Submodule.comap (↑(MulOpposite.opLinearEquiv R).symm) (M * N) =
  Submodule.comap (↑(MulOpposite.opLinearEquiv R).symm) N * Submodule.comap (↑(MulOpposite.opLinearEquiv R).symm) M


theorem IsNat.to_isInt {α} [Ring α] : ∀ {a : α} {n}, IsNat a n → IsInt a (.ofNat n)

Mathlib.Meta.NormNum.IsNat a n → Mathlib.Meta.NormNum.IsInt a (Int.ofNat n)


theorem isSt_iff_abs_sub_lt_delta {x : ℝ*} {r : ℝ} : IsSt x r ↔ ∀ δ : ℝ, 0 < δ → |x - ↑r| < δ

x.IsSt r ↔ ∀ (δ : ℝ), 0 < δ → |x - ↑r| < ↑δ


/-- Implementation of `Mon_.equivLaxMonoidalFunctorPUnit`. -/
@[simps]
def monToLaxMonoidal : Mon_ C ⥤ LaxMonoidalFunctor (Discrete PUnit.{u + 1}) C

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

∀ (x : CategoryTheory.Discrete PUnit.{u + 1}),
  ((Mon_.EquivLaxMonoidalFunctorPUnit.monToLaxMonoidal C).obj A).obj x = A.X


@[to_additive]
theorem mem_sup_left {S T : Subsemigroup M} : ∀ {x : M}, x ∈ S → x ∈ S ⊔ T

{M : Type u_2}
[Mul M]
{S T : Subsemigroup M}
{x : M}


@[to_additive]
theorem smul_finset_symmDiff : a • s ∆ t = (a • s) ∆ (a • t)

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[Group α]
[MulAction α β]
{s t : Finset β}
{a : α}

a • symmDiff s t = symmDiff (a • s) (a • t)


/-- The value depends only on the residue class of `a` mod `b`. -/
theorem JacobiSym.mod_left (a : ℤ) (b ab' : ℕ) (ab r b' : ℤ) (hb' : (b : ℤ) = b')
    (hab : a % b' = ab) (h : (ab' : ℤ) = ab) (hr : jacobiSymNat ab' b = r) : jacobiSym a b = r

(hr : Mathlib.Meta.NormNum.jacobiSymNat ab' b = r)


theorem kahler_swap (x y : E) : o.kahler x y = conj (o.kahler y x)

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

(o.kahler x) y = (starRingEnd ℂ) ((o.kahler y) x)


theorem finiteType_stableUnderBaseChange : StableUnderBaseChange @FiniteType


@[simp]
theorem coeSubmodule_sup (I J : Ideal R) :
    coeSubmodule S (I ⊔ J) = coeSubmodule S I ⊔ coeSubmodule S J

{R : Type u_1}
[CommRing R]
(S : Type u_2)
[CommRing S]
[Algebra R S]
(I J : Ideal R)

IsLocalization.coeSubmodule S (I ⊔ J) = IsLocalization.coeSubmodule S I ⊔ IsLocalization.coeSubmodule S J


@[simp]
lemma rightShift_neg (a n' : ℤ) (hn' : n' + a = n) :
    (-γ).rightShift a n' hn' = -γ.rightShift a n' hn'

(γ : CochainComplex.HomComplex.Cochain K L n)


@[simp]
theorem toMultilinearMap_add (f g : ContinuousMultilinearMap R M₁ M₂) :
    (f + g).toMultilinearMap = f.toMultilinearMap + g.toMultilinearMap


@[simp]
theorem toNonUnitalRingHomm_comp_symm_toNonUnitalRingHom (e : R ≃+* S) :
    e.toNonUnitalRingHom.comp e.symm.toNonUnitalRingHom = NonUnitalRingHom.id _

{R : Type u_4}
{S : Type u_5}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
(e : R ≃+* S)

e.toNonUnitalRingHom.comp e.symm.toNonUnitalRingHom = NonUnitalRingHom.id S


lemma frontier_closedBall_eq_empty {r : ℝ} (hr : r ≠ 0) : frontier (closedBall x r) = ∅

{X : Type u_1}
[PseudoMetricSpace X]
[IsUltrametricDist X]
(x : X)
{r : ℝ}
(hr : r ≠ 0)


theorem decode₂_inj [Encodable α] {n : ℕ} {a₁ a₂ : α} (h₁ : a₁ ∈ decode₂ α n)
    (h₂ : a₂ ∈ decode₂ α n) : a₁ = a₂

{α : Type u_1}
[Encodable α]
{n : ℕ}
{a₁ a₂ : α}
(h₁ : a₁ ∈ Encodable.decode₂ α n)
(h₂ : a₂ ∈ Encodable.decode₂ α n)


/-- Product of two continuous homomorphisms on different spaces. -/
@[to_additive (attr := simps!) "Product of two continuous homomorphisms on different spaces."]
def prod_map (f : ContinuousMonoidHom A C) (g : ContinuousMonoidHom B D) :
    ContinuousMonoidHom (A × B) (C × D)

{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
{D : Type u_5}
[AddMonoid A]
[AddMonoid B]
[AddMonoid C]
[AddMonoid D]
[TopologicalSpace A]
[TopologicalSpace B]
[TopologicalSpace C]
[TopologicalSpace D]
(f : ContinuousAddMonoidHom A C)
(g : ContinuousAddMonoidHom B D)
(i : A × B)

(f.sum_map g) i = (f.toAddMonoidHom i.1, g.toAddMonoidHom i.2)


theorem remainingBytes : ∀ {it}, ValidFor l r it → it.remainingBytes = utf8Len r

{l r : List Char}
{it : String.Iterator}

String.Iterator.ValidFor l r it → it.remainingBytes = String.utf8Len r


@[to_additive]
theorem mulSupport_mulSingle_subset : mulSupport (mulSingle a b) ⊆ {a}

{A : Type u_1}
{B : Type u_2}
[DecidableEq A]
[One B]
{a : A}
{b : B}

Function.mulSupport (Pi.mulSingle a b) ⊆ {a}


theorem isLeast_l {a : α} : IsLeast { b | a ≤ u b } (l a)

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


private theorem candidates_dist_inl (fA : f ∈ candidates X Y) (x y : X) :
    f (inl x, inl y) = dist x y

(fA : f ∈ GromovHausdorff.candidates X Y)


theorem StructureGroupoid.locality (G : StructureGroupoid H) {e : PartialHomeomorph H H}
    (h : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ G) : e ∈ G


@[to_additive sub_nsmul_neg]
theorem inv_pow_sub (a : G) {m n : ℕ} (h : n ≤ m) : a⁻¹ ^ (m - n) = (a ^ m)⁻¹ * a ^ n

{G : Type u_3}
[AddGroup G]
(a : G)
{m n : ℕ}
(h : n ≤ m)


theorem exists_add_pow_prime_eq (hp : p.Prime) (x y : R) :
    ∃ r, (x + y) ^ p = x ^ p + y ^ p + p * r

{R : Type u_1}
[CommSemiring R]
{p : ℕ}
(hp : Nat.Prime p)
(x y : R)

∃ r, (x + y) ^ p = x ^ p + y ^ p + ↑p * r


/-- Given a family of pairwise disjoint finite sets `t i` indexed by a finite type, the product of
`f a` over the union `⋃ i, t i` is equal to the product over all indexes `i` of the products of
`f a` over `a ∈ t i`. -/
@[to_additive
      "Given a family of pairwise disjoint finite sets `t i` indexed by a finite type, the
      sum of `f a` over the union `⋃ i, t i` is equal to the sum over all indexes `i` of the
      sums of `f a` over `a ∈ t i`."]
theorem finprod_mem_iUnion [Finite ι] {t : ι → Set α} (h : Pairwise (Disjoint on t))
    (ht : ∀ i, (t i).Finite) : ∏ᶠ a ∈ ⋃ i : ι, t i, f a = ∏ᶠ i, ∏ᶠ a ∈ t i, f a

{α : Type u_1}
{ι : Type u_3}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
[Finite ι]
{t : ι → Set α}
(h : Pairwise (Disjoint on t))
(ht : ∀ (i : ι), (t i).Finite)

∏ᶠ (a : α) (_ : a ∈ ⋃ i, t i), f a = ∏ᶠ (i : ι) (a : α) (_ : a ∈ t i), f a


@[to_additive]
theorem prod_subset_one_on_sdiff [DecidableEq α] (h : s₁ ⊆ s₂) (hg : ∀ x ∈ s₂ \ s₁, g x = 1)
    (hfg : ∀ x ∈ s₁, f x = g x) : ∏ i ∈ s₁, f i = ∏ i ∈ s₂, g i

{α : Type u_3}
{β : Type u_4}
{s₁ s₂ : Finset α}
{f g : α → β}
[CommMonoid β]
[DecidableEq α]
(h : s₁ ⊆ s₂)
(hg : ∀ x ∈ s₂ \ s₁, g x = 1)
(hfg : ∀ x ∈ s₁, f x = g x)


/-- The bijection of `Cofork.IsColimit.homIso` is natural in `Z`. -/
theorem Cofork.IsColimit.homIso_natural {X Y : C} {f g : X ⟶ Y} {t : Cofork f g} {Z Z' : C}
    (q : Z ⟶ Z') (ht : IsColimit t) (k : t.pt ⟶ Z) :
    (Cofork.IsColimit.homIso ht _ (k ≫ q) : Y ⟶ Z') =
      (Cofork.IsColimit.homIso ht _ k : Y ⟶ Z) ≫ q

(ht : CategoryTheory.Limits.IsColimit t)

↑((CategoryTheory.Limits.Cofork.IsColimit.homIso ht Z') (CategoryTheory.CategoryStruct.comp k q)) =
  CategoryTheory.CategoryStruct.comp (↑((CategoryTheory.Limits.Cofork.IsColimit.homIso ht Z) k)) q


theorem deriv.comp_of_eq (hh₂ : DifferentiableAt 𝕜' h₂ y) (hh : DifferentiableAt 𝕜 h x)
    (hy : y = h x) :
    deriv (h₂ ∘ h) x = deriv h₂ (h x) * deriv h x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{h : 𝕜 → 𝕜'}
{h₂ : 𝕜' → 𝕜'}
{y : 𝕜'}
(hh₂ : DifferentiableAt 𝕜' h₂ y)
(hh : DifferentiableAt 𝕜 h x)
(hy : y = h x)


theorem lsub_eq_blsub' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o)
    (f : ∀ a < o, Ordinal.{max u v}) : lsub.{_, v} (familyOfBFamily' r ho f) = blsub.{_, v} o f

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

Ordinal.lsub (Ordinal.familyOfBFamily' r ho f) = o.blsub f


@[measurability]
theorem _root_.stronglyMeasurable_id [TopologicalSpace α] [PseudoMetrizableSpace α]
    [OpensMeasurableSpace α] [SecondCountableTopology α] : StronglyMeasurable (id : α → α)


/-- If an integrable function has zero integral on all closed sets, then it is zero
almost everwhere. -/
lemma ae_eq_zero_of_forall_setIntegral_isClosed_eq_zero {μ : Measure β} {f : β → E}
    (hf : Integrable f μ) (h'f : ∀ (s : Set β), IsClosed s → ∫ x in s, f x ∂μ = 0) :
    f =ᵐ[μ] 0

(h'f : ∀ (s : Set β), IsClosed s → ∫ (x : β) in s, f x ∂μ = 0)


lemma NoZeroSMulDivisors.isReduced (R M : Type*)
    [MonoidWithZero R] [Zero M] [MulActionWithZero R M] [Nontrivial M] [NoZeroSMulDivisors R M] :
    IsReduced R

(R : Type u_3)
(M : Type u_4)
[MonoidWithZero R]
[Zero M]
[MulActionWithZero R M]
[Nontrivial M]
[NoZeroSMulDivisors R M]


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

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

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


theorem Measure.finiteAt_nhds [TopologicalSpace α] (μ : Measure α) [IsLocallyFiniteMeasure μ]
    (x : α) : μ.FiniteAtFilter (𝓝 x)


/-- The functor `LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)`
obtained by precomposition. -/
@[simps!]
def LeftExtension.precomp : LeftExtension L F ⥤ LeftExtension (G ⋙ L) (G ⋙ F)

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit F) ((CategoryTheory.whiskeringLeft C D H).obj L))

((CategoryTheory.Functor.LeftExtension.precomp L F G).obj X).left = X.left


@[simp] theorem elim_comp_inr (f : α → γ) (g : β → γ) : Sum.elim f g ∘ inr = g

{α : Type u_1}
{γ : Sort u_2}
{β : Type u_3}
(f : α → γ)
(g : β → γ)


theorem Minpoly.toAdjoin.apply_X :
    Minpoly.toAdjoin R x (mk (minpoly R x) X) = ⟨x, self_mem_adjoin_singleton R x⟩

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}

(AdjoinRoot.Minpoly.toAdjoin R x) ((AdjoinRoot.mk (minpoly R x)) Polynomial.X) = ⟨x, ⋯⟩


@[simp] lemma toLower_ofLower (a : WithLower α) : toLower (ofLower a) = a

{α : Type u_1}
(a : Topology.WithLower α)

Topology.WithLower.toLower (Topology.WithLower.ofLower a) = a


lemma preReflection_apply :
    preReflection x f y = y - (f y) • x

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(x : M)
(f : Module.Dual R M)
(y : M)

(Module.preReflection x f) y = y - f y • x


theorem mem_aroots [CommRing S] [IsDomain S] [Algebra T S]
    [NoZeroSMulDivisors T S] {p : T[X]} {a : S} : a ∈ p.aroots S ↔ p ≠ 0 ∧ aeval a p = 0

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]
[NoZeroSMulDivisors T S]
{p : Polynomial T}
{a : S}

a ∈ p.aroots S ↔ p ≠ 0 ∧ (Polynomial.aeval a) p = 0


theorem cutMap_coe (q : ℚ) : cutMap β (q : α) = Rat.cast '' {r : ℚ | (r : β) < q}

{α : Type u_2}
(β : Type u_3)
[LinearOrderedField α]
[LinearOrderedField β]
(q : ℚ)

LinearOrderedField.cutMap β ↑q = Rat.cast '' {r | ↑r < ↑q}


@[simp]
theorem iteratedFDeriv_one_apply (m : Fin 1 → E) :
    iteratedFDeriv 𝕜 1 f x m = fderiv 𝕜 f x (m 0)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
(m : Fin 1 → E)

(iteratedFDeriv 𝕜 1 f x) m = (fderiv 𝕜 f x) (m 0)


theorem Function.LeftInverse.map_nhds_eq {f : α → β} {g : β → α} {x : β}
    (h : Function.LeftInverse f g) (hf : ContinuousWithinAt f (range g) (g x))
    (hg : ContinuousAt g x) : map g (𝓝 x) = 𝓝[range g] g x

(hf : ContinuousWithinAt f (Set.range g) (g x))


@[simp]
theorem nil_sigma (l : ∀ a, List (σ a)) : (@nil α).sigma l = []

{α : Type u_1}
{σ : α → Type u_3}
(l : (a : α) → List (σ a))


/-- If `m s ≠ 0`, then for some point `x ∈ s` and any `t ∈ 𝓝[s] x` we have `0 < m t`. -/
theorem exists_mem_forall_mem_nhdsWithin_pos_measure [TopologicalSpace α]
    [SecondCountableTopology α] {s : Set α} (hs : μ s ≠ 0) :
    ∃ x ∈ s, ∀ t ∈ 𝓝[s] x, 0 < μ t

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


theorem Right.neg_of_mul_neg_right [MulPosMono α] (h : a * b < 0) (a0 : 0 ≤ a) : b < 0

{α : Type u_1}
{a b : α}
[MulZeroClass α]
[LinearOrder α]
[MulPosMono α]
(h : a * b < 0)
(a0 : 0 ≤ a)


@[simp]
theorem lift₂_mk {f : X → Y → α} (hf : ∀ a b c d, (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d) (x : X)
    (y : Y) : lift₂ f hf (mk x) (mk y) = f x y

(hf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d)

SeparationQuotient.lift₂ f hf (SeparationQuotient.mk x) (SeparationQuotient.mk y) = f x y


theorem filter_image_mk_not_isDiag [DecidableEq α] (s : Finset α) :
    (((s ×ˢ s).image Sym2.mk).filter fun a : Sym2 α => ¬a.IsDiag) =
      s.offDiag.image Sym2.mk

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

Finset.filter (fun a => ¬a.IsDiag) (Finset.image Sym2.mk (s ×ˢ s)) = Finset.image Sym2.mk s.offDiag


theorem mul_log_eq_log_iff {x y z : ℝ} (hx : 0 < x) (hz : 0 < z) :
    y * log x = log z ↔ x ^ y = z


/-- The class `EmbeddingLike F α β` expresses that terms of type `F` have an
injective coercion to injective functions `α ↪ β`.
-/
class EmbeddingLike (F : Sort*) (α β : outParam (Sort*)) [FunLike F α β] : Prop where
  /-- The coercion to functions must produce injective functions. -/
  injective' : ∀ f : F, Function.Injective (DFunLike.coe f)

{F : Sort u_1}
{α : outParam (Sort u_2)}
{β : outParam (Sort u_3)}
[FunLike F α β]
[self : EmbeddingLike F α β]
(f : F)


@[simp] theorem find?_eq_none : find? p l = none ↔ ∀ x ∈ l, ¬ p x

∀ {α : Type u_1} {p : α → Bool} {l : List α}, List.find? p l = none ↔ ∀ (x : α), x ∈ l → ¬p x = true


theorem surjective_of_right_cancellable_Prop (h : ∀ g₁ g₂ : β → Prop, g₁ ∘ f = g₂ ∘ f → g₁ = g₂) :
    Surjective f

(h : ∀ (g₁ g₂ : β → Prop), g₁ ∘ f = g₂ ∘ f → g₁ = g₂)


theorem eval_whiskerLeft
    {η η' : g ⟶ h} {θ : f ⊗ g ⟶ f ⊗ h}
    (pf_η : η = η') (pf_θ : f ◁ η' = θ) :
    f ◁ η = θ

{θ : CategoryTheory.MonoidalCategory.tensorObj f g ⟶ CategoryTheory.MonoidalCategory.tensorObj f h}

(pf_θ : CategoryTheory.MonoidalCategory.whiskerLeft f η' = θ)

CategoryTheory.MonoidalCategory.whiskerLeft f η = θ


/-- The line map is continuous. -/
@[continuity]
theorem lineMap_continuous [TopologicalSpace R] [ContinuousSMul R F] {p v : F} :
    Continuous (lineMap p v : R →ᵃ[R] F)

{R : Type u_1}
{F : Type u_3}
[AddCommGroup F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[Ring R]
[Module R F]
[TopologicalSpace R]
[ContinuousSMul R F]
{p v : F}


@[simp]
theorem invOf_pos [Invertible a] : 0 < ⅟ a ↔ 0 < a

{α : Type u_1}
[LinearOrderedSemiring α]
{a : α}
[Invertible a]


theorem sublists'_eq_sublists (l : List α) : sublists' l = map reverse (sublists (reverse l))

l.sublists' = List.map List.reverse l.reverse.sublists


/-- Define a morphism between left lifts by cancelling the whiskered identities. -/
@[simps! right]
def whiskerIdCancel
    (s : LeftLift f (𝟙 c ≫ g)) {t : LeftLift f g} (τ : s ⟶ t.whisker (𝟙 c)) :
    s.ofIdComp ⟶ t

(s : CategoryTheory.Bicategory.LeftLift f (CategoryTheory.CategoryStruct.comp (CategoryTheory.CategoryStruct.id c) g))

{t : CategoryTheory.Bicategory.LeftLift f g}

(τ : s ⟶ t.whisker (CategoryTheory.CategoryStruct.id c))

(s.whiskerIdCancel τ).right =
  CategoryTheory.CategoryStruct.comp τ.right (CategoryTheory.Bicategory.leftUnitor t.lift).hom


@[to_additive]
theorem IsSubgroup.iInter {ι : Sort*} {s : ι → Set G} (hs : ∀ y : ι, IsSubgroup (s y)) :
    IsSubgroup (Set.iInter s)

{G : Type u_1}
[AddGroup G]
{ι : Sort u_4}
{s : ι → Set G}
(hs : ∀ (y : ι), IsAddSubgroup (s y))


theorem UniqueDiffWithinAt.pi (ι : Type*) [Finite ι] (E : ι → Type*)
    [∀ i, NormedAddCommGroup (E i)] [∀ i, NormedSpace 𝕜 (E i)] (s : ∀ i, Set (E i)) (x : ∀ i, E i)
    (I : Set ι) (h : ∀ i ∈ I, UniqueDiffWithinAt 𝕜 (s i) (x i)) :
    UniqueDiffWithinAt 𝕜 (Set.pi I s) x


theorem iterate_derivative_X_sub_pow_self (n : ℕ) (c : R) :
    derivative^[n] ((X - C c) ^ n) = n.factorial

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

(⇑Polynomial.derivative)^[n] ((Polynomial.X - Polynomial.C c) ^ n) = ↑n.factorial


@[simp]
theorem iteratedDeriv_exp_const_mul (n : ℕ) (c : ℝ) :
    (iteratedDeriv n fun s => exp (c * s)) = fun s => c ^ n * exp (c * s)

(iteratedDeriv n fun s => Real.exp (c * s)) = fun s => c ^ n * Real.exp (c * s)


theorem contractRight_mul_algebraMap (a : CliffordAlgebra Q) (r : R) :
    a * algebraMap _ _ r⌊d = a⌊d * algebraMap _ _ r

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(d : Module.Dual R M)
(a : CliffordAlgebra Q)
(r : R)

(CliffordAlgebra.contractRight (a * (algebraMap R (CliffordAlgebra Q)) r)) d =
  (CliffordAlgebra.contractRight a) d * (algebraMap R (CliffordAlgebra Q)) r


@[simp]
theorem count_apply_lt_top' (s_mble : MeasurableSet s) : count s < ∞ ↔ s.Finite

{α : Type u_1}
[MeasurableSpace α]
{s : Set α}
(s_mble : MeasurableSet s)

MeasureTheory.Measure.count s < ⊤ ↔ s.Finite


theorem ContDiff.norm (hf : ContDiff ℝ n f) (h0 : ∀ x, f x ≠ 0) : ContDiff ℝ n fun y => ‖f y‖

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f : G → E}
{n : ℕ∞}
(hf : ContDiff ℝ n f)
(h0 : ∀ (x : G), f x ≠ 0)


theorem Inducing.continuousOn_iff {f : α → β} {g : β → γ} (hg : Inducing g) {s : Set α} :
    ContinuousOn f s ↔ ContinuousOn (g ∘ f) s

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{f : α → β}
{g : β → γ}
(hg : Inducing g)
{s : Set α}


@[simp]
theorem ofBoolAlg_symmDiff (a b : AsBoolAlg α) : ofBoolAlg (a ∆ b) = ofBoolAlg a + ofBoolAlg b

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


@[norm_cast] -- @[simp] -- Porting note (#10618): simp can prove this
theorem neg_of_int : ∀ n, ((-n : ℤ) : ZNum) = -n


@[simp]
theorem card_eq_zero {o} : card o = 0 ↔ o = 0


/-- Binet's formula as a function equality. -/
theorem Real.coe_fib_eq' :
    (fun n => Nat.fib n : ℕ → ℝ) = fun n => (φ ^ n - ψ ^ n) / √5

(fun n => ↑(Nat.fib n)) = fun n => (φ ^ n - ψ ^ n) / √5


theorem Integrable.sub {f g : α →ₘ[μ] β} (hf : Integrable f) (hg : Integrable g) :
    Integrable (f - g)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{f g : α →ₘ[μ] β}
(hf : f.Integrable)
(hg : g.Integrable)


@[reassoc (attr := simp)]
lemma tensorHom_app_fst {F₁ F₁' F₂ F₂' : J ⥤ C} (f : F₁ ⟶ F₁') (g : F₂ ⟶ F₂') (j : J) :
    (f ⊗ g).app j ≫ fst _ _ = fst _ _ ≫ f.app j

{F₁ F₁' F₂ F₂' : CategoryTheory.Functor J C}

CategoryTheory.CategoryStruct.comp ((CategoryTheory.MonoidalCategory.tensorHom f g).app j)
    (CategoryTheory.ChosenFiniteProducts.fst (F₁'.obj j) (F₂'.obj j)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ChosenFiniteProducts.fst (F₁.obj j) (F₂.obj j)) (f.app j)


/-- A finset of `finrank K V` vectors forms a basis if they span the whole space. -/
@[simps! repr_apply]
noncomputable def finsetBasisOfTopLeSpanOfCardEqFinrank {s : Finset V}
    (le_span : ⊤ ≤ span K (s : Set V)) (card_eq : s.card = finrank K V) : Basis {x // x ∈ s} K V

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

∀ (a : V),
  (finsetBasisOfTopLeSpanOfCardEqFinrank le_span card_eq).repr a =
    ⋯.repr ((LinearMap.codRestrict (Submodule.span K (Set.range Subtype.val)) LinearMap.id ⋯) a)


lemma setIntegral_condKernel_univ_left {t : Set Ω} (ht : MeasurableSet t)
    (hf : IntegrableOn f (Set.univ ×ˢ t) ρ) :
    ∫ b, ∫ ω in t, f (b, ω) ∂(ρ.condKernel b) ∂ρ.fst = ∫ x in Set.univ ×ˢ t, f x ∂ρ

(hf : MeasureTheory.IntegrableOn f (Set.univ ×ˢ t) ρ)

∫ (b : β), ∫ (ω : Ω) in t, f (b, ω) ∂ρ.condKernel b ∂ρ.fst = ∫ (x : β × Ω) in Set.univ ×ˢ t, f x ∂ρ


lemma hasKernel [S.HasLeftHomology] : HasKernel S.g


@[to_additive]
theorem tprod_le_of_prod_le' (ha₂ : 1 ≤ a₂) (h : ∀ s, ∏ i ∈ s, f i ≤ a₂) : ∏' i, f i ≤ a₂

(h : ∀ (s : Finset ι), ∏ i ∈ s, f i ≤ a₂)


@[simp]
theorem comp_id (f : M₁ →SL[σ₁₂] M₂) : f.comp (id R₁ M₁) = f

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

f.comp (ContinuousLinearMap.id R₁ M₁) = f


/-- Bounding the Hausdorff distance by exhibiting, for any point in each set,
another point in the other set at controlled distance -/
theorem hausdorffDist_le_of_mem_dist {r : ℝ} (hr : 0 ≤ r) (H1 : ∀ x ∈ s, ∃ y ∈ t, dist x y ≤ r)
    (H2 : ∀ x ∈ t, ∃ y ∈ s, dist x y ≤ r) : hausdorffDist s t ≤ r

{α : Type u}
[PseudoMetricSpace α]
{s t : Set α}
{r : ℝ}
(hr : 0 ≤ r)
(H1 : ∀ x ∈ s, ∃ y ∈ t, dist x y ≤ r)
(H2 : ∀ x ∈ t, ∃ y ∈ s, dist x y ≤ r)


theorem mem_bot {x : A} : x ∈ (⊥ : Subalgebra R A) ↔ x ∈ Set.range (algebraMap R A)

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{x : A}


theorem nullMeasurableSet_singleton (x : α) : NullMeasurableSet {x} μ

[MeasurableSingletonClass (MeasureTheory.NullMeasurableSpace α μ)]


lemma ite_zero_mul : ite P a 0 * b = ite P (a * b) 0

{α : Type u}
[MulZeroClass α]
(P : Prop)
[Decidable P]
(a b : α)

(if P then a else 0) * b = if P then a * b else 0


@[simp, norm_cast]
theorem ofReal_sub (r s : ℝ) : ((r - s : ℝ) : ℂ) = r - s


lemma trace_comp_eq_mul_of_commute_of_isNilpotent [IsReduced R] {f g : Module.End R M}
    (μ : R) (h_comm : Commute f g) (hg : IsNilpotent (g - algebraMap R _ μ)) :
    trace R M (f ∘ₗ g) = μ * trace R M f

(hg : IsNilpotent (g - (algebraMap R (Module.End R M)) μ))

(LinearMap.trace R M) (f ∘ₗ g) = μ * (LinearMap.trace R M) f


@[simp]
theorem map_mk (f : α → β) (h : ((· ≈ ·) ⇒ (· ≈ ·)) f f) (x : α) :
    Quotient.map f h (⟦x⟧ : Quotient sa) = (⟦f x⟧ : Quotient sb)

(h : ((fun x x_1 => x ≈ x_1) ⇒ fun x x_1 => x ≈ x_1) f f)


@[to_additive (attr := simp) nnnorm_zero]
theorem nnnorm_one' : ‖(1 : E)‖₊ = 0


@[to_additive (attr := simp)]
theorem traverse_eq (x) : FreeSemigroup.traverse F x = traverse F x

{α β : Type u}
{m : Type u → Type u}
[Applicative m]
(F : α → m β)
(x : FreeAddSemigroup α)

FreeAddSemigroup.traverse F x = traverse F x


@[to_additive sub.instNeBot]
lemma div.instNeBot [NeBot f] [NeBot g] : NeBot (f / g)


@[simp] lemma count_eq_zero {a : α} : count a s = 0 ↔ a ∉ s

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


lemma pow_sub_of_lt (a : G₀) (h : n < m) : a ^ (m - n) = a ^ m * (a ^ n)⁻¹

{G₀ : Type u_3}
[GroupWithZero G₀]
{m n : ℕ}
(a : G₀)
(h : n < m)


theorem mellin_div_const (f : ℝ → ℂ) (s a : ℂ) : mellin (fun t => f t / a) s = mellin f s / a


lemma cfc_inv_id (a : Aˣ) (ha : p a := by cfc_tac) :
    cfc (fun x ↦ x⁻¹ : R → R) (a : A) = a⁻¹

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[Semifield R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[HasContinuousInv₀ R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(a : Aˣ)
(ha : p ↑a := by cfc_tac)


theorem card_ne_eq [Fintype α] (a : α) [Fintype { x : α | x ≠ a }] :
    Fintype.card { x : α | x ≠ a } = Fintype.card α - 1

{α : Type u}
[Fintype α]
(a : α)
[Fintype ↑{x | x ≠ a}]

Fintype.card ↑{x | x ≠ a} = Fintype.card α - 1


/-- The isomorphism between points of limit cokernel coforks induced by an isomorphism
in the category of arrows. -/
@[simps]
def mapIsoOfIsColimit {cc : CokernelCofork f} {cc' : CokernelCofork f'}
    (hf : IsColimit cc) (hf' : IsColimit cc')
    (φ : Arrow.mk f ≅ Arrow.mk f') : cc.pt ≅ cc'.pt

{cc : CategoryTheory.Limits.CokernelCofork f}

{cc' : CategoryTheory.Limits.CokernelCofork f'}

(hf : CategoryTheory.Limits.IsColimit cc)

(hf' : CategoryTheory.Limits.IsColimit cc')

(φ : CategoryTheory.Arrow.mk f ≅ CategoryTheory.Arrow.mk f')

(CategoryTheory.Limits.CokernelCofork.mapIsoOfIsColimit hf hf' φ).hom =
  CategoryTheory.Limits.CokernelCofork.mapOfIsColimit hf cc' φ.hom


@[to_additive]
theorem IsComplement.existsUnique (h : IsComplement S T) (g : G) :
    ∃! x : S × T, x.1.1 * x.2.1 = g

{G : Type u_1}
[AddGroup G]
{S T : Set G}
(h : AddSubgroup.IsComplement S T)
(g : G)


@[simp]
theorem range_abs : range Complex.abs = Ici 0


theorem formPerm_apply_get_length (x : α) (xs : List α) :
    formPerm (x :: xs) ((x :: xs).get (Fin.mk xs.length (by simp))) = x

{α : Type u_1}
[DecidableEq α]
(x : α)
(xs : List α)

(x :: xs).formPerm ((x :: xs).get ⟨xs.length, ⋯⟩) = x


theorem reflTransGen_eq_self (refl : Reflexive r) (trans : Transitive r) : ReflTransGen r = r

{α : Type u_1}
{r : α → α → Prop}
(refl : Reflexive r)
(trans : Transitive r)


@[mono]
protected theorem map (h : μ ≪ ν) {f : α → β} (hf : Measurable f) : μ.map f ≪ ν.map f

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ ν : MeasureTheory.Measure α}
(h : μ.AbsolutelyContinuous ν)
{f : α → β}
(hf : Measurable f)

(MeasureTheory.Measure.map f μ).AbsolutelyContinuous (MeasureTheory.Measure.map f ν)


theorem of_near (f : ℕ → β) (g : CauSeq β abv) (h : ∀ ε > 0, ∃ i, ∀ j ≥ i, abv (f j - g j) < ε) :
    IsCauSeq abv f

(h : ∀ ε > 0, ∃ i, ∀ j ≥ i, abv (f j - ↑g j) < ε)


@[to_additive]
theorem IsUpperSet.smul_subset (hs : IsUpperSet s) (hx : 1 ≤ x) : x • s ⊆ s

{α : Type u_1}
[OrderedAddCommMonoid α]
{s : Set α}
{x : α}
(hs : IsUpperSet s)
(hx : 0 ≤ x)


/-- An induction principle for closure membership for predicates with two arguments.  -/
@[to_additive (attr := elab_as_elim) "An induction principle for additive closure membership for
  predicates with two arguments."]
theorem closure_induction₂ {p : M → M → Prop} {x} {y : M} (hx : x ∈ closure s) (hy : y ∈ closure s)
    (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (Hmul_left : ∀ x y z, p x z → p y z → p (x * y) z)
    (Hmul_right : ∀ x y z, p z x → p z y → p z (x * y)) : p x y

(Hmul_left : ∀ (x y z : M), p x z → p y z → p (x + y) z)

(Hmul_right : ∀ (x y z : M), p z x → p z y → p z (x + y))


theorem log_pos_real {x : ℝ≥0∞} (h : x ≠ 0) (h' : x ≠ ⊤) :
    log x = Real.log (ENNReal.toReal x)


@[to_additive (attr := simp)]
lemma smul_left_cancel_iff (g : α) {x y : β} : g • x = g • y ↔ x = y

{α : Type u_1}
{β : Type u_2}
[Group α]
[MulAction α β]
(g : α)
{x y : β}


@[to_additive (attr := simp, norm_cast)]
theorem coe_ofDense [Semigroup M] [Semigroup N] {s : Set M} (f : M → N) (hs : closure s = ⊤)
    (hmul) : (ofDense f hs hmul : M → N) = f

(hmul : ∀ (x y : M), y ∈ s → f (x * y) = f x * f y)


@[reassoc (attr := simp)]
lemma liftK_i (k : A ⟶ S.X₂) (hk : k ≫ S.g = 0) : h.liftK k hk ≫ h.i = k

(hk : CategoryTheory.CategoryStruct.comp k S.g = 0)

CategoryTheory.CategoryStruct.comp (h.liftK k hk) h.i = k


theorem SmoothAt.fst {f : N → M × M'} {x : N} (hf : SmoothAt J (I.prod I') f x) :
    SmoothAt J I (fun x => (f x).1) 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 : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{f : N → M × M'}
{x : N}
(hf : SmoothAt J (I.prod I') f x)


/-- If three points are not collinear, the first and second are different. -/
theorem ne₁₂_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear k ({p₁, p₂, p₃} : Set P)) :
    p₁ ≠ p₂

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ : P}
(h : ¬Collinear k {p₁, p₂, p₃})


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


theorem comp_map (h : β → γ) (g : α → β) (x : Option α) : x.map (h ∘ g) = (x.map g).map h

{β : Type u_1}
{γ : Type u_2}
{α : Type u_3}
(h : β → γ)
(g : α → β)
(x : Option α)

Option.map (h ∘ g) x = Option.map h (Option.map g x)


@[to_additive]
theorem TopologicalGroup.of_comm_of_nhds_one {G : Type u} [CommGroup G] [TopologicalSpace G]
    (hmul : Tendsto (uncurry ((· * ·) : G → G → G)) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))
    (hinv : Tendsto (fun x : G => x⁻¹) (𝓝 1) (𝓝 1))
    (hleft : ∀ x₀ : G, 𝓝 x₀ = map (x₀ * ·) (𝓝 1)) : TopologicalGroup G

(hmul : Filter.Tendsto (Function.uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))

(hinv : Filter.Tendsto (fun x => x⁻¹) (𝓝 1) (𝓝 1))

(hleft : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x₀ * x) (𝓝 1))


protected theorem lt_trans {a b c : Int} (h₁ : a < b) (h₂ : b < c) : a < c


/-- Two pseudo metric space structures with the same distance function coincide. -/
@[ext]
theorem PseudoMetricSpace.ext {α : Type*} {m m' : PseudoMetricSpace α}
    (h : m.toDist = m'.toDist) : m = m'

(h : PseudoMetricSpace.toDist = PseudoMetricSpace.toDist)


theorem sup {I J : Ideal A} (HI : I.IsHomogeneous 𝒜) (HJ : J.IsHomogeneous 𝒜) :
    (I ⊔ J).IsHomogeneous 𝒜

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


theorem map_lt_add_floor_translationNumber_add_one (x : ℝ) : f x < x + ⌊τ f⌋ + 1


theorem ge_antisymm : a ≤ b → b ≤ a → b = a

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


theorem as_sum_support_C_mul_X_pow (p : R[X]) : p = ∑ i ∈ p.support, C (p.coeff i) * X ^ i

p = ∑ i ∈ p.support, Polynomial.C (p.coeff i) * Polynomial.X ^ i


@[simp]
theorem len_mk (n : ℕ) : [n].len = n