@[reassoc (attr := simp)]
theorem pentagon_hom_hom_inv_inv_hom :
    (α_ W (X ⊗ Y) Z).hom ≫ W ◁ (α_ X Y Z).hom ≫ (α_ W X (Y ⊗ Z)).inv =
      (α_ W X Y).inv ▷ Z ≫ (α_ (W ⊗ X) Y Z).hom

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

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.associator W (CategoryTheory.MonoidalCategory.tensorObj X Y) Z).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.MonoidalCategory.whiskerLeft W (CategoryTheory.MonoidalCategory.associator X Y Z).hom)
      (CategoryTheory.MonoidalCategory.associator W X (CategoryTheory.MonoidalCategory.tensorObj Y Z)).inv) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.MonoidalCategory.whiskerRight (CategoryTheory.MonoidalCategory.associator W X Y).inv Z)
    (CategoryTheory.MonoidalCategory.associator (CategoryTheory.MonoidalCategory.tensorObj W X) Y Z).hom


lemma isClosed_preimage_val_coborder :
    IsClosed (coborder s ↓∩ s)

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


@[to_additive (attr := simp)]
theorem length_toFreeSemigroup (x : FreeMagma α) : (toFreeSemigroup x).length = x.length

(FreeAddMagma.toFreeAddSemigroup x).length = x.length


/-- The forgetful monoidal functor from the Drinfeld center to the original category. -/
@[simps]
def forget : MonoidalFunctor (Center C) C

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

∀ {X Y : CategoryTheory.Center C} (f : X ⟶ Y), (CategoryTheory.Center.forget C).map f = f.f


theorem Antiperiodic.zsmul_sub_eq [AddCommGroup α] [AddGroup β] (h : Antiperiodic f c) (n : ℤ) :
    f (n • c - x) = (n.negOnePow : ℤ) • f (-x)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[AddCommGroup α]
[AddGroup β]
(h : Function.Antiperiodic f c)
(n : ℤ)


@[simp]
theorem map_eq_bot_iff {s : AffineSubspace k P₁} : s.map f = ⊥ ↔ s = ⊥

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
(f : P₁ →ᵃ[k] P₂)
{s : AffineSubspace k P₁}


theorem power_ne_zero {a : Cardinal} (b : Cardinal) : a ≠ 0 → a ^ b ≠ 0

{a : Cardinal.{u_1}}
(b : Cardinal.{u_1})


/-- If there exists a set `{ r }` of `R` such that `Mᵣ` is `Rᵣ`-finite for each `r`,
then `M` is a finite `R`-module. -/
theorem of_localizationSpan (t : Set R) (ht : Ideal.span t = ⊤)
    (H : ∀ (g : t), Module.Finite (Localization.Away g.val)
      (LocalizedModule (Submonoid.powers g.val) M)) :
    Module.Finite R M

(H : ∀ (g : ↑t), Module.Finite (Localization.Away ↑g) (LocalizedModule (Submonoid.powers ↑g) M))


/-- If a function is `C^n`, with `1 ≤ n`, then its bundled derivative is continuous. -/
theorem ContMDiff.continuous_tangentMap (hf : ContMDiff I I' n f) (hmn : 1 ≤ n) :
    Continuous (tangentMap I I' f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
[Is : SmoothManifoldWithCorners I M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[I's : SmoothManifoldWithCorners I' M']
{f : M → M'}
{n : ℕ∞}
(hf : ContMDiff I I' n f)
(hmn : 1 ≤ n)


theorem map_eq_submodule_map (f : R →+* S) [h : RingHomSurjective f] (I : Ideal R) :
    I.map f = Submodule.map f.toSemilinearMap I

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(f : R →+* S)
[h : RingHomSurjective f]
(I : Ideal R)

Ideal.map f I = Submodule.map f.toSemilinearMap I


theorem smulRight_eq_comp {R M₁ M₂ ι : Type*} [CommSemiring R] [AddCommMonoid M₁]
    [AddCommMonoid M₂] [Module R M₁] [Module R M₂] (f : M₁ [⋀^ι]→ₗ[R] R) (z : M₂) :
    f.smulRight z = (LinearMap.id.smulRight z).compAlternatingMap f

{R : Type u_11}
{M₁ : Type u_12}
{M₂ : Type u_13}
{ι : Type u_14}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
(f : M₁ [⋀^ι]→ₗ[R] R)
(z : M₂)


protected lemma Finset.sum_empty {β α : Type*} [CommSemiring β] (f : α → β) :
    IsNat (Finset.sum ∅ f) 0

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


/-- If `Fₙ` tends locally uniformly to `f`, and `gₙ` tends to `x`, then `Fₙ gₙ` tends to `f x`. -/
theorem TendstoLocallyUniformly.tendsto_comp (h : TendstoLocallyUniformly F f p)
    (hf : ContinuousAt f x) (hg : Tendsto g p (𝓝 x)) : Tendsto (fun n => F n (g n)) p (𝓝 (f x))

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{x : α}
{p : Filter ι}
{g : ι → α}
[TopologicalSpace α]
(h : TendstoLocallyUniformly F f p)
(hf : ContinuousAt f x)
(hg : Filter.Tendsto g p (𝓝 x))

Filter.Tendsto (fun n => F n (g n)) p (𝓝 (f x))


/-- A multiplicative morphism between monoids gives a monoidal functor between the corresponding
discrete monoidal categories.
-/
@[to_additive (attr := simps) Discrete.addMonoidalFunctor]
def Discrete.monoidalFunctor (F : M →* N) : MonoidalFunctor (Discrete M) (Discrete N)

{M : Type u}
[Monoid M]
{N : Type u'}
[Monoid N]
(F : M →* N)
(X Y : CategoryTheory.Discrete M)

(CategoryTheory.Discrete.monoidalFunctor F).μ X Y = CategoryTheory.Discrete.eqToHom ⋯


@[simp]
lemma map_b₂ : (W.map φ).b₂ = φ W.b₂

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


theorem universallyClosed_eq : @UniversallyClosed = universally (topologically @IsClosedMap)

@AlgebraicGeometry.UniversallyClosed = (AlgebraicGeometry.topologically @IsClosedMap).universally


/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
theorem ContDiffAt.prod_map' {f : E → F} {g : E' → F'} {p : E × E'} (hf : ContDiffAt 𝕜 n f p.1)
    (hg : ContDiffAt 𝕜 n g p.2) : ContDiffAt 𝕜 n (Prod.map f g) p

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{F' : Type u_4}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{f : E → F}
{g : E' → F'}
{p : E × E'}
(hf : ContDiffAt 𝕜 n f p.1)
(hg : ContDiffAt 𝕜 n g p.2)


theorem lt_succ_iff_eq_or_lt : a < succ b ↔ a = b ∨ a < b

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
{a b : α}
[NoMaxOrder α]


/-- The oriented angle between three points equals the unoriented angle if the sign is
positive. -/
theorem oangle_eq_angle_of_sign_eq_one {p₁ p₂ p₃ : P} (h : (∡ p₁ p₂ p₃).sign = 1) :
    ∡ p₁ p₂ p₃ = ∠ p₁ p₂ p₃

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

∡ p₁ p₂ p₃ = ↑(∠ p₁ p₂ p₃)


/-- To every `Monad C` we associated a monoid object in `C ⥤ C`. -/
@[simps]
def toMon (M : Monad C) : Mon_ (C ⥤ C)

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


theorem setToL1SCLM_congr_left (hT : DominatedFinMeasAdditive μ T C)
    (hT' : DominatedFinMeasAdditive μ T' C') (h : T = T') (f : α →₁ₛ[μ] E) :
    setToL1SCLM α E μ hT f = setToL1SCLM α E μ hT' f

(hT : MeasureTheory.DominatedFinMeasAdditive μ T C)

(hT' : MeasureTheory.DominatedFinMeasAdditive μ T' C')

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

(MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT) f = (MeasureTheory.L1.SimpleFunc.setToL1SCLM α E μ hT') f


{α : Type u_1}
[DecidableEq α]
{s : Finset α}
(P : Finpartition s)
(G : SimpleGraph α)
[DecidableRel G.Adj]


protected lemma mul_assoc (x y z : ⨂[R] i, A i) : mul (mul x y) z = mul x (mul y z)

[∀ (i : ι), SMulCommClass R (A i) (A i)]

[∀ (i : ι), IsScalarTower R (A i) (A i)]

(PiTensorProduct.mul ((PiTensorProduct.mul x) y)) z = (PiTensorProduct.mul x) ((PiTensorProduct.mul y) z)


theorem rfindOpt_mono {α} {f : ℕ → Option α} (H : ∀ {a m n}, m ≤ n → a ∈ f m → a ∈ f n) {a} :
    a ∈ rfindOpt f ↔ ∃ n, a ∈ f n

(H : ∀ {a : α} {m n : ℕ}, m ≤ n → a ∈ f m → a ∈ f n)


theorem intervalIntegral_tendsto_integral_Ioi (a : ℝ) (hfi : IntegrableOn f (Ioi a) μ)
    (hb : Tendsto b l atTop) :
    Tendsto (fun i => ∫ x in a..b i, f x ∂μ) l (𝓝 <| ∫ x in Ioi a, f x ∂μ)

(hfi : MeasureTheory.IntegrableOn f (Set.Ioi a) μ)

Filter.Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Set.Ioi a, f x ∂μ))


@[simp] theorem mul_ediv_cancel (a : Int) {b : Int} (H : b ≠ 0) : (a * b) / b = a


@[simp]
theorem multichoose_one (k : ℕ) : multichoose (1 : R) k = 1

{R : Type u_2}
[NonAssocSemiring R]
[Pow R ℕ]
[NatPowAssoc R]
[BinomialRing R]
(k : ℕ)


@[simp]
theorem coe_inj {x y : R} : (x : ℍ[R,c₁,c₂]) = y ↔ x = y

{R : Type u_3}
[CommRing R]
{c₁ c₂ x y : R}


@[to_additive]
theorem tprod_tprod_eq_mulSingle (f : β → γ → α) (b : β) (c : γ) (hfb : ∀ b' ≠ b, f b' c = 1)
    (hfc : ∀ b', ∀ c' ≠ c, f b' c' = 1) : ∏' (b') (c'), f b' c' = f b c

(f : β → γ → α)


@[simp]
theorem leadingCoeff_neg (p : R[X]) : (-p).leadingCoeff = -p.leadingCoeff


theorem continuousAt_prod_of_discrete_left [DiscreteTopology α] {f : α × β → γ} {x : α × β} :
    ContinuousAt f x ↔ ContinuousAt (f ⟨x.1, ·⟩) x.2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[DiscreteTopology α]
{f : α × β → γ}
{x : α × β}

ContinuousAt f x ↔ ContinuousAt (fun x_1 => f (x.1, x_1)) x.2


@[to_additive (attr := simp, norm_cast)]
lemma coe_eq_one : (a : WithBot α) = 1 ↔ a = 1


theorem mem_keys {a : α} {s : Finmap β} : a ∈ s.keys ↔ a ∈ s

{α : Type u}
{β : α → Type v}
{a : α}
{s : Finmap β}


@[to_additive]
theorem HasProd.hasProd_iff_compl {s : Set β} (hf : HasProd (f ∘ (↑) : s → α) a₁) :
    HasProd f a₂ ↔ HasProd (f ∘ (↑) : ↑sᶜ → α) (a₂ / a₁)

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[TopologicalSpace α]
[TopologicalAddGroup α]
{f : β → α}
{a₁ a₂ : α}
{s : Set β}
(hf : HasSum (f ∘ Subtype.val) a₁)

HasSum f a₂ ↔ HasSum (f ∘ Subtype.val) (a₂ - a₁)


lemma isZero_quotient_obj_iff (C : HomologicalComplex V c) :
    IsZero ((quotient _ _).obj C) ↔ Nonempty (Homotopy (𝟙 C) 0)

{ι : Type u_2}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
(C : HomologicalComplex V c)

CategoryTheory.Limits.IsZero ((HomotopyCategory.quotient V c).obj C) ↔ Nonempty (Homotopy (𝟙 C) 0)


@[simp]
lemma leftHomologyMap'_zero (h₁ : S₁.LeftHomologyData) (h₂ : S₂.LeftHomologyData) :
    leftHomologyMap' 0 h₁ h₂ = 0

CategoryTheory.ShortComplex.leftHomologyMap' 0 h₁ h₂ = 0


/-- The reflection in `Kᗮ` of an element of `K` is its negation. -/
theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [HasOrthogonalProjection K] {v : E}
    (hv : v ∈ K) : reflection Kᗮ v = -v

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


/-- Forgetting the differentials than picking out the `i`-th object is the same as
just picking out the `i`-th object. -/
@[simps!]
def forgetEval (i : ι) : forget V c ⋙ GradedObject.eval i ≅ eval V c i

(HomologicalComplex.forgetEval V c i).hom.app X = 𝟙 (X.X i)


@[simp]
theorem clog_one_right (b : ℕ) : clog b (1 : R) = 0

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
(b : ℕ)


@[to_additive (attr := simp)]
lemma prod_erase [DecidableEq M] (ha : a ∈ l) : a * (l.erase a).prod = l.prod

{M : Type u_4}
[AddCommMonoid M]
{a : M}
{l : List M}
[DecidableEq M]
(ha : a ∈ l)


@[simp, norm_cast]
theorem coe_bot : ((⊥ : Regular α) : α) = ⊥


theorem comap_comap (g : F →L[ℝ] G) (f : E →L[ℝ] F) (S : ProperCone ℝ G) :
    (S.comap g).comap f = S.comap (g.comp f)

{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{F : Type u_2}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{G : Type u_3}
[NormedAddCommGroup G]
[InnerProductSpace ℝ G]
(g : F →L[ℝ] G)
(f : E →L[ℝ] F)
(S : ProperCone ℝ G)

ProperCone.comap f (ProperCone.comap g S) = ProperCone.comap (g.comp f) S


@[simp]
theorem toEquiv_pointReflection (x : P₁) :
    (pointReflection k x).toEquiv = Equiv.pointReflection x

(k : Type u_1)
{P₁ : Type u_2}
{V₁ : Type u_6}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
(x : P₁)

(AffineEquiv.pointReflection k x).toEquiv = Equiv.pointReflection x


/-- If a function tends to a product `g ×ˢ h` of filters, then its second component tends to
`h`. See also `Filter.Tendsto.snd_nhds` for the special case of converging to a point in a
product of two topological spaces. -/
theorem Tendsto.snd {h : Filter γ} {m : α → β × γ} (H : Tendsto m f (g ×ˢ h)) :
    Tendsto (fun a ↦ (m a).2) f h

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{g : Filter β}
{h : Filter γ}
{m : α → β × γ}
(H : Filter.Tendsto m f (g ×ˢ h))


@[to_additive]
theorem mulTSupport_eq_empty_iff {f : X → α} : mulTSupport f = ∅ ↔ f = 1

{X : Type u_1}
{α : Type u_2}
[Zero α]
[TopologicalSpace X]
{f : X → α}


@[simp 900]
theorem cocompact_eq_atBot_atTop [NoMaxOrder α] [NoMinOrder α]
    [OrderClosedTopology α] [CompactIccSpace α] : cocompact α = atBot ⊔ atTop

{α : Type u_2}
[LinearOrder α]
[TopologicalSpace α]
[NoMaxOrder α]
[NoMinOrder α]
[OrderClosedTopology α]
[CompactIccSpace α]

Filter.cocompact α = Filter.atBot ⊔ Filter.atTop


@[simp]
theorem isOrtho_sSup_left {U : Set (Submodule 𝕜 E)} {V : Submodule 𝕜 E} :
    sSup U ⟂ V ↔ ∀ Uᵢ ∈ U, Uᵢ ⟂ V

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{U : Set (Submodule 𝕜 E)}
{V : Submodule 𝕜 E}


@[simp]
theorem log_eq_zero_iff {b n : ℕ} : log b n = 0 ↔ n < b ∨ b ≤ 1


@[simp] theorem bne_self_eq_false [BEq α] [LawfulBEq α] (a : α) : (a != a) = false

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


@[simp]
theorem toOrdinal_eq_one (a) : toOrdinal a = 1 ↔ a = 1


theorem Disjoint.le_bot : Disjoint a b → a ⊓ b ≤ ⊥

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b : α}


lemma equalizerCondition_iff_isSheaf (F : Cᵒᵖ ⥤ D) [Preregular C]
    [∀ {Y X : C} (f : Y ⟶ X) [EffectiveEpi f], HasPullback f f] :
    EqualizerCondition F ↔ Presheaf.IsSheaf (regularTopology C) F

[∀ {Y X : C} (f : Y ⟶ X) [inst : CategoryTheory.EffectiveEpi f], CategoryTheory.Limits.HasPullback f f]

CategoryTheory.regularTopology.EqualizerCondition F ↔
  CategoryTheory.Presheaf.IsSheaf (CategoryTheory.regularTopology C) F


@[simp] theorem and_self_left  : ∀(a b : Bool), (a && (a && b)) = (a && b)


lemma inr_mem_sumLexLift {c₂ : γ₂} :
    inr c₂ ∈ sumLexLift f₁ f₂ g₁ g₂ a b ↔
      (∃ a₁ b₂, a = inl a₁ ∧ b = inr b₂ ∧ c₂ ∈ g₂ a₁ b₂) ∨
        ∃ a₂ b₂, a = inr a₂ ∧ b = inr b₂ ∧ c₂ ∈ f₂ a₂ b₂

{α₁ : Type u_1}
{α₂ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_4}
{γ₁ : Type u_5}
{γ₂ : Type u_6}
{f₁ : α₁ → β₁ → Finset γ₁}
{f₂ : α₂ → β₂ → Finset γ₂}
{g₁ : α₁ → β₂ → Finset γ₁}
{g₂ : α₁ → β₂ → Finset γ₂}
{a : α₁ ⊕ α₂}
{b : β₁ ⊕ β₂}
{c₂ : γ₂}

Sum.inr c₂ ∈ Finset.sumLexLift f₁ f₂ g₁ g₂ a b ↔
  (∃ a₁ b₂, a = Sum.inl a₁ ∧ b = Sum.inr b₂ ∧ c₂ ∈ g₂ a₁ b₂) ∨ ∃ a₂ b₂, a = Sum.inr a₂ ∧ b = Sum.inr b₂ ∧ c₂ ∈ f₂ a₂ b₂


theorem monotone_fst : Monotone (@Prod.fst α β)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]


@[simp]
theorem Finset.closure_biUnion {ι : Type*} (s : Finset ι) (f : ι → Set X) :
    closure (⋃ i ∈ s, f i) = ⋃ i ∈ s, closure (f i)

{X : Type u}
[TopologicalSpace X]
{ι : Type u_3}
(s : Finset ι)
(f : ι → Set X)


@[simp]
theorem map_one : map (fun (i : ι) ↦ (1 : s i →ₗ[R] s i)) = 1

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]


/-- The category of bicones on a given diagram. -/
@[simps]
instance Bicone.category : Category (Bicone F)

∀ {X Y Z : CategoryTheory.Limits.Bicone F} (f : X ⟶ Y) (g : Y ⟶ Z), (f ≫ g).hom = f.hom ≫ g.hom


theorem surjective_of_epi {X Y : Type u} (f : X ⟶ Y) [hf : Epi f] : Function.Surjective f

{X Y : Type u}
(f : X ⟶ Y)
[hf : CategoryTheory.Epi f]


/-- When `S₁.f` and `S₂.f` are zero and we have chosen limit kernel forks `c₁` and `c₂`
for `S₁.g` and `S₂.g` respectively, the action on right homology of a morphism `φ : S₁ ⟶ S₂` of
short complexes is given by the unique morphism `f : c₁.pt ⟶ c₂.pt` such that
`c₁.ι ≫ φ.τ₂ = f ≫ c₂.ι`. -/
@[simps]
def ofIsLimitKernelFork (φ : S₁ ⟶ S₂)
    (hf₁ : S₁.f = 0) (c₁ : KernelFork S₁.g) (hc₁ : IsLimit c₁)
    (hf₂ : S₂.f = 0) (c₂ : KernelFork S₂.g) (hc₂ : IsLimit c₂) (f : c₁.pt ⟶ c₂.pt)
    (comm : c₁.ι ≫ φ.τ₂ = f ≫ c₂.ι) :
    RightHomologyMapData φ (RightHomologyData.ofIsLimitKernelFork S₁ hf₁ c₁ hc₁)
      (RightHomologyData.ofIsLimitKernelFork S₂ hf₂ c₂ hc₂)

(c₁ : CategoryTheory.Limits.KernelFork S₁.g)

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

(c₂ : CategoryTheory.Limits.KernelFork S₂.g)

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

(comm :
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Fork.ι c₁) φ.τ₂ =
    CategoryTheory.CategoryStruct.comp f (CategoryTheory.Limits.Fork.ι c₂))

(CategoryTheory.ShortComplex.RightHomologyMapData.ofIsLimitKernelFork φ hf₁ c₁ hc₁ hf₂ c₂ hc₂ f comm).φH = f


@[to_additive (attr := simp)]
lemma mem_inv' : a ∈ s⁻¹ ↔ a⁻¹ ∈ s

{α : Type u_2}
[DecidableEq α]
[InvolutiveInv α]
{s : Finset α}
{a : α}

a ∈ s⁻¹ ↔ a⁻¹ ∈ s


lemma map_filter' {f : α → β} (hf : Injective f) (l : List α)
    [DecidablePred fun b => ∃ a, p a ∧ f a = b] :
    (l.filter p).map f = (l.map f).filter fun b => ∃ a, p a ∧ f a = b

[DecidablePred fun b => ∃ a, p a = true ∧ f a = b]

List.map f (List.filter p l) = List.filter (fun b => decide (∃ a, p a = true ∧ f a = b)) (List.map f l)


theorem sum_casesOn_right {f : α → β ⊕ γ} {g : α → β → σ} {h : α → γ →. σ} (hf : Computable f)
    (hg : Computable₂ g) (hh : Partrec₂ h) :
    @Partrec _ σ _ _ fun a => Sum.casesOn (f a) (fun b => Part.some (g a b)) (h a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
[Primcodable σ]
{f : α → β ⊕ γ}
{g : α → β → σ}
{h : α → γ →. σ}
(hf : Computable f)
(hg : Computable₂ g)
(hh : Partrec₂ h)

Partrec fun a => Sum.casesOn (f a) (fun b => Part.some (g a b)) (h a)


theorem ext_iff {e₁ e₂ : ENorm 𝕜 V} : e₁ = e₂ ↔ ∀ x, e₁ x = e₂ x

{𝕜 : Type u_1}
{V : Type u_2}
[NormedField 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
{e₁ e₂ : ENorm 𝕜 V}


{B : Type u_1}
{W : Type u_2}
[Group W]
{M : CoxeterMatrix B}
{cs : CoxeterSystem M W}
{t : W}
(ht : cs.IsReflection t)


@[simp]
theorem neg_apply (f : CentroidHom α) (a : α) : (-f) a = -f a

{α : Type u_5}
[NonUnitalNonAssocRing α]
(f : CentroidHom α)
(a : α)


theorem le_edist_of_le_einfsep {d x} (hx : x ∈ s) {y} (hy : y ∈ s) (hxy : x ≠ y)
    (hd : d ≤ s.einfsep) : d ≤ edist x y

{α : Type u_1}
[EDist α]
{s : Set α}
{d : ENNReal}
{x : α}
(hx : x ∈ s)
{y : α}
(hy : y ∈ s)
(hxy : x ≠ y)
(hd : d ≤ s.einfsep)


theorem Continuous.vsub {f g : α → P} (hf : Continuous f) (hg : Continuous g) :
    Continuous (f -ᵥ g)

{α : Type u_1}
{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[TopologicalSpace α]
{f g : α → P}
(hf : Continuous f)
(hg : Continuous g)


/-- `toIcoMod` as an equiv from the quotient. -/
@[simps symm_apply]
def QuotientAddGroup.equivIcoMod (a : α) : α ⧸ AddSubgroup.zmultiples p ≃ Set.Ico a (a + p)

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a : α)
(x : ↑(Set.Ico a (a + p)))

(QuotientAddGroup.equivIcoMod hp a).symm x = ↑↑x


@[simp]
theorem aleph'_le {o₁ o₂ : Ordinal} : aleph' o₁ ≤ aleph' o₂ ↔ o₁ ≤ o₂

Cardinal.aleph' o₁ ≤ Cardinal.aleph' o₂ ↔ o₁ ≤ o₂


@[simp] theorem perpBisector_eq_top : perpBisector p₁ p₂ = ⊤ ↔ p₁ = p₂

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ : P}

AffineSubspace.perpBisector p₁ p₂ = ⊤ ↔ p₁ = p₂


theorem one_sub_mem {t : β} (ht : t ∈ Ioo (0 : β) 1) : 1 - t ∈ Ioo (0 : β) 1

{β : Type u_2}
[OrderedRing β]
{t : β}
(ht : t ∈ Set.Ioo 0 1)


theorem toNonAssocSemiring_injective :
    Function.Injective (@toNonAssocSemiring R)


protected theorem congr_arg {f : 𝓕} :
    ∀ {x x' : E}, x = x' → f x = f x'

{E : Type u_5}
{E₂ : Type u_6}
{𝓕 : Type u_10}
[FunLike 𝓕 E E₂]
{f : 𝓕}
{x x' : E}


@[to_additive] lemma inv_lt_of_mabs_lt (h : |a|ₘ < b) : b⁻¹ < 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]


@[simp (high)]
theorem coe_comp {M N K : SemiNormedGrp₁} (f : M ⟶ N) (g : N ⟶ K) :
    (f ≫ g : M → K) = g ∘ f


theorem MeasurableSet.subtype_image {s : Set α} {t : Set s} (hs : MeasurableSet s) :
    MeasurableSet t → MeasurableSet (((↑) : s → α) '' t)

{α : Type u_1}
{m : MeasurableSpace α}
{s : Set α}
{t : Set ↑s}
(hs : MeasurableSet s)

MeasurableSet t → MeasurableSet (Subtype.val '' t)


theorem zero_morphism_ext' {P Q : C} (f : P ⟶ Q) : (∀ a, f a = 0) → 0 = f

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

(∀ (a : CategoryTheory.Abelian.Pseudoelement P), CategoryTheory.Abelian.Pseudoelement.pseudoApply f a = 0) → 0 = f


theorem mem_of_subset {s t : Multiset α} {a : α} (h : s ⊆ t) : a ∈ s → a ∈ t

{α : Type u_1}
{s t : Multiset α}
{a : α}
(h : s ⊆ t)


theorem map_ciSup (hf : LeftOrdContinuous f) {g : ι → α} (hg : BddAbove (range g)) :
    f (⨆ i, g i) = ⨆ i, f (g i)

{α : Type u}
{β : Type v}
{ι : Sort x}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
[Nonempty ι]
{f : α → β}
(hf : LeftOrdContinuous f)
{g : ι → α}
(hg : BddAbove (Set.range g))


@[simp]
theorem coe_nodup {l : List α} : @Nodup α l ↔ l.Nodup


@[simp]
theorem comp_zero (f : NormedAddGroupHom V₂ V₃) : f.comp (0 : NormedAddGroupHom V₁ V₂) = 0

{V₁ : Type u_2}
{V₂ : Type u_3}
{V₃ : Type u_4}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
[SeminormedAddCommGroup V₃]
(f : NormedAddGroupHom V₂ V₃)


@[trans]
theorem IsLittleO.trans_eventuallyEq {f : α → E} {g₁ g₂ : α → F} (h : f =o[l] g₁)
    (hg : g₁ =ᶠ[l] g₂) : f =o[l] g₂

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{l : Filter α}
{f : α → E}
{g₁ g₂ : α → F}
(h : f =o[l] g₁)
(hg : g₁ =ᶠ[l] g₂)


@[simp]
theorem mapIdx_eq_nil {f : ℕ → α → β} {l : List α} : List.mapIdx f l = [] ↔ l = []

{α : Type u}
{β : Type v}
{f : ℕ → α → β}
{l : List α}


@[simp]
theorem smeval_C : (C r).smeval x = r • x ^ 0

{R : Type u_1}
[Semiring R]
(r : R)
{S : Type u_2}
[AddCommMonoid S]
[Pow S ℕ]
[MulActionWithZero R S]
(x : S)


theorem Periodic.int_mul_eq [Ring α] (h : Periodic f c) (n : ℤ) : f (n * c) = f 0

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[Ring α]
(h : Function.Periodic f c)
(n : ℤ)


@[simp]
theorem union_singleton : s ∪ {a} = insert a s


/--
An `AddMonoid A` is `α`-divisible iff `n • x = a` has a solution for all `n ≠ 0 ∈ α` and `a ∈ A`.
Here we adopt a constructive approach where we ask an explicit `div : A → α → A` function such that
* `div a 0 = 0` for all `a ∈ A`
* `n • div a n = a` for all `n ≠ 0 ∈ α` and `a ∈ A`.
-/
class DivisibleBy where
  div : A → α → A
  div_zero : ∀ a, div a 0 = 0
  div_cancel : ∀ {n : α} (a : A), n ≠ 0 → n • div a n = a

{A : Type u_1}
{α : Type u_2}
[AddMonoid A]
[SMul α A]
[Zero α]
[self : DivisibleBy A α]
{n : α}
(a : A)


@[to_additive]
theorem CommGroup.is_simple_iff_isCyclic_and_prime_card [Fintype α] [CommGroup α] :
    IsSimpleGroup α ↔ IsCyclic α ∧ (Fintype.card α).Prime

{α : Type u}
[Fintype α]
[AddCommGroup α]

IsSimpleAddGroup α ↔ IsAddCyclic α ∧ Nat.Prime (Fintype.card α)


@[simp]
theorem flip_smul (c : 𝕜₃) (f : E →SL[σ₁₃] F →SL[σ₂₃] G) : (c • f).flip = c • f.flip

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{E : Type u_4}
{F : Type u_6}
{G : Type u_8}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜₃ G]
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
{σ₁₃ : 𝕜 →+* 𝕜₃}
[RingHomIsometric σ₂₃]
[RingHomIsometric σ₁₃]
(c : 𝕜₃)
(f : E →SL[σ₁₃] F →SL[σ₂₃] G)


theorem tsupport_smul_subset_right {M α} [TopologicalSpace X] [Zero α] [SMulZeroClass M α]
    (f : X → M) (g : X → α) : (tsupport fun x => f x • g x) ⊆ tsupport g

{X : Type u_1}
{M : Type u_10}
{α : Type u_11}
[TopologicalSpace X]
[Zero α]
[SMulZeroClass M α]
(f : X → M)
(g : X → α)


protected theorem mul_pos {f g : CauSeq α abs} : Pos f → Pos g → Pos (f * g)

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


@[to_additive (attr := simp)]
theorem inclusion_self (x : H) : inclusion le_rfl x = x

{G : Type u_1}
[Group G]
{S : Type u_6}
{H : S}
[SetLike S G]
[SubgroupClass S G]
(x : ↥H)


@[simp] lemma clog_zero_left (n : ℕ) : clog 0 n = 0


/-- Cauchy–Schwarz inequality with norm -/
theorem real_inner_le_norm (x y : F) : ⟪x, y⟫_ℝ ≤ ‖x‖ * ‖y‖

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

⟪x, y⟫_ℝ ≤ ‖x‖ * ‖y‖


theorem compatibility_N₂_N₁_karoubi :
    N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor =
      karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
        N₁ ⋙ (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
            Functor.mapHomologicalComplex (KaroubiKaroubi.equivalence C).inverse _

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]

AlgebraicTopology.DoldKan.N₂ ⋙ (CategoryTheory.Idempotents.karoubiChainComplexEquivalence C ℕ).functor =
  CategoryTheory.Idempotents.karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
    AlgebraicTopology.DoldKan.N₁ ⋙
      (CategoryTheory.Idempotents.karoubiChainComplexEquivalence (CategoryTheory.Idempotents.Karoubi C) ℕ).functor ⋙
        (CategoryTheory.Idempotents.KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)


@[simp]
theorem hasseDeriv_one : @hasseDeriv R _ 1 = derivative

Polynomial.hasseDeriv 1 = Polynomial.derivative


@[simp] lemma id_comp (f : α →*₀ β) : (id β).comp f = f

{α : Type u_2}
{β : Type u_3}
[MulZeroOneClass α]
[MulZeroOneClass β]
(f : α →*₀ β)


@[simp]
theorem isSubordinate_single [Fintype ι] (hJ : J ≤ I) (h : x ∈ Box.Icc I) :
    IsSubordinate (single I J hJ x h) r ↔ Box.Icc J ⊆ closedBall x (r x)

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
{x : ι → ℝ}
{r : (ι → ℝ) → ↑(Set.Ioi 0)}
[Fintype ι]
(hJ : J ≤ I)
(h : x ∈ BoxIntegral.Box.Icc I)

(BoxIntegral.TaggedPrepartition.single I J hJ x h).IsSubordinate r ↔ BoxIntegral.Box.Icc J ⊆ Metric.closedBall x ↑(r x)


lemma cotangentSpaceBasis_repr_one_tmul (x i) :
    P.cotangentSpaceBasis.repr (1 ⊗ₜ .D _ _ x) i = aeval P.val (pderiv i x)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
(P : Algebra.Generators R S)
(x : P.Ring)
(i : P.vars)

(P.cotangentSpaceBasis.repr (1 ⊗ₜ[P.Ring] (KaehlerDifferential.D R P.Ring) x)) i =
  (MvPolynomial.aeval P.val) ((MvPolynomial.pderiv i) x)


@[simp] lemma cast_pos : (0 : K) < q ↔ 0 < q

{K : Type u_5}
[LinearOrderedSemifield K]
{q : ℚ≥0}


/-- Given a diagram
```
a'        a --φ--> b
|         |        |
v         v        v
R' --g--> R --f--> S
```
such that `φ` is strongly cartesian, and morphisms `ψ ψ' : a' ⟶ a` such that
`g ≫ ψ = φ' = g ≫ ψ'`. Then we have that `ψ = ψ'`. -/
protected lemma ext (φ : a ⟶ b) [IsStronglyCartesian p f φ] {R' : 𝒮} {a' : 𝒳} (g : R' ⟶ R)
    {ψ ψ' : a' ⟶ a} [IsHomLift p g ψ] [IsHomLift p g ψ'] (h : ψ ≫ φ = ψ' ≫ φ) : ψ = ψ'

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₁} 𝒮]
[CategoryTheory.Category.{v₂, u₂} 𝒳]
(p : 𝒳 ⥤ 𝒮)
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
(φ : a ⟶ b)
[p.IsStronglyCartesian f φ]
{R' : 𝒮}
{a' : 𝒳}
(g : R' ⟶ R)
{ψ ψ' : a' ⟶ a}
[p.IsHomLift g ψ]
[p.IsHomLift g ψ']
(h : ψ ≫ φ = ψ' ≫ φ)


@[simp] lemma div_ofReal_re (z : ℂ) (x : ℝ) : (z / x).re = z.re / x


theorem measurePreserving_hausdorffMeasure (e : X ≃ᵢ Y) (d : ℝ) : MeasurePreserving e μH[d] μH[d]

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
[MeasurableSpace X]
[BorelSpace X]
[MeasurableSpace Y]
[BorelSpace Y]
(e : X ≃ᵢ Y)
(d : ℝ)

MeasureTheory.MeasurePreserving ⇑e μH[d] μH[d]


/-- Balls at the origin are balanced. -/
theorem balanced_ball_zero : Balanced 𝕜 (Metric.ball (0 : E) r)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
{r : ℝ}


theorem add_div_le_sum_sq_div_card (hst : s ⊆ t) (f : ι → 𝕜) (d : 𝕜) (hx : 0 ≤ x)
    (hs : x ≤ |(∑ i ∈ s, f i) / s.card - (∑ i ∈ t, f i) / t.card|)
    (ht : d ≤ ((∑ i ∈ t, f i) / t.card) ^ 2) :
    d + s.card / t.card * x ^ 2 ≤ (∑ i ∈ t, f i ^ 2) / t.card

(hs : x ≤ |(∑ i ∈ s, f i) / ↑s.card - (∑ i ∈ t, f i) / ↑t.card|)

(ht : d ≤ ((∑ i ∈ t, f i) / ↑t.card) ^ 2)

d + ↑s.card / ↑t.card * x ^ 2 ≤ (∑ i ∈ t, f i ^ 2) / ↑t.card


@[simp]
theorem stalkToFiberRingHom_germ (U : Opens (ProjectiveSpectrum.top 𝒜)) (x : U)
    (s : (Proj.structureSheaf 𝒜).1.obj (op U)) :
    stalkToFiberRingHom 𝒜 x ((Proj.structureSheaf 𝒜).presheaf.germ x s) = s.1 x

(U : TopologicalSpace.Opens ↑(ProjectiveSpectrum.top 𝒜))

(s : ↑((AlgebraicGeometry.ProjectiveSpectrum.Proj.structureSheaf 𝒜).val.obj (Opposite.op U)))

(AlgebraicGeometry.stalkToFiberRingHom 𝒜 ↑x)
    (((AlgebraicGeometry.ProjectiveSpectrum.Proj.structureSheaf 𝒜).presheaf.germ x) s) =
  ↑s x


theorem Basis.basis_union_of_subset (hI : M.Basis I X) (hJ : M.Indep J) (hIJ : I ⊆ J) :
    M.Basis J (J ∪ X)

{α : Type u_1}
{M : Matroid α}
{I J X : Set α}
(hI : M.Basis I X)
(hJ : M.Indep J)
(hIJ : I ⊆ J)


theorem one_mul (a : R) : (nat_lit 1).rawCast * a = a


theorem one_div_lt_one_div_of_lt (ha : 0 < a) (h : a < b) : 1 / b < 1 / a

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


/-- The inverse of the golden ratio is the opposite of its conjugate. -/
theorem inv_gold : φ⁻¹ = -ψ


@[to_additive]
theorem le_of_forall_one_lt_lt_mul (h : ∀ ε : α, 1 < ε → a < b * ε) : a ≤ b

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


/-- The inclusion of `R_hat` in `K_hat` as a ring homomorphism. -/
@[simps]
def Coe.ringHom : RingHom (R_hat R K) (K_hat R K)

(x : DedekindDomain.FiniteIntegralAdeles R K)

(v : IsDedekindDomain.HeightOneSpectrum R)

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


theorem isIso_map_iff {F₁ F₂ : C ⥤ D} (e : F₁ ≅ F₂) {X Y : C} (f : X ⟶ Y) :
    IsIso (F₁.map f) ↔ IsIso (F₂.map f)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F₁ F₂ : C ⥤ D}
(e : F₁ ≅ F₂)
{X Y : C}
(f : X ⟶ Y)

CategoryTheory.IsIso (F₁.map f) ↔ CategoryTheory.IsIso (F₂.map f)


theorem Sylow.conj_eq_normalizer_conj_of_mem_centralizer [Fact p.Prime] [Finite (Sylow p G)]
    (P : Sylow p G) (x g : G) (hx : x ∈ centralizer (P : Set G))
    (hy : g⁻¹ * x * g ∈ centralizer (P : Set G)) :
    ∃ n ∈ (P : Subgroup G).normalizer, g⁻¹ * x * g = n⁻¹ * x * n

(hy : g⁻¹ * x * g ∈ Subgroup.centralizer ↑P)

∃ n ∈ (↑P).normalizer, g⁻¹ * x * g = n⁻¹ * x * n


@[to_additive]
theorem eq_of_div_eq_one (h : a / b = 1) : a = b

{α : Type u_1}
[SubtractionMonoid α]
{a b : α}
(h : a - b = 0)


theorem mk_embedding_eq_arrow_of_le (le : #β ≤ #α) : #(β ↪ α) = #(β → α)

{α β : Type u}
[Infinite α]
(le : #β ≤ #α)


theorem count_le_of_le (a : α) {s t} : s ≤ t → count a s ≤ count a t

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

s ≤ t → Multiset.count a s ≤ Multiset.count a t


@[simp]
lemma exists_apply_eq_apply2' {α β γ} {f : α → β → γ} {a : α} {b : β} : ∃ x y, f a b = f x y

{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
{f : α → β → γ}
{a : α}
{b : β}


@[to_additive]
theorem Inseparable.const_smul {x y : α} (h : Inseparable x y) (c : M) :
    Inseparable (c • x) (c • y)

{M : Type u_1}
{α : Type u_2}
[TopologicalSpace α]
[VAdd M α]
[ContinuousConstVAdd M α]
{x y : α}
(h : Inseparable x y)
(c : M)


/-- The category of cones on `F` is just the comma category `(Δ ↓ F)`, where `Δ` is the constant
    functor. -/
@[simps! (config := { notRecursive := [`PLift, `ULift] })]
def Cone.equivCostructuredArrow (F : J ⥤ C) : Cone F ≌ CostructuredArrow (const J) F

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

((CategoryTheory.Limits.Cone.equivCostructuredArrow F).unitIso.inv.app X).hom = CategoryTheory.CategoryStruct.id X.pt


theorem leftLim_eq_sSup [TopologicalSpace α] [OrderTopology α] (h : 𝓝[<] x ≠ ⊥) :
    leftLim f x = sSup (f '' Iio x)

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Monotone f)
{x : α}
[TopologicalSpace α]
[OrderTopology α]
(h : 𝓝[<] x ≠ ⊥)

Function.leftLim f x = sSup (f '' Set.Iio x)


theorem algebraMap_apply' (x : S) :
    algebraMap S (HahnSeries Γ R) x = ofPowerSeries Γ R (algebraMap S (PowerSeries R) x)

(Γ : Type u_1)
{R : Type u_2}
[CommSemiring R]
[StrictOrderedSemiring Γ]
{S : Type u_4}
[CommSemiring S]
[Algebra S (PowerSeries R)]
(x : S)

(algebraMap S (HahnSeries Γ R)) x = (HahnSeries.ofPowerSeries Γ R) ((algebraMap S (PowerSeries R)) x)


theorem tendsto_atBot_isLUB (h_anti : Antitone f) (ha : IsLUB (Set.range f) a) :
    Tendsto f atBot (𝓝 a)

{α : Type u_1}
{ι : Type u_3}
[Preorder ι]
[TopologicalSpace α]
[Preorder α]
[SupConvergenceClass α]
{f : ι → α}
{a : α}
(h_anti : Antitone f)
(ha : IsLUB (Set.range f) a)


/-- Characterization of the `Filter.map` of the coproduct of two principal filters `𝓟 {a}` and
`𝓟 {i}`, under the `Prod.map` of two functions, respectively the constant function `fun a => b` and
the identity function.  Together with the previous lemma,
`map_const_principal_coprod_map_id_principal`, this provides an example showing that the inequality
in the lemma `map_prod_map_coprod_le` can be strict. -/
theorem map_prod_map_const_id_principal_coprod_principal {α β ι : Type*} (a : α) (b : β) (i : ι) :
    map (Prod.map (fun _ : α => b) id) ((𝓟 {a}).coprod (𝓟 {i})) =
      𝓟 (({b} : Set β) ×ˢ (univ : Set ι))

{α : Type u_6}
{β : Type u_7}
{ι : Type u_8}
(a : α)
(b : β)
(i : ι)

Filter.map (Prod.map (fun x => b) id) ((𝓟 {a}).coprod (𝓟 {i})) = 𝓟 ({b} ×ˢ Set.univ)


theorem traverse_def (f : α → m β) (x : t' α) :
    Equiv.traverse eqv f x = eqv β <$> traverse f ((eqv α).symm x)

{t t' : Type u → Type u}
(eqv : (α : Type u) → t α ≃ t' α)
[Traversable t]
{m : Type u → Type u}
[Applicative m]
{α β : Type u}
(f : α → m β)
(x : t' α)

Equiv.traverse eqv f x = ⇑(eqv β) <$> traverse f ((eqv α).symm x)


/-- Explicit formula for the norm of the Gaussian function along the vertical
edges. -/
theorem norm_cexp_neg_mul_sq_add_mul_I (b : ℂ) (c T : ℝ) :
    ‖cexp (-b * (T + c * I) ^ 2)‖ = exp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))

‖cexp (-b * (↑T + ↑c * Complex.I) ^ 2)‖ = rexp (-(b.re * T ^ 2 - 2 * b.im * c * T - b.re * c ^ 2))


private lemma ExtremallyDisconnected.homeoCompactToT2_injective [ExtremallyDisconnected A]
    [T2Space A] [T2Space E] [CompactSpace E] {ρ : E → A} (ρ_cont : Continuous ρ)
    (ρ_surj : ρ.Surjective) (zorn_subset : ∀ E₀ : Set E, E₀ ≠ univ → IsClosed E₀ → ρ '' E₀ ≠ univ) :
    ρ.Injective

(zorn_subset : ∀ (E₀ : Set E), E₀ ≠ Set.univ → IsClosed E₀ → ρ '' E₀ ≠ Set.univ)


@[simp, norm_cast]
theorem natCast_mul_eq_nsmul (x : ℝ) (n : ℕ) : ↑((n : ℝ) * x) = n • (↑x : Angle)


@[to_additive]
theorem continuousMul_of_comm_of_nhds_one (M : Type u) [CommMonoid M] [TopologicalSpace M]
    (hmul : Tendsto (uncurry ((· * ·) : M → M → M)) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))
    (hleft : ∀ x₀ : M, 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1)) : ContinuousMul M

(hmul : Filter.Tendsto (Function.uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))

(hleft : ∀ (x₀ : M), 𝓝 x₀ = Filter.map (fun x => x₀ * x) (𝓝 1))


/-- The function `(W.FunctorsInverting D) ⥤ (W.Localization ⥤ D)` induced by
`Construction.lift`. -/
@[simps!]
def inverse : W.FunctorsInverting D ⥤ W.Localization ⥤ D

{C : Type uC}
[CategoryTheory.Category.{uC', uC} C]
(W : CategoryTheory.MorphismProperty C)
(D : Type uD)
[CategoryTheory.Category.{uD', uD} D]

∀ {X Y : W.FunctorsInverting D} (τ : X ⟶ Y) (X_1 : W.Localization),
  ((CategoryTheory.Localization.Construction.WhiskeringLeftEquivalence.inverse W D).map τ).app X_1 =
    CategoryTheory.Localization.Construction.NatTransExtension.app
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
        (CategoryTheory.CategoryStruct.comp τ (CategoryTheory.eqToHom ⋯)))
      X_1


theorem surjective_comp_algebraMap_of_isSeparable {E : Type*}
    [Field E] [Algebra K E] [Algebra L E] [IsScalarTower K L E] [Algebra.IsSeparable L E] :
    Function.Surjective fun φ : E →ₐ[K] M ↦ φ.comp (IsScalarTower.toAlgHom K L E)

{K : Type u}
(L : Type v)
{M : Type w}
[Field K]
[Field L]
[Algebra K L]
[Field M]
[Algebra K M]
[IsSepClosed M]
{E : Type u_1}
[Field E]
[Algebra K E]
[Algebra L E]
[IsScalarTower K L E]
[Algebra.IsSeparable L E]

Function.Surjective fun φ => φ.comp (IsScalarTower.toAlgHom K L E)


@[to_additive]
theorem mk'_surjective : Surjective <| mk' N

{G : Type u}
[AddGroup G]
(N : AddSubgroup G)
[nN : N.Normal]


private theorem exists_minimizer : ∃ f ∈ candidatesB X Y, ∀ g ∈ candidatesB X Y, HD f ≤ HD g

(X : Type u)
(Y : Type v)
[MetricSpace X]
[CompactSpace X]
[Nonempty X]
[MetricSpace Y]
[CompactSpace Y]
[Nonempty Y]

∃ f ∈ GromovHausdorff.candidatesB X Y,
  ∀ g ∈ GromovHausdorff.candidatesB X Y, GromovHausdorff.HD f ≤ GromovHausdorff.HD g


@[to_additive]
theorem toMonoidHom_injective : Injective (toMonoidHom : M ≃* N → M →* N)

{M : Type u_6}
{N : Type u_7}
[MulOneClass M]
[MulOneClass N]


@[to_additive]
theorem ContMDiffWithinAt.prod (h : ∀ i ∈ t, ContMDiffWithinAt I' I n (f i) s x₀) :
    ContMDiffWithinAt I' I n (fun x ↦ ∏ i ∈ t, f i x) s x₀

ContMDiffWithinAt I' I n (fun x => ∑ i ∈ t, f i x) s x₀


/-- If a function tends to a product `g ×ˢ h` of filters, then its first component tends to
`g`. See also `Filter.Tendsto.fst_nhds` for the special case of converging to a point in a
product of two topological spaces. -/
theorem Tendsto.fst {h : Filter γ} {m : α → β × γ} (H : Tendsto m f (g ×ˢ h)) :
    Tendsto (fun a ↦ (m a).1) f g

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : Filter α}
{g : Filter β}
{h : Filter γ}
{m : α → β × γ}
(H : Filter.Tendsto m f (g ×ˢ h))


@[simp] theorem star_im : star a.im = -a.im

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


theorem Valid.dual_iff {t : Ordnode α} : Valid t ↔ @Valid αᵒᵈ _ (.dual t)

{α : Type u_1}
[Preorder α]
{t : Ordnode α}


theorem ContDiffWithinAt.contDiffAt (h : ContDiffWithinAt 𝕜 n f s x) (hx : s ∈ 𝓝 x) :
    ContDiffAt 𝕜 n f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ∞}
(h : ContDiffWithinAt 𝕜 n f s x)
(hx : s ∈ 𝓝 x)


theorem mul_mem {x y : ℝ} (hx : x ∈ I) (hy : y ∈ I) : x * y ∈ I

{x y : ℝ}
(hx : x ∈ unitInterval)
(hy : y ∈ unitInterval)


/-- An induction principle for closure membership for predicates with two arguments. -/
@[to_additive (attr := elab_as_elim)
      "An induction principle for additive closure membership, for
      predicates with two arguments."]
theorem closure_induction₂ {p : G → G → Prop} {x} {y : G} (hx : x ∈ closure k) (hy : y ∈ closure k)
    (Hk : ∀ x ∈ k, ∀ y ∈ k, p x y) (H1_left : ∀ x, p 1 x) (H1_right : ∀ x, p x 1)
    (Hmul_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ * x₂) y)
    (Hmul_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ * y₂)) (Hinv_left : ∀ x y, p x y → p x⁻¹ y)
    (Hinv_right : ∀ x y, p x y → p x y⁻¹) : p x y

(Hmul_left : ∀ (x₁ x₂ y : G), p x₁ y → p x₂ y → p (x₁ + x₂) y)

(Hmul_right : ∀ (x y₁ y₂ : G), p x y₁ → p x y₂ → p x (y₁ + y₂))

(Hinv_left : ∀ (x y : G), p x y → p (-x) y)

(Hinv_right : ∀ (x y : G), p x y → p x (-y))


@[to_additive] lemma mabs_zpow (n : ℤ) (a : α) : |a ^ n|ₘ = |a|ₘ ^ |n|

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


/-- The right inverse of an isometry is an isometry. -/
theorem right_inv {f : α → β} {g : β → α} (h : Isometry f) (hg : RightInverse g f) : Isometry g

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
{g : β → α}
(h : Isometry f)
(hg : Function.RightInverse g f)


theorem not_mem_setOfIdeal {I : Ideal C(X, R)} {x : X} :
    x ∉ setOfIdeal I ↔ ∀ ⦃f : C(X, R)⦄, f ∈ I → f x = 0

{X : Type u_1}
{R : Type u_2}
[TopologicalSpace X]
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
{I : Ideal C(X, R)}
{x : X}

x ∉ ContinuousMap.setOfIdeal I ↔ ∀ ⦃f : C(X, R)⦄, f ∈ I → f x = 0


theorem AlgebraicIndependent.mono {t s : Set A} (h : t ⊆ s)
    (hx : AlgebraicIndependent R ((↑) : s → A)) : AlgebraicIndependent R ((↑) : t → A)

(hx : AlgebraicIndependent R Subtype.val)


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

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

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

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

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


/-- If `E / F` is a purely inseparable field extension, `f` is a separable irreducible polynomial
over `F`, then it is also irreducible over `E`. -/
theorem Polynomial.Separable.map_irreducible_of_isPurelyInseparable {f : F[X]} (hsep : f.Separable)
    (hirr : Irreducible f) [IsPurelyInseparable F E] : Irreducible (f.map (algebraMap F E))

{F : Type u}
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
{f : F[X]}
(hsep : f.Separable)
(hirr : Irreducible f)
[IsPurelyInseparable F E]

Irreducible (Polynomial.map (algebraMap F E) f)


private lemma sups_aux : a ∈ upperClosure ↑(s ⊻ t) ↔ a ∈ upperClosure s ∧ a ∈ upperClosure t

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

a ∈ upperClosure ↑(s ⊻ t) ↔ a ∈ upperClosure ↑s ∧ a ∈ upperClosure ↑t


lemma norm_le_interpStrip_of_mem_verticalClosedStrip_eps (ε : ℝ) (hε : ε > 0) (z : ℂ)
    (hB : BddAbove ((norm ∘ f) '' (verticalClosedStrip 0 1)))
    (hd : DiffContOnCl ℂ f (verticalStrip 0 1)) (hz : z ∈ verticalClosedStrip 0 1) :
    ‖f z‖ ≤  ‖((ε + sSupNormIm f 0) ^ (1-z) * (ε + sSupNormIm f 1) ^ z : ℂ)‖

(hB : BddAbove (norm ∘ f '' Complex.HadamardThreeLines.verticalClosedStrip 0 1))

(hd : DiffContOnCl ℂ f (Complex.HadamardThreeLines.verticalStrip 0 1))

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

‖f z‖ ≤
  ‖(↑ε + ↑(Complex.HadamardThreeLines.sSupNormIm f 0)) ^ (1 - z) *
      (↑ε + ↑(Complex.HadamardThreeLines.sSupNormIm f 1)) ^ z‖


@[simp]
theorem union_left_iff : AEDisjoint μ (s ∪ t) u ↔ AEDisjoint μ s u ∧ AEDisjoint μ t u

{α : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t u : Set α}

MeasureTheory.AEDisjoint μ (s ∪ t) u ↔ MeasureTheory.AEDisjoint μ s u ∧ MeasureTheory.AEDisjoint μ t u


@[simp]
lemma sheafCompose_id : sheafCompose_map (F := F) J (𝟙 _) = 𝟙 _

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.sheafCompose_map J (CategoryTheory.CategoryStruct.id F) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.sheafCompose J F)


theorem eventuallyEq_iff_exists_mem {l : Filter α} {f g : α → β} :
    f =ᶠ[l] g ↔ ∃ s ∈ l, EqOn f g s

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


@[to_additive]
theorem mul_eq_one_iff_eq_inv : a * b = 1 ↔ a = b⁻¹


/-- If `s : ι → Set α` is a countable family of pairwise a.e. disjoint sets, then there exists a
family of measurable null sets `t i` such that `s i \ t i` are pairwise disjoint. -/
theorem exists_null_pairwise_disjoint_diff [Countable ι] {s : ι → Set α}
    (hd : Pairwise (AEDisjoint μ on s)) : ∃ t : ι → Set α, (∀ i, MeasurableSet (t i)) ∧
    (∀ i, μ (t i) = 0) ∧ Pairwise (Disjoint on fun i => s i \ t i)

(hd : Pairwise (MeasureTheory.AEDisjoint μ on s))

∃ t, (∀ (i : ι), MeasurableSet (t i)) ∧ (∀ (i : ι), μ (t i) = 0) ∧ Pairwise (Disjoint on fun i => s i \ t i)


@[reassoc (attr := simp)]
lemma singleObjHomologySelfIso_inv_homologyι :
    (singleObjHomologySelfIso _ _ _).inv ≫ ((single C c j).obj A).homologyι j =
      (singleObjOpcyclesSelfIso _ _ _).hom

(HomologicalComplex.singleObjHomologySelfIso c j A).inv ≫ ((HomologicalComplex.single C c j).obj A).homologyι j =
  (HomologicalComplex.singleObjOpcyclesSelfIso c j A).hom


theorem Fintype.card_subtype_mono (p q : α → Prop) (h : p ≤ q) [Fintype { x // p x }]
    [Fintype { x // q x }] : Fintype.card { x // p x } ≤ Fintype.card { x // q x }

{α : Type u_1}
(p q : α → Prop)
(h : p ≤ q)
[Fintype { x // p x }]
[Fintype { x // q x }]


@[simp]
lemma comp_autMap_apply {A B : C} [IsConnected A] [IsGalois B] (f : A ⟶ B) (σ : Aut A)
    (a : F.obj A) :
    F.map (autMap f σ).hom (F.map f a) = F.map f (F.map σ.hom a)

(F : CategoryTheory.Functor C FintypeCat)

F.map (CategoryTheory.PreGaloisCategory.autMap f σ).hom (F.map f a) = F.map f (F.map σ.hom a)


theorem extract : ∀ {s}, Valid s → Valid ⟨s.toString, b, e⟩ → Valid (s.extract b e)

s.Valid → { str := s.toString, startPos := b, stopPos := e }.Valid → (s.extract b e).Valid


@[simp]
protected theorem mul_one [Fintype n] [DecidableEq n] (M : Matrix m n α) :
    M * (1 : Matrix n n α) = M

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[NonAssocSemiring α]
[Fintype n]
[DecidableEq n]
(M : Matrix m n α)


theorem toReal_le_toReal {x y : EReal} (h : x ≤ y) (hx : x ≠ ⊥) (hy : y ≠ ⊤) :
    x.toReal ≤ y.toReal


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

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

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


theorem inter_eq_self_of_subset_left {s t : Set α} : s ⊆ t → s ∩ t = s


theorem integrableOn_Iic_iff_integrableOn_Iio :
    IntegrableOn f (Iic b) μ ↔ IntegrableOn f (Iio b) μ

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
[PartialOrder α]
[MeasurableSingletonClass α]
{f : α → E}
{μ : MeasureTheory.Measure α}
{b : α}
[MeasureTheory.NoAtoms μ]

MeasureTheory.IntegrableOn f (Set.Iic b) μ ↔ MeasureTheory.IntegrableOn f (Set.Iio b) μ


theorem IsTopologicalBasis.exists_subset_of_mem_open {b : Set (Set α)} (hb : IsTopologicalBasis b)
    {a : α} {u : Set α} (au : a ∈ u) (ou : IsOpen u) : ∃ v ∈ b, a ∈ v ∧ v ⊆ u

(hb : TopologicalSpace.IsTopologicalBasis b)


@[simp, norm_cast]
lemma MonoidHom.coe_toMultiplicative [MulOneClass α] [MulOneClass β] (f : α →* β) :
    ⇑(toAdditive f) = ofMul ∘ f ∘ toMul

{α : Type u}
{β : Type v}
[MulOneClass α]
[MulOneClass β]
(f : α →* β)

⇑(MonoidHom.toAdditive f) = ⇑Additive.ofMul ∘ ⇑f ∘ ⇑Additive.toMul


theorem dvd_out_iff (a : α) (b : Associates α) : a ∣ b.out ↔ Associates.mk a ≤ b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
(a : α)
(b : Associates α)


theorem map_prod_map {δ} [MeasurableSpace δ] {f : α → β} {g : γ → δ} (μa : Measure α)
    (μc : Measure γ) [SFinite μa] [SFinite μc] (hf : Measurable f) (hg : Measurable g) :
    (map f μa).prod (map g μc) = map (Prod.map f g) (μa.prod μc)

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[MeasurableSpace α]
[MeasurableSpace β]
[MeasurableSpace γ]
{δ : Type u_7}
[MeasurableSpace δ]
{f : α → β}
{g : γ → δ}
(μa : MeasureTheory.Measure α)
(μc : MeasureTheory.Measure γ)
[MeasureTheory.SFinite μa]
[MeasureTheory.SFinite μc]
(hf : Measurable f)
(hg : Measurable g)

(MeasureTheory.Measure.map f μa).prod (MeasureTheory.Measure.map g μc) =
  MeasureTheory.Measure.map (Prod.map f g) (μa.prod μc)


theorem interedges_biUnion_right (s : Finset α) (t : Finset ι) (f : ι → Finset α) :
    G.interedges s (t.biUnion f) = t.biUnion fun b ↦ G.interedges s (f b)

{ι : Type u_2}
{α : Type u_4}
(G : SimpleGraph α)
[DecidableRel G.Adj]
[DecidableEq α]
(s : Finset α)
(t : Finset ι)
(f : ι → Finset α)

G.interedges s (t.biUnion f) = t.biUnion fun b => G.interedges s (f b)


private theorem choose_choose_eq_of_mapsTo :
    (exist_eq_reflection_of_mapsTo p root coroot i
      (exist_eq_reflection_of_mapsTo p root coroot i j h).choose h).choose = j

(h :
  ∀ (i : ι),
    Set.MapsTo (⇑(Module.preReflection (root i) (p.toLin.flip (coroot i)))) (Set.range ⇑root) (Set.range ⇑root))

(hp : ∀ (i : ι), (p.toLin (root i)) (coroot i) = 2)


theorem mul_norm_eq_abs_sub_sq_norm {x y z : V} (h₁ : ∃ k : ℝ, k ≠ 1 ∧ x + y = k • (x - y))
    (h₂ : ‖z - y‖ = ‖z + y‖) : ‖x - y‖ * ‖x + y‖ = |‖z + y‖ ^ 2 - ‖z - x‖ ^ 2|

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y z : V}
(h₁ : ∃ k, k ≠ 1 ∧ x + y = k • (x - y))
(h₂ : ‖z - y‖ = ‖z + y‖)


@[simp]
theorem domDomCongr_zero (σ : ι ≃ ι') : (0 : M [⋀^ι]→ₗ[R] N).domDomCongr σ = 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}
{ι' : Type u_8}
(σ : ι ≃ ι')


@[simp] lemma image_add_left_Ioc (a b c : α) : (Ioc a b).image (c + ·) = Ioc (c + a) (c + b)

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

Finset.image (fun x => c + x) (Finset.Ioc a b) = Finset.Ioc (c + a) (c + b)


theorem EventuallyEq.prod_map {δ} {la : Filter α} {fa ga : α → γ} (ha : fa =ᶠ[la] ga)
    {lb : Filter β} {fb gb : β → δ} (hb : fb =ᶠ[lb] gb) :
    Prod.map fa fb =ᶠ[la ×ˢ lb] Prod.map ga gb

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_6}
{la : Filter α}
{fa ga : α → γ}
(ha : fa =ᶠ[la] ga)
{lb : Filter β}
{fb gb : β → δ}
(hb : fb =ᶠ[lb] gb)


lemma slope_le_derivWithin (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f S x) :
    slope f x y ≤ derivWithin f S x

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


theorem _root_.RingHom.map_adjugate {R S : Type*} [CommRing R] [CommRing S] (f : R →+* S)
    (M : Matrix n n R) : f.mapMatrix M.adjugate = Matrix.adjugate (f.mapMatrix M)

{n : Type v}
[DecidableEq n]
[Fintype n]
{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
(f : R →+* S)
(M : Matrix n n R)

f.mapMatrix M.adjugate = (f.mapMatrix M).adjugate


lemma yoneda_exact₃ {X : C} (f : T.obj₃ ⟶ X) (hf : T.mor₂ ≫ f = 0) :
    ∃ (g : T.obj₁⟦(1 : ℤ)⟧ ⟶ X), f = T.mor₃ ≫ g

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


/-- `Unique_Mul` is preserved under multiplicative maps that are injective.

See `UniqueMul.mulHom_map_iff` for a version with swapped bundling. -/
@[to_additive
      "`UniqueAdd` is preserved under additive maps that are injective.

See `UniqueAdd.addHom_map_iff` for a version with swapped bundling."]
theorem mulHom_image_iff [DecidableEq H] (f : G →ₙ* H) (hf : Function.Injective f) :
    UniqueMul (A.image f) (B.image f) (f a0) (f b0) ↔ UniqueMul A B a0 b0

{G : Type u_1}
{H : Type u_2}
[Add G]
[Add H]
{A B : Finset G}
{a0 b0 : G}
[DecidableEq H]
(f : AddHom G H)
(hf : Function.Injective ⇑f)

UniqueAdd (Finset.image (⇑f) A) (Finset.image (⇑f) B) (f a0) (f b0) ↔ UniqueAdd A B a0 b0


@[simp]
protected theorem map_add : (p + q).map f = p.map f + q.map f

{R : Type u}
{S : Type v}
[Semiring R]
{p q : R[X]}
[Semiring S]
(f : R →+* S)

Polynomial.map f (p + q) = Polynomial.map f p + Polynomial.map f q


@[to_additive (attr := simp)]
theorem op_bot : (⊥ : Subgroup G).op = ⊥


@[simp]
theorem Ioi_diff_Ioi : Ioi a \ Ioi b = Ioc a b

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


@[simp]
theorem snd_comp_mk (x : α) : Prod.snd ∘ (Prod.mk x : β → α × β) = id


/-- Composition of two isomorphisms -/
@[trans, simps]
def trans (α : X ≅ Y) (β : Y ≅ Z) : X ≅ Z

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
(α : X ≅ Y)
(β : Y ≅ Z)

(α ≪≫ β).hom = CategoryTheory.CategoryStruct.comp α.hom β.hom


theorem exists_multiset_roots [DecidableEq R] :
    ∀ {p : R[X]} (_ : p ≠ 0), ∃ s : Multiset R,
      (Multiset.card s : WithBot ℕ) ≤ degree p ∧ ∀ a, s.count a = rootMultiplicity a p

{R : Type u}
[CommRing R]
[IsDomain R]
[DecidableEq R]
{p : R[X]}

p ≠ 0 → ∃ s, ↑(Multiset.card s) ≤ p.degree ∧ ∀ (a : R), Multiset.count a s = Polynomial.rootMultiplicity a p


theorem isClosedMap_sum {f : X ⊕ Y → Z} :
    IsClosedMap f ↔ (IsClosedMap fun a => f (.inl a)) ∧ IsClosedMap fun b => f (.inr b)

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X ⊕ Y → Z}

IsClosedMap f ↔ (IsClosedMap fun a => f (Sum.inl a)) ∧ IsClosedMap fun b => f (Sum.inr b)


theorem mem_asymm {x y : PSet} : x ∈ y → y ∉ x


theorem inf'_sup_distrib_left (f : ι → α) (a : α) : a ⊔ s.inf' hs f = s.inf' hs fun i => a ⊔ f i

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


@[simp]
theorem mem_Ioc : x ∈ Ioc a b ↔ a < x ∧ x ≤ b


/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise multiplication of
`f` and `g`, which antivary together, is strictly decreased by a permutation if and only if
`f ∘ σ` and `g` do not antivary together. Stated by permuting the entries of `f`. -/
theorem AntivaryOn.sum_mul_lt_sum_comp_perm_mul_iff (hfg : AntivaryOn f g s)
    (hσ : {x | σ x ≠ x} ⊆ s) :
    ∑ i ∈ s, f i * g i < ∑ i ∈ s, f (σ i) * g i ↔ ¬AntivaryOn (f ∘ σ) g s

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedRing α]
{s : Finset ι}
{σ : Equiv.Perm ι}
{f g : ι → α}
(hfg : AntivaryOn f g ↑s)
(hσ : {x | σ x ≠ x} ⊆ ↑s)

∑ i ∈ s, f i * g i < ∑ i ∈ s, f (σ i) * g i ↔ ¬AntivaryOn (f ∘ ⇑σ) g ↑s


theorem unop_sup (S₁ S₂ : Subring Rᵐᵒᵖ) : (S₁ ⊔ S₂).unop = S₁.unop ⊔ S₂.unop

{R : Type u_2}
[Ring R]
(S₁ S₂ : Subring Rᵐᵒᵖ)


/-- `Sigma` type with a constant fiber is equivalent to the product. -/
@[simps (config := { attrs := [`mfld_simps] }) apply symm_apply]
def sigmaEquivProd (α β : Type*) : (Σ _ : α, β) ≃ α × β

(Equiv.sigmaEquivProd α β) a = (a.fst, a.snd)


theorem diag_submatrix (A : Matrix m m α) (e : l → m) : diag (A.submatrix e e) = A.diag ∘ e

{l : Type u_1}
{m : Type u_2}
{α : Type v}
(A : Matrix m m α)
(e : l → m)


theorem sub_le_of_abs_sub_le_right (h : |a - b| ≤ c) : a - c ≤ b

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b c : α}
(h : |a - b| ≤ c)


@[simp]
theorem map_isFunc {f : ZFSet → ZFSet} [Definable 1 f] {x y : ZFSet} :
    IsFunc x y (map f x) ↔ ∀ z ∈ x, f z ∈ y

{f : ZFSet → ZFSet}
[PSet.Definable 1 f]
{x y : ZFSet}

x.IsFunc y (ZFSet.map f x) ↔ ∀ z ∈ x, f z ∈ y


@[to_additive (attr := simp)]
theorem traverse_pure' : traverse F ∘ pure = fun x ↦ (pure <$> F x : m (FreeSemigroup β))

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

traverse F ∘ pure = fun x => pure <$> F x


@[simp]
theorem parallelPair_map_right (f g : X ⟶ Y) : (parallelPair f g).map right = g

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

(CategoryTheory.Limits.parallelPair f g).map CategoryTheory.Limits.WalkingParallelPairHom.right = g


theorem diam_Ioc {a b : ℝ} (h : a ≤ b) : Metric.diam (Ioc a b) = b - a


/-- `Fin.addNat` as an `OrderEmbedding`.

`addNatOrderEmb m i` adds `m` to `i`, generalizes `Fin.succ`. -/
@[simps! apply toEmbedding]
def addNatOrderEmb (m) : Fin n ↪o Fin (n + m)

(Fin.addNatOrderEmb m).toEmbedding = { toFun := fun x => x.addNat m, inj' := ⋯ }


@[to_additive]
theorem AEMeasurable.mul_iff_left {G : Type*} [MeasurableSpace G] [MeasurableSpace α] [CommGroup G]
    [MeasurableMul₂ G] [MeasurableInv G] {μ : Measure α} {f g : α → G} (hf : AEMeasurable f μ) :
    AEMeasurable (g * f) μ ↔ AEMeasurable g μ

{α : Type u_1}
{G : Type u_2}
[MeasurableSpace G]
[MeasurableSpace α]
[AddCommGroup G]
[MeasurableAdd₂ G]
[MeasurableNeg G]
{μ : MeasureTheory.Measure α}
{f g : α → G}
(hf : AEMeasurable f μ)

AEMeasurable (g + f) μ ↔ AEMeasurable g μ


@[simp]
theorem isDiag_transpose_iff [Zero α] {A : Matrix n n α} : Aᵀ.IsDiag ↔ A.IsDiag

{α : Type u_1}
{n : Type u_4}
[Zero α]
{A : Matrix n n α}


theorem IsBounded.mono (h : f ≤ g) : IsBounded r g → IsBounded r f

{α : Type u_1}
{r : α → α → Prop}
{f g : Filter α}
(h : f ≤ g)

Filter.IsBounded r g → Filter.IsBounded r f


/-- If `K` admits an orthogonal projection, `K` and `Kᗮ` are complements of each other. -/
theorem Submodule.isCompl_orthogonal_of_completeSpace [HasOrthogonalProjection K] : IsCompl K Kᗮ

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


@[to_additive (attr := simp)]
theorem mem_range {f : G →* N} {y : N} : y ∈ f.range ↔ ∃ x, f x = y

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
{f : G →* N}
{y : N}


/-- The indicator functions of `Asᵢ` evaluated at `x` tend to the indicator function of `A`
evaluated at `x` if and only if we eventually have the equivalence `x ∈ Asᵢ ↔ x ∈ A`. -/
@[simp] lemma tendsto_indicator_const_apply_iff_eventually [T1Space β] (b : β) [NeZero b]
    (x : α) :
    Tendsto (fun i ↦ (As i).indicator (fun (_ : α) ↦ b) x) L (𝓝 (A.indicator (fun (_ : α) ↦ b) x))
      ↔ ∀ᶠ i in L, (x ∈ As i ↔ x ∈ A)

{α : Type u_1}
{A : Set α}
{β : Type u_2}
[Zero β]
[TopologicalSpace β]
{ι : Type u_3}
(L : Filter ι)
{As : ι → Set α}
[T1Space β]
(b : β)
[NeZero b]
(x : α)

Filter.Tendsto (fun i => (As i).indicator (fun x => b) x) L (𝓝 (A.indicator (fun x => b) x)) ↔
  ∀ᶠ (i : ι) in L, x ∈ As i ↔ x ∈ A


theorem surjOn_iff_surjective : SurjOn f s univ ↔ Surjective (s.restrict f)

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

Set.SurjOn f s Set.univ ↔ Function.Surjective (s.restrict f)


@[simp]
lemma equicontinuousWithinAt_empty [h : IsEmpty ι] (F : ι → X → α) (S : Set X) (x₀ : X) :
    EquicontinuousWithinAt F S x₀

{ι : Type u_1}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
[h : IsEmpty ι]
(F : ι → X → α)
(S : Set X)
(x₀ : X)


@[simp] protected theorem zero_dvd {n : Int} : 0 ∣ n ↔ n = 0


@[simp]
theorem diag_obj (X : C) : (diag C).obj X = (X, X)

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

(CategoryTheory.Functor.diag C).obj X = (X, X)


theorem not_forall₂ : (¬∀ x h, P x h) ↔ ∃ x h, ¬P x h

{α : Sort u_1}
{p : α → Prop}
{P : (x : α) → p x → Prop}

(¬∀ (x : α) (h : p x), P x h) ↔ ∃ x h, ¬P x h


theorem frontier_Iio [NoMinOrder α] {a : α} : frontier (Iio a) = {a}

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
[NoMinOrder α]
{a : α}


theorem pairwiseDisjoint_insert {i : ι} :
    (insert i s).PairwiseDisjoint f ↔
      s.PairwiseDisjoint f ∧ ∀ j ∈ s, i ≠ j → Disjoint (f i) (f j)

{α : Type u_1}
{ι : Type u_4}
[PartialOrder α]
[OrderBot α]
{s : Set ι}
{f : ι → α}
{i : ι}


@[reassoc]
lemma ProjectiveResolution.isoLeftDerivedObj_inv_naturality
    {X Y : C} (f : X ⟶ Y) (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f)
    (F : C ⥤ D) [F.Additive] (n : ℕ) :
    (P.isoLeftDerivedObj F n).inv ≫ (F.leftDerived n).map f =
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map φ ≫
          (Q.isoLeftDerivedObj F n).inv

(P : CategoryTheory.ProjectiveResolution X)

(Q : CategoryTheory.ProjectiveResolution Y)

(comm : CategoryTheory.CategoryStruct.comp (φ.f 0) (Q.π.f 0) = CategoryTheory.CategoryStruct.comp (P.π.f 0) f)

CategoryTheory.CategoryStruct.comp (P.isoLeftDerivedObj F n).inv ((F.leftDerived n).map f) =
  CategoryTheory.CategoryStruct.comp
    (((F.mapHomologicalComplex (ComplexShape.down ℕ)).comp
          (HomologicalComplex.homologyFunctor D (ComplexShape.down ℕ) n)).map
      φ)
    (Q.isoLeftDerivedObj F n).inv


/-- Given an affinely independent family of points, suppose that an affine combination lies in
the span of two points given as affine combinations, and suppose that, for two indices, the
coefficients in the first point in the span are zero and those in the second point in the span
have the same sign. Then the coefficients in the combination lying in the span have the same
sign. -/
theorem sign_eq_of_affineCombination_mem_affineSpan_pair {p : ι → P} (h : AffineIndependent k p)
    {w w₁ w₂ : ι → k} {s : Finset ι} (hw : ∑ i ∈ s, w i = 1) (hw₁ : ∑ i ∈ s, w₁ i = 1)
    (hw₂ : ∑ i ∈ s, w₂ i = 1)
    (hs :
      s.affineCombination k p w ∈ line[k, s.affineCombination k p w₁, s.affineCombination k p w₂])
    {i j : ι} (hi : i ∈ s) (hj : j ∈ s) (hi0 : w₁ i = 0) (hj0 : w₁ j = 0)
    (hij : SignType.sign (w₂ i) = SignType.sign (w₂ j)) :
    SignType.sign (w i) = SignType.sign (w j)

(hs :
  (Finset.affineCombination k s p) w ∈
    affineSpan k {(Finset.affineCombination k s p) w₁, (Finset.affineCombination k s p) w₂})


@[ext]
lemma SecondObj.ext (z₁ z₂ : SecondObj P X π) (h : ∀ ij, (Pi.π _ ij : SecondObj P X π ⟶ _) z₁ =
    (Pi.π _ ij : SecondObj P X π ⟶ _) z₂) : z₁ = z₂

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

(z₁ z₂ : CategoryTheory.Equalizer.Presieve.Arrows.SecondObj P X π)

(h :
  ∀ (ij : I × I),
    CategoryTheory.Limits.Pi.π (fun ij => P.obj (Opposite.op (CategoryTheory.Limits.pullback (π ij.1) (π ij.2)))) ij
        z₁ =
      CategoryTheory.Limits.Pi.π (fun ij => P.obj (Opposite.op (CategoryTheory.Limits.pullback (π ij.1) (π ij.2)))) ij
        z₂)


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

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


nonrec theorem prodMap {f₀ f₁ : C(X, Y)} {g₀ g₁ : C(Z, Z')} :
    Homotopic f₀ f₁ → Homotopic g₀ g₁ → Homotopic (f₀.prodMap g₀) (f₁.prodMap g₁)

{X : Type u}
{Y : Type v}
{Z : Type w}
{Z' : Type x}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
[TopologicalSpace Z']
{f₀ f₁ : C(X, Y)}
{g₀ g₁ : C(Z, Z')}

f₀.Homotopic f₁ → g₀.Homotopic g₁ → (f₀.prodMap g₀).Homotopic (f₁.prodMap g₁)


@[to_additive]
theorem mul_left_inj (h : IsUnit a) : b * a = c * a ↔ b = c

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


@[to_additive]
lemma prod_mulIndicator_eq_prod_filter (s : Finset ι) (f : ι → κ → β) (t : ι → Set κ) (g : ι → κ)
    [DecidablePred fun i ↦ g i ∈ t i] :
    ∏ i ∈ s, mulIndicator (t i) (f i) (g i) = ∏ i ∈ s.filter fun i ↦ g i ∈ t i, f i (g i)

{ι : Type u_1}
{β : Type u_4}
[AddCommMonoid β]
{κ : Type u_6}
(s : Finset ι)
(f : ι → κ → β)
(t : ι → Set κ)
(g : ι → κ)
[DecidablePred fun i => g i ∈ t i]

∑ i ∈ s, (t i).indicator (f i) (g i) = ∑ i ∈ Finset.filter (fun i => g i ∈ t i) s, f i (g i)


lemma rpow_lt_rpow_iff_of_neg (hx : 0 < x) (hy : 0 < y) (hz : z < 0) : x ^ z < y ^ z ↔ y < x


@[norm_cast]
theorem coe_div (U₁ U₂ : unitary R) : ↑(U₁ / U₂) = (U₁ / U₂ : R)

{R : Type u_1}
[GroupWithZero R]
[StarMul R]
(U₁ U₂ : ↥(unitary R))


theorem proj_fiber (x : hs.Quotient) : hs.proj ⁻¹' {x} = s (hs.equivQuotient.symm x)

{ι : Type u_1}
{α : Type u_2}
{s : ι → Set α}
(hs : IndexedPartition s)
(x : hs.Quotient)


theorem wordProd_mul_getD_rightInvSeq (ω : List B) (j : ℕ) :
    π ω * ((ris ω).getD j 1) = π (ω.eraseIdx j)

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

cs.wordProd ω * (cs.rightInvSeq ω).getD j 1 = cs.wordProd (ω.eraseIdx j)


(CategoryTheory.CategoryStruct.comp F G).f = CategoryTheory.CategoryStruct.comp F.f G.f


theorem withTopEquiv_natCast (n : Nat) : withTopEquiv n = n


@[to_additive]
theorem prod_embDomain [Zero M] [CommMonoid N] {v : α →₀ M} {f : α ↪ β} {g : β → M → N} :
    (v.embDomain f).prod g = v.prod fun a b => g (f a) b

{α : Type u_1}
{β : Type u_7}
{M : Type u_8}
{N : Type u_10}
[Zero M]
[CommMonoid N]
{v : α →₀ M}
{f : α ↪ β}
{g : β → M → N}

(Finsupp.embDomain f v).prod g = v.prod fun a b => g (f a) b


@[simp]
theorem Subtype.orderIsoOfNat_apply [dP : DecidablePred (· ∈ s)] {n : ℕ} :
    Subtype.orderIsoOfNat s n = Subtype.ofNat s n

{s : Set ℕ}
[Infinite ↑s]
[dP : DecidablePred fun x => x ∈ s]
{n : ℕ}

(Nat.Subtype.orderIsoOfNat s) n = Nat.Subtype.ofNat s n


/-- The norm of a `NonUnitalNormedRing` as a `RingNorm`. -/
@[simps!]
def normRingNorm (R : Type*) [NonUnitalNormedRing R] : RingNorm R

∀ (a : R), (normRingNorm R).toFun a = ‖a‖


theorem image2_comm {g : β → α → γ} (h_comm : ∀ a b, f a b = g b a) : image2 f s t = image2 g t s

{f : α → β → γ}

{g : β → α → γ}

(h_comm : ∀ (a : α) (b : β), f a b = g b a)


/-- Two finite measures give equal values to all closed sets if the integrals of all bounded
continuous functions with respect to the two measures agree. -/
theorem measure_isClosed_eq_of_forall_lintegral_eq_of_isFiniteMeasure {Ω : Type*}
    [MeasurableSpace Ω] [TopologicalSpace Ω] [HasOuterApproxClosed Ω]
    [OpensMeasurableSpace Ω] {μ ν : Measure Ω} [IsFiniteMeasure μ]
    (h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ x, f x ∂μ = ∫⁻ x, f x ∂ν) {F : Set Ω} (F_closed : IsClosed F) :
    μ F = ν F

(h : ∀ (f : Ω →ᵇ ℝ≥0), ∫⁻ (x : Ω), ↑(f x) ∂μ = ∫⁻ (x : Ω), ↑(f x) ∂ν)


@[simp]
theorem zero_comp (f : α →ₙ+* β) : (0 : β →ₙ+* γ).comp f = 0

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[NonUnitalNonAssocSemiring α]
[NonUnitalNonAssocSemiring β]
[NonUnitalNonAssocSemiring γ]
(f : α →ₙ+* β)


@[simp, norm_cast] -- Porting note: add `simp`
theorem coe_iSup {ι : Sort*} (s : ι → ℝ≥0) : (↑(⨆ i, s i) : ℝ) = ⨆ i, ↑(s i)


@[ext]
theorem PartialOrder.toPreorder_injective :
    Function.Injective (@PartialOrder.toPreorder α)


@[simp]
theorem neg_equiv_zero_iff {x : PGame} : (-x ≈ 0) ↔ (x ≈ 0)


@[simp]
lemma comp_apply (g : C(Y, R)₀) (f : C(X, Y)₀) (x : X) : g.comp f x = g (f x)

{X : Type u_1}
{Y : Type u_2}
{R : Type u_3}
[Zero X]
[Zero Y]
[Zero R]
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace R]
(g : ContinuousMapZero Y R)
(f : ContinuousMapZero X Y)
(x : X)


theorem LinearMap.lTensor_range :
    range (lTensor Q g) =
      range (lTensor Q (Submodule.subtype (range g)))

{R : Type u_1}
[CommSemiring R]
{N : Type u_3}
{P : Type u_4}
(Q : Type u_5)
[AddCommMonoid N]
[AddCommMonoid P]
[AddCommMonoid Q]
[Module R N]
[Module R P]
[Module R Q]
{g : N →ₗ[R] P}

LinearMap.range (LinearMap.lTensor Q g) = LinearMap.range (LinearMap.lTensor Q (LinearMap.range g).subtype)


theorem C_eq_coe_nat (n : ℕ) : (C ↑n : MvPolynomial σ R) = n

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(n : ℕ)


theorem next_reverse_eq_prev (l : List α) (h : Nodup l) (x : α) (hx : x ∈ l) :
    next l.reverse x (mem_reverse.mpr hx) = prev l x hx

{α : Type u_1}
[DecidableEq α]
(l : List α)
(h : l.Nodup)
(x : α)
(hx : x ∈ l)


lemma pullbackFst_apply (f : X ⟶ Z) (g : Y ⟶ Z) (x) : pullbackFst f g x = x.1.1

(x : ↑(TopCat.of { p // f p.1 = g p.2 }))


@[simp]
theorem top_sub_ofNat (a : ℕ) [a.AtLeastTwo] : (⊤ : ℕ∞) - (no_index (OfNat.ofNat a)) = ⊤


theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x

(hx : x ∈ RightDerivMeasurableAux.A f L r ε)

RightDerivMeasurableAux.A f L r ε ∈ 𝓝[>] x


theorem map_id {p : α → Prop} {h : ∀ a, p a → p (id a)} : map (@id α) h = id

{α : Sort u_1}
{p : α → Prop}
{h : ∀ (a : α), p a → p (id a)}


/-- Two functions antivary iff the rearrangement inequality holds. -/
lemma antivaryOn_iff_mul_rearrangement :
    AntivaryOn f g s ↔
      ∀ ⦃i⦄, i ∈ s → ∀ ⦃j⦄, j ∈ s → f i * g i + f j * g j ≤ f i * g j + f j * g i

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

AntivaryOn f g s ↔ ∀ ⦃i : ι⦄, i ∈ s → ∀ ⦃j : ι⦄, j ∈ s → f i * g i + f j * g j ≤ f i * g j + f j * g i


theorem equivSentence_inf (φ ψ : L.Formula α) :
    equivSentence (φ ⊓ ψ) = equivSentence φ ⊓ equivSentence ψ

{L : FirstOrder.Language}
{α : Type u'}
(φ ψ : L.Formula α)

FirstOrder.Language.Formula.equivSentence (φ ⊓ ψ) =
  FirstOrder.Language.Formula.equivSentence φ ⊓ FirstOrder.Language.Formula.equivSentence ψ


@[simp] lemma linfty_opNorm_toMatrix (f : (n → α) →L[α] (m → α)) :
    ‖LinearMap.toMatrix' (↑f : (n → α) →ₗ[α] (m → α))‖ = ‖f‖

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[NontriviallyNormedField α]
[NormedAlgebra ℝ α]
[DecidableEq n]
(f : (n → α) →L[α] m → α)


theorem CondIndepSets.bInter {s : ι → Set (Set Ω)} {s' : Set (Set Ω)}
    {u : Set ι} (h : ∃ n ∈ u, CondIndepSets m' hm' (s n) s' μ) :
    CondIndepSets m' hm' (⋂ n ∈ u, s n) s' μ

(h : ∃ n ∈ u, ProbabilityTheory.CondIndepSets m' hm' (s n) s' μ)

ProbabilityTheory.CondIndepSets m' hm' (⋂ n ∈ u, s n) s' μ


theorem zero_apply (a : A) : (0 : Derivation R A M) a = 0

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
[CommSemiring R]
[CommSemiring A]
[AddCommMonoid M]
[Algebra R A]
[Module A M]
[Module R M]
(a : A)


theorem dist_map_map_zero_lt : dist (f 0 + g 0) (f (g 0)) < 1


@[simp] theorem coe_sInf : (↑(sInf S) : α) = a ⊓ sInf ((↑) '' S)

{α : Type u_2}
[CompleteLattice α]
{a : α}
(S : Set ↑(Set.Iic a))


theorem integral_mono_on (h : ∀ x ∈ Icc a b, f x ≤ g x) :
    (∫ u in a..b, f u ∂μ) ≤ ∫ u in a..b, g u ∂μ

{f g : ℝ → ℝ}
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
(hab : a ≤ b)
(hf : IntervalIntegrable f μ a b)
(hg : IntervalIntegrable g μ a b)
(h : ∀ x ∈ Set.Icc a b, f x ≤ g x)

∫ (u : ℝ) in a..b, f u ∂μ ≤ ∫ (u : ℝ) in a..b, g u ∂μ


theorem index_countable [SecondCountableTopology α] : h.index.Countable

{α : Type u_1}
[MetricSpace α]
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{v : VitaliFamily μ}
{f : α → Set (Set α)}
{s : Set α}
(h : v.FineSubfamilyOn f s)
[SecondCountableTopology α]


theorem Filter.lift'_interior_le (l : Filter X) : l.lift' interior ≤ l

{X : Type u}
[TopologicalSpace X]
(l : Filter X)


theorem aeval_eq_zero [Algebra R S₂] (f : σ → S₂) (φ : MvPolynomial σ R)
    (h : ∀ d, φ.coeff d ≠ 0 → ∃ i ∈ d.support, f i = 0) : aeval f φ = 0

(h : ∀ (d : σ →₀ ℕ), MvPolynomial.coeff d φ ≠ 0 → ∃ i ∈ d.support, f i = 0)


@[simp] theorem neg_re : (-a).re = -a.re

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


theorem continuousOn_sub_left (a : ℝ≥0∞) : ContinuousOn (a - ·) { x : ℝ≥0∞ | x ≠ ∞ }

ContinuousOn (fun x => a - x) {x | x ≠ ⊤}


@[simp]
theorem continuum_power_aleph0 : continuum.{u} ^ aleph0.{u} = 𝔠

Cardinal.continuum ^ Cardinal.aleph0 = Cardinal.continuum


theorem pairwise_disjoint_powersetCard (s : Finset α) :
    Pairwise fun i j => Disjoint (s.powersetCard i) (s.powersetCard j)

Pairwise fun i j => Disjoint (Finset.powersetCard i s) (Finset.powersetCard j s)


@[simp]
theorem affineSegment_const_vsub_image (x y p : P) :
    (p -ᵥ ·) '' affineSegment R x y = affineSegment R (p -ᵥ x) (p -ᵥ y)

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

(fun x => p -ᵥ x) '' affineSegment R x y = affineSegment R (p -ᵥ x) (p -ᵥ y)


/-- If the angle between three points is `π / 2`, the first two points are not equal. -/
theorem left_ne_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = (π / 2 : ℝ)) : p₁ ≠ p₂

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


/-- If `g : ℝ → ℝ` is periodic with period `T > 0` and `∀ x, 0 < g x`, then `t ↦ ∫ x in 0..t, g x`
tends to `∞` as `t` tends to `∞`. -/
theorem tendsto_atTop_intervalIntegral_of_pos' (h₀ : ∀ x, 0 < g x) (hT : 0 < T) :
    Tendsto (fun t => ∫ x in (0)..t, g x) atTop atTop

(h_int : ∀ (t₁ t₂ : ℝ), IntervalIntegrable g MeasureTheory.volume t₁ t₂)

Filter.Tendsto (fun t => ∫ (x : ℝ) in 0 ..t, g x) Filter.atTop Filter.atTop


@[to_additive (attr := simp)]
theorem unop_le_unop_iff {S₁ S₂ : Subgroup Gᵐᵒᵖ} : S₁.unop ≤ S₂.unop ↔ S₁ ≤ S₂

{G : Type u_2}
[Group G]
{S₁ S₂ : Subgroup Gᵐᵒᵖ}


theorem mono_lie_left (h : I ≤ J) : ⁅I, N⁆ ≤ ⁅J, N⁆

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


/-- General fencing theorem for continuous functions with an estimate on the norm of the derivative.
Let `f` and `B` be continuous functions on `[a, b]` such that

* `‖f a‖ ≤ B a`;
* `f` has right derivative `f'` at every point of `[a, b)`;
* `B` has derivative `B'` everywhere on `ℝ`;
* we have `‖f' x‖ ≤ B x` everywhere on `[a, b)`.

Then `‖f x‖ ≤ B x` everywhere on `[a, b]`. We use one-sided derivatives in the assumptions
to make this theorem work for piecewise differentiable functions.
-/
theorem image_norm_le_of_norm_deriv_right_le_deriv_boundary {f' : ℝ → E}
    (hf : ContinuousOn f (Icc a b)) (hf' : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x)
    {B B' : ℝ → ℝ} (ha : ‖f a‖ ≤ B a) (hB : ∀ x, HasDerivAt B (B' x) x)
    (bound : ∀ x ∈ Ico a b, ‖f' x‖ ≤ B' x) : ∀ ⦃x⦄, x ∈ Icc a b → ‖f x‖ ≤ B x

(hf' : ∀ x ∈ Set.Ico a b, HasDerivWithinAt f (f' x) (Set.Ici x) x)

(bound : ∀ x ∈ Set.Ico a b, ‖f' x‖ ≤ B' x)


@[simp]
lemma single₀_map_f_zero {A B : V} (f : A ⟶ B) :
    ((single₀ V).map f).f 0 = f

((CochainComplex.single₀ V).map f).f 0 = f


@[to_additive (attr := simp)]
theorem mulETransformRight_inv : mulETransformRight e⁻¹ x = (mulETransformLeft e x.swap).swap

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

Finset.addETransformRight (-e) x = (Finset.addETransformLeft e x.swap).swap


theorem Ico_disjoint_Ico {a b c d : α} (h : b ≤ c) : (Ico a b).Disjoint (Ico c d)

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

(Multiset.Ico a b).Disjoint (Multiset.Ico c d)


/-- A surjective linear map `f` with finite dimensional codomain is an open map. -/
theorem isOpenMap_of_finiteDimensional (f : F →ₗ[𝕜] E) (hf : Function.Surjective f) :
    IsOpenMap f

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
{F : Type w}
[AddCommGroup F]
[Module 𝕜 F]
[TopologicalSpace F]
[TopologicalAddGroup F]
[ContinuousSMul 𝕜 F]
[CompleteSpace 𝕜]
[T2Space E]
[FiniteDimensional 𝕜 E]
(f : F →ₗ[𝕜] E)
(hf : Function.Surjective ⇑f)


@[simp]
theorem monomial_mul_X (n : ℕ) (r : R) : monomial n r * X = monomial (n + 1) r

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

(Polynomial.monomial n) r * Polynomial.X = (Polynomial.monomial (n + 1)) r


/-- Union of an indexed family of sets `s : ι → Set α` is equal to the union of the unions
of finite subfamilies. This version assumes `ι : Type*`. See also `iUnion_eq_iUnion_finset'` for
a version that works for `ι : Sort*`. -/
theorem iUnion_eq_iUnion_finset (s : ι → Set α) : ⋃ i, s i = ⋃ t : Finset ι, ⋃ i ∈ t, s i

{α : Type u_2}
{ι : Type u_5}
(s : ι → Set α)


@[to_additive]
lemma Commute.div_eq_div_iff_of_isUnit (hbd : Commute b d) (hb : IsUnit b) (hd : IsUnit d) :
    a / b = c / d ↔ a * d = c * b

{M : Type u_1}
[SubtractionMonoid M]
{a b c d : M}
(hbd : AddCommute b d)
(hb : IsAddUnit b)
(hd : IsAddUnit d)


@[simp] lemma krullDim_orderDual : krullDim αᵒᵈ = krullDim α


/-- For `1 ≤ p`, the `p`-th power of the sum of `f i` is bounded above by a constant times the
sum of the `p`-th powers of `f i`. Version for sums over finite sets, with `ℝ≥0`-valued functions.
-/
theorem rpow_sum_le_const_mul_sum_rpow (f : ι → ℝ≥0) {p : ℝ} (hp : 1 ≤ p) :
    (∑ i ∈ s, f i) ^ p ≤ (card s : ℝ≥0) ^ (p - 1) * ∑ i ∈ s, f i ^ p

{ι : Type u}
(s : Finset ι)
(f : ι → ℝ≥0)
{p : ℝ}
(hp : 1 ≤ p)

(∑ i ∈ s, f i) ^ p ≤ ↑s.card ^ (p - 1) * ∑ i ∈ s, f i ^ p


lemma prod_lt_prod_of_nonempty (hf : ∀ i ∈ s, 0 < f i) (hfg : ∀ i ∈ s, f i < g i)
    (h_ne : s.Nonempty) :
    ∏ i ∈ s, f i < ∏ i ∈ s, g i

{ι : Type u_1}
{R : Type u_2}
[CommMonoidWithZero R]
[PartialOrder R]
[ZeroLEOneClass R]
[PosMulStrictMono R]
[Nontrivial R]
{f g : ι → R}
{s : Finset ι}
(hf : ∀ i ∈ s, 0 < f i)
(hfg : ∀ i ∈ s, f i < g i)
(h_ne : s.Nonempty)


@[to_additive]
theorem subset_interior_mul_right : s * interior t ⊆ interior (s * t)

{α : Type u}
[TopologicalSpace α]
[AddGroup α]
[ContinuousConstVAdd α α]
{s t : Set α}


theorem MulEquiv.prime_iff (e : α ≃* β) : Prime p ↔ Prime (e p)

{α : Type u_1}
{β : Type u_2}
[CommMonoidWithZero α]
[CommMonoidWithZero β]
{p : α}
(e : α ≃* β)


@[simp] lemma composePath_cons {X Y Z : C} (p : Path X Y) (e : Y ⟶ Z) :
  composePath (p.cons e) = composePath p ≫ e

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y Z : C}
(p : Quiver.Path X Y)
(e : Y ⟶ Z)

CategoryTheory.composePath (p.cons e) = CategoryTheory.CategoryStruct.comp (CategoryTheory.composePath p) e


theorem toNat_eq_max : ∀ a : Int, (toNat a : Int) = max a 0


/-- **Turán's theorem**, reverse direction.

Any graph isomorphic to `turanGraph n r` is itself Turán-maximal if `0 < r`. -/
theorem isTuranMaximal_of_iso (f : G ≃g turanGraph n r) (hr : 0 < r) : G.IsTuranMaximal r

{V : Type u_1}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{n r : ℕ}
(f : G ≃g SimpleGraph.turanGraph n r)
(hr : 0 < r)


theorem basis_sets (l : Filter α) : l.HasBasis (fun s : Set α => s ∈ l) id


/-- If we equip `k[G]` with the `k`-linear `G`-representation induced by the left regular action of
`G` on itself, the resulting object is isomorphic as a `k[G]`-module to `k[G]` with its natural
`k[G]`-module structure. -/
@[simps]
noncomputable def ofMulActionSelfAsModuleEquiv :
    (ofMulAction k G G).asModule ≃ₗ[MonoidAlgebra k G] MonoidAlgebra k G

{k : Type u_1}
{G : Type u_2}
[CommSemiring k]
[Group G]

∀ (a : G →₀ k),
  Representation.ofMulActionSelfAsModuleEquiv.symm a = (Representation.ofMulAction k G G).asModuleEquiv.invFun a


theorem comap_inf (s t : Subring S) (f : R →+* S) : (s ⊓ t).comap f = s.comap f ⊓ t.comap f

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
(s t : Subring S)
(f : R →+* S)

Subring.comap f (s ⊓ t) = Subring.comap f s ⊓ Subring.comap f t


theorem liftAlgHom_apply_ofFractionRing_mk (n : K[X]) (d : K[X]⁰) :
    liftAlgHom φ hφ (ofFractionRing (Localization.mk n d)) = φ n / φ d

{K : Type u}
[CommRing K]
[IsDomain K]
{L : Type u_1}
{S : Type u_3}
[Field L]
[CommSemiring S]
[Algebra S K[X]]
[Algebra S L]
(φ : K[X] →ₐ[S] L)
(hφ : K[X]⁰ ≤ Submonoid.comap φ L⁰)
(n : K[X])
(d : ↥K[X]⁰)

(RatFunc.liftAlgHom φ hφ) { toFractionRing := Localization.mk n d } = φ n / φ ↑d


@[to_additive (attr := simp)]
theorem coe_of_map_div {H : Type*} [Group H] (f : G → H) (hf : ∀ x y, f (x / y) = f x / f y) :
    ↑(ofMapDiv f hf) = f

(hf : ∀ (x y : G), f (x / y) = f x / f y)


/-- The norm of the difference of two non-zero vectors equals the absolute value
of the difference of their norms if and only the angle between the two vectors is 0. -/
theorem norm_sub_eq_abs_sub_norm_iff_angle_eq_zero {x y : V} (hx : x ≠ 0) (hy : y ≠ 0) :
    ‖x - y‖ = |‖x‖ - ‖y‖| ↔ angle x y = 0

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
{x y : V}
(hx : x ≠ 0)
(hy : y ≠ 0)

‖x - y‖ = |‖x‖ - ‖y‖| ↔ InnerProductGeometry.angle x y = 0


/-- **Kummer's Theorem**
Taking (`p - 1`) times the `p`-adic valuation of the binomial `n` over `k` equals the sum of the
digits of `k` plus the sum of the digits of `n - k` minus the sum of digits of `n`, all base `p`.
-/
theorem sub_one_mul_padicValNat_choose_eq_sub_sum_digits {k n : ℕ} [hp : Fact p.Prime]
    (h : k ≤ n) : (p - 1) * padicValNat p (choose n k) =
    (p.digits k).sum + (p.digits (n - k)).sum - (p.digits n).sum

{p k n : ℕ}
[hp : Fact (Nat.Prime p)]
(h : k ≤ n)

(p - 1) * padicValNat p (n.choose k) = (p.digits k).sum + (p.digits (n - k)).sum - (p.digits n).sum


/-- **Integration by parts on (-∞, ∞).**
Version assuming that the total function is integrable -/
theorem integral_mul_deriv_eq_deriv_mul_of_integrable
    (hu : ∀ x, HasDerivAt u (u' x) x) (hv : ∀ x, HasDerivAt v (v' x) x)
    (huv' : Integrable (u * v')) (hu'v : Integrable (u' * v)) (huv : Integrable (u * v)) :
    ∫ (x : ℝ), u x * v' x = - ∫ (x : ℝ), u' x * v x

(huv' : MeasureTheory.Integrable (u * v') MeasureTheory.volume)

(hu'v : MeasureTheory.Integrable (u' * v) MeasureTheory.volume)

(huv : MeasureTheory.Integrable (u * v) MeasureTheory.volume)

∫ (x : ℝ), u x * v' x = -∫ (x : ℝ), u' x * v x


@[to_additive ball_eq]
theorem ball_eq' (y : E) (ε : ℝ) : ball y ε = { x | ‖x / y‖ < ε }

{E : Type u_6}
[SeminormedGroup E]
(y : E)
(ε : ℝ)


@[simp]
theorem star_inv' [DivisionSemiring R] [StarRing R] (x : R) : star x⁻¹ = (star x)⁻¹

{R : Type u}
[DivisionSemiring R]
[StarRing R]
(x : R)


@[simp] theorem suffix_nil : l <:+ [] ↔ l = []


theorem HasFTaylorSeriesUpToOn.of_le (h : HasFTaylorSeriesUpToOn n f p s) (hmn : m ≤ n) :
    HasFTaylorSeriesUpToOn m f p s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{m n : ℕ∞}
{p : E → FormalMultilinearSeries 𝕜 E F}
(h : HasFTaylorSeriesUpToOn n f p s)
(hmn : m ≤ n)


@[simp]
lemma toEuclideanCLM_piLp_equiv_symm (A : Matrix n n 𝕜) (x : n → 𝕜) :
    toEuclideanCLM (n := n) (𝕜 := 𝕜) A ((WithLp.equiv _ _).symm x) =
      (WithLp.equiv _ _).symm (toLin' A x)

{𝕜 : Type u_1}
{n : Type u_3}
[RCLike 𝕜]
[Fintype n]
[DecidableEq n]
(A : Matrix n n 𝕜)
(x : n → 𝕜)

(Matrix.toEuclideanCLM A) ((WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)).symm x) =
  (WithLp.equiv 2 (n → 𝕜)).symm ((Matrix.toLin' A) x)


@[reassoc (attr := simp)]
theorem pullbackComparison_comp_snd (f : X ⟶ Z) (g : Y ⟶ Z) [HasPullback f g]
    [HasPullback (G.map f) (G.map g)] :
    pullbackComparison G f g ≫ pullback.snd _ _ = G.map (pullback.snd f g)

[CategoryTheory.Limits.HasPullback (G.map f) (G.map g)]

CategoryTheory.Limits.pullbackComparison G f g ≫ CategoryTheory.Limits.pullback.snd (G.map f) (G.map g) =
  G.map (CategoryTheory.Limits.pullback.snd f g)


@[simp]
lemma whiskerRight_app {C D E : Cat} {F G : C ⟶ D} (H : D ⟶ E) (η : F ⟶ G) (X : C) :
    (η ▷ H).app X = H.map (η.app X)

{C D E : CategoryTheory.Cat}
{F G : C ⟶ D}
(H : D ⟶ E)
(η : F ⟶ G)
(X : ↑C)

(CategoryTheory.Bicategory.whiskerRight η H).app X = H.map (η.app X)


@[to_additive (attr := simp)] lemma op_mul [Mul α] (x y : α) : op (x * y) = op y * op x

MulOpposite.op (x * y) = MulOpposite.op y * MulOpposite.op x


/-- The equivalence classes of the equivalence relation defined by a set of sets
    partitioning α are elements of the set of sets. -/
theorem eqv_class_mem {c : Set (Set α)} (H : ∀ a, ∃! b ∈ c, a ∈ b) {y} :
    { x | (mkClasses c H).Rel x y } ∈ c

{α : Type u_1}
{c : Set (Set α)}
(H : ∀ (a : α), ∃! b, b ∈ c ∧ a ∈ b)
{y : α}

{x | (Setoid.mkClasses c H).Rel x y} ∈ c


@[to_additive]
lemma HasCompactMulSupport.exists_bound_of_continuous [TopologicalSpace α]
    {f : α → E} (hf : HasCompactMulSupport f) (h'f : Continuous f) : ∃ C, ∀ x, ‖f x‖ ≤ C

{α : Type u_1}
{E : Type u_3}
[SeminormedGroup E]
[TopologicalSpace α]
{f : α → E}
(hf : HasCompactMulSupport f)
(h'f : Continuous f)


@[to_additive (attr := simp, norm_cast)]
theorem coe_sup : ⇑(p ⊔ q) = ⇑p ⊔ ⇑q

{E : Type u_4}
[Group E]
(p q : GroupNorm E)


theorem maximum_le_of_forall_le {b : WithBot α} (h : ∀ a ∈ l, a ≤ b) : l.maximum ≤ b

{α : Type u_1}
[LinearOrder α]
{l : List α}
{b : WithBot α}
(h : ∀ (a : α), a ∈ l → ↑a ≤ b)


theorem TendstoUniformlyOn.seq_tendstoUniformlyOn {l : Filter ι} (h : TendstoUniformlyOn F f l s)
    (u : ℕ → ι) (hu : Tendsto u atTop l) : TendstoUniformlyOn (fun n => F (u n)) f atTop s

{α : Type u}
{β : Type v}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{l : Filter ι}
(h : TendstoUniformlyOn F f l s)
(u : ℕ → ι)
(hu : Filter.Tendsto u Filter.atTop l)

TendstoUniformlyOn (fun n => F (u n)) f Filter.atTop s


theorem support_monomial (n) {a : R} (H : a ≠ 0) : (monomial n a).support = singleton n

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

((Polynomial.monomial n) a).support = {n}


@[simp] lemma fst_map_swap : (ρ.map Prod.swap).fst = ρ.snd

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{ρ : MeasureTheory.Measure (α × β)}

(MeasureTheory.Measure.map Prod.swap ρ).fst = ρ.snd


@[to_additive]
theorem smul_set_mem_smul_filter : s ∈ f → a • s ∈ a • f

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f : Filter β}
{s : Set β}
{a : α}


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

(e : ↑α.toBddDistLat.toDistLat ≃o ↑β.toBddDistLat.toDistLat)

(FinBddDistLat.Iso.mk e).hom.toSupHom a = e a


theorem equiv_congr_right {x₁ x₂ : PGame} : (x₁ ≈ x₂) ↔ ∀ y₁, (x₁ ≈ y₁) ↔ (x₂ ≈ y₁)

x₁ ≈ x₂ ↔ ∀ (y₁ : SetTheory.PGame), x₁ ≈ y₁ ↔ x₂ ≈ y₁


@[simp]
private lemma piScalarRightInv_single (x : N) (i : ι) :
    piScalarRightInv R S N ι (Pi.single i x) = x ⊗ₜ Pi.single i 1

(R : Type u_1)
[CommSemiring R]
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
(N : Type u_3)
[AddCommMonoid N]
[Module R N]
[Module S N]
[IsScalarTower R S N]
(ι : Type u_4)
[Fintype ι]
[DecidableEq ι]
(x : N)
(i : ι)

(TensorProduct.piScalarRightInv R S N ι) (Pi.single i x) = x ⊗ₜ[R] Pi.single i 1


nonrec theorem exists_pow_lt_of_lt_one {a b : ℝ≥0} (ha : 0 < a) (hb : b < 1) :
    ∃ n : ℕ, b ^ n < a


theorem support_mul [Mul G] [DecidableEq G] (a b : MonoidAlgebra k G) :
    (a * b).support ⊆ a.support * b.support

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Mul G]
[DecidableEq G]
(a b : MonoidAlgebra k G)


@[simp]
theorem lift_of_comp (j : S →+* P) : lift (isUnit_comp M j) = j

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
(j : S →+* P)


protected theorem AntitoneOn.antivaryOn (hf : AntitoneOn f s) (hg : MonotoneOn g s) :
    AntivaryOn f g s

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}
{s : Set ι}
[LinearOrder ι]
(hf : AntitoneOn f s)
(hg : MonotoneOn g s)


theorem trace_eq_matrix_trace [DecidableEq ι] (b : Basis ι R S) (s : S) :
    trace R S s = Matrix.trace (Algebra.leftMulMatrix b s)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[CommRing S]
[Algebra R S]
{ι : Type w}
[Fintype ι]
[DecidableEq ι]
(b : Basis ι R S)
(s : S)

(Algebra.trace R S) s = ((Algebra.leftMulMatrix b) s).trace


@[simp] theorem up_bot [Bot α] : up (⊥ : α) = ⊥


lemma continuous_dual_apply (x : E) (y : F⋆) : Continuous fun (A : E →WOT[𝕜] F) => y (A x)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : E)
(y : NormedSpace.Dual 𝕜 F)


theorem smul {𝕜' : Type*} [NontriviallyNormedField 𝕜'] [NormedAlgebra 𝕜 𝕜'] [NormedSpace 𝕜' F]
    [IsScalarTower 𝕜 𝕜' F] {c : E → 𝕜'} {f : E → F} {s : Set E} (hc : DiffContOnCl 𝕜 c s)
    (hf : DiffContOnCl 𝕜 f s) : DiffContOnCl 𝕜 (fun x => c x • f x) s

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
{𝕜' : Type u_5}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{c : E → 𝕜'}
{f : E → F}
{s : Set E}
(hc : DiffContOnCl 𝕜 c s)
(hf : DiffContOnCl 𝕜 f s)


/-- **Equational criterion for vanishing**
[A. Altman and S. Kleiman, *A term of commutative algebra* (Lemma 8.16)][altman2021term],
backward direction.

If the expression $\sum_i m_i \otimes n_i$ vanishes trivially, then it vanishes.
That is, $\sum_i m_i \otimes n_i = 0$. -/
theorem sum_tmul_eq_zero_of_vanishesTrivially (hmn : VanishesTrivially R m n) :
    ∑ i, m i ⊗ₜ n i = (0 : M ⊗[R] N)

(hmn : TensorProduct.VanishesTrivially R m n)


theorem ofPrime_le_of_le (P Q : Ideal A) [P.IsPrime] [Q.IsPrime] (h : P ≤ Q) :
    ofPrime A Q ≤ ofPrime A P

{K : Type u}
[Field K]
(A : ValuationSubring K)
(P Q : Ideal ↥A)
[P.IsPrime]
[Q.IsPrime]
(h : P ≤ Q)


@[simp]
theorem inv_iff {f : Perm α} : IsThreeCycle f⁻¹ ↔ IsThreeCycle f

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


@[simp] lemma compCLMOfContinuousLinearEquiv_apply (g : D ≃L[ℝ] E) (f : 𝓢(E, F)) :
    compCLMOfContinuousLinearEquiv 𝕜 g f = f ∘ g

(𝕜 : Type u_1)
{D : Type u_3}
{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[RCLike 𝕜]
[NormedAddCommGroup D]
[NormedSpace ℝ D]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(g : D ≃L[ℝ] E)
(f : SchwartzMap E F)

⇑((SchwartzMap.compCLMOfContinuousLinearEquiv 𝕜 g) f) = ⇑f ∘ ⇑g


/-- If one multiplies by `c i` the coordinates in a finset `s`, then the image under a multilinear
map is multiplied by `∏ i ∈ s, c i`. This is mainly an auxiliary statement to prove the result when
`s = univ`, given in `map_smul_univ`, although it can be useful in its own right as it does not
require the index set `ι` to be finite. -/
theorem map_piecewise_smul [DecidableEq ι] (c : ι → R) (m : ∀ i, M₁ i) (s : Finset ι) :
    f (s.piecewise (fun i => c i • m i) m) = (∏ i ∈ s, c i) • f m

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[CommSemiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
[DecidableEq ι]
(c : ι → R)
(m : (i : ι) → M₁ i)
(s : Finset ι)


theorem _root_.CauchySeq.isBounded_range {f : ℕ → α} (hf : CauchySeq f) : IsBounded (range f)

{α : Type u}
[PseudoMetricSpace α]
{f : ℕ → α}
(hf : CauchySeq f)


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

{M : Type u_1}
[MulOneClass M]
{S T : Submonoid M}
{x : M}


/-- A change of basis formula for barycentric coordinates.

See also `AffineBasis.toMatrix_inv_vecMul_toMatrix`. -/
@[simp]
theorem toMatrix_vecMul_coords (x : P) : b₂.coords x ᵥ* b.toMatrix b₂ = b.coords x

{ι : Type u₁}
{k : Type u₂}
{V : Type u₃}
{P : Type u₄}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)
[Fintype ι]
(b₂ : AffineBasis ι k P)
(x : P)

b₂.coords x ᵥ* b.toMatrix ⇑b₂ = b.coords x


theorem WfDvdMonoid.iff_wellFounded_associates [CancelCommMonoidWithZero α] :
    WfDvdMonoid α ↔ WellFounded ((· < ·) : Associates α → Associates α → Prop)

{α : Type u_1}
[CancelCommMonoidWithZero α]

WfDvdMonoid α ↔ WellFounded fun x x_1 => x < x_1


@[to_additive]
theorem mk_pow (n : ℕ) (a : M) (b : S) : mk a b ^ n = mk (a ^ n) (b ^ n)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
(n : ℕ)
(a : M)
(b : ↥S)

Localization.mk a b ^ n = Localization.mk (a ^ n) (b ^ n)


@[simp, norm_cast]
theorem coe_add (f g : CentroidHom α) : ⇑(f + g) = f + g

{α : Type u_5}
[NonUnitalNonAssocSemiring α]
(f g : CentroidHom α)


theorem compl_compl_himp_distrib (a b : α) : (a ⇨ b)ᶜᶜ = aᶜᶜ ⇨ bᶜᶜ

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

(a ⇨ b)ᶜᶜ = aᶜᶜ ⇨ bᶜᶜ


/-- A Hopf algebra over a commutative (semi)ring `R` is a bialgebra over `R` equipped with an
`R`-linear endomorphism `antipode` satisfying the antipode axioms. -/
class HopfAlgebra (R : Type u) (A : Type v) [CommSemiring R] [Semiring A] extends
    Bialgebra R A where
  /-- The antipode of the Hopf algebra. -/
  antipode : A →ₗ[R] A
  /-- One of the antipode axioms for a Hopf algebra. -/
  mul_antipode_rTensor_comul :
    LinearMap.mul' R A ∘ₗ antipode.rTensor A ∘ₗ comul = (Algebra.linearMap R A) ∘ₗ counit
  /-- One of the antipode axioms for a Hopf algebra. -/
  mul_antipode_lTensor_comul :
    LinearMap.mul' R A ∘ₗ antipode.lTensor A ∘ₗ comul = (Algebra.linearMap R A) ∘ₗ counit

{R : Type u}
{A : Type v}
[CommSemiring R]
[Semiring A]
[self : HopfAlgebra R A]

LinearMap.mul' R A ∘ₗ LinearMap.lTensor A HopfAlgebra.antipode ∘ₗ Coalgebra.comul =
  Algebra.linearMap R A ∘ₗ Coalgebra.counit


/-- The functor `Fin n ⥤ Fin (n + 1)` which sends `i` to `i.castSucc`. -/
@[simps]
def _root_.Fin.castSuccFunctor (n : ℕ) : Fin n ⥤ Fin (n + 1)

∀ {X Y : Fin n} (hij : X ⟶ Y), (Fin.castSuccFunctor n).map hij = hij


theorem log_mul_add {x y : ℝ≥0∞} : log (x * y) = log x + log y


@[simp]
theorem sups_singleton : s ⊻ {b} = s.image fun a => a ⊔ b

{α : Type u_2}
[SemilatticeSup α]
{s : Set α}
{b : α}


theorem ContMDiff.continuous (hf : ContMDiff I I' n f) : Continuous f

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


theorem gcd_cons_div_right : gcd (x::xs) ∣ gcd xs

Lean.Omega.IntList.gcd (x :: xs) ∣ Lean.Omega.IntList.gcd xs


theorem tensorUnit_rho {g : G} : (𝟙_ (Action V G)).ρ g = 𝟙 (𝟙_ V)

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
[CategoryTheory.MonoidalCategory V]
{g : ↑G}


/-- The (distinguished) triangle in the derived category of `C` given by a
short exact short complex in `C`. -/
@[simps!]
noncomputable def singleTriangle : Triangle (DerivedCategory C)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Abelian C]
[HasDerivedCategory C]
{S : CategoryTheory.ShortComplex C}
(hS : S.ShortExact)

hS.singleTriangle.mor₂ = (DerivedCategory.singleFunctor C 0).map S.g


lemma map_weightSpace_eq (e : M ≃ₗ⁅R,L⁆ M₂) :
    (weightSpace M χ).map e = 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]
{M₂ : Type u_5}
[AddCommGroup M₂]
[Module R M₂]
[LieRingModule L M₂]
[LieModule R L M₂]
{χ : L → R}
(e : M ≃ₗ⁅R,L⁆ M₂)

LieSubmodule.map e.toLieModuleHom (LieModule.weightSpace M χ) = LieModule.weightSpace M₂ χ


@[simp]
theorem mem_sublists {s t : List α} : s ∈ sublists t ↔ s <+ t


theorem ext_nat [FunLike F ℕ R] [RingHomClass F ℕ R] (f g : F) : f = g

{R : Type u_3}
{F : Type u_5}
[NonAssocSemiring R]
[FunLike F ℕ R]
[RingHomClass F ℕ R]
(f g : F)


/-- The **Ahlswede-Zhang Identity**. -/
lemma infSum_compls_add_supSum (𝒜 : Finset (Finset α)) :
    infSum 𝒜ᶜˢ + supSum 𝒜 = card α * ∑ k ∈ range (card α), (k : ℚ)⁻¹ + 1

{α : Type u_1}
[Fintype α]
[DecidableEq α]
[Nonempty α]
(𝒜 : Finset (Finset α))

AhlswedeZhang.infSum 𝒜ᶜˢ + AhlswedeZhang.supSum 𝒜 = ↑(Fintype.card α) * ∑ k ∈ Finset.range (Fintype.card α), (↑k)⁻¹ + 1


@[simp]
theorem toClifford_ι (m : M) : toClifford (TensorAlgebra.ι R m) = CliffordAlgebra.ι Q m

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(m : M)

TensorAlgebra.toClifford ((TensorAlgebra.ι R) m) = (CliffordAlgebra.ι Q) m


@[to_additive]
theorem trivial_ker_iff_eq_one {f : G → H} (hf : IsGroupHom f) :
    ker f = trivial G ↔ ∀ x, f x = 1 → x = 1

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G → H}
(hf : IsGroupHom f)

IsGroupHom.ker f = IsSubgroup.trivial G ↔ ∀ (x : G), f x = 1 → x = 1


lemma condIndepSet_iff_condIndep (s t : Set Ω) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndepSet m' hm' s t μ ↔ CondIndep m' (generateFrom {s}) (generateFrom {t}) hm' μ

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

ProbabilityTheory.CondIndepSet m' hm' s t μ ↔
  ProbabilityTheory.CondIndep m' (MeasurableSpace.generateFrom {s}) (MeasurableSpace.generateFrom {t}) hm' μ


@[simp]
theorem id_comp : (BialgHom.id R B).comp φ = φ

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(φ : A →ₐc[R] B)


theorem prod_infty_equiv_isometry [PseudoEMetricSpace α] [PseudoEMetricSpace β] :
    Isometry (WithLp.equiv ∞ (α × β))

(α : Type u_2)
(β : Type u_3)
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]


@[to_additive]
theorem mul_le_mul_three [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {a b c d e f : α} (h₁ : a ≤ d) (h₂ : b ≤ e)
    (h₃ : c ≤ f) :
    a * b * c ≤ d * e * f

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

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


theorem arg_div_coe_angle {x y : ℂ} (hx : x ≠ 0) (hy : y ≠ 0) :
    (arg (x / y) : Real.Angle) = arg x - arg y


@[simp]
theorem coe_refl : ⇑(refl 𝕜 P) = id

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


@[to_additive existing (attr := simp)]
lemma equivShrink_div [Div α] [Small α] (x y : α) :
    equivShrink α (x / y) = equivShrink α x / equivShrink α y

{α : Type u_1}
[Div α]
[Small.{u_2, u_1} α]
(x y : α)

(equivShrink α) (x / y) = (equivShrink α) x / (equivShrink α) y


@[simp]
lemma self_trans_symm (e : G ≃+c[a, b] H) : e.trans e.symm = .refl a

{G : Type u_1}
{H : Type u_2}
[Add G]
[Add H]
{a : G}
{b : H}
(e : G ≃+c[a, b] H)


@[simp]
theorem eval₂Hom_X' (f : R →+* S₁) (g : σ → S₁) (i : σ) : eval₂Hom f g (X i) = g i

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

(MvPolynomial.eval₂Hom f g) (MvPolynomial.X i) = g i


@[simp]
theorem mk_eq (x : PSet) : @Eq ZFSet ⟦x⟧ (mk x)


/-- We say a Lie algebra is Killing if its Killing form is non-singular.

NB: This is not standard terminology (the literature does not seem to name Lie algebras with this
property). -/
class IsKilling : Prop :=
  /-- We say a Lie algebra is Killing if its Killing form is non-singular. -/
  killingCompl_top_eq_bot : LieIdeal.killingCompl R L ⊤ = ⊥

{R : Type u_1}
{L : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[self : LieAlgebra.IsKilling R L]


protected theorem eq_left_iff {f : α → E} {s : Set α} (hf : LocallyBoundedVariationOn f s)
    {a b c : α} (ha : a ∈ s) (hb : b ∈ s) (hc : c ∈ s) :
    variationOnFromTo f s a b = variationOnFromTo f s a c ↔ variationOnFromTo f s b c = 0

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{f : α → E}
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{a b c : α}
(ha : a ∈ s)
(hb : b ∈ s)
(hc : c ∈ s)


lemma isOpen_of_isLowerSet (h : IsLowerSet s) : IsOpen s

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsScottHausdorff α]
{s : Set α}
(h : IsLowerSet s)


@[simp]
theorem row_cons (x : α) (u : Fin m → α) : row ι (vecCons x u) = of fun _ => vecCons x u

{α : Type u}
{m : ℕ}
{ι : Type u_1}
(x : α)
(u : Fin m → α)

Matrix.row ι (Matrix.vecCons x u) = Matrix.of fun x_1 => Matrix.vecCons x u


private lemma continuousAt_mul_coe_coe (a b : ℝ) :
    ContinuousAt (fun p : EReal × EReal ↦ p.1 * p.2) (a, b)

ContinuousAt (fun p => p.1 * p.2) (↑a, ↑b)


theorem le_comap_pow_of_le_comap (p : Submodule R M) {f : M →ₗ[R] M} (h : p ≤ p.comap f) (k : ℕ) :
    p ≤ p.comap (f ^ k)

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p : Submodule R M)
{f : M →ₗ[R] M}
(h : p ≤ Submodule.comap f p)
(k : ℕ)


/-- If `F` and `G` are naturally isomorphic functors, then they have equivalent categories of
cocones.
-/
@[simps]
def precomposeEquivalence {G : J ⥤ C} (α : G ≅ F) : Cocone F ≌ Cocone G

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
(α : G ≅ F)

(CategoryTheory.Limits.Cocones.precomposeEquivalence α).inverse = CategoryTheory.Limits.Cocones.precompose α.inv


/-- Associative racks are uninteresting.
-/
theorem assoc_iff_id {R : Type*} [Rack R] {x y z : R} : x ◃ y ◃ z = (x ◃ y) ◃ z ↔ x ◃ z = z


theorem monomial_eq : monomial s a = C a * (s.prod fun n e => X n ^ e : MvPolynomial σ R)

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

(MvPolynomial.monomial s) a = MvPolynomial.C a * s.prod fun n e => MvPolynomial.X n ^ e


theorem ext_iff {x y : Class.{u}} : x = y ↔ ∀ z, x z ↔ y z


theorem memℓp_infty {f : ∀ i, E i} (hf : BddAbove (Set.range fun i => ‖f i‖)) : Memℓp f ∞


theorem fst_top [Top α] [Top β] : (⊤ : α × β).fst = ⊤

(α : Type u)
(β : Type v)
[Top α]
[Top β]


@[simp]
theorem integral_same : ∫ x in a..a, f x ∂μ = 0

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a : ℝ}
{f : ℝ → E}
{μ : MeasureTheory.Measure ℝ}


theorem add_pf [Add α] (p₁ : (a₁:α) = b₁) (p₂ : a₂ = b₂) : a₁ + a₂ = b₁ + b₂

{α : Type u_1}
{a₁ a₂ b₁ b₂ : α}
[Add α]
(p₁ : a₁ = b₁)
(p₂ : a₂ = b₂)