theorem EventuallyEq.cardinal_bInter {S : Set ι} (hS : #S < c)
    {s t : ∀ i ∈ S, Set α} (h : ∀ i hi, s i hi =ᶠ[l] t i hi) :
    ⋂ i ∈ S, s i ‹_› =ᶠ[l] ⋂ i ∈ S, t i ‹_›

(h : ∀ (i : ι) (hi : i ∈ S), s i hi =ᶠ[l] t i hi)

⋂ i, ⋂ (h : i ∈ S), s i h =ᶠ[l] ⋂ i, ⋂ (h : i ∈ S), t i h


theorem noncompactSpace_of_neBot (_ : NeBot (Filter.cocompact X)) : NoncompactSpace X

(Filter.cocompact X).NeBot → NoncompactSpace X


theorem Equiv.ge {x y : PGame} (h : x ≈ y) : y ≤ x


lemma absorbs_iff_norm : Absorbs 𝕜 A B ↔ ∃ r, ∀ c : 𝕜, r ≤ ‖c‖ → B ⊆ c • A

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
{A B : Set E}

Absorbs 𝕜 A B ↔ ∃ r, ∀ (c : 𝕜), r ≤ ‖c‖ → B ⊆ c • A


lemma rpow_inv_le_iff_of_pos (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x ^ z⁻¹ ≤ y ↔ x ≤ y ^ z


theorem l_u_eq [Preorder α] [PartialOrder β] (gi : GaloisInsertion l u) (b : β) : l (u b) = b

{α : Type u}
{β : Type v}
{l : α → β}
{u : β → α}
[Preorder α]
[PartialOrder β]
(gi : GaloisInsertion l u)
(b : β)


theorem tendsto_toNNReal {a : ℝ≥0∞} (ha : a ≠ ∞) :
    Tendsto ENNReal.toNNReal (𝓝 a) (𝓝 a.toNNReal)

Filter.Tendsto ENNReal.toNNReal (𝓝 a) (𝓝 a.toNNReal)


@[simp]
theorem toFinset_compl [Fintype α] [Fintype (sᶜ : Set _)] : sᶜ.toFinset = s.toFinsetᶜ

{α : Type u_1}
(s : Set α)
[DecidableEq α]
[Fintype ↑s]
[Fintype α]
[Fintype ↑sᶜ]


@[to_additive (attr := simp)]
theorem symm_mulLeft (g : G) : (mulLeft g).symm = mulLeft g⁻¹

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul G]
(g : G)

(MeasurableEquiv.mulLeft g).symm = MeasurableEquiv.mulLeft g⁻¹


/-- The members of the opposite of a set are in bijection with the members of the set itself. -/
@[simps]
def opEquiv_self (s : Set α) : s.op ≃ s

↑(s.opEquiv_self.symm x) = Opposite.op ↑x


theorem infinite_range_of_injective [Infinite α] {f : α → β} (hi : Injective f) :
    (range f).Infinite

{α : Type u}
{β : Type v}
[Infinite α]
{f : α → β}
(hi : Function.Injective f)


/-- An equivalent expression of `Monoid.FG` in terms of `Set.Finite` instead of `Finset`. -/
@[to_additive
      "An equivalent expression of `AddMonoid.FG` in terms of `Set.Finite` instead of `Finset`."]
theorem Monoid.fg_iff :
    Monoid.FG M ↔ ∃ S : Set M, Submonoid.closure S = (⊤ : Submonoid M) ∧ S.Finite

AddMonoid.FG M ↔ ∃ S, AddSubmonoid.closure S = ⊤ ∧ S.Finite


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


@[simp]
theorem some_ne_none (x : α) : some x ≠ none


theorem map_sup (s t : NonUnitalSubring R) (f : F) : (s ⊔ t).map f = s.map f ⊔ t.map f

{F : Type w}
{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(s t : NonUnitalSubring R)
(f : F)

NonUnitalSubring.map f (s ⊔ t) = NonUnitalSubring.map f s ⊔ NonUnitalSubring.map f t


theorem tendsto_atBot_diagonal [SemilatticeInf α] : Tendsto (fun a : α => (a, a)) atBot atBot

Filter.Tendsto (fun a => (a, a)) Filter.atBot Filter.atBot


lemma baseChange_equation (hf : Function.Injective f) (x y : A) :
    (W.baseChange B).toAffine.Equation (f x) (f y) ↔ (W.baseChange A).toAffine.Equation x y

{R : Type r}
[CommRing R]
(W : WeierstrassCurve.Affine R)
{S : Type s}
[CommRing S]
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)
(hf : Function.Injective ⇑f)
(x y : A)

(WeierstrassCurve.baseChange W B).toAffine.Equation (f x) (f y) ↔
  (WeierstrassCurve.baseChange W A).toAffine.Equation x y


/-- See `Infinite.exists_superset_card_eq` for a version that, for an `s : Finset α`,
provides a superset `t : Finset α`, `s ⊆ t` such that `t.card` is fixed. -/
theorem exists_subset_card_eq (α : Type*) [Infinite α] (n : ℕ) : ∃ s : Finset α, s.card = n


theorem union_ae_eq_left_of_ae_eq_empty (h : t =ᵐ[μ] (∅ : Set α)) : (s ∪ t : Set α) =ᵐ[μ] s

{α : Type u_1}
{F : Type u_3}
[FunLike F (Set α) ℝ≥0∞]
[MeasureTheory.OuterMeasureClass F α]
{μ : F}
{s t : Set α}
(h : t =ᵐ[μ] ∅)


theorem Equiv.countable_iff (e : α ≃ β) : Countable α ↔ Countable β


/-- If `X` is isomorphic to `X₁` and `Y` is isomorphic to `Y₁`, then
there is a bijection between `X ≅ Y` and `X₁ ≅ Y₁`. -/
@[simps]
def isoCongr {X₁ Y₁ X₂ Y₂ : C} (f : X₁ ≅ X₂) (g : Y₁ ≅ Y₂) : (X₁ ≅ Y₁) ≃ (X₂ ≅ Y₂)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X₁ Y₁ X₂ Y₂ : C}
(f : X₁ ≅ X₂)
(g : Y₁ ≅ Y₂)
(h : X₁ ≅ Y₁)


theorem HasDerivAt.arsinh (hf : HasDerivAt f f' a) :
    HasDerivAt (fun x => arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') a

{f : ℝ → ℝ}
{a f' : ℝ}
(hf : HasDerivAt f f' a)

HasDerivAt (fun x => Real.arsinh (f x)) ((√(1 + f a ^ 2))⁻¹ • f') a


@[simp]
theorem xgcd_zero_left {s t r' s' t'} : xgcdAux 0 s t r' s' t' = (r', s', t')

Nat.xgcdAux 0 s t r' s' t' = (r', s', t')


theorem Chain'.left_of_append (h : Chain' R (l₁ ++ l₂)) : Chain' R l₁

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


theorem smul_top {R} [Zero R] [SMulWithZero R ℝ≥0∞] [IsScalarTower R ℝ≥0∞ ℝ≥0∞]
    [NoZeroSMulDivisors R ℝ≥0∞] [DecidableEq R] (c : R) :
    c • ∞ = if c = 0 then 0 else ∞

{R : Type u_1}
[Zero R]
[SMulWithZero R ℝ≥0∞]
[IsScalarTower R ℝ≥0∞ ℝ≥0∞]
[NoZeroSMulDivisors R ℝ≥0∞]
[DecidableEq R]
(c : R)


@[to_additive]
lemma IsComplement.mul_eq (h : IsComplement S T) : S * T = univ

{G : Type u_1}
[Group G]
{S T : Set G}
(h : Subgroup.IsComplement S T)


/-- The `p`-adic value of an integer `z ≠ 0` is the multiplicity of `p` in `z`. -/
theorem of_int_multiplicity {z : ℤ} (hp : p ≠ 1) (hz : z ≠ 0) :
    padicValRat p (z : ℚ) = (multiplicity (p : ℤ) z).get (finite_int_iff.2 ⟨hp, hz⟩)

padicValRat p ↑z = ↑((multiplicity (↑p) z).get ⋯)


theorem sublists_eq_sublists' (l : List α) : sublists l = map reverse (sublists' (reverse l))

l.sublists = List.map List.reverse l.reverse.sublists'


theorem emem_iff_all {x : α} {t} : Emem x t ↔ ∀ P, All P t → P x

Ordnode.Emem x t ↔ ∀ (P : α → Prop), Ordnode.All P t → P x


theorem gluedLift_p2 : gluedLift 𝒰 f g s ≫ p2 𝒰 f g = s.snd

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

(s : CategoryTheory.Limits.PullbackCone f g)

AlgebraicGeometry.Scheme.Pullback.gluedLift 𝒰 f g s ≫ AlgebraicGeometry.Scheme.Pullback.p2 𝒰 f g = s.snd


theorem projIic_of_mem (hx : x ∈ Iic b) : projIic b x = ⟨x, hx⟩

{α : Type u_1}
[LinearOrder α]
{b x : α}
(hx : x ∈ Set.Iic b)


theorem range_coe : range Real.toEReal = {⊥, ⊤}ᶜ


/-- The type of irreducible closed subsets of a topological space. -/
structure IrreducibleCloseds (α : Type*) [TopologicalSpace α] where
  /-- the carrier set, i.e. the points in this set -/
  carrier : Set α
  is_irreducible' : IsIrreducible carrier
  is_closed' : IsClosed carrier

(self : TopologicalSpace.IrreducibleCloseds α)


theorem lim_le_one (c : CU P) (x : X) : c.lim x ≤ 1

{X : Type u_1}
[TopologicalSpace X]
{P : Set X → Prop}
(c : Urysohns.CU P)
(x : X)


@[to_additive zsmul_nonneg]
theorem one_le_zpow {x : G} (H : 1 ≤ x) {n : ℤ} (hn : 0 ≤ n) : 1 ≤ x ^ n

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


@[simp]
theorem eval_C_mul : (C a * p).eval x = a * p.eval x

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

Polynomial.eval x (Polynomial.C a * p) = a * Polynomial.eval x p


theorem IsCycleOn.zpow_apply_eq {s : Finset α} (hf : f.IsCycleOn s) (ha : a ∈ s) :
    ∀ {n : ℤ}, (f ^ n) a = a ↔ (s.card : ℤ) ∣ n

{α : Type u_2}
{f : Equiv.Perm α}
{a : α}
{s : Finset α}
(hf : f.IsCycleOn ↑s)
(ha : a ∈ s)
{n : ℤ}


@[to_additive]
theorem mul_right_cancel_iff : b * a = c * a ↔ b = c

{G : Type u_1}
[Add G]
[IsRightCancelAdd G]
{a b c : G}


@[arith_mult]
theorem isMultiplicative_pow {k : ℕ} : IsMultiplicative (pow k)


theorem sup_eq_top (h : IsCompl x y) : x ⊔ y = ⊤

{α : Type u_1}
[Lattice α]
[BoundedOrder α]
{x y : α}
(h : IsCompl x y)


nonrec theorem nhds_top_basis : (𝓝 (⊤ : EReal)).HasBasis (fun _ : ℝ ↦ True) (Ioi ·)

(𝓝 ⊤).HasBasis (fun x => True) fun x => Set.Ioi ↑x


{R : Type u}
[CommRing R]
{W : WeierstrassCurve.Affine R}


/-- If a finset `u` is contained in the product of two sets `s * t`, we can find two finsets `s'`,
`t'` such that `s' ⊆ s`, `t' ⊆ t` and `u ⊆ s' * t'`. -/
@[to_additive
      "If a finset `u` is contained in the sum of two sets `s + t`, we can find two finsets
      `s'`, `t'` such that `s' ⊆ s`, `t' ⊆ t` and `u ⊆ s' + t'`."]
theorem subset_mul {s t : Set α} :
    ↑u ⊆ s * t → ∃ s' t' : Finset α, ↑s' ⊆ s ∧ ↑t' ⊆ t ∧ u ⊆ s' * t'

{α : Type u_2}
[DecidableEq α]
[Add α]
{u : Finset α}
{s t : Set α}

↑u ⊆ s + t → ∃ s' t', ↑s' ⊆ s ∧ ↑t' ⊆ t ∧ u ⊆ s' + t'


@[to_additive (attr := simp)]
theorem powersEquivPowers_apply (h : orderOf x = orderOf y) (n : ℕ) :
    powersEquivPowers h ⟨x ^ n, n, rfl⟩ = ⟨y ^ n, n, rfl⟩

{G : Type u_1}
[LeftCancelMonoid G]
[Finite G]
{x y : G}
(h : orderOf x = orderOf y)
(n : ℕ)

(powersEquivPowers h) ⟨x ^ n, ⋯⟩ = ⟨y ^ n, ⋯⟩


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

{K₀ : TopologicalSpace.PositiveCompacts G}

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


/-- The base function from which one will construct a family of bump functions. One could
add more properties if they are useful and satisfied in the examples of inner product spaces
and finite dimensional vector spaces, notably derivative norm control in terms of `R - 1`.

TODO: do we ever need `f x = 1 ↔ ‖x‖ ≤ 1`? -/
-- Porting note(#5171): linter not yet ported; was @[nolint has_nonempty_instance]
structure ContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] where
  /-- The function underlying this family of bump functions -/
  toFun : ℝ → E → ℝ
  mem_Icc : ∀ (R : ℝ) (x : E), toFun R x ∈ Icc (0 : ℝ) 1
  symmetric : ∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x
  smooth : ContDiffOn ℝ ⊤ (uncurry toFun) (Ioi (1 : ℝ) ×ˢ (univ : Set E))
  eq_one : ∀ R : ℝ, 1 < R → ∀ x : E, ‖x‖ ≤ 1 → toFun R x = 1
  support : ∀ R : ℝ, 1 < R → Function.support (toFun R) = Metric.ball (0 : E) R

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(self : ContDiffBumpBase E)
(R : ℝ)

1 < R → ∀ (x : E), ‖x‖ ≤ 1 → self.toFun R x = 1


@[simp]
theorem lift_smul (k : 𝕜) : (k • X).1 = k • X.1

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


@[to_additive (attr := simp)] lemma oneLePart_one : (1 : α)⁺ᵐ = 1


theorem inv_left_mul_aux (hA : A ∈ symplecticGroup l R) : -(J l R * Aᵀ * J l R * A) = 1

{l : Type u_1}
{R : Type u_2}
[DecidableEq l]
[Fintype l]
[CommRing R]
{A : Matrix (l ⊕ l) (l ⊕ l) R}
(hA : A ∈ Matrix.symplecticGroup l R)

-(Matrix.J l R * Aᵀ * Matrix.J l R * A) = 1


/-- `Equiv.mulRight₀` as an order_iso. -/
@[simps! (config := { simpRhs := true })]
def OrderIso.mulRight₀ (a : α) (ha : 0 < a) : α ≃o α

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

(RelIso.symm (OrderIso.mulRight₀ a ha)) x = x * a⁻¹


protected theorem CovBy.grade (h : a ⋖ b) : grade 𝕆 a ⋖ grade 𝕆 b

(𝕆 : Type u_1)
{α : Type u_3}
[Preorder 𝕆]
[Preorder α]
[GradeOrder 𝕆 α]
{a b : α}
(h : a ⋖ b)


lemma next_add (p q : I) (hp : c.Rel p (c.next p)) :
    c.next (p + q) = c.next p + q

{I : Type u_4}
[AddMonoid I]
(c : ComplexShape I)
[c.TensorSigns]
(p q : I)
(hp : c.Rel p (c.next p))


theorem Set.finite_iff_bddAbove [SemilatticeSup α] [LocallyFiniteOrder α] [OrderBot α] :
    s.Finite ↔ BddAbove s

{α : Type u_3}
{s : Set α}
[SemilatticeSup α]
[LocallyFiniteOrder α]
[OrderBot α]


@[simp]
theorem reindexRange_repr (x : M) (i : ι) (h := Set.mem_range_self i) :
    b.reindexRange.repr x ⟨b i, h⟩ = b.repr x i

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
(x : M)
(i : ι)
(h : b i ∈ Set.range ⇑b := ⋯)

(b.reindexRange.repr x) ⟨b i, h⟩ = (b.repr x) i


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

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

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


theorem FiniteDimensional.finrank_eq_zero_of_rank_eq_zero (h : Module.rank R M = 0) :
    finrank R M = 0

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
(h : Module.rank R M = 0)


theorem det_smul (A : Matrix n n R) (c : R) : det (c • A) = c ^ Fintype.card n * det A

{n : Type u_2}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
(A : Matrix n n R)
(c : R)

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


@[simp]
theorem ofBoolRing_add (a b : AsBoolRing α) : ofBoolRing (a + b) = ofBoolRing a ∆ ofBoolRing b

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


/-- The composite of two monoid homomorphisms is a monoid homomorphism. -/
@[to_additive
      "The composite of two additive monoid homomorphisms is an additive monoid
      homomorphism."]
theorem comp (hf : IsMonoidHom f) {γ} [MulOneClass γ] {g : β → γ} (hg : IsMonoidHom g) :
    IsMonoidHom (g ∘ f)

{α : Type u}
{β : Type v}
[AddZeroClass α]
[AddZeroClass β]
{f : α → β}
(hf : IsAddMonoidHom f)
{γ : Type u_1}
[AddZeroClass γ]
{g : β → γ}
(hg : IsAddMonoidHom g)


@[simp]
theorem normSq_natCast (n : ℕ) : normSq n = n * n


@[to_additive]
theorem union_div : (s₁ ∪ s₂) / t = s₁ / t ∪ s₂ / t

{α : Type u_2}
[Sub α]
{s₁ s₂ t : Set α}


@[simp]
theorem sigmaUncurry_add [∀ i j, AddZeroClass (δ i j)] [DecidableEq ι]
    (f g : Π₀ (i) (j), δ i j) :
    sigmaUncurry (f + g) = sigmaUncurry f + sigmaUncurry g

[(i : ι) → (j : α i) → AddZeroClass (δ i j)]

(f + g).sigmaUncurry = f.sigmaUncurry + g.sigmaUncurry


theorem UniqueDiffWithinAt.inter' (hs : UniqueDiffWithinAt 𝕜 s x) (ht : t ∈ 𝓝[s] x) :
    UniqueDiffWithinAt 𝕜 (s ∩ t) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}
{s t : Set E}
(hs : UniqueDiffWithinAt 𝕜 s x)
(ht : t ∈ 𝓝[s] x)


theorem rank_commutator_le_card [Finite (commutatorSet G)] :
    Group.rank (commutator G) ≤ Nat.card (commutatorSet G)

(G : Type u)
[Group G]
[Finite ↑(commutatorSet G)]

Group.rank ↥(commutator G) ≤ Nat.card ↑(commutatorSet G)


theorem append_ne_nil_of_ne_nil_right (s t : List α) : t ≠ [] → s ++ t ≠ []


theorem hasPullback_assoc [HasPullback (g₂ ≫ f₃) f₄] : HasPullback f₁ (g₃ ≫ f₂)

[CategoryTheory.Limits.HasPullback (CategoryTheory.Limits.pullback.snd f₁ f₂ ≫ f₃) f₄]

CategoryTheory.Limits.HasPullback f₁ (CategoryTheory.Limits.pullback.fst f₃ f₄ ≫ f₂)


theorem limsup_le_iSup {f : Filter β} {u : β → α} : limsup u f ≤ ⨆ n, u n

{α : Type u_1}
{β : Type u_2}
[CompleteLattice α]
{f : Filter β}
{u : β → α}


theorem compl_le_of_compl_le (h : yᶜ ≤ x) : xᶜ ≤ y

{α : Type u}
{x y : α}
[BooleanAlgebra α]
(h : yᶜ ≤ x)


theorem getElem!_pos [GetElem? cont idx elem dom] [LawfulGetElem cont idx elem dom]
    [Inhabited elem] (c : cont) (i : idx) (h : dom c i) [Decidable (dom c i)] :
    c[i]! = c[i]'h

{cont : Type u_1}
{idx : Type u_2}
{elem : Type u_3}
{dom : cont → idx → Prop}
[GetElem? cont idx elem dom]
[LawfulGetElem cont idx elem dom]
[Inhabited elem]
(c : cont)
(i : idx)
(h : dom c i)
[Decidable (dom c i)]


@[simp]
theorem coe_copy (Q : QuadraticMap R M N) (Q' : M → N) (h : Q' = ⇑Q) : ⇑(Q.copy Q' h) = Q'

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
(Q : QuadraticMap R M N)
(Q' : M → N)
(h : Q' = ⇑Q)


@[to_additive]
lemma op_smul_eq_op_smul_op [SMul M α] [SMul Mᵐᵒᵖ α] [IsCentralScalar M α] (r : M) (a : α) :
    op (r • a) = op r • op a

{M : Type u_2}
{α : Type u_4}
[VAdd M α]
[VAdd Mᵃᵒᵖ α]
[IsCentralVAdd M α]
(r : M)
(a : α)

AddOpposite.op (r +ᵥ a) = AddOpposite.op r +ᵥ AddOpposite.op a


theorem atTop_basis [Nonempty α] [SemilatticeSup α] : (@atTop α _).HasBasis (fun _ => True) Ici

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

Filter.atTop.HasBasis (fun x => True) Set.Ici


theorem measurable_tProd_elim [DecidableEq δ] :
    ∀ {l : List δ} {i : δ} (hi : i ∈ l), Measurable fun v : TProd π l => v.elim hi

{δ : Type u_4}
{π : δ → Type u_6}
[(x : δ) → MeasurableSpace (π x)]
[DecidableEq δ]
{l : List δ}
{i : δ}
(hi : i ∈ l)


theorem ContinuousOn.compMeasurePreservingLp (hf : ContinuousOn f s)
    (hg : ContinuousOn g s) (hgm : ∀ z, MeasurePreserving (g z) μ ν) (hp : p ≠ ∞) :
    ContinuousOn (fun z ↦ Lp.compMeasurePreserving (g z) (hgm z) (f z)) s

(hgm : ∀ (z : Z), MeasureTheory.MeasurePreserving (⇑(g z)) μ ν)

ContinuousOn (fun z => (MeasureTheory.Lp.compMeasurePreserving ⇑(g z) ⋯) (f z)) s


@[to_additive]
theorem IsOpen.closure_mul (ht : IsOpen t) (s : Set G) : closure s * t = s * t

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


@[to_additive (attr := simp)]
theorem symm_mk (f : M ≃ N) (h) :
    (MulEquiv.mk f h).symm = ⟨f.symm, (MulEquiv.mk f h).symm_map_mul⟩

(h : ∀ (x y : M), f.toFun (x * y) = f.toFun x * f.toFun y)

{ toEquiv := f, map_mul' := h }.symm = { toEquiv := f.symm, map_mul' := ⋯ }


theorem SupPrime.ne_bot (ha : SupPrime a) : a ≠ ⊥

{α : Type u_2}
[SemilatticeSup α]
{a : α}
[OrderBot α]
(ha : SupPrime a)


theorem measurableSet_iInf {ι} {m : ι → MeasurableSpace α} {s : Set α} :
    MeasurableSet[iInf m] s ↔ ∀ i, MeasurableSet[m i] s

{α : Type u_1}
{ι : Sort u_7}
{m : ι → MeasurableSpace α}
{s : Set α}

MeasurableSet s ↔ ∀ (i : ι), MeasurableSet s


/-- Normalized GCD monoid: a `CancelCommMonoidWithZero` with normalization and `gcd`
(greatest common divisor) and `lcm` (least common multiple) operations. In this setting `gcd` and
`lcm` form a bounded lattice on the associated elements where `gcd` is the infimum, `lcm` is the
supremum, `1` is bottom, and `0` is top. The type class focuses on `gcd` and we derive the
corresponding `lcm` facts from `gcd`.
-/
class NormalizedGCDMonoid (α : Type*) [CancelCommMonoidWithZero α] extends NormalizationMonoid α,
  GCDMonoid α where
  /-- The GCD is normalized to itself. -/
  normalize_gcd : ∀ a b, normalize (gcd a b) = gcd a b
  /-- The LCM is normalized to itself. -/
  normalize_lcm : ∀ a b, normalize (lcm a b) = lcm a b

{α : Type u_2}
[CancelCommMonoidWithZero α]
[self : NormalizedGCDMonoid α]
(a b : α)


theorem toEquiv_injective : Injective (toEquiv : α ≃ᵐ β → α ≃ β)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[MeasurableSpace β]


theorem mem_toCone' : x ∈ hs.toCone s ↔ ∃ c : 𝕜, 0 < c ∧ c • x ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
{x : E}

x ∈ Convex.toCone s hs ↔ ∃ c, 0 < c ∧ c • x ∈ s


theorem antitone_lowerCentralSeries : Antitone <| lowerCentralSeries R L M

(R : Type u)
(L : Type v)
(M : Type w)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]

Antitone (LieModule.lowerCentralSeries R L M)


@[simp]
theorem coe_basisOneI_repr (z : ℂ) : ⇑(basisOneI.repr z) = ![z.re, z.im]

⇑(Complex.basisOneI.repr z) = ![z.re, z.im]


theorem set_next_add (s : String) (i : Pos) (c : Char) (b₁ b₂)
    (h : (s.next i).1 + b₁ = s.endPos.1 + b₂) :
    ((s.set i c).next i).1 + b₁ = (s.set i c).endPos.1 + b₂

(h : (s.next i).byteIdx + b₁ = s.endPos.byteIdx + b₂)

((s.set i c).next i).byteIdx + b₁ = (s.set i c).endPos.byteIdx + b₂


/-- Congruence relations equal the smallest congruence relation in which they are contained. -/
@[to_additive (attr := simp) addConGen_of_addCon "Additive congruence relations equal the smallest
additive congruence relation in which they are contained."]
theorem conGen_of_con (c : Con M) : conGen c = c


@[to_additive]
theorem not_one_mem_div_iff : (1 : α) ∉ s / t ↔ Disjoint s t


@[simp]
theorem csSup_Ioo [DenselyOrdered α] (h : a < b) : sSup (Ioo a b) = b

{α : Type u_1}
[ConditionallyCompleteLattice α]
{a b : α}
[DenselyOrdered α]
(h : a < b)


lemma natCast_ne_zero_iff_pos {n : ℕ} : (n : ℤ) ≠ 0 ↔ 0 < n


@[simp]
theorem coe_inf [FaithfulSMul M X] (P Q : { P : M // IsLprojection X P }) :
    ↑(P ⊓ Q) = (↑P : M) * ↑Q

{X : Type u_1}
[NormedAddCommGroup X]
{M : Type u_2}
[Ring M]
[Module M X]
[FaithfulSMul M X]
(P Q : { P // IsLprojection X P })


private theorem bound' : Tendsto (fun n : ℕ => ‖F.derivative.eval a‖ * T ^ 2 ^ n) atTop (𝓝 0)

(hnorm : ‖Polynomial.eval a F‖ < ‖Polynomial.eval a (Polynomial.derivative F)‖ ^ 2)

Filter.Tendsto (fun n => ‖Polynomial.eval a (Polynomial.derivative F)‖ * T_gen p F a ^ 2 ^ n) Filter.atTop (𝓝 0)


@[ext]
theorem ext {S T : VonNeumannAlgebra H} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T

{H : Type u}
[NormedAddCommGroup H]
[InnerProductSpace ℂ H]
[CompleteSpace H]
{S T : VonNeumannAlgebra H}
(h : ∀ (x : H →L[ℂ] H), x ∈ S ↔ x ∈ T)


lemma Set.Infinite.exists_accPt_of_subset_isCompact {K : Set X} (hs : s.Infinite)
    (hK : IsCompact K) (hsub : s ⊆ K) : ∃ x ∈ K, AccPt x (𝓟 s)

{X : Type u}
[TopologicalSpace X]
{s K : Set X}
(hs : s.Infinite)
(hK : IsCompact K)
(hsub : s ⊆ K)


theorem factors_add {X Y : C} {P : Subobject Y} (f g : X ⟶ Y) (wf : P.Factors f)
    (wg : P.Factors g) : P.Factors (f + g)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
{X Y : C}
{P : CategoryTheory.Subobject Y}
(f g : X ⟶ Y)
(wf : P.Factors f)
(wg : P.Factors g)


@[simp]
theorem inl_pushoutZeroZeroIso_inv (X Y : C) [HasBinaryCoproduct X Y] :
    coprod.inl ≫ (pushoutZeroZeroIso X Y).inv = pushout.inl _ _

CategoryTheory.Limits.coprod.inl ≫ (CategoryTheory.Limits.pushoutZeroZeroIso X Y).inv =
  CategoryTheory.Limits.pushout.inl 0 0


@[simp]
theorem Γ_map {X Y : Schemeᵒᵖ} (f : X ⟶ Y) : Γ.map f = f.unop.app ⊤

{X Y : AlgebraicGeometry.Schemeᵒᵖ}
(f : X ⟶ Y)

AlgebraicGeometry.Scheme.Γ.map f = AlgebraicGeometry.Scheme.Hom.app f.unop ⊤


theorem IsMinFilter.comp_mono (hf : IsMinFilter f l a) {g : β → γ} (hg : Monotone g) :
    IsMinFilter (g ∘ f) l a

{α : Type u}
{β : Type v}
{γ : Type w}
[Preorder β]
[Preorder γ]
{f : α → β}
{l : Filter α}
{a : α}
(hf : IsMinFilter f l a)
{g : β → γ}
(hg : Monotone g)


theorem nrRealPlaces_eq_zero_of_two_lt (hk : 2 < k) (hζ : IsPrimitiveRoot ζ k) :
    NumberField.InfinitePlace.NrRealPlaces K = 0

{K : Type u_1}
[Field K]
[NumberField K]
{ζ : K}
{k : ℕ}
(hk : 2 < k)
(hζ : IsPrimitiveRoot ζ k)


@[to_additive prod_mono]
theorem prod_mono : ((· ≤ ·) ⇒ (· ≤ ·) ⇒ (· ≤ ·)) (@prod G _ N _) (@prod G _ N _)

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]

((fun x x_1 => x ≤ x_1) ⇒ (fun x x_1 => x ≤ x_1) ⇒ fun x x_1 => x ≤ x_1) Subgroup.prod Subgroup.prod


theorem IsSpanning.card_verts [Fintype V] {G' : Subgraph G} [Fintype G'.verts] (h : G'.IsSpanning) :
    G'.verts.toFinset.card = Fintype.card V

{V : Type u}
{G : SimpleGraph V}
[Fintype V]
{G' : G.Subgraph}
[Fintype ↑G'.verts]
(h : G'.IsSpanning)


theorem logb_nonpos (hx : 0 ≤ x) (h'x : x ≤ 1) : logb b x ≤ 0


/-- This is a mixin class describing a locally finite order,
that is, is an order where bounded intervals are finite.
When you don't care too much about definitional equality, you can use `LocallyFiniteOrder.ofIcc` or
`LocallyFiniteOrder.ofFiniteIcc` to build a locally finite order from just `Finset.Icc`. -/
class LocallyFiniteOrder (α : Type*) [Preorder α] where
  /-- Left-closed right-closed interval -/
  finsetIcc : α → α → Finset α
  /-- Left-closed right-open interval -/
  finsetIco : α → α → Finset α
  /-- Left-open right-closed interval -/
  finsetIoc : α → α → Finset α
  /-- Left-open right-open interval -/
  finsetIoo : α → α → Finset α
  /-- `x ∈ finsetIcc a b ↔ a ≤ x ∧ x ≤ b` -/
  finset_mem_Icc : ∀ a b x : α, x ∈ finsetIcc a b ↔ a ≤ x ∧ x ≤ b
  /-- `x ∈ finsetIco a b ↔ a ≤ x ∧ x < b` -/
  finset_mem_Ico : ∀ a b x : α, x ∈ finsetIco a b ↔ a ≤ x ∧ x < b
  /-- `x ∈ finsetIoc a b ↔ a < x ∧ x ≤ b` -/
  finset_mem_Ioc : ∀ a b x : α, x ∈ finsetIoc a b ↔ a < x ∧ x ≤ b
  /-- `x ∈ finsetIoo a b ↔ a < x ∧ x < b` -/
  finset_mem_Ioo : ∀ a b x : α, x ∈ finsetIoo a b ↔ a < x ∧ x < b

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

x ∈ LocallyFiniteOrder.finsetIcc a b ↔ a ≤ x ∧ x ≤ b


@[simp]
lemma properDivisors_eq_empty : n.properDivisors = ∅ ↔ n ≤ 1


theorem Set.Finite.isBounded [Bornology α] {s : Set α} (hs : s.Finite) : IsBounded s

{α : Type u_2}
[Bornology α]
{s : Set α}
(hs : s.Finite)


theorem mk_compl_of_infinite {α : Type*} [Infinite α] (s : Set α) (h2 : #s < #α) :
    #(sᶜ : Set α) = #α

{α : Type u_1}
[Infinite α]
(s : Set α)
(h2 : #↑s < #α)


theorem DifferentiableAt.comp' {f : E → F} {g : F → G} (hg : DifferentiableAt K g (f x))
    (hf : DifferentiableAt K f x) : DifferentiableAt K (fun x => g (f x)) x

{K : Type u_1}
[NontriviallyNormedField K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace K F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace K G]
{x : E}
{f : E → F}
{g : F → G}
(hg : DifferentiableAt K g (f x))
(hf : DifferentiableAt K f x)


theorem moebius_apply_prime_pow {p k : ℕ} (hp : p.Prime) (hk : k ≠ 0) :
    μ (p ^ k) = if k = 1 then -1 else 0

{p k : ℕ}
(hp : Nat.Prime p)
(hk : k ≠ 0)

ArithmeticFunction.moebius (p ^ k) = if k = 1 then -1 else 0


theorem isPeriodicPt_of_mem_periodicPts_of_isPeriodicPt_iterate (hx : x ∈ periodicPts f)
    (hm : IsPeriodicPt f m (f^[n] x)) : IsPeriodicPt f m x

(hm : Function.IsPeriodicPt f m (f^[n] x))


theorem OrderHom.antisymmetrization_apply (f : α →o β) (a : Antisymmetrization α (· ≤ ·)) :
    f.antisymmetrization a = Quotient.map' f (liftFun_antisymmRel f) a

(a : Antisymmetrization α fun x x_1 => x ≤ x_1)

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


@[simp]
theorem countP_sub [DecidableEq α] {s t : Multiset α} (h : t ≤ s) :
    countP p (s - t) = countP p s - countP p t

{α : Type u_1}
(p : α → Prop)
[DecidablePred p]
[DecidableEq α]
{s t : Multiset α}
(h : t ≤ s)

Multiset.countP p (s - t) = Multiset.countP p s - Multiset.countP p t


@[to_additive]
theorem map_iSup {ι : Sort*} (f : F) (s : ι → Submonoid M) : (iSup s).map f = ⨆ i, (s i).map f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{ι : Sort u_5}
(f : F)
(s : ι → AddSubmonoid M)

AddSubmonoid.map f (iSup s) = ⨆ i, AddSubmonoid.map f (s i)


theorem init_def {n : ℕ} {α : Fin (n + 1) → Type*} {q : ∀ i, α i} :
    (init fun k : Fin (n + 1) ↦ q k) = fun k : Fin n ↦ q (castSucc k)

{n : ℕ}
{α : Fin (n + 1) → Type u_1}
{q : (i : Fin (n + 1)) → α i}

(Fin.init fun k => q k) = fun k => q k.castSucc


theorem toFinsupp_eq_iff {s : Multiset α} {f : α →₀ ℕ} :
    toFinsupp s = f ↔ s = Finsupp.toMultiset f

{α : Type u_1}
[DecidableEq α]
{s : Multiset α}
{f : α →₀ ℕ}

Multiset.toFinsupp s = f ↔ s = Finsupp.toMultiset f


@[fun_prop]
nonrec theorem HasFDerivAt.const_smul (h : HasFDerivAt f f' x) (c : R) :
    HasFDerivAt (fun x => c • f x) (c • f') x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{R : Type u_6}
[Semiring R]
[Module R F]
[SMulCommClass 𝕜 R F]
[ContinuousConstSMul R F]
(h : HasFDerivAt f f' x)
(c : R)


@[simp]
theorem agree_trival {x : CofixA F 0} {y : CofixA F 1} : Agree x y

{F : PFunctor.{u}}
{x : PFunctor.Approx.CofixA F 0}
{y : PFunctor.Approx.CofixA F 1}


theorem support_tsub {f1 f2 : ι →₀ α} : (f1 - f2).support ⊆ f1.support

{ι : Type u_1}
{α : Type u_2}
[CanonicallyOrderedAddCommMonoid α]
[Sub α]
[OrderedSub α]
{f1 f2 : ι →₀ α}


theorem isBigO_const_of_ne {c : F''} (hc : c ≠ 0) :
    (f =O[l] fun _x => c) ↔ IsBoundedUnder (· ≤ ·) l (norm ∘ f)

{α : Type u_1}
{E : Type u_3}
{F'' : Type u_10}
[Norm E]
[NormedAddCommGroup F'']
{f : α → E}
{l : Filter α}
{c : F''}
(hc : c ≠ 0)

(f =O[l] fun _x => c) ↔ Filter.IsBoundedUnder (fun x x_1 => x ≤ x_1) l (norm ∘ f)


theorem mem_nhdsWithin_iff_exists_mem_nhds_inter {t : Set α} {a : α} {s : Set α} :
    t ∈ 𝓝[s] a ↔ ∃ u ∈ 𝓝 a, u ∩ s ⊆ t

{α : Type u_1}
[TopologicalSpace α]
{t : Set α}
{a : α}
{s : Set α}


theorem mem_lieSpan {x : M} : x ∈ lieSpan R L s ↔ ∀ N : LieSubmodule R L M, s ⊆ N → x ∈ N

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
{s : Set M}
{x : M}

x ∈ LieSubmodule.lieSpan R L s ↔ ∀ (N : LieSubmodule R L M), s ⊆ ↑N → x ∈ N


@[simp]
theorem postComp_φ : (f.postComp h).φ = f.φ ≫ h

(f : AlgebraicTopology.DoldKan.MorphComponents X n Z)


theorem natCast_inj {m n : ℕ} : (m : Cardinal) = n ↔ m = n


theorem smulRight_comp [ContinuousMul R₁] {x : M₂} {c : R₁} :
    (smulRight (1 : R₁ →L[R₁] R₁) x).comp (smulRight (1 : R₁ →L[R₁] R₁) c) =
      smulRight (1 : R₁ →L[R₁] R₁) (c • x)

{R₁ : Type u_1}
[Semiring R₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₂]
[TopologicalSpace R₁]
[ContinuousSMul R₁ M₂]
[ContinuousMul R₁]
{x : M₂}
{c : R₁}

(ContinuousLinearMap.smulRight 1 x).comp (ContinuousLinearMap.smulRight 1 c) = ContinuousLinearMap.smulRight 1 (c • x)


@[simp]
theorem length_think (s : Computation α) [h : Terminates s] : length (think s) = length s + 1

{α : Type u}
(s : Computation α)
[h : s.Terminates]


theorem const_bind_eq_comp_const (κ : Kernel α β) (μ : Measure α) :
    const α (μ.bind κ) = κ ∘ₖ const α μ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
(κ : ProbabilityTheory.Kernel α β)
(μ : MeasureTheory.Measure α)

ProbabilityTheory.Kernel.const α (μ.bind ⇑κ) = κ ∘ₖ ProbabilityTheory.Kernel.const α μ


/-- When `x` is fixed, `(f : α →ᵇ β) ↦ f x` is continuous. -/
@[continuity]
theorem continuous_eval_const {x : α} : Continuous fun f : α →ᵇ β => f x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
{x : α}


theorem rpow_lt_one {x : ℝ≥0∞} {z : ℝ} (hx : x < 1) (hz : 0 < z) : x ^ z < 1


@[simp]
theorem coe_top : ↑(⊤ : ConvexCone 𝕜 E) = (univ : Set E)

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


/-- If `p` is a maximal ideal of `R`, `S` extends `R` and `P^e` lies over `p`,
then the dimension `[S/(P^e) : R/p]` is equal to `e * [S/P : R/p]`. -/
theorem rank_prime_pow_ramificationIdx [IsDedekindDomain S] [p.IsMaximal] [P.IsPrime]
    (hP0 : P ≠ ⊥) (he : e ≠ 0) :
    Module.rank (R ⧸ p) (S ⧸ P ^ e) =
      e •
        @Module.rank (R ⧸ p) (S ⧸ P) _ _
          (@Algebra.toModule _ _ _ _ <|
            @Quotient.algebraQuotientOfRamificationIdxNeZero _ _ _ _ _ _ _ ⟨he⟩)

{R : Type u}
[CommRing R]
{S : Type v}
[CommRing S]
(f : R →+* S)
(p : Ideal R)
(P : Ideal S)
[IsDedekindDomain S]
[p.IsMaximal]
[P.IsPrime]
(hP0 : P ≠ ⊥)
(he : Ideal.ramificationIdx f p P ≠ 0)

Module.rank (R ⧸ p) (S ⧸ P ^ Ideal.ramificationIdx f p P) = Ideal.ramificationIdx f p P • Module.rank (R ⧸ p) (S ⧸ P)


@[to_additive]
theorem orderOf_eq_card_of_forall_mem_zpowers [Fintype α] {g : α} (hx : ∀ x, x ∈ zpowers g) :
    orderOf g = Fintype.card α

(hx : ∀ (x : α), x ∈ AddSubgroup.zmultiples g)


theorem isRotated_reverse_comm_iff : l.reverse ~r l' ↔ l ~r l'.reverse


theorem Basis'.mem_of_insert_indep (hI : M.Basis' I X) (he : e ∈ X) (hIe : M.Indep (insert e I)) :
    e ∈ I

{α : Type u_1}
{M : Matroid α}
{I X : Set α}
{e : α}
(hI : M.Basis' I X)
(he : e ∈ X)
(hIe : M.Indep (insert e I))


theorem HasDerivAtFilter.scomp (hg : HasDerivAtFilter g₁ g₁' (h x) L')
    (hh : HasDerivAtFilter h h' x L) (hL : Tendsto h L L') :
    HasDerivAtFilter (g₁ ∘ h) (h' • g₁') x L

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
{L : Filter 𝕜}
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
{h : 𝕜 → 𝕜'}
{h' : 𝕜'}
{g₁ : 𝕜' → F}
{g₁' : F}
{L' : Filter 𝕜'}
(hg : HasDerivAtFilter g₁ g₁' (h x) L')
(hh : HasDerivAtFilter h h' x L)
(hL : Filter.Tendsto h L L')


/-- An auxiliary result en route to `blimsup_thickening_mul_ae_eq`. -/
theorem blimsup_thickening_mul_ae_eq_aux (p : ℕ → Prop) (s : ℕ → Set α) {M : ℝ} (hM : 0 < M)
    (r : ℕ → ℝ) (hr : Tendsto r atTop (𝓝 0)) (hr' : ∀ᶠ i in atTop, p i → 0 < r i) :
    (blimsup (fun i => thickening (M * r i) (s i)) atTop p : Set α) =ᵐ[μ]
      (blimsup (fun i => thickening (r i) (s i)) atTop p : Set α)

(hr : Filter.Tendsto r Filter.atTop (𝓝 0))

(hr' : ∀ᶠ (i : ℕ) in Filter.atTop, p i → 0 < r i)

Filter.blimsup (fun i => Metric.thickening (M * r i) (s i)) Filter.atTop p =ᵐ[μ]
  Filter.blimsup (fun i => Metric.thickening (r i) (s i)) Filter.atTop p


theorem eLpNormEssSup_indicator_const_le (s : Set α) (c : G) :
    eLpNormEssSup (s.indicator fun _ : α => c) μ ≤ ‖c‖₊

{α : Type u_1}
{G : Type u_4}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup G]
(s : Set α)
(c : G)

MeasureTheory.eLpNormEssSup (s.indicator fun x => c) μ ≤ ↑‖c‖₊


lemma restrictSubtype_inter_indep_iff :
    (M.restrictSubtype X).Indep (X ↓∩ I) ↔ M.Indep (X ∩ I)

{α : Type u_1}
{X I : Set α}
{M : Matroid α}


@[simp]
theorem mem_glpos (A : GL n R) : A ∈ GLPos n R ↔ 0 < (Matrix.GeneralLinearGroup.det A : R)

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

A ∈ Matrix.GLPos n R ↔ 0 < ↑(Matrix.GeneralLinearGroup.det A)


/-- `X ⨯ -` has a comonad structure. This is sometimes called the writer comonad. -/
@[simps!]
def prodComonad : Comonad C

(CategoryTheory.prodComonad X).map g = CategoryTheory.Limits.prod.map (CategoryTheory.CategoryStruct.id X) g


/-- A local minimum of a convex function is a global minimum, restricted to a set `s`.
-/
theorem IsMinOn.of_isLocalMinOn_of_convexOn {f : E → β} {a : E} (a_in_s : a ∈ s)
    (h_localmin : IsLocalMinOn f s a) (h_conv : ConvexOn ℝ s f) : IsMinOn f s a

{E : Type u_1}
{β : Type u_2}
[AddCommGroup E]
[TopologicalSpace E]
[Module ℝ E]
[TopologicalAddGroup E]
[ContinuousSMul ℝ E]
[OrderedAddCommGroup β]
[Module ℝ β]
[OrderedSMul ℝ β]
{s : Set E}
{f : E → β}
{a : E}
(a_in_s : a ∈ s)
(h_localmin : IsLocalMinOn f s a)
(h_conv : ConvexOn ℝ s f)


lemma MonotoneOn.image_Iic_subset (h : MonotoneOn f (Iic b)) : f '' Iic b ⊆ Iic (f b)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : MonotoneOn f (Set.Iic b))


/-- `WithLp.equiv` as a continuous linear equivalence. -/
@[simps! (config := .asFn) apply symm_apply]
protected def prodContinuousLinearEquiv : WithLp p (α × β) ≃L[𝕜] α × β

(p : ℝ≥0∞)
(𝕜 : Type u_1)
(α : Type u_2)
(β : Type u_3)
[TopologicalSpace α]
[TopologicalSpace β]
[Semiring 𝕜]
[AddCommGroup α]
[AddCommGroup β]
[Module 𝕜 α]
[Module 𝕜 β]

⇑(WithLp.prodContinuousLinearEquiv p 𝕜 α β) = ⇑(WithLp.equiv p (α × β))


@[to_additive (attr := simp)]
theorem coe_mulLeft (g : G) : ⇑(mulLeft g) = (g * ·)

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd G]
(g : G)

⇑(MeasurableEquiv.addLeft g) = fun x => g + x


/-- Assemble an `I`-indexed family of equivalences of categories
into a single equivalence. -/
@[simps]
def pi (E : ∀ i, C i ≌ D i) : (∀ i, C i) ≌ (∀ i, D i)

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

[(i : I) → CategoryTheory.Category.{v₂, u₂} (D i)]

(CategoryTheory.Equivalence.pi E).inverse = CategoryTheory.Functor.pi fun i => (E i).inverse


theorem extend_target_subset_range : (f.extend I).target ⊆ range I

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


/-- This is the computation performed in the proof of [Halmos, §60 Th. A]. -/
@[to_additive "This is the computation performed in the proof of [Halmos, §60 Th. A]."]
theorem measure_mul_lintegral_eq [IsMulLeftInvariant ν] (sm : MeasurableSet s) (f : G → ℝ≥0∞)
    (hf : Measurable f) : (μ s * ∫⁻ y, f y ∂ν) = ∫⁻ x, ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ

{G : Type u_1}
[MeasurableSpace G]
[AddGroup G]
[MeasurableAdd₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
{s : Set G}
[MeasurableNeg G]
[μ.IsAddLeftInvariant]
[ν.IsAddLeftInvariant]
(sm : MeasurableSet s)
(f : G → ℝ≥0∞)
(hf : Measurable f)

μ s * ∫⁻ (y : G), f y ∂ν = ∫⁻ (x : G), ν ((fun z => z + x) ⁻¹' s) * f (-x) ∂μ


/-- A set of cardinals is bounded above iff it's small, i.e. it corresponds to a usual ZFC set. -/
theorem bddAbove_iff_small {s : Set Cardinal.{u}} : BddAbove s ↔ Small.{u} s


@[to_additive (attr := simp)]
theorem haar_singleton [TopologicalGroup G] [BorelSpace G] (g : G) : μ {g} = μ {(1 : G)}

{G : Type u_2}
[MeasurableSpace G]
[Group G]
[TopologicalSpace G]
(μ : MeasureTheory.Measure G)
[μ.IsHaarMeasure]
[TopologicalGroup G]
[BorelSpace G]
(g : G)


@[reassoc (attr := simp)]
lemma biprod_inl_desc_f (α : K ⟶ M) (β : L ⟶ M) (i : ι) :
    (biprod.inl : K ⟶ K ⊞ L).f i ≫ (biprod.desc α β).f i = α.f i

[∀ (i : ι), CategoryTheory.Limits.HasBinaryBiproduct (K.X i) (L.X i)]

CategoryTheory.Limits.biprod.inl.f i ≫ (CategoryTheory.Limits.biprod.desc α β).f i = α.f i


@[simp]
theorem inclusion_self {S : NonUnitalSubalgebra R A} :
    inclusion (le_refl S) = NonUnitalAlgHom.id R S

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

NonUnitalSubalgebra.inclusion ⋯ = NonUnitalAlgHom.id R ↥S


@[simp]
theorem drop_one : ∀ l : List α, drop 1 l = tail l


@[simp]
theorem Real.Angle.expMapCircle_add (θ₁ θ₂ : Real.Angle) : Real.Angle.expMapCircle (θ₁ + θ₂) =
    Real.Angle.expMapCircle θ₁ * Real.Angle.expMapCircle θ₂

(θ₁ + θ₂).expMapCircle = θ₁.expMapCircle * θ₂.expMapCircle


/-- Two `R`-linear maps from `Π₀ i, M i` which agree on each `single i x` agree everywhere. -/
theorem lhom_ext ⦃φ ψ : (Π₀ i, M i) →ₗ[R] N⦄ (h : ∀ i x, φ (single i x) = ψ (single i x)) : φ = ψ

(h : ∀ (i : ι) (x : M i), φ (DFinsupp.single i x) = ψ (DFinsupp.single i x))


@[simp]
theorem isCircuit_copy {u u'} (p : G.Walk u u) (hu : u = u') :
    (p.copy hu hu).IsCircuit ↔ p.IsCircuit

{V : Type u}
{G : SimpleGraph V}
{u u' : V}
(p : G.Walk u u)
(hu : u = u')


@[reassoc (attr := simp)]
theorem naturality_2' (α : F ⟶ G) (f : X ⟶ Y) {_ : IsIso (α.app Y)} :
    α.app X ≫ G.map f ≫ inv (α.app Y) = F.map f

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

∀ {x : CategoryTheory.IsIso (α.app Y)}, α.app X ≫ G.map f ≫ CategoryTheory.inv (α.app Y) = F.map f


theorem le_one (i : ι) (x : X) : f i x ≤ 1

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(f : BumpCovering ι X s)
(i : ι)
(x : X)


theorem selfZPow_pow_sub (a : R) (b : B) (m d : ℤ) :
    selfZPow x B (m - d) * mk' B a (1 : Submonoid.powers x) = b ↔
      selfZPow x B m * mk' B a (1 : Submonoid.powers x) = selfZPow x B d * b

{R : Type u_1}
[CommRing R]
(x : R)
(B : Type u_2)
[CommRing B]
[Algebra R B]
[IsLocalization.Away x B]
(a : R)
(b : B)
(m d : ℤ)

selfZPow x B (m - d) * IsLocalization.mk' B a 1 = b ↔ selfZPow x B m * IsLocalization.mk' B a 1 = selfZPow x B d * b


theorem norm_condexpL2_coe_le (hm : m ≤ m0) (f : α →₂[μ] E) :
    ‖(condexpL2 E 𝕜 hm f : α →₂[μ] E)‖ ≤ ‖f‖

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_7}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[CompleteSpace E]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(hm : m ≤ m0)
(f : ↥(MeasureTheory.Lp E 2 μ))

‖↑((MeasureTheory.condexpL2 E 𝕜 hm) f)‖ ≤ ‖f‖


theorem HasGradientAtFilter.hasDerivAtFilter (h : HasGradientAtFilter g g' u L') :
    HasDerivAtFilter g (starRingEnd 𝕜 g') u L'

{𝕜 : Type u_1}
[RCLike 𝕜]
{g : 𝕜 → 𝕜}
{g' u : 𝕜}
{L' : Filter 𝕜}
(h : HasGradientAtFilter g g' u L')

HasDerivAtFilter g ((starRingEnd 𝕜) g') u L'


@[reassoc (attr := simp)]
theorem isoPullback_inv_snd (h : IsPullback fst snd f g) [HasPullback f g] :
    h.isoPullback.inv ≫ snd = pullback.snd _ _

(h : CategoryTheory.IsPullback fst snd f g)

h.isoPullback.inv ≫ snd = CategoryTheory.Limits.pullback.snd f g


/-- Ring homomorphisms preserve subtraction. -/
theorem map_sub (hf : IsRingHom f) : f (x - y) = f x - f y

{α : Type u}
{β : Type v}
[Ring α]
[Ring β]
{f : α → β}
{x y : α}
(hf : IsRingHom f)


@[simp]
theorem extract_eq_lookup_erase (a : α) (s : Finmap β) : extract a s = (lookup a s, erase a s)

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(a : α)
(s : Finmap β)

Finmap.extract a s = (Finmap.lookup a s, Finmap.erase a s)


@[to_additive]
theorem Filter.mulIndicator_const_eventuallyEq [One β] {l : Filter α} {c : β} (hc : c ≠ 1)
    {s t : Set α} : s.mulIndicator (fun _ ↦ c) =ᶠ[l] t.mulIndicator (fun _ ↦ c) ↔ s =ᶠ[l] t

{α : Type u_1}
{β : Type u_2}
[One β]
{l : Filter α}
{c : β}
(hc : c ≠ 1)
{s t : Set α}

((s.mulIndicator fun x => c) =ᶠ[l] t.mulIndicator fun x => c) ↔ s =ᶠ[l] t


@[to_additive]
theorem tprod_div (hf : Multipliable f) (hg : Multipliable g) :
    ∏' b, (f b / g b) = (∏' b, f b) / ∏' b, g b

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f g : β → α}
[T2Space α]
(hf : Multipliable f)
(hg : Multipliable g)


/-- Reduction to diagonal form by elementary operations is invariant under reindexing. -/
theorem reindex_exists_list_transvec_mul_mul_list_transvec_eq_diagonal (M : Matrix p p 𝕜)
    (e : p ≃ n)
    (H :
      ∃ (L L' : List (TransvectionStruct n 𝕜)) (D : n → 𝕜),
        (L.map toMatrix).prod * Matrix.reindexAlgEquiv 𝕜 _ e M * (L'.map toMatrix).prod =
          diagonal D) :
    ∃ (L L' : List (TransvectionStruct p 𝕜)) (D : p → 𝕜),
      (L.map toMatrix).prod * M * (L'.map toMatrix).prod = diagonal D

(H :
  ∃ L L' D,
    (List.map Matrix.TransvectionStruct.toMatrix L).prod * (Matrix.reindexAlgEquiv 𝕜 𝕜 e) M *
        (List.map Matrix.TransvectionStruct.toMatrix L').prod =
      Matrix.diagonal D)

∃ L L' D,
  (List.map Matrix.TransvectionStruct.toMatrix L).prod * M * (List.map Matrix.TransvectionStruct.toMatrix L').prod =
    Matrix.diagonal D


protected theorem Decidable.not_exists_not {p : α → Prop} [∀ x, Decidable (p x)] :
    (¬∃ x, ¬p x) ↔ ∀ x, p x

{α : Sort u_1}
{p : α → Prop}
[(x : α) → Decidable (p x)]


@[simp]
theorem toCocone_ι_app_left (c : BinaryBicone P Q) : c.toCocone.ι.app ⟨WalkingPair.left⟩ = c.inl

(c : CategoryTheory.Limits.BinaryBicone P Q)

c.toCocone.ι.app { as := CategoryTheory.Limits.WalkingPair.left } = c.inl


@[reassoc (attr := simp)]
theorem pentagon_hom_hom_inv_hom_hom (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : d ⟶ e) :
    (α_ (f ≫ g) h i).hom ≫ (α_ f g (h ≫ i)).hom ≫ f ◁ (α_ g h i).inv =
      (α_ f g h).hom ▷ i ≫ (α_ f (g ≫ h) i).hom

{B : Type u}
[CategoryTheory.Bicategory B]
{a b c d e : B}
(f : a ⟶ b)
(g : b ⟶ c)
(h : c ⟶ d)
(i : d ⟶ e)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.associator (CategoryTheory.CategoryStruct.comp f g) h i).hom
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.associator f g (CategoryTheory.CategoryStruct.comp h i)).hom
      (CategoryTheory.Bicategory.whiskerLeft f (CategoryTheory.Bicategory.associator g h i).inv)) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.associator f g h).hom i)
    (CategoryTheory.Bicategory.associator f (CategoryTheory.CategoryStruct.comp g h) i).hom


theorem _root_.card_support_eq_three_iff : σ.support.card = 3 ↔ σ.IsThreeCycle

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


@[simp]
theorem comap_abs_atTop : comap (abs : α → α) atTop = atBot ⊔ atTop

{α : Type u_3}
[LinearOrderedAddCommGroup α]

Filter.comap abs Filter.atTop = Filter.atBot ⊔ Filter.atTop


lemma succAbove_eq_last_iff {a : Fin (n + 2)} {b : Fin (n + 1)} (ha : a ≠ last _) :
    a.succAbove b = last _ ↔ b = last _

a.succAbove b = Fin.last (n + 1) ↔ b = Fin.last n


/-- The coequalizer morphism in any colimit cocone is an epimorphism. -/
theorem epi_of_isColimit_cofork {c : Cofork f g} (i : IsColimit c) : Epi c.π

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


/-- Converse to the mean value inequality: if `f` is `C`-lipschitz
on a neighborhood of `x₀` then its derivative at `x₀` has norm bounded by `C`.
Version using `fderiv`. -/
-- Porting note: renamed so that dot-notation makes sense
theorem norm_fderiv_le_of_lipschitzOn {f : E → F} {x₀ : E} {s : Set E} (hs : s ∈ 𝓝 x₀)
    {C : ℝ≥0} (hlip : LipschitzOnWith C f s) : ‖fderiv 𝕜 f x₀‖ ≤ C

(𝕜 : 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}
(hs : s ∈ 𝓝 x₀)
{C : ℝ≥0}
(hlip : LipschitzOnWith C f s)


theorem eventually_atBot_curry [SemilatticeInf α] [SemilatticeInf β] {p : α × β → Prop}
    (hp : ∀ᶠ x : α × β in Filter.atBot, p x) : ∀ᶠ k in atBot, ∀ᶠ l in atBot, p (k, l)

(hp : ∀ᶠ (x : α × β) in Filter.atBot, p x)

∀ᶠ (k : α) in Filter.atBot, ∀ᶠ (l : β) in Filter.atBot, p (k, l)


/-- The balancing properties of the `balRight` function. -/
protected theorem Balanced.balRight (hl : l.Balanced cl (n + 1)) (hr : r.RedRed True n) :
    (balRight l v r).RedRed (cl = red) (n + 1)

∀ {α : Type u_1} {l : Batteries.RBNode α} {v : α} {r : Batteries.RBNode α} {cl : Batteries.RBColor} {n : Nat},
  l.Balanced cl (n + 1) →
    Batteries.RBNode.RedRed True r n → Batteries.RBNode.RedRed (cl = Batteries.RBColor.red) (l.balRight v r) (n + 1)


theorem isNat_one (α) [AddMonoidWithOne α] : IsNat (One.one : α) (nat_lit 1)


theorem ediam_image (s : Set E) : EMetric.diam (f '' s) = EMetric.diam s

{R : Type u_1}
{R₂ : Type u_2}
{E : Type u_5}
{E₂ : Type u_6}
[Semiring R]
[Semiring R₂]
{σ₁₂ : R →+* R₂}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[Module R E]
[Module R₂ E₂]
(f : E →ₛₗᵢ[σ₁₂] E₂)
(s : Set E)


theorem subNatNat_add_right : subNatNat m (m + n + 1) = negSucc n

Int.subNatNat m (m + n + 1) = Int.negSucc n


lemma hasExt_of_hasDerivedCategory [HasDerivedCategory.{w} C] : HasExt.{w} C

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


/-- Given a morphism of short complexes `φ : S₁ ⟶ S₂` in an abelian category, if `S₁.f`
and `S₁.g` are zero (e.g. when `S₁` is of the form `0 ⟶ S₁.X₂ ⟶ 0`) and `S₂.f = 0`
(e.g when `S₂` is of the form `0 ⟶ S₂.X₂ ⟶ S₂.X₃`), then `φ` is a quasi-isomorphism iff
the obvious short complex `S₁.X₂ ⟶ S₂.X₂ ⟶ S₂.X₃` is exact and `φ.τ₂` is a mono). -/
lemma quasiIso_iff_of_zeros {S₁ S₂ : ShortComplex C} (φ : S₁ ⟶ S₂)
    (hf₁ : S₁.f = 0) (hg₁ : S₁.g = 0) (hf₂ : S₂.f = 0) :
    QuasiIso φ ↔
      (ShortComplex.mk φ.τ₂ S₂.g (by rw [φ.comm₂₃, hg₁, zero_comp])).Exact ∧ Mono φ.τ₂

{C : Type u_1}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Abelian C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
(φ : S₁ ⟶ S₂)
(hf₁ : S₁.f = 0)
(hg₁ : S₁.g = 0)
(hf₂ : S₂.f = 0)

CategoryTheory.ShortComplex.QuasiIso φ ↔ (CategoryTheory.ShortComplex.mk φ.τ₂ S₂.g ⋯).Exact ∧ CategoryTheory.Mono φ.τ₂


@[simp]
lemma annihilator_top_eq_ker_aeval [FaithfulSMul A M] :
    (⊤ : Submodule R[X] <| AEval R M a).annihilator = RingHom.ker (aeval a)

{R : Type u_3}
{A : Type u_1}
{M : Type u_2}
[CommSemiring R]
[Semiring A]
(a : A)
[Algebra R A]
[AddCommMonoid M]
[Module A M]
[Module R M]
[IsScalarTower R A M]
[FaithfulSMul A M]

⊤.annihilator = RingHom.ker (Polynomial.aeval a)


/-- The function `(c,d) → |cz+d|^2` is proper, that is, preimages of bounded-above sets are finite.
-/
theorem tendsto_normSq_coprime_pair :
    Filter.Tendsto (fun p : Fin 2 → ℤ => normSq ((p 0 : ℂ) * z + p 1)) cofinite atTop

Filter.Tendsto (fun p => Complex.normSq (↑(p 0) * ↑z + ↑(p 1))) Filter.cofinite Filter.atTop


/-- If `x ≠ ∞`, then left multiplication by `x` maps infimum over a nonempty type to infimum. See
also `ENNReal.mul_iInf_of_ne` that assumes `x ≠ 0` but does not require `[Nonempty ι]`. -/
theorem mul_iInf {ι} [Nonempty ι] {f : ι → ℝ≥0∞} {x : ℝ≥0∞} (h : x ≠ ∞) :
    x * iInf f = ⨅ i, x * f i

{ι : Sort u_2}
[Nonempty ι]
{f : ι → ℝ≥0∞}
{x : ℝ≥0∞}
(h : x ≠ ⊤)


protected theorem _root_.HasCompactSupport.rpow_const {α : Type*} [TopologicalSpace α] {f : α → ℝ}
    (hf : HasCompactSupport f) {r : ℝ} (hr : r ≠ 0) : HasCompactSupport (fun x ↦ f x ^ r)

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ}
(hf : HasCompactSupport f)
{r : ℝ}
(hr : r ≠ 0)


@[to_additive norm_ne_zero_iff]
theorem norm_ne_zero_iff' : ‖a‖ ≠ 0 ↔ a ≠ 1

{E : Type u_6}
[NormedAddGroup E]
{a : E}

‖a‖ ≠ 0 ↔ a ≠ 0


lemma CostructuredArrowDownwards.mk_surjective
    (f : w.CostructuredArrowDownwards g) :
    ∃ (X₁ : C₁) (a : X₂ ⟶ T.obj X₁) (b : L.obj X₁ ⟶ X₃)
      (comm : R.map a ≫ w.app X₁ ≫ B.map b = g), f = mk w g X₁ a b comm

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

∃ X₁ a b,
  ∃ (comm : CategoryTheory.CategoryStruct.comp (R.map a) (CategoryTheory.CategoryStruct.comp (w.app X₁) (B.map b)) = g),
    f = CategoryTheory.TwoSquare.CostructuredArrowDownwards.mk w g X₁ a b comm


@[to_additive]
theorem mulIndicator_mul_compl_eq_piecewise [DecidablePred (· ∈ s)] (f g : α → M) :
    s.mulIndicator f * sᶜ.mulIndicator g = s.piecewise f g

{α : Type u_1}
{M : Type u_4}
[AddZeroClass M]
{s : Set α}
[DecidablePred fun x => x ∈ s]
(f g : α → M)

s.indicator f + sᶜ.indicator g = s.piecewise f g


theorem const_le [LE β] {x y : β} : x ≤ y → (↑x : Germ l β) ≤ ↑y

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[LE β]
{x y : β}

x ≤ y → ↑x ≤ ↑y


/-- The property `BaireSpace α` means that the topological space `α` has the Baire property:
any countable intersection of open dense subsets is dense.
Formulated here when the source space is ℕ.
Use `dense_iInter_of_isOpen` which works for any countable index type instead. -/
class BaireSpace (X : Type*) [TopologicalSpace X] : Prop where
  baire_property : ∀ f : ℕ → Set X, (∀ n, IsOpen (f n)) → (∀ n, Dense (f n)) → Dense (⋂ n, f n)

{X : Type u_1}
[TopologicalSpace X]
[self : BaireSpace X]
(f : ℕ → Set X)

(∀ (n : ℕ), IsOpen (f n)) → (∀ (n : ℕ), Dense (f n)) → Dense (⋂ n, f n)


/-- `_ %ₘ q` as an `R`-linear map. -/
@[simps]
def modByMonicHom (q : R[X]) : R[X] →ₗ[R] R[X]


theorem toNat_apply_of_lt_aleph0 {c : Cardinal.{u}} (h : c < ℵ₀) :
    toNat c = Classical.choose (lt_aleph0.1 h)

{c : Cardinal.{u}}
(h : c < Cardinal.aleph0)


@[to_additive]
theorem mul_subset_mul_left : t₁ ⊆ t₂ → s * t₁ ⊆ s * t₂

{α : Type u_2}
[DecidableEq α]
[Add α]
{s t₁ t₂ : Finset α}


theorem _root_.Disjoint.of_preimage (hf : Surjective f) {s t : Set β}
    (h : Disjoint (f ⁻¹' s) (f ⁻¹' t)) : Disjoint s t

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Surjective f)
{s t : Set β}
(h : Disjoint (f ⁻¹' s) (f ⁻¹' t))


theorem Ioc_subset_Ioi_self : Ioc a b ⊆ Ioi a


@[to_additive (attr := nontriviality, simp)]
theorem of_subsingleton [Subsingleton G] : UniqueMul A B a0 b0

{G : Type u_1}
[Add G]
{A B : Finset G}
{a0 b0 : G}
[Subsingleton G]


@[simp] theorem find?_replicate_of_isNone (h : (f a).isNone) : findSome? f (replicate n a) = none

∀ {α : Type u_1} {α_1 : Type u_2} {f : α → Option α_1} {n : Nat} {a : α},
  (f a).isNone = true → List.findSome? f (List.replicate n a) = none


@[to_additive]
theorem eq_iff_exists (f : LocalizationMap S N) {x y} :
    f.toMap x = f.toMap y ↔ ∃ c : S, ↑c * x = c * y

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

f.toMap x = f.toMap y ↔ ∃ c, ↑c + x = ↑c + y


theorem pred_succ_iterate_of_not_isMax (i : α) (n : ℕ) (hin : ¬IsMax (succ^[n - 1] i)) :
    pred^[n] (succ^[n] i) = i

{α : Type u_1}
[PartialOrder α]
[SuccOrder α]
[PredOrder α]
(i : α)
(n : ℕ)
(hin : ¬IsMax (Order.succ^[n - 1] i))


theorem exists_iff_exists_of_mono {P : F α → Prop} {q : F β → Prop}
    (f : α ⟹ β) (g : β ⟹ α)
    (h₀ : f ⊚ g = TypeVec.id)
    (h₁ : ∀ u : F α, P u ↔ q (f <$$> u)) :
    (∃ u : F α, P u) ↔ ∃ u : F β, q u

{n : ℕ}
{α β : TypeVec.{u} n}
(F : TypeVec.{u} n → Type v)
[MvFunctor F]
[LawfulMvFunctor F]
{P : F α → Prop}
{q : F β → Prop}
(f : α ⟹ β)
(g : β ⟹ α)
(h₀ : f ⊚ g = TypeVec.id)
(h₁ : ∀ (u : F α), P u ↔ q (f <$$> u))


theorem isUnit_of_isUnit_leadingCoeff_of_isUnit_map {f : R[X]} (hf : IsUnit f.leadingCoeff)
    (H : IsUnit (map φ f)) : IsUnit f

{R : Type u}
{S : Type v}
[Semiring R]
[CommRing S]
[IsDomain S]
(φ : R →+* S)
{f : R[X]}
(hf : IsUnit f.leadingCoeff)
(H : IsUnit (Polynomial.map φ f))


@[to_additive]
theorem mul_injective_of_disjoint {H₁ H₂ : Subgroup G} (h : Disjoint H₁ H₂) :
    Function.Injective (fun g => g.1 * g.2 : H₁ × H₂ → G)

{G : Type u_1}
[Group G]
{H₁ H₂ : Subgroup G}
(h : Disjoint H₁ H₂)


theorem eventually_finsupport_subset : ∀ᶠ y in 𝓝 x₀, ρ.finsupport y ⊆ ρ.fintsupport x₀

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(ρ : PartitionOfUnity ι X s)
(x₀ : X)

∀ᶠ (y : X) in 𝓝 x₀, ρ.finsupport y ⊆ ρ.fintsupport x₀


/-- The equivalence between `TwoP` and itself induced by `Prod.swap` both ways. -/
@[simps!]
noncomputable def swapEquiv : TwoP ≌ TwoP

(TwoP.swapEquiv.functor.obj X).toTwoPointing.toProd = (X.toTwoPointing.toProd.2, X.toTwoPointing.toProd.1)


theorem abs_def : (Complex.abs : ℂ → ℝ) = fun z => (normSq z).sqrt

⇑Complex.abs = fun z => √(Complex.normSq z)


theorem mul_left_inj' (hc : c ≠ 0) : a * c = b * c ↔ a = b

{M₀ : Type u_1}
[CancelMonoidWithZero M₀]
{a b c : M₀}
(hc : c ≠ 0)


@[simp]
theorem image_swap_product [DecidableEq (α × β)] (s : Finset α) (t : Finset β) :
    (t ×ˢ s).image Prod.swap = s ×ˢ t

{α : Type u_1}
{β : Type u_2}
[DecidableEq (α × β)]
(s : Finset α)
(t : Finset β)

Finset.image Prod.swap (t ×ˢ s) = s ×ˢ t


theorem extension_map [CompleteSpace γ] [T0Space γ] {f : β → γ} {g : α → β}
    (hf : UniformContinuous f) (hg : UniformContinuous g) :
    Completion.extension f ∘ Completion.map g = Completion.extension (f ∘ g)

{α : Type u_1}
[UniformSpace α]
{β : Type u_2}
[UniformSpace β]
{γ : Type u_3}
[UniformSpace γ]
[CompleteSpace γ]
[T0Space γ]
{f : β → γ}
{g : α → β}
(hf : UniformContinuous f)
(hg : UniformContinuous g)

UniformSpace.Completion.extension f ∘ UniformSpace.Completion.map g = UniformSpace.Completion.extension (f ∘ g)


/-- Independence of a family of submodules can be expressed as a quantifier over `DFinsupp`s.

This is an intermediate result used to prove
`CompleteLattice.independent_of_dfinsupp_lsum_injective` and
`CompleteLattice.Independent.dfinsupp_lsum_injective`. -/
theorem independent_iff_forall_dfinsupp (p : ι → Submodule R N) :
    Independent p ↔
      ∀ (i) (x : p i) (v : Π₀ i : ι, ↥(p i)),
        lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) (erase i v) = x → x = 0

{ι : Type u_1}
{R : Type u_2}
{N : Type u_5}
[DecidableEq ι]
[Semiring R]
[AddCommMonoid N]
[Module R N]
(p : ι → Submodule R N)

CompleteLattice.Independent p ↔
  ∀ (i : ι) (x : ↥(p i)) (v : Π₀ (i : ι), ↥(p i)),
    ((DFinsupp.lsum ℕ) fun i => (p i).subtype) (DFinsupp.erase i v) = ↑x → x = 0


/-- The composition of morphisms of snake inputs. -/
@[simps]
def comp (f : Hom S₁ S₂) (g : Hom S₂ S₃) : Hom S₁ S₃

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

(f.comp g).f₀ = CategoryTheory.CategoryStruct.comp f.f₀ g.f₀


/-- The iUnion of preconnected sets indexed by a subset of a type with an archimedean successor
  (like `ℕ` or `ℤ`) such that any two neighboring sets meet is preconnected. -/
theorem IsPreconnected.biUnion_of_chain {s : β → Set α} {t : Set β} (ht : OrdConnected t)
    (H : ∀ n ∈ t, IsPreconnected (s n))
    (K : ∀ n : β, n ∈ t → succ n ∈ t → (s n ∩ s (succ n)).Nonempty) :
    IsPreconnected (⋃ n ∈ t, s n)

(K : ∀ n ∈ t, Order.succ n ∈ t → (s n ∩ s (Order.succ n)).Nonempty)


theorem Finset.centerMass_subset {t' : Finset ι} (ht : t ⊆ t') (h : ∀ i ∈ t', i ∉ t → w i = 0) :
    t.centerMass w z = t'.centerMass w z

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{t : Finset ι}
{w : ι → R}
(z : ι → E)
{t' : Finset ι}
(ht : t ⊆ t')
(h : ∀ i ∈ t', i ∉ t → w i = 0)


/-- Equivalence of categories is transitive. -/
@[trans, simps]
def trans (e : C ≌ D) (f : D ≌ E) : C ≌ E

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

(e.trans f).counitIso =
  CategoryTheory.isoWhiskerLeft f.inverse (CategoryTheory.isoWhiskerRight e.counitIso f.functor) ≪≫ f.counitIso


@[measurability]
theorem Measurable.iInf_Prop {α} [MeasurableSpace α] [ConditionallyCompleteLattice α]
    (p : Prop) {f : δ → α} (hf : Measurable f) : Measurable fun b => ⨅ _ : p, f b

{δ : Type u_4}
[MeasurableSpace δ]
{α : Type u_5}
[MeasurableSpace α]
[ConditionallyCompleteLattice α]
(p : Prop)
{f : δ → α}
(hf : Measurable f)


/-- If `R` preserves the appropriate limit, then given a cone for `F ⋙ fst L R : J ⥤ L` and a
limit cone for `F ⋙ snd L R : J ⥤ R` we can build a cone for `F` which will turn out to be a limit
cone.
-/
@[simps]
def coneOfPreserves [PreservesLimit (F ⋙ snd L R) R] (c₁ : Cone (F ⋙ fst L R))
    {c₂ : Cone (F ⋙ snd L R)} (t₂ : IsLimit c₂) : Cone F

(F : CategoryTheory.Functor J (CategoryTheory.Comma L R))

[CategoryTheory.Limits.PreservesLimit (F.comp (CategoryTheory.Comma.snd L R)) R]

(c₁ : CategoryTheory.Limits.Cone (F.comp (CategoryTheory.Comma.fst L R)))

{c₂ : CategoryTheory.Limits.Cone (F.comp (CategoryTheory.Comma.snd L R))}

(CategoryTheory.Comma.coneOfPreserves F c₁ t₂).pt.right = c₂.pt


theorem cyclotomic_dvd_geom_sum_of_dvd (R) [Ring R] {d n : ℕ} (hdn : d ∣ n) (hd : d ≠ 1) :
    cyclotomic d R ∣ ∑ i ∈ Finset.range n, X ^ i

(R : Type u_1)
[Ring R]
{d n : ℕ}
(hdn : d ∣ n)
(hd : d ≠ 1)

Polynomial.cyclotomic d R ∣ ∑ i ∈ Finset.range n, Polynomial.X ^ i


@[simp]
lemma ofHom_comp (f : F ⟶ G) (g : G ⟶ K) :
    ofHom (f ≫ g) = (ofHom f).comp (ofHom g) (zero_add 0)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{F G K : CochainComplex C ℤ}
(f : F ⟶ G)
(g : G ⟶ K)

CochainComplex.HomComplex.Cochain.ofHom (f ≫ g) =
  (CochainComplex.HomComplex.Cochain.ofHom f).comp (CochainComplex.HomComplex.Cochain.ofHom g) ⋯


@[to_additive]
theorem image_multiset_prod (f : F) :
    ∀ m : Multiset (Set α), (f : α → β) '' m.prod = (m.map fun s => f '' s).prod

{α : Type u_2}
{β : Type u_3}
{F : Type u_4}
[FunLike F α β]
[CommMonoid α]
[CommMonoid β]
[MonoidHomClass F α β]
(f : F)
(m : Multiset (Set α))

⇑f '' m.prod = (Multiset.map (fun s => ⇑f '' s) m).prod


/-- The real square root is at most the natural square root plus one -/
theorem real_sqrt_le_nat_sqrt_succ {a : ℕ} : √(a : ℝ) ≤ Nat.sqrt a + 1


@[simp]
theorem whiskerLeft_f (X : Center C) {Y₁ Y₂ : Center C} (f : Y₁ ⟶ Y₂) : (X ◁ f).f = X.1 ◁ f.f

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


@[simp]
theorem top_coe_lieSubalgebra : ((⊤ : LieIdeal R L) : LieSubalgebra R L) = ⊤

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]


@[to_additive]
theorem op_sup (S₁ S₂ : Subgroup G) : (S₁ ⊔ S₂).op = S₁.op ⊔ S₂.op

{G : Type u_2}
[Group G]
(S₁ S₂ : Subgroup G)


theorem infEdist_smul₀ {c : 𝕜} (hc : c ≠ 0) (s : Set E) (x : E) :
    EMetric.infEdist (c • x) (c • s) = ‖c‖₊ • EMetric.infEdist x s

{𝕜 : Type u_1}
{E : Type u_2}
[NormedDivisionRing 𝕜]
[SeminormedAddCommGroup E]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
{c : 𝕜}
(hc : c ≠ 0)
(s : Set E)
(x : E)


theorem left_invariant : 𝒅ₕ (smoothLeftMul_one I g) (evalAt (1 : G) X) = evalAt g X

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

(𝒅ₕ ⋯) ((LeftInvariantDerivation.evalAt 1) X) = (LeftInvariantDerivation.evalAt g) X


@[simp] lemma upperBounds_closure (s : Set α) : upperBounds (closure s : Set α) = upperBounds s

{α : Type u}
[TopologicalSpace α]
[Preorder α]
[ClosedIicTopology α]
(s : Set α)


@[simp]
theorem upperCrossingTime_zero' : upperCrossingTime a b f ⊥ n ω = ⊥

{Ω : Type u_1}
{ι : Type u_2}
[ConditionallyCompleteLinearOrderBot ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{n : ℕ}
{ω : Ω}

MeasureTheory.upperCrossingTime a b f ⊥ n ω = ⊥


@[simp]
theorem aeval_fn_apply {X : Type*} (g : R[X]) (f : X → R) (x : X) :
    ((aeval f) g) x = aeval (f x) g

{R : Type u}
[CommSemiring R]
{X : Type u_3}
(g : R[X])
(f : X → R)
(x : X)

(Polynomial.aeval f) g x = (Polynomial.aeval (f x)) g


theorem toNonUnitalSubalgebra_bot :
    (⊥ : NonUnitalStarSubalgebra R A).toNonUnitalSubalgebra = ⊥

{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]


theorem DvdNotUnit.ne [CancelCommMonoidWithZero α] {p q : α} (h : DvdNotUnit p q) : p ≠ q

{α : Type u_1}
[CancelCommMonoidWithZero α]
{p q : α}
(h : DvdNotUnit p q)


theorem sin_antiperiodic : Function.Antiperiodic sin (π : Angle)


/-- Writing a limsup as an infimum of supremum, in a (possibly non-complete) conditionally complete
linear order. A reparametrization trick is needed to avoid taking the supremum of sets which are
not bounded above. -/
theorem HasBasis.limsup_eq_ciInf_ciSup {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} [Countable (Subtype p)] [Nonempty (Subtype p)]
    (hv : v.HasBasis p s) {f : ι → α} (hs : ∀ (j : Subtype p), (s j).Nonempty)
    (H : ∃ (j : Subtype p), BddAbove (range (fun (i : s j) ↦ f i))) :
    limsup f v = ⨅ (j : Subtype p), ⨆ (i : s (limsup_reparam f s p j)), f i

(hs : ∀ (j : Subtype p), (s ↑j).Nonempty)

(H : ∃ j, BddAbove (Set.range fun i => f ↑i))


theorem dual_eraseMin : ∀ t : Ordnode α, dual (eraseMin t) = eraseMax (dual t)


theorem toFinset_surjective : Surjective (toFinset : List α → Finset α)


/-- Drop the augmentation. -/
@[simps!]
def drop : Augmented C ⥤ SimplicialObject C

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

∀ {X Y : CategoryTheory.Comma (𝟭 (CategoryTheory.SimplicialObject C)) (CategoryTheory.SimplicialObject.const C)}
  (f : X ⟶ Y), CategoryTheory.SimplicialObject.Augmented.drop.map f = f.left


theorem compl_strictAnti : StrictAnti (compl : α → α)


theorem dist_birkhoffAverage_birkhoffAverage (f : α → α) (g : α → E) (n : ℕ) (x y : α) :
    dist (birkhoffAverage 𝕜 f g n x) (birkhoffAverage 𝕜 f g n y) =
      dist (birkhoffSum f g n x) (birkhoffSum f g n y) / n

{α : Type u_1}
{E : Type u_2}
[NormedAddCommGroup E]
(𝕜 : Type u_3)
[RCLike 𝕜]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
(f : α → α)
(g : α → E)
(n : ℕ)
(x y : α)

dist (birkhoffAverage 𝕜 f g n x) (birkhoffAverage 𝕜 f g n y) = dist (birkhoffSum f g n x) (birkhoffSum f g n y) / ↑n


@[simp]
theorem integral_zero' : integral μ (0 : α → G) = 0

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


@[to_additive]
theorem Filter.HasBasis.uniformity_of_nhds_one {ι} {p : ι → Prop} {U : ι → Set α}
    (h : (𝓝 (1 : α)).HasBasis p U) :
    (𝓤 α).HasBasis p fun i => { x : α × α | x.2 / x.1 ∈ U i }

{α : Type u_1}
[UniformSpace α]
[AddGroup α]
[UniformAddGroup α]
{ι : Sort u_3}
{p : ι → Prop}
{U : ι → Set α}
(h : (𝓝 0).HasBasis p U)

(𝓤 α).HasBasis p fun i => {x | x.2 - x.1 ∈ U i}


theorem valuedFqtInfty.def {x : FqtInfty Fq} :
    Valued.v x = @Valued.extension (RatFunc Fq) _ _ _ (inftyValuedFqt Fq) x

(Fq : Type)
[Field Fq]
[DecidableEq (RatFunc Fq)]
{x : FunctionField.FqtInfty Fq}


/-- The arrow `A --dZero--> Fun(G, A)` is isomorphic to the differential
`(inhomogeneousCochains A).d 0 1` of the complex of inhomogeneous cochains of `A`. -/
@[simps! hom_left hom_right inv_left inv_right]
def dZeroArrowIso : Arrow.mk ((inhomogeneousCochains A).d 0 1) ≅
    Arrow.mk (ModuleCat.ofHom (dZero A))

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

(groupCohomology.dZeroArrowIso A).hom.left = ↑(groupCohomology.zeroCochainsLequiv A)


lemma trace_toEnd_eq_zero_of_mem_lcs
    {k : ℕ} {x : L} (hk : 1 ≤ k) (hx : x ∈ lowerCentralSeries R L L k) :
    trace R _ (toEnd R L M x) = 0

(hx : x ∈ LieModule.lowerCentralSeries R L L k)


lemma cfc_comp_star (f : R → R) (a : A)
    (hf : ContinuousOn f (star '' (spectrum R a)) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    cfc (f <| star ·) a = cfc f (star a)

(hf : ContinuousOn f (star '' spectrum R a) := by cfc_cont_tac)

cfc (fun x => f (star x)) a = cfc f (star a)


@[to_additive]
theorem mul_mem_cancel_left (h : a ∈ s) : a * b ∈ s ↔ b ∈ s

{G : Type u_1}
{a b : G}
[AddGroup G]
{s : Set G}
(hs : IsAddSubgroup s)
(h : a ∈ s)


theorem restrict_Ioo_eq_restrict_Ico : μ.restrict (Ioo a b) = μ.restrict (Ico a b)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.NoAtoms μ]
[PartialOrder α]
{a b : α}

μ.restrict (Set.Ioo a b) = μ.restrict (Set.Ico a b)


theorem weightedHomogeneousComponent_finsupp :
    (Function.support fun m => weightedHomogeneousComponent w m φ).Finite

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
{σ : Type u_3}
[AddCommMonoid M]
{w : σ → M}
(φ : MvPolynomial σ R)

(Function.support fun m => (MvPolynomial.weightedHomogeneousComponent w m) φ).Finite


theorem to_sup_of_normal_right {H K : Subgroup G} (hH : IsPGroup p H) (hK : IsPGroup p K)
    [K.Normal] : IsPGroup p (H ⊔ K : Subgroup G)

{p : ℕ}
{G : Type u_1}
[Group G]
{H K : Subgroup G}
(hH : IsPGroup p ↥H)
(hK : IsPGroup p ↥K)
[K.Normal]


/-- The image of an open immersion as an open set. -/
@[simps]
def opensRange : Y.Opens

[H : AlgebraicGeometry.IsOpenImmersion f]


@[to_additive]
theorem uniformity_eq_comap_nhds_one : 𝓤 α = comap (fun x : α × α => x.2 / x.1) (𝓝 (1 : α))

(α : Type u_1)
[UniformSpace α]
[Group α]
[UniformGroup α]

𝓤 α = Filter.comap (fun x => x.2 / x.1) (𝓝 1)


theorem flip_injective_iff₂ [FiniteDimensional K V₂] : Injective B.flip ↔ Surjective B

{K : Type uK}
[Field K]
{V₁ : Type uV₁}
{V₂ : Type uV₂}
[AddCommGroup V₁]
[Module K V₁]
[AddCommGroup V₂]
[Module K V₂]
{B : V₁ →ₗ[K] V₂ →ₗ[K] K}
[FiniteDimensional K V₂]

Function.Injective ⇑B.flip ↔ Function.Surjective ⇑B


theorem snd_integral [CompleteSpace E] {f : X → E × F} (hf : Integrable f μ) :
    (∫ x, f x ∂μ).2 = ∫ x, (f x).2 ∂μ

{X : Type u_1}
{E : Type u_3}
{F : Type u_4}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace ℝ E]
[NormedSpace ℝ F]
[CompleteSpace E]
{f : X → E × F}
(hf : MeasureTheory.Integrable f μ)


@[simp]
lemma cons_getVert_succ {u v w n} (p : G.Walk v w) (h : G.Adj u v) :
    (p.cons h).getVert (n + 1) = p.getVert n

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
{n : ℕ}
(p : G.Walk v w)
(h : G.Adj u v)

(SimpleGraph.Walk.cons h p).getVert (n + 1) = p.getVert n


@[to_additive (attr := simp)] lemma oneLePart_div_leOnePart (a : α) : a⁺ᵐ / a⁻ᵐ = a

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


lemma coeff_list_sum_map {ι : Type*} (l : List ι) (f : ι → R[X]) (n : ℕ) :
    (l.map f).sum.coeff n = (l.map (fun a => (f a).coeff n)).sum

{R : Type u}
[Semiring R]
{ι : Type u_1}
(l : List ι)
(f : ι → R[X])
(n : ℕ)

(List.map f l).sum.coeff n = (List.map (fun a => (f a).coeff n) l).sum


/-- `Matrix.IsDiag.diagonal_diag` as an iff. -/
theorem isDiag_iff_diagonal_diag [Zero α] [DecidableEq n] (A : Matrix n n α) :
    A.IsDiag ↔ diagonal (diag A) = A

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


/-- The functor from the double-opposite of a category to the underlying category. -/
@[simps]
def unopUnop : Cᵒᵖᵒᵖ ⥤ C

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

∀ {X Y : Cᵒᵖᵒᵖ} (f : X ⟶ Y), (CategoryTheory.unopUnop C).map f = f.unop.unop


@[simp] theorem toRingHom_eq_coe (f : R ≃+* S) : f.toRingHom = ↑f

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


@[simp] theorem isRight_map (f : α → β) (g : γ → δ) (x : α ⊕ γ) :
    isRight (x.map f g) = isRight x

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


theorem exists_pos_right (h : SameRay R x y) (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ r : R, 0 < r ∧ x = r • y

{R : Type u_1}
[LinearOrderedField R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}
(h : SameRay R x y)
(hx : x ≠ 0)
(hy : y ≠ 0)


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

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β} (f : α →+* β), f.comp (RingHom.id α) = f


/-- A product of finite terms is finite. -/
lemma prod_lt_top [CommMonoidWithZero α] [NoZeroDivisors α] [Nontrivial α] [DecidableEq α] [LT α]
    {s : Finset ι} {f : ι → WithTop α} (h : ∀ i ∈ s, f i ≠ ⊤) : ∏ i ∈ s, f i < ⊤

{ι : Type u_1}
{α : Type u_2}
[CommMonoidWithZero α]
[NoZeroDivisors α]
[Nontrivial α]
[DecidableEq α]
[LT α]
{s : Finset ι}
{f : ι → WithTop α}
(h : ∀ i ∈ s, f i ≠ ⊤)


/-- A function `-f` is strictly concave iff `f` is strictly convex. -/
@[simp]
theorem neg_strictConcaveOn_iff : StrictConcaveOn 𝕜 s (-f) ↔ StrictConvexOn 𝕜 s f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommGroup β]
[SMul 𝕜 E]
[Module 𝕜 β]
{s : Set E}
{f : E → β}


theorem IsAtom.Iic_eq (h : IsAtom a) : Set.Iic a = {⊥, a}

{α : Type u_2}
[PartialOrder α]
[OrderBot α]
{a : α}
(h : IsAtom a)


theorem geom_mean_eq_arith_mean_weighted_of_constant (w z : ι → ℝ) (x : ℝ) (hw : ∀ i ∈ s, 0 ≤ w i)
    (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) (hx : ∀ i ∈ s, w i ≠ 0 → z i = x) :
    ∏ i ∈ s, z i ^ w i = ∑ i ∈ s, w i * z i

{ι : Type u}
(s : Finset ι)
(w z : ι → ℝ)
(x : ℝ)
(hw : ∀ i ∈ s, 0 ≤ w i)
(hw' : ∑ i ∈ s, w i = 1)
(hz : ∀ i ∈ s, 0 ≤ z i)
(hx : ∀ i ∈ s, w i ≠ 0 → z i = x)


theorem mem_sInf {s : Set (Ideal R)} {x : R} : x ∈ sInf s ↔ ∀ ⦃I⦄, I ∈ s → x ∈ I

{R : Type u}
[Semiring R]
{s : Set (Ideal R)}
{x : R}

x ∈ sInf s ↔ ∀ ⦃I : Ideal R⦄, I ∈ s → x ∈ I


@[simp]
protected theorem map_pow (n : ℕ) : (p ^ n).map f = p.map f ^ n

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

Polynomial.map f (p ^ n) = Polynomial.map f p ^ n


lemma isIso_iCycles : IsIso (K.iCycles i)


@[simp]
lemma sub_v {n : ℤ} (z₁ z₂ : Cochain F G n) (p q : ℤ) (hpq : p + n = q) :
    (z₁ - z₂).v p q hpq = z₁.v p q hpq - z₂.v p q hpq

(z₁ z₂ : CochainComplex.HomComplex.Cochain F G n)


@[simp]
theorem Quotient.out_equiv_out {s : Setoid α} {x y : Quotient s} : x.out ≈ y.out ↔ x = y

{α : Sort u_1}
{s : Setoid α}
{x y : Quotient s}


@[simp] lemma natCast_nonpos_iff {n : ℕ} : (n : ℤ) ≤ 0 ↔ n = 0


@[simp] theorem freeOn_basis_iff : (freeOn E).Basis I X ↔ I = X ∧ X ⊆ E

(Matroid.freeOn E).Basis I X ↔ I = X ∧ X ⊆ E


@[simp]
theorem neg_im (z : ℂ) : (-z).im = -z.im


theorem sin_pos_of_pos_of_le_two {x : ℝ} (hx0 : 0 < x) (hx : x ≤ 2) : 0 < sin x


@[reassoc (attr := simp)]
theorem whiskerRight_naturality_id (f : G.obj a ⟶ a') :
    (η.naturality (𝟙 a)).hom ▷ f ≫ (α_ _ _ _).hom ≫ η.app a ◁ G.mapId a ▷ f =
    F.mapId a ▷ η.app a ▷ f ≫ (λ_ (η.app a)).hom ▷ f ≫ (ρ_ (η.app a)).inv ▷ f ≫
    (α_ _ _ _).hom

(η : CategoryTheory.StrongOplaxNatTrans F G)

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerRight (η.naturality (CategoryTheory.CategoryStruct.id a)).hom f)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.associator (η.app a) (G.map (CategoryTheory.CategoryStruct.id a)) f).hom
      (CategoryTheory.Bicategory.whiskerLeft (η.app a) (CategoryTheory.Bicategory.whiskerRight (G.mapId a) f))) =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.whiskerRight (F.mapId a) (η.app a)) f)
    (CategoryTheory.CategoryStruct.comp
      (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.leftUnitor (η.app a)).hom f)
      (CategoryTheory.CategoryStruct.comp
        (CategoryTheory.Bicategory.whiskerRight (CategoryTheory.Bicategory.rightUnitor (η.app a)).inv f)
        (CategoryTheory.Bicategory.associator (η.app a) (CategoryTheory.CategoryStruct.id (G.obj a)) f).hom))


@[reassoc]
theorem biprod.braiding_map_braiding {W X Y Z : C} (f : W ⟶ Y) (g : X ⟶ Z) :
    (biprod.braiding X W).hom ≫ biprod.map f g ≫ (biprod.braiding Y Z).hom = biprod.map g f

(CategoryTheory.Limits.biprod.braiding X W).hom ≫
    CategoryTheory.Limits.biprod.map f g ≫ (CategoryTheory.Limits.biprod.braiding Y Z).hom =
  CategoryTheory.Limits.biprod.map g f


@[simp]
theorem offDiag_singleton (a : α) : ({a} : Set α).offDiag = ∅


protected theorem coe_sSup_eq' {s : Set <| Seminorm 𝕜 E}
    (hs : BddAbove ((↑) '' s : Set (E → ℝ))) : ↑(sSup s) = ⨆ p : s, ((p : Seminorm 𝕜 E) : E → ℝ)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{s : Set (Seminorm 𝕜 E)}
(hs : BddAbove (DFunLike.coe '' s))


lemma indicator_smul_const_apply (s : Set α) (r : α → R) (m : M) (a : α) :
    indicator s (r · • m) a = indicator s r a • m

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero R]
[Zero M]
[SMulWithZero R M]
(s : Set α)
(r : α → R)
(m : M)
(a : α)

s.indicator (fun x => r x • m) a = s.indicator r a • m


@[simp]
theorem toMul_nsmul [Monoid α] (n : ℕ) (a : Additive α) : toMul (n • a) = toMul a ^ n

{α : Type u}
[Monoid α]
(n : ℕ)
(a : Additive α)

Additive.toMul (n • a) = Additive.toMul a ^ n


/-- The two ways of summing over `(i, j)` in the range `a ≤ i ≤ j < b` are equal. -/
theorem sum_Ico_Ico_comm {M : Type*} [AddCommMonoid M] (a b : ℕ) (f : ℕ → ℕ → M) :
    (∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico i b, f i j) =
      ∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a (j + 1), f i j

{M : Type u_3}
[AddCommMonoid M]
(a b : ℕ)
(f : ℕ → ℕ → M)

∑ i ∈ Finset.Ico a b, ∑ j ∈ Finset.Ico i b, f i j = ∑ j ∈ Finset.Ico a b, ∑ i ∈ Finset.Ico a (j + 1), f i j


@[simp]
nonrec theorem support_nonempty_iff {x : HahnSeries Γ R} : x.support.Nonempty ↔ x ≠ 0

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


/-- If each component of the unit is a monomorphism, then the left adjoint is faithful. -/
lemma faithful_L_of_mono_unit_app [∀ X, Mono (h.unit.app X)] : L.Faithful

[∀ (X : C), CategoryTheory.Mono (h.unit.app X)]


@[simp]
theorem toSubring_eq_top {R A : Type*} [CommRing R] [Ring A] [Algebra R A] {S : Subalgebra R A} :
    S.toSubring = ⊤ ↔ S = ⊤

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[Ring A]
[Algebra R A]
{S : Subalgebra R A}


/-- A formula for `μH[d] s`. -/
theorem hausdorffMeasure_apply (d : ℝ) (s : Set X) :
    μH[d] s =
      ⨆ (r : ℝ≥0∞) (_ : 0 < r),
        ⨅ (t : ℕ → Set X) (_ : s ⊆ ⋃ n, t n) (_ : ∀ n, diam (t n) ≤ r),
          ∑' n, ⨆ _ : (t n).Nonempty, diam (t n) ^ d

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
(d : ℝ)
(s : Set X)

μH[d] s =
  ⨆ r,
    ⨆ (_ : 0 < r),
      ⨅ t,
        ⨅ (_ : s ⊆ ⋃ n, t n),
          ⨅ (_ : ∀ (n : ℕ), EMetric.diam (t n) ≤ r), ∑' (n : ℕ), ⨆ (_ : (t n).Nonempty), EMetric.diam (t n) ^ d


/-- If `H ≤ K`, then `G/H ≃ G/K × K/H` constructively, using the provided right inverse
of the quotient map `G → G/K`. The classical version is `Subgroup.quotientEquivProdOfLE`. -/
@[to_additive (attr := simps)
  "If `H ≤ K`, then `G/H ≃ G/K × K/H` constructively, using the provided right inverse
  of the quotient map `G → G/K`. The classical version is `AddSubgroup.quotientEquivSumOfLE`."]
def quotientEquivProdOfLE' (h_le : s ≤ t) (f : α ⧸ t → α)
    (hf : Function.RightInverse f QuotientGroup.mk) : α ⧸ s ≃ (α ⧸ t) × t ⧸ s.subgroupOf t

(Subgroup.quotientEquivProdOfLE' h_le f hf) a =
  (Quotient.map' id ⋯ a, Quotient.map' (fun g => ⟨(f (Quotient.mk'' g))⁻¹ * g, ⋯⟩) ⋯ a)


theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn 𝕜 f s) (hg : AnalyticOn 𝕜 g s) :
    AnalyticOn 𝕜 (f - g) s

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


/-- On `Game`, simp-normal inequalities should use as few negations as possible. -/
@[simp]
theorem not_le : ∀ {x y : Game}, ¬x ≤ y ↔ y ⧏ x


/-- The subsheaf of the sheaf of all dependently typed functions satisfying the local predicate `P`.
-/
@[simps]
def subsheafToTypes (P : LocalPredicate T) : Sheaf (Type v) X

{X : TopCat}
{T : ↑X → Type v}
(P : TopCat.LocalPredicate T)

(TopCat.subsheafToTypes P).val = TopCat.subpresheafToTypes P.toPrelocalPredicate


/-- Given a point on a sphere and a point not outside it, the inner product between the
difference of those points and the radius vector is nonnegative. -/
theorem inner_nonneg_of_dist_le_radius {s : Sphere P} {p₁ p₂ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : dist p₂ s.center ≤ s.radius) : 0 ≤ ⟪p₁ -ᵥ p₂, p₁ -ᵥ s.center⟫

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : EuclideanGeometry.Sphere P}
{p₁ p₂ : P}
(hp₁ : p₁ ∈ s)
(hp₂ : dist p₂ s.center ≤ s.radius)


theorem sumFinsuppLEquivProdFinsupp_symm_inl {α β : Type*} (fg : (α →₀ M) × (β →₀ M)) (x : α) :
    ((sumFinsuppLEquivProdFinsupp R).symm fg) (Sum.inl x) = fg.1 x

{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α : Type u_7}
{β : Type u_8}
(fg : (α →₀ M) × (β →₀ M))
(x : α)

((Finsupp.sumFinsuppLEquivProdFinsupp R).symm fg) (Sum.inl x) = fg.1 x


/-- If `a` is invertible and `a = b`, then `⅟a = ⅟b`. -/
@[congr]
theorem Invertible.congr [Monoid α] (a b : α) [Invertible a] [Invertible b] (h : a = b) :
    ⅟a = ⅟b

{α : Type u}
[Monoid α]
(a b : α)
[Invertible a]
[Invertible b]
(h : a = b)


@[simp]
theorem image_symm_image (e : α ≃o β) (s : Set β) : e '' (e.symm '' s) = s

{α : Type u_2}
{β : Type u_3}
[LE α]
[LE β]
(e : α ≃o β)
(s : Set β)


@[to_additive (attr := simp, norm_cast)]
theorem coe_ofClosureMEqTopLeft (f : M → N) (hs : closure s = ⊤) (h1 hmul) :
    ⇑(ofClosureMEqTopLeft f hs h1 hmul) = f

(hmul : ∀ x ∈ s, ∀ (y : M), f (x + y) = f x + f y)

⇑(AddMonoidHom.ofClosureMEqTopLeft f hs h1 hmul) = f


@[to_additive]
theorem div_eq_div_mul_div (a b c : G) : a / b = c / b * (a / c)

{G : Type u_3}
[AddCommGroup G]
(a b c : G)


theorem smeval_at_natCast (q : ℕ[X]) : ∀(n : ℕ), q.smeval (n : S) = q.smeval n

{S : Type u_2}
[NonAssocSemiring S]
[Pow S ℕ]
[NatPowAssoc S]
(q : Polynomial ℕ)
(n : ℕ)


@[simp]
theorem coe_Iic (a : α) : ↑(Iic a) = Set.Iic a


@[to_additive]
theorem smul_mem_nhds (a : α) {x : β} (ht : t ∈ 𝓝 x) : a • t ∈ 𝓝 (a • x)

{α : Type u}
{β : Type v}
[TopologicalSpace β]
[AddGroup α]
[AddAction α β]
[ContinuousConstVAdd α β]
{t : Set β}
(a : α)
{x : β}
(ht : t ∈ 𝓝 x)


@[simp]
theorem getElem_attach (L : List α) (i : Nat) (h : i < L.attach.length) :
    L.attach[i].1 = L[i]'(length_attach L ▸ h)

{α : Type u}
(L : List α)
(i : ℕ)
(h : i < L.attach.length)


@[simp]
theorem transpose_adjMatrix [Zero α] [One α] : (G.adjMatrix α)ᵀ = G.adjMatrix α

{V : Type u_1}
{α : Type u_2}
(G : SimpleGraph V)
[DecidableRel G.Adj]
[Zero α]
[One α]

(SimpleGraph.adjMatrix α G)ᵀ = SimpleGraph.adjMatrix α G


/-- `LocallyConstant.congrRight` as an `AlgEquiv`. -/
@[simps!]
def congrRightₐ (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y] [Semiring Z] [Algebra R Z]
    (e : Y ≃ₐ[R] Z) : LocallyConstant X Y ≃ₐ[R] LocallyConstant X Z

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{Z : Type u_6}
(R : Type u_7)
[CommSemiring R]
[Semiring Y]
[Algebra R Y]
[Semiring Z]
[Algebra R Z]
(e : Y ≃ₐ[R] Z)
(g : LocallyConstant X Y)

∀ (a : X), ((LocallyConstant.congrRightₐ R e) g) a = e (g a)


/-- Divergence theorem for a Henstock-Kurzweil style integral.

If `f : ℝⁿ⁺¹ → Eⁿ⁺¹` is differentiable on a closed rectangular box `I` with derivative `f'`, then
the divergence `∑ i, f' x (Pi.single i 1) i` is Henstock-Kurzweil integrable with integral equal to
the sum of integrals of `f` over the faces of `I` taken with appropriate signs.

More precisely, we use a non-standard generalization of the Henstock-Kurzweil integral and
we allow `f` to be non-differentiable (but still continuous) at a countable set of points. -/
theorem hasIntegral_GP_divergence_of_forall_hasDerivWithinAt
    (f : (Fin (n + 1) → ℝ) → Fin (n + 1) → E)
    (f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] (Fin (n + 1) → E))
    (s : Set (Fin (n + 1) → ℝ)) (hs : s.Countable)
    (Hs : ∀ x ∈ s, ContinuousWithinAt f (Box.Icc I) x)
    (Hd : ∀ x ∈ (Box.Icc I) \ s, HasFDerivWithinAt f (f' x) (Box.Icc I) x) :
    HasIntegral.{0, u, u} I GP (fun x => ∑ i, f' x (Pi.single i 1) i) BoxAdditiveMap.volume
      (∑ i,
        (integral.{0, u, u} (I.face i) GP (fun x => f (i.insertNth (I.upper i) x) i)
            BoxAdditiveMap.volume -
          integral.{0, u, u} (I.face i) GP (fun x => f (i.insertNth (I.lower i) x) i)
            BoxAdditiveMap.volume))

(f' : (Fin (n + 1) → ℝ) → (Fin (n + 1) → ℝ) →L[ℝ] Fin (n + 1) → E)

(Hs : ∀ x ∈ s, ContinuousWithinAt f (BoxIntegral.Box.Icc I) x)

(Hd : ∀ x ∈ BoxIntegral.Box.Icc I \ s, HasFDerivWithinAt f (f' x) (BoxIntegral.Box.Icc I) x)

BoxIntegral.HasIntegral I BoxIntegral.IntegrationParams.GP (fun x => ∑ i : Fin (n + 1), (f' x) (Pi.single i 1) i)
  BoxIntegral.BoxAdditiveMap.volume
  (∑ i : Fin (n + 1),
    (BoxIntegral.integral (I.face i) BoxIntegral.IntegrationParams.GP (fun x => f (i.insertNth (I.upper i) x) i)
        BoxIntegral.BoxAdditiveMap.volume -
      BoxIntegral.integral (I.face i) BoxIntegral.IntegrationParams.GP (fun x => f (i.insertNth (I.lower i) x) i)
        BoxIntegral.BoxAdditiveMap.volume))


theorem dist_ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) (x y : X) :
    @dist X (@PseudoMetricSpace.toDist X (PseudoMetricSpace.ofPreNNDist d dist_self dist_comm)) x
        y =
      ↑(⨅ l : List X, ((x::l).zipWith d (l ++ [y])).sum : ℝ≥0)

(dist_comm : ∀ (x y : X), d x y = d y x)

dist x y = ↑(⨅ l, (List.zipWith d (x :: l) (l ++ [y])).sum)


theorem eq_of_perm_of_sorted [IsAntisymm α r] {l₁ l₂ : List α} (hp : l₁ ~ l₂) (hs₁ : Sorted r l₁)
    (hs₂ : Sorted r l₂) : l₁ = l₂

{α : Type u}
{r : α → α → Prop}
[IsAntisymm α r]
{l₁ l₂ : List α}
(hp : l₁.Perm l₂)
(hs₁ : List.Sorted r l₁)
(hs₂ : List.Sorted r l₂)


lemma div_mul_div_comm : b ∣ a → d ∣ c → (a / b) * (c / d) = (a * c) / (b * d)

b ∣ a → d ∣ c → a / b * (c / d) = a * c / (b * d)


@[simp]
theorem commensurator'_mem_iff (H : Subgroup G) (g : ConjAct G) :
    g ∈ commensurator' H ↔ Commensurable (g • H) H

{G : Type u_1}
[Group G]
(H : Subgroup G)
(g : ConjAct G)

g ∈ Commensurable.commensurator' H ↔ Commensurable (g • H) H


theorem sum_Ioo_inv_sq_le (k n : ℕ) : (∑ i ∈ Ioo k n, (i ^ 2 : α)⁻¹) ≤ 2 / (k + 1)

{α : Type u_1}
[LinearOrderedField α]
(k n : ℕ)

∑ i ∈ Finset.Ioo k n, (↑i ^ 2)⁻¹ ≤ 2 / (↑k + 1)


theorem div_lt_div_right_of_neg (hc : c < 0) : a / c < b / c ↔ b < a

{α : Type u_2}
[LinearOrderedField α]
{a b c : α}
(hc : c < 0)


theorem range_coe_eq_Ioo : range Real.toEReal = Ioo ⊥ ⊤


theorem exists_of_mem_map {f} {b : β} : ∀ {s : WSeq α}, b ∈ map f s → ∃ a, a ∈ s ∧ f a = b

{α : Type u}
{β : Type v}
{f : α → β}
{b : β}
{s : Stream'.WSeq α}

b ∈ Stream'.WSeq.map f s → ∃ a, a ∈ s ∧ f a = b


/-- The (identity) equivalence between `Cᴹᵒᵖ` and `C`. -/
@[simps!] def MonoidalOpposite.unmopEquiv : Cᴹᵒᵖ ≌ C

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

(CategoryTheory.MonoidalOpposite.unmopEquiv C).counitIso.inv.app X = 𝟙 X


@[to_additive] lemma mulEnergy_eq_card_filter (s t : Finset α) :
    Eₘ[s, t] = (((s ×ˢ t) ×ˢ s ×ˢ t).filter fun ((a, b), c, d) ↦ a * b = c * d).card

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

s.mulEnergy t =
  (Finset.filter
      (fun x =>
        match x with
        | ((a, b), c, d) => a * b = c * d)
      ((s ×ˢ t) ×ˢ s ×ˢ t)).card


theorem iteratedFDerivWithin_sum_apply {ι : Type*} {f : ι → E → F} {u : Finset ι} {i : ℕ} {x : E}
    (hs : UniqueDiffOn 𝕜 s) (hx : x ∈ s) (h : ∀ j ∈ u, ContDiffOn 𝕜 i (f j) s) :
    iteratedFDerivWithin 𝕜 i (∑ j ∈ u, f j ·) s x =
      ∑ j ∈ u, iteratedFDerivWithin 𝕜 i (f j) s x

(h : ∀ j ∈ u, ContDiffOn 𝕜 (↑i) (f j) s)

iteratedFDerivWithin 𝕜 i (fun x => ∑ j ∈ u, f j x) s x = ∑ j ∈ u, iteratedFDerivWithin 𝕜 i (f j) s x


lemma ceilDiv_zero (b : β) : b ⌈/⌉ (0 : α) = 0

{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[CeilDiv α β]
(b : β)


/-- The canonical isomorphism `Triangle.shiftFunctor C 0 ≅ 𝟭 (Triangle C)`. -/
@[simps!]
noncomputable def Triangle.shiftFunctorZero : Triangle.shiftFunctor C 0 ≅ 𝟭 _

(X : CategoryTheory.Pretriangulated.Triangle C)

((CategoryTheory.Pretriangulated.Triangle.shiftFunctorZero C).inv.app X).hom₂ =
  (CategoryTheory.shiftFunctorZero C ℤ).inv.app X.obj₂


theorem mem_vars (i : σ) : i ∈ p.vars ↔ ∃ d ∈ p.support, i ∈ d.support

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


theorem ι_isoLocallyRingedSpace_inv (i : D.J) :
    D.toLocallyRingedSpaceGlueData.toGlueData.ι i ≫ D.isoLocallyRingedSpace.inv = 𝖣.ι i

(D : AlgebraicGeometry.Scheme.GlueData)
(i : D.J)

D.toLocallyRingedSpaceGlueData.ι i ≫ D.isoLocallyRingedSpace.inv = D.ι i


theorem Antivary.comp_monotone_left (h : Antivary f g) (hf : Monotone f') : Antivary (f' ∘ f) g

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


theorem minimalPeriod_iterate_eq_div_gcd' (h : x ∈ periodicPts f) :
    minimalPeriod f^[n] x = minimalPeriod f x / Nat.gcd (minimalPeriod f x) n

{α : Type u_1}
{f : α → α}
{x : α}
{n : ℕ}
(h : x ∈ Function.periodicPts f)

Function.minimalPeriod f^[n] x = Function.minimalPeriod f x / (Function.minimalPeriod f x).gcd n


theorem Gamma_pos_of_pos {s : ℝ} (hs : 0 < s) : 0 < Gamma s


@[to_additive]
theorem prod_congr {f : α →₀ M} {g1 g2 : α → M → N} (h : ∀ x ∈ f.support, g1 x (f x) = g2 x (f x)) :
    f.prod g1 = f.prod g2


@[measurability]
theorem Finset.measurable_range_sup'' {f : ℕ → δ → α} {n : ℕ} (hf : ∀ k ≤ n, Measurable (f k)) :
    Measurable fun x => (range (n + 1)).sup' nonempty_range_succ fun k => f k x

{α : Type u_2}
{m : MeasurableSpace α}
{δ : Type u_3}
[MeasurableSpace δ]
[SemilatticeSup α]
[MeasurableSup₂ α]
{f : ℕ → δ → α}
{n : ℕ}
(hf : ∀ k ≤ n, Measurable (f k))

Measurable fun x => (Finset.range (n + 1)).sup' ⋯ fun k => f k x


theorem curryFinFinset_symm_apply_piecewise_const {k l n : ℕ} {s : Finset (Fin n)} (hk : s.card = k)
    (hl : sᶜ.card = l)
    (f : MultilinearMap R (fun _ : Fin k => M') (MultilinearMap R (fun _ : Fin l => M') M₂))
    (x y : M') :
    (curryFinFinset R M₂ M' hk hl).symm f (s.piecewise (fun _ => x) fun _ => y) =
      f (fun _ => x) fun _ => y

(f : MultilinearMap R (fun x => M') (MultilinearMap R (fun x => M') M₂))

((MultilinearMap.curryFinFinset R M₂ M' hk hl).symm f) (s.piecewise (fun x_1 => x) fun x => y) =
  (f fun x_1 => x) fun x => y


theorem univ_ofSubsingleton (a : α) [Subsingleton α] : @univ _ (ofSubsingleton a) = {a}


/-- The type of continuous monoid homomorphisms from `A` to `B`.

When possible, instead of parametrizing results over `(f : ContinuousMonoidHom A B)`,
you should parametrize over `(F : Type*) [ContinuousMonoidHomClass F A B] (f : F)`.

When you extend this structure, make sure to extend `ContinuousAddMonoidHomClass`. -/
@[to_additive "The type of continuous additive monoid homomorphisms from `A` to `B`."]
structure ContinuousMonoidHom extends A →* B where
  /-- Proof of continuity of the Hom. -/
  continuous_toFun : @Continuous A B _ _ toFun

{A : Type u_2}
{B : Type u_3}
[Monoid A]
[Monoid B]
[TopologicalSpace A]
[TopologicalSpace B]
(self : ContinuousMonoidHom A B)


/-- Being finitely-presented respects isomorphisms. -/
theorem finitePresentation_respectsIso : RingHom.RespectsIso @RingHom.FinitePresentation


@[to_additive]
theorem index_eq_card : H.index = Nat.card (G ⧸ H)

{G : Type u_1}
[AddGroup G]
(H : AddSubgroup G)


theorem measurable_of_Iic {f : δ → α} (hf : ∀ x, MeasurableSet (f ⁻¹' Iic x)) : Measurable f

(hf : ∀ (x : α), MeasurableSet (f ⁻¹' Set.Iic x))


@[ext]
theorem ext {p q : RingSeminorm R} : (∀ x, p x = q x) → p = q

{R : Type u_2}
[NonUnitalRing R]
{p q : RingSeminorm R}


theorem natDegree_mul_le_of_le (hp : natDegree p ≤ m) (hg : natDegree q ≤ n) :
    natDegree (p * q) ≤ m + n

{R : Type u}
{n m : ℕ}
[Semiring R]
{p q : R[X]}
(hp : p.natDegree ≤ m)
(hg : q.natDegree ≤ n)


theorem degree_pos_of_not_isUnit_of_dvd_monic (ha : ¬IsUnit a) (hap : a ∣ p) : 0 < degree a

{R : Type u}
[CommSemiring R]
{a p : R[X]}
(hp : p.Monic)
(ha : ¬IsUnit a)
(hap : a ∣ p)


theorem comp_assoc
    {R₄ M₄ : Type*} [Semiring R₄] [AddCommMonoid M₄] [Module R₄ M₄]
    {σ₃₄ : R₃ →+* R₄} {σ₂₄ : R₂ →+* R₄} {σ₁₄ : R₁ →+* R₄}
    [RingHomCompTriple σ₂₃ σ₃₄ σ₂₄] [RingHomCompTriple σ₁₃ σ₃₄ σ₁₄] [RingHomCompTriple σ₁₂ σ₂₄ σ₁₄]
    (f : M₁ →ₛₗ[σ₁₂] M₂) (g : M₂ →ₛₗ[σ₂₃] M₃) (h : M₃ →ₛₗ[σ₃₄] M₄) :
    ((h.comp g : M₂ →ₛₗ[σ₂₄] M₄).comp f : M₁ →ₛₗ[σ₁₄] M₄) = h.comp (g.comp f : M₁ →ₛₗ[σ₁₃] M₃)

{R₁ : Type u_2}
{R₂ : Type u_3}
{R₃ : Type u_4}
{M₁ : Type u_10}
{M₂ : Type u_11}
{M₃ : Type u_12}
[Semiring R₁]
[Semiring R₂]
[Semiring R₃]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid M₃]
{module_M₁ : Module R₁ M₁}
{module_M₂ : Module R₂ M₂}
{module_M₃ : Module R₃ M₃}
{σ₁₂ : R₁ →+* R₂}
{σ₂₃ : R₂ →+* R₃}
{σ₁₃ : R₁ →+* R₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
{R₄ : Type u_17}
{M₄ : Type u_18}
[Semiring R₄]
[AddCommMonoid M₄]
[Module R₄ M₄]
{σ₃₄ : R₃ →+* R₄}
{σ₂₄ : R₂ →+* R₄}
{σ₁₄ : R₁ →+* R₄}
[RingHomCompTriple σ₂₃ σ₃₄ σ₂₄]
[RingHomCompTriple σ₁₃ σ₃₄ σ₁₄]
[RingHomCompTriple σ₁₂ σ₂₄ σ₁₄]
(f : M₁ →ₛₗ[σ₁₂] M₂)
(g : M₂ →ₛₗ[σ₂₃] M₃)
(h : M₃ →ₛₗ[σ₃₄] M₄)


@[to_additive]
theorem comap_le_comap_iff_of_surjective {S T : Subsemigroup N} : S.comap f ≤ T.comap f ↔ S ≤ T

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{f : M →ₙ* N}
(hf : Function.Surjective ⇑f)
{S T : Subsemigroup N}

Subsemigroup.comap f S ≤ Subsemigroup.comap f T ↔ S ≤ T


theorem opProductIsoCoproduct'_inv_comp_lift {f : Fan Z} {c : Cofan (op <| Z ·)}
    (hf : IsLimit f) (hc : IsColimit c) (f' : Fan Z) :
    (opProductIsoCoproduct' hf hc).inv ≫ (hf.lift f').op = hc.desc f'.op

{c : CategoryTheory.Limits.Cofan fun x => Opposite.op (Z x)}

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.opProductIsoCoproduct' hf hc).inv ≫ (hf.lift f').op = hc.desc f'.op


/-- If a group `G` acts on `α` by measurable maps, then each element `c : G` defines a measurable
automorphism of `α`. -/
@[to_additive (attr := simps! (config := .asFn) toEquiv apply)
      "If an additive group `G` acts on `α` by measurable maps, then each element `c : G`
      defines a measurable automorphism of `α`." ]
def smul (c : G) : α ≃ᵐ α

{G : Type u_1}
{α : Type u_3}
[MeasurableSpace G]
[MeasurableSpace α]
[Group G]
[MulAction G α]
[MeasurableSMul G α]
(c : G)

(MeasurableEquiv.smul c).toEquiv = MulAction.toPerm c


@[to_additive]
theorem smul_finset_symmDiff : a • s ∆ t = (a • s) ∆ (a • t)

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[AddGroup α]
[AddAction α β]
{s t : Finset β}
{a : α}

a +ᵥ symmDiff s t = symmDiff (a +ᵥ s) (a +ᵥ t)


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

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

hS.singleTriangle.obj₂ = (DerivedCategory.singleFunctor C 0).obj S.X₂


@[to_additive (attr := simp)]
theorem mul_div_div_cancel (a b c : G) : a * b / (a / c) = b * c

{G : Type u_3}
[CommGroup G]
(a b c : G)


theorem normSq_eq_conj_mul_self {z : ℂ} : (normSq z : ℂ) = conj z * z

↑(Complex.normSq z) = (starRingEnd ℂ) z * z


theorem compl_section_ordSeparatingSet_mem_nhdsWithin_Ici (hd : Disjoint s (closure t))
    (ha : a ∈ s) : (ordConnectedSection (ordSeparatingSet s t))ᶜ ∈ 𝓝[≥] a

{X : Type u_1}
[LinearOrder X]
[TopologicalSpace X]
[OrderTopology X]
{a : X}
{s t : Set X}
(hd : Disjoint s (closure t))
(ha : a ∈ s)

(s.ordSeparatingSet t).ordConnectedSectionᶜ ∈ 𝓝[≥] a


@[to_additive]
lemma IsPretransitive.of_compHom {M N α : Type*} [Monoid M] [Monoid N] [MulAction N α]
    (f : M →* N) [h : letI := compHom α f; IsPretransitive M α] : IsPretransitive N α

{M : Type u_11}
{N : Type u_12}
{α : Type u_13}
[Monoid M]
[Monoid N]
[MulAction N α]
(f : M →* N)
[h : MulAction.IsPretransitive M α]


@[norm_cast]
theorem nsmul_coe (n : ℕ) (r : { x : α // 0 ≤ x }) :
    ↑(n • r) = n • (r : α)

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


theorem eta_fin_two (A : Matrix (Fin 2) (Fin 2) α) : A = !![A 0 0, A 0 1; A 1 0, A 1 1]

{α : Type u}
(A : Matrix (Fin 2) (Fin 2) α)


theorem forget₂_map_associator_inv (X Y Z : AlgebraCat.{u} R) :
    (forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).inv =
      (α_
        (forget₂ _ (ModuleCat R) |>.obj X)
        (forget₂ _ (ModuleCat R) |>.obj Y)
        (forget₂ _ (ModuleCat R) |>.obj Z)).inv

{R : Type u}
[CommRing R]
(X Y Z : AlgebraCat R)

(CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).map (α_ X Y Z).inv =
  (α_ ((CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).obj X)
      ((CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).obj Y)
      ((CategoryTheory.forget₂ (AlgebraCat R) (ModuleCat R)).obj Z)).inv


theorem coeff_sub_eq_neg_right_of_lt (df : p.natDegree < n) : (p - q).coeff n = -q.coeff n

{R : Type u}
{n : ℕ}
[Ring R]
{p q : R[X]}
(df : p.natDegree < n)


@[ext]
protected theorem UniformSpace.ext {u₁ u₂ : UniformSpace α} (h : 𝓤[u₁] = 𝓤[u₂]) : u₁ = u₂

{α : Type ua}
{u₁ u₂ : UniformSpace α}
(h : 𝓤 α = 𝓤 α)


/-- Three points are affinely independent if and only if they are not
collinear. -/
theorem affineIndependent_iff_not_collinear {p : Fin 3 → P} :
    AffineIndependent k p ↔ ¬Collinear k (Set.range p)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p : Fin 3 → P}


theorem not_mem_nil : a ∉ (Vector.nil : Vector α 0).toList


/-- Composition and products commute.
  This is `Path.trans_pi_eq_pi_trans` descended to path homotopy classes. -/
theorem comp_pi_eq_pi_comp (γ₀ : ∀ i, Path.Homotopic.Quotient (as i) (bs i))
    (γ₁ : ∀ i, Path.Homotopic.Quotient (bs i) (cs i)) : pi γ₀ ⬝ pi γ₁ = pi fun i ↦ γ₀ i ⬝ γ₁ i

(γ₀ : (i : ι) → Path.Homotopic.Quotient (as i) (bs i))

(γ₁ : (i : ι) → Path.Homotopic.Quotient (bs i) (cs i))

(Path.Homotopic.pi γ₀).comp (Path.Homotopic.pi γ₁) = Path.Homotopic.pi fun i => (γ₀ i).comp (γ₁ i)


@[simp]
theorem injective_iff {α : Sort*} {f : Bool → α} : Function.Injective f ↔ f false ≠ f true


theorem mem_of_max {s : Finset α} : ∀ {a : α}, s.max = a → a ∈ s

{α : Type u_2}
[LinearOrder α]
{s : Finset α}
{a : α}


lemma l2_opNNNorm_conjTranspose_mul_self (A : Matrix m n 𝕜) : ‖Aᴴ * A‖₊ = ‖A‖₊ * ‖A‖₊

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

‖Aᴴ * A‖₊ = ‖A‖₊ * ‖A‖₊


@[simp]
theorem deriv_tan (x : ℂ) : deriv tan x = 1 / cos x ^ 2

deriv Complex.tan x = 1 / Complex.cos x ^ 2


theorem StronglyMeasurable.integral_kernel_prod_right'' {f : β × γ → E}
    (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂η (a, x)

{η : ProbabilityTheory.Kernel (α × β) γ}

(hf : MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable fun x => ∫ (y : γ), f (x, y) ∂η (a, x)


theorem isCoseparator_prod (G H : C) [HasBinaryProduct G H] :
    IsCoseparator (G ⨯ H) ↔ IsCoseparating ({G, H} : Set C)

CategoryTheory.IsCoseparator (G ⨯ H) ↔ CategoryTheory.IsCoseparating {G, H}


lemma factorsThrough_conductor : FactorsThrough χ (conductor χ)

{R : Type u_1}
[CommMonoidWithZero R]
{n : ℕ}
(χ : DirichletCharacter R n)


@[simp]
theorem sum_smul (i : Int) (xs : IntList) : (i * xs).sum = i * (xs.sum)


/-- A topological space is path-connected if it is non-empty and every two points can be
joined by a continuous path. -/
class PathConnectedSpace (X : Type*) [TopologicalSpace X] : Prop where
  /-- A path-connected space must be nonempty. -/
  nonempty : Nonempty X
  /-- Any two points in a path-connected space must be joined by a continuous path. -/
  joined : ∀ x y : X, Joined x y

{X : Type u_4}
[TopologicalSpace X]
[self : PathConnectedSpace X]


lemma W_eq_inverseImage_isomorphisms_of_adjunction (adj : G ⊣ sheafToPresheaf J A) :
    J.W = (MorphismProperty.isomorphisms _).inverseImage G

(J : CategoryTheory.GrothendieckTopology C)

{G : CategoryTheory.Functor (CategoryTheory.Functor Cᵒᵖ A) (CategoryTheory.Sheaf J A)}

(adj : G ⊣ CategoryTheory.sheafToPresheaf J A)

J.W = (CategoryTheory.MorphismProperty.isomorphisms (CategoryTheory.Sheaf J A)).inverseImage G


/-- The equivalence that is part of the universal property of the pushout. A hom out of
the pushout is just a morphism out of all groups in the pushout that satisfies a commutativity
condition. -/
@[simps]
def homEquiv :
    (PushoutI φ →* K) ≃ { f : (Π i, G i →* K) × (H →* K) // ∀ i, (f.1 i).comp (φ i) = f.2 }

{ι : Type u_1}
{G : ι → Type u_2}
{H : Type u_3}
{K : Type u_4}
[Monoid K]
[(i : ι) → Monoid (G i)]
[Monoid H]
{φ : (i : ι) → H →* G i}
(f : Monoid.PushoutI φ →* K)

↑(Monoid.PushoutI.homEquiv f) = (fun i => f.comp (Monoid.PushoutI.of i), f.comp (Monoid.PushoutI.base φ))


lemma ofUpperSet_le_iff {a b : WithUpperSet α} : ofUpperSet a ≤ ofUpperSet b ↔ a ≤ b

{α : Type u_1}
[Preorder α]
{a b : Topology.WithUpperSet α}

Topology.WithUpperSet.ofUpperSet a ≤ Topology.WithUpperSet.ofUpperSet b ↔ a ≤ b


theorem false_of_nontrivial_of_subsingleton (α : Type*) [Nontrivial α] [Subsingleton α] : False

(α : Type u_3)
[Nontrivial α]
[Subsingleton α]


@[to_additive (attr := simp, norm_cast)]
theorem coe_pow (x : H) (n : ℕ) : ((x ^ n : H) : G) = (x : G) ^ n

{G : Type u_1}
[Group G]
(H : Subgroup G)
(x : ↥H)
(n : ℕ)


theorem Lex.acc_of_single (hbot : ∀ ⦃i a⦄, ¬s i a 0) [DecidableEq ι]
    [∀ (i) (x : α i), Decidable (x ≠ 0)] (x : Π₀ i, α i) :
    (∀ i ∈ x.support, Acc (DFinsupp.Lex r s) <| single i (x i)) → Acc (DFinsupp.Lex r s) x

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

(∀ i ∈ x.support, Acc (DFinsupp.Lex r s) (DFinsupp.single i (x i))) → Acc (DFinsupp.Lex r s) x


@[simp] lemma singleton_subset : {a} ⊆ s ↔ a ∈ s


@[refl]
theorem Subset.refl {l : Lists' α true} : l ⊆ l


theorem Disjoint.eq_bot_of_ge (hab : Disjoint a b) : b ≤ a → b = ⊥

{α : Type u_1}
[PartialOrder α]
[OrderBot α]
{a b : α}
(hab : Disjoint a b)


@[to_additive (attr := simp, norm_cast)]
theorem coe_zero : ⇑(0 : GroupSeminorm E) = 0


theorem one_le_hausdorffMeasure_zero_of_nonempty {s : Set X} (h : s.Nonempty) : 1 ≤ μH[0] s

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{s : Set X}
(h : s.Nonempty)


theorem IsDiag.isSymm [Zero α] {A : Matrix n n α} (h : A.IsDiag) : A.IsSymm

{α : Type u_1}
{n : Type u_4}
[Zero α]
{A : Matrix n n α}
(h : A.IsDiag)


@[simp]
theorem coe_trans (e₁ : E ≃ₛₗᵢ[σ₁₂] E₂) (e₂ : E₂ ≃ₛₗᵢ[σ₂₃] E₃) : ⇑(e₁.trans e₂) = e₂ ∘ e₁

{R : Type u_1}
{R₂ : Type u_2}
{R₃ : Type u_3}
{E : Type u_5}
{E₂ : Type u_6}
{E₃ : Type u_7}
[Semiring R]
[Semiring R₂]
[Semiring R₃]
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
{σ₁₃ : R →+* R₃}
{σ₃₁ : R₃ →+* R}
{σ₂₃ : R₂ →+* R₃}
{σ₃₂ : R₃ →+* R₂}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[RingHomInvPair σ₁₃ σ₃₁]
[RingHomInvPair σ₃₁ σ₁₃]
[RingHomInvPair σ₂₃ σ₃₂]
[RingHomInvPair σ₃₂ σ₂₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup E₂]
[SeminormedAddCommGroup E₃]
[Module R E]
[Module R₂ E₂]
[Module R₃ E₃]
(e₁ : E ≃ₛₗᵢ[σ₁₂] E₂)
(e₂ : E₂ ≃ₛₗᵢ[σ₂₃] E₃)