theorem le_fst_of_mem_enumFrom {x : ℕ × α} {n : ℕ} {l : List α} (h : x ∈ enumFrom n l) :
    n ≤ x.1

{α : Type u_1}
{x : ℕ × α}
{n : ℕ}
{l : List α}
(h : x ∈ List.enumFrom n l)


/-- If `f ≫ g` is a strong epimorphism, then so is `g`. -/
theorem strongEpi_of_strongEpi [StrongEpi (f ≫ g)] : StrongEpi g

[CategoryTheory.StrongEpi (CategoryTheory.CategoryStruct.comp f g)]


@[to_additive (attr := simp)]
theorem map_pure (f : α → β) (x) : (f <$> pure x : FreeMagma β) = pure (f x)


@[to_additive]
theorem iInter₂_smul_subset (s : ∀ i, κ i → Set α) (t : Set β) :
    (⋂ (i) (j), s i j) • t ⊆ ⋂ (i) (j), s i j • t

{α : Type u_2}
{β : Type u_3}
{ι : Sort u_5}
{κ : ι → Sort u_6}
[VAdd α β]
(s : (i : ι) → κ i → Set α)
(t : Set β)

(⋂ i, ⋂ j, s i j) +ᵥ t ⊆ ⋂ i, ⋂ j, s i j +ᵥ t


@[norm_cast] -- Porting note (#10618): Removed simp attribute, simp can prove this
theorem coe_inj {f g : MultilinearMap R M₁ M₂} : (f : (∀ i, M₁ i) → M₂) = g ↔ f = g

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


@[simp]
theorem dual_comp (g : β →o γ) (f : α →o β) :
    OrderHom.dual (g.comp f) = (OrderHom.dual g).comp (OrderHom.dual f)

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


theorem biInter_lt_succ (u : ℕ → Set α) (n : ℕ) : ⋂ k < n + 1, u k = (⋂ k < n, u k) ∩ u n


theorem Lex.mono_left (hr : ∀ a b, r₁ a b → r₂ a b) {a b : Σ i, α i} (h : Lex r₁ s a b) :
    Lex r₂ s a b

{ι : Type u_1}
{α : ι → Type u_2}
{r₁ r₂ : ι → ι → Prop}
{s : (i : ι) → α i → α i → Prop}
(hr : ∀ (a b : ι), r₁ a b → r₂ a b)
{a b : (i : ι) × α i}
(h : Sigma.Lex r₁ s a b)


lemma eqOn_of_cfcₙ_eq_cfcₙ {f g : R → R} {a : A} (h : cfcₙ f a = cfcₙ g a) (ha : p a := by cfc_tac)
    (hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac) (hf0 : f 0 = 0 := by cfc_zero_tac)
    (hg : ContinuousOn g (σₙ R a) := by cfc_cont_tac) (hg0 : g 0 = 0 := by cfc_zero_tac) :
    (σₙ R a).EqOn f g


theorem nadd_lt_nadd_of_lt_of_le : ∀ {a b c d}, a < b → c ≤ d → a ♯ c < b ♯ d


theorem isMax_iterate_succ_of_eq_of_lt {n m : ℕ} (h_eq : succ^[n] a = succ^[m] a)
    (h_lt : n < m) : IsMax (succ^[n] a)

(h_eq : Order.succ^[n] a = Order.succ^[m] a)


private theorem real_prop (r : ℝ) : innerProp' E (r : 𝕜)

{𝕜 : Type u_1}
[RCLike 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[InnerProductSpaceable E]
(r : ℝ)


theorem map_lift (P₀ : Path x₀ x₁) (f : C(X, Y)) : ⟦P₀.map f.continuous⟧ = Quotient.mapFn ⟦P₀⟧ f

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{x₀ x₁ : X}
(P₀ : Path x₀ x₁)
(f : C(X, Y))

⟦P₀.map ⋯⟧ = Path.Homotopic.Quotient.mapFn ⟦P₀⟧ f


@[simp]
theorem kerase_cons_eq {a} {s : Sigma β} {l : List (Sigma β)} (h : a = s.1) :
    kerase a (s :: l) = l

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{s : Sigma β}
{l : List (Sigma β)}
(h : a = s.fst)


@[to_additive add_left_addIndex_le]
theorem mul_left_index_le {K : Set G} (hK : IsCompact K) {V : Set G} (hV : (interior V).Nonempty)
    (g : G) : index ((fun h => g * h) '' K) V ≤ index K V

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
{K : Set G}
(hK : IsCompact K)
{V : Set G}
(hV : (interior V).Nonempty)
(g : G)

MeasureTheory.Measure.haar.addIndex ((fun h => g + h) '' K) V ≤ MeasureTheory.Measure.haar.addIndex K V


/-- If a property of maps of topological spaces is satisfied by all homeomorphisms,
every isomorphism of schemes satisfies the induced property. -/
lemma topologically_iso_le
    (hP : ∀ {α β : Type u} [TopologicalSpace α] [TopologicalSpace β] (f : α ≃ₜ β), P f) :
    MorphismProperty.isomorphisms Scheme ≤ (topologically P)

(P : {α β : Type u} → [inst : TopologicalSpace α] → [inst : TopologicalSpace β] → (α → β) → Prop)

(hP : ∀ {α β : Type u} [inst : TopologicalSpace α] [inst_1 : TopologicalSpace β] (f : α ≃ₜ β), P ⇑f)

CategoryTheory.MorphismProperty.isomorphisms AlgebraicGeometry.Scheme ≤
  AlgebraicGeometry.topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => P


lemma preperfect_iff_subset_derivedSet {U : Set X} : Preperfect U ↔ U ⊆ derivedSet U

{X : Type u_1}
[TopologicalSpace X]
{U : Set X}


@[simp low+1]
theorem vsub_singleton (s : Set β) (b : β) : s -ᵥ {b} = (· -ᵥ b) '' s

{α : Type u_2}
{β : Type u_3}
[VSub α β]
(s : Set β)
(b : β)


@[simp]
theorem rank_self_mul_transpose (A : Matrix m n R) : (A * Aᵀ).rank = A.rank

{m : Type u_2}
{n : Type u_3}
{R : Type u_5}
[Fintype n]
[Fintype m]
[LinearOrderedField R]
(A : Matrix m n R)


@[simp]
theorem sbtw_vsub_const_iff {x y z : P} (p : P) :
    Sbtw R (x -ᵥ p) (y -ᵥ p) (z -ᵥ p) ↔ Sbtw R x y z

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


@[simp]
theorem lineMap_vsub_right (p₀ p₁ : P1) (c : k) : lineMap p₀ p₁ c -ᵥ p₁ = (1 - c) • (p₀ -ᵥ p₁)

{k : Type u_1}
{V1 : Type u_2}
{P1 : Type u_3}
[Ring k]
[AddCommGroup V1]
[Module k V1]
[AffineSpace V1 P1]
(p₀ p₁ : P1)
(c : k)

(AffineMap.lineMap p₀ p₁) c -ᵥ p₁ = (1 - c) • (p₀ -ᵥ p₁)


theorem not_mem_append {a : α} {s t : List α} (h₁ : a ∉ s) (h₂ : a ∉ t) : a ∉ s ++ t

{α : Type u_1}
{a : α}
{s t : List α}
(h₁ : ¬a ∈ s)
(h₂ : ¬a ∈ t)


@[simp]
lemma coe_sSup {S : Set (Closeds α)} : ((sSup S : Closeds α) : Set α) =
    closure (⋃₀ ((↑) '' S))

{α : Type u_2}
[TopologicalSpace α]
{S : Set (TopologicalSpace.Closeds α)}

↑(sSup S) = closure (⋃₀ (SetLike.coe '' S))


@[to_additive (attr := simp)]
theorem mul_right_iterate : (· * a)^[n] = (· * a ^ n)

{G : Type u_3}
[AddMonoid G]
(a : G)
(n : ℕ)

(fun x => x + a)^[n] = fun x => x + n • a


theorem inv_map_iSup {ι : Sort*} {x : ι → ℝ≥0∞} : (iSup x)⁻¹ = ⨅ i, (x i)⁻¹


theorem continuousAt_extend [T3Space γ] {b : β} {f : α → γ} (di : DenseInducing i)
    (hf : ∀ᶠ x in 𝓝 b, ∃ c, Tendsto f (comap i <| 𝓝 x) (𝓝 c)) : ContinuousAt (di.extend f) b

(hf : ∀ᶠ (x : β) in 𝓝 b, ∃ c, Filter.Tendsto f (Filter.comap i (𝓝 x)) (𝓝 c))


protected theorem Ordered.setBlack {t : RBNode α} : (setBlack t).Ordered cmp ↔ t.Ordered cmp

{α : Type u_1}
{cmp : α → α → Ordering}
{t : Batteries.RBNode α}

Batteries.RBNode.Ordered cmp t.setBlack ↔ Batteries.RBNode.Ordered cmp t


theorem continuousOn_id {s : Set α} : ContinuousOn id s

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


theorem equiv'_symm_toAlgHom (h₁ : aeval (root g) (minpoly R pb.gen) = 0)
    (h₂ : aeval pb.gen g = 0) : (equiv' g pb h₁ h₂).symm.toAlgHom = pb.lift (root g) h₁

(h₁ : (Polynomial.aeval (AdjoinRoot.root g)) (minpoly R pb.gen) = 0)

↑(AdjoinRoot.equiv' g pb h₁ h₂).symm = pb.lift (AdjoinRoot.root g) h₁


theorem nullMeasurableSet_eq_fun {E} [TopologicalSpace E] [MetrizableSpace E] {f g : α → E}
    (hf : AEStronglyMeasurable f μ) (hg : AEStronglyMeasurable g μ) :
    NullMeasurableSet { x | f x = g x } μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.NullMeasurableSet {x | f x = g x} μ


@[simp]
theorem IsTerminal.from_self {X : C} (t : IsTerminal X) : t.from X = 𝟙 X

(t : CategoryTheory.Limits.IsTerminal X)


/-- The functor which sends a triangle `X ⟶ Y ⟶ Z ⟶ X⟦1⟧` in `C` to the triangle
`op Z ⟶ op Y ⟶ op X ⟶ (op Z)⟦1⟧` in `Cᵒᵖ` (without introducing signs). -/
@[simps]
noncomputable def functor : (Triangle C)ᵒᵖ ⥤ Triangle Cᵒᵖ

{T₁ T₂ : (CategoryTheory.Pretriangulated.Triangle C)ᵒᵖ}

((CategoryTheory.Pretriangulated.TriangleOpEquivalence.functor C).map φ).hom₂ = φ.unop.hom₂.op


@[simp]
theorem mirror_inj : p.mirror = q.mirror ↔ p = q

{R : Type u_1}
[Semiring R]
{p q : Polynomial R}


@[simp]
theorem lift_apply_inr (f : R →ₐ[S] A) (g : M →ₗ[S] A)
    (hg : ∀ x y, g x * g y = 0)
    (hfg : ∀ r x, g (r •> x) = f r * g x)
    (hgf : ∀ r x, g (x <• r) = g x * f r)
    (m : M) :
    lift f g hg hfg hgf (inr m) = g m

(hfg : ∀ (r : R) (x : M), g (r •> x) = f r * g x)

(hgf : ∀ (r : R) (x : M), g (x <• r) = g x * f r)

(TrivSqZeroExt.lift f g hg hfg hgf) (TrivSqZeroExt.inr m) = g m


theorem toNat_le_toNat {b₀ b₁ : Bool} (h : b₀ ≤ b₁) : toNat b₀ ≤ toNat b₁


/-- Postcomposing by a monomorphism does not change the kernel subobject. -/
@[simp]
theorem kernelSubobject_comp_mono (f : X ⟶ Y) [HasKernel f] {Z : C} (h : Y ⟶ Z) [Mono h] :
    kernelSubobject (f ≫ h) = kernelSubobject f

CategoryTheory.Limits.kernelSubobject (f ≫ h) = CategoryTheory.Limits.kernelSubobject f


@[fun_prop]
theorem DifferentiableOn.mul (ha : DifferentiableOn 𝕜 a s) (hb : DifferentiableOn 𝕜 b s) :
    DifferentiableOn 𝕜 (fun y => a y * b y) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{s : Set E}
{𝔸 : Type u_6}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{a b : E → 𝔸}
(ha : DifferentiableOn 𝕜 a s)
(hb : DifferentiableOn 𝕜 b s)


theorem image_comm {β'} [DecidableEq β'] [DecidableEq γ] {f : β → γ} {g : α → β} {f' : α → β'}
    {g' : β' → γ} (h_comm : ∀ a, f (g a) = g' (f' a)) :
    (s.image g).image f = (s.image f').image g'

Finset.image f (Finset.image g s) = Finset.image g' (Finset.image f' s)


theorem le_sup'_of_le {a : α} {b : β} (hb : b ∈ s) (h : a ≤ f b) : a ≤ s.sup' ⟨b, hb⟩ f

{α : Type u_2}
{β : Type u_3}
[SemilatticeSup α]
{s : Finset β}
(f : β → α)
{a : α}
{b : β}
(hb : b ∈ s)
(h : a ≤ f b)


/-- Formula for `completedSinZeta` as a Dirichlet series in the convergence range
(second version, with sum over `ℕ`). -/
lemma hasSum_nat_completedSinZeta (a : ℝ) {s : ℂ} (hs : 1 < re s) :
    HasSum (fun n : ℕ ↦ Gammaℝ (s + 1) * Real.sin (2 * π * a * n) / (n : ℂ) ^ s)
    (completedSinZeta a s)

HasSum (fun n => (s + 1).Gammaℝ * ↑(Real.sin (2 * π * a * ↑n)) / ↑n ^ s) (HurwitzZeta.completedSinZeta (↑a) s)


@[simp]
theorem eq_empty_iff {n m : ℕ} : Ico n m = [] ↔ m ≤ n


lemma map_add (f₁ f₂ : X ⟶ Y) :
    letI := addCommGroup L W (L.obj X) (L.obj Y)
    L.map (f₁ + f₂) = L.map f₁ + L.map f₂

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Preadditive C]
(L : CategoryTheory.Functor C D)
(W : CategoryTheory.MorphismProperty C)
[L.IsLocalization W]
[W.HasLeftCalculusOfFractions]
{X Y : C}
(f₁ f₂ : X ⟶ Y)


@[simp] lemma cast_eq_zero : (n : α) = 0 ↔ n = 0

{α : Type u_3}
[AddGroupWithOne α]
[CharZero α]
{n : ℤ}


@[simp]
theorem toNNReal_zero : Real.toNNReal 0 = 0


@[simp] theorem UInt8.val_ofNat (n) :
    (no_index (OfNat.ofNat n) : UInt8).val = OfNat.ofNat n


theorem gcd_mul_right (m n k : Nat) : gcd (m * n) (k * n) = gcd m k * n


/-- The elliptic curve over `R` induced by an admissible linear change of variables
$(X, Y) \mapsto (u^2X + r, u^3Y + u^2sX + t)$ for some $u \in R^\times$ and some $r, s, t \in R$.
When `R` is a field, any two Weierstrass equations isomorphic to `E` are related by this. -/
@[simps (config := { rhsMd := .default }) a₁ a₂ a₃ a₄ a₆ Δ' toWeierstrassCurve]
def variableChange : EllipticCurve R

{R : Type u}
[CommRing R]
(E : EllipticCurve R)
(C : WeierstrassCurve.VariableChange R)

(E.variableChange C).Δ' = C.u⁻¹ ^ 12 * E.Δ'


@[simp]
theorem AlgHom.card_of_splits (L : Type*) [Field L] [Algebra F L]
    (hL : ∀ x : E, (minpoly F x).Splits (algebraMap F L)) :
    Fintype.card (E →ₐ[F] L) = finrank F E

(hL : ∀ (x : E), Polynomial.Splits (algebraMap F L) (minpoly F x))

Fintype.card (E →ₐ[F] L) = FiniteDimensional.finrank F E


@[to_additive]
lemma orbit_subgroup_subset (H : Subgroup G) (a : α) : orbit H a ⊆ orbit G a

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
(H : Subgroup G)
(a : α)

MulAction.orbit (↥H) a ⊆ MulAction.orbit G a


lemma completedHurwitzZetaEven₀_neg (a : UnitAddCircle) (s : ℂ) :
    completedHurwitzZetaEven₀ (-a) s = completedHurwitzZetaEven₀ a s

HurwitzZeta.completedHurwitzZetaEven₀ (-a) s = HurwitzZeta.completedHurwitzZetaEven₀ a s


theorem restrictScalars_apply (f : A ≃ₐ[S] B) (x : A) : f.restrictScalars R x = f x

(R : Type u)
{S : Type v}
{A : Type w}
{B : Type u₁}
[CommSemiring R]
[CommSemiring S]
[Semiring A]
[Semiring B]
[Algebra R S]
[Algebra S A]
[Algebra S B]
[Algebra R A]
[Algebra R B]
[IsScalarTower R S A]
[IsScalarTower R S B]
(f : A ≃ₐ[S] B)
(x : A)


@[simp]
theorem map_add' : ∀ (x y : R), v x ≤ v (x + y) ∨ v y ≤ v (x + y)

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(v : AddValuation R Γ₀)
(x y : R)


@[to_additive (attr := simp)]
theorem curry_inv [∀ a b, Inv (γ a b)] (x : (i : Σ a, β a) → γ i.1 i.2) :
    Sigma.curry (x⁻¹) = (Sigma.curry x)⁻¹

(x : (i : (a : α) × β a) → γ i.fst i.snd)


@[to_additive]
theorem mulEquivOfLocalizations_left_inv (k : N ≃* P) :
    f.mulEquivOfLocalizations (f.ofMulEquivOfLocalizations k) = k

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{P : Type u_3}
[CommMonoid P]
(f : S.LocalizationMap N)
(k : N ≃* P)


lemma sq_eq_sq_iff_eq_or_eq_neg : a ^ 2 = b ^ 2 ↔ a = b ∨ a = -b

{R : Type x}
[CommRing R]
[NoZeroDivisors R]
{a b : R}


/--
The sieve `S` is in the topology iff its closure is the maximal sieve. This shows that the closure
operator determines the topology.
-/
theorem close_eq_top_iff_mem {X : C} (S : Sieve X) : J₁.close S = ⊤ ↔ S ∈ J₁ X

(J₁ : CategoryTheory.GrothendieckTopology C)


theorem replicate_le_coe {a : α} {n} {l : List α} : replicate n a ≤ l ↔ List.replicate n a <+ l

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

Multiset.replicate n a ≤ ↑l ↔ List.replicate n a <+ l


@[simp] theorem map_replicate : (replicate n a).map f = replicate n (f a)

∀ {α : Type u_1} {a : α} {α_1 : Type u_2} {f : α → α_1}, List.map f (List.replicate n a) = List.replicate n (f a)


theorem NeBot.nonempty_of_mem {f : Filter α} (hf : NeBot f) {s : Set α} (hs : s ∈ f) : s.Nonempty

{α : Type u}
{f : Filter α}
(hf : f.NeBot)
{s : Set α}
(hs : s ∈ f)


/-- A monic polynomial over a field `F` of exponential characteristic `q` has separable degree one
if and only if it is of the form `(X ^ (q ^ n) - C y) ^ m` for some non-zero natural number `m`,
some natural number `n`, and some element `y` of `F`. -/
theorem natSepDegree_eq_one_iff (q : ℕ) [ExpChar F q] (hm : f.Monic) :
    f.natSepDegree = 1 ↔ ∃ (m n : ℕ) (y : F), m ≠ 0 ∧ f = (X ^ q ^ n - C y) ^ m

{F : Type u}
[Field F]
{f : F[X]}
(q : ℕ)
[ExpChar F q]
(hm : f.Monic)

f.natSepDegree = 1 ↔ ∃ m n y, m ≠ 0 ∧ f = (Polynomial.X ^ q ^ n - Polynomial.C y) ^ m


/-- Given f : Y ⟶ X, this is the obvious functor from T/Y to (T/X)/f -/
@[simps]
def iteratedSliceBackward : Over f.left ⥤ Over f

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

∀ {X_1 Y : CategoryTheory.Over f.left} (α : X_1 ⟶ Y),
  f.iteratedSliceBackward.map α = CategoryTheory.Over.homMk (CategoryTheory.Over.homMk α.left ⋯) ⋯


@[to_additive] lemma zpow_zpow (h : Commute a b) (m n : ℤ) : Commute (a ^ m) (b ^ n)

{G : Type u_1}
[AddGroup G]
{a b : G}
(h : AddCommute a b)
(m n : ℤ)


/-- Reindexing a family of categories gives equivalent `Pi` categories. -/
@[simps]
noncomputable def Pi.equivalenceOfEquiv (e : J ≃ I) :
    (∀ j, C (e j)) ≌ (∀ i, C i)

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

(CategoryTheory.Pi.equivalenceOfEquiv C e).counitIso =
  CategoryTheory.NatIso.pi' fun i =>
    ((CategoryTheory.Functor.pi' fun i' => CategoryTheory.Pi.eval C (e i')).associator
          (CategoryTheory.Pi.eval (fun j => C (e j)) (e.symm i))
          (CategoryTheory.Pi.eqToEquivalence C ⋯).functor).symm ≪≫
      CategoryTheory.isoWhiskerRight
          (CategoryTheory.Functor.pi'CompEval (fun i' => CategoryTheory.Pi.eval C (e i')) (e.symm i))
          (CategoryTheory.Pi.eqToEquivalence C ⋯).functor ≪≫
        CategoryTheory.Pi.evalCompEqToEquivalenceFunctor C ⋯ ≪≫ (CategoryTheory.Pi.eval C i).leftUnitor.symm


@[simp]
theorem BinaryFan.π_app_right {X Y : C} (s : BinaryFan X Y) : s.π.app ⟨WalkingPair.right⟩ = s.snd

(s : CategoryTheory.Limits.BinaryFan X Y)

s.π.app { as := CategoryTheory.Limits.WalkingPair.right } = s.snd


theorem Set.Subsingleton.closure [T1Space X] {s : Set X} (hs : s.Subsingleton) :
    (closure s).Subsingleton

{X : Type u_1}
[TopologicalSpace X]
[T1Space X]
{s : Set X}
(hs : s.Subsingleton)


@[simp]
theorem valuation_apply (r : R) : v.valuation r = Multiplicative.ofAdd (OrderDual.toDual (v r))

{R : Type u_3}
{Γ₀ : Type u_4}
[Ring R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(v : AddValuation R Γ₀)
(r : R)


protected theorem _root_.Eq.sameCycle (h : x = y) (f : Perm α) : f.SameCycle x y

{α : Type u_2}
{x y : α}
(h : x = y)
(f : Equiv.Perm α)


@[simp] theorem house_intCast (x : ℤ) : house (x : K) = |x|

{K : Type u_1}
[Field K]
[NumberField K]
(x : ℤ)


@[simp]
theorem constantCoeff_inv (φ : k⟦X⟧) : constantCoeff k φ⁻¹ = (constantCoeff k φ)⁻¹

{k : Type u_2}
[Field k]
(φ : PowerSeries k)

(PowerSeries.constantCoeff k) φ⁻¹ = ((PowerSeries.constantCoeff k) φ)⁻¹


theorem IsSubordinate.mono' [Fintype ι] {π : TaggedPrepartition I} (hr₁ : π.IsSubordinate r₁)
    (h : ∀ J ∈ π, r₁ (π.tag J) ≤ r₂ (π.tag J)) : π.IsSubordinate r₂


/-- Every Cauchy sequence over `ℕ` is totally bounded. -/
theorem CauchySeq.totallyBounded_range {s : ℕ → α} (hs : CauchySeq s) :
    TotallyBounded (range s)

{α : Type u}
[uniformSpace : UniformSpace α]
{s : ℕ → α}
(hs : CauchySeq s)


theorem derivative_succ (n ν : ℕ) : Polynomial.derivative (bernsteinPolynomial R n (ν + 1)) =
    n * (bernsteinPolynomial R (n - 1) ν - bernsteinPolynomial R (n - 1) (ν + 1))

Polynomial.derivative (bernsteinPolynomial R n (ν + 1)) =
  ↑n * (bernsteinPolynomial R (n - 1) ν - bernsteinPolynomial R (n - 1) (ν + 1))


@[ext]
theorem ext {f g : Ring.Perfection R p} (h : ∀ n, coeff R p n f = coeff R p n g) : f = g

(h : ∀ (n : ℕ), (Perfection.coeff R p n) f = (Perfection.coeff R p n) g)


/-- **Tietze extension theorem** for real-valued bounded continuous maps, a version for a closed
set. If `f` is a bounded continuous real-valued function defined on a closed set in a normal
topological space, then it can be extended to a bounded continuous function of the same norm defined
on the whole space. -/
theorem exists_norm_eq_restrict_eq_of_closed {s : Set Y} (f : s →ᵇ ℝ) (hs : IsClosed s) :
    ∃ g : Y →ᵇ ℝ, ‖g‖ = ‖f‖ ∧ g.restrict s = f

{Y : Type u_2}
[TopologicalSpace Y]
[NormalSpace Y]
{s : Set Y}
(f : ↑s →ᵇ ℝ)
(hs : IsClosed s)


@[refl]
theorem specializes_refl (x : X) : x ⤳ x

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


theorem gcd_cons_div_right' : (gcd (x::xs) : Int) ∣ (gcd xs : Int)

↑(Lean.Omega.IntList.gcd (x :: xs)) ∣ ↑(Lean.Omega.IntList.gcd xs)


@[to_additive]
theorem comp_mul_le (f g : F →* E) : p.comp (f * g) ≤ p.comp f + p.comp g

{E : Type u_4}
{F : Type u_5}
[CommGroup E]
[CommGroup F]
(p : GroupSeminorm E)
(f g : F →* E)


@[simp] theorem cond_false_right : ∀(c t : Bool), cond c t false = ( c && t)


/--
The regular sheaf condition can be checked after precomposing with the equivalence.
-/
theorem preregular_isSheaf_iff (F : Cᵒᵖ ⥤ A) : haveI := e.preregular
    IsSheaf (regularTopology C) F ↔ IsSheaf (regularTopology D) (e.inverse.op ⋙ F)

{C : Type u_1}
[CategoryTheory.Category.{u_4, u_1} C]
{D : Type u_2}
[CategoryTheory.Category.{u_6, u_2} D]
(e : C ≌ D)
[CategoryTheory.Preregular C]
(A : Type u_3)
[CategoryTheory.Category.{u_5, u_3} A]
(F : CategoryTheory.Functor Cᵒᵖ A)

CategoryTheory.Presheaf.IsSheaf (CategoryTheory.regularTopology C) F ↔
  CategoryTheory.Presheaf.IsSheaf (CategoryTheory.regularTopology D) (e.inverse.op.comp F)


@[to_additive (attr := simp)]
theorem stabilizer_quotient {G} [Group G] (H : Subgroup G) :
    MulAction.stabilizer G ((1 : G) : G ⧸ H) = H

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


protected theorem add_lt_add_right [LT α] [CovariantClass α α (swap (· + ·)) (· < ·)] (ha : a ≠ ⊤)
    (h : b < c) : b + a < c + a

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


theorem Filter.EventuallyEq.eq_of_nhdsWithin {s : Set α} {f g : α → β} {a : α} (h : f =ᶠ[𝓝[s] a] g)
    (hmem : a ∈ s) : f a = g a

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
{s : Set α}
{f g : α → β}
{a : α}
(h : f =ᶠ[𝓝[s] a] g)
(hmem : a ∈ s)


@[simp, rclike_simps]
theorem imCLM_apply : ((imCLM : K →L[ℝ] ℝ) : K → ℝ) = im


@[to_additive]
lemma not_isCyclic : ¬ IsCyclic G

{G : Type u_1}
[AddGroup G]
[IsAddKleinFour G]


/-- The separable degree of any field extension `E / F` divides the degree of `E / F`. -/
theorem finSepDegree_dvd_finrank : finSepDegree F E ∣ finrank F E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]

Field.finSepDegree F E ∣ FiniteDimensional.finrank F E


/-- The unit isomorphism of the
equivalence `triangleOpEquivalence C : (Triangle C)ᵒᵖ ≌ Triangle Cᵒᵖ` . -/
@[simps!]
noncomputable def unitIso : 𝟭 _ ≅ functor C ⋙ inverse C

(X : (CategoryTheory.Pretriangulated.Triangle C)ᵒᵖ)

(CategoryTheory.Pretriangulated.TriangleOpEquivalence.unitIso C).inv.app X =
  ((Opposite.unop X).homMk
      (CategoryTheory.Pretriangulated.Triangle.mk (Opposite.unop X).mor₁ (Opposite.unop X).mor₂
        (CategoryTheory.CategoryStruct.comp
          ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C 1).unitIso.inv.app
              (Opposite.op (Opposite.unop X).obj₃)).unop
          ((CategoryTheory.shiftFunctor C 1).map
            (CategoryTheory.CategoryStruct.comp ((CategoryTheory.shiftFunctor Cᵒᵖ 1).map (Opposite.unop X).mor₃.op).unop
              ((CategoryTheory.Pretriangulated.opShiftFunctorEquivalence C 1).counitIso.inv.app
                  (Opposite.op (Opposite.unop X).obj₁)).unop))))
      (CategoryTheory.CategoryStruct.id (Opposite.unop X).obj₁)
      (CategoryTheory.CategoryStruct.id (Opposite.unop X).obj₂)
      (CategoryTheory.CategoryStruct.id (Opposite.unop X).obj₃) ⋯ ⋯ ⋯).op


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

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


@[simp]
theorem smul_re [SMul S R] (s : S) : (s • a).re = s • a.re

{S : Type u_1}
{R : Type u_3}
[CommRing R]
(a : ℍ[R])
[SMul S R]
(s : S)


@[simp] lemma infIrredUpperSet_apply (a : α) : infIrredUpperSet a = ⟨Ici a, infIrred_Ici _⟩

{α : Type u_1}
[PartialOrder α]
[Finite α]
(a : α)

OrderIso.infIrredUpperSet a = ⟨UpperSet.Ici a, ⋯⟩


theorem finrank_sup_eq_finrank_right_mul_finrank_of_free :
    finrank R ↥(A ⊔ B) = finrank R B * finrank B (Algebra.adjoin B (A : Set S))

[Module.Free ↥B ↥(Algebra.adjoin ↥B ↑A)]

FiniteDimensional.finrank R ↥(A ⊔ B) =
  FiniteDimensional.finrank R ↥B * FiniteDimensional.finrank ↥B ↥(Algebra.adjoin ↥B ↑A)


@[to_additive (attr := simp, norm_cast)]
theorem coe_sInf (H : Set (Subgroup G)) : ((sInf H : Subgroup G) : Set G) = ⋂ s ∈ H, ↑s

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


theorem extLit {n : Nat}
    (a b : Array α)
    (hsz₁ : a.size = n) (hsz₂ : b.size = n)
    (h : (i : Nat) → (hi : i < n) → a.getLit i hsz₁ hi = b.getLit i hsz₂ hi) : a = b

(h : ∀ (i : Nat) (hi : i < n), a.getLit i hsz₁ hi = b.getLit i hsz₂ hi)


theorem Icc_mem_nhdsSet_Ico (h : a < b) (h' : c ≤ d) : Icc a d ∈ 𝓝ˢ (Ico b c)

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b c d : α}
(h : a < b)
(h' : c ≤ d)


theorem sdiff_inter_distrib_right (s t u : Finset α) : s \ (t ∩ u) = s \ t ∪ s \ u

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


theorem Fintype.card_perm [Fintype α] : Fintype.card (Perm α) = (Fintype.card α)!

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

Fintype.card (Equiv.Perm α) = (Fintype.card α)!


theorem eventuallyEq_one (x : X) (hx : x ∈ s) : f (f.ind x hx) =ᶠ[𝓝 x] 1

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


theorem derivWithin_cexp (hf : DifferentiableWithinAt 𝕜 f s x) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    derivWithin (fun x => Complex.exp (f x)) s x = Complex.exp (f x) * derivWithin f s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 ℂ]
{f : 𝕜 → ℂ}
{x : 𝕜}
{s : Set 𝕜}
(hf : DifferentiableWithinAt 𝕜 f s x)
(hxs : UniqueDiffWithinAt 𝕜 s x)


theorem Stable.of_le [IsNoetherianRing R] [Module.Finite R M] (hF : F.Stable)
    {F' : I.Filtration M} (hf : F' ≤ F) : F'.Stable

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
{F : I.Filtration M}
[IsNoetherianRing R]
[Module.Finite R M]
(hF : F.Stable)
{F' : I.Filtration M}
(hf : F' ≤ F)


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

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

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


/-- The functor `(Φ.LeftResolution X₂)ᵒᵖ ⥤ Φ.op.RightResolution (Opposite.op X₂)`. -/
@[simps]
def LeftResolution.opFunctor (X₂ : C₂) [W₁.IsMultiplicative] :
    (Φ.LeftResolution X₂)ᵒᵖ ⥤ Φ.op.RightResolution (Opposite.op X₂)

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(Φ : CategoryTheory.LocalizerMorphism W₁ W₂)

(CategoryTheory.LocalizerMorphism.LeftResolution.opFunctor Φ X₂).obj L = (Opposite.unop L).op


@[deprecated getElem_eq_data_getElem (since := "2024-06-12")]
theorem getElem_eq_data_get (a : Array α) (h : i < a.size) : a[i] = a.data.get ⟨i, h⟩

{α : Type u_1}
{i : Nat}
(a : Array α)
(h : i < a.size)


theorem not_coprime_zero_zero : ¬Coprime 0 0


@[to_additive (attr := simp)]
theorem pow_left (h : Commute a b) (n : ℕ) : Commute (a ^ n) b

{M : Type u_2}
[Monoid M]
{a b : M}
(h : Commute a b)
(n : ℕ)


theorem toPMF_eq_iff_toMeasure_eq (μ : Measure α) [IsProbabilityMeasure μ] :
    μ.toPMF = p ↔ μ = p.toMeasure

{α : Type u_1}
[Countable α]
[MeasurableSpace α]
[MeasurableSingletonClass α]
(p : PMF α)
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsProbabilityMeasure μ]


@[reassoc]
lemma mapComp_id_right_inv (f : a ⟶ b) : (F.mapComp f (𝟙 b)).inv =
    F.map f ◁ (F.mapId b).hom ≫ (ρ_ (F.map f)).hom ≫ F.map₂ (ρ_ f).inv

{B : Type u₁}
[CategoryTheory.Bicategory B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : CategoryTheory.Pseudofunctor B C)
{a b : B}
(f : a ⟶ b)

(F.mapComp f (CategoryTheory.CategoryStruct.id b)).inv =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.whiskerLeft (F.map f) (F.mapId b).hom)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.rightUnitor (F.map f)).hom
      (F.map₂ (CategoryTheory.Bicategory.rightUnitor f).inv))


/-- `stdSimplex 𝕜 ι` is the convex hull of the canonical basis in `ι → 𝕜`. -/
theorem convexHull_basis_eq_stdSimplex :
    convexHull R (range fun i j : ι => if i = j then (1 : R) else 0) = stdSimplex R ι

{R : Type u_1}
(ι : Type u_5)
[LinearOrderedField R]
[Fintype ι]

(convexHull R) (Set.range fun i j => if i = j then 1 else 0) = stdSimplex R ι


/-- The product σ-algebra is generated from boxes, i.e. `s ×ˢ t` for sets `s : set α` and
  `t : set β`. -/
theorem generateFrom_pi [∀ i, MeasurableSpace (α i)] :
    generateFrom (pi univ '' pi univ fun i => { s : Set (α i) | MeasurableSet s }) =
      MeasurableSpace.pi

{ι : Type u_1}
{α : ι → Type u_3}
[Finite ι]
[(i : ι) → MeasurableSpace (α i)]

MeasurableSpace.generateFrom (Set.univ.pi '' Set.univ.pi fun i => {s | MeasurableSet s}) = MeasurableSpace.pi


@[to_additive (attr := simp)]
theorem prod_val [CommMonoid α] (s : Finset α) : s.1.prod = s.prod id

{α : Type u_3}
[AddCommMonoid α]
(s : Finset α)


@[to_additive (attr := simp)]
theorem bot_subgroupOf : (⊥ : Subgroup G).subgroupOf H = ⊥

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


/-- The equivalence between `SemilatSupCat` and `SemilatInfCat` induced by `OrderDual` both ways. -/
@[simps functor inverse]
def SemilatSupCatEquivSemilatInfCat : SemilatSupCat ≌ SemilatInfCat


@[to_additive]
theorem ContMDiff.inv {f : M → G} (hf : ContMDiff I' I n f) : ContMDiff I' I n fun x => (f x)⁻¹

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[TopologicalSpace G]
[ChartedSpace H G]
[Group G]
[LieGroup I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{n : ℕ∞}
{f : M → G}
(hf : ContMDiff I' I n f)


@[simp]
theorem vecMul_vecMul [Fintype n] [Fintype m] (v : m → α) (M : Matrix m n α) (N : Matrix n o α) :
    v ᵥ* M ᵥ* N = v ᵥ* (M * N)

{m : Type u_2}
{n : Type u_3}
{o : Type u_4}
{α : Type v}
[NonUnitalSemiring α]
[Fintype n]
[Fintype m]
(v : m → α)
(M : Matrix m n α)
(N : Matrix n o α)


@[simp, norm_cast]
theorem cast_zero : ((0 : ℚ) : α) = 0


@[simp, reassoc]
theorem braiding_inv_tensor_right (X Y Z : C) :
    (β_ X (Y ⊗ Z)).inv  =
      (α_ Y Z X).hom ≫ Y ◁ (β_ X Z).inv ≫ (α_ Y X Z).inv ≫
        (β_ X Y).inv ▷ Z ≫ (α_ X Y Z).hom

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


theorem Nat.ne_of_beq_eq_false : {n m : Nat} → Eq (beq n m) false → Not (Eq n m)


/-- The results of applying `domDomCongr` to two maps are equal if and only if those maps are. -/
@[simp]
theorem domDomCongr_eq_iff (σ : ι ≃ ι') (f g : M [⋀^ι]→ₗ[R] N) :
    f.domDomCongr σ = g.domDomCongr σ ↔ f = g

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

AlternatingMap.domDomCongr σ f = AlternatingMap.domDomCongr σ g ↔ f = g


theorem dedup_eq_zero {s : Multiset α} : dedup s = 0 ↔ s = 0

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


@[simp]
lemma fromColumns_mulVec_sum_elim (A₁ : Matrix m n₁ R) (A₂ : Matrix m n₂ R)
    (v₁ : n₁ → R) (v₂ : n₂ → R) :
    fromColumns A₁ A₂ *ᵥ Sum.elim v₁ v₂ = A₁ *ᵥ v₁ + A₂ *ᵥ v₂

{R : Type u_1}
{m : Type u_2}
{n₁ : Type u_6}
{n₂ : Type u_7}
[Fintype n₁]
[Fintype n₂]
[Semiring R]
(A₁ : Matrix m n₁ R)
(A₂ : Matrix m n₂ R)
(v₁ : n₁ → R)
(v₂ : n₂ → R)

(A₁.fromColumns A₂).mulVec (Sum.elim v₁ v₂) = A₁.mulVec v₁ + A₂.mulVec v₂


@[simp] lemma smul_cons (x : M) (y : α) (v : Fin n → α) :
    x • vecCons y v = vecCons (x • y) (x • v)

{α : Type u_1}
{M : Type u_2}
{n : ℕ}
[SMul M α]
(x : M)
(y : α)
(v : Fin n → α)

x • Matrix.vecCons y v = Matrix.vecCons (x • y) (x • v)


theorem le_glueDist_inl_inr (Φ : Z → X) (Ψ : Z → Y) (ε : ℝ) (x y) :
    ε ≤ glueDist Φ Ψ ε (.inl x) (.inr y)

{X : Type u}
{Y : Type v}
{Z : Type w}
[MetricSpace X]
[MetricSpace Y]
(Φ : Z → X)
(Ψ : Z → Y)
(ε : ℝ)
(x : X)
(y : Y)

ε ≤ Metric.glueDist Φ Ψ ε (Sum.inl x) (Sum.inr y)


/-- for series of nonnegative real numbers. -/
theorem summable_schlomilch_iff_of_nonneg {C : ℕ} {u : ℕ → ℕ} {f : ℕ → ℝ} (h_nonneg : ∀ n, 0 ≤ f n)
    (hf : ∀ ⦃m n⦄, 0 < m → m ≤ n → f n ≤ f m) (h_pos : ∀ n, 0 < u n)
    (hu_strict : StrictMono u) (hC_nonzero : C ≠ 0) (h_succ_diff : SuccDiffBounded C u) :
    (Summable fun k : ℕ => (u (k + 1) - (u k : ℝ)) * f (u k)) ↔ Summable f

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

(Summable fun k => (↑(u (k + 1)) - ↑(u k)) * f (u k)) ↔ Summable f


/-- A set is contained in its own (open) thickening. -/
theorem self_subset_thickening {δ : ℝ} (δ_pos : 0 < δ) (E : Set α) : E ⊆ thickening δ E

{α : Type u}
[PseudoEMetricSpace α]
{δ : ℝ}
(δ_pos : 0 < δ)
(E : Set α)


@[to_additive]
theorem le_hasProd (hf : HasProd f a) (i : ι) (hb : ∀ j, j ≠ i → 1 ≤ f j) : f i ≤ a

{ι : Type u_1}
{α : Type u_3}
[OrderedCommMonoid α]
[TopologicalSpace α]
[OrderClosedTopology α]
{f : ι → α}
{a : α}
(hf : HasProd f a)
(i : ι)
(hb : ∀ (j : ι), j ≠ i → 1 ≤ f j)


/-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z

{X : Type u_1}
{Y : Type u_3}
{Z : Type u_5}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
(e : PartialHomeomorph X Y)
(f' : Y ≃ₜ Z)


/-- We can shrink `s` to any smaller size. -/
@[deprecated exists_subset_card_eq (since := "2024-06-23")]
theorem exists_smaller_set (s : Set α) (i : ℕ) (h₁ : i ≤ s.ncard) :
    ∃ t : Set α, t ⊆ s ∧ t.ncard = i

{α : Type u_1}
(s : Set α)
(i : ℕ)
(h₁ : i ≤ s.ncard)


@[to_additive]
theorem IsScalarTower.of_mclosure_eq_top {N α} [Monoid M] [MulAction M N] [SMul N α] [MulAction M α]
    {s : Set M} (htop : Submonoid.closure s = ⊤)
    (hs : ∀ x ∈ s, ∀ (y : N) (z : α), (x • y) • z = x • y • z) : IsScalarTower M N α


@[simp]
theorem smul_bot : I • (⊥ : Submodule R M) = ⊥

{R : Type u}
{M : Type v}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(I : Ideal R)


@[to_additive]
theorem IsLowerSet.mul_left (ht : IsLowerSet t) : IsLowerSet (s * t)

{α : Type u_1}
[OrderedAddCommGroup α]
{s t : Set α}
(ht : IsLowerSet t)


lemma pow_eq_divInt (q : ℚ) (n : ℕ) : q ^ n = q.num ^ n /. q.den ^ n

q ^ n = Rat.divInt (q.num ^ n) (↑q.den ^ n)


theorem op_sup (S₁ S₂ : Subring R) : (S₁ ⊔ S₂).op = S₁.op ⊔ S₂.op

{R : Type u_2}
[Ring R]
(S₁ S₂ : Subring R)


@[deprecated map_pure_sublist_sublists (since := "2024-03-24")]
theorem map_ret_sublist_sublists (l : List α) : map List.ret l <+ sublists l

(List.map List.ret l).Sublist l.sublists


theorem ne_zero_of_a_ne_zero (ha : P.a ≠ 0) : P.toPoly ≠ 0

{R : Type u_1}
{P : Cubic R}
[Semiring R]
(ha : P.a ≠ 0)


theorem contsAux_recurrence {gp ppred pred : Pair K} (nth_s_eq : g.s.get? n = some gp)
    (nth_contsAux_eq : g.contsAux n = ppred)
    (succ_nth_contsAux_eq : g.contsAux (n + 1) = pred) :
    g.contsAux (n + 2) = ⟨gp.b * pred.a + gp.a * ppred.a, gp.b * pred.b + gp.a * ppred.b⟩

g.contsAux (n + 2) = { a := gp.b * pred.a + gp.a * ppred.a, b := gp.b * pred.b + gp.a * ppred.b }


theorem isLocalHomeomorph_iff_isLocalHomeomorphOn_univ :
    IsLocalHomeomorph f ↔ IsLocalHomeomorphOn f Set.univ

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}


theorem dvd_mul_gcd_of_dvd_mul [GCDMonoid α] {m n k : α} (H : k ∣ m * n) : k ∣ m * gcd k n

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


@[simp, norm_cast]
lemma cast_pow (m : ℕ) : ∀ n : ℕ, ↑(m ^ n) = (m ^ n : α)


@[simp]
theorem toLp_eq_toLp_iff {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    hf.toLp f = hg.toLp g ↔ f =ᵐ[μ] g

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{f g : α → E}
(hf : MeasureTheory.Memℒp f p μ)
(hg : MeasureTheory.Memℒp g p μ)

MeasureTheory.Memℒp.toLp f hf = MeasureTheory.Memℒp.toLp g hg ↔ f =ᵐ[μ] g


/-- The operator norm of the first projection `E × F → E` is at most 1. (It is 0 if `E` is zero, so
the inequality cannot be improved without further assumptions.) -/
lemma norm_fst_le : ‖fst 𝕜 E F‖ ≤ 1

(𝕜 : Type u_1)
(E : Type u_2)
(F : Type u_3)
[NontriviallyNormedField 𝕜]
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]


theorem UniformSpace.comap_mono {α γ} {f : α → γ} :
    Monotone fun u : UniformSpace γ => u.comap f

{α : Type u_2}
{γ : Type u_3}
{f : α → γ}

Monotone fun u => UniformSpace.comap f u


/-- Asserts that `¬⟦l⟧_v` implies `p`. -/
structure Literal.reify (v : Valuation) (l : Literal) (p : Prop) : Prop where
  prop : v.neg l → p

{v : Sat.Valuation}
{l : Sat.Literal}
{p : Prop}
(self : Sat.Literal.reify v l p)


lemma vecMul_self_mul_conjTranspose_eq_zero (A : Matrix m n R) (v : m → R) :
    v ᵥ* (A * Aᴴ) = 0 ↔ v ᵥ* A = 0

{m : Type u_1}
{n : Type u_2}
{R : Type u_4}
[Fintype m]
[Fintype n]
[PartialOrder R]
[NonUnitalRing R]
[StarRing R]
[StarOrderedRing R]
[NoZeroDivisors R]
(A : Matrix m n R)
(v : m → R)

Matrix.vecMul v (A * A.conjTranspose) = 0 ↔ Matrix.vecMul v A = 0


theorem AEMeasurable.fst [SFinite ν] {f : α → γ} (hf : AEMeasurable f μ) :
    AEMeasurable (fun z : α × β => f z.1) (μ.prod ν)

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[MeasurableSpace α]
[MeasurableSpace β]
[MeasurableSpace γ]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]
{f : α → γ}
(hf : AEMeasurable f μ)

AEMeasurable (fun z => f z.1) (μ.prod ν)


/-- Two pre-sets are equivalent iff they have the same members. -/
theorem Equiv.eq {x y : PSet} : Equiv x y ↔ toSet x = toSet y


@[simp]
lemma zero_app (X : Cᵒᵖ) : (0 : P ⟶ Q).app X = 0

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{R : Cᵒᵖ ⥤ RingCat}
(P Q : PresheafOfModules R)
(X : Cᵒᵖ)


theorem eq_from (h : IsZero X) (f : Y ⟶ X) : f = h.from_ Y

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


/-- This is not an instance to avoid slowing down every single `Subsingleton` typeclass search. -/
lemma subsingleton_dom [Subsingleton β] : Subsingleton F

{F : Sort u_2}
{β : Sort u_4}
{γ : Sort u_5}
[iF : EquivLike F β γ]
[Subsingleton β]


@[gcongr] theorem rpow_le_rpow_of_exponent_le {x : ℝ≥0∞} {y z : ℝ} (hx : 1 ≤ x) (hyz : y ≤ z) :
    x ^ y ≤ x ^ z


protected theorem Antitone.antitoneOn (hf : Antitone f) (s : Set α) : AntitoneOn f s

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


theorem Specializes.mem_closed (h : x ⤳ y) (hs : IsClosed s) (hx : x ∈ s) : y ∈ s

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{s : Set X}
(h : x ⤳ y)
(hs : IsClosed s)
(hx : x ∈ s)


/-- Consider the differential of the inclusion of the sphere in `E` at the point `v` as a continuous
linear map from `TangentSpace (𝓡 n) v` to `E`.  The range of this map is the orthogonal complement
of `v` in `E`.

Note that there is an abuse here of the defeq between `E` and the tangent space to `E` at `(v:E`).
In general this defeq is not canonical, but in this case (the tangent space of a vector space) it is
canonical. -/
theorem range_mfderiv_coe_sphere {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    LinearMap.range (mfderiv (𝓡 n) 𝓘(ℝ, E) ((↑) : sphere (0 : E) 1 → E) v :
    TangentSpace (𝓡 n) v →L[ℝ] E) = (ℝ ∙ (v : E))ᗮ

[Fact (FiniteDimensional.finrank ℝ E = n + 1)]

LinearMap.range (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) Subtype.val v) = (Submodule.span ℝ {↑v})ᗮ


@[to_additive (attr := simp)]
theorem div_div_cancel_left (a b : G) : a / b / a = b⁻¹

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


theorem smulTower_leftMulMatrix (x) (ik jk) :
    leftMulMatrix (b.smulTower c) x ik jk =
      leftMulMatrix b (leftMulMatrix c x ik.2 jk.2) ik.1 jk.1

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
[CommRing R]
[CommRing S]
[Ring T]
[Algebra R S]
[Algebra S T]
[Algebra R T]
[IsScalarTower R S T]
{m : Type u_4}
{n : Type u_5}
[Fintype m]
[Fintype n]
[DecidableEq m]
[DecidableEq n]
(b : Basis m R S)
(c : Basis n S T)
(x : T)
(ik jk : m × n)

(Algebra.leftMulMatrix (b.smulTower c)) x ik jk =
  (Algebra.leftMulMatrix b) ((Algebra.leftMulMatrix c) x ik.2 jk.2) ik.1 jk.1


theorem mem_lookupAll {a : α} {b : β a} :
    ∀ {l : List (Sigma β)}, b ∈ lookupAll a l ↔ Sigma.mk a b ∈ l

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


lemma mul_dvd_of_dvd_div (hcb : c ∣ b) (h : a ∣ b / c) : c * a ∣ b

{a b c : ℕ}
(hcb : c ∣ b)
(h : a ∣ b / c)


@[to_additive (attr := simp)]
theorem one_comp (f : α →*o β) : (1 : β →*o γ).comp f = 1

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[Preorder α]
[Preorder β]
[Preorder γ]
[MulOneClass α]
[MulOneClass β]
[MulOneClass γ]
(f : α →*o β)


theorem dropLast_append_getLast? : ∀ {l : List α}, ∀ a ∈ l.getLast?, dropLast l ++ [a] = l


/-- Given a pair of monoid homomorphisms `f`, `g` such that `g.comp f = id` and `f.comp g = id`,
returns a multiplicative equivalence with `toFun = f` and `invFun = g`.  This constructor is
useful if the underlying type(s) have specialized `ext` lemmas for monoid homomorphisms. -/
@[to_additive (attr := simps (config := .asFn))
  "Given a pair of additive monoid homomorphisms `f`, `g` such that `g.comp f = id`
  and `f.comp g = id`, returns an additive equivalence with `toFun = f` and `invFun = g`.  This
  constructor is useful if the underlying type(s) have specialized `ext` lemmas for additive
  monoid homomorphisms."]
def MonoidHom.toMulEquiv [MulOneClass M] [MulOneClass N] (f : M →* N) (g : N →* M)
    (h₁ : g.comp f = MonoidHom.id _) (h₂ : f.comp g = MonoidHom.id _) : M ≃* N

{M : Type u_6}
{N : Type u_7}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)
(g : N →+ M)
(h₁ : g.comp f = AddMonoidHom.id M)
(h₂ : f.comp g = AddMonoidHom.id N)


theorem dvd_pow_natDegree_of_eval₂_eq_zero {f : R →+* A} (hf : Function.Injective f) {p : R[X]}
    (hp : p.Monic) (x y : R) (z : A) (h : p.eval₂ f z = 0) (hz : f x * z = f y) :
    x ∣ y ^ p.natDegree

{R : Type u}
{A : Type u_1}
[CommRing R]
[CommRing A]
{f : R →+* A}
(hf : Function.Injective ⇑f)
{p : R[X]}
(hp : p.Monic)
(x y : R)
(z : A)
(h : Polynomial.eval₂ f z p = 0)
(hz : f x * z = f y)


lemma oddKernel_functional_equation (a : UnitAddCircle) (x : ℝ) :
    oddKernel a x = 1 / x ^ (3 / 2 : ℝ) * sinKernel a (1 / x)

HurwitzZeta.oddKernel a x = 1 / x ^ (3 / 2) * HurwitzZeta.sinKernel a (1 / x)


/-- The type of spectral maps from `α` to `β`. -/
structure SpectralMap (α β : Type*) [TopologicalSpace α] [TopologicalSpace β] where
  /-- function between topological spaces-/
  toFun : α → β
  /-- proof that `toFun` is a spectral map-/
  spectral' : IsSpectralMap toFun

{α : Type u_6}
{β : Type u_7}
[TopologicalSpace α]
[TopologicalSpace β]
(self : SpectralMap α β)


theorem smul_apply (t : S) (f : P →ᴬ[R] W) (x : P) : (t • f) x = t • f x

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
{S : Type u_8}
[TopologicalSpace W]
[Monoid S]
[DistribMulAction S W]
[SMulCommClass R S W]
[ContinuousConstSMul S W]
(t : S)
(f : P →ᴬ[R] W)
(x : P)


@[ext 1100]
theorem coprod.hom_ext {W X Y : C} [HasBinaryCoproduct X Y] {f g : X ⨿ Y ⟶ W}
    (h₁ : coprod.inl ≫ f = coprod.inl ≫ g) (h₂ : coprod.inr ≫ f = coprod.inr ≫ g) : f = g

(h₁ : CategoryTheory.Limits.coprod.inl ≫ f = CategoryTheory.Limits.coprod.inl ≫ g)

(h₂ : CategoryTheory.Limits.coprod.inr ≫ f = CategoryTheory.Limits.coprod.inr ≫ g)


lemma effectiveEpi_of_effectiveEpi_epi_comp {B X Y : C} (f : X ⟶ B) (g : Y ⟶ X)
    [Epi g] [EffectiveEpi (g ≫ f)] : EffectiveEpi f

[CategoryTheory.EffectiveEpi (CategoryTheory.CategoryStruct.comp g f)]


/-- Construct an isomorphism `G ≅ F ⋙ H.inverse` from an isomorphism `G ⋙ H.functor ≅ F`. -/
@[simps!]
def isoCompInverse {H : D ≌ E} (i : G ⋙ H.functor ≅ F) : G ≅ F ⋙ H.inverse

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{E : Type u₃}
[CategoryTheory.Category.{v₃, u₃} E]
{F : CategoryTheory.Functor C E}
{G : CategoryTheory.Functor C D}
{H : D ≌ E}
(i : G.comp H.functor ≅ F)
(X : C)

i.isoCompInverse.inv.app X =
  CategoryTheory.CategoryStruct.comp (H.inverse.map (i.inv.app X)) (H.unitIso.inv.app (G.obj X))


theorem trivial_iff_le_maximal_trivial (N : LieSubmodule R L M) :
    IsTrivial L N ↔ N ≤ maxTrivSubmodule R L M

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

LieModule.IsTrivial L ↥↑N ↔ N ≤ LieModule.maxTrivSubmodule R L M


/-- The exponential map in a complete normed field `𝕂` of characteristic zero has strict derivative
`exp 𝕂 x` at any point `x` in the disk of convergence. -/
theorem hasStrictDerivAt_exp_of_mem_ball [CharZero 𝕂] {x : 𝕂}
    (hx : x ∈ EMetric.ball (0 : 𝕂) (expSeries 𝕂 𝕂).radius) :
    HasStrictDerivAt (exp 𝕂) (exp 𝕂 x) x

(hx : x ∈ EMetric.ball 0 (NormedSpace.expSeries 𝕂 𝕂).radius)

HasStrictDerivAt (NormedSpace.exp 𝕂) (NormedSpace.exp 𝕂 x) x


theorem zneg_bitm1 (n : ZNum) : -n.bitm1 = (-n).bit1


@[simp]
theorem linfty_opNNNorm_diagonal [DecidableEq m] (v : m → α) : ‖diagonal v‖₊ = ‖v‖₊

{m : Type u_3}
{α : Type u_5}
[Fintype m]
[SeminormedAddCommGroup α]
[DecidableEq m]
(v : m → α)


theorem congr {X Y : Grothendieck F} {f g : X ⟶ Y} (h : f = g) :
    f.fiber = eqToHom (by subst h; rfl) ≫ g.fiber

{F : CategoryTheory.Functor C CategoryTheory.Cat}

f.fiber = CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯) g.fiber


@[simp]
theorem sub_zero (x : PGame) : x - 0 = x + 0


@[to_additive]
theorem continuous_extend_one [TopologicalSpace β] {U : Set α'} (hU : IsOpen U) {f : U → β}
    (cont : Continuous f) (supp : HasCompactMulSupport f) :
    Continuous (Subtype.val.extend f 1)

{α' : Type u_3}
{β : Type u_4}
[TopologicalSpace α']
[One β]
[T2Space α']
[TopologicalSpace β]
{U : Set α'}
(hU : IsOpen U)
{f : ↑U → β}
(cont : Continuous f)
(supp : HasCompactMulSupport f)

Continuous (Function.extend Subtype.val f 1)


/-- A topological space is called an R₀ space, if `Specializes` relation is symmetric.

In other words, given two points `x y : X`,
if every neighborhood of `y` contains `x`, then every neighborhood of `x` contains `y`. -/
@[mk_iff]
class R0Space (X : Type u) [TopologicalSpace X] : Prop where
  /-- In an R₀ space, the `Specializes` relation is symmetric. -/
  specializes_symmetric : Symmetric (Specializes : X → X → Prop)

{X : Type u}
[TopologicalSpace X]
[self : R0Space X]


theorem isOpen_imageOfDf : IsOpen (imageOfDf f)


lemma tendsto_rpow_atTop_of_base_lt_one (b : ℝ) (hb₀ : -1 < b) (hb₁ : b < 1) :
    Tendsto (b ^ · : ℝ → ℝ) atTop (𝓝 (0 : ℝ))

Filter.Tendsto (fun x => b ^ x) Filter.atTop (𝓝 0)


@[simp]
theorem log_div_mul_self (b n : ℕ) : log b (n / b * b) = log b n


@[simp]
theorem affineSegment_image (f : P →ᵃ[R] P') (x y : P) :
    f '' affineSegment R x y = affineSegment R (f x) (f y)

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[OrderedRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
(f : P →ᵃ[R] P')
(x y : P)

⇑f '' affineSegment R x y = affineSegment R (f x) (f y)


/-- A useful lemma when dealing with uniformities. -/
theorem map_swap4_eq_comap {f : Filter ((α × β) × γ × δ)} :
    map (fun p : (α × β) × γ × δ => ((p.1.1, p.2.1), (p.1.2, p.2.2))) f =
      comap (fun p : (α × γ) × β × δ => ((p.1.1, p.2.1), (p.1.2, p.2.2))) f

{α : Type u}
{β : Type v}
{γ : Type w}
{δ : Type u_1}
{f : Filter ((α × β) × γ × δ)}


theorem asAlgebraHom_of (g : G) : asAlgebraHom ρ (of k G g) = ρ g

{k : Type u_1}
{G : Type u_2}
{V : Type u_3}
[CommSemiring k]
[Monoid G]
[AddCommMonoid V]
[Module k V]
(ρ : Representation k G V)
(g : G)

ρ.asAlgebraHom ((MonoidAlgebra.of k G) g) = ρ g


theorem xor_iff_not_iff (P Q : Prop) : Xor' P Q ↔ ¬ (P ↔ Q)


/-- For `f : ℕ → G`, the product `∏' k, f (k + i)` tends to one. This does not require a
multipliability assumption on `f`, as otherwise all such products are one. -/
@[to_additive "For `f : ℕ → G`, the sum `∑' k, f (k + i)` tends to zero. This does not require a
summability assumption on `f`, as otherwise all such sums are zero."]
theorem tendsto_prod_nat_add [T2Space G] (f : ℕ → G) :
    Tendsto (fun i ↦ ∏' k, f (k + i)) atTop (𝓝 1)

{G : Type u_2}
[CommGroup G]
[TopologicalSpace G]
[TopologicalGroup G]
[T2Space G]
(f : ℕ → G)

Filter.Tendsto (fun i => ∏' (k : ℕ), f (k + i)) Filter.atTop (𝓝 1)


@[to_additive]
theorem isUnit_singleton (a : α) : IsUnit ({a} : Set α)


theorem sum_div_card_sq_le_sum_sq_div_card :
    ((∑ i ∈ s, f i) / s.card) ^ 2 ≤ (∑ i ∈ s, f i ^ 2) / s.card

{ι : Type u_1}
{α : Type u_2}
[LinearOrderedField α]
{s : Finset ι}
{f : ι → α}

((∑ i ∈ s, f i) / ↑s.card) ^ 2 ≤ (∑ i ∈ s, f i ^ 2) / ↑s.card


theorem card_filter_equitabilise_big :
    ((P.equitabilise h).parts.filter fun u : Finset α => u.card = m + 1).card = b

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

(Finset.filter (fun u => u.card = m + 1) (Finpartition.equitabilise h).parts).card = b


theorem setToL1S_mono_left' {T T' : Set α → E →L[ℝ] G''}
    (hTT' : ∀ s, MeasurableSet s → μ s < ∞ → ∀ x, T s x ≤ T' s x) (f : α →₁ₛ[μ] E) :
    setToL1S T f ≤ setToL1S T' f

(hTT' : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → ∀ (x : E), (T s) x ≤ (T' s) x)

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

MeasureTheory.L1.SimpleFunc.setToL1S T f ≤ MeasureTheory.L1.SimpleFunc.setToL1S T' f


/-- Given a fixed continuous linear map `g`, associating to a continuous multilinear map `f` the
continuous multilinear map `f (g m₁, ..., g mₙ)` is a bounded linear operation. -/
theorem isBoundedLinearMap_continuousMultilinearMap_comp_linear (g : G →L[𝕜] E) :
    IsBoundedLinearMap 𝕜 fun f : ContinuousMultilinearMap 𝕜 (fun _ : ι => E) F =>
      f.compContinuousLinearMap fun _ => g

{𝕜 : 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]
{ι : Type u_5}
[Fintype ι]
(g : G →L[𝕜] E)

IsBoundedLinearMap 𝕜 fun f => f.compContinuousLinearMap fun x => g


/-- A scheme `X` is reduced if all `𝒪ₓ(U)` are reduced. -/
class IsReduced : Prop where
  component_reduced : ∀ U, IsReduced Γ(X, U) := by infer_instance

{X : AlgebraicGeometry.Scheme}
[self : AlgebraicGeometry.IsReduced X]
(U : X.Opens)

IsReduced ↑(X.presheaf.obj (Opposite.op U))


theorem IsBoundedLinearMap.fderiv (h : IsBoundedLinearMap 𝕜 f) :
    fderiv 𝕜 f x = h.toContinuousLinearMap

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


@[ext]
theorem ext ⦃f g : Ultrafilter α⦄ (h : ∀ s, s ∈ f ↔ s ∈ g) : f = g

{α : Type u}
⦃f g : Ultrafilter α⦄
(h : ∀ (s : Set α), s ∈ f ↔ s ∈ g)


@[simp]
theorem apply_symm_apply (h : α ≃ᵢ β) (y : β) : h (h.symm y) = y

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)
(y : β)


@[simp]
lemma singularPart_singularPart (μ ν : Measure α) :
    (μ.singularPart ν).singularPart ν = μ.singularPart ν

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


@[simp, norm_cast]
theorem coe_sInf (S : Set (NonUnitalSubsemiring R)) :
    ((sInf S : NonUnitalSubsemiring R) : Set R) = ⋂ s ∈ S, ↑s

{R : Type u}
[NonUnitalNonAssocSemiring R]
(S : Set (NonUnitalSubsemiring R))


theorem zeroLocus_bUnion (s : Set (Set A)) :
    zeroLocus 𝒜 (⋃ s' ∈ s, s' : Set A) = ⋂ s' ∈ s, zeroLocus 𝒜 s'

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(𝒜 : ℕ → Submodule R A)
[GradedAlgebra 𝒜]
(s : Set (Set A))

ProjectiveSpectrum.zeroLocus 𝒜 (⋃ s' ∈ s, s') = ⋂ s' ∈ s, ProjectiveSpectrum.zeroLocus 𝒜 s'


lemma ih₂₁ (ih' : ∀ a, ArgsRel a (Args.P24 x₁ x₂ y) → P124 a) : IH24 x₂ x₁ y

(ih' :
  ∀ (a : Surreal.Multiplication.Args),
    Surreal.Multiplication.ArgsRel a (Surreal.Multiplication.Args.P24 x₁ x₂ y) → Surreal.Multiplication.P124 a)


theorem isLocallySurjective_iff_imagePresheaf_sheafify_eq_top {F G : Cᵒᵖ ⥤ A} (f : F ⟶ G) :
    IsLocallySurjective J f ↔ (imagePresheaf (whiskerRight f (forget A))).sheafify J = ⊤

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.Presheaf.IsLocallySurjective J f ↔
  CategoryTheory.GrothendieckTopology.Subpresheaf.sheafify J
      (CategoryTheory.GrothendieckTopology.imagePresheaf (CategoryTheory.whiskerRight f (CategoryTheory.forget A))) =
    ⊤


/-- Generalization of Rayleigh's theorem on Beatty sequences. Let `r` be a real number greater
than 1, and `1/r + 1/s = 1`. Then `B⁺_r` and `B⁺'_s` partition the positive integers. -/
theorem beattySeq_symmDiff_beattySeq'_pos {r s : ℝ} (hrs : r.IsConjExponent s) :
    {beattySeq r k | k > 0} ∆ {beattySeq' s k | k > 0} = {n | 0 < n}

{x | ∃ k > 0, beattySeq r k = x} ∆ {x | ∃ k > 0, beattySeq' s k = x} = {n | 0 < n}


/--
Turn a monoid object in the opposite category into a comonoid object.
-/
@[simps] def Mon_OpOpToComon_obj' (A : (Mon_ (Cᵒᵖ))) : Comon_ C

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

(Comon_.Mon_OpOpToComon_obj' C A).X = Opposite.unop A.X


protected theorem Xor'.or (h : Xor' a b) : a ∨ b


theorem integrable_of_norm_sub_le {f₀ f₁ : α → β} {g : α → ℝ} (hf₁_m : AEStronglyMeasurable f₁ μ)
    (hf₀_i : Integrable f₀ μ) (hg_i : Integrable g μ) (h : ∀ᵐ a ∂μ, ‖f₀ a - f₁ a‖ ≤ g a) :
    Integrable f₁ μ

{f₀ f₁ : α → β}

(hf₁_m : MeasureTheory.AEStronglyMeasurable f₁ μ)

(h : ∀ᵐ (a : α) ∂μ, ‖f₀ a - f₁ a‖ ≤ g a)


/-- In a real vector space of dimension `> 1`, the complement of any countable set is
connected. -/
theorem Set.Countable.isConnected_compl_of_one_lt_rank (h : 1 < Module.rank ℝ E) {s : Set E}
    (hs : s.Countable) : IsConnected sᶜ

{E : Type u_1}
[AddCommGroup E]
[Module ℝ E]
[TopologicalSpace E]
[ContinuousAdd E]
[ContinuousSMul ℝ E]
(h : 1 < Module.rank ℝ E)
{s : Set E}
(hs : s.Countable)


/-- The distinguished triangle in the derived category associated to a short
exact sequence of cochain complexes. -/
@[simps!]
noncomputable def triangleOfSES : Triangle (DerivedCategory C)

{S : CategoryTheory.ShortComplex (CochainComplex C ℤ)}

(DerivedCategory.triangleOfSES hS).obj₁ = DerivedCategory.Q.obj S.X₁


/-- Every clopen set in a product of two compact spaces
is a union of finitely many clopen boxes. -/
theorem TopologicalSpace.Clopens.exists_finset_eq_sup_prod (W : Clopens (X × Y)) :
    ∃ (I : Finset (Clopens X × Clopens Y)), W = I.sup fun i ↦ i.1 ×ˢ i.2

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[CompactSpace Y]
[CompactSpace X]
(W : TopologicalSpace.Clopens (X × Y))


@[simp]
theorem limsInf_bot : limsInf (⊥ : Filter α) = ⊤


lemma convexHull_eq_self : convexHull 𝕜 s = s ↔ Convex 𝕜 s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s : Set E}


theorem support_update_subset [DecidableEq α] [DecidableEq M] :
    support (f.update a b) ⊆ insert a f.support

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

(f.update a b).support ⊆ insert a f.support


@[simp] theorem enum_map_fst (l : List α) : map Prod.fst (enum l) = range l.length

List.map Prod.fst l.enum = List.range l.length


protected theorem le_of_not_lt : ∀{a b : Nat}, ¬(a < b) → b ≤ a


theorem IsChain.lt_of_le [PartialOrder α] {s : Set α} (h : IsChain (· ≤ ·) s) :
    IsChain (· < ·) s

{α : Type u_1}
[PartialOrder α]
{s : Set α}
(h : IsChain (fun x x_1 => x ≤ x_1) s)


theorem tendsto_of_forall_preimage {f : α → β} (h : ∀ s, IsCompact s → IsCompact (f ⁻¹' s)) :
    Tendsto f (cocompact α) (cocompact β)

(h : ∀ (s : Set β), IsCompact s → IsCompact (f ⁻¹' s))

Filter.Tendsto f (Filter.cocompact α) (Filter.cocompact β)


theorem take : ∀ {s}, ValidFor l m r s → ∀ n, ValidFor l (m.take n) (m.drop n ++ r) (s.take n)

Substring.ValidFor l m r s → ∀ (n : Nat), Substring.ValidFor l (List.take n m) (List.drop n m ++ r) (s.take n)


@[simp]
theorem descPochhammer_ne_zero_eval_zero {n : ℕ} (h : n ≠ 0) : (descPochhammer R n).eval 0 = 0

(R : Type u)
[Ring R]
{n : ℕ}
(h : n ≠ 0)

Polynomial.eval 0 (descPochhammer R n) = 0


@[simp] lemma nonempty_Iio : (Iio a).Nonempty ↔ ¬ IsMin a

{α : Type u_2}
[Preorder α]
{a : α}
[LocallyFiniteOrderBot α]


@[simp]
theorem factors_zero : (0 : Associates α).factors = ⊤

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]


@[simp]
theorem BilinForm.toMatrix_symm : (BilinForm.toMatrix b).symm = Matrix.toBilin b

{R₂ : Type u_5}
{M₂ : Type u_6}
[CommSemiring R₂]
[AddCommMonoid M₂]
[Module R₂ M₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(b : Basis n R₂ M₂)


theorem node4L_size {l x m y r} (hm : Sized m) :
    size (@node4L α l x m y r) = size l + size m + size r + 2

{α : Type u_1}
{l : Ordnode α}
{x : α}
{m : Ordnode α}
{y : α}
{r : Ordnode α}
(hm : m.Sized)

(l.node4L x m y r).size = l.size + m.size + r.size + 2


theorem productOfMemOpens_injective [T0Space X] : Function.Injective (productOfMemOpens X)

(X : Type u_1)
[TopologicalSpace X]
[T0Space X]


@[simp]
theorem ofInjective_apply (f : L₁ →ₗ⁅R⁆ L₂) (h : Function.Injective f) (x : L₁) :
    ↑(ofInjective f h x) = f x

{R : Type u}
{L₁ : Type v}
{L₂ : Type w}
[CommRing R]
[LieRing L₁]
[LieRing L₂]
[LieAlgebra R L₁]
[LieAlgebra R L₂]
(f : L₁ →ₗ⁅R⁆ L₂)
(h : Function.Injective ⇑f)
(x : L₁)


@[simp]
theorem blsub_eq_lsub {ι : Type u} (f : ι → Ordinal.{max u v}) :
    blsub.{_, v} _ (bfamilyOfFamily f) = lsub.{_, v} f

(Ordinal.type WellOrderingRel).blsub (Ordinal.bfamilyOfFamily f) = Ordinal.lsub f


lemma add {f g : 𝕜 → E} {x : 𝕜} (hf : MeromorphicAt f x) (hg : MeromorphicAt g x) :
    MeromorphicAt (f + g) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{f g : 𝕜 → E}
{x : 𝕜}
(hf : MeromorphicAt f x)
(hg : MeromorphicAt g x)


lemma apprSeq_apply_le_one (n : ℕ) (x : X) :
    hF.apprSeq n x ≤ 1

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


@[simp]
theorem Basis.ofZlatticeBasis_repr_apply (x : L) (i : ι) :
    (b.ofZlatticeBasis K L).repr x i = b.repr x i

(K : Type u_1)
[NormedLinearOrderedField K]
[HasSolidNorm K]
[FloorRing K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
[FiniteDimensional K E]
[ProperSpace E]
(L : AddSubgroup E)
[DiscreteTopology ↥L]
{ι : Type u_3}
[hs : IsZlattice K L]
(b : Basis ι ℤ ↥L)
(x : ↥L)
(i : ι)

((Basis.ofZlatticeBasis K L b).repr ↑x) i = ↑((b.repr x) i)


@[simp, reassoc]
lemma comp_f {L L' L'' : Φ.LeftResolution X₂} (φ : L ⟶ L') (ψ : L' ⟶ L'') :
    (φ ≫ ψ).f = φ.f ≫ ψ.f

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

{Φ : CategoryTheory.LocalizerMorphism W₁ W₂}

(CategoryTheory.CategoryStruct.comp φ ψ).f = CategoryTheory.CategoryStruct.comp φ.f ψ.f


theorem isClosed_coinduced {t : TopologicalSpace α} {s : Set β} {f : α → β} :
    IsClosed[t.coinduced f] s ↔ IsClosed (f ⁻¹' s)

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


theorem map [Fact p.Prime] {f} (hf : IsPoly₂ p f) (g : R →+* S) (x y : 𝕎 R) :
    map g (f x y) = f (map g x) (map g y)

{f : ⦃R : Type u⦄ → [inst : CommRing R] → WittVector p R → WittVector p R → WittVector p R}

(WittVector.map g) (f x y) = f ((WittVector.map g) x) ((WittVector.map g) y)


@[simp]
lemma antivaryOn_inv_right₀ (hg : ∀ i ∈ s, 0 < g i) : AntivaryOn f g⁻¹ s ↔ MonovaryOn f g s

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemifield α]
[LinearOrderedSemifield β]
{s : Set ι}
{f : ι → α}
{g : ι → β}
(hg : ∀ i ∈ s, 0 < g i)


theorem iUnion_inter (s : Set β) (t : ι → Set β) : (⋃ i, t i) ∩ s = ⋃ i, t i ∩ s

{β : Type u_2}
{ι : Sort u_4}
(s : Set β)
(t : ι → Set β)


theorem uniformContinuous_comap' {f : γ → β} {g : α → γ} [v : UniformSpace β] [u : UniformSpace α]
    (h : UniformContinuous (f ∘ g)) : @UniformContinuous α γ u (UniformSpace.comap f v) g

{α : Type ua}
{β : Type ub}
{γ : Type uc}
{f : γ → β}
{g : α → γ}
[v : UniformSpace β]
[u : UniformSpace α]
(h : UniformContinuous (f ∘ g))


@[to_additive norm_zsmul_le]
theorem norm_zpow_le_mul_norm (n : ℤ) (a : α) : ‖a ^ n‖ ≤ ‖n‖ * ‖a‖

{α : Type u_1}
[SeminormedAddCommGroup α]
(n : ℤ)
(a : α)

‖n • a‖ ≤ ‖n‖ * ‖a‖


theorem mem_acceptsFrom {s : σ} {x : List α} :
    x ∈ M.acceptsFrom s ↔ M.evalFrom s x ∈ M.accept

{α : Type u}
{σ : Type v}
(M : DFA α σ)
{s : σ}
{x : List α}


/-- Lebesgue dominated convergence theorem for parametric interval integrals. -/
nonrec theorem hasSum_integral_of_dominated_convergence {ι} [Countable ι] {F : ι → ℝ → E}
    (bound : ι → ℝ → ℝ) (hF_meas : ∀ n, AEStronglyMeasurable (F n) (μ.restrict (Ι a b)))
    (h_bound : ∀ n, ∀ᵐ t ∂μ, t ∈ Ι a b → ‖F n t‖ ≤ bound n t)
    (bound_summable : ∀ᵐ t ∂μ, t ∈ Ι a b → Summable fun n => bound n t)
    (bound_integrable : IntervalIntegrable (fun t => ∑' n, bound n t) μ a b)
    (h_lim : ∀ᵐ t ∂μ, t ∈ Ι a b → HasSum (fun n => F n t) (f t)) :
    HasSum (fun n => ∫ t in a..b, F n t ∂μ) (∫ t in a..b, f t ∂μ)

(hF_meas : ∀ (n : ι), MeasureTheory.AEStronglyMeasurable (F n) (μ.restrict (Ι a b)))

(h_bound : ∀ (n : ι), ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ‖F n t‖ ≤ bound n t)

(bound_summable : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → Summable fun n => bound n t)

(bound_integrable : IntervalIntegrable (fun t => ∑' (n : ι), bound n t) μ a b)

(h_lim : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → HasSum (fun n => F n t) (f t))

HasSum (fun n => ∫ (t : ℝ) in a..b, F n t ∂μ) (∫ (t : ℝ) in a..b, f t ∂μ)


@[simp]
theorem toFinset_singleton (a : α) : toFinset ({a} : Multiset α) = {a}


@[to_additive (attr := simp, norm_cast)]
theorem toSubgroup_le : (U : Subgroup G) ≤ (V : Subgroup G) ↔ U ≤ V

{G : Type u_1}
[AddGroup G]
[TopologicalSpace G]
{U V : OpenAddSubgroup G}

↑U ≤ ↑V ↔ U ≤ V


/-- An equivalence of Lie modules yields an order-preserving equivalence of their lattices of Lie
Submodules. -/
@[simps] def orderIsoMapComap (e : M ≃ₗ⁅R,L⁆ M') :
    LieSubmodule R L M ≃o LieSubmodule R L M'

{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']
(e : M ≃ₗ⁅R,L⁆ M')
(N' : LieSubmodule R L M')

(RelIso.symm (LieSubmodule.orderIsoMapComap e)) N' = LieSubmodule.comap e.toLieModuleHom N'


/-- See note [partially-applied ext lemmas] -/
@[ext]
theorem starAlgHom_ext {φ ψ : Unitization R A →⋆ₐ[R] C}
    (h : (φ : Unitization R A →⋆ₙₐ[R] C).comp (Unitization.inrNonUnitalStarAlgHom R A) =
      (ψ : Unitization R A →⋆ₙₐ[R] C).comp (Unitization.inrNonUnitalStarAlgHom R A)) :
    φ = ψ

(h : (↑φ).comp (Unitization.inrNonUnitalStarAlgHom R A) = (↑ψ).comp (Unitization.inrNonUnitalStarAlgHom R A))


protected theorem tsum_eq_liminf_sum_nat {f : ℕ → ℝ≥0∞} :
    ∑' i, f i = liminf (fun n => ∑ i ∈ Finset.range n, f i) atTop

{f : ℕ → ℝ≥0∞}

∑' (i : ℕ), f i = Filter.liminf (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop


@[simp]
lemma coroot_reflection_perm (j : ι) :
    P.coroot (P.reflection_perm i j) = (P.coreflection i) (P.coroot j)

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i j : ι)

P.coroot ((P.reflection_perm i) j) = (P.coreflection i) (P.coroot j)


theorem eq_cons_iff (a : α) (v : Vector α n.succ) (v' : Vector α n) :
    v = a ::ᵥ v' ↔ v.head = a ∧ v.tail = v'

{n : ℕ}
{α : Type u_1}
(a : α)
(v : Mathlib.Vector α n.succ)
(v' : Mathlib.Vector α n)


@[simp]
theorem add_nat_iff : LiouvilleWith p (x + n) ↔ LiouvilleWith p x

LiouvilleWith p (x + ↑n) ↔ LiouvilleWith p x


theorem Icc_subset_Ico_iff (h₁ : a₁ ≤ b₁) : Icc a₁ b₁ ⊆ Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ < b₂

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

Finset.Icc a₁ b₁ ⊆ Finset.Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ < b₂


lemma quasiIso_eq_subcategoryAcyclic_W :
    quasiIso C (ComplexShape.up ℤ) = (subcategoryAcyclic C).W

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

HomotopyCategory.quasiIso C (ComplexShape.up ℤ) = (HomotopyCategory.subcategoryAcyclic C).W


@[simp]
theorem mem_torsion'_iff (x : M) : x ∈ torsion' R M S ↔ ∃ a : S, a • x = 0

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(S : Type u_3)
[CommMonoid S]
[DistribMulAction S M]
[SMulCommClass S R M]
(x : M)

x ∈ Submodule.torsion' R M S ↔ ∃ a, a • x = 0


@[to_additive]
lemma prod_Ioi_mul_eq_prod_Ici (a : α) : (∏ x ∈ Ioi a, f x) * f a = ∏ x ∈ Ici a, f x

{α : Type u_1}
{M : Type u_2}
[PartialOrder α]
[CommMonoid M]
{f : α → M}
[LocallyFiniteOrderTop α]
(a : α)

(∏ x ∈ Finset.Ioi a, f x) * f a = ∏ x ∈ Finset.Ici a, f x


theorem lim_abs (f : CauSeq ℂ Complex.abs) : lim (cauSeqAbs f) = Complex.abs (lim f)

(Complex.cauSeqAbs f).lim = Complex.abs f.lim


@[to_additive (attr := simp low)]
theorem mk_mul_mk (x y : M) (hx : x ∈ S') (hy : y ∈ S') :
    (⟨x, hx⟩ : S') * ⟨y, hy⟩ = ⟨x * y, mul_mem hx hy⟩

{M : Type u_1}
{A : Type u_5}
[Mul M]
[SetLike A M]
[hA : MulMemClass A M]
(S' : A)
(x y : M)
(hx : x ∈ S')
(hy : y ∈ S')


/-- If each component of the counit is a split monomorphism, then the right adjoint is full. -/
lemma full_R_of_isSplitMono_counit_app [∀ X, IsSplitMono (h.counit.app X)] : R.Full

[∀ (X : D), CategoryTheory.IsSplitMono (h.counit.app X)]


lemma epi_of_epi_f {K L : HomologicalComplex V c} (φ : K ⟶ L)
    (hφ : ∀ i, Epi (φ.f i)) : Epi φ

(hφ : ∀ (i : ι), CategoryTheory.Epi (φ.f i))


theorem eq_zero_iff_even {n : ℕ} : (n : ZMod 2) = 0 ↔ Even n


theorem innerDualCone_le_innerDualCone (h : t ⊆ s) : s.innerDualCone ≤ t.innerDualCone

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


theorem equivalence : Equivalence (@Homotopic X Y _ _)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]


/-- In a linearly ordered additive commutative group with the order topology, if `f` tends to
`atBot` and `g` tends to `C` then `f + g` tends to `atBot`. -/
theorem Filter.Tendsto.atBot_add {C : α} (hf : Tendsto f l atBot) (hg : Tendsto g l (𝓝 C)) :
    Tendsto (fun x => f x + g x) l atBot

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[LinearOrderedAddCommGroup α]
[OrderTopology α]
{l : Filter β}
{f g : β → α}
{C : α}
(hf : Filter.Tendsto f l Filter.atBot)
(hg : Filter.Tendsto g l (𝓝 C))

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


@[to_additive (attr := simp)]
theorem inv_eq_self (μ : Measure G) [IsInvInvariant μ] : μ.inv = μ

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


@[simps]
instance assoc' (f : a ⟶ b) (g : b ⟶ c) (h : c ⟶ d) (i : a ⟶ d)
    [BicategoricalCoherence i (f ≫ g ≫ h)] :
    BicategoricalCoherence i ((f ≫ g) ≫ h)

[CategoryTheory.BicategoricalCoherence i (f ≫ g ≫ h)]


theorem inv_le_iff_inv_le : a⁻¹ ≤ b ↔ b⁻¹ ≤ a

a⁻¹ ≤ b ↔ b⁻¹ ≤ a


theorem support_sum {ι₁ : Type u₁} [DecidableEq ι₁] {β₁ : ι₁ → Type v₁} [∀ i₁, Zero (β₁ i₁)]
    [∀ (i) (x : β₁ i), Decidable (x ≠ 0)] [∀ i, AddCommMonoid (β i)]
    [∀ (i) (x : β i), Decidable (x ≠ 0)] {f : Π₀ i₁, β₁ i₁} {g : ∀ i₁, β₁ i₁ → Π₀ i, β i} :
    (f.sum g).support ⊆ f.support.biUnion fun i => (g i (f i)).support

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

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

{g : (i₁ : ι₁) → β₁ i₁ → Π₀ (i : ι), β i}


theorem le_rank_iff_exists_linearIndependent_finset {n : ℕ} {f : V →ₗ[K] V'} :
    ↑n ≤ rank f ↔ ∃ s : Finset V, s.card = n ∧ LinearIndependent K fun x : (s : Set V) => f x

{K : Type u}
{V : Type v}
{V' : Type v'}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
[AddCommGroup V']
[Module K V']
{n : ℕ}
{f : V →ₗ[K] V'}

↑n ≤ f.rank ↔ ∃ s, s.card = n ∧ LinearIndependent K fun (x : ↑↑s) => f ↑x


@[reassoc]
lemma sndX_inrX (i : ι) (hi : ¬ c.Rel i (c.next i)) :
    sndX φ i ≫ inrX φ i = 𝟙 _

HomologicalComplex.homotopyCofiber.sndX φ i ≫ HomologicalComplex.homotopyCofiber.inrX φ i =
  𝟙 (HomologicalComplex.homotopyCofiber.X φ i)


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

{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[Zero β]
(f : α →C_c β)
(f' : α → β)
(h : f' = ⇑f)


/-- If `f : M₁ →⋆ M₂` is surjective, then the exponent of `M₂` divides the exponent of `M₁`. -/
@[to_additive]
theorem MonoidHom.exponent_dvd {F M₁ M₂ : Type*} [Monoid M₁] [Monoid M₂]
    [FunLike F M₁ M₂] [MonoidHomClass F M₁ M₂]
    {f : F} (hf : Function.Surjective f) : exponent M₂ ∣ exponent M₁

{F : Type u_1}
{M₁ : Type u_2}
{M₂ : Type u_3}
[AddMonoid M₁]
[AddMonoid M₂]
[FunLike F M₁ M₂]
[AddMonoidHomClass F M₁ M₂]
{f : F}
(hf : Function.Surjective ⇑f)

AddMonoid.exponent M₂ ∣ AddMonoid.exponent M₁


/--
The homeomorphism from the quotient of a quotient map to its codomain. This is
`Setoid.quotientKerEquivOfSurjective` as a homeomorphism.
-/
@[simps!]
noncomputable def homeomorph (hf : QuotientMap f) : Quotient (Setoid.ker f) ≃ₜ Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : C(X, Y)}
(hf : QuotientMap ⇑f)
(b : Y)

hf.homeomorph.symm b = Quotient.mk'' (Function.surjInv ⋯ b)


@[simp]
theorem coe_toZModSubmodule (S : AddSubgroup M) : (toZModSubmodule n S : Set M) = S

(n : ℕ)
{M : Type u_1}
[AddCommGroup M]
[Module (ZMod n) M]
(S : AddSubgroup M)

↑((AddSubgroup.toZModSubmodule n) S) = ↑S


theorem pair_subset (ha : a ∈ s) (hb : b ∈ s) : {a, b} ⊆ s

{α : Type u}
{a b : α}
{s : Set α}
(ha : a ∈ s)
(hb : b ∈ s)


lemma closure_mono (M : Matroid α) : Monotone M.closure


@[simp]
theorem compRight_id (B : BilinForm R M) : B.compRight LinearMap.id = B

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


@[simp]
theorem coe_comp_orderHom (f : BoundedOrderHom β γ) (g : BoundedOrderHom α β) :
    (f.comp g : OrderHom α γ) = (f : OrderHom β γ).comp g

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


/-- An auxiliary lemma for `Complex.norm_dslope_le_div_of_mapsTo_ball`. -/
theorem schwarz_aux {f : ℂ → ℂ} (hd : DifferentiableOn ℂ f (ball c R₁))
    (h_maps : MapsTo f (ball c R₁) (ball (f c) R₂)) (hz : z ∈ ball c R₁) :
    ‖dslope f c z‖ ≤ R₂ / R₁

(hd : DifferentiableOn ℂ f (Metric.ball c R₁))

(h_maps : Set.MapsTo f (Metric.ball c R₁) (Metric.ball (f c) R₂))


@[simp] lemma upShadow_compls : ∂⁺ 𝒜ᶜˢ = (∂ 𝒜)ᶜˢ

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


theorem inv_pf [Inv α] (p : (a:α) = b) : a⁻¹ = b⁻¹

{α : Type u_1}
{a b : α}
[Inv α]
(p : a = b)


theorem tendsto_cons_iff {β : Type*} {f : List α → β} {b : Filter β} {a : α} {l : List α} :
    Tendsto f (𝓝 (a::l)) b ↔ Tendsto (fun p : α × List α => f (p.1::p.2)) (𝓝 a ×ˢ 𝓝 l) b

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_3}
{f : List α → β}
{b : Filter β}
{a : α}
{l : List α}

Filter.Tendsto f (𝓝 (a :: l)) b ↔ Filter.Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) b


@[to_additive IsOpen.left_addCoset]
theorem IsOpen.leftCoset {U : Set G} (h : IsOpen U) (x : G) : IsOpen (x • U)

{G : Type w}
[TopologicalSpace G]
[Group G]
[ContinuousMul G]
{U : Set G}
(h : IsOpen U)
(x : G)


@[simp]
theorem traverse_nil : traverse f ([] : List α') = (pure [] : F (List β'))

{F : Type u → Type u}
[Applicative F]
{α' β' : Type u}
(f : α' → F β')


/-- A subgroup `K` includes `closure k` if and only if it includes `k`. -/
@[to_additive (attr := simp)
  "An additive subgroup `K` includes `closure k` if and only if it includes `k`"]
theorem closure_le : closure k ≤ K ↔ k ⊆ K

{G : Type u_1}
[Group G]
(K : Subgroup G)
{k : Set G}


@[to_additive (attr := simp)]
theorem coe_comp : ⇑(p.comp f) = p ∘ f

{E : Type u_4}
{F : Type u_5}
[AddGroup E]
[AddGroup F]
(p : AddGroupSeminorm E)
(f : F →+ E)


@[simp] lemma surjOn_singleton : SurjOn f s {b} ↔ b ∈ f '' s

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


@[to_additive (attr := simp)]
theorem inv_ball : (ball x δ)⁻¹ = ball x⁻¹ δ

{E : Type u_1}
[SeminormedCommGroup E]
(δ : ℝ)
(x : E)


/-- The comap of the coLindelöf filter on `Y` by a continuous function `f : X → Y` is less than or
equal to the coLindelöf filter on `X`.
This is a reformulation of the fact that images of Lindelöf sets are Lindelöf. -/
theorem Filter.comap_coLindelof_le {f : X → Y} (hf : Continuous f) :
    (Filter.coLindelof Y).comap f ≤ Filter.coLindelof X

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
(hf : Continuous f)

Filter.comap f (Filter.coLindelof Y) ≤ Filter.coLindelof X


@[to_additive]
theorem MonoidHom.map_finprod_of_injective (g : M →* N) (hg : Injective g) (f : α → M) :
    g (∏ᶠ i, f i) = ∏ᶠ i, g (f i)

{M : Type u_2}
{N : Type u_3}
{α : Sort u_4}
[CommMonoid M]
[CommMonoid N]
(g : M →* N)
(hg : Function.Injective ⇑g)
(f : α → M)

g (∏ᶠ (i : α), f i) = ∏ᶠ (i : α), g (f i)


/-- The definitional equality between `![]`-ary heterogeneous functions into `τ` and `τ`. -/
@[simps!]
def fromTypes_nil_equiv (τ : Type u) : FromTypes ![] τ ≃ τ

(τ : Type u)
(a : Function.FromTypes ![] τ)

(Function.fromTypes_nil_equiv τ).symm a = a


theorem inf'_mono {s₁ s₂ : Finset β} (h : s₁ ⊆ s₂) (h₁ : s₁.Nonempty) :
    s₂.inf' (h₁.mono h) f ≤ s₁.inf' h₁ f

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
(f : β → α)
{s₁ s₂ : Finset β}
(h : s₁ ⊆ s₂)
(h₁ : s₁.Nonempty)


theorem val_ne_of_ne {i j : Fin n} (h : i ≠ j) : val i ≠ val j


theorem bounded_le_Ico [Preorder α] (a b : α) : Bounded (· ≤ ·) (Ico a b)

Set.Bounded (fun x x_1 => x ≤ x_1) (Set.Ico a b)


theorem Continuous.if_le [TopologicalSpace γ] [∀ x, Decidable (f x ≤ g x)] {f' g' : β → γ}
    (hf' : Continuous f') (hg' : Continuous g') (hf : Continuous f) (hg : Continuous g)
    (hfg : ∀ x, f x = g x → f' x = g' x) : Continuous fun x => if f x ≤ g x then f' x else g' x

(hfg : ∀ (x : β), f x = g x → f' x = g' x)


@[simp]
theorem toDFinsupp_add [AddZeroClass M] (f g : ι →₀ M) :
    (f + g).toDFinsupp = f.toDFinsupp + g.toDFinsupp

{ι : Type u_1}
{M : Type u_3}
[AddZeroClass M]
(f g : ι →₀ M)


theorem Ideal.IsPrime.mul_mem_pow (I : Ideal R) [hI : I.IsPrime] {a b : R} {n : ℕ}
    (h : a * b ∈ I ^ n) : a ∈ I ∨ b ∈ I ^ n

{R : Type u_1}
[CommRing R]
[IsDedekindDomain R]
(I : Ideal R)
[hI : I.IsPrime]
{a b : R}
{n : ℕ}
(h : a * b ∈ I ^ n)


@[simp] theorem coe_mk (f : α → β) (hf : Monotone f) : ⇑(mk f hf) = f

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
(f : α → β)
(hf : Monotone f)


lemma DirSupInacc.union (hs : DirSupInacc s) (ht : DirSupInacc t) : DirSupInacc (s ∪ t)

{α : Type u_1}
[Preorder α]
{s t : Set α}
(hs : DirSupInacc s)
(ht : DirSupInacc t)


theorem Algebra.IsAlgebraic.algHomEquivAlgHomOfSplits_apply_apply (L : Type*) [Field L]
    [Algebra F L] [Algebra L A] [IsScalarTower F L A]
    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) (f : K →ₐ[F] L) (x : K) :
    Algebra.IsAlgebraic.algHomEquivAlgHomOfSplits A L hL f x = algebraMap L A (f x)

(hL : ∀ (x : K), Polynomial.Splits (algebraMap F L) (minpoly F x))

((Algebra.IsAlgebraic.algHomEquivAlgHomOfSplits A L hL) f) x = (algebraMap L A) (f x)


@[reassoc]
lemma liftCycles_homologyπ_eq_zero_of_boundary {A : C} (k : A ⟶ K.X i) (j : ι)
    (hj : c.next i = j) {i' : ι} (x : A ⟶ K.X i') (hx : k = x ≫ K.d i' i) :
    K.liftCycles k j hj (by rw [hx, assoc, K.d_comp_d, comp_zero]) ≫ K.homologyπ i = 0

K.liftCycles k j hj ⋯ ≫ K.homologyπ i = 0


/-- If a function is continuous within `s` at `x`, then it tends to `f x` within `s` by definition.
We register this fact for use with the dot notation, especially to use `Filter.Tendsto.comp` as
`ContinuousWithinAt.comp` will have a different meaning. -/
theorem ContinuousWithinAt.tendsto {f : α → β} {s : Set α} {x : α} (h : ContinuousWithinAt f s x) :
    Tendsto f (𝓝[s] x) (𝓝 (f x))

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


/-- Definition of `IsBigO` in terms of filters, with a positive constant. -/
theorem isBigO_iff' {g : α → E'''} :
    f =O[l] g ↔ ∃ c > 0, ∀ᶠ x in l, ‖f x‖ ≤ c * ‖g x‖

{α : Type u_1}
{E : Type u_3}
{E''' : Type u_12}
[Norm E]
[SeminormedAddGroup E''']
{f : α → E}
{l : Filter α}
{g : α → E'''}

f =O[l] g ↔ ∃ c > 0, ∀ᶠ (x : α) in l, ‖f x‖ ≤ c * ‖g x‖


@[simp] lemma coe_coe (e : M ≃ₗ⁅R,L⁆ N) : ⇑(e : M →ₗ⁅R,L⁆ N) = e

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


{α : Type u_2}
{β : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[AddGroup β]
[TopologicalAddGroup β]
(f : α →C_c β)


@[reassoc (attr := simp)]
theorem equalizerComparison_comp_π [HasEqualizer f g] [HasEqualizer (G.map f) (G.map g)] :
    equalizerComparison f g G ≫ equalizer.ι (G.map f) (G.map g) = G.map (equalizer.ι f g)

[CategoryTheory.Limits.HasEqualizer (G.map f) (G.map g)]

CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.equalizerComparison f g G)
    (CategoryTheory.Limits.equalizer.ι (G.map f) (G.map g)) =
  G.map (CategoryTheory.Limits.equalizer.ι f g)


@[to_additive]
theorem continuousOn_pow {s : Set M} (n : ℕ) : ContinuousOn (fun (x : M) => x ^ n) s

{M : Type u_3}
[TopologicalSpace M]
[Monoid M]
[ContinuousMul M]
{s : Set M}
(n : ℕ)


/-- If `Irreducible (cyclotomic n K)` (in particular for `K = ℚ`), then the `finrank` of a
cyclotomic extension is `n.totient`. -/
theorem finrank (hirr : Irreducible (cyclotomic n K)) : finrank K L = (n : ℕ).totient

(hirr : Irreducible (Polynomial.cyclotomic (↑n) K))


/-- Construct the Beck fork in the category of coalgebras. This fork is coreflexive as well as an
equalizer.
-/
@[simps!]
def beckCoalgebraFork : Fork (CofreeEqualizer.topMap X) (CofreeEqualizer.bottomMap X)

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

(CategoryTheory.Comonad.beckCoalgebraFork X).pt = X


theorem filter_replicate : (replicate n a).filter p = if p a then replicate n a else []

∀ {α : Type u_1} {a : α} {p : α → Bool},
  List.filter p (List.replicate n a) = if p a = true then List.replicate n a else []


@[to_additive] lemma smul_def [Monoid M] [SMul M α] (m : Mˣ) (a : α) : m • a = (m : M) • a

{M : Type u_3}
{α : Type u_5}
[AddMonoid M]
[VAdd M α]
(m : AddUnits M)
(a : α)


/-- The **Triangle Counting Lemma**. If `G` is a graph and `s`, `t`, `u` are sets of vertices such
that each pair is `ε`-uniform and `2 * ε`-dense, then a proportion of at least
`(1 - 2 * ε) * ε ^ 3` of the triples `(a, b, c) ∈ s × t × u` are triangles. -/
lemma triangle_counting'
    (dst : 2 * ε ≤ G.edgeDensity s t) (hst : G.IsUniform ε s t)
    (dsu : 2 * ε ≤ G.edgeDensity s u) (usu : G.IsUniform ε s u)
    (dtu : 2 * ε ≤ G.edgeDensity t u) (utu : G.IsUniform ε t u) :
    (1 - 2 * ε) * ε ^ 3 * s.card * t.card * u.card ≤
      ((s ×ˢ t ×ˢ u).filter fun (a, b, c) ↦ G.Adj a b ∧ G.Adj a c ∧ G.Adj b c).card

{α : Type u_1}
(G : SimpleGraph α)
[DecidableRel G.Adj]
{ε : ℝ}
{s t u : Finset α}
(dst : 2 * ε ≤ ↑(G.edgeDensity s t))
(hst : G.IsUniform ε s t)
(dsu : 2 * ε ≤ ↑(G.edgeDensity s u))
(usu : G.IsUniform ε s u)
(dtu : 2 * ε ≤ ↑(G.edgeDensity t u))
(utu : G.IsUniform ε t u)

(1 - 2 * ε) * ε ^ 3 * ↑s.card * ↑t.card * ↑u.card ≤
  ↑(Finset.filter
        (fun x =>
          match x with
          | (a, b, c) => G.Adj a b ∧ G.Adj a c ∧ G.Adj b c)
        (s ×ˢ t ×ˢ u)).card


@[to_additive]
lemma prod_dite_of_false {p : α → Prop} {_ : DecidablePred p} (h : ∀ i ∈ s, ¬ p i)
    (f : ∀ i, p i → β) (g : ∀ i, ¬ p i → β) :
    ∏ i ∈ s, (if hi : p i then f i hi else g i hi) = ∏ i : s, g i.1 (h _ i.2)

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
[AddCommMonoid β]
{p : α → Prop}

∀ {x : DecidablePred p} (h : ∀ i ∈ s, ¬p i) (f : (i : α) → p i → β) (g : (i : α) → ¬p i → β),
  (∑ i ∈ s, if hi : p i then f i hi else g i hi) = ∑ i : { x // x ∈ s }, g ↑i ⋯


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

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}


theorem mod_dioph : DiophFn fun v => f v % g v

{α : Type}
{f g : (α → ℕ) → ℕ}
(df : Dioph.DiophFn f)
(dg : Dioph.DiophFn g)


lemma sum_addContent_le_of_subset (hC : IsSetSemiring C)
    (h_ss : ↑I ⊆ C) (h_dis : PairwiseDisjoint (I : Set (Set α)) id)
    (ht : t ∈ C) (hJt : ∀ s ∈ I, s ⊆ t) :
    ∑ u ∈ I, m u ≤ m t

{α : Type u_1}
{C : Set (Set α)}
{t : Set α}
{I : Finset (Set α)}
{m : MeasureTheory.AddContent C}
(hC : MeasureTheory.IsSetSemiring C)
(h_ss : ↑I ⊆ C)
(h_dis : (↑I).PairwiseDisjoint id)
(ht : t ∈ C)
(hJt : ∀ s ∈ I, s ⊆ t)


@[simp]
lemma addOppositeEquiv_symm_leadingCoeff (x : (HahnSeries Γ R)ᵃᵒᵖ) :
    (addOppositeEquiv.symm x).leadingCoeff = .op x.unop.leadingCoeff

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[AddMonoid R]
(x : (HahnSeries Γ R)ᵃᵒᵖ)

(HahnSeries.addOppositeEquiv.symm x).leadingCoeff = AddOpposite.op (AddOpposite.unop x).leadingCoeff


theorem neg_div (a b : K) : -b / a = -(b / a)

{K : Type u_3}
[DivisionMonoid K]
[HasDistribNeg K]
(a b : K)


@[simp]
theorem isElementary (S : L.ElementarySubstructure M) : (S : L.Substructure M).IsElementary

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


theorem mul_sub_mul_mem {R : Type*} [CommRing R] (I : Ideal R) {a b c d : R} (h1 : a - b ∈ I)
    (h2 : c - d ∈ I) : a * c - b * d ∈ I

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{a b c d : R}
(h1 : a - b ∈ I)
(h2 : c - d ∈ I)


/-- Any ball `Metric.ball x r`, `0 < r` is the image of the unit ball under `fun y ↦ x + r • y`. -/
theorem affinity_unitBall {r : ℝ} (hr : 0 < r) (x : E) : x +ᵥ r • ball (0 : E) 1 = ball x r

{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{r : ℝ}
(hr : 0 < r)
(x : E)

x +ᵥ r • Metric.ball 0 1 = Metric.ball x r


theorem DenseRange.preconnectedSpace [TopologicalSpace β] [PreconnectedSpace α] {f : α → β}
    (hf : DenseRange f) (hc : Continuous f) : PreconnectedSpace β

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[TopologicalSpace β]
[PreconnectedSpace α]
{f : α → β}
(hf : DenseRange f)
(hc : Continuous f)


protected theorem Subsingleton.antivary [Subsingleton ι] (f : ι → α) (g : ι → β) : Antivary f g

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


@[simp]
theorem specializes_prod {x₁ x₂ : X} {y₁ y₂ : Y} : (x₁, y₁) ⤳ (x₂, y₂) ↔ x₁ ⤳ x₂ ∧ y₁ ⤳ y₂

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{x₁ x₂ : X}
{y₁ y₂ : Y}


@[simp]
theorem matches'_epsilon : (1 : RegularExpression α).matches' = 1


@[simp]
theorem map_id : map (@id α) = id


@[simp, mfld_simps]
theorem mem_localTriv_source (p : Z.TotalSpace) : p ∈ (Z.localTriv i).source ↔ p.1 ∈ Z.baseSet i

{R : Type u_1}
{B : Type u_2}
{F : Type u_3}
[NontriviallyNormedField R]
[NormedAddCommGroup F]
[NormedSpace R F]
[TopologicalSpace B]
{ι : Type u_5}
(Z : VectorBundleCore R B F ι)
(i : ι)
(p : Z.TotalSpace)

p ∈ (Z.localTriv i).source ↔ p.proj ∈ Z.baseSet i


/-- A set is irreducible if and only if for every cover by a finite collection of closed sets, it is
contained in one of the members of the collection. -/
theorem isIrreducible_iff_sUnion_closed :
    IsIrreducible s ↔
      ∀ t : Finset (Set X), (∀ z ∈ t, IsClosed z) → (s ⊆ ⋃₀ ↑t) → ∃ z ∈ t, s ⊆ z

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

IsIrreducible s ↔ ∀ (t : Finset (Set X)), (∀ z ∈ t, IsClosed z) → s ⊆ ⋃₀ ↑t → ∃ z ∈ t, s ⊆ z


theorem subsetProdLex [PartialOrder α] [Preorder β] {s : Set (α ×ₗ β)}
    (hα : ((fun (x : α ×ₗ β) => (ofLex x).1)'' s).IsPWO)
    (hβ : ∀ a, {y | toLex (a, y) ∈ s}.IsPWO) : s.IsPWO

(hα : ((fun x => (ofLex x).1) '' s).IsPWO)

(hβ : ∀ (a : α), {y | toLex (a, y) ∈ s}.IsPWO)


theorem Ideal.isHomogeneous_iff_subset_iInter :
    I.IsHomogeneous 𝒜 ↔ (I : Set A) ⊆ ⋂ i, GradedRing.proj 𝒜 i ⁻¹' ↑I

{ι : Type u_1}
{σ : Type u_2}
{A : Type u_4}
[Semiring A]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
[DecidableEq ι]
[AddMonoid ι]
[GradedRing 𝒜]
(I : Ideal A)

Ideal.IsHomogeneous 𝒜 I ↔ ↑I ⊆ ⋂ i, ⇑(GradedRing.proj 𝒜 i) ⁻¹' ↑I


/-- The third projection functor `ShortComplex C ⥤ C`. -/
@[simps]
def π₃ : ShortComplex C ⥤ C

CategoryTheory.ShortComplex.π₃.obj S = S.X₃


theorem HasFDerivWithinAt.const_rpow (hf : HasFDerivWithinAt f f' s x) (hc : 0 < c) :
    HasFDerivWithinAt (fun x => c ^ f x) ((c ^ f x * Real.log c) • f') s x

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : E → ℝ}
{f' : E →L[ℝ] ℝ}
{x : E}
{s : Set E}
{c : ℝ}
(hf : HasFDerivWithinAt f f' s x)
(hc : 0 < c)


theorem mem_resolventSet_of_left_right_inverse {r : R} {a b c : A} (h₁ : (↑ₐ r - a) * b = 1)
    (h₂ : c * (↑ₐ r - a) = 1) : r ∈ resolventSet R a

{R : Type u}
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
{r : R}
{a b c : A}
(h₁ : ((algebraMap R A) r - a) * b = 1)
(h₂ : c * ((algebraMap R A) r - a) = 1)


@[simp]
theorem coe_top : ((⊤ : Subring R) : Set R) = Set.univ


theorem condexpIndL1Fin_disjoint_union (hs : MeasurableSet s) (ht : MeasurableSet t) (hμs : μ s ≠ ∞)
    (hμt : μ t ≠ ∞) (hst : s ∩ t = ∅) (x : G) :
    condexpIndL1Fin hm (hs.union ht) ((measure_union_le s t).trans_lt
      (lt_top_iff_ne_top.mpr (ENNReal.add_ne_top.mpr ⟨hμs, hμt⟩))).ne x =
    condexpIndL1Fin hm hs hμs x + condexpIndL1Fin hm ht hμt x

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs : MeasurableSet s)
(ht : MeasurableSet t)
(hμs : μ s ≠ ⊤)
(hμt : μ t ≠ ⊤)
(hst : s ∩ t = ∅)
(x : G)

MeasureTheory.condexpIndL1Fin hm ⋯ ⋯ x =
  MeasureTheory.condexpIndL1Fin hm hs hμs x + MeasureTheory.condexpIndL1Fin hm ht hμt x


theorem root_mul_right_of_isRoot {p : R[X]} (q : R[X]) : IsRoot p a → IsRoot (p * q) a

{R : Type u}
{a : R}
[CommSemiring R]
{p : R[X]}
(q : R[X])


/-- We prefer `PFunctor.map` to `Functor.map` because it is universe-polymorphic. -/
@[simp]
theorem map_eq_map {α β : Type v} (f : α → β) (x : P α) : f <$> x = P.map f x

(P : PFunctor.{u})
{α β : Type v}
(f : α → β)
(x : ↑P α)


theorem inl_fst_add_inr_snd_eq [AddZeroClass R] [AddZeroClass A] (x : Unitization R A) :
    inl x.fst + (x.snd : Unitization R A) = x

{R : Type u_3}
{A : Type u_4}
[AddZeroClass R]
[AddZeroClass A]
(x : Unitization R A)


@[to_additive vadd.instNeBot]
lemma smul.instNeBot [NeBot f] [NeBot g] : NeBot (f • g)

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f : Filter α}
{g : Filter β}
[f.NeBot]
[g.NeBot]


@[simp]
theorem recOn_one {p} (p1 hp) : @PNat.recOn 1 p p1 hp = p1


theorem sup_compl_le_himp : b ⊔ aᶜ ≤ a ⇨ b

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

b ⊔ aᶜ ≤ a ⇨ b


lemma Subsingleton.inter_singleton : (s ∩ {a}).Subsingleton


@[to_additive]
protected theorem mul_le_iff_le_one_right [MulOneClass α] [CovariantClass α α (· * ·) (· ≤ ·)]
    {a b : α} (ha : MulLECancellable a) :
    a * b ≤ a ↔ b ≤ 1

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


@[simp]
theorem pure_inj {a b : α} : (pure a : Semiquot α) = pure b ↔ a = b


/-- In a dense conditionally complete linear order, the set of preconnected sets is exactly
the set of the intervals `Icc`, `Ico`, `Ioc`, `Ioo`, `Ici`, `Ioi`, `Iic`, `Iio`, `(-∞, +∞)`,
or `∅`. Though one can represent `∅` as `(sInf s, sInf s)`, we include it into the list of
possible cases to improve readability. -/
theorem setOf_isPreconnected_eq_of_ordered :
    { s : Set α | IsPreconnected s } =
      -- bounded intervals
      range (uncurry Icc) ∪ range (uncurry Ico) ∪ range (uncurry Ioc) ∪ range (uncurry Ioo) ∪
      -- unbounded intervals and `univ`
      (range Ici ∪ range Ioi ∪ range Iic ∪ range Iio ∪ {univ, ∅})

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

{s | IsPreconnected s} =
  Set.range (Function.uncurry Set.Icc) ∪ Set.range (Function.uncurry Set.Ico) ∪ Set.range (Function.uncurry Set.Ioc) ∪
      Set.range (Function.uncurry Set.Ioo) ∪
    (Set.range Set.Ici ∪ Set.range Set.Ioi ∪ Set.range Set.Iic ∪ Set.range Set.Iio ∪ {Set.univ, ∅})


/-- In finite dimensions over a non-discrete complete normed field, the canonical identification
(in terms of a basis) with `𝕜^n` (endowed with the product topology) is continuous.
This is the key fact which makes all linear maps from a T2 finite dimensional TVS over such a field
continuous (see `LinearMap.continuous_of_finiteDimensional`), which in turn implies that all
norms are equivalent in finite dimensions. -/
theorem continuous_equivFun_basis [T2Space E] {ι : Type*} [Finite ι] (ξ : Basis ι 𝕜 E) :
    Continuous ξ.equivFun

{𝕜 : Type u}
[hnorm : NontriviallyNormedField 𝕜]
{E : Type v}
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousSMul 𝕜 E]
[CompleteSpace 𝕜]
[T2Space E]
{ι : Type u_1}
[Finite ι]
(ξ : Basis ι 𝕜 E)


theorem not_anisotropic_iff_exists (Q : QuadraticMap R M N) :
    ¬Anisotropic Q ↔ ∃ x, x ≠ 0 ∧ Q x = 0

{R : Type u_3}
{M : Type u_4}
{N : Type u_5}
[CommSemiring R]
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(Q : QuadraticMap R M N)


theorem integral_empty : ∫ x in ∅, f x ∂μ = 0

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : X → E}
{μ : MeasureTheory.Measure X}


{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(k : ℕ)
(N : LieSubmodule R L M)


theorem ae_eq (h : QuasiMeasurePreserving f μa μb) {g₁ g₂ : β → δ} (hg : g₁ =ᵐ[μb] g₂) :
    g₁ ∘ f =ᵐ[μa] g₂ ∘ f

(h : MeasureTheory.Measure.QuasiMeasurePreserving f μa μb)

{g₁ g₂ : β → δ}


theorem lowerCrossingTime_mono (hnm : n ≤ m) :
    lowerCrossingTime a b f N n ω ≤ lowerCrossingTime a b f N m ω

{Ω : Type u_1}
{ι : Type u_2}
[ConditionallyCompleteLinearOrderBot ι]
{a b : ℝ}
{f : ι → Ω → ℝ}
{N : ι}
{n m : ℕ}
{ω : Ω}
(hnm : n ≤ m)

MeasureTheory.lowerCrossingTime a b f N n ω ≤ MeasureTheory.lowerCrossingTime a b f N m ω


/-- The definition of the congruence relation defined by a monoid homomorphism's kernel. -/
@[to_additive (attr := simp) "The definition of the additive congruence relation defined by an
`AddMonoid` homomorphism's kernel."]
theorem ker_rel (f : M →* P) {x y} : ker f x y ↔ f x = f y

{M : Type u_1}
{P : Type u_3}
[MulOneClass M]
[MulOneClass P]
(f : M →* P)
{x y : M}


/-- A homeomorphism of spaces gives an equivalence of categories of presheaves. -/
@[simps!]
def presheafEquivOfIso {X Y : TopCat} (H : X ≅ Y) : X.Presheaf C ≌ Y.Presheaf C

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{X Y : TopCat}
(H : X ≅ Y)

∀ (X_1 : (TopologicalSpace.Opens ↑X)ᵒᵖ ⥤ C) (X_2 : (TopologicalSpace.Opens ↑X)ᵒᵖ),
  ((TopCat.Presheaf.presheafEquivOfIso C H).unitIso.inv.app X_1).app X_2 =
    X_1.map
        ((TopologicalSpace.Opens.mapMapIso H).symm.op.unit.app
          (Opposite.op
            ((TopologicalSpace.Opens.map H.hom).obj ((TopologicalSpace.Opens.map H.inv).obj (Opposite.unop X_2))))) ≫
      X_1.map
          ((TopologicalSpace.Opens.map H.hom).map
              ((TopologicalSpace.Opens.mapMapIso H).symm.op.counit.app
                  (Opposite.op ((TopologicalSpace.Opens.map H.inv).obj (Opposite.unop X_2)))).unop).op ≫
        X_1.map ((TopologicalSpace.Opens.mapMapIso H).symm.op.unitInv.app X_2)


theorem inter_eq_inter_iff_right : s ∩ u = t ∩ u ↔ t ∩ u ⊆ s ∧ s ∩ u ⊆ t

{α : Type u_1}
[DecidableEq α]
{s t u : Finset α}


theorem SuperpolynomialDecay.inv_param_mul (hk : Tendsto k l atTop)
    (hf : SuperpolynomialDecay l k f) : SuperpolynomialDecay l k (k⁻¹ * f)

(hf : Asymptotics.SuperpolynomialDecay l k f)

Asymptotics.SuperpolynomialDecay l k (k⁻¹ * f)


@[simp]
theorem succAbove_cycleRange {n : ℕ} (i j : Fin n) :
    i.succ.succAbove (i.cycleRange j) = swap 0 i.succ j.succ

i.succ.succAbove (i.cycleRange j) = (Equiv.swap 0 i.succ) j.succ


theorem le_sup_right_iff_inf_left_le {a b} (h : IsCompl x y) : a ≤ b ⊔ y ↔ a ⊓ x ≤ b

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


@[simp]
theorem map_cons {n : ℕ} (f : α → β) (a : α) (s : Sym α n) : (a ::ₛ s).map f = f a ::ₛ s.map f

{α : Type u_1}
{β : Type u_2}
{n : ℕ}
(f : α → β)
(a : α)
(s : Sym α n)

Sym.map f (a ::ₛ s) = f a ::ₛ Sym.map f s


@[simp, norm_cast]
theorem coe_comap {m : α → β} (u : Ultrafilter β) (inj : Injective m) (large : Set.range m ∈ u) :
    (u.comap inj large : Filter α) = Filter.comap m u

{α : Type u}
{β : Type v}
{m : α → β}
(u : Ultrafilter β)
(inj : Function.Injective m)
(large : Set.range m ∈ u)

↑(u.comap inj large) = Filter.comap m ↑u


@[simp]
theorem ite_empty (s s' : Set α) : Set.ite ∅ s s' = s'


theorem sin_pos_of_pos_of_lt_pi {x : ℝ} (h0x : 0 < x) (hxp : x < π) : 0 < sin x

{x : ℝ}
(h0x : 0 < x)
(hxp : x < Real.pi)


@[measurability, fun_prop]
theorem Measurable.ennnorm {f : β → α} (hf : Measurable f) : Measurable fun a => (‖f a‖₊ : ℝ≥0∞)

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[NormedAddCommGroup α]
[OpensMeasurableSpace α]
[MeasurableSpace β]
{f : β → α}
(hf : Measurable f)


theorem Convex.smul_preimage (hs : Convex 𝕜 s) (c : 𝕜) : Convex 𝕜 ((fun z => c • z) ⁻¹' s)

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedCommSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
(c : 𝕜)


@[simp]
theorem derivative_map [Semiring S] (p : R[X]) (f : R →+* S) :
    derivative (p.map f) = p.derivative.map f

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

Polynomial.derivative (Polynomial.map f p) = Polynomial.map f (Polynomial.derivative p)


@[simp]
theorem map_wittPolynomial (f : R →+* S) (n : ℕ) : map f (W n) = W n

(p : ℕ)
{R : Type u_1}
[CommRing R]
{S : Type u_2}
[CommRing S]
(f : R →+* S)
(n : ℕ)


@[simp]
theorem natDegree_one : natDegree (1 : R[X]) = 0


@[to_additive] lemma mabs_pow (n : ℕ) (a : α) : |a ^ n|ₘ = |a|ₘ ^ n

{α : Type u_1}
[LinearOrderedCommGroup α]
(n : ℕ)
(a : α)


lemma polyCharpoly_coeff_eq_zero_iff_of_basis (b : Basis ι R L) (b' : Basis ι' R L) (k : ℕ) :
    (polyCharpoly φ b).coeff k = 0 ↔ (polyCharpoly φ b').coeff k = 0

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

(φ.polyCharpoly b).coeff k = 0 ↔ (φ.polyCharpoly b').coeff k = 0


theorem blur_eq_blur' (q : Semiquot α) (s : Set α) (h : q.s ⊆ s) : blur s q = blur' q h

{α : Type u_1}
(q : Semiquot α)
(s : Set α)
(h : q.s ⊆ s)


@[simp]
theorem toLex_update_lt_self_iff : toLex (update x i a) < toLex x ↔ a < x i

{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
{x : (i : ι) → β i}
{i : ι}
{a : β i}

toLex (Function.update x i a) < toLex x ↔ a < x i


/-- Equivalence of categories is symmetric. -/
@[symm, simps]
def symm (e : C ≌ D) : D ≌ C

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


@[simp]
theorem trans_conj {Z : C} (β : Y ≅ Z) (f : End X) : (α ≪≫ β).conj f = β.conj (α.conj f)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y : C}
(α : X ≅ Y)
{Z : C}
(β : Y ≅ Z)
(f : CategoryTheory.End X)


theorem Ideal.pow_lt_self (I : Ideal A) (hI0 : I ≠ ⊥) (hI1 : I ≠ ⊤) (e : ℕ) (he : 2 ≤ e) :
    I ^ e < I

{A : Type u_2}
[CommRing A]
[IsDedekindDomain A]
(I : Ideal A)
(hI0 : I ≠ ⊥)
(hI1 : I ≠ ⊤)
(e : ℕ)
(he : 2 ≤ e)


theorem Monotone.convex_gt (hf : Monotone f) (r : β) : Convex 𝕜 { x | f x ≤ r }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{f : E → β}
(hf : Monotone f)
(r : β)


theorem cthickening_eq_iInter_cthickening' {δ : ℝ} (s : Set ℝ) (hsδ : s ⊆ Ioi δ)
    (hs : ∀ ε, δ < ε → (s ∩ Ioc δ ε).Nonempty) (E : Set α) :
    cthickening δ E = ⋂ ε ∈ s, cthickening ε E

(hs : ∀ (ε : ℝ), δ < ε → (s ∩ Set.Ioc δ ε).Nonempty)

Metric.cthickening δ E = ⋂ ε ∈ s, Metric.cthickening ε E


@[simp]
theorem res_succ (x : ℕ → α) (n : ℕ) : res x n.succ = x n :: res x n

PiNat.res x n.succ = x n :: PiNat.res x n


@[simp]
theorem wittZero_eq_zero (n : ℕ) : wittZero p n = 0

(p : ℕ)
[hp : Fact (Nat.Prime p)]
(n : ℕ)


@[to_additive (attr := simp)]
theorem mem_top (x : M) : x ∈ (⊤ : Subsemigroup M)


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

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


/-- A Prop-valued class for a bilinear form to be compatible with a root pairing. -/
class IsRootPositive (P : RootPairing ι R M N) (B : M →ₗ[R] M →ₗ[R] R) : Prop where
  zero_lt_apply_root : ∀ i, 0 < B (P.root i) (P.root i)
  symm : ∀ x y, B x y = B y x
  apply_reflection_eq : ∀ i x y, B (P.reflection i x) (P.reflection i y) = B x y

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[LinearOrderedCommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
{P : RootPairing ι R M N}
{B : M →ₗ[R] M →ₗ[R] R}
[self : P.IsRootPositive B]
(i : ι)
(x y : M)

(B ((P.reflection i) x)) ((P.reflection i) y) = (B x) y


/-- The chosen kernels and cokernels of the limits API give a `LeftHomologyData` -/
@[simps]
noncomputable def ofHasKernelOfHasCokernel
    [HasKernel S.g] [HasCokernel (kernel.lift S.g S.f S.zero)] :
    S.LeftHomologyData

[CategoryTheory.Limits.HasCokernel (CategoryTheory.Limits.kernel.lift S.g S.f ⋯)]

(CategoryTheory.ShortComplex.LeftHomologyData.ofHasKernelOfHasCokernel S).K = CategoryTheory.Limits.kernel S.g


theorem Perm.bagInter_right {l₁ l₂ : List α} (t : List α) (h : l₁ ~ l₂) :
    l₁.bagInter t ~ l₂.bagInter t

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


theorem mul_coeff [NonUnitalNonAssocSemiring R] {x y : HahnSeries Γ R} {a : Γ} :
    (x * y).coeff a =
      ∑ ij ∈ addAntidiagonal x.isPWO_support y.isPWO_support a, x.coeff ij.fst * y.coeff ij.snd

{Γ : Type u_1}
{R : Type u_3}
[OrderedCancelAddCommMonoid Γ]
[NonUnitalNonAssocSemiring R]
{x y : HahnSeries Γ R}
{a : Γ}

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


@[simp]
theorem Path.cast_rfl_rfl {u v : U} (p : Path u v) : p.cast rfl rfl = p

{U : Type u_1}
[Quiver U]
{u v : U}
(p : Quiver.Path u v)


theorem mk_eq_two_iff' (x : α) : #α = 2 ↔ ∃! y, y ≠ x


@[simp]
theorem guard_false {h : Decidable False} : @guard F _ False h = failure

{F : Type → Type v}
[Alternative F]
{h : Decidable False}


theorem pointwise_vadd_span (v : V) (s : Set P) : v +ᵥ affineSpan k s = affineSpan k (v +ᵥ s)

{k : Type u_1}
[Ring k]
{V : Type u_2}
{P : Type u_3}
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(v : V)
(s : Set P)


@[simp]
theorem parallelFamily_map_left {j : J} : (parallelFamily f).map (line j) = f j

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

(CategoryTheory.Limits.parallelFamily f).map (CategoryTheory.Limits.WalkingParallelFamily.Hom.line j) = f j


@[simp]
lemma eq_nnratCast [DivisionSemiring α] [FunLike F ℚ≥0 α] [RingHomClass F ℚ≥0 α] (f : F) (q : ℚ≥0) :
    f q = q

{F : Type u_1}
{α : Type u_3}
[DivisionSemiring α]
[FunLike F ℚ≥0 α]
[RingHomClass F ℚ≥0 α]
(f : F)
(q : ℚ≥0)


/-- The functor `Comma L R ⥤ Comma L' R'` induced by three functors `F₁`, `F₂`, `F`
and two natural transformations `F₁ ⋙ L' ⟶ L ⋙ F` and `R ⋙ F ⟶ F₂ ⋙ R'`. -/
@[simps]
def map : Comma L R ⥤ Comma L' R'

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
{A' : Type u_1}
{B' : Type u_2}
{T' : Type u_3}
[CategoryTheory.Category.{u_4, u_1} A']
[CategoryTheory.Category.{u_5, u_2} B']
[CategoryTheory.Category.{u_6, u_3} T']
{L : CategoryTheory.Functor A T}
{R : CategoryTheory.Functor B T}
{L' : CategoryTheory.Functor A' T'}
{R' : CategoryTheory.Functor B' T'}
{F₁ : CategoryTheory.Functor A A'}
{F₂ : CategoryTheory.Functor B B'}
{F : CategoryTheory.Functor T T'}
(α : F₁.comp L' ⟶ L.comp F)
(β : R.comp F ⟶ F₂.comp R')
(X : CategoryTheory.Comma L R)

((CategoryTheory.Comma.map α β).obj X).right = F₂.obj X.right


private theorem fastJacobiSymAux.eq_jacobiSym {a b : ℕ} {flip : Bool} {ha0 : a > 0}
    (hb2 : b % 2 = 1) (hb1 : b > 1) :
    fastJacobiSymAux a b flip ha0 = if flip then -J(a | b) else J(a | b)

fastJacobiSymAux a b flip ha0 = if flip = true then -jacobiSym (↑a) b else jacobiSym (↑a) b