/-- The homomorphism `toEnvelGroup.map f` is the unique map that fits into the commutative
triangle in `toEnvelGroup.univ`.
-/
theorem toEnvelGroup.univ_uniq (R : Type*) [Rack R] (G : Type*) [Group G]
    (f : R →◃ Quandle.Conj G) (g : EnvelGroup R →* G)
    (h : f = (Quandle.Conj.map g).comp (toEnvelGroup R)) : g = toEnvelGroup.map f

(h : f = (Quandle.Conj.map g).comp (Rack.toEnvelGroup R))


theorem measure_biUnion_finset₀ {s : Finset ι} {f : ι → Set α}
    (hd : Set.Pairwise (↑s) (AEDisjoint μ on f)) (hm : ∀ b ∈ s, NullMeasurableSet (f b) μ) :
    μ (⋃ b ∈ s, f b) = ∑ p ∈ s, μ (f p)

(hd : (↑s).Pairwise (MeasureTheory.AEDisjoint μ on f))

(hm : ∀ b ∈ s, MeasureTheory.NullMeasurableSet (f b) μ)


/-- The star algebra equivalence between the linear endomorphisms of finite-dimensional inner
product space and square matrices induced by the choice of an orthonormal basis. -/
@[simps]
def LinearMap.toMatrixOrthonormal : (E →ₗ[𝕜] E) ≃⋆ₐ[𝕜] Matrix n n 𝕜

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{n : Type u_6}
[Fintype n]
[DecidableEq n]
[FiniteDimensional 𝕜 E]
(v₁ : OrthonormalBasis n 𝕜 E)

∀ (a : E →ₗ[𝕜] E), (LinearMap.toMatrixOrthonormal v₁) a = (↑(LinearMap.toMatrix v₁.toBasis v₁.toBasis)).toFun a


@[simp]
theorem constantCoeff_C (r : R) : constantCoeff (C r : MvPolynomial σ R) = r

{R : Type u}
(σ : Type u_1)
[CommSemiring R]
(r : R)

MvPolynomial.constantCoeff (MvPolynomial.C r) = r


private theorem quotient_mul_add_remainder_eq_aux (p q : R[X]) : q * div p q + mod p q = p


theorem lintegral_withDensity_le_lintegral_mul (μ : Measure α) {f : α → ℝ≥0∞}
    (f_meas : Measurable f) (g : α → ℝ≥0∞) : (∫⁻ a, g a ∂μ.withDensity f) ≤ ∫⁻ a, (f * g) a ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
{f : α → ℝ≥0∞}
(f_meas : Measurable f)
(g : α → ℝ≥0∞)

∫⁻ (a : α), g a ∂μ.withDensity f ≤ ∫⁻ (a : α), (f * g) a ∂μ


@[simp, norm_cast]
theorem cast_to_nat [AddMonoidWithOne α] : ∀ n : PosNum, ((n : ℕ) : α) = n

{α : Type u_1}
[AddMonoidWithOne α]
(n : PosNum)


theorem degree_list_prod_le (l : List S[X]) : degree l.prod ≤ (l.map degree).sum

{S : Type u_1}
[Semiring S]
(l : List S[X])

l.prod.degree ≤ (List.map Polynomial.degree l).sum


theorem maximum_mem {l : List α} {m : α} : (maximum l : WithTop α) = m → m ∈ l

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x < x_1]
{l : List α}
{m : α}


/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
@[to_additive (attr := simp) "An element is add-left-regular if and only if adding to it on the left
an add-left-regular element is add-left-regular."]
theorem mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
    IsLeftRegular (a * b) ↔ IsLeftRegular b

{R : Type u_1}
[AddSemigroup R]
{a : R}
(b : R)
(ha : IsAddLeftRegular a)

IsAddLeftRegular (a + b) ↔ IsAddLeftRegular b


/-- Deprecated. Use `DFunLike.congr_arg` instead. -/
protected theorem congr_arg (f : C(α, β)) {x y : α} (h : x = y) : f x = f y

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : C(α, β))
{x y : α}
(h : x = y)


@[simp]
protected lemma id_comp {n : ℤ} (z₂ : Cochain F G n) :
    (Cochain.ofHom (𝟙 F)).comp z₂ (zero_add n) = z₂

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

(CochainComplex.HomComplex.Cochain.ofHom (𝟙 F)).comp z₂ ⋯ = z₂


lemma nonsingular_zero' [NoZeroDivisors R] {Y : R} (hy : Y ≠ 0) : W.Nonsingular ![0, Y, 0]

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Projective R)
[NoZeroDivisors R]
{Y : R}
(hy : Y ≠ 0)


theorem integral_eq_norm_posPart_sub (f : α →₁[μ] ℝ) :
    integral f = ‖Lp.posPart f‖ - ‖Lp.negPart f‖

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
(f : ↥(MeasureTheory.Lp ℝ 1 μ))

MeasureTheory.L1.integral f = ‖MeasureTheory.Lp.posPart f‖ - ‖MeasureTheory.Lp.negPart f‖


@[simp]
theorem comp_c_app {X Y Z : SheafedSpace C} (α : X ⟶ Y) (β : Y ⟶ Z) (U) :
    (α ≫ β).c.app U = β.c.app U ≫ α.c.app (op ((Opens.map β.base).obj (unop U)))

{X Y Z : AlgebraicGeometry.SheafedSpace C}

(U : (TopologicalSpace.Opens ↑↑Z.toPresheafedSpace)ᵒᵖ)

(α ≫ β).c.app U = β.c.app U ≫ α.c.app (Opposite.op ((TopologicalSpace.Opens.map β.base).obj (Opposite.unop U)))


@[reassoc]
theorem condition (t : PushoutCocone f g) : f ≫ inl t = g ≫ inr t

(t : CategoryTheory.Limits.PushoutCocone f g)


@[reassoc]
theorem naturality {X Y : C} (i : G.obj X ⟶ G.obj Y) :
    α.app _ ≫ ℱ'.1.map i.op = ℱ.map i.op ≫ α.app _

{K : CategoryTheory.GrothendieckTopology D}

{ℱ : CategoryTheory.Functor Dᵒᵖ (Type v)}

CategoryTheory.CategoryStruct.comp (α.app (Opposite.op Y)) (ℱ'.val.map i.op) =
  CategoryTheory.CategoryStruct.comp (ℱ.map i.op) (α.app (Opposite.op X))


theorem IsCycle.pow_iff [Finite β] {f : Perm β} (hf : IsCycle f) {n : ℕ} :
    IsCycle (f ^ n) ↔ n.Coprime (orderOf f)

{β : Type u_3}
[Finite β]
{f : Equiv.Perm β}
(hf : f.IsCycle)
{n : ℕ}


theorem WithTop.sSup_eq [SupSet α] {s : Set (WithTop α)} (hs : ⊤ ∉ s)
    (hs' : BddAbove ((↑) ⁻¹' s : Set α)) : sSup s = ↑(sSup ((↑) ⁻¹' s) : α)

{α : Type u_1}
[Preorder α]
[SupSet α]
{s : Set (WithTop α)}
(hs : ⊤ ∉ s)
(hs' : BddAbove (WithTop.some ⁻¹' s))


@[simp]
theorem mem_iUnion : x ∈ π.iUnion ↔ ∃ J ∈ π, x ∈ J

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.TaggedPrepartition I)
{x : ι → ℝ}


theorem range_extend (hs : LinearIndependent K ((↑) : s → V)) :
    range (Basis.extend hs) = hs.extend (subset_univ _)

(hs : LinearIndependent (ι := { x // x ∈ s }) K Subtype.val)

Set.range ⇑(Basis.extend hs) = hs.extend ⋯


@[simp]
theorem mk_hom_eq_self (f : S ⟶ T.obj Y) : (mk f).hom = f

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{S : D}
{Y : C}
{T : CategoryTheory.Functor C D}
(f : S ⟶ T.obj Y)

(CategoryTheory.StructuredArrow.mk f).hom = f


/-- The square with `0 : 0 ⟶ 0` on the right left `𝟙 X` on the right is a pushout square. -/
@[simp]
theorem zero_left (X : C) : IsPushout (0 : 0 ⟶ X) (0 : (0 : C) ⟶ 0) (𝟙 X) (0 : 0 ⟶ X)


@[simp]
lemma toPresheafOfModules_presheaf_map_apply {X Y : Cᵒᵖ} (f : X ⟶ Y) (x : M.obj X) :
    M.toPresheafOfModules.presheaf.map f x = M.map f x

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(M : BundledCorePresheafOfModules R)
{X Y : Cᵒᵖ}
(f : X ⟶ Y)
(x : ↑(M.obj X))

(M.toPresheafOfModules.presheaf.map f) x = (M.map f) x


@[simp]
theorem iff_eq_zero_or_one {p : G₀} : IsIdempotentElem p ↔ p = 0 ∨ p = 1

{G₀ : Type u_8}
[CancelMonoidWithZero G₀]
{p : G₀}


theorem count_eq_card_filter_eq [DecidableEq α] (s : Multiset α) (a : α) :
    s.count a = card (s.filter (a = ·))

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

Multiset.count a s = Multiset.card (Multiset.filter (fun x => a = x) s)


theorem add : Nat.Primrec (unpaired (· + ·))

Nat.Primrec (Nat.unpaired fun x x_1 => x + x_1)


@[simp]
theorem lmapDomain_apply (f : α → α') (l : α →₀ M) :
    (lmapDomain M R f : (α →₀ M) →ₗ[R] α' →₀ M) l = mapDomain f l

{α : Type u_1}
(M : Type u_2)
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
{α' : Type u_7}
(f : α → α')
(l : α →₀ M)

(Finsupp.lmapDomain M R f) l = Finsupp.mapDomain f l


theorem Fin.univ_map_def {n : ℕ} (f : Fin n ↪ α) :
    Finset.univ.map f = ⟨List.ofFn f, List.nodup_ofFn.mpr f.injective⟩

Finset.map f Finset.univ = { val := ↑(List.ofFn ⇑f), nodup := ⋯ }


lemma sieve₁'_eq_sieve₁ : E.sieve₁' i₁ i₂ = E.sieve₁ (pullback.fst _ _) (pullback.snd _ _)

[CategoryTheory.Limits.HasPullback (E.f i₁) (E.f i₂)]

E.sieve₁' i₁ i₂ =
  E.sieve₁ (CategoryTheory.Limits.pullback.fst (E.f i₁) (E.f i₂)) (CategoryTheory.Limits.pullback.snd (E.f i₁) (E.f i₂))


theorem top_pow {n : ℕ} (n_pos : 0 < n) : (⊤ : ℕ∞) ^ n = ⊤


theorem Valid'.balance {l} {x : α} {r o₁ o₂} (hl : Valid' o₁ l x) (hr : Valid' x r o₂)
    (H : ∃ l' r', BalancedSz l' r' ∧
          (Nat.dist (size l) l' ≤ 1 ∧ size r = r' ∨ Nat.dist (size r) r' ≤ 1 ∧ size l = l')) :
    Valid' o₁ (@balance α l x r) o₂

(H : ∃ l' r', Ordnode.BalancedSz l' r' ∧ (l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l'))


@[to_additive (attr := mono)]
theorem hasProd_strict_mono (hf : HasProd f a₁) (hg : HasProd g a₂) (h : f < g) : a₁ < a₂

{ι : Type u_1}
{α : Type u_3}
[OrderedCommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
[OrderClosedTopology α]
{f g : ι → α}
{a₁ a₂ : α}
(hf : HasProd f a₁)
(hg : HasProd g a₂)
(h : f < g)


@[norm_cast]
theorem lift_map_eq_zero_iff (a : R) : (↑a : A) = 0 ↔ a = 0

{R : Type u_1}
{A : Type u_2}
[Field R]
[CommSemiring A]
[Nontrivial A]
[Algebra R A]
(a : R)


@[simp]
theorem swap_swap (c : Concept α β r) : c.swap.swap = c

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


theorem natDegree_multiset_prod_of_monic (h : ∀ f ∈ t, Monic f) :
    t.prod.natDegree = (t.map natDegree).sum

{R : Type u}
[CommSemiring R]
(t : Multiset R[X])
(h : ∀ f ∈ t, f.Monic)

t.prod.natDegree = (Multiset.map Polynomial.natDegree t).sum


/--
A ring of characteristic zero is not a `ℚ`-algebra iff it has mixed characteristic for some `p`.
-/
theorem isEmpty_algebraRat_iff_mixedCharZero [CharZero R] :
    IsEmpty (Algebra ℚ R) ↔ ∃ p > 0, MixedCharZero R p

(R : Type u_1)
[CommRing R]
[CharZero R]


@[to_additive]
theorem mulSingle_op₂ {g₁ g₂ : I → Type*} [∀ i, One (g₁ i)] [∀ i, One (g₂ i)]
    (op : ∀ i, g₁ i → g₂ i → f i) (h : ∀ i, op i 1 1 = 1) (i : I) (x₁ : g₁ i) (x₂ : g₂ i) :
    mulSingle i (op i x₁ x₂) = fun j => op j (mulSingle i x₁ j) (mulSingle i x₂ j)

{I : Type u}
{f : I → Type v₁}
[DecidableEq I]
[(i : I) → Zero (f i)]
{g₁ : I → Type u_4}
{g₂ : I → Type u_5}
[(i : I) → Zero (g₁ i)]
[(i : I) → Zero (g₂ i)]
(op : (i : I) → g₁ i → g₂ i → f i)
(h : ∀ (i : I), op i 0 0 = 0)
(i : I)
(x₁ : g₁ i)
(x₂ : g₂ i)

Pi.single i (op i x₁ x₂) = fun j => op j (Pi.single i x₁ j) (Pi.single i x₂ j)


@[simp]
theorem mem_inf {p p' : Subring R} {x : R} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{R : Type u}
[Ring R]
{p p' : Subring R}
{x : R}


lemma map_mapRingHom_eval_map_eval (r : R) :
    ((p.map <| mapRingHom f).eval <| q.map f).eval (f r) = f ((p.eval q).eval r)

{R : Type u_1}
{S : Type u_2}
[Semiring R]
[Semiring S]
(f : R →+* S)
(p : R[X][Y])
(q : R[X])
(r : R)

Polynomial.eval (f r) (Polynomial.eval (Polynomial.map f q) (Polynomial.map (Polynomial.mapRingHom f) p)) =
  f (Polynomial.eval r (Polynomial.eval q p))


theorem eventually_cardinal_ball {S : Set ι} (hS : #S < c)
    {p : α → ∀ i ∈ S, Prop} :
    (∀ᶠ x in l, ∀ i hi, p x i hi) ↔ ∀ i hi, ∀ᶠ x in l, p x i hi

{ι α : Type u}
{c : Cardinal.{u}}
{l : Filter α}
[CardinalInterFilter l c]
{S : Set ι}
(hS : #↑S < c)
{p : α → (i : ι) → i ∈ S → Prop}

(∀ᶠ (x : α) in l, ∀ (i : ι) (hi : i ∈ S), p x i hi) ↔ ∀ (i : ι) (hi : i ∈ S), ∀ᶠ (x : α) in l, p x i hi


theorem map_sup [SemilatticeInf β] {f : α → β} (hf : Antitone f) (x y : α) :
    f (x ⊔ y) = f x ⊓ f y

{α : Type u}
{β : Type v}
[LinearOrder α]
[SemilatticeInf β]
{f : α → β}
(hf : Antitone f)
(x y : α)


theorem surjOn_Ico_of_monotone_surjective (h_mono : Monotone f) (h_surj : Function.Surjective f)
    (a b : α) : SurjOn f (Ico a b) (Ico (f a) (f b))

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
[PartialOrder β]
{f : α → β}
(h_mono : Monotone f)
(h_surj : Function.Surjective f)
(a b : α)

Set.SurjOn f (Set.Ico a b) (Set.Ico (f a) (f b))


theorem prime_mul_iff [CancelCommMonoidWithZero α] {x y : α} :
    Prime (x * y) ↔ (Prime x ∧ IsUnit y) ∨ (IsUnit x ∧ Prime y)

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

Prime (x * y) ↔ Prime x ∧ IsUnit y ∨ IsUnit x ∧ Prime y


theorem le_ofPrime (A : ValuationSubring K) (P : Ideal A) [P.IsPrime] : A ≤ ofPrime A P

{K : Type u}
[Field K]
(A : ValuationSubring K)
(P : Ideal ↥A)
[P.IsPrime]


theorem not_tendsto_nhds_of_tendsto_atBot (hf : Tendsto f l atBot) (a : α) : ¬Tendsto f l (𝓝 a)

{α : Type u}
{β : Type v}
[Preorder α]
[NoBotOrder α]
[TopologicalSpace α]
[ClosedIicTopology α]
{l : Filter β}
[l.NeBot]
{f : β → α}
(hf : Filter.Tendsto f l Filter.atBot)
(a : α)


/-- The determinant of a 2×2 block matrix with the upper-right block equal to zero is the product of
the determinants of the diagonal blocks. For the generalization to any number of blocks, see
`Matrix.det_of_lower_triangular`. -/
@[simp]
theorem det_fromBlocks_zero₁₂ (A : Matrix m m R) (C : Matrix n m R) (D : Matrix n n R) :
    (Matrix.fromBlocks A 0 C D).det = A.det * D.det

{m : Type u_1}
{n : Type u_2}
[DecidableEq n]
[Fintype n]
[DecidableEq m]
[Fintype m]
{R : Type v}
[CommRing R]
(A : Matrix m m R)
(C : Matrix n m R)
(D : Matrix n n R)


lemma apprSeq_apply_eq_one (n : ℕ) {x : X} (hxF : x ∈ F) :
    hF.apprSeq n x = 1

{X : Type u_1}
[TopologicalSpace X]
[HasOuterApproxClosed X]
{F : Set X}
(hF : IsClosed F)
(n : ℕ)
{x : X}
(hxF : x ∈ F)


theorem succ_sub_succ (n m : Nat) : succ n - succ m = n - m


theorem comp_injective_left (q : Path b c) : Injective fun p : Path a b => p.comp q

{V : Type u}
[Quiver V]
{a b c : V}
(q : Quiver.Path b c)


@[simp]
theorem inclusion_map {X Y : N C} (f : X ⟶ Y) :
    inclusion.map f = eqToHom (congr_arg _ (Discrete.ext _ _ (Discrete.eq_of_hom f)))

{X Y : (CategoryTheory.Discrete ∘ CategoryTheory.FreeMonoidalCategory.NormalMonoidalObject) C}

CategoryTheory.FreeMonoidalCategory.inclusion.map f = CategoryTheory.eqToHom ⋯


theorem wPathDestLeft_wPathCasesOn {α : TypeVec n} {a : P.A} {f : P.last.B a → P.last.W}
    (g' : P.drop.B a ⟹ α) (g : ∀ j : P.last.B a, P.WPath (f j) ⟹ α) :
    P.wPathDestLeft (P.wPathCasesOn g' g) = g'

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


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

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


/-- The homology map data associated to the zero morphism between two short complexes. -/
@[simps]
def zero (h₁ : S₁.HomologyData) (h₂ : S₂.HomologyData) :
    HomologyMapData 0 h₁ h₂

(CategoryTheory.ShortComplex.HomologyMapData.zero h₁ h₂).left =
  CategoryTheory.ShortComplex.LeftHomologyMapData.zero h₁.left h₂.left


theorem toLex_monotone : Monotone (@toLex (Π₀ i, α i))

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


@[simp]
theorem image_preimage {α β} (e : α ≃ β) (s : Set β) : e '' (e ⁻¹' s) = s

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


/-- If a function `f` is continuous on a convex set `D ⊆ ℝ` and `f''` is strictly positive on the
interior, then `f` is strictly convex on `D`.
Note that we don't require twice differentiability explicitly as it is already implied by the second
derivative being strictly positive, except at at most one point. -/
theorem strictConvexOn_of_deriv2_pos {D : Set ℝ} (hD : Convex ℝ D) {f : ℝ → ℝ}
    (hf : ContinuousOn f D) (hf'' : ∀ x ∈ interior D, 0 < (deriv^[2] f) x) :
    StrictConvexOn ℝ D f

(hf'' : ∀ x ∈ interior D, 0 < deriv^[2] f x)


theorem opNorm_le_iff {C : ℝ} (hC : 0 ≤ C) : ‖f‖ ≤ C ↔ ∀ m, ‖f m‖ ≤ C * ∏ i, ‖m i‖

[(i : ι) → SeminormedAddCommGroup (E i)]

‖f‖ ≤ C ↔ ∀ (m : (i : ι) → E i), ‖f m‖ ≤ C * ∏ i : ι, ‖m i‖


@[to_additive]
theorem mk_toWord : ∀ {x : FreeGroup α}, mk (toWord x) = x

{α : Type u}
[DecidableEq α]
{x : FreeGroup α}


@[to_additive]
theorem mem_map_of_mem (f : G →* N) {K : Subgroup G} {x : G} (hx : x ∈ K) : f x ∈ K.map f

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)
{K : AddSubgroup G}
{x : G}
(hx : x ∈ K)


@[simp]
theorem mk_ι_app_right {W : C} (inl : Y ⟶ W) (inr : Z ⟶ W) (eq : f ≫ inl = g ≫ inr) :
    (mk inl inr eq).ι.app WalkingSpan.right = inr

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : C}
{f : X ⟶ Y}
{g : X ⟶ Z}
{W : C}
(inl : Y ⟶ W)
(inr : Z ⟶ W)
(eq : f ≫ inl = g ≫ inr)

(CategoryTheory.Limits.PushoutCocone.mk inl inr eq).ι.app CategoryTheory.Limits.WalkingSpan.right = inr


theorem zsmul_add_modEq (z : ℤ) : z • p + a ≡ a [PMOD p]

{α : Type u_1}
[AddCommGroup α]
{p a : α}
(z : ℤ)


@[reassoc]
lemma mapHomologyIso'_inv_naturality [S₁.HasHomology] [S₂.HasHomology]
    [(S₁.map F).HasHomology] [(S₂.map F).HasHomology]
    [F.PreservesRightHomologyOf S₁] [F.PreservesRightHomologyOf S₂] :
    F.map (homologyMap φ) ≫ (S₂.mapHomologyIso' F).inv = (S₁.mapHomologyIso' F).inv ≫
      @homologyMap _ _ _ (S₁.map F) (S₂.map F) (F.mapShortComplex.map φ) _ _

CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.ShortComplex.homologyMap φ)) (S₂.mapHomologyIso' F).inv =
  CategoryTheory.CategoryStruct.comp (S₁.mapHomologyIso' F).inv
    (CategoryTheory.ShortComplex.homologyMap (F.mapShortComplex.map φ))


@[to_additive]
theorem characteristic_iff_comap_le : H.Characteristic ↔ ∀ ϕ : G ≃* G, H.comap ϕ.toMonoidHom ≤ H

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

H.Characteristic ↔ ∀ (ϕ : G ≃+ G), AddSubgroup.comap ϕ.toAddMonoidHom H ≤ H


theorem insert_endpoints_openSegment (x y : E) :
    insert x (insert y (openSegment 𝕜 x y)) = [x -[𝕜] y]

(𝕜 : Type u_1)
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
(x y : E)

insert x (insert y (openSegment 𝕜 x y)) = [x-[𝕜]y]


/-- Given three points in strict order on the same line, and a fourth point, the angles at the
fourth point between the first and second or second and third points have the same sign. -/
theorem _root_.Sbtw.oangle_sign_eq {p₁ p₂ p₃ : P} (p₄ : P) (h : Sbtw ℝ p₁ p₂ p₃) :
    (∡ p₁ p₄ p₂).sign = (∡ p₂ p₄ p₃).sign

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


@[to_additive]
theorem smulAntidiagonal_mono_right (h : t₁ ⊆ t₂) :
    smulAntidiagonal s t₁ a ⊆ smulAntidiagonal s t₂ a

{G : Type u_1}
{P : Type u_2}
[VAdd G P]
{s : Set G}
{t₁ t₂ : Set P}
{a : P}
(h : t₁ ⊆ t₂)

s.vaddAntidiagonal t₁ a ⊆ s.vaddAntidiagonal t₂ a


theorem comap_prod (f : α → β × γ) (b : Filter β) (c : Filter γ) :
    comap f (b ×ˢ c) = comap (Prod.fst ∘ f) b ⊓ comap (Prod.snd ∘ f) c

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β × γ)
(b : Filter β)
(c : Filter γ)

Filter.comap f (b ×ˢ c) = Filter.comap (Prod.fst ∘ f) b ⊓ Filter.comap (Prod.snd ∘ f) c


theorem injective_trop : Function.Injective (trop : R → Tropical R)


/-- The carrier of `H ⊔ N` is just `↑H * ↑N` (pointwise set product) when `N` is normal. -/
@[to_additive "The carrier of `H ⊔ N` is just `↑H + ↑N` (pointwise set addition)
when `N` is normal."]
theorem mul_normal (H N : Subgroup G) [hN : N.Normal] : (↑(H ⊔ N) : Set G) = H * N

{G : Type u_2}
[Group G]
(H N : Subgroup G)
[hN : N.Normal]


theorem epi_image_of_epi {X Y : C} (f : X ⟶ Y) [HasImage f] [E : Epi f] : Epi (image.ι f)

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


theorem nhds_ofMul (x : X) : 𝓝 (ofMul x) = map ofMul (𝓝 x)

{X : Type u}
[TopologicalSpace X]
(x : X)

𝓝 (Additive.ofMul x) = Filter.map (⇑Additive.ofMul) (𝓝 x)


/-- The restriction of a compatible family is compatible. -/
theorem FamilyOfElements.Compatible.restrict {R₁ R₂ : Presieve X} (h : R₁ ≤ R₂)
    {x : FamilyOfElements P R₂} : x.Compatible → (x.restrict h).Compatible

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

{x : CategoryTheory.Presieve.FamilyOfElements P R₂}

x.Compatible → (CategoryTheory.Presieve.FamilyOfElements.restrict h x).Compatible


/-- `{a}` as an interval. -/
@[simps]
def pure (a : α) : NonemptyInterval α


theorem comap_inf (s t : Subfield L) (f : K →+* L) : (s ⊓ t).comap f = s.comap f ⊓ t.comap f

{K : Type u}
{L : Type v}
[DivisionRing K]
[DivisionRing L]
(s t : Subfield L)
(f : K →+* L)

Subfield.comap f (s ⊓ t) = Subfield.comap f s ⊓ Subfield.comap f t


/-- A polynomial as a continuous function,
with domain restricted to some subset of the semiring of coefficients.

(This is particularly useful when restricting to compact sets, e.g. `[0,1]`.)
-/
@[simps]
def toContinuousMapOn (p : R[X]) (X : Set R) : C(X, R)

{R : Type u_1}
[Semiring R]
[TopologicalSpace R]
[TopologicalSemiring R]
(p : R[X])
(X : Set R)
(x : ↑X)

(p.toContinuousMapOn X) x = p.toContinuousMap ↑x


theorem le_of_add_right_le {n m k : Nat} (h : n + k ≤ m) : n ≤ m


theorem head?_eq_head : ∀ l h, @head? α l = some (head l h)

{α : Type u_1}
(l : List α)
(h : l ≠ [])


theorem projRestricts_comp_projRestrict (h : ∀ i, J i → K i) :
    ProjRestricts C h ∘ ProjRestrict C K = ProjRestrict C J

{I : Type u}
(C : Set (I → Bool))
{J K : I → Prop}
[(i : I) → Decidable (J i)]
[(i : I) → Decidable (K i)]
(h : ∀ (i : I), J i → K i)

Profinite.NobelingProof.ProjRestricts C h ∘ Profinite.NobelingProof.ProjRestrict C K =
  Profinite.NobelingProof.ProjRestrict C J


theorem lex_iff : Lex r s a b ↔ r a.1 b.1 ∨ ∃ h : a.1 = b.1, s b.1 (h.rec a.2) b.2

{ι : Type u_1}
{α : ι → Type u_2}
{r : ι → ι → Prop}
{s : (i : ι) → α i → α i → Prop}
{a b : (i : ι) × α i}

Sigma.Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd


theorem integrable_mul_const_iff {c : 𝕜} (hc : IsUnit c) (f : α → 𝕜) :
    Integrable (fun x => f x * c) μ ↔ Integrable f μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[NormedRing 𝕜]
{c : 𝕜}
(hc : IsUnit c)
(f : α → 𝕜)

MeasureTheory.Integrable (fun x => f x * c) μ ↔ MeasureTheory.Integrable f μ


/-- The **extreme value theorem**: if a continuous function `f` is larger than a value in its range
away from compact sets, then it has a global minimum. -/
theorem Continuous.exists_forall_le' [ClosedIicTopology α] {f : β → α} (hf : Continuous f)
    (x₀ : β) (h : ∀ᶠ x in cocompact β, f x₀ ≤ f x) : ∃ x : β, ∀ y : β, f x ≤ f y

(h : ∀ᶠ (x : β) in Filter.cocompact β, f x₀ ≤ f x)


@[simp]
theorem preimage_sub_const_Ico : (fun x => x - a) ⁻¹' Ico b c = Ico (b + a) (c + a)

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

(fun x => x - a) ⁻¹' Set.Ico b c = Set.Ico (b + a) (c + a)


theorem card_typein_lt (r : α → α → Prop) [IsWellOrder α r] (x : α) (h : ord #α = type r) :
    card (typein r x) < #α

{α : Type u}
(r : α → α → Prop)
[IsWellOrder α r]
(x : α)
(h : (#α).ord = Ordinal.type r)


/-- The product over the complement of a finset tends to `1` when the finset grows to cover the
whole space. This does not need a multipliability assumption, as otherwise all such products are
one. -/
@[to_additive "The sum over the complement of a finset tends to `0` when the finset grows to cover
the whole space. This does not need a summability assumption, as otherwise all such sums are zero."]
theorem tendsto_tprod_compl_atTop_one (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∏' a : { x // x ∉ s }, f a) atTop (𝓝 1)

{α : Type u_1}
{G : Type u_5}
[TopologicalSpace G]
[AddCommGroup G]
[TopologicalAddGroup G]
(f : α → G)

Filter.Tendsto (fun s => ∑' (a : { x // x ∉ s }), f ↑a) Filter.atTop (𝓝 0)


theorem LinearMap.toMatrix_apply (f : M₁ →ₗ[R] M₂) (i : m) (j : n) :
    LinearMap.toMatrix v₁ v₂ f i j = v₂.repr (f (v₁ j)) i

{R : Type u_1}
[CommSemiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype n]
[Finite m]
[DecidableEq n]
{M₁ : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
(v₁ : Basis n R M₁)
(v₂ : Basis m R M₂)
(f : M₁ →ₗ[R] M₂)
(i : m)
(j : n)

(LinearMap.toMatrix v₁ v₂) f i j = (v₂.repr (f (v₁ j))) i


@[to_additive]
theorem mk'_surjective : Surjective <| mk' N

{G : Type u}
[Group G]
(N : Subgroup G)
[nN : N.Normal]


/-- Pick some representation of `x : span R w` as a linear combination in `w`,
using the axiom of choice.
-/
irreducible_def Span.repr (w : Set M) (x : span R w) : w →₀ R

(R : Type u_4)
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(w : Set M)
(x : ↥(Submodule.span R w))


/-- The left adjoint of the adjunction which induces the comonad `(U, ε_ U, δ_ U)`. -/
@[simps]
def fromCokleisli : Cokleisli U ⥤ C

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

∀ {x : CategoryTheory.Cokleisli U} (f : X ⟶ x),
  (CategoryTheory.Cokleisli.Adjunction.fromCokleisli U).map f = CategoryTheory.CategoryStruct.comp (U.δ.app X) (U.map f)


theorem const_eventuallyEq' [NeBot l] {a b : β} : (∀ᶠ _ in l, a = b) ↔ a = b

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
[l.NeBot]
{a b : β}


theorem Integrable.to_average {f : α → β} (h : Integrable f μ) : Integrable f ((μ univ)⁻¹ • μ)

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

MeasureTheory.Integrable f ((μ Set.univ)⁻¹ • μ)


/--
For two arrows `f₁ f₂ : U ⟶ V`, the arrows `i` such that `i ≫ f₁ = i ≫ f₂` forms a sieve.
-/
@[simps]
def Sieve.equalizer {U V : C} (f₁ f₂ : U ⟶ V) : Sieve U

{C : Type uC}
[CategoryTheory.Category.{vC, uC} C]
{U V : C}
(f₁ f₂ : U ⟶ V)
(Y : C)
(i : Y ⟶ U)

(CategoryTheory.Sieve.equalizer f₁ f₂).arrows i =
  (CategoryTheory.CategoryStruct.comp i f₁ = CategoryTheory.CategoryStruct.comp i f₂)


protected theorem Ico_eq_Iio : Ico 0 y = Iio y


protected theorem congr_fun {f g : α →ᵈ β} (h : f = g) (x : α) : f x = g x

{α : Type u_1}
{β : Type u_2}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
{f g : α →ᵈ β}
(h : f = g)
(x : α)


@[simp]
theorem image_symm (f : P₁ ≃ᵃL[k] P₂) (s : Set P₂) : f.symm '' s = f ⁻¹' s

{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₁]
[AddTorsor V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AddTorsor V₂ P₂]
[TopologicalSpace P₁]
[TopologicalSpace P₂]
(f : P₁ ≃ᵃL[k] P₂)
(s : Set P₂)


lemma mk_lt_mk_of_le_of_lt (h₁ : a₁ ≤ a₂) (h₂ : b₁ < b₂) : (a₁, b₁) < (a₂, b₂)

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{a₁ a₂ : α}
{b₁ b₂ : β}
(h₁ : a₁ ≤ a₂)
(h₂ : b₁ < b₂)


/-- Helper lemma for the more general case: `IsMinOn.of_isLocalMinOn_of_convexOn`.
-/
theorem IsMinOn.of_isLocalMinOn_of_convexOn_Icc {f : ℝ → β} {a b : ℝ} (a_lt_b : a < b)
    (h_local_min : IsLocalMinOn f (Icc a b) a) (h_conv : ConvexOn ℝ (Icc a b) f) :
    IsMinOn f (Icc a b) a

(h_local_min : IsLocalMinOn f (Set.Icc a b) a)


theorem homEquiv_symm_rightAdjointUniq_hom_app {F : C ⥤ D} {G G' : D ⥤ C} (adj1 : F ⊣ G)
    (adj2 : F ⊣ G') (x : D) :
    (adj2.homEquiv _ _).symm ((rightAdjointUniq adj1 adj2).hom.app x) = adj1.counit.app x

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

(adj2.homEquiv (G.obj x) x).symm ((adj1.rightAdjointUniq adj2).hom.app x) = adj1.counit.app x


/-- The forgetful monoidal functor from the Drinfeld center to the original category. -/
@[simps]
def forget : MonoidalFunctor (Center C) C

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

(CategoryTheory.Center.forget C).μ X Y = 𝟙 (X.fst ⊗ Y.fst)


/-- Map an `Arrow.Relation` along a refinement `S ⟶ T`. -/
@[simps]
def Arrow.Relation.map {S T : J.Cover X} {I₁ I₂ : S.Arrow}
    (r : I₁.Relation I₂) (f : S ⟶ T) : (I₁.map f).Relation (I₂.map f)

{J : CategoryTheory.GrothendieckTopology C}


theorem expand_zmod (f : MvPolynomial σ (ZMod p)) : expand p f = f ^ p

{σ : Type u_1}
{p : ℕ}
[Fact (Nat.Prime p)]
(f : MvPolynomial σ (ZMod p))


theorem next : ∀ {it}, Valid it → it.hasNext → Valid it.next

it.Valid → it.hasNext = true → it.next.Valid


/-- Multiplicative congruence relations preserve product indexed by a list. -/
@[to_additive "Additive congruence relations preserve sum indexed by a list."]
protected theorem list_prod {ι M : Type*} [Monoid M] (c : Con M) {l : List ι} {f g : ι → M}
    (h : ∀ x ∈ l, c (f x) (g x)) :
    c (l.map f).prod (l.map g).prod

{ι : Type u_1}
{M : Type u_2}
[Monoid M]
(c : Con M)
{l : List ι}
{f g : ι → M}
(h : ∀ x ∈ l, c (f x) (g x))

c (List.map f l).prod (List.map g l).prod


/-- A Lie algebra is solvable if its derived series reaches 0 (in a finite number of steps). -/
class IsSolvable : Prop where
  solvable : ∃ k, derivedSeries R L k = ⊥

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


/-- A structure encapsulating minimal axioms needed to defined a seminormed vector space, as found
in textbooks. This is meant to be used to easily define `SeminormedAddCommGroup E` instances from
scratch on a type with no preexisting distance or topology. -/
structure SeminormedAddCommGroup.Core (𝕜 : Type*) (E : Type*) [NormedField 𝕜] [AddCommGroup E]
    [Norm E] [Module 𝕜 E] : Prop where
  norm_nonneg (x : E) : 0 ≤ ‖x‖
  norm_smul (c : 𝕜) (x : E) : ‖c • x‖ = ‖c‖ * ‖x‖
  norm_triangle (x y : E) : ‖x + y‖ ≤ ‖x‖ + ‖y‖

(self : SeminormedAddCommGroup.Core 𝕜 E)

‖c • x‖ = ‖c‖ * ‖x‖


lemma _root_.MeasurableEmbedding.withDensity_ofReal_comap_apply_eq_integral_abs_deriv_mul
    {f : ℝ → ℝ} (hf : MeasurableEmbedding f) {s : Set ℝ} (hs : MeasurableSet s)
    {g : ℝ → ℝ} (hg : ∀ᵐ x, x ∈ f '' s → 0 ≤ g x) (hg_int : IntegrableOn g (f '' s))
    {f' : ℝ → ℝ} (hf' : ∀ x ∈ s, HasDerivWithinAt f (f' x) s x) :
    (volume.withDensity (fun x ↦ ENNReal.ofReal (g x))).comap f s
      = ENNReal.ofReal (∫ x in s, |f' x| * g (f x))

(hg_int : MeasureTheory.IntegrableOn g (f '' s) MeasureTheory.volume)

(MeasureTheory.Measure.comap f (MeasureTheory.volume.withDensity fun x => ENNReal.ofReal (g x))) s =
  ENNReal.ofReal (∫ (x : ℝ) in s, |f' x| * g (f x))


@[to_additive]
theorem div_mul_eq_div_mul_one_div : a / (b * c) = a / b * (1 / c)

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


@[to_additive]
theorem le_mul_ciInf [CovariantClass α α (· * ·) (· ≤ ·)] {a : α} {g : α} {h : ι → α}
    (H : ∀ j, a ≤ g * h j) : a ≤ g * iInf h

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


theorem Expr.toPoly_denote (ctx : Context) (e : Expr) : e.toPoly.denote ctx = e.denote ctx

(ctx : Nat.Linear.Context)
(e : Nat.SOM.Expr)

Nat.SOM.Poly.denote ctx e.toPoly = Nat.SOM.Expr.denote ctx e


theorem to₂ {f : α × β → σ} (hf : Primrec f) : Primrec₂ fun a b => f (a, b)

{α : Type u_1}
{β : Type u_2}
{σ : Type u_5}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : α × β → σ}
(hf : Primrec f)


theorem coeFn_smul (c : 𝕜) (f : α →ₘ[μ] γ) : ⇑(c • f) =ᵐ[μ] c • ⇑f

{α : Type u_1}
{γ : Type u_3}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace γ]
{𝕜 : Type u_5}
[SMul 𝕜 γ]
[ContinuousConstSMul 𝕜 γ]
(c : 𝕜)
(f : α →ₘ[μ] γ)


theorem const' (s : Part σ) : Partrec fun _ : α => s

{α : Type u_1}
{σ : Type u_4}
[Primcodable α]
[Primcodable σ]
(s : Part σ)


theorem getLast_pmap (p : α → Prop) (f : ∀ a, p a → β) (l : List α)
    (hl₁ : ∀ a ∈ l, p a) (hl₂ : l ≠ []) :
    (l.pmap f hl₁).getLast (mt List.pmap_eq_nil.1 hl₂) =
      f (l.getLast hl₂) (hl₁ _ (List.getLast_mem hl₂))

{α : Type u}
{β : Type v}
(p : α → Prop)
(f : (a : α) → p a → β)
(l : List α)
(hl₁ : ∀ (a : α), a ∈ l → p a)
(hl₂ : l ≠ [])

(List.pmap f l hl₁).getLast ⋯ = f (l.getLast hl₂) ⋯


@[simp]
theorem not_mem_empty (x : Class.{u}) : x ∉ (∅ : Class.{u})


@[simp]
theorem compContinuousLinearMapEquivL_apply (g : ContinuousMultilinearMap 𝕜 E₁ G)
    (f : ∀ i, E i ≃L[𝕜] E₁ i) :
    compContinuousLinearMapEquivL G f g =
      g.compContinuousLinearMap fun i => (f i : E i →L[𝕜] E₁ i)

[(i : ι) → SeminormedAddCommGroup (E i)]

[(i : ι) → SeminormedAddCommGroup (E₁ i)]

(ContinuousMultilinearMap.compContinuousLinearMapEquivL G f) g = g.compContinuousLinearMap fun i => ↑(f i)


@[simp]
theorem eqLocus_eq_top {f g : F} : eqLocus f g = ⊤ ↔ f = g

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_3}
{M₂ : Type u_4}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
{F : Type u_5}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
{f g : F}


@[simp]
theorem lintegral_const {f : β → ℝ≥0∞} {μ : Measure β} {a : α} :
    ∫⁻ x, f x ∂const α μ a = ∫⁻ x, f x ∂μ

{α : Type u_1}
{β : Type u_2}
{mα : MeasurableSpace α}
{mβ : MeasurableSpace β}
{f : β → ℝ≥0∞}
{μ : MeasureTheory.Measure β}
{a : α}

∫⁻ (x : β), f x ∂(ProbabilityTheory.Kernel.const α μ) a = ∫⁻ (x : β), f x ∂μ


theorem derivWithin_mem_iff {f : 𝕜 → F} {t : Set 𝕜} {s : Set F} {x : 𝕜} :
    derivWithin f t x ∈ s ↔
      DifferentiableWithinAt 𝕜 f t x ∧ derivWithin f t x ∈ s ∨
        ¬DifferentiableWithinAt 𝕜 f t x ∧ (0 : F) ∈ s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{t : Set 𝕜}
{s : Set F}
{x : 𝕜}

derivWithin f t x ∈ s ↔ DifferentiableWithinAt 𝕜 f t x ∧ derivWithin f t x ∈ s ∨ ¬DifferentiableWithinAt 𝕜 f t x ∧ 0 ∈ s


lemma Set.Finite.cofinite_inf_principal_compl {s : Set α} (hs : s.Finite) :
    cofinite ⊓ 𝓟 sᶜ = cofinite

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

Filter.cofinite ⊓ 𝓟 sᶜ = Filter.cofinite


@[simp]
theorem toDFinsupp_apply (s : Multiset α) (a : α) : Multiset.toDFinsupp s a = s.count a

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

(Multiset.toDFinsupp s) a = Multiset.count a s


@[simp]
theorem Ioc_union_Ioc_union_Ioc_cycle :
    Ioc a b ∪ Ioc b c ∪ Ioc c a = Ioc (min a (min b c)) (max a (max b c))

{α : Type u_1}
[LinearOrder α]
{a b c : α}

Set.Ioc a b ∪ Set.Ioc b c ∪ Set.Ioc c a = Set.Ioc (min a (min b c)) (max a (max b c))


@[simp]
theorem dist_lineMap_lineMap (p₁ p₂ : P) (c₁ c₂ : 𝕜) :
    dist (lineMap p₁ p₂ c₁) (lineMap p₁ p₂ c₂) = dist c₁ c₂ * dist p₁ p₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
(p₁ p₂ : P)
(c₁ c₂ : 𝕜)

dist ((AffineMap.lineMap p₁ p₂) c₁) ((AffineMap.lineMap p₁ p₂) c₂) = dist c₁ c₂ * dist p₁ p₂


@[simp, norm_cast]
theorem pairwiseDisjoint_coe {ι : Type*} {s : Set ι} {f : ι → Finset α} :
    s.PairwiseDisjoint (fun i => f i : ι → Set α) ↔ s.PairwiseDisjoint f

{α : Type u_1}
{ι : Type u_4}
{s : Set ι}
{f : ι → Finset α}

(s.PairwiseDisjoint fun i => ↑(f i)) ↔ s.PairwiseDisjoint f


@[simp]
theorem zero_f (P Q : DifferentialObject S C) : (0 : P ⟶ Q).f = 0

(P Q : CategoryTheory.DifferentialObject S C)

CategoryTheory.DifferentialObject.Hom.f 0 = 0


@[simp]
theorem mk_whisker_right {f g : a ⟶ b} (η : Hom₂ f g) (h : b ⟶ c) :
    (Hom₂.whisker_right h η).mk = (η.mk ▷ h : f ≫ h ⟶ g ≫ h)

{a b c : CategoryTheory.FreeBicategory B}

(η : CategoryTheory.FreeBicategory.Hom₂ f g)

(CategoryTheory.FreeBicategory.Hom₂.whisker_right h η).mk = CategoryTheory.Bicategory.whiskerRight η.mk h


@[simp] theorem reindex_simple (i' : B') : (cs.reindex e).simple i' = cs.simple (e.symm i')

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


theorem adjoinRoot_eq_top : Algebra.adjoin R ({root f} : Set (AdjoinRoot f)) = ⊤

Algebra.adjoin R {AdjoinRoot.root f} = ⊤


theorem count_inv  (I : FractionalIdeal R⁰ K) :
    count K v (I⁻¹) = - count K v I

(v : IsDedekindDomain.HeightOneSpectrum R)

FractionalIdeal.count K v I⁻¹ = -FractionalIdeal.count K v I


theorem hasLimitsOfShape_of_initiallySmall (J : Type u) [Category.{v} J] [InitiallySmall.{w} J]
    (C : Type u₁) [Category.{v₁} C] [HasLimitsOfSize.{w, w} C] : HasLimitsOfShape J C

[CategoryTheory.Limits.HasLimitsOfSize.{w, w, v₁, u₁} C]


theorem exists_finset_nhd (ρ : PartitionOfUnity ι X univ) (x₀ : X) :
    ∃ I : Finset ι, ∀ᶠ x in 𝓝 x₀, ∑ i ∈ I, ρ i x = 1 ∧ support (ρ · x) ⊆ I

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

∃ I, ∀ᶠ (x : X) in 𝓝 x₀, ∑ i ∈ I, (ρ i) x = 1 ∧ (Function.support fun x_1 => (ρ x_1) x) ⊆ ↑I


/-- Constructs an equivalence between finite Boolean algebras from an order isomorphism between
them. -/
@[simps]
def Iso.mk {α β : FinBoolAlg.{u}} (e : α ≃o β) : α ≅ β

{α β : FinBoolAlg}
(e : ↑α.toBoolAlg ≃o ↑β.toBoolAlg)
(a : ↑α.toBoolAlg)

(FinBoolAlg.Iso.mk e).hom.toSupHom a = e a


theorem taylor_apply : taylor r f = f.comp (X + C r)

{R : Type u_1}
[Semiring R]
(r : R)
(f : Polynomial R)

(Polynomial.taylor r) f = f.comp (Polynomial.X + Polynomial.C r)


theorem bijOn_iUnion {s : ι → Set α} {t : ι → Set β} {f : α → β} (H : ∀ i, BijOn f (s i) (t i))
    (Hinj : InjOn f (⋃ i, s i)) : BijOn f (⋃ i, s i) (⋃ i, t i)

(H : ∀ (i : ι), Set.BijOn f (s i) (t i))


lemma mutuallySingular_dirac [MeasurableSingletonClass α] (x : α) (μ : Measure α) [NoAtoms μ] :
    Measure.dirac x ⟂ₘ μ

{α : Type u_1}
[MeasurableSpace α]
[MeasurableSingletonClass α]
(x : α)
(μ : MeasureTheory.Measure α)
[MeasureTheory.NoAtoms μ]


theorem le_logGammaSeq (hf_conv : ConvexOn ℝ (Ioi 0) f)
    (hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + log y) (hx : 0 < x) (hx' : x ≤ 1) (n : ℕ) :
    f x ≤ f 1 + x * log (n + 1) - x * log n + logGammaSeq x n

(hf_feq : ∀ {y : ℝ}, 0 < y → f (y + 1) = f y + Real.log y)

f x ≤ f 1 + x * Real.log (↑n + 1) - x * Real.log ↑n + Real.BohrMollerup.logGammaSeq x n


@[simp]
theorem map_unop_one :
    map (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ).symm : Aᵐᵒᵖ →ₗ[R] A) (1 : Submodule R Aᵐᵒᵖ) = 1

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]

Submodule.map (↑(MulOpposite.opLinearEquiv R).symm) 1 = 1


theorem leftMulMatrix_mulVec_repr (x y : S) :
    leftMulMatrix b x *ᵥ b.repr y = b.repr (x * y)

{R : Type u_1}
{S : Type u_2}
[CommRing R]
[Ring S]
[Algebra R S]
{m : Type u_3}
[Fintype m]
[DecidableEq m]
(b : Basis m R S)
(x y : S)

(Algebra.leftMulMatrix b) x *ᵥ ⇑(b.repr y) = ⇑(b.repr (x * y))


theorem lex_acc_inl (aca : Acc r a) : Acc (Lex r s) (inl a)

∀ {α : Type u_1} {r : α → α → Prop} {a : α} {β : Type u_2} {s : β → β → Prop}, Acc r a → Acc (Sum.Lex r s) (Sum.inl a)


@[simp] lemma map_indep_iff {hf} {I : Set β} :
    (M.map f hf).Indep I ↔ ∃ I₀, M.Indep I₀ ∧ I = f '' I₀

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{M : Matroid α}
{hf : Set.InjOn f M.E}
{I : Set β}


/-- If `X` is a completely regular T0 space with its Borel sigma algebra, then the mapping
that takes a point `x : X` to the delta-measure `diracProba x` is an embedding
`X → ProbabilityMeasure X`. -/
theorem embedding_diracProba [T0Space X] [CompletelyRegularSpace X]
    [MeasurableSpace X] [OpensMeasurableSpace X] : Embedding (fun (x : X) ↦ diracProba x)

{X : Type u_1}
[TopologicalSpace X]
[T0Space X]
[CompletelyRegularSpace X]
[MeasurableSpace X]
[OpensMeasurableSpace X]

Embedding fun x => MeasureTheory.diracProba x


theorem liftIco_continuous [TopologicalSpace B] {f : 𝕜 → B} (hf : f a = f (a + p))
    (hc : ContinuousOn f <| Icc a (a + p)) : Continuous (liftIco p a f)

(hc : ContinuousOn f (Set.Icc a (a + p)))


theorem diff_mem_inf_principal_compl {f : Filter α} {s : Set α} (hs : s ∈ f) (t : Set α) :
    s \ t ∈ f ⊓ 𝓟 tᶜ

{α : Type u}
{f : Filter α}
{s : Set α}
(hs : s ∈ f)
(t : Set α)


theorem ENNReal.tendsto_pow_atTop_nhds_zero_of_lt_one {r : ℝ≥0∞} (hr : r < 1) :
    Tendsto (fun n : ℕ ↦ r ^ n) atTop (𝓝 0)

Filter.Tendsto (fun n => r ^ n) Filter.atTop (𝓝 0)


Polynomial.Chebyshev.T R (-1) = Polynomial.X


/-- A seminorm is continuous at `0` if `p.closedBall 0 r ∈ 𝓝 0` for *all* `r > 0`.
Over a `NontriviallyNormedField` it is actually enough to check that this is true
for *some* `r`, see `Seminorm.continuousAt_zero'`. -/
theorem continuousAt_zero_of_forall' [TopologicalSpace E] {p : Seminorm 𝕝 E}
    (hp : ∀ r > 0, p.closedBall 0 r ∈ (𝓝 0 : Filter E)) :
    ContinuousAt p 0

{𝕝 : Type u_6}
{E : Type u_7}
[SeminormedRing 𝕝]
[AddCommGroup E]
[Module 𝕝 E]
[TopologicalSpace E]
{p : Seminorm 𝕝 E}
(hp : ∀ r > 0, p.closedBall 0 r ∈ 𝓝 0)


lemma cfc_le_algebraMap (f : R → R) (r : R) (a : A) (h : ∀ x ∈ spectrum R a, f x ≤ r)
    (hf : ContinuousOn f (spectrum R a) := by cfc_cont_tac) (ha : p a := by cfc_tac) :
    cfc f a ≤ algebraMap R A r

[∀ (α : Type u_1) [inst : TopologicalSpace α], StarOrderedRing C(α, R)]


theorem list_findIdx {f : α → List β} {p : α → β → Bool}
    (hf : Primrec f) (hp : Primrec₂ p) : Primrec fun a => (f a).findIdx (p a)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{f : α → List β}
{p : α → β → Bool}
(hf : Primrec f)
(hp : Primrec₂ p)

Primrec fun a => List.findIdx (p a) (f a)


theorem map_ofFunction {β} {f : α → β} (hf : Injective f) :
    map f (OuterMeasure.ofFunction m m_empty) =
      OuterMeasure.ofFunction (fun s => m (f ⁻¹' s)) m_empty

{α : Type u_1}
{m : Set α → ℝ≥0∞}
{m_empty : m ∅ = 0}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)

(MeasureTheory.OuterMeasure.map f) (MeasureTheory.OuterMeasure.ofFunction m m_empty) =
  MeasureTheory.OuterMeasure.ofFunction (fun s => m (f ⁻¹' s)) m_empty


lemma mem_pi {l : List ι} (fs : ∀ i, List (α i)) :
    ∀ f : ∀ i ∈ l, α i, (f ∈ pi l fs) ↔ (∀ i (hi : i ∈ l), f i hi ∈ fs i)

{ι : Type u_1}
[DecidableEq ι]
{α : ι → Type u_2}
{l : List ι}
(fs : (i : ι) → List (α i))
(f : (i : ι) → i ∈ l → α i)

f ∈ l.pi fs ↔ ∀ (i : ι) (hi : i ∈ l), f i hi ∈ fs i


theorem forall_fin_succ_pi {P : (∀ i, α i) → Prop} : (∀ x, P x) ↔ ∀ a v, P (Fin.cons a v)

{n : ℕ}
{α : Fin (n + 1) → Type u}
{P : ((i : Fin (n + 1)) → α i) → Prop}

(∀ (x : (i : Fin (n + 1)) → α i), P x) ↔ ∀ (a : α 0) (v : (i : Fin n) → α i.succ), P (Fin.cons a v)


@[simp]
theorem equalizer.isoSourceOfSelf_hom : (equalizer.isoSourceOfSelf f).hom = equalizer.ι f f

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

(CategoryTheory.Limits.equalizer.isoSourceOfSelf f).hom = CategoryTheory.Limits.equalizer.ι f f


/-- Any non-identity element of a finite group of prime order generates the group. -/
@[to_additive "Any non-identity element of a finite group of prime order generates the group."]
theorem zpowers_eq_top_of_prime_card {G : Type*} [Group G] {_ : Fintype G} {p : ℕ}
    [hp : Fact p.Prime] (h : Fintype.card G = p) {g : G} (hg : g ≠ 1) : zpowers g = ⊤

∀ {x : Fintype G} {p : ℕ} [hp : Fact (Nat.Prime p)],
  Fintype.card G = p → ∀ {g : G}, g ≠ 0 → AddSubgroup.zmultiples g = ⊤


@[simp]
theorem cancel_iso_hom_right {X Y Z : C} (f f' : X ⟶ Y) (g : Y ≅ Z) :
    f ≫ g.hom = f' ≫ g.hom ↔ f = f'

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

CategoryTheory.CategoryStruct.comp f g.hom = CategoryTheory.CategoryStruct.comp f' g.hom ↔ f = f'


theorem comp_continuousWithinAt_iff (h : X ≃ₜ Y) (f : Z → X) (s : Set Z) (z : Z) :
    ContinuousWithinAt f s z ↔ ContinuousWithinAt (h ∘ f) s z

{X : Type u_1}
{Y : Type u_2}
{Z : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(h : X ≃ₜ Y)
(f : Z → X)
(s : Set Z)
(z : Z)

ContinuousWithinAt f s z ↔ ContinuousWithinAt (⇑h ∘ f) s z


theorem det_updateRow_add (M : Matrix n n R) (j : n) (u v : n → R) :
    det (updateRow M j <| u + v) = det (updateRow M j u) + det (updateRow M j v)

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

(M.updateRow j (u + v)).det = (M.updateRow j u).det + (M.updateRow j v).det


/-- If `B : PowerBasis S A` is such that `IsIntegral R B.gen`, then
`IsIntegral R (B.basis.repr (B.gen ^ n) i)` for all `i` if
`minpoly S B.gen = (minpoly R B.gen).map (algebraMap R S)`. This is the case if `R` is a GCD domain
and `S` is its fraction ring. -/
theorem repr_gen_pow_isIntegral [IsDomain S]
    (hmin : minpoly S B.gen = (minpoly R B.gen).map (algebraMap R S)) (n : ℕ) :
    ∀ i, IsIntegral R (B.basis.repr (B.gen ^ n) i)

(hmin : minpoly S B.gen = Polynomial.map (algebraMap R S) (minpoly R B.gen))

IsIntegral R ((B.basis.repr (B.gen ^ n)) i)


@[to_additive]
theorem Nonempty.div : s.Nonempty → t.Nonempty → (s / t).Nonempty

{α : Type u_2}
[DecidableEq α]
[Div α]
{s t : Finset α}


theorem tmul_sub (m : M) (n₁ n₂ : N) : m ⊗ₜ (n₁ - n₂) = m ⊗ₜ[R] n₁ - m ⊗ₜ[R] n₂

{R : Type u_1}
[CommSemiring R]
{M : Type u_2}
{N : Type u_3}
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
(m : M)
(n₁ n₂ : N)

m ⊗ₜ[R] (n₁ - n₂) = m ⊗ₜ[R] n₁ - m ⊗ₜ[R] n₂


theorem integrable_condCDF (ρ : Measure (α × ℝ)) [IsFiniteMeasure ρ] (x : ℝ) :
    Integrable (fun a ↦ condCDF ρ a x) ρ.fst

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
[MeasureTheory.IsFiniteMeasure ρ]
(x : ℝ)

MeasureTheory.Integrable (fun a => ↑(ProbabilityTheory.condCDF ρ a) x) ρ.fst


theorem comp_inter_Icc_eq_of_monotoneOn (f : α → E) {t : Set β} (φ : β → α) (hφ : MonotoneOn φ t)
    {x y : β} (hx : x ∈ t) (hy : y ∈ t) :
    eVariationOn (f ∘ φ) (t ∩ Icc x y) = eVariationOn f (φ '' t ∩ Icc (φ x) (φ y))

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
{β : Type u_3}
[LinearOrder β]
(f : α → E)
{t : Set β}
(φ : β → α)
(hφ : MonotoneOn φ t)
{x y : β}
(hx : x ∈ t)
(hy : y ∈ t)

eVariationOn (f ∘ φ) (t ∩ Set.Icc x y) = eVariationOn f (φ '' t ∩ Set.Icc (φ x) (φ y))


@[to_additive] lemma oneLePart_mul_leOnePart (a : α) : a⁺ᵐ * a⁻ᵐ = |a|ₘ

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

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


theorem lift'_pure {a : α} (hh : Monotone h) : (pure a : Filter α).lift' h = 𝓟 (h {a})

{α : Type u_1}
{β : Type u_2}
{h : Set α → Set β}
{a : α}
(hh : Monotone h)


theorem homotopicFrom (i : N) {p q : Ω^ N X x} :
    (toLoop i p).Homotopic (toLoop i q) → Homotopic p q

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

Path.Homotopic (GenLoop.toLoop i p) (GenLoop.toLoop i q) → GenLoop.Homotopic p q


theorem bijective_of_ne_zero [IsSimpleModule R M] [IsSimpleModule R N] {f : M →ₗ[R] N} (h : f ≠ 0) :
    Function.Bijective f

{R : Type u_2}
[Ring R]
{M : Type u_4}
[AddCommGroup M]
[Module R M]
{N : Type u_5}
[AddCommGroup N]
[Module R N]
[IsSimpleModule R M]
[IsSimpleModule R N]
{f : M →ₗ[R] N}
(h : f ≠ 0)


theorem computable_iff {p : α → Prop} :
    ComputablePred p ↔ ∃ f : α → Bool, Computable f ∧ p = fun a => (f a : Prop)

{α : Type u_1}
[Primcodable α]
{p : α → Prop}

ComputablePred p ↔ ∃ f, Computable f ∧ p = fun a => f a = true


@[simp]
theorem degree_map_eq_iff {f : R →+* S} {p : Polynomial R} :
    degree (map f p) = degree p ↔ f (leadingCoeff p) ≠ 0 ∨ p = 0

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

(Polynomial.map f p).degree = p.degree ↔ f p.leadingCoeff ≠ 0 ∨ p = 0


@[to_additive]
theorem orbitRel.Quotient.mem_orbit {a : α} {x : orbitRel.Quotient G α} :
    a ∈ x.orbit ↔ Quotient.mk'' a = x

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
{a : α}
{x : AddAction.orbitRel.Quotient G α}


/-- Constructor for isomorphisms in `ComposableArrows C 5`. -/
@[simps]
def isoMk₅ {f g : ComposableArrows C 5}
    (app₀ : f.obj' 0 ≅ g.obj' 0) (app₁ : f.obj' 1 ≅ g.obj' 1) (app₂ : f.obj' 2 ≅ g.obj' 2)
    (app₃ : f.obj' 3 ≅ g.obj' 3) (app₄ : f.obj' 4 ≅ g.obj' 4) (app₅ : f.obj' 5 ≅ g.obj' 5)
    (w₀ : f.map' 0 1 ≫ app₁.hom = app₀.hom ≫ g.map' 0 1)
    (w₁ : f.map' 1 2 ≫ app₂.hom = app₁.hom ≫ g.map' 1 2)
    (w₂ : f.map' 2 3 ≫ app₃.hom = app₂.hom ≫ g.map' 2 3)
    (w₃ : f.map' 3 4 ≫ app₄.hom = app₃.hom ≫ g.map' 3 4)
    (w₄ : f.map' 4 5 ≫ app₅.hom = app₄.hom ≫ g.map' 4 5) :
    f ≅ g

{f g : CategoryTheory.ComposableArrows C 5}

(w₀ :
  CategoryTheory.CategoryStruct.comp (f.map' 0 1 ⋯ ⋯) app₁.hom =
    CategoryTheory.CategoryStruct.comp app₀.hom (g.map' 0 1 ⋯ ⋯))

(w₁ :
  CategoryTheory.CategoryStruct.comp (f.map' 1 2 ⋯ ⋯) app₂.hom =
    CategoryTheory.CategoryStruct.comp app₁.hom (g.map' 1 2 ⋯ ⋯))

(w₂ :
  CategoryTheory.CategoryStruct.comp (f.map' 2 3 ⋯ ⋯) app₃.hom =
    CategoryTheory.CategoryStruct.comp app₂.hom (g.map' 2 3 ⋯ ⋯))

(w₃ :
  CategoryTheory.CategoryStruct.comp (f.map' 3 4 ⋯ ⋯) app₄.hom =
    CategoryTheory.CategoryStruct.comp app₃.hom (g.map' 3 4 ⋯ ⋯))

(w₄ :
  CategoryTheory.CategoryStruct.comp (f.map' 4 5 ⋯ ⋯) app₅.hom =
    CategoryTheory.CategoryStruct.comp app₄.hom (g.map' 4 5 ⋯ ⋯))

(CategoryTheory.ComposableArrows.isoMk₅ app₀ app₁ app₂ app₃ app₄ app₅ w₀ w₁ w₂ w₃ w₄).inv =
  CategoryTheory.ComposableArrows.homMk₅ app₀.inv app₁.inv app₂.inv app₃.inv app₄.inv app₅.inv ⋯ ⋯ ⋯ ⋯ ⋯


@[simp]
theorem toSet_insert (x y : ZFSet) : (insert x y).toSet = insert x y.toSet


nonrec lemma StrongConvexOn.mono (hmn : m ≤ n) (hf : StrongConvexOn s n f) : StrongConvexOn s m f

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{s : Set E}
{f : E → ℝ}
{m n : ℝ}
(hmn : m ≤ n)
(hf : StrongConvexOn s n f)


/-- Given a presieve `R` on `Y`, if we take its associated family of opens via
    `coveringOfPresieve` (which may not cover `Y` if `R` is not covering), and take
    the presieve on `Y` associated to the family of opens via `presieveOfCoveringAux`,
    then we get back the original presieve `R`. -/
@[simp]
theorem covering_presieve_eq_self {Y : Opens X} (R : Presieve Y) :
    presieveOfCoveringAux (coveringOfPresieve Y R) Y = R

{X : TopCat}
{Y : TopologicalSpace.Opens ↑X}
(R : CategoryTheory.Presieve Y)

TopCat.Presheaf.presieveOfCoveringAux (TopCat.Presheaf.coveringOfPresieve Y R) Y = R


/-- Equivalent types have equivalent simple graphs. -/
@[simps apply]
protected def _root_.Equiv.simpleGraph (e : V ≃ W) : SimpleGraph V ≃ SimpleGraph W

{V : Type u_1}
{W : Type u_2}
(e : V ≃ W)
(G : SimpleGraph V)

e.simpleGraph G = SimpleGraph.comap (⇑e.symm) G


theorem biInter_inter {ι α : Type*} {s : Set ι} (hs : s.Nonempty) (f : ι → Set α) (t : Set α) :
    ⋂ i ∈ s, f i ∩ t = (⋂ i ∈ s, f i) ∩ t

{ι : Type u_11}
{α : Type u_12}
{s : Set ι}
(hs : s.Nonempty)
(f : ι → Set α)
(t : Set α)


theorem commute_T (n : ℤ) (f : R[T;T⁻¹]) : Commute (T n) f

{R : Type u_1}
[Semiring R]
(n : ℤ)
(f : R[T;T⁻¹])


theorem add_sub_single_one {a : ι} {u u' : ι →₀ ℕ} (h : u' a ≠ 0) :
    u + (u' - single a 1) = u + u' - single a 1

{ι : Type u_1}
{a : ι}
{u u' : ι →₀ ℕ}
(h : u' a ≠ 0)

u + (u' - Finsupp.single a 1) = u + u' - Finsupp.single a 1


theorem IsEulerian.even_degree_iff {x u v : V} {p : G.Walk u v} (ht : p.IsEulerian) [Fintype V]
    [DecidableRel G.Adj] : Even (G.degree x) ↔ u ≠ v → x ≠ u ∧ x ≠ v

{V : Type u_1}
{G : SimpleGraph V}
[DecidableEq V]
{x u v : V}
{p : G.Walk u v}
(ht : p.IsEulerian)
[Fintype V]
[DecidableRel G.Adj]


protected theorem MonotoneOn.Iic (hf : MonotoneOn f s) : MonotoneOn (fun x => Iic (f x)) s

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f : α → β}
{s : Set α}
(hf : MonotoneOn f s)


@[simp]
theorem baseChange_tmul (a : A) (x : M) : f.baseChange A (a ⊗ₜ x) = a ⊗ₜ f x

{R : Type u_1}
{A : Type u_2}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f : M →ₗ[R] N)
(a : A)
(x : M)

(LinearMap.baseChange A f) (a ⊗ₜ[R] x) = a ⊗ₜ[R] f x


theorem irrational_iff_ne_rational (x : ℝ) : Irrational x ↔ ∀ a b : ℤ, x ≠ a / b


/-- On a set with unique derivatives, a `C^n` function has derivatives up to `n` which are
continuous. -/
theorem ContDiffOn.continuousOn_iteratedDerivWithin {n : ℕ∞} {m : ℕ} (h : ContDiffOn 𝕜 n f s)
    (hmn : (m : ℕ∞) ≤ n) (hs : UniqueDiffOn 𝕜 s) : ContinuousOn (iteratedDerivWithin m f s) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{s : Set 𝕜}
{n : ℕ∞}
{m : ℕ}
(h : ContDiffOn 𝕜 n f s)
(hmn : ↑m ≤ n)
(hs : UniqueDiffOn 𝕜 s)


/-- The cone points of two limit cones for naturally isomorphic functors
are themselves isomorphic.
-/
@[simps]
def conePointsIsoOfNatIso {F G : J ⥤ C} {s : Cone F} {t : Cone G} (P : IsLimit s) (Q : IsLimit t)
    (w : F ≅ G) : s.pt ≅ t.pt

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F G : J ⥤ C}
{s : CategoryTheory.Limits.Cone F}
{t : CategoryTheory.Limits.Cone G}
(P : CategoryTheory.Limits.IsLimit s)
(Q : CategoryTheory.Limits.IsLimit t)
(w : F ≅ G)

(P.conePointsIsoOfNatIso Q w).inv = CategoryTheory.Limits.IsLimit.map t P w.inv


@[simp]
theorem associator_map_inl_inl {X Y : C} (f : inl (inl X) ⟶ inl (inl Y)) :
    (associator C D E).map f = f

(f : Sum.inl (Sum.inl X) ⟶ Sum.inl (Sum.inl Y))

(CategoryTheory.sum.associator C D E).map f = f


@[to_additive (attr := simp)]
theorem self_le_mul_left (a b : α) : a ≤ b * a

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
(a b : α)


@[continuity, fun_prop]
theorem continuous_induced_dom {t : TopologicalSpace β} : Continuous[induced f t, t] f

{α : Type u}
{β : Type v}
{f : α → β}
{t : TopologicalSpace β}


/-- Being finitely-presented is a local property of rings. -/
theorem finitePresentation_isLocal : PropertyIsLocal @FinitePresentation


theorem hall_cond_of_restrict {ι : Type u} {t : ι → Finset α} {s : Finset ι}
    (ht : ∀ s : Finset ι, s.card ≤ (s.biUnion t).card) (s' : Finset (s : Set ι)) :
    s'.card ≤ (s'.biUnion fun a' => t a').card

(ht : ∀ (s : Finset ι), s.card ≤ (s.biUnion t).card)

s'.card ≤ (s'.biUnion fun a' => t ↑a').card


theorem map_smulₛₗ (e : M₁ ≃SL[σ₁₂] M₂) (c : R₁) (x : M₁) : e (c • x) = σ₁₂ c • e x

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


@[to_additive (attr := simp)]
theorem MulHom.mk_coe [Mul M] [Mul N] (f : M →ₙ* N) (hmul) : MulHom.mk f hmul = f

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


@[simps!]
instance : MonoidalCategoryStruct (Dial C)

(CategoryTheory.MonoidalCategory.leftUnitor X).inv.F =
  CategoryTheory.CategoryStruct.comp CategoryTheory.Limits.prod.snd CategoryTheory.Limits.prod.snd


theorem iterate_surjective (h : Surjective f') : ∀ n : ℕ, Surjective (f' ^ n)

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f' : M →ₗ[R] M}
(h : Function.Surjective ⇑f')
(n : ℕ)


/-- Whiskering on the left by `E : K ⥤ J` gives a functor from `Cone F` to `Cone (E ⋙ F)`.
-/
@[simps]
def whiskering (E : K ⥤ J) : Cone F ⥤ Cone (E ⋙ F)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{K : Type u₂}
[CategoryTheory.Category.{v₂, u₂} K]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(E : K ⥤ J)
(c : CategoryTheory.Limits.Cone F)

(CategoryTheory.Limits.Cones.whiskering E).obj c = CategoryTheory.Limits.Cone.whisker E c


@[simp]
theorem autCongr_trans (ϕ : A₁ ≃ₐ[R] A₂) (ψ : A₂ ≃ₐ[R] A₃) :
    (autCongr ϕ).trans (autCongr ψ) = autCongr (ϕ.trans ψ)

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

ϕ.autCongr.trans ψ.autCongr = (ϕ.trans ψ).autCongr


theorem get?_zipWith' (f : α → β → γ) (l₁ : List α) (l₂ : List β) (i : ℕ) :
    (zipWith f l₁ l₂).get? i = ((l₁.get? i).map f).bind fun g => (l₂.get? i).map g

{α : Type u}
{β : Type u_1}
{γ : Type u_2}
(f : α → β → γ)
(l₁ : List α)
(l₂ : List β)
(i : ℕ)

(List.zipWith f l₁ l₂).get? i = (Option.map f (l₁.get? i)).bind fun g => Option.map g (l₂.get? i)


theorem tendsto_of_forall_integral_tendsto {γ : Type*} {F : Filter γ} {μs : γ → FiniteMeasure Ω}
    {μ : FiniteMeasure Ω}
    (h :
      ∀ f : Ω →ᵇ ℝ,
        Tendsto (fun i => ∫ x, f x ∂(μs i : Measure Ω)) F (𝓝 (∫ x, f x ∂(μ : Measure Ω)))) :
    Tendsto μs F (𝓝 μ)

{μs : γ → MeasureTheory.FiniteMeasure Ω}

(h : ∀ (f : Ω →ᵇ ℝ), Filter.Tendsto (fun i => ∫ (x : Ω), f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), f x ∂↑μ)))


@[to_additive]
theorem mulAntidiagonal_mono_left (h : u ⊆ s) : mulAntidiagonal hu ht a ⊆ mulAntidiagonal hs ht a

{α : Type u_1}
[OrderedCancelCommMonoid α]
{s t : Set α}
{hs : s.IsPWO}
{ht : t.IsPWO}
{a : α}
{u : Set α}
{hu : u.IsPWO}
(h : u ⊆ s)

Finset.mulAntidiagonal hu ht a ⊆ Finset.mulAntidiagonal hs ht a


theorem sorted_last_eq_max'_aux (s : Finset α)
    (h : (s.sort (· ≤ ·)).length - 1 < (s.sort (· ≤ ·)).length) (H : s.Nonempty) :
    (s.sort (· ≤ ·)).get ⟨(s.sort (· ≤ ·)).length - 1, h⟩ = s.max' H

(h : (Finset.sort (fun x x_1 => x ≤ x_1) s).length - 1 < (Finset.sort (fun x x_1 => x ≤ x_1) s).length)

(Finset.sort (fun x x_1 => x ≤ x_1) s).get ⟨(Finset.sort (fun x x_1 => x ≤ x_1) s).length - 1, h⟩ = s.max' H


theorem logb_neg (h0 : 0 < x) (h1 : x < 1) : logb b x < 0


@[to_additive (attr := simp)]
theorem mem_inf {p p' : Subgroup G} {x : G} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

{G : Type u_1}
[AddGroup G]
{p p' : AddSubgroup G}
{x : G}


theorem nondegenerate_toBilin'_iff_det_ne_zero {M : Matrix ι ι A} :
    M.toBilin'.Nondegenerate ↔ M.det ≠ 0

{A : Type u_11}
[CommRing A]
[IsDomain A]
{ι : Type u_12}
[DecidableEq ι]
[Fintype ι]
{M : Matrix ι ι A}

(Matrix.toBilin' M).Nondegenerate ↔ M.det ≠ 0


theorem nim_one_moveLeft (x) : (nim 1).moveLeft x = nim 0

(SetTheory.PGame.nim 1).moveLeft x = SetTheory.PGame.nim 0


@[reassoc (attr := simp)]
lemma inl_v_snd_v (p q : ℤ) (hpq : p + (-1) = q) :
    (inl φ).v p q hpq ≫ (snd φ).v q q (add_zero q) = 0

(CochainComplex.mappingCone.inl φ).v p q hpq ≫ (CochainComplex.mappingCone.snd φ).v q q ⋯ = 0


theorem smul_right (a : R) (x y : M) : B x (a • y) = a * B x y

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
(a : R)
(x y : M)


theorem total_option (v : Option α → M) (f : Option α →₀ R) :
    Finsupp.total (Option α) M R v f =
      f none • v none + Finsupp.total α M R (v ∘ Option.some) f.some

{α : Type u_1}
{M : Type u_2}
(R : Type u_5)
[Semiring R]
[AddCommMonoid M]
[Module R M]
(v : Option α → M)
(f : Option α →₀ R)

(Finsupp.total (Option α) M R v) f = f none • v none + (Finsupp.total α M R (v ∘ some)) f.some


@[to_additive (attr := simp)]
theorem refl_symm : (refl M).symm = refl M

(MulEquiv.refl M).symm = MulEquiv.refl M


@[to_additive (attr := simp)]
theorem univ_mul_univ : (univ : Set α) * univ = univ


lemma Monotone.partSeq (hf : Monotone f) (hg : Monotone g) : Monotone fun x ↦ f x <*> g x

{α : Type u_1}
[Preorder α]
{β γ : Type u_4}
{f : α → Part (β → γ)}
{g : α → Part β}
(hf : Monotone f)
(hg : Monotone g)

Monotone fun x => Seq.seq (f x) fun x_1 => g x


theorem iUnion_Icc_add_intCast : ⋃ n : ℤ, Icc (a + n) (a + n + 1) = Set.univ

{α : Type u_1}
[LinearOrderedRing α]
[Archimedean α]
(a : α)

⋃ n, Set.Icc (a + ↑n) (a + ↑n + 1) = Set.univ


theorem remainder_summable {m : ℝ} (hm : 1 < m) (k : ℕ) :
    Summable fun i : ℕ => 1 / m ^ (i + (k + 1))!

Summable fun i => 1 / m ^ (i + (k + 1))!


theorem join_le {f : Filter (Filter α)} {l : Filter α} (h : ∀ᶠ m in f, m ≤ l) : join f ≤ l

{α : Type u}
{f : Filter (Filter α)}
{l : Filter α}
(h : ∀ᶠ (m : Filter α) in f, m ≤ l)


nonrec theorem HasDerivAt.add_const (hf : HasDerivAt f f' x) (c : F) :
    HasDerivAt (fun x => f x + c) f' x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{f' : F}
{x : 𝕜}
(hf : HasDerivAt f f' x)
(c : F)


@[simp] theorem trunc_trunc {n} (f : R⟦X⟧) : trunc n ↑(trunc n f) = trunc n f

{R : Type u_2}
[CommSemiring R]
{n : ℕ}
(f : PowerSeries R)

PowerSeries.trunc n ↑(PowerSeries.trunc n f) = PowerSeries.trunc n f


lemma liminf_add_gt_of_gt (ha : a < liminf u f) (hb : b < liminf v f) :
    a + b < liminf (u + v) f

{α : Type u_2}
{f : Filter α}
{u v : α → EReal}
{a b : EReal}
(ha : a < Filter.liminf u f)
(hb : b < Filter.liminf v f)


/-- Note: this assumes that `f` is `IntervalIntegrable`, in contrast to some other lemmas here. -/
theorem continuousOn_primitive_interval' (h_int : IntervalIntegrable f μ b₁ b₂)
    (ha : a ∈ [[b₁, b₂]]) : ContinuousOn (fun b => ∫ x in a..b, f x ∂μ) [[b₁, b₂]]

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b₁ b₂ : ℝ}
{μ : MeasureTheory.Measure ℝ}
{f : ℝ → E}
[MeasureTheory.NoAtoms μ]
(h_int : IntervalIntegrable f μ b₁ b₂)
(ha : a ∈ Set.uIcc b₁ b₂)

ContinuousOn (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Set.uIcc b₁ b₂)


theorem linearIndependent_iff_not_mem_span :
    LinearIndependent K v ↔ ∀ i, v i ∉ span K (v '' (univ \ {i}))

{ι : Type u'}
{K : Type u_3}
{V : Type u}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{v : ι → V}

LinearIndependent K v ↔ ∀ (i : ι), v i ∉ Submodule.span K (v '' (Set.univ \ {i}))


/-- The first morphism of triangles given by an octahedron. -/
@[simps]
def triangleMorphism₁ : Triangle.mk u₁₂ v₁₂ w₁₂ ⟶ Triangle.mk u₁₃ v₁₃ w₁₃

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

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

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

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

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

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

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(h : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)


theorem div_le_of_le_mul {a b c : Ordinal} (h : a ≤ b * c) : a / b ≤ c


theorem not_xor : ∀ (x y : Bool), xor (!x) y = !(xor x y)


/-- The short complex `L₀.X₂ ⟶ L₀.X₃ ⟶ L₃.X₁`. -/
@[simps]
noncomputable def L₁' : ShortComplex C

(S : CategoryTheory.ShortComplex.SnakeInput C)


theorem ContDiff.comp₂ {g : E₁ × E₂ → G} {f₁ : F → E₁} {f₂ : F → E₂} (hg : ContDiff 𝕜 n g)
    (hf₁ : ContDiff 𝕜 n f₁) (hf₂ : ContDiff 𝕜 n f₂) : ContDiff 𝕜 n fun x => g (f₁ x, f₂ x)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{E₁ : Type u_3}
{E₂ : Type u_4}
[NormedAddCommGroup E₁]
[NormedAddCommGroup E₂]
[NormedSpace 𝕜 E₁]
[NormedSpace 𝕜 E₂]
{g : E₁ × E₂ → G}
{f₁ : F → E₁}
{f₂ : F → E₂}
(hg : ContDiff 𝕜 n g)
(hf₁ : ContDiff 𝕜 n f₁)
(hf₂ : ContDiff 𝕜 n f₂)


@[simp]
theorem decode₂_encode [Encodable α] (a : α) : decode₂ α (encode a) = some a

Encodable.decode₂ α (Encodable.encode a) = some a


@[simp, norm_cast]
theorem coe_zero : (↑(0 : R) : c.Quotient) = 0

{R : Type u_2}
[AddZeroClass R]
[Mul R]
(c : RingCon R)


theorem algebraMap_leftInverse :
    Function.LeftInverse algebraMapInv (algebraMap R <| ExteriorAlgebra R M)

{R : Type u1}
[CommRing R]
(M : Type u2)
[AddCommGroup M]
[Module R M]

Function.LeftInverse ⇑ExteriorAlgebra.algebraMapInv ⇑(algebraMap R (ExteriorAlgebra R M))


theorem coe_ringHom_inj_iff {R S : Type*} [NonAssocSemiring R] [NonAssocSemiring S]
    (f g : R ≃+* S) : f = g ↔ (f : R →+* S) = g

{R : Type u_7}
{S : Type u_8}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f g : R ≃+* S)


theorem of_equiv_symm {β} {e : β ≃ α} :
    haveI := Primcodable.ofEquiv α e
    Primrec e.symm

{α : Type u_1}
[Primcodable α]
{β : Type u_4}
{e : β ≃ α}


@[mono, gcongr]
theorem measure_mono (h : s ⊆ t) : μ s ≤ μ t

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


theorem mulHom_apply (x y : 𝒜 ᵍ⊗[R] ℬ) :
    mulHom 𝒜 ℬ x y
      = (auxEquiv R 𝒜 ℬ).symm (gradedMul R (𝒜 ·) (ℬ ·) (auxEquiv R 𝒜 ℬ x) (auxEquiv R 𝒜 ℬ y))

{R : Type u_1}
{ι : Type u_2}
{A : Type u_3}
{B : Type u_4}
[CommSemiring ι]
[Module ι (Additive ℤˣ)]
[DecidableEq ι]
[CommRing R]
[Ring A]
[Ring B]
[Algebra R A]
[Algebra R B]
(𝒜 : ι → Submodule R A)
(ℬ : ι → Submodule R B)
[GradedAlgebra 𝒜]
[GradedAlgebra ℬ]
(x y : 𝒜 ᵍ⊗[R] ℬ)

((GradedTensorProduct.mulHom 𝒜 ℬ) x) y =
  (GradedTensorProduct.auxEquiv R 𝒜 ℬ).symm
    (((TensorProduct.gradedMul R (fun x => ↥(𝒜 x)) fun x => ↥(ℬ x)) ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) x))
      ((GradedTensorProduct.auxEquiv R 𝒜 ℬ) y))


@[simp]
theorem image_sub_const_Ico : (fun x => x - a) '' Ico b c = Ico (b - a) (c - a)

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

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


@[to_additive (attr := simp)]
theorem Fintype.prod_option (f : Option α → M) : ∏ i, f i = f none * ∏ i, f (some i)

{α : Type u_1}
{M : Type u_4}
[Fintype α]
[AddCommMonoid M]
(f : Option α → M)

∑ i : Option α, f i = f none + ∑ i : α, f (some i)


@[elab_as_elim]
theorem DenseRange.induction_on₂ [TopologicalSpace β] {e : α → β} {p : β → β → Prop}
    (he : DenseRange e) (hp : IsClosed { q : β × β | p q.1 q.2 }) (h : ∀ a₁ a₂, p (e a₁) (e a₂))
    (b₁ b₂ : β) : p b₁ b₂

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace β]
{e : α → β}
{p : β → β → Prop}
(he : DenseRange e)
(hp : IsClosed {q | p q.1 q.2})
(h : ∀ (a₁ a₂ : α), p (e a₁) (e a₂))
(b₁ b₂ : β)


theorem tendsto_nhds_top_iff_nnreal {m : α → ℝ≥0∞} {f : Filter α} :
    Tendsto m f (𝓝 ∞) ↔ ∀ x : ℝ≥0, ∀ᶠ a in f, ↑x < m a

{α : Type u_1}
{m : α → ℝ≥0∞}
{f : Filter α}

Filter.Tendsto m f (𝓝 ⊤) ↔ ∀ (x : ℝ≥0), ∀ᶠ (a : α) in f, ↑x < m a


/-- An equivalent expression of `Group.FG` in terms of `Set.Finite` instead of `Finset`. -/
@[to_additive
      "An equivalent expression of `AddGroup.fg` in terms of `Set.Finite` instead of `Finset`."]
theorem Group.fg_iff : Group.FG G ↔ ∃ S : Set G, Subgroup.closure S = (⊤ : Subgroup G) ∧ S.Finite

AddGroup.FG G ↔ ∃ S, AddSubgroup.closure S = ⊤ ∧ S.Finite


theorem Integrable.re_im_iff :
    Integrable (fun x => RCLike.re (f x)) μ ∧ Integrable (fun x => RCLike.im (f x)) μ ↔
      Integrable f μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{𝕜 : Type u_5}
[RCLike 𝕜]
{f : α → 𝕜}

MeasureTheory.Integrable (fun x => RCLike.re (f x)) μ ∧ MeasureTheory.Integrable (fun x => RCLike.im (f x)) μ ↔
  MeasureTheory.Integrable f μ


/-- The square of the distance between two points constructed by
adding multiples of the same orthogonal vector to points in the same
subspace. -/
theorem dist_sq_smul_orthogonal_vadd_smul_orthogonal_vadd {s : AffineSubspace ℝ P} {p1 p2 : P}
    (hp1 : p1 ∈ s) (hp2 : p2 ∈ s) (r1 r2 : ℝ) {v : V} (hv : v ∈ s.directionᗮ) :
    dist (r1 • v +ᵥ p1) (r2 • v +ᵥ p2) * dist (r1 • v +ᵥ p1) (r2 • v +ᵥ p2) =
      dist p1 p2 * dist p1 p2 + (r1 - r2) * (r1 - r2) * (‖v‖ * ‖v‖)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{s : AffineSubspace ℝ P}
{p1 p2 : P}
(hp1 : p1 ∈ s)
(hp2 : p2 ∈ s)
(r1 r2 : ℝ)
{v : V}
(hv : v ∈ s.directionᗮ)


theorem or_not_of_imp : (a → b) → b ∨ ¬a


theorem snd_comp_prodComm :
    (LinearMap.snd R M₂ M).comp (prodComm R M M₂).toLinearMap = (LinearMap.fst R M M₂)

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]

LinearMap.snd R M₂ M ∘ₗ ↑(LinearEquiv.prodComm R M M₂) = LinearMap.fst R M M₂


@[simp]
theorem sign_abs (f : Perm α) :
    |(Equiv.Perm.sign f : ℤ)| = 1

{α : Type u}
[DecidableEq α]
[Fintype α]
(f : Equiv.Perm α)


theorem AlgebraicIndependent.eq_zero_of_aeval_eq_zero (h : AlgebraicIndependent R x) :
    ∀ p : MvPolynomial ι R, MvPolynomial.aeval (x : ι → A) p = 0 → p = 0

{ι : Type u_1}
{R : Type u_3}
{A : Type u_5}
{x : ι → A}
[CommRing R]
[CommRing A]
[Algebra R A]
(h : AlgebraicIndependent R x)
(p : MvPolynomial ι R)


theorem length_sub_one_le_two_mul_count_bool (hl : Chain' (· ≠ ·) l) (b : Bool) :
    length l - 1 ≤ 2 * count b l

(hl : List.Chain' (fun x x_1 => x ≠ x_1) l)


@[simp]
theorem coeSubtype {S : L.ElementarySubstructure M} : ⇑S.subtype = ((↑) : S → M)

{L : FirstOrder.Language}
{M : Type u_1}
[L.Structure M]
{S : L.ElementarySubstructure M}


@[simp]
theorem dualRestrict_apply (W : Submodule R M) (φ : Module.Dual R M) (x : W) :
    W.dualRestrict φ x = φ (x : M)

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(W : Submodule R M)
(φ : Module.Dual R M)
(x : ↥W)


/-- **Strict inequality case of the Rearrangement Inequality**: Pointwise scalar multiplication of
`f` and `g`, which antivary together, is strictly decreased by a permutation if and only if
`f` and `g ∘ σ` do not antivary together. Stated by permuting the entries of `g`. -/
theorem Antivary.sum_smul_lt_sum_smul_comp_perm_iff (hfg : Antivary f g) :
    ∑ i, f i • g i < ∑ i, f i • g (σ i) ↔ ¬Antivary f (g ∘ σ)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedRing α]
[LinearOrderedAddCommGroup β]
[Module α β]
[OrderedSMul α β]
{σ : Equiv.Perm ι}
{f : ι → α}
{g : ι → β}
[Fintype ι]
(hfg : Antivary f g)

∑ i : ι, f i • g i < ∑ i : ι, f i • g (σ i) ↔ ¬Antivary f (g ∘ ⇑σ)


protected theorem infinite_prod :
    (s ×ˢ t).Infinite ↔ s.Infinite ∧ t.Nonempty ∨ t.Infinite ∧ s.Nonempty

{α : Type u}
{β : Type v}
{s : Set α}
{t : Set β}


/-- The restriction of a continuous map to the preimage of a set. -/
@[simps]
def restrictPreimage (f : C(α, β)) (s : Set β) : C(f ⁻¹' s, s)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(f : C(α, β))
(s : Set β)

∀ (a : ↑(⇑f ⁻¹' s)), (f.restrictPreimage s) a = s.restrictPreimage (⇑f) a


/-- A version of `WithTop.map` for `MonoidWithZeroHom`s. -/
@[simps (config := .asFn)]
protected def _root_.MonoidWithZeroHom.withTopMap {R S : Type*} [MulZeroOneClass R] [DecidableEq R]
    [Nontrivial R] [MulZeroOneClass S] [DecidableEq S] [Nontrivial S] (f : R →*₀ S)
    (hf : Function.Injective f) : WithTop R →*₀ WithTop S

{R : Type u_2}
{S : Type u_3}
[MulZeroOneClass R]
[DecidableEq R]
[Nontrivial R]
[MulZeroOneClass S]
[DecidableEq S]
[Nontrivial S]
(f : R →*₀ S)
(hf : Function.Injective ⇑f)


@[simp]
theorem sin_toReal (θ : Angle) : Real.sin θ.toReal = sin θ


@[simp]
theorem quotQuotEquivQuotSup_quotQuotMk (x : R) :
    quotQuotEquivQuotSup I J (quotQuotMk I J x) = Ideal.Quotient.mk (I ⊔ J) x

{R : Type u}
[CommRing R]
(I J : Ideal R)
(x : R)

(DoubleQuot.quotQuotEquivQuotSup I J) ((DoubleQuot.quotQuotMk I J) x) = (Ideal.Quotient.mk (I ⊔ J)) x


theorem inl_apply (x : M) : inl R M M₂ x = (x, 0)

{R : Type u}
{M : Type v}
{M₂ : Type w}
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(x : M)


lemma equiv_zero_of_Z_eq_zero {P : Fin 3 → F} (hP : W.Nonsingular P) (hPz : P z = 0) :
    P ≈ ![1, 1, 0]

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P : Fin 3 → F}
(hP : W.Nonsingular P)
(hPz : P z = 0)


theorem rotate_one_eq_self_iff_eq_replicate [Nonempty α] {l : List α} :
    l.rotate 1 = l ↔ ∃ a : α, l = List.replicate l.length a

l.rotate 1 = l ↔ ∃ a, l = List.replicate l.length a


theorem smul_mono_left (h : I ≤ J) : I • N ≤ J • N

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{I J : Ideal R}
{N : Submodule R M}
(h : I ≤ J)


theorem IsSeparable.of_subtype (s : Set α) [SeparableSpace s] : IsSeparable s

{α : Type u}
[t : TopologicalSpace α]
(s : Set α)
[TopologicalSpace.SeparableSpace ↑s]


theorem nth_eq_getD_sort (h : (setOf p).Finite) (n : ℕ) :
    nth p n = (h.toFinset.sort (· ≤ ·)).getD n 0

{p : ℕ → Prop}
(h : (setOf p).Finite)
(n : ℕ)

Nat.nth p n = (Finset.sort (fun x x_1 => x ≤ x_1) h.toFinset).getD n 0


private theorem coe_ennreal_top_mul (x : ℝ≥0) : ((⊤ * x : ℝ≥0∞) : EReal) = ⊤ * x


@[simp]
theorem mem_iSup_iff {f : ι → UpperSet α} : (a ∈ ⨆ i, f i) ↔ ∀ i, a ∈ f i

{α : Type u_1}
{ι : Sort u_4}
[LE α]
{a : α}
{f : ι → UpperSet α}


@[simp]
theorem lift_apply (f : M →ₗ[A] N →ₗ[R] P) (a : M ⊗[R] N) :
    AlgebraTensorModule.lift f a = TensorProduct.lift (LinearMap.restrictScalars R f) a

{R : Type uR}
{A : Type uA}
{M : Type uM}
{N : Type uN}
{P : Type uP}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[AddCommMonoid M]
[Module R M]
[Module A M]
[IsScalarTower R A M]
[AddCommMonoid N]
[Module R N]
[AddCommMonoid P]
[Module R P]
[Module A P]
[IsScalarTower R A P]
(f : M →ₗ[A] N →ₗ[R] P)
(a : TensorProduct R M N)

(TensorProduct.AlgebraTensorModule.lift f) a = (TensorProduct.lift (↑R f)) a


@[reassoc (attr := simp)]
lemma inr_f_descCochain_v (p₁ p₂ : ℤ) (h₁₂ : p₁ + n = p₂) :
    (inr φ).f p₁ ≫ (descCochain φ α β h).v p₁ p₂ h₁₂ = β.v p₁ p₂ h₁₂

(α : CochainComplex.HomComplex.Cochain F K m)

(β : CochainComplex.HomComplex.Cochain G K n)

(CochainComplex.mappingCone.inr φ).f p₁ ≫ (CochainComplex.mappingCone.descCochain φ α β h).v p₁ p₂ h₁₂ = β.v p₁ p₂ h₁₂


lemma right_ne_zero_of_smul {a : M} {b : A} : a • b ≠ 0 → b ≠ 0

{M : Type u_1}
{A : Type u_4}
[Zero A]
[SMulZeroClass M A]
{a : M}
{b : A}


theorem mul_eval_of_const_left (l₁ l₂ : LinearCombo) (v : Coeffs) (w : l₁.coeffs.isZero) :
    (mul l₁ l₂).eval v = l₁.eval v * l₂.eval v

(l₁ l₂ : Lean.Omega.LinearCombo)
(v : Lean.Omega.Coeffs)
(w : l₁.coeffs.isZero)

(l₁.mul l₂).eval v = l₁.eval v * l₂.eval v


theorem isLUB_of_mem_nhds {s : Set α} {a : α} {f : Filter α} (hsa : a ∈ upperBounds s) (hsf : s ∈ f)
    [NeBot (f ⊓ 𝓝 a)] : IsLUB s a

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
{s : Set α}
{a : α}
{f : Filter α}
(hsa : a ∈ upperBounds s)
(hsf : s ∈ f)
[(f ⊓ 𝓝 a).NeBot]


protected theorem mdifferentiable : MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f

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


@[simp]
theorem mem_comap {m : M} : m ∈ comap f N' ↔ f m ∈ N'

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


@[to_additive]
theorem mul_lt_mul_iff_of_le_of_le [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (Function.swap (· * ·)) (· ≤ ·)] [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (Function.swap (· * ·)) (· < ·)] {a₁ a₂ b₁ b₂ : α} (ha : a₁ ≤ a₂)
    (hb : b₁ ≤ b₂) : a₁ * b₁ < a₂ * b₂ ↔ a₁ < a₂ ∨ b₁ < 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]

[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 conjLIE_apply (z : ℂ) : conjLIE z = conj z


theorem fpowerSeriesBilinear_apply_add_three (f : E →L[𝕜] F →L[𝕜] G) (x : E × F) (n) :
    fpowerSeriesBilinear f x (n + 3) = 0

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
(f : E →L[𝕜] F →L[𝕜] G)
(x : E × F)
(n : ℕ)


theorem Ioo_subset_Ico_self : Ioo a b ⊆ Ico a b


@[measurability]
lemma stronglyMeasurable_llr (μ ν : Measure α) : StronglyMeasurable (llr μ ν)

{α : Type u_1}
{mα : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)

MeasureTheory.StronglyMeasurable (MeasureTheory.llr μ ν)


theorem finsetSum_iSup {α ι : Type*} {s : Finset α} {f : α → ι → ℝ≥0∞}
    (hf : ∀ i j, ∃ k, ∀ a, f a i ≤ f a k ∧ f a j ≤ f a k) :
    ∑ a ∈ s, ⨆ i, f a i = ⨆ i, ∑ a ∈ s, f a i

{f : α → ι → ℝ≥0∞}

(hf : ∀ (i j : ι), ∃ k, ∀ (a : α), f a i ≤ f a k ∧ f a j ≤ f a k)


theorem Ico_succ_left_eq_erase_Ico : Ico a.succ b = erase (Ico a b) a

Finset.Ico a.succ b = (Finset.Ico a b).erase a


theorem isClosed_range {α β : Type*} [PseudoEMetricSpace α] [EMetricSpace β] [CompleteSpace α]
    {f : α → β} {K : ℝ≥0} (hf : AntilipschitzWith K f) (hfc : UniformContinuous f) :
    IsClosed (range f)

{α : Type u_4}
{β : Type u_5}
[PseudoEMetricSpace α]
[EMetricSpace β]
[CompleteSpace α]
{f : α → β}
{K : ℝ≥0}
(hf : AntilipschitzWith K f)
(hfc : UniformContinuous f)


theorem mul_right_le_iff [IsDedekindDomain A] {J : FractionalIdeal A⁰ K} (hJ : J ≠ 0) :
    ∀ {I I'}, I * J ≤ I' * J ↔ I ≤ I'

{A : Type u_2}
{K : Type u_3}
[CommRing A]
[Field K]
[Algebra A K]
[IsFractionRing A K]
[IsDedekindDomain A]
{J : FractionalIdeal A⁰ K}
(hJ : J ≠ 0)
{I I' : FractionalIdeal A⁰ K}


protected theorem _root_.Set.Finite.nullMeasurableSet (hs : s.Finite) : NullMeasurableSet s μ

[MeasurableSingletonClass (MeasureTheory.NullMeasurableSpace α μ)]


@[simp]
lemma toOver_comp_forget (F : S ⥤ T) (X : T) (f : (Y : S) → F.obj Y ⟶ X)
    (h : ∀ {Y Z : S} (g : Y ⟶ Z), F.map g ≫ f Z = f Y) : F.toOver X f h ⋙ Over.forget _ = F

(h : ∀ {Y Z : S} (g : Y ⟶ Z), CategoryTheory.CategoryStruct.comp (F.map g) (f Z) = f Y)

(F.toOver X f ⋯).comp (CategoryTheory.Over.forget X) = F


@[simp]
lemma map_mul_left_cobounded {a : α} (ha : a ≠ 0) :
    map (a * ·) (cobounded α) = cobounded α

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

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


theorem map_append_bind_perm (l : List α) (f : α → β) (g : α → List β) :
    l.map f ++ l.bind g ~ l.bind fun x => f x :: g x

{α : Type u_1}
{β : Type u_2}
(l : List α)
(f : α → β)
(g : α → List β)

(List.map f l ++ l.bind g).Perm (l.bind fun x => f x :: g x)


theorem le_sum_schlomilch' (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n)
    (hu : Monotone u) (n : ℕ) :
    (∑ k ∈ Ico (u 0) (u n), f k) ≤ ∑ k ∈ range n, (u (k + 1) - u k) • f (u k)

(hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m)

∑ k ∈ Finset.Ico (u 0) (u n), f k ≤ ∑ k ∈ Finset.range n, (u (k + 1) - u k) • f (u k)


@[simp]
theorem sumAddHom_zero [∀ i, AddZeroClass (β i)] [AddCommMonoid γ] :
    (sumAddHom fun i => (0 : β i →+ γ)) = 0

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


theorem yonedaEquiv_apply {X : C} {F : Cᵒᵖ ⥤ Type v₁} (f : yoneda.obj X ⟶ F) :
    yonedaEquiv f = f.app (op X) (𝟙 X)

{F : CategoryTheory.Functor Cᵒᵖ (Type v₁)}

CategoryTheory.yonedaEquiv f = f.app (Opposite.op X) (CategoryTheory.CategoryStruct.id X)


@[simp]
theorem map_comap_eq (h : f.IsIdealMorphism) : map f (comap f J) = f.idealRange ⊓ J

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
{f : L →ₗ⁅R⁆ L'}
{J : LieIdeal R L'}
(h : f.IsIdealMorphism)

LieIdeal.map f (LieIdeal.comap f J) = f.idealRange ⊓ J


@[to_additive (attr := simp)]
lemma infinite_powers : (powers a : Set G).Infinite ↔ ¬ IsOfFinOrder a

{G : Type u_1}
[AddLeftCancelMonoid G]
{a : G}

(↑(AddSubmonoid.multiples a)).Infinite ↔ ¬IsOfFinAddOrder a


@[ext]
lemma ext {A B : Algebra F} {f g : A ⟶ B} (w : f.f = g.f := by aesop_cat) : f = g

{A B : CategoryTheory.Endofunctor.Algebra F}


theorem ne_empty_of_mem {a : α} {s : Finset α} (h : a ∈ s) : s ≠ ∅

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


theorem _root_.ContDiff.contDiffBump {c g : X → E} {f : ∀ x, ContDiffBump (c x)}
    (hc : ContDiff ℝ n c) (hr : ContDiff ℝ n fun x => (f x).rIn)
    (hR : ContDiff ℝ n fun x => (f x).rOut) (hg : ContDiff ℝ n g) :
    ContDiff ℝ n fun x => f x (g x)

{E : Type u_1}
{X : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup X]
[NormedSpace ℝ X]
[HasContDiffBump E]
{n : ℕ∞}
{c g : X → E}
{f : (x : X) → ContDiffBump (c x)}
(hc : ContDiff ℝ n c)
(hr : ContDiff ℝ n fun x => (f x).rIn)
(hR : ContDiff ℝ n fun x => (f x).rOut)
(hg : ContDiff ℝ n g)


@[zify_simps] lemma natCast_eq (a b : Nat) : a = b ↔ (a : Int) = (b : Int)


/-- This is really an auxiliary result en route to `blimsup_cthickening_ae_le_of_eventually_mul_le`
(which is itself an auxiliary result en route to `blimsup_cthickening_mul_ae_eq`).

NB: The `: Set α` type ascription is present because of
https://github.com/leanprover-community/mathlib/issues/16932. -/
theorem blimsup_cthickening_ae_le_of_eventually_mul_le_aux (p : ℕ → Prop) {s : ℕ → Set α}
    (hs : ∀ i, IsClosed (s i)) {r₁ r₂ : ℕ → ℝ} (hr : Tendsto r₁ atTop (𝓝[>] 0)) (hrp : 0 ≤ r₁)
    {M : ℝ} (hM : 0 < M) (hM' : M < 1) (hMr : ∀ᶠ i in atTop, M * r₁ i ≤ r₂ i) :
    (blimsup (fun i => cthickening (r₁ i) (s i)) atTop p : Set α) ≤ᵐ[μ]
      (blimsup (fun i => cthickening (r₂ i) (s i)) atTop p : Set α)

{r₁ r₂ : ℕ → ℝ}

(hr : Filter.Tendsto r₁ Filter.atTop (𝓝[>] 0))

(hMr : ∀ᶠ (i : ℕ) in Filter.atTop, M * r₁ i ≤ r₂ i)

Filter.blimsup (fun i => Metric.cthickening (r₁ i) (s i)) Filter.atTop p ≤ᵐ[μ]
  Filter.blimsup (fun i => Metric.cthickening (r₂ i) (s i)) Filter.atTop p


/-- If `f` is a non constant polynomial with coefficients in `R`, and `P` is a prime ideal in `R`,
then if every coefficient in `R` except the leading coefficient is in `P`, and
the trailing coefficient is not in `P^2` and no non units in `R` divide `f`, then `f` is
irreducible. -/
theorem irreducible_of_eisenstein_criterion {f : R[X]} {P : Ideal R} (hP : P.IsPrime)
    (hfl : f.leadingCoeff ∉ P) (hfP : ∀ n : ℕ, ↑n < degree f → f.coeff n ∈ P) (hfd0 : 0 < degree f)
    (h0 : f.coeff 0 ∉ P ^ 2) (hu : f.IsPrimitive) : Irreducible f

(hfP : ∀ (n : ℕ), ↑n < f.degree → f.coeff n ∈ P)


@[simp]
theorem ker_inclusion (p p' : Submodule R M) (h : p ≤ p') : ker (inclusion h) = ⊥

{R : Type u_1}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(p p' : Submodule R M)
(h : p ≤ p')

LinearMap.ker (Submodule.inclusion h) = ⊥


{ι : Type u_1}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)


@[simp]
theorem length_ofFn_go {n} (f : Fin n → α) (i j h) : length (ofFn.go f i j h) = i

{α : Type u}
{n : ℕ}
(f : Fin n → α)
(i j : ℕ)
(h : i + j = n)


theorem inf_sup {x' y'} (h : IsCompl x y) (h' : IsCompl x' y') : IsCompl (x ⊓ x') (y ⊔ y')

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


theorem Adhesive.isPullback_of_isPushout_of_mono_right [Adhesive C] (H : IsPushout f g h i)
    [Mono g] : IsPullback f g h i

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
[CategoryTheory.Adhesive C]
(H : CategoryTheory.IsPushout f g h i)
[CategoryTheory.Mono g]


@[simp]
theorem coe_mapAddMonoidHom (f : α → β) :
    (mapAddMonoidHom f : Multiset α → Multiset β) = map f

⇑(Multiset.mapAddMonoidHom f) = Multiset.map f


theorem partialSups_eq_sup'_range (f : ℕ → α) (n : ℕ) :
    partialSups f n = (Finset.range (n + 1)).sup' ⟨n, Finset.self_mem_range_succ n⟩ f

{α : Type u_1}
[SemilatticeSup α]
(f : ℕ → α)
(n : ℕ)

(partialSups f) n = (Finset.range (n + 1)).sup' ⋯ f


/-- The tensor product functor from `C × C` to `C` as a monoidal functor. -/
@[simps!]
def tensorMonoidal : MonoidalFunctor (C × C) C

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

(CategoryTheory.tensorMonoidal C).ε = (λ_ (𝟙_ C)).inv


(S : FermatLastTheoremForThreeGen.Solution hζ)

FermatLastTheoremForThreeGen.Solution.X S ≠ 0


@[simp]
lemma preimage_val_iInter : A ↓∩ (⋂ i, s i) = ⋂ i, A ↓∩ s i

{ι : Sort u_1}
{α : Type u_2}
{A : Set α}
{s : ι → Set α}

Subtype.val ⁻¹' ⋂ i, s i = ⋂ i, Subtype.val ⁻¹' s i


@[simp]
theorem insert_inter_of_mem {s₁ s₂ : Finset α} {a : α} (h : a ∈ s₂) :
    insert a s₁ ∩ s₂ = insert a (s₁ ∩ s₂)

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


@[simp]
theorem ContinuousMultilinearMap.curryRight_apply (f : ContinuousMultilinearMap 𝕜 Ei G)
    (m : ∀ i : Fin n, Ei <| castSucc i) (x : Ei (last n)) : f.curryRight m x = f (snoc m x)

[(i : Fin n.succ) → NormedAddCommGroup (Ei i)]

[(i : Fin n.succ) → NormedSpace 𝕜 (Ei i)]


/-- See also `Subspace.dualAnnihilator_inf_eq` for vector subspaces. -/
theorem sup_dualAnnihilator_le_inf (U V : Submodule R M) :
    U.dualAnnihilator ⊔ V.dualAnnihilator ≤ (U ⊓ V).dualAnnihilator

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


theorem Ioc_coe_coe : Ioc (a : WithBot α) b = (Ioc a b).map Embedding.some

(α : Type u_1)
[PartialOrder α]
[OrderBot α]
[LocallyFiniteOrder α]
(a b : α)

Finset.Ioc ↑a ↑b = Finset.map Function.Embedding.some (Finset.Ioc a b)


/-- If `C` is filtered or empty, and we have a right adjoint functor `R : C ⥤ D`, then `D` is
filtered or empty. -/
theorem of_isRightAdjoint (R : C ⥤ D) [R.IsRightAdjoint] : IsFilteredOrEmpty D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsFilteredOrEmpty C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
(R : CategoryTheory.Functor C D)
[R.IsRightAdjoint]


theorem pderiv_mul {i : σ} {f g : MvPolynomial σ R} :
    pderiv i (f * g) = pderiv i f * g + f * pderiv i g

{R : Type u}
{σ : Type v}
[CommSemiring R]
{i : σ}
{f g : MvPolynomial σ R}

(MvPolynomial.pderiv i) (f * g) = (MvPolynomial.pderiv i) f * g + f * (MvPolynomial.pderiv i) g


theorem singleton_prod_singleton : ({a} : Set α) ×ˢ ({b} : Set β) = {(a, b)}

{α : Type u_1}
{β : Type u_2}
{a : α}
{b : β}


theorem circleIntegrable_iff [NormedSpace ℂ E] {f : ℂ → E} {c : ℂ} (R : ℝ) :
    CircleIntegrable f c R ↔ IntervalIntegrable (fun θ : ℝ =>
      deriv (circleMap c R) θ • f (circleMap c R θ)) volume 0 (2 * π)

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

CircleIntegrable f c R ↔
  IntervalIntegrable (fun θ => deriv (circleMap c R) θ • f (circleMap c R θ)) MeasureTheory.volume 0 (2 * π)


@[simp]
theorem coe_one : ⇑(1 : P1 →ᵃ[k] P1) = _root_.id

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


/-- A presheaf of modules over a given presheaf of rings,
described as a presheaf of abelian groups, and the extra data of the action at each object,
and a condition relating functoriality and scalar multiplication. -/
structure PresheafOfModules (R : Cᵒᵖ ⥤ RingCat.{u}) where
  presheaf : Cᵒᵖ ⥤ AddCommGrp.{v}
  module : ∀ X : Cᵒᵖ, Module (R.obj X) (presheaf.obj X) := by infer_instance
  map_smul : ∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (r : R.obj X) (x : presheaf.obj X),
    presheaf.map f (r • x) = R.map f r • presheaf.map f x := by aesop_cat

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

(self.presheaf.map f) (r • x) = (R.map f) r • (self.presheaf.map f) x


@[simp]
theorem arrowCongrSL_toLinearEquiv_symm_apply (e₁₂ : E ≃SL[σ₁₂] F) (e₄₃ : H ≃SL[σ₄₃] G)
    (L : F →SL[σ₂₃] G) : (e₁₂.arrowCongrSL e₄₃).toLinearEquiv.symm L =
      (e₄₃.symm : G →SL[σ₃₄] H).comp (L.comp (e₁₂ : E →SL[σ₁₂] F))

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{𝕜₄ : Type u_4}
{E : Type u_5}
{F : Type u_6}
{G : Type u_7}
{H : Type u_8}
[AddCommGroup E]
[AddCommGroup F]
[AddCommGroup G]
[AddCommGroup H]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NontriviallyNormedField 𝕜₄]
[Module 𝕜 E]
[Module 𝕜₂ F]
[Module 𝕜₃ G]
[Module 𝕜₄ H]
[TopologicalSpace E]
[TopologicalSpace F]
[TopologicalSpace G]
[TopologicalSpace H]
[TopologicalAddGroup G]
[TopologicalAddGroup H]
[ContinuousConstSMul 𝕜₃ G]
[ContinuousConstSMul 𝕜₄ H]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{σ₂₁ : 𝕜₂ →+* 𝕜}
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
{σ₁₃ : 𝕜 →+* 𝕜₃}
{σ₃₄ : 𝕜₃ →+* 𝕜₄}
{σ₄₃ : 𝕜₄ →+* 𝕜₃}
{σ₂₄ : 𝕜₂ →+* 𝕜₄}
{σ₁₄ : 𝕜 →+* 𝕜₄}
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
[RingHomInvPair σ₃₄ σ₄₃]
[RingHomInvPair σ₄₃ σ₃₄]
[RingHomCompTriple σ₂₁ σ₁₄ σ₂₄]
[RingHomCompTriple σ₂₄ σ₄₃ σ₂₃]
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomCompTriple σ₁₃ σ₃₄ σ₁₄]
[RingHomCompTriple σ₂₃ σ₃₄ σ₂₄]
[RingHomCompTriple σ₁₂ σ₂₄ σ₁₄]
[RingHomIsometric σ₁₂]
[RingHomIsometric σ₂₁]
(e₁₂ : E ≃SL[σ₁₂] F)
(e₄₃ : H ≃SL[σ₄₃] G)
(L : F →SL[σ₂₃] G)

(e₁₂.arrowCongrSL e₄₃).symm L = (↑e₄₃.symm).comp (L.comp ↑e₁₂)


/-- Extensionality lemma in terms of `UpperHalfPlane.re` and `UpperHalfPlane.im`. -/
theorem ext' {a b : ℍ} (hre : a.re = b.re) (him : a.im = b.im) : a = b


@[continuity]
theorem continuous_toTopMap {x y : SimplexCategory} (f : x ⟶ y) : Continuous (toTopMap f)


@[simp]
lemma hom_naturality_apply {X Y : CondensedMod.{u} R} (f : X ⟶ Y)  {S T : CompHausᵒᵖ} (g : S ⟶ T)
    (x : X.val.obj S) : f.val.app T (X.val.map g x) = Y.val.map g (f.val.app S x)

(R : Type (u + 1))
[Ring R]
{X Y : CondensedMod R}
(f : X ⟶ Y)
{S T : CompHausᵒᵖ}
(g : S ⟶ T)
(x : ↑(X.val.obj S))

(f.val.app T) ((X.val.map g) x) = (Y.val.map g) ((f.val.app S) x)


/-- Reinterpret a compact open as a clopen. -/
@[simps]
def toClopens [T2Space α] (s : CompactOpens α) : Clopens α

{α : Type u_1}
[TopologicalSpace α]
[T2Space α]
(s : TopologicalSpace.CompactOpens α)


@[simp]
theorem Icc_eq_singleton_iff : Icc a b = {c} ↔ a = c ∧ b = c

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


theorem iterate_derivative_at_1_ne_zero [CharZero R] (n ν : ℕ) (h : ν ≤ n) :
    (Polynomial.derivative^[n - ν] (bernsteinPolynomial R n ν)).eval 1 ≠ 0

(R : Type u_1)
[CommRing R]
[CharZero R]
(n ν : ℕ)
(h : ν ≤ n)

Polynomial.eval 1 ((⇑Polynomial.derivative)^[n - ν] (bernsteinPolynomial R n ν)) ≠ 0


/-- An octahedron is a type of datum whose existence is asserted by
the octahedron axiom (TR 4), see https://stacks.math.columbia.edu/tag/05QK -/
structure Octahedron
  {X₁ X₂ X₃ Z₁₂ Z₂₃ Z₁₃ : C}
  {u₁₂ : X₁ ⟶ X₂} {u₂₃ : X₂ ⟶ X₃} {u₁₃ : X₁ ⟶ X₃} (comm : u₁₂ ≫ u₂₃ = u₁₃)
  {v₁₂ : X₂ ⟶ Z₁₂} {w₁₂ : Z₁₂ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₂ : Triangle.mk u₁₂ v₁₂ w₁₂ ∈ distTriang C)
  {v₂₃ : X₃ ⟶ Z₂₃} {w₂₃ : Z₂₃ ⟶ X₂⟦(1 : ℤ)⟧} (h₂₃ : Triangle.mk u₂₃ v₂₃ w₂₃ ∈ distTriang C)
  {v₁₃ : X₃ ⟶ Z₁₃} {w₁₃ : Z₁₃ ⟶ X₁⟦(1 : ℤ)⟧} (h₁₃ : Triangle.mk u₁₃ v₁₃ w₁₃ ∈ distTriang C) where
  m₁ : Z₁₂ ⟶ Z₁₃
  m₃ : Z₁₃ ⟶ Z₂₃
  comm₁ : v₁₂ ≫ m₁ = u₂₃ ≫ v₁₃
  comm₂ : m₁ ≫ w₁₃ = w₁₂
  comm₃ : v₁₃ ≫ m₃ = v₂₃
  comm₄ : w₁₃ ≫ u₁₂⟦1⟧' = m₃ ≫ w₂₃
  mem : Triangle.mk m₁ m₃ (w₂₃ ≫ v₁₂⟦1⟧') ∈ distTriang C

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

{comm : CategoryTheory.CategoryStruct.comp u₁₂ u₂₃ = u₁₃}

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

{w₁₂ : Z₁₂ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₂ : CategoryTheory.Pretriangulated.Triangle.mk u₁₂ v₁₂ w₁₂ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

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

{w₂₃ : Z₂₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₂}

{h₂₃ : CategoryTheory.Pretriangulated.Triangle.mk u₂₃ v₂₃ w₂₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

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

{w₁₃ : Z₁₃ ⟶ (CategoryTheory.shiftFunctor C 1).obj X₁}

{h₁₃ : CategoryTheory.Pretriangulated.Triangle.mk u₁₃ v₁₃ w₁₃ ∈ CategoryTheory.Pretriangulated.distinguishedTriangles}

(self : CategoryTheory.Triangulated.Octahedron comm h₁₂ h₂₃ h₁₃)

CategoryTheory.CategoryStruct.comp v₁₂ self.m₁ = CategoryTheory.CategoryStruct.comp u₂₃ v₁₃


theorem mono_of_mono_of_mono_of_mono (hR₁ : R₁.Exact)
    (hR₂' : Mono (R₂.map' 0 1))
    (h₀ : Mono (app' φ 0))
    (h₁ : Mono (app' φ 2)) :
    Mono (app' φ 1)

{R₁ R₂ : CategoryTheory.ComposableArrows C 2}

(hR₂' : CategoryTheory.Mono (R₂.map' 0 1 ⋯ ⋯))

(h₀ : CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 0 ⋯))

(h₁ : CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 2 ⋯))

CategoryTheory.Mono (CategoryTheory.ComposableArrows.app' φ 1 ⋯)


@[measurability]
nonrec theorem AEMeasurable.max {f g : δ → α} {μ : Measure δ} (hf : AEMeasurable f μ)
    (hg : AEMeasurable g μ) : AEMeasurable (fun a => max (f a) (g a)) μ

{α : Type u_1}
{δ : Type u_4}
[TopologicalSpace α]
[MeasurableSpace α]
[OpensMeasurableSpace α]
[MeasurableSpace δ]
[LinearOrder α]
[OrderClosedTopology α]
[SecondCountableTopology α]
{f g : δ → α}
{μ : MeasureTheory.Measure δ}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g μ)


@[to_additive]
theorem norm_le_norm_add_norm_div (u v : E) : ‖v‖ ≤ ‖u‖ + ‖u / v‖

{E : Type u_6}
[SeminormedAddGroup E]
(u v : E)

‖v‖ ≤ ‖u‖ + ‖u - v‖


lemma map_smul :
    A.val.map π (smul α φ r m) = smul α φ (R.val.map π r) (A.val.map π m)

{J : CategoryTheory.GrothendieckTopology C}

(A.val.map π) (PresheafOfModules.Sheafify.smul α φ r m) =
  PresheafOfModules.Sheafify.smul α φ ((R.val.map π) r) ((A.val.map π) m)


@[simp] lemma Commute.smul_right_iff : Commute a (g • b) ↔ Commute a b

{G : Type u_3}
{H : Type u_4}
[Group G]
[Mul H]
[MulAction G H]
[SMulCommClass G H H]
[IsScalarTower G H H]
{g : G}
{a b : H}


@[simp]
theorem seq_zero (f : FreeAbelianGroup (α → β)) : f <*> 0 = 0

{α β : Type u}
(f : FreeAbelianGroup (α → β))


@[simp]
theorem prod_snd_mk {α β : TypeVec n} (i : Fin2 n) (a : α i) (b : β i) :
    TypeVec.prod.snd i (prod.mk i a b) = b

{n : ℕ}
{α β : TypeVec.{u_1} n}
(i : Fin2 n)
(a : α i)
(b : β i)

TypeVec.prod.snd i (TypeVec.prod.mk i a b) = b


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

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

∀ (X_1 : CategoryTheory.Functor B C) {X_2 Y : CategoryTheory.Functor B D} (g : X_2 ⟶ Y) (X_3 : B),
  ((((CategoryTheory.whiskeringRight₂ B C D E).obj X).obj X_1).map g).app X_3 = (X.obj (X_1.obj X_3)).map (g.app X_3)


/-- A functor `F : C ⥤ D` sends binary bicones for `P` and `Q`
to binary bicones for `G.obj P` and `G.obj Q` functorially. -/
@[simps]
def functoriality : BinaryBicone P Q ⥤ BinaryBicone (F.obj P) (F.obj Q)

(A : CategoryTheory.Limits.BinaryBicone P Q)

((CategoryTheory.Limits.BinaryBicones.functoriality P Q F).obj A).snd = F.map A.snd


protected theorem le_iff_lt_or_eq {n m : Nat} : n ≤ m ↔ n < m ∨ n = m


theorem isPowerOfTwo_nextPowerOfTwo (n : Nat) : n.nextPowerOfTwo.isPowerOfTwo


lemma fac : f = eqToHom (domain_eq p f φ).symm ≫ p.map φ ≫ eqToHom (codomain_eq p f φ)

{𝒮 : Type u₁}
{𝒳 : Type u₂}
[CategoryTheory.Category.{v₁, u₂} 𝒳]
[CategoryTheory.Category.{v₂, u₁} 𝒮]
(p : 𝒳 ⥤ 𝒮)
{R S : 𝒮}
{a b : 𝒳}
(f : R ⟶ S)
(φ : a ⟶ b)
[p.IsHomLift f φ]

f = CategoryTheory.eqToHom ⋯ ≫ p.map φ ≫ CategoryTheory.eqToHom ⋯


theorem liftPropAt_of_mem_maximalAtlas [HasGroupoid M G] (hG : G.LocalInvariantProp G Q)
    (hQ : ∀ y, Q id univ y) (he : e ∈ maximalAtlas M G) (hx : x ∈ e.source) : LiftPropAt Q e x

(he : e ∈ StructureGroupoid.maximalAtlas M G)


@[simp]
lemma image_val_sUnion : ↑(⋃₀ T) = ⋃₀ { (B : Set α) | B ∈ T}

{α : Type u_2}
{A : Set α}
{T : Set (Set ↑A)}

Subtype.val '' ⋃₀ T = ⋃₀ {x | ∃ B ∈ T, Subtype.val '' B = x}


lemma imageHom_def [MulOneClass α] [MulOneClass β] (f : α →* β) (s : SetSemiring α) :
    imageHom f s = up (image f (down s))

{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulOneClass β]
(f : α →* β)
(s : SetSemiring α)

(SetSemiring.imageHom f) s = Set.up (⇑f '' SetSemiring.down s)


@[simp]
theorem nnabs_of_nonneg {x : ℝ} (h : 0 ≤ x) : nnabs x = toNNReal x


theorem inv_limsup {ι : Sort _} {x : ι → ℝ≥0∞} {l : Filter ι} :
    (limsup x l)⁻¹ = liminf (fun i => (x i)⁻¹) l

{ι : Type u_4}
{x : ι → ℝ≥0∞}
{l : Filter ι}

(Filter.limsup x l)⁻¹ = Filter.liminf (fun i => (x i)⁻¹) l


theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) :
    iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_2}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{n : ℕ}
{x : 𝕜}
{s : Set 𝕜}
(hx : x ∈ s)
(h : UniqueDiffOn 𝕜 s)
{f : 𝕜 → F}
(hn : 0 < n)
(c : F)


theorem Nontrivial.of_polynomial_ne (h : p ≠ q) : Nontrivial R

{R : Type u}
[Semiring R]
{p q : R[X]}
(h : p ≠ q)


theorem zeroLocus_subset_zeroLocus_iff (I J : Ideal R) :
    zeroLocus (I : Set R) ⊆ zeroLocus (J : Set R) ↔ J ≤ I.radical

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

PrimeSpectrum.zeroLocus ↑I ⊆ PrimeSpectrum.zeroLocus ↑J ↔ J ≤ I.radical


lemma isPiSystem_isClosed [TopologicalSpace α] : IsPiSystem ({s : Set α | IsClosed s})


theorem isPiSystem_Ioo (f : ι → α) (g : ι' → α) :
    @IsPiSystem α { S | ∃ l u, f l < g u ∧ Ioo (f l) (g u) = S }

{α : Type u_1}
{ι : Sort u_2}
{ι' : Sort u_3}
[LinearOrder α]
(f : ι → α)
(g : ι' → α)

IsPiSystem {S | ∃ l u, f l < g u ∧ Set.Ioo (f l) (g u) = S}


theorem gauge_unit_ball (x : E) : gauge (ball (0 : E) 1) x = ‖x‖

{E : Type u_2}
[SeminormedAddCommGroup E]
[NormedSpace ℝ E]
(x : E)


theorem natCast_val (n : ℕ) : (n : ℤ√d) = ⟨n, 0⟩


/-- Composition by continuous linear equivs on the left respects higher differentiability. -/
theorem ContinuousLinearEquiv.comp_contDiff_iff (e : F ≃L[𝕜] G) :
    ContDiff 𝕜 n (e ∘ f) ↔ ContDiff 𝕜 n f

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f : E → F}
{n : ℕ∞}
(e : F ≃L[𝕜] G)


/-- The equivalence between the category of elements `F.Elements`
    and the comma category `(*, F)`. -/
@[simps! functor_obj functor_map inverse_obj inverse_map unitIso_hom
  unitIso_inv counitIso_hom counitIso_inv]
def structuredArrowEquivalence : F.Elements ≌ StructuredArrow PUnit F

{C : Type u}
[CategoryTheory.Category.{v, u} C]
(F : CategoryTheory.Functor C (Type w))
{X Y : F.Elements}
(f : X ⟶ Y)

(CategoryTheory.CategoryOfElements.structuredArrowEquivalence F).functor.map f =
  CategoryTheory.StructuredArrow.homMk ↑f ⋯


theorem Abelian.tfae_epi {X Y : C} (f : X ⟶ Y) (Z : C ) :
    TFAE [Epi f, cokernel.π f = 0, (ShortComplex.mk f (0 : Y ⟶ Z) comp_zero).Exact]

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

[CategoryTheory.Epi f, CategoryTheory.Limits.cokernel.π f = 0, (CategoryTheory.ShortComplex.mk f 0 ⋯).Exact].TFAE


theorem dec_em' (p : Prop) [Decidable p] : ¬p ∨ p


@[to_additive]
theorem min_le_mul_of_one_le_left [CovariantClass α α (Function.swap (· * ·)) (· ≤ ·)] {a b : α}
    (ha : 1 ≤ a) : min a b ≤ a * b

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


/-- Any Finsupp `f : ℕ →₀ ℕ` whose support is in the primes is equal to the factorization of
the product `∏ (a : ℕ) ∈ f.support, a ^ f a`. -/
theorem prod_pow_factorization_eq_self {f : ℕ →₀ ℕ} (hf : ∀ p : ℕ, p ∈ f.support → Prime p) :
    (f.prod (· ^ ·)).factorization = f

{f : ℕ →₀ ℕ}
(hf : ∀ p ∈ f.support, Nat.Prime p)

(f.prod fun x x_1 => x ^ x_1).factorization = f


@[simp] theorem one_val : ↑(1 : unitaryGroup n α) = (1 : Matrix n n α)

{n : Type u}
[DecidableEq n]
[Fintype n]
{α : Type v}
[CommRing α]
[StarRing α]


theorem eventually_cofinite_ne (x : α) : ∀ᶠ a in cofinite, a ≠ x


theorem hasBasis_biInf_principal' {ι : Type*} {p : ι → Prop} {s : ι → Set α}
    (h : ∀ i, p i → ∀ j, p j → ∃ k, p k ∧ s k ⊆ s i ∧ s k ⊆ s j) (ne : ∃ i, p i) :
    (⨅ (i) (_ : p i), 𝓟 (s i)).HasBasis p s

(h : ∀ (i : ι), p i → ∀ (j : ι), p j → ∃ k, p k ∧ s k ⊆ s i ∧ s k ⊆ s j)

(⨅ i, ⨅ (_ : p i), 𝓟 (s i)).HasBasis p s


/-- Any morphism to an initial object is split epi. -/
theorem IsInitial.isSplitEpi_to {X Y : C} (t : IsInitial X) (f : Y ⟶ X) : IsSplitEpi f

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


lemma e_ne_zero (t : IsSl2Triple h e f) : e ≠ 0

{L : Type u_2}
[LieRing L]
{h e f : L}
(t : IsSl2Triple h e f)


/-- If the angle between three points is nonzero, the last two points are not equal. -/
theorem right_ne_of_oangle_ne_zero {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ ≠ 0) : p₃ ≠ p₂

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


theorem ae_nonneg_restrict_of_forall_setIntegral_nonneg_inter {f : α → ℝ} {t : Set α}
    (hf : IntegrableOn f t μ)
    (hf_zero : ∀ s, MeasurableSet s → μ (s ∩ t) < ∞ → 0 ≤ ∫ x in s ∩ t, f x ∂μ) :
    0 ≤ᵐ[μ.restrict t] f

(hf_zero : ∀ (s : Set α), MeasurableSet s → μ (s ∩ t) < ⊤ → 0 ≤ ∫ (x : α) in s ∩ t, f x ∂μ)


theorem fst_image_prod (s : Set β) {t : Set α} (ht : t.Nonempty) : Prod.fst '' s ×ˢ t = s

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


theorem closedEmbedding_of_pairwise_le_dist {α : Type*} [TopologicalSpace α] [DiscreteTopology α]
    {ε : ℝ} (hε : 0 < ε) {f : α → γ} (hf : Pairwise fun x y => ε ≤ dist (f x) (f y)) :
    ClosedEmbedding f


@[to_additive (attr := simp)]
theorem smul_set_singleton : a • ({b} : Set β) = {a • b}

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{a : α}
{b : β}


theorem approx_comp [TopologicalSpace β] [OrderClosedTopology β] [MeasurableSpace β]
    [OpensMeasurableSpace β] [MeasurableSpace γ] {i : ℕ → β} {f : γ → β} {g : α → γ} {n : ℕ} (a : α)
    (hf : Measurable f) (hg : Measurable g) :
    (approx i (f ∘ g) n : α →ₛ β) a = (approx i f n : γ →ₛ β) (g a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[MeasurableSpace α]
[SemilatticeSup β]
[OrderBot β]
[Zero β]
[TopologicalSpace β]
[OrderClosedTopology β]
[MeasurableSpace β]
[OpensMeasurableSpace β]
[MeasurableSpace γ]
{i : ℕ → β}
{f : γ → β}
{g : α → γ}
{n : ℕ}
(a : α)
(hf : Measurable f)
(hg : Measurable g)

↑(MeasureTheory.SimpleFunc.approx i (f ∘ g) n) a = ↑(MeasureTheory.SimpleFunc.approx i f n) (g a)