/-- In a linearly ordered field with the order topology, if `f` tends to `Filter.atBot` and `g`
tends to a positive constant `C` then `f * g` tends to `Filter.atBot`. -/
theorem Filter.Tendsto.atBot_mul {C : 𝕜} (hC : 0 < C) (hf : Tendsto f l atBot)
    (hg : Tendsto g l (𝓝 C)) : Tendsto (fun x => f x * g x) l atBot

{𝕜 : Type u_1}
{α : Type u_2}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{l : Filter α}
{f g : α → 𝕜}
{C : 𝕜}
(hC : 0 < C)
(hf : Filter.Tendsto f l Filter.atBot)
(hg : Filter.Tendsto g l (𝓝 C))

Filter.Tendsto (fun x => f x * g x) l Filter.atBot


theorem _root_.isometry_dcomp {ι} [Fintype ι] {α β : ι → Type*} [∀ i, PseudoEMetricSpace (α i)]
    [∀ i, PseudoEMetricSpace (β i)] (f : ∀ i, α i → β i) (hf : ∀ i, Isometry (f i)) :
    Isometry (fun g : (i : ι) → α i => fun i => f i (g i))

{ι : Type u_4}
[Fintype ι]
{α : ι → Type u_2}
{β : ι → Type u_3}
[(i : ι) → PseudoEMetricSpace (α i)]
[(i : ι) → PseudoEMetricSpace (β i)]
(f : (i : ι) → α i → β i)
(hf : ∀ (i : ι), Isometry (f i))


/-- **First moment method**. An integrable function is greater than its integral on a set of
positive measure. -/
theorem measure_integral_le_pos (hf : Integrable f μ) : 0 < μ {x | ∫ a, f a ∂μ ≤ f x}

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
[MeasureTheory.IsProbabilityMeasure μ]
(hf : MeasureTheory.Integrable f μ)


@[simp]
theorem nhds_nil : 𝓝 ([] : List α) = pure []


/-- The map `(x, y) ↦ (x, x⁻¹y)` is measure-preserving.
This is the function `S⁻¹` in [Halmos, §59],
where `S` is the map `(x, y) ↦ (x, xy)`. -/
@[to_additive measurePreserving_prod_neg_add
"The map `(x, y) ↦ (x, - x + y)` is measure-preserving."]
theorem measurePreserving_prod_inv_mul [IsMulLeftInvariant ν] :
    MeasurePreserving (fun z : G × G => (z.1, z.1⁻¹ * z.2)) (μ.prod ν) (μ.prod ν)

{G : Type u_1}
[MeasurableSpace G]
[Group G]
[MeasurableMul₂ G]
(μ ν : MeasureTheory.Measure G)
[MeasureTheory.SFinite ν]
[MeasureTheory.SFinite μ]
[MeasurableInv G]
[ν.IsMulLeftInvariant]

MeasureTheory.MeasurePreserving (fun z => (z.1, z.1⁻¹ * z.2)) (μ.prod ν) (μ.prod ν)


theorem cbiInf_eq_of_forall {p : ι → Prop} {f : Subtype p → α} (hp : ∀ i, p i) :
    ⨅ (i) (h : p i), f ⟨i, h⟩ = iInf f

{α : Type u_1}
{ι : Sort u_4}
[ConditionallyCompleteLattice α]
{p : ι → Prop}
{f : Subtype p → α}
(hp : ∀ (i : ι), p i)


/-- Every matrix indexed by a subsingleton is diagonal. -/
theorem isDiag_of_subsingleton [Zero α] [Subsingleton n] (A : Matrix n n α) : A.IsDiag

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


@[reassoc (attr := simp)]
theorem pullbackDiagonalMapIdIso_inv_fst :
    (pullbackDiagonalMapIdIso f g i).inv ≫ pullback.fst _ _ = pullback.fst _ _ ≫ f

[CategoryTheory.Limits.HasPullback (f ≫ i) (g ≫ i)]

[CategoryTheory.Limits.HasPullback (CategoryTheory.Limits.pullback.diagonal i)
    (CategoryTheory.Limits.pullback.map (f ≫ i) (g ≫ i) i i f g (𝟙 S) ⋯ ⋯)]

(CategoryTheory.Limits.pullbackDiagonalMapIdIso f g i).inv ≫
    CategoryTheory.Limits.pullback.fst (CategoryTheory.Limits.pullback.diagonal i)
      (CategoryTheory.Limits.pullback.map (f ≫ i) (g ≫ i) i i f g (𝟙 S) ⋯ ⋯) =
  CategoryTheory.Limits.pullback.fst f g ≫ f


theorem thickenedIndicator_zero {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) {x : α}
    (x_out : x ∉ thickening δ E) : thickenedIndicator δ_pos E x = 0

{α : Type u_1}
[PseudoEMetricSpace α]
{δ : ℝ}
(δ_pos : 0 < δ)
(E : Set α)
{x : α}
(x_out : x ∉ Metric.thickening δ E)


/-- The empty word -/
@[simps]
def empty : NormalWord d

{d : HNNExtension.NormalWord.TransversalPair G A B}


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

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(e : M ≃ₗ⁅R,L⁆ N)


theorem zero_mem_smul_set_iff (ha : a ≠ 0) : (0 : β) ∈ a • t ↔ (0 : β) ∈ t

{α : Type u_2}
{β : Type u_3}
[Zero β]
[SMulZeroClass α β]
{t : Set β}
{a : α}
[Zero α]
[NoZeroSMulDivisors α β]
(ha : a ≠ 0)


@[simp]
theorem X_dvd_X [Nontrivial R] {i j : σ} :
    (X i : MvPolynomial σ R) ∣ (X j : MvPolynomial σ R) ↔ i = j

{σ : Type u_1}
{R : Type u_2}
[CommSemiring R]
[Nontrivial R]
{i j : σ}

MvPolynomial.X i ∣ MvPolynomial.X j ↔ i = j


@[simp, norm_cast]
theorem op_coe (S : Subring R) : S.op = MulOpposite.unop ⁻¹' (S : Set R)


protected theorem Nonempty.sigma :
    s.Nonempty → (∀ i, (t i).Nonempty) → (s.sigma t).Nonempty

{ι : Type u_1}
{α : ι → Type u_3}
{s : Set ι}
{t : (i : ι) → Set (α i)}

s.Nonempty → (∀ (i : ι), (t i).Nonempty) → (s.sigma t).Nonempty


/-- The angle between two vectors is at most π. -/
theorem angle_le_pi (x y : V) : angle x y ≤ π

{V : Type u_1}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
(x y : V)


/-- A lax functor `F` between bicategories `B` and `C` consists of a function between objects
`F.obj`, a function between 1-morphisms `F.map`, and a function between 2-morphisms `F.map₂`.

Unlike functors between categories, `F.map` do not need to strictly commute with the composition,
and do not need to strictly preserve the identity. Instead, there are specified 2-morphisms
`𝟙 (F.obj a) ⟶ F.map (𝟙 a)` and `F.map f ≫ F.map g ⟶ F.map (f ≫ g)`.

`F.map₂` strictly commute with compositions and preserve the identity. They also preserve the
associator, the left unitor, and the right unitor modulo some adjustments of domains and codomains
of 2-morphisms.
-/
structure LaxFunctor (B: Type u₁) [Bicategory.{w₁, v₁} B] (C : Type u₂) [Bicategory.{w₂, v₂} C]
    extends PrelaxFunctor B C where
  /-- The 2-morphism underlying the lax unity constraint. -/
  mapId (a : B) : 𝟙 (obj a) ⟶ map (𝟙 a)
  /-- The 2-morphism underlying the lax functoriality constraint. -/
  mapComp {a b c : B} (f : a ⟶ b) (g : b ⟶ c) : map f ≫ map g ⟶ map (f ≫ g)
  /-- Naturality of the lax functoriality constraight, on the left. -/
  mapComp_naturality_left :
    ∀ {a b c : B} {f f' : a ⟶ b} (η : f ⟶ f') (g : b ⟶ c),
      mapComp f g ≫ map₂ (η ▷ g) = map₂ η ▷ map g ≫ mapComp f' g:= by aesop_cat
  /-- Naturality of the lax functoriality constraight, on the right. -/
  mapComp_naturality_right :
    ∀ {a b c : B} (f : a ⟶ b) {g g' : b ⟶ c} (η : g ⟶ g'),
     mapComp f g ≫ map₂ (f ◁ η) = map f ◁ map₂ η ≫ mapComp f g' := by aesop_cat
  /-- Lax associativity -/
  map₂_associator :
    ∀ {a b c d : B} (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d),
      mapComp f g ▷ map h ≫ mapComp (f ≫ g) h ≫ map₂ (α_ f g h).hom =
      (α_ (map f) (map g) (map h)).hom ≫ map f ◁ mapComp g h ≫ mapComp f (g ≫ h) := by aesop_cat
  /-- Lax left unity -/
  map₂_leftUnitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (λ_ f).inv = (λ_ (map f)).inv ≫ mapId a ▷ map f ≫ mapComp (𝟙 a) f := by aesop_cat
  /-- Lax right unity -/
  map₂_rightUnitor :
    ∀ {a b : B} (f : a ⟶ b),
      map₂ (ρ_ f).inv = (ρ_ (map f)).inv ≫ map f ◁ mapId b ≫ mapComp f (𝟙 b) := by aesop_cat

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(self : CategoryTheory.LaxFunctor B C)
{a b c : B}
(f : a ⟶ b)
{g g' : b ⟶ c}
(η : g ⟶ g')

CategoryTheory.CategoryStruct.comp (self.mapComp f g) (self.map₂ (CategoryTheory.Bicategory.whiskerLeft f η)) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (self.map f) (self.map₂ η))
    (self.mapComp f g')


theorem not_or_intro {a b : Prop} (ha : ¬a) (hb : ¬b) : ¬(a ∨ b)


@[to_additive]
lemma mul_subset_range {s t : Set β} (hs : s ⊆ range m) (ht : t ⊆ range m) : s * t ⊆ range m

{F : Type u_1}
{α : Type u_2}
{β : Type u_3}
[Add α]
[Add β]
[FunLike F α β]
[AddHomClass F α β]
(m : F)
{s t : Set β}
(hs : s ⊆ Set.range ⇑m)
(ht : t ⊆ Set.range ⇑m)


/-- Pythagorean theorem, subtracting vectors, vector inner product
form. -/
theorem norm_sub_sq_eq_norm_sq_add_norm_sq_real {x y : F} (h : ⟪x, y⟫_ℝ = 0) :
    ‖x - y‖ * ‖x - y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{x y : F}
(h : ⟪x, y⟫_ℝ = 0)


/-- The range of an injective indexed family of points is convex independent iff that family is. -/
theorem Function.Injective.convexIndependent_iff_set {p : ι → E} (hi : Function.Injective p) :
    ConvexIndependent 𝕜 ((↑) : Set.range p → E) ↔ ConvexIndependent 𝕜 p

{𝕜 : Type u_1}
{E : Type u_2}
{ι : Type u_3}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{p : ι → E}
(hi : Function.Injective p)

ConvexIndependent 𝕜 Subtype.val ↔ ConvexIndependent 𝕜 p


/-- Given a family of Hilbert spaces `G : ι → Type*`, a Hilbert sum of `G` consists of a Hilbert
space `E` and an orthogonal family `V : Π i, G i →ₗᵢ[𝕜] E` such that the induced isometry
`Φ : lp G 2 → E` is surjective.

Keeping in mind that `lp G 2` is "the" external Hilbert sum of `G : ι → Type*`, this is analogous
to `DirectSum.IsInternal`, except that we don't express it in terms of actual submodules. -/
structure IsHilbertSum : Prop where
  ofSurjective ::
  /-- The orthogonal family constituting the summands in the Hilbert sum. -/
  protected OrthogonalFamily : OrthogonalFamily 𝕜 G V
  /-- The isometry `lp G 2 → E` induced by the orthogonal family is surjective. -/
  protected surjective_isometry : Function.Surjective OrthogonalFamily.linearIsometry

{ι : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{E : Type u_3}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[cplt : CompleteSpace E]
{G : ι → Type u_4}
[(i : ι) → NormedAddCommGroup (G i)]
[(i : ι) → InnerProductSpace 𝕜 (G i)]
{V : (i : ι) → G i →ₗᵢ[𝕜] E}
(self : IsHilbertSum 𝕜 G V)


/--
The functor assigning, to a finite set in `V`, the set of connected components in its complement.
-/
@[simps]
def componentComplFunctor : (Finset V)ᵒᵖ ⥤ Type u

{V : Type u}
(G : SimpleGraph V)
(K : (Finset V)ᵒᵖ)

G.componentComplFunctor.obj K = G.ComponentCompl ↑(Opposite.unop K)


@[trans]
theorem trans (hab : TransGen r a b) (hbc : TransGen r b c) : TransGen r a c

{α : Type u_1}
{r : α → α → Prop}
{a b c : α}
(hab : Relation.TransGen r a b)
(hbc : Relation.TransGen r b c)


theorem _root_.Matrix.Nondegenerate.toBilin {M : Matrix ι ι R₃} (h : M.Nondegenerate)
    (b : Basis ι R₃ M₃) : (Matrix.toBilin b M).Nondegenerate

{R₃ : Type u_7}
{M₃ : Type u_8}
[CommRing R₃]
[AddCommGroup M₃]
[Module R₃ M₃]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
{M : Matrix ι ι R₃}
(h : M.Nondegenerate)
(b : Basis ι R₃ M₃)


lemma Even.pow_abs (hn : Even n) (a : α) : |a| ^ n = a ^ n

{α : Type u_1}
[LinearOrderedRing α]
{n : ℕ}
(hn : Even n)
(a : α)


@[simp]
theorem MultilinearMap.uncurry_curryRight (f : MultilinearMap R M M₂) :
    f.curryRight.uncurryRight = f

[(i : Fin n.succ) → AddCommMonoid (M i)]


/-- An ergodic map is quasi ergodic. -/
theorem quasiErgodic (hf : Ergodic f μ) : QuasiErgodic f μ

{α : Type u_1}
{m : MeasurableSpace α}
{f : α → α}
{μ : MeasureTheory.Measure α}
(hf : Ergodic f μ)


theorem isLittleO_const_iff_isLittleO_one {c : F''} (hc : c ≠ 0) :
    (f =o[l] fun _x => c) ↔ f =o[l] fun _x => (1 : F)

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

(f =o[l] fun _x => c) ↔ f =o[l] fun _x => 1


@[simp]
theorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f)

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


@[simp]
theorem ofMul_prod (s : Finset ι) (f : ι → α) : ofMul (∏ i ∈ s, f i) = ∑ i ∈ s, ofMul (f i)

{ι : Type u_1}
{α : Type u_3}
[CommMonoid α]
(s : Finset ι)
(f : ι → α)

Additive.ofMul (∏ i ∈ s, f i) = ∑ i ∈ s, Additive.ofMul (f i)


theorem condexp_mono {E} [NormedLatticeAddCommGroup E] [CompleteSpace E] [NormedSpace ℝ E]
    [OrderedSMul ℝ E] {f g : α → E} (hf : Integrable f μ) (hg : Integrable g μ) (hfg : f ≤ᵐ[μ] g) :
    μ[f|m] ≤ᵐ[μ] μ[g|m]

{α : Type u_1}
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_5}
[NormedLatticeAddCommGroup E]
[CompleteSpace E]
[NormedSpace ℝ E]
[OrderedSMul ℝ E]
{f g : α → E}
(hf : MeasureTheory.Integrable f μ)
(hg : MeasureTheory.Integrable g μ)
(hfg : f ≤ᵐ[μ] g)


lemma ContinuousWithinAt.finset_inf
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) : ContinuousWithinAt (s.inf f) t x


theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable [Countable ι]
    [SigmaFiniteFiltration μ ℱ] (hτ : IsStoppingTime ℱ τ)
    [SigmaFinite (μ.trim hτ.measurableSpace_le_of_countable)] (i : ι) :
    μ[f|hτ.measurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|ℱ i]

μ[f|hτ.measurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|↑ℱ i]


theorem separable_gcd_left {F : Type*} [Field F] {f : F[X]} (hf : f.Separable) (g : F[X]) :
    (EuclideanDomain.gcd f g).Separable

{F : Type u_1}
[Field F]
{f : F[X]}
(hf : f.Separable)
(g : F[X])


@[simp]
theorem fract_add_nat (a : α) (m : ℕ) : fract (a + m) = fract a

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
(a : α)
(m : ℕ)


@[to_additive]
theorem mk_self (a : S) : mk (a : M) a = 1

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
(a : ↥S)


theorem LinearIsometry.re_apply_eq_re {f : ℂ →ₗᵢ[ℝ] ℂ} (h : f 1 = 1) (z : ℂ) : (f z).re = z.re


theorem tendsto_nhds_of_tendsto_nhdsWithin {f : β → α} {a : α} {s : Set α} {l : Filter β}
    (h : Tendsto f l (𝓝[s] a)) : Tendsto f l (𝓝 a)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{f : β → α}
{a : α}
{s : Set α}
{l : Filter β}
(h : Filter.Tendsto f l (𝓝[s] a))


@[to_additive (attr := simp)]
protected theorem mul_inv_cancel : IsUnit a → a * a⁻¹ = 1

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


theorem iInter_sigma {γ : α → Type*} (s : Sigma γ → Set β) : ⋂ ia, s ia = ⋂ i, ⋂ a, s ⟨i, a⟩

{α : Type u_1}
{β : Type u_2}
{γ : α → Type u_11}
(s : Sigma γ → Set β)


@[simp]
theorem lift_le_aleph0 {c : Cardinal.{u}} : lift.{v} c ≤ ℵ₀ ↔ c ≤ ℵ₀

Cardinal.lift.{v, u} c ≤ Cardinal.aleph0 ↔ c ≤ Cardinal.aleph0


/-- **Cauchy integral formula** for the value at the center of a disc. If `f` is continuous on a
punctured closed disc of radius `R`, is differentiable at all but countably many points of the
interior of this disc, and has a limit `y` at the center of the disc, then the integral
$\oint_{‖z-c‖=R} \frac{f(z)}{z-c}\,dz$ is equal to `2πiy`. -/
theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto {c : ℂ}
    {R : ℝ} (h0 : 0 < R) {f : ℂ → E} {y : E} {s : Set ℂ} (hs : s.Countable)
    (hc : ContinuousOn f (closedBall c R \ {c}))
    (hd : ∀ z ∈ (ball c R \ {c}) \ s, DifferentiableAt ℂ f z) (hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)) :
    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * I : ℂ) • y

(hc : ContinuousOn f (Metric.closedBall c R \ {c}))

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

(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = (2 * ↑π * Complex.I) • y


@[simp]
theorem head?_cyclicPermutations (l : List α) : (cyclicPermutations l).head? = l


@[congr]
theorem univ_unique (I J : Inhabited α) : @univ _ I = @univ _ J


@[simp]
theorem eta : ∀ x : Σa, β a, Sigma.mk x.1 x.2 = x

{α : Type u_1}
{β : α → Type u_4}
(x : (a : α) × β a)


@[simp]
theorem equivMapDomain_single (f : α ≃ β) (a : α) (b : M) :
    equivMapDomain f (single a b) = single (f a) b

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[Zero M]
(f : α ≃ β)
(a : α)
(b : M)

Finsupp.equivMapDomain f (Finsupp.single a b) = Finsupp.single (f a) b


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

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


/-- If two permutations of a tuple `f` are both monotone, then they are equal. -/
theorem unique_monotone [PartialOrder α] {f : Fin n → α} {σ τ : Equiv.Perm (Fin n)}
    (hfσ : Monotone (f ∘ σ)) (hfτ : Monotone (f ∘ τ)) : f ∘ σ = f ∘ τ

{n : ℕ}
{α : Type u_1}
[PartialOrder α]
{f : Fin n → α}
{σ τ : Equiv.Perm (Fin n)}
(hfσ : Monotone (f ∘ ⇑σ))
(hfτ : Monotone (f ∘ ⇑τ))

f ∘ ⇑σ = f ∘ ⇑τ


/-- **Bernoulli's inequality** for real exponents, non-strict version: for `0 ≤ p ≤ 1` and `-1 ≤ s`
we have `(1 + s) ^ p ≤ 1 + p * s`. -/
theorem rpow_one_add_le_one_add_mul_self {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp1 : 0 ≤ p) (hp2 : p ≤ 1) :
    (1 + s) ^ p ≤ 1 + p * s


@[to_additive coe_prod]
theorem coe_prod (f : M →* N) (g : M →* P) : ⇑(f.prod g) = Pi.prod f g

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


/-- We have `2 ≠ 0` in a nontrivial ring whose characteristic is not `2`. -/
protected lemma Ring.two_ne_zero {R : Type*} [NonAssocSemiring R] [Nontrivial R]
    (hR : ringChar R ≠ 2) : (2 : R) ≠ 0

{R : Type u_2}
[NonAssocSemiring R]
[Nontrivial R]
(hR : ringChar R ≠ 2)


theorem exists_of_mem_join : a ∈ join L → ∃ l, l ∈ L ∧ a ∈ l

∀ {α : Type u_1} {a : α} {L : List (List α)}, a ∈ L.join → ∃ l, l ∈ L ∧ a ∈ l


@[simp]
theorem dualTensorHomEquivOfBasis_apply (x : Module.Dual R M ⊗[R] N) :
    (dualTensorHomEquivOfBasis (N := N) b :
    Module.Dual R M ⊗[R] N → (M →ₗ[R] N)) x = (dualTensorHom R M N) x

(x : TensorProduct R (Module.Dual R M) N)

(dualTensorHomEquivOfBasis b) x = (dualTensorHom R M N) x


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

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

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

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

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

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

(CategoryTheory.ShortComplex.LeftHomologyMapData.ofIsLimitKernelFork φ hf₁ c₁ hc₁ hf₂ c₂ hc₂ f comm).φK = f


@[simp]
theorem card_product (s : Finset α) (t : Finset β) : card (s ×ˢ t) = card s * card t

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


theorem cobounded_eq_bot_iff : cobounded α = ⊥ ↔ BoundedSpace α

Bornology.cobounded α = ⊥ ↔ BoundedSpace α


lemma polyCharpoly_ne_zero [Nontrivial R] : (polyCharpoly φ b) ≠ 0

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{ι : Type u_5}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Fintype ι]
[DecidableEq ι]
[Module.Free R M]
[Module.Finite R M]
(b : Basis ι R L)
[Nontrivial R]


theorem getElem_eq_iff {l : List α} {n : Nat} {h : n < l.length} : l[n] = x ↔ l[n]? = some x

{α : Type u_1}
{x : α}
{l : List α}
{n : Nat}
{h : n < l.length}


@[simp, reassoc]
theorem plusMap_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) :
    J.plusMap (η ≫ γ) = J.plusMap η ≫ J.plusMap γ

(J : CategoryTheory.GrothendieckTopology C)

[CategoryTheory.Category.{max v u, w} D]

[∀ (P : CategoryTheory.Functor Cᵒᵖ D) (X : C) (S : J.Cover X), CategoryTheory.Limits.HasMultiequalizer (S.index P)]

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

J.plusMap (CategoryTheory.CategoryStruct.comp η γ) = CategoryTheory.CategoryStruct.comp (J.plusMap η) (J.plusMap γ)


@[simp] lemma UniformOnFun.toFun_ofFun (f : α → β) : toFun 𝔖 (ofFun 𝔖 f) = f

{α : Type u_1}
{β : Type u_2}
{𝔖 : Set (Set α)}
(f : α → β)

(UniformOnFun.toFun 𝔖) ((UniformOnFun.ofFun 𝔖) f) = f


theorem Arrows.pullbackCompatible_iff (x : (i : I) → P.obj (op (X i))) :
    Compatible P π x ↔ PullbackCompatible P π x

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

(x : (i : I) → P.obj (Opposite.op (X i)))

CategoryTheory.Presieve.Arrows.Compatible P π x ↔ CategoryTheory.Presieve.Arrows.PullbackCompatible P π x


@[simp]
theorem diag_card : (diag s).card = s.card

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


theorem derivWithin_mul_const (hxs : UniqueDiffWithinAt 𝕜 s x) (hc : DifferentiableWithinAt 𝕜 c s x)
    (d : 𝔸) : derivWithin (fun y => c y * d) s x = derivWithin c s x * d

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{s : Set 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{c : 𝕜 → 𝔸}
(hxs : UniqueDiffWithinAt 𝕜 s x)
(hc : DifferentiableWithinAt 𝕜 c s x)
(d : 𝔸)


lemma AEval'_def : AEval' φ = AEval R M φ

{R : Type u_2}
{M : Type u_1}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(φ : M →ₗ[R] M)


@[to_additive (attr := simp)]
theorem edist_smul_Lp (c : Mᵈᵐᵃ) (f g : Lp E p μ) : edist (c • f) (c • g) = edist f g

[MeasureTheory.VAddInvariantMeasure M α μ]


lemma nsmul_piAntidiag_univ [Fintype ι] (m : ℕ) {n : ℕ} (hn : n ≠ 0) :
    @SMul.smul _ _ Finset.smulFinset n (piAntidiag univ m) =
      (piAntidiag univ (n * m)).filter fun f : ι → ℕ ↦ ∀ i, n ∣ f i

{ι : Type u_1}
[DecidableEq ι]
[Fintype ι]
(m : ℕ)
{n : ℕ}
(hn : n ≠ 0)

SMul.smul n (Finset.univ.piAntidiag m) = Finset.filter (fun f => ∀ (i : ι), n ∣ f i) (Finset.univ.piAntidiag (n * m))


lemma piFinset_update_singleton_eq_filter_piFinset_eq (s : ∀ i, Finset (δ i)) (i : α) {a : δ i}
    (ha : a ∈ s i) :
    piFinset (Function.update s i {a}) = (piFinset s).filter (fun f ↦ f i = a)

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{δ : α → Type u_3}
[(a : α) → DecidableEq (δ a)]
(s : (i : α) → Finset (δ i))
(i : α)
{a : δ i}
(ha : a ∈ s i)

Fintype.piFinset (Function.update s i {a}) = Finset.filter (fun f => f i = a) (Fintype.piFinset s)


theorem Poly.denote_combine (ctx : Context) (p₁ p₂ : Poly) : (p₁.combine p₂).denote ctx = p₁.denote ctx + p₂.denote ctx

(ctx : Nat.Linear.Context)
(p₁ p₂ : Nat.Linear.Poly)

Nat.Linear.Poly.denote ctx (p₁.combine p₂) = Nat.Linear.Poly.denote ctx p₁ + Nat.Linear.Poly.denote ctx p₂


@[reassoc]
lemma naturality' (φ : F ⟶ G) (i j : ℕ) (hij : i ≤ j := by valid)
    (hj : j ≤ n := by valid) :
    F.map' i j ≫ app' φ j = app' φ i ≫ G.map' i j

{F G : CategoryTheory.ComposableArrows C n}

CategoryTheory.CategoryStruct.comp (F.map' i j hij hj) (CategoryTheory.ComposableArrows.app' φ j hj) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.ComposableArrows.app' φ i ⋯) (G.map' i j hij hj)


@[continuity, fun_prop]
theorem continuous_sin : Continuous sin


theorem adjoin_subset_adjoin_iff {F' : Type*} [Field F'] [Algebra F' E] {S S' : Set E} :
    (adjoin F S : Set E) ⊆ adjoin F' S' ↔
      Set.range (algebraMap F E) ⊆ adjoin F' S' ∧ S ⊆ adjoin F' S'

(F : Type u_1)
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]
{F' : Type u_3}
[Field F']
[Algebra F' E]
{S S' : Set E}

↑(IntermediateField.adjoin F S) ⊆ ↑(IntermediateField.adjoin F' S') ↔
  Set.range ⇑(algebraMap F E) ⊆ ↑(IntermediateField.adjoin F' S') ∧ S ⊆ ↑(IntermediateField.adjoin F' S')


@[to_additive]
theorem prod_apply_ite_of_false {p : α → Prop} {hp : DecidablePred p} (f g : α → γ) (k : γ → β)
    (h : ∀ x ∈ s, ¬p x) : (∏ x ∈ s, k (if p x then f x else g x)) = ∏ x ∈ s, k (g x)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
{s : Finset α}
[CommMonoid β]
{p : α → Prop}
{hp : DecidablePred p}
(f g : α → γ)
(k : γ → β)
(h : ∀ x ∈ s, ¬p x)

∏ x ∈ s, k (if p x then f x else g x) = ∏ x ∈ s, k (g x)


/-- All values are accessible under the well-founded `>`. -/
theorem apply : ∀ a : α, Acc (· > ·) a

{α : Type u}
[LT α]
[WellFoundedGT α]
(a : α)


@[simp]
-- Porting note: `simp`-normal form of `coe_comp_inf_hom`
theorem coe_comp_inf_hom' (f : LatticeHom β γ) (g : LatticeHom α β) :
    ⟨f ∘ g, map_inf (f.comp g)⟩ = (f : InfHom β γ).comp g

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[Lattice α]
[Lattice β]
[Lattice γ]
(f : LatticeHom β γ)
(g : LatticeHom α β)

{ toFun := ⇑f ∘ ⇑g, map_inf' := ⋯ } = { toFun := ⇑f, map_inf' := ⋯ }.comp { toFun := ⇑g, map_inf' := ⋯ }


@[norm_cast]
theorem toMeasure_add (μ ν : FiniteMeasure Ω) : ↑(μ + ν) = (↑μ + ↑ν : Measure Ω)

{Ω : Type u_1}
[MeasurableSpace Ω]
(μ ν : MeasureTheory.FiniteMeasure Ω)

↑(μ + ν) = ↑μ + ↑ν


/-- If one nonempty affine subspace is less than another, the same applies to their directions -/
theorem direction_lt_of_nonempty {s1 s2 : AffineSubspace k P} (h : s1 < s2)
    (hn : (s1 : Set P).Nonempty) : s1.direction < s2.direction

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{s1 s2 : AffineSubspace k P}
(h : s1 < s2)
(hn : (↑s1).Nonempty)


@[simp]
theorem cospanCompIso_app_right : (cospanCompIso F f g).app WalkingCospan.right = Iso.refl _

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

(CategoryTheory.Limits.cospanCompIso F f g).app CategoryTheory.Limits.WalkingCospan.right =
  CategoryTheory.Iso.refl ((CategoryTheory.Limits.cospan f g ⋙ F).obj CategoryTheory.Limits.WalkingCospan.right)


theorem NeBot.comap_of_range_mem {f : Filter β} {m : α → β} (_ : NeBot f) (hm : range m ∈ f) :
    NeBot (comap m f)

{α : Type u}
{β : Type v}
{f : Filter β}
{m : α → β}

f.NeBot → Set.range m ∈ f → (Filter.comap m f).NeBot


/-- `IsAntitoneBasis s` means the image of `s` is a filter basis such that `s` is decreasing. -/
structure IsAntitoneBasis extends IsBasis (fun _ => True) s'' : Prop where
  /-- The sequence of sets is antitone. -/
  protected antitone : Antitone s''

{α : Type u_1}
{ι'' : Type u_6}
[Preorder ι'']
{s'' : ι'' → Set α}
(self : Filter.IsAntitoneBasis s'')


@[gcongr]
theorem union_subset_union_left (h : s₁ ⊆ s₂) : s₁ ∪ t ⊆ s₂ ∪ t

{α : Type u_1}
[DecidableEq α]
{s₁ s₂ t : Finset α}
(h : s₁ ⊆ s₂)

s₁ ∪ t ⊆ s₂ ∪ t


/-- The anti-equivalence between simplicial objects and cosimplicial objects. -/
@[simps!]
def simplicialCosimplicialEquiv : (SimplicialObject C)ᵒᵖ ≌ CosimplicialObject Cᵒᵖ

(C : Type u)
[CategoryTheory.Category.{v, u} C]
(X : SimplexCategory ⥤ Cᵒᵖ)

∀ (X_1 : SimplexCategory), ((CategoryTheory.simplicialCosimplicialEquiv C).counitIso.hom.app X).app X_1 = 𝟙 (X.obj X_1)


{α : Type u_2}
[DecidableEq α]
[SemilatticeInf α]
{s : Finset α}


/-- If the kernel of `f : H →* G` is a `p`-group,
  then `Finite (Sylow p G)` implies `Finite (Sylow p H)`. -/
theorem Sylow.finite_of_ker_is_pGroup {H : Type*} [Group H] {f : H →* G}
    (hf : IsPGroup p f.ker) [Finite (Sylow p G)] : Finite (Sylow p H)

{p : ℕ}
{G : Type u_1}
[Group G]
{H : Type u_2}
[Group H]
{f : H →* G}
(hf : IsPGroup p ↥f.ker)
[Finite (Sylow p G)]


/-- A version of `continuous_sInf_dom` for binary functions -/
theorem continuous_sInf_dom₂ {X Y Z} {f : X → Y → Z} {tas : Set (TopologicalSpace X)}
    {tbs : Set (TopologicalSpace Y)} {tX : TopologicalSpace X} {tY : TopologicalSpace Y}
    {tc : TopologicalSpace Z} (hX : tX ∈ tas) (hY : tY ∈ tbs)
    (hf : Continuous fun p : X × Y => f p.1 p.2) : by
    haveI := sInf tas; haveI := sInf tbs
    exact @Continuous _ _ _ tc fun p : X × Y => f p.1 p.2

{X : Type u_5}
{Y : Type u_6}
{Z : Type u_7}
{f : X → Y → Z}
{tas : Set (TopologicalSpace X)}
{tbs : Set (TopologicalSpace Y)}
{tX : TopologicalSpace X}
{tY : TopologicalSpace Y}
{tc : TopologicalSpace Z}
(hX : tX ∈ tas)
(hY : tY ∈ tbs)
(hf : Continuous fun p => f p.1 p.2)


/-- The `DFinsupp` version of `Finsupp.liftAddHom_comp_single`,-/
theorem liftAddHom_comp_single [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] (f : ∀ i, β i →+ γ)
    (i : ι) : (liftAddHom (β := β) f).comp (singleAddHom β i) = f i

{ι : Type u}
{γ : Type w}
{β : ι → Type v}
[DecidableEq ι]
[(i : ι) → AddZeroClass (β i)]
[AddCommMonoid γ]
(f : (i : ι) → β i →+ γ)
(i : ι)

(DFinsupp.liftAddHom f).comp (DFinsupp.singleAddHom β i) = f i


theorem Wbtw.sameRay_vsub {x y z : P} (h : Wbtw R x y z) : SameRay R (y -ᵥ x) (z -ᵥ y)

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x y z : P}
(h : Wbtw R x y z)


theorem UniformSpace.hasBasis_nhds (x : α) :
    HasBasis (𝓝 x) (fun s : Set (α × α) => s ∈ 𝓤 α ∧ SymmetricRel s) fun s => ball x s

(𝓝 x).HasBasis (fun s => s ∈ 𝓤 α ∧ SymmetricRel s) fun s => UniformSpace.ball x s


/-- Consider a series of functions `∑' n, f n x`. If the series converges at a
point, and all functions in the series are differentiable with a summable bound on the derivatives,
then the series is differentiable and its derivative is the sum of the derivatives. -/
theorem hasFDerivAt_tsum (hu : Summable u) (hf : ∀ n x, HasFDerivAt (f n) (f' n x) x)
    (hf' : ∀ n x, ‖f' n x‖ ≤ u n) (hf0 : Summable fun n => f n x₀) (x : E) :
    HasFDerivAt (fun y => ∑' n, f n y) (∑' n, f' n x) x

(hf : ∀ (n : α) (x : E), HasFDerivAt (f n) (f' n x) x)

(hf' : ∀ (n : α) (x : E), ‖f' n x‖ ≤ u n)

HasFDerivAt (fun y => ∑' (n : α), f n y) (∑' (n : α), f' n x) x


theorem lineDerivWithin_congr' (hs : EqOn f₁ f s) (hx : x ∈ s) :
    lineDerivWithin 𝕜 f₁ s x v = lineDerivWithin 𝕜 f s x v

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{E : Type u_3}
[AddCommGroup E]
[Module 𝕜 E]
{f f₁ : E → F}
{s : Set E}
{x v : E}
(hs : Set.EqOn f₁ f s)
(hx : x ∈ s)


@[to_additive (attr := simp (default + 1))]
lemma le_inf_mul [SemilatticeInf β] [OrderTop β] {s t : Finset α} {f : α → β} {a : β} :
    a ≤ inf (s * t) f ↔ ∀ x ∈ s, ∀ y ∈ t, a ≤ f (x * y)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Mul α]
[SemilatticeInf β]
[OrderTop β]
{s t : Finset α}
{f : α → β}
{a : β}

a ≤ (s * t).inf f ↔ ∀ x ∈ s, ∀ y ∈ t, a ≤ f (x * y)


/-- The definition of `0 ≤ x` on pre-games, in terms of `0 ⧏`. -/
theorem zero_le_lf {x : PGame} : 0 ≤ x ↔ ∀ j, 0 ⧏ x.moveRight j

0 ≤ x ↔ ∀ (j : x.RightMoves), SetTheory.PGame.LF 0 (x.moveRight j)


/-- If a function is countably sub-multiplicative then it is sub-multiplicative on countable
types -/
@[to_additive "If a function is countably sub-additive then it is sub-additive on countable types"]
theorem rel_iSup_tprod [CompleteLattice α] (m : α → M) (m0 : m ⊥ = 1) (R : M → M → Prop)
    (m_iSup : ∀ s : ℕ → α, R (m (⨆ i, s i)) (∏' i, m (s i))) (s : β → α) :
    R (m (⨆ b : β, s b)) (∏' b : β, m (s b))

(m_iSup : ∀ (s : ℕ → α), R (m (⨆ i, s i)) (∏' (i : ℕ), m (s i)))


theorem List.support_sum_subset [AddMonoid M] (l : List (ι →₀ M)) :
    l.sum.support ⊆ l.foldr (Finsupp.support · ⊔ ·) ∅

{ι : Type u_1}
{M : Type u_2}
[DecidableEq ι]
[AddMonoid M]
(l : List (ι →₀ M))

l.sum.support ⊆ List.foldr (fun x x_1 => x.support ⊔ x_1) ∅ l


theorem nmul_eq_mul (a b) : a ⨳ b = toOrdinal (toNatOrdinal a * toNatOrdinal b)

a ⨳ b = NatOrdinal.toOrdinal (Ordinal.toNatOrdinal a * Ordinal.toNatOrdinal b)


@[to_additive]
theorem contMDiffAt_finset_prod' (h : ∀ i ∈ t, ContMDiffAt I' I n (f i) x) :
    ContMDiffAt I' I n (∏ i ∈ t, f i) x


/-- The Yoneda embedding for preadditive categories sends an object `X` to the copresheaf sending an
object `Y` to the `End X`-module of morphisms `X ⟶ Y`.
-/
@[simps]
def preadditiveCoyonedaObj (X : Cᵒᵖ) : C ⥤ ModuleCat.{v} (End X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
(X : Cᵒᵖ)
(Y : C)

(CategoryTheory.preadditiveCoyonedaObj X).obj Y = ModuleCat.of (CategoryTheory.End X) (Opposite.unop X ⟶ Y)


theorem Integrable.smul_of_top_left {f : α → β} {φ : α → 𝕜} (hφ : Integrable φ μ)
    (hf : Memℒp f ∞ μ) : Integrable (φ • f) μ

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup β]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[Module 𝕜 β]
[BoundedSMul 𝕜 β]
{f : α → β}
{φ : α → 𝕜}
(hφ : MeasureTheory.Integrable φ μ)
(hf : MeasureTheory.Memℒp f ⊤ μ)


theorem fromLoop_symm_toLoop {i : N} {p : Ω^ N X x} : fromLoop i (toLoop i p).symm = symmAt i p

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
{i : N}
{p : ↑(Ω^ N X x)}

GenLoop.fromLoop i (Path.symm (GenLoop.toLoop i p)) = GenLoop.symmAt i p


@[to_additive]
theorem eq_iff_eq_of_div_eq_div (H : a / b = c / d) : a = b ↔ c = d

{G : Type u_3}
[AddGroup G]
{a b c d : G}
(H : a - b = c - d)


@[simp]
theorem curryLeft_compAlternatingMap {n : ℕ} (g : N'' →ₗ[R'] N₂'')
    (f : M'' [⋀^Fin n.succ]→ₗ[R'] N'') (m : M'') :
    (g.compAlternatingMap f).curryLeft m = g.compAlternatingMap (f.curryLeft m)

{R' : Type u_10}
{M'' : Type u_11}
{N'' : Type u_13}
{N₂'' : Type u_14}
[CommSemiring R']
[AddCommMonoid M'']
[AddCommMonoid N'']
[AddCommMonoid N₂'']
[Module R' M'']
[Module R' N'']
[Module R' N₂'']
{n : ℕ}
(g : N'' →ₗ[R'] N₂'')
(f : M'' [⋀^Fin n.succ]→ₗ[R'] N'')
(m : M'')


@[to_additive]
theorem eq_top_of_card_eq [Finite H] (h : Nat.card H = Nat.card G) :
    H = ⊤

{G : Type u_1}
[Group G]
(H : Subgroup G)
[Finite ↥H]
(h : Nat.card ↥H = Nat.card G)


lemma IsHamiltonianCycle.support_count_of_ne (hp : p.IsHamiltonianCycle) (h : a ≠ b) :
    p.support.count b = 1

{α : Type u_1}
[DecidableEq α]
{G : SimpleGraph α}
{a b : α}
{p : G.Walk a a}
(hp : p.IsHamiltonianCycle)
(h : a ≠ b)


/-- Taking skyscraper presheaf at a point is functorial: `c ↦ skyscraper p₀ c` defines a functor by
sending every `f : a ⟶ b` to the natural transformation `α` defined as: `α(U) = f : a ⟶ b` if
`p₀ ∈ U` and the unique morphism to a terminal object in `C` if `p₀ ∉ U`.
-/
@[simps]
def SkyscraperPresheafFunctor.map' {a b : C} (f : a ⟶ b) :
    skyscraperPresheaf p₀ a ⟶ skyscraperPresheaf p₀ b

[(U : TopologicalSpace.Opens ↑X) → Decidable (p₀ ∈ U)]

(SkyscraperPresheafFunctor.map' p₀ f).app U =
  if h : p₀ ∈ Opposite.unop U then CategoryTheory.eqToHom ⋯ ≫ f ≫ CategoryTheory.eqToHom ⋯
  else (⋯ ▸ CategoryTheory.Limits.terminalIsTerminal).from ((skyscraperPresheaf p₀ a).obj U)


theorem coe_ne_neg_one (z : 𝔻) : (z : ℂ) ≠ -1


@[to_additive]
theorem inv_mem_Ico_iff : a⁻¹ ∈ Set.Ico c d ↔ a ∈ Set.Ioc d⁻¹ c⁻¹

{α : Type u_1}
[OrderedCommGroup α]
{a c d : α}


/-- Convergence of finite measures implies the convergence of their total masses. -/
theorem _root_.Filter.Tendsto.mass {γ : Type*} {F : Filter γ} {μs : γ → FiniteMeasure Ω}
    {μ : FiniteMeasure Ω} (h : Tendsto μs F (𝓝 μ)) : Tendsto (fun i => (μs i).mass) F (𝓝 μ.mass)

{μs : γ → MeasureTheory.FiniteMeasure Ω}

Filter.Tendsto (fun i => (μs i).mass) F (𝓝 μ.mass)


@[simp]
theorem comm_symm_tmul (m : M) (n : N) : (TensorProduct.comm R M N).symm (n ⊗ₜ m) = m ⊗ₜ n

(R : Type u_1)
[CommSemiring R]
(M : Type u_4)
(N : Type u_5)
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(m : M)
(n : N)

(TensorProduct.comm R M N).symm (n ⊗ₜ[R] m) = m ⊗ₜ[R] n


theorem not_isLeftDescent_iff {w : W} {i : B} :
    ¬cs.IsLeftDescent w i ↔ ℓ (s i * w) = ℓ w + 1

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

¬cs.IsLeftDescent w i ↔ cs.length (cs.simple i * w) = cs.length w + 1


/-- A splitting for a short complex `S` consists of the data of a retraction `r : X₂ ⟶ X₁`
of `S.f` and section `s : X₃ ⟶ X₂` of `S.g` which satisfy `r ≫ S.f + S.g ≫ s = 𝟙 _` -/
structure Splitting (S : ShortComplex C) where
  /-- a retraction of `S.f` -/
  r : S.X₂ ⟶ S.X₁
  /-- a section of `S.g` -/
  s : S.X₃ ⟶ S.X₂
  /-- the condition that `r` is a retraction of `S.f` -/
  f_r : S.f ≫ r = 𝟙 _ := by aesop_cat
  /-- the condition that `s` is a section of `S.g` -/
  s_g : s ≫ S.g = 𝟙 _ := by aesop_cat
  /-- the compatibility between the given section and retraction -/
  id : r ≫ S.f + S.g ≫ s = 𝟙 _ := by aesop_cat

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

CategoryTheory.CategoryStruct.comp self.s S.g = CategoryTheory.CategoryStruct.id S.X₃


@[simp]
lemma image_subtype_val_Ioo_Iio {a b : α} (c : Ioo a b) : Subtype.val '' Iio c = Ioo a c

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


theorem HasSum.matrix_blockDiagonal' [DecidableEq l] {f : X → ∀ i, Matrix (m' i) (n' i) R}
    {a : ∀ i, Matrix (m' i) (n' i) R} (hf : HasSum f a) :
    HasSum (fun x => blockDiagonal' (f x)) (blockDiagonal' a)

{f : X → (i : l) → Matrix (m' i) (n' i) R}

HasSum (fun x => Matrix.blockDiagonal' (f x)) (Matrix.blockDiagonal' a)


/-- $x^n-y^n = (x-y) \sum x^ky^{n-1-k}$ reformulated without `-` signs. -/
protected theorem Commute.geom_sum₂_mul_add {x y : α} (h : Commute x y) (n : ℕ) :
    (∑ i ∈ range n, (x + y) ^ i * y ^ (n - 1 - i)) * x + y ^ n = (x + y) ^ n

{α : Type u}
[Semiring α]
{x y : α}
(h : Commute x y)
(n : ℕ)

(∑ i ∈ Finset.range n, (x + y) ^ i * y ^ (n - 1 - i)) * x + y ^ n = (x + y) ^ n


protected theorem sub_le_sub_right {a b : Int} (h : a ≤ b) (c : Int) : a - c ≤ b - c


@[simp]
theorem self_trans_symm (e : α ≃+*o β) : e.trans e.symm = OrderRingIso.refl α

{α : Type u_2}
{β : Type u_3}
[Mul α]
[Add α]
[LE α]
[Mul β]
[Add β]
[LE β]
(e : α ≃+*o β)


/-- Any entry of any member of `l.ranges` is strictly smaller than `l.sum`. -/
lemma mem_mem_ranges_iff_lt_sum (l : List ℕ) {n : ℕ} :
    (∃ s ∈ l.ranges, n ∈ s) ↔ n < l.sum


@[simp] lemma toNat_bne_zero (b : Bool) : (b.toNat != 0) =  b


theorem shiftZero' : f⟦(0 : A)⟧' = (shiftZero A X).hom ≫ f ≫ (shiftZero A Y).inv

{C : Type u}
(A : Type u_1)
[CategoryTheory.Category.{v, u} C]
[AddMonoid A]
[CategoryTheory.HasShift C A]
(X Y : C)
(f : X ⟶ Y)

(CategoryTheory.shiftFunctor C 0).map f =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.shiftZero A X).hom
    (CategoryTheory.CategoryStruct.comp f (CategoryTheory.shiftZero A Y).inv)


@[simp]
theorem mapIsoToOrderIso_symm_apply (e : X ≅ Y) (Q : Subobject Y) :
    (mapIsoToOrderIso e).symm Q = (map e.inv).obj Q

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y : C}
(e : X ≅ Y)
(Q : CategoryTheory.Subobject Y)

(CategoryTheory.Subobject.mapIsoToOrderIso e).symm Q = (CategoryTheory.Subobject.map e.inv).obj Q


@[trans]
theorem le_of_le_of_equiv {x y z : PGame} (h₁ : x ≤ y) (h₂ : y ≈ z) : x ≤ z

{x y z : SetTheory.PGame}
(h₁ : x ≤ y)
(h₂ : y ≈ z)


/-- The `p`-adic norm of an integer `m` is one iff `p` doesn't divide `m`. -/
theorem int_eq_one_iff (m : ℤ) : padicNorm p m = 1 ↔ ¬(p : ℤ) ∣ m

{p : ℕ}
[hp : Fact (Nat.Prime p)]
(m : ℤ)


/-- If the signs of two oriented angles between nonzero vectors are equal, the oriented angles are
equal if and only if the unoriented angles are equal. -/
theorem angle_eq_iff_oangle_eq_of_sign_eq {w x y z : V} (hw : w ≠ 0) (hx : x ≠ 0) (hy : y ≠ 0)
    (hz : z ≠ 0) (hs : (o.oangle w x).sign = (o.oangle y z).sign) :
    InnerProductGeometry.angle w x = InnerProductGeometry.angle y z ↔
    o.oangle w x = o.oangle y z

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


/-- This is a technical result to ensure that the image of the `ℂ`-basis of `ℂ^n` defined in
`canonicalEmbedding.latticeBasis` is a `ℝ`-basis of `ℝ^r₁ × ℂ^r₂`,
see `mixedEmbedding.latticeBasis`. -/
theorem disjoint_span_commMap_ker [NumberField K] :
    Disjoint (Submodule.span ℝ (Set.range (canonicalEmbedding.latticeBasis K)))
      (LinearMap.ker (commMap K))

(K : Type u_1)
[Field K]
[NumberField K]

Disjoint (Submodule.span ℝ (Set.range ⇑(NumberField.canonicalEmbedding.latticeBasis K)))
  (LinearMap.ker (NumberField.mixedEmbedding.commMap K))


lemma limsup_le_limsup (h : u ≤ᶠ[f] v) :
    limsup u f ≤ limsup v f

{α : Type u_2}
{f : Filter α}
{u v : α → EReal}
(h : u ≤ᶠ[f] v)


/-- Consider a series of functions `∑' n, f n x`. If the series converges at a
point, and all functions in the series are differentiable with a summable bound on the derivatives,
then the series converges everywhere. -/
theorem summable_of_summable_hasFDerivAt (hu : Summable u)
    (hf : ∀ n x, HasFDerivAt (f n) (f' n x) x) (hf' : ∀ n x, ‖f' n x‖ ≤ u n)
    (hf0 : Summable fun n => f n x₀) (x : E) : Summable fun n => f n x

(hf : ∀ (n : α) (x : E), HasFDerivAt (f n) (f' n x) x)

(hf' : ∀ (n : α) (x : E), ‖f' n x‖ ≤ u n)


@[to_additive]
theorem prod_cons [CommMonoid β] {n : ℕ} (x : β) (f : Fin n → β) :
    (∏ i : Fin n.succ, (cons x f : Fin n.succ → β) i) = x * ∏ i : Fin n, f i

{β : Type u_2}
[CommMonoid β]
{n : ℕ}
(x : β)
(f : Fin n → β)

∏ i : Fin n.succ, Fin.cons x f i = x * ∏ i : Fin n, f i


theorem mem_of_superset {x y : Set α} (hx : x ∈ f) (hxy : x ⊆ y) : y ∈ f

{α : Type u}
{f : Filter α}
{x y : Set α}
(hx : x ∈ f)
(hxy : x ⊆ y)


@[simp] lemma UniformFun.ofFun_toFun (f : α →ᵤ β) : ofFun (toFun f) = f

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

UniformFun.ofFun (UniformFun.toFun f) = f


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

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


@[to_additive]
theorem mk_one : mk 1 (1 : S) = 1

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}


@[simp]
theorem monovary_toDual_left : Monovary (toDual ∘ f) g ↔ Antivary f g

{ι : Type u_1}
{α : Type u_3}
{β : Type u_4}
[Preorder α]
[Preorder β]
{f : ι → α}
{g : ι → β}

Monovary (⇑OrderDual.toDual ∘ f) g ↔ Antivary f g


lemma jacobiTheta₂_fderiv_undef (z : ℂ) {τ : ℂ} (hτ : im τ ≤ 0) : jacobiTheta₂_fderiv z τ = 0


theorem uniformContinuous_eval_const [∀ i, ContinuousSMul 𝕜 (E i)] (x : Π i, E i) :
    UniformContinuous fun f : ContinuousMultilinearMap 𝕜 E F ↦ f x

{𝕜 : Type u_1}
{ι : Type u_2}
{E : ι → Type u_3}
{F : Type u_4}
[NormedField 𝕜]
[(i : ι) → TopologicalSpace (E i)]
[(i : ι) → AddCommGroup (E i)]
[(i : ι) → Module 𝕜 (E i)]
[AddCommGroup F]
[Module 𝕜 F]
[UniformSpace F]
[UniformAddGroup F]
[∀ (i : ι), ContinuousSMul 𝕜 (E i)]
(x : (i : ι) → E i)


@[continuity, fun_prop]
lemma continuous_log : Continuous log


/-- Assumes left covariance.
The lemma assuming right covariance is `Right.one_lt_mul_of_le_of_lt`. -/
@[to_additive Left.add_pos_of_nonneg_of_pos
      "Assumes left covariance.
      The lemma assuming right covariance is `Right.add_pos_of_nonneg_of_pos`."]
theorem Left.one_lt_mul_of_le_of_lt [CovariantClass α α (· * ·) (· < ·)] {a b : α} (ha : 1 ≤ a)
    (hb : 1 < b) :
    1 < a * b

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


@[to_additive]
theorem isGLB_inv' : IsGLB s⁻¹ a⁻¹ ↔ IsLUB s a

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

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


theorem kroneckerMap_map_left (f : α' → β → γ) (g : α → α') (A : Matrix l m α) (B : Matrix n p β) :
    kroneckerMap f (A.map g) B = kroneckerMap (fun a b => f (g a) b) A B

{α : Type u_2}
{α' : Type u_3}
{β : Type u_4}
{γ : Type u_6}
{l : Type u_8}
{m : Type u_9}
{n : Type u_10}
{p : Type u_11}
(f : α' → β → γ)
(g : α → α')
(A : Matrix l m α)
(B : Matrix n p β)

Matrix.kroneckerMap f (A.map g) B = Matrix.kroneckerMap (fun a b => f (g a) b) A B


@[simp]
lemma ofReal_eq_natCast {r : ℝ} {n : ℕ} (h : n ≠ 0) : ENNReal.ofReal r = n ↔ r = n


@[norm_cast, simp]
theorem coe_coe (e : P₁ ≃ᵃ[k] P₂) : ((e : P₁ →ᵃ[k] P₂) : P₁ → P₂) = e

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


theorem Chain'.rel_head? {x l} (h : Chain' R (x :: l)) ⦃y⦄ (hy : y ∈ head? l) : R x y

{α : Type u}
{R : α → α → Prop}
{x : α}
{l : List α}
(h : List.Chain' R (x :: l))
⦃y : α⦄
(hy : y ∈ l.head?)


theorem toDualLeft_of_toDualRight_symm (x : M) (f : Dual R M) :
    (p.toDualLeft x) (p.toDualRight.symm f) = f x

{R : Type u_1}
{M : Type u_2}
{N : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(p : PerfectPairing R M N)
(x : M)
(f : Module.Dual R M)


theorem HasFDerivAt.const_cpow (hf : HasFDerivAt f f' x) (h0 : c ≠ 0 ∨ f x ≠ 0) :
    HasFDerivAt (fun x => c ^ f x) ((c ^ f x * Complex.log c) • f') x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{f : E → ℂ}
{f' : E →L[ℂ] ℂ}
{x : E}
{c : ℂ}
(hf : HasFDerivAt f f' x)
(h0 : c ≠ 0 ∨ f x ≠ 0)


theorem replicate_one (a : α) : replicate 1 a = {a}


/-- To give a morphism in the over category, it suffices to give an arrow fitting in a commutative
    triangle. -/
@[simps!]
def homMk {U V : Over X} (f : U.left ⟶ V.left) (w : f ≫ V.hom = U.hom := by aesop_cat) : U ⟶ V

(w : CategoryTheory.CategoryStruct.comp f V.hom = U.hom := by aesop_cat)


@[simp]
theorem val_mul' {m n : ZMod 0} : (m * n).val = m.val * n.val


@[simp]
theorem coe_map (f : F) (s : NonUnitalSubsemiring R) : (s.map f : Set S) = f '' s

{R : Type u}
{S : Type v}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
{F : Type u_1}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
(f : F)
(s : NonUnitalSubsemiring R)

↑(NonUnitalSubsemiring.map f s) = ⇑f '' ↑s


@[simp]
theorem support_mk'_subset {f : ∀ i, β i} {s : Multiset ι} {h} :
    (mk' f <| Trunc.mk ⟨s, h⟩).support ⊆ s.toFinset

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

{ toFun := f, support' := Trunc.mk ⟨s, h⟩ }.support ⊆ s.toFinset


@[to_additive DivisibleBy.surjective_smul]
theorem RootableBy.surjective_pow (A α : Type*) [Monoid A] [Pow A α] [Zero α] [RootableBy A α]
    {n : α} (hn : n ≠ 0) : Function.Surjective fun a : A => a ^ n

(A : Type u_4)
(α : Type u_5)
[AddMonoid A]
[SMul α A]
[Zero α]
[DivisibleBy A α]
{n : α}
(hn : n ≠ 0)


theorem convolution_smul [SMulCommClass ℝ 𝕜 F] {y : 𝕜} : f ⋆[L, μ] y • g = y • (f ⋆[L, μ] g)

{𝕜 : Type u𝕜}
{G : Type uG}
{E : Type uE}
{E' : Type uE'}
{F : Type uF}
[NormedAddCommGroup E]
[NormedAddCommGroup E']
[NormedAddCommGroup F]
{f : G → E}
{g : G → E'}
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 E']
[NormedSpace 𝕜 F]
{L : E →L[𝕜] E' →L[𝕜] F}
[MeasurableSpace G]
{μ : MeasureTheory.Measure G}
[NormedSpace ℝ F]
[AddGroup G]
[SMulCommClass ℝ 𝕜 F]
{y : 𝕜}

MeasureTheory.convolution f (y • g) L μ = y • MeasureTheory.convolution f g L μ


lemma BoundaryLE.not_mem {j : ι} (hj : e.BoundaryLE j) {k' : ι'} (hk' : c'.Rel (e.f j) k')
    (a : ι) : e.f a ≠ k'

{ι : Type u_1}
{ι' : Type u_2}
{c : ComplexShape ι}
{c' : ComplexShape ι'}
{e : c.Embedding c'}
{j : ι}
(hj : e.BoundaryLE j)
{k' : ι'}
(hk' : c'.Rel (e.f j) k')
(a : ι)


protected theorem false [Preorder α] {x : α} : x < x → False


theorem tendsto_atBot_add_nonpos_left' (hf : ∀ᶠ x in l, f x ≤ 0) (hg : Tendsto g l atBot) :
    Tendsto (fun x => f x + g x) l atBot

{α : Type u_3}
{β : Type u_4}
[OrderedAddCommMonoid β]
{l : Filter α}
{f g : α → β}
(hf : ∀ᶠ (x : α) in l, f x ≤ 0)
(hg : Filter.Tendsto g l Filter.atBot)

Filter.Tendsto (fun x => f x + g x) l Filter.atBot


/-- The sup norm of a non-zero integer matrix is at least one  -/
lemma one_le_norm_A_of_ne_zero (hA : A ≠ 0) : 1 ≤ ‖A‖

{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Fintype β]
(A : Matrix α β ℤ)
(hA : A ≠ 0)


lemma cons_sdiff_cons (hab : a ≠ b) (ha hb) : s.cons a ha \ s.cons b hb = {a}

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{a b : α}
(hab : a ≠ b)
(ha : a ∉ s)
(hb : b ∉ s)

Finset.cons a s ha \ Finset.cons b s hb = {a}


@[to_additive (attr := simp, norm_cast)]
theorem coe_one : ((1 : H) : G) = 1

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


theorem ball_zero_eq_preimage_ball {r : ℝ} : p.ball 0 r = p ⁻¹' Metric.ball 0 r

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(p : Seminorm 𝕜 E)
{r : ℝ}


/-- Reformulation of equicontinuity at `x₀` within a set `S`, comparing two variables near `x₀`
instead of comparing only one with `x₀`. -/
theorem equicontinuousWithinAt_iff_pair {F : ι → X → α} {S : Set X} {x₀ : X} (hx₀ : x₀ ∈ S) :
    EquicontinuousWithinAt F S x₀ ↔
      ∀ U ∈ 𝓤 α, ∃ V ∈ 𝓝[S] x₀, ∀ x ∈ V, ∀ y ∈ V, ∀ i, (F i x, F i y) ∈ U

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

EquicontinuousWithinAt F S x₀ ↔
  ∀ U ∈ uniformity α, ∃ V ∈ nhdsWithin x₀ S, ∀ x ∈ V, ∀ y ∈ V, ∀ (i : ι), (F i x, F i y) ∈ U


theorem support_single_subset : support (single a r) ⊆ {a}

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Zero R]
{a : Γ}
{r : R}


theorem get_eq_get_of_eq (a : Part α) (ha : a.Dom) {b : Part α} (h : a = b) :
    a.get ha = b.get (h ▸ ha)

{α : Type u_1}
(a : Part α)
(ha : a.Dom)
{b : Part α}
(h : a = b)


theorem IsProbabilityMeasure.ae_neBot [IsProbabilityMeasure μ] : NeBot (ae μ)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsProbabilityMeasure μ]


/-- A group homomorphism is a monoid homomorphism. -/
@[to_additive "An additive group homomorphism is an additive monoid homomorphism."]
theorem to_isMonoidHom : IsMonoidHom f

{α : Type u}
{β : Type v}
[Group α]
[Group β]
{f : α → β}
(hf : IsGroupHom f)


@[to_additive (attr := simp)]
lemma mulEnergy_univ_left : Eₘ[univ, t] = Fintype.card α * t.card ^ 2

{α : Type u_1}
[DecidableEq α]
[AddCommGroup α]
[Fintype α]
(t : Finset α)

Finset.univ.addEnergy t = Fintype.card α * t.card ^ 2


@[to_additive]
theorem mrange_inl : mrange (inl M N) = prod ⊤ ⊥

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]

MonoidHom.mrange (MonoidHom.inl M N) = ⊤.prod ⊥


theorem image_mono (f : α → β) : Monotone (Finset.image f)

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


@[simp]
theorem toIdeal_iInf {κ : Sort*} (s : κ → HomogeneousIdeal 𝒜) :
    (⨅ i, s i).toIdeal = ⨅ i, (s i).toIdeal

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[DecidableEq ι]
[AddMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
{𝒜 : ι → σ}
[GradedRing 𝒜]
{κ : Sort u_5}
(s : κ → HomogeneousIdeal 𝒜)


protected theorem subset (s : Set α) {t : Set α} [Finite s] (h : t ⊆ s) : Finite t

{α : Type u}
(s : Set α)
{t : Set α}
[Finite ↑s]
(h : t ⊆ s)


/-- The graph of `z • f` as a pushforward. -/
theorem smul_graph (f : E →ₗ.[R] F) (z : M) :
    (z • f).graph =
      f.graph.map ((LinearMap.id : E →ₗ[R] E).prodMap (z • (LinearMap.id : F →ₗ[R] F)))

{R : Type u_1}
[Ring R]
{E : Type u_2}
[AddCommGroup E]
[Module R E]
{F : Type u_3}
[AddCommGroup F]
[Module R F]
{M : Type u_5}
[Monoid M]
[DistribMulAction M F]
[SMulCommClass R M F]
(f : E →ₗ.[R] F)
(z : M)

(z • f).graph = Submodule.map (LinearMap.id.prodMap (z • LinearMap.id)) f.graph


@[simp]
theorem support_ofMultiset : (ofMultiset s hs).support = s.toFinset

{α : Type u_1}
{s : Multiset α}
(hs : s ≠ 0)

(PMF.ofMultiset s hs).support = ↑s.toFinset


/-- The dual cone of `s` equals the intersection of dual cones of the points in `s`. -/
theorem innerDualCone_eq_iInter_innerDualCone_singleton :
    (s.innerDualCone : Set H) = ⋂ i : s, (({↑i} : Set H).innerDualCone : Set H)

{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace ℝ H]
(s : Set H)

↑s.innerDualCone = ⋂ i, ↑{↑i}.innerDualCone


lemma fibration_iff_isUpperSet_image [Preorder α] [LE β] :
    Fibration (· ≥ ·) (· ≥ ·) f ↔ ∀ s, IsUpperSet s → IsUpperSet (f '' s)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[LE β]

Relation.Fibration (fun x x_1 => x ≥ x_1) (fun x x_1 => x ≥ x_1) f ↔ ∀ (s : Set α), IsUpperSet s → IsUpperSet (f '' s)


@[ext]
lemma hom_ext (f g : F ⟶ G) (h : f.hom = g.hom) : f = g

{F G : CategoryTheory.SingleFunctors C D A}


theorem list_foldr {f : α → List β} {g : α → σ} {h : α → β × σ → σ} (hf : Primrec f)
    (hg : Primrec g) (hh : Primrec₂ h) :
    Primrec fun a => (f a).foldr (fun b s => h a (b, s)) (g a)

{α : Type u_1}
{β : Type u_2}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α → List β}
{g : α → σ}
{h : α → β × σ → σ}
(hf : Primrec f)
(hg : Primrec g)
(hh : Primrec₂ h)

Primrec fun a => List.foldr (fun b s => h a (b, s)) (g a) (f a)


theorem completeSpace_iff (h : α ≃ᵤ β) : CompleteSpace α ↔ CompleteSpace β

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
(h : α ≃ᵤ β)


protected theorem ext_iff {p q : α × β} : p = q ↔ p.1 = q.1 ∧ p.2 = q.2

{α : Type u_1}
{β : Type u_2}
{p q : α × β}


/-- We can pull out a product over a list in the first argument of the Jacobi symbol. -/
theorem list_prod_left {l : List ℤ} {n : ℕ} : J(l.prod | n) = (l.map fun a => J(a | n)).prod

jacobiSym l.prod n = (List.map (fun a => jacobiSym a n) l).prod


theorem finite_integral_one_add_norm {r : ℝ} (hnr : (finrank ℝ E : ℝ) < r) :
    (∫⁻ x : E, ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) ∂μ) < ∞

(hnr : ↑(FiniteDimensional.finrank ℝ E) < r)

∫⁻ (x : E), ENNReal.ofReal ((1 + ‖x‖) ^ (-r)) ∂μ < ⊤


theorem Matrix.toMatrix₂Aux_toLinearMap₂'Aux (f : Matrix n m N₂) :
    LinearMap.toMatrix₂Aux R (fun i => LinearMap.stdBasis R₁ (fun _ => R₁) i 1)
        (fun j => LinearMap.stdBasis R₂ (fun _ => R₂) j 1) (f.toLinearMap₂'Aux σ₁ σ₂) =
      f

(R : Type u_1)
{R₁ : Type u_2}
{S₁ : Type u_3}
{R₂ : Type u_4}
{S₂ : Type u_5}
{N₂ : Type u_11}
{n : Type u_12}
{m : Type u_13}
[CommSemiring R]
[Semiring R₁]
[Semiring S₁]
[Semiring R₂]
[Semiring S₂]
[AddCommMonoid N₂]
[Module R N₂]
[Module S₁ N₂]
[Module S₂ N₂]
[SMulCommClass S₁ R N₂]
[SMulCommClass S₂ R N₂]
[SMulCommClass S₂ S₁ N₂]
{σ₁ : R₁ →+* S₁}
{σ₂ : R₂ →+* S₂}
[Fintype n]
[Fintype m]
[DecidableEq n]
[DecidableEq m]
(f : Matrix n m N₂)

(LinearMap.toMatrix₂Aux R (fun i => (LinearMap.stdBasis R₁ (fun x => R₁) i) 1) fun j =>
      (LinearMap.stdBasis R₂ (fun x => R₂) j) 1)
    (Matrix.toLinearMap₂'Aux σ₁ σ₂ f) =
  f


@[to_additive]
theorem le_mul_of_le_left : a ≤ b → a ≤ b * c

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


lemma mul_div_mul_right (a b : G₀) (hc : c ≠ 0) : a * c / (b * c) = a / b

{G₀ : Type u_3}
[GroupWithZero G₀]
{c : G₀}
(a b : G₀)
(hc : c ≠ 0)


private theorem eq_of_posPart_eq_posPart {j₁ j₂ : JordanDecomposition α}
    (hj : j₁.posPart = j₂.posPart) (hj' : j₁.toSignedMeasure = j₂.toSignedMeasure) : j₁ = j₂

{j₁ j₂ : MeasureTheory.JordanDecomposition α}


@[simp] theorem getElem?_cons_succ {l : List α} : (a::l)[n+1]? = l[n]?

{α : Type u_1}
{a : α}
{n : Nat}
{l : List α}


theorem list_reverse : Primrec (@List.reverse α)


/-- The pushout in the category of a `SemilatticeSup` with `OrderBot` is the same as the supremum
over the objects.
-/
@[simp]
theorem pushout_eq_sup [SemilatticeSup α] [OrderBot α] (x y z : α) (f : z ⟶ x) (g : z ⟶ y) :
    pushout f g = x ⊔ y

{α : Type u}
[SemilatticeSup α]
[OrderBot α]
(x y z : α)
(f : z ⟶ x)
(g : z ⟶ y)

CategoryTheory.Limits.pushout f g = x ⊔ y


theorem tendsto_nhds_right {f : Filter β} {u : β → α} {a : α} :
    Tendsto u f (𝓝 a) ↔ Tendsto (fun x => (a, u x)) f (𝓤 α)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
{f : Filter β}
{u : β → α}
{a : α}

Filter.Tendsto u f (𝓝 a) ↔ Filter.Tendsto (fun x => (a, u x)) f (𝓤 α)


theorem lintegral_eq_of_subset' (f : α →ₛ ℝ≥0∞) {s : Finset ℝ≥0∞} (hs : f.range \ {0} ⊆ s) :
    f.lintegral μ = ∑ x ∈ s, x * μ (f ⁻¹' {x})

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : MeasureTheory.SimpleFunc α ℝ≥0∞)
{s : Finset ℝ≥0∞}
(hs : f.range \ {0} ⊆ s)

f.lintegral μ = ∑ x ∈ s, x * μ (↑f ⁻¹' {x})


theorem finitaryExtensive_of_preserves_and_reflects_isomorphism (F : C ⥤ D) [FinitaryExtensive D]
    [HasFiniteCoproducts C] [HasPullbacks C] [PreservesLimitsOfShape WalkingCospan F]
    [PreservesColimitsOfShape (Discrete WalkingPair) F] [F.ReflectsIsomorphisms] :
    FinitaryExtensive C

[CategoryTheory.Limits.PreservesColimitsOfShape (CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair) F]


@[simp] theorem comp_app {X : TopCat} {U : (Opens X)ᵒᵖ} {P Q R : Presheaf C X}
    (f : P ⟶ Q) (g : Q ⟶ R) :
    (f ≫ g).app U = f.app U ≫ g.app U

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X : TopCat}
{U : (TopologicalSpace.Opens ↑X)ᵒᵖ}
{P Q R : TopCat.Presheaf C X}
(f : P ⟶ Q)
(g : Q ⟶ R)


/-- This lemma characterizes discrete topological spaces as those whose singletons are
neighbourhoods. -/
theorem discreteTopology_iff_nhds [TopologicalSpace α] :
    DiscreteTopology α ↔ ∀ x : α, 𝓝 x = pure x

DiscreteTopology α ↔ ∀ (x : α), 𝓝 x = pure x


/-- `p` is a Taylor series of `f` up to `n+1` if and only if `p.shift` is a Taylor series up to `n`
for `p 1`, which is a derivative of `f`. -/
theorem hasFTaylorSeriesUpToOn_succ_iff_right {n : ℕ} :
    HasFTaylorSeriesUpToOn (n + 1 : ℕ) f p s ↔
      (∀ x ∈ s, (p x 0).uncurry0 = f x) ∧
        (∀ x ∈ s, HasFDerivWithinAt (fun y => p y 0) (p x 1).curryLeft s x) ∧
          HasFTaylorSeriesUpToOn n (fun x => continuousMultilinearCurryFin1 𝕜 E F (p x 1))
            (fun x => (p x).shift) s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{p : E → FormalMultilinearSeries 𝕜 E F}
{n : ℕ}

HasFTaylorSeriesUpToOn (↑(n + 1)) f p s ↔
  (∀ x ∈ s, (p x 0).uncurry0 = f x) ∧
    (∀ x ∈ s, HasFDerivWithinAt (fun y => p y 0) (p x 1).curryLeft s x) ∧
      HasFTaylorSeriesUpToOn (↑n) (fun x => (continuousMultilinearCurryFin1 𝕜 E F) (p x 1)) (fun x => (p x).shift) s


@[simp]
theorem ofDual_iSup (f : ι → αᵒᵈ) : ofDual (⨆ i, f i) = ⨅ i, ofDual (f i)

{α : Type u_1}
{ι : Sort u_5}
[CompleteLattice α]
(f : ι → αᵒᵈ)

OrderDual.ofDual (⨆ i, f i) = ⨅ i, OrderDual.ofDual (f i)


theorem Real.exp_eq_exp_ℝ : Real.exp = NormedSpace.exp ℝ


@[to_additive (attr := simp)]
theorem map_bot (f : F) : (⊥ : Submonoid M).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]
(f : F)


theorem option_getD : Primrec₂ (@Option.getD α)


@[simp]
theorem map (hφ : IsSymmetric φ) (f : R →+* S) : IsSymmetric (map f φ)

{σ : Type u_1}
{R : Type u_2}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
{φ : MvPolynomial σ R}
(hφ : φ.IsSymmetric)
(f : R →+* S)


lemma pow_eq_neg_one_iff : a ^ n = -1 ↔ a = -1 ∧ Odd n

{R : Type u_2}
[LinearOrderedRing R]
{a : R}
{n : ℕ}


@[simp] lemma le_singleton : s ≤ {a} ↔ s = 0 ∨ s = {a}


@[simp]
theorem coe_toHomeomorph : ⇑e.toHomeomorph = e

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(e : P ≃ᵃⁱ[𝕜] P₂)


@[simp]
theorem equiv_symm : (equiv i j p).symm = equiv j i p

{K : Type u_1}
{L : Type u_2}
{M : Type u_3}
[CommRing K]
[CommRing L]
[CommRing M]
(i : K →+* L)
(j : K →+* M)
(p : ℕ)
[ExpChar K p]
[ExpChar L p]
[ExpChar M p]
[PerfectRing L p]
[IsPerfectClosure i p]
[PerfectRing M p]
[IsPerfectClosure j p]

(IsPerfectClosure.equiv i j p).symm = IsPerfectClosure.equiv j i p


protected theorem half_pos (h : a ≠ 0) : 0 < a / 2


@[simp]
lemma compProd_zero_left (κ : Kernel (α × β) γ) :
    (0 : Kernel α β) ⊗ₖ κ = 0

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

ProbabilityTheory.Kernel.compProd 0 κ = 0


theorem BlankExtends.below_of_le {Γ} [Inhabited Γ] {l l₁ l₂ : List Γ} :
    BlankExtends l l₁ → BlankExtends l l₂ → l₁.length ≤ l₂.length → BlankExtends l₁ l₂

{Γ : Type u_1}
[Inhabited Γ]
{l l₁ l₂ : List Γ}

Turing.BlankExtends l l₁ → Turing.BlankExtends l l₂ → l₁.length ≤ l₂.length → Turing.BlankExtends l₁ l₂


theorem le_antisymm {a b : ℤ√d} (ab : a ≤ b) (ba : b ≤ a) : a = b

{d : ℕ}
[dnsq : Zsqrtd.Nonsquare d]
{a b : ℤ√↑d}
(ab : a ≤ b)
(ba : b ≤ a)


/-- The functor `Square C ⥤ Arrow (Arrow C)` which sends a
commutative square `sq` to the obvious arrow from the left morphism of `sq`
to the right morphism of `sq`. -/
@[simps!]
def toArrowArrowFunctor : Square C ⥤ Arrow (Arrow C)

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

(CategoryTheory.Square.toArrowArrowFunctor.obj sq).right.right = sq.X₄


theorem Nonempty.of_image {f : α → β} {s : Set α} : (f '' s).Nonempty → s.Nonempty

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


@[to_additive]
theorem HasProd.mul_isCompl {s t : Set β} (hs : IsCompl s t) (ha : HasProd (f ∘ (↑) : s → α) a)
    (hb : HasProd (f ∘ (↑) : t → α) b) : HasProd f (a * b)

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
{a b : α}
[ContinuousMul α]
{s t : Set β}
(hs : IsCompl s t)
(ha : HasProd (f ∘ Subtype.val) a)
(hb : HasProd (f ∘ Subtype.val) b)


protected lemma map_one (f : α →*₀ β) : f 1 = 1

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


theorem normalize_eq_zero {x : α} : normalize x = 0 ↔ x = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
{x : α}


theorem IsEquipartition.filter_ne_average_add_one_eq_average (hP : P.IsEquipartition) :
    P.parts.filter (fun p ↦ ¬p.card = s.card / P.parts.card + 1) =
    P.parts.filter (fun p ↦ p.card = s.card / P.parts.card)

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{P : Finpartition s}
(hP : P.IsEquipartition)

Finset.filter (fun p => ¬p.card = s.card / P.parts.card + 1) P.parts =
  Finset.filter (fun p => p.card = s.card / P.parts.card) P.parts


{X : Type u_1}
[TopologicalSpace X]
(K : CompactExhaustion X)


theorem cycleRange_apply {n : ℕ} (i j : Fin n.succ) :
    cycleRange i j = if j < i then j + 1 else if j = i then 0 else j

i.cycleRange j = if j < i then j + 1 else if j = i then 0 else j


/-- In the commutative diagram
```
             f     g
    0 --→ X₁ --→ X₂ --→ X₃
          ↑      ↑      ↑
         v|     u|     w|
          ι  → ι ⊕ ι' ← ι'
```
where the top row is an exact sequence of modules and the maps on the bottom are `Sum.inl` and
`Sum.inr`. If `u` is injective and `v` and `w` are linearly independent, then `u` is linearly
independent. -/
theorem linearIndependent_leftExact : LinearIndependent R u

{S : CategoryTheory.ShortComplex (ModuleCat R)}

(hw : LinearIndependent R (⇑S.g ∘ u ∘ Sum.inr))


theorem map_traverse (g : α → G β) (h : β → γ) (s : Finset α) :
    Functor.map h <$> traverse g s = traverse (Functor.map h ∘ g) s

{α β γ : Type u}
{G : Type u → Type u}
[Applicative G]
[CommApplicative G]
(g : α → G β)
(h : β → γ)
(s : Finset α)

Functor.map h <$> Finset.traverse g s = Finset.traverse (Functor.map h ∘ g) s


theorem IsSt.isSt_st {x : ℝ*} {r : ℝ} (hxr : IsSt x r) : IsSt x (st x)


@[simp]
theorem sup_sdiff_self (a b : α) : a ⊔ b \ a = a ⊔ b

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


@[to_additive]
theorem eq_inv_of_mul_eq_one_right (h : a * b = 1) : b = a⁻¹

{α : Type u_1}
[DivisionMonoid α]
{a b : α}
(h : a * b = 1)


/-- Vertical composition of oplax natural transformations. -/
@[simps]
def vcomp (η : OplaxNatTrans F G) (θ : OplaxNatTrans G H) : OplaxNatTrans F H

{F G H : CategoryTheory.OplaxFunctor B C}

(η.vcomp θ).naturality f =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator (F.map f) (η.app b) (θ.app b)).inv
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerRight (η.naturality f) (θ.app b))
      (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.associator (η.app a) (G.map f) (θ.app b)).hom
        (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (η.app a) (θ.naturality f))
          (CategoryTheory.Bicategory.associator (η.app a) (θ.app a) (H.map f)).inv)))


protected theorem measurable_of_le [TopologicalSpace ι] [MeasurableSpace ι] [BorelSpace ι]
    [OrderTopology ι] [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) {i : ι}
    (hτ_le : ∀ ω, τ ω ≤ i) : Measurable[f i] τ

{Ω : Type u_1}
{ι : Type u_3}
{m : MeasurableSpace Ω}
[LinearOrder ι]
{f : MeasureTheory.Filtration ι m}
{τ : Ω → ι}
[TopologicalSpace ι]
[MeasurableSpace ι]
[BorelSpace ι]
[OrderTopology ι]
[SecondCountableTopology ι]
(hτ : MeasureTheory.IsStoppingTime f τ)
{i : ι}
(hτ_le : ∀ (ω : Ω), τ ω ≤ i)


@[to_additive]
protected theorem Multipliable.map [CommMonoid γ] [TopologicalSpace γ] (hf : Multipliable f) {G}
    [FunLike G α γ] [MonoidHomClass G α γ] (g : G) (hg : Continuous g) : Multipliable (g ∘ f)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
[CommMonoid γ]
[TopologicalSpace γ]
(hf : Multipliable f)
{G : Type u_5}
[FunLike G α γ]
[MonoidHomClass G α γ]
(g : G)
(hg : Continuous ⇑g)


theorem continuous_const' : Continuous (const X : Y → C(X, Y))

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]


theorem comap_comap (s : NonUnitalSubsemiring T) (g : G) (f : F) :
    ((s.comap g : NonUnitalSubsemiring S).comap f : NonUnitalSubsemiring R) =
      s.comap ((g : S →ₙ+* T).comp (f : R →ₙ+* S))

{R : Type u}
{S : Type v}
{T : Type w}
[NonUnitalNonAssocSemiring R]
[NonUnitalNonAssocSemiring S]
[NonUnitalNonAssocSemiring T]
{F : Type u_1}
{G : Type u_2}
[FunLike F R S]
[NonUnitalRingHomClass F R S]
[FunLike G S T]
[NonUnitalRingHomClass G S T]
(s : NonUnitalSubsemiring T)
(g : G)
(f : F)

NonUnitalSubsemiring.comap f (NonUnitalSubsemiring.comap g s) = NonUnitalSubsemiring.comap ((↑g).comp ↑f) s


theorem div_add_same (h : b ≠ 0) : (a + b) / b = a / b + 1

{α : Type u_1}
[DivisionSemiring α]
{a b : α}
(h : b ≠ 0)


@[simp]
theorem map_boundedFormula (f : M ↪ₑ[L] N) {α : Type*} {n : ℕ} (φ : L.BoundedFormula α n)
    (v : α → M) (xs : Fin n → M) : φ.Realize (f ∘ v) (f ∘ xs) ↔ φ.Realize v xs

{L : FirstOrder.Language}
{M : Type u_1}
{N : Type u_2}
[L.Structure M]
[L.Structure N]
(f : M ↪ₑ[L] N)
{α : Type u_5}
{n : ℕ}
(φ : L.BoundedFormula α n)
(v : α → M)
(xs : Fin n → M)

φ.Realize (⇑f ∘ v) (⇑f ∘ xs) ↔ φ.Realize v xs


theorem subgroup_eq_top_of_swap_mem [DecidableEq α] {H : Subgroup (Perm α)}
    [d : DecidablePred (· ∈ H)] {τ : Perm α} (h0 : (Fintype.card α).Prime)
    (h1 : Fintype.card α ∣ Fintype.card H) (h2 : τ ∈ H) (h3 : IsSwap τ) : H = ⊤

{α : Type u_1}
[Fintype α]
[DecidableEq α]
{H : Subgroup (Equiv.Perm α)}
[d : DecidablePred fun x => x ∈ H]
{τ : Equiv.Perm α}
(h0 : Nat.Prime (Fintype.card α))
(h1 : Fintype.card α ∣ Fintype.card ↥H)
(h2 : τ ∈ H)
(h3 : τ.IsSwap)


@[to_additive]
lemma CommGroup.toGroup_injective {G : Type*} : Injective (@CommGroup.toGroup G)


/-- Given a family of opens `U` and an open `Y` equal to the union of opens in `U`, we may
    take the presieve on `Y` associated to `U` and the sieve generated by it, and form the
    full subcategory (subposet) of opens contained in `Y` (`over Y`) consisting of arrows
    in the sieve. This full subcategory is equivalent to `OpensLeCover U`, the (poset)
    category of opens contained in some `U i`. -/
@[simps]
def generateEquivalenceOpensLe_inverse' :
    OpensLeCover U ⥤
    (FullSubcategory fun f : Over Y =>
      (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)

(V : TopCat.Presheaf.SheafCondition.OpensLeCover U)

((TopCat.Presheaf.generateEquivalenceOpensLe_inverse' U hY).obj V).obj.hom = CategoryTheory.homOfLE ⋯


@[simp] theorem Nat.le_zero_eq (a : Nat) : (a ≤ 0) = (a = 0)


@[mono]
theorem dualAnnihilator_anti {U V : Submodule R M} (hUV : U ≤ V) :
    V.dualAnnihilator ≤ U.dualAnnihilator

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{U V : Submodule R M}
(hUV : U ≤ V)


@[ext]
theorem ext {f g : BiheytingHom α β} (h : ∀ a, f a = g a) : f = g

{α : Type u_2}
{β : Type u_3}
[BiheytingAlgebra α]
[BiheytingAlgebra β]
{f g : BiheytingHom α β}
(h : ∀ (a : α), f a = g a)


theorem List.nnnorm_prod_le [NormOneClass α] (l : List α) : ‖l.prod‖₊ ≤ (l.map nnnorm).prod

{α : Type u_1}
[SeminormedRing α]
[NormOneClass α]
(l : List α)


theorem setOf_liouvilleWith_subset_aux :
    { x : ℝ | ∃ p > 2, LiouvilleWith p x } ⊆
      ⋃ m : ℤ, (· + (m : ℝ)) ⁻¹' ⋃ n > (0 : ℕ),
        { x : ℝ | ∃ᶠ b : ℕ in atTop, ∃ a ∈ Finset.Icc (0 : ℤ) b,
          |x - (a : ℤ) / b| < 1 / (b : ℝ) ^ (2 + 1 / n : ℝ) }

{x | ∃ p > 2, LiouvilleWith p x} ⊆
  ⋃ m,
    (fun x => x + ↑m) ⁻¹'
      ⋃ n, ⋃ (_ : n > 0), {x | ∃ᶠ (b : ℕ) in Filter.atTop, ∃ a ∈ Finset.Icc 0 ↑b, |x - ↑a / ↑b| < 1 / ↑b ^ (2 + 1 / ↑n)}


/-- Convergence along filters for `WithSeminorms`.

Variant with `Finset.sup`. -/
theorem WithSeminorms.tendsto_nhds' (hp : WithSeminorms p) (u : F → E) {f : Filter F} (y₀ : E) :
    Filter.Tendsto u f (𝓝 y₀) ↔
    ∀ (s : Finset ι) (ε), 0 < ε → ∀ᶠ x in f, s.sup p (u x - y₀) < ε

{𝕜 : Type u_1}
{E : Type u_5}
{F : Type u_6}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[Nonempty ι]
[TopologicalSpace E]
{p : SeminormFamily 𝕜 E ι}
(hp : WithSeminorms p)
(u : F → E)
{f : Filter F}
(y₀ : E)

Filter.Tendsto u f (𝓝 y₀) ↔ ∀ (s : Finset ι) (ε : ℝ), 0 < ε → ∀ᶠ (x : F) in f, (s.sup p) (u x - y₀) < ε


@[simp]
theorem transpose_eq_one [DecidableEq n] [Zero α] [One α] {M : Matrix n n α} : Mᵀ = 1 ↔ M = 1

{n : Type u_3}
{α : Type v}
[DecidableEq n]
[Zero α]
[One α]
{M : Matrix n n α}


@[simp]
theorem basisFun_repr (x : PiLp p fun _ : ι => 𝕜) (i : ι) : (basisFun p 𝕜 ι).repr x i = x i

(p : ℝ≥0∞)
(𝕜 : Type u_1)
(ι : Type u_2)
[Finite ι]
[Ring 𝕜]
(x : PiLp p fun x => 𝕜)
(i : ι)


@[to_additive (attr := simp)]
theorem map₂_div : map₂ (· / ·) f g = f / g

Filter.map₂ (fun x x_1 => x - x_1) f g = f - g


theorem Perm.diff_left (l : List α) {t₁ t₂ : List α} (h : t₁ ~ t₂) : l.diff t₁ = l.diff t₂

{α : Type u_1}
[DecidableEq α]
(l : List α)
{t₁ t₂ : List α}
(h : t₁ ~ t₂)


theorem equitabilise_isEquipartition : (P.equitabilise h).IsEquipartition

{α : Type u_1}
[DecidableEq α]
{s : Finset α}
{m a b : ℕ}
{P : Finpartition s}
{h : a * m + b * (m + 1) = s.card}


/-- Any map on a subsingleton is an isometry -/
@[nontriviality]
theorem _root_.isometry_subsingleton [Subsingleton α] : Isometry f

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f : α → β}
[Subsingleton α]


theorem inverse_mul_cancel (x : M₀) (h : IsUnit x) : inverse x * x = 1

{M₀ : Type u_2}
[MonoidWithZero M₀]
(x : M₀)
(h : IsUnit x)


@[to_additive]
theorem mulEquivOfLocalizations_symm_eq_mulEquivOfLocalizations {k : LocalizationMap S P} :
    (k.mulEquivOfLocalizations f).symm = f.mulEquivOfLocalizations k

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{k : S.LocalizationMap P}

(k.addEquivOfLocalizations f).symm = f.addEquivOfLocalizations k


@[simp]
theorem eval_reindex (g : σ ≃ σ') (x : List α) : (reindex g M).eval x = g (M.eval x)

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

((DFA.reindex g) M).eval x = g (M.eval x)


@[simp]
theorem toAdd_pow [AddMonoid α] (a : Multiplicative α) (n : ℕ) : toAdd (a ^ n) = n • toAdd a

{α : Type u}
[AddMonoid α]
(a : Multiplicative α)
(n : ℕ)

Multiplicative.toAdd (a ^ n) = n • Multiplicative.toAdd a


theorem mul_add_right_right_iff {x y z : R} : IsRelPrime x (z * x + y) ↔ IsRelPrime x y


theorem minSqFacProp_div (n) {k} (pk : Prime k) (dk : k ∣ n) (dkk : ¬k * k ∣ n) {o}
    (H : MinSqFacProp (n / k) o) : MinSqFacProp n o

(n : ℕ)
{k : ℕ}
(pk : Nat.Prime k)
(dk : k ∣ n)
(dkk : ¬k * k ∣ n)
{o : Option ℕ}
(H : (n / k).MinSqFacProp o)


theorem eq_tsub_of_add_eq (h : a + c = b) : a = b - c

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


theorem Set.Finite.closure_sUnion {S : Set (Set X)} (hS : S.Finite) :
    closure (⋃₀ S) = ⋃ s ∈ S, closure s

{X : Type u}
[TopologicalSpace X]
{S : Set (Set X)}
(hS : S.Finite)


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

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


@[simp]
theorem decompose_sub (x y : M) : decompose ℳ (x - y) = decompose ℳ x - decompose ℳ y

{ι : Type u_1}
{M : Type u_3}
{σ : Type u_4}
[DecidableEq ι]
[AddCommGroup M]
[SetLike σ M]
[AddSubgroupClass σ M]
(ℳ : ι → σ)
[DirectSum.Decomposition ℳ]
(x y : M)

(DirectSum.decompose ℳ) (x - y) = (DirectSum.decompose ℳ) x - (DirectSum.decompose ℳ) y


/-- `Fin` as a map from `ℕ` to `Type` is injective. Note that since this is a statement about
equality of types, using it should be avoided if possible. -/
theorem fin_injective : Function.Injective Fin


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

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


/-- Let `K` be a convex body that contains `0` and let `u n` be a sequence of nonnegative real
numbers that tends to `0`. Then the intersection of the dilated bodies `(1 + u n) • K` is equal
to `K`. -/
theorem iInter_smul_eq_self [T2Space V] {u : ℕ → ℝ≥0} (K : ConvexBody V) (h_zero : 0 ∈ K)
    (hu : Tendsto u atTop (𝓝 0)) :
    ⋂ n : ℕ, (1 + (u n : ℝ)) • (K : Set V) = K

(hu : Filter.Tendsto u Filter.atTop (𝓝 0))


/-- A set is a neighborhood of `a` within `(-∞, a]` if and only if it contains an interval `(l, a]`
with `l < a`. -/
theorem mem_nhdsWithin_Iic_iff_exists_Ioc_subset [NoMinOrder α] {a : α} {s : Set α} :
    s ∈ 𝓝[≤] a ↔ ∃ l ∈ Iio a, Ioc l a ⊆ s

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

s ∈ 𝓝[≤] a ↔ ∃ l ∈ Set.Iio a, Set.Ioc l a ⊆ s


theorem bijection_symm_apply_id (A B : C) :
    (bijection i A B _).symm (𝟙 _) = prodComparison _ _ _

(CategoryTheory.bijection i A B ((CategoryTheory.reflector i).obj A ⨯ (CategoryTheory.reflector i).obj B)).symm
    (CategoryTheory.CategoryStruct.id ((CategoryTheory.reflector i).obj A ⨯ (CategoryTheory.reflector i).obj B)) =
  CategoryTheory.Limits.prodComparison (CategoryTheory.reflector i) A B


@[simp]
theorem mkReal_coe (φ : { φ : K →+* ℂ // ComplexEmbedding.IsReal φ }) :
    (mkReal φ : InfinitePlace K) = mk (φ : K →+* ℂ)

(φ : { φ // NumberField.ComplexEmbedding.IsReal φ })

↑(NumberField.InfinitePlace.mkReal φ) = NumberField.InfinitePlace.mk ↑φ


@[to_additive]
theorem measurableEmbedding_inv [InvolutiveInv α] [MeasurableInv α] :
    MeasurableEmbedding (Inv.inv (α := α))

{α : Type u_3}
{m : MeasurableSpace α}
[InvolutiveNeg α]
[MeasurableNeg α]


lemma star_le_iff {x y : R} : star x ≤ y ↔ x ≤ star y

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x y : R}


@[to_additive]
theorem continuous_comp [LocallyCompactSpace B] :
    Continuous fun f : ContinuousMonoidHom A B × ContinuousMonoidHom B C => f.2.comp f.1

{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[Monoid A]
[Monoid B]
[Monoid C]
[TopologicalSpace A]
[TopologicalSpace B]
[TopologicalSpace C]
[LocallyCompactSpace B]


theorem closedEmbedding_smul_left {c : E} (hc : c ≠ 0) : ClosedEmbedding fun x : 𝕜 => x • c

{𝕜 : Type u_1}
{E : Type u_2}
[NontriviallyNormedField 𝕜]
[CompleteSpace 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[T2Space E]
[TopologicalAddGroup E]
[Module 𝕜 E]
[ContinuousSMul 𝕜 E]
{c : E}
(hc : c ≠ 0)


theorem isUnit_det_of_right_inverse (h : A * B = 1) : IsUnit A.det

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
{A B : Matrix n n α}
(h : A * B = 1)


theorem ext_iff {η : Kernel α β} : κ = η ↔ ∀ a, κ a = η a

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{κ η : ProbabilityTheory.Kernel α β}


theorem unitors_inv_equal : (λ_ (𝟙_ C)).inv = (ρ_ (𝟙_ C)).inv

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

(CategoryTheory.MonoidalCategory.leftUnitor (𝟙_ C)).inv = (CategoryTheory.MonoidalCategory.rightUnitor (𝟙_ C)).inv


@[simp]
theorem top_prod : (⊤ : UpperSet α) ×ˢ t = ⊤

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(t : UpperSet β)


theorem _root_.Polynomial.toLaurent_one : (Polynomial.toLaurent : R[X] → R[T;T⁻¹]) 1 = 1


@[to_additive (attr := norm_cast, simp)]
theorem coe_multiset_prod {M} [CommMonoid M] [SetLike B M] [SubmonoidClass B M] (m : Multiset S) :
    (m.prod : M) = (m.map (↑)).prod

{B : Type u_3}
{S : B}
{M : Type u_4}
[AddCommMonoid M]
[SetLike B M]
[AddSubmonoidClass B M]
(m : Multiset ↥S)

↑m.sum = (Multiset.map Subtype.val m).sum


@[to_additive (attr := simp) abs_nonpos_iff] lemma mabs_le_one : |a|ₘ ≤ 1 ↔ a = 1

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

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


@[to_additive (attr := simp)]
lemma smul_one_mul {M N} [MulOneClass N] [SMul M N] [IsScalarTower M N N] (x : M) (y : N) :
    x • (1 : N) * y = x • y

{M : Type u_11}
{N : Type u_12}
[AddZeroClass N]
[VAdd M N]
[VAddAssocClass M N N]
(x : M)
(y : N)


/-- Weaker version of `Subperm.cons_left` -/
theorem cons_subperm_of_not_mem_of_mem {a : α} {l₁ l₂ : List α} (h₁ : a ∉ l₁) (h₂ : a ∈ l₂)
    (s : l₁ <+~ l₂) : a :: l₁ <+~ l₂

{α : Type u_1}
{a : α}
{l₁ l₂ : List α}
(h₁ : ¬a ∈ l₁)
(h₂ : a ∈ l₂)
(s : l₁ <+~ l₂)


@[to_additive]
lemma div_inf (a b c : α) : c / (a ⊓ b) = c / a ⊔ c / b

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

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


@[simp]
theorem Differentiable.inv (hf : Differentiable 𝕜 h) (hz : ∀ x, h x ≠ 0) :
    Differentiable 𝕜 fun x => (h x)⁻¹

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type w}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{h : E → 𝕜}
(hf : Differentiable 𝕜 h)
(hz : ∀ (x : E), h x ≠ 0)


lemma le_slope_of_hasDerivAt (hfc : ConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hf' : HasDerivAt f f' y) :
    f' ≤ slope f x y

{S : Set ℝ}
{f : ℝ → ℝ}
{x y f' : ℝ}
(hfc : ConcaveOn ℝ S f)
(hx : x ∈ S)
(hy : y ∈ S)
(hxy : x < y)
(hf' : HasDerivAt f f' y)


theorem joinedIn_iff_joined (x_in : x ∈ F) (y_in : y ∈ F) :
    JoinedIn F x y ↔ Joined (⟨x, x_in⟩ : F) (⟨y, y_in⟩ : F)

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{F : Set X}
(x_in : x ∈ F)
(y_in : y ∈ F)

JoinedIn F x y ↔ Joined ⟨x, x_in⟩ ⟨y, y_in⟩


lemma le_add_iff_lt_of_dvd_sub (ha : 0 < a) (hab : a ∣ c - b) : a + b ≤ c ↔ b < c

{a b c : ℤ}
(ha : 0 < a)
(hab : a ∣ c - b)


/-- The canonical map from `WeakSpace 𝕜 E` to `E` is an open map. -/
theorem isOpenMap_toWeakSpace_symm : IsOpenMap (toWeakSpace 𝕜 E).symm

{𝕜 : Type u_2}
{E : Type u_5}
[CommSemiring 𝕜]
[TopologicalSpace 𝕜]
[ContinuousAdd 𝕜]
[ContinuousConstSMul 𝕜 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[TopologicalSpace E]


theorem StrictAnti.mul_const_of_neg [ExistsAddOfLE α] [MulPosStrictMono α]
    [CovariantClass α α (swap (· + ·)) (· < ·)] [ContravariantClass α α (swap (· + ·)) (· < ·)]
    (hf : StrictAnti f) (ha : a < 0) : StrictMono fun x => f x * a

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

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


lemma smul_nonneg_iff_neg_imp_nonpos : 0 ≤ a • b ↔ (a < 0 → b ≤ 0) ∧ (b < 0 → a ≤ 0)

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


theorem map_swap_product (s : Finset α) (t : Finset β) :
    (t ×ˢ s).map ⟨Prod.swap, Prod.swap_injective⟩ = s ×ˢ t

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

Finset.map { toFun := Prod.swap, inj' := ⋯ } (t ×ˢ s) = s ×ˢ t


@[simp] theorem length_nil : length (nil : AssocList α β) = 0


@[reassoc (attr := simp)]
theorem germ_res (F : X.Presheaf C) {U V : Opens X} (i : U ⟶ V) (x : U) :
    F.map i.op ≫ germ F x = germ F (i x : V)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasColimits C]
{X : TopCat}
(F : TopCat.Presheaf C X)
{U V : TopologicalSpace.Opens ↑X}
(i : U ⟶ V)
(x : ↥U)

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


/-- If `ν` is an s-finite measure, and `s ⊆ α × β` is measurable, then `x ↦ ν { y | (x, y) ∈ s }`
  is a measurable function. -/
theorem measurable_measure_prod_mk_left [SFinite ν] {s : Set (α × β)} (hs : MeasurableSet s) :
    Measurable fun x => ν (Prod.mk x ⁻¹' s)

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{s : Set (α × β)}
(hs : MeasurableSet s)


theorem isBigO_const_smul_right {c : 𝕜} (hc : c ≠ 0) :
    (f =O[l] fun x => c • f' x) ↔ f =O[l] f'

{α : Type u_1}
{E : Type u_3}
{E' : Type u_6}
{𝕜 : Type u_15}
[Norm E]
[SeminormedAddCommGroup E']
[NormedDivisionRing 𝕜]
{f : α → E}
{f' : α → E'}
{l : Filter α}
[Module 𝕜 E']
[BoundedSMul 𝕜 E']
{c : 𝕜}
(hc : c ≠ 0)


theorem integrable_toReal_of_lintegral_ne_top {f : α → ℝ≥0∞} (hfm : AEMeasurable f μ)
    (hfi : (∫⁻ x, f x ∂μ) ≠ ∞) : Integrable (fun x => (f x).toReal) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hfm : AEMeasurable f μ)
(hfi : ∫⁻ (x : α), f x ∂μ ≠ ⊤)

MeasureTheory.Integrable (fun x => (f x).toReal) μ


theorem closure_eq_iff_isClosed : closure s = s ↔ IsClosed s

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


theorem integral_add (f g : α →₁ₛ[μ] E) : integral (f + g) = integral f + integral g

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

MeasureTheory.L1.SimpleFunc.integral (f + g) =
  MeasureTheory.L1.SimpleFunc.integral f + MeasureTheory.L1.SimpleFunc.integral g


theorem iff_of_iSup_eq_top [IsAffine Y] {ι : Type*}
    (U : ι → X.affineOpens) (hU : ⨆ i, (U i : Opens X) = ⊤) :
    P f ↔ ∀ i, Q (f.appLE ⊤ (U i).1 le_top)

{P : CategoryTheory.MorphismProperty AlgebraicGeometry.Scheme}

{Q : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop}

P f ↔ ∀ (i : ι), Q (AlgebraicGeometry.Scheme.Hom.appLE f ⊤ ↑(U i) ⋯)


theorem promises_congr {c₁ c₂ : Computation α} (h : c₁ ~ c₂) (a) : c₁ ~> a ↔ c₂ ~> a

{α : Type u}
{c₁ c₂ : Computation α}
(h : c₁.Equiv c₂)
(a : α)


theorem sign_prodCongrLeft (σ : α → Perm β) : sign (prodCongrLeft σ) = ∏ k, sign (σ k)

{α : Type u}
[DecidableEq α]
{β : Type v}
[Fintype α]
[DecidableEq β]
[Fintype β]
(σ : α → Equiv.Perm β)

Equiv.Perm.sign (Equiv.prodCongrLeft σ) = ∏ k : α, Equiv.Perm.sign (σ k)


@[to_additive (attr := simp)]
lemma haarScalarFactor_self (μ : Measure G) [IsHaarMeasure μ] :
    haarScalarFactor μ μ = 1

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


@[norm_cast]
theorem coe_mul : ∀ {x y : ℚ}, (↑(x * y) : ℚ_[p]) = ↑x * ↑y


lemma homologyMap_comm :
    homologyMap φ ≫ h₂.homologyIso.hom = h₁.homologyIso.hom ≫ γ.φH

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.homologyMap φ) h₂.homologyIso.hom =
  CategoryTheory.CategoryStruct.comp h₁.homologyIso.hom γ.φH


/-- Two elements are equal iff their coordinates are equal. -/
theorem ext_elem_iff {x y : M} : x = y ↔ ∀ i, b.repr x i = b.repr y i

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
{x y : M}

x = y ↔ ∀ (i : ι), (b.repr x) i = (b.repr y) i


theorem tendsto_nhdsWithin_iff_subtype {s : Set α} {a : α} (h : a ∈ s) (f : α → β) (l : Filter β) :
    Tendsto f (𝓝[s] a) l ↔ Tendsto (s.restrict f) (𝓝 ⟨a, h⟩) l

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{s : Set α}
{a : α}
(h : a ∈ s)
(f : α → β)
(l : Filter β)

Filter.Tendsto f (𝓝[s] a) l ↔ Filter.Tendsto (s.restrict f) (𝓝 ⟨a, h⟩) l


theorem tendsto_cos_neg_pi_div_two : Tendsto cos (𝓝[>] (-(π / 2))) (𝓝[>] 0)

Filter.Tendsto Real.cos (𝓝[>] (-(Real.pi / 2))) (𝓝[>] 0)


private theorem nsmul_succ' (n : ℕ) (x : LocalizedModule S M) : n.succ • x = n • x + x

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
{M : Type v}
[AddCommMonoid M]
[Module R M]
(n : ℕ)
(x : LocalizedModule S M)


lemma inv_neg_of_neg_ne_bot {a : EReal} (h : a < 0) (h' : a ≠ ⊥) : a⁻¹ < 0


theorem dot_distrib_left (xs ys zs : IntList) : (xs + ys).dot zs = xs.dot zs + ys.dot zs


theorem exists_pred_iterate_iff_le : (∃ n, pred^[n] b = a) ↔ a ≤ b

{α : Type u_1}
[Preorder α]
[PredOrder α]
[IsPredArchimedean α]
{a b : α}


theorem sup_eq_sup {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop) [IsWellOrder ι r]
    [IsWellOrder ι' r'] {o : Ordinal.{u}} (ho : type r = o) (ho' : type r' = o)
    (f : ∀ a < o, Ordinal.{max u v}) :
    sup.{_, v} (familyOfBFamily' r ho f) = sup.{_, v} (familyOfBFamily' r' ho' f)

(f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v})

Ordinal.sup (Ordinal.familyOfBFamily' r ho f) = Ordinal.sup (Ordinal.familyOfBFamily' r' ho' f)


protected theorem some : Partrec (@Part.some α)


/-- The finrank of `(ι →₀ R)` is `Fintype.card ι`. -/
@[simp]
theorem finrank_finsupp_self {ι : Type v} [Fintype ι] : finrank R (ι →₀ R) = card ι

(R : Type u)
[Ring R]
[StrongRankCondition R]
{ι : Type v}
[Fintype ι]

FiniteDimensional.finrank R (ι →₀ R) = Fintype.card ι


/-- The other triangle equality. The proof follows the following proof in Globular:
  http://globular.science/1905.001 -/
@[reassoc (attr := simp)]
theorem unit_inverse_comp (e : C ≌ D) (Y : D) :
    e.unit.app (e.inverse.obj Y) ≫ e.inverse.map (e.counit.app Y) = 𝟙 (e.inverse.obj Y)

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

CategoryTheory.CategoryStruct.comp (e.unit.app (e.inverse.obj Y)) (e.inverse.map (e.counit.app Y)) =
  CategoryTheory.CategoryStruct.id (e.inverse.obj Y)


protected theorem nonpos_of_neg_nonneg {a : Int} (h : 0 ≤ -a) : a ≤ 0


@[simp]
theorem cons_nil_append {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    (cons h nil).append p = cons h p

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

(SimpleGraph.Walk.cons h SimpleGraph.Walk.nil).append p = SimpleGraph.Walk.cons h p


theorem Monotone.iInf_comp_eq [Preorder β] {f : β → α} (hf : Monotone f) {s : ι → β}
    (hs : ∀ x, ∃ i, s i ≤ x) : ⨅ x, f (s x) = ⨅ y, f y

{α : Type u_1}
{β : Type u_2}
{ι : Sort u_5}
[CompleteLattice α]
[Preorder β]
{f : β → α}
(hf : Monotone f)
{s : ι → β}
(hs : ∀ (x : β), ∃ i, s i ≤ x)


theorem hasDerivAt_of_tendstoUniformly [NeBot l] (hf' : TendstoUniformly f' g' l)
    (hf : ∀ᶠ n in l, ∀ x : 𝕜, HasDerivAt (f n) (f' n x) x)
    (hfg : ∀ x : 𝕜, Tendsto (fun n => f n x) l (𝓝 (g x))) : ∀ x : 𝕜, HasDerivAt g (g' x) x

(hf : ∀ᶠ (n : ι) in l, ∀ (x : 𝕜), HasDerivAt (f n) (f' n x) x)

(hfg : ∀ (x : 𝕜), Filter.Tendsto (fun n => f n x) l (𝓝 (g x)))


@[simp]
theorem refl_trans : (refl 𝕜 P).trans e = e

{𝕜 : Type u_1}
{V : Type u_2}
{V₂ : Type u_5}
{P : Type u_10}
{P₂ : Type u_11}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
[SeminormedAddCommGroup V₂]
[NormedSpace 𝕜 V₂]
[PseudoMetricSpace P₂]
[NormedAddTorsor V₂ P₂]
(e : P ≃ᵃⁱ[𝕜] P₂)

(AffineIsometryEquiv.refl 𝕜 P).trans e = e


@[to_additive (attr := simp) lt_add_iff_pos_right]
theorem lt_mul_iff_one_lt_right' [CovariantClass α α (· * ·) (· < ·)]
    [ContravariantClass α α (· * ·) (· < ·)] (a : α) {b : α} :
    a < a * b ↔ 1 < b

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

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


theorem coeff_ofSubring (p : T[X]) (n : ℕ) : coeff (ofSubring T p) n = (coeff p n : T)

{R : Type u}
[Ring R]
(T : Subring R)
(p : (↥T)[X])
(n : ℕ)

(Polynomial.ofSubring T p).coeff n = ↑(p.coeff n)


theorem intervalIntegral_tendsto_integral (hfi : Integrable f μ) (ha : Tendsto a l atBot)
    (hb : Tendsto b l atTop) : Tendsto (fun i => ∫ x in a i..b i, f x ∂μ) l (𝓝 <| ∫ x, f x ∂μ)

{ι : Type u_1}
{E : Type u_2}
{μ : MeasureTheory.Measure ℝ}
{l : Filter ι}
[l.IsCountablyGenerated]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b : ι → ℝ}
{f : ℝ → E}
(hfi : MeasureTheory.Integrable f μ)
(ha : Filter.Tendsto a l Filter.atBot)
(hb : Filter.Tendsto b l Filter.atTop)

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


theorem append_cancel_left {as bs cs : List α} (h : as ++ bs = as ++ cs) : bs = cs

{α : Type u_1}
{as bs cs : List α}
(h : as ++ bs = as ++ cs)


@[simp]
theorem diag_transpose (A : Matrix n n α) : diag Aᵀ = diag A

{n : Type u_3}
{α : Type v}
(A : Matrix n n α)


theorem uniformity_hasBasis_closed :
    HasBasis (𝓤 α) (fun V : Set (α × α) => V ∈ 𝓤 α ∧ IsClosed V) id

(𝓤 α).HasBasis (fun V => V ∈ 𝓤 α ∧ IsClosed V) id


/-- A number satisfies the Liouville condition with any exponent if and only if it is a Liouville
number. -/
theorem forall_liouvilleWith_iff {x : ℝ} : (∀ p, LiouvilleWith p x) ↔ Liouville x

(∀ (p : ℝ), LiouvilleWith p x) ↔ Liouville x


@[simp]
theorem nadd_one : a ♯ 1 = succ a


/-- Currying with the same element twice gives the zero map. -/
@[simp]
theorem curryLeft_same {n : ℕ} (f : M'' [⋀^Fin n.succ.succ]→ₗ[R'] N'') (m : M'') :
    (f.curryLeft m).curryLeft m = 0

{R' : Type u_10}
{M'' : Type u_11}
{N'' : Type u_13}
[CommSemiring R']
[AddCommMonoid M'']
[AddCommMonoid N'']
[Module R' M'']
[Module R' N'']
{n : ℕ}
(f : M'' [⋀^Fin n.succ.succ]→ₗ[R'] N'')
(m : M'')


@[simp]
theorem sinh_ofReal_im (x : ℝ) : (sinh x).im = 0


@[simp] lemma one_ne_zero [One α] [NeZero (1 : α)] : (1 : α) ≠ 0

{α : Type u_2}
[Zero α]
[One α]
[NeZero 1]


theorem of_le (f : Filter α) [NeBot f] : ↑(of f) ≤ f


@[simp]
theorem finSuccEquivLast_symm_some (i : Fin n) :
    finSuccEquivLast.symm (some i) = Fin.castSucc i

finSuccEquivLast.symm (some i) = i.castSucc


@[fun_prop]
protected theorem differentiableAt : DifferentiableAt 𝕜 iso x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
(iso : E ≃ₗᵢ[𝕜] F)


lemma univ_eq_Icc : (univ : Set I) = Icc (0 : I) (1 : I)


protected theorem ne_bot_iff (p : Submodule R M) : p ≠ ⊥ ↔ ∃ x ∈ p, x ≠ (0 : M)

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p : Submodule R M)

p ≠ ⊥ ↔ ∃ x ∈ p, x ≠ 0


theorem Pairwise.imp_mem {l : List α} :
    Pairwise R l ↔ Pairwise (fun x y => x ∈ l → y ∈ l → R x y) l

{α : Type u_1}
{R : α → α → Prop}
{l : List α}

List.Pairwise R l ↔ List.Pairwise (fun x y => x ∈ l → y ∈ l → R x y) l


/-- **Hahn decomposition theorem** -/
theorem hahn_decomposition [IsFiniteMeasure μ] [IsFiniteMeasure ν] :
    ∃ s,
      MeasurableSet s ∧
        (∀ t, MeasurableSet t → t ⊆ s → ν t ≤ μ t) ∧ ∀ t, MeasurableSet t → t ⊆ sᶜ → μ t ≤ ν t

{α : Type u_1}
[MeasurableSpace α]
{μ ν : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
[MeasureTheory.IsFiniteMeasure ν]

∃ s,
  MeasurableSet s ∧
    (∀ (t : Set α), MeasurableSet t → t ⊆ s → ν t ≤ μ t) ∧ ∀ (t : Set α), MeasurableSet t → t ⊆ sᶜ → μ t ≤ ν t


theorem ClosedUnderColimitsOfShape.colimit (h : ClosedUnderColimitsOfShape J P) {F : J ⥤ C}
    [HasColimit F] : (∀ j, P (F.obj j)) → P (colimit F)

(h : CategoryTheory.Limits.ClosedUnderColimitsOfShape J P)

(∀ (j : J), P (F.obj j)) → P (CategoryTheory.Limits.colimit F)


theorem chineseRemainder_modEq_unique (co : n.Coprime m) {a b z}
    (hzan : z ≡ a [MOD n]) (hzbm : z ≡ b [MOD m]) : z ≡ chineseRemainder co a b [MOD n*m]

{m n : ℕ}
(co : n.Coprime m)
{a b z : ℕ}
(hzan : z ≡ a [MOD n])
(hzbm : z ≡ b [MOD m])

z ≡ ↑(Nat.chineseRemainder co a b) [MOD n * m]


theorem inf_def [∀ i, Inf (α' i)] (f g : ∀ i, α' i) : f ⊓ g = fun i => f i ⊓ g i

{ι : Type u_1}
{α' : ι → Type u_2}
[(i : ι) → Inf (α' i)]
(f g : (i : ι) → α' i)


/-- **Irrationality of the Square Root of 2** -/
theorem irrational_sqrt_two : Irrational (√2)


@[to_additive]
theorem iUnion_mul (s : ι → Set α) (t : Set α) : (⋃ i, s i) * t = ⋃ i, s i * t

{α : Type u_2}
{ι : Sort u_5}
[Add α]
(s : ι → Set α)
(t : Set α)


theorem bihimp_triangle : a ⇔ b ⊓ b ⇔ c ≤ a ⇔ c

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


@[simp]
theorem coe_divNat (i : Fin (m * n)) : (i.divNat : ℕ) = i / n


theorem tail_drop (n : ℕ) (s : Stream' α) : tail (drop n s) = drop n (tail s)

(Stream'.drop n s).tail = Stream'.drop n s.tail


@[reassoc (attr := simp)]
theorem inr_pushoutLeftPushoutInrIso_inv :
    pushout.inr _ _ ≫ (pushoutLeftPushoutInrIso f g g').inv = pushout.inr _ _

[CategoryTheory.Limits.HasPushout (CategoryTheory.Limits.pushout.inr f g) g']

[CategoryTheory.Limits.HasPushout f (g ≫ g')]

CategoryTheory.Limits.pushout.inr f (g ≫ g') ≫ (CategoryTheory.Limits.pushoutLeftPushoutInrIso f g g').inv =
  CategoryTheory.Limits.pushout.inr (CategoryTheory.Limits.pushout.inr f g) g'


@[to_additive (attr := simp)]
theorem toFinset_smul (s : Set α) (t : Set β) [Fintype s] [Fintype t] [Fintype ↑(s • t)] :
    (s • t).toFinset = s.toFinset • t.toFinset

{α : Type u_2}
{β : Type u_3}
[SMul α β]
[DecidableEq β]
(s : Set α)
(t : Set β)
[Fintype ↑s]
[Fintype ↑t]
[Fintype ↑(s • t)]


theorem Sigma.nhds_eq (x : Sigma σ) : 𝓝 x = Filter.map (Sigma.mk x.1) (𝓝 x.2)

{ι : Type u_5}
{σ : ι → Type u_7}
[(i : ι) → TopologicalSpace (σ i)]
(x : Sigma σ)

𝓝 x = Filter.map (Sigma.mk x.fst) (𝓝 x.snd)


@[norm_cast] -- @[simp] -- Porting note (#10618): simp can prove this
theorem of_nat_inj {m n : ℕ} : (m : Num) = n ↔ m = n


theorem span_singleton_inf_orthogonal_eq_bot {B : BilinForm K V} {x : V} (hx : ¬B.IsOrtho x x) :
    (K ∙ x) ⊓ B.orthogonal (K ∙ x) = ⊥

{V : Type u_5}
{K : Type u_6}
[Field K]
[AddCommGroup V]
[Module K V]
{B : LinearMap.BilinForm K V}
{x : V}
(hx : ¬B.IsOrtho x x)

Submodule.span K {x} ⊓ B.orthogonal (Submodule.span K {x}) = ⊥


/--
Given surjections `⋯ ⟶ Xₙ₊₁ ⟶ Xₙ ⟶ ⋯ ⟶ X₀`, the projection map `lim Xₙ ⟶ X₀` is surjective.
-/
lemma surjective_π_app_zero_of_surjective_map
    (hc : IsLimit c)
    (hF : ∀ n, Function.Surjective (F.map (homOfLE (Nat.le_succ n)).op)) :
    Function.Surjective (c.π.app ⟨0⟩)

(hF : ∀ (n : ℕ), Function.Surjective (F.map (CategoryTheory.homOfLE ⋯).op))

Function.Surjective (c.π.app (Opposite.op 0))


theorem cof_eq (r : α → α → Prop) [IsWellOrder α r] : ∃ S, Unbounded r S ∧ #S = cof (type r)

{α : Type u_1}
(r : α → α → Prop)
[IsWellOrder α r]

∃ S, Set.Unbounded r S ∧ #↑S = (Ordinal.type r).cof


theorem eq_Icc_csInf_csSup_of_connected_bdd_closed {s : Set α} (hc : IsConnected s)
    (hb : BddBelow s) (ha : BddAbove s) (hcl : IsClosed s) : s = Icc (sInf s) (sSup s)

{α : Type u}
[ConditionallyCompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
{s : Set α}
(hc : IsConnected s)
(hb : BddBelow s)
(ha : BddAbove s)
(hcl : IsClosed s)


@[simp, norm_cast]
theorem coe_sub : ((f - g : RatFunc F) : LaurentSeries F) = f - g

{F : Type u}
[Field F]
(f g : RatFunc F)


/-- Whenever possible, it is advisable to use the isomorphism `rightOpLeftOpIso`
instead of this equality of functors. -/
theorem rightOp_leftOp_eq (F : Cᵒᵖ ⥤ D) : F.rightOp.leftOp = F

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


theorem Subrelation.isWellFounded (r : α → α → Prop) [IsWellFounded α r] {s : α → α → Prop}
    (h : Subrelation s r) : IsWellFounded α s

{α : Type u}
(r : α → α → Prop)
[IsWellFounded α r]
{s : α → α → Prop}
(h : Subrelation s r)


theorem rootSet_finite (p : T[X]) (S : Type*) [CommRing S] [IsDomain S] [Algebra T S] :
    (p.rootSet S).Finite

{T : Type w}
[CommRing T]
(p : Polynomial T)
(S : Type u_1)
[CommRing S]
[IsDomain S]
[Algebra T S]


/-- `HasFTaylorSeriesUpTo n f p` registers the fact that `p 0 = f` and `p (m+1)` is a
derivative of `p m` for `m < n`, and is continuous for `m ≤ n`. This is a predicate analogous to
`HasFDerivAt` but for higher order derivatives.

Notice that `p` does not sum up to `f` on the diagonal (`FormalMultilinearSeries.sum`), even if
`f` is analytic and `n = ∞`: an addition `1/m!` factor on the `m`th term is necessary for that. -/
structure HasFTaylorSeriesUpTo (n : ℕ∞) (f : E → F) (p : E → FormalMultilinearSeries 𝕜 E F) :
  Prop where
  zero_eq : ∀ x, (p x 0).uncurry0 = f x
  fderiv : ∀ m : ℕ, (m : ℕ∞) < n → ∀ x, HasFDerivAt (fun y => p y m) (p x m.succ).curryLeft x
  cont : ∀ m : ℕ, (m : ℕ∞) ≤ n → Continuous fun x => p x m

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ∞}
{f : E → F}
{p : E → FormalMultilinearSeries 𝕜 E F}
(self : HasFTaylorSeriesUpTo n f p)
(x : E)


@[simp]
theorem toQuadraticMap_sum {ι : Type*} (s : Finset ι) (B : ι → (BilinMap R M N)) :
    (∑ i ∈ s, B i).toQuadraticMap = ∑ i ∈ s, (B i).toQuadraticMap

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
{ι : Type u_9}
(s : Finset ι)
(B : ι → LinearMap.BilinMap R M N)


theorem Infinite.exists_subset_ncard_eq {s : Set α} (hs : s.Infinite) (k : ℕ) :
    ∃ t, t ⊆ s ∧ t.Finite ∧ t.ncard = k

{α : Type u_1}
{s : Set α}
(hs : s.Infinite)
(k : ℕ)


@[simp]
theorem alephIdx_aleph' (o : Ordinal) : (aleph' o).alephIdx = o


@[simp]
theorem associator_obj_inr (X) : (associator C D E).obj (inr X) = inr (inr X)

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

(CategoryTheory.sum.associator C D E).obj (Sum.inr X) = Sum.inr (Sum.inr X)


/-- The predicate corresponding to a base set of the filter defined by an
`IntegrationParams`. It says that

* if `l.bHenstock`, then `π` is a Henstock prepartition, i.e. each tag belongs to the corresponding
  closed box;
* `π` is subordinate to `r`;
* if `l.bDistortion`, then the distortion of each box in `π` is less than or equal to `c`;
* if `l.bDistortion`, then there exists a prepartition `π'` with distortion `≤ c` that covers
  exactly `I \ π.iUnion`.

The last condition is automatically verified for partitions, and is used in the proof of the
Sacks-Henstock inequality to compare two prepartitions covering the same part of the box.

It is also automatically satisfied for any `c > 1`, see TODO section of the module docstring for
details. -/
structure MemBaseSet (l : IntegrationParams) (I : Box ι) (c : ℝ≥0) (r : (ι → ℝ) → Ioi (0 : ℝ))
    (π : TaggedPrepartition I) : Prop where
  protected isSubordinate : π.IsSubordinate r
  protected isHenstock : l.bHenstock → π.IsHenstock
  protected distortion_le : l.bDistortion → π.distortion ≤ c
  protected exists_compl : l.bDistortion → ∃ π' : Prepartition I,
    π'.iUnion = ↑I \ π.iUnion ∧ π'.distortion ≤ c

{ι : Type u_1}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{I : BoxIntegral.Box ι}
{c : ℝ≥0}
{r : (ι → ℝ) → ↑(Set.Ioi 0)}
{π : BoxIntegral.TaggedPrepartition I}
(self : l.MemBaseSet I c r π)

l.bDistortion = true → ∃ π', π'.iUnion = ↑I \ π.iUnion ∧ π'.distortion ≤ c


@[simp]
theorem eval_curry (c n x) : eval (curry c n) x = eval c (Nat.pair n x)

(c.curry n).eval x = c.eval (Nat.pair n x)


@[to_additive (attr := simp)]
theorem one_subset : 1 ⊆ s ↔ (1 : α) ∈ s


lemma add_bounded_of_bounded_of_bounded {X : Type*} [PseudoMetricSpace R] [Add R] [BoundedAdd R]
    {f g : X → R} (f_bdd : ∃ C, ∀ x y, dist (f x) (f y) ≤ C)
    (g_bdd : ∃ C, ∀ x y, dist (g x) (g y) ≤ C) :
    ∃ C, ∀ x y, dist ((f + g) x) ((f + g) y) ≤ C

(f_bdd : ∃ C, ∀ (x y : X), dist (f x) (f y) ≤ C)

(g_bdd : ∃ C, ∀ (x y : X), dist (g x) (g y) ≤ C)

∃ C, ∀ (x y : X), dist ((f + g) x) ((f + g) y) ≤ C


@[measurability]
theorem measurable_ennnorm : Measurable fun x : α => (‖x‖₊ : ℝ≥0∞)

{α : Type u_1}
[MeasurableSpace α]
[NormedAddCommGroup α]
[OpensMeasurableSpace α]


/-- Construct an isomorphism of `G` actions/representations
from an isomorphism of the underlying objects,
where the forward direction commutes with the group action. -/
@[simps]
def mkIso {M N : Action V G} (f : M.V ≅ N.V)
    (comm : ∀ g : G, M.ρ g ≫ f.hom = f.hom ≫ N.ρ g := by aesop_cat) : M ≅ N

(comm : ∀ (g : ↑G), M.ρ g ≫ f.hom = f.hom ≫ N.ρ g := by aesop_cat)


@[to_additive (attr := simp)]
theorem snd_comp_swap : snd.comp (swap M N) = fst

{M : Type u_1}
{N : Type u_2}
[Monoid M]
[Monoid N]

Monoid.Coprod.snd.comp (Monoid.Coprod.swap M N) = Monoid.Coprod.fst


/-- The `polar` of closed ball in a normed space `E` is the closed ball of the dual with
inverse radius. -/
theorem polar_closedBall {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E] {r : ℝ}
    (hr : 0 < r) : polar 𝕜 (closedBall (0 : E) r) = closedBall (0 : Dual 𝕜 E) r⁻¹

{𝕜 : Type u_3}
{E : Type u_4}
[RCLike 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{r : ℝ}
(hr : 0 < r)

NormedSpace.polar 𝕜 (Metric.closedBall 0 r) = Metric.closedBall 0 r⁻¹


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

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

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