@[simp]
theorem attach_insert [DecidableEq α] {a : α} {s : Finset α} :
    attach (insert a s) =
      insert (⟨a, mem_insert_self a s⟩ : { x // x ∈ insert a s })
        ((attach s).image fun x => ⟨x.1, mem_insert_of_mem x.2⟩)

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

(insert a s).attach = insert ⟨a, ⋯⟩ (Finset.image (fun x => ⟨↑x, ⋯⟩) s.attach)


/-- Boxes formed by π-systems form a π-system. -/
theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i)) :
    IsPiSystem (pi univ '' pi univ C)

{ι : Type u_1}
{α : ι → Type u_3}
{C : (i : ι) → Set (Set (α i))}
(hC : ∀ (i : ι), IsPiSystem (C i))

IsPiSystem (Set.univ.pi '' Set.univ.pi C)


theorem le_or_eq_of_le_succ {m n : Nat} (h : m ≤ succ n) : m ≤ n ∨ m = succ n


/-- Multiplication on the right by a nonzero element of a normed division ring tends to infinity at
infinity. -/
theorem tendsto_mul_right_cobounded {a : α} (ha : a ≠ 0) :
    Tendsto (· * a) (cobounded α) (cobounded α)

{α : Type u_1}
[NormedDivisionRing α]
{a : α}
(ha : a ≠ 0)

Filter.Tendsto (fun x => x * a) (Bornology.cobounded α) (Bornology.cobounded α)


theorem dlookup_dedupKeys (a : α) (l : List (Sigma β)) : dlookup a (dedupKeys l) = dlookup a l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
(l : List (Sigma β))

List.dlookup a l.dedupKeys = List.dlookup a l


lemma le_succ_iff : m ≤ n.succ ↔ m ≤ n ∨ m = n.succ


theorem neg_modByMonic (p mod : R[X]) : (-p) %ₘ mod = - (p %ₘ mod)

{R : Type u}
[CommRing R]
(p mod : R[X])


/-- The image under a monoid hom of the submonoid generated by a set equals the submonoid generated
    by the image of the set. -/
@[to_additive
      "The image under an `AddMonoid` hom of the `AddSubmonoid` generated by a set equals
      the `AddSubmonoid` generated by the image of the set."]
theorem map_mclosure (f : F) (s : Set M) : (closure s).map f = closure (f '' s)

{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)
(s : Set M)

AddSubmonoid.map f (AddSubmonoid.closure s) = AddSubmonoid.closure (⇑f '' s)


@[to_additive (attr := simp, nolint simpNF)] -- Porting note (#10675): dsimp can not prove this
theorem mem_carrier {s : Subgroup G} {x : G} : x ∈ s.carrier ↔ x ∈ s

{G : Type u_1}
[Group G]
{s : Subgroup G}
{x : G}


theorem image_mem_nhds {x} (hx : x ∈ e.source) {s : Set X} (hs : s ∈ 𝓝 x) : e '' s ∈ 𝓝 (e x)

{X : Type u_1}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
(e : PartialHomeomorph X Y)
{x : X}
(hx : x ∈ e.source)
{s : Set X}
(hs : s ∈ 𝓝 x)


theorem testAgainstNN_eq_mass_mul (f : Ω →ᵇ ℝ≥0) :
    μ.testAgainstNN f = μ.mass * μ.normalize.toFiniteMeasure.testAgainstNN f

{Ω : Type u_1}
[Nonempty Ω]
{m0 : MeasurableSpace Ω}
(μ : MeasureTheory.FiniteMeasure Ω)
[TopologicalSpace Ω]
(f : Ω →ᵇ ℝ≥0)


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

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


theorem prime_pow_succ_dvd_mul {α : Type*} [CancelCommMonoidWithZero α] {p x y : α} (h : Prime p)
    {i : ℕ} (hxy : p ^ (i + 1) ∣ x * y) : p ^ (i + 1) ∣ x ∨ p ∣ y

{α : Type u_5}
[CancelCommMonoidWithZero α]
{p x y : α}
(h : Prime p)
{i : ℕ}
(hxy : p ^ (i + 1) ∣ x * y)


@[simp]
theorem length_cyclicPermutations_of_ne_nil (l : List α) (h : l ≠ []) :
    length (cyclicPermutations l) = length l


@[to_additive] lemma mulEnergy_pos (hs : s.Nonempty) (ht : t.Nonempty) : 0 < Eₘ[s, t]

{α : Type u_1}
[DecidableEq α]
[Mul α]
{s t : Finset α}
(hs : s.Nonempty)
(ht : t.Nonempty)


@[reassoc (attr := simp)]
theorem Fork.π_comp_hom {s t : Cofork f g} (f : s ⟶ t) : s.π ≫ f.hom = t.π

{s t : CategoryTheory.Limits.Cofork f g}

∀ (f_1 : s ⟶ t), CategoryTheory.CategoryStruct.comp s.π f_1.hom = t.π


lemma support_natCast (hn : n ≠ 0) : support (n : α → M) = univ

{α : Type u_1}
{M : Type u_2}
[AddMonoidWithOne M]
[CharZero M]
{n : ℕ}
(hn : n ≠ 0)


/-- This lemma is useful for working with the `intDegree` of a rational function. -/
theorem natDegree_sub_eq_of_prod_eq {p₁ p₂ q₁ q₂ : R[X]} (hp₁ : p₁ ≠ 0) (hq₁ : q₁ ≠ 0)
    (hp₂ : p₂ ≠ 0) (hq₂ : q₂ ≠ 0) (h_eq : p₁ * q₂ = p₂ * q₁) :
    (p₁.natDegree : ℤ) - q₁.natDegree = (p₂.natDegree : ℤ) - q₂.natDegree

{R : Type u}
[Semiring R]
[NoZeroDivisors R]
{p₁ p₂ q₁ q₂ : R[X]}
(hp₁ : p₁ ≠ 0)
(hq₁ : q₁ ≠ 0)
(hp₂ : p₂ ≠ 0)
(hq₂ : q₂ ≠ 0)
(h_eq : p₁ * q₂ = p₂ * q₁)

↑p₁.natDegree - ↑q₁.natDegree = ↑p₂.natDegree - ↑q₂.natDegree


@[to_additive]
theorem isComplement_iff_existsUnique :
    IsComplement S T ↔ ∀ g : G, ∃! x : S × T, x.1.1 * x.2.1 = g

Subgroup.IsComplement S T ↔ ∀ (g : G), ∃! x, ↑x.1 * ↑x.2 = g


@[to_additive (attr := continuity) continuous_sub_left]
lemma continuous_div_left' (a : G) : Continuous (a / ·)

{G : Type w}
[TopologicalSpace G]
[Sub G]
[ContinuousSub G]
(a : G)


@[to_additive (attr := simp)]
theorem toDual_mul [Mul α] (a b : α) : toDual (a * b) = toDual a * toDual b

OrderDual.toDual (a * b) = OrderDual.toDual a * OrderDual.toDual b


@[to_additive]
theorem mulSupport_comp_eq_preimage (g : β → M) (f : α → β) :
    mulSupport (g ∘ f) = f ⁻¹' mulSupport g

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[Zero M]
(g : β → M)
(f : α → β)

Function.support (g ∘ f) = f ⁻¹' Function.support g


@[simp]
theorem sumLexDualAntidistrib_inr :
    sumLexDualAntidistrib α β (toDual (inr b)) = inl (toDual b)

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

(OrderIso.sumLexDualAntidistrib α β) (OrderDual.toDual (Sum.inr b)) = Sum.inl (OrderDual.toDual b)


theorem mul_div_exact {m k : ℕ+} (h : k ∣ m) : k * divExact m k = m


@[to_additive]
lemma card_div_le : Nat.card (s / t) ≤ Nat.card s * Nat.card t

{α : Type u_2}
[AddGroup α]
{s t : Set α}

Nat.card ↑(s - t) ≤ Nat.card ↑s * Nat.card ↑t


/-- A functor `C ⥤ D` induces a functor between the corresponding arrow categories. -/
@[simps]
def mapArrow (F : C ⥤ D) : Arrow C ⥤ Arrow D

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor C D)
(a : CategoryTheory.Arrow C)


theorem smul_sup (a : α) (S T : AddSubmonoid A) : a • (S ⊔ T) = a • S ⊔ a • T

{α : Type u_1}
{A : Type u_5}
[AddMonoid A]
[Monoid α]
[DistribMulAction α A]
(a : α)
(S T : AddSubmonoid A)


@[to_additive sub]
theorem ContinuousWithinAt.div' (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) :
    ContinuousWithinAt (fun x => f x / g x) s x

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[Sub G]
[ContinuousSub G]
[TopologicalSpace α]
{f g : α → G}
{s : Set α}
{x : α}
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g s x)

ContinuousWithinAt (fun x => f x - g x) s x


@[simp, norm_cast]
theorem coe_sub (m n : ℕ) : ↑(m - n) = (m - n : ℕ∞)


@[simp]
theorem sign_neg (ha : a < 0) : sign a = -1

{α : Type u_1}
[Zero α]
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
{a : α}
(ha : a < 0)


theorem Lp.norm_const [NeZero μ] (hp_zero : p ≠ 0) :
    ‖Lp.const p μ c‖ = ‖c‖ * (μ Set.univ).toReal ^ (1 / p.toReal)

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
(p : ℝ≥0∞)
(μ : MeasureTheory.Measure α)
[NormedAddCommGroup E]
[MeasureTheory.IsFiniteMeasure μ]
(c : E)
[NeZero μ]
(hp_zero : p ≠ 0)

‖(MeasureTheory.Lp.const p μ) c‖ = ‖c‖ * (μ Set.univ).toReal ^ (1 / p.toReal)


theorem Monic.ne_zero_of_ne (h : (0 : R) ≠ 1) {p : R[X]} (hp : p.Monic) : p ≠ 0

{R : Type u}
[Semiring R]
(h : 0 ≠ 1)
{p : R[X]}
(hp : p.Monic)


/-- The ring isomorphism between multivariable polynomials in no variables
and the ground ring. -/
@[simps!]
def isEmptyRingEquiv [IsEmpty σ] : MvPolynomial σ R ≃+* R

(R : Type u)
(σ : Type u_1)
[CommSemiring R]
[IsEmpty σ]
(a : R)
(j : σ →₀ ℕ)

((MvPolynomial.isEmptyRingEquiv R σ).symm a) j = Pi.single 0 a j


/-- A helper function for `sumRingEquiv`. -/
@[simps]
def mvPolynomialEquivMvPolynomial [CommSemiring S₃] (f : MvPolynomial S₁ R →+* MvPolynomial S₂ S₃)
    (g : MvPolynomial S₂ S₃ →+* MvPolynomial S₁ R) (hfgC : (f.comp g).comp C = C)
    (hfgX : ∀ n, f (g (X n)) = X n) (hgfC : (g.comp f).comp C = C) (hgfX : ∀ n, g (f (X n)) = X n) :
    MvPolynomial S₁ R ≃+* MvPolynomial S₂ S₃

(hfgC : (f.comp g).comp MvPolynomial.C = MvPolynomial.C)

(hfgX : ∀ (n : S₂), f (g (MvPolynomial.X n)) = MvPolynomial.X n)

(hgfC : (g.comp f).comp MvPolynomial.C = MvPolynomial.C)

(hgfX : ∀ (n : S₁), g (f (MvPolynomial.X n)) = MvPolynomial.X n)

(MvPolynomial.mvPolynomialEquivMvPolynomial R S₁ S₂ S₃ f g hfgC hfgX hgfC hgfX).symm a = g a


/-- If a left-invariant measure gives positive mass to some compact set with nonempty interior, then
it is a Haar measure. -/
@[to_additive
"If a left-invariant measure gives positive mass to some compact set with nonempty interior, then
it is an additive Haar measure."]
theorem isHaarMeasure_of_isCompact_nonempty_interior [TopologicalGroup G] [BorelSpace G]
    (μ : Measure G) [IsMulLeftInvariant μ] (K : Set G) (hK : IsCompact K)
    (h'K : (interior K).Nonempty) (h : μ K ≠ 0) (h' : μ K ≠ ∞) : IsHaarMeasure μ

{G : Type u_2}
[MeasurableSpace G]
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
[BorelSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsMulLeftInvariant]
(K : Set G)
(hK : IsCompact K)
(h'K : (interior K).Nonempty)
(h : μ K ≠ 0)
(h' : μ K ≠ ⊤)


theorem toFun_eq_coe {f : α →Co β} : f.toFun = (f : α → β)

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


/-- The `p`-adic value of a natural is its `p`-adic value as an integer. -/
@[simp]
theorem of_nat {n : ℕ} : padicValInt p n = padicValNat p n


theorem InjOn.bijOn_image (h : InjOn f s) : BijOn f s (f '' s)

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


lemma app_eq_appLE {U : Y.Opens} :
    f.app U = f.appLE U _ le_rfl

{X Y : AlgebraicGeometry.Scheme}
(f : X.Hom Y)
{U : Y.Opens}

f.app U = f.appLE U ((TopologicalSpace.Opens.map f.val.base).obj U) ⋯


theorem distortion_filter_le (p : Box ι → Prop) : (π.filter p).distortion ≤ π.distortion

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.TaggedPrepartition I)
[Fintype ι]
(p : BoxIntegral.Box ι → Prop)


protected theorem locallyFinite : LocallyFinite fun i => support (fs 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]
{s : Set M}
(fs : SmoothBumpCovering ι I M s)

LocallyFinite fun i => Function.support ↑(fs.toFun i)


theorem mem_primeFactorsList {n p} (hn : n ≠ 0) : p ∈ primeFactorsList n ↔ Prime p ∧ p ∣ n

p ∈ n.primeFactorsList ↔ Nat.Prime p ∧ p ∣ n


theorem inv_def (e₁ : MulAut M) : e₁⁻¹ = e₁.symm


theorem IsBoundedUnder.comp {l : Filter γ} {q : β → β → Prop} {u : γ → α} {v : α → β}
    (hv : ∀ a₀ a₁, r a₀ a₁ → q (v a₀) (v a₁)) : l.IsBoundedUnder r u → l.IsBoundedUnder q (v ∘ u)

(hv : ∀ (a₀ a₁ : α), r a₀ a₁ → q (v a₀) (v a₁))

Filter.IsBoundedUnder r l u → Filter.IsBoundedUnder q l (v ∘ u)


/-- A shift sequence for a functor `F : C ⥤ A` when `C` is equipped with a shift
by a monoid `M` involves a sequence of functor `sequence n : C ⥤ A` for all `n : M`
which behave like `shiftFunctor C n ⋙ F`. -/
class ShiftSequence where
  /-- a sequence of functors -/
  sequence : M → C ⥤ A
  /-- `sequence 0` identifies to the given functor -/
  isoZero : sequence 0 ≅ F
  /-- compatibility isomorphism with the shift -/
  shiftIso (n a a' : M) (ha' : n + a = a') : shiftFunctor C n ⋙ sequence a ≅ sequence a'
  shiftIso_zero (a : M) : shiftIso 0 a a (zero_add a) =
    isoWhiskerRight (shiftFunctorZero C M) _ ≪≫ leftUnitor _
  shiftIso_add : ∀ (n m a a' a'' : M) (ha' : n + a = a') (ha'' : m + a' = a''),
    shiftIso (m + n) a a'' (by rw [add_assoc, ha', ha'']) =
      isoWhiskerRight (shiftFunctorAdd C m n) _ ≪≫ Functor.associator _ _ _ ≪≫
        isoWhiskerLeft _ (shiftIso n a a' ha') ≪≫ shiftIso m a' a'' ha''

{C : Type u_1}
{A : Type u_2}
[CategoryTheory.Category.{u_5, u_1} C]
[CategoryTheory.Category.{u_6, u_2} A]
{F : C ⥤ A}
{M : Type u_3}
[AddMonoid M]
[CategoryTheory.HasShift C M]
[self : F.ShiftSequence M]
(n m a a' a'' : M)
(ha' : n + a = a')
(ha'' : m + a' = a'')

CategoryTheory.Functor.ShiftSequence.shiftIso (m + n) a a'' ⋯ =
  CategoryTheory.isoWhiskerRight (CategoryTheory.shiftFunctorAdd C m n)
      (CategoryTheory.Functor.ShiftSequence.sequence F a) ≪≫
    (CategoryTheory.shiftFunctor C m).associator (CategoryTheory.shiftFunctor C n)
        (CategoryTheory.Functor.ShiftSequence.sequence F a) ≪≫
      CategoryTheory.isoWhiskerLeft (CategoryTheory.shiftFunctor C m)
          (CategoryTheory.Functor.ShiftSequence.shiftIso n a a' ha') ≪≫
        CategoryTheory.Functor.ShiftSequence.shiftIso m a' a'' ha''


/-- A measure is invariant under inversion if `μ⁻¹ = μ`. Equivalently, this means that for all
measurable `A` we have `μ (A⁻¹) = μ A`, where `A⁻¹` is the pointwise inverse of `A`. -/
@[to_additive existing]
class IsInvInvariant [Inv G] (μ : Measure G) : Prop where
  inv_eq_self : μ.inv = μ

{G : Type u_2}
[MeasurableSpace G]
[Inv G]
{μ : MeasureTheory.Measure G}
[self : μ.IsInvInvariant]


@[simp]
theorem differentiableWithinAt_neg_iff :
    DifferentiableWithinAt 𝕜 (fun y => -f y) s x ↔ DifferentiableWithinAt 𝕜 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}
{x : E}
{s : Set E}


@[reassoc (attr := simp)]
lemma π_homologyIsoSc'_inv :
    (K.sc' i j k).homologyπ ≫ (K.homologyIsoSc' i j k hi hk).inv =
      (K.cyclesIsoSc' i j k hi hk).inv ≫ K.homologyπ j


@[to_additive]
protected
theorem MulEquiv.map_isUnit_iff {M N} [Monoid M] [Monoid N] [EquivLike F M N] [MonoidHomClass F M N]
    (f : F) {m : M} : IsUnit (f m) ↔ IsUnit m

{F : Type u_1}
{M : Type u_12}
{N : Type u_13}
[Monoid M]
[Monoid N]
[EquivLike F M N]
[MonoidHomClass F M N]
(f : F)
{m : M}


theorem lift_type_le {α : Type u} {β : Type v} {r s} [IsWellOrder α r] [IsWellOrder β s] :
    lift.{max v w} (type r) ≤ lift.{max u w} (type s) ↔ Nonempty (r ≼i s)

{α : Type u}
{β : Type v}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]

Ordinal.lift.{max v w, u} (Ordinal.type r) ≤ Ordinal.lift.{max u w, v} (Ordinal.type s) ↔ Nonempty (r ≼i s)


theorem conj_eq_iff_real {z : ℂ} : conj z = z ↔ ∃ r : ℝ, z = r


@[to_additive]
theorem map_div_right_ae (μ : Measure G) [IsMulRightInvariant μ] (x : G) :
    Filter.map (fun t => t / x) (ae μ) = ae μ

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

Filter.map (fun t => t - x) (MeasureTheory.ae μ) = MeasureTheory.ae μ


theorem mod_mul {a b x : Nat} : x % (a * b) = x % a + a * (x / a % b)


@[simp]
theorem rat_sub_iff : LiouvilleWith p (r - x) ↔ LiouvilleWith p x

LiouvilleWith p (↑r - x) ↔ LiouvilleWith p x


theorem image_neg_uIcc : Neg.neg '' [[a, b]] = [[-a, -b]]

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


lemma homogeneousLocalizationToStalk_stalkToFiberRingHom (x z) :
    homogeneousLocalizationToStalk 𝒜 x (stalkToFiberRingHom 𝒜 x z) = z

(z : ↑((AlgebraicGeometry.ProjectiveSpectrum.Proj.structureSheaf 𝒜).presheaf.stalk x))

AlgebraicGeometry.homogeneousLocalizationToStalk 𝒜 x ((AlgebraicGeometry.stalkToFiberRingHom 𝒜 x) z) = z


theorem IsLittleO.congr_right (h : f =o[l] g₁) (hg : ∀ x, g₁ x = g₂ x) : f =o[l] g₂

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


@[simp, norm_cast]
theorem coeComplex_zero : ((0 : ℂ) : ℍ) = 0


theorem bool_eq_false {b : Bool} : ¬b → b = false


lemma insert_id_lhs {C : Type*} [Category C] {X Y : C} (f g : X ⟶ Y) (w : f ≫ 𝟙 _ = g) :
    f = g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{X Y : C}
(f g : X ⟶ Y)
(w : f ≫ 𝟙 Y = g)


@[simp]
theorem disjointedRec_zero {f : ℕ → α} {p : α → Sort*} (hdiff : ∀ ⦃t i⦄, p t → p (t \ f i))
    (h₀ : p (f 0)) : disjointedRec hdiff h₀ = h₀

(hdiff : ⦃t : α⦄ → ⦃i : ℕ⦄ → p t → p (t \ f i))


theorem Fintype.card_fin_lt_of_le {m n : ℕ} (h : m ≤ n) :
    Fintype.card {i : Fin n // i < m} = m


/-- A helper function used in defining the Čech conerve adjunction. -/
@[simps!]
def equivalenceRightToLeft (F : Arrow C) (X : CosimplicialObject.Augmented C)
    (G : F ⟶ Augmented.toArrow.obj X) : F.augmentedCechConerve ⟶ X

[∀ (n : ℕ) (f : CategoryTheory.Arrow C), CategoryTheory.Limits.HasWidePushout f.left (fun x => f.right) fun x => f.hom]

(X : CategoryTheory.CosimplicialObject.Augmented C)

(G : F ⟶ CategoryTheory.CosimplicialObject.Augmented.toArrow.obj X)

(CategoryTheory.CosimplicialObject.equivalenceRightToLeft F X G).right.app x =
  CategoryTheory.Limits.WidePushout.desc (G.left ≫ X.hom.app x)
    (fun i => G.right ≫ X.right.map ((SimplexCategory.mk 0).const x i)) ⋯


@[simp]
theorem iSup_mk {ι} (s : ι → Set α) (h : ∀ i, IsOpen (s i)) :
    (⨆ i, ⟨s i, h i⟩ : Opens α) = ⟨⋃ i, s i, isOpen_iUnion h⟩

{α : Type u_2}
[TopologicalSpace α]
{ι : Sort u_5}
(s : ι → Set α)
(h : ∀ (i : ι), IsOpen (s i))

⨆ i, { carrier := s i, is_open' := ⋯ } = { carrier := ⋃ i, s i, is_open' := ⋯ }


/-- A time-independent, continuously differentiable ODE satisfies the hypotheses of the
  Picard-Lindelöf theorem. -/
theorem exists_isPicardLindelof_const_of_contDiffAt (hv : ContDiffAt ℝ 1 v x₀) :
    ∃ ε > (0 : ℝ), ∃ L R C, IsPicardLindelof (fun _ => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{v : E → E}
(t₀ : ℝ)
{x₀ : E}
(hv : ContDiffAt ℝ 1 v x₀)

∃ ε > 0, ∃ L R C, IsPicardLindelof (fun x => v) (t₀ - ε) t₀ (t₀ + ε) x₀ L R C


@[simp]
theorem mem_compl_iff : a ∈ s.compl ↔ a ∉ s

{α : Type u_1}
[LE α]
{s : UpperSet α}
{a : α}


@[simp]
theorem coe_comp (g : EsakiaHom β γ) (f : EsakiaHom α β) : (g.comp f : α → γ) = g ∘ f

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[TopologicalSpace α]
[Preorder α]
[TopologicalSpace β]
[Preorder β]
[TopologicalSpace γ]
[Preorder γ]
(g : EsakiaHom β γ)
(f : EsakiaHom α β)


lemma rnDerivAux_nonneg (hκη : κ ≤ η) {a : α} {x : γ} : 0 ≤ rnDerivAux κ η a x

[hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ]

(hκη : κ ≤ η)


theorem circleTransformDeriv_periodic (f : ℂ → E) :
    Periodic (circleTransformDeriv R z w f) (2 * π)

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(R : ℝ)
(z w : ℂ)
(f : ℂ → E)

Function.Periodic (Complex.circleTransformDeriv R z w f) (2 * π)


theorem and_assoc : (a ∧ b) ∧ c ↔ a ∧ (b ∧ c)


theorem germ_res_apply (F : X.Presheaf C) {U V : Opens X} (i : U ⟶ V) (x : U) [ConcreteCategory C]
    (s) : germ F x (F.map i.op s) = germ F (i x) s

(s : (CategoryTheory.forget C).obj (F.obj (Opposite.op V)))

(F.germ x) ((F.map i.op) s) = (F.germ ((fun x => ⟨↑x, ⋯⟩) x)) s


theorem preimage_boolIndicator (t : Set Bool) :
    s.boolIndicator ⁻¹' t = univ ∨
      s.boolIndicator ⁻¹' t = s ∨ s.boolIndicator ⁻¹' t = sᶜ ∨ s.boolIndicator ⁻¹' t = ∅

{α : Type u_1}
(s : Set α)
(t : Set Bool)

s.boolIndicator ⁻¹' t = Set.univ ∨ s.boolIndicator ⁻¹' t = s ∨ s.boolIndicator ⁻¹' t = sᶜ ∨ s.boolIndicator ⁻¹' t = ∅


/-- Associate a `PartialEquiv` to an `Equiv`. -/
@[simps! (config := mfld_cfg)]
def _root_.Equiv.toPartialEquiv (e : α ≃ β) : PartialEquiv α β

{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)


theorem wellFounded_characterisations : List.TFAE
    [WellFounded ((· > ·) : α → α → Prop),
      IsSupFiniteCompact α, IsSupClosedCompact α, ∀ k : α, IsCompactElement k]

[WellFounded fun x x_1 => x > x_1, CompleteLattice.IsSupFiniteCompact α, CompleteLattice.IsSupClosedCompact α,
    ∀ (k : α), CompleteLattice.IsCompactElement k].TFAE


theorem inner_re_symm (x y : E) : re ⟪x, y⟫ = re ⟪y, x⟫

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


theorem ContinuousWithinAt.mono {f : α → β} {s t : Set α} {x : α} (h : ContinuousWithinAt f t x)
    (hs : s ⊆ t) : ContinuousWithinAt f s x

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


theorem contMDiffAt_fst {p : M × N} : ContMDiffAt (I.prod J) I n Prod.fst p

{𝕜 : 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]
{F : Type u_11}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_12}
[TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G}
{N : Type u_13}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{p : M × N}


@[simp]
theorem symmDiff_eq_left : a ∆ b = a ↔ b = ⊥

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


theorem isAtom_iff_isCoatom : IsAtom a ↔ IsCoatom b

{α : Type u_2}
[Lattice α]
[BoundedOrder α]
[IsModularLattice α]
{a b : α}
(hc : IsCompl a b)


/-- The cdf tends to 0 at -∞. -/
lemma tendsto_cdf_atBot : Tendsto (cdf μ) atBot (𝓝 0)

Filter.Tendsto (↑(ProbabilityTheory.cdf μ)) Filter.atBot (𝓝 0)


theorem ker_saturated {A₁ A₂ : Type*} [AddCommGroup A₁] [AddCommGroup A₂] [NoZeroSMulDivisors ℕ A₂]
    (f : A₁ →+ A₂) : f.ker.Saturated

{A₁ : Type u_1}
{A₂ : Type u_2}
[AddCommGroup A₁]
[AddCommGroup A₂]
[NoZeroSMulDivisors ℕ A₂]
(f : A₁ →+ A₂)


theorem measurableSet_quotient {s : Setoid α} {t : Set (Quotient s)} :
    MeasurableSet t ↔ MeasurableSet (Quotient.mk'' ⁻¹' t)

{α : Type u_1}
[MeasurableSpace α]
{s : Setoid α}
{t : Set (Quotient s)}


/-- Sufficient conditions for a class to be the age of a countably-generated structure. -/
theorem exists_cg_is_age_of (hn : K.Nonempty)
    (h : ∀ M N : Bundled.{w} L.Structure, Nonempty (M ≃[L] N) → (M ∈ K ↔ N ∈ K))
    (hc : (Quotient.mk' '' K).Countable)
    (fg : ∀ M : Bundled.{w} L.Structure, M ∈ K → Structure.FG L M) (hp : Hereditary K)
    (jep : JointEmbedding K) : ∃ M : Bundled.{w} L.Structure, Structure.CG L M ∧ L.age M = K

{K : Set (CategoryTheory.Bundled L.Structure)}

(h : ∀ (M N : CategoryTheory.Bundled L.Structure), Nonempty (↑M ≃[L] ↑N) → (M ∈ K ↔ N ∈ K))

(fg : ∀ M ∈ K, FirstOrder.Language.Structure.FG L ↑M)

(jep : FirstOrder.Language.JointEmbedding K)

∃ M, FirstOrder.Language.Structure.CG L ↑M ∧ L.age ↑M = K


@[ext]
theorem ext {μ : YoungDiagram} {T T' : SemistandardYoungTableau μ} (h : ∀ i j, T i j = T' i j) :
    T = T'

{μ : YoungDiagram}
{T T' : SemistandardYoungTableau μ}
(h : ∀ (i j : ℕ), T i j = T' i j)


@[simp]
theorem Tape.write_self {Γ} [Inhabited Γ] : ∀ T : Tape Γ, T.write T.1 = T

{Γ : Type u_1}
[Inhabited Γ]
(T : Turing.Tape Γ)


lemma coeff_rTensorAlgHom_monomial_tmul
    (e : σ →₀ ℕ) (s : S) (n : N) (d : σ →₀ ℕ) :
    coeff d (rTensorAlgHom (monomial e s ⊗ₜ[R] n)) =
      if e = d then s ⊗ₜ[R] n else 0

{R : Type u}
{N : Type w}
[CommSemiring R]
{σ : Type u_1}
[DecidableEq σ]
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[CommSemiring N]
[Algebra R N]
(e : σ →₀ ℕ)
(s : S)
(n : N)
(d : σ →₀ ℕ)

MvPolynomial.coeff d (MvPolynomial.rTensorAlgHom ((MvPolynomial.monomial e) s ⊗ₜ[R] n)) = if e = d then s ⊗ₜ[R] n else 0


theorem powerlt_max {a b c : Cardinal} : a ^< max b c = max (a ^< b) (a ^< c)


theorem sup_const {s : Finset β} (h : s.Nonempty) (c : α) : (s.sup fun _ => c) = c

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
[OrderBot α]
{s : Finset β}
(h : s.Nonempty)
(c : α)


@[simp]
theorem imageMonoOver_arrow (f : X ⟶ Y) [HasImage f] : (imageMonoOver f).arrow = image.ι f

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

(CategoryTheory.MonoOver.imageMonoOver f).arrow = CategoryTheory.Limits.image.ι f


@[simp]
theorem seq_eq : ∀ {m} (f : Fin m → α → β) (v : Fin m → α), seq f v = fun i => f i (v i)

{α : Type u_1}
{β : Type u_2}
{m : ℕ}
(f : Fin m → α → β)
(v : Fin m → α)


theorem lcm_dvd_lcm_mul_left_right [GCDMonoid α] (m n k : α) : lcm m n ∣ lcm m (k * n)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
(m n k : α)


theorem Tendsto.atTop_of_const_mul {c : α} (hc : 0 < c) (hf : Tendsto (fun x => c * f x) l atTop) :
    Tendsto f l atTop

(hf : Filter.Tendsto (fun x => c * f x) l Filter.atTop)


@[simp]
theorem lastFun_subtypeVal {α} (p : α ⟹ «repeat» (n + 1) Prop) :
    lastFun (subtypeVal p) = Subtype.val

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

TypeVec.lastFun (TypeVec.subtypeVal p) = Subtype.val


/-- A small set of games is bounded above. -/
lemma bddAbove_of_small (s : Set Game.{u}) [Small.{u} s] : BddAbove s

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


theorem constVAdd_nsmul (n : ℕ) (v : V₁) : constVAdd k P₁ (n • v) = constVAdd k P₁ v ^ n

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

AffineEquiv.constVAdd k P₁ (n • v) = AffineEquiv.constVAdd k P₁ v ^ n


theorem map_eq_comap {p : Submodule R M} :
    (p.map (e : M →ₛₗ[σ₁₂] M₂) : Submodule R₂ M₂) = p.comap (e.symm : M₂ →ₛₗ[σ₂₁] M)

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{re₁₂ : RingHomInvPair σ₁₂ σ₂₁}
{re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
(e : M ≃ₛₗ[σ₁₂] M₂)
{p : Submodule R M}

Submodule.map (↑e) p = Submodule.comap (↑e.symm) p


/--
The pullback cone whose cone point is the explicit pullback.
-/
@[simps! pt π]
def pullback.cone : Limits.PullbackCone f g

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

(CompHaus.pullback.cone f g).pt = CompHaus.pullback f g


@[simp]
theorem eventually_and {p q : α → Prop} {f : Filter α} :
    (∀ᶠ x in f, p x ∧ q x) ↔ (∀ᶠ x in f, p x) ∧ ∀ᶠ x in f, q x

{α : Type u}
{p q : α → Prop}
{f : Filter α}

(∀ᶠ (x : α) in f, p x ∧ q x) ↔ (∀ᶠ (x : α) in f, p x) ∧ ∀ᶠ (x : α) in f, q x


theorem lmarginal_le_of_subset {f g : (∀ i, π i) → ℝ≥0∞} (hst : s ⊆ t)
    (hf : Measurable f) (hg : Measurable g) (hfg : ∫⋯∫⁻_s, f ∂μ ≤ ∫⋯∫⁻_s, g ∂μ) :
    ∫⋯∫⁻_t, f ∂μ ≤ ∫⋯∫⁻_t, g ∂μ

{μ : (i : δ) → MeasureTheory.Measure (π i)}

[∀ (i : δ), MeasureTheory.SigmaFinite (μ i)]

∫⋯∫⁻_t, f ∂μ ≤ ∫⋯∫⁻_t, g ∂μ


protected theorem IsVonNBounded.vadd (hs : IsVonNBounded 𝕜 s) (x : E) :
    IsVonNBounded 𝕜 (x +ᵥ s)

{𝕜 : Type u_1}
{E : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[ContinuousSMul 𝕜 E]
[ContinuousAdd E]
{s : Set E}
(hs : Bornology.IsVonNBounded 𝕜 s)
(x : E)


theorem tr_read (q) : tr (Λ'.read q) = goto q

(q : Option Turing.PartrecToTM2.Γ' → Turing.PartrecToTM2.Λ')

Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.read q) = Turing.TM2.Stmt.goto q


@[reassoc]
theorem curry_natural_right (f : A ⊗ X ⟶ Y) (g : Y ⟶ Y') :
    curry (f ≫ g) = curry f ≫ (ihom _).map g

(f : CategoryTheory.MonoidalCategory.tensorObj A X ⟶ Y)

CategoryTheory.MonoidalClosed.curry (CategoryTheory.CategoryStruct.comp f g) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalClosed.curry f) ((CategoryTheory.ihom A).map g)


@[simp]
theorem mem_inf_iff : a ∈ s ⊓ t ↔ a ∈ s ∧ a ∈ t

{α : Type u_1}
[LE α]
{s t : LowerSet α}
{a : α}


theorem _root_.MeasureTheory.Integrable.comp_snd_map_prod_mk
    {Ω} {mΩ : MeasurableSpace Ω} (X : Ω → β) {μ : Measure Ω} {f : Ω → F} (hf_int : Integrable f μ) :
    Integrable (fun x : β × Ω => f x.2) (μ.map fun ω => (X ω, ω))

{β : Type u_2}
{F : Type u_4}
[NormedAddCommGroup F]
{mβ : MeasurableSpace β}
{Ω : Type u_5}
{mΩ : MeasurableSpace Ω}
(X : Ω → β)
{μ : MeasureTheory.Measure Ω}
{f : Ω → F}
(hf_int : MeasureTheory.Integrable f μ)

MeasureTheory.Integrable (fun x => f x.2) (MeasureTheory.Measure.map (fun ω => (X ω, ω)) μ)


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


@[to_additive]
theorem nontrivial_iff_exists_ne_one (S : Submonoid M) : Nontrivial S ↔ ∃ x ∈ S, x ≠ (1 : M)

{M : Type u_1}
[MulOneClass M]
(S : Submonoid M)


theorem mk_insert {α : Type u} {s : Set α} {a : α} (h : a ∉ s) :
    #(insert a s : Set α) = #s + 1

Cardinal.mk ↑(insert a s) = Cardinal.mk ↑s + 1


{α : Type u_2}
[GeneralizedCoheytingAlgebra α]
{a : α}


/-- Given a linear map `f : M →ₗ[R] A` into an `R`-algebra `A`, which satisfies the condition:
`cond : ∀ m : M, f m * f m = Q(m)`, this is the canonical lift of `f` to a morphism of `R`-algebras
from `CliffordAlgebra Q` to `A`.
-/
@[simps symm_apply]
def lift :
    { f : M →ₗ[R] A // ∀ m, f m * f m = algebraMap _ _ (Q m) } ≃ (CliffordAlgebra Q →ₐ[R] A)

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
{A : Type u_3}
[Semiring A]
[Algebra R A]
(F : CliffordAlgebra Q →ₐ[R] A)

(CliffordAlgebra.lift Q).symm F = ⟨F.toLinearMap ∘ₗ CliffordAlgebra.ι Q, ⋯⟩


@[simp]
theorem integral_dirac' [MeasurableSpace α] (f : α → E) (a : α) (hfm : StronglyMeasurable f) :
    ∫ x, f x ∂Measure.dirac a = f a

(hfm : MeasureTheory.StronglyMeasurable f)

∫ (x : α), f x ∂MeasureTheory.Measure.dirac a = f a


theorem not_mem_support_iff {f : Π₀ i, β i} {i : ι} : i ∉ f.support ↔ f i = 0

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


@[to_additive]
theorem SeminormedGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_one {f : ι → κ → G}
    {l : Filter ι} {l' : Filter κ} :
    UniformCauchySeqOnFilter f l l' ↔
      TendstoUniformlyOnFilter (fun n : ι × ι => fun z => f n.fst z / f n.snd z) 1 (l ×ˢ l) l'

{ι : Type u_4}
{κ : Type u_5}
{G : Type u_8}
[SeminormedAddGroup G]
{f : ι → κ → G}
{l : Filter ι}
{l' : Filter κ}

UniformCauchySeqOnFilter f l l' ↔ TendstoUniformlyOnFilter (fun n z => f n.1 z - f n.2 z) 0 (l ×ˢ l) l'


/-- The universal morphism from a colimit cocone to any other cocone. -/
@[simps]
def descCoconeMorphism {t : Cocone F} (h : IsColimit t) (s : Cocone F) : t ⟶ s

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
{t : CategoryTheory.Limits.Cocone F}
(h : CategoryTheory.Limits.IsColimit t)
(s : CategoryTheory.Limits.Cocone F)


@[to_additive (attr := measurability)]
theorem AEMeasurable.smul_const (hf : AEMeasurable f μ) (y : β) :
    AEMeasurable (fun x => f x • y) μ

{M : Type u_2}
{β : Type u_3}
{α : Type u_4}
[MeasurableSpace M]
[MeasurableSpace β]
[SMul M β]
{m : MeasurableSpace α}
{f : α → M}
[MeasurableSMul M β]
{μ : MeasureTheory.Measure α}
(hf : AEMeasurable f μ)
(y : β)


@[to_additive (attr := simp)]
theorem mclosure_range (f : F) : closure (Set.range f) = mrange 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)

AddSubmonoid.closure (Set.range ⇑f) = AddMonoidHom.mrange f


theorem prod_single [CommSemiring k] [CommMonoid G] {s : Finset ι} {a : ι → G} {b : ι → k} :
    (∏ i ∈ s, single (a i) (b i)) = single (∏ i ∈ s, a i) (∏ i ∈ s, b i)

{k : Type u₁}
{G : Type u₂}
{ι : Type ui}
[CommSemiring k]
[CommMonoid G]
{s : Finset ι}
{a : ι → G}
{b : ι → k}

∏ i ∈ s, MonoidAlgebra.single (a i) (b i) = MonoidAlgebra.single (∏ i ∈ s, a i) (∏ i ∈ s, b i)


protected theorem add_le_add_iff_right [CovariantClass α α (swap (· + ·)) (· ≤ ·)]
    [ContravariantClass α α (swap (· + ·)) (· ≤ ·)] (ha : a ≠ ⊥) : b + a ≤ c + a ↔ b ≤ c

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

[ContravariantClass α α (Function.swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1]


theorem divMod_to_nat_aux {n d : PosNum} {q r : Num} (h₁ : (r : ℕ) + d * ((q : ℕ) + q) = n)
    (h₂ : (r : ℕ) < 2 * d) :
    ((divModAux d q r).2 + d * (divModAux d q r).1 : ℕ) = ↑n ∧ ((divModAux d q r).2 : ℕ) < d

{n d : PosNum}
{q r : Num}
(h₁ : ↑r + ↑d * (↑q + ↑q) = ↑n)
(h₂ : ↑r < 2 * ↑d)

↑(d.divModAux q r).2 + ↑d * ↑(d.divModAux q r).1 = ↑n ∧ ↑(d.divModAux q r).2 < ↑d


@[to_additive (attr := simp)]
theorem subgroupOf_eq_top {H K : Subgroup G} : H.subgroupOf K = ⊤ ↔ K ≤ H

{G : Type u_1}
[Group G]
{H K : Subgroup G}


theorem integral_comp_comm [CompleteSpace E] (L : E →L[𝕜] F) {φ : X → E} (φ_int : Integrable φ μ) :
    ∫ x, L (φ x) ∂μ = L (∫ x, φ x ∂μ)

{X : Type u_1}
{E : Type u_3}
{F : Type u_4}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedSpace ℝ F]
[CompleteSpace F]
[NormedSpace ℝ E]
[CompleteSpace E]
(L : E →L[𝕜] F)
{φ : X → E}
(φ_int : MeasureTheory.Integrable φ μ)

∫ (x : X), L (φ x) ∂μ = L (∫ (x : X), φ x ∂μ)


@[simp]
lemma default_singleton (i : α) : ((default : ({i} : Finset α)) : α) = i


@[to_additive (attr := simp)]
theorem quot_map_mk (β : Type v) (f : List (α × Bool) → List (β × Bool))
    (H : (Red.Step ⇒ Red.Step) f f) : Quot.map f H (mk L) = mk (f L)

(H : (FreeGroup.Red.Step ⇒ FreeGroup.Red.Step) f f)

Quot.map f H (FreeGroup.mk L) = FreeGroup.mk (f L)


/--
For two types `α, β` and relation on them `r, s`, if `f : α → β` preserves relation `r`, then an
`r`-series can be pushed out to an `s`-series by
`a₀ -r→ a₁ -r→ ... -r→ aₙ ↦ f a₀ -s→ f a₁ -s→ ... -s→ f aₙ`
-/
@[simps length]
def map (p : RelSeries r) (f : r →r s) : RelSeries s

{α : Type u_1}
{r : Rel α α}
{β : Type u_2}
{s : Rel β β}
(p : RelSeries r)
(f : r →r s)


lemma commProb_cons (n : ℕ) (l : List ℕ) :
    commProb (Product (n :: l)) = commProb (DihedralGroup n) * commProb (Product l)

commProb (DihedralGroup.Product (n :: l)) = commProb (DihedralGroup n) * commProb (DihedralGroup.Product l)


protected
theorem neZero' [IsCyclotomicExtension {n} A B] [IsDomain B] : NeZero ((n : ℕ) : A)

(n : ℕ+)
(A : Type u)
(B : Type v)
[CommRing A]
[CommRing B]
[Algebra A B]
[IsCyclotomicExtension {n} A B]
[IsDomain B]


theorem left_mem_Ioo : a ∈ Ioo a b ↔ False


theorem final_iff_isIso_colimit_pre : Final F ↔ ∀ G : D ⥤ Type v, IsIso (colimit.pre G F)

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

F.Final ↔ ∀ (G : CategoryTheory.Functor D (Type v)), CategoryTheory.IsIso (CategoryTheory.Limits.colimit.pre G F)


theorem degree_pos_of_ne_zero_of_nonunit (hp0 : p ≠ 0) (hp : ¬IsUnit p) : 0 < degree p

{R : Type u}
[DivisionRing R]
{p : R[X]}
(hp0 : p ≠ 0)
(hp : ¬IsUnit p)


/-- `(F ⨯ G).obj a` is in bijection with the product of `F.obj a` and `G.obj a`. -/
@[simps]
noncomputable
def binaryProductEquiv (a : C) : (F ⨯ G).obj a ≃ (F.obj a) × (G.obj a)

(F G : CategoryTheory.Functor C (Type w))

(CategoryTheory.FunctorToTypes.binaryProductEquiv F G a) z =
  (((CategoryTheory.FunctorToTypes.binaryProductIso F G).hom.app a z).1,
    ((CategoryTheory.FunctorToTypes.binaryProductIso F G).hom.app a z).2)


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

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

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


@[simp] theorem star_imJ : (star a).imJ = -a.imJ


theorem HasBasis.disjoint_iff_right (h : l.HasBasis p s) :
    Disjoint l' l ↔ ∃ i, p i ∧ (s i)ᶜ ∈ l'

{α : Type u_1}
{ι : Sort u_4}
{l l' : Filter α}
{p : ι → Prop}
{s : ι → Set α}
(h : l.HasBasis p s)


theorem card_support_mul_le : (p * q).support.card ≤ p.support.card * q.support.card


/-- The forgetful functor from `Grothendieck F` to the source category. -/
@[simps!]
def forget : Grothendieck F ⥤ C

(F : CategoryTheory.Functor C CategoryTheory.Cat)

(CategoryTheory.Grothendieck.forget F).obj X = X.base


/-- The expression `fun g m ↦ g (f m)` as a `MonoidHom`.
Equivalently, `(fun g ↦ MonoidHom.comp g f)` as a `MonoidHom`. -/
@[to_additive (attr := simps!)
      "The expression `fun g m ↦ g (f m)` as an `AddMonoidHom`.
      Equivalently, `(fun g ↦ AddMonoidHom.comp g f)` as an `AddMonoidHom`.

      This also exists in a `LinearMap` version, `LinearMap.lcomp`."]
def compHom' [MulOneClass M] [MulOneClass N] [CommMonoid P] (f : M →* N) : (N →* P) →* M →* P

{M : Type uM}
{N : Type uN}
{P : Type uP}
[AddZeroClass M]
[AddZeroClass N]
[AddCommMonoid P]
(f : M →+ N)
(y : N →+ P)
(x : M)


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


/-- `DFinsupp.single` as an `AddMonoidHom`. -/
@[simps]
def singleAddHom (i : ι) : β i →+ Π₀ i, β i

{ι : Type u}
(β : ι → Type v)
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
(i : ι)
(b : β i)

(DFinsupp.singleAddHom β i) b = DFinsupp.single i b


@[simp, reassoc, elementwise] lemma smoothSheaf.ι_evalHom (x : TopCat.of M) (U) :
    colimit.ι ((OpenNhds.inclusion x).op ⋙ (smoothSheaf IM I M N).val) U ≫
    smoothSheaf.evalHom IM I N x =
    smoothSheaf.evalAt _ _ _ _ _

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{EM : Type u_2}
[NormedAddCommGroup EM]
[NormedSpace 𝕜 EM]
{HM : Type u_3}
[TopologicalSpace HM]
(IM : ModelWithCorners 𝕜 EM HM)
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_5}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
{M : Type u}
[TopologicalSpace M]
[ChartedSpace HM M]
(N : Type u)
[TopologicalSpace N]
[ChartedSpace H N]
(x : ↑(TopCat.of M))
(U : (TopologicalSpace.OpenNhds x)ᵒᵖ)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.colimit.ι ((TopologicalSpace.OpenNhds.inclusion x).op.comp (smoothSheaf IM I M N).val) U)
    (smoothSheaf.evalHom IM I N x) =
  smoothSheaf.evalAt IM I N x (Opposite.unop U)


theorem mem_lowerBounds_image : a ∈ upperBounds s → f a ∈ lowerBounds (f '' s)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
(hf : Antitone f)
{a : α}
{s : Set α}


/-- Two order embeddings of `Fin n` are equal provided that their ranges are equal. -/
lemma orderEmbedding_eq {f g : Fin n ↪o α} (h : range f = range g) : f = g

{n : ℕ}
{α : Type u_1}
[Preorder α]
{f g : Fin n ↪o α}
(h : Set.range ⇑f = Set.range ⇑g)


theorem Codisjoint_comm : Codisjoint a b ↔ Codisjoint b a

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


theorem _root_.Measurable.lintegral_kernel {f : β → ℝ≥0∞} (hf : Measurable f) :
    Measurable fun a => ∫⁻ b, f b ∂κ a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ : ProbabilityTheory.Kernel α β}
[ProbabilityTheory.IsSFiniteKernel κ]
{f : β → ℝ≥0∞}
(hf : Measurable f)

Measurable fun a => ∫⁻ (b : β), f b ∂κ a


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

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

∀ {X Y : CategoryTheory.Discrete PUnit.{u + 1}} (x : X ⟶ Y),
  ((Mon_.EquivLaxMonoidalFunctorPUnit.monToLaxMonoidal C).obj A).map x = 𝟙 ((fun x => A.X) X)


theorem singleton_injective : Injective (singleton : α → Finset α)


@[fun_prop]
theorem DifferentiableOn.neg (h : DifferentiableOn 𝕜 f s) : DifferentiableOn 𝕜 (fun y => -f y) s

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


theorem tendsto_of_uniformContinuous_subtype [UniformSpace α] [UniformSpace β] {f : α → β}
    {s : Set α} {a : α} (hf : UniformContinuous fun x : s => f x.val) (ha : s ∈ 𝓝 a) :
    Tendsto f (𝓝 a) (𝓝 (f a))

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[UniformSpace β]
{f : α → β}
{s : Set α}
{a : α}
(hf : UniformContinuous fun x => f ↑x)
(ha : s ∈ 𝓝 a)


@[simp]
theorem constVAdd_zero : constVAdd P (0 : G) = 1

(G : Type u_1)
(P : Type u_2)
[AddGroup G]
[AddTorsor G P]


theorem conjugatesOfSet_subset_normalClosure : conjugatesOfSet s ⊆ normalClosure s

Group.conjugatesOfSet s ⊆ ↑(Subgroup.normalClosure s)


theorem pred_lt_iff {j : Fin n} {i : Fin (n + 1)} (hi : i ≠ 0) : pred i hi < j ↔ i < succ j


theorem inl_mul_inl [Monoid R] [AddMonoid M] [DistribMulAction R M] [DistribMulAction Rᵐᵒᵖ M]
    (r₁ r₂ : R) : (inl r₁ * inl r₂ : tsze R M) = inl (r₁ * r₂)

{R : Type u}
(M : Type v)
[Monoid R]
[AddMonoid M]
[DistribMulAction R M]
[DistribMulAction Rᵐᵒᵖ M]
(r₁ r₂ : R)

TrivSqZeroExt.inl r₁ * TrivSqZeroExt.inl r₂ = TrivSqZeroExt.inl (r₁ * r₂)


/-- Inductive construction of isomorphisms in `ComposableArrows C (n + 1)`: in order to
construct an isomorphism `F ≅ G`, it suffices to provide `α : F.obj' 0 ≅ G.obj' 0` and
`β : F.δ₀ ≅ G.δ₀` such that `F.map' 0 1 ≫ app' β.hom 0 = α.hom ≫ G.map' 0 1`. -/
@[simps]
def isoMkSucc {F G : ComposableArrows C (n + 1)} (α : F.obj' 0 ≅ G.obj' 0)
    (β : F.δ₀ ≅ G.δ₀) (w : F.map' 0 1 ≫ app' β.hom 0 = α.hom ≫ G.map' 0 1) : F ≅ G

{F G : CategoryTheory.ComposableArrows C (n + 1)}

(w :
  CategoryTheory.CategoryStruct.comp (F.map' 0 1 ⋯ ⋯) (CategoryTheory.ComposableArrows.app' β.hom 0 ⋯) =
    CategoryTheory.CategoryStruct.comp α.hom (G.map' 0 1 ⋯ ⋯))

(CategoryTheory.ComposableArrows.isoMkSucc α β w).hom = CategoryTheory.ComposableArrows.homMkSucc α.hom β.hom w


/-- If `𝒜` is an algebra of sets, then it is equal to the algebra generated by itself. -/
theorem generateSetAlgebra_eq (h𝒜 : IsSetAlgebra 𝒜) : generateSetAlgebra 𝒜 = 𝒜

{α : Type u_1}
{𝒜 : Set (Set α)}
(h𝒜 : MeasureTheory.IsSetAlgebra 𝒜)


lemma mono₃ (h : T.mor₂ = 0) : Mono T.mor₃

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

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


theorem pow_mem_pow {x : R} (hx : x ∈ I) (n : ℕ) : x ^ n ∈ I ^ n

{R : Type u}
[CommSemiring R]
{I : Ideal R}
{x : R}
(hx : x ∈ I)
(n : ℕ)


@[simp]
theorem right_eq_inf : b = a ⊓ b ↔ b ≤ a

{α : Type u}
[SemilatticeInf α]
{a b : α}


/-- Bisimulation principle the values `⟨a,f⟩` of the polynomial functor representing
`Cofix F α` as well as an invariant `Q : β → Prop` and a state `β` generating the
left-hand side and right-hand side of the equality through functions `u v : β → Cofix F α` -/
theorem Cofix.bisim' {α : TypeVec n} {β : Type*} (Q : β → Prop) (u v : β → Cofix F α)
    (h : ∀ x, Q x → ∃ a f' f₀ f₁,
      Cofix.dest (u x) = q.abs ⟨a, q.P.appendContents f' f₀⟩ ∧
        Cofix.dest (v x) = q.abs ⟨a, q.P.appendContents f' f₁⟩ ∧
          ∀ i, ∃ x', Q x' ∧ f₀ i = u x' ∧ f₁ i = v x') :
    ∀ x, Q x → u x = v x

(h :
  ∀ (x : β),
    Q x →
      ∃ a f' f₀ f₁,
        (u x).dest = MvQPF.abs ⟨a, (MvQPF.P F).appendContents f' f₀⟩ ∧
          (v x).dest = MvQPF.abs ⟨a, (MvQPF.P F).appendContents f' f₁⟩ ∧
            ∀ (i : (MvQPF.P F).last.B a), ∃ x', Q x' ∧ f₀ i = u x' ∧ f₁ i = v x')


lemma mono_of_isZero_kernel' {X Y : C} {f : X ⟶ Y} (c : KernelFork f) (hc : IsLimit c)
    (h : IsZero c.pt) : Mono f

(c : CategoryTheory.Limits.KernelFork f)


@[simp] lemma coe_mk (f : SupHom α β) (hf) : ⇑(mk f hf) = f

(hf : ∀ (a b : α), f.toFun (a ⊓ b) = f.toFun a ⊓ f.toFun b)


/-- The product of two Finsets is nontrivial iff both are nonempty
  at least one of them is nontrivial. -/
lemma nontrivial_prod_iff : (s ×ˢ t).Nontrivial ↔
    s.Nonempty ∧ t.Nonempty ∧ (s.Nontrivial ∨ t.Nontrivial)

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : Finset β}


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

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


@[to_additive]
theorem inv_mem_connectedComponent_one {G : Type*} [TopologicalSpace G] [Group G]
    [TopologicalGroup G] {g : G} (hg : g ∈ connectedComponent (1 : G)) :
    g⁻¹ ∈ connectedComponent (1 : G)

{G : Type u_1}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{g : G}
(hg : g ∈ connectedComponent 0)


theorem chain_lt (s : Flag α) : IsChain (· < ·) (s : Set α)

{α : Type u_1}
[PartialOrder α]
(s : Flag α)


@[simp] lemma zero_succAbove {n : ℕ} (i : Fin n) : (0 : Fin (n + 1)).succAbove i = i.succ


theorem _root_.Filter.HasBasis.isVonNBounded_iff {q : ι → Prop} {s : ι → Set E} {A : Set E}
    (h : (𝓝 (0 : E)).HasBasis q s) : IsVonNBounded 𝕜 A ↔ ∀ i, q i → Absorbs 𝕜 (s i) A

{𝕜 : Type u_1}
{E : Type u_3}
{ι : Type u_6}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
[Zero E]
[TopologicalSpace E]
{q : ι → Prop}
{s : ι → Set E}
{A : Set E}
(h : (𝓝 0).HasBasis q s)

Bornology.IsVonNBounded 𝕜 A ↔ ∀ (i : ι), q i → Absorbs 𝕜 (s i) A


@[simp]
theorem nat_is_prime_iff : Prime (n : Cardinal) ↔ n.Prime


theorem continuousAt_zpow₀ (x : G₀) (m : ℤ) (h : x ≠ 0 ∨ 0 ≤ m) :
    ContinuousAt (fun x => x ^ m) x

{G₀ : Type u_3}
[GroupWithZero G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
[ContinuousMul G₀]
(x : G₀)
(m : ℤ)
(h : x ≠ 0 ∨ 0 ≤ m)


theorem exists_mem_and_iff {P : Set α → Prop} {Q : Set α → Prop} (hP : Antitone P)
    (hQ : Antitone Q) : ((∃ u ∈ f, P u) ∧ ∃ u ∈ f, Q u) ↔ ∃ u ∈ f, P u ∧ Q u

{α : Type u}
{f : Filter α}
{P Q : Set α → Prop}
(hP : Antitone P)
(hQ : Antitone Q)


@[simp]
theorem sameCycle_apply_right : SameCycle f x (f y) ↔ SameCycle f x y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}


@[to_additive]
theorem inv_mem_nhds_one {S : Set G} (hS : S ∈ (𝓝 1 : Filter G)) : S⁻¹ ∈ 𝓝 (1 : G)

(G : Type w)
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{S : Set G}
(hS : S ∈ 𝓝 0)


/-- Pull an subalgebra subring back to a subalgebra along `MulOpposite.op` -/
@[simps toSubsemiring]
protected def unop (S : Subalgebra R Aᵐᵒᵖ) : Subalgebra R A

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S : Subalgebra R Aᵐᵒᵖ)


protected theorem antilipschitz (e : E ≃SL[σ₁₂] F) :
    AntilipschitzWith ‖(e.symm : F →SL[σ₂₁] E)‖₊ e

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_6}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{σ₂₁ : 𝕜₂ →+* 𝕜}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[RingHomIsometric σ₂₁]
(e : E ≃SL[σ₁₂] F)


/-- A version of `CategoryTheory.whiskeringRight` for bifunctors, obtained by uncurrying,
applying `whiskeringRight` and currying back
-/
@[simps!]
def whiskeringRight₂ : (C ⥤ D ⥤ E) ⥤ (B ⥤ C) ⥤ (B ⥤ D) ⥤ B ⥤ E

(X : CategoryTheory.Functor C (CategoryTheory.Functor D E))

∀ (X_1 : CategoryTheory.Functor B C) (Y : CategoryTheory.Functor B D) (X_2 : B),
  ((((CategoryTheory.whiskeringRight₂ B C D E).obj X).obj X_1).obj Y).obj X_2 = (X.obj (X_1.obj X_2)).obj (Y.obj X_2)


@[to_additive (attr := simp)] theorem MonoidHom.comp_id_commMonCat
    {G : CommMonCat.{u}} {H : Type u} [CommMonoid H] (f : G →* H) : f.comp (𝟙 G) = f

{G : AddCommMonCat}
{H : Type u}
[AddCommMonoid H]
(f : ↑G →+ H)


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

{G : Type u_2}
[AddGroup G]
(S : AddSubgroup Gᵃᵒᵖ)


@[simp, norm_cast] lemma coe_le_one : (r : ℝ) ≤ 1 ↔ r ≤ 1

↑r ≤ 1 ↔ r ≤ 1


@[simp]
theorem add_compLinearMap (f₁ f₂ : M [⋀^ι]→ₗ[R] N) (g : M₂ →ₗ[R] M) :
    (f₁ + f₂).compLinearMap g = f₁.compLinearMap g + f₂.compLinearMap g

{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}
{M₂ : Type u_10}
[AddCommMonoid M₂]
[Module R M₂]
(f₁ f₂ : M [⋀^ι]→ₗ[R] N)
(g : M₂ →ₗ[R] M)


/-- A vector with coprime entries, left-multiplied by a matrix in `SL(2, R)`, has
coprime entries. -/
lemma mulVecSL {v : Fin 2 → R} (hab : IsCoprime (v 0) (v 1)) (A : SL(2, R)) :
    IsCoprime ((A.1 *ᵥ v) 0) ((A.1 *ᵥ v) 1)

(A : Matrix.SpecialLinearGroup (Fin 2) R)

IsCoprime ((↑A).mulVec v 0) ((↑A).mulVec v 1)


@[arith_mult]
theorem isMultiplicative_moebius : IsMultiplicative μ


lemma compProd_add_right (μ : Kernel α β) (κ η : Kernel (α × β) γ)
    [IsSFiniteKernel μ] [IsSFiniteKernel κ] [IsSFiniteKernel η] :
    μ ⊗ₖ (κ + η) = μ ⊗ₖ κ + μ ⊗ₖ η

(κ η : ProbabilityTheory.Kernel (α × β) γ)

μ.compProd (κ + η) = μ.compProd κ + μ.compProd η


/-- The object in the category of `R`-coalgebras associated to an `R`-coalgebra. -/
@[simps]
def of (X : Type v) [AddCommGroup X] [Module R X] [Coalgebra R X] :
    CoalgebraCat R

(R : Type u)
[CommRing R]
(X : Type v)
[AddCommGroup X]
[Module R X]
[Coalgebra R X]


@[elab_as_elim] -- Porting note: added
protected theorem ind {β : G.ComponentCompl K → Prop}
    (f : ∀ ⦃v⦄ (hv : v ∉ K), β (G.componentComplMk hv)) : ∀ C : G.ComponentCompl K, β C

(f : ∀ ⦃v : V⦄ (hv : v ∉ K), β (G.componentComplMk hv))


theorem modular_T_zpow_smul (z : ℍ) (n : ℤ) : ModularGroup.T ^ n • z = (n : ℝ) +ᵥ z


/-- A list with product less than one must have positive length. -/
@[to_additive "A list with negative sum must have positive length."]
theorem length_pos_of_prod_lt_one [Preorder M] (L : List M) (h : L.prod < 1) : 0 < L.length

{M : Type u_4}
[AddMonoid M]
[Preorder M]
(L : List M)
(h : L.sum < 0)


protected theorem SequentialSpace.sup {t₁ t₂ : TopologicalSpace X}
    (h₁ : @SequentialSpace X t₁) (h₂ : @SequentialSpace X t₂) :
    @SequentialSpace X (t₁ ⊔ t₂)

{X : Type u_1}
{t₁ t₂ : TopologicalSpace X}
(h₁ : SequentialSpace X)
(h₂ : SequentialSpace X)


/-- Shows that `bₙ * Bₙ ≤ Bₙ₊₁`, where `bₙ` is the `n`th partial denominator and `Bₙ₊₁` and `Bₙ` are
the `n + 1`th and `n`th denominator of the continued fraction. -/
theorem le_of_succ_get?_den {b : K}
    (nth_partDenom_eq : (of v).partDens.get? n = some b) :
    b * (of v).dens n ≤ (of v).dens (n + 1)

(nth_partDenom_eq : (GenContFract.of v).partDens.get? n = some b)

b * (GenContFract.of v).dens n ≤ (GenContFract.of v).dens (n + 1)


theorem coeFn_toAEEqFun (f : C(α, β)) : f.toAEEqFun μ =ᵐ[μ] f


/-- `Multiset.toDFinsupp` as an `AddEquiv`. -/
@[simps! apply symm_apply]
def equivDFinsupp : Multiset α ≃+ Π₀ _ : α, ℕ

{α : Type u_1}
[DecidableEq α]
(a : Π₀ (x : α), ℕ)

Multiset.equivDFinsupp.symm a = DFinsupp.toMultiset a


theorem factors_pow {x : α} (n : ℕ) :
    Multiset.Rel Associated (factors (x ^ n)) (n • factors x)

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
{x : α}
(n : ℕ)

Multiset.Rel Associated (UniqueFactorizationMonoid.factors (x ^ n)) (n • UniqueFactorizationMonoid.factors x)


/-- Reinterpreting an `F`-costructured arrow `F.obj d ⟶ X` as an arrow over `X` induces a functor
    `CostructuredArrow F X ⥤ Over X`. -/
@[simps!]
def toOver (F : D ⥤ T) (X : T) : CostructuredArrow F X ⥤ Over X

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : CategoryTheory.Functor D T)
(X : T)

∀ (X_1 : CategoryTheory.Comma (F.comp (CategoryTheory.Functor.id T)) (CategoryTheory.Functor.fromPUnit X)),
  ((CategoryTheory.CostructuredArrow.toOver F X).obj X_1).hom = X_1.hom


/-- If `E` is a vector space over two division semirings `R` and `S`, then scalar multiplications
agree on inverses of natural numbers in `R` and `S`. -/
theorem inv_natCast_smul_eq {E : Type*} (R S : Type*) [AddCommMonoid E] [DivisionSemiring R]
    [DivisionSemiring S] [Module R E] [Module S E] (n : ℕ) (x : E) :
    (n⁻¹ : R) • x = (n⁻¹ : S) • x

{E : Type u_5}
(R : Type u_6)
(S : Type u_7)
[AddCommMonoid E]
[DivisionSemiring R]
[DivisionSemiring S]
[Module R E]
[Module S E]
(n : ℕ)
(x : E)


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

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

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


@[simp, measurability]
theorem aemeasurable_zero_measure : AEMeasurable f (0 : Measure α)

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}


theorem pi_comp (f : ∀ i, M →L[R] φ i) (g : M₂ →L[R] M) :
    (pi f).comp g = pi fun i => (f i).comp g

{R : Type u_1}
[Semiring R]
{M : Type u_2}
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
{M₂ : Type u_3}
[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)
(g : M₂ →L[R] M)

(ContinuousLinearMap.pi f).comp g = ContinuousLinearMap.pi fun i => (f i).comp g


@[to_additive (attr := simp)] theorem MonoidHom.id_commGrp_comp
    {G : Type u} [CommGroup G] {H : CommGrp.{u}} (f : G →* H) : MonoidHom.comp (𝟙 H) f = f

{G : Type u}
[CommGroup G]
{H : CommGrp}
(f : G →* ↑H)


@[to_additive two_zsmul] lemma zpow_two (a : G) : a ^ (2 : ℤ) = a * a


{α : Type u_2}
[LinearOrder α]
(s : Finset α)
(H : s.Nonempty)


@[simp]
theorem mk_X_2 : (mk X₀ X₁ X₂ d₀ d₁ s succ).X 2 = X₂

(succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ ⟶ S.X₁) ×' d₂ ≫ S.f = 0)

(ChainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ).X 2 = X₂


/-- Group homomorphisms preserve integer power. -/
@[to_additive "Additive group homomorphisms preserve integer scaling."]
protected theorem map_zpow [Group α] [DivisionMonoid β] (f : α →* β) (g : α) (n : ℤ) :
    f (g ^ n) = f g ^ n

{α : Type u_2}
{β : Type u_3}
[AddGroup α]
[SubtractionMonoid β]
(f : α →+ β)
(g : α)
(n : ℤ)


theorem prod_ext_iff {f g : M × M₂ →ₗ[R] M₃} :
    f = g ↔ f.comp (inl _ _ _) = g.comp (inl _ _ _) ∧ f.comp (inr _ _ _) = g.comp (inr _ _ _)

{R : Type u}
{M : Type v}
{M₂ : Type w}
{M₃ : Type y}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
[Module R M]
[Module R M₂]
[Module R M₃]
{f g : M × M₂ →ₗ[R] M₃}

f = g ↔ f ∘ₗ LinearMap.inl R M M₂ = g ∘ₗ LinearMap.inl R M M₂ ∧ f ∘ₗ LinearMap.inr R M M₂ = g ∘ₗ LinearMap.inr R M M₂


theorem IsPrime.isPrimary {I : Ideal R} (hi : IsPrime I) : IsPrimary I

{R : Type u_1}
[CommSemiring R]
{I : Ideal R}
(hi : I.IsPrime)


@[to_additive]
theorem one_ker_inv {f : G → H} (hf : IsGroupHom f) {a b : G} (h : f (a * b⁻¹) = 1) :
    f a = f b

{G : Type u_1}
{H : Type u_2}
[Group G]
[Group H]
{f : G → H}
(hf : IsGroupHom f)
{a b : G}
(h : f (a * b⁻¹) = 1)


theorem iff_right_comm {a b c : Prop} : ((a ↔ b) ↔ c) ↔ ((a ↔ c) ↔ b)


lemma setLIntegral_rnDeriv_mul [HaveLebesgueDecomposition μ ν] (hμν : μ ≪ ν) {f : α → ℝ≥0∞}
    (hf : AEMeasurable f ν) {s : Set α} (hs : MeasurableSet s) :
    ∫⁻ x in s, μ.rnDeriv ν x * f x ∂ν = ∫⁻ x in s, f x ∂μ

{α : Type u_3}
{m : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
[μ.HaveLebesgueDecomposition ν]
(hμν : μ ≪ ν)
{f : α → ℝ≥0∞}
(hf : AEMeasurable f ν)
{s : Set α}
(hs : MeasurableSet s)

∫⁻ (x : α) in s, μ.rnDeriv ν x * f x ∂ν = ∫⁻ (x : α) in s, f x ∂μ


theorem le_def {f g : α ≃. β} : f ≤ g ↔ ∀ (a : α) (b : β), b ∈ f a → b ∈ g a

{α : Type u}
{β : Type v}
{f g : α ≃. β}


lemma one_le_thickenedIndicator_apply' {X : Type _} [PseudoEMetricSpace X]
    {δ : ℝ} (δ_pos : 0 < δ) {F : Set X} {x : X} (hxF : x ∈ closure F) :
    1 ≤ thickenedIndicator δ_pos F x

{X : Type u_2}
[PseudoEMetricSpace X]
{δ : ℝ}
(δ_pos : 0 < δ)
{F : Set X}
{x : X}
(hxF : x ∈ closure F)


theorem coe_coordChangeL' (e e' : Trivialization F (π F E)) [e.IsLinear R] [e'.IsLinear R] {b : B}
    (hb : b ∈ e.baseSet ∩ e'.baseSet) :
    (coordChangeL R e e' b).toLinearEquiv =
      (e.linearEquivAt R b hb.1).symm.trans (e'.linearEquivAt R b hb.2)

[TopologicalSpace (Bundle.TotalSpace F E)]

(e e' : Trivialization F Bundle.TotalSpace.proj)

(Trivialization.coordChangeL R e e' b).toLinearEquiv =
  (Trivialization.linearEquivAt R e b ⋯).symm ≪≫ₗ Trivialization.linearEquivAt R e' b ⋯


nonrec theorem Cauchy.comap [UniformSpace β] {f : Filter β} {m : α → β} (hf : Cauchy f)
    (hm : comap (fun p : α × α => (m p.1, m p.2)) (𝓤 β) ≤ 𝓤 α) [NeBot (comap m f)] :
    Cauchy (comap m f)

(hm : Filter.comap (fun p => (m p.1, m p.2)) (𝓤 β) ≤ 𝓤 α)


@[to_additive (attr := ext)]
theorem ext : (∀ x, p x = q x) → p = q

{E : Type u_4}
[AddGroup E]
{p q : AddGroupNorm E}


lemma isLocallyInjective_of_isLocallyInjective_fac {φψ : F₁ ⟶ F₃} (fac : φ ≫ ψ = φψ)
    [IsLocallyInjective J φψ] : IsLocallyInjective J φ

(J : CategoryTheory.GrothendieckTopology C)

{F₁ F₂ F₃ : CategoryTheory.Functor Cᵒᵖ D}

{φψ : F₁ ⟶ F₃}

(fac : CategoryTheory.CategoryStruct.comp φ ψ = φψ)


/-- If `f : X → Y` is Hölder continuous on `s` with a positive exponent `r`, then
`μH[d] (f '' s) ≤ C ^ d * μH[r * d] s`. -/
theorem hausdorffMeasure_image_le (h : HolderOnWith C r f s) (hr : 0 < r) {d : ℝ} (hd : 0 ≤ d) :
    μH[d] (f '' s) ≤ (C : ℝ≥0∞) ^ d * μH[r * d] s

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
[MeasurableSpace X]
[BorelSpace X]
[MeasurableSpace Y]
[BorelSpace Y]
{C r : ℝ≥0}
{f : X → Y}
{s : Set X}
(h : HolderOnWith C r f s)
(hr : 0 < r)
{d : ℝ}
(hd : 0 ≤ d)


theorem mem_closure_iff_bsup :
    a ∈ closure s ↔
      ∃ (o : Ordinal) (_ho : o ≠ 0) (f : ∀ a < o, Ordinal),
        (∀ i hi, f i hi ∈ s) ∧ bsup.{u, u} o f = a

a ∈ closure s ↔ ∃ o, ∃ (_ : o ≠ 0), ∃ f, (∀ (i : Ordinal.{u}) (hi : i < o), f i hi ∈ s) ∧ o.bsup f = a


theorem inclusion_injective {S T : NonUnitalStarSubalgebra R A} (h : S ≤ T) :
    Function.Injective (inclusion h)

{R : Type u}
{A : Type v}
[CommSemiring R]
[StarRing R]
[NonUnitalSemiring A]
[StarRing A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
[StarModule R A]
{S T : NonUnitalStarSubalgebra R A}
(h : S ≤ T)


theorem gcd_def : s.gcd f = (s.1.map f).gcd

{α : Type u_2}
{β : Type u_3}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
{s : Finset β}
{f : β → α}


/-- A group `G` is nilpotent iff there exists a descending central series which reaches the
  trivial group in a finite time. -/
theorem nilpotent_iff_finite_descending_central_series :
    IsNilpotent G ↔ ∃ n : ℕ, ∃ H : ℕ → Subgroup G, IsDescendingCentralSeries H ∧ H n = ⊥

Group.IsNilpotent G ↔ ∃ n H, IsDescendingCentralSeries H ∧ H n = ⊥


lemma ssubset_of_ssubset_of_eq (hab : a ⊂ b) (hbc : b = c) : a ⊂ c

{α : Type u}
[HasSSubset α]
{a b c : α}
(hab : a ⊂ b)
(hbc : b = c)


@[simp]
theorem coe_top : (↑(⊤ : NonUnitalSubalgebra R A) : Set A) = Set.univ

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]


/-- If an antitone function is continuous at the infimum of a nonempty bounded below set `s`,
then it sends this infimum to the supremum of the image of `s`. -/
theorem Antitone.map_csInf_of_continuousAt {f : α → β} {s : Set α} (Cf : ContinuousAt f (sInf s))
    (Af : Antitone f) (ne : s.Nonempty) (H : BddBelow s) : f (sInf s) = sSup (f '' s)

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[ConditionallyCompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{f : α → β}
{s : Set α}
(Cf : ContinuousAt f (sInf s))
(Af : Antitone f)
(ne : s.Nonempty)
(H : BddBelow s)


lemma _root_.NumberField.ComplexEmbedding.IsConj.isUnramified_mk_iff
    {φ : K →+* ℂ} (h : ComplexEmbedding.IsConj φ σ) :
    IsUnramified k (mk φ) ↔ σ = 1

(h : NumberField.ComplexEmbedding.IsConj φ σ)

NumberField.InfinitePlace.IsUnramified k (NumberField.InfinitePlace.mk φ) ↔ σ = 1


theorem map_extChartAt_nhdsWithin_eq_image (x : M) :
    map (extChartAt I x) (𝓝[s] x) =
      𝓝[extChartAt I x '' ((extChartAt I x).source ∩ s)] extChartAt I x x

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
{s : Set M}
[ChartedSpace H M]
(x : M)

Filter.map (↑(extChartAt I x)) (𝓝[s] x) = 𝓝[↑(extChartAt I x) '' ((extChartAt I x).source ∩ s)] ↑(extChartAt I x) x


@[simp]
lemma one_le_toNNReal {r : ℝ} : 1 ≤ r.toNNReal ↔ 1 ≤ r


@[simp] lemma card_triangles [NoAccidental t] : ((graph t).cliqueFinset 3).card = t.card

((SimpleGraph.TripartiteFromTriangles.graph t).cliqueFinset 3).card = t.card


@[simp]
theorem Ici_top [PartialOrder α] [OrderTop α] : Ici (⊤ : α) = {⊤}

{α : Type u_1}
[PartialOrder α]
[OrderTop α]


@[simp]
theorem conj_pow {i : ℕ} {a b : α} : (a * b * a⁻¹) ^ i = a * b ^ i * a⁻¹

{α : Type u}
[Group α]
{i : ℕ}
{a b : α}


/-- An artinian object is an object
which does not have infinite decreasing sequences of subobjects.

See https://stacks.math.columbia.edu/tag/0FCF
-/
class ArtinianObject (X : C) : Prop where
  subobject_lt_wellFounded' : WellFounded ((· < ·) : Subobject X → Subobject X → Prop)

[self : CategoryTheory.ArtinianObject X]


/-- Integration by parts formula for the line derivative of Lipschitz functions, assuming one of
them is compactly supported. -/
theorem integral_lineDeriv_mul_eq
    (hf : LipschitzWith C f) (hg : LipschitzWith D g) (h'g : HasCompactSupport g) (v : E) :
    ∫ x, lineDeriv ℝ f x v * g x ∂μ = ∫ x, lineDeriv ℝ g x (-v) * f x ∂μ

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[FiniteDimensional ℝ E]
[MeasurableSpace E]
[BorelSpace E]
{C D : ℝ≥0}
{f g : E → ℝ}
{μ : MeasureTheory.Measure E}
[μ.IsAddHaarMeasure]
(hf : LipschitzWith C f)
(hg : LipschitzWith D g)
(h'g : HasCompactSupport g)
(v : E)

∫ (x : E), lineDeriv ℝ f x v * g x ∂μ = ∫ (x : E), lineDeriv ℝ g x (-v) * f x ∂μ


/-- A projection on a normed space `X` is said to be an M-projection if, for all `x` in `X`,
$\|x\| = max(\|P x\|,\|(1 - P) x\|)$.

Note that we write `P • x` instead of `P x` for reasons described in the module docstring.
-/
structure IsMprojection (P : M) : Prop where
  proj : IsIdempotentElem P
  Mnorm : ∀ x : X, ‖x‖ = max ‖P • x‖ ‖(1 - P) • x‖

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
{P : M}
(self : IsMprojection X P)


@[to_additive] lemma mabs_lt : |a|ₘ < b ↔ b⁻¹ < a ∧ a < b

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

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


theorem exists_mem_zpowers {x : G} {p : G → Prop} : (∃ g ∈ zpowers x, p g) ↔ ∃ m : ℤ, p (x ^ m)

{G : Type u_1}
[Group G]
{x : G}
{p : G → Prop}

(∃ g ∈ Subgroup.zpowers x, p g) ↔ ∃ m, p (x ^ m)


/-- A point is in an `Icc` iff it can be expressed as a convex combination of the endpoints. -/
theorem Convex.mem_Icc (h : x ≤ y) :
    z ∈ Icc x y ↔ ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{x y z : 𝕜}
(h : x ≤ y)

z ∈ Set.Icc x y ↔ ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ a * x + b * y = z


theorem Basis.dep_of_ssubset (hI : M.Basis I X) (hIY : I ⊂ Y) (hYX : Y ⊆ X) : M.Dep Y

{α : Type u_1}
{M : Matroid α}
{I X Y : Set α}
(hI : M.Basis I X)
(hIY : I ⊂ Y)
(hYX : Y ⊆ X)


/-- `IsSplitMono f` is the assertion that `f` admits a retraction -/
class IsSplitMono {X Y : C} (f : X ⟶ Y) : Prop where
  /-- There is a splitting -/
  exists_splitMono : Nonempty (SplitMono f)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y : C}
{f : X ⟶ Y}
[self : CategoryTheory.IsSplitMono f]


/-- Fixed size neighborhoods of the diagonal belong to the uniform structure -/
theorem edist_mem_uniformity {ε : ℝ≥0∞} (ε0 : 0 < ε) : { p : α × α | edist p.1 p.2 < ε } ∈ 𝓤 α

{α : Type u}
[PseudoEMetricSpace α]
{ε : ℝ≥0∞}
(ε0 : 0 < ε)


@[to_additive]
theorem IsOpen.div_right (hs : IsOpen s) : IsOpen (s / t)

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


theorem gradient_eq {f' : F → F} (h : ∀ x, HasGradientAt f (f' x) x) : ∇ f = f'

(h : ∀ (x : F), HasGradientAt f (f' x) x)


@[simp] theorem ofNat_zero : ((0 : Nat) : Int) = 0


lemma isPreconnected_iff_of_equivalence {K : Type u₂} [Category.{v₂} K] (e : J ≌ K) :
    IsPreconnected J ↔ IsPreconnected K

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
(e : J ≌ K)

CategoryTheory.IsPreconnected J ↔ CategoryTheory.IsPreconnected K


/-- Embedding `i : Fin n` into `Fin (n + 1)` with a hole around `p : Fin (n + 1)`
never results in `p` itself -/
lemma succAbove_ne (p : Fin (n + 1)) (i : Fin n) : p.succAbove i ≠ p


theorem Prime.pow_eq_iff {p a k : ℕ} (hp : p.Prime) : a ^ k = p ↔ a = p ∧ k = 1


theorem of_finrank_pos (h : 0 < finrank K V) : FiniteDimensional K V

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(h : 0 < FiniteDimensional.finrank K V)


@[simp]
theorem not_supPrime_bot : ¬SupPrime (⊥ : α)

{α : Type u_2}
[SemilatticeSup α]
[OrderBot α]


lemma succAbove_pred_of_lt (p i : Fin (n + 1)) (h : p < i)
    (hi := Fin.ne_of_gt $ Fin.lt_of_le_of_lt p.zero_le h) : succAbove p (i.pred hi) = i


nonrec theorem cos_add_cos : cos x + cos y = 2 * cos ((x + y) / 2) * cos ((x - y) / 2)

Real.cos x + Real.cos y = 2 * Real.cos ((x + y) / 2) * Real.cos ((x - y) / 2)


theorem Ideal.IsHomogeneous.isPrime_iff {I : Ideal A} (h : I.IsHomogeneous 𝒜) :
    I.IsPrime ↔
      I ≠ ⊤ ∧
        ∀ {x y : A},
          SetLike.Homogeneous 𝒜 x → SetLike.Homogeneous 𝒜 y → x * y ∈ I → x ∈ I ∨ y ∈ I

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_3}
[CommRing A]
[LinearOrderedCancelAddCommMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
{I : Ideal A}
(h : Ideal.IsHomogeneous 𝒜 I)


/-- Theorem 23 of [grinberg_clifford_2016][] -/
theorem changeForm_contractLeft (d : Module.Dual R M) (x : CliffordAlgebra Q) :
    -- Porting note: original statement
    --    changeForm h (d⌋x) = d⌋changeForm h x := by
    changeForm h (contractLeft (Q := Q) d x) = contractLeft (Q := Q') d (changeForm h x)

(h : LinearMap.BilinMap.toQuadraticMap B = Q' - Q)

(CliffordAlgebra.changeForm h) ((CliffordAlgebra.contractLeft d) x) =
  (CliffordAlgebra.contractLeft d) ((CliffordAlgebra.changeForm h) x)


theorem Isometry.dimH_image (hf : Isometry f) (s : Set X) : dimH (f '' s) = dimH s

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
{f : X → Y}
(hf : Isometry f)
(s : Set X)


theorem conjugateEquiv_symm_comp (α : R₁ ⟶ R₂) (β : R₂ ⟶ R₃) :
    (conjugateEquiv adj₂ adj₃).symm β ≫ (conjugateEquiv adj₁ adj₂).symm α =
      (conjugateEquiv adj₁ adj₃).symm (α ≫ β)

{C : Type u₁}
{D : Type u₂}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
{L₁ L₂ L₃ : CategoryTheory.Functor C D}
{R₁ R₂ R₃ : CategoryTheory.Functor D C}
(adj₁ : L₁ ⊣ R₁)
(adj₂ : L₂ ⊣ R₂)
(adj₃ : L₃ ⊣ R₃)
(α : R₁ ⟶ R₂)
(β : R₂ ⟶ R₃)

CategoryTheory.CategoryStruct.comp ((CategoryTheory.conjugateEquiv adj₂ adj₃).symm β)
    ((CategoryTheory.conjugateEquiv adj₁ adj₂).symm α) =
  (CategoryTheory.conjugateEquiv adj₁ adj₃).symm (CategoryTheory.CategoryStruct.comp α β)


@[simp] theorem id_hom' (M : Bimon_ C) : Comon_.Hom.hom (𝟙 M) = 𝟙 M.X

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


/-- If some right-translate of a function negates it, then the integral of the function with respect
to a right-invariant measure is 0. -/
@[to_additive
      "If some right-translate of a function negates it, then the integral of the function with
      respect to a right-invariant measure is 0."]
theorem integral_eq_zero_of_mul_right_eq_neg [IsMulRightInvariant μ] (hf' : ∀ x, f (x * g) = -f x) :
    ∫ x, f x ∂μ = 0

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure G}
{f : G → E}
{g : G}
[AddGroup G]
[MeasurableAdd G]
[μ.IsAddRightInvariant]
(hf' : ∀ (x : G), f (x + g) = -f x)


@[to_additive (attr := simp)] lemma inv_apply (f : M →* G) (x : M) : f⁻¹ x = (f x)⁻¹

{M : Type u_3}
{G : Type u_6}
[AddZeroClass M]
[AddCommGroup G]
(f : M →+ G)
(x : M)


@[reassoc (attr := simp, elementwise)]
lemma toCycles_moduleCatCyclesIso_hom :
    S.toCycles ≫ S.moduleCatCyclesIso.hom = S.moduleCatToCycles

(S : CategoryTheory.ShortComplex (ModuleCat R))

CategoryTheory.CategoryStruct.comp S.toCycles S.moduleCatCyclesIso.hom = S.moduleCatToCycles


theorem HasDerivWithinAt.rpow (hf : HasDerivWithinAt f f' s x) (hg : HasDerivWithinAt g g' s x)
    (h : 0 < f x) : HasDerivWithinAt (fun x => f x ^ g x)
      (f' * g x * f x ^ (g x - 1) + g' * f x ^ g x * Real.log (f x)) s x

{f g : ℝ → ℝ}
{f' g' x : ℝ}
{s : Set ℝ}
(hf : HasDerivWithinAt f f' s x)
(hg : HasDerivWithinAt g g' s x)
(h : 0 < f x)


lemma bijOn_swap (ha : a ∈ s) (hb : b ∈ s) : BijOn (swap a b) s s

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


theorem lt_or_lt [LinearOrder α] {x y : α} (h : x < y) (z : α) : x < z ∨ z < y

{α : Type u_2}
[LinearOrder α]
{x y : α}
(h : x < y)
(z : α)


@[to_additive]
theorem mk'_eq_iff_eq' {x₁ x₂} {y₁ y₂ : S} :
    f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (x₁ * y₂) = f.toMap (x₂ * y₁)

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
(f : S.LocalizationMap N)
{x₁ x₂ : M}
{y₁ y₂ : ↥S}

f.mk' x₁ y₁ = f.mk' x₂ y₂ ↔ f.toMap (x₁ + ↑y₂) = f.toMap (x₂ + ↑y₁)


theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x

{E : Type u_2}
[AddCommGroup E]
[Module ℝ E]
{α : Type u_4}
[LinearOrderedField α]
[MulActionWithZero α ℝ]
[OrderedSMul α ℝ]
[MulActionWithZero α E]
[IsScalarTower α ℝ (Set E)]
{s : Set E}
{a : α}
(ha : 0 ≤ a)
(x : E)


theorem subset_right_of_subset_union (h : s ⊆ t ∪ u) (hab : Disjoint s t) : s ⊆ u

{α : Type u_1}
{s t u : Set α}
(h : s ⊆ t ∪ u)
(hab : Disjoint s t)


@[simp]
theorem empty_diff (s : Set α) : (∅ \ s : Set α) = ∅


/-- `ContinuousMap.compStarAlgHom'` is functorial. -/
theorem compStarAlgHom'_comp (g : C(Y, Z)) (f : C(X, Y)) :
    compStarAlgHom' 𝕜 A (g.comp f) = (compStarAlgHom' 𝕜 A f).comp (compStarAlgHom' 𝕜 A g)

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(𝕜 : Type u_4)
[CommSemiring 𝕜]
(A : Type u_5)
[TopologicalSpace A]
[Semiring A]
[TopologicalSemiring A]
[Star A]
[ContinuousStar A]
[Algebra 𝕜 A]
(g : C(Y, Z))
(f : C(X, Y))

ContinuousMap.compStarAlgHom' 𝕜 A (g.comp f) =
  (ContinuousMap.compStarAlgHom' 𝕜 A f).comp (ContinuousMap.compStarAlgHom' 𝕜 A g)


@[simp 1100] -- Porting note: change priority to appease `simpNF`
theorem not_mem_graph_snd_zero (a : α) (f : α →₀ M) : (a, (0 : M)) ∉ f.graph

{α : Type u_1}
{M : Type u_5}
[Zero M]
(a : α)
(f : α →₀ M)


theorem mk_preimage_sigma_fn_eq_if {β : Type*} [DecidablePred (· ∈ s)] (g : β → α i) :
    (fun b ↦ Sigma.mk i (g b)) ⁻¹' s.sigma t = if i ∈ s then g ⁻¹' t i else ∅

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t : (i : ι) → Set (α i)}
{i : ι}
{β : Type u_8}
[DecidablePred fun x => x ∈ s]
(g : β → α i)

(fun b => ⟨i, g b⟩) ⁻¹' s.sigma t = if i ∈ s then g ⁻¹' t i else ∅


lemma toAffine_smul (P : Fin 3 → F) {u : F} (hu : IsUnit u) :
    toAffine W (u • P) = toAffine W P

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
(P : Fin 3 → F)
{u : F}
(hu : IsUnit u)

WeierstrassCurve.Jacobian.Point.toAffine W (u • P) = WeierstrassCurve.Jacobian.Point.toAffine W P


@[simp]
theorem exp_add_pi_mul_I (z : ℂ) : exp (z + π * I) = -exp z

Complex.exp (z + ↑Real.pi * Complex.I) = -Complex.exp z


/-- The natural isomorphism of `G`-sets `Gⁿ⁺¹ ≅ G × Gⁿ`, where `G` acts by left multiplication on
each factor. -/
@[simps!]
noncomputable def diagonalSucc (G : Type u) [Monoid G] (n : ℕ) :
    diagonal G (n + 1) ≅ leftRegular G ⊗ diagonal G n

∀ (a : (Action.diagonal G (n + 1)).V), (Action.diagonalSucc G n).hom.hom a = (Equiv.piFinSuccAbove (fun a => G) 0) a


theorem mk (F : X → Type*) [∀ x, TopologicalSpace (F x)] [hF : ∀ x, DiscreteTopology (F x)]
    (e : ∀ x ∈ s, Trivialization (F x) f) (h : ∀ (x : X) (hx : x ∈ s), x ∈ (e x hx).baseSet) :
    IsCoveringMapOn f s

[hF : ∀ (x : X), DiscreteTopology (F x)]

(e : (x : X) → x ∈ s → Trivialization (F x) f)


theorem mem_verts_toSubgraph (p : G.Walk u v) : w ∈ p.toSubgraph.verts ↔ w ∈ p.support

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


theorem nonneg_iff_normalize_eq_self (z : ℤ) : normalize z = z ↔ 0 ≤ z


theorem sup_semanticallyEquivalent_not_inf_not :
    T.SemanticallyEquivalent (φ ⊔ ψ) (φ.not ⊓ ψ.not).not

{L : FirstOrder.Language}
{T : L.Theory}
{α : Type w}
{n : ℕ}
(φ ψ : L.BoundedFormula α n)

T.SemanticallyEquivalent (φ ⊔ ψ) ∼(∼φ ⊓ ∼ψ)


@[simp] lemma divInt_nonneg {a b : ℤ} (ha : 0 ≤ a) (hb : 0 ≤ b) : 0 ≤ a /. b


@[simp]
theorem one_zpow : ∀ n : ℤ, (1 : M) ^ n = 1

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
(n : ℤ)


/-- The only open sets in the indiscrete topology are the empty set and the whole space. -/
theorem TopologicalSpace.isOpen_top_iff {α} (U : Set α) : IsOpen[⊤] U ↔ U = ∅ ∨ U = univ


/-- The universal morphism `universalMulHom` is unique. -/
@[to_additive "The universal morphism `universalAddHom` is unique."]
theorem universalMulHom_unique (φ : R[S⁻¹] →* T) (huniv : ∀ r : R, φ (numeratorHom r) = f r) :
    φ = universalMulHom f fS hf

(huniv : ∀ (r : R), φ (OreLocalization.numeratorHom r) = f r)

φ = OreLocalization.universalMulHom f fS hf


theorem coeFn_le (f g : Lp.simpleFunc G p μ) : (f : α → G) ≤ᵐ[μ] g ↔ f ≤ g

(f g : ↥(MeasureTheory.Lp.simpleFunc G p μ))

↑↑↑f ≤ᵐ[μ] ↑↑↑g ↔ f ≤ g


theorem exists_mem_normalizedFactors {x : α} (hx : x ≠ 0) (h : ¬IsUnit x) :
    ∃ p, p ∈ normalizedFactors x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
[UniqueFactorizationMonoid α]
{x : α}
(hx : x ≠ 0)
(h : ¬IsUnit x)

∃ p, p ∈ UniqueFactorizationMonoid.normalizedFactors x


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

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


theorem extendDomainHom_injective : Function.Injective (extendDomainHom f)

{α : Type u}
{β : Type v}
{p : β → Prop}
[DecidablePred p]
(f : α ≃ Subtype p)


theorem IsCompact.elim_nhds_subcover' (hs : IsCompact s) (U : ∀ x ∈ s, Set X)
    (hU : ∀ x (hx : x ∈ s), U x ‹x ∈ s› ∈ 𝓝 x) : ∃ t : Finset s, s ⊆ ⋃ x ∈ t, U (x : s) x.2

(hU : ∀ (x : X) (hx : x ∈ s), U x hx ∈ 𝓝 x)


theorem iInter_option {ι} (s : Option ι → Set α) : ⋂ o, s o = s none ∩ ⋂ i, s (some i)

{α : Type u_1}
{ι : Type u_11}
(s : Option ι → Set α)


/-- Every split epi whose section is epi is an iso. -/
theorem IsIso.of_epi_section' {X Y : C} {f : X ⟶ Y} (hf : SplitEpi f) [Epi <| hf.section_] :
    IsIso f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y : C}
{f : X ⟶ Y}
(hf : CategoryTheory.SplitEpi f)
[CategoryTheory.Epi hf.section_]


lemma log_pos_of_isRat {n : ℤ} :
    (NormNum.IsRat e n d) → (decide ((1 : ℚ) < n / d)) → (0 < Real.log (e : ℝ))

Mathlib.Meta.NormNum.IsRat e n d → decide (1 < ↑n / ↑d) = true → 0 < Real.log e


@[simp] theorem set_cons_succ : set (x :: xs) (i+1) y = x :: set xs i y

{x : Int}
{xs : List Int}
{i : Nat}
{y : Int}

Lean.Omega.IntList.set (x :: xs) (i + 1) y = x :: Lean.Omega.IntList.set xs i y


protected theorem isMin (a : α) : IsMin a

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


/-- Decomposition of an affine map in the special case when the point space and vector space
are the same. -/
theorem decomp' (f : V1 →ᵃ[k] V2) : (f.linear : V1 → V2) = ⇑f - fun _ => f 0

{k : Type u_1}
{V1 : Type u_2}
{V2 : Type u_4}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AddCommGroup V2]
[Module k V2]
(f : V1 →ᵃ[k] V2)


theorem map_comp (f : M →ₗ[R] N) (g : N →ₗ[R] P) :
    map I g ∘ₗ map I f = map I (g ∘ₗ f)

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{N : Type u_3}
[AddCommGroup N]
[Module R N]
{P : Type u_4}
[AddCommGroup P]
[Module R P]
(f : M →ₗ[R] N)
(g : N →ₗ[R] P)

AdicCompletion.map I g ∘ₗ AdicCompletion.map I f = AdicCompletion.map I (g ∘ₗ f)


theorem toSubmodule_bot : (⊥ : NonUnitalSubalgebra R A).toSubmodule = ⊥

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]


theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π)

x ^ y = rexp (Real.log x * y) * Real.cos (y * π)


theorem inf_neBot_iff_frequently_left {f g : Filter α} :
    NeBot (f ⊓ g) ↔ ∀ {p : α → Prop}, (∀ᶠ x in f, p x) → ∃ᶠ x in g, p x

(f ⊓ g).NeBot ↔ ∀ {p : α → Prop}, (∀ᶠ (x : α) in f, p x) → ∃ᶠ (x : α) in g, p x


theorem isOpen_setOf_linearIndependent {ι : Type*} [Finite ι] :
    IsOpen { f : ι → E | LinearIndependent 𝕜 f }

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type v}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CompleteSpace 𝕜]
{ι : Type u_1}
[Finite ι]


@[simp]
theorem offDiag_card : (offDiag s).card = s.card * s.card - s.card

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

s.offDiag.card = s.card * s.card - s.card


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

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

Finset.mulETransformLeft e⁻¹ x = (Finset.mulETransformRight e x.swap).swap


theorem complete' : ∃ q : ℚ_[p], ∀ ε > 0, ∃ N, ∀ i ≥ N, padicNormE (q - f i : ℚ_[p]) < ε

{p : ℕ}
[Fact (Nat.Prime p)]
(f : CauSeq ℚ_[p] ⇑padicNormE)

∃ q, ∀ ε > 0, ∃ N, ∀ i ≥ N, padicNormE (q - ↑f i) < ε


@[simp]
theorem Spec.toPresheafedSpace_map (R S : CommRingCat.{u}ᵒᵖ) (f : R ⟶ S) :
    Spec.toPresheafedSpace.map f = Spec.sheafedSpaceMap f.unop

AlgebraicGeometry.Spec.toPresheafedSpace.map f = AlgebraicGeometry.Spec.sheafedSpaceMap f.unop


@[simp]
theorem pi_pure [Finite ι] (f : (i : ι) → α i) : pi (pure <| f ·) = pure f

{ι : Type u_1}
{α : ι → Type u_2}
[Finite ι]
(f : (i : ι) → α i)

(Filter.pi fun x => pure (f x)) = pure f


@[simp]
lemma evaluationEquivOfIsGalois_apply (A : C) [IsGalois A] (a : F.obj A) (φ : Aut A) :
    evaluationEquivOfIsGalois F A a φ = F.map φ.hom a

(F : CategoryTheory.Functor C FintypeCat)

(CategoryTheory.PreGaloisCategory.evaluationEquivOfIsGalois F A a) φ = F.map φ.hom a


theorem sequence_anti : Antitone (f ∘ hf.sequence f)

(hf : Directed (fun x x_1 => x ≥ x_1) f)


@[to_additive (attr := simp)]
theorem equivQuotientZPowOfEquiv_refl :
    MulEquiv.refl (A ⧸ (zpowGroupHom n : A →* A).range) =
      equivQuotientZPowOfEquiv (MulEquiv.refl A) n

MulEquiv.refl (A ⧸ (zpowGroupHom n).range) = QuotientGroup.equivQuotientZPowOfEquiv (MulEquiv.refl A) n


/-- Cauchy's Mean Value Theorem, `deriv` version. -/
theorem exists_ratio_deriv_eq_ratio_slope :
    ∃ c ∈ Ioo a b, (g b - g a) * deriv f c = (f b - f a) * deriv g c

(hfd : DifferentiableOn ℝ f (Set.Ioo a b))

(hgd : DifferentiableOn ℝ g (Set.Ioo a b))

∃ c ∈ Set.Ioo a b, (g b - g a) * deriv f c = (f b - f a) * deriv g c


@[simp]
theorem toDFinsupp_smul [Monoid R] [AddMonoid M] [DistribMulAction R M] (r : R) (f : ι →₀ M) :
    (r • f).toDFinsupp = r • f.toDFinsupp

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Monoid R]
[AddMonoid M]
[DistribMulAction R M]
(r : R)
(f : ι →₀ M)


theorem cramer_is_linear : IsLinearMap α (cramerMap A)

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


theorem Continuous.image_derivedSet {β : Type*} [TopologicalSpace β] {A : Set X} {f : X → β}
    (hf1 : Continuous f) (hf2 : Function.Injective f) :
    f '' derivedSet A ⊆ derivedSet (f '' A)

{X : Type u_1}
[TopologicalSpace X]
{β : Type u_2}
[TopologicalSpace β]
{A : Set X}
{f : X → β}
(hf1 : Continuous f)
(hf2 : Function.Injective f)


@[to_additive]
theorem prod_toFinset {M : Type*} [DecidableEq α] [CommMonoid M] (f : α → M) :
    ∀ {l : List α} (_hl : l.Nodup), l.toFinset.prod f = (l.map f).prod

{α : Type u_3}
{M : Type u_6}
[DecidableEq α]
[CommMonoid M]
(f : α → M)
{l : List α}
(_hl : l.Nodup)


@[simp] theorem all_nil : [].all f = true

∀ {α : Type u_1} {f : α → Bool}, List.nil.all f = true


theorem revzip_powersetAux_perm_aux' {l : List α} :
    revzip (powersetAux l) ~ revzip (powersetAux' l)

(Multiset.powersetAux l).revzip.Perm (Multiset.powersetAux' l).revzip


@[simp, norm_cast] lemma coe_lt_coe : (r₁ : ℝ) < r₂ ↔ r₁ < r₂

↑r₁ < ↑r₂ ↔ r₁ < r₂


/-- Given a left homology map data for morphism `φ`, this is the induced left homology
map data for `a • φ`. -/
@[simps]
def smul (a : R) : LeftHomologyMapData (a • φ) h₁ h₂

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


@[simp]
theorem pullbackConeOfLeftIso_fst : (pullbackConeOfLeftIso f g).fst = g ≫ inv f

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

(CategoryTheory.Limits.pullbackConeOfLeftIso f g).fst = g ≫ CategoryTheory.inv f


@[simp]
theorem compLp_zero (hg : LipschitzWith c g) (g0 : g 0 = 0) : hg.compLp g0 (0 : Lp E p μ) = 0

{α : Type u_1}
{E : Type u_2}
{F : Type u_3}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
{g : E → F}
{c : ℝ≥0}
(hg : LipschitzWith c g)
(g0 : g 0 = 0)


theorem nat_div (h : Irrational x) {m : ℕ} (hm : m ≠ 0) : Irrational (m / x)

{x : ℝ}
(h : Irrational x)
{m : ℕ}
(hm : m ≠ 0)


theorem monotoneOn_id [Preorder α] {s : Set α} : MonotoneOn id s


@[to_additive (attr := simp)]
theorem nndist_mul_right [PseudoMetricSpace M] [Mul M] [IsometricSMul Mᵐᵒᵖ M] (a b c : M) :
    nndist (a * c) (b * c) = nndist a b

{M : Type u}
[PseudoMetricSpace M]
[Add M]
[IsometricVAdd Mᵃᵒᵖ M]
(a b c : M)


@[to_additive]
-- Porting note: removed `protected` (needs to be in namespace)
theorem topologicalGroup_induced {F : Type*} [Group H] [FunLike F H G] [MonoidHomClass F H G]
    (f : F) :
    @TopologicalGroup H (induced f ‹_›) _

{G : Type w}
{H : Type x}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
{F : Type u_1}
[AddGroup H]
[FunLike F H G]
[AddMonoidHomClass F H G]
(f : F)


lemma Iff.ne_left {α β : Sort*} {a b : α} {c d : β} : (a = b ↔ c ≠ d) → (a ≠ b ↔ c = d)

{α : Sort u_1}
{β : Sort u_2}
{a b : α}
{c d : β}


theorem measurable_prod {f : α → β × γ} :
    Measurable f ↔ (Measurable fun a => (f a).1) ∧ Measurable fun a => (f a).2

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{mγ : MeasurableSpace γ}
{f : α → β × γ}


@[reassoc]
theorem pullback.lift_fst {W X Y Z : C} {f : X ⟶ Z} {g : Y ⟶ Z} [HasPullback f g] (h : W ⟶ X)
    (k : W ⟶ Y) (w : h ≫ f = k ≫ g) : pullback.lift h k w ≫ pullback.fst f g = h

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X Y Z : C}
{f : X ⟶ Z}
{g : Y ⟶ Z}
[CategoryTheory.Limits.HasPullback f g]
(h : W ⟶ X)
(k : W ⟶ Y)
(w : h ≫ f = k ≫ g)

CategoryTheory.Limits.pullback.lift h k w ≫ CategoryTheory.Limits.pullback.fst f g = h


theorem padicValNat_primes {q : ℕ} [hp : Fact p.Prime] [hq : Fact q.Prime] (neq : p ≠ q) :
    padicValNat p q = 0

{p q : ℕ}
[hp : Fact (Nat.Prime p)]
[hq : Fact (Nat.Prime q)]
(neq : p ≠ q)


@[simp]
lemma image_subtype_val_Iio_Iic {a : α} (b : Iio a) : Subtype.val '' Iic b = Iic b.1

{α : Type u_1}
[Preorder α]
{a : α}
(b : ↑(Set.Iio a))


lemma coeSubgraph_le {H : G.Subgraph} (H' : H.coe.Subgraph) :
    Subgraph.coeSubgraph H' ≤ H

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


lemma eval_negPolynomial (x y : R) : W.negPolynomial.evalEval x y = W.negY x y

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

Polynomial.evalEval x y W.negPolynomial = W.negY x y


theorem covering_disjoint : h.index.PairwiseDisjoint h.covering

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


lemma Countable.exists_injective_nat (α : Sort u) [Countable α] : ∃ f : α → ℕ, Injective f


/-- `yoneda'` induces an equivalence of category between `Type u` and
`SheafOfTypes typesGrothendieckTopology`. -/
@[simps!]
noncomputable def typeEquiv : Type u ≌ SheafOfTypes typesGrothendieckTopology

∀ {X Y : CategoryTheory.SheafOfTypes CategoryTheory.typesGrothendieckTopology} (f : X ⟶ Y)
  (a :
    ((CategoryTheory.evaluation Type uᵒᵖ (Type u)).obj (Opposite.op PUnit.{u + 1})).obj
      ((CategoryTheory.sheafOfTypesToPresheaf CategoryTheory.typesGrothendieckTopology).obj X)),
  CategoryTheory.typeEquiv.inverse.map f a = f.val.app (Opposite.op PUnit.{u + 1}) a


theorem card_erase_lt_of_mem : a ∈ s → (s.erase a).card < s.card

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


/-- The explicit fan of a family of topological spaces given by the pi type. -/
@[simps! pt π_app]
def piFan {ι : Type v} (α : ι → TopCat.{max v u}) : Fan α

{ι : Type v}
(α : ι → TopCat)
(X : CategoryTheory.Discrete ι)

(TopCat.piFan α).π.app X = TopCat.piπ α X.as


@[simp] lemma in₀₁_iff : (graph t).Adj (in₀ a) (in₁ b) ↔ ∃ c, (a, b, c) ∈ t

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{t : Finset (α × β × γ)}
{a : α}
{b : β}

(SimpleGraph.TripartiteFromTriangles.graph t).Adj (Sum3.in₀ a) (Sum3.in₁ b) ↔ ∃ c, (a, b, c) ∈ t


/-- An idempotent semiring is a semiring with the additional property that addition is idempotent.
-/
class IdemSemiring (α : Type u) extends Semiring α, SemilatticeSup α where
  protected sup := (· + ·)
  protected add_eq_sup : ∀ a b : α, a + b = a ⊔ b := by
    intros
    rfl
  /-- The bottom element of an idempotent semiring: `0` by default -/
  protected bot : α := 0
  protected bot_le : ∀ a, bot ≤ a

{α : Type u}
[self : IdemSemiring α]
(a : α)


theorem chain_of_pairwise : (∀ a ∈ s, ∀ b ∈ s, r a b) → Chain r s

{α : Type u_1}
{r : α → α → Prop}
{s : Cycle α}

(∀ a ∈ s, ∀ b ∈ s, r a b) → Cycle.Chain r s


lemma odd_card_iff_odd_components : Odd (Nat.card V) ↔
    Odd (Nat.card ({(c : ConnectedComponent G) | Odd (Nat.card c.supp)}))

{V : Type u}
(G : SimpleGraph V)
[DecidableEq V]
[Fintype V]
[DecidableRel G.Adj]

Odd (Nat.card V) ↔ Odd (Nat.card ↑{c | Odd (Nat.card ↑c.supp)})


/-- Every solution is, up to a sign, a power of a given fundamental solution. -/
theorem eq_zpow_or_neg_zpow {a₁ : Solution₁ d} (h : IsFundamental a₁) (a : Solution₁ d) :
    ∃ n : ℤ, a = a₁ ^ n ∨ a = -a₁ ^ n

{d : ℤ}
{a₁ : Pell.Solution₁ d}
(h : Pell.IsFundamental a₁)
(a : Pell.Solution₁ d)


theorem degree_cubic_le : degree (C a * X ^ 3 + C b * X ^ 2 + C c * X + C d) ≤ 3

(Polynomial.C a * Polynomial.X ^ 3 + Polynomial.C b * Polynomial.X ^ 2 + Polynomial.C c * Polynomial.X +
      Polynomial.C d).degree ≤
  3


@[simp] theorem bind_eq (x : Id α) (f : α → id β) : x >>= f = f x

{α β : Type u_1}
(x : Id α)
(f : α → id β)


/-- Suppose that `N` acts on `X` and `M` continuously acts on `Y`.
Suppose that `g : Y → X` is an action homomorphism in the following sense:
there exists a continuous function `f : N → M` such that `g (c • x) = f c • g x`.
Then the action of `N` on `X` is continuous as well.

In many cases, `f = id` so that `g` is an action homomorphism in the sense of `MulActionHom`.
However, this version also works for semilinear maps and `f = Units.val`. -/
@[to_additive
  "Suppose that `N` additively acts on `X` and `M` continuously additively acts on `Y`.
Suppose that `g : Y → X` is an additive action homomorphism in the following sense:
there exists a continuous function `f : N → M` such that `g (c +ᵥ x) = f c +ᵥ g x`.
Then the action of `N` on `X` is continuous as well.

In many cases, `f = id` so that `g` is an action homomorphism in the sense of `AddActionHom`.
However, this version also works for `f = AddUnits.val`."]
lemma Inducing.continuousSMul {N : Type*} [SMul N Y] [TopologicalSpace N] {f : N → M}
    (hg : Inducing g) (hf : Continuous f) (hsmul : ∀ {c x}, g (c • x) = f c • g x) :
    ContinuousSMul N Y

(hsmul : ∀ {c : N} {x : Y}, g (c • x) = f c • g x)


@[to_additive]
theorem Red.exact : mk L₁ = mk L₂ ↔ Join Red L₁ L₂

FreeAddGroup.mk L₁ = FreeAddGroup.mk L₂ ↔ Relation.Join FreeAddGroup.Red L₁ L₂


theorem adjointAux_inner_right (A : E →L[𝕜] F) (x : E) (y : F) :
    ⟪x, adjointAux A y⟫ = ⟪A x, y⟫

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[InnerProductSpace 𝕜 E]
[InnerProductSpace 𝕜 F]
[CompleteSpace E]
(A : E →L[𝕜] F)
(x : E)
(y : F)

⟪x, (ContinuousLinearMap.adjointAux A) y⟫_𝕜 = ⟪A x, y⟫_𝕜


/-- Lagrange's **Mean Value Theorem**, applied to convex domains. -/
theorem domain_mvt {f : E → ℝ} {s : Set E} {x y : E} {f' : E → E →L[ℝ] ℝ}
    (hf : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (hs : Convex ℝ s) (xs : x ∈ s) (ys : y ∈ s) :
    ∃ z ∈ segment ℝ x y, f y - f x = f' z (y - x)

∃ z ∈ segment ℝ x y, f y - f x = (f' z) (y - x)


@[simp]
theorem ListBlank.nth_zero {Γ} [Inhabited Γ] (l : ListBlank Γ) : l.nth 0 = l.head

{Γ : Type u_1}
[Inhabited Γ]
(l : Turing.ListBlank Γ)


theorem pow (n : ℕ) : mapFun f (x ^ n) = mapFun f x ^ n

{p : ℕ}
{R : Type u_1}
{S : Type u_2}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CommRing S]
(f : R →+* S)
(x : 𝕎 R)
(n : ℕ)

WittVector.mapFun (⇑f) (x ^ n) = WittVector.mapFun (⇑f) x ^ n


/-- Composing the partial sums of two multilinear series coincides with the sum over all
compositions in `comp_partial_sum_target 0 N N`. This is precisely the motivation for the
definition of `comp_partial_sum_target`. -/
theorem comp_partialSum (q : FormalMultilinearSeries 𝕜 F G) (p : FormalMultilinearSeries 𝕜 E F)
    (N : ℕ) (z : E) :
    q.partialSum N (∑ i ∈ Finset.Ico 1 N, p i fun _j => z) =
      ∑ i ∈ compPartialSumTarget 0 N N, q.compAlongComposition p i.2 fun _j => z

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(q : FormalMultilinearSeries 𝕜 F G)
(p : FormalMultilinearSeries 𝕜 E F)
(N : ℕ)
(z : E)

q.partialSum N (∑ i ∈ Finset.Ico 1 N, (p i) fun _j => z) =
  ∑ i ∈ FormalMultilinearSeries.compPartialSumTarget 0 N N, (q.compAlongComposition p i.snd) fun _j => z


@[simp]
theorem coe_snd : ⇑(snd : P1 × P2 →ᵃ[k] P2) = Prod.snd

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
{V2 : Type u_4}
{P2 : Type u_5}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
[AddCommGroup V2]
[Module k V2]
[AffineSpace V2 P2]


/-- If `C` has all colimits of diagrams `parallelPair f g`, then it has all coequalizers -/
theorem hasCoequalizers_of_hasColimit_parallelPair
    [∀ {X Y : C} {f g : X ⟶ Y}, HasColimit (parallelPair f g)] : HasCoequalizers C

[∀ {X Y : C} {f g : X ⟶ Y}, CategoryTheory.Limits.HasColimit (CategoryTheory.Limits.parallelPair f g)]


theorem lintegral_sub {f g : α → ℝ≥0∞} (hg : Measurable g) (hg_fin : ∫⁻ a, g a ∂μ ≠ ∞)
    (h_le : g ≤ᵐ[μ] f) : ∫⁻ a, f a - g a ∂μ = ∫⁻ a, f a ∂μ - ∫⁻ a, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ≥0∞}
(hg : Measurable g)
(hg_fin : ∫⁻ (a : α), g a ∂μ ≠ ⊤)
(h_le : g ≤ᵐ[μ] f)

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


theorem neg_one_pow_ne_zero {n : ℕ} : (-1 : ℤ) ^ n ≠ 0


@[simp 1100, nolint simpNF]
theorem mem_map_of_injective {f : α → β} (H : Injective f) {a : α} {l : List α} :
    f a ∈ map f l ↔ a ∈ l

{α : Type u}
{β : Type v}
{f : α → β}
(H : Function.Injective f)
{a : α}
{l : List α}


theorem mfderiv_comp (hg : MDifferentiableAt I' I'' g (f x)) (hf : MDifferentiableAt I I' f x) :
    mfderiv I I'' (g ∘ f) x = (mfderiv I' I'' g (f x)).comp (mfderiv I I' f x)

[I''s : SmoothManifoldWithCorners I'' M'']


lemma exact_iff_isZero_leftHomology [S.HasHomology] :
    S.Exact ↔ IsZero S.leftHomology

S.Exact ↔ CategoryTheory.Limits.IsZero S.leftHomology


/-- Induction principle for `Finset`s in a linearly ordered type: a predicate is true on all
`s : Finset α` provided that:

* it is true on the empty `Finset`,
* for every `s : Finset α` and an element `a` strictly less than all elements of `s`, `p s`
  implies `p (insert a s)`. -/
@[elab_as_elim]
theorem induction_on_min [DecidableEq α] {p : Finset α → Prop} (s : Finset α) (h0 : p ∅)
    (step : ∀ a s, (∀ x ∈ s, a < x) → p s → p (insert a s)) : p s

(step : ∀ (a : α) (s : Finset α), (∀ x ∈ s, a < x) → p s → p (insert a s))


theorem mul_coeff_left' [NonUnitalNonAssocSemiring R] {x y : HahnSeries Γ R} {a : Γ} {s : Set Γ}
    (hs : s.IsPWO) (hxs : x.support ⊆ s) :
    (x * y).coeff a =
      ∑ ij ∈ addAntidiagonal hs y.isPWO_support a, x.coeff ij.fst * y.coeff ij.snd

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonUnitalNonAssocSemiring R]
{x y : HahnSeries Γ R}
{a : Γ}
{s : Set Γ}
(hs : s.IsPWO)
(hxs : x.support ⊆ s)

(x * y).coeff a = ∑ ij ∈ Finset.addAntidiagonal hs ⋯ a, x.coeff ij.1 * y.coeff ij.2


theorem _root_.IsOpen.isClopenable [TopologicalSpace α] [PolishSpace α] {s : Set α}
    (hs : IsOpen s) : IsClopenable s

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


/-- The multiplicative equivalence between the type of units of `M` and the submonoid of unit
elements of `M`. -/
@[to_additive (attr := simps!) " The additive equivalence between the type of additive units of `M`
  and the additive submonoid whose elements are the additive units of `M`. "]
noncomputable def unitsTypeEquivIsUnitSubmonoid [Monoid M] : Mˣ ≃* IsUnit.submonoid M

{M : Type u_1}
[Monoid M]
(x : ↥(IsUnit.submonoid M))

↑(Submonoid.unitsTypeEquivIsUnitSubmonoid.symm x)⁻¹ = ↑(Classical.choose ⋯)⁻¹


@[to_additive (attr := simp)]
theorem mem_trivial {g : G} : g ∈ trivial G ↔ g = 1


@[simp]
theorem _root_.aemeasurable_sum_measure_iff [Countable ι] {μ : ι → Measure α} :
    AEMeasurable f (sum μ) ↔ ∀ i, AEMeasurable f (μ i)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{f : α → β}
[Countable ι]
{μ : ι → MeasureTheory.Measure α}

AEMeasurable f (MeasureTheory.Measure.sum μ) ↔ ∀ (i : ι), AEMeasurable f (μ i)


theorem limit_zero_of_norm_tendsto_zero : F.eval ncs.lim = 0

(hnorm : Filter.Tendsto (fun i => ‖Polynomial.eval (↑ncs i) F‖) Filter.atTop (𝓝 0))


/-- Given `G` acting on `X`, a functor from the corresponding action groupoid to a group `H`
    can be curried to a group homomorphism `G →* (X → H) ⋊ G`. -/
@[simps]
def curry (F : ActionCategory G X ⥤ SingleObj H) : G →* (X → H) ⋊[mulAutArrow] G

(F : CategoryTheory.Functor (CategoryTheory.ActionCategory G X) (CategoryTheory.SingleObj H))

((CategoryTheory.ActionCategory.curry F) g).right = g


@[simp]
lemma unitsFstOne_val_val_fst (x : (unitsFstOne R A)) : x.val.val.fst = 1

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(x : ↥(Unitization.unitsFstOne R A))


@[to_additive (attr := simp, norm_cast)]
lemma coe_div_coe [SetLike S G] [DivisionMonoid G] [SubgroupClass S G] (H : S) :
    H / H = (H : Set G)

{G : Type u_2}
{S : Type u_4}
[SetLike S G]
[DivisionMonoid G]
[SubgroupClass S G]
(H : S)


lemma AnalyticWithinOn.contDiffOn [CompleteSpace F] {f : E → F} {s : Set E}
    (h : AnalyticWithinOn 𝕜 f s) {n : ℕ∞} : ContDiffOn 𝕜 n f s

{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{E : Type u_3}
{F : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
{f : E → F}
{s : Set E}
(h : AnalyticWithinOn 𝕜 f s)
{n : ℕ∞}


/-- If `g : ℝ → ℝ` is periodic with period `T > 0`, then for any `t : ℝ`, the function
`t ↦ ∫ x in 0..t, g x` is bounded above by `t ↦ X + ⌊t/T⌋ • Y` for appropriate constants `X` and
`Y`. -/
theorem integral_le_sSup_add_zsmul_of_pos (hT : 0 < T) (t : ℝ) :
    (∫ x in (0)..t, g x) ≤
      sSup ((fun t => ∫ x in (0)..t, g x) '' Icc 0 T) + ⌊t / T⌋ • ∫ x in (0)..T, g x

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

∫ (x : ℝ) in 0 ..t, g x ≤ sSup ((fun t => ∫ (x : ℝ) in 0 ..t, g x) '' Set.Icc 0 T) + ⌊t / T⌋ • ∫ (x : ℝ) in 0 ..T, g x


@[to_additive]
theorem inv_mul_of_eq {a : α} (h : ↑u = a) : ↑u⁻¹ * a = 1

{α : Type u}
[Monoid α]
{u : αˣ}
{a : α}
(h : ↑u = a)


@[to_additive (attr := simp)]
theorem inv_one : (1 : G)⁻¹ = 1


lemma quasiIso_of_comp_left (φ : S₁ ⟶ S₂) (φ' : S₂ ⟶ S₃)
    [hφ : QuasiIso φ] [hφφ' : QuasiIso (φ ≫ φ')] :
    QuasiIso φ'

{S₁ S₂ S₃ : CategoryTheory.ShortComplex C}

[hφ : CategoryTheory.ShortComplex.QuasiIso φ]

[hφφ' : CategoryTheory.ShortComplex.QuasiIso (CategoryTheory.CategoryStruct.comp φ φ')]


theorem PolyCnstr.denote_mul (ctx : Context) (k : Nat) (c : PolyCnstr) : (c.mul (k+1)).denote ctx = c.denote ctx

(ctx : Nat.Linear.Context)
(k : Nat)
(c : Nat.Linear.PolyCnstr)

Nat.Linear.PolyCnstr.denote ctx (Nat.Linear.PolyCnstr.mul (k + 1) c) = Nat.Linear.PolyCnstr.denote ctx c


theorem MonovaryOn.comp_monotone_on_left (h : MonovaryOn f g s) (hf : Monotone f') :
    MonovaryOn (f' ∘ f) g s

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Preorder α]
[Preorder β]
[Preorder γ]
{f : ι → α}
{f' : α → γ}
{g : ι → β}
{s : Set ι}
(h : MonovaryOn f g s)
(hf : Monotone f')


theorem smul_map_inv_div_map_inv_of_isMulTwoCocycle
    {f : G × G → M} (hf : IsMulTwoCocycle f) (g : G) :
    g • f (g⁻¹, g) / f (g, g⁻¹) = f (1, 1) / f (g, 1)

(hf : groupCohomology.IsMulTwoCocycle f)


@[simp]
lemma map_Δ : (W.map φ).Δ = φ W.Δ

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


@[reassoc (attr := simp)]
lemma map_condition : G.map c.ι ≫ G.map f = 0

(c : CategoryTheory.Limits.KernelFork f)

G.map (CategoryTheory.Limits.Fork.ι c) ≫ G.map f = 0


@[to_additive (attr := ext)]
theorem MonoidHom.ext [MulOneClass M] [MulOneClass N] ⦃f g : M →* N⦄ (h : ∀ x, f x = g x) : f = g

{M : Type u_4}
{N : Type u_5}
[AddZeroClass M]
[AddZeroClass N]
⦃f g : M →+ N⦄
(h : ∀ (x : M), f x = g x)


/-- The map sending an integer `n` to the `y`-coordinate of `a^n` for a fundamental
solution `a` is stritcly increasing. -/
theorem y_strictMono {a : Solution₁ d} (h : IsFundamental a) :
    StrictMono fun n : ℤ => (a ^ n).y

{d : ℤ}
{a : Pell.Solution₁ d}
(h : Pell.IsFundamental a)


theorem convexJoin_convexJoin_convexJoin_comm (s t u v : Set E) :
    convexJoin 𝕜 (convexJoin 𝕜 s t) (convexJoin 𝕜 u v) =
      convexJoin 𝕜 (convexJoin 𝕜 s u) (convexJoin 𝕜 t v)

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(s t u v : Set E)


theorem charpoly_monic (M : Matrix n n R) : M.charpoly.Monic

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


@[to_additive]
lemma prod_sdiff_ne_prod_sdiff_iff :
    ∏ i ∈ s \ t, f i ≠ ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i ≠ ∏ i ∈ t, f i

{ι : Type u_1}
{α : Type u_3}
[DecidableEq ι]
[CancelCommMonoid α]
{s t : Finset ι}
{f : ι → α}


{R : Type u_5}
{S : Type u_6}
[Semiring R]
[OrderedRing S]
(abv : AbsoluteValue R S)
[IsDomain S]
[Nontrivial R]


/-- Relation `fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α)` is symmetric. -/
theorem Filter.Tendsto.uniformity_symm {l : Filter β} {f : β → α × α} (h : Tendsto f l (𝓤 α)) :
    Tendsto (fun x => ((f x).2, (f x).1)) l (𝓤 α)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
{l : Filter β}
{f : β → α × α}
(h : Filter.Tendsto f l (𝓤 α))

Filter.Tendsto (fun x => ((f x).2, (f x).1)) l (𝓤 α)


/-- The definition of `x ⧏ y` on pre-games, in terms of `⧏` two moves later. -/
theorem lf_def {x y : PGame} :
    x ⧏ y ↔
      (∃ i, (∀ i', x.moveLeft i' ⧏ y.moveLeft i) ∧ ∀ j, x ⧏ (y.moveLeft i).moveRight j) ∨
        ∃ j, (∀ i, (x.moveRight j).moveLeft i ⧏ y) ∧ ∀ j', x.moveRight j ⧏ y.moveRight j'

x.LF y ↔
  (∃ i,
      (∀ (i' : x.LeftMoves), (x.moveLeft i').LF (y.moveLeft i)) ∧
        ∀ (j : (y.moveLeft i).RightMoves), x.LF ((y.moveLeft i).moveRight j)) ∨
    ∃ j,
      (∀ (i : (x.moveRight j).LeftMoves), ((x.moveRight j).moveLeft i).LF y) ∧
        ∀ (j' : y.RightMoves), (x.moveRight j).LF (y.moveRight j')


@[simp]
theorem mk'_arrow {X A : C} (f : A ⟶ X) [Mono f] : (mk' f).arrow = f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X A : C}
(f : A ⟶ X)
[CategoryTheory.Mono f]

(CategoryTheory.MonoOver.mk' f).arrow = f


lemma equivalenceRightFractionRel (X Y : C) [HasRightCalculusOfFractions W] :
    @_root_.Equivalence (W.RightFraction X Y) RightFractionRel

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
{W : CategoryTheory.MorphismProperty C}
(X Y : C)
[W.HasRightCalculusOfFractions]


lemma polynomial_expand_eq (f : R[X]) :
    expand R p f = (f.map (frobeniusEquiv R p).symm) ^ p

(R : Type u_1)
(p : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]
(f : R[X])

(Polynomial.expand R p) f = Polynomial.map (↑(frobeniusEquiv R p).symm) f ^ p


theorem Disjoint.inf_right (h : Disjoint a b) : Disjoint a (b ⊓ c)

{α : Type u_1}
[SemilatticeInf α]
[OrderBot α]
{a b : α}
(c : α)
(h : Disjoint a b)