@[simp] theorem isNone_none : @isNone α none = true


/-- If `t` is a finite set of pairwise disjoint finite sets, then the product of `f a`
over `a ∈ ⋃₀ t` is the product over `s ∈ t` of the products of `f a` over `a ∈ s`. -/
@[to_additive
      "If `t` is a finite set of pairwise disjoint finite sets, then the sum of `f a` over
      `a ∈ ⋃₀ t` is the sum over `s ∈ t` of the sums of `f a` over `a ∈ s`."]
theorem finprod_mem_sUnion {t : Set (Set α)} (h : t.PairwiseDisjoint id) (ht₀ : t.Finite)
    (ht₁ : ∀ x ∈ t, Set.Finite x) : ∏ᶠ a ∈ ⋃₀ t, f a = ∏ᶠ s ∈ t, ∏ᶠ a ∈ s, f a

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
{f : α → M}
{t : Set (Set α)}
(h : t.PairwiseDisjoint id)
(ht₀ : t.Finite)
(ht₁ : ∀ x ∈ t, x.Finite)

∏ᶠ (a : α) (_ : a ∈ ⋃₀ t), f a = ∏ᶠ (s : Set α) (_ : s ∈ t) (a : α) (_ : a ∈ s), f a


protected theorem eq_bot_iff [∀ i, Bot (π i)] {f : ∀ i, π i} : f = ⊥ ↔ ∀ i, f i = ⊥

{ι : Type u_4}
{π : ι → Type u}
[(i : ι) → Bot (π i)]
{f : (i : ι) → π i}


/-- If a function is at least `C^1`, its bundled derivative (mapping `(x, v)` to `Df(x) v`) is
continuous. -/
theorem ContDiff.continuous_fderiv_apply (h : ContDiff 𝕜 n f) (hn : 1 ≤ n) :
    Continuous fun p : E × E => (fderiv 𝕜 f p.1 : E → F) p.2

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ∞}
(h : ContDiff 𝕜 n f)
(hn : 1 ≤ n)

Continuous fun p => (fderiv 𝕜 f p.1) p.2


/-- The nonsingular inverse is the same as the general `Ring.inverse`. -/
theorem nonsing_inv_eq_ring_inverse : A⁻¹ = Ring.inverse A

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


/-- The angle ∡ABA at a point. -/
@[simp]
theorem oangle_self_left_right (p₁ p₂ : P) : ∡ p₁ p₂ p₁ = 0

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


theorem Compares.eq_eq [Preorder α] : ∀ {o} {a b : α}, Compares o a b → (o = eq ↔ a = b)

{α : Type u_1}
[Preorder α]
{o : Ordering}
{a b : α}

o.Compares a b → (o = Ordering.eq ↔ a = b)


@[simp]
theorem sl_moeb (A : SL(2, ℤ)) (z : ℍ) : A • z = (A : GL(2, ℝ)⁺) • z


/-- Application of a `ContinuousLinearMap` to a constant commutes with `iteratedFDeriv`. -/
theorem iteratedFDeriv_clm_apply_const_apply
    {n : ℕ∞} {c : E → F →L[𝕜] G} (hc : ContDiff 𝕜 n c)
    {i : ℕ} (hi : i ≤ n) {x : E} {u : F} {m : Fin i → E} :
    (iteratedFDeriv 𝕜 i (fun y ↦ (c y) u) x) m = (iteratedFDeriv 𝕜 i c x) m u

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{c : E → F →L[𝕜] G}
(hc : ContDiff 𝕜 n c)
{i : ℕ}
(hi : ↑i ≤ n)
{x : E}
{u : F}
{m : Fin i → E}

(iteratedFDeriv 𝕜 i (fun y => (c y) u) x) m = ((iteratedFDeriv 𝕜 i c x) m) u


@[simp]
theorem _root_.AddMonoidHom.coe_toIntLinearMap_range {M M₂ : Type*} [AddCommGroup M]
    [AddCommGroup M₂] (f : M →+ M₂) :
    LinearMap.range f.toIntLinearMap = AddSubgroup.toIntSubmodule f.range

{M : Type u_12}
{M₂ : Type u_13}
[AddCommGroup M]
[AddCommGroup M₂]
(f : M →+ M₂)


theorem Forall₂.mp {Q : α → β → Prop} (h : ∀ a b, Q a b → R a b → S a b) :
    ∀ {l₁ l₂}, Forall₂ Q l₁ l₂ → Forall₂ R l₁ l₂ → Forall₂ S l₁ l₂

(h : ∀ (a : α) (b : β), Q a b → R a b → S a b)

List.Forall₂ Q l₁ l₂ → List.Forall₂ R l₁ l₂ → List.Forall₂ S l₁ l₂


@[to_additive (attr := simp)]
theorem center_toSubmonoid : (center G).toSubmonoid = Submonoid.center G

(Subgroup.center G).toSubmonoid = Submonoid.center G


/--
A "subsingleton" is a type with at most one element.
In other words, it is either empty, or has a unique element.
All propositions are subsingletons because of proof irrelevance, but some other types
are subsingletons as well and they inherit many of the same properties as propositions.
`Subsingleton α` is a typeclass, so it is usually used as an implicit argument and
inferred by typeclass inference.
-/
class Subsingleton (α : Sort u) : Prop where
  /-- Construct a proof that `α` is a subsingleton by showing that any two elements are equal. -/
  intro ::
  /-- Any two elements of a subsingleton are equal. -/
  allEq : (a b : α) → a = b

{α : Sort u}
[self : Subsingleton α]
(a b : α)


theorem projIcc_of_right_le (hx : b ≤ x) : projIcc a b h x = ⟨b, right_mem_Icc.2 h⟩

{α : Type u_1}
[LinearOrder α]
{a b : α}
(h : a ≤ b)
{x : α}
(hx : b ≤ x)


@[simp]
theorem monic_X_pow (n : ℕ) : Monic (X ^ n : R[X])


/-- The validity predicate for an `Ordnode` subtree. This asserts that the `size` fields are
correct, the tree is balanced, and the elements of the tree are organized according to the
ordering. This version of `Valid` also puts all elements in the tree in the interval `(lo, hi)`. -/
structure Valid' (lo : WithBot α) (t : Ordnode α) (hi : WithTop α) : Prop where
  ord : t.Bounded lo hi
  sz : t.Sized
  bal : t.Balanced

{α : Type u_1}
[Preorder α]
{lo : WithBot α}
{t : Ordnode α}
{hi : WithTop α}
(self : Ordnode.Valid' lo t hi)


theorem leftRegularHomEquiv_symm_single {A : Rep k G} (x : A) (g : G) :
    ((leftRegularHomEquiv A).symm x).hom (Finsupp.single g 1) = A.ρ g x

{k G : Type u}
[CommRing k]
[Monoid G]
{A : Rep k G}
(x : CoeSort.coe A)
(g : G)

(A.leftRegularHomEquiv.symm x).hom (Finsupp.single g 1) = (A.ρ g) x


@[reassoc (attr := simp)]
lemma sheafComposeIso_inv_fac :
    whiskerRight (toSheafify J P) F ≫ (sheafifyComposeIso J F P).inv =
      toSheafify J (P ⋙ F)

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight (CategoryTheory.toSheafify J P) F)
    (CategoryTheory.sheafifyComposeIso J F P).inv =
  CategoryTheory.toSheafify J (P.comp F)


@[to_additive]
theorem prod_add_index [∀ i, AddCommMonoid (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)]
    [CommMonoid γ] {f g : Π₀ i, β i} {h : ∀ i, β i → γ} (h_zero : ∀ i, h i 0 = 1)
    (h_add : ∀ i b₁ b₂, h i (b₁ + b₂) = h i b₁ * h i b₂) : (f + g).prod h = f.prod h * g.prod h

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

(h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ * h i b₂)


theorem evaluation_aut_surjective_of_isGalois (A : C) [IsGalois A] (a : F.obj A) :
    Function.Surjective (fun f : Aut A ↦ F.map f.hom a)

(F : CategoryTheory.Functor C FintypeCat)

Function.Surjective fun f => F.map f.hom a


/-- Group homomorphisms preserve inverse. -/
@[to_additive (attr := simp) "Additive group homomorphisms preserve negation."]
theorem map_inv [Group G] [DivisionMonoid H] [MonoidHomClass F G H]
    (f : F) (a : G) : f a⁻¹ = (f a)⁻¹

{G : Type u_7}
{H : Type u_8}
{F : Type u_9}
[FunLike F G H]
[Group G]
[DivisionMonoid H]
[MonoidHomClass F G H]
(f : F)
(a : G)


/-- The relative product of homotopies `F` and `G`,
  where `F` takes `f₀` to `f₁` and `G` takes `g₀` to `g₁` -/
@[simps!]
def HomotopyRel.prod (F : HomotopyRel f₀ f₁ S) (G : HomotopyRel g₀ g₁ S) :
    HomotopyRel (prodMk f₀ g₀) (prodMk f₁ g₁) S

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
{A : Type u_3}
[TopologicalSpace A]
{f₀ f₁ : C(A, α)}
{g₀ g₁ : C(A, β)}
{S : Set A}
(F : f₀.HomotopyRel f₁ S)
(G : g₀.HomotopyRel g₁ S)
(t : ↑unitInterval × A)


/-- The orthogonal projection onto the trivial submodule is the zero map. -/
@[simp]
theorem orthogonalProjection_bot : orthogonalProjection (⊥ : Submodule 𝕜 E) = 0

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


@[simp] lemma mk_mul (i j : NumDenSameDeg 𝒜 x) : mk (i * j) = mk i * mk j

(i j : HomogeneousLocalization.NumDenSameDeg 𝒜 x)

HomogeneousLocalization.mk (i * j) = HomogeneousLocalization.mk i * HomogeneousLocalization.mk j


@[simp]
theorem mulVec_single [Fintype n] [DecidableEq n] [NonUnitalNonAssocSemiring R] (M : Matrix m n R)
    (j : n) (x : R) : M *ᵥ Pi.single j x = fun i => M i j * x

{m : Type u_2}
{n : Type u_3}
{R : Type u_7}
[Fintype n]
[DecidableEq n]
[NonUnitalNonAssocSemiring R]
(M : Matrix m n R)
(j : n)
(x : R)


theorem nhdsWithin_extChartAt_target_eq' {x y : M} (hy : y ∈ (extChartAt I x).source) :
    𝓝[(extChartAt I x).target] extChartAt I x y = 𝓝[range I] extChartAt I x y

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
{x y : M}
(hy : y ∈ (extChartAt I x).source)

𝓝[(extChartAt I x).target] ↑(extChartAt I x) y = 𝓝[Set.range ↑I] ↑(extChartAt I x) y


@[to_additive (attr := simp)]
theorem mulSupport_nonempty_iff {f : α → M} : (mulSupport f).Nonempty ↔ f ≠ 1

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α → M}


@[simp]
theorem sumToIter_Xl (b : S₁) : sumToIter R S₁ S₂ (X (Sum.inl b)) = X b

(R : Type u)
(S₁ : Type v)
(S₂ : Type w)
[CommSemiring R]
(b : S₁)

(MvPolynomial.sumToIter R S₁ S₂) (MvPolynomial.X (Sum.inl b)) = MvPolynomial.X b


theorem orderTop_neg {x : HahnSeries Γ R} : (-x).orderTop = x.orderTop

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddGroup R]
{x : HahnSeries Γ R}


/--
Given a natural isomorphism `G ⋙ ℱ ≅ G ⋙ ℱ'` between presheaves of arbitrary category,
where `G` is locally-full and cover-dense, and `ℱ', ℱ` are sheaves,
we may obtain a natural isomorphism between presheaves.
-/
@[simps]
noncomputable def sheafIso {ℱ ℱ' : Sheaf K A} (i : G.op ⋙ ℱ.val ≅ G.op ⋙ ℱ'.val) : ℱ ≅ ℱ'

{K : CategoryTheory.GrothendieckTopology D}

(i : G.op.comp ℱ.val ≅ G.op.comp ℱ'.val)

(CategoryTheory.Functor.IsCoverDense.sheafIso i).hom.val = (CategoryTheory.Functor.IsCoverDense.presheafIso i).hom


@[simp]
theorem domLCongr_symm {α₁ α₂ : Type*} (f : α₁ ≃ α₂) :
    ((Finsupp.domLCongr f).symm : (_ →₀ M) ≃ₗ[R] _) = Finsupp.domLCongr f.symm

{M : Type u_2}
{R : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α₁ : Type u_7}
{α₂ : Type u_8}
(f : α₁ ≃ α₂)

(Finsupp.domLCongr f).symm = Finsupp.domLCongr f.symm


/-- Subtracting two points in the subspace produces a vector in the direction. -/
theorem vsub_mem_direction {s : AffineSubspace k P} {p1 p2 : P} (hp1 : p1 ∈ s) (hp2 : p2 ∈ s) :
    p1 -ᵥ p2 ∈ s.direction

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : AffineSubspace k P}
{p1 p2 : P}
(hp1 : p1 ∈ s)
(hp2 : p2 ∈ s)


@[simp]
theorem prod.map_id_id {X Y : C} [HasBinaryProduct X Y] : prod.map (𝟙 X) (𝟙 Y) = 𝟙 _

CategoryTheory.Limits.prod.map (𝟙 X) (𝟙 Y) = 𝟙 (X ⨯ Y)


theorem nonempty_iInter₂ {s : ∀ i, κ i → Set α} :
    (⋂ (i) (j), s i j).Nonempty ↔ ∃ a, ∀ i j, a ∈ s i j

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_7}
{s : (i : ι) → κ i → Set α}

(⋂ i, ⋂ j, s i j).Nonempty ↔ ∃ a, ∀ (i : ι) (j : κ i), a ∈ s i j


/-- A `GroupFilterBasis` on a group is a `FilterBasis` satisfying some additional axioms.
  Example : if `G` is a topological group then the neighbourhoods of the identity are a
  `GroupFilterBasis`. Conversely given a `GroupFilterBasis` one can define a topology
  compatible with the group structure on `G`. -/
class GroupFilterBasis (G : Type u) [Group G] extends FilterBasis G where
  one' : ∀ {U}, U ∈ sets → (1 : G) ∈ U
  mul' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V * V ⊆ U
  inv' : ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x⁻¹) ⁻¹' U
  conj' : ∀ x₀, ∀ {U}, U ∈ sets → ∃ V ∈ sets, V ⊆ (fun x ↦ x₀ * x * x₀⁻¹) ⁻¹' U

{G : Type u}
[Group G]
[self : GroupFilterBasis G]
{U : Set G}

U ∈ GroupFilterBasis.toFilterBasis.sets → 1 ∈ U


@[simp]
theorem annihilator_mul (I : Ideal R) : annihilator I * I = ⊥

{R : Type u}
[CommSemiring R]
(I : Ideal R)


@[simp]
theorem toDual_sdiff (a b : α) : toDual (a \ b) = toDual b ⇨ toDual a

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

OrderDual.toDual (a \ b) = OrderDual.toDual b ⇨ OrderDual.toDual a


@[simp] lemma comp_bot : comp (⊥ : α) = ⊤

{α : Type u_1}
[GeneralizedBooleanAlgebra α]


@[simp]
theorem aleph_lt {o₁ o₂ : Ordinal} : aleph o₁ < aleph o₂ ↔ o₁ < o₂

Cardinal.aleph o₁ < Cardinal.aleph o₂ ↔ o₁ < o₂


theorem integral_comp_sub_right (d) : (∫ x in a..b, f (x - d)) = ∫ x in a - d..b - d, f x

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ℝ}
(f : ℝ → E)
(d : ℝ)

∫ (x : ℝ) in a..b, f (x - d) = ∫ (x : ℝ) in a - d..b - d, f x


protected theorem lawfulFunctor : @LawfulFunctor _ (Equiv.functor eqv)

{t t' : Type u → Type u}
(eqv : (α : Type u) → t α ≃ t' α)
[Functor t]
[LawfulFunctor t]


@[simp]
theorem equivOfRightInverse_symm_apply (f₁ : M →L[R] M₂) (f₂ : M₂ →L[R] M)
    (h : Function.RightInverse f₂ f₁) (y : M₂ × ker f₁) :
    (equivOfRightInverse f₁ f₂ h).symm y = f₂ y.1 + y.2

{R : Type u_1}
[Ring R]
{M : Type u_3}
[TopologicalSpace M]
[AddCommGroup M]
[Module R M]
{M₂ : Type u_4}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M₂]
[TopologicalAddGroup M]
(f₁ : M →L[R] M₂)
(f₂ : M₂ →L[R] M)
(h : Function.RightInverse ⇑f₂ ⇑f₁)
(y : M₂ × ↥(LinearMap.ker f₁))

(ContinuousLinearEquiv.equivOfRightInverse f₁ f₂ h).symm y = f₂ y.1 + ↑y.2


/--
Given a natural isomorphism `G ⋙ ℱ ≅ G ⋙ ℱ'` between presheaves of types,
where `G` is locally-full and cover-dense, and `ℱ, ℱ'` are sheaves,
we may obtain a natural isomorphism between presheaves.
-/
@[simps!]
noncomputable def presheafIso {ℱ ℱ' : SheafOfTypes.{v} K} (i : G.op ⋙ ℱ.val ≅ G.op ⋙ ℱ'.val) :
    ℱ.val ≅ ℱ'.val

∀ (a : ℱ.val.obj X),
  (CategoryTheory.Functor.IsCoverDense.Types.presheafIso i).hom.app X a =
    CategoryTheory.Functor.IsCoverDense.Types.appHom i.hom (Opposite.unop X) a


/-- When the second map `S.g` is zero, this is the left homology data on `S` given
by any colimit cokernel cofork of `S.f` -/
@[simps]
def ofIsColimitCokernelCofork (hg : S.g = 0) (c : CokernelCofork S.f) (hc : IsColimit c) :
    S.LeftHomologyData

(c : CategoryTheory.Limits.CokernelCofork S.f)

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.ShortComplex.LeftHomologyData.ofIsColimitCokernelCofork S hg c hc).K = S.X₂


theorem ofFunction_le (s : Set α) : OuterMeasure.ofFunction m m_empty s ≤ m s

{α : Type u_1}
{m : Set α → ℝ≥0∞}
{m_empty : m ∅ = 0}
(s : Set α)

(MeasureTheory.OuterMeasure.ofFunction m m_empty) s ≤ m s


@[to_additive (attr := simp)]
theorem MonoidHom.comp_id [MulOneClass M] [MulOneClass N] (f : M →* N) :
    f.comp (MonoidHom.id M) = f

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


protected theorem hasBasis_uniformity_of_basis_aux₁ {p : ι → Prop} {s : ι → Set (β × β)}
    (hb : HasBasis (𝓤 β) p s) (S : Set α) :
    (@uniformity (α →ᵤ[𝔖] β) ((UniformFun.uniformSpace S β).comap S.restrict)).HasBasis p fun i =>
      UniformOnFun.gen 𝔖 S (s i)

(α : Type u_1)
(β : Type u_2)
{ι : Type u_4}
[UniformSpace β]
(𝔖 : Set (Set α))
{p : ι → Prop}
{s : ι → Set (β × β)}
(hb : (𝓤 β).HasBasis p s)
(S : Set α)

(𝓤 (α →ᵤ[𝔖] β)).HasBasis p fun i => UniformOnFun.gen 𝔖 S (s i)


@[to_additive (attr := simp)]
theorem mulSupport_subset_iff {f : α → M} {s : Set α} : mulSupport f ⊆ s ↔ ∀ x, f x ≠ 1 → x ∈ s

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α → M}
{s : Set α}

Function.support f ⊆ s ↔ ∀ (x : α), f x ≠ 0 → x ∈ s


theorem isOpenMap (e : M₁ ≃SL[σ₁₂] M₂) : IsOpenMap e

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


/-- A continuous function which tendsto `Filter.atBot` along `Filter.atTop` and to `Filter.atTop`
along `atBot` is surjective. -/
theorem Continuous.surjective' {f : α → δ} (hf : Continuous f) (h_top : Tendsto f atBot atTop)
    (h_bot : Tendsto f atTop atBot) : Function.Surjective f

(h_top : Filter.Tendsto f Filter.atBot Filter.atTop)

(h_bot : Filter.Tendsto f Filter.atTop Filter.atBot)


theorem eLpNorm_const_smul_le (c : 𝕜) (f : α → F) : eLpNorm (c • f) p μ ≤ ‖c‖₊ • eLpNorm f p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[MulActionWithZero 𝕜 F]
[BoundedSMul 𝕜 F]
(c : 𝕜)
(f : α → F)

MeasureTheory.eLpNorm (c • f) p μ ≤ ‖c‖₊ • MeasureTheory.eLpNorm f p μ


/-- A concrete category is a category `C` with a fixed faithful functor `Forget : C ⥤ Type`.

Note that `ConcreteCategory` potentially depends on three independent universe levels,
* the universe level `w` appearing in `Forget : C ⥤ Type w`
* the universe level `v` of the morphisms (i.e. we have a `Category.{v} C`)
* the universe level `u` of the objects (i.e `C : Type u`)
They are specified that order, to avoid unnecessary universe annotations.
-/
class ConcreteCategory (C : Type u) [Category.{v} C] where
  /-- We have a functor to Type -/
  protected forget : C ⥤ Type w
  /-- That functor is faithful -/
  [forget_faithful : forget.Faithful]

[self : CategoryTheory.ConcreteCategory C]


theorem exists_rat_btwn {x y : α} (h : x < y) : ∃ q : ℚ, x < q ∧ (q : α) < y

{α : Type u_1}
[LinearOrderedField α]
[Archimedean α]
{x y : α}
(h : x < y)


theorem SuperpolynomialDecay.mul_param_zpow (hk : Tendsto k l atTop)
    (hf : SuperpolynomialDecay l k f) (z : ℤ) : SuperpolynomialDecay l k fun a => f a * k a ^ z

(hf : Asymptotics.SuperpolynomialDecay l k f)

Asymptotics.SuperpolynomialDecay l k fun a => f a * k a ^ z


lemma uniformEmbedding_comp {Y : Type*} [UniformSpace Y] [Zero Y] (g : C(Y, R)₀)
    (hg : UniformEmbedding g) : UniformEmbedding (g.comp · : C(X, Y)₀ → C(X, R)₀)

{X : Type u_1}
{R : Type u_2}
[Zero X]
[TopologicalSpace X]
[Zero R]
[UniformSpace R]
{Y : Type u_3}
[UniformSpace Y]
[Zero Y]
(g : ContinuousMapZero Y R)
(hg : UniformEmbedding ⇑g)


lemma nhds_subtype_eq_comap_nhdsWithin (s : Set X) (x : { x // x ∈ s }) :
    𝓝 x = comap (↑) (𝓝[s] (x : X))

{X : Type u}
[TopologicalSpace X]
(s : Set X)
(x : { x // x ∈ s })

𝓝 x = Filter.comap Subtype.val (𝓝[s] ↑x)


theorem Separable.of_dvd {f g : R[X]} (hf : f.Separable) (hfg : g ∣ f) : g.Separable

{R : Type u}
[CommSemiring R]
{f g : R[X]}
(hf : f.Separable)
(hfg : g ∣ f)


/-- When `S.g = 0`, this is the canonical isomorphism `S.opcycles ≅ S.rightHomology` induced
by `S.rightHomologyι`. -/
@[simps! inv]
noncomputable def opcyclesIsoRightHomology (hg : S.g = 0) : S.opcycles ≅ S.rightHomology

(S.opcyclesIsoRightHomology hg).inv = S.rightHomologyι


theorem frontier_le_subset_eq (hf : Continuous f) (hg : Continuous g) :
    frontier { b | f b ≤ g b } ⊆ { b | f b = g b }

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{f g : β → α}
[TopologicalSpace β]
(hf : Continuous f)
(hg : Continuous g)

frontier {b | f b ≤ g b} ⊆ {b | f b = g b}


theorem liftPropAt_symm_of_mem_maximalAtlas [HasGroupoid M G] {x : H}
    (hG : G.LocalInvariantProp G Q) (hQ : ∀ y, Q id univ y) (he : e ∈ maximalAtlas M G)
    (hx : x ∈ e.target) : LiftPropAt Q e.symm x

(he : e ∈ StructureGroupoid.maximalAtlas M G)


@[simp]
theorem toAffineIsometry_linearIsometry : f.toAffineIsometry.linearIsometry = f

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


@[simp]
theorem asModuleEquiv_symm_map_rho (g : G) (x : V) :
    ρ.asModuleEquiv.symm (ρ g x) = MonoidAlgebra.of k G g • ρ.asModuleEquiv.symm x

{k : Type u_1}
{G : Type u_2}
{V : Type u_3}
[CommSemiring k]
[Monoid G]
[AddCommMonoid V]
[Module k V]
(ρ : Representation k G V)
(g : G)
(x : V)

ρ.asModuleEquiv.symm ((ρ g) x) = (MonoidAlgebra.of k G) g • ρ.asModuleEquiv.symm x


@[to_additive]
theorem of_injective_mulHom (f : H →ₙ* G) (hf : Function.Injective f)
    (_ : TwoUniqueProds G) : TwoUniqueProds H

{G : Type u}
{H : Type v}
[Mul G]
[Mul H]
(f : H →ₙ* G)
(hf : Function.Injective ⇑f)


protected theorem Nonempty.subset_singleton_iff {s : Finset α} {a : α} (h : s.Nonempty) :
    s ⊆ {a} ↔ s = {a}

{α : Type u_1}
{s : Finset α}
{a : α}
(h : s.Nonempty)


theorem binomial_eq [DecidableEq α] (h : a ≠ b) :
    multinomial {a, b} f = (f a + f b)! / ((f a)! * (f b)!)

{α : Type u_1}
{f : α → ℕ}
{a b : α}
[DecidableEq α]
(h : a ≠ b)

Nat.multinomial {a, b} f = (f a + f b)! / ((f a)! * (f b)!)


theorem isEmpty : ∀ {s}, ValidFor l m r s → (s.isEmpty ↔ m = [])

Substring.ValidFor l m r s → (s.isEmpty = true ↔ m = [])


theorem setIntegral_ge_of_const_le {c : ℝ} (hs : MeasurableSet s) (hμs : μ s ≠ ∞)
    (hf : ∀ x ∈ s, c ≤ f x) (hfint : IntegrableOn (fun x : X => f x) s μ) :
    c * (μ s).toReal ≤ ∫ x in s, f x ∂μ

(hfint : MeasureTheory.IntegrableOn (fun x => f x) s μ)

c * (μ s).toReal ≤ ∫ (x : X) in s, f x ∂μ


theorem Nodup.of_map (f : α → β) : Nodup (map f s) → Nodup s

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


theorem le_cof_iff_lsub {o : Ordinal} {a : Cardinal} :
    a ≤ cof o ↔ ∀ {ι} (f : ι → Ordinal), lsub.{u, u} f = o → a ≤ #ι

a ≤ o.cof ↔ ∀ {ι : Type u} (f : ι → Ordinal.{u}), Ordinal.lsub f = o → a ≤ #ι


theorem Basis.indep (hI : M.Basis I X) : M.Indep I

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hI : M.Basis I X)


@[simp]
theorem image_insert [DecidableEq α] (f : α → β) (a : α) (s : Finset α) :
    (insert a s).image f = insert (f a) (s.image f)

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

Finset.image f (insert a s) = insert (f a) (Finset.image f s)


/-- If `e : C ≌ D` is an equivalence of categories, then `functoriality F e.functor` induces an
equivalence between cocones over `F` and cocones over `F ⋙ e.functor`.
-/
@[simps]
def functorialityEquivalence (e : C ≌ D) : Cocone F ≌ Cocone (F ⋙ e.functor)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(F : J ⥤ C)
(e : C ≌ D)

(CategoryTheory.Limits.Cocones.functorialityEquivalence F e).inverse =
  CategoryTheory.Limits.Cocones.functoriality (F ⋙ e.functor) e.inverse ⋙
    (CategoryTheory.Limits.Cocones.precomposeEquivalence
        (F.associator e.functor e.inverse ≪≫
            CategoryTheory.isoWhiskerLeft F e.unitIso.symm ≪≫ F.rightUnitor).symm).functor


@[simp]
theorem limit_π_homDiagram_eqToHom {F : J ⥤ Cat.{v, v}} (X Y : limit (F ⋙ Cat.objects.{v, v}))
    (j : J) (h : X = Y) :
    limit.π (homDiagram X Y) j (eqToHom h) =
      eqToHom (congr_arg (limit.π (F ⋙ Cat.objects.{v, v}) j) h)

{F : CategoryTheory.Functor J CategoryTheory.Cat}

(X Y : CategoryTheory.Limits.limit (F.comp CategoryTheory.Cat.objects))

CategoryTheory.Limits.limit.π (CategoryTheory.Cat.HasLimits.homDiagram X Y) j (CategoryTheory.eqToHom h) =
  CategoryTheory.eqToHom ⋯


/-- Given `w : TwoSquare T L R B` and a morphism `g : R.obj X₂ ⟶ B.obj X₃`, this is
the obvious functor `w.StructuredArrowRightwards g ⥤ w.CostructuredArrowDownwards g`. -/
@[simps]
def functor : w.StructuredArrowRightwards g ⥤ w.CostructuredArrowDownwards g

{C₁ : Type u₁}
{C₂ : Type u₂}
{C₃ : Type u₃}
{C₄ : Type u₄}
[CategoryTheory.Category.{v₁, u₁} C₁]
[CategoryTheory.Category.{v₂, u₂} C₂]
[CategoryTheory.Category.{v₃, u₃} C₃]
[CategoryTheory.Category.{v₄, u₄} C₄]
{T : CategoryTheory.Functor C₁ C₂}
{L : CategoryTheory.Functor C₁ C₃}
{R : CategoryTheory.Functor C₂ C₄}
{B : CategoryTheory.Functor C₃ C₄}
(w : CategoryTheory.TwoSquare T L R B)
{X₂ : C₂}
{X₃ : C₃}
(g : R.obj X₂ ⟶ B.obj X₃)
(f : w.StructuredArrowRightwards g)

(CategoryTheory.TwoSquare.EquivalenceJ.functor w g).obj f =
  CategoryTheory.CostructuredArrow.mk (CategoryTheory.StructuredArrow.homMk f.right.hom ⋯)


/-- Composition of two relation isomorphisms is a relation isomorphism. -/
@[simps! apply]
protected def trans (f₁ : r ≃r s) (f₂ : s ≃r t) : r ≃r t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
{t : γ → γ → Prop}
(f₁ : r ≃r s)
(f₂ : s ≃r t)


theorem infty_not_mem_image_coe {s : Set X} : ∞ ∉ ((↑) : X → OnePoint X) '' s


theorem Equiv_isup_symm_inclusion_apply {i : ι} (x : S i) :
    (Equiv_iSup S).symm (Substructure.inclusion (le_iSup _ _) x)
    = of L ι _ (fun _ _ h ↦ Substructure.inclusion (S.monotone h)) i x

{L : FirstOrder.Language}
{ι : Type v}
[Preorder ι]
[Nonempty ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{M : Type u_1}
[L.Structure M]
(S : ι →o L.Substructure M)
{i : ι}
(x : ↥(S i))

(FirstOrder.Language.DirectLimit.Equiv_iSup S).symm ((FirstOrder.Language.Substructure.inclusion ⋯) x) =
  (FirstOrder.Language.DirectLimit.of L ι (fun x => ↥(S x))
      (fun x x_1 h => FirstOrder.Language.Substructure.inclusion ⋯) i)
    x


@[simp]
theorem lift_power (a b : Cardinal.{u}) : lift.{v} (a ^ b) = lift.{v} a ^ lift.{v} b

Cardinal.lift.{v, u} (a ^ b) = Cardinal.lift.{v, u} a ^ Cardinal.lift.{v, u} b


theorem card_congr {α : Type*} {β : Type*} (f : α ≃ β) : PartENat.card α = PartENat.card β

{α : Type u_3}
{β : Type u_4}
(f : α ≃ β)


theorem dist_eq_tsum (x y : ∀ i, F i) :
    dist x y = ∑' i : ι, min ((1 / 2) ^ encode i : ℝ) (dist (x i) (y i))

{ι : Type u_2}
[Encodable ι]
{F : ι → Type u_3}
[(i : ι) → MetricSpace (F i)]
(x y : (i : ι) → F i)

dist x y = ∑' (i : ι), min ((1 / 2) ^ Encodable.encode i) (dist (x i) (y i))


lemma tensorQuotEquivQuotSMul_symm_comp_mkQ (I : Ideal R) :
    (tensorQuotEquivQuotSMul M I).symm ∘ₗ (I • ⊤ : Submodule R M).mkQ =
      (TensorProduct.mk R M (R ⧸ I)).flip 1

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

↑(tensorQuotEquivQuotSMul M I).symm ∘ₗ (I • ⊤).mkQ = (TensorProduct.mk R M (R ⧸ I)).flip 1


theorem solvable_iff_equiv_solvable (e : L' ≃ₗ⁅R⁆ L) : IsSolvable R L' ↔ IsSolvable R L

{R : Type u}
{L : Type v}
{L' : Type w₁}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(e : L' ≃ₗ⁅R⁆ L)

LieAlgebra.IsSolvable R L' ↔ LieAlgebra.IsSolvable R L


lemma preΨ'_odd (m : ℕ) : W.preΨ' (2 * (m + 2) + 1) =
    W.preΨ' (m + 4) * W.preΨ' (m + 2) ^ 3 * (if Even m then W.Ψ₂Sq ^ 2 else 1) -
      W.preΨ' (m + 1) * W.preΨ' (m + 3) ^ 3 * (if Even m then 1 else W.Ψ₂Sq ^ 2)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(m : ℕ)

W.preΨ' (2 * (m + 2) + 1) =
  (W.preΨ' (m + 4) * W.preΨ' (m + 2) ^ 3 * if Even m then W.Ψ₂Sq ^ 2 else 1) -
    W.preΨ' (m + 1) * W.preΨ' (m + 3) ^ 3 * if Even m then 1 else W.Ψ₂Sq ^ 2


theorem det_sum_smul_le {ι : Type*} (s : Finset ι) {c : ι → R} {A : ι → Matrix n n R}
    {abv : AbsoluteValue R S} {x : S} (hx : ∀ k i j, abv (A k i j) ≤ x) {y : S}
    (hy : ∀ k, abv (c k) ≤ y) :
    abv (det (∑ k ∈ s, c k • A k)) ≤
      Nat.factorial (Fintype.card n) • (Finset.card s • y * x) ^ Fintype.card n

(hx : ∀ (k : ι) (i j : n), abv (A k i j) ≤ x)

abv (∑ k ∈ s, c k • A k).det ≤ (Fintype.card n).factorial • (s.card • y * x) ^ Fintype.card n


/-- If the measure of the symmetric difference of two sets is finite,
then one has finite measure if and only if the other one does. -/
theorem measure_ne_top_iff_of_symmDiff (hμst : μ (s ∆ t) ≠ ∞) : μ s ≠ ∞ ↔ μ t ≠ ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
(hμst : μ (symmDiff s t) ≠ ⊤)

μ s ≠ ⊤ ↔ μ t ≠ ⊤


theorem fromLocalizedModule'_smul (r : R) (x : LocalizedModule S M) :
    r • fromLocalizedModule' S f x = fromLocalizedModule' S f (r • x)

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

r • IsLocalizedModule.fromLocalizedModule' S f x = IsLocalizedModule.fromLocalizedModule' S f (r • x)


@[simp]
lemma stalkMap_inv_hom_apply (e : X ≅ Y) (x : X) (y) :
    e.hom.stalkMap x (e.inv.stalkMap (e.hom.val.base x) y) =
      X.presheaf.stalkSpecializes (specializes_of_eq <| by simp) y

{X Y : AlgebraicGeometry.LocallyRingedSpace}

(y : ↑(X.presheaf.stalk (e.inv.val.base (e.hom.val.base x))))

(AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap e.hom x)
    ((AlgebraicGeometry.LocallyRingedSpace.Hom.stalkMap e.inv (e.hom.val.base x)) y) =
  (X.presheaf.stalkSpecializes ⋯) y


@[to_additive]
theorem measurable_mul_unop {α : Type*} [MeasurableSpace α] : Measurable (unop : αᵐᵒᵖ → α)


/-- The set of points for which a measurable sequence of functions converges is measurable. -/
@[measurability]
theorem measurableSet_exists_tendsto [TopologicalSpace γ] [PolishSpace γ] [MeasurableSpace γ]
    [hγ : OpensMeasurableSpace γ] [Countable ι] {l : Filter ι}
    [l.IsCountablyGenerated] {f : ι → β → γ} (hf : ∀ i, Measurable (f i)) :
    MeasurableSet { x | ∃ c, Tendsto (fun n => f n x) l (𝓝 c) }

{ι : Type u_2}
{γ : Type u_3}
{β : Type u_5}
[MeasurableSpace β]
[TopologicalSpace γ]
[PolishSpace γ]
[MeasurableSpace γ]
[hγ : OpensMeasurableSpace γ]
[Countable ι]
{l : Filter ι}
[l.IsCountablyGenerated]
{f : ι → β → γ}
(hf : ∀ (i : ι), Measurable (f i))

MeasurableSet {x | ∃ c, Filter.Tendsto (fun n => f n x) l (𝓝 c)}


theorem exists_finset_of_splits (i : F →+* K) {f : F[X]} (sep : Separable f) (sp : Splits i f) :
    ∃ s : Finset K, f.map i = C (i f.leadingCoeff) * s.prod fun a : K => X - C a

{F : Type u}
[Field F]
{K : Type v}
[Field K]
(i : F →+* K)
{f : F[X]}
(sep : f.Separable)
(sp : Polynomial.Splits i f)

∃ s, Polynomial.map i f = Polynomial.C (i f.leadingCoeff) * ∏ a ∈ s, (Polynomial.X - Polynomial.C a)


theorem not_isRightDescent_one (i : B) : ¬cs.IsRightDescent 1 i

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


/-- `HasFiniteBiproducts C` represents a choice of biproduct for every family of objects in `C`
indexed by a finite type. -/
class HasFiniteBiproducts : Prop where
  out : ∀ n, HasBiproductsOfShape (Fin n) C

[self : CategoryTheory.Limits.HasFiniteBiproducts C]

CategoryTheory.Limits.HasBiproductsOfShape (Fin n) C


theorem l_sup : l (a₁ ⊔ a₂) = l a₁ ⊔ l a₂

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


@[simp] theorem fst_mul [Add ι] [GMul A] (x y : GradedMonoid A) :
    (x * y).fst = x.fst + y.fst

{ι : Type u_1}
(A : ι → Type u_2)
[Add ι]
[GradedMonoid.GMul A]
(x y : GradedMonoid A)


/-- The shift functor by `n : ℤ` on `CochainComplex C ℤ` which sends a cochain
complex `K` to the complex which is `K.X (i + n)` in degree `i`, and which
multiplies the differentials by `(-1)^n`. -/
@[simps]
def shiftFunctor (n : ℤ) : CochainComplex C ℤ ⥤ CochainComplex C ℤ

(C : Type u)
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(n : ℤ)
(K : CochainComplex C ℤ)
(i j : ℤ)

((CochainComplex.shiftFunctor C n).obj K).d i j = n.negOnePow • K.d (i + n) (j + n)


theorem HasDerivAt.mul (hc : HasDerivAt c c' x) (hd : HasDerivAt d d' x) :
    HasDerivAt (fun y => c y * d y) (c' * d x + c x * d') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c d : 𝕜 → 𝔸}
{c' d' : 𝔸}
(hc : HasDerivAt c c' x)
(hd : HasDerivAt d d' x)


/-- Given the nondegenerate bilinear form `B`, the linear map `φ` has a unique left adjoint given by
`BilinForm.leftAdjointOfNondegenerate`. -/
theorem isAdjointPair_iff_eq_of_nondegenerate (B : BilinForm K V) (b : B.Nondegenerate)
    (ψ φ : V →ₗ[K] V) : IsAdjointPair B B ψ φ ↔ ψ = B.leftAdjointOfNondegenerate b φ

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
[FiniteDimensional K V]
(B : LinearMap.BilinForm K V)
(b : B.Nondegenerate)
(ψ φ : V →ₗ[K] V)

B.IsAdjointPair B ψ φ ↔ ψ = B.leftAdjointOfNondegenerate b φ


/-- The integral of a measurable function over `UnitAddCircle` is equal to the integral over an
interval (t, t + 1] in `ℝ` of its lift to `ℝ`. -/
protected theorem lintegral_preimage (t : ℝ) (f : UnitAddCircle → ℝ≥0∞) :
    (∫⁻ a in Ioc t (t + 1), f a) = ∫⁻ b : UnitAddCircle, f b

∫⁻ (a : ℝ) in Set.Ioc t (t + 1), f ↑a = ∫⁻ (b : UnitAddCircle), f b


@[simp]
theorem iteratedFDerivWithin_zero_apply (m : Fin 0 → E) :
    (iteratedFDerivWithin 𝕜 0 f s x : (Fin 0 → E) → F) m = f x

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

(iteratedFDerivWithin 𝕜 0 f s x) m = f x


/-- Given a representation of a Lie algebra with distinguished `sl₂` triple, a vector is said to be
primitive if it is a simultaneous eigenvector for the action of both `h`, `e`, and the eigenvalue
for `e` is zero. -/
structure HasPrimitiveVectorWith (t : IsSl2Triple h e f) (m : M) (μ : R) : Prop where
  ne_zero : m ≠ 0
  lie_h : ⁅h, m⁆ = μ • m
  lie_e : ⁅e, m⁆ = 0

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{h e f : L}
{t : IsSl2Triple h e f}
{m : M}
{μ : R}
(self : t.HasPrimitiveVectorWith m μ)


/-- If an element `b` becomes `M`-regular after multiplying it on the left by an `M`-regular
element, then `b` is `M`-regular. -/
theorem of_smul (a : R) (ab : IsSMulRegular M (a • s)) : IsSMulRegular M s

{R : Type u_1}
{S : Type u_2}
{M : Type u_3}
{s : S}
[SMul R M]
[SMul R S]
[SMul S M]
[IsScalarTower R S M]
(a : R)
(ab : IsSMulRegular M (a • s))


@[simp]
theorem self_trans_symm (e : L₁ ≃ₗ⁅R⁆ L₂) : e.trans e.symm = refl

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
[CommRing R]
[LieRing L₁]
[LieRing L₂]
[LieAlgebra R L₁]
[LieAlgebra R L₂]
(e : L₁ ≃ₗ⁅R⁆ L₂)


theorem toFinsupp_zero : toFinsupp (0 : Multiset α) = 0


@[simp]
theorem coe_nonneg (q : ℚ≥0) : (0 : ℚ) ≤ q


theorem Antitone.reflect_lt (hf : Antitone f) {a b : α} (h : f a < f b) : b < a

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)
{a b : α}
(h : f a < f b)


@[simp] theorem run_read [Monad m] (ctx : ρ) : (ReaderT.read : ReaderT ρ m ρ).run ctx = pure ctx

{m : Type u_1 → Type u_2}
{ρ : Type u_1}
[Monad m]
(ctx : ρ)


theorem cof_sup_le {ι} {f : ι → Ordinal} (H : ∀ i, f i < sup.{u, u} f) :
    cof (sup.{u, u} f) ≤ #ι

{ι : Type u}
{f : ι → Ordinal.{u}}
(H : ∀ (i : ι), f i < Ordinal.sup f)


@[simp]
theorem Trident.ofCone_π {F : WalkingParallelFamily J ⥤ C} (t : Cone F) (j) :
    (Trident.ofCone t).π.app j = t.π.app j ≫ eqToHom (by cases j <;> aesop_cat)

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

(j : CategoryTheory.Limits.WalkingParallelFamily J)

(CategoryTheory.Limits.Trident.ofCone t).π.app j =
  CategoryTheory.CategoryStruct.comp (t.π.app j) (CategoryTheory.eqToHom ⋯)


@[simp]
theorem toLinear_apply (v : n → R) : (toLinear A).toLinearEquiv v = Matrix.mulVecLin (↑A) v

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A : GL n R)
(v : n → R)

(Matrix.GeneralLinearGroup.toLinear A).toLinearEquiv v = (↑A).mulVecLin v


theorem IsOpen.continuous_piecewise_of_specializes [DecidablePred (· ∈ s)] (hs : IsOpen s)
    (hf : Continuous f) (hg : Continuous g) (hspec : ∀ x, f x ⤳ g x) :
    Continuous (s.piecewise f g)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{f g : X → Y}
[DecidablePred fun x => x ∈ s]
(hs : IsOpen s)
(hf : Continuous f)
(hg : Continuous g)
(hspec : ∀ (x : X), f x ⤳ g x)


theorem diagonal_isStableUnderComposition [P.IsStableUnderComposition] [RespectsIso P]
    (hP'' : StableUnderBaseChange P) : P.diagonal.IsStableUnderComposition

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasPullbacks C]
{P : CategoryTheory.MorphismProperty C}
[P.IsStableUnderComposition]
[P.RespectsIso]
(hP'' : P.StableUnderBaseChange)


@[to_additive]
lemma ofUnits_sSup (s : Set (Subgroup Mˣ)) : (sSup s).ofUnits = ⨆ S ∈ s, S.ofUnits

{M : Type u_1}
[Monoid M]
(s : Set (Subgroup Mˣ))


@[simp, reassoc]
theorem pullbackP1Iso_hom_ι (i : 𝒰.J) :
    (pullbackP1Iso 𝒰 f g i).hom ≫ Multicoequalizer.π (gluing 𝒰 f g).diagram i =
    pullback.fst _ _

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

(AlgebraicGeometry.Scheme.Pullback.pullbackP1Iso 𝒰 f g i).hom ≫
    CategoryTheory.Limits.Multicoequalizer.π (AlgebraicGeometry.Scheme.Pullback.gluing 𝒰 f g).diagram i =
  CategoryTheory.Limits.pullback.fst (AlgebraicGeometry.Scheme.Pullback.p1 𝒰 f g) (𝒰.map i)


theorem iUnion_def' : π.iUnion = ⋃ J ∈ π.boxes, ↑J

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


theorem setLintegral_eq_top_of_measure_eq_top_ne_zero {f : α → ℝ≥0∞} {s : Set α}
    (hf : AEMeasurable f (μ.restrict s)) (hμf : μ ({x ∈ s | f x = ∞}) ≠ 0) :
    ∫⁻ x in s, f x ∂μ = ∞

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
{s : Set α}
(hf : AEMeasurable f (μ.restrict s))
(hμf : μ {x | x ∈ s ∧ f x = ⊤} ≠ 0)


lemma Pi.isCompact_closure_iff {ι : Type*} {π : ι → Type*} [∀ i, TopologicalSpace (π i)]
    [∀ i, T2Space (π i)] {s : Set (Π i, π i)} :
    IsCompact (closure s) ↔ ∀ i, IsCompact (closure <| eval i '' s)

{ι : Type u_4}
{π : ι → Type u_5}
[(i : ι) → TopologicalSpace (π i)]
[∀ (i : ι), T2Space (π i)]
{s : Set ((i : ι) → π i)}

IsCompact (closure s) ↔ ∀ (i : ι), IsCompact (closure (Function.eval i '' s))


theorem Icc_subset_Iic_iff (h₁ : a₁ ≤ b₁) : Icc a₁ b₁ ⊆ Iic b₂ ↔ b₁ ≤ b₂

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


@[simp]
theorem realize_rel₂ {R : L.Relations 2} {t₁ t₂ : L.Term _} :
    (R.boundedFormula₂ t₁ t₂).Realize v xs ↔
      RelMap R ![t₁.realize (Sum.elim v xs), t₂.realize (Sum.elim v xs)]

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{l : ℕ}
{v : α → M}
{xs : Fin l → M}
{R : L.Relations 2}
{t₁ t₂ : L.Term (α ⊕ Fin l)}

(R.boundedFormula₂ t₁ t₂).Realize v xs ↔
  FirstOrder.Language.Structure.RelMap R
    ![FirstOrder.Language.Term.realize (Sum.elim v xs) t₁, FirstOrder.Language.Term.realize (Sum.elim v xs) t₂]


@[simp] lemma Equiv.embeddingFinSucc_fst {n : ℕ} {ι : Type*} (e : Fin (n+1) ↪ ι) :
    ((Equiv.embeddingFinSucc n ι e).1 : Fin n → ι) = e ∘ Fin.succ

{n : ℕ}
{ι : Type u_1}
(e : Fin (n + 1) ↪ ι)

⇑((Equiv.embeddingFinSucc n ι) e).fst = ⇑e ∘ Fin.succ


theorem roots_map_of_injective_of_card_eq_natDegree [IsDomain A] [IsDomain B] {p : A[X]}
    {f : A →+* B} (hf : Function.Injective f) (hroots : Multiset.card p.roots = p.natDegree) :
    p.roots.map f = (p.map f).roots

Multiset.map (⇑f) p.roots = (Polynomial.map f p).roots


@[simp, norm_cast]
theorem natCast_eq_iff {m n : ℕ} : (m : EReal) = (n : EReal) ↔ m = n


theorem one_div_lt_one_div_of_neg_of_lt (hb : b < 0) (h : a < b) : 1 / b < 1 / a

{α : Type u_2}
[LinearOrderedField α]
{a b : α}
(hb : b < 0)
(h : a < b)


/-- `Finset.cons` version of `Finset.Ioo_insert_right`. -/
theorem Ioc_eq_cons_Ioo (h : a < b) : Ioc a b = (Ioo a b).cons b right_not_mem_Ioo

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

Finset.Ioc a b = Finset.cons b (Finset.Ioo a b) ⋯


theorem rightInverse_nat : Function.RightInverse ofNat toNat


theorem leftDistributor_inv {J : Type} [Fintype J] (X : C) (f : J → C) :
    (leftDistributor X f).inv = ∑ j : J, biproduct.π _ j ≫ (X ◁ biproduct.ι f j)

(CategoryTheory.leftDistributor X f).inv =
  ∑ j : J,
    CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Limits.biproduct.π (fun j => CategoryTheory.MonoidalCategory.tensorObj X (f j)) j)
      (CategoryTheory.MonoidalCategory.whiskerLeft X (CategoryTheory.Limits.biproduct.ι f j))


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

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


protected theorem Balanced.reverse {t : RBNode α} : t.Balanced c n → t.reverse.Balanced c n

{α : Type u_1}
{c : Batteries.RBColor}
{n : Nat}
{t : Batteries.RBNode α}


theorem HasDerivAt.const_mul (c : 𝔸) (hd : HasDerivAt d d' x) :
    HasDerivAt (fun y => c * d y) (c * d') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{d : 𝕜 → 𝔸}
{d' : 𝔸}
(c : 𝔸)
(hd : HasDerivAt d d' x)


@[to_additive (attr := simp)] lemma bot_ne_one : (⊥ : WithBot α) ≠ 1


theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
    IsStoppingTime f (τ + π)

{Ω : Type u_1}
{m : MeasurableSpace Ω}
{f : MeasureTheory.Filtration ℕ m}
{τ π : Ω → ℕ}
(hτ : MeasureTheory.IsStoppingTime f τ)
(hπ : MeasureTheory.IsStoppingTime f π)


theorem copy_eq (f : BotHom α β) (f' : α → β) (h : f' = f) : f.copy f' h = f

{α : Type u_2}
{β : Type u_3}
[Bot α]
[Bot β]
(f : BotHom α β)
(f' : α → β)
(h : f' = ⇑f)


theorem extend_coord_change_source :
    ((f.extend I).symm ≫ f'.extend I).source = I '' (f.symm ≫ₕ f').source

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(f f' : PartialHomeomorph M H)
(I : ModelWithCorners 𝕜 E H)

((f.extend I).symm ≫ f'.extend I).source = ↑I '' (f.symm ≫ₕ f').source


@[simp]
theorem ofReal_real_eq_id : @ofReal ℝ _ = id


/-- The measurable superset `toMeasurable μ t` of `t` (which has the same measure as `t`)
satisfies, for any measurable set `s`, the equality `μ (toMeasurable μ t ∩ s) = μ (u ∩ s)`.
Here, we require that the measure of `t` is finite. The conclusion holds without this assumption
when the measure is s-finite (for example when it is σ-finite),
see `measure_toMeasurable_inter_of_sFinite`. -/
theorem measure_toMeasurable_inter {s t : Set α} (hs : MeasurableSet s) (ht : μ t ≠ ∞) :
    μ (toMeasurable μ t ∩ s) = μ (t ∩ s)

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

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


theorem exact_f_d {X Y : C} (f : X ⟶ Y) :
    (ShortComplex.mk f (d f) (by simp)).Exact

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

(CategoryTheory.ShortComplex.mk f (CategoryTheory.Injective.d f) ⋯).Exact


/-- Converting a bundled algebra to a monoid object in `ModuleCat R`.
-/
@[simps]
def inverseObj (A : AlgebraCat.{u} R) : Mon_ (ModuleCat.{u} R)

{R : Type u}
[CommRing R]
(A : AlgebraCat R)

(ModuleCat.MonModuleEquivalenceAlgebra.inverseObj A).X = ModuleCat.of R ↑A


/-- A `BumpCovering ι X s` is an indexed family of functions `f i`, `i : ι`, such that

* the supports of `f i` form a locally finite family of sets, i.e., for every point `x : X` there
  exists a neighborhood `U ∋ x` such that all but finitely many functions `f i` are zero on `U`;
* for all `i`, `x` we have `0 ≤ f i x ≤ 1`;
* each point `x ∈ s` belongs to the interior of `{x | f i x = 1}` for some `i`.

One of the main use cases for a `BumpCovering` is to define a `PartitionOfUnity`, see
`BumpCovering.toPartitionOfUnity`, but some proofs can directly use a `BumpCovering` instead of
a `PartitionOfUnity`.

If `X` is a normal paracompact space, then `BumpCovering.exists_isSubordinate` guarantees that for
every open covering `U : Set (Set X)` of `s` there exists a `BumpCovering` of `s` that is
subordinate to `U`.
-/
structure BumpCovering (ι X : Type*) [TopologicalSpace X] (s : Set X := univ) where
  /-- The collections of continuous functions underlying this bump covering -/
  toFun : ι → C(X, ℝ)
  /-- the supports of the underlying functions are a locally finite family of sets -/
  locallyFinite' : LocallyFinite fun i => support (toFun i)
  /-- the functions are non-negative -/
  nonneg' : 0 ≤ toFun
  /-- the functions are each at most one -/
  le_one' : toFun ≤ 1
  /-- Each point `x ∈ s` belongs to the interior of `{x | f i x = 1}` for some `i`. -/
  eventuallyEq_one' : ∀ x ∈ s, ∃ i, toFun i =ᶠ[𝓝 x] 1

{ι : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{s : optParam (Set X) Set.univ}
(self : BumpCovering ι X s)

LocallyFinite fun i => Function.support ⇑(self.toFun i)


theorem isIso_toSheafify {P : Cᵒᵖ ⥤ D} (hP : Presheaf.IsSheaf J P) : IsIso (toSheafify J P)

(J : CategoryTheory.GrothendieckTopology C)

(hP : CategoryTheory.Presheaf.IsSheaf J P)

CategoryTheory.IsIso (CategoryTheory.toSheafify J P)


@[simp]
theorem subset_support_append_left {V : Type u} {G : SimpleGraph V} {u v w : V}
    (p : G.Walk u v) (q : G.Walk v w) : p.support ⊆ (p.append q).support


theorem inv_comp_eq_id (α : X ≅ Y) {f : X ⟶ Y} : α.inv ≫ f = 𝟙 Y ↔ f = α.hom

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

CategoryTheory.CategoryStruct.comp α.inv f = CategoryTheory.CategoryStruct.id Y ↔ f = α.hom


theorem Antiperiodic.sub_nsmul_eq [AddGroup α] [AddGroup β] (h : Antiperiodic f c) (n : ℕ) :
    f (x - n • c) = (-1) ^ n • f x

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


/-- If `A` is a module over a commutative `R` with compatible actions,
then `star` is a semilinear equivalence. -/
@[simps]
def starLinearEquiv (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [AddCommMonoid A]
    [StarAddMonoid A] [Module R A] [StarModule R A] : A ≃ₗ⋆[R] A

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[AddCommMonoid A]
[StarAddMonoid A]
[Module R A]
[StarModule R A]

∀ (a : A), (starLinearEquiv R) a = star a


@[simp]
theorem curryFinFinset_apply (hk : s.card = k) (hl : sᶜ.card = l) (f : G[×n]→L[𝕜] G')
    (mk : Fin k → G) (ml : Fin l → G) : curryFinFinset 𝕜 G G' hk hl f mk ml =
      f fun i => Sum.elim mk ml ((finSumEquivOfFinset hk hl).symm i)

(f : ContinuousMultilinearMap 𝕜 (fun i => G) G')

(((ContinuousMultilinearMap.curryFinFinset 𝕜 G G' hk hl) f) mk) ml =
  f fun i => Sum.elim mk ml ((finSumEquivOfFinset hk hl).symm i)


@[simp]
theorem single_add (a : α) (b₁ b₂ : M) : single a (b₁ + b₂) = single a b₁ + single a b₂

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

Finsupp.single a (b₁ + b₂) = Finsupp.single a b₁ + Finsupp.single a b₂


theorem incidenceSet_subset_incidenceSet (G' : Subgraph G) (v : V) :
    G'.incidenceSet v ⊆ G.incidenceSet v

{V : Type u}
{G : SimpleGraph V}
(G' : G.Subgraph)
(v : V)


theorem cast_descFactorial :
    (a.descFactorial b : S) = (ascPochhammer S b).eval (a - (b - 1) : S)

↑(a.descFactorial b) = Polynomial.eval (↑(a - (b - 1))) (ascPochhammer S b)


@[simp]
theorem Sylow.orbit_eq_top [Fact p.Prime] [Finite (Sylow p G)] (P : Sylow p G) : orbit G P = ⊤

{p : ℕ}
{G : Type u_1}
[Group G]
[Fact (Nat.Prime p)]
[Finite (Sylow p G)]
(P : Sylow p G)


theorem fderivWithin_const_mul (hxs : UniqueDiffWithinAt 𝕜 s x)
    (ha : DifferentiableWithinAt 𝕜 a s x) (b : 𝔸) :
    fderivWithin 𝕜 (fun y => b * a y) s x = b • fderivWithin 𝕜 a s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s : Set E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a : E → 𝔸}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(ha : DifferentiableWithinAt 𝕜 a s x)
(b : 𝔸)


@[simp] theorem ofInvolutive_apply (f : α → α) (hf : Involutive f) (hf' : Measurable f) (a : α) :
    ofInvolutive f hf hf' a = f a

{α : Type u_1}
[MeasurableSpace α]
(f : α → α)
(hf : Function.Involutive f)
(hf' : Measurable f)
(a : α)

(MeasurableEquiv.ofInvolutive f hf hf') a = f a


theorem map_comap_of_surjective (I : Ideal S) : map f (comap f I) = I

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
(f : F)
(hf : Function.Surjective ⇑f)
(I : Ideal S)


@[simp]
theorem mem_Ici : x ∈ Ici a ↔ a ≤ x


/-- A `Submodule` over `R ⊗[ℕ] S` is naturally also a `Submodule` over the canonically-isomorphic
ring `R ⊗[ℤ] S`. -/
@[simps!]
def toSubbimoduleInt (p : Submodule (R ⊗[ℕ] S) M) : Submodule (R ⊗[ℤ] S) M

(R : Type u_1)
(S : Type u_2)
(M : Type u_3)
[Ring R]
[Ring S]
[AddCommGroup M]
[Module R M]
[Module S M]
[SMulCommClass R S M]
(p : Submodule (R ⊗[ℕ] S) M)

↑(Subbimodule.toSubbimoduleInt R S M p) = ↑p


@[simp] theorem sdiv_cons : sdiv (x::xs) g = (x / g) :: sdiv xs g

Lean.Omega.IntList.sdiv (x :: xs) g = x / g :: Lean.Omega.IntList.sdiv xs g


@[to_additive]
theorem NeBot.of_mul_right : (f * g).NeBot → g.NeBot


@[simp]
theorem WalkingPair.swap_apply_left : WalkingPair.swap left = right

CategoryTheory.Limits.WalkingPair.swap CategoryTheory.Limits.WalkingPair.left = CategoryTheory.Limits.WalkingPair.right


@[simp]
theorem transpose_eq_zero [Zero α] {M : Matrix m n α} : Mᵀ = 0 ↔ M = 0

{m : Type u_2}
{n : Type u_3}
{α : Type v}
[Zero α]
{M : Matrix m n α}


theorem contDiff_unitBallBall (hr : 0 < r) : ContDiff ℝ n (unitBallBall c r hr)

{n : ℕ∞}
{E : Type u_1}
[NormedAddCommGroup E]
[InnerProductSpace ℝ E]
{c : E}
{r : ℝ}
(hr : 0 < r)

ContDiff ℝ n ↑(PartialHomeomorph.unitBallBall c r hr)


@[simp]
theorem cons_val' (v : n' → α) (B : Fin m → n' → α) (i j) :
    vecCons v B i j = vecCons (v j) (fun i => B i j) i

{α : Type u}
{m : ℕ}
{n' : Type uₙ}
(v : n' → α)
(B : Fin m → n' → α)
(i : Fin m.succ)
(j : n')

Matrix.vecCons v B i j = Matrix.vecCons (v j) (fun i => B i j) i


/-- In a normed vector space, the addition of a measurable function and a strongly measurable
function is measurable. Note that this is not true without further second-countability assumptions
for the addition of two measurable functions. -/
theorem _root_.Measurable.add_stronglyMeasurable
    {α E : Type*} {_ : MeasurableSpace α} [AddGroup E] [TopologicalSpace E]
    [MeasurableSpace E] [BorelSpace E] [ContinuousAdd E] [PseudoMetrizableSpace E]
    {g f : α → E} (hg : Measurable g) (hf : StronglyMeasurable f) :
    Measurable (g + f)

∀ {x : MeasurableSpace α} [inst : AddGroup E] [inst_1 : TopologicalSpace E] [inst_2 : MeasurableSpace E]
  [inst_3 : BorelSpace E] [inst_4 : ContinuousAdd E] [inst_5 : TopologicalSpace.PseudoMetrizableSpace E] {g f : α → E},
  Measurable g → MeasureTheory.StronglyMeasurable f → Measurable (g + f)


/-- The core unit-propagation step.

We have a local context of assumptions `¬l'` (sometimes called an assignment)
and we wish to add `¬l` to the context, that is, we want to prove `l` is also falsified.
This is because there is a clause `a ∨ b ∨ ¬l` in the global context
such that all literals in the clause are falsified except for `¬l`;
so in the context `h₁` where we suppose that `¬l` is falsified,
the clause itself is falsified so we can prove `False`.
We continue the proof in `h₂`, with the assumption that `l` is falsified. -/
theorem Valuation.by_cases {v : Valuation} {l}
    (h₁ : v.neg l.negate → False) (h₂ : v.neg l → False) : False

{v : Sat.Valuation}
{l : Sat.Literal}
(h₁ : v.neg l.negate → False)
(h₂ : v.neg l → False)


theorem isClosed_imp {p q : X → Prop} (hp : IsOpen { x | p x }) (hq : IsClosed { x | q x }) :
    IsClosed { x | p x → q x }

{X : Type u}
[TopologicalSpace X]
{p q : X → Prop}
(hp : IsOpen {x | p x})
(hq : IsClosed {x | q x})


@[to_additive]
theorem index_le_of_leftCoset_cover_const : H.index ≤ s.card

(hcovers : ⋃ i ∈ s, g i +ᵥ ↑H = Set.univ)


/-- If a nondegenerate configuration has a unique line through any two points, then `|P| ≤ |L|`. -/
theorem HasLines.card_le [HasLines P L] [Fintype P] [Fintype L] :
    Fintype.card P ≤ Fintype.card L

(P : Type u_1)
(L : Type u_2)
[Membership P L]
[Configuration.HasLines P L]
[Fintype P]
[Fintype L]


/-- We can clear the denominators of a finite indexed family of fractions. -/
theorem exist_integer_multiples_of_finite {ι : Type*} [Finite ι] (f : ι → S) :
    ∃ b : M, ∀ i, IsLocalization.IsInteger R ((b : R) • f i)

{R : Type u_1}
[CommSemiring R]
(M : Submonoid R)
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
{ι : Type u_4}
[Finite ι]
(f : ι → S)

∃ b, ∀ (i : ι), IsLocalization.IsInteger R (↑b • f i)


theorem HasStrictDerivAt.finset_prod (hf : ∀ i ∈ u, HasStrictDerivAt (f i) (f' i) x) :
    HasStrictDerivAt (∏ i ∈ u, f i ·) (∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • f' i) x

{f : ι → 𝕜 → 𝔸'}

HasStrictDerivAt (fun x => ∏ i ∈ u, f i x) (∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • f' i) x


@[simp]
theorem basis_singleton (i : ι) : Lagrange.basis {i} v i = 1

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{v : ι → F}
(i : ι)


/-- See `List.countP_join` for the corresponding statement using `List.sum`. -/
lemma countP_join' (p : α → Bool) :
    ∀ L : List (List α), countP p L.join = Nat.sum (L.map (countP p))

{α : Type u_1}
(p : α → Bool)
(L : List (List α))

List.countP p L.join = Nat.sum (List.map (List.countP p) L)


theorem universallyClosed_stableUnderBaseChange : StableUnderBaseChange @UniversallyClosed


theorem lsub_le_of_range_subset {ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal}
    (h : Set.range f ⊆ Set.range g) : lsub.{u, max v w} f ≤ lsub.{v, max u w} g

{ι : Type u}
{ι' : Type v}
{f : ι → Ordinal.{max (max u v) w}}
{g : ι' → Ordinal.{max (max u v) w}}
(h : Set.range f ⊆ Set.range g)


@[simp]
theorem inner_neg_right (x y : E) : ⟪x, -y⟫ = -⟪x, y⟫

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


/-- The duality equivalence `(WidePushoutShape J)ᵒᵖ ≌ WidePullbackShape J` -/
@[simps]
def widePushoutShapeOpEquiv : (WidePushoutShape J)ᵒᵖ ≌ WidePullbackShape J

(CategoryTheory.Limits.widePushoutShapeOpEquiv J).counitIso = CategoryTheory.Limits.widePullbackShapeUnopOp J


@[simp]
theorem add_eq_zero_iff (f g : ι →₀ α) : f + g = 0 ↔ f = 0 ∧ g = 0

{ι : Type u_1}
{α : Type u_2}
[CanonicallyOrderedAddCommMonoid α]
(f g : ι →₀ α)


theorem isNat_ratCast {R : Type*} [DivisionRing R] : {q : ℚ} → {n : ℕ} →
    IsNat q n → IsNat (q : R) n

{R : Type u_1}
[DivisionRing R]
{q : ℚ}
{n : ℕ}

Mathlib.Meta.NormNum.IsNat q n → Mathlib.Meta.NormNum.IsNat (↑q) n


@[to_additive]
lemma sup_div_left [SemilatticeSup β] [OrderBot β] (s t : Finset α) (f : α → β) :
    sup (s / t) f = sup s fun x ↦ sup t (f <| x / ·)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Sub α]
[SemilatticeSup β]
[OrderBot β]
(s t : Finset α)
(f : α → β)

(s - t).sup f = s.sup fun x => t.sup fun x_1 => f (x - x_1)


@[to_additive]
protected theorem injective_left [Mul α] [i : IsSymmOp α α (· * ·)] [PartialOrder α] {a : α}
    (ha : MulLECancellable a) :
    Injective (· * a)

{α : Type u_1}
[Add α]
[i : IsSymmOp α α fun x x_1 => x + x_1]
[PartialOrder α]
{a : α}
(ha : AddLECancellable a)


@[to_additive]
theorem mulEquiv_symm_apply (e : α ≃ β) [Mul β] (b : β) :
    letI := Equiv.mul e
    (mulEquiv e).symm b = e.symm b

{α : Type u}
{β : Type v}
(e : α ≃ β)
[Mul β]
(b : β)


theorem isOpen_setOf_eventually_nhdsWithin [T1Space X] {p : X → Prop} :
    IsOpen { x | ∀ᶠ y in 𝓝[≠] x, p y }

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{p : X → Prop}


/-- To prove a property of a finite product, it suffices to prove that the property is
multiplicative and holds on the factors. -/
@[to_additive
      "To prove a property of a finite sum, it suffices to prove that the property is
      additive and holds on the summands."]
theorem finprod_induction {f : α → M} (p : M → Prop) (hp₀ : p 1)
    (hp₁ : ∀ x y, p x → p y → p (x * y)) (hp₂ : ∀ i, p (f i)) : p (∏ᶠ i, f i)

(hp₁ : ∀ (x y : M), p x → p y → p (x + y))


@[to_additive (attr := simp, norm_cast)]
theorem coe_sInf (S : Set (Subsemigroup M)) : ((sInf S : Subsemigroup M) : Set M) = ⋂ s ∈ S, ↑s

{M : Type u_1}
[Mul M]
(S : Set (Subsemigroup M))


theorem eval₂_multiset_sum (s : Multiset R[X]) (x : S) :
    eval₂ f x s.sum = (s.map (eval₂ f x)).sum

{R : Type u}
{S : Type v}
[Semiring R]
[Semiring S]
(f : R →+* S)
(s : Multiset R[X])
(x : S)

Polynomial.eval₂ f x s.sum = (Multiset.map (Polynomial.eval₂ f x) s).sum


theorem mul_kronecker_mul [Fintype m] [Fintype m'] [CommSemiring α] (A : Matrix l m α)
    (B : Matrix m n α) (A' : Matrix l' m' α) (B' : Matrix m' n' α) :
    (A * B) ⊗ₖ (A' * B') = A ⊗ₖ A' * B ⊗ₖ B'

{α : Type u_2}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{l' : Type u_14}
{m' : Type u_15}
{n' : Type u_16}
[Fintype m]
[Fintype m']
[CommSemiring α]
(A : Matrix l m α)
(B : Matrix m n α)
(A' : Matrix l' m' α)
(B' : Matrix m' n' α)

Matrix.kroneckerMap (fun x x_1 => x * x_1) (A * B) (A' * B') =
  Matrix.kroneckerMap (fun x x_1 => x * x_1) A A' * Matrix.kroneckerMap (fun x x_1 => x * x_1) B B'


@[to_additive]
lemma mem_zpowers_iff_mem_range_orderOf [DecidableEq G] :
    y ∈ zpowers x ↔ y ∈ (Finset.range (orderOf x)).image (x ^ ·)

{G : Type u_1}
[Group G]
[Finite G]
{x y : G}
[DecidableEq G]

y ∈ Subgroup.zpowers x ↔ y ∈ Finset.image (fun x_1 => x ^ x_1) (Finset.range (orderOf x))


theorem Eventually.lt_top_of_ne [PartialOrder β] [OrderTop β] {l : Filter α} {f : α → β}
    (h : ∀ᶠ x in l, f x ≠ ⊤) : ∀ᶠ x in l, f x < ⊤

{α : Type u}
{β : Type v}
[PartialOrder β]
[OrderTop β]
{l : Filter α}
{f : α → β}
(h : ∀ᶠ (x : α) in l, f x ≠ ⊤)


/-- An affine subspace is isomorphic to its image under an injective affine map.
This is the affine version of `Submodule.equivMapOfInjective`.
-/
@[simps linear, simps! toFun]
noncomputable def equivMapOfInjective (E : AffineSubspace 𝕜 P₁) [Nonempty E] (φ : P₁ →ᵃ[𝕜] P₂)
    (hφ : Function.Injective φ) : E ≃ᵃ[𝕜] E.map φ

{𝕜 : Type u_1}
{V₁ : Type u_3}
{V₂ : Type u_5}
{P₁ : Type u_8}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V₁]
[NormedSpace 𝕜 V₁]
[PseudoMetricSpace P₁]
[NormedAddTorsor V₁ P₁]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(E : AffineSubspace 𝕜 P₁)
[Nonempty ↥E]
(φ : P₁ →ᵃ[𝕜] P₂)
(hφ : Function.Injective ⇑φ)
(p : ↑↑E)

(E.equivMapOfInjective φ hφ) p = ⟨φ ↑p, ⋯⟩


theorem Stable.exists_forall_le (h : F.Stable) (e : F.N 0 ≤ F'.N 0) :
    ∃ n₀, ∀ n, F.N (n + n₀) ≤ F'.N n

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
{F F' : I.Filtration M}
(h : F.Stable)
(e : F.N 0 ≤ F'.N 0)


{α : Type u_1}
[MeasurableSpace α]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(v : MeasureTheory.VectorMeasure α M)


@[simp]
theorem ker.incl_comp_lift (h : g.comp f = 0) : (incl g.ker).comp (ker.lift f g h) = f

{V₁ : Type u_3}
{V₂ : Type u_4}
{V₃ : Type u_5}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
[SeminormedAddCommGroup V₃]
(f : NormedAddGroupHom V₁ V₂)
(g : NormedAddGroupHom V₂ V₃)
(h : g.comp f = 0)

(NormedAddGroupHom.incl g.ker).comp (NormedAddGroupHom.ker.lift f g h) = f


@[simp]
theorem lift.isLift_inv (X : C) : (lift.isLift r F H).inv.app X = 𝟙 (F.obj X)

(H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂)

(CategoryTheory.Quotient.lift.isLift r F H).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)


lemma erase_lt_erase (ha : a ∈ s) (hb : b ∈ s) :
    toColex (s.erase a) < toColex (s.erase b) ↔ b < a

{α : Type u_1}
[PartialOrder α]
{s : Finset α}
{a b : α}
[DecidableEq α]
(ha : a ∈ s)
(hb : b ∈ s)

{ ofColex := s.erase a } < { ofColex := s.erase b } ↔ b < a


/-- A preorder which embeds into a preorder in which `(· > ·)` is well-founded
also has `(· > ·)` well-founded. -/
protected theorem wellFoundedGT [WellFoundedGT β] (f : α ↪o β) : WellFoundedGT α

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
[WellFoundedGT β]
(f : α ↪o β)


lemma compProd_apply_prod [SFinite μ] [IsSFiniteKernel κ]
    {s : Set α} {t : Set β} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    (μ ⊗ₘ κ) (s ×ˢ t) = ∫⁻ a in s, κ a t ∂μ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{μ : MeasureTheory.Measure α}
{κ : ProbabilityTheory.Kernel α β}
[MeasureTheory.SFinite μ]
[ProbabilityTheory.IsSFiniteKernel κ]
{s : Set α}
{t : Set β}
(hs : MeasurableSet s)
(ht : MeasurableSet t)

(μ ⊗ₘ κ) (s ×ˢ t) = ∫⁻ (a : α) in s, (κ a) t ∂μ


@[reassoc]
lemma homologySequence_comp  :
    (F.shift n₀).map T.mor₁ ≫ (F.shift n₀).map T.mor₂ = 0

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

CategoryTheory.CategoryStruct.comp ((F.shift n₀).map T.mor₁) ((F.shift n₀).map T.mor₂) = 0


@[simp] theorem restrict_ground_eq_self (M : Matroid α) : (M ↾ M.E) = M


lemma chainLength_zero_right [Nontrivial L] : chainLength α 0 = 2

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

LieAlgebra.IsKilling.chainLength α 0 = 2


@[simp] theorem length_rightInvSeq (ω : List B) : (ris ω).length = ω.length

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


/-- We say that a filter `l` has a countable basis `s : ι → Set α` bounded by `p : ι → Prop`,
if `t ∈ l` if and only if `t` includes `s i` for some `i` such that `p i`, and the set
defined by `p` is countable. -/
structure HasCountableBasis (l : Filter α) (p : ι → Prop) (s : ι → Set α)
    extends HasBasis l p s : Prop where
  /-- The set of `i` that satisfy the predicate `p` is countable. -/
  countable : (setOf p).Countable

{α : Type u_1}
{ι : Type u_4}
{l : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(self : l.HasCountableBasis p s)


@[simp]
theorem rTensor_comp_flip_mk (m : M) :
    f.rTensor M ∘ₗ (TensorProduct.mk R N M).flip m = (TensorProduct.mk R P M).flip m ∘ₗ f

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : N →ₗ[R] P)
(m : M)

LinearMap.rTensor M f ∘ₗ (TensorProduct.mk R N M).flip m = (TensorProduct.mk R P M).flip m ∘ₗ f


@[reassoc (attr := simp)]
theorem whiskerLeft_inv_hom (X : C) {Y Z : C} (f : Y ≅ Z) :
    X ◁ f.inv ≫ X ◁ f.hom = 𝟙 (X ⊗ Z)

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.whiskerLeft X f.inv)
    (CategoryTheory.MonoidalCategory.whiskerLeft X f.hom) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategory.tensorObj X Z)


theorem Reaches.to₀ {σ} {f : σ → Option σ} {a b : σ} (h : Reaches f a b) : Reaches₀ f a b

{σ : Type u_1}
{f : σ → Option σ}
{a b : σ}
(h : Turing.Reaches f a b)


theorem condexp_restrict_ae_eq_restrict (hm : m ≤ m0) [SigmaFinite (μ.trim hm)]
    (hs_m : MeasurableSet[m] s) (hf_int : Integrable f μ) :
    (μ.restrict s)[f|m] =ᵐ[μ.restrict s] μ[f|m]

{α : Type u_1}
{E : Type u_3}
{m m0 : MeasurableSpace α}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[CompleteSpace E]
{μ : MeasureTheory.Measure α}
{f : α → E}
{s : Set α}
(hm : m ≤ m0)
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs_m : MeasurableSet s)
(hf_int : MeasureTheory.Integrable f μ)

μ.restrict s[f|m] =ᵐ[μ.restrict s] μ[f|m]


theorem left_eq_zero_of_add_eq_zero {a b : Ordinal} (h : a + b = 0) : a = 0


theorem map_map (S : StarSubalgebra R A) (g : B →⋆ₐ[R] C) (f : A →⋆ₐ[R] B) :
    (S.map f).map g = S.map (g.comp f)

{R : Type u_2}
{A : Type u_3}
{B : Type u_4}
{C : Type u_5}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
[Semiring B]
[StarRing B]
[Algebra R B]
[StarModule R B]
[Semiring C]
[StarRing C]
[Algebra R C]
[StarModule R C]
(S : StarSubalgebra R A)
(g : B →⋆ₐ[R] C)
(f : A →⋆ₐ[R] B)

StarSubalgebra.map g (StarSubalgebra.map f S) = StarSubalgebra.map (g.comp f) S


/-- The left homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def leftHomologyData [HasZeroObject C] (s : S.Splitting) :
    LeftHomologyData S

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Preadditive C]
{S : CategoryTheory.ShortComplex C}
[CategoryTheory.Limits.HasZeroObject C]
(s : S.Splitting)


theorem JoinedIn.of_segment_subset {E : Type*} [AddCommGroup E] [Module ℝ E]
    [TopologicalSpace E] [ContinuousAdd E] [ContinuousSMul ℝ E]
    {x y : E} {s : Set E} (h : [x -[ℝ] y] ⊆ s) : JoinedIn s x y

{E : Type u_4}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[ContinuousAdd E]
[ContinuousSMul ℝ E]
{x y : E}
{s : Set E}
(h : [x-[ℝ]y] ⊆ s)


@[simp] theorem ncard_insert_of_not_mem {a : α} (h : a ∉ s) (hs : s.Finite := by toFinite_tac) :
    (insert a s).ncard = s.ncard + 1

{α : Type u_1}
{s : Set α}
{a : α}
(h : a ∉ s)
(hs : s.Finite := by toFinite_tac)


/-- The type of `⊔`-preserving functions from `α` to `β`. -/
structure SupHom (α β : Type*) [Sup α] [Sup β] where
  /-- The underlying function of a `SupHom` -/
  toFun : α → β
  /-- A `SupHom` preserves suprema. -/
  map_sup' (a b : α) : toFun (a ⊔ b) = toFun a ⊔ toFun b

{α : Type u_7}
{β : Type u_8}
[Sup α]
[Sup β]
(self : SupHom α β)
(a b : α)

self.toFun (a ⊔ b) = self.toFun a ⊔ self.toFun b


theorem nmul_le_nmul_of_nonneg_left (h₁ : a ≤ b) (h₂ : 0 ≤ c) : c ⨳ a ≤ c ⨳ b

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


/-- Lifts an equivalence on states to an equivalence on DFAs. -/
@[simps apply_step apply_start apply_accept]
def reindex (g : σ ≃ σ') : DFA α σ ≃ DFA α σ'

{α : Type u}
{σ : Type v}
{σ' : Type u_2}
(g : σ ≃ σ')
(M : DFA α σ)


lemma isIso_liftCycles_iff (K : CochainComplex C ℕ) {X : C} (φ : X ⟶ K.X 0)
    [K.HasHomology 0] (hφ : φ ≫ K.d 0 1 = 0) :
    IsIso (K.liftCycles φ 1 (by simp) hφ) ↔
      (ShortComplex.mk _ _ hφ).Exact ∧ Mono φ

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Abelian C]
(K : CochainComplex C ℕ)
{X : C}
(φ : X ⟶ K.X 0)
[HomologicalComplex.HasHomology K 0]
(hφ : φ ≫ K.d 0 1 = 0)

CategoryTheory.IsIso (HomologicalComplex.liftCycles K φ 1 ⋯ hφ) ↔
  (CategoryTheory.ShortComplex.mk φ (K.d 0 1) hφ).Exact ∧ CategoryTheory.Mono φ


@[reassoc]
lemma ProjectiveResolution.iso_hom_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) :
    (projectiveResolutions C).map f ≫ Q.iso.hom =
      P.iso.hom ≫ (HomotopyCategory.quotient _ _).map φ

(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 ((CategoryTheory.projectiveResolutions C).map f) Q.iso.hom =
  CategoryTheory.CategoryStruct.comp P.iso.hom ((HomotopyCategory.quotient C (ComplexShape.down ℕ)).map φ)


theorem withDensityᵥ_add' (hf : Integrable f μ) (hg : Integrable g μ) :
    (μ.withDensityᵥ fun x => f x + g x) = μ.withDensityᵥ f + μ.withDensityᵥ g

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : α → E}
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g μ)


/-- The first projection in a product of topological spaces sends open sets to open sets. -/
theorem isOpenMap_fst : IsOpenMap (@Prod.fst X Y)

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


theorem bind_le {α} (x : Part α) (f : α → Part β) (y : Part β) :
    x >>= f ≤ y ↔ ∀ a, a ∈ x → f a ≤ y

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


@[simp]
theorem orderIsoIicCoe_symm_apply_coe (a : ℝ≥0) (b : Iic a) :
    ((orderIsoIicCoe a).symm b : ℝ≥0∞) = b

↑((ENNReal.orderIsoIicCoe a).symm b) = ↑↑b


@[reassoc, elementwise] -- @[simp] -- Porting note (#10618): simp can prove this
theorem comm_to (f : Hom C₁ C₂) (j : ι) : f.prev j ≫ C₂.dTo j = C₁.dTo j ≫ f.f j


/-- The `balance1` function does nothing if the first argument is already balanced. -/
theorem balance1_eq {l : RBNode α} {v : α} {r : RBNode α}
    (hl : l.Balanced c n) : balance1 l v r = node black l v r

{α : Type u_1}
{c : Batteries.RBColor}
{n : Nat}
{l : Batteries.RBNode α}
{v : α}
{r : Batteries.RBNode α}
(hl : l.Balanced c n)

l.balance1 v r = Batteries.RBNode.node Batteries.RBColor.black l v r


lemma UniformEquicontinuousOn.mono {F : ι → β → α} {S T : Set β}
    (H : UniformEquicontinuousOn F T) (hST : S ⊆ T) : UniformEquicontinuousOn F S

{ι : Type u_1}
{α : Type u_7}
{β : Type u_9}
[uα : UniformSpace α]
[uβ : UniformSpace β]
{F : ι → β → α}
{S T : Set β}
(H : UniformEquicontinuousOn F T)
(hST : S ⊆ T)


@[simp]
lemma DifferentiableOn.add_iff_right (hg : DifferentiableOn 𝕜 f s) :
    DifferentiableOn 𝕜 (fun y => f y + g y) s ↔ DifferentiableOn 𝕜 g s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{s : Set E}
(hg : DifferentiableOn 𝕜 f s)


@[simp, norm_cast] lemma coe_le_coe : (r₁ : ℝ) ≤ r₂ ↔ r₁ ≤ r₂

↑r₁ ≤ ↑r₂ ↔ r₁ ≤ r₂


/--
The identity monad morphism induces the identity functor from the category of algebras to itself.
-/
-- Porting note: `semireducible -> default`
@[simps (config := { rhsMd := .default })]
def algebraFunctorOfMonadHomId {T₁ : Monad C} : algebraFunctorOfMonadHom (𝟙 T₁) ≅ 𝟭 _

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{T₁ : CategoryTheory.Monad C}
(X : T₁.Algebra)

(CategoryTheory.Monad.algebraFunctorOfMonadHomId.hom.app X).f =
  (CategoryTheory.Iso.refl
      ((CategoryTheory.Monad.algebraFunctorOfMonadHom (CategoryTheory.CategoryStruct.id T₁)).obj X).A).hom


@[simp]
theorem closure_eq {K L : ConvexCone 𝕜 E} : K.closure = L ↔ closure (K : Set E) = L

{𝕜 : Type u_1}
[OrderedSemiring 𝕜]
{E : Type u_2}
[AddCommMonoid E]
[TopologicalSpace E]
[ContinuousAdd E]
[SMul 𝕜 E]
[ContinuousConstSMul 𝕜 E]
{K L : ConvexCone 𝕜 E}


theorem coe_nnnorm_ae_le_eLpNormEssSup {_ : MeasurableSpace α} (f : α → F) (μ : Measure α) :
    ∀ᵐ x ∂μ, (‖f x‖₊ : ℝ≥0∞) ≤ eLpNormEssSup f μ

{α : Type u_1}
{F : Type u_3}
[NormedAddCommGroup F]

∀ {x : MeasurableSpace α} (f : α → F) (μ : MeasureTheory.Measure α),
  ∀ᵐ (x_1 : α) ∂μ, ↑‖f x_1‖₊ ≤ MeasureTheory.eLpNormEssSup f μ


lemma monotoneOn_or_antitoneOn_iff_uIcc :
    MonotoneOn f s ∨ AntitoneOn f s ↔
      ∀ᵉ (a ∈ s) (b ∈ s) (c ∈ s), c ∈ [[a, b]] → f c ∈ [[f a, f b]]

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

MonotoneOn f s ∨ AntitoneOn f s ↔ ∀ a ∈ s, ∀ b ∈ s, ∀ c ∈ s, c ∈ Set.uIcc a b → f c ∈ Set.uIcc (f a) (f b)


theorem lpMeasSubgroupToLpTrim_neg (hm : m ≤ m0) (f : lpMeasSubgroup F m p μ) :
    lpMeasSubgroupToLpTrim F p μ hm (-f) = -lpMeasSubgroupToLpTrim F p μ hm f

(f : ↥(MeasureTheory.lpMeasSubgroup F m p μ))

MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm (-f) = -MeasureTheory.lpMeasSubgroupToLpTrim F p μ hm f


theorem norm_extendTo𝕜'_apply_sq (fr : F →ₗ[ℝ] ℝ) (x : F) :
    ‖(fr.extendTo𝕜' x : 𝕜)‖ ^ 2 = fr (conj (fr.extendTo𝕜' x : 𝕜) • x)

{𝕜 : Type u_1}
[RCLike 𝕜]
{F : Type u_2}
[SeminormedAddCommGroup F]
[NormedSpace 𝕜 F]
[Module ℝ F]
[IsScalarTower ℝ 𝕜 F]
(fr : F →ₗ[ℝ] ℝ)
(x : F)

‖fr.extendTo𝕜' x‖ ^ 2 = fr ((starRingEnd 𝕜) (fr.extendTo𝕜' x) • x)


/-- The homotopy between morphisms in `ShortComplex Cᵒᵖ` that is induced by a homotopy
between morphisms in `ShortComplex C`. -/
@[simps]
def op (h : Homotopy φ₁ φ₂) : Homotopy (opMap φ₁) (opMap φ₂)

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

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


theorem quotientMap_surjective {J : Ideal R} {I : Ideal S} {f : R →+* S} {H : J ≤ I.comap f}
    (hf : Function.Surjective f) : Function.Surjective (quotientMap I f H)

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
{J : Ideal R}
{I : Ideal S}
{f : R →+* S}
{H : J ≤ Ideal.comap f I}
(hf : Function.Surjective ⇑f)

Function.Surjective ⇑(Ideal.quotientMap I f H)


/-- If `f` sends two periodic points `x` and `y` of positive periods to the same point,
then `x = y`. -/
theorem eq_of_apply_eq (hx : IsPeriodicPt f m x) (hy : IsPeriodicPt f n y) (hm : 0 < m) (hn : 0 < n)
    (h : f x = f y) : x = y

{α : Type u_1}
{f : α → α}
{x y : α}
{m n : ℕ}
(hx : Function.IsPeriodicPt f m x)
(hy : Function.IsPeriodicPt f n y)
(hm : 0 < m)
(hn : 0 < n)
(h : f x = f y)


/-- A purely inseparable extension has finite separable degree one. -/
theorem IsPurelyInseparable.finSepDegree_eq_one [IsPurelyInseparable F E] :
    finSepDegree F E = 1

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


theorem bddAbove_of_small (s : Set Ordinal.{u}) [h : Small.{u} s] : BddAbove s

(s : Set Ordinal.{u})
[h : Small.{u, u + 1} ↑s]


theorem measurableSet_sum_iff {s : Set (α ⊕ β)} :
    MeasurableSet s ↔ MeasurableSet (Sum.inl ⁻¹' s) ∧ MeasurableSet (Sum.inr ⁻¹' s)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{s : Set (α ⊕ β)}


/-- The group of `AffineEquiv`s are equivalent to the group of units of `AffineMap`.

This is the affine version of `LinearMap.GeneralLinearGroup.generalLinearEquiv`. -/
@[simps]
def equivUnitsAffineMap : (P₁ ≃ᵃ[k] P₁) ≃* (P₁ →ᵃ[k] P₁)ˣ

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

↑(AffineEquiv.equivUnitsAffineMap e) = ↑e


@[simp] lemma inv_mem_centralizer₀ (ha : a ∈ centralizer s) : a⁻¹ ∈ centralizer s

{G₀ : Type u_2}
[GroupWithZero G₀]
{s : Set G₀}
{a : G₀}
(ha : a ∈ s.centralizer)


lemma map'_self (i : ℕ) (hi : i ≤ n := by valid) :
    F.map' i i = 𝟙 _

(F : CategoryTheory.ComposableArrows C n)

F.map' i i ⋯ hi = CategoryTheory.CategoryStruct.id (F.obj ⟨i, ⋯⟩)


@[to_additive (attr := simp)]
theorem inv_le_div_iff_le_mul : b⁻¹ ≤ a / c ↔ c ≤ a * b

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


lemma ext₄ {f g : ComposableArrows C 4}
    (h₀ : f.obj' 0 = g.obj' 0) (h₁ : f.obj' 1 = g.obj' 1) (h₂ : f.obj' 2 = g.obj' 2)
    (h₃ : f.obj' 3 = g.obj' 3) (h₄ : f.obj' 4 = g.obj' 4)
    (w₀ : f.map' 0 1 = eqToHom h₀ ≫ g.map' 0 1 ≫ eqToHom h₁.symm)
    (w₁ : f.map' 1 2 = eqToHom h₁ ≫ g.map' 1 2 ≫ eqToHom h₂.symm)
    (w₂ : f.map' 2 3 = eqToHom h₂ ≫ g.map' 2 3 ≫ eqToHom h₃.symm)
    (w₃ : f.map' 3 4 = eqToHom h₃ ≫ g.map' 3 4 ≫ eqToHom h₄.symm) :
    f = g

{f g : CategoryTheory.ComposableArrows C 4}

(w₀ :
  f.map' 0 1 ⋯ ⋯ =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom h₀)
      (CategoryTheory.CategoryStruct.comp (g.map' 0 1 ⋯ ⋯) (CategoryTheory.eqToHom ⋯)))

(w₁ :
  f.map' 1 2 ⋯ ⋯ =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom h₁)
      (CategoryTheory.CategoryStruct.comp (g.map' 1 2 ⋯ ⋯) (CategoryTheory.eqToHom ⋯)))

(w₂ :
  f.map' 2 3 ⋯ ⋯ =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom h₂)
      (CategoryTheory.CategoryStruct.comp (g.map' 2 3 ⋯ ⋯) (CategoryTheory.eqToHom ⋯)))

(w₃ :
  f.map' 3 4 ⋯ ⋯ =
    CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom h₃)
      (CategoryTheory.CategoryStruct.comp (g.map' 3 4 ⋯ ⋯) (CategoryTheory.eqToHom ⋯)))


theorem one_eq_mk_one : (1 : ConjClasses α) = ConjClasses.mk 1


@[simp]
theorem inv_intCast_den (a : ℤ) : (a : ℚ)⁻¹.den = if a = 0 then 1 else a.natAbs

(↑a)⁻¹.den = if a = 0 then 1 else a.natAbs


@[simp]
theorem dropFun_subtypeVal {α} (p : α ⟹ «repeat» (n + 1) Prop) :
    dropFun (subtypeVal p) = subtypeVal _

(p : α.Arrow (TypeVec.repeat (n + 1) Prop))

TypeVec.dropFun (TypeVec.subtypeVal p) = TypeVec.subtypeVal (TypeVec.dropFun p)


/-- A set B is a block iff for all g, g',
the sets g • B and g' • B are either equal or disjoint -/
theorem IsBlock.def {B : Set X} :
    IsBlock G B ↔ ∀ g g' : G, g • B = g' • B ∨ Disjoint (g • B) (g' • B)

{G : Type u_1}
{X : Type u_2}
[SMul G X]
{B : Set X}

MulAction.IsBlock G B ↔ ∀ (g g' : G), g • B = g' • B ∨ Disjoint (g • B) (g' • B)


/-- A property `C → Prop` is a monoidal predicate if it is closed under `𝟙_` and `⊗`.
-/
class MonoidalPredicate : Prop where
  prop_id : P (𝟙_ C) := by aesop_cat
  prop_tensor : ∀ {X Y}, P X → P Y → P (X ⊗ Y) := by aesop_cat

[self : CategoryTheory.MonoidalCategory.MonoidalPredicate P]

P X → P Y → P (CategoryTheory.MonoidalCategory.tensorObj X Y)


theorem Convex.thickening (hs : Convex ℝ s) (δ : ℝ) : Convex ℝ (thickening δ s)

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
(hs : Convex ℝ s)
(δ : ℝ)


theorem ofRat_mul (x y : β) :
    ofRat (x * y) = (ofRat x * ofRat y : Cauchy abv)

{α : Type u_1}
[LinearOrderedField α]
{β : Type u_2}
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(x y : β)

CauSeq.Completion.ofRat (x * y) = CauSeq.Completion.ofRat x * CauSeq.Completion.ofRat y


theorem mem_unitGroup_iff : x ∈ v.valuationSubring.unitGroup ↔ v x = 1

(K : Type u)
[Field K]
{Γ : Type u_1}
[LinearOrderedCommGroupWithZero Γ]
(v : Valuation K Γ)
(x : Kˣ)

x ∈ v.valuationSubring.unitGroup ↔ v ↑x = 1


lemma isSetSemiring (hC : IsSetRing C) : IsSetSemiring C

{α : Type u_1}
{C : Set (Set α)}
(hC : MeasureTheory.IsSetRing C)


theorem u_eq (gc : GaloisConnection l u) {z : α} {y : β} : u y = z ↔ ∀ x, x ≤ z ↔ l x ≤ y

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


lemma cutExpand_double_left {a a₁ a₂ b} (h₁ : r a₁ a) (h₂ : r a₂ a) :
    CutExpand r {a₁, a₂, b} {a, b}

{α : Type u_1}
{r : α → α → Prop}
{a a₁ a₂ b : α}
(h₁ : r a₁ a)
(h₂ : r a₂ a)


@[to_additive (attr := simp)]
lemma inv_atTop {G : Type*} [OrderedCommGroup G] : (atTop : Filter G)⁻¹ = atBot


theorem dualEquivDual_def (W : Subspace K V) :
    W.dualEquivDual.toLinearMap = W.dualLift.rangeRestrict

{K : Type u}
{V : Type v}
[Field K]
[AddCommGroup V]
[Module K V]
(W : Subspace K V)


@[simp]
theorem Matrix.lieConj_apply (P A : Matrix n n R) (h : Invertible P) :
    P.lieConj h A = P * A * P⁻¹

{R : Type u}
[CommRing R]
{n : Type w}
[DecidableEq n]
[Fintype n]
(P A : Matrix n n R)
(h : Invertible P)


theorem map_comap_eq_self
    {f : K →+* L} {s : Subfield L} (h : s ≤ f.fieldRange) : (s.comap f).map f = s

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
{f : K →+* L}
{s : Subfield L}
(h : s ≤ f.fieldRange)


@[simp, norm_cast] lemma coe_pow (f : α →+* α) (n : ℕ) : ⇑(f ^ n) = f^[n]

∀ {x : NonAssocSemiring α} (f : α →+* α) (n : ℕ), ⇑(f ^ n) = (⇑f)^[n]


theorem and_eq_of_eq_true_right {a b : Prop} (h : b = True) : (a ∧ b) = a


theorem upperSemicontinuousOn_const : UpperSemicontinuousOn (fun _x => z) s

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_2}
[Preorder β]
{s : Set α}
{z : β}


/-- Variant of `IsPullback.of_bot`, where `v₁₁` is induced from a morphism `v₃₁ : X₁₁ ⟶ X₃₁`, and
the universal property of the bottom square.

The objects in the statement fit into the following diagram:
```
X₁₁ - h₁₁ -> X₁₂
|            |
v₁₁          v₁₂
↓            ↓
X₂₁ - h₂₁ -> X₂₂
|            |
v₂₁          v₂₂
↓            ↓
X₃₁ - h₃₁ -> X₃₂
```
-/
theorem of_bot' {X₁₁ X₁₂ X₂₁ X₂₂ X₃₁ X₃₂ : C} {h₁₁ : X₁₁ ⟶ X₁₂} {h₂₁ : X₂₁ ⟶ X₂₂}
    {h₃₁ : X₃₁ ⟶ X₃₂} {v₃₁ : X₁₁ ⟶ X₃₁} {v₁₂ : X₁₂ ⟶ X₂₂} {v₂₁ : X₂₁ ⟶ X₃₁} {v₂₂ : X₂₂ ⟶ X₃₂}
    (s : IsPullback h₁₁ v₃₁ (v₁₂ ≫ v₂₂) h₃₁) (t : IsPullback h₂₁ v₂₁ v₂₂ h₃₁) :
    IsPullback h₁₁ (t.lift (h₁₁ ≫ v₁₂) v₃₁ (by rw [Category.assoc, s.w])) v₁₂ h₂₁

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

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

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

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

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

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

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

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

(s : CategoryTheory.IsPullback h₁₁ v₃₁ (v₁₂ ≫ v₂₂) h₃₁)

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

CategoryTheory.IsPullback h₁₁ (t.lift (h₁₁ ≫ v₁₂) v₃₁ ⋯) v₁₂ h₂₁


@[simp]
theorem sym_inter (s t : Finset α) (n : ℕ) : (s ∩ t).sym n = s.sym n ∩ t.sym n

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


theorem eq_neg_self_iff {θ : Angle} : θ = -θ ↔ θ = 0 ∨ θ = π

θ = -θ ↔ θ = 0 ∨ θ = ↑π


@[to_additive]
theorem prod_Ico_eq_mul_inv {δ : Type*} [CommGroup δ] (f : ℕ → δ) {m n : ℕ} (h : m ≤ n) :
    ∏ k ∈ Ico m n, f k = (∏ k ∈ range n, f k) * (∏ k ∈ range m, f k)⁻¹

{δ : Type u_3}
[AddCommGroup δ]
(f : ℕ → δ)
{m n : ℕ}
(h : m ≤ n)

∑ k ∈ Finset.Ico m n, f k = ∑ k ∈ Finset.range n, f k + -∑ k ∈ Finset.range m, f k


theorem continuous_thickenedIndicatorAux {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) :
    Continuous (thickenedIndicatorAux δ E)

{α : Type u_1}
[PseudoEMetricSpace α]
{δ : ℝ}
(δ_pos : 0 < δ)
(E : Set α)


lemma rel_iff : ((·↔·) ⇒ (·↔·) ⇒ (·↔·)) (·↔·) (·↔·)

((fun x x_1 => x ↔ x_1) ⇒ (fun x x_1 => x ↔ x_1) ⇒ fun x x_1 => x ↔ x_1) (fun x x_1 => x ↔ x_1) fun x x_1 => x ↔ x_1


lemma lie_mem_maxGenEigenspace_toEnd
    {χ₁ χ₂ : R} {x y : L} {m : M} (hy : y ∈ 𝕎(L, χ₁, x)) (hm : m ∈ 𝕎(M, χ₂, x)) :
    ⁅y, m⁆ ∈ 𝕎(M, χ₁ + χ₂, x)

(hy : y ∈ ((LieModule.toEnd R L L) x).maxGenEigenspace χ₁)

(hm : m ∈ ((LieModule.toEnd R L M) x).maxGenEigenspace χ₂)

⁅y, m⁆ ∈ ((LieModule.toEnd R L M) x).maxGenEigenspace (χ₁ + χ₂)


protected theorem continuous [TopologicalSpace E] [TopologicalAddGroup E] [ContinuousConstSMul 𝕜 E]
    {p : Seminorm 𝕜 E} {r : ℝ} (hp : p.ball 0 r ∈ (𝓝 0 : Filter E)) : Continuous p

{𝕜 : Type u_3}
{E : Type u_7}
[NontriviallyNormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{p : Seminorm 𝕜 E}
{r : ℝ}
(hp : p.ball 0 r ∈ 𝓝 0)


@[simp] theorem map_bot :
    (⊥ : LieSubmodule R L M).map f = ⊥

{R : Type u}
{L : Type v}
{M : Type w}
{M' : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[AddCommGroup M']
[Module R M']
[LieRingModule L M']
{f : M →ₗ⁅R,L⁆ M'}


theorem lapMatrix_toLin'_apply_eq_zero_iff_forall_adj (x : V → ℝ) :
    Matrix.toLin' (G.lapMatrix ℝ) x = 0 ↔ ∀ i j : V, G.Adj i j → x i = x j

{V : Type u_1}
[Fintype V]
[DecidableEq V]
(G : SimpleGraph V)
[DecidableRel G.Adj]
(x : V → ℝ)

(Matrix.toLin' (SimpleGraph.lapMatrix ℝ G)) x = 0 ↔ ∀ (i j : V), G.Adj i j → x i = x j


@[simp]
theorem isBot_ofDual_iff {a : αᵒᵈ} : IsBot (ofDual a) ↔ IsTop a


/-- The one-vertex subgraph. -/
@[simps]
protected def singletonSubgraph (G : SimpleGraph V) (v : V) : G.Subgraph

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

∀ (a a_1 : V), (G.singletonSubgraph v).Adj a a_1 = ⊥ a a_1


theorem prodMkRight_apply' (κ : Kernel α β) (ca : α × γ) (s : Set β) :
    prodMkRight γ κ ca s = κ ca.fst s

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{γ : Type u_5}
{mγ : MeasurableSpace γ}
(κ : ProbabilityTheory.Kernel α β)
(ca : α × γ)
(s : Set β)

((ProbabilityTheory.Kernel.prodMkRight γ κ) ca) s = (κ ca.1) s


@[simp]
theorem sqTo_left (f : Hom C₁ C₂) (j : ι) : (f.sqTo j).left = f.prev j


theorem mul_def (e₁ e₂ : AddAut A) : e₁ * e₂ = e₂.trans e₁

(A : Type u_1)
[Add A]
(e₁ e₂ : AddAut A)


@[to_additive]
protected theorem Specializes.inv {x y : G} (h : x ⤳ y) : (x⁻¹) ⤳ (y⁻¹)

{G : Type w}
[TopologicalSpace G]
[Neg G]
[ContinuousNeg G]
{x y : G}
(h : x ⤳ y)


theorem supDegree_withBot_some_comp {s : AddMonoidAlgebra R A} (hs : s.support.Nonempty) :
    supDegree (WithBot.some ∘ D) s = supDegree D s

{R : Type u_1}
{A : Type u_3}
{B : Type u_5}
[Semiring R]
[SemilatticeSup B]
[OrderBot B]
{D : A → B}
{s : AddMonoidAlgebra R A}
(hs : s.support.Nonempty)

AddMonoidAlgebra.supDegree (WithBot.some ∘ D) s = ↑(AddMonoidAlgebra.supDegree D s)


/-- If `F⟮x⟯` has dimension `≤1` over `F` for every `x ∈ E` then `F = E`. -/
theorem bot_eq_top_of_finrank_adjoin_le_one [FiniteDimensional F E]
    (h : ∀ x : E, finrank F F⟮x⟯ ≤ 1) : (⊥ : IntermediateField F E) = ⊤

(h : ∀ (x : E), FiniteDimensional.finrank F ↥F⟮x⟯ ≤ 1)


theorem toBasicOpen_injective (f : R) : Function.Injective (toBasicOpen R f)

Function.Injective ⇑(AlgebraicGeometry.StructureSheaf.toBasicOpen R f)


protected theorem lt_of_lt_of_le {a b c : Int} (h₁ : a < b) (h₂ : b ≤ c) : a < c


theorem coe_ideal_span_singleton_div_self {x : R₁} (hx : x ≠ 0) :
    (Ideal.span ({x} : Set R₁) : FractionalIdeal R₁⁰ K) / Ideal.span ({x} : Set R₁) = 1

(K : Type u_3)
[Field K]
{R₁ : Type u_4}
[CommRing R₁]
[IsDomain R₁]
[Algebra R₁ K]
[IsFractionRing R₁ K]
{x : R₁}
(hx : x ≠ 0)

↑(Ideal.span {x}) / ↑(Ideal.span {x}) = 1


theorem comp_quasiMeasurePreserving {ν : Measure δ} {f : α → δ} {g : δ → β} (hg : AEMeasurable g ν)
    (hf : QuasiMeasurePreserving f μ ν) : AEMeasurable (g ∘ f) μ

(hf : MeasureTheory.Measure.QuasiMeasurePreserving f μ ν)


theorem l_biInf_u [CompleteLattice α] [CompleteLattice β] (gi : GaloisInsertion l u) {ι : Sort x}
    {p : ι → Prop} (f : ∀ (i) (_ : p i), β) : l (⨅ (i) (hi), u (f i hi)) = ⨅ (i) (hi), f i hi

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[CompleteLattice α]
[CompleteLattice β]
(gi : GaloisInsertion l u)
{ι : Sort x}
{p : ι → Prop}
(f : (i : ι) → p i → β)

l (⨅ i, ⨅ (hi : p i), u (f i hi)) = ⨅ i, ⨅ (hi : p i), f i hi


theorem eq_of_comp_eq [PreconnectedSpace A] (h₁ : Continuous g₁) (h₂ : Continuous g₂)
    (he : f ∘ g₁ = f ∘ g₂) (a : A) (ha : g₁ a = g₂ a) : g₁ = g₂

{E : Type u_1}
{X : Type u_2}
[TopologicalSpace E]
[TopologicalSpace X]
{f : E → X}
(hf : IsCoveringMap f)
{A : Type u_3}
[TopologicalSpace A]
{g₁ g₂ : A → E}
[PreconnectedSpace A]
(h₁ : Continuous g₁)
(h₂ : Continuous g₂)
(he : f ∘ g₁ = f ∘ g₂)
(a : A)
(ha : g₁ a = g₂ a)


@[simp]
theorem measure_iUnion_null_iff {ι : Sort*} [Countable ι] {s : ι → Set α} :
    μ (⋃ i, s i) = 0 ↔ ∀ i, μ (s i) = 0

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{ι : Sort u_4}
[Countable ι]
{s : ι → Set α}


/-- If `x ∉ (I.lower i, I.upper i)`, then the hyperplane `{y | y i = x}` does not split `I`. -/
theorem split_of_not_mem_Ioo (h : x ∉ Ioo (I.lower i) (I.upper i)) : split I i x = ⊤

(h : x ∉ Set.Ioo (I.lower i) (I.upper i))

BoxIntegral.Prepartition.split I i x = ⊤


/-- Lie module weight spaces are independent.

See also `LieModule.independent_weightSpace'`. -/
lemma independent_weightSpace [NoZeroSMulDivisors R M] :
    CompleteLattice.Independent fun (χ : L → R) ↦ weightSpace M χ

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

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


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

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


theorem Indep.exists_base_subset_union_base (hI : M.Indep I) (hB : M.Base B) :
    ∃ B', M.Base B' ∧ I ⊆ B' ∧ B' ⊆ I ∪ B

{α : Type u_1}
{M : Matroid α}
{B I : Set α}
(hI : M.Indep I)
(hB : M.Base B)


theorem comp_wPathCasesOn {α β : TypeVec n} (h : α ⟹ β) {a : P.A} {f : P.last.B a → P.last.W}
    (g' : P.drop.B a ⟹ α) (g : ∀ j : P.last.B a, P.WPath (f j) ⟹ α) :
    h ⊚ P.wPathCasesOn g' g = P.wPathCasesOn (h ⊚ g') fun i => h ⊚ g i

(g : (j : P.last.B a) → TypeVec.Arrow (P.WPath (f j)) α)

TypeVec.comp h (P.wPathCasesOn g' g) = P.wPathCasesOn (TypeVec.comp h g') fun i => TypeVec.comp h (g i)


@[simp]
theorem isHermitian_transpose_iff (A : Matrix n n α) : Aᵀ.IsHermitian ↔ A.IsHermitian

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


theorem atBot_basis [Nonempty α] [SemilatticeInf α] : (@atBot α _).HasBasis (fun _ => True) Iic

{α : Type u_3}
[Nonempty α]
[SemilatticeInf α]

Filter.atBot.HasBasis (fun x => True) Set.Iic


@[simp]
theorem mem_pure : b ∈ pure a ↔ b = a

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


/-- If `v` is a rank one valuation and `x : Γ₀` has image `0` under `RankOne.hom v`, then
  `x = 0`. -/
theorem zero_of_hom_zero {x : Γ₀} (hx : hom v x = 0) : x = 0

{R : Type u_1}
[Ring R]
{Γ₀ : Type u_2}
[LinearOrderedCommGroupWithZero Γ₀]
(v : Valuation R Γ₀)
[v.RankOne]
{x : Γ₀}
(hx : (Valuation.RankOne.hom v) x = 0)


/-- If a set `S` generates a monoid `M`, then the image of `M` generates, as algebra,
`MonoidAlgebra R M`. -/
theorem mvPolynomial_aeval_of_surjective_of_closure [CommMonoid M] [CommSemiring R] {S : Set M}
    (hS : closure S = ⊤) :
    Function.Surjective
      (MvPolynomial.aeval fun s : S => of R M ↑s : MvPolynomial S R → MonoidAlgebra R M)

{R : Type u_1}
{M : Type u_2}
[CommMonoid M]
[CommSemiring R]
{S : Set M}
(hS : Submonoid.closure S = ⊤)

Function.Surjective ⇑(MvPolynomial.aeval fun s => (MonoidAlgebra.of R M) ↑s)


/-- If `μ` is inner regular for finite measure sets with respect to compact sets,
then any measurable set of finite measure can be approximated by a
compact subset. See also `MeasurableSet.exists_lt_isCompact_of_ne_top`. -/
theorem _root_.MeasurableSet.exists_isCompact_lt_add [InnerRegularCompactLTTop μ]
    ⦃A : Set α⦄ (hA : MeasurableSet A) (h'A : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ K, K ⊆ A ∧ IsCompact K ∧ μ A < μ K + ε

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[μ.InnerRegularCompactLTTop]
⦃A : Set α⦄
(hA : MeasurableSet A)
(h'A : μ A ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)


/-- The `offDiag` of `s : Finset α` is sent on a finset of `Sym2 α` of card `s.offDiag.card / 2`.
This is because every element `s(x, y)` of `Sym2 α` not on the diagonal comes from exactly two
pairs: `(x, y)` and `(y, x)`. -/
theorem card_image_offDiag (s : Finset α) :
    (s.offDiag.image Sym2.mk).card = s.card.choose 2

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

(Finset.image Sym2.mk s.offDiag).card = s.card.choose 2


/-- The uniformity of `α →ᵤ β` admits the family `{(f, g) | ∀ x, (f x, g x) ∈ V}` for `V ∈ 𝓑` as
a filter basis, for any basis `𝓑` of `𝓤 β` (in the case `𝓑 = (𝓤 β).as_basis` this is true by
definition). -/
protected theorem hasBasis_uniformity_of_basis {ι : Sort*} {p : ι → Prop} {s : ι → Set (β × β)}
    (h : (𝓤 β).HasBasis p s) : (𝓤 (α →ᵤ β)).HasBasis p (UniformFun.gen α β ∘ s)

(α : Type u_1)
(β : Type u_2)
[UniformSpace β]
{ι : Sort u_5}
{p : ι → Prop}
{s : ι → Set (β × β)}
(h : (𝓤 β).HasBasis p s)


theorem le_floor_iff' (hn : n ≠ 0) : n ≤ ⌊a⌋₊ ↔ (n : α) ≤ a

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
{n : ℕ}
(hn : n ≠ 0)

n ≤ ⌊a⌋₊ ↔ ↑n ≤ a


/-- The partial orders from `SemilatticeSup_mk'` and `SemilatticeInf_mk'` agree
if `sup` and `inf` satisfy the lattice absorption laws `sup_inf_self` (`a ⊔ a ⊓ b = a`)
and `inf_sup_self` (`a ⊓ (a ⊔ b) = a`). -/
theorem semilatticeSup_mk'_partialOrder_eq_semilatticeInf_mk'_partialOrder
    {α : Type*} [Sup α] [Inf α]
    (sup_comm : ∀ a b : α, a ⊔ b = b ⊔ a) (sup_assoc : ∀ a b c : α, a ⊔ b ⊔ c = a ⊔ (b ⊔ c))
    (sup_idem : ∀ a : α, a ⊔ a = a) (inf_comm : ∀ a b : α, a ⊓ b = b ⊓ a)
    (inf_assoc : ∀ a b c : α, a ⊓ b ⊓ c = a ⊓ (b ⊓ c)) (inf_idem : ∀ a : α, a ⊓ a = a)
    (sup_inf_self : ∀ a b : α, a ⊔ a ⊓ b = a) (inf_sup_self : ∀ a b : α, a ⊓ (a ⊔ b) = a) :
    @SemilatticeSup.toPartialOrder _ (SemilatticeSup.mk' sup_comm sup_assoc sup_idem) =
      @SemilatticeInf.toPartialOrder _ (SemilatticeInf.mk' inf_comm inf_assoc inf_idem)

(sup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c))

(inf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c))

(sup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a)

(inf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a)


@[to_additive]
theorem Step.cons_cons_iff : ∀ {p : α × Bool}, Step (p :: L₁) (p :: L₂) ↔ Step L₁ L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
{p : α × Bool}

FreeAddGroup.Red.Step (p :: L₁) (p :: L₂) ↔ FreeAddGroup.Red.Step L₁ L₂


@[simp]
theorem _root_.MulActionHom.toQuotient_apply (H : Subgroup α) (g : α) :
    MulActionHom.toQuotient H g = g

{α : Type u}
[Group α]
(H : Subgroup α)
(g : α)


/-- A morphism `φ : S₁ ⟶ S₂` of short complexes that have homology is a quasi-isomorphism if
the induced map `homologyMap φ : S₁.homology ⟶ S₂.homology` is an isomorphism. -/
class QuasiIso (φ : S₁ ⟶ S₂) : Prop where
  /-- the homology map is an isomorphism -/
  isIso' : IsIso (homologyMap φ)

[self : CategoryTheory.ShortComplex.QuasiIso φ]


theorem Left.sign_neg [CovariantClass α α (· + ·) (· < ·)] (a : α) : sign (-a) = -sign a

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


theorem _root_.MeasurableEquiv.sigmaFinite_map (f : α ≃ᵐ β) [SigmaFinite μ] :
    SigmaFinite (μ.map f)

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
(f : α ≃ᵐ β)
[MeasureTheory.SigmaFinite μ]

MeasureTheory.SigmaFinite (MeasureTheory.Measure.map (⇑f) μ)


@[simp]
theorem comap_mk_nhdsSet_image : comap mk (𝓝ˢ (mk '' s)) = 𝓝ˢ s

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

Filter.comap SeparationQuotient.mk (𝓝ˢ (SeparationQuotient.mk '' s)) = 𝓝ˢ s


@[simp]
theorem coe_toNormedDual (x' : WeakDual 𝕜 E) : toNormedDual x' = x'

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace 𝕜 E]
(x' : WeakDual 𝕜 E)


@[reassoc (attr := simp)]
theorem dFrom_comp_xNextIso {i j : ι} (r : c.Rel i j) :
    C.dFrom i ≫ (C.xNextIso r).hom = C.d i j


@[to_additive (attr := simp)]
theorem mulRight_symm (u : Mˣ) : u.mulRight.symm = u⁻¹.mulRight

{M : Type u_6}
[AddMonoid M]
(u : AddUnits M)


/-- The underlying object of `(Monad.comparison R).obj X` is just `R.obj X`.
-/
@[simps]
def Monad.comparisonForget (h : L ⊣ R) : Monad.comparison h ⋙ h.toMonad.forget ≅ R

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{L : CategoryTheory.Functor C D}
{R : CategoryTheory.Functor D C}
(h : L ⊣ R)
(X : D)

(CategoryTheory.Monad.comparisonForget h).hom.app X =
  CategoryTheory.CategoryStruct.id (((CategoryTheory.Monad.comparison h).comp h.toMonad.forget).obj X)


/-- In any concrete category, injective morphisms are monomorphisms. -/
theorem mono_of_injective {X Y : C} (f : X ⟶ Y) (i : Function.Injective f) :
    Mono f

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.ConcreteCategory C]
{X Y : C}
(f : X ⟶ Y)
(i : Function.Injective ⇑f)


theorem ne_zero_of_one_div_ne_zero {a : G₀} (h : 1 / a ≠ 0) : a ≠ 0

{G₀ : Type u_3}
[GroupWithZero G₀]
{a : G₀}
(h : 1 / a ≠ 0)


lemma bodd_bit (b n) : bodd (bit b n) = b


theorem lt_fold_min : c < s.fold min b f ↔ c < b ∧ ∀ x ∈ s, c < f x

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{b : β}
{s : Finset α}
[LinearOrder β]
(c : β)

c < Finset.fold min b f s ↔ c < b ∧ ∀ x ∈ s, c < f x


theorem integral_non_aestronglyMeasurable_of_le (h : a ≤ b)
    (hf : ¬AEStronglyMeasurable f (μ.restrict (Ioc a b))) : ∫ x in a..b, f x ∂μ = 0

(hf : ¬MeasureTheory.AEStronglyMeasurable f (μ.restrict (Set.Ioc a b)))


/-- A mixin class saying that elements `μ : F` are outer measures on `α`.

This typeclass is used to unify some API for outer measures and measures. -/
class OuterMeasureClass (F : Type*) (α : outParam Type*) [FunLike F (Set α) ℝ≥0∞] : Prop where
  protected measure_empty (f : F) : f ∅ = 0
  protected measure_mono (f : F) {s t} : s ⊆ t → f s ≤ f t
  protected measure_iUnion_nat_le (f : F) (s : ℕ → Set α) : Pairwise (Disjoint on s) →
    f (⋃ i, s i) ≤ ∑' i, f (s i)

[self : MeasureTheory.OuterMeasureClass F α]


theorem isPathConnected_iff :
    IsPathConnected F ↔ F.Nonempty ∧ ∀ᵉ (x ∈ F) (y ∈ F), JoinedIn F x y

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

IsPathConnected F ↔ F.Nonempty ∧ ∀ x ∈ F, ∀ y ∈ F, JoinedIn F x y


@[simp]
theorem add_thirds (a : ℝ≥0∞) : a / 3 + a / 3 + a / 3 = a


@[simp] theorem measurable_mem : Measurable (· ∈ s) ↔ MeasurableSet s

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

(Measurable fun x => x ∈ s) ↔ MeasurableSet s


@[simp]
theorem const_comp (c : γ) (f : C(α, β)) : (const β c).comp f = const α c

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
(c : γ)
(f : C(α, β))

(ContinuousMap.const β c).comp f = ContinuousMap.const α c


@[to_additive]
theorem prod_of_isEmpty [IsEmpty α] (s : Finset α) : ∏ i ∈ s, f i = 1

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


/-- Express the value of `cosZeta` at a positive even integer as a value
of the Bernoulli polynomial. -/
theorem cosZeta_two_mul_nat (hk : k ≠ 0) (hx : x ∈ Icc 0 1) :
    cosZeta x (2 * k) = (-1) ^ (k + 1) * (2 * π) ^ (2 * k) / 2 / (2 * k)! *
      ((Polynomial.bernoulli (2 * k)).map (algebraMap ℚ ℂ)).eval (x : ℂ)

{k : ℕ}
{x : ℝ}
(hk : k ≠ 0)
(hx : x ∈ Set.Icc 0 1)

HurwitzZeta.cosZeta (↑x) (2 * ↑k) =
  (-1) ^ (k + 1) * (2 * ↑π) ^ (2 * k) / 2 / ↑(2 * k)! *
    Polynomial.eval (↑x) (Polynomial.map (algebraMap ℚ ℂ) (Polynomial.bernoulli (2 * k)))


/-- Special case of `map_sdiff` for boolean algebras. -/
theorem map_sdiff' (a b : α) : f (a \ b) = f a \ f b

{F : Type u_1}
{α : Type u_3}
{β : Type u_4}
[BooleanAlgebra α]
[BooleanAlgebra β]
[FunLike F α β]
[BoundedLatticeHomClass F α β]
(f : F)
(a b : α)


theorem tendsto_ceil_right (n : ℤ) :
    Tendsto (fun x => ceil x : α → α) (𝓝[>] n) (𝓝[≥] (n + 1))

{α : Type u_1}
[LinearOrderedRing α]
[FloorRing α]
[TopologicalSpace α]
[OrderClosedTopology α]
(n : ℤ)

Filter.Tendsto (fun x => ↑⌈x⌉) (𝓝[>] ↑n) (𝓝[≥] (↑n + 1))


/-- Let `S` be an extension of `R` and `Rₘ Sₘ` be localizations at `M` of `R S` respectively. Let
`b` be a `R`-basis of `S`. Then discriminant of the `Rₘ`-basis of `Sₘ` induced by `b` is the
discriminant of `b`.
-/
theorem Algebra.discr_localizationLocalization (b : Basis ι R S) :
    Algebra.discr Rₘ (b.localizationLocalization Rₘ M Sₘ) =
    algebraMap R Rₘ (Algebra.discr R b)

[IsLocalization (Algebra.algebraMapSubmonoid S M) Sₘ]

Algebra.discr Rₘ ⇑(Basis.localizationLocalization Rₘ M Sₘ b) = (algebraMap R Rₘ) (Algebra.discr R ⇑b)


/-- A field extension `E / F` is purely inseparable if and only if the relative perfect closure of
`F` in `E` is equal to `E`. -/
theorem isPurelyInseparable_iff_perfectClosure_eq_top :
    IsPurelyInseparable F E ↔ perfectClosure F E = ⊤

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]


theorem c_add_pf [Add α] (p : b = c) (a : α) : a + b = a + c

{α : Type u_1}
{b c : α}
[Add α]
(p : b = c)
(a : α)


@[simp] lemma mem_Icc : x ∈ Icc a b ↔ a ≤ x ∧ x ≤ b

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


/-- The functor `ComposableArrows C (n + 1) ⥤ ComposableArrows C n` which forgets
the last arrow. -/
@[simps!]
def δlastFunctor : ComposableArrows C (n + 1) ⥤ ComposableArrows C n

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

∀ {X Y : CategoryTheory.ComposableArrows C (n + 1)} (f : X ⟶ Y) (X_1 : Fin (n + 1)),
  (CategoryTheory.ComposableArrows.δlastFunctor.map f).app X_1 = f.app X_1.castSucc


@[simp]
theorem unop_sum [AddCommMonoid β] {s : Finset α} (f : α → βᵐᵒᵖ) :
    unop (∑ x ∈ s, f x) = ∑ x ∈ s, unop (f x)

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

MulOpposite.unop (∑ x ∈ s, f x) = ∑ x ∈ s, MulOpposite.unop (f x)


/-- The type of open subgroups of a topological group. -/
@[to_additive]
structure OpenSubgroup (G : Type*) [Group G] [TopologicalSpace G] extends Subgroup G where
  isOpen' : IsOpen carrier

{G : Type u_1}
[Group G]
[TopologicalSpace G]
(self : OpenSubgroup G)


/-- Semigroup homomorphism between the function spaces `I → α` and `I → β`, induced by a semigroup
homomorphism `f` between `α` and `β`. -/
@[to_additive (attr := simps) "Additive semigroup homomorphism between the function spaces `I → α`
and `I → β`, induced by an additive semigroup homomorphism `f` between `α` and `β`"]
protected def MulHom.compLeft {α β : Type*} [Mul α] [Mul β] (f : α →ₙ* β) (I : Type*) :
    (I → α) →ₙ* I → β

{α : Type u_3}
{β : Type u_4}
[Add α]
[Add β]
(f : AddHom α β)
(I : Type u_5)
(h : I → α)

∀ (a : I), (f.compLeft I) h a = (⇑f ∘ h) a


protected theorem add_one_sub_one (n : Nat) : (n + 1) - 1 = n


@[simp]
theorem LinearMap.toContinuousLinearMap₁_apply (f : 𝕜 →ₗ[𝕜] E) (x) :
    f.toContinuousLinearMap₁ x = f x

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
(f : 𝕜 →ₗ[𝕜] E)
(x : 𝕜)


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

{G : Type u_3}
[Group G]
{a b c : G}
(h : b = a * c)


theorem linearIndependent_iff_totalOn {s : Set M} :
    LinearIndependent R (fun x => x : s → M) ↔
    (LinearMap.ker <| Finsupp.totalOn M M R id s) = ⊥

{R : Type u_2}
{M : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{s : Set M}

(LinearIndependent R fun (x : ↑s) => ↑x) ↔ LinearMap.ker (Finsupp.totalOn M M R id s) = ⊥


theorem modEq_iff_toIcoDiv_eq_toIocDiv_add_one :
    a ≡ b [PMOD p] ↔ toIcoDiv hp a b = toIocDiv hp a b + 1

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


@[simp] theorem gcd_mul_right_right (m n : Nat) : gcd n (n * m) = n


theorem BijOn.subset_right {r : Set β} (hf : BijOn f s t) (hrt : r ⊆ t) :
    BijOn f (s ∩ f ⁻¹' r) r

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{f : α → β}
{r : Set β}
(hf : Set.BijOn f s t)
(hrt : r ⊆ t)