@[to_additive]
theorem HasProd.nat_mul_neg {f : ℤ → M} (hf : HasProd f m) :
    HasProd (fun n : ℕ ↦ f n * f (-n)) (m * f 0)

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
{m : M}
[ContinuousAdd M]
{f : ℤ → M}
(hf : HasSum f m)

HasSum (fun n => f ↑n + f (-↑n)) (m + f 0)


theorem smoothOn_proj {s : Set (TotalSpace F E)} : SmoothOn (IB.prod 𝓘(𝕜, F)) IB (π F E) s

[TopologicalSpace (Bundle.TotalSpace F E)]

SmoothOn (IB.prod 𝓘(𝕜, F)) IB Bundle.TotalSpace.proj s


/-- `legendreSym p (-1)` is given by `χ₄ p`. -/
theorem legendreSym.at_neg_one (hp : p ≠ 2) : legendreSym p (-1) = χ₄ p

{p : ℕ}
[Fact (Nat.Prime p)]
(hp : p ≠ 2)


@[simp]
theorem typein_inj (r : α → α → Prop) [IsWellOrder α r] {a b} : typein r a = typein r b ↔ a = b

{α : Type u}
(r : α → α → Prop)
[IsWellOrder α r]
{a b : α}

Ordinal.typein r a = Ordinal.typein r b ↔ a = b


lemma LinearMap.toMatrix_pow (f : M₁ →ₗ[R] M₁) (k : ℕ) :
    (toMatrix v₁ v₁ f) ^ k = toMatrix v₁ v₁ (f ^ k)

{R : Type u_1}
[CommSemiring R]
{n : Type u_4}
[Fintype n]
[DecidableEq n]
{M₁ : Type u_5}
[AddCommMonoid M₁]
[Module R M₁]
(v₁ : Basis n R M₁)
(f : M₁ →ₗ[R] M₁)
(k : ℕ)

(LinearMap.toMatrix v₁ v₁) f ^ k = (LinearMap.toMatrix v₁ v₁) (f ^ k)


@[simp]
theorem eb_val (h : j ≠ i) : (Eb R i j h).val = Matrix.stdBasisMatrix i j 1

{n : Type u_1}
(R : Type u₂)
[DecidableEq n]
[CommRing R]
[Fintype n]
(i j : n)
(h : j ≠ i)

↑(LieAlgebra.SpecialLinear.Eb R i j h) = Matrix.stdBasisMatrix i j 1


theorem SurjOn.comap_nonempty (h : SurjOn f s t) (ht : t.Nonempty) : s.Nonempty

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


theorem conjTranspose_injective [InvolutiveStar α] :
    Function.Injective (conjTranspose : Matrix m n α → Matrix n m α)

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


theorem HasBasis.tendsto_left_iff (hla : la.HasBasis pa sa) :
    Tendsto f la lb ↔ ∀ t ∈ lb, ∃ i, pa i ∧ MapsTo f (sa i) t

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_4}
{la : Filter α}
{pa : ι → Prop}
{sa : ι → Set α}
{lb : Filter β}
{f : α → β}
(hla : la.HasBasis pa sa)

Filter.Tendsto f la lb ↔ ∀ t ∈ lb, ∃ i, pa i ∧ Set.MapsTo f (sa i) t


/-- Given a monoid homomorphism `f` from `M` to `P`, the kernel of `f` is the unique congruence
    relation on `M` whose induced map from the quotient of `M` to `P` is injective. -/
@[to_additive "Given an `AddMonoid` homomorphism `f` from `M` to `P`, the kernel of `f`
is the unique additive congruence relation on `M` whose induced map from the quotient of `M`
to `P` is injective."]
theorem ker_eq_lift_of_injective (H : c ≤ ker f) (h : Injective (c.lift f H)) : ker f = c

{M : Type u_1}
{P : Type u_3}
[AddZeroClass M]
[AddZeroClass P]
(c : AddCon M)
(f : M →+ P)
(H : c ≤ AddCon.ker f)
(h : Function.Injective ⇑(c.lift f H))


theorem toNonUnitalRing_injective :
    Function.Injective (@toNonUnitalRing R)


lemma isLocallyBijective_iff_isIso :
    IsLocallyInjective f ∧ IsLocallySurjective f ↔ IsIso f

{J : CategoryTheory.GrothendieckTopology C}

CategoryTheory.Sheaf.IsLocallyInjective f ∧ CategoryTheory.Sheaf.IsLocallySurjective f ↔ CategoryTheory.IsIso f


@[to_additive]
theorem one_lt_iff_ne_one : 1 < a ↔ a ≠ 1

{α : Type u}
[CanonicallyOrderedCommMonoid α]
{a : α}


@[simp]
theorem finsuppTensorFinsupp_single (i : ι) (m : M) (k : κ) (n : N) :
    finsuppTensorFinsupp R S M N ι κ (Finsupp.single i m ⊗ₜ Finsupp.single k n) =
      Finsupp.single (i, k) (m ⊗ₜ n)

(R : Type u_1)
(S : Type u_2)
(M : Type u_3)
(N : Type u_4)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[Semiring S]
[Algebra R S]
[Module S M]
[IsScalarTower R S M]
(i : ι)
(m : M)
(k : κ)
(n : N)

(finsuppTensorFinsupp R S M N ι κ) (Finsupp.single i m ⊗ₜ[R] Finsupp.single k n) = Finsupp.single (i, k) (m ⊗ₜ[R] n)


theorem lintegral_insert [MeasurableSingletonClass α] {a : α} {s : Set α} (h : a ∉ s)
    (f : α → ℝ≥0∞) : ∫⁻ x in insert a s, f x ∂μ = f a * μ {a} + ∫⁻ x in s, f x ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasurableSingletonClass α]
{a : α}
{s : Set α}
(h : a ∉ s)
(f : α → ℝ≥0∞)

∫⁻ (x : α) in insert a s, f x ∂μ = f a * μ {a} + ∫⁻ (x : α) in s, f x ∂μ


theorem map_eq_append_split {f : α → β} {l : List α} {s₁ s₂ : List β}
    (h : map f l = s₁ ++ s₂) : ∃ l₁ l₂, l = l₁ ++ l₂ ∧ map f l₁ = s₁ ∧ map f l₂ = s₂

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{l : List α}
{s₁ s₂ : List β}
(h : List.map f l = s₁ ++ s₂)

∃ l₁ l₂, l = l₁ ++ l₂ ∧ List.map f l₁ = s₁ ∧ List.map f l₂ = s₂


/-- The `LSeries` associated to the arithmetic function `ζ` converges at `s` if and only if
`re s > 1`. -/
theorem LSeriesSummable_zeta_iff {s : ℂ} : LSeriesSummable (ζ ·) s ↔ 1 < s.re

LSeriesSummable (fun x => ↑(ArithmeticFunction.zeta x)) s ↔ 1 < s.re


@[to_additive]
theorem UniformContinuous.inv [UniformSpace β] {f : β → α} (hf : UniformContinuous f) :
    UniformContinuous fun x => (f x)⁻¹

{α : Type u_1}
{β : Type u_2}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
[UniformSpace β]
{f : β → α}
(hf : UniformContinuous f)


theorem asHom_injective {G : AddCommGrp.{0}} : Function.Injective (@asHom G)


@[simp]
theorem toPNat'_coe : ∀ n : ℕ, (toPNat' n : ℕ) = ite (0 < n) n 1


theorem setToL1S_add_left' (T T' T'' : Set α → E →L[ℝ] F)
    (h_add : ∀ s, MeasurableSet s → μ s < ∞ → T'' s = T s + T' s) (f : α →₁ₛ[μ] E) :
    setToL1S T'' f = setToL1S T f + setToL1S T' f

(h_add : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → T'' s = T s + T' s)

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

MeasureTheory.L1.SimpleFunc.setToL1S T'' f =
  MeasureTheory.L1.SimpleFunc.setToL1S T f + MeasureTheory.L1.SimpleFunc.setToL1S T' f


@[simp]
theorem mkHom_f_succ_succ (n : ℕ) :
    (mkHom P Q zero one one_zero_comm succ).f (n + 2) =
      (succ n
          ⟨(mkHom P Q zero one one_zero_comm succ).f n,
            (mkHom P Q zero one one_zero_comm succ).f (n + 1),
            (mkHom P Q zero one one_zero_comm succ).comm (n + 1) n⟩).1

(one_zero_comm : one ≫ Q.d 1 0 = P.d 1 0 ≫ zero)

(P.mkHom Q zero one one_zero_comm succ).f (n + 2) =
  (succ n ⟨(P.mkHom Q zero one one_zero_comm succ).f n, ⟨(P.mkHom Q zero one one_zero_comm succ).f (n + 1), ⋯⟩⟩).fst


/-- The iterated Frobenius automorphism for a perfect ring. -/
@[simps! apply]
noncomputable def iterateFrobeniusEquiv : R ≃+* R

(R : Type u_1)
(p n : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]
(a : R)

(iterateFrobeniusEquiv R p n) a = (iterateFrobenius R p n) a


@[simp]
lemma generateFrom_insert_univ {α : Type*} {s : Set (Set α)} :
    generateFrom (insert univ s) = generateFrom s

TopologicalSpace.generateFrom (insert Set.univ s) = TopologicalSpace.generateFrom s


theorem derivWithin_neg (hxs : UniqueDiffWithinAt 𝕜 s x) : derivWithin Neg.neg s x = -1

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
(s : Set 𝕜)
(hxs : UniqueDiffWithinAt 𝕜 s x)


lemma cauchy_iInf_uniformSpace' {ι : Sort*} {u : ι → UniformSpace β}
    {l : Filter β} [l.NeBot] :
    Cauchy (uniformSpace := ⨅ i, u i) l ↔ ∀ i, Cauchy (uniformSpace := u i) l

{β : Type v}
{ι : Sort u_1}
{u : ι → UniformSpace β}
{l : Filter β}
[l.NeBot]


@[reassoc (attr := simp)]
theorem isoIsPullback_inv_snd (h : IsPullback fst snd f g) (h' : IsPullback fst' snd' f g) :
    (h.isoIsPullback h').inv ≫ snd = snd'

(h : CategoryTheory.IsPullback fst snd f g)

(h' : CategoryTheory.IsPullback fst' snd' f g)

(CategoryTheory.IsPullback.isoIsPullback X Y h h').inv ≫ snd = snd'


/-- Two permutations `f g : Perm α` have the same cycle factors iff they are the same. -/
theorem cycleFactorsFinset_injective : Function.Injective (@cycleFactorsFinset α _ _)

{α : Type u_2}
[DecidableEq α]
[Fintype α]


@[simp]
theorem sigmaFinsuppEquivDFinsupp_single [DecidableEq ι] [Zero N] (a : Σi, η i) (n : N) :
    sigmaFinsuppEquivDFinsupp (Finsupp.single a n) =
      @DFinsupp.single _ (fun i => η i →₀ N) _ _ a.1 (Finsupp.single a.2 n)

{ι : Type u_1}
{η : ι → Type u_4}
{N : Type u_5}
[DecidableEq ι]
[Zero N]
(a : (i : ι) × η i)
(n : N)

sigmaFinsuppEquivDFinsupp (Finsupp.single a n) = DFinsupp.single a.fst (Finsupp.single a.snd n)


theorem rank_le_card : Module.rank (FixedPoints.subfield G F) F ≤ Fintype.card G

(G : Type u)
[Group G]
(F : Type v)
[Field F]
[MulSemiringAction G F]
[Fintype G]

Module.rank (↥(FixedPoints.subfield G F)) F ≤ ↑(Fintype.card G)


@[simp] theorem zeroExtend_zeroExtend_of_le (x : BitVec w) (h : k ≤ l) :
    (x.zeroExtend l).zeroExtend k = x.zeroExtend k

{w k l : Nat}
(x : BitVec w)
(h : k ≤ l)

BitVec.zeroExtend k (BitVec.zeroExtend l x) = BitVec.zeroExtend k x


@[simp]
theorem symm_toDiffeomorph : e.symm.toDiffeomorph = e.toDiffeomorph.symm

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
(e : E ≃L[𝕜] E')


/-- A morphism of presheaves of modules. -/
structure Hom (P Q : PresheafOfModules R) where
  hom : P.presheaf ⟶ Q.presheaf
  map_smul : ∀ (X : Cᵒᵖ) (r : R.obj X) (x : P.presheaf.obj X), hom.app X (r • x) = r • hom.app X x

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
{P Q : PresheafOfModules R}
(self : P.Hom Q)
(X : Cᵒᵖ)
(r : ↑(R.obj X))
(x : ↑(P.presheaf.obj X))

(self.hom.app X) (r • x) = r • (self.hom.app X) x


protected lemma div_eq_zero_iff (hb : 0 < b) : a / b = 0 ↔ a < b


/-- Dividing out by a prime factor reduces the `padicValNat` by `1`. -/
protected theorem div (dvd : p ∣ b) : padicValNat p (b / p) = padicValNat p b - 1

{p b : ℕ}
[hp : Fact (Nat.Prime p)]
(dvd : p ∣ b)


/-- If a field `F` is of exponential characteristic `q`, then `Polynomial.expand F (q ^ n) f`
and `f` have the same separable degree. -/
theorem natSepDegree_expand (q : ℕ) [hF : ExpChar F q] {n : ℕ} :
    (expand F (q ^ n) f).natSepDegree = f.natSepDegree

{F : Type u}
[Field F]
(f : F[X])
(q : ℕ)
[hF : ExpChar F q]
{n : ℕ}

((Polynomial.expand F (q ^ n)) f).natSepDegree = f.natSepDegree


theorem IsFiltered.isConnected [IsFiltered C] : IsConnected C

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


theorem to_mulHom_injective {f g : A →ₛₙₐ[φ] B} (h : (f : A →ₙ* B) = (g : A →ₙ* B)) : f = g

{R : Type u}
{S : Type u₁}
[Monoid R]
[Monoid S]
{φ : R →* S}
{A : Type v}
{B : Type w}
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction S B]
{f g : A →ₛₙₐ[φ] B}
(h : ↑f = ↑g)


@[simp]
theorem attach_cons (x : α) (s : Sym α n) :
    (cons x s).attach =
      cons ⟨x, mem_cons_self _ _⟩ (s.attach.map fun x => ⟨x, mem_cons_of_mem x.prop⟩)

{α : Type u_1}
{n : ℕ}
(x : α)
(s : Sym α n)

(x ::ₛ s).attach = ⟨x, ⋯⟩ ::ₛ Sym.map (fun x_1 => ⟨↑x_1, ⋯⟩) s.attach


@[simp] theorem coe_iff_coe : ∀(a b : Bool), (a ↔ b) ↔ a = b


protected theorem hasFDerivAt_aeval (x : 𝕜) :
    HasFDerivAt (fun x => aeval x q) (smulRight (1 : 𝕜 →L[𝕜] 𝕜) (aeval x (derivative q))) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{R : Type u_1}
[CommSemiring R]
[Algebra R 𝕜]
(q : R[X])
(x : 𝕜)

HasFDerivAt (fun x => (Polynomial.aeval x) q)
  (ContinuousLinearMap.smulRight 1 ((Polynomial.aeval x) (Polynomial.derivative q))) x


theorem coe_two : ((2 : ℝ≥0) : ℝ≥0∞) = 2


theorem symm_proj_apply (e : Trivialization F (π F E)) (z : TotalSpace F E)
    (hz : z.proj ∈ e.baseSet) : e.symm z.proj (e z).2 = z.2

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)


/-- If `f` has a local min on `s` at `a`, `f'` is the derivative of `f` at `a` within `s`, and
`y` belongs to the positive tangent cone of `s` at `a`, then `0 ≤ f' y`. -/
theorem IsLocalMinOn.hasFDerivWithinAt_nonneg (h : IsLocalMinOn f s a)
    (hf : HasFDerivWithinAt f f' s a) (hy : y ∈ posTangentConeAt s a) : 0 ≤ f' y

{E : Type u}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{s : Set E}
{a y : E}
(h : IsLocalMinOn f s a)
(hf : HasFDerivWithinAt f f' s a)
(hy : y ∈ posTangentConeAt s a)


@[to_additive]
theorem mrange_eq_map (f : F) : mrange f = (⊤ : Submonoid M).map f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_5}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
(f : F)

AddMonoidHom.mrange f = AddSubmonoid.map f ⊤


theorem isOpen_iff [TopologicalSpace α] (F : Realizer α) {s : Set α} :
    IsOpen s ↔ ∀ a ∈ s, ∃ b, a ∈ F.F b ∧ F.F b ⊆ s

{α : Type u_1}
[TopologicalSpace α]
(F : Ctop.Realizer α)
{s : Set α}

IsOpen s ↔ ∀ a ∈ s, ∃ b, a ∈ F.F.f b ∧ F.F.f b ⊆ s


@[simp 1200]
theorem ofNat_one : ofNat 1 = 1


@[to_additive]
theorem mem_closure {x : M} : x ∈ closure s ↔ ∀ S : Subsemigroup M, s ⊆ S → x ∈ S

{M : Type u_1}
[Mul M]
{s : Set M}
{x : M}

x ∈ Subsemigroup.closure s ↔ ∀ (S : Subsemigroup M), s ⊆ ↑S → x ∈ S


theorem left_mem_cIcc (a b : α) : a ∈ cIcc a b

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


/-- A subsemiring `S` of `R` determines a subsemiring `S.op` of the opposite ring `Rᵐᵒᵖ`. -/
@[simps]
def opEquiv : Subsemiring R ≃o Subsemiring Rᵐᵒᵖ

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

(RelIso.symm Subsemiring.opEquiv) S = S.unop


@[simp] protected theorem zero_min (a) : min 0 a = 0


/-- The integral of the derivative of a product of two maps.
Special case of `integral_deriv_mul_eq_sub_of_hasDeriv_right` where the functions have a
  one-sided derivative at the endpoints. -/
theorem integral_deriv_mul_eq_sub_of_hasDerivWithinAt {u v u' v' : ℝ → A}
    (hu : ∀ x ∈ [[a, b]], HasDerivWithinAt u (u' x) [[a, b]] x)
    (hv : ∀ x ∈ [[a, b]], HasDerivWithinAt v (v' x) [[a, b]] x)
    (hu' : IntervalIntegrable u' volume a b)
    (hv' : IntervalIntegrable v' volume a b) :
    ∫ x in a..b, u' x * v x + u x * v' x = u b * v b - u a * v a

(hu' : IntervalIntegrable u' MeasureTheory.volume a b)

(hv' : IntervalIntegrable v' MeasureTheory.volume a b)

∫ (x : ℝ) in a..b, u' x * v x + u x * v' x = u b * v b - u a * v a


@[simp] theorem coe_neg_closedBall {r : ℝ} (v : closedBall (0 : E) r) : ↑(-v) = (-v : E)

{E : Type u_1}
[i : SeminormedAddCommGroup E]
{r : ℝ}
(v : ↑(Metric.closedBall 0 r))


theorem IsBounded.all (s : Set α) : IsBounded s

{α : Type u_2}
[Bornology α]
[BoundedSpace α]
(s : Set α)


/-- A `Monoid` is a `Semigroup` with an element `1` such that `1 * a = a * 1 = a`. -/
@[to_additive]
class Monoid (M : Type u) extends Semigroup M, MulOneClass M where
  /-- Raising to the power of a natural number. -/
  protected npow : ℕ → M → M := npowRec
  /-- Raising to the power `(0 : ℕ)` gives `1`. -/
  protected npow_zero : ∀ x, npow 0 x = 1 := by intros; rfl
  /-- Raising to the power `(n + 1 : ℕ)` behaves as expected. -/
  protected npow_succ : ∀ (n : ℕ) (x), npow (n + 1) x = npow n x * x := by intros; rfl


theorem le_iff : s ≤ t ↔ (s : Set (α → M)) ≤ (t : Set (α → M))

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{A : Set M}
{α : Type u₁}
{s t : L.DefinableSet A α}

s ≤ t ↔ ↑s ≤ ↑t


@[simp, norm_cast]
theorem cast_div_charZero {k : Type*} [DivisionSemiring k] [CharZero k] {m n : ℕ} (n_dvd : n ∣ m) :
    ((m / n : ℕ) : k) = m / n

{k : Type u_2}
[DivisionSemiring k]
[CharZero k]
{m n : ℕ}
(n_dvd : n ∣ m)


@[simp]
theorem zero_sigma : @Multiset.sigma α σ 0 t = 0

{α : Type u_1}
{σ : α → Type u_4}
(t : (a : α) → Multiset (σ a))


/-- The functor taking a monoid to its subgroup of units. -/
@[simps]
def MonCat.units : MonCat.{u} ⥤ Grp.{u}

∀ {X Y : MonCat} (f : X ⟶ Y), MonCat.units.map f = Grp.ofHom (Units.map f)


lemma prob_compl_le_one_sub_of_le_prob {p : ℝ≥0∞} (hμs : p ≤ μ s) (s_mble : MeasurableSet s) :
    μ sᶜ ≤ 1 - p

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
[MeasureTheory.IsProbabilityMeasure μ]
{p : ℝ≥0∞}
(hμs : p ≤ μ s)
(s_mble : MeasurableSet s)


@[simp]
theorem mk_vector (α : Type u) (n : ℕ) : #(Vector α n) = #α ^ n

Cardinal.mk (Mathlib.Vector α n) = Cardinal.mk α ^ n


theorem nat_add (h : LiouvilleWith p x) (n : ℕ) : LiouvilleWith p (n + x)

{p x : ℝ}
(h : LiouvilleWith p x)
(n : ℕ)


theorem IsOpen.exists_Ioo_subset [OrderTopology α] [Nontrivial α] {s : Set α} (hs : IsOpen s)
    (h : s.Nonempty) : ∃ a b, a < b ∧ Ioo a b ⊆ s

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[Nontrivial α]
{s : Set α}
(hs : IsOpen s)
(h : s.Nonempty)


theorem sInter_iUnion (s : ι → Set (Set α)) : ⋂₀ ⋃ i, s i = ⋂ i, ⋂₀ s i

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


theorem not_subset_of_ssubset (h : a ⊂ b) : ¬b ⊆ a

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


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

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

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


/-- The functor `LeftExtension L' F ⥤ LeftExtension L F`
induced by a natural transformation `L' ⟶ L ⋙ G'`. -/
@[simps!]
def LeftExtension.postcomp₁ (f : L' ⟶ L ⋙ G) (F : C ⥤ H) :
    LeftExtension L' F ⥤ LeftExtension L F

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

∀ (X_1 : D), ((CategoryTheory.Functor.LeftExtension.postcomp₁ G f F).obj X).right.obj X_1 = X.right.obj (G.obj X_1)


@[norm_cast]
theorem coe_add : (↑(f + f') : MultilinearMap R (fun _ : ι => M) N) = f + f'

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


@[simp]
theorem repr_floor_apply (m : E) (i : ι) : b.repr (floor b m) i = ⌊b.repr m i⌋

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

(b.repr ↑(Zspan.floor b m)) i = ↑⌊(b.repr m) i⌋


@[to_additive (attr := simp)]
theorem smul_finset_empty (a : α) : a • (∅ : Finset β) = ∅

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
(a : α)


lemma homologyMap'_eq : homologyMap' φ h₁ h₂ = γ.left.φH

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

CategoryTheory.ShortComplex.homologyMap' φ h₁ h₂ = γ.left.φH


@[to_additive (attr := simp)]
theorem MonoidHom.one_apply [MulOneClass M] [MulOneClass N] (x : M) : (1 : M →* N) x = 1

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


lemma saturate_of_superset (K : Coverage C) {X : C} {S T : Sieve X} (h : S ≤ T)
    (hS : Saturate K X S) : Saturate K X T

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(K : CategoryTheory.Coverage C)
{X : C}
{S T : CategoryTheory.Sieve X}
(h : S ≤ T)
(hS : K.Saturate X S)


protected theorem smul_sum {S T : Type*} [AddCommMonoid S] [DistribSMul T S] (p : R[X]) (b : T)
    (f : ℕ → R → S) : b • p.sum f = p.sum fun n a => b • f n a

{R : Type u}
[Semiring R]
{S : Type u_1}
{T : Type u_2}
[AddCommMonoid S]
[DistribSMul T S]
(p : R[X])
(b : T)
(f : ℕ → R → S)


theorem Matrix.isSkewAdjoint_bracket {A B : Matrix n n R} (hA : A ∈ skewAdjointMatricesSubmodule J)
    (hB : B ∈ skewAdjointMatricesSubmodule J) : ⁅A, B⁆ ∈ skewAdjointMatricesSubmodule J


@[simp]
theorem inr_le_inr_iff [LE α] [LE β] {a b : β} : (inr a : α ⊕ β) ≤ inr b ↔ a ≤ b

{α : Type u_1}
{β : Type u_2}
[LE α]
[LE β]
{a b : β}


theorem getLast_append_singleton {a : α} (l : List α) :
    getLast (l ++ [a]) (append_ne_nil_of_ne_nil_right l _ (cons_ne_nil a _)) = a


theorem adjoin_union (s t : Set A) : adjoin R (s ∪ t) = adjoin R s ⊔ adjoin R t

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(s t : Set A)

NonUnitalAlgebra.adjoin R (s ∪ t) = NonUnitalAlgebra.adjoin R s ⊔ NonUnitalAlgebra.adjoin R t


theorem moment_truncation_eq_intervalIntegral (hf : AEStronglyMeasurable f μ) {A : ℝ} (hA : 0 ≤ A)
    {n : ℕ} (hn : n ≠ 0) : ∫ x, truncation f A x ^ n ∂μ = ∫ y in -A..A, y ^ n ∂Measure.map f μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

∫ (x : α), ProbabilityTheory.truncation f A x ^ n ∂μ = ∫ (y : ℝ) in -A..A, y ^ n ∂MeasureTheory.Measure.map f μ


theorem quotientMap_projIcc : QuotientMap (projIcc a b h)

{α : Type u_1}
[LinearOrder α]
{a b : α}
{h : a ≤ b}
[TopologicalSpace α]
[OrderTopology α]


/-- A *non-unital ⋆-algebra homomorphism* is a non-unital algebra homomorphism between
non-unital `R`-algebras `A` and `B` equipped with a `star` operation, and this homomorphism is
also `star`-preserving. -/
structure NonUnitalStarAlgHom (R A B : Type*) [Monoid R] [NonUnitalNonAssocSemiring A]
  [DistribMulAction R A] [Star A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]
  [Star B] extends A →ₙₐ[R] B where
  /-- By definition, a non-unital ⋆-algebra homomorphism preserves the `star` operation. -/
  map_star' : ∀ a : A, toFun (star a) = star (toFun a)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[Monoid R]
[NonUnitalNonAssocSemiring A]
[DistribMulAction R A]
[Star A]
[NonUnitalNonAssocSemiring B]
[DistribMulAction R B]
[Star B]
(self : A →⋆ₙₐ[R] B)
(a : A)

self.toFun (star a) = star (self.toFun a)


theorem sphere_disjoint_ball : Disjoint (sphere x ε) (ball x ε)

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

Disjoint (Metric.sphere x ε) (Metric.ball x ε)


@[to_additive]
lemma Function.Injective.smulCommClass [SMul M α] [SMul N α] [SMul M β] [SMul N β]
    [SMulCommClass M N β] {f : α → β} (hf : Injective f) (h₁ : ∀ (c : M) x, f (c • x) = c • f x)
    (h₂ : ∀ (c : N) x, f (c • x) = c • f x) : SMulCommClass M N α

(h₁ : ∀ (c : M) (x : α), f (c +ᵥ x) = c +ᵥ f x)

(h₂ : ∀ (c : N) (x : α), f (c +ᵥ x) = c +ᵥ f x)


@[to_additive (attr := simp)]
theorem singleton_mul_singleton (a b : α) : ({a} : Finset α) * {b} = {a * b}

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


/-- The mean value theorem: if the derivative of a function is bounded by `C`, then the function is
`C`-Lipschitz. Version with `fderiv` and `LipschitzWith`. -/
theorem _root_.lipschitzWith_of_nnnorm_fderiv_le
    {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] {f : E → G}
    {C : ℝ≥0} (hf : Differentiable 𝕜 f)
    (bound : ∀ x, ‖fderiv 𝕜 f x‖₊ ≤ C) : LipschitzWith C f

(bound : ∀ (x : E), ‖fderiv 𝕜 f x‖₊ ≤ C)


@[simp, rclike_simps]
theorem one_im : im (1 : K) = 0


@[simp]
theorem augmentTruncate_hom_f_zero (C : CochainComplex V ℕ) :
    (augmentTruncate C).hom.f 0 = 𝟙 (C.X 0)


theorem Chain'.cons {x y l} (h₁ : R x y) (h₂ : Chain' R (y :: l)) : Chain' R (x :: y :: l)

{α : Type u}
{R : α → α → Prop}
{x y : α}
{l : List α}
(h₁ : R x y)
(h₂ : List.Chain' R (y :: l))


@[simp]
theorem ofDigits_singleton {b n : ℕ} : ofDigits b [n] = n


theorem isNoetherian_adjoin_finset [IsNoetherianRing R] (s : Finset A)
    (hs : ∀ x ∈ s, IsIntegral R x) : IsNoetherian R (Algebra.adjoin R (s : Set A))

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[CommRing A]
[Algebra R A]
[IsNoetherianRing R]
(s : Finset A)
(hs : ∀ x ∈ s, IsIntegral R x)


theorem LinearIndependent.restrict_of_comp_subtype {s : Set ι}
    (hs : LinearIndependent R (v ∘ (↑) : s → M)) : LinearIndependent R (s.restrict v)

(hs : LinearIndependent (ι := ↑s) R (v ∘ Subtype.val))

LinearIndependent (ι := ↑s) R (s.restrict v)


theorem eval_πs' {l : Products I} {o₁ o₂ : Ordinal} (h : o₁ ≤ o₂)
    (hlt : ∀ i ∈ l.val, ord I i < o₁) :
    πs' C h (l.eval (π C (ord I · < o₁))) = l.eval (π C (ord I · < o₂))

{l : Profinite.NobelingProof.Products I}

(hlt : ∀ i ∈ ↑l, Profinite.NobelingProof.ord I i < o₁)

(Profinite.NobelingProof.πs' C h)
    (Profinite.NobelingProof.Products.eval (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o₁)
      l) =
  Profinite.NobelingProof.Products.eval (Profinite.NobelingProof.π C fun x => Profinite.NobelingProof.ord I x < o₂) l


theorem lt_congr_left {x₁ x₂ y : PGame} (hx : x₁ ≈ x₂) : x₁ < y ↔ x₂ < y

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


theorem prim_iff₁ {f : ℕ → ℕ} : (@Primrec' 1 fun v => f v.head) ↔ Primrec f

(Nat.Primrec' fun v => f v.head) ↔ Primrec f


/--
    If `P : ℤ → Prop` is a predicate such that the set `{m : P m}` is bounded below and nonempty,
    then this set has the least element. This lemma uses classical logic to avoid assumption
    `[DecidablePred P]`. See `Int.leastOfBdd` for a constructive counterpart. -/
theorem exists_least_of_bdd
    {P : ℤ → Prop}
    (Hbdd : ∃ b : ℤ , ∀ z : ℤ , P z → b ≤ z)
    (Hinh : ∃ z : ℤ , P z) : ∃ lb : ℤ , P lb ∧ ∀ z : ℤ , P z → lb ≤ z

{P : ℤ → Prop}
(Hbdd : ∃ b, ∀ (z : ℤ), P z → b ≤ z)
(Hinh : ∃ z, P z)


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


/-- Multiplication by a `u : Mˣ` on the right doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the right doesn't affect `IsAddUnit`."]
theorem Units.isUnit_mul_units [Monoid M] (a : M) (u : Mˣ) : IsUnit (a * u) ↔ IsUnit a

{M : Type u_1}
[Monoid M]
(a : M)
(u : Mˣ)


theorem isConnected_Ici : IsConnected (Ici a)

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


theorem TendstoLocallyUniformlyOn.union {s₁ s₂ : Set α} (hs₁ : IsOpen s₁) (hs₂ : IsOpen s₂)
    (h₁ : TendstoLocallyUniformlyOn F f p s₁) (h₂ : TendstoLocallyUniformlyOn F f p s₂) :
    TendstoLocallyUniformlyOn F f p (s₁ ∪ s₂)

{F : ι → α → β}


/-- `p` is equidistant from a set of points in `s` if and only if its
`orthogonalProjection` is. -/
theorem dist_set_eq_iff_dist_orthogonalProjection_eq {s : AffineSubspace ℝ P} [Nonempty s]
    [HasOrthogonalProjection s.direction] {ps : Set P} (hps : ps ⊆ s) (p : P) :
    (Set.Pairwise ps fun p1 p2 => dist p1 p = dist p2 p) ↔
      Set.Pairwise ps fun p1 p2 =>
        dist p1 (orthogonalProjection s p) = dist p2 (orthogonalProjection s p)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : AffineSubspace ℝ P}
[Nonempty ↥s]
[HasOrthogonalProjection s.direction]
{ps : Set P}
(hps : ps ⊆ ↑s)
(p : P)

(ps.Pairwise fun p1 p2 => dist p1 p = dist p2 p) ↔
  ps.Pairwise fun p1 p2 =>
    dist p1 ↑((EuclideanGeometry.orthogonalProjection s) p) = dist p2 ↑((EuclideanGeometry.orthogonalProjection s) p)


@[to_additive]
theorem finprod_mem_finset_product₃ {γ : Type*} (s : Finset (α × β × γ)) (f : α × β × γ → M) :
    (∏ᶠ (abc) (_ : abc ∈ s), f abc) = ∏ᶠ (a) (b) (c) (_ : (a, b, c) ∈ s), f (a, b, c)

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
{γ : Type u_7}
(s : Finset (α × β × γ))
(f : α × β × γ → M)

∑ᶠ (abc : α × β × γ) (_ : abc ∈ s), f abc = ∑ᶠ (a : α) (b : β) (c : γ) (_ : (a, b, c) ∈ s), f (a, b, c)


lemma IsInvertedBy.map_iff {C₁ C₂ C₃ : Type*} [Category C₁] [Category C₂] [Category C₃]
    (W : MorphismProperty C₁) (F : C₁ ⥤ C₂) (G : C₂ ⥤ C₃) :
    (W.map F).IsInvertedBy G ↔ W.IsInvertedBy (F ⋙ G)

(W : CategoryTheory.MorphismProperty C₁)

(W.map F).IsInvertedBy G ↔ W.IsInvertedBy (F.comp G)


theorem conjugateEquiv_adjunction_id {L R : C ⥤ C} (adj : L ⊣ R) (α : 𝟭 C ⟶ L) (c : C) :
    (conjugateEquiv adj Adjunction.id α).app c = α.app (R.obj c) ≫ adj.counit.app c

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{L R : CategoryTheory.Functor C C}
(adj : L ⊣ R)
(α : CategoryTheory.Functor.id C ⟶ L)
(c : C)

((CategoryTheory.conjugateEquiv adj CategoryTheory.Adjunction.id) α).app c =
  CategoryTheory.CategoryStruct.comp (α.app (R.obj c)) (adj.counit.app c)


/-- The cardinality of a field is at most `n` times the cardinality of the image of a degree `n`
  polynomial -/
theorem card_image_polynomial_eval [DecidableEq R] [Fintype R] {p : R[X]} (hp : 0 < p.degree) :
    Fintype.card R ≤ natDegree p * (univ.image fun x => eval x p).card

{R : Type u_2}
[CommRing R]
[IsDomain R]
[DecidableEq R]
[Fintype R]
{p : R[X]}
(hp : 0 < p.degree)

Fintype.card R ≤ p.natDegree * (Finset.image (fun x => Polynomial.eval x p) Finset.univ).card


@[reassoc (attr := simp)]
theorem xPrevIso_comp_dTo {i j : ι} (r : c.Rel i j) : (C.xPrevIso r).inv ≫ C.dTo j = C.d i j


@[simp]
theorem dedup_cons_of_not_mem {a : α} {s : Multiset α} : a ∉ s → dedup (a ::ₘ s) = a ::ₘ dedup s

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


theorem basis_iff_mem_maximals_Prop (hX : X ⊆ M.E := by aesop_mat) :
    M.Basis I X ↔ I ∈ maximals (· ⊆ ·) (fun I ↦ M.Indep I ∧ I ⊆ X)

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
(hX : X ⊆ M.E := by aesop_mat)

M.Basis I X ↔ I ∈ maximals (fun x x_1 => x ⊆ x_1) fun I => M.Indep I ∧ I ⊆ X


theorem lowerClosure_mono : Monotone (lowerClosure : Set α → LowerSet α)


/-- The relation `≤` on a preorder is transitive. -/
@[trans]
theorem le_trans : ∀ {a b c : α}, a ≤ b → b ≤ c → a ≤ c


theorem of_lt_left [LinearOrder α] (h : (a:α) < b) (eq : a = a') : ¬b ≤ a'

{α : Type u_1}
{a b a' : α}
[LinearOrder α]
(h : a < b)
(eq : a = a')


/-- Characterization of uniform equicontinuity for families of functions between
(pseudo) metric spaces. -/
theorem uniformEquicontinuous_iff {ι : Type*} [PseudoMetricSpace β] {F : ι → β → α} :
    UniformEquicontinuous F ↔
      ∀ ε > 0, ∃ δ > 0, ∀ x y, dist x y < δ → ∀ i, dist (F i x) (F i y) < ε

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
{ι : Type u_4}
[PseudoMetricSpace β]
{F : ι → β → α}

UniformEquicontinuous F ↔ ∀ ε > 0, ∃ δ > 0, ∀ (x y : β), dist x y < δ → ∀ (i : ι), dist (F i x) (F i y) < ε


theorem pi_apply (f : ∀ i, M →L[R] φ i) (c : M) (i : ι) : pi f c i = f i c

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
{ι : Type u_4}
{φ : ι → Type u_5}
[(i : ι) → TopologicalSpace (φ i)]
[(i : ι) → AddCommMonoid (φ i)]
[(i : ι) → Module R (φ i)]
(f : (i : ι) → M →L[R] φ i)
(c : M)
(i : ι)

(ContinuousLinearMap.pi f) c i = (f i) c


theorem hasSum_coe_one (p : PMF α) : HasSum p 1


private theorem int_floor_nonneg [LinearOrderedRing α] [FloorRing α] {a : α} (ha : 0 ≤ a) :
    0 ≤ ⌊a⌋

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a : α}
(ha : 0 ≤ a)


@[reassoc]
lemma OpenCover.pullbackCoverAffineRefinementObjIso_inv_pullbackHom
    (f : X ⟶ Y) (𝒰 : Y.OpenCover) (i) :
    (𝒰.pullbackCoverAffineRefinementObjIso f i).inv ≫
      𝒰.affineRefinement.openCover.pullbackHom f i =
      (𝒰.obj i.1).affineCover.pullbackHom (𝒰.pullbackHom f i.1) i.2

(i : (𝒰.affineRefinement.openCover.pullbackCover f).J)

(AlgebraicGeometry.Scheme.OpenCover.pullbackCoverAffineRefinementObjIso f 𝒰 i).inv ≫
    𝒰.affineRefinement.openCover.pullbackHom f i =
  (𝒰.obj i.fst).affineCover.pullbackHom (𝒰.pullbackHom f i.fst) i.snd


theorem left_le_or : ∀ x y : Bool, x ≤ (x || y)


theorem up_bijective : Bijective (@up α)


theorem _root_.Real.toNNReal_of_nonneg {r : ℝ} (hr : 0 ≤ r) : r.toNNReal = ⟨r, hr⟩


theorem sq_lt : x ^ 2 < y ↔ -√y < x ∧ x < √y


theorem map_ne_one_iff : f x ≠ 1 ↔ x ≠ 1

{R : Type u_4}
{S : Type u_5}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R ≃+* S)
{x : R}


lemma isConstant_comp_subtype {s : Set X} {f : X → Y} {x : s}
    (hf : (f : Germ (𝓝 (x : X)) Y).IsConstant) :
    ((f ∘ Subtype.val : s → Y) : Germ (𝓝 x) Y).IsConstant

{X : Type u_3}
{Y : Type u_4}
[TopologicalSpace X]
{s : Set X}
{f : X → Y}
{x : ↑s}
(hf : (↑f).IsConstant)


theorem add_mul_right_right_iff {x y z : R} : IsCoprime x (y + z * x) ↔ IsCoprime x y


/-- The derivative (in the analysis sense) of a polynomial `p` is given by `p.derivative`. -/
protected theorem hasDerivAt (x : 𝕜) : HasDerivAt (fun x => p.eval x) (p.derivative.eval x) x

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

HasDerivAt (fun x => Polynomial.eval x p) (Polynomial.eval x (Polynomial.derivative p)) x


lemma eq_zero_of_isNilpotent_isSemisimple (hn : IsNilpotent f) (hs : f.IsSemisimple) : f = 0

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : Module.End R M}
(hn : IsNilpotent f)
(hs : f.IsSemisimple)


theorem StarSubalgebra.toNonUnitalStarSubalgebra_toStarSubalgebra (S : StarSubalgebra R A) :
    S.toNonUnitalStarSubalgebra.toStarSubalgebra S.one_mem' = S

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[Semiring A]
[StarRing A]
[Algebra R A]
[StarModule R A]
(S : StarSubalgebra R A)

S.toNonUnitalStarSubalgebra.toStarSubalgebra ⋯ = S


theorem fg_closure_singleton (x : M) : FG (closure L ({x} : Set M))

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


@[simp]
lemma δ_map : δ n m (z.map Φ) = (δ n m z).map Φ

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

CochainComplex.HomComplex.δ n m (z.map Φ) = (CochainComplex.HomComplex.δ n m z).map Φ


/-- A structure groupoid is a set of partial homeomorphisms of a topological space stable under
composition and inverse. They appear in the definition of the smoothness class of a manifold. -/
structure StructureGroupoid (H : Type u) [TopologicalSpace H] where
  /-- Members of the structure groupoid are partial homeomorphisms. -/
  members : Set (PartialHomeomorph H H)
  /-- Structure groupoids are stable under composition. -/
  trans' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ∈ members → e ≫ₕ e' ∈ members
  /-- Structure groupoids are stable under inverse. -/
  symm' : ∀ e : PartialHomeomorph H H, e ∈ members → e.symm ∈ members
  /-- The identity morphism lies in the structure groupoid. -/
  id_mem' : PartialHomeomorph.refl H ∈ members
  /-- Let `e` be a partial homeomorphism. If for every `x ∈ e.source`, the restriction of e to some
  open set around `x` lies in the groupoid, then `e` lies in the groupoid. -/
  locality' : ∀ e : PartialHomeomorph H H,
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ e.restr s ∈ members) → e ∈ members
  /-- Membership in a structure groupoid respects the equivalence of partial homeomorphisms. -/
  mem_of_eqOnSource' : ∀ e e' : PartialHomeomorph H H, e ∈ members → e' ≈ e → e' ∈ members

{H : Type u}
[TopologicalSpace H]
(self : StructureGroupoid H)
(e e' : PartialHomeomorph H H)

e ∈ self.members → e' ∈ self.members → e ≫ₕ e' ∈ self.members


protected theorem Sorted.lt_of_le [PartialOrder α] {l : List α} (h₁ : l.Sorted (· ≤ ·))
    (h₂ : l.Nodup) : l.Sorted (· < ·)

(h₁ : List.Sorted (fun x x_1 => x ≤ x_1) l)


theorem edist_pos_of_ne (hne : u ≠ v) :
    0 < G.edist u v

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}
(hne : u ≠ v)


theorem cons_le_cons [LinearOrder α] (a : α) {l l' : List α} (h : l' ≤ l) :
    a :: l' ≤ a :: l

{α : Type u}
[LinearOrder α]
(a : α)
{l l' : List α}
(h : l' ≤ l)


@[to_additive]
theorem map_le_map_iff {f : G →* N} {H K : Subgroup G} : H.map f ≤ K.map f ↔ H ≤ K ⊔ f.ker

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
{H K : AddSubgroup G}

AddSubgroup.map f H ≤ AddSubgroup.map f K ↔ H ≤ K ⊔ f.ker


protected theorem add_sub_assoc {m k : Nat} (h : k ≤ m) (n : Nat) : n + m - k = n + (m - k)


lemma HasFPowerSeriesWithinAt.prod {e : E} {f : E → F} {g : E → G} {s : Set E}
    {p : FormalMultilinearSeries 𝕜 E F} {q : FormalMultilinearSeries 𝕜 E G}
    (hf : HasFPowerSeriesWithinAt f p s e) (hg : HasFPowerSeriesWithinAt g q s e) :
    HasFPowerSeriesWithinAt (fun x ↦ (f x, g x)) (p.prod q) s e

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
{G : Type u_5}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{e : E}
{f : E → F}
{g : E → G}
{s : Set E}
{p : FormalMultilinearSeries 𝕜 E F}
{q : FormalMultilinearSeries 𝕜 E G}
(hf : HasFPowerSeriesWithinAt f p s e)
(hg : HasFPowerSeriesWithinAt g q s e)

HasFPowerSeriesWithinAt (fun x => (f x, g x)) (p.prod q) s e


@[simp]
lemma inl_fst_assoc {K : CochainComplex C ℤ} {d e : ℤ} (γ : Cochain F K d) (he : 1 + d = e) :
    (inl φ).comp ((fst φ).1.comp γ he) (by rw [← he, neg_add_cancel_left]) = γ

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

(CochainComplex.mappingCone.inl φ).comp ((↑(CochainComplex.mappingCone.fst φ)).comp γ he) ⋯ = γ


/-- A more convenient version of `le_sup_seminorm_apply`.

The set `Finset.Iic m` is the set of all pairs `(k', n')` with `k' ≤ m.1` and `n' ≤ m.2`.
Note that the constant is far from optimal. -/
theorem one_add_le_sup_seminorm_apply {m : ℕ × ℕ} {k n : ℕ} (hk : k ≤ m.1) (hn : n ≤ m.2)
    (f : 𝓢(E, F)) (x : E) :
    (1 + ‖x‖) ^ k * ‖iteratedFDeriv ℝ n f x‖ ≤
      2 ^ m.1 * (Finset.Iic m).sup (fun m => SchwartzMap.seminorm 𝕜 m.1 m.2) f

{𝕜 : Type u_1}
{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedField 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
{m : ℕ × ℕ}
{k n : ℕ}
(hk : k ≤ m.1)
(hn : n ≤ m.2)
(f : SchwartzMap E F)
(x : E)

(1 + ‖x‖) ^ k * ‖iteratedFDeriv ℝ n (⇑f) x‖ ≤ 2 ^ m.1 * ((Finset.Iic m).sup fun m => SchwartzMap.seminorm 𝕜 m.1 m.2) f


protected theorem mul {p a b : α} (hp : Prime p) :
    multiplicity p (a * b) = multiplicity p a + multiplicity p b

{α : Type u_1}
[CancelCommMonoidWithZero α]
[DecidableRel fun x x_1 => x ∣ x_1]
{p a b : α}
(hp : Prime p)


theorem tendsto_nhds_iff_toFiniteMeasure_tendsto_nhds {δ : Type*} (F : Filter δ)
    {μs : δ → ProbabilityMeasure Ω} {μ₀ : ProbabilityMeasure Ω} :
    Tendsto μs F (𝓝 μ₀) ↔ Tendsto (toFiniteMeasure ∘ μs) F (𝓝 μ₀.toFiniteMeasure)

{μs : δ → MeasureTheory.ProbabilityMeasure Ω}

{μ₀ : MeasureTheory.ProbabilityMeasure Ω}

Filter.Tendsto μs F (𝓝 μ₀) ↔
  Filter.Tendsto (MeasureTheory.ProbabilityMeasure.toFiniteMeasure ∘ μs) F (𝓝 μ₀.toFiniteMeasure)


theorem splits_of_natDegree_le_one {f : K[X]} (hf : natDegree f ≤ 1) : Splits i f

{K : Type v}
{L : Type w}
[CommRing K]
[Field L]
(i : K →+* L)
{f : K[X]}
(hf : f.natDegree ≤ 1)


lemma neg_pi_div_two_lt_arg_iff {z : ℂ} : -(π / 2) < arg z ↔ 0 < re z ∨ 0 ≤ im z


/-- The induced map from the quotient by the kernel is injective. -/
theorem kerLift_injective : Function.Injective (kerLift f)

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


theorem NatTrans.mono_iff_mono_app {F G : C ⥤ D} (η : F ⟶ G) : Mono η ↔ ∀ c, Mono (η.app c)

[∀ (a b : C), CategoryTheory.Limits.HasCoproductsOfShape (a ⟶ b) D]

CategoryTheory.Mono η ↔ ∀ (c : C), CategoryTheory.Mono (η.app c)


/-- The converse of this is true with additional assumptions, see `epi_iff_epi_left`. -/
theorem epi_of_epi_left {A B : CostructuredArrow S T} (f : A ⟶ B) [h : Epi f.left] : Epi f

{A B : CategoryTheory.CostructuredArrow S T}


theorem dedup_map_of_injective [DecidableEq β] {f : α → β} (hf : Function.Injective f)
    (s : Multiset α) :
    (s.map f).dedup = s.dedup.map f

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
{f : α → β}
(hf : Function.Injective f)
(s : Multiset α)

(Multiset.map f s).dedup = Multiset.map f s.dedup


lemma two_le_iff : ∀ n, 2 ≤ n ↔ n ≠ 0 ∧ n ≠ 1


@[simp, norm_cast]
theorem complex_ofReal_eval_T : ∀ (x : ℝ) n, (((T ℝ n).eval x : ℝ) : ℂ) = (T ℂ n).eval (x : ℂ)

↑(Polynomial.eval x (Polynomial.Chebyshev.T ℝ n)) = Polynomial.eval (↑x) (Polynomial.Chebyshev.T ℂ n)


theorem UInt32.toNat_lt (x : UInt32) : x.toNat < 2 ^ 32


theorem closure_union (s t : Set K) : closure (s ∪ t) = closure s ⊔ closure t

{K : Type u}
[DivisionRing K]
(s t : Set K)

Subfield.closure (s ∪ t) = Subfield.closure s ⊔ Subfield.closure t


@[to_additive (attr := simp)]
theorem closure_subgroup {s : Set G} (hs : IsSubgroup s) : closure s = s

{G : Type u_1}
[Group G]
{s : Set G}
(hs : IsSubgroup s)


@[reassoc (attr := simp)]
theorem bicone_ι_π_self {F : J → C} (B : Bicone F) (j : J) : B.ι j ≫ B.π j = 𝟙 (F j)


theorem antilipschitz_of_norm_ge {K : ℝ≥0} (h : ∀ x, ‖x‖ ≤ K * ‖f x‖) : AntilipschitzWith K f

{V₁ : Type u_2}
{V₂ : Type u_3}
[SeminormedAddCommGroup V₁]
[SeminormedAddCommGroup V₂]
(f : NormedAddGroupHom V₁ V₂)
{K : ℝ≥0}
(h : ∀ (x : V₁), ‖x‖ ≤ ↑K * ‖f x‖)


@[field_simps]
theorem div_sub_div (a : K) {b : K} (c : K) {d : K} (hb : b ≠ 0) (hd : d ≠ 0) :
    a / b - c / d = (a * d - b * c) / (b * d)

{K : Type u_3}
[Field K]
(a : K)
{b : K}
(c : K)
{d : K}
(hb : b ≠ 0)
(hd : d ≠ 0)


@[simp]
theorem eventually_sSup {p : α → Prop} {fs : Set (Filter α)} :
    (∀ᶠ x in sSup fs, p x) ↔ ∀ f ∈ fs, ∀ᶠ x in f, p x

{α : Type u}
{p : α → Prop}
{fs : Set (Filter α)}

(∀ᶠ (x : α) in sSup fs, p x) ↔ ∀ f ∈ fs, ∀ᶠ (x : α) in f, p x


lemma csSup_mem_of_not_isSuccLimit
    (hne : s.Nonempty) (hbdd : BddAbove s) (hlim : ¬ IsSuccLimit (sSup s)) :
    sSup s ∈ s

{α : Type u_2}
[ConditionallyCompleteLinearOrder α]
{s : Set α}
(hne : s.Nonempty)
(hbdd : BddAbove s)
(hlim : ¬Order.IsSuccLimit (sSup s))


@[fun_prop]
theorem HasStrictFDerivAt.mul (hc : HasStrictFDerivAt c c' x) (hd : HasStrictFDerivAt d d' x) :
    HasStrictFDerivAt (fun y => c y * d y) (c x • d' + d x • c') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{𝔸' : Type u_7}
[NormedCommRing 𝔸']
[NormedAlgebra 𝕜 𝔸']
{c d : E → 𝔸'}
{c' d' : E →L[𝕜] 𝔸'}
(hc : HasStrictFDerivAt c c' x)
(hd : HasStrictFDerivAt d d' x)


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


theorem wcovBy_succ (a : α) : a ⩿ succ a

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


@[simp]
theorem bindOnSupport_bindOnSupport (p : PMF α) (f : ∀ a ∈ p.support, PMF β)
    (g : ∀ b ∈ (p.bindOnSupport f).support, PMF γ) :
    (p.bindOnSupport f).bindOnSupport g =
      p.bindOnSupport fun a ha =>
        (f a ha).bindOnSupport fun b hb =>
          g b ((mem_support_bindOnSupport_iff f b).mpr ⟨a, ha, hb⟩)

(g : (b : β) → b ∈ (p.bindOnSupport f).support → PMF γ)

(p.bindOnSupport f).bindOnSupport g = p.bindOnSupport fun a ha => (f a ha).bindOnSupport fun b hb => g b ⋯


/-- If `C` is filtered, and we have a functor `R : C ⥤ D` with a left adjoint, then `D` is filtered.
-/
theorem of_right_adjoint {L : D ⥤ C} {R : C ⥤ D} (h : L ⊣ R) : IsFiltered D

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


theorem fst_image_sigma (s : Set ι) (ht : ∀ i, (t i).Nonempty) : Sigma.fst '' s.sigma t = s

{ι : Type u_1}
{α : ι → Type u_3}
{t : (i : ι) → Set (α i)}
(s : Set ι)
(ht : ∀ (i : ι), (t i).Nonempty)


/-- A finite group of prime order is simple. -/
@[to_additive "A finite group of prime order is simple."]
theorem isSimpleGroup_of_prime_card {α : Type u} [Group α] [Fintype α] {p : ℕ} [hp : Fact p.Prime]
    (h : Fintype.card α = p) : IsSimpleGroup α

{α : Type u}
[Group α]
[Fintype α]
{p : ℕ}
[hp : Fact (Nat.Prime p)]
(h : Fintype.card α = p)


theorem lintegral_norm_eq_lintegral_edist (f : α → β) :
    ∫⁻ a, ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ a, edist (f a) 0 ∂μ

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

∫⁻ (a : α), ENNReal.ofReal ‖f a‖ ∂μ = ∫⁻ (a : α), edist (f a) 0 ∂μ


/-- The function between the basic open set `D(f)` in `Proj` to the corresponding basic open set in
`Spec A⁰_f`. This is bundled into a continuous map in `TopComponent.forward`.
-/
@[simps (config := .lemmasOnly)]
def toFun (x : Proj.T| pbo f) : Spec.T A⁰_ f

(x : ↑↑((AlgebraicGeometry.Proj.toLocallyRingedSpace 𝒜).restrict ⋯).toPresheafedSpace)

(AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.toFun f x).asIdeal =
  AlgebraicGeometry.ProjIsoSpecTopComponent.ToSpec.carrier x


/-- Note: the converse is not true without assuming that `s` is measurable. For a counterexample,
  see Walter Rudin *Real and Complex Analysis*, example (c) in section 8.9. -/
theorem measure_ae_null_of_prod_null {s : Set (α × β)} (h : μ.prod ν s = 0) :
    (fun x => ν (Prod.mk x ⁻¹' s)) =ᵐ[μ] 0

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{s : Set (α × β)}
(h : (μ.prod ν) s = 0)


/-- Introduction rule to prove that `b` is the supremum of `s`: it suffices to check that `b`
is larger than all elements of `s`, and that this is not the case of any `w < b`.
See `csSup_eq_of_forall_le_of_forall_lt_exists_gt` for a version in conditionally complete
lattices. -/
theorem sSup_eq_of_forall_le_of_forall_lt_exists_gt (h₁ : ∀ a ∈ s, a ≤ b)
    (h₂ : ∀ w, w < b → ∃ a ∈ s, w < a) : sSup s = b

{α : Type u_1}
[CompleteLattice α]
{s : Set α}
{b : α}
(h₁ : ∀ a ∈ s, a ≤ b)
(h₂ : ∀ w < b, ∃ a ∈ s, w < a)


theorem IsHermitian.ext {A : Matrix n n α} : (∀ i j, star (A j i) = A i j) → A.IsHermitian

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

(∀ (i j : n), star (A j i) = A i j) → A.IsHermitian


/-- If the sign of the oriented angle at `p` between two points is zero, either one of the points
equals `p` or the unoriented angle is 0 or π. -/
theorem eq_zero_or_angle_eq_zero_or_pi_of_sign_oangle_eq_zero {p p₁ p₂ : P}
    (h : (∡ p₁ p p₂).sign = 0) : p₁ = p ∨ p₂ = p ∨ ∠ p₁ p p₂ = 0 ∨ ∠ p₁ p p₂ = π

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


@[to_additive]
theorem closure_mul_le (S T : Set M) : closure (S * T) ≤ closure S ⊔ closure T

Submonoid.closure (S * T) ≤ Submonoid.closure S ⊔ Submonoid.closure T


theorem coe_apply_coe_coe_symm_apply {F : Type*} [EquivLike F A₁ A₂] [AlgEquivClass F R A₁ A₂]
    (f : F) (x : A₂) :
    f ((f : A₁ ≃ₐ[R] A₂).symm x) = x

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
{F : Type u_1}
[EquivLike F A₁ A₂]
[AlgEquivClass F R A₁ A₂]
(f : F)
(x : A₂)


theorem trace_eq_zero_of_not_exists_basis (h : ¬∃ s : Finset S, Nonempty (Basis s R S)) :
    trace R S = 0

(h : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S))


@[simp]
theorem mem_mk' {s : Set R} {sm : Subsemigroup R} (hm : ↑sm = s) {sa : AddSubgroup R} (ha : ↑sa = s)
    {x : R} : x ∈ NonUnitalSubring.mk' s sm sa hm ha ↔ x ∈ s

{R : Type u}
[NonUnitalNonAssocRing R]
{s : Set R}
{sm : Subsemigroup R}
(hm : ↑sm = s)
{sa : AddSubgroup R}
(ha : ↑sa = s)
{x : R}


theorem ncard_diff_add_ncard_of_subset (h : s ⊆ t) (ht : t.Finite := by toFinite_tac) :
    (t \ s).ncard + s.ncard = t.ncard

{α : Type u_1}
{s t : Set α}
(h : s ⊆ t)
(ht : t.Finite := by toFinite_tac)


@[simp]
theorem symm_mk (e : α ≃ β) (h1 : Measurable e) (h2 : Measurable e.symm) :
    (⟨e, h1, h2⟩ : α ≃ᵐ β).symm = ⟨e.symm, h2, h1⟩

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]
(e : α ≃ β)
(h1 : Measurable ⇑e)
(h2 : Measurable ⇑e.symm)

{ toEquiv := e, measurable_toFun := h1, measurable_invFun := h2 }.symm =
  { toEquiv := e.symm, measurable_toFun := h2, measurable_invFun := h1 }


protected theorem StronglyMeasurableAtFilter.filter_mono (h : StronglyMeasurableAtFilter f l μ)
    (h' : l' ≤ l) : StronglyMeasurableAtFilter f l' μ

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[TopologicalSpace β]
{l l' : Filter α}
{f : α → β}
{μ : MeasureTheory.Measure α}
(h : StronglyMeasurableAtFilter f l μ)
(h' : l' ≤ l)


lemma whiskerLeft_toKaroubi_N₂Γ₂_hom :
    whiskerLeft (toKaroubi (ChainComplex C ℕ)) N₂Γ₂.hom = N₂Γ₂ToKaroubiIso.hom ≫ N₁Γ₀.hom

CategoryTheory.whiskerLeft (CategoryTheory.Idempotents.toKaroubi (ChainComplex C ℕ))
    AlgebraicTopology.DoldKan.N₂Γ₂.hom =
  AlgebraicTopology.DoldKan.N₂Γ₂ToKaroubiIso.hom ≫ AlgebraicTopology.DoldKan.N₁Γ₀.hom


/-- A partial homeomorphism inverse is continuous at any point of its target -/
theorem continuousAt_symm {x : Y} (h : x ∈ e.target) : ContinuousAt e.symm x

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : Y}
(h : x ∈ e.target)


@[to_additive]
theorem IsOpen.div_closure (hs : IsOpen s) (t : Set G) : s / closure t = s / t

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{s : Set G}
(hs : IsOpen s)
(t : Set G)


theorem Ring.inverse_star [Semiring R] [StarRing R] (a : R) :
    Ring.inverse (star a) = star (Ring.inverse a)

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


theorem nontrivial_mono {α : Type*} {s t : Set α} (hst : s ⊆ t) (hs : Nontrivial s) :
    Nontrivial t

{α : Type u_1}
{s t : Set α}
(hst : s ⊆ t)
(hs : Nontrivial ↑s)


theorem tan_pi_div_two_sub (x : ℝ) : tan (π / 2 - x) = (tan x)⁻¹

Real.tan (Real.pi / 2 - x) = (Real.tan x)⁻¹


protected theorem apply (x : E) :
    f x = (someContDiffBumpBase E).toFun (f.rOut / f.rIn) (f.rIn⁻¹ • (x - c))

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[HasContDiffBump E]
{c : E}
(f : ContDiffBump c)
(x : E)

↑f x = (someContDiffBumpBase E).toFun (f.rOut / f.rIn) (f.rIn⁻¹ • (x - c))


theorem ae_eq_zero_of_forall_dual_of_isSeparable [NormedAddCommGroup E] [NormedSpace 𝕜 E]
    {t : Set E} (ht : TopologicalSpace.IsSeparable t) {f : α → E}
    (hf : ∀ c : Dual 𝕜 E, (fun x => ⟪f x, c⟫) =ᵐ[μ] 0) (h't : ∀ᵐ x ∂μ, f x ∈ t) : f =ᵐ[μ] 0

(hf : ∀ (c : NormedSpace.Dual 𝕜 E), (fun x => c (f x)) =ᵐ[μ] 0)


theorem order_le_of_coeff_ne_zero {Γ} [LinearOrderedCancelAddCommMonoid Γ] {x : HahnSeries Γ R}
    {g : Γ} (h : x.coeff g ≠ 0) : x.order ≤ g

{R : Type u_2}
[Zero R]
{Γ : Type u_3}
[LinearOrderedCancelAddCommMonoid Γ]
{x : HahnSeries Γ R}
{g : Γ}
(h : x.coeff g ≠ 0)


/-- The layer cake formula / Cavalieri's principle / tail probability formula:

Let `f` be a non-negative measurable function on a measure space. Let `G` be an
increasing absolutely continuous function on the positive real line, vanishing at the origin,
with derivative `G' = g`. Then the integral of the composition `G ∘ f` can be written as
the integral over the positive real line of the "tail measures" `μ {ω | f(ω) > t}` of `f`
weighted by `g`.

Roughly speaking, the statement is: `∫⁻ (G ∘ f) ∂μ = ∫⁻ t in 0..∞, g(t) * μ {ω | f(ω) > t}`.

See `lintegral_comp_eq_lintegral_meas_le_mul` for a version with sets of the form `{ω | f(ω) ≥ t}`
instead. -/
theorem lintegral_comp_eq_lintegral_meas_lt_mul (μ : Measure α) (f_nn : 0 ≤ᵐ[μ] f)
    (f_mble : AEMeasurable f μ) (g_intble : ∀ t > 0, IntervalIntegrable g volume 0 t)
    (g_nn : ∀ᵐ t ∂volume.restrict (Ioi 0), 0 ≤ g t) :
    ∫⁻ ω, ENNReal.ofReal (∫ t in (0)..f ω, g t) ∂μ =
      ∫⁻ t in Ioi 0, μ {a : α | t < f a} * ENNReal.ofReal (g t)

(g_intble : ∀ t > 0, IntervalIntegrable g MeasureTheory.volume 0 t)

(g_nn : ∀ᵐ (t : ℝ) ∂MeasureTheory.volume.restrict (Set.Ioi 0), 0 ≤ g t)

∫⁻ (ω : α), ENNReal.ofReal (∫ (t : ℝ) in 0 ..f ω, g t) ∂μ =
  ∫⁻ (t : ℝ) in Set.Ioi 0, μ {a | t < f a} * ENNReal.ofReal (g t)


theorem trStmts₁_trans {q q'} : q' ∈ trStmts₁ q → trStmts₁ q' ⊆ trStmts₁ q

q' ∈ Turing.PartrecToTM2.trStmts₁ q → Turing.PartrecToTM2.trStmts₁ q' ⊆ Turing.PartrecToTM2.trStmts₁ q


@[to_additive (attr := simp)]
theorem div_le_self_iff (a : α) {b : α} : a / b ≤ a ↔ 1 ≤ b

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


/-- The product over `Fin 2` of some rings is just the cartesian product of these rings. -/
@[simps]
def RingEquiv.piFinTwo (R : Fin 2 → Type*) [∀ i, Semiring (R i)] :
    (∀ i : Fin 2, R i) ≃+* R 0 × R 1

(R : Fin 2 → Type u_1)
[(i : Fin 2) → Semiring (R i)]

∀ (a : R 0 × R 1) (i : Fin 2), (RingEquiv.piFinTwo R).symm a i = (piFinTwoEquiv R).invFun a i


theorem lift_injective : Injective (PFun.lift : (α → β) → α →. β)


/-- If `f` has a formal power series at `x` bounded by `0`, then `f` is equal to `0` in a
neighborhood of `x`. -/
theorem HasFiniteFPowerSeriesAt.eventually_zero_of_bound_zero
    (hf : HasFiniteFPowerSeriesAt f pf x 0) : f =ᶠ[𝓝 x] 0

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


theorem map_comp_π_app (h : ∀ i, J i → K i) : map C h ∘ π_app C K = π_app C J

{ι : Type u}
{X : ι → Type}
[(i : ι) → TopologicalSpace (X i)]
(C : Set ((i : ι) → X i))
{J K : ι → Prop}
(h : ∀ (i : ι), J i → K i)

⇑(Profinite.IndexFunctor.map C h) ∘ ⇑(Profinite.IndexFunctor.π_app C K) = ⇑(Profinite.IndexFunctor.π_app C J)


theorem gcd_cons_div_left : (gcd (x::xs) : Int) ∣ x


theorem isReal_iff {φ : K →+* ℂ} : IsReal φ ↔ conjugate φ = φ

NumberField.ComplexEmbedding.IsReal φ ↔ NumberField.ComplexEmbedding.conjugate φ = φ


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


/-- The restriction of a locally ringed space along an open embedding.
-/
@[simps!]
def restrict {U : TopCat} (X : LocallyRingedSpace.{u}) {f : U ⟶ X.toTopCat} (h : OpenEmbedding f) :
    LocallyRingedSpace


@[simp]
theorem span_insert_zero : span R (insert (0 : M) s) = span R s

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

Submodule.span R (insert 0 s) = Submodule.span R s


theorem card_support_le_one [Nonempty α] {f : α →₀ M} :
    card f.support ≤ 1 ↔ ∃ a, f = single a (f a)

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

f.support.card ≤ 1 ↔ ∃ a, f = Finsupp.single a (f a)


/-- An `AddMonoid` is an `AddSemigroup` with an element `0` such that `0 + a = a + 0 = a`. -/
class AddMonoid (M : Type u) extends AddSemigroup M, AddZeroClass M where
  /-- Multiplication by a natural number.
  Set this to `nsmulRec` unless `Module` diamonds are possible. -/
  protected nsmul : ℕ → M → M
  /-- Multiplication by `(0 : ℕ)` gives `0`. -/
  protected nsmul_zero : ∀ x, nsmul 0 x = 0 := by intros; rfl
  /-- Multiplication by `(n + 1 : ℕ)` behaves as expected. -/
  protected nsmul_succ : ∀ (n : ℕ) (x), nsmul (n + 1) x = nsmul n x + x := by intros; rfl

{M : Type u}
[self : AddMonoid M]
(n : ℕ)
(x : M)

AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x


lemma pow_toEnd_f_eq_zero_of_eq_nat
    [IsNoetherian R M] [NoZeroSMulDivisors R M] [IsDomain R] [CharZero R]
    {n : ℕ} (hn : μ = n) : (ψ (n + 1)) = 0

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
{h e f : L}
{m : M}
{μ : R}
{t : IsSl2Triple h e f}
(P : t.HasPrimitiveVectorWith m μ)
[IsNoetherian R M]
[NoZeroSMulDivisors R M]
[IsDomain R]
[CharZero R]
{n : ℕ}
(hn : μ = ↑n)

((LieModule.toEnd R L M) f ^ (n + 1)) m = 0


theorem single_mem_grade {R} [CommSemiring R] (i : M) (r : R) : Finsupp.single i r ∈ grade R i

{M : Type u_1}
{R : Type u_4}
[CommSemiring R]
(i : M)
(r : R)

Finsupp.single i r ∈ AddMonoidAlgebra.grade R i


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

{α : Type u_3}
{β : Type u_4}
[Inf α]
[Inf β]
(f : InfHom α β)


theorem ne_top_iff_finite {a b : α} : multiplicity a b ≠ ⊤ ↔ Finite a b

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
{a b : α}

multiplicity a b ≠ ⊤ ↔ multiplicity.Finite a b


theorem definable_iff_empty_definable_with_params :
    A.Definable L s ↔ (∅ : Set M).Definable (L[[A]]) s

{M : Type w}
{A : Set M}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{s : Set (α → M)}

A.Definable L s ↔ ∅.Definable (L.withConstants ↑A) s


/-- The sheaf condition in terms of an equalizer diagram is equivalent
to the reformulation in terms of a limit diagram over `U i` and `U i ⊓ U j`.
-/
theorem isSheaf_iff_isSheafPairwiseIntersections : F.IsSheaf ↔ F.IsSheafPairwiseIntersections

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


lemma _root_.Set.Finite.eventuallyLE_iInter {ι : Type*} {s : Set ι} (hs : s.Finite)
    {f g : ι → Set α} (hle : ∀ i ∈ s, f i ≤ᶠ[l] g i) : (⋂ i ∈ s, f i) ≤ᶠ[l] (⋂ i ∈ s, g i)

{α : Type u}
{l : Filter α}
{ι : Type u_2}
{s : Set ι}
(hs : s.Finite)
{f g : ι → Set α}
(hle : ∀ i ∈ s, f i ≤ᶠ[l] g i)


protected theorem add_le_add_iff_left : a ≠ ∞ → (a + b ≤ a + c ↔ b ≤ c)


lemma uncurry_two_eq_uncurry (p : Fin 2 → Type u) (τ : Type u)
    (f : Function.FromTypes p τ) :
    uncurry f = Function.uncurry f ∘ piFinTwoEquiv p

f.uncurry = Function.uncurry f ∘ ⇑(piFinTwoEquiv p)


theorem setIndependent_pair {a b : α} (hab : a ≠ b) :
    SetIndependent ({a, b} : Set α) ↔ Disjoint a b

{α : Type u_1}
[CompleteLattice α]
{a b : α}
(hab : a ≠ b)

CompleteLattice.SetIndependent {a, b} ↔ Disjoint a b


theorem degreeOf_C_mul_le (p : MvPolynomial σ R) (i : σ) (c : R) :
    (C c * p).degreeOf i ≤ p.degreeOf i

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(p : MvPolynomial σ R)
(i : σ)
(c : R)

MvPolynomial.degreeOf i (MvPolynomial.C c * p) ≤ MvPolynomial.degreeOf i p


@[to_additive]
lemma mem_powers_iff_mem_zpowers : y ∈ powers x ↔ y ∈ zpowers x

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

y ∈ Submonoid.powers x ↔ y ∈ Subgroup.zpowers x


@[simp]
theorem toNat_sub_of_le {a b : ℤ} (h : b ≤ a) : (toNat (a - b) : ℤ) = a - b


/-- The `tendsto` relation can be checked on ultrafilters. -/
theorem tendsto_iff_ultrafilter (f : α → β) (l₁ : Filter α) (l₂ : Filter β) :
    Tendsto f l₁ l₂ ↔ ∀ g : Ultrafilter α, ↑g ≤ l₁ → Tendsto f g l₂

{α : Type u}
{β : Type v}
(f : α → β)
(l₁ : Filter α)
(l₂ : Filter β)

Filter.Tendsto f l₁ l₂ ↔ ∀ (g : Ultrafilter α), ↑g ≤ l₁ → Filter.Tendsto f (↑g) l₂


lemma memPartitionSet_succ (f : ℕ → Set α) (n : ℕ) (a : α) [Decidable (a ∈ f n)] :
    memPartitionSet f (n + 1) a
      = if a ∈ f n then memPartitionSet f n a ∩ f n else memPartitionSet f n a \ f n

{α : Type u_1}
(f : ℕ → Set α)
(n : ℕ)
(a : α)
[Decidable (a ∈ f n)]


lemma coeff_minpolyDiv_sub_pow_mem_span {i} (hi : i ≤ natDegree (minpolyDiv R x)) :
    coeff (minpolyDiv R x) (natDegree (minpolyDiv R x) - i) - x ^ i ∈
      Submodule.span R ((x ^ ·) '' Set.Iio i)

{R : Type u_2}
{S : Type u_1}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
(hx : IsIntegral R x)
{i : ℕ}
(hi : i ≤ (minpolyDiv R x).natDegree)

(minpolyDiv R x).coeff ((minpolyDiv R x).natDegree - i) - x ^ i ∈ Submodule.span R ((fun x_1 => x ^ x_1) '' Set.Iio i)


@[simp]
theorem mem_replace {a a' : α} {b : β a} {s : Finmap β} : a' ∈ replace a b s ↔ a' ∈ s

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a a' : α}
{b : β a}
{s : Finmap β}


@[simp]
theorem head_nil : head (nil : WSeq α) = Computation.pure none

Stream'.WSeq.nil.head = Computation.pure none


@[simp, norm_cast]
theorem coe_sup (s t : UpperSet α) : (↑(s ⊔ t) : Set α) = (s : Set α) ∩ t

{α : Type u_1}
[LE α]
(s t : UpperSet α)


@[simp] lemma mk_mul_mk (x y : K) (hx hy) : (⟨x, hx⟩ : 𝓞 K) * ⟨y, hy⟩ = ⟨x * y, mul_mem hx hy⟩

{K : Type u_1}
[Field K]
(x y : K)
(hx : x ∈ integralClosure ℤ K)
(hy : y ∈ integralClosure ℤ K)


theorem adjoin_union_coe_submodule :
    Subalgebra.toSubmodule (adjoin R (s ∪ t)) =
      Subalgebra.toSubmodule (adjoin R s) * Subalgebra.toSubmodule (adjoin R t)

(R : Type uR)
{A : Type uA}
[CommSemiring R]
[CommSemiring A]
[Algebra R A]
(s t : Set A)

Subalgebra.toSubmodule (Algebra.adjoin R (s ∪ t)) =
  Subalgebra.toSubmodule (Algebra.adjoin R s) * Subalgebra.toSubmodule (Algebra.adjoin R t)


@[simp, norm_cast]
theorem coe_smul [Semiring R'] [SMul R' R] [Module R' A] [IsScalarTower R' R A] (r : R') (x : S) :
    ↑(r • x) = r • (x : A)

{R' : Type u'}
{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
{S : NonUnitalSubalgebra R A}
[Semiring R']
[SMul R' R]
[Module R' A]
[IsScalarTower R' R A]
(r : R')
(x : ↥S)


lemma StrictMonoOn.mapsTo_Ioo (h : StrictMonoOn f (Icc a b)) :
    MapsTo f (Ioo a b) (Ioo (f a) (f b))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a b : α}
(h : StrictMonoOn f (Set.Icc a b))

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


theorem perfectSpace_iff_forall_not_isolated : PerfectSpace X ↔ ∀ x : X, Filter.NeBot (𝓝[≠] x)

PerfectSpace X ↔ ∀ (x : X), (𝓝[≠] x).NeBot


theorem Ideal.minimalPrimes_eq_subsingleton (hI : I.IsPrimary) : I.minimalPrimes = {I.radical}

{R : Type u_1}
[CommRing R]
{I : Ideal R}
(hI : I.IsPrimary)


theorem surjOn_image (h : Semiconj f fa fb) (ha : SurjOn fa s t) : SurjOn fb (f '' s) (f '' t)

{α : Type u_1}
{β : Type u_2}
{fa : α → α}
{fb : β → β}
{f : α → β}
{s t : Set α}
(h : Function.Semiconj f fa fb)
(ha : Set.SurjOn fa s t)


@[to_additive (attr := simp) posPart_pos] lemma one_lt_oneLePart (ha : 1 < a) : 1 < a⁺ᵐ

{α : Type u_1}
[Lattice α]
[AddGroup α]
{a : α}
(ha : 0 < a)


@[to_additive]
theorem IsCyclic.iff_exponent_eq_card [CommGroup α] [Fintype α] :
    IsCyclic α ↔ exponent α = Fintype.card α

IsCyclic α ↔ Monoid.exponent α = Fintype.card α


theorem norm_def {z : ℤ_[p]} : ‖z‖ = ‖(z : ℚ_[p])‖

{p : ℕ}
[Fact (Nat.Prime p)]
{z : ℤ_[p]}


theorem add_omega {a : Ordinal} (h : a < omega) : a + omega = omega

{a : Ordinal.{u_1}}
(h : a < Ordinal.omega)


@[to_additive]
theorem Submonoid.le_topologicalClosure (s : Submonoid M) : s ≤ s.topologicalClosure

{M : Type u_3}
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
(s : Submonoid M)


theorem interedges_disjoint_left {s s' : Finset α} (hs : Disjoint s s') (t : Finset β) :
    Disjoint (interedges r s t) (interedges r s' t)

{α : Type u_4}
{β : Type u_5}
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]
{s s' : Finset α}
(hs : Disjoint s s')
(t : Finset β)

Disjoint (Rel.interedges r s t) (Rel.interedges r s' t)


/-- `zsmul` is equal to any other module structure via a cast. -/
@[deprecated Int.cast_smul_eq_nsmul (since := "2024-07-23")]
theorem zsmul_eq_smul_cast (n : ℤ) (b : M) : n • b = (n : R) • b

(R : Type u_2)
{M : Type u_5}
[Ring R]
[AddCommGroup M]
[Module R M]
(n : ℤ)
(b : M)


@[simp]
theorem seq_eq_set_seq (s : Set (α → β)) (t : Set α) : s <*> t = s.seq t

{α β : Type u}
(s : Set (α → β))
(t : Set α)


lemma isIso_pOpcycles : IsIso (K.pOpcycles j)


/-- The identity continuous homomorphism. -/
@[to_additive (attr := simps!) "The identity continuous homomorphism."]
def id : ContinuousMonoidHom A A

(A : Type u_2)
[Monoid A]
[TopologicalSpace A]
(x : A)


@[simp]
theorem image_nth_Iio_card (hf : (setOf p).Finite) : nth p '' Set.Iio hf.toFinset.card = setOf p

Nat.nth p '' Set.Iio hf.toFinset.card = setOf p


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

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

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


/-- For nonzero integers `a` and `b`, `gcd a b` is the smallest positive natural number that can be
written in the form `a * x + b * y` for some pair of integers `x` and `y` -/
theorem gcd_least_linear {a b : ℤ} (ha : a ≠ 0) :
    IsLeast { n : ℕ | 0 < n ∧ ∃ x y : ℤ, ↑n = a * x + b * y } (a.gcd b)

IsLeast {n | 0 < n ∧ ∃ x y, ↑n = a * x + b * y} (a.gcd b)


@[reassoc (attr := simp)]
theorem invApp_app (U : Opens X) :
    H.invApp U ≫ f.1.c.app (op (opensFunctor f |>.obj U)) =
      X.presheaf.map (eqToHom (by simp [Opens.map, Set.preimage_image_eq _ H.base_open.inj]))

{X Y : AlgebraicGeometry.LocallyRingedSpace}

[H : AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion f]

(U : TopologicalSpace.Opens ↑X.toTopCat)

AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.invApp f U ≫
    f.val.c.app (Opposite.op ((AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.opensFunctor f).obj U)) =
  X.presheaf.map (CategoryTheory.eqToHom ⋯)


/-- The identity morphism on a monoid object. -/
@[simps]
def id (M : Mon_ C) : Hom M M

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


theorem transDiffeomorph_range : range (I.transDiffeomorph e) = e '' range I

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(e : E ≃ₘ⟮𝓘(𝕜, E), 𝓘(𝕜, E')⟯ E')

Set.range ↑(I.transDiffeomorph e) = ⇑e '' Set.range ↑I


lemma isClosed_iff_forall_filter :
    IsClosed s ↔ ∀ x, ∀ F : Filter X, F.NeBot → F ≤ 𝓟 s → F ≤ 𝓝 x → x ∈ s

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

IsClosed s ↔ ∀ (x : X) (F : Filter X), F.NeBot → F ≤ 𝓟 s → F ≤ 𝓝 x → x ∈ s


theorem hnot_sdiff_comm (a b : α) : ￢a \ b = ￢b \ a

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


theorem ProgMeasurable.stoppedProcess [MetrizableSpace ι] (h : ProgMeasurable f u)
    (hτ : IsStoppingTime f τ) : ProgMeasurable f (stoppedProcess u τ)

{Ω : Type u_1}
{β : Type u_2}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
[MeasurableSpace ι]
[TopologicalSpace ι]
[OrderTopology ι]
[SecondCountableTopology ι]
[BorelSpace ι]
[TopologicalSpace β]
{u : ι → Ω → β}
{τ : Ω → ι}
{f : MeasureTheory.Filtration ι m}
[TopologicalSpace.MetrizableSpace ι]
(h : MeasureTheory.ProgMeasurable f u)
(hτ : MeasureTheory.IsStoppingTime f τ)

MeasureTheory.ProgMeasurable f (MeasureTheory.stoppedProcess u τ)


@[simp]
theorem liftAlternating_comp_ιMulti {n : ℕ} (f : ∀ i, M [⋀^Fin i]→ₗ[R] N) :
    (liftAlternating (R := R) (M := M) (N := N) f).compAlternatingMap (ιMulti R n) = f n

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommRing R]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
{n : ℕ}
(f : (i : ℕ) → M [⋀^Fin i]→ₗ[R] N)

(ExteriorAlgebra.liftAlternating f).compAlternatingMap (ExteriorAlgebra.ιMulti R n) = f n


/-- Engel's theorem. -/
theorem LieAlgebra.isNilpotent_iff_forall [IsNoetherian R L] :
    LieAlgebra.IsNilpotent R L ↔ ∀ x, _root_.IsNilpotent <| LieAlgebra.ad R L x

{R : Type u₁}
{L : Type u₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[IsNoetherian R L]

LieAlgebra.IsNilpotent R L ↔ ∀ (x : L), IsNilpotent ((LieAlgebra.ad R L) x)


@[rclike_simps] -- Porting note (#10618): was a `simp` but `simp` can prove it
theorem conj_neg_I : conj (-I) = (I : K)


theorem ofAdd_image_zmultiples_eq_zpowers_ofAdd {x : A} :
    Multiplicative.ofAdd '' (AddSubgroup.zmultiples x : Set A) =
      Subgroup.zpowers (Multiplicative.ofAdd x)

⇑Multiplicative.ofAdd '' ↑(AddSubgroup.zmultiples x) = ↑(Subgroup.zpowers (Multiplicative.ofAdd x))


/-- Given a neighborhood `U` of `1` there is an open neighborhood `V` of `1`
such that `V * V ⊆ U`. -/
@[to_additive "Given an open neighborhood `U` of `0` there is an open neighborhood `V` of `0`
  such that `V + V ⊆ U`."]
theorem exists_open_nhds_one_mul_subset {U : Set M} (hU : U ∈ 𝓝 (1 : M)) :
    ∃ V : Set M, IsOpen V ∧ (1 : M) ∈ V ∧ V * V ⊆ U

{M : Type u_3}
[TopologicalSpace M]
[AddZeroClass M]
[ContinuousAdd M]
{U : Set M}
(hU : U ∈ 𝓝 0)


theorem restrict_image_emb {f : α → β} (hf : MeasurePreserving f μa μb) (h₂ : MeasurableEmbedding f)
    (s : Set α) : MeasurePreserving f (μa.restrict s) (μb.restrict (f '' s))

(hf : MeasureTheory.MeasurePreserving f μa μb)

MeasureTheory.MeasurePreserving f (μa.restrict s) (μb.restrict (f '' s))


lemma singleton_diffs_singleton : ({a} \\ {b} : Finset α) = {a \ b}

{α : Type u_2}
[DecidableEq α]
[GeneralizedBooleanAlgebra α]
{a b : α}


/-- Auxiliary definition for the `BraidedCategory` instance on `Center C`. -/
@[simps!]
def braiding (X Y : Center C) : X ⊗ Y ≅ Y ⊗ X

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

(X.braiding Y).hom.f = (X.snd.β Y.fst).hom


/-- For `a : F`, `quadraticChar F a = -1 ↔ ¬ IsSquare a`. -/
theorem quadraticChar_neg_one_iff_not_isSquare {a : F} : quadraticChar F a = -1 ↔ ¬IsSquare a

{F : Type u_1}
[Field F]
[Fintype F]
[DecidableEq F]
{a : F}


@[to_additive]
theorem mem_map_equiv {f : M ≃* N} {K : Submonoid M} {x : N} :
    x ∈ K.map f.toMonoidHom ↔ f.symm x ∈ K

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{f : M ≃+ N}
{K : AddSubmonoid M}
{x : N}

x ∈ AddSubmonoid.map f.toAddMonoidHom K ↔ f.symm x ∈ K


theorem IsCoprime.of_add_mul_right_right (h : IsCoprime x (y + z * x)) : IsCoprime x y

{R : Type u}
[CommSemiring R]
{x y z : R}
(h : IsCoprime x (y + z * x))


@[simp] theorem iff_and_self : (p ↔ q ∧ p) ↔ (p → q)


/-- Generalized loop from a loop by uncurrying $I → (I^{N\setminus\{j\}} → X)$ into $I^N → X$. -/
@[simps]
def fromLoop (i : N) (p : Ω (Ω^ { j // j ≠ i } X x) const) : Ω^ N X x

(p : Ω (↑(Ω^ { j // j ≠ i } X x)) GenLoop.const)

↑(GenLoop.fromLoop i p) =
  ({ toFun := Subtype.val, continuous_toFun := ⋯ }.comp p.toContinuousMap).uncurry.comp (Cube.splitAt i).toContinuousMap


theorem cyclotomic.dvd_X_pow_sub_one (n : ℕ) (R : Type*) [Ring R] :
    cyclotomic n R ∣ X ^ n - 1

Polynomial.cyclotomic n R ∣ Polynomial.X ^ n - 1


theorem coeff_monomial_ne {m n : σ →₀ ℕ} (h : m ≠ n) (a : R) : coeff R m (monomial R n a) = 0

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
{m n : σ →₀ ℕ}
(h : m ≠ n)
(a : R)

(MvPowerSeries.coeff R m) ((MvPowerSeries.monomial R n) a) = 0


@[aesop safe 100 apply (rule_sets := [Measurable])]
lemma measurable_set_mem (a : α) : Measurable fun s : Set α ↦ a ∈ s


/-- If `f : ℂ → E` is continuous on the closed annulus `r ≤ ‖z - c‖ ≤ R`, `0 < r ≤ R`,
and is complex differentiable at all but countably many points of its interior,
then the integrals of `f z / (z - c)` (formally, `(z - c)⁻¹ • f z`)
over the circles `‖z - c‖ = r` and `‖z - c‖ = R` are equal to each other. -/
theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable {c : ℂ}
    {r R : ℝ} (h0 : 0 < r) (hle : r ≤ R) {f : ℂ → E} {s : Set ℂ} (hs : s.Countable)
    (hc : ContinuousOn f (closedBall c R \ ball c r))
    (hd : ∀ z ∈ (ball c R \ closedBall c r) \ s, DifferentiableAt ℂ f z) :
    (∮ z in C(c, R), (z - c)⁻¹ • f z) = ∮ z in C(c, r), (z - c)⁻¹ • f z

(hc : ContinuousOn f (Metric.closedBall c R \ Metric.ball c r))

(hd : ∀ z ∈ (Metric.ball c R \ Metric.closedBall c r) \ s, DifferentiableAt ℂ f z)

(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z


theorem iSup_split_single (f : β → α) (i₀ : β) : ⨆ i, f i = f i₀ ⊔ ⨆ (i) (_ : i ≠ i₀), f i

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
(f : β → α)
(i₀ : β)

⨆ i, f i = f i₀ ⊔ ⨆ i, ⨆ (_ : i ≠ i₀), f i


/-- A multiplicative equivalence of groups preserves division. -/
@[to_additive "An additive equivalence of additive groups preserves subtractions."]
protected theorem map_div [Group G] [DivisionMonoid H] (h : G ≃* H) (x y : G) :
    h (x / y) = h x / h y

{G : Type u_10}
{H : Type u_11}
[Group G]
[DivisionMonoid H]
(h : G ≃* H)
(x y : G)


@[to_additive (attr := simp)]
theorem preimage_smul_sphere (c : G) (x : X) (r : ℝ) :
    (c • ·) ⁻¹' sphere x r = sphere (c⁻¹ • x) r

{G : Type v}
{X : Type w}
[PseudoMetricSpace X]
[Group G]
[MulAction G X]
[IsometricSMul G X]
(c : G)
(x : X)
(r : ℝ)

(fun x => c • x) ⁻¹' Metric.sphere x r = Metric.sphere (c⁻¹ • x) r


theorem homothety_inv_two {k : Type*} {V P : Type*} [Field k] [CharZero k] [AddCommGroup V]
    [Module k V] [AddTorsor V P] (a b : P) : homothety a (2⁻¹ : k) b = midpoint k a b

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Field k]
[CharZero k]
[AddCommGroup V]
[Module k V]
[AddTorsor V P]
(a b : P)

(AffineMap.homothety a 2⁻¹) b = midpoint k a b


lemma StrictAntiOn.image_Ioo_subset (h : StrictAntiOn f (Icc a b)) :
    f '' Ioo a b ⊆ Ioo (f b) (f a)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a b : α}
(h : StrictAntiOn f (Set.Icc a b))


lemma isLeftKanExtension_iff_of_iso {F' F'' : D ⥤ H} (e : F' ≅ F'')
    {L : C ⥤ D} {F : C ⥤ H} (α : F ⟶ L ⋙ F') (α' : F ⟶ L ⋙ F'')
    (comm : α ≫ whiskerLeft L e.hom = α') :
    F'.IsLeftKanExtension α ↔ F''.IsLeftKanExtension α'

(comm : CategoryTheory.CategoryStruct.comp α (CategoryTheory.whiskerLeft L e.hom) = α')


theorem mem_iff {a : α} {b : Option α} : a ∈ b ↔ b = a


theorem lintegral_smul (f : α →ₛ ℝ≥0∞) (c : ℝ≥0∞) : f.lintegral (c • μ) = c • f.lintegral μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : MeasureTheory.SimpleFunc α ℝ≥0∞)
(c : ℝ≥0∞)


theorem sub {M : Type*} [AddCommGroup M] [TopologicalSpace M] [TopologicalAddGroup M]
    {v₁ v₂ : VectorMeasure α M} {w : VectorMeasure α N} (hv₁ : v₁ ≪ᵥ w) (hv₂ : v₂ ≪ᵥ w) :
    v₁ - v₂ ≪ᵥ w

{v₁ v₂ : MeasureTheory.VectorMeasure α M}

v₁ - v₂ ≪ᵥ w


protected theorem sub_self_monotoneOn {f : α → ℝ} {s : Set α} (hf : LocallyBoundedVariationOn f s)
    {a : α} (as : a ∈ s) : MonotoneOn (variationOnFromTo f s a - f) s

{α : Type u_1}
[LinearOrder α]
{f : α → ℝ}
{s : Set α}
(hf : LocallyBoundedVariationOn f s)
{a : α}
(as : a ∈ s)


theorem cosh_half_dist (z w : ℍ) :
    cosh (dist z w / 2) = dist (z : ℂ) (conj (w : ℂ)) / (2 * √(z.im * w.im))

Real.cosh (dist z w / 2) = dist (↑z) ((starRingEnd ℂ) ↑w) / (2 * √(z.im * w.im))


/-- Variation of `TensorProduct.exists_finite_submodule_right_of_finite` where `M` and `N` are
already submodules. -/
theorem exists_finite_submodule_right_of_finite' (s : Set (M₁ ⊗[R] N₁)) (hs : s.Finite) :
    ∃ (N' : Submodule R N) (hN : N' ≤ N₁), Module.Finite R N' ∧
      s ⊆ LinearMap.range ((inclusion hN).lTensor M₁)

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
{M₁ : Submodule R M}
{N₁ : Submodule R N}
(s : Set (↥M₁ ⊗[R] ↥N₁))
(hs : s.Finite)

∃ N', ∃ (hN : N' ≤ N₁), Module.Finite R ↥N' ∧ s ⊆ ↑(LinearMap.range (LinearMap.lTensor (↥M₁) (Submodule.inclusion hN)))


@[simp]
theorem det_smul_of_tower {α} [Monoid α] [DistribMulAction α R] [IsScalarTower α R R]
    [SMulCommClass α R R] (c : α) (A : Matrix n n R) :
    det (c • A) = c ^ Fintype.card n • det A

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
{α : Type u_3}
[Monoid α]
[DistribMulAction α R]
[IsScalarTower α R R]
[SMulCommClass α R R]
(c : α)
(A : Matrix n n R)

(c • A).det = c ^ Fintype.card n • A.det


lemma natCast_mul_natCast_cpow (m n : ℕ) (s : ℂ) : (m * n : ℂ) ^ s = m ^ s * n ^ s


@[to_additive]
theorem prehaar_nonneg (K₀ : PositiveCompacts G) {U : Set G} (K : Compacts G) :
    0 ≤ prehaar (K₀ : Set G) U K

(K₀ : TopologicalSpace.PositiveCompacts G)

0 ≤ MeasureTheory.Measure.haar.prehaar (↑K₀) U K


/-- An equivalence of categories `e` between `C` and `D` induces an equivalence between
    `MonoOver X` and `MonoOver (e.functor.obj X)` whenever `X` is an object of `C`. -/
@[simps]
def congr (e : C ≌ D) : MonoOver X ≌ MonoOver (e.functor.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
(X : C)
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)

(CategoryTheory.MonoOver.congr X e).counitIso =
  CategoryTheory.NatIso.ofComponents (fun Y => CategoryTheory.MonoOver.isoMk (e.counitIso.app Y.obj.left) ⋯) ⋯


@[to_additive]
theorem mem_iSup_of_mem {S : ι → Subsemigroup M} (i : ι) : ∀ {x : M}, x ∈ S i → x ∈ iSup S

{ι : Sort u_1}
{M : Type u_2}
[Add M]
{S : ι → AddSubsemigroup M}
(i : ι)
{x : M}


@[simp]
theorem filter_filter (q) [DecidablePred q] (s : Multiset α) :
    filter p (filter q s) = filter (fun a => p a ∧ q a) s

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
(q : α → Prop)
[DecidablePred q]
(s : Multiset α)

Multiset.filter p (Multiset.filter q s) = Multiset.filter (fun a => p a ∧ q a) s


@[simp]
theorem ofNat_le_cast : (no_index (OfNat.ofNat m : α)) ≤ n ↔ (OfNat.ofNat m : ℕ) ≤ n

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


/-- If `α` is a linear succ order, `β` is a preorder, and `f : α → β` is an antitone function, then
the intervals `Set.Ico (f (Order.succ n)) (f n)` are pairwise disjoint. -/
theorem pairwise_disjoint_on_Ico_succ [SuccOrder α] [Preorder β] {f : α → β} (hf : Antitone f) :
    Pairwise (Disjoint on fun n => Ico (f (succ n)) (f n))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[SuccOrder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)

Pairwise (Disjoint on fun n => Set.Ico (f (Order.succ n)) (f n))


theorem unbounded_gt_inter_not_gt [SemilatticeInf α] (a : α) :
    Unbounded (· > ·) (s ∩ { b | ¬a < b }) ↔ Unbounded (· > ·) s

{α : Type u_1}
{s : Set α}
[SemilatticeInf α]
(a : α)

Set.Unbounded (fun x x_1 => x > x_1) (s ∩ {b | ¬a < b}) ↔ Set.Unbounded (fun x x_1 => x > x_1) s


lemma measurable_rnDeriv_right (κ η : Kernel α γ) (a : α) :
    Measurable (fun x : γ ↦ rnDeriv κ η a x)

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]


theorem forall₄_congr {p q : ∀ a b c, δ a b c → Prop} (h : ∀ a b c d, p a b c d ↔ q a b c d) :
    (∀ a b c d, p a b c d) ↔ ∀ a b c d, q a b c d

{δ : (a : α) → (b : β a) → γ a b → Sort u_4}

{p q : (a : α) → (b : β a) → (c : γ a b) → δ a b c → Prop}

(h : ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c), p a b c d ↔ q a b c d)

(∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c), p a b c d) ↔ ∀ (a : α) (b : β a) (c : γ a b) (d : δ a b c), q a b c d


/-- Upper sets are order-isomorphic to lower sets under complementation. -/
@[simps]
def upperSetIsoLowerSet : UpperSet α ≃o LowerSet α

(RelIso.symm upperSetIsoLowerSet) s = s.compl


theorem HasFDerivWithinAt.mono_of_mem (h : HasFDerivWithinAt f f' t x) (hst : t ∈ 𝓝[s] x) :
    HasFDerivWithinAt f f' s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s t : Set E}
(h : HasFDerivWithinAt f f' t x)
(hst : t ∈ 𝓝[s] x)


@[simp]
theorem content_mul {p q : R[X]} : (p * q).content = p.content * q.content

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{p q : Polynomial R}


theorem sInf_def (s : Set (Filtration ι m)) (i : ι) :
    sInf s i = if Set.Nonempty s then sInf ((fun f : Filtration ι m => f i) '' s) else m

(s : Set (MeasureTheory.Filtration ι m))

↑(sInf s) i = if s.Nonempty then sInf ((fun f => ↑f i) '' s) else m


theorem dim_le_natDegree_of_root (pb : PowerBasis A S) {p : A[X]} (ne_zero : p ≠ 0)
    (root : aeval pb.gen p = 0) : pb.dim ≤ p.natDegree

(root : (Polynomial.aeval pb.gen) p = 0)


/-- An alternative way to prove that `μ` is left invariant under multiplication. -/
@[to_additive " An alternative way to prove that `μ` is left invariant under addition. "]
theorem forall_measure_preimage_mul_iff (μ : Measure G) :
    (∀ (g : G) (A : Set G), MeasurableSet A → μ ((fun h => g * h) ⁻¹' A) = μ A) ↔
      IsMulLeftInvariant μ

{G : Type u_2}
[MeasurableSpace G]
[Add G]
[MeasurableAdd G]
(μ : MeasureTheory.Measure G)

(∀ (g : G) (A : Set G), MeasurableSet A → μ ((fun h => g + h) ⁻¹' A) = μ A) ↔ μ.IsAddLeftInvariant


theorem subset_append_of_subset_right (l₁ : List α) : l ⊆ l₂ → l ⊆ l₁ ++ l₂

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


@[simp]
theorem inv_submatrix_equiv (A : Matrix m m α) (e₁ e₂ : n ≃ m) :
    (A.submatrix e₁ e₂)⁻¹ = A⁻¹.submatrix e₂ e₁

{m : Type u}
{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
[Fintype m]
[DecidableEq m]
(A : Matrix m m α)
(e₁ e₂ : n ≃ m)

(A.submatrix ⇑e₁ ⇑e₂)⁻¹ = A⁻¹.submatrix ⇑e₂ ⇑e₁


theorem disjSups_subset (hs : s₁ ⊆ s₂) (ht : t₁ ⊆ t₂) : s₁ ○ t₁ ⊆ s₂ ○ t₂

{α : Type u_2}
[DecidableEq α]
[SemilatticeSup α]
[OrderBot α]
[DecidableRel Disjoint]
{s₁ s₂ t₁ t₂ : Finset α}
(hs : s₁ ⊆ s₂)
(ht : t₁ ⊆ t₂)


theorem IsAtomic.isQF {φ : L.BoundedFormula α n} : IsAtomic φ → IsQF φ

{L : FirstOrder.Language}
{α : Type u'}
{n : ℕ}
{φ : L.BoundedFormula α n}


theorem IsTerminal.from_eq_liftConeMorphism {F : J ⥤ C} {c : Cone F} (hc : IsTerminal c)
    (s : Cone F) :
    IsTerminal.from hc s = ((Cone.isLimitEquivIsTerminal _).symm hc).liftConeMorphism s

(hc : CategoryTheory.Limits.IsTerminal c)

hc.from s = (c.isLimitEquivIsTerminal.symm hc).liftConeMorphism s


/-- The type of nonempty models of a first-order theory. -/
structure ModelType where
  Carrier : Type w
  [struc : L.Structure Carrier]
  [is_model : T.Model Carrier]
  [nonempty' : Nonempty Carrier]

{L : FirstOrder.Language}
{T : L.Theory}
(self : T.ModelType)


@[simp]
theorem image_sub_const_Iio : (fun x => x - a) '' Iio b = Iio (b - a)

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

(fun x => x - a) '' Set.Iio b = Set.Iio (b - a)


@[simp]
theorem integral_smul_nnreal_measure (f : α → G) (c : ℝ≥0) :
    ∫ x, f x ∂(c • μ) = c • ∫ x, f x ∂μ

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : α → G)
(c : ℝ≥0)

∫ (x : α), f x ∂c • μ = c • ∫ (x : α), f x ∂μ


@[simp] lemma ground_flat (M : Matroid α) : M.Flat M.E


@[simp]
theorem coeff_p_zero [CharP R p] : (p : 𝕎 R).coeff 0 = 0

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


@[to_additive]
theorem map_equiv_eq_comap_symm' (f : G ≃* N) (K : Subgroup G) :
    K.map f.toMonoidHom = K.comap f.symm.toMonoidHom

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G ≃+ N)
(K : AddSubgroup G)

AddSubgroup.map f.toAddMonoidHom K = AddSubgroup.comap f.symm.toAddMonoidHom K


theorem prod_subset_iff {P : Set (α × β)} : s ×ˢ t ⊆ P ↔ ∀ x ∈ s, ∀ y ∈ t, (x, y) ∈ P

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t : Set β}
{P : Set (α × β)}


theorem Function.Injective.map_swap [DecidableEq α] [DecidableEq β] {f : α → β}
    (hf : Function.Injective f) (x y z : α) :
    f (Equiv.swap x y z) = Equiv.swap (f x) (f y) (f z)

{α : Sort u_1}
{β : Sort u_2}
[DecidableEq α]
[DecidableEq β]
{f : α → β}
(hf : Function.Injective f)
(x y z : α)

f ((Equiv.swap x y) z) = (Equiv.swap (f x) (f y)) (f z)


theorem ContMDiffOn.smul {f : M → 𝕜} {g : M → V} (hf : ContMDiffOn I 𝓘(𝕜) n f s)
    (hg : ContMDiffOn I 𝓘(𝕜, V) n g s) : ContMDiffOn I 𝓘(𝕜, V) n (fun p => f p • g p) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{s : Set M}
{n : ℕ∞}
{V : Type u_18}
[NormedAddCommGroup V]
[NormedSpace 𝕜 V]
{f : M → 𝕜}
{g : M → V}
(hf : ContMDiffOn I 𝓘(𝕜, 𝕜) n f s)
(hg : ContMDiffOn I 𝓘(𝕜, V) n g s)


protected theorem stronglyMeasurable (f : α →ₘ[μ] β) : StronglyMeasurable f

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
(f : α →ₘ[μ] β)


@[simp]
theorem unsym_comp_sym : (unsym : αˢʸᵐ → α) ∘ sym = id


/--
An `R`-module `Q` is injective if and only if every injective `R`-linear map descends to a linear
map to `Q`, i.e. in the following diagram, if `f` is injective then there is an `R`-linear map
`h : Y ⟶ Q` such that `g = h ∘ f`
  ```
  X --- f ---> Y
  |
  | g
  v
  Q
  ```
-/
@[mk_iff] class Module.Injective : Prop where
  out : ∀ ⦃X Y : Type v⦄ [AddCommGroup X] [AddCommGroup Y] [Module R X] [Module R Y]
    (f : X →ₗ[R] Y) (_ : Function.Injective f) (g : X →ₗ[R] Q),
    ∃ h : Y →ₗ[R] Q, ∀ x, h (f x) = g x

{R : Type u}
[Ring R]
{Q : Type v}
[AddCommGroup Q]
[Module R Q]
[self : Module.Injective R Q]
⦃X Y : Type v⦄
[AddCommGroup X]
[AddCommGroup Y]
[Module R X]
[Module R Y]
(f : X →ₗ[R] Y)

Function.Injective ⇑f → ∀ (g : X →ₗ[R] Q), ∃ h, ∀ (x : X), h (f x) = g x


@[simp]
lemma dens_inter_add_dens_sdiff (s t : Finset α) : dens (s ∩ t) + dens (s \ t) = dens s

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


@[simp]
theorem top_prod_top : (⊤ : Subsemiring R).prod (⊤ : Subsemiring S) = ⊤

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]


/-- **Fundamental theorem of calculus-2**, on semi-infinite intervals `(a, +∞)`.
When a function has a limit at infinity `m`, and its derivative is integrable, then the
integral of the derivative on `(a, +∞)` is `m - f a`. Version assuming differentiability
on `[a, +∞)`.

Note that such a function always has a limit at infinity,
see `tendsto_limUnder_of_hasDerivAt_of_integrableOn_Ioi`. -/
theorem integral_Ioi_of_hasDerivAt_of_tendsto' (hderiv : ∀ x ∈ Ici a, HasDerivAt f (f' x) x)
    (f'int : IntegrableOn f' (Ioi a)) (hf : Tendsto f atTop (𝓝 m)) :
    ∫ x in Ioi a, f' x = m - f a

(hderiv : ∀ x ∈ Set.Ici a, HasDerivAt f (f' x) x)

(f'int : MeasureTheory.IntegrableOn f' (Set.Ioi a) MeasureTheory.volume)

(hf : Filter.Tendsto f Filter.atTop (𝓝 m))


@[simp]
lemma coe_toHomeomorph (e : X ≃ᵈ Y) : ⇑e.toHomeomorph = e

{X : Type u_1}
{Y : Type u_2}
[PseudoEMetricSpace X]
[PseudoEMetricSpace Y]
(e : X ≃ᵈ Y)


protected theorem div_self (H : 0 < n) : n / n = 1


theorem nextn : ∀ {it}, ValidFor l r it →
      ∀ n, n ≤ r.length → ValidFor ((r.take n).reverse ++ l) (r.drop n) (it.nextn n)

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

String.Iterator.ValidFor l r it →
  ∀ (n : Nat), n ≤ r.length → String.Iterator.ValidFor ((List.take n r).reverse ++ l) (List.drop n r) (it.nextn n)


theorem map_smul (e : N₁ ≃ₗ[R₁] N₂) (c : R₁) (x : N₁) : e (c • x) = c • e x

{R₁ : Type u_2}
{N₁ : Type u_12}
{N₂ : Type u_13}
[Semiring R₁]
[AddCommMonoid N₁]
[AddCommMonoid N₂]
{module_N₁ : Module R₁ N₁}
{module_N₂ : Module R₁ N₂}
(e : N₁ ≃ₗ[R₁] N₂)
(c : R₁)
(x : N₁)


theorem unop_inl {X Y Z : Cᵒᵖ} {f : X ⟶ Z} {g : Y ⟶ Z} (c : PullbackCone f g) :
    c.unop.inl = c.fst.unop

(c : CategoryTheory.Limits.PullbackCone f g)


theorem QuotientAddGroup.norm_eq_infDist {S : AddSubgroup M} (x : M ⧸ S) :
    ‖x‖ = infDist 0 { m : M | (m : M ⧸ S) = x }

{M : Type u_1}
[SeminormedAddCommGroup M]
{S : AddSubgroup M}
(x : M ⧸ S)


@[simp]
lemma normEDS_one : normEDS b c d 1 = 1


theorem countable_meas_level_set_pos₀ {α β : Type*} {_ : MeasurableSpace α} {μ : Measure α}
    [SFinite μ] [MeasurableSpace β] [MeasurableSingletonClass β] {g : α → β}
    (g_mble : NullMeasurable g μ) : Set.Countable { t : β | 0 < μ { a : α | g a = t } }

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} [inst : MeasureTheory.SFinite μ] [inst : MeasurableSpace β]
  [inst_1 : MeasurableSingletonClass β] {g : α → β},
  MeasureTheory.NullMeasurable g μ → {t | 0 < μ {a | g a = t}}.Countable


theorem nonzeroMininum_map_le_nonzeroMinimum (f : α → β) (p : α → Nat) (q : β → Nat) (xs : List α)
    (h : ∀ a, a ∈ xs → (p a = 0 ↔ q (f a) = 0))
    (w : ∀ a, a ∈ xs → p a ≠ 0 → q (f a) ≤ p a) :
    ((xs.map f).map q).nonzeroMinimum ≤ (xs.map p).nonzeroMinimum

(h : ∀ (a : α), a ∈ xs → (p a = 0 ↔ q (f a) = 0))

(w : ∀ (a : α), a ∈ xs → p a ≠ 0 → q (f a) ≤ p a)

(List.map q (List.map f xs)).nonzeroMinimum ≤ (List.map p xs).nonzeroMinimum


protected theorem mul_sum [Fintype m] (s : Finset β) (f : β → Matrix m n α) (M : Matrix l m α) :
    (M * ∑ a ∈ s, f a) = ∑ a ∈ s, M * f a

{l : Type u_1}
{m : Type u_2}
{n : Type u_3}
{α : Type v}
{β : Type w}
[NonUnitalNonAssocSemiring α]
[Fintype m]
(s : Finset β)
(f : β → Matrix m n α)
(M : Matrix l m α)


{R : Type u_1}
[Semiring R]
{S : Type u_2}
[Semiring S]
(f : R →+* S)

(PowerSeries.map f) PowerSeries.X = PowerSeries.X


@[simp, norm_cast]
theorem coe_top : ((⊤ : Complementeds α) : α) = ⊤

{α : Type u_1}
[Lattice α]
[BoundedOrder α]


/-- Composing a multilinear map with a linear equiv on each argument gives the zero map
if and only if the multilinear map is the zero map. -/
@[simp]
theorem comp_linearEquiv_eq_zero_iff (g : MultilinearMap R M₁' M₂) (f : ∀ i, M₁ i ≃ₗ[R] M₁' i) :
    (g.compLinearMap fun i => (f i : M₁ i →ₗ[R] M₁' i)) = 0 ↔ g = 0

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
{M₁' : ι → Type u_1}
[(i : ι) → AddCommMonoid (M₁' i)]
[(i : ι) → Module R (M₁' i)]
(g : MultilinearMap R M₁' M₂)
(f : (i : ι) → M₁ i ≃ₗ[R] M₁' i)

(g.compLinearMap fun i => ↑(f i)) = 0 ↔ g = 0


lemma toMvPolynomial_eval_eq_apply (M : Matrix m n R) (i : m) (c : n → R) :
    eval c (M.toMvPolynomial i) = (M *ᵥ c) i

{m : Type u_1}
{n : Type u_2}
{R : Type u_4}
[Fintype n]
[CommSemiring R]
(M : Matrix m n R)
(i : m)
(c : n → R)

(MvPolynomial.eval c) (M.toMvPolynomial i) = (M *ᵥ c) i


theorem getRight_eq_getRight? (h₁ : x.isRight) (h₂ : x.getRight?.isSome) :
    x.getRight h₁ = x.getRight?.get h₂

{α : Type u}
{β : Type v}
{x : α ⊕ β}
(h₁ : x.isRight = true)
(h₂ : x.getRight?.isSome = true)


/-- `stdSimplex ℝ ι` is compact. -/
theorem isCompact_stdSimplex : IsCompact (stdSimplex ℝ ι)


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

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


theorem IsSubordinate.toSmoothPartitionOfUnity {f : SmoothBumpCovering ι I M s} {U : M → Set M}
    (h : f.IsSubordinate U) : f.toSmoothPartitionOfUnity.IsSubordinate fun i => U (f.c i)

{ι : Type uι}
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
{H : Type uH}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type uM}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{s : Set M}
[T2Space M]
{f : SmoothBumpCovering ι I M s}
{U : M → Set M}
(h : f.IsSubordinate U)


@[simp, norm_cast]
theorem coe_toMulEquiv (f : R ≃+* S) : ⇑(f : R ≃* S) = f

{R : Type u_4}
{S : Type u_5}
[Mul R]
[Mul S]
[Add R]
[Add S]
(f : R ≃+* S)


theorem sigmaCongrRightHom_injective {α : Type*} {β : α → Type*} :
    Function.Injective (sigmaCongrRightHom β)


@[simp]
theorem zero_lt_top : (0 : EReal) < ⊤


theorem CovBy.Icc_eq (h : a ⋖ b) : Icc a b = {a, b}

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


theorem isGLB_ciInf [Nonempty ι] {f : ι → α} (H : BddBelow (range f)) :
    IsGLB (range f) (⨅ i, f i)

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
[Nonempty ι]
{f : ι → α}
(H : BddBelow (Set.range f))


@[to_additive]
theorem image_mulSingle_Ioc (i : ι) (a b : α i) :
    Pi.mulSingle i '' Ioc a b = Ioc (Pi.mulSingle i a) (Pi.mulSingle i b)

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → Zero (α i)]
(i : ι)
(a b : α i)

Pi.single i '' Set.Ioc a b = Set.Ioc (Pi.single i a) (Pi.single i b)


lemma finiteCoproduct.ι_desc_apply {B : CompHausLike P} {π : (a : α) → X a ⟶ B} (a : α) :
    ∀ x, finiteCoproduct.desc X π (finiteCoproduct.ι X a x) = π a x

(x : (CategoryTheory.forget (CompHausLike P)).obj (X a))

(CompHausLike.finiteCoproduct.desc X π) ((CompHausLike.finiteCoproduct.ι X a) x) = (π a) x


@[simp]
theorem mem_iInter {x : α} {s : ι → Set α} : (x ∈ ⋂ i, s i) ↔ ∀ i, x ∈ s i

{α : Type u}
{ι : Sort v}
{x : α}
{s : ι → Set α}


/-- If `x ∈ s` and `y ∈ interior s`, then the segment `(x, y]` is included in `interior s`. -/
theorem Convex.add_smul_sub_mem_interior {s : Set E} (hs : Convex 𝕜 s) {x y : E} (hx : x ∈ s)
    (hy : y ∈ interior s) {t : 𝕜} (ht : t ∈ Ioc (0 : 𝕜) 1) : x + t • (y - x) ∈ interior s

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
{x y : E}
(hx : x ∈ s)
(hy : y ∈ interior s)
{t : 𝕜}
(ht : t ∈ Set.Ioc 0 1)


@[simp]
theorem coe_comp (f' : G' →g G'') (f : G →g G') : ⇑(f'.comp f) = f' ∘ f

{V : Type u_1}
{W : Type u_2}
{X : Type u_3}
{G : SimpleGraph V}
{G' : SimpleGraph W}
{G'' : SimpleGraph X}
(f' : G' →g G'')
(f : G →g G')


theorem dvd_or_dvd (hp : Prime p) {a b : α} (h : p ∣ a * b) : p ∣ a ∨ p ∣ b

{α : Type u_1}
[CommMonoidWithZero α]
{p : α}
(hp : Prime p)
{a b : α}
(h : p ∣ a * b)


theorem HasFDerivWithinAt.congr (h : HasFDerivWithinAt f f' s x) (hs : EqOn f₁ f s)
    (hx : f₁ x = f x) : HasFDerivWithinAt f₁ f' s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s : Set E}
(h : HasFDerivWithinAt f f' s x)
(hs : Set.EqOn f₁ f s)
(hx : f₁ x = f x)


/-- Note that the `IsScalarTower α β β` typeclass argument is usually satisfied by `Algebra α β`. -/
@[to_additive]
lemma smul_div_assoc [DivInvMonoid β] [SMul α β] [IsScalarTower α β β] (r : α) (x y : β) :
    r • x / y = r • (x / y)

{α : Type u_7}
{β : Type u_8}
[DivInvMonoid β]
[SMul α β]
[IsScalarTower α β β]
(r : α)
(x y : β)


@[simp]
theorem Quot.desc_colimitCocone (F : J ⥤ Type u) [Small.{u} (Quot F)] :
    Quot.desc (colimitCocone F) = equivShrink.{u} (Quot F)

[Small.{u, max u v} (CategoryTheory.Limits.Types.Quot F)]

CategoryTheory.Limits.Types.Quot.desc (CategoryTheory.Limits.Types.colimitCocone F) =
  ⇑(equivShrink (CategoryTheory.Limits.Types.Quot F))


lemma InfClosed.prod {t : Set β} (hs : InfClosed s) (ht : InfClosed t) : InfClosed (s ×ˢ t)

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[SemilatticeInf β]
{s : Set α}
{t : Set β}
(hs : InfClosed s)
(ht : InfClosed t)


protected theorem tsum_inner_mul_inner (b : HilbertBasis ι 𝕜 E) (x y : E) :
    ∑' i, ⟪x, b i⟫ * ⟪b i, y⟫ = ⟪x, y⟫

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

∑' (i : ι), ⟪x, (fun i => b.repr.symm (lp.single 2 i 1)) i⟫_𝕜 * ⟪(fun i => b.repr.symm (lp.single 2 i 1)) i, y⟫_𝕜 =
  ⟪x, y⟫_𝕜


@[simp]
theorem snd_subset_snd_iff : c.snd ⊆ d.snd ↔ d ≤ c

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
{c d : Concept α β r}


@[simp]
theorem lift_eq_zero {a : Cardinal.{v}} : lift.{u} a = 0 ↔ a = 0


lemma isIntegralCurve_iff_isIntegralCurveAt :
    IsIntegralCurve γ v ↔ ∀ t : ℝ, IsIntegralCurveAt γ v t

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}

IsIntegralCurve γ v ↔ ∀ (t : ℝ), IsIntegralCurveAt γ v t


theorem ManyOneEquiv.le_congr_right {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]
    {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : ManyOneEquiv q r) : p ≤₀ q ↔ p ≤₀ r

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
{p : α → Prop}
{q : β → Prop}
{r : γ → Prop}
(h : ManyOneEquiv q r)

p ≤₀ q ↔ p ≤₀ r


@[simp]
theorem toConjAct_ofConjAct (x : ConjAct G) : toConjAct (ofConjAct x) = x

{G : Type u_3}
[DivInvMonoid G]
(x : ConjAct G)

ConjAct.toConjAct (ConjAct.ofConjAct x) = x


@[simp]
theorem symm_comp (e : A₁ ≃ₐ[R] A₂) : AlgHom.comp ↑e.symm (e : A₁ →ₐ[R] A₂) = AlgHom.id R A₁

{R : Type uR}
{A₁ : Type uA₁}
{A₂ : Type uA₂}
[CommSemiring R]
[Semiring A₁]
[Semiring A₂]
[Algebra R A₁]
[Algebra R A₂]
(e : A₁ ≃ₐ[R] A₂)


@[simp]
theorem le_aleph0_iff_subtype_countable {p : α → Prop} :
    #{ x // p x } ≤ ℵ₀ ↔ { x | p x }.Countable

Cardinal.mk { x // p x } ≤ Cardinal.aleph0 ↔ {x | p x}.Countable


theorem not_bddAbove_coe : ¬ (BddAbove <| range (fun (x : ℚ) ↦ (x : ℝ)))


lemma smul_nonpos_iff : a • b ≤ 0 ↔ 0 ≤ a ∧ b ≤ 0 ∨ a ≤ 0 ∧ 0 ≤ b

{α : Type u_1}
{β : Type u_2}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[PosSMulStrictMono α β]
{a : α}
{b : β}


/-- If `a ≠ 0` then the exponential zeta function is analytic everywhere. -/
lemma differentiable_expZeta_of_ne_zero {a : UnitAddCircle} (ha : a ≠ 0) :
    Differentiable ℂ (expZeta a)

Differentiable ℂ (HurwitzZeta.expZeta a)


theorem le_count_iff_replicate_le {a : α} {s : Multiset α} {n : ℕ} :
    n ≤ count a s ↔ replicate n a ≤ s

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

n ≤ Multiset.count a s ↔ Multiset.replicate n a ≤ s


lemma quasiIsoAt_map_iff_of_preservesHomology [F.ReflectsIsomorphisms] :
    QuasiIsoAt ((F.mapHomologicalComplex c).map φ) i ↔ QuasiIsoAt φ i

[((F.mapHomologicalComplex c).obj K).HasHomology i]

[((F.mapHomologicalComplex c).obj L).HasHomology i]


theorem measurable_biSup {ι} (s : Set ι) {f : ι → δ → α} (hs : s.Countable)
    (hf : ∀ i ∈ s, Measurable (f i)) : Measurable fun b => ⨆ i ∈ s, f i b

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[MeasurableSpace δ]
[ConditionallyCompleteLinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
{ι : Type u_5}
(s : Set ι)
{f : ι → δ → α}
(hs : s.Countable)
(hf : ∀ i ∈ s, Measurable (f i))


theorem exp_log_of_neg (hx : x < 0) : exp (log x) = -x


theorem DifferentiableOn.cos (hc : DifferentiableOn ℝ f s) :
    DifferentiableOn ℝ (fun x => Real.cos (f x)) s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{s : Set E}
(hc : DifferentiableOn ℝ f s)


/-- A `Prop`-valued mixin for power-associative multiplication in the non-unital setting. -/
class PNatPowAssoc (M : Type*) [Mul M] [Pow M ℕ+] : Prop where
  /-- Multiplication is power-associative. -/
  protected ppow_add : ∀ (k n : ℕ+) (x : M), x ^ (k + n) = x ^ k * x ^ n
  /-- Exponent one is identity. -/
  protected ppow_one : ∀ (x : M), x ^ (1 : ℕ+) = x

{M : Type u_2}
[Mul M]
[Pow M ℕ+]
[self : PNatPowAssoc M]
(k n : ℕ+)
(x : M)


lemma ringHomComp_eq_one_iff {f : R' →+* R''} (hf : Function.Injective f) {χ : MulChar R R'} :
    χ.ringHomComp f = 1 ↔ χ = 1

{R : Type u_1}
[CommMonoid R]
{R' : Type u_2}
[CommRing R']
{R'' : Type u_3}
[CommRing R'']
{f : R' →+* R''}
(hf : Function.Injective ⇑f)
{χ : MulChar R R'}


theorem lieSpan_le {K} : lieSpan R L s ≤ K ↔ s ⊆ K

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{s : Set L}
{K : LieSubalgebra R L}

LieSubalgebra.lieSpan R L s ≤ K ↔ s ⊆ ↑K


theorem indicatorConstLp_coeFn_mem : ∀ᵐ x : α ∂μ, x ∈ s → indicatorConstLp p hs hμs c x = c

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s : Set α}
{hs : MeasurableSet s}
{hμs : μ s ≠ ⊤}
{c : E}

∀ᵐ (x : α) ∂μ, x ∈ s → ↑↑(MeasureTheory.indicatorConstLp p hs hμs c) x = c


private theorem aux0 {a b c : A} : ⁅L (a + b + c), L ((a + b + c) * (a + b + c))⁆ =
    ⁅L a + L b + L c, L (a * a) + L (b * b) + L (c * c) +
    2 • L (a * b) + 2 • L (c * a) + 2 • L (b * c)⁆

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


@[simp, norm_cast]
theorem cast_div (m n) : ((m / n : ℚ) : α) = m / n

{α : Type u_3}
[DivisionRing α]
[CharZero α]
(m n : ℚ)


theorem le_rightLim (h : x ≤ y) : f x ≤ rightLim f y

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderTopology β]
{f : α → β}
(hf : Monotone f)
{x y : α}
(h : x ≤ y)


@[simp] theorem abs_mul_sign (x : α) : (|x| * sign x : α) = x

{α : Type u_1}
[LinearOrderedRing α]
(x : α)


@[to_additive]
theorem alternatingProd_cons_cons [DivInvMonoid α] (a b : α) (l : List α) :
    alternatingProd (a :: b :: l) = a / b * alternatingProd l

{α : Type u_2}
[DivInvMonoid α]
(a b : α)
(l : List α)

(a :: b :: l).alternatingProd = a / b * l.alternatingProd


theorem and_xor_distrib_left : ∀ (x y z : Bool), (x && xor y z) = xor (x && y) (x && z)


/-- The type of nonempty models of a first-order theory. -/
structure ModelType where
  Carrier : Type w
  [struc : L.Structure Carrier]
  [is_model : T.Model Carrier]
  [nonempty' : Nonempty Carrier]

{L : FirstOrder.Language}
{T : L.Theory}
(self : T.ModelType)


@[simp] theorem map_inv_of_isMulOneCocycle {f : G → M} (hf : IsMulOneCocycle f) (g : G) :
    g • f g⁻¹ = (f g)⁻¹

(hf : groupCohomology.IsMulOneCocycle f)


@[simp] theorem swap_inl : swap (inl x : α ⊕ β) = inr x


@[simp]
theorem Iio_last_eq_map : Iio (Fin.last n) = Finset.univ.map Fin.castSuccEmb

Finset.Iio (Fin.last n) = Finset.map Fin.castSuccEmb Finset.univ


/-- A group is isomorphic to its group of units. -/
@[to_additive (attr := simps apply_val symm_apply)
"An additive group is isomorphic to its group of additive units"]
def toUnits [Group G] : G ≃* Gˣ


@[measurability]
protected theorem indicator {_ : MeasurableSpace α} [TopologicalSpace β] [Zero β]
    (hf : StronglyMeasurable f) {s : Set α} (hs : MeasurableSet s) :
    StronglyMeasurable (s.indicator f)

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

∀ {x : MeasurableSpace α} [inst : TopologicalSpace β] [inst_1 : Zero β],
  MeasureTheory.StronglyMeasurable f → ∀ {s : Set α}, MeasurableSet s → MeasureTheory.StronglyMeasurable (s.indicator f)


@[simp]
theorem ρ_inv_self_apply {G : Type u} [Group G] (A : Rep k G) (g : G) (x : A) :
    A.ρ g⁻¹ (A.ρ g x) = x

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