@[simp]
theorem inversion_self (c : P) (R : ℝ) : inversion c R c = c

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(c : P)
(R : ℝ)


@[to_additive (attr := simp)]
theorem ofLeftInverse_symm_apply {f : G →* N} {g : N →* G} (h : Function.LeftInverse g f)
    (x : f.range) : (ofLeftInverse h).symm x = g x

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G →* N}
{g : N →* G}
(h : Function.LeftInverse ⇑g ⇑f)
(x : ↥f.range)

(MonoidHom.ofLeftInverse h).symm x = g ↑x


theorem mem_nonZeroDivisors_of_ne_zero [NoZeroDivisors M] {x : M} (hx : x ≠ 0) : x ∈ M⁰

{M : Type u_2}
[MonoidWithZero M]
[NoZeroDivisors M]
{x : M}
(hx : x ≠ 0)


private theorem ne_zero (h0 : P.a ≠ 0 ∨ P.b ≠ 0 ∨ P.c ≠ 0 ∨ P.d ≠ 0) : P.toPoly ≠ 0


@[to_additive (attr := simp)]
theorem iterate_map_div {M F : Type*} [Group M] [FunLike F M M] [MonoidHomClass F M M]
    (f : F) (n : ℕ) (x y : M) :
    f^[n] (x / y) = f^[n] x / f^[n] y

{M : Type u_5}
{F : Type u_6}
[Group M]
[FunLike F M M]
[MonoidHomClass F M M]
(f : F)
(n : ℕ)
(x y : M)


theorem inv_pos_of_nat {n : ℕ} : 0 < ((n : α) + 1)⁻¹

{α : Type u_1}
[LinearOrderedSemifield α]
{n : ℕ}


lemma ContextFreeGrammar.reverse_involutive :
    Function.Involutive (@ContextFreeGrammar.reverse T)


theorem apply_eq_zero_of_comp_eq_zero {P Q R : C} (f : Q ⟶ R) (a : P ⟶ Q) : a ≫ f = 0 → f a = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
{P Q R : C}
(f : Q ⟶ R)
(a : P ⟶ Q)

a ≫ f = 0 →
  CategoryTheory.Abelian.Pseudoelement.pseudoApply f
      (Quot.mk (CategoryTheory.Abelian.PseudoEqual Q) (CategoryTheory.Over.mk a)) =
    0


theorem volume_le_diam (s : Set ℝ) : volume s ≤ EMetric.diam s


/-- A snake input in an abelian category `C` consists of morphisms
of short complexes `L₀ ⟶ L₁ ⟶ L₂ ⟶ L₃` (which should be visualized vertically) such
that `L₀` and `L₃` are respectively the kernel and the cokernel of `L₁ ⟶ L₂`,
`L₁` and `L₂` are exact, `L₁.g` is epi and `L₂.f` is mono. -/
structure SnakeInput where
  /-- the zeroth row -/
  L₀ : ShortComplex C
  /-- the first row -/
  L₁ : ShortComplex C
  /-- the second row -/
  L₂ : ShortComplex C
  /-- the third row -/
  L₃ : ShortComplex C
  /-- the morphism from the zeroth row to the first row -/
  v₀₁ : L₀ ⟶ L₁
  /-- the morphism from the first row to the second row -/
  v₁₂ : L₁ ⟶ L₂
  /-- the morphism from the second row to the third row -/
  v₂₃ : L₂ ⟶ L₃
  w₀₂ : v₀₁ ≫ v₁₂ = 0 := by aesop_cat
  w₁₃ : v₁₂ ≫ v₂₃ = 0 := by aesop_cat
  /-- `L₀` is the kernel of `v₁₂ : L₁ ⟶ L₂`. -/
  h₀ : IsLimit (KernelFork.ofι _ w₀₂)
  /-- `L₃` is the cokernel of `v₁₂ : L₁ ⟶ L₂`. -/
  h₃ : IsColimit (CokernelCofork.ofπ _ w₁₃)
  L₁_exact : L₁.Exact
  epi_L₁_g : Epi L₁.g
  L₂_exact : L₂.Exact
  mono_L₂_f : Mono L₂.f

(self : CategoryTheory.ShortComplex.SnakeInput C)

CategoryTheory.CategoryStruct.comp self.v₀₁ self.v₁₂ = 0


@[simp] lemma right_eq_inter : t = s ∩ t ↔ t ⊆ s


theorem infinite [Mi : Infinite M] (h : M ≅[L] N) : Infinite N

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
[Mi : Infinite M]
(h : L.ElementarilyEquivalent M N)


theorem le_weight_of_ne_zero' {s : σ} {f : σ →₀ ℕ} (hs : f s ≠ 0) :
    w s ≤ weight w f

{σ : Type u_1}
{M : Type u_3}
[CanonicallyOrderedAddCommMonoid M]
(w : σ → M)
{s : σ}
{f : σ →₀ ℕ}
(hs : f s ≠ 0)


@[simp] theorem join_replicate_replicate : (replicate n (replicate m a)).join = replicate (n * m) a

∀ {α : Type u_1} {a : α}, (List.replicate n (List.replicate m a)).join = List.replicate (n * m) a


@[simp]
theorem next (α : Type*) [AddGroup α] [One α] (i : α) : (ComplexShape.down α).next i = i - 1

(α : Type u_2)
[AddGroup α]
[One α]
(i : α)


theorem head'_eq_head : ∀ (x : M F) (n : ℕ), head' (x.approx <| n + 1) = head x

PFunctor.Approx.head' (x.approx (n + 1)) = x.head


@[simp]
theorem finSepDegree_self : finSepDegree F F = 1


@[to_additive]
protected lemma mul_eq_mul_of_div_eq_div (hb : IsUnit b) (hd : IsUnit d)
    (a c : α) (h : a / b = c / d) : a * d = c * b

{α : Type u}
[SubtractionCommMonoid α]
{b d : α}
(hb : IsAddUnit b)
(hd : IsAddUnit d)
(a c : α)
(h : a - b = c - d)


/-- To every `S : J.Cover X` and presheaf `P`, associate a `MulticospanIndex`. -/
@[simps]
def index {D : Type u₁} [Category.{v₁} D] (S : J.Cover X) (P : Cᵒᵖ ⥤ D) :
    Limits.MulticospanIndex D

{J : CategoryTheory.GrothendieckTopology C}


lemma measure_preimage_eq_zero_iff_of_countable {s : Set β} {f : α → β} (hs : s.Countable) :
    μ (f ⁻¹' s) = 0 ↔ ∀ x ∈ s, μ (f ⁻¹' {x}) = 0

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set β}
{f : α → β}
(hs : s.Countable)


theorem setToFun_congr_measure_of_add_left {μ' : Measure α}
    (hT_add : DominatedFinMeasAdditive (μ + μ') T C') (hT : DominatedFinMeasAdditive μ' T C)
    (f : α → E) (hf : Integrable f (μ + μ')) :
    setToFun (μ + μ') T hT_add f = setToFun μ' T hT f

(hT_add : MeasureTheory.DominatedFinMeasAdditive (μ + μ') T C')

(hT : MeasureTheory.DominatedFinMeasAdditive μ' T C)

(hf : MeasureTheory.Integrable f (μ + μ'))

MeasureTheory.setToFun (μ + μ') T hT_add f = MeasureTheory.setToFun μ' T hT f


@[to_additive (attr := simp) prod_unique]
theorem prod_unique (f : M →* N × P) : ((fst N P).comp f).prod ((snd N P).comp f) = f

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[MulOneClass M]
[MulOneClass N]
[MulOneClass P]
(f : M →* N × P)

((MonoidHom.fst N P).comp f).prod ((MonoidHom.snd N P).comp f) = f


theorem dom_iff_graph (f : α →. β) (x : α) : x ∈ f.Dom ↔ ∃ y, (x, y) ∈ f.graph

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


theorem le_extend {s : α} (h : P s) : m s h ≤ extend m s

{α : Type u_1}
{P : α → Prop}
(m : (s : α) → P s → ℝ≥0∞)
{s : α}
(h : P s)


/-- Typeclass for reverse monotonicity of scalar multiplication by positive elements on the left,
namely `a • b₁ ≤ a • b₂ → b₁ ≤ b₂` if `0 < a`.

You should usually not use this very granular typeclass directly, but rather a typeclass like
`OrderedSMul`. -/
class PosSMulReflectLE : Prop where
  /-- Do not use this. Use `le_of_smul_lt_smul_left` instead. -/
  protected elim ⦃a : α⦄ (ha : 0 < a) ⦃b₁ b₂ : β⦄ (hb : a • b₁ ≤ a • b₂) : b₁ ≤ b₂

{α : Type u_1}
{β : Type u_2}
[SMul α β]
[Preorder α]
[Preorder β]
[Zero α]
[self : PosSMulReflectLE α β]
⦃a : α⦄
(ha : 0 < a)
⦃b₁ b₂ : β⦄
(hb : a • b₁ ≤ a • b₂)


/--
The family of elements given by `x : FirstObj P S` is compatible iff `firstMap` and `secondMap`
map it to the same point.
-/
theorem compatible_iff (x : FirstObj P X) : (Arrows.Compatible P π ((Types.productIso _).hom x)) ↔
    firstMap P X π x = secondMap P X π x

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

(x : CategoryTheory.Equalizer.Presieve.Arrows.FirstObj P X)

CategoryTheory.Presieve.Arrows.Compatible P π
    ((CategoryTheory.Limits.Types.productIso fun i => P.obj (Opposite.op (X i))).hom x) ↔
  CategoryTheory.Equalizer.Presieve.Arrows.firstMap P X π x = CategoryTheory.Equalizer.Presieve.Arrows.secondMap P X π x


@[to_additive (attr := simp)]
theorem ofBijective_apply_symm_apply {n : N} (f : M →* N) (hf : Bijective f) :
    f ((ofBijective f hf).symm n) = n

{M : Type u_6}
{N : Type u_7}
[MulOneClass M]
[MulOneClass N]
{n : N}
(f : M →* N)
(hf : Function.Bijective ⇑f)

f ((MulEquiv.ofBijective f hf).symm n) = n


theorem circleMap_ne_center {c : ℂ} {R : ℝ} (hR : R ≠ 0) {θ : ℝ} : circleMap c R θ ≠ c


@[simp] theorem toBialgHom_comp {X Y Z : HopfAlgebraCat.{v} R} (f : X ⟶ Y) (g : Y ⟶ Z) :
    (f ≫ g).toBialgHom = g.toBialgHom.comp f.toBialgHom

{R : Type u}
[CommRing R]
{X Y Z : HopfAlgebraCat R}
(f : X ⟶ Y)
(g : Y ⟶ Z)


@[simp] theorem map_id'' {x : Option α} : (x.map fun a => a) = x


theorem jacobiTheta_eq_tsum_nat {τ : ℂ} (hτ : 0 < im τ) :
    jacobiTheta τ = ↑1 + ↑2 * ∑' n : ℕ, cexp (π * I * ((n : ℂ) + 1) ^ 2 * τ)

jacobiTheta τ = 1 + 2 * ∑' (n : ℕ), cexp (↑π * Complex.I * (↑n + 1) ^ 2 * τ)


/-- The converse of `type_equalizer_of_unique`. -/
theorem unique_of_type_equalizer (t : IsLimit (Fork.ofι _ w)) (y : Y) (hy : g y = h y) :
    ∃! x : X, f x = y

(t : CategoryTheory.Limits.IsLimit (CategoryTheory.Limits.Fork.ofι f w))


theorem _root_.Continuous.ennreal_mul [TopologicalSpace α] {f g : α → ℝ≥0∞} (hf : Continuous f)
    (hg : Continuous g) (h₁ : ∀ x, f x ≠ 0 ∨ g x ≠ ∞) (h₂ : ∀ x, g x ≠ 0 ∨ f x ≠ ∞) :
    Continuous fun x => f x * g x

{α : Type u_1}
[TopologicalSpace α]
{f g : α → ℝ≥0∞}
(hf : Continuous f)
(hg : Continuous g)
(h₁ : ∀ (x : α), f x ≠ 0 ∨ g x ≠ ⊤)
(h₂ : ∀ (x : α), g x ≠ 0 ∨ f x ≠ ⊤)


@[simp] theorem getLsb_cast (h : w = v) (x : BitVec w) : (cast h x).getLsb i = x.getLsb i

{w v i : Nat}
(h : w = v)
(x : BitVec w)


@[measurability, fun_prop]
theorem Measurable.real_toNNReal {f : α → ℝ} (hf : Measurable f) :
    Measurable fun x => Real.toNNReal (f x)

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ}
(hf : Measurable f)


theorem surjective_head! [Inhabited α] : Surjective (@head! α _)


lemma derivedSet_subset_closure (A : Set X) : derivedSet A ⊆ closure A

{X : Type u_1}
[TopologicalSpace X]
(A : Set X)


theorem iUnion_Ici_eq_Ici_iInf {R : Type*} [CompleteLinearOrder R] {f : ι → R}
    (has_least_elem : (⨅ i, f i) ∈ range f) : ⋃ i : ι, Ici (f i) = Ici (⨅ i, f i)

(has_least_elem : ⨅ i, f i ∈ Set.range f)


theorem getLastI_eq_getLast? [Inhabited α] : ∀ l : List α, l.getLastI = l.getLast?.iget


theorem le_measure_liminf_of_limsup_measure_compl_le {ι : Type*} {L : Filter ι} {μ : Measure Ω}
    {μs : ι → Measure Ω} [IsProbabilityMeasure μ] [∀ i, IsProbabilityMeasure (μs i)] {E : Set Ω}
    (E_mble : MeasurableSet E) (h : (L.limsup fun i => μs i Eᶜ) ≤ μ Eᶜ) :
    μ E ≤ L.liminf fun i => μs i E

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

(h : Filter.limsup (fun i => (μs i) Eᶜ) L ≤ μ Eᶜ)

μ E ≤ Filter.liminf (fun i => (μs i) E) L


@[simp]
theorem nullHomotopicMap'_f_of_not_rel_left {k₁ k₀ : ι} (r₁₀ : c.Rel k₁ k₀)
    (hk₀ : ∀ l : ι, ¬c.Rel k₀ l) (h : ∀ i j, c.Rel j i → (C.X i ⟶ D.X j)) :
    (nullHomotopicMap' h).f k₀ = h k₀ k₁ r₁₀ ≫ D.d k₁ k₀

(h : (i j : ι) → c.Rel j i → (C.X i ⟶ D.X j))

(Homotopy.nullHomotopicMap' h).f k₀ = h k₀ k₁ r₁₀ ≫ D.d k₁ k₀


@[simp, mfld_simps]
theorem preimage_id' {s : Set α} : (fun x => x) ⁻¹' s = s


theorem closedBall_subset_closedBall' (h : ε₁ + dist x y ≤ ε₂) :
    closedBall x ε₁ ⊆ closedBall y ε₂

{α : Type u}
[PseudoMetricSpace α]
{x y : α}
{ε₁ ε₂ : ℝ}
(h : ε₁ + dist x y ≤ ε₂)

Metric.closedBall x ε₁ ⊆ Metric.closedBall y ε₂


theorem exists_isCompl (p : Submodule (MonoidAlgebra k G) V) :
    ∃ q : Submodule (MonoidAlgebra k G) V, IsCompl p q

{k : Type u}
[Field k]
{G : Type u}
[Fintype G]
[Invertible ↑(Fintype.card G)]
[Group G]
{V : Type u}
[AddCommGroup V]
[Module (MonoidAlgebra k G) V]
(p : Submodule (MonoidAlgebra k G) V)


lemma ιMapBifunctorOrZero_eq (i₁ : I₁) (i₂ : I₂) (j : J)
    (h : ComplexShape.π c₁ c₂ c (i₁, i₂) = j) :
    ιMapBifunctorOrZero K₁ K₂ F c i₁ i₂ j = ιMapBifunctor K₁ K₂ F c i₁ i₂ j h

[∀ (X₁ : C₁), (F.obj X₁).PreservesZeroMorphisms]

K₁.ιMapBifunctorOrZero K₂ F c i₁ i₂ j = K₁.ιMapBifunctor K₂ F c i₁ i₂ j h


theorem linearIndependent_inl_union_inr' {v : ι → M} {v' : ι' → M'} (hv : LinearIndependent R v)
    (hv' : LinearIndependent R v') :
    LinearIndependent R (Sum.elim (inl R M M' ∘ v) (inr R M M' ∘ v'))

{ι : Type u'}
{ι' : Type u_1}
{R : Type u_2}
{M : Type u_4}
{M' : Type u_5}
[Ring R]
[AddCommGroup M]
[AddCommGroup M']
[Module R M]
[Module R M']
{v : ι → M}
{v' : ι' → M'}
(hv : LinearIndependent R v)
(hv' : LinearIndependent R v')

LinearIndependent R (Sum.elim (⇑(LinearMap.inl R M M') ∘ v) (⇑(LinearMap.inr R M M') ∘ v'))


theorem isUnit_iff_eq_bot {a : Associates α} : IsUnit a ↔ a = ⊥

{α : Type u_1}
[CommMonoid α]
{a : Associates α}


/-- Main theorem of this section: if both `f` and `x ↦ ‖x‖ * ‖f x‖` are integrable, then the
Fourier transform of `f` has a Fréchet derivative (everywhere in its domain) and its derivative is
the Fourier transform of `smulRight L f`. -/
theorem hasFDerivAt_fourierIntegral
    [MeasurableSpace V] [BorelSpace V] [SecondCountableTopology V] {μ : Measure V}
    (hf : Integrable f μ) (hf' : Integrable (fun v : V ↦ ‖v‖ * ‖f v‖) μ) (w : W) :
    HasFDerivAt (fourierIntegral 𝐞 μ L.toLinearMap₂ f)
      (fourierIntegral 𝐞 μ L.toLinearMap₂ (fourierSMulRight L f) w) w

(hf' : MeasureTheory.Integrable (fun v => ‖v‖ * ‖f v‖) μ)

HasFDerivAt (VectorFourier.fourierIntegral 𝐞 μ L.toLinearMap₂ f)
  (VectorFourier.fourierIntegral 𝐞 μ L.toLinearMap₂ (VectorFourier.fourierSMulRight L f) w) w


@[simp]
lemma count_attach (a : {x // x ∈ l}) : l.attach.count a = l.count ↑a

{α : Type u_1}
{l : List α}
[DecidableEq α]
(a : { x // x ∈ l })

List.count a l.attach = List.count (↑a) l


theorem Embedding.of_subsingleton [Subsingleton X] (f : X → Y) : Embedding f

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[Subsingleton X]
(f : X → Y)


/-- Two ways of removing the constant coefficient of a power series are the same. -/
theorem sub_const_eq_shift_mul_X (φ : R⟦X⟧) :
    φ - C R (constantCoeff R φ) = (mk fun p ↦ coeff R (p + 1) φ) * X

{R : Type u_1}
[Ring R]
(φ : PowerSeries R)

φ - (PowerSeries.C R) ((PowerSeries.constantCoeff R) φ) =
  (PowerSeries.mk fun p => (PowerSeries.coeff R (p + 1)) φ) * PowerSeries.X


/-- If a compact operator preserves a closed submodule, its restriction to that submodule is
compact.

Note that, following mathlib's convention in linear algebra, `restrict` designates the restriction
of an endomorphism `f : E →ₗ E` to an endomorphism `f' : ↥V →ₗ ↥V`. To prove that the restriction
`f' : ↥U →ₛₗ ↥V` of a compact operator `f : E →ₛₗ F` is compact, apply
`IsCompactOperator.codRestrict` to `f ∘ U.subtypeL`, which is compact by
`IsCompactOperator.comp_clm`. -/
theorem IsCompactOperator.restrict {f : M₁ →ₗ[R₁] M₁} (hf : IsCompactOperator f)
    {V : Submodule R₁ M₁} (hV : ∀ v ∈ V, f v ∈ V) (h_closed : IsClosed (V : Set M₁)) :
    IsCompactOperator (f.restrict hV)

{R₁ : Type u_1}
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
{f : M₁ →ₗ[R₁] M₁}
(hf : IsCompactOperator ⇑f)
{V : Submodule R₁ M₁}
(hV : ∀ v ∈ V, f v ∈ V)
(h_closed : IsClosed ↑V)


@[to_additive]
theorem mulIndicator_preimage (s : Set α) (f : α → M) (B : Set M) :
    mulIndicator s f ⁻¹' B = s.ite (f ⁻¹' B) (1 ⁻¹' B)

{α : Type u_1}
{M : Type u_4}
[Zero M]
(s : Set α)
(f : α → M)
(B : Set M)

s.indicator f ⁻¹' B = s.ite (f ⁻¹' B) (0 ⁻¹' B)


@[simp] lemma mem_comapSubmodule {x : M} :
    x ∈ comapSubmodule R M a q ↔ of R M a x ∈ q

{q : Submodule R[X] (Module.AEval R M a)}

x ∈ (Module.AEval.comapSubmodule R M a) q ↔ (Module.AEval.of R M a) x ∈ q


@[reassoc (attr := simp)]
lemma ι_D₁ (i₁₂ i₁₂' : I₁₂) (i₁ : I₁) (i₂ : I₂) (h : ComplexShape.π c₁ c₂ c₁₂ ⟨i₁, i₂⟩ = i₁₂) :
    K.ιTotal c₁₂ i₁ i₂ i₁₂ h ≫ K.D₁ c₁₂ i₁₂ i₁₂' =
      K.d₁ c₁₂ i₁ i₂ i₁₂'

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


@[simp]
theorem intersperse_singleton (a b : α) : intersperse a [b] = [b]


theorem integral_union_eq_left_of_ae_aux (ht_eq : ∀ᵐ x ∂μ.restrict t, f x = 0)
    (haux : StronglyMeasurable f) (H : IntegrableOn f (s ∪ t) μ) :
    ∫ x in s ∪ t, f x ∂μ = ∫ x in s, f x ∂μ

(ht_eq : ∀ᵐ (x : X) ∂μ.restrict t, f x = 0)

(haux : MeasureTheory.StronglyMeasurable f)

(H : MeasureTheory.IntegrableOn f (s ∪ t) μ)

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


theorem edgeSet_replaceVertex_of_adj (ha : G.Adj s t) : (G.replaceVertex s t).edgeSet =
    (G.edgeSet \ G.incidenceSet t ∪ (s(·, t)) '' (G.neighborSet s)) \ {s(t, t)}

{V : Type u_1}
[DecidableEq V]
(G : SimpleGraph V)
{s t : V}
(ha : G.Adj s t)

(G.replaceVertex s t).edgeSet = (G.edgeSet \ G.incidenceSet t ∪ (fun x => s(x, t)) '' G.neighborSet s) \ {s(t, t)}


@[simp] lemma mk_mem_nonUniforms :
    (u, v) ∈ P.nonUniforms G ε ↔ u ∈ P.parts ∧ v ∈ P.parts ∧ u ≠ v ∧ ¬G.IsUniform ε u v

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


/-- Reinterpret `Function.Semiconj f g g` as `Function.Commute f g`. These two predicates are
definitionally equal but have different dot-notation lemmas. -/
theorem Semiconj.commute {f g : α → α} (h : Semiconj f g g) : Commute f g

{α : Type u_1}
{f g : α → α}
(h : Function.Semiconj f g g)


@[simp]
theorem toIntermediateField'_toSubalgebra (S : IntermediateField K L) :
    S.toSubalgebra.toIntermediateField' (Field.toIsField S) = S

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


@[simp]
theorem cospan_one {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) : (cospan f g).obj WalkingCospan.one = Z

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

(CategoryTheory.Limits.cospan f g).obj CategoryTheory.Limits.WalkingCospan.one = Z


/-- `HomOrthogonal.MatrixDecomposition` as an `R`-linear equivalence. -/
@[simps]
noncomputable def matrixDecompositionLinearEquiv (o : HomOrthogonal s) {α β : Type} [Finite α]
    [Finite β] {f : α → ι} {g : β → ι} :
    ((⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)) ≃ₗ[R]
      ∀ i : ι, Matrix (g ⁻¹' {i}) (f ⁻¹' {i}) (End (s i))

∀ (a : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)) (i : ι),
  o.matrixDecompositionLinearEquiv a i = o.matrixDecompositionAddEquiv.toFun a i


theorem involute_eq_of_mem_odd {x : CliffordAlgebra Q} (h : x ∈ evenOdd Q 1) : involute x = -x

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{x : CliffordAlgebra Q}
(h : x ∈ CliffordAlgebra.evenOdd Q 1)


@[simp]
theorem comp_hom {M N K : Action V G} (f : M ⟶ N) (g : N ⟶ K) :
    (f ≫ g : Hom M K).hom = f.hom ≫ g.hom

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
{M N K : Action V G}
(f : M ⟶ N)
(g : N ⟶ K)


theorem mk_preimage_prod (f : γ → α) (g : γ → β) :
    (fun x => (f x, g x)) ⁻¹' s ×ˢ t = f ⁻¹' s ∩ g ⁻¹' t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
(f : γ → α)
(g : γ → β)


@[simp]
theorem toGroup.of {x : α} : toGroup h (of x) = f x

(h : ∀ r ∈ rels, (FreeGroup.lift f) r = 1)

(PresentedGroup.toGroup h) (PresentedGroup.of x) = f x


@[simp]
lemma ofTensorProduct_tmul (r : AdicCompletion I R) (x : M) :
    ofTensorProduct I M (r ⊗ₜ x) = r • of I M x

{R : Type u_1}
[CommRing R]
(I : Ideal R)
(M : Type u_2)
[AddCommGroup M]
[Module R M]
(r : AdicCompletion I R)
(x : M)

(AdicCompletion.ofTensorProduct I M) (r ⊗ₜ[R] x) = r • (AdicCompletion.of I M) x


/-- `val_v(Iⁿ) = n*val_v(I)` for every `n ∈ ℤ`. -/
theorem count_zpow (n : ℤ) (I : FractionalIdeal R⁰ K) :
    count K v (I ^ n) = n * count K v I

(v : IsDedekindDomain.HeightOneSpectrum R)

FractionalIdeal.count K v (I ^ n) = n * FractionalIdeal.count K v I


@[simp]
theorem sheafificationAdjunction_counit_app_val (P : Sheaf J D) :
    ((sheafificationAdjunction J D).counit.app P).val = sheafifyLift J (𝟙 P.val) P.cond

(J : CategoryTheory.GrothendieckTopology C)

((CategoryTheory.sheafificationAdjunction J D).counit.app P).val =
  CategoryTheory.sheafifyLift J (CategoryTheory.CategoryStruct.id P.val) ⋯


/-- Isomorphism obtained by separating the term of index `none` of a direct sum over `Option ι`. -/
@[simps!]
noncomputable def addEquivProdDirectSum : (⨁ i, α i) ≃+ α none × ⨁ i, α (some i)

(f : Π₀ (i : Option ι), (fun i => α i) i)

DirectSum.addEquivProdDirectSum f = (f none, DFinsupp.comapDomain some ⋯ f)


theorem Dense.denseEmbedding_val [TopologicalSpace α] {s : Set α} (hs : Dense s) :
    DenseEmbedding ((↑) : s → α)

{α : Type u_1}
[TopologicalSpace α]
{s : Set α}
(hs : Dense s)


theorem Matrix.ker_mulVecLin_eq_bot_iff {M : Matrix m n R} :
    (LinearMap.ker M.mulVecLin) = ⊥ ↔ ∀ v, M *ᵥ v = 0 → v = 0

{R : Type u_1}
[CommSemiring R]
{m : Type u_4}
{n : Type u_5}
[Fintype n]
{M : Matrix m n R}

LinearMap.ker M.mulVecLin = ⊥ ↔ ∀ (v : n → R), M *ᵥ v = 0 → v = 0


@[simp]
theorem fold_union_empty_singleton [DecidableEq α] (s : Finset α) :
    Finset.fold (· ∪ ·) ∅ singleton s = s

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

Finset.fold (fun x x_1 => x ∪ x_1) ∅ singleton s = s


theorem HasDerivWithinAt.div (hc : HasDerivWithinAt c c' s x) (hd : HasDerivWithinAt d d' s x)
    (hx : d x ≠ 0) :
    HasDerivWithinAt (fun y => c y / d y) ((c' * d x - c x * d') / d x ^ 2) s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{c d : 𝕜 → 𝕜'}
{c' d' : 𝕜'}
(hc : HasDerivWithinAt c c' s x)
(hd : HasDerivWithinAt d d' s x)
(hx : d x ≠ 0)


theorem derivWithin_csin (hf : DifferentiableWithinAt ℂ f s x) (hxs : UniqueDiffWithinAt ℂ s x) :
    derivWithin (fun x => Complex.sin (f x)) s x = Complex.cos (f x) * derivWithin f s x

{f : ℂ → ℂ}
{x : ℂ}
{s : Set ℂ}
(hf : DifferentiableWithinAt ℂ f s x)
(hxs : UniqueDiffWithinAt ℂ s x)


@[to_additive]
theorem mul_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [MulOneClass G]
    [ContinuousMul G] {g h : G} (hg : g ∈ connectedComponent (1 : G))
    (hh : h ∈ connectedComponent (1 : G)) : g * h ∈ connectedComponent (1 : G)

{G : Type u_1}
[TopologicalSpace G]
[MulOneClass G]
[ContinuousMul G]
{g h : G}
(hg : g ∈ connectedComponent 1)
(hh : h ∈ connectedComponent 1)


theorem mem_convexJoin : x ∈ convexJoin 𝕜 s t ↔ ∃ a ∈ s, ∃ b ∈ t, x ∈ segment 𝕜 a b

{𝕜 : Type u_2}
{E : Type u_3}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s t : Set E}
{x : E}


lemma one_def : 1 = tprod R (1 : Π i, A i)

{ι : Type u_1}
{R : Type u_3}
{A : ι → Type u_4}
[CommSemiring R]
[(i : ι) → AddCommMonoidWithOne (A i)]
[(i : ι) → Module R (A i)]


@[simp, nolint simpNF]
theorem MonoidalClosed.linearHomEquivComm_hom (f : A ⊗ B ⟶ C) :
    (MonoidalClosed.linearHomEquivComm A B C f).hom = TensorProduct.curry f.hom

(f : CategoryTheory.MonoidalCategory.tensorObj A B ⟶ C)

((Rep.MonoidalClosed.linearHomEquivComm A B C) f).hom = TensorProduct.curry f.hom


/-- The natural transformation from the composition of restriction and extension of scalars to the
identity functor on `S`-module.
-/
@[simps app]
def counit : restrictScalars.{max v u₂,u₁,u₂} f ⋙ extendScalars f ⟶ 𝟭 (ModuleCat S)

{R : Type u₁}
{S : Type u₂}
[CommRing R]
[CommRing S]
(f : R →+* S)

∀ (x : ModuleCat S),
  (ModuleCat.ExtendRestrictScalarsAdj.counit f).app x = ModuleCat.ExtendRestrictScalarsAdj.Counit.map f


/-- A monoid homomorphism `f : M →* N` with a left-inverse `g : N → M` defines a multiplicative
equivalence between `M` and `f.mrange`.
This is a bidirectional version of `MonoidHom.mrange_restrict`. -/
@[to_additive (attr := simps (config := { simpRhs := true }))
      "An additive monoid homomorphism `f : M →+ N` with a left-inverse `g : N → M`
      defines an additive equivalence between `M` and `f.mrange`.
      This is a bidirectional version of `AddMonoidHom.mrange_restrict`. "]
def ofLeftInverse' (f : M →* N) {g : N → M} (h : Function.LeftInverse g f) :
    M ≃* MonoidHom.mrange f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
{g : N → M}
(h : Function.LeftInverse g ⇑f)
(a : M)

(AddEquiv.ofLeftInverse' f h) a = f.mrangeRestrict a


theorem arctan_eq_arcsin (x : ℝ) : arctan x = arcsin (x / √(1 + x ^ 2))

Real.arctan x = Real.arcsin (x / √(1 + x ^ 2))


@[to_additive (attr := simp)]
theorem toEquiv_symm (f : M ≃* N) : (f.symm : N ≃ M) = (f : M ≃ N).symm

{M : Type u_6}
{N : Type u_7}
[Add M]
[Add N]
(f : M ≃+ N)


lemma Surjective.of_comp [Surjective (f ≫ g)] : Surjective g

{X Y Z : AlgebraicGeometry.Scheme}
(f : X ⟶ Y)
(g : Y ⟶ Z)
[AlgebraicGeometry.Surjective (f ≫ g)]


theorem support_of_subset [∀ (i : ι) (x : β i), Decidable (x ≠ 0)] {i : ι} {b : β i} :
    (of _ i b).support ⊆ {i}

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

DFinsupp.support ((DirectSum.of β i) b) ⊆ {i}


theorem StrictConvexOn.add_const {γ : Type*} {f : E → γ} [OrderedCancelAddCommMonoid γ]
    [Module 𝕜 γ] (hf : StrictConvexOn 𝕜 s f) (b : γ) : StrictConvexOn 𝕜 s (f + fun _ => b)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
{s : Set E}
{γ : Type u_7}
{f : E → γ}
[OrderedCancelAddCommMonoid γ]
[Module 𝕜 γ]
(hf : StrictConvexOn 𝕜 s f)
(b : γ)


/-- The inverse associator functor `C × (D × E) ⥤ (C × D) × E `.
-/
@[simps]
def inverseAssociator : C × D × E ⥤ (C × D) × E

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

(CategoryTheory.prod.inverseAssociator C D E).obj X = ((X.1, X.2.1), X.2.2)


@[simp]
theorem compl_eq_bot : xᶜ = ⊥ ↔ x = ⊤

xᶜ = ⊥ ↔ x = ⊤


theorem ae_withDensity_iff_ae_restrict {p : α → Prop} {f : α → ℝ≥0∞} (hf : Measurable f) :
    (∀ᵐ x ∂μ.withDensity f, p x) ↔ ∀ᵐ x ∂μ.restrict { x | f x ≠ 0 }, p x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : α → Prop}
{f : α → ℝ≥0∞}
(hf : Measurable f)

(∀ᵐ (x : α) ∂μ.withDensity f, p x) ↔ ∀ᵐ (x : α) ∂μ.restrict {x | f x ≠ 0}, p x


@[to_additive (attr := gcongr) sub_lt_sub_left]
theorem div_lt_div_left' (h : a < b) (c : α) : c / b < c / a

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

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


/-- `Fin.addNat` as an `Embedding`, `addNatEmb m i` adds `m` to `i`, generalizes `Fin.succ`. -/
@[simps! apply]
def addNatEmb (m) : Fin n ↪ Fin (n + m)

∀ (x : Fin n), (Fin.addNatEmb m) x = x.addNat m


@[to_additive]
theorem pairwiseDisjoint_smul_iff :
    s.PairwiseDisjoint (· • t) ↔ (s ×ˢ t).InjOn fun p ↦ p.1 * p.2

{α : Type u_2}
[Add α]
[IsLeftCancelAdd α]
{s t : Set α}

(s.PairwiseDisjoint fun x => x +ᵥ t) ↔ Set.InjOn (fun p => p.1 + p.2) (s ×ˢ t)


@[simp] theorem rev_zero (n : Nat) : rev 0 = last n


protected lemma isNilpotent_mul_right_iff (h_comm : Commute x y) (hx : x ∈ nonZeroDivisorsRight R) :
    IsNilpotent (x * y) ↔ IsNilpotent y

{R : Type u_1}
{x y : R}
[Semiring R]
(h_comm : Commute x y)
(hx : x ∈ nonZeroDivisorsRight R)


@[simp]
theorem map_update_zero [DecidableEq ι] (m : ι → M) (i : ι) : f (update m i 0) = 0

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{ι : Type u_7}
(f : M [⋀^ι]→ₗ[R] N)
[DecidableEq ι]
(m : ι → M)
(i : ι)


theorem Function.Injective.sigma_map_iff {f₁ : α₁ → α₂} {f₂ : ∀ a, β₁ a → β₂ (f₁ a)}
    (h₁ : Injective f₁) : Injective (Sigma.map f₁ f₂) ↔ ∀ a, Injective (f₂ a)

{α₁ : Type u_2}
{α₂ : Type u_3}
{β₁ : α₁ → Type u_5}
{β₂ : α₂ → Type u_6}
{f₁ : α₁ → α₂}
{f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)}
(h₁ : Function.Injective f₁)

Function.Injective (Sigma.map f₁ f₂) ↔ ∀ (a : α₁), Function.Injective (f₂ a)


@[simp] theorem prodRight_tmul (m₁ : M₁) (m₂ : M₂) (m₃ : M₃) :
    prodRight R M₁ M₂ M₃ (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₃) (m₁ ⊗ₜ[R] (m₂, m₃)) = (m₁ ⊗ₜ[R] m₂, m₁ ⊗ₜ[R] m₃)


/-- The duality equivalence `WalkingCospanᵒᵖ ≌ WalkingSpan` -/
@[simps!]
def walkingCospanOpEquiv : WalkingCospanᵒᵖ ≌ WalkingSpan

(X : (CategoryTheory.Limits.WidePullbackShape CategoryTheory.Limits.WalkingPair)ᵒᵖ)

CategoryTheory.Limits.walkingCospanOpEquiv.unitIso.inv.app X = 𝟙 X


theorem convexBodySumFun_apply (x : E K) :
    convexBodySumFun x = ∑ w,  mult w * normAtPlace w x

(x : ({ w // w.IsReal } → ℝ) × ({ w // w.IsComplex } → ℂ))

NumberField.mixedEmbedding.convexBodySumFun x =
  ∑ w : NumberField.InfinitePlace K, ↑w.mult * (NumberField.mixedEmbedding.normAtPlace w) x


theorem isLocalization_iff_of_algEquiv [Algebra R P] (h : S ≃ₐ[R] P) :
    IsLocalization M S ↔ IsLocalization M P

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[Algebra R P]
(h : S ≃ₐ[R] P)


/-- Let `G` be a Type with addition.  `UniqueSums G` asserts that any two non-empty
finite subsets of `G` have the `UniqueAdd` property, with respect to some element of their
sum `A + B`. -/
class UniqueSums (G) [Add G] : Prop where
/-- For `A B` two nonempty finite sets, there always exist `a0 ∈ A, b0 ∈ B` such that
`UniqueAdd A B a0 b0` -/
  uniqueAdd_of_nonempty :
    ∀ {A B : Finset G}, A.Nonempty → B.Nonempty → ∃ a0 ∈ A, ∃ b0 ∈ B, UniqueAdd A B a0 b0

{G : Type u_1}
[Add G]
[self : UniqueSums G]
{A B : Finset G}


lemma cPolynomialAt : CPolynomialAt 𝕜 f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{ι : Type u_2}
{E : ι → Type u_3}
[(i : ι) → NormedAddCommGroup (E i)]
[(i : ι) → NormedSpace 𝕜 (E i)]
[Fintype ι]
(f : ContinuousMultilinearMap 𝕜 E F)
(x : (i : ι) → E i)


theorem surjOn_Ioo_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f)
    (a b : α) : SurjOn f (Ioo a b) (Ioo (f a) (f b))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[PartialOrder β]
{f : α → β}
(h_mono : Monotone f)
(h_surj : Function.Surjective f)
(a b : α)

Set.SurjOn f (Set.Ioo a b) (Set.Ioo (f a) (f b))


theorem coe_ringEquiv_lpBCF (f : lp (fun _ : α ↦ R) ∞) : (RingEquiv.lpBCF R f : α → R) = f

{α : Type u_1}
{R : Type u_3}
[TopologicalSpace α]
[DiscreteTopology α]
[NonUnitalNormedRing R]
(f : ↥(lp (fun x => R) ⊤))


@[simp]
theorem iteratedFDeriv_zero_apply (m : Fin 0 → E) :
    (iteratedFDeriv 𝕜 0 f x : (Fin 0 → E) → F) m = f x

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


/-- **Nakayama's Lemma** - Statement (2) in
[Stacks 00DV](https://stacks.math.columbia.edu/tag/00DV).
See also `eq_smul_of_le_smul_of_le_jacobson` for a generalisation
to the `jacobson` of any ideal -/
theorem eq_bot_of_le_smul_of_le_jacobson_bot (I : Ideal R) (N : Submodule R M) (hN : N.FG)
    (hIN : N ≤ I • N) (hIjac : I ≤ jacobson ⊥) : N = ⊥

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(I : Ideal R)
(N : Submodule R M)
(hN : N.FG)
(hIN : N ≤ I • N)
(hIjac : I ≤ ⊥.jacobson)


theorem domain_mono : StrictMono (@domain R _ E _ _ F _ _)

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]


@[to_additive (attr := simp)]
theorem mulDysonETransform_idem :
    mulDysonETransform e (mulDysonETransform e x) = mulDysonETransform e x

{α : Type u_1}
[DecidableEq α]
[AddCommGroup α]
(e : α)
(x : Finset α × Finset α)

Finset.addDysonETransform e (Finset.addDysonETransform e x) = Finset.addDysonETransform e x


@[simp]
theorem integral_smul (c : ℝ) : integral I l (fun x => c • f x) vol = c • integral I l f vol

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{f : (ι → ℝ) → E}
{vol : ι →ᵇᵃ[⊤] E →L[ℝ] F}
(c : ℝ)

BoxIntegral.integral I l (fun x => c • f x) vol = c • BoxIntegral.integral I l f vol


theorem birkhoffSum_succ' (f : α → α) (g : α → M) (n : ℕ) (x : α) :
    birkhoffSum f g (n + 1) x = g x + birkhoffSum f g n (f x)

{α : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
(f : α → α)
(g : α → M)
(n : ℕ)
(x : α)


@[simp]
theorem IsSplitCoequalizer.asCofork_π {Z : C} {h : Y ⟶ Z} (t : IsSplitCoequalizer f g h) :
    t.asCofork.π = h

(t : CategoryTheory.IsSplitCoequalizer f g h)


protected theorem dist_triangle (x y z : Σi, E i) : dist x z ≤ dist x y + dist y z

{ι : Type u_1}
{E : ι → Type u_2}
[(i : ι) → MetricSpace (E i)]
(x y z : (i : ι) × E i)


lemma cfcₙ_comp_const_mul (r : R) (f : R → R) (a : A)
    (hf : ContinuousOn f ((r * ·) '' (σₙ R a)) := by cfc_cont_tac)
    (hf0 : f 0 = 0 := by cfc_zero_tac) (ha : p a := by cfc_tac) :
    cfcₙ (f <| r * ·) a = cfcₙ f (r • a)

(hf : ContinuousOn f ((fun x => r * x) '' σₙ R a) := by cfc_cont_tac)

cfcₙ (fun x => f (r * x)) a = cfcₙ f (r • a)


lemma baseChange_Ψ (n : ℤ) : (W.baseChange B).Ψ n = ((W.baseChange A).Ψ n).map (mapRingHom f)

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)
(n : ℤ)

(W.baseChange B).Ψ n = Polynomial.map (Polynomial.mapRingHom ↑f) ((W.baseChange A).Ψ n)


/-- A function `f` from `Finset α` is monotone if and only if `f s ≤ f (cons a s ha)` for all `s`
and `a ∉ s`. -/
lemma monotone_iff_forall_le_cons : Monotone f ↔ ∀ s, ∀ ⦃a⦄ (ha), f s ≤ f (cons a s ha)

{α : Type u_1}
{β : Type u_2}
[Preorder β]
{f : Finset α → β}

Monotone f ↔ ∀ (s : Finset α) ⦃a : α⦄ (ha : a ∉ s), f s ≤ f (Finset.cons a s ha)


theorem of_lex (w : Prod.Lex r s p q) : r p.fst q.fst ∨ p.fst = q.fst ∧ s p.snd q.snd

∀ {α : Type u_1} {r : α → α → Prop} {β : Type u_2} {s : β → β → Prop} {p q : α × β},
  Prod.Lex r s p q → r p.fst q.fst ∨ p.fst = q.fst ∧ s p.snd q.snd


@[to_additive]
theorem hausdorffMeasure_smul {α : Type*} [SMul α X] [IsometricSMul α X] {d : ℝ} (c : α)
    (h : 0 ≤ d ∨ Surjective (c • · : X → X)) (s : Set X) : μH[d] (c • s) = μH[d] s

(h : 0 ≤ d ∨ Function.Surjective fun x => c • x)


/-- makes a `RingHom` from the bijective inverse of a `RingHom` -/
@[simps] def RingHom.inverse [NonAssocSemiring R] [NonAssocSemiring S]
    (f : RingHom R S) (g : S → R)
    (h₁ : Function.LeftInverse g f) (h₂ : Function.RightInverse g f) : S →+* R

{R : Type u_4}
{S : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R →+* S)
(g : S → R)
(h₁ : Function.LeftInverse g ⇑f)
(h₂ : Function.RightInverse g ⇑f)


@[to_additive]
theorem lift_comp_lift_eq {Q : Type*} [CommMonoid Q] (k : LocalizationMap S Q)
    {A : Type*} [CommMonoid A] {l : M →* A} (hl : ∀ w : S, IsUnit (l w)) :
    (k.lift hl).comp (f.lift k.map_units) = f.lift hl

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
{Q : Type u_4}
[CommMonoid Q]
(k : S.LocalizationMap Q)
{A : Type u_5}
[CommMonoid A]
{l : M →* A}
(hl : ∀ (w : ↥S), IsUnit (l ↑w))


@[simp] theorem unzip_cons {h : α × β} :
    (h :: t).unzip = match unzip t with | (al, bl) => (h.1::al, h.2::bl)

{α : Type u}
{β : Type v}
{t : List (α × β)}
{h : α × β}

(h :: t).unzip =
  match t.unzip with
  | { fst := al, snd := bl } => { fst := h.fst :: al, snd := h.snd :: bl }


/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x)

(hf_sum : Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := Set.uIcc a b, isCompact' := ⋯ }) (f i)‖)

HasSum (fun i => ∫ (x : ℝ) in a..b, (f i) x) (∫ (x : ℝ) in a..b, ∑' (i : ι), (f i) x)


theorem Set.restrictPreimage_closedEmbedding (s : Set β) (h : ClosedEmbedding f) :
    ClosedEmbedding (s.restrictPreimage f)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{f : α → β}
(s : Set β)
(h : ClosedEmbedding f)


theorem omegaLimit_iInter (p : ι → Set α) : ω f ϕ (⋂ i, p i) ⊆ ⋂ i, ω f ϕ (p i)

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
{ι : Type u_4}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(p : ι → Set α)

omegaLimit f ϕ (⋂ i, p i) ⊆ ⋂ i, omegaLimit f ϕ (p i)


theorem disjoint_image_image {f : β → α} {g : γ → α} {s : Set β} {t : Set γ}
    (h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c) : Disjoint (f '' s) (g '' t)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : β → α}
{g : γ → α}
{s : Set β}
{t : Set γ}
(h : ∀ b ∈ s, ∀ c ∈ t, f b ≠ g c)


@[to_additive (attr := measurability)]
theorem _root_.Multiset.stronglyMeasurable_prod (s : Multiset (α → M))
    (hs : ∀ f ∈ s, StronglyMeasurable f) :
    StronglyMeasurable fun x => (s.map fun f : α → M => f x).prod

(hs : ∀ f ∈ s, MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable fun x => (Multiset.map (fun f => f x) s).prod


theorem explicitCokernelπ_surjective {X Y : SemiNormedGrp.{u}} {f : X ⟶ Y} :
    Function.Surjective (explicitCokernelπ f)


theorem integral_finset_sum_measure {ι} {m : MeasurableSpace α} {f : α → G} {μ : ι → Measure α}
    {s : Finset ι} (hf : ∀ i ∈ s, Integrable f (μ i)) :
    ∫ a, f a ∂(∑ i ∈ s, μ i) = ∑ i ∈ s, ∫ a, f a ∂μ i

(hf : ∀ i ∈ s, MeasureTheory.Integrable f (μ i))

∫ (a : α), f a ∂∑ i ∈ s, μ i = ∑ i ∈ s, ∫ (a : α), f a ∂μ i


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

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


/-- A surjective ring homomorphism `R →+* S` induces a surjective homomorphism `R_{f⁻¹(P)} →+* S_P`
for every prime ideal `P` of `S`. -/
theorem surjective_localRingHom_of_surjective (h : Function.Surjective f) (P : Ideal S)
    [P.IsPrime] : Function.Surjective (Localization.localRingHom (P.comap f) P f rfl)

{R S : Type u}
[CommRing R]
[CommRing S]
(f : R →+* S)
(h : Function.Surjective ⇑f)
(P : Ideal S)
[P.IsPrime]

Function.Surjective ⇑(Localization.localRingHom (Ideal.comap f P) P f ⋯)


theorem sum_def {A} [AddCommMonoid A] {p : MvPolynomial σ R} {b : (σ →₀ ℕ) → R → A} :
    p.sum b = ∑ m ∈ p.support, b m (p.coeff m)

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{A : Type u_2}
[AddCommMonoid A]
{p : MvPolynomial σ R}
{b : (σ →₀ ℕ) → R → A}

Finsupp.sum p b = ∑ m ∈ p.support, b m (MvPolynomial.coeff m p)


/-- Given a surjective `CommMonoid` homomorphism `g : M →* P`, and a submonoid `S ⊆ M`,
the induced monoid homomorphism from the localization of `M` at `S` to the
localization of `P` at `g S`, is surjective.
-/
@[to_additive "Given a surjective `AddCommMonoid` homomorphism `g : M →+ P`, and a
submonoid `S ⊆ M`, the induced monoid homomorphism from the localization of `M` at `S`
to the localization of `P` at `g S`, is surjective. "]
theorem map_surjective_of_surjective (hg : Surjective g) (k : LocalizationMap (S.map g) Q) :
    Surjective (map f (apply_coe_mem_map g S) k)

(k : (AddSubmonoid.map g S).LocalizationMap Q)


/-- This is basically just `yoneda : Over A ⥤ (Over A)ᵒᵖ ⥤ Type (max u v)` restricted in the second
    argument along the forgetful functor `CostructuredArrow yoneda A ⥤ Over A`, but done in a way
    that we land in a smaller universe.

    This is one direction of the equivalence we're constructing. -/
@[simps]
def restrictedYoneda (A : Cᵒᵖ ⥤ Type v) : Over A ⥤ (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v

(A : CategoryTheory.Functor Cᵒᵖ (Type v))

(CategoryTheory.OverPresheafAux.restrictedYoneda A).obj η = CategoryTheory.OverPresheafAux.restrictedYonedaObj η.hom


theorem Associated.gcd_eq_right [NormalizedGCDMonoid α] {m n : α} (h : Associated m n) (k : α) :
    gcd k m = gcd k n

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{m n : α}
(h : Associated m n)
(k : α)


@[simp]
theorem coe_restrictScalars (f : M [⋀^ι]→L[A] N) : ⇑(f.restrictScalars R) = f

(R : Type u_1)
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
{A : Type u_7}
[Semiring A]
[SMul R A]
[Module A M]
[Module A N]
[IsScalarTower R A M]
[IsScalarTower R A N]
(f : M [⋀^ι]→L[A] N)

⇑(ContinuousAlternatingMap.restrictScalars R f) = ⇑f


theorem Coe.algHom_apply (x : R_hat R K) (v : HeightOneSpectrum R) : (Coe.algHom R K) x v = x v

(x : DedekindDomain.FiniteIntegralAdeles R K)

(v : IsDedekindDomain.HeightOneSpectrum R)

(DedekindDomain.FiniteIntegralAdeles.Coe.algHom R K) x v = ↑(x v)


theorem weightedHomogeneousComponent_of_isWeightedHomogeneous_ne
    {m n : M} {p : MvPolynomial σ R} (hp : IsWeightedHomogeneous w p m) (hn : n ≠ m) :
    weightedHomogeneousComponent w n p = 0

(hp : MvPolynomial.IsWeightedHomogeneous w p m)

(MvPolynomial.weightedHomogeneousComponent w n) p = 0


theorem birkhoffAverage_congr_ring (S : Type*) [DivisionSemiring S] [Module S M]
    (f : α → α) (g : α → M) (n : ℕ) (x : α) :
    birkhoffAverage R f g n x = birkhoffAverage S f g n x

(R : Type u_1)
{α : Type u_2}
{M : Type u_3}
[DivisionSemiring R]
[AddCommMonoid M]
[Module R M]
(S : Type u_4)
[DivisionSemiring S]
[Module S M]
(f : α → α)
(g : α → M)
(n : ℕ)
(x : α)


lemma hasRightHomology_iff_unop (S : ShortComplex Cᵒᵖ) :
    S.HasRightHomology ↔ S.unop.HasLeftHomology


theorem fg_bot : (⊥ : L.Substructure M).FG

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]


@[simp, norm_cast] lemma coe_mk (h_sup h_inf) : mk s h_sup h_inf = s

{α : Type u_2}
[Lattice α]
{s : Set α}
(h_sup : SupClosed s)
(h_inf : InfClosed s)

↑{ carrier := s, supClosed' := h_sup, infClosed' := h_inf } = s


/-- Given left homology map data for morphisms `φ` and `φ'`, this is
the induced left homology map data for `φ + φ'`. -/
@[simps]
def add : LeftHomologyMapData (φ + φ') h₁ h₂

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

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


theorem some_ne_none (x : α) : some x ≠ none


@[aesop safe apply (rule_sets := [finsetNonempty])]
theorem powerset_nonempty (s : Finset α) : s.powerset.Nonempty


@[simp]
theorem closure_univ : closure (Set.univ : Set R) = ⊤


@[to_additive]
theorem ker_apply {f : M →* P} {x y} : ker f x y ↔ f x = f y

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
{f : M →+ P}
{x y : M}


theorem and_symm_right {α : Sort*} (a b : α) (p : Prop) : p ∧ a = b ↔ p ∧ b = a


/-- Any surjective endomorphism of a Noetherian module is injective. -/
theorem IsNoetherian.injective_of_surjective_endomorphism (f : M →ₗ[R] M)
    (s : Surjective f) : Injective f

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
[IsNoetherian R M]
(f : M →ₗ[R] M)
(s : Function.Surjective ⇑f)


/-- An implication of predicates `P → P'` induces a braided functor between full braided
subcategories. -/
@[simps!]
def fullBraidedSubcategory.map (h : ∀ ⦃X⦄, P X → P' X) :
    BraidedFunctor (FullSubcategory P) (FullSubcategory P')

(CategoryTheory.MonoidalCategory.fullBraidedSubcategory.map h).ε =
  CategoryTheory.CategoryStruct.id (𝟙_ (CategoryTheory.FullSubcategory P'))


@[to_additive]
theorem mem_center_iff {z : G} : z ∈ center G ↔ ∀ g, g * z = z * g

z ∈ AddSubgroup.center G ↔ ∀ (g : G), g + z = z + g


theorem deleteEdges_le : G'.deleteEdges s ≤ G'

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}
(s : Set (Sym2 V))


theorem ContinuousWithinAt.nhdsWithin_extChartAt_symm_preimage_inter_range
    {f : M → M'} {x : M} (hc : ContinuousWithinAt f s x) :
    𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] (extChartAt I x x) =
      𝓝[(extChartAt I x).target ∩
        (extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source)] (extChartAt I x x)

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

𝓝[↑(extChartAt I x).symm ⁻¹' s ∩ Set.range ↑I] ↑(extChartAt I x) x =
  𝓝[(extChartAt I x).target ∩ ↑(extChartAt I x).symm ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source)] ↑(extChartAt I x) x


@[simp]
theorem isLimitEquivSections_symm_apply {c : Cone F} (t : IsLimit c)
    (x : F.sections) (j : J) :
    c.π.app j ((isLimitEquivSections t).symm x) = (x : ∀ j, F.obj j) j

{J : Type v}
[CategoryTheory.Category.{w, v} J]
{F : J ⥤ Type u}
{c : CategoryTheory.Limits.Cone F}
(t : CategoryTheory.Limits.IsLimit c)
(x : ↑F.sections)
(j : J)

c.π.app j ((CategoryTheory.Limits.Types.isLimitEquivSections t).symm x) = ↑x j


theorem IsPath.of_append_left {u v w : V} {p : G.Walk u v} {q : G.Walk v w} :
    (p.append q).IsPath → p.IsPath

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
{p : G.Walk u v}
{q : G.Walk v w}


theorem indep_iSup_of_directed_le
    [IsProbabilityMeasure μ] (h_indep : ∀ i, Indep (m i) m1 μ)
    (h_le : ∀ i, m i ≤ _mΩ) (h_le' : m1 ≤ _mΩ) (hm : Directed (· ≤ ·) m) :
    Indep (⨆ i, m i) m1 μ

(h_indep : ∀ (i : ι), ProbabilityTheory.Indep (m i) m1 μ)

(hm : Directed (fun x x_1 => x ≤ x_1) m)


@[simp]
theorem length_finRange (n : ℕ) : (finRange n).length = n


/-- If sets `s i` are finite for all `i` from a finite set `t` and are empty for `i ∉ t`, then the
union `⋃ i, s i` is a finite set. -/
theorem Finite.iUnion {ι : Type*} {s : ι → Set α} {t : Set ι} (ht : t.Finite)
    (hs : ∀ i ∈ t, (s i).Finite) (he : ∀ i, i ∉ t → s i = ∅) : (⋃ i, s i).Finite

{α : Type u}
{ι : Type u_1}
{s : ι → Set α}
{t : Set ι}
(ht : t.Finite)
(hs : ∀ i ∈ t, (s i).Finite)
(he : ∀ i ∉ t, s i = ∅)


/-- If a direct product has finite order then so does each component. -/
@[to_additive "If a direct product has finite additive order then so does each component."]
theorem IsOfFinOrder.apply {η : Type*} {Gs : η → Type*} [∀ i, Monoid (Gs i)] {x : ∀ i, Gs i}
    (h : IsOfFinOrder x) : ∀ i, IsOfFinOrder (x i)

{η : Type u_6}
{Gs : η → Type u_7}
[(i : η) → AddMonoid (Gs i)]
{x : (i : η) → Gs i}
(h : IsOfFinAddOrder x)
(i : η)


theorem HasOrthogonalRows.hasOrthogonalCols [Fintype m] (h : Aᵀ.HasOrthogonalRows) :
    A.HasOrthogonalCols

{α : Type u_1}
{n : Type u_2}
{m : Type u_3}
[Mul α]
[AddCommMonoid α]
{A : Matrix m n α}
[Fintype m]
(h : A.transpose.HasOrthogonalRows)


@[simp] theorem ofIso_symm (e : Q₁.IsometryEquiv Q₂) : ofIso e.symm = (ofIso e).symm

{R : Type u}
[CommRing R]
{X Y : Type v}
[AddCommGroup X]
[Module R X]
[AddCommGroup Y]
[Module R Y]
{Q₁ : QuadraticForm R X}
{Q₂ : QuadraticForm R Y}
(e : QuadraticMap.IsometryEquiv Q₁ Q₂)

QuadraticModuleCat.ofIso e.symm = (QuadraticModuleCat.ofIso e).symm


theorem eval_apply {β : α → Sort*} (x : α) (f : ∀ x, β x) : eval x f = f x

{α : Sort u_1}
{β : α → Sort u_4}
(x : α)
(f : (x : α) → β x)


@[nolint simpNF, simp, norm_cast] theorem coe_natCast (n : ℕ) : (n : A 0) = (n : R)

{ι : Type u_1}
{σ : Type u_2}
{R : Type u_4}
[Semiring R]
[AddMonoid ι]
[SetLike σ R]
[AddSubmonoidClass σ R]
(A : ι → σ)
[SetLike.GradedMonoid A]
(n : ℕ)


protected lemma BddAbove.isBounded (hs₀ : BddAbove s) (hs₁ : BddBelow s) : IsBounded s

{α : Type u_1}
[Bornology α]
{s : Set α}
[Preorder α]
[IsOrderBornology α]
(hs₀ : BddAbove s)
(hs₁ : BddBelow s)


theorem coeff_hermite_succ_zero (n : ℕ) : coeff (hermite (n + 1)) 0 = -coeff (hermite n) 1

(Polynomial.hermite (n + 1)).coeff 0 = -(Polynomial.hermite n).coeff 1


lemma isZero₂_iff : IsZero T.obj₂ ↔ (T.mor₁ = 0 ∧ T.mor₂ = 0)

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.Limits.IsZero T.obj₂ ↔ T.mor₁ = 0 ∧ T.mor₂ = 0


theorem rec_subsingleton {p : Prop} [h : Decidable p] {h₁ : p → Sort u} {h₂ : ¬p → Sort u}
    [h₃ : ∀ h : p, Subsingleton (h₁ h)] [h₄ : ∀ h : ¬p, Subsingleton (h₂ h)] :
    Subsingleton (Decidable.recOn h h₂ h₁)

{p : Prop}
[h : Decidable p]
{h₁ : p → Sort u}
{h₂ : ¬p → Sort u}
[h₃ : ∀ (h : p), Subsingleton (h₁ h)]
[h₄ : ∀ (h : ¬p), Subsingleton (h₂ h)]


theorem turnBound_of_left {s t : S} (m : t ∈ l s) (n : ℕ) (h : turnBound s ≤ n + 1) :
    turnBound t ≤ n

(h : SetTheory.PGame.State.turnBound s ≤ n + 1)


@[simp]
theorem toSubgroup_neg_one : toSubgroup A B (-1) = B

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


@[simp]
theorem Ioo_eq_zero_iff [DenselyOrdered α] : Ioo a b = 0 ↔ ¬a < b

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


theorem HasStrictDerivAt.complexToReal_fderiv {f : ℂ → ℂ} {f' x : ℂ} (h : HasStrictDerivAt f f' x) :
    HasStrictFDerivAt f (f' • (1 : ℂ →L[ℝ] ℂ)) x


/-- Let `K` be the fraction field of an integrally closed domain `R` and let `L` be a finite
separable extension of `K`. Let `B : PowerBasis K L` be such that `IsIntegral R B.gen`.
Then for all, `z : L` that are integral over `R`, we have
`(discr K B.basis) • z ∈ adjoin R ({B.gen} : Set L)`. -/
theorem discr_mul_isIntegral_mem_adjoin [Algebra.IsSeparable K L] [IsIntegrallyClosed R]
    [IsFractionRing R K] {B : PowerBasis K L} (hint : IsIntegral R B.gen) {z : L}
    (hz : IsIntegral R z) : discr K B.basis • z ∈ adjoin R ({B.gen} : Set L)

(K : Type u)
{L : Type v}
[Field K]
[Field L]
[Algebra K L]
[Module.Finite K L]
{R : Type z}
[CommRing R]
[Algebra R K]
[Algebra R L]
[IsScalarTower R K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed R]
[IsFractionRing R K]
{B : PowerBasis K L}
(hint : IsIntegral R B.gen)
{z : L}
(hz : IsIntegral R z)

Algebra.discr K ⇑B.basis • z ∈ Algebra.adjoin R {B.gen}


theorem map_fst' (f : α → γ) (g : β → δ) : Prod.fst ∘ map f g = f ∘ Prod.fst

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


theorem recSubsingleton
     {p : Prop} [h : Decidable p]
     {h₁ : p → Sort u}
     {h₂ : ¬p → Sort u}
     [h₃ : ∀ (h : p), Subsingleton (h₁ h)]
     [h₄ : ∀ (h : ¬p), Subsingleton (h₂ h)]
     : Subsingleton (h.casesOn h₂ h₁)

Subsingleton (Decidable.casesOn h h₂ h₁)


theorem IsClique.card_le_of_coloring {s : Finset V} (h : G.IsClique s) [Fintype α]
    (C : G.Coloring α) : s.card ≤ Fintype.card α

{V : Type u}
{G : SimpleGraph V}
{α : Type u_1}
{s : Finset V}
(h : G.IsClique ↑s)
[Fintype α]
(C : G.Coloring α)


theorem smul_Ici : r • Ici a = Ici (r • a)

{K : Type u_2}
[LinearOrderedField K]
{a r : K}
(hr : 0 < r)


/-- If `{ m_i }` is an `R`-basis of `M`, which is also `N`-linearly independent
(in this result it is stated as `Submodule.mulLeftMap` is injective),
then `M` and `N` are linearly disjoint. -/
theorem of_basis_left' {ι : Type*} (m : Basis ι R M)
    (H : Function.Injective (mulLeftMap N m)) : M.LinearDisjoint N

(H : Function.Injective ⇑(Submodule.mulLeftMap N ⇑m))


theorem biSup_inf_biSup {ι ι' : Type*} {f : ι → α} {g : ι' → α} {s : Set ι} {t : Set ι'} :
    ((⨆ i ∈ s, f i) ⊓ ⨆ j ∈ t, g j) = ⨆ p ∈ s ×ˢ t, f (p : ι × ι').1 ⊓ g p.2

{α : Type u}
[Order.Frame α]
{ι : Type u_1}
{ι' : Type u_2}
{f : ι → α}
{g : ι' → α}
{s : Set ι}
{t : Set ι'}

(⨆ i ∈ s, f i) ⊓ ⨆ j ∈ t, g j = ⨆ p ∈ s ×ˢ t, f p.1 ⊓ g p.2


/-- If you add multiples of row `B k` to other rows, the determinant doesn't change. -/
theorem det_eq_of_forall_row_eq_smul_add_const {A B : Matrix n n R} (c : n → R) (k : n)
    (hk : c k = 0) (A_eq : ∀ i j, A i j = B i j + c i * B k j) : det A = det B

(A_eq : ∀ (i j : n), A i j = B i j + c i * B k j)


theorem mk_le_mk_mul_of_mk_preimage_le {c : Cardinal} (f : α → β) (hf : ∀ b : β, #(f ⁻¹' {b}) ≤ c) :
    #α ≤ #β * c

(hf : ∀ (b : β), Cardinal.mk ↑(f ⁻¹' {b}) ≤ c)


theorem restrict_union_add_inter (s : Set α) (ht : MeasurableSet t) :
    μ.restrict (s ∪ t) + μ.restrict (s ∩ t) = μ.restrict s + μ.restrict t

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{t : Set α}
(s : Set α)
(ht : MeasurableSet t)


@[simp] lemma predAbove_succ_self (p : Fin n) : p.predAbove (succ p) = p


@[to_additive (attr := simp)]
theorem closure_univ : closure (univ : Set M) = ⊤


theorem pairwise_pwFilter [DecidableRel (α := α) R] : ∀ l : List α, Pairwise R (pwFilter R l)

{α : Type u_1}
{R : α → α → Prop}
[DecidableRel R]
(l : List α)


theorem eqOn (h : LeftInvOn f' f s) : EqOn (f' ∘ f) id s

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{f : α → β}
{f' : β → α}
(h : Set.LeftInvOn f' f s)


/-- Note that `hφ = Quotient.out_eq'` is a useful choice here. -/
@[to_additive "Note that `hφ = Quotient.out_eq'` is a useful choice here."]
theorem orbitRel.Quotient.orbit_eq_orbit_out (x : orbitRel.Quotient G α)
    {φ : orbitRel.Quotient G α → α} (hφ : letI := orbitRel G α; RightInverse φ Quotient.mk') :
    orbitRel.Quotient.orbit x = MulAction.orbit G (φ x)

{φ : MulAction.orbitRel.Quotient G α → α}

(hφ : Function.RightInverse φ Quotient.mk')


@[to_additive]
theorem le_mul_of_le_of_one_le [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (hbc : b ≤ c)
    (ha : 1 ≤ a) :
    b ≤ c * a

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


@[fun_prop]
theorem continuousOn_sin {s : Set ℂ} : ContinuousOn sin s


/-- First coefficient of the product of two power series. -/
lemma coeff_one_mul (φ ψ : R⟦X⟧) : coeff R 1 (φ * ψ) =
    coeff R 1 φ * constantCoeff R ψ + coeff R 1 ψ * constantCoeff R φ

{R : Type u_2}
[CommSemiring R]
(φ ψ : PowerSeries R)

(PowerSeries.coeff R 1) (φ * ψ) =
  (PowerSeries.coeff R 1) φ * (PowerSeries.constantCoeff R) ψ +
    (PowerSeries.coeff R 1) ψ * (PowerSeries.constantCoeff R) φ


@[to_additive (attr := simp)]
theorem mk_mul_of_mem (a : α) (hb : b ∈ s) : (mk (a * b) : α ⧸ s) = mk a

{α : Type u_1}
[AddGroup α]
{s : AddSubgroup α}
{b : α}
(a : α)
(hb : b ∈ s)


theorem WSameSide.not_sOppSide {s : AffineSubspace R P} {x y : P} (h : s.WSameSide x y) :
    ¬s.SOppSide x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[LinearOrderedField R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
(h : s.WSameSide x y)


@[to_additive (attr := simp)]
theorem prod_ite_eq [DecidableEq α] (f : α →₀ M) (a : α) (b : α → M → N) :
    (f.prod fun x v => ite (a = x) (b x v) 1) = ite (a ∈ f.support) (b a (f a)) 1

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[CommMonoid N]
[DecidableEq α]
(f : α →₀ M)
(a : α)
(b : α → M → N)

(f.prod fun x v => if a = x then b x v else 1) = if a ∈ f.support then b a (f a) else 1


theorem lt_aleph0_iff_set_finite {S : Set α} : #S < ℵ₀ ↔ S.Finite

Cardinal.mk ↑S < Cardinal.aleph0 ↔ S.Finite


theorem pullback_snd_isIso_of_range_subset (H' : Set.range g.1.base ⊆ Set.range f.1.base) :
    IsIso (pullback.snd f g)

{X Y Z : AlgebraicGeometry.LocallyRingedSpace}

[H : AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion f]

(H' : Set.range ⇑g.val.base ⊆ Set.range ⇑f.val.base)

CategoryTheory.IsIso (CategoryTheory.Limits.pullback.snd f g)


protected theorem measurableSet_ge_of_countable_range {ι} [LinearOrder ι] {τ : Ω → ι}
    {f : Filtration ι m} (hτ : IsStoppingTime f τ) (h_countable : (Set.range τ).Countable) (i : ι) :
    MeasurableSet[f i] {ω | i ≤ τ ω}

{Ω : Type u_1}
{m : MeasurableSpace Ω}
{ι : Type u_4}
[LinearOrder ι]
{τ : Ω → ι}
{f : MeasureTheory.Filtration ι m}
(hτ : MeasureTheory.IsStoppingTime f τ)
(h_countable : (Set.range τ).Countable)
(i : ι)


@[simp]
theorem dimH_image (e : E ≃L[𝕜] F) (s : Set E) : dimH (e '' s) = dimH s

{𝕜 : Type u_4}
{E : Type u_5}
{F : Type u_6}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(e : E ≃L[𝕜] F)
(s : Set E)


@[simp]
theorem support_transfer (hp) : (p.transfer H hp).support = p.support

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
{H : SimpleGraph V}
(hp : ∀ e ∈ p.edges, e ∈ H.edgeSet)


theorem multinomial_univ_two (a b : ℕ) :
    multinomial Finset.univ ![a, b] = (a + b)! / (a ! * b !)

Nat.multinomial Finset.univ ![a, b] = (a + b)! / (a ! * b !)


@[simp]
lemma closure_closedBall : closure (closedBall x ε) = closedBall x ε

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

closure (Metric.closedBall x ε) = Metric.closedBall x ε


theorem ContinuousAt.comp_lowerSemicontinuousAt_antitone {g : γ → δ} {f : α → γ}
    (hg : ContinuousAt g (f x)) (hf : LowerSemicontinuousAt f x) (gmon : Antitone g) :
    UpperSemicontinuousAt (g ∘ f) x

{α : Type u_1}
[TopologicalSpace α]
{x : α}
{γ : Type u_3}
[LinearOrder γ]
[TopologicalSpace γ]
[OrderTopology γ]
{δ : Type u_4}
[LinearOrder δ]
[TopologicalSpace δ]
[OrderTopology δ]
{g : γ → δ}
{f : α → γ}
(hg : ContinuousAt g (f x))
(hf : LowerSemicontinuousAt f x)
(gmon : Antitone g)


theorem ext_iff : μ₁ = μ₂ ↔ ∀ s, MeasurableSet s → μ₁ s = μ₂ s

{α : Type u_1}
[MeasurableSpace α]
{μ₁ μ₂ : MeasureTheory.Measure α}

μ₁ = μ₂ ↔ ∀ (s : Set α), MeasurableSet s → μ₁ s = μ₂ s


theorem const_smul {f : ∀ i, E i} (hf : Memℓp f p) (c : 𝕜) : Memℓp (c • f) p

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{𝕜 : Type u_3}
[NormedRing 𝕜]
[(i : α) → Module 𝕜 (E i)]
[∀ (i : α), BoundedSMul 𝕜 (E i)]
{f : (i : α) → E i}
(hf : Memℓp f p)
(c : 𝕜)


theorem Inducing.continuousWithinAt_iff {f : α → β} {g : β → γ} (hg : Inducing g) {s : Set α}
    {x : α} : ContinuousWithinAt f s x ↔ ContinuousWithinAt (g ∘ f) s x

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


/-- If two affine subspaces have a point in their inf, the direction of their inf equals the inf of
their directions. -/
theorem direction_inf_of_mem_inf {s₁ s₂ : AffineSubspace k P} {p : P} (h : p ∈ s₁ ⊓ s₂) :
    (s₁ ⊓ s₂).direction = s₁.direction ⊓ s₂.direction

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{s₁ s₂ : AffineSubspace k P}
{p : P}
(h : p ∈ s₁ ⊓ s₂)


/-- The spans of two sets of points in a projective space are equal if and only if each set of
points is contained in the span of the other set. -/
theorem span_eq_span_iff {S T : Set (ℙ K V)} : span S = span T ↔ S ⊆ span T ∧ T ⊆ span S

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
{S T : Set (Projectivization K V)}

Projectivization.Subspace.span S = Projectivization.Subspace.span T ↔
  S ⊆ ↑(Projectivization.Subspace.span T) ∧ T ⊆ ↑(Projectivization.Subspace.span S)


@[simp] theorem divX_hom_toFun : divX_hom p = divX p


/-- To prove a proposition about a nonempty `s : Finset α`, it suffices to show it holds for all
singletons and that if it holds for nonempty `t : Finset α`, then it also holds for the `Finset`
obtained by inserting an element in `t`. -/
@[elab_as_elim]
theorem Nonempty.cons_induction {α : Type*} {p : ∀ s : Finset α, s.Nonempty → Prop}
    (singleton : ∀ a, p {a} (singleton_nonempty _))
    (cons : ∀ a s (h : a ∉ s) (hs), p s hs → p (Finset.cons a s h) (nonempty_cons h))
    {s : Finset α} (hs : s.Nonempty) : p s hs

{p : (s : Finset α) → s.Nonempty → Prop}

(cons : ∀ (a : α) (s : Finset α) (h : a ∉ s) (hs : s.Nonempty), p s hs → p (Finset.cons a s h) ⋯)


@[simp]
theorem refl_apply (x : L₁) : (refl : L₁ ≃ₗ⁅R⁆ L₁) x = x

{R : Type u}
{L₁ : Type v}
[CommRing R]
[LieRing L₁]
[LieAlgebra R L₁]
(x : L₁)


@[simp, norm_cast]
theorem lift_zero :
    (↑(0 : LeftInvariantDerivation I G) : Derivation 𝕜 C^∞⟮I, G; 𝕜⟯ C^∞⟮I, G; 𝕜⟯) = 0

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


/-- There exists at most one `FloorSemiring` structure on a linear ordered semiring. -/
theorem subsingleton_floorSemiring {α} [LinearOrderedSemiring α] :
    Subsingleton (FloorSemiring α)

{α : Type u_4}
[LinearOrderedSemiring α]


@[to_additive]
theorem card_dvd_exponent_pow_rank' {n : ℕ} (hG : ∀ g : G, g ^ n = 1) :
    Nat.card G ∣ n ^ Group.rank G

(G : Type u_1)
[CommGroup G]
[Group.FG G]
{n : ℕ}
(hG : ∀ (g : G), g ^ n = 1)


@[simp]
theorem aevalTower_comp_toAlgHom :
    (aevalTower g y).comp (IsScalarTower.toAlgHom S R (MvPolynomial σ R)) = g

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
{S : Type u_2}
{A : Type u_3}
[CommSemiring S]
[CommSemiring A]
[Algebra S R]
[Algebra S A]
(g : R →ₐ[S] A)
(y : σ → A)

(MvPolynomial.aevalTower g y).comp (IsScalarTower.toAlgHom S R (MvPolynomial σ R)) = g


/-- The kernel of a homomorphism to a domain is a prime ideal. -/
theorem ker_isPrime {F : Type*} [Ring R] [Ring S] [IsDomain S]
    [FunLike F R S] [RingHomClass F R S] (f : F) :
    (ker f).IsPrime

{R : Type u}
{S : Type v}
{F : Type u_1}
[Ring R]
[Ring S]
[IsDomain S]
[FunLike F R S]
[RingHomClass F R S]
(f : F)


@[to_additive (attr := simp) MeasureTheory.addFundamentalInterior_vadd]
theorem fundamentalInterior_smul [Group H] [MulAction H α] [SMulCommClass H G α] (g : H) :
    fundamentalInterior G (g • s) = g • fundamentalInterior G s

(G : Type u_1)
{H : Type u_2}
{α : Type u_3}
[Group G]
[MulAction G α]
(s : Set α)
[Group H]
[MulAction H α]
[SMulCommClass H G α]
(g : H)

MeasureTheory.fundamentalInterior G (g • s) = g • MeasureTheory.fundamentalInterior G s


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


theorem le_coe_iff : ∀ {x : WithBot α}, x ≤ b ↔ ∀ a : α, x = ↑a → a ≤ b

{α : Type u_1}
{b : α}
[LE α]
{x : WithBot α}


theorem fact_iff {p : Prop} : Fact p ↔ p


lemma div_ratCast (z : ℂ) (x : ℚ) : z / x = ⟨z.re / x, z.im / x⟩

z / ↑x = { re := z.re / ↑x, im := z.im / ↑x }


theorem small_type : Small.{max (u + 1) v} (Type u)


@[to_additive (attr := simp)]
theorem coe_ne_one {a : α} : (a : WithOne α) ≠ (1 : WithOne α)


@[to_additive (attr := norm_cast, simp)]
theorem coe_finset_prod {ι M} [CommMonoid M] (S : Submonoid M) (f : ι → S) (s : Finset ι) :
    ↑(∏ i ∈ s, f i) = (∏ i ∈ s, f i : M)

{ι : Type u_4}
{M : Type u_5}
[AddCommMonoid M]
(S : AddSubmonoid M)
(f : ι → ↥S)
(s : Finset ι)


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

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


/-- If two vectors are on the same ray then they remain so after applying a linear map. -/
theorem map (f : M →ₗ[R] N) (h : SameRay R x y) : SameRay R (f x) (f y)

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
{N : Type u_3}
[AddCommMonoid N]
[Module R N]
{x y : M}
(f : M →ₗ[R] N)
(h : SameRay R x y)


theorem List.Sorted.lt_ord_of_lt [LinearOrder α] [IsWellOrder α (· < ·)] {l m : List α}
    {o : Ordinal} (hl : l.Sorted (· > ·)) (hm : m.Sorted (· > ·)) (hmltl : m < l)
    (hlt : ∀ i ∈ l, Ordinal.typein (· < ·) i < o) : ∀ i ∈ m, Ordinal.typein (· < ·) i < o

(hl : List.Sorted (fun x x_1 => x > x_1) l)

(hm : List.Sorted (fun x x_1 => x > x_1) m)

(hlt : ∀ i ∈ l, Ordinal.typein (fun x x_1 => x < x_1) i < o)

i ∈ m → Ordinal.typein (fun x x_1 => x < x_1) i < o


theorem limsSup_nhds (a : α) : limsSup (𝓝 a) = a

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
(a : α)


lemma zero_smul_subset (t : Finset β) : (0 : Finset α) • t ⊆ 0

{α : Type u_2}
{β : Type u_3}
[Zero α]
[Zero β]
[SMulWithZero α β]
[DecidableEq β]
(t : Finset β)


theorem eval_eq_sum_range {p : R[X]} (x : R) :
    p.eval x = ∑ i ∈ Finset.range (p.natDegree + 1), p.coeff i * x ^ i

{R : Type u}
[Semiring R]
{p : R[X]}
(x : R)

Polynomial.eval x p = ∑ i ∈ Finset.range (p.natDegree + 1), p.coeff i * x ^ i


theorem exists_seq_iSup_eq_top_iff_countable [CompleteLattice α] {p : α → Prop} (h : ∃ x, p x) :
    (∃ s : ℕ → α, (∀ n, p (s n)) ∧ ⨆ n, s n = ⊤) ↔
      ∃ S : Set α, S.Countable ∧ (∀ s ∈ S, p s) ∧ sSup S = ⊤

{α : Type u}
[CompleteLattice α]
{p : α → Prop}
(h : ∃ x, p x)

(∃ s, (∀ (n : ℕ), p (s n)) ∧ ⨆ n, s n = ⊤) ↔ ∃ S, S.Countable ∧ (∀ s ∈ S, p s) ∧ sSup S = ⊤


/-- `padicValRat` coincides with `padicValNat`. -/
@[norm_cast]
theorem padicValRat_of_nat (n : ℕ) : ↑(padicValNat p n) = padicValRat p n


protected theorem Filter.Tendsto.max_right {l : Filter β} {a : α} (h : Tendsto f l (𝓝 a)) :
    Tendsto (fun i => max a (f i)) l (𝓝 a)

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f : β → α}
{l : Filter β}
{a : α}
(h : Filter.Tendsto f l (𝓝 a))

Filter.Tendsto (fun i => max a (f i)) l (𝓝 a)


theorem reachable_deleteEdges_iff_exists_cycle.aux [DecidableEq V] {u v w : V}
    (hb : ∀ p : G.Walk v w, s(v, w) ∈ p.edges) (c : G.Walk u u) (hc : c.IsTrail)
    (he : s(v, w) ∈ c.edges)
    (hw : w ∈ (c.takeUntil v (c.fst_mem_support_of_mem_edges he)).support) : False

(hb : ∀ (p : G.Walk v w), s(v, w) ∈ p.edges)


@[simp]
theorem nhdsWithin_Ico_eq_nhdsWithin_Ici (h : a < b) : 𝓝[Ico a b] a = 𝓝[≥] a

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


theorem logb_rpow_eq_mul_logb_of_pos (hx : 0 < x) : logb b (x ^ y) = y * logb b x


@[to_additive Summable.prod_symm]
theorem Multipliable.prod_symm {f : β × γ → α} (hf : Multipliable f) :
    Multipliable fun p : γ × β ↦ f p.swap

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
{f : β × γ → α}
(hf : Multipliable f)


theorem Ideal.IsPrime.mem_pow_mul (I : Ideal R) [hI : I.IsPrime] {a b : R} {n : ℕ}
    (h : a * b ∈ I ^ n) : a ∈ I ^ n ∨ b ∈ I

{R : Type u_1}
[CommRing R]
[IsDedekindDomain R]
(I : Ideal R)
[hI : I.IsPrime]
{a b : R}
{n : ℕ}
(h : a * b ∈ I ^ n)


theorem bddAbove_iff_subset_Iic : BddAbove s ↔ ∃ a, s ⊆ Iic a


@[to_additive]
theorem Integrable.comp_div_left {f : G → F} [IsInvInvariant μ] [IsMulLeftInvariant μ]
    (hf : Integrable f μ) (g : G) : Integrable (fun t => f (g / t)) μ

{G : Type u_4}
{F : Type u_6}
[MeasurableSpace G]
[NormedAddCommGroup F]
{μ : MeasureTheory.Measure G}
[AddGroup G]
[MeasurableAdd G]
[MeasurableNeg G]
{f : G → F}
[μ.IsNegInvariant]
[μ.IsAddLeftInvariant]
(hf : MeasureTheory.Integrable f μ)
(g : G)

MeasureTheory.Integrable (fun t => f (g - t)) μ


theorem mk_mul_aleph0_eq {α : Type*} [Infinite α] : #α * ℵ₀ = #α

#α * ℵ₀ = #α


theorem C_eq_algebraMap {r : R} : C R r = (algebraMap R R⟦X⟧) r

(PowerSeries.C R) r = (algebraMap R (PowerSeries R)) r


/-- Implementation of `SheafConditionPairwiseIntersections.coneEquiv`. -/
@[simps!]
def coneEquivCounitIso :
    coneEquivInverse F U ⋙ coneEquivFunctor F U ≅
      𝟭 (Limits.Cone (SheafConditionEqualizerProducts.diagram F U))

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{ι : Type v'}
(U : ι → TopologicalSpace.Opens ↑X)

∀ (X_1 : CategoryTheory.Limits.Cone (TopCat.Presheaf.SheafConditionEqualizerProducts.diagram F U)),
  ((TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivCounitIso F U).hom.app X_1).hom = 𝟙 X_1.pt


theorem dist_eq_of_L2 {β : ι → Type*} [∀ i, SeminormedAddCommGroup (β i)] (x y : PiLp 2 β) :
    dist x y = √(∑ i, dist (x i) (y i) ^ 2)

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

dist x y = √(∑ i : ι, dist (x i) (y i) ^ 2)


theorem Injective.eq_iff (I : Injective f) {a b : α} : f a = f b ↔ a = b

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
(I : Function.Injective f)
{a b : α}


{R₂ : Type u_3}
{R₃ : Type u_4}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
{module_M₂ : Module R₂ M₂}
{module_M₃ : Module R₃ M₃}
{σ₂₃ : R₂ →+* R₃}
(f : M₂ →ₛₗ[σ₂₃] M₃)


@[to_additive]
theorem _root_.measurableEmbedding_const_smul (c : G) : MeasurableEmbedding (c • · : α → α)

{G : Type u_1}
{α : Type u_3}
[MeasurableSpace G]
[MeasurableSpace α]
[AddGroup G]
[AddAction G α]
[MeasurableVAdd G α]
(c : G)


theorem le_radius_of_summable_norm (p : FormalMultilinearSeries 𝕜 E F)
    (hs : Summable fun n => ‖p n‖ * (r : ℝ) ^ n) : ↑r ≤ p.radius

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{r : ℝ≥0}
(p : FormalMultilinearSeries 𝕜 E F)
(hs : Summable fun n => ‖p n‖ * ↑r ^ n)


theorem le_iInf₂_lintegral {ι : Sort*} {ι' : ι → Sort*} (f : ∀ i, ι' i → α → ℝ≥0∞) :
    ∫⁻ a, ⨅ (i) (h : ι' i), f i h a ∂μ ≤ ⨅ (i) (h : ι' i), ∫⁻ a, f i h a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{ι : Sort u_5}
{ι' : ι → Sort u_6}
(f : (i : ι) → ι' i → α → ℝ≥0∞)

∫⁻ (a : α), ⨅ i, ⨅ h, f i h a ∂μ ≤ ⨅ i, ⨅ h, ∫⁻ (a : α), f i h a ∂μ


@[simps]
instance left' (X Y : C) [MonoidalCoherence X Y] :
    MonoidalCoherence X (𝟙_ C ⊗ Y)

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


@[simp]
theorem isDiag_diagonal [Zero α] [DecidableEq n] (d : n → α) : (diagonal d).IsDiag

{α : Type u_1}
{n : Type u_4}
[Zero α]
[DecidableEq n]
(d : n → α)


@[norm_cast]
theorem diagonal_natCast [Zero α] [NatCast α] (m : ℕ) : diagonal (fun _ : n => (m : α)) = m

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[NatCast α]
(m : ℕ)


theorem volume_preserving_piEquivPiSubtypeProd (α : ι → Type*)
    [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (p : ι → Prop)
    [DecidablePred p] : MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p)

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

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

MeasureTheory.MeasurePreserving (⇑(MeasurableEquiv.piEquivPiSubtypeProd α p)) MeasureTheory.volume MeasureTheory.volume


@[to_additive]
theorem prehaar_pos (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) {K : Set G}
    (h1K : IsCompact K) (h2K : (interior K).Nonempty) : 0 < prehaar (K₀ : Set G) U ⟨K, h1K⟩

(K₀ : TopologicalSpace.PositiveCompacts G)

0 < MeasureTheory.Measure.haar.prehaar (↑K₀) U { carrier := K, isCompact' := h1K }


theorem one_le_rpow {x : ℝ≥0} {z : ℝ} (h : 1 ≤ x) (h₁ : 0 ≤ z) : 1 ≤ x ^ z


lemma measure_inter_conull (ht : μ tᶜ = 0) : μ (s ∩ t) = μ s

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(ht : μ tᶜ = 0)


/-- The Cauchy product formula for the product of two infinite sums indexed by `ℕ`,
    expressed by summing on `Finset.antidiagonal`.
    See also `tsum_mul_tsum_eq_tsum_sum_antidiagonal` if `f` and `g` are
    *not* absolutely summable. -/
theorem tsum_mul_tsum_eq_tsum_sum_antidiagonal_of_summable_norm [CompleteSpace R] {f g : ℕ → R}
    (hf : Summable fun x => ‖f x‖) (hg : Summable fun x => ‖g x‖) :
    ((∑' n, f n) * ∑' n, g n) = ∑' n, ∑ kl ∈ antidiagonal n, f kl.1 * g kl.2

{R : Type u_1}
[NormedRing R]
[CompleteSpace R]
{f g : ℕ → R}
(hf : Summable fun x => ‖f x‖)
(hg : Summable fun x => ‖g x‖)

(∑' (n : ℕ), f n) * ∑' (n : ℕ), g n = ∑' (n : ℕ), ∑ kl ∈ Finset.antidiagonal n, f kl.1 * g kl.2


theorem toLoop_apply (i : N) {p : Ω^ N X x} {t} {tn} :
    toLoop i p t tn = p (Cube.insertAt i ⟨t, tn⟩)

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
(i : N)
{p : ↑(Ω^ N X x)}
{t : ↑I}
{tn : { j // j ≠ i } → ↑I}

((GenLoop.toLoop i p) t) tn = p ((Cube.insertAt i) (t, tn))


@[norm_cast]
theorem tendsto_coe {f : Filter α} {m : α → ℝ≥0} {a : ℝ≥0} :
    Tendsto (fun a => (m a : ℝ≥0∞)) f (𝓝 ↑a) ↔ Tendsto m f (𝓝 a)

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

Filter.Tendsto (fun a => ↑(m a)) f (𝓝 ↑a) ↔ Filter.Tendsto m f (𝓝 a)


@[simp]
theorem mk_whisker_left (f : a ⟶ b) {g h : b ⟶ c} (η : Hom₂ g h) :
    (Hom₂.whisker_left f η).mk = (f ◁ η.mk : f ≫ g ⟶ f ≫ h)

{a b c : CategoryTheory.FreeBicategory B}

(η : CategoryTheory.FreeBicategory.Hom₂ g h)

(CategoryTheory.FreeBicategory.Hom₂.whisker_left f η).mk = CategoryTheory.Bicategory.whiskerLeft f η.mk


@[simp]
theorem ramificationIdx_bot : ramificationIdx f ⊥ P = 0

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
{f : R →+* S}
{P : Ideal S}


@[to_additive]
theorem csSup_mul (hs₀ : s.Nonempty) (hs₁ : BddAbove s) (ht₀ : t.Nonempty) (ht₁ : BddAbove t) :
    sSup (s * t) = sSup s * sSup t

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

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


{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{t : Finset (α × β × γ)}
(x : α ⊕ β ⊕ γ)

¬SimpleGraph.TripartiteFromTriangles.Rel t x x


theorem mul_nonneg_iff_right_nonneg_of_pos [PosMulStrictMono α]
    (ha : 0 < a) : 0 ≤ a * b ↔ 0 ≤ b

{α : Type u}
[Semiring α]
[LinearOrder α]
{a b : α}
[PosMulStrictMono α]
(ha : 0 < a)


@[simp]
theorem OrderHom.coe_antisymmetrization (f : α →o β) :
    ⇑f.antisymmetrization = Quotient.map' f (liftFun_antisymmRel f)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α →o β)

⇑f.antisymmetrization = Quotient.map' ⇑f ⋯


theorem coinduced_eq (h : X ≃ₜ Y) : TopologicalSpace.coinduced h ‹_› = ‹_›

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

TopologicalSpace.coinduced (⇑h) inst✝ = inst✝¹


private theorem distrib' (a b c : WithTop α) : (a + b) * c = a * c + b * c

{α : Type u_1}
[DecidableEq α]
[CanonicallyOrderedCommSemiring α]
(a b c : WithTop α)


@[simp]
theorem max_eq_bot [OrderBot α] {a b : α} : max a b = ⊥ ↔ a = ⊥ ∧ b = ⊥

{α : Type u}
[LinearOrder α]
[OrderBot α]
{a b : α}


@[simp]
theorem ack_three (n : ℕ) : ack 3 n = 2 ^ (n + 3) - 3


@[to_additive]
theorem gc_map_comap (f : M →ₙ* N) : GaloisConnection (map f) (comap f)

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

GaloisConnection (AddSubsemigroup.map f) (AddSubsemigroup.comap f)


@[simp]
theorem transpose_smul {R : Type*} [SMul R α] (c : R) (M : Matrix m n α) : (c • M)ᵀ = c • Mᵀ

{m : Type u_2}
{n : Type u_3}
{α : Type v}
{R : Type u_10}
[SMul R α]
(c : R)
(M : Matrix m n α)


/-- At `0` the Gamma function is undefined; by convention we assign it the value `0`. -/
@[simp]
theorem Gamma_zero : Gamma 0 = 0


theorem cocompact_le_coclosedCompact : cocompact X ≤ coclosedCompact X

Filter.cocompact X ≤ Filter.coclosedCompact X


lemma condIndep_iff (m' m₁ m₂ : MeasurableSpace Ω)
    {mΩ : MeasurableSpace Ω} [StandardBorelSpace Ω] [Nonempty Ω]
    (hm' : m' ≤ mΩ) (hm₁ : m₁ ≤ mΩ) (hm₂ : m₂ ≤ mΩ) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndep m' m₁ m₂ hm' μ
      ↔ ∀ t1 t2, MeasurableSet[m₁] t1 → MeasurableSet[m₂] t2
        → (μ⟦t1 ∩ t2 | m'⟧) =ᵐ[μ] (μ⟦t1 | m'⟧) * (μ⟦t2 | m'⟧)

{Ω : Type u_1}
(m' m₁ m₂ : MeasurableSpace Ω)
{mΩ : MeasurableSpace Ω}
[StandardBorelSpace Ω]
[Nonempty Ω]
(hm' : m' ≤ mΩ)
(hm₁ : m₁ ≤ mΩ)
(hm₂ : m₂ ≤ mΩ)
(μ : MeasureTheory.Measure Ω)
[MeasureTheory.IsFiniteMeasure μ]

ProbabilityTheory.CondIndep m' m₁ m₂ hm' μ ↔
  ∀ (t1 t2 : Set Ω),
    MeasurableSet t1 →
      MeasurableSet t2 →
        μ[(t1 ∩ t2).indicator fun ω => 1|m'] =ᵐ[μ] μ[t1.indicator fun ω => 1|m'] * μ[t2.indicator fun ω => 1|m']


@[simp]
theorem toIocMod_sub_self (a b : α) : toIocMod hp a b - b = -toIocDiv hp a b • p

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


/-- Non-zero elements of an integral domain are regular. -/
theorem isRegular_of_ne_zero (a0 : a ≠ 0) : IsRegular a

{R : Type u_1}
[MulZeroClass R]
[IsCancelMulZero R]
{a : R}
(a0 : a ≠ 0)


@[simp]
theorem sumArrowLequivProdArrow_symm_apply_inr {α β} (f : α → M) (g : β → M) (b : β) :
    ((sumArrowLequivProdArrow α β R M).symm (f, g)) (Sum.inr b) = g b

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_5}
{β : Type u_6}
(f : α → M)
(g : β → M)
(b : β)

(LinearEquiv.sumArrowLequivProdArrow α β R M).symm (f, g) (Sum.inr b) = g b


@[simp] theorem forgetMonoidal_μ (X Y : Mon_ C) : (forgetMonoidal C).μ X Y = 𝟙 (X.X ⊗ Y.X)

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

(Mon_.forgetMonoidal C).μ X Y = 𝟙 (X.X ⊗ Y.X)


/-- The space of curves $γ \colon [t_{\min}, t_{\max}] \to E$ such that $γ(t₀) = x₀$ and $γ$ is
Lipschitz continuous with constant $C$. The map sending $γ$ to
$\mathbf Pγ(t)=x₀ + ∫_{t₀}^{t} v(τ, γ(τ))\,dτ$ is a contracting map on this space, and its fixed
point is a solution of the ODE $\dot x=v(t, x)$. -/
structure FunSpace where
  toFun : Icc v.tMin v.tMax → E
  map_t₀' : toFun v.t₀ = v.x₀
  lipschitz' : LipschitzWith v.C toFun

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{v : PicardLindelof E}
(self : v.FunSpace)


@[elab_as_elim]
protected theorem ind_on {C : ManyOneDegree → Prop} (d : ManyOneDegree)
    (h : ∀ p : Set ℕ, C (of p)) : C d

(h : ∀ (p : Set ℕ), C (ManyOneDegree.of p))


@[to_additive]
theorem preimage_mul_preimage_subset {s t : Set β} : m ⁻¹' s * m ⁻¹' t ⊆ m ⁻¹' (s * t)

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Add α]
[Add β]
[FunLike F α β]
[AddHomClass F α β]
(m : F)
{s t : Set β}


@[simp]
theorem ite_inter_compl_self (t s s' : Set α) : t.ite s s' ∩ tᶜ = s' ∩ tᶜ


lemma measurableSet_copy {m : MeasurableSpace α} {p : Set α → Prop}
    (h : ∀ s, p s ↔ MeasurableSet[m] s) {s} : MeasurableSet[.copy m p h] s ↔ p s

(h : ∀ (s : Set α), p s ↔ MeasurableSet s)


@[gcongr]
protected theorem mul_right (c : ℕ) (h : a ≡ b [MOD n]) : a * c ≡ b * c [MOD n]


lemma sinh_eq_tsum (z : ℂ) : sinh z = ∑' n, z ^ (2 * n + 1) / ↑(2 * n + 1)!


@[norm_cast]
theorem coe_nsmul (n : ℕ) (I : FractionalIdeal S P) :
    (↑(n • I) : Submodule R P) = n • (I : Submodule R P)

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


theorem Decidable.iff_not_comm [Decidable a] [Decidable b] : (a ↔ ¬b) ↔ (b ↔ ¬a)

{a b : Prop}
[Decidable a]
[Decidable b]


@[simp]
theorem mem_union {x y z : ZFSet.{u}} : z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y


lemma eventually_one_sub_smoothingFn_pos : ∀ᶠ (n : ℕ) in atTop, 0 < 1 - ε n

∀ᶠ (n : ℕ) in Filter.atTop, 0 < 1 - AkraBazziRecurrence.smoothingFn ↑n


@[to_additive]
theorem exponent_eq_max'_orderOf [Fintype G] :
    exponent G = ((@Finset.univ G _).image orderOf).max' ⟨1, by simp⟩

{G : Type u}
[CancelCommMonoid G]
[Fintype G]

Monoid.exponent G = (Finset.image orderOf Finset.univ).max' ⋯


/-- A translation of the relation `Λ * ↑ζ = log` of (real-valued) arithmetic functions
to an equality of complex sequences. -/
lemma convolution_vonMangoldt_zeta : ↗Λ ⍟ ↗ζ = ↗Complex.log

((fun n => ↑(ArithmeticFunction.vonMangoldt n)) ⍟ fun n => ↑(ArithmeticFunction.zeta n)) = fun n => Complex.log ↑n


theorem of_isIso_comp_left {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [IsIso f] [IsIso (f ≫ g)] :
    IsIso g

[CategoryTheory.IsIso (CategoryTheory.CategoryStruct.comp f g)]


/-- The `p`-adic norm respects division. -/
@[simp]
protected theorem div (q r : ℚ) : padicNorm p (q / r) = padicNorm p q / padicNorm p r

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(q r : ℚ)


theorem UInt8.toNat_sub (x y : UInt8) :
    (x - y).toNat = (UInt8.size - y.toNat + x.toNat) % UInt8.size


/-- `(p → q) ∧ p ↔ q ∧ p` -/
@[simp]
theorem himp_inf_self (a b : α) : (a ⇨ b) ⊓ a = b ⊓ a

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


@[simp] lemma coe_toAddMonoidHom (ψ : AddChar A M) : ⇑ψ.toAddMonoidHom = Additive.ofMul ∘ ψ

{A : Type u_1}
{M : Type u_3}
[AddMonoid A]
[Monoid M]
(ψ : AddChar A M)

⇑ψ.toAddMonoidHom = ⇑Additive.ofMul ∘ ⇑ψ


@[simp]
theorem coe_mk (f : (∀ i, M₁ i) → M₂) (h₁ h₂) : ⇑(⟨f, h₁, h₂⟩ : MultilinearMap R M₁ M₂) = f

(h₁ :
  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (x y : M₁ i),
    f (Function.update m i (x + y)) = f (Function.update m i x) + f (Function.update m i y))

(h₂ :
  ∀ [inst : DecidableEq ι] (m : (i : ι) → M₁ i) (i : ι) (c : R) (x : M₁ i),
    f (Function.update m i (c • x)) = c • f (Function.update m i x))

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


@[simp] theorem conjTranspose_inj [InvolutiveStar α] {A B : Matrix m n α} : Aᴴ = Bᴴ ↔ A = B

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[InvolutiveStar α]
{A B : Matrix m n α}


@[to_additive]
theorem haarMeasure_self {K₀ : PositiveCompacts G} : haarMeasure K₀ K₀ = 1

{K₀ : TopologicalSpace.PositiveCompacts G}

(MeasureTheory.Measure.haarMeasure K₀) ↑K₀ = 1


/-- If `f` is convex on `S` and differentiable on `S`, then its derivative within `S` is monotone
on `S`. -/
lemma monotoneOn_derivWithin (hfc : ConvexOn ℝ S f) (hfd : DifferentiableOn ℝ f S) :
    MonotoneOn (derivWithin f S) S

{S : Set ℝ}
{f : ℝ → ℝ}
(hfc : ConvexOn ℝ S f)
(hfd : DifferentiableOn ℝ f S)


/-- A subset of a monoid is contained in the submonoid it generates. -/
@[to_additive
    "A subset of an `AddMonoid` is contained in the `AddSubmonoid` it generates."]
theorem subset_closure {s : Set M} : s ⊆ Closure s

{M : Type u_1}
[AddMonoid M]
{s : Set M}


/--
The underlying object of a condensed object in `C` is the condensed object evaluated at a point.
This can be viewed as a sort of forgetful functor from `Condensed C` to `C`
-/
@[simps!]
noncomputable def Condensed.underlying : Condensed.{u} C ⥤ C

(C : Type w)
[CategoryTheory.Category.{u + 1, w} C]

∀ {X Y : CategoryTheory.Sheaf (CategoryTheory.coherentTopology CompHaus) C} (f : X ⟶ Y),
  (Condensed.underlying C).map f = f.val.app (Opposite.op (CompHaus.of PUnit.{u + 1}))


lemma independent_weightSpace' [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun χ : Weight R L M ↦ weightSpace M χ

(R : Type u_2)
(L : Type u_3)
(M : Type u_4)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieAlgebra.IsNilpotent R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[NoZeroSMulDivisors R M]

CompleteLattice.Independent fun χ => LieModule.weightSpace M ⇑χ


lemma tilted_apply (μ : Measure α) [SFinite μ] (f : α → ℝ) (s : Set α) :
    μ.tilted f s = ∫⁻ a in s, ENNReal.ofReal (exp (f a) / ∫ x, exp (f x) ∂μ) ∂μ

{α : Type u_1}
{mα : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SFinite μ]
(f : α → ℝ)
(s : Set α)

(μ.tilted f) s = ∫⁻ (a : α) in s, ENNReal.ofReal (rexp (f a) / ∫ (x : α), rexp (f x) ∂μ) ∂μ


@[simp]
theorem bot_trans (f : β ≃. γ) : (⊥ : α ≃. β).trans f = ⊥

{α : Type u}
{β : Type v}
{γ : Type w}
(f : β ≃. γ)


theorem vsub_inter_subset : s -ᵥ t₁ ∩ t₂ ⊆ (s -ᵥ t₁) ∩ (s -ᵥ t₂)

{α : Type u_2}
{β : Type u_3}
[VSub α β]
[DecidableEq α]
{s t₁ t₂ : Finset β}
[DecidableEq β]


@[simp]
theorem vsub_neBot_iff : (f -ᵥ g : Filter α).NeBot ↔ f.NeBot ∧ g.NeBot

{α : Type u_2}
{β : Type u_3}
[VSub α β]
{f g : Filter β}


theorem limsSup_le_limsSup {f g : Filter α}
    (hf : f.IsCobounded (· ≤ ·) := by isBoundedDefault)
    (hg : g.IsBounded (· ≤ ·) := by isBoundedDefault)
    (h : ∀ a, (∀ᶠ n in g, n ≤ a) → ∀ᶠ n in f, n ≤ a) : limsSup f ≤ limsSup g

(hf : Filter.IsCobounded (fun x x_1 => x ≤ x_1) f := by isBoundedDefault)

(hg : Filter.IsBounded (fun x x_1 => x ≤ x_1) g := by isBoundedDefault)

(h : ∀ (a : α), (∀ᶠ (n : α) in g, n ≤ a) → ∀ᶠ (n : α) in f, n ≤ a)


@[simp]
theorem Ico_eq_empty_of_le (h : b ≤ a) : Ico a b = ∅

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


theorem Subring.one_mem_toNonUnitalSubring (S : Subring R) : (1 : R) ∈ S.toNonUnitalSubring


/-- Class of Id maps -/
class IsId {M : Type*} (σ : M → M) : Prop where
  eq_id : σ = id

{M : Type u_1}
{σ : M → M}
[self : CompTriple.IsId σ]


theorem comp_bijective (f : α → β) (e : β ≃ γ) : Bijective (e ∘ f) ↔ Bijective f

{α : Sort u}
{β : Sort v}
{γ : Sort w}
(f : α → β)
(e : β ≃ γ)

Function.Bijective (⇑e ∘ f) ↔ Function.Bijective f


/-- Half of the spectral mapping theorem for polynomials. We prove it separately
because it holds over any field, whereas `spectrum.map_polynomial_aeval_of_degree_pos` and
`spectrum.map_polynomial_aeval_of_nonempty` need the field to be algebraically closed. -/
theorem subset_polynomial_aeval (a : A) (p : 𝕜[X]) : (eval · p) '' σ a ⊆ σ (aeval a p)

{𝕜 : Type u}
{A : Type v}
[Field 𝕜]
[Ring A]
[Algebra 𝕜 A]
(a : A)
(p : Polynomial 𝕜)

(fun x => Polynomial.eval x p) '' spectrum 𝕜 a ⊆ spectrum 𝕜 ((Polynomial.aeval a) p)


/-- Constructs an isomorphism of Boolean rings from a ring isomorphism between them. -/
@[simps]
def Iso.mk {α β : BoolRing.{u}} (e : α ≃+* β) : α ≅ β


@[to_additive indicator_compl']
theorem mulIndicator_compl (s : Set α) (f : α → G) :
    mulIndicator sᶜ f = f * (mulIndicator s f)⁻¹

{α : Type u_1}
{G : Type u_6}
[Group G]
(s : Set α)
(f : α → G)

sᶜ.mulIndicator f = f * (s.mulIndicator f)⁻¹


theorem preStoneCech_hom_ext {g₁ g₂ : PreStoneCech α → β} (h₁ : Continuous g₁) (h₂ : Continuous g₂)
    (h : g₁ ∘ preStoneCechUnit = g₂ ∘ preStoneCechUnit) : g₁ = g₂


theorem piFinset_subsingleton {f : ∀ i, Finset (δ i)} (hf : ∀ i, (f i : Set (δ i)).Subsingleton) :
    (Fintype.piFinset f : Set (∀ i, δ i)).Subsingleton

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{δ : α → Type u_3}
{f : (i : α) → Finset (δ i)}
(hf : ∀ (i : α), (↑(f i)).Subsingleton)


@[simp, norm_cast]
theorem coe_sInf (S : Set (LowerSet α)) : (↑(sInf S) : Set α) = ⋂ s ∈ S, ↑s

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


/-- Converse of pons asinorum, angle-at-point form. -/
theorem dist_eq_of_angle_eq_angle_of_angle_ne_pi {p1 p2 p3 : P} (h : ∠ p1 p2 p3 = ∠ p1 p3 p2)
    (hpi : ∠ p2 p1 p3 ≠ π) : dist p1 p2 = dist p1 p3

(h : EuclideanGeometry.angle p1 p2 p3 = EuclideanGeometry.angle p1 p3 p2)

(hpi : EuclideanGeometry.angle p2 p1 p3 ≠ π)


lemma bit_decomp (n : Nat) : bit (bodd n) (div2 n) = n


theorem mem_bot (x : E) : (x ∈ (⊥ : ConvexCone 𝕜 E)) = False

(𝕜 : Type u_1)
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]
(x : E)


theorem isUnit_map_of_injective (hg : Function.Injective g) (y : nonZeroDivisors A) :
    IsUnit (g y)

{A : Type u_4}
[CommRing A]
[IsDomain A]
{L : Type u_7}
[Field L]
{g : A →+* L}
(hg : Function.Injective ⇑g)
(y : ↥(nonZeroDivisors A))


lemma comap_basicOpen (f : R →+* S) (x : R) :
    comap f (PrimeSpectrum.basicOpen x) (PrimeSpectrum.basicOpen (f x))
        (PrimeSpectrum.comap_basicOpen f x).le =
      IsLocalization.map (M := .powers x) (T := .powers (f x)) _ f
        (Submonoid.powers_le.mpr (Submonoid.mem_powers _))

{R : Type u}
[CommRing R]
{S : Type u}
[CommRing S]
(f : R →+* S)
(x : R)

AlgebraicGeometry.StructureSheaf.comap f (PrimeSpectrum.basicOpen x) (PrimeSpectrum.basicOpen (f x)) ⋯ =
  IsLocalization.map
    (↑((AlgebraicGeometry.Spec.structureSheaf S).val.obj (Opposite.op (PrimeSpectrum.basicOpen (f x))))) f ⋯


@[simp]
theorem cancel_right {g₁ g₂ : LatticeHom β γ} {f : LatticeHom α β} (hf : Surjective f) :
    g₁.comp f = g₂.comp f ↔ g₁ = g₂

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Lattice α]
[Lattice β]
[Lattice γ]
{g₁ g₂ : LatticeHom β γ}
{f : LatticeHom α β}
(hf : Function.Surjective ⇑f)


/-- The balanced hull of `s` is minimal in the sense that it is contained in any balanced superset
`t` of `s`. -/
theorem Balanced.balancedHull_subset_of_subset (ht : Balanced 𝕜 t) (h : s ⊆ t) :
    balancedHull 𝕜 s ⊆ t

{𝕜 : Type u_1}
{E : Type u_2}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
{s t : Set E}
(ht : Balanced 𝕜 t)
(h : s ⊆ t)


@[to_additive (attr := simp)]
theorem srange_fst [Nonempty N] : (fst M N).srange = ⊤

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
[Nonempty N]


theorem eq_factorization_iff {n : ℕ} {f : ℕ →₀ ℕ} (hn : n ≠ 0) (hf : ∀ p ∈ f.support, Prime p) :
    f = n.factorization ↔ f.prod (· ^ ·) = n

{n : ℕ}
{f : ℕ →₀ ℕ}
(hn : n ≠ 0)
(hf : ∀ p ∈ f.support, Nat.Prime p)

f = n.factorization ↔ (f.prod fun x x_1 => x ^ x_1) = n


theorem Algebra.IsIntegral.of_injective [Algebra.IsIntegral R B] : Algebra.IsIntegral R A

{R : Type u_1}
[CommRing R]
{A : Type u_5}
{B : Type u_6}
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)
(hf : Function.Injective ⇑f)
[Algebra.IsIntegral R B]


@[reassoc]
lemma pullback.condition : pullback.fst f g ≫ f = pullback.snd f g ≫ g

{X Y B : CompHaus}
(f : X ⟶ B)
(g : Y ⟶ B)

CategoryTheory.CategoryStruct.comp (CompHaus.pullback.fst f g) f =
  CategoryTheory.CategoryStruct.comp (CompHaus.pullback.snd f g) g


@[deprecated lt_rpow_inv_iff (since := "2024-07-10")]
theorem lt_rpow_one_div_iff {x y : ℝ≥0∞} {z : ℝ} (hz : 0 < z) : x < y ^ (1 / z) ↔ x ^ z < y


@[simp, deprecated bot_lt_coe "Don't mix Option and WithBot" (since := "2024-05-27")]
theorem none_lt_some (a : α) : @LT.lt (WithBot α) _ none (some a)


/-- Consider a point `x` at which a set `s` has density one, with respect to closed balls (i.e.,
a Lebesgue density point of `s`). Then `s` has also density one at `x` with respect to any
measurable set `t`: the proportion of points in `s` belonging to a rescaled copy `{x} + r • t`
of `t` tends to one as `r` tends to zero. -/
theorem tendsto_addHaar_inter_smul_one_of_density_one (s : Set E) (x : E)
    (h : Tendsto (fun r => μ (s ∩ closedBall x r) / μ (closedBall x r)) (𝓝[>] 0) (𝓝 1)) (t : Set E)
    (ht : MeasurableSet t) (h't : μ t ≠ 0) (h''t : μ t ≠ ∞) :
    Tendsto (fun r : ℝ => μ (s ∩ ({x} + r • t)) / μ ({x} + r • t)) (𝓝[>] 0) (𝓝 1)

(h : Filter.Tendsto (fun r => μ (s ∩ Metric.closedBall x r) / μ (Metric.closedBall x r)) (𝓝[>] 0) (𝓝 1))

Filter.Tendsto (fun r => μ (s ∩ ({x} + r • t)) / μ ({x} + r • t)) (𝓝[>] 0) (𝓝 1)


theorem cases_on (a : Prop) {p : Prop → Prop} (h1 : p True) (h2 : p False) : p a


theorem IndepSets.indep [IsProbabilityMeasure μ]
    {p1 p2 : Set (Set Ω)} (h1 : m1 ≤ _mΩ) (h2 : m2 ≤ _mΩ) (hp1 : IsPiSystem p1)
    (hp2 : IsPiSystem p2) (hpm1 : m1 = generateFrom p1) (hpm2 : m2 = generateFrom p2)
    (hyp : IndepSets p1 p2 μ) :
    Indep m1 m2 μ

(hpm1 : m1 = MeasurableSpace.generateFrom p1)

(hpm2 : m2 = MeasurableSpace.generateFrom p2)

(hyp : ProbabilityTheory.IndepSets p1 p2 μ)


@[simp]
theorem leftUnitor_hom_f (X : Center C) : Hom.f (λ_ X).hom = (λ_ X.1).hom

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


@[simp]
theorem toOpen_apply (U : Opens (PrimeSpectrum.Top R)) (f : R) (x : U) :
    (toOpen R U f).1 x = algebraMap _ _ f

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

↑((AlgebraicGeometry.StructureSheaf.toOpen R U) f) x =
  (algebraMap R (AlgebraicGeometry.StructureSheaf.Localizations R ↑x)) f


theorem FactorSet.prod_eq_zero_iff [Nontrivial α] (p : FactorSet α) : p.prod = 0 ↔ p = ⊤

{α : Type u_1}
[CancelCommMonoidWithZero α]
[Nontrivial α]
(p : Associates.FactorSet α)


theorem ker_toAddSubgroup (f : M →ₛₗ[τ₁₂] M₂) : (ker f).toAddSubgroup = f.toAddMonoidHom.ker

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_6}
{M₂ : Type u_8}
[Ring R]
[Ring R₂]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
(f : M →ₛₗ[τ₁₂] M₂)

(LinearMap.ker f).toAddSubgroup = f.toAddMonoidHom.ker


@[reassoc (attr := simp)]
lemma toCycles_i [K.HasHomology j] :
    K.toCycles i j ≫ K.iCycles j = K.d i j


@[to_additive]
theorem prod_antidiagonal_eq_prod_range_succ_mk {M : Type*} [CommMonoid M] (f : ℕ × ℕ → M)
    (n : ℕ) : ∏ ij ∈ antidiagonal n, f ij = ∏ k ∈ range n.succ, f (k, n - k)

{M : Type u_3}
[CommMonoid M]
(f : ℕ × ℕ → M)
(n : ℕ)

∏ ij ∈ Finset.antidiagonal n, f ij = ∏ k ∈ Finset.range n.succ, f (k, n - k)


@[simp] lemma diffs_eq_empty : s \\ t = ∅ ↔ s = ∅ ∨ t = ∅

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{s t : Finset α}


theorem contDiffWithinAt_id {s x} : ContDiffWithinAt 𝕜 n (id : E → E) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{n : ℕ∞}
{s : Set E}
{x : E}


/-- Rotating the first of two vectors by `θ` scales their Kahler form by `cos (-θ) + sin (-θ) * I`.
-/
theorem kahler_rotation_left' (x y : V) (θ : Real.Angle) :
    o.kahler (o.rotation θ x) y = (-θ).expMapCircle * o.kahler x y

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

(o.kahler ((o.rotation θ) x)) y = ↑(-θ).expMapCircle * (o.kahler x) y


@[simp]
theorem ofAlgHom_coe_algHom (f : A₁ ≃ₐ[R] A₂) (g : A₂ →ₐ[R] A₁) (h₁ h₂) :
    ofAlgHom (↑f) g h₁ h₂ = f

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(f : A₁ ≃ₐ[R] A₂)
(g : A₂ →ₐ[R] A₁)
(h₁ : (↑f).comp g = AlgHom.id R A₂)
(h₂ : g.comp ↑f = AlgHom.id R A₁)


@[simp]
theorem map_erase [DecidableEq α] (f : α ↪ β) (s : Finset α) (a : α) :
    (s.erase a).map f = (s.map f).erase (f a)

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

Finset.map f (s.erase a) = (Finset.map f s).erase (f a)


theorem Nonempty.zero_div (hs : s.Nonempty) : 0 / s = 0

{α : Type u_2}
[DecidableEq α]
[GroupWithZero α]
{s : Finset α}
(hs : s.Nonempty)


theorem exist_unique_vadd_mem_fundamentalDomain [Finite ι] (x : E) :
    ∃! v : span ℤ (Set.range b), v +ᵥ x ∈ fundamentalDomain b

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
(b : Basis ι K E)
[FloorRing K]
[Finite ι]
(x : E)

∃! v, v +ᵥ x ∈ Zspan.fundamentalDomain b


@[to_additive]
lemma mulIndicator_biUnion (s : Finset ι) (t : ι → Set κ) {f : κ → β} :
    ((s : Set ι).PairwiseDisjoint t) →
      mulIndicator (⋃ i ∈ s, t i) f = fun a ↦ ∏ i ∈ s, mulIndicator (t i) f a

{ι : Type u_1}
{β : Type u_4}
[AddCommMonoid β]
{κ : Type u_7}
(s : Finset ι)
(t : ι → Set κ)
{f : κ → β}

(↑s).PairwiseDisjoint t → (⋃ i ∈ s, t i).indicator f = fun a => ∑ i ∈ s, (t i).indicator f a


theorem Dense.borel_eq_generateFrom_Ioc_mem_aux {α : Type*} [TopologicalSpace α] [LinearOrder α]
    [OrderTopology α] [SecondCountableTopology α] {s : Set α} (hd : Dense s)
    (hbot : ∀ x, IsTop x → x ∈ s) (hIoo : ∀ x y : α, x < y → Ioo x y = ∅ → x ∈ s) :
    borel α = .generateFrom { S : Set α | ∃ l ∈ s, ∃ u ∈ s, l < u ∧ Ioc l u = S }

(hIoo : ∀ (x y : α), x < y → Set.Ioo x y = ∅ → x ∈ s)

borel α = MeasurableSpace.generateFrom {S | ∃ l ∈ s, ∃ u ∈ s, l < u ∧ Set.Ioc l u = S}


@[to_additive (attr := simp)]
lemma UniformOnFun.ofFun_div [Div β] (f g : α → β) : ofFun 𝔖 (f / g) = ofFun 𝔖 f / ofFun 𝔖 g

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
[Div β]
(f g : α → β)

(UniformOnFun.ofFun 𝔖) (f / g) = (UniformOnFun.ofFun 𝔖) f / (UniformOnFun.ofFun 𝔖) g


/-- If there is an `n`-th primitive root of unity in `R` and `b` divides `n`,
then there is a `b`-th primitive root of unity in `R`. -/
theorem pow {n : ℕ} {a b : ℕ} (hn : 0 < n) (h : IsPrimitiveRoot ζ n) (hprod : n = a * b) :
    IsPrimitiveRoot (ζ ^ a) b

{M : Type u_1}
[CommMonoid M]
{ζ : M}
{n a b : ℕ}
(hn : 0 < n)
(h : IsPrimitiveRoot ζ n)
(hprod : n = a * b)


@[simp]
theorem card_Ico : (Ico a b).card = (b - a).toNat


@[simp]
theorem boundedBy_top : boundedBy (⊤ : Set α → ℝ≥0∞) = ⊤

MeasureTheory.OuterMeasure.boundedBy ⊤ = ⊤


lemma smul_upperBounds_subset_lowerBounds_smul (ha : a ≤ 0) :
    a • upperBounds s ⊆ lowerBounds (a • s)

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulMono α β]
{s : Set β}
{a : α}
(ha : a ≤ 0)


{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
{c : M}
(f : SmoothBumpFunction I c)


@[to_additive]
theorem le_mul_right (h : a ≤ b) : a ≤ b * c

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


theorem isNat_eq_true [AddMonoidWithOne α] : {a b : α} → {c : ℕ} →
    IsNat a c → IsNat b c → a = b

{α : Type u}
[AddMonoidWithOne α]
{a b : α}
{c : ℕ}

Mathlib.Meta.NormNum.IsNat a c → Mathlib.Meta.NormNum.IsNat b c → a = b


/-- Each element of the group defines an algebra equivalence.

This is a stronger version of `MulSemiringAction.toRingEquiv` and
`DistribMulAction.toLinearEquiv`. -/
@[simps! apply symm_apply toEquiv] -- Porting note: don't want redundant simps lemma `toEquiv_symm`
def toAlgEquiv (g : G) : A ≃ₐ[R] A

{G : Type u_2}
(R : Type u_3)
(A : Type u_4)
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Group G]
[MulSemiringAction G A]
[SMulCommClass G R A]
(g : G)

∀ (a : A), (MulSemiringAction.toAlgEquiv R A g).symm a = g⁻¹ • a


@[to_additive (attr := simp)]
theorem coe_one : ⇑(1 : α →*o β) = 1

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[MulOneClass α]
[MulOneClass β]


/-- The equivalence between the category of elements `F.Elements`
    and the comma category `(*, F)`. -/
@[simps! functor_obj functor_map inverse_obj inverse_map unitIso_hom
  unitIso_inv counitIso_hom counitIso_inv]
def structuredArrowEquivalence : F.Elements ≌ StructuredArrow PUnit F

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

(CategoryTheory.CategoryOfElements.structuredArrowEquivalence F).counitIso.inv =
  { app := fun X => (CategoryTheory.StructuredArrow.isoMk (CategoryTheory.Iso.refl X.right) ⋯).inv, naturality := ⋯ }


theorem replicate_left_injective (a : α) : Injective (replicate · a)

Function.Injective fun x => List.replicate x a


protected theorem max_def {n m : Nat} : max n m = if n ≤ m then m else n


theorem smul_mk_zero {β : Type*} [Monoid M] [AddMonoid β] [DistribMulAction M β] (a : M) (b : α) :
    a • (b, (0 : β)) = (a • b, 0)

{M : Type u_1}
{α : Type u_3}
[SMul M α]
{β : Type u_5}
[Monoid M]
[AddMonoid β]
[DistribMulAction M β]
(a : M)
(b : α)


theorem Filter.HasBasis.totallyBounded_iff {ι} {p : ι → Prop} {U : ι → Set (α × α)}
    (H : (𝓤 α).HasBasis p U) {s : Set α} :
    TotallyBounded s ↔ ∀ i, p i → ∃ t : Set α, Set.Finite t ∧ s ⊆ ⋃ y ∈ t, { x | (x, y) ∈ U i }

{α : Type u}
[uniformSpace : UniformSpace α]
{ι : Sort u_1}
{p : ι → Prop}
{U : ι → Set (α × α)}
(H : (𝓤 α).HasBasis p U)
{s : Set α}

TotallyBounded s ↔ ∀ (i : ι), p i → ∃ t, t.Finite ∧ s ⊆ ⋃ y ∈ t, {x | (x, y) ∈ U i}


@[simp]
theorem edgeSet_sup {H₁ H₂ : Subgraph G} : (H₁ ⊔ H₂).edgeSet = H₁.edgeSet ∪ H₂.edgeSet

{V : Type u}
{G : SimpleGraph V}
{H₁ H₂ : G.Subgraph}


theorem mem_zpowers_iff {g h : G} : h ∈ zpowers g ↔ ∃ k : ℤ, g ^ k = h


/-- Change of variables, most common version. If `f` has continuous derivative `f'` on `[a, b]`,
and `g` is continuous, then we can substitute `u = f x` to get
`∫ x in a..b, f' x • (g ∘ f) x = ∫ u in f a..f b, g u`.
-/
theorem integral_comp_smul_deriv {f f' : ℝ → ℝ} {g : ℝ → G}
    (h : ∀ x ∈ uIcc a b, HasDerivAt f (f' x) x) (h' : ContinuousOn f' (uIcc a b))
    (hg : Continuous g) : (∫ x in a..b, f' x • (g ∘ f) x) = ∫ x in f a..f b, g x

(h : ∀ x ∈ [[a, b]], HasDerivAt f (f' x) x)

∫ (x : ℝ) in a..b, f' x • (g ∘ f) x = ∫ (x : ℝ) in f a..f b, g x


@[simp]
theorem one_apply (x : A) : (1 : A →ₗc[R] A) x = x

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[CoalgebraStruct R A]
(x : A)


@[to_additive existing]
theorem norm_prod_le (s : Finset ι) (f : ι → E) : ‖∏ i ∈ s, f i‖ ≤ ∑ i ∈ s, ‖f i‖

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


theorem mul_inv_eq_iff_eq_mul_of_invertible (A B C : Matrix n n α) [Invertible A] :
    B * A⁻¹ = C ↔ B = C * A

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A B C : Matrix n n α)
[Invertible A]


lemma cfc_smul {S : Type*} [SMul S R] [ContinuousConstSMul S R]
    [SMulZeroClass S A] [IsScalarTower S R A] [IsScalarTower S R (R → R)]
    (s : S) (f : R → R) (a : A) (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) :
    cfc (fun x ↦ s • f x) a = s • cfc f a


@[simp]
theorem toComplex_re (x y : ℤ) : ((⟨x, y⟩ : ℤ[i]) : ℂ).re = x

(GaussianInt.toComplex { re := x, im := y }).re = ↑x


@[ext]
theorem ext (H : ∀ x y : M, B x y = D x y) : B = D

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B D : LinearMap.BilinForm R M}
(H : ∀ (x y : M), (B x) y = (D x) y)


/-- The convolution `g * f` is `C^n` when `f` is locally integrable and `g` is `C^n` and compactly
supported. Version where `g` depends on an additional parameter in an open subset `s` of a
parameter space `P` (and the compact support `k` is independent of the parameter in `s`). -/
theorem contDiffOn_convolution_left_with_param [μ.IsAddLeftInvariant] [μ.IsNegInvariant]
    (L : E' →L[𝕜] E →L[𝕜] F) {f : G → E} {n : ℕ∞} {g : P → G → E'} {s : Set P} {k : Set G}
    (hs : IsOpen s) (hk : IsCompact k) (hgs : ∀ p, ∀ x, p ∈ s → x ∉ k → g p x = 0)
    (hf : LocallyIntegrable f μ) (hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ univ)) :
    ContDiffOn 𝕜 n (fun q : P × G => (g q.1 ⋆[L, μ] f) q.2) (s ×ˢ univ)

(hgs : ∀ (p : P) (x : G), p ∈ s → x ∉ k → g p x = 0)

(hf : MeasureTheory.LocallyIntegrable f μ)

(hg : ContDiffOn 𝕜 n (↿g) (s ×ˢ Set.univ))

ContDiffOn 𝕜 n (fun q => MeasureTheory.convolution (g q.1) f L μ q.2) (s ×ˢ Set.univ)


theorem IsMax.prod_mk (ha : IsMax a) (hb : IsMax b) : IsMax (a, b)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{a : α}
{b : β}
(ha : IsMax a)
(hb : IsMax b)