@[simp, norm_cast] lemma coe_toAddMonoidHomEquiv_symm (ψ : A →+ Additive M) :
    ⇑(toAddMonoidHomEquiv.symm ψ) = Additive.toMul ∘ ψ

{A : Type u_1}
{M : Type u_3}
[AddMonoid A]
[Monoid M]
(ψ : A →+ Additive M)

⇑(AddChar.toAddMonoidHomEquiv.symm ψ) = ⇑Additive.toMul ∘ ⇑ψ


/-- If a group exponent exists, the group is torsion. -/
@[to_additive ExponentExists.is_add_torsion
      "If a group exponent exists, the group is additively torsion."]
theorem ExponentExists.isTorsion (h : ExponentExists G) : IsTorsion G

{G : Type u_1}
[Group G]
(h : Monoid.ExponentExists G)


protected lemma congr {g} (h : EventuallyConst f l) (hg : f =ᶠ[l] g) : EventuallyConst g l

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{f g : α → β}
(h : Filter.EventuallyConst f l)
(hg : f =ᶠ[l] g)


/-- Construct `Generators` from an assignment `I → S` such that `R[X] → S` is surjective. -/
@[simps val, simps (config := .lemmasOnly) vars]
noncomputable
def ofSurjective {vars} (val : vars → S) (h : Function.Surjective (aeval (R := R) val)) :
    Generators R S

(h : Function.Surjective ⇑(MvPolynomial.aeval val))

(Algebra.Generators.ofSurjective val h).vars = vars


theorem sUnion_lem {α β : Type u} (A : α → PSet) (B : β → PSet) (αβ : ∀ a, ∃ b, Equiv (A a) (B b)) :
    ∀ a, ∃ b, Equiv ((sUnion ⟨α, A⟩).Func a) ((sUnion ⟨β, B⟩).Func b)

(αβ : ∀ (a : α), ∃ b, (A a).Equiv (B b))

∃ b, ((⋃₀ PSet.mk α A).Func a).Equiv ((⋃₀ PSet.mk β B).Func b)


/-- A family of algebra equivalences `∀ i, (A₁ i ≃ₐ A₂ i)` generates a
multiplicative equivalence between `∀ i, A₁ i` and `∀ i, A₂ i`.

This is the `AlgEquiv` version of `Equiv.piCongrRight`, and the dependent version of
`AlgEquiv.arrowCongr`.
-/
@[simps apply]
def piCongrRight {R ι : Type*} {A₁ A₂ : ι → Type*} [CommSemiring R] [∀ i, Semiring (A₁ i)]
    [∀ i, Semiring (A₂ i)] [∀ i, Algebra R (A₁ i)] [∀ i, Algebra R (A₂ i)]
    (e : ∀ i, A₁ i ≃ₐ[R] A₂ i) : (∀ i, A₁ i) ≃ₐ[R] ∀ i, A₂ i

{R : Type u_1}
{ι : Type u_2}
{A₁ : ι → Type u_3}
{A₂ : ι → Type u_4}
[CommSemiring R]
[(i : ι) → Semiring (A₁ i)]
[(i : ι) → Semiring (A₂ i)]
[(i : ι) → Algebra R (A₁ i)]
[(i : ι) → Algebra R (A₂ i)]
(e : (i : ι) → A₁ i ≃ₐ[R] A₂ i)
(x : (i : ι) → A₁ i)
(j : ι)

(AlgEquiv.piCongrRight e) x j = (e j) (x j)


theorem dist_le_dist_pi_of_dist_lt {x y : ∀ i, F i} {i : ι} (h : dist x y < (1 / 2) ^ encode i) :
    dist (x i) (y i) ≤ dist x y

(h : dist x y < (1 / 2) ^ Encodable.encode i)


theorem get_append_right {as bs : Array α} {h : i < (as ++ bs).size} (hle : as.size ≤ i)
    (hlt : i - as.size < bs.size := Nat.sub_lt_left_of_lt_add hle (size_append .. ▸ h)) :
    (as ++ bs)[i] = bs[i - as.size]

{α : Type u_1}
{i : Nat}
{as bs : Array α}
{h : i < (as ++ bs).size}
(hle : as.size ≤ i)
(hlt : i - as.size < bs.size := ⋯)


theorem lowerBounds_Ici : lowerBounds (Ici a) = Iic a


lemma coreflection_eq_flip_reflection :
    P.coreflection i = P.flip.reflection i

{ι : 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 : ι)


theorem WfDvdMonoid.max_power_factor [CommMonoidWithZero α] [WfDvdMonoid α] {a₀ x : α}
    (h : a₀ ≠ 0) (hx : Irreducible x) : ∃ (n : ℕ) (a : α), ¬x ∣ a ∧ a₀ = x ^ n * a

{α : Type u_1}
[CommMonoidWithZero α]
[WfDvdMonoid α]
{a₀ x : α}
(h : a₀ ≠ 0)
(hx : Irreducible x)


/-- An iterated biproduct is a biproduct over a sigma type. -/
@[simps]
def biproductBiproductIso {ι} (f : ι → Type*) (g : (i : ι) → (f i) → C)
    [∀ i, HasBiproduct (g i)] [HasBiproduct fun i => ⨁ g i] :
    (⨁ fun i => ⨁ g i) ≅ (⨁ fun p : Σ i, f i => g p.1 p.2)

[∀ (i : ι), CategoryTheory.Limits.HasBiproduct (g i)]

[CategoryTheory.Limits.HasBiproduct fun i => ⨁ g i]

(CategoryTheory.Limits.biproductBiproductIso f g).hom =
  CategoryTheory.Limits.biproduct.lift fun x =>
    match x with
    | ⟨i, x⟩ => CategoryTheory.Limits.biproduct.π (fun i => ⨁ g i) i ≫ CategoryTheory.Limits.biproduct.π (g i) x


theorem evaln_complete {c n x} : x ∈ eval c n ↔ ∃ k, x ∈ evaln k c n

x ∈ c.eval n ↔ ∃ k, x ∈ Nat.Partrec.Code.evaln k c n


@[simp]
lemma shiftFunctorZero_inv_app_obj_of_induced (X : C) :
    letI := HasShift.induced F A s i
    (shiftFunctorZero D A).inv.app (F.obj X) =
      F.map ((shiftFunctorZero C A).inv.app X) ≫ (i 0).inv.app X

(i : (a : A) → F.comp (s a) ≅ (CategoryTheory.shiftFunctor C a).comp F)

[((CategoryTheory.whiskeringLeft C D D).obj F).Full]

[((CategoryTheory.whiskeringLeft C D D).obj F).Faithful]

(CategoryTheory.shiftFunctorZero D A).inv.app (F.obj X) =
  CategoryTheory.CategoryStruct.comp (F.map ((CategoryTheory.shiftFunctorZero C A).inv.app X)) ((i 0).inv.app X)


theorem IntegrableOn.integrable (h : IntegrableOn f s μ) : Integrable f (μ.restrict s)

{α : Type u_1}
{E : Type u_3}
[MeasurableSpace α]
[NormedAddCommGroup E]
{f : α → E}
{s : Set α}
{μ : MeasureTheory.Measure α}
(h : MeasureTheory.IntegrableOn f s μ)

MeasureTheory.Integrable f (μ.restrict s)


theorem lcm_comm [NormalizedGCDMonoid α] (a b : α) : lcm a b = lcm b a

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


/-- Closed seminorm-balls are convex. -/
theorem convex_closedBall : Convex ℝ (closedBall p x r)

{𝕜 : Type u_3}
{E : Type u_7}
[NormedField 𝕜]
[AddCommGroup E]
[NormedSpace ℝ 𝕜]
[Module 𝕜 E]
[Module ℝ E]
[IsScalarTower ℝ 𝕜 E]
(p : Seminorm 𝕜 E)
(x : E)
(r : ℝ)


theorem divX_X_pow : divX (X ^ n : R[X]) = if (n = 0) then 0 else X ^ (n - 1)

(Polynomial.X ^ n).divX = if n = 0 then 0 else Polynomial.X ^ (n - 1)


@[simp, norm_cast]
theorem coe_vsub (s t : Finset β) : (↑(s -ᵥ t) : Set α) = (s : Set β) -ᵥ t

{α : Type u_2}
{β : Type u_3}
[VSub α β]
[DecidableEq α]
(s t : Finset β)


theorem nodup_append {l₁ l₂ : List α} :
    Nodup (l₁ ++ l₂) ↔ Nodup l₁ ∧ Nodup l₂ ∧ Disjoint l₁ l₂

(l₁ ++ l₂).Nodup ↔ l₁.Nodup ∧ l₂.Nodup ∧ l₁.Disjoint l₂


/-- The list `List.ofFn f` is sorted with respect to `(· ≤ ·)` if and only if `f` is monotone. -/
@[simp] theorem sorted_le_ofFn_iff : (ofFn f).Sorted (· ≤ ·) ↔ Monotone f

{n : ℕ}
{α : Type u}
{f : Fin n → α}
[Preorder α]

List.Sorted (fun x x_1 => x ≤ x_1) (List.ofFn f) ↔ Monotone f


@[to_additive] -- Porting note: was `@[simp]`
theorem integral_div_right_eq_self [IsMulRightInvariant μ] (f : G → E) (g : G) :
    (∫ x, f (x / g) ∂μ) = ∫ x, f x ∂μ

{G : Type u_4}
{E : Type u_5}
[MeasurableSpace G]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{μ : MeasureTheory.Measure G}
[Group G]
[MeasurableMul G]
[μ.IsMulRightInvariant]
(f : G → E)
(g : G)

∫ (x : G), f (x / g) ∂μ = ∫ (x : G), f x ∂μ


@[nontriviality]
lemma apply_eq_zero_of_isEmpty [IsEmpty α] {_ : MeasurableSpace α} (μ : Measure α) (s : Set α) :
    μ s = 0

∀ {x : MeasurableSpace α} (μ : MeasureTheory.Measure α) (s : Set α), μ s = 0


theorem FarFromTriangleFree.not_cliqueFree (hG : G.FarFromTriangleFree ε) (hε : 0 < ε) :
    ¬G.CliqueFree 3

{α : Type u_1}
{𝕜 : Type u_3}
[LinearOrderedField 𝕜]
{G : SimpleGraph α}
{ε : 𝕜}
[Fintype α]
[DecidableRel G.Adj]
[Nonempty α]
(hG : G.FarFromTriangleFree ε)
(hε : 0 < ε)


/-- Formula `f` subsumes `f'` if all the clauses in `f'` are in `f`.
We use this to prove that all clauses in the formula are subsumed by it. -/
structure Fmla.subsumes (f f' : Fmla) : Prop where
  prop : ∀ x, x ∈ f' → x ∈ f

{f f' : Sat.Fmla}
(self : f.subsumes f')
(x : Sat.Clause)


/-- Two affine subspaces with the same direction and nonempty intersection are equal. -/
theorem ext_of_direction_eq {s1 s2 : AffineSubspace k P} (hd : s1.direction = s2.direction)
    (hn : ((s1 : Set P) ∩ s2).Nonempty) : s1 = s2

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s1 s2 : AffineSubspace k P}
(hd : s1.direction = s2.direction)
(hn : (↑s1 ∩ ↑s2).Nonempty)


theorem scalingScaleOf_pos (K : ℝ) : 0 < scalingScaleOf μ K

{α : Type u_1}
[MetricSpace α]
[MeasurableSpace α]
(μ : MeasureTheory.Measure α)
[IsUnifLocDoublingMeasure μ]
(K : ℝ)

0 < IsUnifLocDoublingMeasure.scalingScaleOf μ K


lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅

{α : Type u_1}
{β : α → Type u_2}
{i j : α}
{s : Set (β i)}
(h : i ≠ j)


theorem le_sup_of_mem_convexHull {s : Finset E} (hf : ConvexOn 𝕜 (convexHull 𝕜 (s : Set E)) f)
    (hx : x ∈ convexHull 𝕜 (s : Set E)) :
    f x ≤ s.sup' (coe_nonempty.1 <| convexHull_nonempty_iff.1 ⟨x, hx⟩) f

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[LinearOrderedAddCommGroup β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{f : E → β}
{x : E}
{s : Finset E}
(hf : ConvexOn 𝕜 ((convexHull 𝕜) ↑s) f)
(hx : x ∈ (convexHull 𝕜) ↑s)


theorem squarefree_iff_nodup_primeFactorsList {n : ℕ} (h0 : n ≠ 0) :
    Squarefree n ↔ n.primeFactorsList.Nodup


theorem tsub_lt_self : 0 < a → 0 < b → a - b < a

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


/-- The operator norm is submultiplicative. -/
theorem opNorm_comp_le (f : E →SL[σ₁₂] F) : ‖h.comp f‖ ≤ ‖h‖ * ‖f‖

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{E : Type u_4}
{F : Type u_6}
{G : Type u_8}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[SeminormedAddCommGroup G]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜₃ G]
{σ₁₂ : 𝕜 →+* 𝕜₂}
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
{σ₁₃ : 𝕜 →+* 𝕜₃}
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃]
[RingHomIsometric σ₁₂]
[RingHomIsometric σ₂₃]
(h : F →SL[σ₂₃] G)
(f : E →SL[σ₁₂] F)


@[ext]
theorem ext {f f' : M [⋀^ι]→ₗ[R] N} (H : ∀ x, f x = f' x) : f = f'

{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}
{f f' : M [⋀^ι]→ₗ[R] N}
(H : ∀ (x : ι → M), f x = f' x)


theorem cprankMax_nil [Monoid α] [AddMonoid α] (x : Holor α nil) : CPRankMax 1 x

{α : Type}
[Monoid α]
[AddMonoid α]
(x : Holor α [])


@[simp]
theorem join_nil : join nil = (nil : WSeq α)


@[simp]
theorem liftRel_think_right (R : α → β → Prop) (s t) : LiftRel R s (think t) ↔ LiftRel R s t

{α : Type u}
{β : Type v}
(R : α → β → Prop)
(s : Stream'.WSeq α)
(t : Stream'.WSeq β)

Stream'.WSeq.LiftRel R s t.think ↔ Stream'.WSeq.LiftRel R s t


@[fun_prop]
theorem differentiableWithinAt_fst {s : Set (E × F)} : DifferentiableWithinAt 𝕜 Prod.fst s p

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : E × F}
{s : Set (E × F)}


theorem mem_maximalAtlas_iff {e : PartialHomeomorph M H} :
    e ∈ G.maximalAtlas M ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{G : StructureGroupoid H}
{e : PartialHomeomorph M H}

e ∈ StructureGroupoid.maximalAtlas M G ↔ ∀ e' ∈ atlas H M, e.symm ≫ₕ e' ∈ G ∧ e'.symm ≫ₕ e ∈ G


@[simp]
theorem LeftExactFunctor.of_fst (F : C ⥤ D) [PreservesFiniteLimits F] :
    (LeftExactFunctor.of F).obj = F

(CategoryTheory.LeftExactFunctor.of F).obj = F


theorem toFinsupp_inter (s t : Multiset α) : toFinsupp (s ∩ t) = toFinsupp s ⊓ toFinsupp t

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

Multiset.toFinsupp (s ∩ t) = Multiset.toFinsupp s ⊓ Multiset.toFinsupp t


theorem closedBall_subset_target (hf : ApproximatesLinearOn f (f' : E →L[𝕜] F) s c)
    (hc : Subsingleton E ∨ c < N⁻¹) (hs : IsOpen s) {b : E} (ε0 : 0 ≤ ε) (hε : closedBall b ε ⊆ s) :
    closedBall (f b) ((N⁻¹ - c) * ε) ⊆ (hf.toPartialHomeomorph f s hc hs).target

(hc : Subsingleton E ∨ c < ‖↑f'.symm‖₊⁻¹)

Metric.closedBall (f b) ((↑‖↑f'.symm‖₊⁻¹ - ↑c) * ε) ⊆ (ApproximatesLinearOn.toPartialHomeomorph f s hf hc hs).target


@[higher_order fst_comp_snd]
theorem fst_snd {α₀ α₁ β₀ β₁} (f : α₀ → α₁) (f' : β₀ → β₁) (x : F α₀ β₀) :
    fst f (snd f' x) = bimap f f' x

{F : Type u₀ → Type u₁ → Type u₂}
[Bifunctor F]
[LawfulBifunctor F]
{α₀ α₁ : Type u₀}
{β₀ β₁ : Type u₁}
(f : α₀ → α₁)
(f' : β₀ → β₁)

Bifunctor.fst f ∘ Bifunctor.snd f' = bimap f f'


theorem inter_congr_left (ht : s ∩ u ⊆ t) (hu : s ∩ t ⊆ u) : s ∩ t = s ∩ u

{α : Type u_1}
[DecidableEq α]
{s t u : Finset α}
(ht : s ∩ u ⊆ t)
(hu : s ∩ t ⊆ u)


@[simp]
theorem smallSets_top : (⊤ : Filter α).smallSets = ⊤


theorem EuclideanSpace.inner_single_left (i : ι) (a : 𝕜) (v : EuclideanSpace 𝕜 ι) :
    ⟪EuclideanSpace.single i (a : 𝕜), v⟫ = conj a * v i

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[DecidableEq ι]
[Fintype ι]
(i : ι)
(a : 𝕜)
(v : EuclideanSpace 𝕜 ι)

⟪EuclideanSpace.single i a, v⟫_𝕜 = (starRingEnd 𝕜) a * v i


/-- Construction of the homotopy from `PInfty` to the identity using eventually
(termwise) constant homotopies from `P q` to the identity for all `q` -/
@[simps]
def homotopyPInftyToId : Homotopy (PInfty : K[X] ⟶ _) (𝟙 _)

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
(X : CategoryTheory.SimplicialObject C)
(i j : ℕ)

(AlgebraicTopology.DoldKan.homotopyPInftyToId X).hom i j = (AlgebraicTopology.DoldKan.homotopyPToId X (j + 1)).hom i j


/-- A weighted sum of pairwise subtractions, where the point on the left is constant,
expressed as a subtraction involving a `weightedVSubOfPoint` expression. -/
theorem sum_smul_const_vsub_eq_sub_weightedVSubOfPoint (w : ι → k) (p₂ : ι → P) (p₁ b : P) :
    (∑ i ∈ s, w i • (p₁ -ᵥ p₂ i)) = (∑ i ∈ s, w i) • (p₁ -ᵥ b) - s.weightedVSubOfPoint p₂ b w

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[S : AffineSpace V P]
{ι : Type u_4}
(s : Finset ι)
(w : ι → k)
(p₂ : ι → P)
(p₁ b : P)

∑ i ∈ s, w i • (p₁ -ᵥ p₂ i) = (∑ i ∈ s, w i) • (p₁ -ᵥ b) - (s.weightedVSubOfPoint p₂ b) w


lemma integrable_add_iff_of_nonneg {f g : α → ℝ} (h_meas : AEStronglyMeasurable f μ)
    (hf : 0 ≤ᵐ[μ] f) (hg : 0 ≤ᵐ[μ] g) :
    Integrable (f + g) μ ↔ Integrable f μ ∧ Integrable g μ

(h_meas : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.Integrable (f + g) μ ↔ MeasureTheory.Integrable f μ ∧ MeasureTheory.Integrable g μ


theorem Faithful.of_comp_iso {H : C ⥤ E} [H.Faithful] (h : F ⋙ G ≅ H) : F.Faithful

{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 D}
{G : CategoryTheory.Functor D E}
{H : CategoryTheory.Functor C E}
[H.Faithful]
(h : F.comp G ≅ H)


@[to_additive]
theorem comap_equiv_eq_map_symm (f : N ≃* G) (K : Subgroup G) :
    K.comap (G := N) f = K.map f.symm

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : N ≃+ G)
(K : AddSubgroup G)

AddSubgroup.comap (↑f) K = AddSubgroup.map (↑f.symm) K


@[simp]
theorem Integrable.of_finite [Finite α] [MeasurableSpace α] [MeasurableSingletonClass α]
    (μ : Measure α) [IsFiniteMeasure μ] (f : α → β) : Integrable (fun a ↦ f a) μ

{α : Type u_1}
{β : Type u_2}
[NormedAddCommGroup β]
[Finite α]
[MeasurableSpace α]
[MeasurableSingletonClass α]
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]
(f : α → β)

MeasureTheory.Integrable (fun a => f a) μ


@[functor_norm]
theorem Functor.map_map (m : α → β) (g : β → γ) (x : f α) : g <$> m <$> x = (g ∘ m) <$> x

{α β γ : Type u}
{f : Type u → Type v}
[Functor f]
[LawfulFunctor f]
(m : α → β)
(g : β → γ)
(x : f α)


/-- Subsemigroups of semigroup `M` are isomorphic to additive subsemigroups of `Additive M`. -/
@[simps]
def Subsemigroup.toAddSubsemigroup : Subsemigroup M ≃o AddSubsemigroup (Additive M)

{M : Type u_1}
[Mul M]
(S : AddSubsemigroup (Additive M))

↑((RelIso.symm Subsemigroup.toAddSubsemigroup) S) = ⇑Additive.ofMul ⁻¹' ↑S


theorem padicValInt_dvd_iff (n : ℕ) (a : ℤ) : (p : ℤ) ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValInt p a

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

↑p ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValInt p a


theorem ContDiffOn.deriv_of_isOpen (hf : ContDiffOn 𝕜 n f₂ s₂) (hs : IsOpen s₂) (hmn : m + 1 ≤ n) :
    ContDiffOn 𝕜 m (deriv f₂) s₂

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{m n : ℕ∞}
{f₂ : 𝕜 → F}
{s₂ : Set 𝕜}
(hf : ContDiffOn 𝕜 n f₂ s₂)
(hs : IsOpen s₂)
(hmn : m + 1 ≤ n)


theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l })

Set.range l.get? = insert none (some '' {x | x ∈ l})


theorem continuousOn_iff'_left [TopologicalSpace β] {f : β → α} {s : Set β} :
    ContinuousOn f s ↔ ∀ b ∈ s, Tendsto (fun x => (f x, f b)) (𝓝[s] b) (𝓤 α)

{α : Type ua}
{β : Type ub}
[UniformSpace α]
[TopologicalSpace β]
{f : β → α}
{s : Set β}

ContinuousOn f s ↔ ∀ b ∈ s, Filter.Tendsto (fun x => (f x, f b)) (𝓝[s] b) (𝓤 α)


@[simp]
theorem volume_Icc_pi_toReal {a b : ι → ℝ} (h : a ≤ b) :
    (volume (Icc a b)).toReal = ∏ i, (b i - a i)

{ι : Type u_1}
[Fintype ι]
{a b : ι → ℝ}
(h : a ≤ b)

(MeasureTheory.volume (Set.Icc a b)).toReal = ∏ i : ι, (b i - a i)


theorem infsep_zero : s.infsep = 0 ↔ s.einfsep = 0 ∨ s.einfsep = ∞

s.infsep = 0 ↔ s.einfsep = 0 ∨ s.einfsep = ⊤


theorem exists_rep {α : Sort u} {s : Setoid α} (q : Quotient s) : Exists (fun (a : α) => Quotient.mk s a = q)


theorem analyticSet_empty : AnalyticSet (∅ : Set α)


theorem lift_word_ping_pong {i j k} (w : NeWord H i j) (hk : j ≠ k) :
    lift f w.prod • X k ⊆ X i

(hpp : Pairwise fun i j => ∀ (h : H i), h ≠ 1 → (f i) h • X j ⊆ X i)

(Monoid.CoprodI.lift f) w.prod • X k ⊆ X i


theorem inter_left (hC : IsExposed 𝕜 A C) (hCB : C ⊆ B) : IsExposed 𝕜 (A ∩ B) C

{𝕜 : Type u_1}
{E : Type u_2}
[TopologicalSpace 𝕜]
[OrderedRing 𝕜]
[AddCommMonoid E]
[TopologicalSpace E]
[Module 𝕜 E]
{A B C : Set E}
(hC : IsExposed 𝕜 A C)
(hCB : C ⊆ B)


theorem LT.lt.cmp_eq_gt (h : x < y) : cmp y x = Ordering.gt

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


/-- Alternative constructor for `IndObjectPresentation` taking a cocone instead of its defining
    natural transformation. -/
@[simps]
def ofCocone {I : Type v} [SmallCategory I] [IsFiltered I] {F : I ⥤ C}
    (c : Cocone (F ⋙ yoneda)) (hc : IsColimit c) : IndObjectPresentation c.pt

(c : CategoryTheory.Limits.Cocone (F.comp CategoryTheory.yoneda))

(hc : CategoryTheory.Limits.IsColimit c)

(CategoryTheory.Limits.IndObjectPresentation.ofCocone c hc).I = I


lemma Affine.CoordinateRing.mk_Ψ_sq (n : ℤ) : mk W (W.Ψ n) ^ 2 = mk W (C <| W.ΨSq n)

{R : Type r}
[CommRing R]
(W : WeierstrassCurve R)
(n : ℤ)

(WeierstrassCurve.Affine.CoordinateRing.mk W) (W.Ψ n) ^ 2 =
  (WeierstrassCurve.Affine.CoordinateRing.mk W) (Polynomial.C (W.ΨSq n))


theorem dimH_le_of_hausdorffMeasure_ne_top {s : Set X} {d : ℝ≥0} (h : μH[d] s ≠ ∞) : dimH s ≤ d

{X : Type u_2}
[EMetricSpace X]
[MeasurableSpace X]
[BorelSpace X]
{s : Set X}
{d : ℝ≥0}
(h : μH[↑d] s ≠ ⊤)


lemma diag_toMatrix_directSum_collectedBasis_eq_zero_of_mapsTo_ne
    {κ : ι → Type*} [∀ i, Fintype (κ i)] [∀ i, DecidableEq (κ i)]
    {s : Finset ι} (h : IsInternal fun i : s ↦ N i)
    (b : (i : s) → Basis (κ i) R (N i)) (σ : ι → ι) (hσ : ∀ i, σ i ≠ i)
    {f : Module.End R M} (hf : ∀ i, MapsTo f (N i) (N <| σ i)) (hN : ∀ i, i ∉ s → N i = ⊥) :
    Matrix.diag (toMatrix (h.collectedBasis b) (h.collectedBasis b) f) = 0

(h : DirectSum.IsInternal fun i => N ↑i)

(b : (i : { x // x ∈ s }) → Basis (κ ↑i) R ↥(N ↑i))

(hf : ∀ (i : ι), Set.MapsTo ⇑f ↑(N i) ↑(N (σ i)))

((LinearMap.toMatrix (h.collectedBasis b) (h.collectedBasis b)) f).diag = 0


theorem exists_ne_of_one_lt_card (h : 1 < card α) (a : α) : ∃ b : α, b ≠ a

{α : Type u_1}
[Fintype α]
(h : 1 < Fintype.card α)
(a : α)


lemma fderiv_fourierIntegral
    [MeasurableSpace V] [BorelSpace V] [SecondCountableTopology V] {μ : Measure V}
    (hf : Integrable f μ) (hf' : Integrable (fun v : V ↦ ‖v‖ * ‖f v‖) μ) :
    fderiv ℝ (fourierIntegral 𝐞 μ L.toLinearMap₂ f) =
      fourierIntegral 𝐞 μ L.toLinearMap₂ (fourierSMulRight L f)

(hf' : MeasureTheory.Integrable (fun v => ‖v‖ * ‖f v‖) μ)

fderiv ℝ (VectorFourier.fourierIntegral 𝐞 μ L.toLinearMap₂ f) =
  VectorFourier.fourierIntegral 𝐞 μ L.toLinearMap₂ (VectorFourier.fourierSMulRight L f)


theorem Subsingleton.prod (hl : l.Subsingleton) {l' : Filter β} (hl' : l'.Subsingleton) :
    (l ×ˢ l').Subsingleton

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
(hl : l.Subsingleton)
{l' : Filter β}
(hl' : l'.Subsingleton)


@[simp, norm_cast]
lemma ofENat_lt_ofENat {m n : ℕ∞} : (m : Cardinal) < n ↔ m < n


private theorem exists_lt_add {α} [hα : Nonempty α] {o : Ordinal} {f : α → Ordinal}
    (H : ∀ ⦃a⦄, a < o → ∃ i, a < f i) {b : Ordinal} ⦃a⦄ (h : a < b + o) : ∃ i, a < b + f i

(H : ∀ ⦃a : Ordinal.{u_2}⦄, a < o → ∃ i, a < f i)


/-- The identity on the whole space as a partial homeomorphism. -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
protected def refl (X : Type*) [TopologicalSpace X] : PartialHomeomorph X X

(PartialHomeomorph.refl X).source = Set.univ


lemma condexpKernel_ae_eq_condexp [IsFiniteMeasure μ]
    (hm : m ≤ mΩ) {s : Set Ω} (hs : MeasurableSet s) :
    (fun ω ↦ (condexpKernel μ m ω s).toReal) =ᵐ[μ] μ⟦s | m⟧

{Ω : Type u_1}
{m : MeasurableSpace Ω}
[mΩ : MeasurableSpace Ω]
[StandardBorelSpace Ω]
[Nonempty Ω]
{μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsFiniteMeasure μ]
(hm : m ≤ mΩ)
{s : Set Ω}
(hs : MeasurableSet s)

(fun ω => (((ProbabilityTheory.condexpKernel μ m) ω) s).toReal) =ᵐ[μ] μ[s.indicator fun ω => 1|m]


@[simp]
lemma support_one [Zero G] [NeZero (1 : k)] : (1 : k[G]).support = 0

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[Zero G]
[NeZero 1]


/-- Given a `Homotopy p₀ p₁`, we can define a `Homotopy p₁ p₀` by reversing the homotopy.
-/
@[simps!]
def symm (F : Homotopy p₀ p₁) : Homotopy p₁ p₀

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p₀ p₁ : Path x₀ x₁}
(F : p₀.Homotopy p₁)
(x : ↑I × ↑I)


theorem cyclotomic_eval_le_add_one_pow_totient {q : ℝ} (hq' : 1 < q) :
    ∀ n, (cyclotomic n ℝ).eval q ≤ (q + 1) ^ totient n

Polynomial.eval q (Polynomial.cyclotomic n ℝ) ≤ (q + 1) ^ n.totient


/-- Given a trifunctor `F : C₁ ⥤ C₂ ⥤ C₃ ⥤ C₄` and types `I₁`, `I₂`, `I₃`,
this is the obvious functor
`GradedObject I₁ C₁ ⥤ GradedObject I₂ C₂ ⥤ GradedObject I₃ C₃ ⥤ GradedObject (I₁ × I₂ × I₃) C₄`.
-/
@[simps]
def mapTrifunctor (I₁ I₂ I₃ : Type*) :
    GradedObject I₁ C₁ ⥤ GradedObject I₂ C₂ ⥤ GradedObject I₃ C₃ ⥤
      GradedObject (I₁ × I₂ × I₃) C₄

(F : CategoryTheory.Functor C₁ (CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₄)))

(X₁ : CategoryTheory.GradedObject I₁ C₁)

(CategoryTheory.GradedObject.mapTrifunctor F I₁ I₂ I₃).obj X₁ = CategoryTheory.GradedObject.mapTrifunctorObj F X₁ I₂ I₃


@[simp]
theorem comap_id : M.comap id = M


theorem conj_injective {x : α} : Function.Injective fun g : α => x * g * x⁻¹


@[simp]
theorem coe_bot : ((⊥ : NonUnitalSubalgebra R A) : Set A) = {0}

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


/-- There is an equivalence between the set of edges incident to a given
vertex and the set of vertices adjacent to the vertex. -/
@[simps]
def incidenceSetEquivNeighborSet (v : V) : G.incidenceSet v ≃ G.neighborSet v

{V : Type u}
(G : SimpleGraph V)
[DecidableEq V]
(v : V)
(w : ↑(G.neighborSet v))

↑((G.incidenceSetEquivNeighborSet v).symm w) = s(v, ↑w)


/-- Unitary diagonalization of a Hermitian matrix. -/
theorem star_mul_self_mul_eq_diagonal :
    (star (eigenvectorUnitary hA : Matrix n n 𝕜)) * A * (eigenvectorUnitary hA : Matrix n n 𝕜)
      = diagonal (RCLike.ofReal ∘ hA.eigenvalues)

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[Fintype n]
{A : Matrix n n 𝕜}
[DecidableEq n]
(hA : A.IsHermitian)

star ↑hA.eigenvectorUnitary * A * ↑hA.eigenvectorUnitary = Matrix.diagonal (RCLike.ofReal ∘ hA.eigenvalues)


theorem coeff_X_mul' [DecidableEq σ] (m) (s : σ) (p : MvPolynomial σ R) :
    coeff m (X s * p) = if s ∈ m.support then coeff (m - Finsupp.single s 1) p else 0

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[DecidableEq σ]
(m : σ →₀ ℕ)
(s : σ)
(p : MvPolynomial σ R)

MvPolynomial.coeff m (MvPolynomial.X s * p) = if s ∈ m.support then MvPolynomial.coeff (m - Finsupp.single s 1) p else 0


@[gcongr]
theorem Ioo_subset_Ioo (h₁ : a₂ ≤ a₁) (h₂ : b₁ ≤ b₂) : Ioo a₁ b₁ ⊆ Ioo a₂ b₂

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


/-- The zero morphism has a `MonoFactorisation` through the zero object.
-/
@[simps]
def monoFactorisationZero (X Y : C) : MonoFactorisation (0 : X ⟶ Y)

(CategoryTheory.Limits.monoFactorisationZero X Y).I = 0


theorem isEqv_self [DecidableEq α] (a : Array α) : Array.isEqv a a (fun x y => x = y) = true

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

(a.isEqv a fun x y => decide (x = y)) = true


@[simp]
theorem conj_id : α.conj (𝟙 X) = 𝟙 Y

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

α.conj (CategoryTheory.CategoryStruct.id X) = CategoryTheory.CategoryStruct.id Y


theorem le_pointwise_smul_iff₀ {a : α} (ha : a ≠ 0) {S T : Submonoid M} : S ≤ a • T ↔ a⁻¹ • S ≤ T

{α : Type u_1}
{M : Type u_3}
[Monoid M]
[GroupWithZero α]
[MulDistribMulAction α M]
{a : α}
(ha : a ≠ 0)
{S T : Submonoid M}

S ≤ a • T ↔ a⁻¹ • S ≤ T


@[simp]
theorem finite_union {s t : Set α} : (s ∪ t).Finite ↔ s.Finite ∧ t.Finite


theorem ofZNum'_toNat : ∀ n : ZNum, (↑) <$> ofZNum' n = Int.toNat' n


nonrec theorem tsum_mul_right (f : α → ℝ≥0) (a : ℝ≥0) : ∑' x, f x * a = (∑' x, f x) * a

{α : Type u_1}
(f : α → NNReal)
(a : NNReal)


@[simp]
theorem associator_inv_f (X Y Z : Center C) : Hom.f (α_ X Y Z).inv = (α_ X.1 Y.1 Z.1).inv

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

(α_ X Y Z).inv.f = (α_ X.fst Y.fst Z.fst).inv


lemma sqrt_eq' (n : ℕ) : sqrt (n ^ 2) = n


/-- If two ring homomorphisms are equal on a set, then they are equal on its subsemiring closure. -/
theorem eqOn_sclosure {f g : R →+* S} {s : Set R} (h : Set.EqOn f g s) : Set.EqOn f g (closure s)

{R : Type u}
{S : Type v}
[NonAssocSemiring R]
[NonAssocSemiring S]
{f g : R →+* S}
{s : Set R}
(h : Set.EqOn (⇑f) (⇑g) s)


/-- When the first map `S.f` is zero, this is the homology data on `S` given
by any limit kernel fork of `S.g` -/
@[simps]
def ofIsLimitKernelFork (hf : S.f = 0) (c : KernelFork S.g) (hc : IsLimit c) :
    S.HomologyData

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

(CategoryTheory.ShortComplex.HomologyData.ofIsLimitKernelFork S hf c hc).left =
  CategoryTheory.ShortComplex.LeftHomologyData.ofIsLimitKernelFork S hf c hc


/-- If a monotone function sending `bot` to `bot` is continuous at the indexed supremum over
a `Sort`, then it sends this indexed supremum to the indexed supremum of the composition. -/
theorem Monotone.map_iSup_of_continuousAt {ι : Sort*} {f : α → β} {g : ι → α}
    (Cf : ContinuousAt f (iSup g)) (Mf : Monotone f) (fbot : f ⊥ = ⊥) :
    f (⨆ i, g i) = ⨆ i, f (g i)

{α : Type u_1}
{β : Type u_2}
[CompleteLinearOrder α]
[TopologicalSpace α]
[OrderTopology α]
[CompleteLinearOrder β]
[TopologicalSpace β]
[OrderClosedTopology β]
{ι : Sort u_4}
{f : α → β}
{g : ι → α}
(Cf : ContinuousAt f (iSup g))
(Mf : Monotone f)
(fbot : f ⊥ = ⊥)


@[simp]
theorem ofMul_mul [Mul α] (x y : α) : ofMul (x * y) = ofMul x + ofMul y

Additive.ofMul (x * y) = Additive.ofMul x + Additive.ofMul y


theorem Subsingleton.finite {s : Set α} (h : s.Subsingleton) : s.Finite

{α : Type u}
{s : Set α}
(h : s.Subsingleton)


/-- Continuous linear equivalence between vectors in `M² = Fin 2 → M` and `M × M`. -/
@[simps! (config := .asFn) apply symm_apply]
def finTwoArrow : (Fin 2 → M) ≃L[R] M × M

(R : Type u_2)
(M : Type u_3)
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]

⇑(ContinuousLinearEquiv.finTwoArrow R M) = fun f => (f 0, f 1)


lemma LSeries.abscissaOfAbsConv_le_of_forall_lt_LSeriesSummable' {f : ℕ → ℂ} {x : EReal}
    (h : ∀ y : ℝ, x < y → LSeriesSummable f y) :
    abscissaOfAbsConv f ≤ x

(h : ∀ (y : ℝ), x < ↑y → LSeriesSummable f ↑y)


/-- Auxiliary definition for `functorCategoryEquivalence`. -/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (SingleObj G ⥤ V)

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
(X : CategoryTheory.SingleObj ↑G ⥤ V)

∀ (X_1 : CategoryTheory.SingleObj ↑G),
  (Action.FunctorCategoryEquivalence.counitIso.hom.app X).app X_1 = 𝟙 (X.obj PUnit.unit)


theorem dvd_and_not_dvd_iff [CancelCommMonoidWithZero α] {x y : α} :
    x ∣ y ∧ ¬y ∣ x ↔ DvdNotUnit x y

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


theorem covariant_le_iff_contravariant_lt [LinearOrder N] :
    Covariant M N μ (· ≤ ·) ↔ Contravariant M N μ (· < ·)

(M : Type u_1)
(N : Type u_2)
(μ : M → N → N)
[LinearOrder N]

(Covariant M N μ fun x x_1 => x ≤ x_1) ↔ Contravariant M N μ fun x x_1 => x < x_1


@[simp]
lemma ε_up_ℤ (n : ℤ) : (ComplexShape.up ℤ).ε n = n.negOnePow


@[csimp] theorem takeWhile₂_eq_takeWhile₂TR : @takeWhile₂ = @takeWhile₂TR


theorem blockTriangular_stdBasisMatrix {i j : m} (hij : b i ≤ b j) (c : R) :
    BlockTriangular (stdBasisMatrix i j c) b

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{b : m → α}
[Preorder α]
[DecidableEq m]
{i j : m}
(hij : b i ≤ b j)
(c : R)

(Matrix.stdBasisMatrix i j c).BlockTriangular b


theorem HasMFDerivAt.comp_hasMFDerivWithinAt (hg : HasMFDerivAt I' I'' g (f x) g')
    (hf : HasMFDerivWithinAt I I' f s x f') :
    HasMFDerivWithinAt I I'' (g ∘ f) s x (g'.comp f')

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

{f' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)}

{g' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))}


lemma optionSubtypeNe_symm_self (a : α) : (optionSubtypeNe a).symm a = none


theorem continuous_max : Continuous fun p : α × α => max p.1 p.2

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]


@[simp]
theorem prod_empty : (empty : NormalWord d).prod = 1

{d : Monoid.PushoutI.NormalWord.Transversal φ}


@[simp] lemma truncatedSup_singleton (b a : α) : truncatedSup {b} a = if a ≤ b then b else ⊤

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
[DecidableRel fun x x_1 => x ≤ x_1]
(b a : α)

{b}.truncatedSup a = if a ≤ b then b else ⊤


theorem erase.valid [@DecidableRel α (· ≤ ·)] (x : α) {t} (h : Valid t) : Valid (erase x t)

{α : Type u_1}
[Preorder α]
[DecidableRel fun x x_1 => x ≤ x_1]
(x : α)
{t : Ordnode α}
(h : t.Valid)


@[simp] lemma C_apply (t : R) (n : ℤ) : C t n = if n = 0 then t else 0

{R : Type u_1}
[Semiring R]
(t : R)
(n : ℤ)

(LaurentPolynomial.C t) n = if n = 0 then t else 0


theorem hasFDerivWithinAt_inter' (h : t ∈ 𝓝[s] x) :
    HasFDerivWithinAt f f' (s ∩ t) x ↔ HasFDerivWithinAt f f' s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}
{s t : Set E}
(h : t ∈ 𝓝[s] x)


@[simp]
theorem coe_toLowerSet (s : Ideal P) : (s.toLowerSet : Set P) = s

{P : Type u_1}
[LE P]
(s : Order.Ideal P)


theorem mono_iff_stalk_mono {F G : Sheaf C X} (f : F ⟶ G) :
    Mono f ↔ ∀ x, Mono ((stalkFunctor C x).map f.1)

CategoryTheory.Mono f ↔ ∀ (x : ↑X), CategoryTheory.Mono ((TopCat.Presheaf.stalkFunctor C x).map f.val)


theorem coe_nat_injective : Function.Injective (fun (a : Nat.Primes) ↦ (a : ℕ))


@[simp]
theorem algebraMap_eq : algebraMap R (AdjoinRoot f) = of f

algebraMap R (AdjoinRoot f) = AdjoinRoot.of f


/-- `TwoUniqueProd` is preserved under multiplicative equivalences. -/
@[to_additive "`TwoUniqueSums` is preserved under additive equivalences."]
theorem _root_.MulEquiv.twoUniqueProds_iff (f : G ≃* H) : TwoUniqueProds G ↔ TwoUniqueProds H

{G : Type u}
{H : Type v}
[Add G]
[Add H]
(f : G ≃+ H)


/-- The supremum of a set of congruence relations is the same as the smallest congruence relation
    containing the supremum of the set's image under the map to the underlying binary relation. -/
theorem sSup_def {S : Set (RingCon R)} :
    sSup S = ringConGen (sSup (@Set.image (RingCon R) (R → R → Prop) (⇑) S))

{R : Type u_2}
[Add R]
[Mul R]
{S : Set (RingCon R)}

sSup S = ringConGen (sSup (DFunLike.coe '' S))


/-- Given a Localization map `f : M →* N` for a Submonoid `S ⊆ M`, if a `CommMonoid` map
`g : M →* P` induces a map `f.lift hg : N →* P` then for all `z : N`, we have
`f.lift hg z * g y = g x`, where `x : M, y ∈ S` are such that `z * f y = f x`. -/
@[to_additive
    "Given a Localization map `f : M →+ N` for a Submonoid `S ⊆ M`, if an `AddCommMonoid`
map `g : M →+ P` induces a map `f.lift hg : N →+ P` then for all `z : N`, we have
`f.lift hg z + g y = g x`, where `x : M, y ∈ S` are such that `z + f y = f x`."]
theorem lift_mul_right (z) : f.lift hg z * g (f.sec z).2 = g (f.sec z).1

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{g : M →+ P}
(hg : ∀ (y : ↥S), IsAddUnit (g ↑y))
(z : N)

(f.lift hg) z + g ↑(f.sec z).2 = g (f.sec z).1


lemma Localization.exists_leftFraction {X Y : C} (f : L.obj X ⟶ L.obj Y) :
    ∃ (φ : W.LeftFraction X Y), f = φ.map L (Localization.inverts L W)

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


/-- The functor `HomologicalComplex C c ⥤ ShortComplex C` which sends a homological
complex `K` to the short complex `K.X (c.prev i) ⟶ K.X i ⟶ K.X (c.next i)`. -/
@[simps!]
noncomputable def shortComplexFunctor (i : ι)

((HomologicalComplex.shortComplexFunctor C c i).obj K).f = K.d (c.prev i) i


theorem coe_monoidHom_injective : Injective (fun f : α →+* β => (f : α →* β))

∀ {x : NonAssocSemiring α} {x_1 : NonAssocSemiring β}, Function.Injective fun f => ↑f


/-- The `v`-adic valuation on `R`. -/
@[simps]
def intValuation : Valuation R ℤₘ₀

(v : IsDedekindDomain.HeightOneSpectrum R)


theorem IsArtinian.finite_of_linearIndependent [Nontrivial R] [IsArtinian R M] {s : Set M}
    (hs : LinearIndependent R ((↑) : s → M)) : s.Finite

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


theorem tfae_cons_cons {a b} {l : List Prop} : TFAE (a :: b :: l) ↔ (a ↔ b) ∧ TFAE (b :: l)

(a :: b :: l).TFAE ↔ (a ↔ b) ∧ (b :: l).TFAE


@[to_additive]
theorem inv_range {ι : Sort*} {f : ι → α} : (range f)⁻¹ = range fun i => (f i)⁻¹

{α : Type u_2}
[InvolutiveInv α]
{ι : Sort u_5}
{f : ι → α}

(Set.range f)⁻¹ = Set.range fun i => (f i)⁻¹


@[simp] theorem iff_self_or : ∀(a b : Bool), (a = (a || b)) ↔ (b → a)


lemma equation_iff' (x y : R) : W.Equation x y ↔
    y ^ 2 + W.a₁ * x * y + W.a₃ * y - (x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆) = 0

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


@[simp]
theorem apply_symm_apply (e : P₁ ≃ᵃ[k] P₂) (p : P₂) : e (e.symm p) = p

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


@[simps! tensorObj tensorHom tensorUnit whiskerLeft whiskerRight associator]
instance prodMonoidal : MonoidalCategory (C₁ × C₂)

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

CategoryTheory.MonoidalCategory.associator X Y Z =
  (CategoryTheory.MonoidalCategory.associator X.1 Y.1 Z.1).prod (CategoryTheory.MonoidalCategory.associator X.2 Y.2 Z.2)


theorem of_uncurry_left [TopologicalSpace β] {_ : MeasurableSpace α} {_ : MeasurableSpace γ}
    {f : α → γ → β} (hf : StronglyMeasurable (uncurry f)) {x : α} : StronglyMeasurable (f x)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace β]

∀ {x : MeasurableSpace α} {x_1 : MeasurableSpace γ} {f : α → γ → β},
  MeasureTheory.StronglyMeasurable (Function.uncurry f) → ∀ {x : α}, MeasureTheory.StronglyMeasurable (f x)


@[simp]
lemma variableChange_b₄ :
    (W.variableChange C).b₄ = C.u⁻¹ ^ 4 * (W.b₄ + C.r * W.b₂ + 6 * C.r ^ 2)

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

(W.variableChange C).b₄ = ↑C.u⁻¹ ^ 4 * (W.b₄ + C.r * W.b₂ + 6 * C.r ^ 2)


@[to_additive]
theorem fixed_eq_iInter_fixedBy : fixedPoints M α = ⋂ m : M, fixedBy α m

(M : Type u)
[AddMonoid M]
(α : Type v)
[AddAction M α]

AddAction.fixedPoints M α = ⋂ m, AddAction.fixedBy α m


theorem ConvexOn.convex_le (hf : ConvexOn 𝕜 s f) (r : β) : Convex 𝕜 ({ x ∈ s | f x ≤ r })

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedAddCommMonoid β]
[SMul 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
(r : β)


/-- If x is algebraic over K, then x is algebraic over L when L is an extension of K -/
theorem IsAlgebraic.tower_top {x : A} (A_alg : IsAlgebraic K x) :
    IsAlgebraic L x

{K : Type u_1}
(L : Type u_2)
{A : Type u_5}
[Field K]
[Field L]
[Ring A]
[Algebra K L]
[Algebra L A]
[Algebra K A]
[IsScalarTower K L A]
{x : A}
(A_alg : IsAlgebraic K x)


theorem isUnit_or_isUnit_one_sub_self (a : R) : IsUnit a ∨ IsUnit (1 - a)

{R : Type u_1}
[CommRing R]
[LocalRing R]
(a : R)


theorem toSubMulAction_injective : Injective (toSubMulAction : Submodule R M → SubMulAction R M)

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


theorem biUnionTagged_memBaseSet {π : Prepartition I} {πi : ∀ J, TaggedPrepartition J}
    (h : ∀ J ∈ π, l.MemBaseSet J c r (πi J)) (hp : ∀ J ∈ π, (πi J).IsPartition)
    (hc : l.bDistortion → π.compl.distortion ≤ c) : l.MemBaseSet I c r (π.biUnionTagged πi)

{πi : (J : BoxIntegral.Box ι) → BoxIntegral.TaggedPrepartition J}

(hc : l.bDistortion = true → π.compl.distortion ≤ c)


theorem uniformContinuous_comp_left (g : C(α, γ)) :
    UniformContinuous (fun f ↦ f.comp g : C(γ, β) → C(α, β))

{α : Type u₁}
{β : Type u₂}
[TopologicalSpace α]
[UniformSpace β]
{γ : Type u_1}
[TopologicalSpace γ]
(g : C(α, γ))


@[to_additive]
theorem pow_subset_pow (hst : s ⊆ t) : ∀ n : ℕ, s ^ n ⊆ t ^ n

{α : Type u_2}
[DecidableEq α]
[AddMonoid α]
{s t : Finset α}
(hst : s ⊆ t)
(n : ℕ)


theorem mem_uniformity_dist {s : Set (α × α)} :
    s ∈ 𝓤 α ↔ ∃ ε > 0, ∀ {a b : α}, dist a b < ε → (a, b) ∈ s

{α : Type u}
[PseudoMetricSpace α]
{s : Set (α × α)}


/-- 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]
(x y : M)


theorem Dvd.elim_left {P : Prop} (h₁ : a ∣ b) (h₂ : ∀ c, b = c * a → P) : P

{α : Type u_1}
[CommSemigroup α]
{a b : α}
{P : Prop}
(h₁ : a ∣ b)
(h₂ : ∀ (c : α), b = c * a → P)


@[to_additive]
theorem comap_le_comap_of_surjective {f : G →* N} {K L : Subgroup N} (hf : Function.Surjective f) :
    K.comap f ≤ L.comap f ↔ K ≤ L

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
{K L : AddSubgroup N}
(hf : Function.Surjective ⇑f)

AddSubgroup.comap f K ≤ AddSubgroup.comap f L ↔ K ≤ L


theorem prodXSubSMul.smul (x : R) (g : G) : g • prodXSubSMul G R x = prodXSubSMul G R x

(G : Type u_2)
[Group G]
[Fintype G]
(R : Type u_3)
[CommRing R]
[MulSemiringAction G R]
(x : R)
(g : G)


@[to_additive (attr := simp) neg_mem_addCenter]
theorem inv_mem_center (ha : a ∈ Set.center M) : a⁻¹ ∈ Set.center M

{M : Type u_1}
[SubtractionMonoid M]
{a : M}
(ha : a ∈ Set.addCenter M)


@[simp]
theorem mem_sups : c ∈ s ⊻ t ↔ ∃ a ∈ s, ∃ b ∈ t, a ⊔ b = c

{α : Type u_2}
[SemilatticeSup α]
{s t : Set α}
{c : α}


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


theorem wellFoundedLT_dual_iff (α : Type*) [LT α] : WellFoundedLT αᵒᵈ ↔ WellFoundedGT α


theorem IsVonNBounded.of_add_right (hst : IsVonNBounded 𝕜 (s + t)) (hs : s.Nonempty) :
    IsVonNBounded 𝕜 t

(hst : Bornology.IsVonNBounded 𝕜 (s + t))


/-- Characterisation of `2`-Freiman homs. -/
@[to_additive "Characterisation of `2`-Freiman homs."]
lemma isMulFreimanHom_two :
    IsMulFreimanHom 2 A B f ↔ MapsTo f A B ∧ ∀ a ∈ A, ∀ b ∈ A, ∀ c ∈ A, ∀ d ∈ A,
      a * b = c * d → f a * f b = f c * f d

{α : Type u_2}
{β : Type u_3}
[CommMonoid α]
[CommMonoid β]
{A : Set α}
{B : Set β}
{f : α → β}

IsMulFreimanHom 2 A B f ↔ Set.MapsTo f A B ∧ ∀ a ∈ A, ∀ b ∈ A, ∀ c ∈ A, ∀ d ∈ A, a * b = c * d → f a * f b = f c * f d


theorem symm_apply_apply_mk (e : Pretrivialization F (π F E)) {b : B} (hb : b ∈ e.baseSet)
    (y : E b) : e.symm b (e ⟨b, y⟩).2 = y

(e : Pretrivialization F Bundle.TotalSpace.proj)

e.symm b (↑e { proj := b, snd := y }).2 = y


/-- Initial functors preserve cofilteredness.

This can be seen as a generalization of `IsCofiltered.of_left_adjoint` (which states that left
adjoints preserve cofilteredness), as right adjoints are always initial, see `intial_of_adjunction`.
-/
theorem IsCofiltered.of_initial (F : C ⥤ D) [Initial F] [IsCofiltered C] : IsCofiltered D

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


@[to_additive (attr := simp)]
theorem map_apply_inr (f : M →* M') (g : N →* N') (x : N) : map f g (inr x) = inr (g x)

{M : Type u_1}
{N : Type u_2}
{M' : Type u_3}
{N' : Type u_4}
[AddZeroClass M]
[AddZeroClass N]
[AddZeroClass M']
[AddZeroClass N']
(f : M →+ M')
(g : N →+ N')
(x : N)

(AddMonoid.Coprod.map f g) (AddMonoid.Coprod.inr x) = AddMonoid.Coprod.inr (g x)


@[simp]
theorem catalan_zero : catalan 0 = 1


@[simp]
theorem sublistsLen_succ_nil (n) : sublistsLen (n + 1) (@nil α) = []


protected theorem sub_lt_sub {a b c d : Int} (hab : a < b) (hcd : c < d) : a - d < b - c


@[simp] theorem any_eq_true {l : List α} : l.any p ↔ ∃ x, x ∈ l ∧ p x

{α : Type u_1}
{p : α → Bool}
{l : List α}

l.any p = true ↔ ∃ x, x ∈ l ∧ p x = true


theorem norm_eq_card (f : PiLp 0 β) : ‖f‖ = {i | ‖f i‖ ≠ 0}.toFinite.toFinset.card

{ι : Type u_2}
{β : ι → Type u_4}
[Fintype ι]
[(i : ι) → Norm (β i)]
(f : PiLp 0 β)


theorem star_mem_star [InvolutiveStar α] : a⋆ ∈ s⋆ ↔ a ∈ s

{α : Type u_1}
{s : Set α}
{a : α}
[InvolutiveStar α]


protected theorem Nonempty.image (h : s.Nonempty) (f : α → β) : (s.image f).Nonempty

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{s : Finset α}
(h : s.Nonempty)
(f : α → β)


theorem one_div_lt (ha : 0 < a) (hb : 0 < b) : 1 / a < b ↔ 1 / b < a

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


theorem Matrix.toLinearMap₂_basisFun :
    Matrix.toLinearMap₂ (Pi.basisFun R n) (Pi.basisFun R m) =
      Matrix.toLinearMap₂' R (N₂ := N₂)

{R : Type u_1}
{N₂ : Type u_11}
{n : Type u_12}
{m : Type u_13}
[CommSemiring R]
[AddCommMonoid N₂]
[Module R N₂]
[DecidableEq n]
[Fintype n]
[DecidableEq m]
[Fintype m]


@[to_additive]
theorem mem_centralizer_iff {z : M} : z ∈ centralizer S ↔ ∀ g ∈ S, g * z = z * g

{M : Type u_1}
{S : Set M}
[AddSemigroup M]
{z : M}

z ∈ AddSubsemigroup.centralizer S ↔ ∀ g ∈ S, g + z = z + g


theorem ext {a b : LinearCombo} (w₁ : a.const = b.const) (w₂ : a.coeffs = b.coeffs) :
    a = b

{a b : Lean.Omega.LinearCombo}
(w₁ : a.const = b.const)
(w₂ : a.coeffs = b.coeffs)


protected theorem mdifferentiableAt {x : M} (hx : x ∈ Φ.source) : MDifferentiableAt I J Φ x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_4}
[TopologicalSpace H]
{G : Type u_5}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
(Φ : PartialDiffeomorph I J M N n)
(hn : 1 ≤ n)
{x : M}
(hx : x ∈ Φ.source)

MDifferentiableAt I J (↑Φ.toPartialEquiv) x


@[simp]
theorem sigma_ofNat_val (n : ℕ) :
    ofNat (Sigma γ) n = ⟨ofNat α (unpair n).1, ofNat (γ _) (unpair n).2⟩

{α : Type u_1}
[Denumerable α]
{γ : α → Type u_3}
[(a : α) → Denumerable (γ a)]
(n : ℕ)

Denumerable.ofNat (Sigma γ) n =
  ⟨Denumerable.ofNat α (Nat.unpair n).1, Denumerable.ofNat (γ (Denumerable.ofNat α (Nat.unpair n).1)) (Nat.unpair n).2⟩


theorem Compares.le_antisymm [Preorder α] {a b : α} : ∀ {o}, Compares o a b → a ≤ b → b ≤ a → a = b

{α : Type u_1}
[Preorder α]
{a b : α}
{o : Ordering}


theorem dualAnnihilator_dualCoannihilator_dualAnnihilator (U : Submodule R M) :
    U.dualAnnihilator.dualCoannihilator.dualAnnihilator = U.dualAnnihilator

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


@[simp]
theorem strongEpi_map_iff_strongEpi_of_isEquivalence [IsEquivalence F] :
    StrongEpi (F.map f) ↔ StrongEpi f

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
{F : C ⥤ D}
{A B : C}
(f : A ⟶ B)
[F.IsEquivalence]

CategoryTheory.StrongEpi (F.map f) ↔ CategoryTheory.StrongEpi f


/-- The image of a bicone under a functor. -/
@[simps]
def mapBicone {f : J → C} (b : Bicone f) : Bicone (F.obj ∘ f)


@[simp] lemma finsuppAntidiag_empty_zero : finsuppAntidiag (∅ : Finset ι) (0 : μ) = {0}

{ι : Type u_1}
{μ : Type u_2}
[DecidableEq ι]
[AddCommMonoid μ]
[Finset.HasAntidiagonal μ]
[DecidableEq μ]


theorem u_eq_top {l : α → β} {u : β → α} (gc : GaloisConnection l u) {x} : u x = ⊤ ↔ l ⊤ ≤ x

{α : Type u}
{β : Type v}
[PartialOrder α]
[Preorder β]
[OrderTop α]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{x : β}


@[to_additive]
theorem hasProd_fintype [Fintype β] (f : β → α) : HasProd f (∏ b, f b)

{α : Type u_1}
{β : Type u_2}
[AddCommMonoid α]
[TopologicalSpace α]
[Fintype β]
(f : β → α)


@[simp]
theorem coe_mk (z : ℂ) (h : 0 < z.im) : (mk z h : ℂ) = z


theorem edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y ≠ ∞) :
    edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - K)

{α : Type u_1}
[EMetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
{x y : α}
(h : edist x y ≠ ⊤)

edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - ↑K)


theorem isHausdorff_iff :
    IsHausdorff I M ↔ ∀ x : M, (∀ n : ℕ, x ≡ 0 [SMOD (I ^ n • ⊤ : Submodule R M)]) → x = 0

{R : Type u_1}
[CommRing R]
{I : Ideal R}
{M : Type u_2}
[AddCommGroup M]
[Module R M]

IsHausdorff I M ↔ ∀ (x : M), (∀ (n : ℕ), x ≡ 0 [SMOD I ^ n • ⊤]) → x = 0


theorem IsRelPrime.ne_zero_or_ne_zero [Nontrivial α] (h : IsRelPrime x y) : x ≠ 0 ∨ y ≠ 0

{α : Type u_1}
[CommMonoidWithZero α]
{x y : α}
[Nontrivial α]
(h : IsRelPrime x y)


@[reassoc]
lemma restrictScalarsComp'App_inv_naturality {M N : ModuleCat R₃} (φ : M ⟶ N) :
    (restrictScalars f).map ((restrictScalars g).map φ) ≫
        (restrictScalarsComp'App f g gf hgf N).inv =
      (restrictScalarsComp'App f g gf hgf M).inv ≫ (restrictScalars gf).map φ

{R₁ : Type u₁}
{R₂ : Type u₂}
{R₃ : Type u₃}
[Ring R₁]
[Ring R₂]
[Ring R₃]
(f : R₁ →+* R₂)
(g : R₂ →+* R₃)
(gf : R₁ →+* R₃)
(hgf : gf = g.comp f)
{M N : ModuleCat R₃}
(φ : M ⟶ N)

(ModuleCat.restrictScalars f).map ((ModuleCat.restrictScalars g).map φ) ≫
    (ModuleCat.restrictScalarsComp'App f g gf hgf N).inv =
  (ModuleCat.restrictScalarsComp'App f g gf hgf M).inv ≫ (ModuleCat.restrictScalars gf).map φ


private lemma div_ne_zero_of_pos_of_ne_zero (ha : 0 < a) (hb : b ≠ 0) : a / b ≠ 0

{α : Type u_4}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 < a)
(hb : b ≠ 0)


theorem karoubi_alternatingFaceMapComplex_d (P : Karoubi (SimplicialObject C)) (n : ℕ) :
    ((AlternatingFaceMapComplex.obj (KaroubiFunctorCategoryEmbedding.obj P)).d (n + 1) n).f =
      P.p.app (op [n + 1]) ≫ (AlternatingFaceMapComplex.obj P.X).d (n + 1) n

(P : CategoryTheory.Idempotents.Karoubi (CategoryTheory.SimplicialObject C))

((AlgebraicTopology.AlternatingFaceMapComplex.obj (CategoryTheory.Idempotents.KaroubiFunctorCategoryEmbedding.obj P)).d
      (n + 1) n).f =
  P.p.app (Opposite.op [n + 1]) ≫ (AlgebraicTopology.AlternatingFaceMapComplex.obj P.X).d (n + 1) n


@[simp]
theorem dNext_eq_dFrom_fromNext (f : ∀ i j, C.X i ⟶ D.X j) (i : ι) :
    dNext i f = C.dFrom i ≫ fromNext i f

{ι : Type u_1}
{V : Type u}
[CategoryTheory.Category.{v, u} V]
[CategoryTheory.Preadditive V]
{c : ComplexShape ι}
{C D : HomologicalComplex V c}
(f : (i j : ι) → C.X i ⟶ D.X j)
(i : ι)

(dNext i) f = C.dFrom i ≫ (fromNext i) f


lemma hurwitzZetaEven_apply_zero (a : UnitAddCircle) :
    hurwitzZetaEven a 0 = if a = 0 then -1 / 2 else 0

HurwitzZeta.hurwitzZetaEven a 0 = if a = 0 then -1 / 2 else 0


theorem isLocalExtr_const {b : β} : IsLocalExtr (fun _ => b) a

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder β]
{a : α}
{b : β}


/-- A group `G` acts properly on a topological space `X` if and only if for all ultrafilters
`𝒰` on `X × G`, if `𝒰` converges to `(x₁, x₂)` along the map `(g, x) ↦ (g • x, x)`,
then there exists `g : G` such that `g • x₂ = x₁` and `𝒰.fst` converges to `g`. -/
@[to_additive "A group acts `G` properly on a topological space `X` if and only if
for all ultrafilters `𝒰` on `X`, if `𝒰` converges to `(x₁, x₂)`
along the map `(g, x) ↦ (g • x, x)`, then there exists `g : G` such that `g • x₂ = x₁`
and `𝒰.fst` converges to `g`."]
theorem properSMul_iff_continuousSMul_ultrafilter_tendsto :
    ProperSMul G X ↔ ContinuousSMul G X ∧
      (∀ 𝒰 : Ultrafilter (G × X), ∀ x₁ x₂ : X,
        Tendsto (fun gx : G × X ↦ (gx.1 • gx.2, gx.2)) 𝒰 (𝓝 (x₁, x₂)) →
      ∃ g : G, g • x₂ = x₁ ∧ Tendsto (Prod.fst : G × X → G) 𝒰 (𝓝 g))

{G : Type u_1}
{X : Type u_2}
[AddGroup G]
[AddAction G X]
[TopologicalSpace G]
[TopologicalSpace X]

ProperVAdd G X ↔
  ContinuousVAdd G X ∧
    ∀ (𝒰 : Ultrafilter (G × X)) (x₁ x₂ : X),
      Filter.Tendsto (fun gx => (gx.1 +ᵥ gx.2, gx.2)) (↑𝒰) (𝓝 (x₁, x₂)) →
        ∃ g, g +ᵥ x₂ = x₁ ∧ Filter.Tendsto Prod.fst (↑𝒰) (𝓝 g)


theorem singletonFinsubgraph_le_adj_right {u v : V} {e : G.Adj u v} :
    singletonFinsubgraph v ≤ finsubgraphOfAdj e

{V : Type u}
{G : SimpleGraph V}
{u v : V}
{e : G.Adj u v}

SimpleGraph.singletonFinsubgraph v ≤ SimpleGraph.finsubgraphOfAdj e


@[simp]
theorem ciSup_const_zero {α : Sort*} : ⨆ _ : α, (0 : ℝ) = 0


theorem productOfMemOpens_embedding [T0Space X] : Embedding (productOfMemOpens X)

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


/-- Additivity of a continuous alternating map along all coordinates at the same time,
writing `f (m + m')` as the sum of `f (s.piecewise m m')` over all sets `s`. -/
theorem map_add_univ [DecidableEq ι] [Fintype ι] (m m' : ι → M) :
    f (m + m') = ∑ s : Finset ι, f (s.piecewise m m')

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
{ι : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
(f : M [⋀^ι]→L[R] N)
[DecidableEq ι]
[Fintype ι]
(m m' : ι → M)


@[simp]
theorem mulLeft_apply (a b : A) : mulLeft R a b = a * b

{R : Type u_1}
{A : Type u_2}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
(a b : A)


/-- This version of the Landau notation `IsBigOWith C l f g` where `f` and `g` are two functions on
a type `α` and `l` is a filter on `α`, means that eventually for `l`, `‖f‖` is bounded by `C * ‖g‖`.
In other words, `‖f‖ / ‖g‖` is eventually bounded by `C`, modulo division by zero issues that are
avoided by this definition. Probably you want to use `IsBigO` instead of this relation. -/
irreducible_def IsBigOWith (c : ℝ) (l : Filter α) (f : α → E) (g : α → F) : Prop

{α : Type u_17}
{E : Type u_18}
{F : Type u_19}
[Norm E]
[Norm F]
(c : ℝ)
(l : Filter α)
(f : α → E)
(g : α → F)

Asymptotics.IsBigOWith c l f g = ∀ᶠ (x : α) in l, ‖f x‖ ≤ c * ‖g x‖


@[simp] -- Porting note: new attr
theorem cycleType_conj {σ τ : Perm α} : (τ * σ * τ⁻¹).cycleType = σ.cycleType

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


@[simp, mfld_simps]
theorem coe_coe : ⇑e.toPartialEquiv = e

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e : Pretrivialization F proj)


@[to_additive]
theorem map_mul_left_nhds_one (x : G) : map (x * ·) (𝓝 1) = 𝓝 x

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
(x : G)

Filter.map (fun x_1 => x * x_1) (𝓝 1) = 𝓝 x


@[to_additive]
theorem quasiMeasurePreserving_div [IsMulLeftInvariant μ] :
    QuasiMeasurePreserving (fun p : G × G => p.1 / p.2) (μ.prod ν) μ

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

MeasureTheory.Measure.QuasiMeasurePreserving (fun p => p.1 / p.2) (μ.prod ν) μ


theorem vonMangoldt_apply_prime {p : ℕ} (hp : p.Prime) : Λ p = Real.log p

ArithmeticFunction.vonMangoldt p = Real.log ↑p


theorem IntegrableOn.setLIntegral_lt_top {f : α → ℝ} {s : Set α} (hf : IntegrableOn f s μ) :
    (∫⁻ x in s, ENNReal.ofReal (f x) ∂μ) < ∞

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
{s : Set α}
(hf : MeasureTheory.IntegrableOn f s μ)

∫⁻ (x : α) in s, ENNReal.ofReal (f x) ∂μ < ⊤


theorem clusterPt_iff_ultrafilter {f : Filter X} : ClusterPt x f ↔
    ∃ u : Ultrafilter X, u ≤ f ∧ u ≤ 𝓝 x

{X : Type u}
{x : X}
[TopologicalSpace X]
{f : Filter X}


@[simp]
theorem star_pow [Monoid R] [StarMul R] (x : R) (n : ℕ) : star (x ^ n) = star x ^ n

{R : Type u}
[Monoid R]
[StarMul R]
(x : R)
(n : ℕ)


/-- If `f` grows in the punctured neighborhood of `c : ℝ` at least as fast as `1 / (x - c)`,
then it is not interval integrable on any nontrivial interval `a..b`, `c ∈ [a, b]`. -/
theorem not_intervalIntegrable_of_sub_inv_isBigO_punctured {f : ℝ → F} {a b c : ℝ}
    (hf : (fun x => (x - c)⁻¹) =O[𝓝[≠] c] f) (hne : a ≠ b) (hc : c ∈ [[a, b]]) :
    ¬IntervalIntegrable f volume a b

¬IntervalIntegrable f MeasureTheory.volume a b


/-- A family of morphisms `T' ⟶ T j` lifts to a morphism `T' ⟶ productTriangle T`. -/
@[simps]
def productTriangle.lift {T' : Triangle C} (φ : ∀ j, T' ⟶ T j) :
    T' ⟶ productTriangle T

(T : J → CategoryTheory.Pretriangulated.Triangle C)

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₁]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₂]

[CategoryTheory.Limits.HasProduct fun j => (T j).obj₃]

[CategoryTheory.Limits.HasProduct fun j => (CategoryTheory.shiftFunctor C 1).obj (T j).obj₁]

{T' : CategoryTheory.Pretriangulated.Triangle C}

(CategoryTheory.Pretriangulated.productTriangle.lift T φ).hom₁ = CategoryTheory.Limits.Pi.lift fun j => (φ j).hom₁


@[to_additive (attr := simp)]
theorem mul_eq_one : a * b = 1 ↔ a = 1 ∧ b = 1

{α : Type u}
[CommMonoid α]
[Subsingleton αˣ]
{a b : α}


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

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

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


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

∀ {X₁ Y₁ X₂ Y₂ : CategoryTheory.Dial C} (f : X₁ ⟶ Y₁) (g : X₂ ⟶ Y₂),
  (CategoryTheory.MonoidalCategory.tensorHom f g).f = CategoryTheory.Limits.prod.map f.f g.f


theorem NodupKeys.pairwise_ne {l} (h : NodupKeys l) :
    Pairwise (fun s s' : Sigma β => s.1 ≠ s'.1) l

{α : Type u}
{β : α → Type v}
{l : List (Sigma β)}
(h : l.NodupKeys)

List.Pairwise (fun s s' => s.fst ≠ s'.fst) l


theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S

{R : Type u_1}
[CommSemiring R]
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
(P : Ideal R)
[hp : P.IsPrime]
[IsLocalization.AtPrime S P]


@[simp]
theorem EuclideanSpace.nnnorm_single (i : ι) (a : 𝕜) :
    ‖EuclideanSpace.single i (a : 𝕜)‖₊ = ‖a‖₊

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[DecidableEq ι]
[Fintype ι]
(i : ι)
(a : 𝕜)


theorem Sized.rotateL {l x r} (hl : @Sized α l) (hr : Sized r) : Sized (rotateL l x r)

{α : Type u_1}
{l : Ordnode α}
{x : α}
{r : Ordnode α}
(hl : l.Sized)
(hr : r.Sized)


@[simp]
theorem Iic_disjoint_Ici : Disjoint (Iic a) (Ici b) ↔ ¬b ≤ a

Disjoint (Set.Iic a) (Set.Ici b) ↔ ¬b ≤ a


theorem prime_of_normalized_factor {a : α} : ∀ x : α, x ∈ normalizedFactors a → Prime x

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizationMonoid α]
[UniqueFactorizationMonoid α]
{a : α}
(x : α)

x ∈ UniqueFactorizationMonoid.normalizedFactors a → Prime x


theorem ManyOneEquiv.congr_left {α β γ} [Primcodable α] [Primcodable β] [Primcodable γ]
    {p : α → Prop} {q : β → Prop} {r : γ → Prop} (h : ManyOneEquiv p q) :
    ManyOneEquiv p r ↔ ManyOneEquiv q r

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[Primcodable α]
[Primcodable β]
[Primcodable γ]
{p : α → Prop}
{q : β → Prop}
{r : γ → Prop}
(h : ManyOneEquiv p q)


theorem integral_mono_of_nonneg {f g : α → ℝ} (hf : 0 ≤ᵐ[μ] f) (hgi : Integrable g μ)
    (h : f ≤ᵐ[μ] g) : ∫ a, f a ∂μ ≤ ∫ a, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f g : α → ℝ}
(hf : 0 ≤ᵐ[μ] f)
(hgi : MeasureTheory.Integrable g μ)
(h : f ≤ᵐ[μ] g)


/-- The list obtained from a permutation of a tuple `f` is permutation equivalent to
the list obtained from `f`. -/
theorem Equiv.Perm.ofFn_comp_perm {n : ℕ} {α : Type u} (σ : Equiv.Perm (Fin n)) (f : Fin n → α) :
    ofFn (f ∘ σ) ~ ofFn f


/-- A `RkPos` matroid is one whose bases are nonempty. -/
class RkPos (M : Matroid α) : Prop where
  /-- The empty set isn't a base -/
  empty_not_base : ¬M.Base ∅

{α : Type u_1}
{M : Matroid α}
[self : M.RkPos]


theorem hasDerivWithinAt_const : HasDerivWithinAt (fun _ => c) 0 s x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(x : 𝕜)
(s : Set 𝕜)
(c : F)


@[simp]
theorem bodd_mul (m n : ℤ) : bodd (m * n) = (bodd m && bodd n)


@[simp]
theorem ofEquiv_σ (F : Realizer α) (E : F.σ ≃ τ) : (F.ofEquiv E).σ = τ

{α : Type u_1}
{τ : Type u_4}
[TopologicalSpace α]
(F : Ctop.Realizer α)
(E : F.σ ≃ τ)


@[simp, norm_cast]
lemma MonoidHom.coe_toAdditive' [MulOneClass α] [AddZeroClass β] (f : α →* Multiplicative β) :
    ⇑(toAdditive' f) = toAdd ∘ f ∘ toMul

{α : Type u}
{β : Type v}
[MulOneClass α]
[AddZeroClass β]
(f : α →* Multiplicative β)

⇑(MonoidHom.toAdditive' f) = ⇑Multiplicative.toAdd ∘ ⇑f ∘ ⇑Additive.toMul


@[to_additive (attr := simp)]
theorem range_one [Nonempty α] [One β] : (1 : α →ₛ β).range = {1}

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


/-- A structure requiring that a scalar product is positive definite and symmetric, from which one
can construct an `InnerProductSpace` instance in `InnerProductSpace.ofCore`. -/
-- @[nolint HasNonemptyInstance] porting note: I don't think we have this linter anymore
structure InnerProductSpace.Core (𝕜 : Type*) (F : Type*) [RCLike 𝕜] [AddCommGroup F]
  [Module 𝕜 F] extends Inner 𝕜 F where
  /-- The inner product is *hermitian*, taking the `conj` swaps the arguments. -/
  conj_symm : ∀ x y, conj (inner y x) = inner x y
  /-- The inner product is positive (semi)definite. -/
  nonneg_re : ∀ x, 0 ≤ re (inner x x)
  /-- The inner product is positive definite. -/
  definite : ∀ x, inner x x = 0 → x = 0
  /-- The inner product is additive in the first coordinate. -/
  add_left : ∀ x y z, inner (x + y) z = inner x z + inner y z
  /-- The inner product is conjugate linear in the first coordinate. -/
  smul_left : ∀ x y r, inner (r • x) y = conj r * inner x y

{𝕜 : Type u_4}
{F : Type u_5}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
(self : InnerProductSpace.Core 𝕜 F)
(x : F)


theorem and_eq_of_eq_false_left {a b : Prop} (h : a = False) : (a ∧ b) = False


theorem wronskian_add_right (a b c : R[X]) : wronskian a (b + c) = wronskian a b + wronskian a c

{R : Type u_1}
[CommRing R]
(a b c : R[X])

a.wronskian (b + c) = a.wronskian b + a.wronskian c


@[simp] theorem appendList_data (arr : Array α) (l : List α) :
    (arr ++ l).data = arr.data ++ l

{α : Type u_1}
(arr : Array α)
(l : List α)


/-- If `f` is `C^n` then its `m`-times iterated derivative is differentiable for `m < n`. -/
theorem ContDiff.differentiable_iteratedFDeriv {m : ℕ} (hm : (m : ℕ∞) < n) (hf : ContDiff 𝕜 n f) :
    Differentiable 𝕜 fun x => iteratedFDeriv 𝕜 m f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ∞}
{m : ℕ}
(hm : ↑m < n)
(hf : ContDiff 𝕜 n f)


lemma totallyDisconnectedSpace_subtype_iff {s : Set α} :
    TotallyDisconnectedSpace s ↔ IsTotallyDisconnected s

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

TotallyDisconnectedSpace ↑s ↔ IsTotallyDisconnected s


theorem Finite.exists_le [IsDirected α (· ≤ ·)] (f : β → α) : ∃ M, ∀ i, f i ≤ M

{α : Type u_1}
{β : Type u_2}
[Finite β]
[Nonempty α]
[Preorder α]
[IsDirected α fun x x_1 => x ≤ x_1]
(f : β → α)


theorem ContinuousWithinAt.snd {f : α → β × γ} {s : Set α} {a : α} (h : ContinuousWithinAt f s a) :
    ContinuousWithinAt (fun x => (f x).snd) s a

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
{f : α → β × γ}
{s : Set α}
{a : α}
(h : ContinuousWithinAt f s a)

ContinuousWithinAt (fun x => (f x).2) s a


@[simp] lemma ringEquivCongr_refl (a : ℕ) : ringEquivCongr (rfl : a = a) = .refl _

ZMod.ringEquivCongr ⋯ = RingEquiv.refl (ZMod a)


theorem eq_of_xn_modEq_lem3 {i n} (npos : 0 < n) :
    ∀ {j}, i < j → j ≤ 2 * n → j ≠ n → ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2) →
        xn a1 i % xn a1 n < xn a1 j % xn a1 n

i < j → j ≤ 2 * n → j ≠ n → ¬(a = 2 ∧ n = 1 ∧ i = 0 ∧ j = 2) → Pell.xn a1 i % Pell.xn a1 n < Pell.xn a1 j % Pell.xn a1 n


@[simp]
theorem ite_univ (s s' : Set α) : Set.ite univ s s' = s


theorem arg_lt_pi_iff {z : ℂ} : arg z < π ↔ 0 ≤ z.re ∨ z.im ≠ 0


theorem degree_C_mul_T_ite [DecidableEq R] (n : ℤ) (a : R) :
    degree (C a * T n) = if a = 0 then ⊥ else ↑n

{R : Type u_1}
[Semiring R]
[DecidableEq R]
(n : ℤ)
(a : R)

(LaurentPolynomial.C a * LaurentPolynomial.T n).degree = if a = 0 then ⊥ else ↑n


@[trans]
theorem IsEquivalent.trans_isTheta {f g₁ : α → β} {g₂ : α → β₂} (h : f ~[l] g₁)
    (h₂ : g₁ =Θ[l] g₂) : f =Θ[l] g₂

{α : Type u_1}
{β : Type u_2}
{β₂ : Type u_3}
[NormedAddCommGroup β]
[Norm β₂]
{l : Filter α}
{f g₁ : α → β}
{g₂ : α → β₂}
(h : f ~[l] g₁)
(h₂ : g₁ =Θ[l] g₂)


theorem full_mono {D E : Set C} (h : D ≤ E) : full D ≤ full E

{C : Type u}
[CategoryTheory.Groupoid C]
{D E : Set C}
(h : D ≤ E)

CategoryTheory.Subgroupoid.full D ≤ CategoryTheory.Subgroupoid.full E


theorem coeFn_sup (f g : α →ₘ[μ] β) : ⇑(f ⊔ g) =ᵐ[μ] fun x => f x ⊔ g x

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[TopologicalSpace β]
[SemilatticeSup β]
[ContinuousSup β]
(f g : α →ₘ[μ] β)


theorem ae_withDensity_iff_ae_restrict' {p : α → Prop} {f : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) :
    (∀ᵐ x ∂μ.withDensity f, p x) ↔ ∀ᵐ x ∂μ.restrict { x | f x ≠ 0 }, p x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : α → Prop}
{f : α → ℝ≥0∞}
(hf : AEMeasurable f μ)

(∀ᵐ (x : α) ∂μ.withDensity f, p x) ↔ ∀ᵐ (x : α) ∂μ.restrict {x | f x ≠ 0}, p x


/-- If `F` creates the limit of `K` and `K ⋙ F` has a limit, then `K` has a limit. -/
theorem hasLimit_of_created (K : J ⥤ C) (F : C ⥤ D) [HasLimit (K ⋙ F)] [CreatesLimit K F] :
    HasLimit K

[CategoryTheory.Limits.HasLimit (K ⋙ F)]


theorem differentiable_exp : Differentiable 𝕜 exp

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
[NormedAlgebra 𝕜 ℂ]


theorem toTopologicalSpace_prod {α} {β} [u : UniformSpace α] [v : UniformSpace β] :
    @UniformSpace.toTopologicalSpace (α × β) instUniformSpaceProd =
      @instTopologicalSpaceProd α β u.toTopologicalSpace v.toTopologicalSpace

{α : Type u_2}
{β : Type u_3}
[u : UniformSpace α]
[v : UniformSpace β]


/-- Assumes left covariance. -/
theorem Left.one_le_mul_of_le_of_le [PosMulMono α] (ha : 1 ≤ a) (hb : 1 ≤ b) (a0 : 0 ≤ a) :
    1 ≤ a * b

{α : Type u_1}
{a b : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(ha : 1 ≤ a)
(hb : 1 ≤ b)
(a0 : 0 ≤ a)


/-- The cone of `F` corresponding to an element in `(F ⋙ yoneda.obj X).sections`. -/
@[simps]
def Limits.coneOfSectionCompYoneda (F : J ⥤ Cᵒᵖ) (X : C)
    (s : (F ⋙ yoneda.obj X).sections) : Cone F

(s : ↑(F ⋙ CategoryTheory.yoneda.obj X).sections)

(CategoryTheory.Limits.coneOfSectionCompYoneda F X s).pt = Opposite.op X


@[simp, norm_cast]
theorem coe_mul (x y : s) : ((x * y : s) : R) = (x * y : R)

{R : Type u}
[NonAssocSemiring R]
(s : Subsemiring R)
(x y : ↥s)


theorem stmts₁_supportsStmt_mono {S : Finset Λ} {q₁ q₂ : Stmt₁} (h : q₁ ∈ stmts₁ q₂)
    (hs : SupportsStmt S q₂) : SupportsStmt S q₁

{Γ : Type u_1}
{Λ : Type u_2}
{σ : Type u_3}
{S : Finset Λ}
{q₁ q₂ : Turing.TM1.Stmt Γ Λ σ}
(h : q₁ ∈ Turing.TM1.stmts₁ q₂)
(hs : Turing.TM1.SupportsStmt S q₂)


theorem forall_ennreal {p : ℝ≥0∞ → Prop} : (∀ a, p a) ↔ (∀ r : ℝ≥0, p r) ∧ p ∞

(∀ (a : ℝ≥0∞), p a) ↔ (∀ (r : ℝ≥0), p ↑r) ∧ p ⊤


@[simp 900]
theorem mem_map₂_iff : u ∈ map₂ m f g ↔ ∃ s ∈ f, ∃ t ∈ g, image2 m s t ⊆ u

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f : Filter α}
{g : Filter β}
{u : Set γ}

u ∈ Filter.map₂ m f g ↔ ∃ s ∈ f, ∃ t ∈ g, Set.image2 m s t ⊆ u


@[reassoc (attr := simp)]
lemma comp_δ : (homologyFunctor C n₀).map T.mor₂ ≫ δ T n₀ n₁ h = 0

(T : CategoryTheory.Pretriangulated.Triangle (DerivedCategory C))

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)

(DerivedCategory.homologyFunctor C n₀).map T.mor₂ ≫ DerivedCategory.HomologySequence.δ T n₀ n₁ h = 0


theorem image_cast_int_Ioi (a : ℕ) : (↑) '' Ioi a = Ioi (a : ℤ)


@[simp]
theorem map_apply (f : V ↪ W) (G : SimpleGraph V) (v : V) :
    SimpleGraph.Embedding.map f G v = f v

{V : Type u_1}
{W : Type u_2}
(f : V ↪ W)
(G : SimpleGraph V)
(v : V)


/-- The canonical isomorphism `F.leftDerived 0 ≅ F` when `F` is right exact
(i.e. preserves finite colimits). -/
@[simps! hom]
noncomputable def leftDerivedZeroIsoSelf : F.leftDerived 0 ≅ F


theorem add_right_cancel_iff [IsRightCancelAdd α] (ha : a ≠ ⊤) : b + a = c + a ↔ b = c

{α : Type u}
[Add α]
{a b c : WithTop α}
[IsRightCancelAdd α]
(ha : a ≠ ⊤)


/-- The map of a Gaussian distribution by multiplication by a constant is a Gaussian. -/
lemma gaussianReal_map_const_mul (c : ℝ) :
    (gaussianReal μ v).map (c * ·) = gaussianReal (c * μ) (⟨c^2, sq_nonneg _⟩ * v)

MeasureTheory.Measure.map (fun x => c * x) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)


theorem upperCrossingTime_bound_eq (f : ℕ → Ω → ℝ) (N : ℕ) (ω : Ω) (hab : a < b) :
    upperCrossingTime a b f N N ω = N

{Ω : Type u_1}
{a b : ℝ}
(f : ℕ → Ω → ℝ)
(N : ℕ)
(ω : Ω)
(hab : a < b)

MeasureTheory.upperCrossingTime a b f N N ω = N


/-- Inversion as a measurable automorphism of a group or group with zero. -/
@[to_additive (attr := simps! (config := .asFn) toEquiv apply)
    "Negation as a measurable automorphism of an additive group."]
def inv (G) [MeasurableSpace G] [InvolutiveInv G] [MeasurableInv G] : G ≃ᵐ G

(G : Type u_4)
[MeasurableSpace G]
[InvolutiveInv G]
[MeasurableInv G]


/-- `AddMemClass S M` says `S` is a type of sets `s : Set M` that are closed under `(+)` -/
class AddMemClass (S : Type*) (M : Type*) [Add M] [SetLike S M] : Prop where
  /-- A substructure satisfying `AddMemClass` is closed under addition. -/
  add_mem : ∀ {s : S} {a b : M}, a ∈ s → b ∈ s → a + b ∈ s

{S : Type u_4}
{M : Type u_5}
[Add M]
[SetLike S M]
[self : AddMemClass S M]
{s : S}
{a b : M}


/-- The equivalence of categories `(C ⥤ Karoubi D) ≌ (Karoubi C ⥤ Karoubi D)`. -/
@[simps]
def karoubiUniversal₁ : C ⥤ Karoubi D ≌ Karoubi C ⥤ Karoubi D

(C : Type u_1)
(D : Type u_2)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]

(CategoryTheory.Idempotents.karoubiUniversal₁ C D).counitIso =
  CategoryTheory.Idempotents.KaroubiUniversal₁.counitIso C D


/-- Additive subsemigroups of an additive semigroup `A` are isomorphic to
multiplicative subsemigroups of `Multiplicative A`. -/
@[simps]
def AddSubsemigroup.toSubsemigroup : AddSubsemigroup A ≃o Subsemigroup (Multiplicative A)

{A : Type u_5}
[Add A]
(S : Subsemigroup (Multiplicative A))

↑((RelIso.symm AddSubsemigroup.toSubsemigroup) S) = ⇑Multiplicative.ofAdd ⁻¹' ↑S


@[simp] theorem utf8Len_append (cs₁ cs₂) : utf8Len (cs₁ ++ cs₂) = utf8Len cs₁ + utf8Len cs₂

String.utf8Len (cs₁ ++ cs₂) = String.utf8Len cs₁ + String.utf8Len cs₂


lemma pullbackSnd_apply (f : X ⟶ Z) (g : Y ⟶ Z) (x) : pullbackSnd f g x = x.1.2

(x : ↑(TopCat.of { p // f p.1 = g p.2 }))


@[simp]
lemma map₂_fst {Y : C} (f : X ⟶ Y) (p : YonedaCollection F Y) :
    (YonedaCollection.map₂ F f p).fst = yoneda.map f ≫ p.fst

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

{F : CategoryTheory.Functor (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ (Type v)}

(p : CategoryTheory.OverPresheafAux.YonedaCollection F Y)

(CategoryTheory.OverPresheafAux.YonedaCollection.map₂ F f p).fst =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.yoneda.map f) p.fst


theorem inv_lt_of_inv_lt (ha : 0 < a) (h : a⁻¹ < b) : b⁻¹ < a

{α : Type u_2}
[LinearOrderedSemifield α]
{a b : α}
(ha : 0 < a)
(h : a⁻¹ < b)


theorem inf_le {s : Multiset α} {a : α} (h : a ∈ s) : s.inf ≤ a

{α : Type u_1}
[SemilatticeInf α]
[OrderTop α]
{s : Multiset α}
{a : α}
(h : a ∈ s)


@[simp]
theorem dvd_mul_right (hu : IsUnit u) : a ∣ b * u ↔ a ∣ b

{α : Type u_1}
[Monoid α]
{a b u : α}
(hu : IsUnit u)


/-- The uncurrying functor, taking a functor `C ⥤ (D ⥤ E)` and producing a functor `(C × D) ⥤ E`.
-/
@[simps]
def uncurry : (C ⥤ D ⥤ E) ⥤ C × D ⥤ E

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

(CategoryTheory.uncurry.obj F).obj X = (F.obj X.1).obj X.2


protected theorem locallyFinite : LocallyFinite fun i => support (f i)

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

LocallyFinite fun i => Function.support ⇑(f i)


@[simp, norm_cast]
theorem cast_add [CharZero α] (m n) : ((m + n : ℚ) : α) = m + n

{α : Type u_3}
[DivisionRing α]
[CharZero α]
(m n : ℚ)


theorem toMultiset_map (f : α →₀ ℕ) (g : α → β) :
    f.toMultiset.map g = toMultiset (f.mapDomain g)

{α : Type u_1}
{β : Type u_2}
(f : α →₀ ℕ)
(g : α → β)

Multiset.map g (Finsupp.toMultiset f) = Finsupp.toMultiset (Finsupp.mapDomain g f)


@[to_additive exists_open_nhds_zero_half]
theorem exists_open_nhds_one_split {s : Set M} (hs : s ∈ 𝓝 (1 : M)) :
    ∃ V : Set M, IsOpen V ∧ (1 : M) ∈ V ∧ ∀ v ∈ V, ∀ w ∈ V, v * w ∈ s

{M : Type u_3}
[TopologicalSpace M]
[MulOneClass M]
[ContinuousMul M]
{s : Set M}
(hs : s ∈ 𝓝 1)

∃ V, IsOpen V ∧ 1 ∈ V ∧ ∀ v ∈ V, ∀ w ∈ V, v * w ∈ s


theorem coe_ne_one {x : ℝ} : (x : EReal) ≠ 1 ↔ x ≠ 1

↑x ≠ 1 ↔ x ≠ 1


theorem RingHom.isIntegralElem_zero : f.IsIntegralElem 0

{R : Type u_1}
{B : Type u_3}
[CommRing R]
[Ring B]
(f : R →+* B)


theorem smul_balancedCore_subset (s : Set E) {a : 𝕜} (ha : ‖a‖ ≤ 1) :
    a • balancedCore 𝕜 s ⊆ balancedCore 𝕜 s

{𝕜 : Type u_1}
{E : Type u_2}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
(s : Set E)
{a : 𝕜}
(ha : ‖a‖ ≤ 1)


lemma add_equiv {P P' Q Q' : Fin 3 → R} (hP : P ≈ P') (hQ : Q ≈ Q') :
    W'.add P Q ≈ W'.add P' Q'

{R : Type u}
[CommRing R]
{W' : WeierstrassCurve.Jacobian R}
{P P' Q Q' : Fin 3 → R}
(hP : P ≈ P')
(hQ : Q ≈ Q')


theorem SatisfiesM_anyM_iff_exists [Monad m] [LawfulMonad m]
    (p : α → m Bool) (as : Array α) (start stop) (q : Fin as.size → Prop)
    (hp : ∀ i : Fin as.size, start ≤ i.1 → i.1 < stop → SatisfiesM (· = true ↔ q i) (p as[i])) :
    SatisfiesM
      (fun res => res = true ↔ ∃ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop ∧ q i)
      (anyM p as start stop)

(hp : ∀ (i : Fin as.size), start ≤ ↑i → ↑i < stop → SatisfiesM (fun x => x = true ↔ q i) (p as[i]))

SatisfiesM (fun res => res = true ↔ ∃ i, start ≤ ↑i ∧ ↑i < stop ∧ q i) (Array.anyM p as start stop)


theorem jacobson_bot_polynomial_le_sInf_map_maximal :
    jacobson (⊥ : Ideal R[X]) ≤ sInf (map (C : R →+* R[X]) '' { J : Ideal R | J.IsMaximal })

⊥.jacobson ≤ sInf (Ideal.map Polynomial.C '' {J | J.IsMaximal})


theorem ae_eq_of_ae_le_of_lintegral_le {f g : α → ℝ≥0∞} (hfg : f ≤ᵐ[μ] g) (hf : ∫⁻ x, f x ∂μ ≠ ∞)
    (hg : AEMeasurable g μ) (hgf : ∫⁻ x, g x ∂μ ≤ ∫⁻ x, f x ∂μ) : f =ᵐ[μ] g

(hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ)


theorem mod_lt (x : Nat) {y : Nat} : y > 0 → x % y < y


theorem nhdsWithin_Ioi_self_neBot' {a : α} (H : (Ioi a).Nonempty) : NeBot (𝓝[>] a)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{a : α}
(H : (Set.Ioi a).Nonempty)


@[simp]
theorem product_eq_empty {s : Finset α} {t : Finset β} : s ×ˢ t = ∅ ↔ s = ∅ ∨ t = ∅

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

s ×ˢ t = ∅ ↔ s = ∅ ∨ t = ∅


theorem HasDerivAt.ccosh (hf : HasDerivAt f f' x) :
    HasDerivAt (fun x => Complex.cosh (f x)) (Complex.sinh (f x) * f') x

{f : ℂ → ℂ}
{f' x : ℂ}
(hf : HasDerivAt f f' x)


@[simp]
theorem limLax_μ (F G : J ⥤ C) :
    (@limLax J _ C _ _ _).μ F G =
      limit.lift (F ⊗ G)
        { pt := limit F ⊗ limit G
          π :=
            { app := fun j => limit.π F j ⊗ limit.π G j
              naturality := fun j j' f => by
                dsimp
                simp only [Category.id_comp, ← tensor_comp, limit.w] } }

CategoryTheory.Limits.limLax.μ F G =
  CategoryTheory.Limits.limit.lift (F ⊗ G)
    { pt := CategoryTheory.Limits.limit F ⊗ CategoryTheory.Limits.limit G,
      π := { app := fun j => CategoryTheory.Limits.limit.π F j ⊗ CategoryTheory.Limits.limit.π G j, naturality := ⋯ } }


/-- The well-formedness invariant implies the ordering and balance properties. -/
theorem WF.out {t : RBNode α} (h : t.WF cmp) : t.Ordered cmp ∧ ∃ c n, t.Balanced c n

{α : Type u_1}
{cmp : α → α → Ordering}
{t : Batteries.RBNode α}
(h : Batteries.RBNode.WF cmp t)

Batteries.RBNode.Ordered cmp t ∧ ∃ c n, t.Balanced c n


theorem nextn_stop : ∀ {s}, ValidFor l m r s → ∀ n, s.nextn n ⟨utf8Len m⟩ = ⟨utf8Len m⟩

Substring.ValidFor l m r s → ∀ (n : Nat), s.nextn n { byteIdx := String.utf8Len m } = { byteIdx := String.utf8Len m }


theorem isRat_div {α : Type u} [DivisionRing α] : {a b : α} → {cn : ℤ} → {cd : ℕ} →
    IsRat (a * b⁻¹) cn cd → IsRat (a / b) cn cd

{α : Type u}
[DivisionRing α]
{a b : α}
{cn : ℤ}
{cd : ℕ}

Mathlib.Meta.NormNum.IsRat (a * b⁻¹) cn cd → Mathlib.Meta.NormNum.IsRat (a / b) cn cd


theorem isRadical [IsReduced B] : IsRadical (minpoly A x)

(A : Type u_1)
{B : Type u_2}
[Field A]
[Ring B]
[Algebra A B]
(x : B)
[IsReduced B]


@[mono]
theorem subtype_mono {p : α → Prop} [DecidablePred p] : Monotone (Finset.subtype p)

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


lemma inf'_univ_eq_ciInf (f : ι → α) : univ.inf' univ_nonempty f = ⨅ i, f i

{ι : Type u_1}
{α : Type u_2}
[ConditionallyCompleteLattice α]
[Fintype ι]
[Nonempty ι]
(f : ι → α)


lemma eventually_asympBound_r_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < asympBound g a b (r i n)

{α : Type u_1}
[Fintype α]
[Nonempty α]
{T : ℕ → ℝ}
{g : ℝ → ℝ}
{a b : α → ℝ}
{r : α → ℕ → ℕ}
(R : AkraBazziRecurrence T g a b r)

∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), 0 < AkraBazziRecurrence.asympBound g a b (r i n)


theorem takeWhile_idem : takeWhile p (takeWhile p l) = takeWhile p l

{α : Type u}
{p : α → Bool}
{l : List α}

List.takeWhile p (List.takeWhile p l) = List.takeWhile p l


/-- If `f` is bounded on the unit vertical strip, then `f` is bounded by `sSupNormIm` there. -/
lemma norm_le_sSupNormIm (f : ℂ → E) (z : ℂ) (hD : z ∈ verticalClosedStrip 0 1)
    (hB : BddAbove ((norm ∘ f) '' (verticalClosedStrip 0 1))) :
    ‖f z‖ ≤ sSupNormIm f (z.re)

(hD : z ∈ Complex.HadamardThreeLines.verticalClosedStrip 0 1)

(hB : BddAbove (norm ∘ f '' Complex.HadamardThreeLines.verticalClosedStrip 0 1))

‖f z‖ ≤ Complex.HadamardThreeLines.sSupNormIm f z.re


@[simp]
theorem const_abs [LinearOrderedAddCommGroup β] (x : β) : (↑|x| : β*) = |↑x|

{α : Type u}
{β : Type v}
{φ : Ultrafilter α}
[LinearOrderedAddCommGroup β]
(x : β)


@[simp]
theorem coe_eval₂RingHom (f : R →+* S) (x) : ⇑(eval₂RingHom f x) = eval₂ f x

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

⇑(Polynomial.eval₂RingHom f x) = Polynomial.eval₂ f x


lemma coe_comp {X Y Z : GrpWithZero} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f


lemma div_max_sq_ge_one (x : Fin 2 → ℤ) (hx : x ≠ 0) :
    1 ≤ (x 0 / ‖x‖) ^ 2 ∨ 1 ≤ (x 1 / ‖x‖) ^ 2


theorem symm_apply_apply {x : Z} (hx : x ∈ e.source) : e.toPartialEquiv.symm (e x) = x

{B : Type u_2}
{F : Type u_3}
{Z : Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
{proj : Z → B}
(e : Pretrivialization F proj)
{x : Z}
(hx : x ∈ e.source)


theorem insertNth_apply_below {i j : Fin (n + 1)} (h : j < i) (x : α i)
    (p : ∀ k, α (i.succAbove k)) :
    i.insertNth x p j = @Eq.recOn _ _ (fun x _ ↦ α x) _
    (succAbove_castPred_of_lt _ _ h) (p <| j.castPred _)

{n : ℕ}
{α : Fin (n + 1) → Type u}
{i j : Fin (n + 1)}
(h : j < i)
(x : α i)
(p : (k : Fin n) → α (i.succAbove k))

i.insertNth x p j = Eq.recOn ⋯ (p (j.castPred ⋯))


theorem ergodic_conjugate_iff {e : α ≃ᵐ β} (h : MeasurePreserving e μ μ') :
    Ergodic (e ∘ f ∘ e.symm) μ' ↔ Ergodic f μ

{e : α ≃ᵐ β}

(h : MeasureTheory.MeasurePreserving (⇑e) μ μ')

Ergodic (⇑e ∘ f ∘ ⇑e.symm) μ' ↔ Ergodic f μ


@[simp] theorem toNat_neg_nat : ∀ n : Nat, (-(n : Int)).toNat = 0


lemma lightToProfinite_map_proj_eq (n : ℕ) : lightToProfinite.map (S.proj n) =
    (lightToProfinite.obj S).asLimitCone.π.app _

lightToProfinite.map (S.proj n) =
  (lightToProfinite.obj S).asLimitCone.π.app
    ((CategoryTheory.Limits.sequentialFunctor (DiscreteQuotient ↑(lightToProfinite.obj S).toTop)).obj (Opposite.op n))


@[simp]
theorem forall₂_map_right_iff {f : γ → β} :
    ∀ {l u}, Forall₂ R l (map f u) ↔ Forall₂ (fun a c => R a (f c)) l u

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{R : α → β → Prop}
{f : γ → β}
{l : List α}
{u : List γ}

List.Forall₂ R l (List.map f u) ↔ List.Forall₂ (fun a c => R a (f c)) l u


theorem isFibAux_two_mul {n a b n' a' b' : ℕ} (H : IsFibAux n a b)
    (hn : 2 * n = n') (h1 : a * (2 * b - a) = a') (h2 : a * a + b * b = b') :
    IsFibAux n' a' b'

(H : Mathlib.Meta.NormNum.IsFibAux n a b)


/-- `finsetClopens X` is injective. -/
theorem finsetClopens_inj [CompactSpace X] :
    (finsetClopens X).Injective

(X : Type u_2)
[TopologicalSpace X]
[CompactSpace X]


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

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

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


theorem isPrimitiveClassified_of_coprime_of_odd_of_pos (hc : Int.gcd x y = 1) (hyo : y % 2 = 1)
    (hzpos : 0 < z) : h.IsPrimitiveClassified

{x y z : ℤ}
(h : PythagoreanTriple x y z)
(hc : x.gcd y = 1)
(hyo : y % 2 = 1)
(hzpos : 0 < z)


theorem lineCount_eq_lineCount [Finite P] [Finite L] (p q : P) : lineCount L p = lineCount L q

{P : Type u_1}
(L : Type u_2)
[Membership P L]
[Configuration.ProjectivePlane P L]
[Finite P]
[Finite L]
(p q : P)

Configuration.lineCount L p = Configuration.lineCount L q


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

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


@[simp]
theorem IsPrimitive.primPart_eq {p : R[X]} (hp : p.IsPrimitive) : p.primPart = p

{R : Type u_1}
[CommRing R]
[IsDomain R]
[NormalizedGCDMonoid R]
{p : Polynomial R}
(hp : p.IsPrimitive)


theorem eqToHom_apply {β : Type w} {X Y : β → C} (h : X = Y) (b : β) :
    (eqToHom h : X ⟶ Y) b = eqToHom (by rw [h])

(C : Type u)
[CategoryTheory.Category.{v, u} C]
{β : Type w}
{X Y : β → C}
(h : X = Y)
(b : β)

CategoryTheory.eqToHom h b = CategoryTheory.eqToHom ⋯


protected theorem one_ne_zero : (1 : Ordinal) ≠ 0


/-- An `n`-Freiman homomorphism from a set `A` to a set `B` is a map which preserves products of `n`
elements. -/
@[to_additive]
structure IsMulFreimanIso (n : ℕ) (A : Set α) (B : Set β) (f : α → β) : Prop where
  bijOn : BijOn f A B
  /-- An `n`-Freiman homomorphism preserves products of `n` elements. -/
  map_prod_eq_map_prod ⦃s t : Multiset α⦄ (hsA : ∀ ⦃x⦄, x ∈ s → x ∈ A) (htA : ∀ ⦃x⦄, x ∈ t → x ∈ A)
    (hs : Multiset.card s = n) (ht : Multiset.card t = n) :
    (s.map f).prod = (t.map f).prod ↔ s.prod = t.prod

{α : Type u_2}
{β : Type u_3}
[CommMonoid α]
[CommMonoid β]
{n : ℕ}
{A : Set α}
{B : Set β}
{f : α → β}
(self : IsMulFreimanIso n A B f)
⦃s t : Multiset α⦄
(hsA : ∀ ⦃x : α⦄, x ∈ s → x ∈ A)
(htA : ∀ ⦃x : α⦄, x ∈ t → x ∈ A)
(hs : Multiset.card s = n)
(ht : Multiset.card t = n)

(Multiset.map f s).prod = (Multiset.map f t).prod ↔ s.prod = t.prod


@[simp]
theorem nat_lt_card {o} {n : ℕ} : (n : Cardinal) < card o ↔ (n : Ordinal) < o


theorem smul_mem_span_smul_of_mem {s : Set S} {t : Set A} {k : S} (hks : k ∈ span R s) {x : A}
    (hx : x ∈ t) : k • x ∈ span R (s • t)

{R : Type u}
{S : Type v}
{A : Type w}
[Semiring R]
[Semiring S]
[AddCommMonoid A]
[Module R S]
[Module S A]
[Module R A]
[IsScalarTower R S A]
{s : Set S}
{t : Set A}
{k : S}
(hks : k ∈ Submodule.span R s)
{x : A}
(hx : x ∈ t)


@[reassoc (attr := simp)]
theorem Q_f_idem (q n : ℕ) : ((Q q).f n : X _[n] ⟶ _) ≫ (Q q).f n = (Q q).f n

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{X : CategoryTheory.SimplicialObject C}
(q n : ℕ)

(AlgebraicTopology.DoldKan.Q q).f n ≫ (AlgebraicTopology.DoldKan.Q q).f n = (AlgebraicTopology.DoldKan.Q q).f n


theorem antilipschitzWith_iff_le_mul_nndist :
    AntilipschitzWith K f ↔ ∀ x y, nndist x y ≤ K * nndist (f x) (f y)

{α : Type u_1}
{β : Type u_2}
[PseudoMetricSpace α]
[PseudoMetricSpace β]
{K : ℝ≥0}
{f : α → β}

AntilipschitzWith K f ↔ ∀ (x y : α), nndist x y ≤ K * nndist (f x) (f y)


@[to_additive]
theorem prod_mul_tprod_nat_mul'
    {f : ℕ → M} {k : ℕ} (h : Multipliable (fun n ↦ f (n + k))) :
    ((∏ i ∈ range k, f i) * ∏' i, f (i + k)) = ∏' i, f i

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
[T2Space M]
[ContinuousAdd M]
{f : ℕ → M}
{k : ℕ}
(h : Summable fun n => f (n + k))

∑ i ∈ Finset.range k, f i + ∑' (i : ℕ), f (i + k) = ∑' (i : ℕ), f i


theorem size_uset (a : Array α) (v i h) : (uset a i v h).size = a.size

{α : Type u_1}
(a : Array α)
(v : α)
(i : USize)
(h : i.toNat < a.size)


@[to_additive]
theorem smul_Lp_add (c : Mᵈᵐᵃ) : ∀ f g : Lp E p μ, c • (f + g) = c • f + c • g

[MeasureTheory.VAddInvariantMeasure M α μ]


/-- `Equiv.piCongrRight` as a homeomorphism: this is the natural homeomorphism
`Π i, Y₁ i ≃ₜ Π j, Y₂ i` obtained from homeomorphisms `Y₁ i ≃ₜ Y₂ i` for each `i`. -/
@[simps! apply toEquiv]
def piCongrRight {ι : Type*} {Y₁ Y₂ : ι → Type*} [∀ i, TopologicalSpace (Y₁ i)]
    [∀ i, TopologicalSpace (Y₂ i)] (F : ∀ i, Y₁ i ≃ₜ Y₂ i) : (∀ i, Y₁ i) ≃ₜ ∀ i, Y₂ i

{ι : Type u_6}
{Y₁ : ι → Type u_7}
{Y₂ : ι → Type u_8}
[(i : ι) → TopologicalSpace (Y₁ i)]
[(i : ι) → TopologicalSpace (Y₂ i)]
(F : (i : ι) → Y₁ i ≃ₜ Y₂ i)
(H : (a : ι) → Y₁ a)
(a : ι)

(Homeomorph.piCongrRight F) H a = (F a) (H a)


/-- Mapping an integral closure along an `AlgEquiv` gives the integral closure. -/
theorem integralClosure_map_algEquiv [Algebra R S] (f : A ≃ₐ[R] S) :
    (integralClosure R A).map (f : A →ₐ[R] S) = integralClosure R S

{R : Type u_1}
{A : Type u_2}
{S : Type u_4}
[CommRing R]
[CommRing A]
[CommRing S]
[Algebra R A]
[Algebra R S]
(f : A ≃ₐ[R] S)

Subalgebra.map (↑f) (integralClosure R A) = integralClosure R S


lemma sum_map_mul_left : sum (s.map fun i ↦ a * f i) = a * sum (s.map f)

{ι : Type u_1}
{α : Type u_2}
[NonUnitalNonAssocSemiring α]
{a : α}
{s : Multiset ι}
{f : ι → α}

(Multiset.map (fun i => a * f i) s).sum = a * (Multiset.map f s).sum


@[ext 1100]
theorem hom_ext (g1 g2 : widePushout _ _ arrows ⟶ X) : (∀ j : J,
    ι arrows j ≫ g1 = ι arrows j ≫ g2) → head arrows ≫ g1 = head arrows ≫ g2 → g1 = g2

[CategoryTheory.Limits.HasWidePushout B objs arrows]

(g1 g2 : CategoryTheory.Limits.widePushout B objs arrows ⟶ X)

(∀ (j : J), CategoryTheory.Limits.WidePushout.ι arrows j ≫ g1 = CategoryTheory.Limits.WidePushout.ι arrows j ≫ g2) →
  CategoryTheory.Limits.WidePushout.head arrows ≫ g1 = CategoryTheory.Limits.WidePushout.head arrows ≫ g2 → g1 = g2


lemma predAbove_of_succ_le (p : Fin n) (i : Fin (n + 1)) (h : succ p ≤ i)
    (hi := Fin.ne_of_gt $ Fin.lt_of_lt_of_le (succ_pos _) h) :
    p.predAbove i = i.pred hi

{n : ℕ}
(p : Fin n)
(i : Fin (n + 1))
(h : p.succ ≤ i)
(hi : i ≠ 0 := ⋯)


theorem lintegral_lintegral_mul {β} [MeasurableSpace β] {ν : Measure β} {f : α → ℝ≥0∞}
    {g : β → ℝ≥0∞} (hf : AEMeasurable f μ) (hg : AEMeasurable g ν) :
    ∫⁻ x, ∫⁻ y, f x * g y ∂ν ∂μ = (∫⁻ x, f x ∂μ) * ∫⁻ y, g y ∂ν

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{β : Type u_5}
[MeasurableSpace β]
{ν : MeasureTheory.Measure β}
{f : α → ℝ≥0∞}
{g : β → ℝ≥0∞}
(hf : AEMeasurable f μ)
(hg : AEMeasurable g ν)

∫⁻ (x : α), ∫⁻ (y : β), f x * g y ∂ν ∂μ = (∫⁻ (x : α), f x ∂μ) * ∫⁻ (y : β), g y ∂ν


/-- Composition of elementary embeddings is associative. -/
theorem comp_assoc (f : M ↪ₑ[L] N) (g : N ↪ₑ[L] P) (h : P ↪ₑ[L] Q) :
    (h.comp g).comp f = h.comp (g.comp f)

{L : FirstOrder.Language}
{M : Type u_1}
{N : Type u_2}
{P : Type u_3}
{Q : Type u_4}
[L.Structure M]
[L.Structure N]
[L.Structure P]
[L.Structure Q]
(f : M ↪ₑ[L] N)
(g : N ↪ₑ[L] P)
(h : P ↪ₑ[L] Q)


theorem map_le_iff_le_comap {f : L →ₐ[K] L'}
    {s : IntermediateField K L} {t : IntermediateField K L'} :
    s.map f ≤ t ↔ s ≤ t.comap f

{K : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
{f : L →ₐ[K] L'}
{s : IntermediateField K L}
{t : IntermediateField K L'}

IntermediateField.map f s ≤ t ↔ s ≤ IntermediateField.comap f t


theorem cauchy_iff' {f : Filter α} :
    Cauchy f ↔ NeBot f ∧ ∀ s ∈ 𝓤 α, ∃ t ∈ f, ∀ x ∈ t, ∀ y ∈ t, (x, y) ∈ s

{α : Type u}
[uniformSpace : UniformSpace α]
{f : Filter α}

Cauchy f ↔ f.NeBot ∧ ∀ s ∈ 𝓤 α, ∃ t ∈ f, ∀ x ∈ t, ∀ y ∈ t, (x, y) ∈ s


theorem h_apply_fromCoset (x : B) :
    (h x) (fromCoset ⟨f.range, 1, one_leftCoset _⟩) =
      fromCoset ⟨f.range, 1, one_leftCoset _⟩

((Grp.SurjectiveOfEpiAuxs.h f) x) (Grp.SurjectiveOfEpiAuxs.XWithInfinity.fromCoset ⟨↑(MonoidHom.range f), ⋯⟩) =
  Grp.SurjectiveOfEpiAuxs.XWithInfinity.fromCoset ⟨↑(MonoidHom.range f), ⋯⟩


theorem one_lt_card [Finite α] [h : Nontrivial α] : 1 < Nat.card α

{α : Type u_1}
[Finite α]
[h : Nontrivial α]


theorem mem_map_iff (hφ : Function.Injective φ.obj) (S : Subgroupoid C) {c d : D} (f : c ⟶ d) :
    f ∈ (map φ hφ S).arrows c d ↔
      ∃ (a b : C) (g : a ⟶ b) (ha : φ.obj a = c) (hb : φ.obj b = d) (_hg : g ∈ S.arrows a b),
        f = eqToHom ha.symm ≫ φ.map g ≫ eqToHom hb

{C : Type u}
[CategoryTheory.Groupoid C]
{D : Type u_1}
[CategoryTheory.Groupoid D]
(φ : CategoryTheory.Functor C D)
(hφ : Function.Injective φ.obj)
(S : CategoryTheory.Subgroupoid C)
{c d : D}
(f : c ⟶ d)

f ∈ (CategoryTheory.Subgroupoid.map φ hφ S).arrows c d ↔
  ∃ a b g,
    ∃ (ha : φ.obj a = c) (hb : φ.obj b = d) (_ : g ∈ S.arrows a b),
      f =
        CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ⋯)
          (CategoryTheory.CategoryStruct.comp (φ.map g) (CategoryTheory.eqToHom hb))


@[to_additive (attr := simp)]
lemma UniformFun.ofFun_inv [Inv β] (f : α → β) : ofFun (f⁻¹) = (ofFun f)⁻¹

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

UniformFun.ofFun f⁻¹ = (UniformFun.ofFun f)⁻¹


theorem canonicalEquiv_flip (I) : canonicalEquiv S P P' (canonicalEquiv S P' P I) = I

{R : Type u_1}
[CommRing R]
(S : Submonoid R)
(P : Type u_2)
[CommRing P]
[Algebra R P]
[loc : IsLocalization S P]
(P' : Type u_3)
[CommRing P']
[Algebra R P']
[loc' : IsLocalization S P']
(I : FractionalIdeal S P')

(FractionalIdeal.canonicalEquiv S P P') ((FractionalIdeal.canonicalEquiv S P' P) I) = I


@[simp]
theorem add_one_le_ceil_iff : z + 1 ≤ ⌈a⌉ ↔ (z : α) < a

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{z : ℤ}
{a : α}


@[to_additive (attr := simp)]
theorem nnnorm_smul_Lp (c : Mᵈᵐᵃ) (f : Lp E p μ) : ‖c • f‖₊ = ‖f‖₊

‖c +ᵥ f‖₊ = ‖f‖₊


@[simp]
theorem add_self_eq_zero {a : R} : a + a = 0 ↔ a = 0

{R : Type u_1}
[NonAssocSemiring R]
[NoZeroDivisors R]
[CharZero R]
{a : R}


theorem ssubset_of_subset_of_ne [IsAntisymm α (· ⊆ ·)] (h₁ : a ⊆ b) (h₂ : a ≠ b) : a ⊂ b

[IsNonstrictStrictOrder α (fun x x_1 => x ⊆ x_1) fun x x_1 => x ⊂ x_1]


/-- A map `f : X → Y` between two topological spaces is said to be **proper** if it is continuous
and, for all `ℱ : Filter X`, any cluster point of `map f ℱ` is the image by `f` of a cluster point
of `ℱ`. -/
@[mk_iff isProperMap_iff_clusterPt, fun_prop]
structure IsProperMap (f : X → Y) extends Continuous f : Prop where
  /-- By definition, if `f` is a proper map and `ℱ` is any filter on `X`, then any cluster point of
  `map f ℱ` is the image by `f` of some cluster point of `ℱ`. -/
  clusterPt_of_mapClusterPt :
    ∀ ⦃ℱ : Filter X⦄, ∀ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ

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

IsProperMap f ↔ Continuous f ∧ ∀ ⦃ℱ : Filter X⦄ ⦃y : Y⦄, MapClusterPt y ℱ f → ∃ x, f x = y ∧ ClusterPt x ℱ


@[simp]
protected theorem map_pow (f : α → β) (P : RegularExpression α) :
    ∀ n : ℕ, map f (P ^ n) = map f P ^ n

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(P : RegularExpression α)
(n : ℕ)

RegularExpression.map f (P ^ n) = RegularExpression.map f P ^ n


@[simp, norm_cast]
theorem coe_eq : (f : Germ l β) = g ↔ f =ᶠ[l] g

{α : Type u_1}
{β : Type u_2}
{l : Filter α}
{f g : α → β}


theorem isHomogeneous_monomial {d : σ →₀ ℕ} (r : R) {n : ℕ} (hn : d.degree = n) :
    IsHomogeneous (monomial d r) n

{σ : Type u_1}
{R : Type u_3}
[CommSemiring R]
{d : σ →₀ ℕ}
(r : R)
{n : ℕ}
(hn : d.degree = n)

((MvPolynomial.monomial d) r).IsHomogeneous n


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

{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 (CategoryTheory.CategoryStruct.id a) f).hom =
  CategoryTheory.CategoryStruct.comp (F.map₂ (CategoryTheory.Bicategory.leftUnitor f).hom)
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.Bicategory.leftUnitor (F.map f)).inv
      (CategoryTheory.Bicategory.whiskerRight (F.mapId a).inv (F.map f)))


theorem contMDiffAt_iff_target_of_mem_source {x : M} {y : M'} (hy : f x ∈ (chartAt H' y).source) :
    ContMDiffAt I I' n f x ↔
      ContinuousAt f x ∧ ContMDiffAt I 𝓘(𝕜, E') n (extChartAt I' y ∘ f) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
{f : M → M'}
{n : ℕ∞}
{x : M}
{y : M'}
(hy : f x ∈ (chartAt H' y).source)

ContMDiffAt I I' n f x ↔ ContinuousAt f x ∧ ContMDiffAt I 𝓘(𝕜, E') n (↑(extChartAt I' y) ∘ f) x


/-- Together `Matrix.invertibleTranspose` and `Matrix.invertibleOfInvertibleTranspose` form an
equivalence, although both sides of the equiv are subsingleton anyway. -/
@[simps]
def transposeInvertibleEquivInvertible : Invertible Aᵀ ≃ Invertible A

{n : Type u_2}
{α : Type u_3}
[Fintype n]
[DecidableEq n]
[CommSemiring α]
(A : Matrix n n α)
[Invertible A]

A.transposeInvertibleEquivInvertible.symm inst✝ = A.invertibleTranspose


theorem insert_eq_ite (a : α) (l : List α) : insert a l = if a ∈ l then l else a :: l

{α : Type u_1}
[DecidableEq α]
(a : α)
(l : List α)


theorem ContinuousWithinAt.prod_map {f : α → γ} {g : β → δ} {s : Set α} {t : Set β} {x : α} {y : β}
    (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g t y) :
    ContinuousWithinAt (Prod.map f g) (s ×ˢ t) (x, y)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
{f : α → γ}
{g : β → δ}
{s : Set α}
{t : Set β}
{x : α}
{y : β}
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g t y)


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

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

∏ i : Option α, f i = f none * ∏ i : α, f (some i)


theorem comap_comap (g : F →ₗ[𝕜] G) (f : E →ₗ[𝕜] F) (S : PointedCone 𝕜 G) :
    (S.comap g).comap f = S.comap (g.comp f)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[AddCommMonoid F]
[Module 𝕜 F]
[AddCommMonoid G]
[Module 𝕜 G]
(g : F →ₗ[𝕜] G)
(f : E →ₗ[𝕜] F)
(S : PointedCone 𝕜 G)

PointedCone.comap f (PointedCone.comap g S) = PointedCone.comap (g ∘ₗ f) S


protected theorem min_le_right (a b : Nat) : min a b ≤ b


/-- This is the same as `Indep.exists_insert_of_not_base`, but phrased so that
  it is defeq to the augmentation axiom for independent sets. -/
theorem Indep.exists_insert_of_not_mem_maximals (M : Matroid α) ⦃I B : Set α⦄ (hI : M.Indep I)
    (hInotmax : I ∉ maximals (· ⊆ ·) {I | M.Indep I}) (hB : B ∈ maximals (· ⊆ ·) {I | M.Indep I}) :
    ∃ x ∈ B \ I, M.Indep (insert x I)

(hInotmax : I ∉ maximals (fun x x_1 => x ⊆ x_1) {I | M.Indep I})

(hB : B ∈ maximals (fun x x_1 => x ⊆ x_1) {I | M.Indep I})


/-- The cardinality of the reals, as a set. -/
theorem mk_univ_real : #(Set.univ : Set ℝ) = 𝔠


@[simp]
theorem isRotated_nil_iff : l ~r [] ↔ l = []


theorem eq_sub_iff_add_eq {x y z : BitVec w} : x = z - y ↔ x + y = z


lemma densityToFinite_ae_ne_top (μ : Measure α) [SigmaFinite μ] :
    ∀ᵐ x ∂μ, μ.densityToFinite x ≠ ∞

{α : Type u_1}
{mα : MeasurableSpace α}
(μ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]


theorem ofNat_lt_of_lt {x y : Nat} (h : x < y) : (x : Int) < (y : Int)


theorem mem_derangements_iff_fixedPoints_eq_empty {f : Perm α} :
    f ∈ derangements α ↔ fixedPoints f = ∅

f ∈ derangements α ↔ Function.fixedPoints ⇑f = ∅


lemma equivTensorQuot_naturality (f : M →ₗ[R] M') :
    equivTensorQuot r M' ∘ₗ map r f =
      f.rTensor (R ⧸ Ideal.span {r}) ∘ₗ equivTensorQuot r M

{R : Type u_2}
[CommRing R]
(r : R)
{M : Type u_1}
{M' : Type u_3}
[AddCommGroup M]
[Module R M]
[AddCommGroup M']
[Module R M']
(f : M →ₗ[R] M')

↑(QuotSMulTop.equivTensorQuot r M') ∘ₗ (QuotSMulTop.map r) f =
  LinearMap.rTensor (R ⧸ Ideal.span {r}) f ∘ₗ ↑(QuotSMulTop.equivTensorQuot r M)


theorem degree_basis (hvs : Set.InjOn v s) (hi : i ∈ s) :
    (Lagrange.basis s v i).degree = ↑(s.card - 1)

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{s : Finset ι}
{v : ι → F}
{i : ι}
(hvs : Set.InjOn v ↑s)
(hi : i ∈ s)


theorem starLift_range_le
    {f : A →⋆ₙₐ[R] C} {S : StarSubalgebra R C} :
    (starLift f).range ≤ S ↔ NonUnitalStarAlgHom.range f ≤ S.toNonUnitalStarSubalgebra

{R : Type u_1}
{A : Type u_2}
{C : Type u_3}
[CommSemiring R]
[NonUnitalSemiring A]
[StarRing R]
[StarRing A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
[StarModule R A]
[Semiring C]
[StarRing C]
[Algebra R C]
[StarModule R C]
{f : A →⋆ₙₐ[R] C}
{S : StarSubalgebra R C}

(Unitization.starLift f).range ≤ S ↔ NonUnitalStarAlgHom.range f ≤ S.toNonUnitalStarSubalgebra


@[to_additive]
lemma unit_of_mem_ofUnits_spec_val_eq_of_mem (S : Subgroup Mˣ) {x : M} (h : x ∈ S.ofUnits) :
    S.unit_of_mem_ofUnits h = x

{M : Type u_1}
[Monoid M]
(S : Subgroup Mˣ)
{x : M}
(h : x ∈ S.ofUnits)


theorem subset_preimage_image (f : α → β) (s : Set α) : s ⊆ f ⁻¹' (f '' s)

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


@[simp]
theorem bfamilyOfFamily_typein {ι} (f : ι → α) (i) :
    bfamilyOfFamily f (typein _ i) (typein_lt_type _ i) = f i

{α : Type u_1}
{ι : Type u_4}
(f : ι → α)
(i : ι)

Ordinal.bfamilyOfFamily f (Ordinal.typein WellOrderingRel i) ⋯ = f i


@[to_additive (attr := simp) fst_comp_prod]
theorem fst_comp_prod (f : M →ₙ* N) (g : M →ₙ* P) : (fst N P).comp (f.prod g) = f

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[Mul M]
[Mul N]
[Mul P]
(f : M →ₙ* N)
(g : M →ₙ* P)


theorem Ioo_subset_closure_interior : Ioo a b ⊆ closure (interior (Ioo a b))

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[OrderClosedTopology α]
{a b : α}

Set.Ioo a b ⊆ closure (interior (Set.Ioo a b))


@[to_additive Ioc_add_Ico_subset]
theorem Ioc_mul_Ico_subset' (a b c d : α) : Ioc a b * Ico c d ⊆ Ioo (a * c) (b * d)

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

[CovariantClass α α (Function.swap HAdd.hAdd) LT.lt]

Set.Ioc a b + Set.Ico c d ⊆ Set.Ioo (a + c) (b + d)


/-- The partition where every vertex is in its own part. -/
@[simps]
instance : Inhabited (Partition G)


theorem invOfUnit_eq (φ : k⟦X⟧) (h : constantCoeff k φ ≠ 0) :
    invOfUnit φ (Units.mk0 _ h) = φ⁻¹

(h : (PowerSeries.constantCoeff k) φ ≠ 0)

φ.invOfUnit (Units.mk0 ((PowerSeries.constantCoeff k) φ) h) = φ⁻¹


@[to_additive (attr := simp)]
lemma sup'_inv [SemilatticeSup β] {s : Finset α} (hs : s⁻¹.Nonempty) (f : α → β) :
    sup' s⁻¹ hs f = sup' s hs.of_inv (f ·⁻¹)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Neg α]
[SemilatticeSup β]
{s : Finset α}
(hs : (-s).Nonempty)
(f : α → β)

(-s).sup' hs f = s.sup' ⋯ fun x => f (-x)


/-- The image of a monoid hom is a submonoid of the codomain. -/
@[to_additive "The image of an `AddMonoid` hom is an `AddSubmonoid` of the codomain."]
theorem Range.isSubmonoid {γ : Type*} [Monoid γ] {f : M → γ} (hf : IsMonoidHom f) :
    IsSubmonoid (Set.range f)

{M : Type u_1}
[AddMonoid M]
{γ : Type u_3}
[AddMonoid γ]
{f : M → γ}
(hf : IsAddMonoidHom f)


@[to_additive Set.AddAntidiagonal.eq_of_fst_eq_fst]
theorem eq_of_fst_eq_fst (h : (x : α × α).fst = (y : α × α).fst) : x = y

{α : Type u_1}
[CancelCommMonoid α]
{s t : Set α}
{a : α}
{x y : ↑(s.mulAntidiagonal t a)}
(h : (↑x).1 = (↑y).1)


theorem mul_sup_eq_of_coprime_right (h : K ⊔ J = ⊤) : I * K ⊔ J = I ⊔ J

{R : Type u}
[CommSemiring R]
{I J K : Ideal R}
(h : K ⊔ J = ⊤)


theorem fderivWithin_continuousMultilinear_apply_const (hxs : UniqueDiffWithinAt 𝕜 s x)
    (hc : DifferentiableWithinAt 𝕜 c s x) (u : ∀ i, M i) :
    fderivWithin 𝕜 (fun y ↦ (c y) u) s x = ((fderivWithin 𝕜 c s x).flipMultilinear u)

{c : E → ContinuousMultilinearMap 𝕜 M H}

fderivWithin 𝕜 (fun y => (c y) u) s x = (fderivWithin 𝕜 c s x).flipMultilinear u


@[simp]
theorem Complex.volume_ball (a : ℂ) (r : ℝ) :
    volume (Metric.ball a r) = .ofReal r ^ 2 * NNReal.pi

MeasureTheory.volume (Metric.ball a r) = ENNReal.ofReal r ^ 2 * ↑NNReal.pi


protected theorem antilipschitz : AntilipschitzWith 1 e

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


/-- Reinterpret a monoid isomorphism `f : M ≃* N` as an equivalence `SingleObj M ≌ SingleObj N`. -/
@[simps!]
def toSingleObjEquiv (e : M ≃* N) : SingleObj M ≌ SingleObj N

{M : Type u}
{N : Type v}
[Monoid M]
[Monoid N]
(e : M ≃* N)

e.toSingleObjEquiv.counitIso.inv = CategoryTheory.eqToHom ⋯


theorem lift'_iInf_of_map_univ {f : ι → Filter α} {g : Set α → Set β}
    (hg : ∀ {s t}, g (s ∩ t) = g s ∩ g t) (hg' : g univ = univ) :
    (iInf f).lift' g = ⨅ i, (f i).lift' g

(hg : ∀ {s t : Set α}, g (s ∩ t) = g s ∩ g t)


theorem norm_div_natCast {m n : ℕ} :
    ‖(↑(↑m / ↑n * p) : AddCircle p)‖ = p * (↑(min (m % n) (n - m % n)) / n)

‖↑(↑m / ↑n * p)‖ = p * (↑(min (m % n) (n - m % n)) / ↑n)


theorem inf_principal_eq_bot_iff_comap {F : Filter α} {s : Set α} :
    F ⊓ 𝓟 s = ⊥ ↔ comap ((↑) : s → α) F = ⊥

F ⊓ 𝓟 s = ⊥ ↔ Filter.comap Subtype.val F = ⊥