@[simp]
theorem dvd_zero (a : α) : a ∣ 0

{α : Type u_1}
[SemigroupWithZero α]
(a : α)


theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
    Function.Injective (Pi.cons s a b)

{α : Type u_1}
{δ : α → Sort v}
[DecidableEq α]
{a : α}
{b : δ a}
{s : Finset α}
(hs : a ∉ s)

Function.Injective (Finset.Pi.cons s a b)


lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂

Surreal.Multiplication.P3 x₁ x₂ y₁ y₂ ↔ Surreal.Multiplication.P3 (-x₂) (-x₁) y₁ y₂


theorem nonUniforms_mono {ε ε' : 𝕜} (h : ε ≤ ε') : P.nonUniforms G ε' ⊆ P.nonUniforms G ε

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
[DecidableEq α]
{A : Finset α}
(P : Finpartition A)
(G : SimpleGraph α)
[DecidableRel G.Adj]
{ε ε' : 𝕜}
(h : ε ≤ ε')


@[simp]
theorem toNNRat_one : toNNRat 1 = 1


lemma div_nonneg_of_nonpos_of_nonpos {a b : EReal} (h : a ≤ 0) (h' : b ≤ 0) : 0 ≤ a / b


theorem pullback_comp (f : X ⟶ Y) (g : Y ⟶ Z) (x : Subobject Z) :
    (pullback (f ≫ g)).obj x = (pullback f).obj ((pullback g).obj x)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{X Y Z : C}
[CategoryTheory.Limits.HasPullbacks C]
(f : X ⟶ Y)
(g : Y ⟶ Z)
(x : CategoryTheory.Subobject Z)

(CategoryTheory.Subobject.pullback (CategoryTheory.CategoryStruct.comp f g)).obj x =
  (CategoryTheory.Subobject.pullback f).obj ((CategoryTheory.Subobject.pullback g).obj x)


/-- If the total masses of finite measures tend to zero, then the measures tend to
zero. This formulation concerns the associated functionals on bounded continuous
nonnegative test functions. See `MeasureTheory.FiniteMeasure.tendsto_zero_of_tendsto_zero_mass` for
a formulation stating the weak convergence of measures. -/
theorem tendsto_zero_testAgainstNN_of_tendsto_zero_mass {γ : Type*} {F : Filter γ}
    {μs : γ → FiniteMeasure Ω} (mass_lim : Tendsto (fun i => (μs i).mass) F (𝓝 0)) (f : Ω →ᵇ ℝ≥0) :
    Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 0)

{μs : γ → MeasureTheory.FiniteMeasure Ω}

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

(f : Ω →ᵇ ℝ≥0)

Filter.Tendsto (fun i => (μs i).testAgainstNN f) F (𝓝 0)


theorem ofComapInfPrincipal_mem (h : m '' s ∈ g) : s ∈ ofComapInfPrincipal h

{α : Type u}
{β : Type v}
{m : α → β}
{s : Set α}
{g : Ultrafilter β}
(h : m '' s ∈ g)


@[to_additive] lemma zpow_lt_zpow_iff' (hn : 0 < n) : a ^ n < b ^ n ↔ a < b

{α : Type u_1}
[LinearOrderedCommGroup α]
{n : ℤ}
{a b : α}
(hn : 0 < n)


theorem tendsto_cos_pi_div_two : Tendsto cos (𝓝[<] (π / 2)) (𝓝[>] 0)

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


@[ext]
theorem ext {X Y : Grothendieck F} (f g : Hom X Y) (w_base : f.base = g.base)
    (w_fiber : eqToHom (by rw [w_base]) ≫ f.fiber = g.fiber) : f = g

{F : CategoryTheory.Functor C CategoryTheory.Cat}

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


@[to_additive (attr := simp)]
theorem inv_mk (x y : α) (h₁ h₂) : (mk x y h₁ h₂)⁻¹ = mk y x h₂ h₁

{α : Type u}
[AddMonoid α]
(x y : α)
(h₁ : x + y = 0)
(h₂ : y + x = 0)

-{ val := x, neg := y, val_neg := h₁, neg_val := h₂ } = { val := y, neg := x, val_neg := h₂, neg_val := h₁ }


/-- Reindexing a simplex along an `Equiv` of index types does not change the circumsphere. -/
@[simp]
theorem circumsphere_reindex {m n : ℕ} (s : Simplex ℝ P m) (e : Fin (m + 1) ≃ Fin (n + 1)) :
    (s.reindex e).circumsphere = s.circumsphere

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{m n : ℕ}
(s : Affine.Simplex ℝ P m)
(e : Fin (m + 1) ≃ Fin (n + 1))


theorem det_zero' {ι : Type*} [Finite ι] [Nonempty ι] (b : Basis ι A M) :
    LinearMap.det (0 : M →ₗ[A] M) = 0

{M : Type u_2}
[AddCommGroup M]
{A : Type u_5}
[CommRing A]
[Module A M]
{ι : Type u_7}
[Finite ι]
[Nonempty ι]
(b : Basis ι A M)


@[to_additive]
lemma Subgroup.coe_topologicalClosure_bot :
    ((⊥ : Subgroup G).topologicalClosure : Set G) = _root_.closure ({1} : Set G)

(G : Type w)
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]


/--
Equivalent precoherent categories give equivalent coherent toposes.
-/
@[simps!]
def sheafCongrPrecoherent : haveI := e.precoherent
    Sheaf (coherentTopology C) A ≌ Sheaf (coherentTopology D) A

(X : CategoryTheory.Sheaf (CategoryTheory.coherentTopology D) A)

∀ (X_1 : Dᵒᵖ),
  ((e.sheafCongrPrecoherent A).counitIso.inv.app X).val.app X_1 = X.val.map (e.counitIso.hom.app (Opposite.unop X_1)).op


/-- b is greater one if any a is less than b -/
theorem one_lt_of_lt {a b : ℕ+} (hab : a < b) : 1 < b


@[simp]
theorem toIocDiv_sub_zsmul (a b : α) (m : ℤ) : toIocDiv hp a (b - m • p) = toIocDiv hp a b - m

{α : Type u_1}
[LinearOrderedAddCommGroup α]
[hα : Archimedean α]
{p : α}
(hp : 0 < p)
(a b : α)
(m : ℤ)


theorem fold_hom {op' : γ → γ → γ} [Std.Commutative op'] [Std.Associative op'] {m : β → γ}
    (hm : ∀ x y, m (op x y) = op' (m x) (m y)) :
    (s.fold op' (m b) fun x => m (f x)) = m (s.fold op b f)

{op : β → β → β}

(hm : ∀ (x y : β), m (op x y) = op' (m x) (m y))

Finset.fold op' (m b) (fun x => m (f x)) s = m (Finset.fold op b f s)


lemma isCoboundedUnder_ge_of_eventually_le [Preorder α] (l : Filter ι) [NeBot l] {f : ι → α} {x : α}
    (hf : ∀ᶠ i in l, f i ≤ x) :
    IsCoboundedUnder (· ≥ ·) l f

{α : Type u_1}
{ι : Type u_4}
[Preorder α]
(l : Filter ι)
[l.NeBot]
{f : ι → α}
{x : α}
(hf : ∀ᶠ (i : ι) in l, f i ≤ x)

Filter.IsCoboundedUnder (fun x x_1 => x ≥ x_1) l f


@[simp]
theorem cons_eval (f fs) : (cons f fs).eval = fun v => do {
    let n ← Code.eval f v
    let ns ← Code.eval fs v
    pure (n.headI :: ns) }

(f.cons fs).eval = fun v => do
  let n ← f.eval v
  let ns ← fs.eval v
  pure (n.headI :: ns)


/-- The duality equivalence `WalkingSpanᵒᵖ ≌ WalkingCospan` -/
@[simps!]
def walkingSpanOpEquiv : WalkingSpanᵒᵖ ≌ WalkingCospan

∀ {X Y : (CategoryTheory.Limits.WidePushoutShape CategoryTheory.Limits.WalkingPair)ᵒᵖ} (f : X ⟶ Y),
  CategoryTheory.Limits.walkingSpanOpEquiv.functor.map f =
    (CategoryTheory.Limits.widePushoutShapeOpMap CategoryTheory.Limits.WalkingPair (Opposite.unop Y) (Opposite.unop X)
        f.unop).unop


theorem inl_lt_inl_iff [LT α] [LT β] {a b : α} : toLex (inl a : α ⊕ β) < toLex (inl b) ↔ a < b

{α : Type u_1}
{β : Type u_2}
[LT α]
[LT β]
{a b : α}

toLex (Sum.inl a) < toLex (Sum.inl b) ↔ a < b


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

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


theorem sub_mem_Ioo_iff_left : a - b ∈ Set.Ioo c d ↔ a ∈ Set.Ioo (c + b) (d + b)

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


theorem setIntegral_congr_ae (hs : MeasurableSet s) (h : ∀ᵐ x ∂μ, x ∈ s → f x = g x) :
    ∫ x in s, f x ∂μ = ∫ x in s, g x ∂μ

{X : Type u_1}
{E : Type u_3}
[MeasurableSpace X]
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f g : X → E}
{s : Set X}
{μ : MeasureTheory.Measure X}
(hs : MeasurableSet s)
(h : ∀ᵐ (x : X) ∂μ, x ∈ s → f x = g x)

∫ (x : X) in s, f x ∂μ = ∫ (x : X) in s, g x ∂μ


@[to_additive (attr := elab_as_elim)]
theorem induction_on₃ {p : Localization S → Localization S → Localization S → Prop} (x y z)
    (H : ∀ x y z : M × S, p (mk x.1 x.2) (mk y.1 y.2) (mk z.1 z.2)) : p x y z

{p : AddLocalization S → AddLocalization S → AddLocalization S → Prop}

(H : ∀ (x y z : M × ↥S), p (AddLocalization.mk x.1 x.2) (AddLocalization.mk y.1 y.2) (AddLocalization.mk z.1 z.2))


theorem map_map (s : AffineSubspace k P₁) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
    (s.map f).map g = s.map (g.comp f)

{k : Type u_1}
{V₁ : Type u_2}
{P₁ : Type u_3}
{V₂ : Type u_4}
{P₂ : Type u_5}
{V₃ : Type u_6}
{P₃ : Type u_7}
[Ring k]
[AddCommGroup V₁]
[Module k V₁]
[AffineSpace V₁ P₁]
[AddCommGroup V₂]
[Module k V₂]
[AffineSpace V₂ P₂]
[AddCommGroup V₃]
[Module k V₃]
[AffineSpace V₃ P₃]
(s : AffineSubspace k P₁)
(f : P₁ →ᵃ[k] P₂)
(g : P₂ →ᵃ[k] P₃)

AffineSubspace.map g (AffineSubspace.map f s) = AffineSubspace.map (g.comp f) s


theorem coe_sumPiEquivProdPi_symm (α : δ ⊕ δ' → Type*) [∀ i, MeasurableSpace (α i)] :
    ⇑(MeasurableEquiv.sumPiEquivProdPi α).symm = (Equiv.sumPiEquivProdPi α).symm

{δ : Type u_4}
{δ' : Type u_5}
(α : δ ⊕ δ' → Type u_8)
[(i : δ ⊕ δ') → MeasurableSpace (α i)]

⇑(MeasurableEquiv.sumPiEquivProdPi α).symm = ⇑(Equiv.sumPiEquivProdPi α).symm


theorem Inducing.r1Space [TopologicalSpace Y] {f : Y → X} (hf : Inducing f) : R1Space Y

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


@[simp]
theorem inf_eq_inter : ((· ⊓ ·) : Set α → Set α → Set α) = (· ∩ ·)

(fun x x_1 => x ⊓ x_1) = fun x x_1 => x ∩ x_1


theorem eqvGen_of_π_eq
    -- Porting note: was `{x y : ∐ D.U} (h : 𝖣.π x = 𝖣.π y)`
    {x y : sigmaObj (β := D.toGlueData.J) (C := TopCat) D.toGlueData.U}
    (h : 𝖣.π x = 𝖣.π y) :
    EqvGen
      -- Porting note: was (Types.CoequalizerRel 𝖣.diagram.fstSigmaMap 𝖣.diagram.sndSigmaMap)
      (Types.CoequalizerRel
        (X := sigmaObj (β := D.toGlueData.diagram.L) (C := TopCat) (D.toGlueData.diagram).left)
        (Y := sigmaObj (β := D.toGlueData.diagram.R) (C := TopCat) (D.toGlueData.diagram).right)
        𝖣.diagram.fstSigmaMap 𝖣.diagram.sndSigmaMap)
      x y

(D : TopCat.GlueData)
{x y : ↑(∐ D.U)}
(h : D.π x = D.π y)

EqvGen (CategoryTheory.Limits.Types.CoequalizerRel ⇑D.diagram.fstSigmaMap ⇑D.diagram.sndSigmaMap) x y


theorem vanishingIdeal_anti_mono_iff {s t : Set (PrimeSpectrum R)} (ht : IsClosed t) :
    s ⊆ t ↔ vanishingIdeal t ≤ vanishingIdeal s

{R : Type u}
[CommSemiring R]
{s t : Set (PrimeSpectrum R)}
(ht : IsClosed t)

s ⊆ t ↔ PrimeSpectrum.vanishingIdeal t ≤ PrimeSpectrum.vanishingIdeal s


@[simp, reassoc]
lemma restrictionMap_comp :
    restrictionMap (φ ≫ φ') e = restrictionMap φ e ≫ restrictionMap φ' e

HomologicalComplex.restrictionMap (φ ≫ φ') e =
  HomologicalComplex.restrictionMap φ e ≫ HomologicalComplex.restrictionMap φ' e


theorem OrderIso.map_inf [SemilatticeInf α] [SemilatticeInf β] (f : α ≃o β) (x y : α) :
    f (x ⊓ y) = f x ⊓ f y

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[SemilatticeInf β]
(f : α ≃o β)
(x y : α)


/-- Sends a topological space to its specialisation order. -/
@[simps]
def alexDiscEquivPreord : AlexDisc ≌ Preord

∀ {X Y : Preord} (f : ↑X →o ↑Y), alexDiscEquivPreord.inverse.map f = Topology.WithUpperSet.map f


theorem lt_mul_of_lt_of_one_le_of_nonneg [PosMulMono α] (h : b < c) (ha : 1 ≤ a) (hc : 0 ≤ c) :
    b < c * a

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : b < c)
(ha : 1 ≤ a)
(hc : 0 ≤ c)


theorem hasSum_one_div_nat_pow_mul_sin {k : ℕ} (hk : k ≠ 0) {x : ℝ} (hx : x ∈ Icc (0 : ℝ) 1) :
    HasSum (fun n : ℕ => 1 / (n : ℝ) ^ (2 * k + 1) * Real.sin (2 * π * n * x))
      ((-1 : ℝ) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / (2 * k + 1)! *
        (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))).eval x)

{k : ℕ}
(hk : k ≠ 0)
{x : ℝ}
(hx : x ∈ Set.Icc 0 1)

HasSum (fun n => 1 / ↑n ^ (2 * k + 1) * Real.sin (2 * π * ↑n * x))
  ((-1) ^ (k + 1) * (2 * π) ^ (2 * k + 1) / 2 / ↑(2 * k + 1)! *
    Polynomial.eval x (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli (2 * k + 1))))


@[to_additive]
theorem mulSupport_disjoint_iff {f : α → M} {s : Set α} :
    Disjoint (mulSupport f) s ↔ EqOn f 1 s

{α : Type u_1}
{M : Type u_5}
[Zero M]
{f : α → M}
{s : Set α}

Disjoint (Function.support f) s ↔ Set.EqOn f 0 s


@[to_additive (attr := simp)]
theorem diam_smul [PseudoMetricSpace X] [SMul M X] [IsometricSMul M X] (c : M) (s : Set X) :
    Metric.diam (c • s) = Metric.diam s

{M : Type u}
{X : Type w}
[PseudoMetricSpace X]
[SMul M X]
[IsometricSMul M X]
(c : M)
(s : Set X)


@[csimp] theorem repeat_eq_repeatTR : @repeat = @repeatTR

(α : Type u_1)
(f : α → α)
(init : α)
(m n : Nat)

Nat.repeatTR.loop f m (Nat.repeat f n init) = Nat.repeat f (m + n) init


@[reassoc (attr := simp)]
lemma iCyclesIso_inv_hom_id :
    (K.iCyclesIso i j hj h).inv ≫ K.iCycles i = 𝟙 _

(K.iCyclesIso i j hj h).inv ≫ K.iCycles i = 𝟙 (K.X i)


theorem mem_span_basisOfFractionalIdeal {I : (FractionalIdeal (𝓞 K)⁰ K)ˣ} {x : K} :
    x ∈ Submodule.span ℤ (Set.range (basisOfFractionalIdeal K I)) ↔ x ∈ (I : Set K)

{I : (FractionalIdeal (nonZeroDivisors (NumberField.RingOfIntegers K)) K)ˣ}

x ∈ Submodule.span ℤ (Set.range ⇑(NumberField.basisOfFractionalIdeal K I)) ↔ x ∈ ↑↑I


theorem iUnion_Ici_eq_Ioi_iInf {R : Type*} [CompleteLinearOrder R] {f : ι → R}
    (no_least_elem : ⨅ i, f i ∉ range f) : ⋃ i : ι, Ici (f i) = Ioi (⨅ i, f i)

(no_least_elem : ⨅ i, f i ∉ Set.range f)


@[simp]
theorem aleph0_mul_ofNat {n : ℕ} [Nat.AtLeastTwo n] : ℵ₀ * no_index (OfNat.ofNat n) = ℵ₀

Cardinal.aleph0 * OfNat.ofNat n = Cardinal.aleph0


@[ext]
theorem Hom.ext {X Y : PresheafedSpace C} (α β : Hom X Y) (w : α.base = β.base)
    (h : α.c ≫ whiskerRight (eqToHom (by rw [w])) _ = β.c) : α = β

{X Y : AlgebraicGeometry.PresheafedSpace C}

(h : α.c ≫ CategoryTheory.whiskerRight (CategoryTheory.eqToHom ⋯) X.presheaf = β.c)


theorem subset_union_prime' {R : Type u} [CommRing R] {s : Finset ι} {f : ι → Ideal R} {a b : ι}
    (hp : ∀ i ∈ s, IsPrime (f i)) {I : Ideal R} :
    ((I : Set R) ⊆ f a ∪ f b ∪ ⋃ i ∈ (↑s : Set ι), f i) ↔ I ≤ f a ∨ I ≤ f b ∨ ∃ i ∈ s, I ≤ f i

{ι : Type u_1}
{R : Type u}
[CommRing R]
{s : Finset ι}
{f : ι → Ideal R}
{a b : ι}
(hp : ∀ i ∈ s, (f i).IsPrime)
{I : Ideal R}

↑I ⊆ ↑(f a) ∪ ↑(f b) ∪ ⋃ i ∈ ↑s, ↑(f i) ↔ I ≤ f a ∨ I ≤ f b ∨ ∃ i ∈ s, I ≤ f i


theorem hasCoproductsOfShape_of_opposite [HasProductsOfShape X Cᵒᵖ] : HasCoproductsOfShape X C


@[to_additive]
theorem inv_mul' : (a * b)⁻¹ = a⁻¹ / b

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


/-- The negation of a nonsingular affine point in `W` is nonsingular. -/
lemma nonsingular_neg {x y : R} (h : W.Nonsingular x y) : W.Nonsingular x <| W.negY x y

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


@[simp, norm_cast] lemma coe_mul (x y : ℝ≥0) : (↑(x * y) : ℝ≥0∞) = x * y


lemma decreasingInduction_trans {motive : (m : ℕ) → m ≤ k → Sort*} (hmn : m ≤ n) (hnk : n ≤ k)
    (of_succ self) :
    (decreasingInduction (motive := motive) of_succ self (Nat.le_trans hmn hnk) : motive m _) =
    decreasingInduction (fun n ih => of_succ _ _) (decreasingInduction of_succ self hnk) hmn

(of_succ : (k_1 : ℕ) → (h : k_1 < k) → motive (k_1 + 1) h → motive k_1 ⋯)

Nat.decreasingInduction of_succ self ⋯ =
  Nat.decreasingInduction (fun n_1 ih => of_succ n_1 ⋯) (Nat.decreasingInduction of_succ self hnk) hmn


protected theorem prod_mem {R : Type u} {A : Type v} [CommSemiring R] [CommSemiring A] [Algebra R A]
    (S : Subalgebra R A) {ι : Type w} {t : Finset ι} {f : ι → A} (h : ∀ x ∈ t, f x ∈ S) :
    (∏ x ∈ t, f x) ∈ S


theorem IsInt.to_raw_eq {a : α} {n : ℤ} [Ring α] : IsInt (a : α) n → a = n.rawCast

Mathlib.Meta.NormNum.IsInt a n → a = n.rawCast


/-- See also `Nat.card_addSubgroupZPowers`. -/
@[to_additive "See also `Nat.card_subgroup`."]
theorem Fintype.card_zpowers : Fintype.card (zpowers x) = orderOf x

{G : Type u_1}
[Group G]
[Fintype G]
{x : G}

Fintype.card ↥(Subgroup.zpowers x) = orderOf x


/-- Composition of coalgebra homomorphisms. -/
@[simps!] def comp (φ₁ : B →ₗc[R] C) (φ₂ : A →ₗc[R] B) : A →ₗc[R] C

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{C : Type u_4}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[AddCommMonoid C]
[Module R C]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
[CoalgebraStruct R C]
(φ₁ : B →ₗc[R] C)
(φ₂ : A →ₗc[R] B)


@[simp]
theorem compl_Iio : (Iio a)ᶜ = Ici a


@[simp] theorem xor_append {x₁ x₂ : BitVec w} {y₁ y₂ : BitVec v} :
    (x₁ ++ y₁) ^^^ (x₂ ++ y₂) = (x₁ ^^^ x₂) ++ (y₁ ^^^ y₂)

{w v : Nat}
{x₁ x₂ : BitVec w}
{y₁ y₂ : BitVec v}


theorem abs_cos_eq_of_two_nsmul_eq {θ ψ : Angle} (h : (2 : ℕ) • θ = (2 : ℕ) • ψ) :
    |cos θ| = |cos ψ|


lemma singleton_set_smul [SMulCommClass S R M] (r : S) : ({r} : Set S) • N = r • N

{R : Type u_2}
{M : Type u_3}
[Semiring R]
{S : Type u_4}
[Monoid S]
[AddCommMonoid M]
[Module R M]
[DistribMulAction S M]
(N : Submodule R M)
[SMulCommClass S R M]
(r : S)


@[simp]
theorem Matrix.toLinearMapRight'_one :
    Matrix.toLinearMapRight' (1 : Matrix m m R) = LinearMap.id

{R : Type u_1}
[Semiring R]
{m : Type u_3}
[Fintype m]
[DecidableEq m]

Matrix.toLinearMapRight' 1 = LinearMap.id


theorem eq_iff_modEq_nat (n : ℕ) {a b : ℕ} : (a : ZMod n) = b ↔ a ≡ b [MOD n]


@[to_additive]
theorem threeGPFree_insert_of_lt (hs : ∀ i ∈ s, i < a) :
    ThreeGPFree (insert a s) ↔
      ThreeGPFree s ∧ ∀ ⦃b⦄, b ∈ s → ∀ ⦃c⦄, c ∈ s → a * c = b * b → a = b

{α : Type u_2}
[OrderedCancelAddCommMonoid α]
{s : Set α}
{a : α}
(hs : ∀ i ∈ s, i < a)

ThreeAPFree (insert a s) ↔ ThreeAPFree s ∧ ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a + c = b + b → a = b


@[simp, norm_cast]
lemma coe_sup (G₁ G₂ : G.Finsubgraph) : ↑(G₁ ⊔ G₂) = (G₁ ⊔ G₂ : G.Subgraph)

{V : Type u}
{G : SimpleGraph V}
(G₁ G₂ : G.Finsubgraph)

↑(G₁ ⊔ G₂) = ↑G₁ ⊔ ↑G₂


@[simp]
theorem inf_apply (x : ℝ) : (f ⊓ g) x = min (f x) (g x)


theorem val_mk {m n : Nat} (h : m < n) : (⟨m, h⟩ : Fin n).val = m


@[simp]
theorem walkingParallelPairOp_right :
    walkingParallelPairOp.map right = @Quiver.Hom.op _ _ zero one right

CategoryTheory.Limits.walkingParallelPairOp.map CategoryTheory.Limits.WalkingParallelPairHom.right =
  Quiver.Hom.op CategoryTheory.Limits.WalkingParallelPairHom.right


theorem le_floor (h : (n : α) ≤ a) : n ≤ ⌊a⌋₊

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]
{a : α}
{n : ℕ}
(h : ↑n ≤ a)


lemma CochainComplex.quasiIsoAt₀_iff {K L : CochainComplex C ℕ} (f : K ⟶ L)
    [K.HasHomology 0] [L.HasHomology 0] [(K.sc' 0 0 1).HasHomology] [(L.sc' 0 0 1).HasHomology] :
    QuasiIsoAt f 0 ↔
      ShortComplex.QuasiIso ((HomologicalComplex.shortComplexFunctor' C _ 0 0 1).map f)

[(HomologicalComplex.sc' K 0 0 1).HasHomology]

[(HomologicalComplex.sc' L 0 0 1).HasHomology]

QuasiIsoAt f 0 ↔
  CategoryTheory.ShortComplex.QuasiIso ((HomologicalComplex.shortComplexFunctor' C (ComplexShape.up ℕ) 0 0 1).map f)


theorem norm_condexpL2_le_one (hm : m ≤ m0) : ‖@condexpL2 α E 𝕜 _ _ _ _ _ _ μ hm‖ ≤ 1

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


theorem biInter_mono {s s' : Set α} {t t' : α → Set β} (hs : s ⊆ s') (h : ∀ x ∈ s, t x ⊆ t' x) :
    ⋂ x ∈ s', t x ⊆ ⋂ x ∈ s, t' x

{α : Type u_1}
{β : Type u_2}
{s s' : Set α}
{t t' : α → Set β}
(hs : s ⊆ s')
(h : ∀ x ∈ s, t x ⊆ t' x)


/-- The equivalence between the nonsingular rational points on a Weierstrass curve `W` in Jacobian
coordinates with the nonsingular rational points on `W` in affine coordinates. -/
@[simps]
noncomputable def toAffineAddEquiv : W.Point ≃+ W.toAffine.Point

{F : Type v}
[Field F]
(W : WeierstrassCurve.Jacobian F)

∀ (a : W.toAffine.Point),
  (WeierstrassCurve.Jacobian.Point.toAffineAddEquiv W).symm a = WeierstrassCurve.Jacobian.Point.fromAffine a


@[simp]
theorem snd_comp_prod (f : α →o β) (g : α →o γ) : snd.comp (f.prod g) = g

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


/-- As `0` is the default value for `Real.sSup` of the empty set, it suffices to show that `S` is
bounded above by `0` to show that `sSup S ≤ 0`.
-/
theorem sSup_nonpos (S : Set ℝ) (hS : ∀ x ∈ S, x ≤ (0 : ℝ)) : sSup S ≤ 0


@[simp] lemma covBy_insert (ha : a ∉ s) : s ⋖ insert a s

{α : Type u_1}
{s : Set α}
{a : α}
(ha : a ∉ s)


theorem aevalTower_comp_algebraMap : (aevalTower g y : R[X] →+* A').comp (algebraMap R R[X]) = g

{R : Type u}
{S : Type v}
{A' : Type u_1}
[CommSemiring R]
[CommSemiring A']
[CommSemiring S]
[Algebra S R]
[Algebra S A']
(g : R →ₐ[S] A')
(y : A')

(↑(Polynomial.aevalTower g y)).comp (algebraMap R R[X]) = ↑g


/-- Given a MonoidHom `f : M →* N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ Nˣ`, for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, we have
`f x₁ * (f y₁)⁻¹ = f x₂ * (f y₂)⁻¹ ↔ f (x₁ * y₂) = f (x₂ * y₁)`. -/
@[to_additive (attr := simp)
    "Given an AddMonoidHom `f : M →+ N` and Submonoid `S ⊆ M` such that
`f(S) ⊆ AddUnits N`, for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, we have
`f x₁ - f y₁ = f x₂ - f y₂ ↔ f (x₁ + y₂) = f (x₂ + y₁)`."]
theorem mul_inv {f : M →* N} (h : ∀ y : S, IsUnit (f y)) {x₁ x₂} {y₁ y₂ : S} :
    f x₁ * (IsUnit.liftRight (f.restrict S) h y₁)⁻¹ =
        f x₂ * (IsUnit.liftRight (f.restrict S) h y₂)⁻¹ ↔
      f (x₁ * y₂) = f (x₂ * y₁)

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
{f : M →* N}
(h : ∀ (y : ↥S), IsUnit (f ↑y))
{x₁ x₂ : M}
{y₁ y₂ : ↥S}

f x₁ * ↑((IsUnit.liftRight (f.restrict S) h) y₁)⁻¹ = f x₂ * ↑((IsUnit.liftRight (f.restrict S) h) y₂)⁻¹ ↔
  f (x₁ * ↑y₂) = f (x₂ * ↑y₁)


@[continuity]
theorem continuous_arctan : Continuous arctan


/-- Given two model_with_corners `I` on `(E, H)` and `I'` on `(E', H')`, we define the model with
corners `I.prod I'` on `(E × E', ModelProd H H')`. This appears in particular for the manifold
structure on the tangent bundle to a manifold modelled on `(E, H)`: it will be modelled on
`(E × E, H × E)`. See note [Manifold type tags] for explanation about `ModelProd H H'`
vs `H × H'`. -/
@[simps (config := .lemmasOnly)]
def ModelWithCorners.prod {𝕜 : Type u} [NontriviallyNormedField 𝕜] {E : Type v}
    [NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type w} [TopologicalSpace H]
    (I : ModelWithCorners 𝕜 E H) {E' : Type v'} [NormedAddCommGroup E'] [NormedSpace 𝕜 E']
    {H' : Type w'} [TopologicalSpace H'] (I' : ModelWithCorners 𝕜 E' H') :
    ModelWithCorners 𝕜 (E × E') (ModelProd H H')

(I.prod I').target = (I.prod I'.toPartialEquiv).target


@[simp]
theorem coe_prodMap {α β γ δ : Type*} (e₁ : α ↪ β) (e₂ : γ ↪ δ) :
    e₁.prodMap e₂ = Prod.map e₁ e₂

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(e₁ : α ↪ β)
(e₂ : γ ↪ δ)


/-- Auxiliary lemma for `apply_eq_lift` -/
theorem apply_eq_lift (h : IsAdjoinRoot S f) (g : S →+* T) (hmap : ∀ a, g (algebraMap R S a) = i a)
    (hroot : g h.root = x) (a : S) : g a = h.lift i x hx a

(hmap : ∀ (a : R), g ((algebraMap R S) a) = i a)


lemma floorDiv_def (f : ι →₀ β) (a : α) : f ⌊/⌋ a = f.mapRange (· ⌊/⌋ a) (zero_floorDiv _)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[OrderedAddCommMonoid α]
[OrderedAddCommMonoid β]
[SMulZeroClass α β]
[FloorDiv α β]
(f : ι →₀ β)
(a : α)

f ⌊/⌋ a = Finsupp.mapRange (fun x => x ⌊/⌋ a) ⋯ f


/-- A function between linear orders which is neither monotone nor antitone makes a dent upright or
downright. -/
theorem not_monotoneOn_not_antitoneOn_iff_exists_lt_lt :
    ¬MonotoneOn f s ∧ ¬AntitoneOn f s ↔
      ∃ᵉ (a ∈ s) (b ∈ s) (c ∈ s), a < b ∧ b < c ∧
        (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c)

{α : Type u}
{β : Type v}
{s : Set α}
[LinearOrder α]
[LinearOrder β]
{f : α → β}

¬MonotoneOn f s ∧ ¬AntitoneOn f s ↔
  ∃ a ∈ s, ∃ b ∈ s, ∃ c ∈ s, a < b ∧ b < c ∧ (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c)


@[to_additive] lemma max_div_min_eq_mabs (a b : α) : max a b / min a b = |b / a|ₘ

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

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


@[simp]
lemma leftHomologyMap'_sub :
    leftHomologyMap' (φ - φ') h₁ h₂ = leftHomologyMap' φ h₁ h₂ -
      leftHomologyMap' φ' h₁ h₂

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.Preadditive C]
{S₁ S₂ : CategoryTheory.ShortComplex C}
{φ φ' : S₁ ⟶ S₂}
(h₁ : S₁.LeftHomologyData)
(h₂ : S₂.LeftHomologyData)

CategoryTheory.ShortComplex.leftHomologyMap' (φ - φ') h₁ h₂ =
  CategoryTheory.ShortComplex.leftHomologyMap' φ h₁ h₂ - CategoryTheory.ShortComplex.leftHomologyMap' φ' h₁ h₂


@[simp] theorem mk_byteIdx (p : Pos) : ⟨p.byteIdx⟩ = p


@[simp]
lemma rightUnshift_neg {n' a : ℤ} (γ : Cochain K (L⟦a⟧) n') (n : ℤ) (hn : n' + a = n) :
    (-γ).rightUnshift n hn = -γ.rightUnshift n hn

(γ : CochainComplex.HomComplex.Cochain K ((CategoryTheory.shiftFunctor (CochainComplex C ℤ) a).obj L) n')


@[to_additive (attr := simp) zsmul_eq_smul] theorem zpow_eq_pow (n : ℤ) (x : G) :
    DivInvMonoid.zpow n x = x ^ n

{G : Type u_1}
[SubNegMonoid G]
(n : ℤ)
(x : G)


theorem exists_of_modifyNthTail (f : List α → List α) {n} {l : List α} (h : n ≤ l.length) :
    ∃ l₁ l₂, l = l₁ ++ l₂ ∧ l₁.length = n ∧ modifyNthTail f n l = l₁ ++ f l₂

{α : Type u_1}
(f : List α → List α)
{n : Nat}
{l : List α}
(h : n ≤ l.length)

∃ l₁ l₂, l = l₁ ++ l₂ ∧ l₁.length = n ∧ List.modifyNthTail f n l = l₁ ++ f l₂


theorem FG.prod {sb : Submodule R M} {sc : Submodule R P} (hsb : sb.FG) (hsc : sc.FG) :
    (sb.prod sc).FG

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{P : Type u_3}
[AddCommMonoid P]
[Module R P]
{sb : Submodule R M}
{sc : Submodule R P}
(hsb : sb.FG)
(hsc : sc.FG)


/-- The difference with `StarSubalgebra.adjoin_induction` is that this acts on the subtype. -/
@[elab_as_elim]
theorem adjoin_induction' {s : Set A} {p : adjoin R s → Prop} (a : adjoin R s)
    (mem : ∀ (x) (h : x ∈ s), p ⟨x, subset_adjoin R s h⟩) (algebraMap : ∀ r, p (algebraMap R _ r))
    (add : ∀ x y, p x → p y → p (x + y)) (mul : ∀ x y, p x → p y → p (x * y))
    (star : ∀ x, p x → p (star x)) : p a

(algebraMap : ∀ (r : R), p ((algebraMap R ↥(StarAlgebra.adjoin R s)) r))

(add : ∀ (x y : ↥(StarAlgebra.adjoin R s)), p x → p y → p (x + y))

(mul : ∀ (x y : ↥(StarAlgebra.adjoin R s)), p x → p y → p (x * y))

(star : ∀ (x : ↥(StarAlgebra.adjoin R s)), p x → p (star x))


/-- For any `c : List ℕ` whose sum is at most `Fintype.card α`,
  we can find `o : List (List α)` whose members have no duplicate,
  whose lengths given by `c`, and which are pairwise disjoint -/
theorem List.exists_pw_disjoint_with_card {α : Type*} [Fintype α]
    {c : List ℕ} (hc : c.sum ≤ Fintype.card α) :
    ∃ o : List (List α),
      o.map length = c ∧ (∀ s ∈ o, s.Nodup) ∧ Pairwise List.Disjoint o

{α : Type u_4}
[Fintype α]
{c : List ℕ}
(hc : c.sum ≤ Fintype.card α)

∃ o, List.map List.length o = c ∧ (∀ s ∈ o, s.Nodup) ∧ List.Pairwise List.Disjoint o


protected theorem pow_end {f : Function.End α} (h : LocallyLipschitz f) :
    ∀ n : ℕ, LocallyLipschitz (f ^ n : Function.End α)

{α : Type u}
[PseudoEMetricSpace α]
{f : Function.End α}
(h : LocallyLipschitz f)
(n : ℕ)


theorem coeToSet_coeToSubmodule (I : FractionalIdeal S P) :
    ((I : Submodule R P) : Set P) = I

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


theorem SurjOn.comp (hg : SurjOn g t p) (hf : SurjOn f s t) : SurjOn (g ∘ f) s p

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{s : Set α}
{t : Set β}
{p : Set γ}
{f : α → β}
{g : β → γ}
(hg : Set.SurjOn g t p)
(hf : Set.SurjOn f s t)


@[simp]
theorem comap_sup : (m₁ ⊔ m₂).comap g = m₁.comap g ⊔ m₂.comap g

{α : Type u_1}
{β : Type u_2}
{m₁ m₂ : MeasurableSpace α}
{g : β → α}

MeasurableSpace.comap g (m₁ ⊔ m₂) = MeasurableSpace.comap g m₁ ⊔ MeasurableSpace.comap g m₂


/-- The self-adjoint part of an element of a star module, as a linear map. -/
@[simps]
def selfAdjointPart : A →ₗ[R] selfAdjoint A

(R : Type u_1)
{A : Type u_2}
[Semiring R]
[StarMul R]
[TrivialStar R]
[AddCommGroup A]
[Module R A]
[StarAddMonoid A]
[StarModule R A]
[Invertible 2]
(x : A)

↑((selfAdjointPart R) x) = ⅟2 • (x + star x)


theorem card_fintype_Icc : Fintype.card (Set.Icc a b) = b + 1 - a

Fintype.card ↑(Set.Icc a b) = ↑b + 1 - ↑a


theorem norm_expSeries_summable (x : 𝔸) : Summable fun n => ‖expSeries 𝕂 𝔸 n fun _ => x‖

{𝕂 : Type u_1}
{𝔸 : Type u_2}
[RCLike 𝕂]
[NormedRing 𝔸]
[NormedAlgebra 𝕂 𝔸]
(x : 𝔸)

Summable fun n => ‖(NormedSpace.expSeries 𝕂 𝔸 n) fun x_1 => x‖


/-- Differentiability of `Θ z τ` in `τ`, for fixed `z`. -/
lemma differentiableAt_jacobiTheta₂_snd (z : ℂ) {τ : ℂ} (hτ : 0 < im τ) :
    DifferentiableAt ℂ (jacobiTheta₂ z) τ


@[simp]
theorem map_inr (f : M →ₗ[R'] N) (x : M) : map f (inr x) = inr (f x)

{R' : Type u}
{M : Type v}
[CommSemiring R']
[AddCommMonoid M]
[Module R' M]
[Module R'ᵐᵒᵖ M]
[IsCentralScalar R' M]
{N : Type u_3}
[AddCommMonoid N]
[Module R' N]
[Module R'ᵐᵒᵖ N]
[IsCentralScalar R' N]
(f : M →ₗ[R'] N)
(x : M)

(TrivSqZeroExt.map f) (TrivSqZeroExt.inr x) = TrivSqZeroExt.inr (f x)


theorem not_isUnit_of_degree_pos_of_isReduced [IsReduced R] (p : R[X])
    (hpl : 0 < p.degree) : ¬ IsUnit p

{R : Type u_1}
[CommRing R]
[IsReduced R]
(p : Polynomial R)
(hpl : 0 < p.degree)


/-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
  the symmetric version of Fubini's theorem is measurable. -/
theorem MeasureTheory.StronglyMeasurable.integral_prod_left' [SFinite μ] ⦃f : α × β → E⦄
    (hf : StronglyMeasurable f) : StronglyMeasurable fun y => ∫ x, f (x, y) ∂μ

⦃f : α × β → E⦄

(hf : MeasureTheory.StronglyMeasurable f)

MeasureTheory.StronglyMeasurable fun y => ∫ (x : α), f (x, y) ∂μ


/-- The norm, relative to `ℤ`, of `ζ - 1` in a `p ^ (k + 1)`-th cyclotomic extension of `ℚ` is
a prime if `p ^ (k  + 1) ≠ 2`. -/
lemma prime_norm_toInteger_sub_one_of_prime_pow_ne_two [IsCyclotomicExtension {p ^ (k + 1)} ℚ K]
    (hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))) (htwo : p ^ (k + 1) ≠ 2) :
    Prime (Algebra.norm ℤ (hζ.toInteger - 1))

Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))


lemma gaussianReal_of_var_ne_zero (μ : ℝ) {v : ℝ≥0} (hv : v ≠ 0) :
    gaussianReal μ v = volume.withDensity (gaussianPDF μ v)

ProbabilityTheory.gaussianReal μ v = MeasureTheory.volume.withDensity (ProbabilityTheory.gaussianPDF μ v)


@[simp]
lemma counitForward_naturality₂ (s t : (CostructuredArrow yoneda A)ᵒᵖ) (f : t ⟶ s) (x : F.obj t) :
    counitForward F s.unop (F.map f x) =
      OverArrows.map₂ (counitForward F t.unop x) f.unop.left (by simp)

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

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

(s t : (CategoryTheory.CostructuredArrow CategoryTheory.yoneda A)ᵒᵖ)

CategoryTheory.OverPresheafAux.counitForward F (Opposite.unop s) (F.map f x) =
  (CategoryTheory.OverPresheafAux.counitForward F (Opposite.unop t) x).map₂ f.unop.left ⋯


theorem ae_smul_measure_iff {p : α → Prop} {c : ℝ≥0∞} (hc : c ≠ 0) :
    (∀ᵐ x ∂c • μ, p x) ↔ ∀ᵐ x ∂μ, p x

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{p : α → Prop}
{c : ENNReal}
(hc : c ≠ 0)

(∀ᵐ (x : α) ∂c • μ, p x) ↔ ∀ᵐ (x : α) ∂μ, p x


@[to_additive (attr := simp)]
lemma coe_comp {X Y Z : CommGrp} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f


@[to_additive sum_lt_sum]
theorem prod_lt_prod' (hle : ∀ i ∈ s, f i ≤ g i) (hlt : ∃ i ∈ s, f i < g i) :
    ∏ i ∈ s, f i < ∏ i ∈ s, g i

{ι : Type u_1}
{M : Type u_4}
[OrderedCancelAddCommMonoid M]
{f g : ι → M}
{s : Finset ι}
(hle : ∀ i ∈ s, f i ≤ g i)
(hlt : ∃ i ∈ s, f i < g i)


@[simp]
protected theorem coe_of (a : α) : ↑(FreeRing.of a) = FreeCommRing.of a


/-- A family of MulHom's `f a : γ →ₙ* β a` defines a MulHom `Pi.mulHom f : γ →ₙ* Π a, β a`
given by `Pi.mulHom f x b = f b x`. -/
@[to_additive (attr := simps)
  "A family of AddHom's `f a : γ → β a` defines an AddHom `Pi.addHom f : γ → Π a, β a` given by
  `Pi.addHom f x b = f b x`."]
def Pi.mulHom {γ : Type w} [∀ i, Mul (f i)] [Mul γ] (g : ∀ i, γ →ₙ* f i) : γ →ₙ* ∀ i, f i

{I : Type u}
{f : I → Type v}
{γ : Type w}
[(i : I) → Add (f i)]
[Add γ]
(g : (i : I) → AddHom γ (f i))
(x : γ)
(i : I)


@[to_additive]
theorem mulEquivOfQuotient_mk (x y) : mulEquivOfQuotient f (mk x y) = f.mk' x y

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

(AddLocalization.addEquivOfQuotient f) (AddLocalization.mk x y) = f.mk' x y


@[simp]
theorem nnnorm_natCast (n : ℕ) : ‖(n : ℤ)‖₊ = n


theorem abs_edgeDensity_sub_edgeDensity_le_two_mul_sub_sq (hs : s₂ ⊆ s₁) (ht : t₂ ⊆ t₁)
    (hδ₀ : 0 ≤ δ) (hδ₁ : δ < 1) (hs₂ : (1 - δ) * s₁.card ≤ s₂.card)
    (ht₂ : (1 - δ) * t₁.card ≤ t₂.card) :
    |(edgeDensity r s₂ t₂ : 𝕜) - edgeDensity r s₁ t₁| ≤ 2 * δ - δ ^ 2

{𝕜 : Type u_1}
{α : Type u_4}
{β : Type u_5}
[LinearOrderedField 𝕜]
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]
{s₁ s₂ : Finset α}
{t₁ t₂ : Finset β}
{δ : 𝕜}
(hs : s₂ ⊆ s₁)
(ht : t₂ ⊆ t₁)
(hδ₀ : 0 ≤ δ)
(hδ₁ : δ < 1)
(hs₂ : (1 - δ) * ↑s₁.card ≤ ↑s₂.card)
(ht₂ : (1 - δ) * ↑t₁.card ≤ ↑t₂.card)

|↑(Rel.edgeDensity r s₂ t₂) - ↑(Rel.edgeDensity r s₁ t₁)| ≤ 2 * δ - δ ^ 2


/-- `Complex.exp z → 0` as `Complex.re z → -∞`. -/
theorem tendsto_exp_comap_re_atBot : Tendsto exp (comap re atBot) (𝓝 0)

Filter.Tendsto Complex.exp (Filter.comap Complex.re Filter.atBot) (𝓝 0)


theorem exists_mem_multiset_dvd (hp : Prime p) {s : Multiset α} : p ∣ s.prod → ∃ a ∈ s, p ∣ a

{α : Type u_1}
[CommMonoidWithZero α]
{p : α}
(hp : Prime p)
{s : Multiset α}


theorem isClosed_of_pairwise_le_dist {s : Set γ} {ε : ℝ} (hε : 0 < ε)
    (hs : s.Pairwise fun x y => ε ≤ dist x y) : IsClosed s


/-- The functorial version of `ULift.up`. -/
@[simps]
def ULift.upFunctor : C ⥤ ULift.{u₂} C

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

(CategoryTheory.ULift.upFunctor.obj down).down = down


@[simp]
lemma δ_zero_cocycle_comp {n : ℤ} (z₁ : Cocycle F G 0) (z₂ : Cochain G K n) (m : ℤ) :
    δ n m (z₁.1.comp z₂ (zero_add n)) =
      z₁.1.comp (δ n m z₂) (zero_add m)

(z₁ : CochainComplex.HomComplex.Cocycle F G 0)

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

CochainComplex.HomComplex.δ n m ((↑z₁).comp z₂ ⋯) = (↑z₁).comp (CochainComplex.HomComplex.δ n m z₂) ⋯


theorem Coloring.colorClasses_isPartition : Setoid.IsPartition C.colorClasses

{V : Type u}
{G : SimpleGraph V}
{α : Type u_1}
(C : G.Coloring α)


lemma hasSum_jacobiTheta₂_term_fderiv (z : ℂ) {τ : ℂ} (hτ : 0 < im τ) :
    HasSum (fun n ↦ jacobiTheta₂_term_fderiv n z τ) (jacobiTheta₂_fderiv z τ)

HasSum (fun n => jacobiTheta₂_term_fderiv n z τ) (jacobiTheta₂_fderiv z τ)


@[to_additive]
theorem zpow_eq_zpow_iff_modEq {m n : ℤ} : x ^ m = x ^ n ↔ m ≡ n [ZMOD orderOf x]

{G : Type u_1}
[AddGroup G]
{x : G}
{m n : ℤ}

m • x = n • x ↔ m ≡ n [ZMOD ↑(addOrderOf x)]


@[to_additive]
theorem smul_closure_subset (c : M) (s : Set α) : c • closure s ⊆ closure (c • s)

{M : Type u_1}
{α : Type u_2}
[TopologicalSpace α]
[AddMonoid M]
[AddAction M α]
[ContinuousConstVAdd M α]
(c : M)
(s : Set α)


@[simp]
theorem flag_le_ker_coord_iff [Nontrivial R] (b : Basis (Fin n) R M) {k : Fin (n + 1)} {l : Fin n} :
    b.flag k ≤ LinearMap.ker (b.coord l) ↔ k ≤ l.castSucc

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
{n : ℕ}
[Nontrivial R]
(b : Basis (Fin n) R M)
{k : Fin (n + 1)}
{l : Fin n}


/-- Oh, monads are just monoids in the category of endofunctors (equivalence of categories). -/
@[simps]
def monadMonEquiv : Monad C ≌ Mon_ (C ⥤ C)

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

∀ (x : Mon_ (CategoryTheory.Functor C C)),
  ((CategoryTheory.Monad.monadMonEquiv C).counitIso.hom.app x).hom =
    CategoryTheory.CategoryStruct.id
      (((CategoryTheory.Monad.monToMonad C).comp (CategoryTheory.Monad.monadToMon C)).obj x).X


theorem map_union [DecidableEq α] [DecidableEq β] {f : α ↪ β} (s₁ s₂ : Finset α) :
    (s₁ ∪ s₂).map f = s₁.map f ∪ s₂.map f

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
{f : α ↪ β}
(s₁ s₂ : Finset α)

Finset.map f (s₁ ∪ s₂) = Finset.map f s₁ ∪ Finset.map f s₂


/-- For continuous functions `f`, `g` on a compact, finite-measure topological space `α`, the L^2
inner product is the integral of their pointwise inner product. -/
theorem ContinuousMap.inner_toLp (f g : C(α, 𝕜)) :
    ⟪ContinuousMap.toLp (E := 𝕜) 2 μ 𝕜 f, ContinuousMap.toLp (E := 𝕜) 2 μ 𝕜 g⟫ =
      ∫ x, conj (f x) * g x ∂μ

{α : Type u_1}
{𝕜 : Type u_2}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[RCLike 𝕜]
(μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure μ]
[CompactSpace α]
(f g : C(α, 𝕜))

⟪(ContinuousMap.toLp 2 μ 𝕜) f, (ContinuousMap.toLp 2 μ 𝕜) g⟫_𝕜 = ∫ (x : α), (starRingEnd 𝕜) (f x) * g x ∂μ


@[simp]
theorem nil_comp {a : V} : ∀ {b} (p : Path a b), Path.nil.comp p = p

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


@[simp]
theorem num_neg (c : NumDenSameDeg 𝒜 x) : ((-c).num : A) = -c.num

(c : HomogeneousLocalization.NumDenSameDeg 𝒜 x)


/--
An equivalence relation `~ : α → α → Prop` is a relation that is:

* reflexive: `x ~ x`
* symmetric: `x ~ y` implies `y ~ x`
* transitive: `x ~ y` and `y ~ z` implies `x ~ z`

Equality is an equivalence relation, and equivalence relations share many of
the properties of equality. In particular, `Quot α r` is most well behaved
when `r` is an equivalence relation, and in this case we use `Quotient` instead.
-/
structure Equivalence {α : Sort u} (r : α → α → Prop) : Prop where
  /-- An equivalence relation is reflexive: `x ~ x` -/
  refl  : ∀ x, r x x
  /-- An equivalence relation is symmetric: `x ~ y` implies `y ~ x` -/
  symm  : ∀ {x y}, r x y → r y x
  /-- An equivalence relation is transitive: `x ~ y` and `y ~ z` implies `x ~ z` -/
  trans : ∀ {x y z}, r x y → r y z → r x z

{α : Sort u}
{r : α → α → Prop}
(self : Equivalence r)
(x : α)


theorem contDiff_arctan {n : ℕ∞} : ContDiff ℝ n arctan


@[simp]
theorem coe_normGroupNorm : ⇑(normGroupNorm E) = norm


theorem ContDiffOn.continuousOn_fderivWithin (h : ContDiffOn 𝕜 n f s) (hs : UniqueDiffOn 𝕜 s)
    (hn : 1 ≤ n) : ContinuousOn (fun x => fderivWithin 𝕜 f s x) s

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{n : ℕ∞}
(h : ContDiffOn 𝕜 n f s)
(hs : UniqueDiffOn 𝕜 s)
(hn : 1 ≤ n)


theorem algebraMap_mk' {A : Type*} [Semiring A] [Algebra R A] (a : R) (s : S) :
    algebraMap _ _ (IsLocalization.mk' T a s) = mk (algebraMap R A a) s

{R : Type u}
[CommSemiring R]
{S : Submonoid R}
(T : Type u_1)
[CommSemiring T]
[Algebra R T]
[IsLocalization S T]
{A : Type u_2}
[Semiring A]
[Algebra R A]
(a : R)
(s : ↥S)

(algebraMap T (LocalizedModule S A)) (IsLocalization.mk' T a s) = LocalizedModule.mk ((algebraMap R A) a) s


@[to_additive (attr := simp)]
theorem map_id : map (MonoidHom.id M) = MonoidHom.id Mˣ

Units.map (MonoidHom.id M) = MonoidHom.id Mˣ


theorem filter_congr {p q : α → Prop} [DecidablePred p] [DecidablePred q] {s : Multiset α} :
    (∀ x ∈ s, p x ↔ q x) → filter p s = filter q s

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

(∀ x ∈ s, p x ↔ q x) → Multiset.filter p s = Multiset.filter q s


@[to_additive HasSum.nat_add_neg_add_one]
lemma HasProd.nat_mul_neg_add_one {f : ℤ → M} (hf : HasProd f m) :
    HasProd (fun n : ℕ ↦ f n * f (-(n + 1))) m

{M : Type u_1}
[AddCommMonoid M]
[TopologicalSpace M]
{m : M}
{f : ℤ → M}
(hf : HasSum f m)

HasSum (fun n => f ↑n + f (-(↑n + 1))) m


@[simp]
theorem aleph'_succ {o : Ordinal} : aleph' (succ o) = succ (aleph' o)

Cardinal.aleph' (Order.succ o) = Order.succ (Cardinal.aleph' o)


@[simp]
theorem whiskerLeft_hom (X : Action V G) {Y Z : Action V G} (f : Y ⟶ Z) :
    (X ◁ f).hom = X.V ◁ f.hom

{V : Type (u + 1)}
[CategoryTheory.LargeCategory V]
{G : MonCat}
[CategoryTheory.MonoidalCategory V]
(X : Action V G)
{Y Z : Action V G}
(f : Y ⟶ Z)

(CategoryTheory.MonoidalCategory.whiskerLeft X f).hom = CategoryTheory.MonoidalCategory.whiskerLeft X.V f.hom


theorem basis_nhds : (𝓝 x).HasBasis (fun _ : OpenNhdsOf x => True) (↑)

{α : Type u_2}
[TopologicalSpace α]
{x : α}

(𝓝 x).HasBasis (fun x => True) SetLike.coe


/-- See also `nonempty_iff_ne_empty'`. -/
theorem not_nonempty_iff_eq_empty' : ¬Nonempty s ↔ s = ∅


theorem LinearMap.hasBasis_weakBilin (B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜) :
    (𝓝 (0 : WeakBilin B)).HasBasis B.toSeminormFamily.basisSets _root_.id

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[AddCommGroup F]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)

(𝓝 0).HasBasis B.toSeminormFamily.basisSets id


@[reassoc (attr := simp)]
theorem ε_hom_inv_app (X : C) : F.ε.app X ≫ F.εIso.inv.app X = 𝟙 _

(F : CategoryTheory.MonoidalFunctor M (CategoryTheory.Functor C C))

CategoryTheory.CategoryStruct.comp (F.ε.app X) (F.εIso.inv.app X) =
  CategoryTheory.CategoryStruct.id ((𝟙_ (CategoryTheory.Functor C C)).obj X)


theorem isNilpotent_sub (h_comm : Commute x y) (hx : IsNilpotent x) (hy : IsNilpotent y) :
    IsNilpotent (x - y)

{R : Type u_1}
{x y : R}
[Ring R]
(h_comm : Commute x y)
(hx : IsNilpotent x)
(hy : IsNilpotent y)


/-- A 1-cocycle is a 1-cochain which satisfies the cocycle condition. -/
structure OneCocycle extends OneCochain G U where
  ev_trans (i j k : I) ⦃T : C⦄ (a : T ⟶ U i) (b : T ⟶ U j) (c : T ⟶ U k) :
      ev i j a b * ev j k b c = ev i k a c := by aesop

(self : CategoryTheory.PresheafOfGroups.OneCocycle G U)

self.ev i j a b * self.ev j k b c = self.ev i k a c


theorem FiniteDimensional.of_exists_primitive_element [Algebra.IsAlgebraic F E]
    (h : ∃ α : E, F⟮α⟯ = ⊤) : FiniteDimensional F E

(F : Type u_1)
(E : Type u_2)
[Field F]
[Field E]
[Algebra F E]
[Algebra.IsAlgebraic F E]
(h : ∃ α, F⟮α⟯ = ⊤)


/-- Maps a sentence's symbols along a language equivalence. -/
@[simps!] -- Porting note: add `!` to `simps`
def onSentence (φ : L ≃ᴸ L') : L.Sentence ≃ L'.Sentence

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(φ : L ≃ᴸ L')

∀ (a : L'.BoundedFormula Empty 0), φ.onSentence.symm a = φ.invLHom.onBoundedFormula a


protected lemma symm (hr : ∀ (a : α) (b : β), r₁₂ a b → r₂₁ b a) :
    BiTotal r₁₂ → BiTotal r₂₁

Relator.BiTotal r₁₂ → Relator.BiTotal r₂₁


@[simp]
theorem isAdjoinRootMonic_map_eq_mk (hf : f.Monic) :
    (AdjoinRoot.isAdjoinRootMonic f hf).map = AdjoinRoot.mk f

{R : Type u}
[CommRing R]
(f : R[X])
(hf : f.Monic)


@[simp]
theorem circulant_single (n) [Semiring α] [DecidableEq n] [AddGroup n] [Fintype n] (a : α) :
    circulant (Pi.single 0 a : n → α) = scalar n a

{α : Type u_1}
(n : Type u_6)
[Semiring α]
[DecidableEq n]
[AddGroup n]
[Fintype n]
(a : α)

Matrix.circulant (Pi.single 0 a) = (Matrix.scalar n) a


/-- An additive submonoid of an additive monoid `M` is a subset containing 0 and
  closed under addition. -/
structure AddSubmonoid (M : Type*) [AddZeroClass M] extends AddSubsemigroup M where
  /-- An additive submonoid contains `0`. -/
  zero_mem' : (0 : M) ∈ carrier

{M : Type u_4}
[AddZeroClass M]
(self : AddSubmonoid M)


@[simp]
theorem coe_nodupKeys {l : List (Sigma β)} : @NodupKeys α β l ↔ l.NodupKeys

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


theorem singularPart_mutuallySingular (s : SignedMeasure α) (μ : Measure α) :
    s.toJordanDecomposition.posPart.singularPart μ ⟂ₘ
      s.toJordanDecomposition.negPart.singularPart μ

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


@[to_additive]
theorem smoothOn_finset_prod (h : ∀ i ∈ t, SmoothOn I' I (f i) s) :
    SmoothOn I' I (fun x => ∏ i ∈ t, f i x) s

{ι : Type u_1}
{𝕜 : Type u_2}
[NontriviallyNormedField 𝕜]
{H : Type u_3}
[TopologicalSpace H]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{I : ModelWithCorners 𝕜 E H}
{G : Type u_5}
[CommMonoid G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]
{E' : Type u_6}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_7}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_8}
[TopologicalSpace M]
[ChartedSpace H' M]
{s : Set M}
{t : Finset ι}
{f : ι → M → G}
(h : ∀ i ∈ t, SmoothOn I' I (f i) s)


theorem eLpNorm_lim_le_liminf_eLpNorm {E} [NormedAddCommGroup E] {f : ℕ → α → E}
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (f_lim : α → E)
    (h_lim : ∀ᵐ x : α ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (f_lim x))) :
    eLpNorm f_lim p μ ≤ atTop.liminf fun n => eLpNorm (f n) p μ

(hf : ∀ (n : ℕ), MeasureTheory.AEStronglyMeasurable (f n) μ)

(h_lim : ∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun n => f n x) Filter.atTop (𝓝 (f_lim x)))

MeasureTheory.eLpNorm f_lim p μ ≤ Filter.liminf (fun n => MeasureTheory.eLpNorm (f n) p μ) Filter.atTop


theorem ContinuousLinearMap.smooth (L : E →L[𝕜] F) : Smooth 𝓘(𝕜, E) 𝓘(𝕜, F) L

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_8}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(L : E →L[𝕜] F)


/-- The image under a monoid homomorphism of the subgroup generated by a set equals the subgroup
generated by the image of the set. -/
@[to_additive
      "The image under an `AddMonoid` hom of the `AddSubgroup` generated by a set equals
      the `AddSubgroup` generated by the image of the set."]
theorem map_closure (f : G →* N) (s : Set G) : (closure s).map f = closure (f '' s)

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(f : G →+ N)
(s : Set G)

AddSubgroup.map f (AddSubgroup.closure s) = AddSubgroup.closure (⇑f '' s)


/-- A bicone morphism between two bicones for the same diagram is a morphism of the bicone points
which commutes with the cone and cocone legs. -/
structure BiconeMorphism {F : J → C} (A B : Bicone F) where
  /-- A morphism between the two vertex objects of the bicones -/
  hom : A.pt ⟶ B.pt
  /-- The triangle consisting of the two natural transformations and `hom` commutes -/
  wπ : ∀ j : J, hom ≫ B.π j = A.π j := by aesop_cat
  /-- The triangle consisting of the two natural transformations and `hom` commutes -/
  wι : ∀ j : J, A.ι j ≫ hom = B.ι j := by aesop_cat

(self : CategoryTheory.Limits.BiconeMorphism A B)


@[simp, norm_cast] lemma coe_mk (s : Set α) (hs) : mk s hs = s

{α : Type u_1}
[LE α]
(s : Set α)
(hs : IsLowerSet s)


@[simp]
theorem union_eq_left {s t : Set α} : s ∪ t = s ↔ t ⊆ s


@[to_additive (attr := simp)]
theorem coe_pureOneHom : (pureOneHom : α → Filter α) = pure


/-- If `f = g = h` everywhere but at `i`, where `f i = g i + h i`, then the product of `f` over `s`
  is the sum of the products of `g` and `h`. -/
theorem prod_add_prod_eq {s : Finset ι} {i : ι} {f g h : ι → α} (hi : i ∈ s)
    (h1 : g i + h i = f i) (h2 : ∀ j ∈ s, j ≠ i → g j = f j) (h3 : ∀ j ∈ s, j ≠ i → h j = f j) :
    (∏ i ∈ s, g i) + ∏ i ∈ s, h i = ∏ i ∈ s, f i

{ι : Type u_1}
{α : Type u_2}
[CommSemiring α]
{s : Finset ι}
{i : ι}
{f g h : ι → α}
(hi : i ∈ s)
(h1 : g i + h i = f i)
(h2 : ∀ j ∈ s, j ≠ i → g j = f j)
(h3 : ∀ j ∈ s, j ≠ i → h j = f j)

∏ i ∈ s, g i + ∏ i ∈ s, h i = ∏ i ∈ s, f i


theorem sum_left {α} (t : Finset α) (g : α → M) (w : M) :
    B (∑ i ∈ t, g i) w = ∑ i ∈ t, B (g i) w

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(B : LinearMap.BilinForm R M)
{α : Type u_7}
(t : Finset α)
(g : α → M)
(w : M)

(B (∑ i ∈ t, g i)) w = ∑ i ∈ t, (B (g i)) w


/--
If `g` and `h` commute, then `g` moves `h • x` iff `g` moves `x`.
This is equivalent to say that the set `(fixedBy α g)ᶜ` is fixed by `h`.
-/
@[to_additive "If `g` and `h` commute, then `g` moves `h +ᵥ x` iff `g` moves `x`.
This is equivalent to say that the set `(fixedBy α g)ᶜ` is fixed by `h`."]
theorem movedBy_mem_fixedBy_of_commute {g h : G} (comm : Commute g h) :
    (fixedBy α g)ᶜ ∈ fixedBy (Set α) h

{α : Type u_1}
{G : Type u_2}
[Group G]
[MulAction G α]
{g h : G}
(comm : Commute g h)

(MulAction.fixedBy α g)ᶜ ∈ MulAction.fixedBy (Set α) h


theorem normalize_eq_inv_mass_smul_of_nonzero (nonzero : μ ≠ 0) :
    μ.normalize.toFiniteMeasure = μ.mass⁻¹ • μ

{Ω : Type u_1}
[Nonempty Ω]
{m0 : MeasurableSpace Ω}
(μ : MeasureTheory.FiniteMeasure Ω)
(nonzero : μ ≠ 0)


theorem ideal_eq_span_pow_irreducible {s : Ideal R} (hs : s ≠ ⊥) {ϖ : R} (hirr : Irreducible ϖ) :
    ∃ n : ℕ, s = Ideal.span {ϖ ^ n}

{R : Type u_1}
[CommRing R]
[IsDomain R]
[DiscreteValuationRing R]
{s : Ideal R}
(hs : s ≠ ⊥)
{ϖ : R}
(hirr : Irreducible ϖ)


@[refl]
theorem oneOneReducible_refl {α} [Primcodable α] (p : α → Prop) : p ≤₁ p

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


theorem exists_isNilpotent_isSemisimple_of_separable_of_dvd_pow {P : K[X]} {k : ℕ}
    (sep : P.Separable) (nil : minpoly K f ∣ P ^ k) :
    ∃ᵉ (n ∈ adjoin K {f}) (s ∈ adjoin K {f}), IsNilpotent n ∧ IsSemisimple s ∧ f = n + s

{K : Type u_1}
{V : Type u_2}
[Field K]
[AddCommGroup V]
[Module K V]
{f : Module.End K V}
{P : K[X]}
{k : ℕ}
(sep : P.Separable)
(nil : minpoly K f ∣ P ^ k)

∃ n ∈ Algebra.adjoin K {f}, ∃ s ∈ Algebra.adjoin K {f}, IsNilpotent n ∧ s.IsSemisimple ∧ f = n + s


@[simp]
theorem edist_pi_const [Nonempty β] (a b : α) : (edist (fun _ : β => a) fun _ => b) = edist a b

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[Fintype β]
[Nonempty β]
(a b : α)

(edist (fun x => a) fun x => b) = edist a b


theorem seminormFromConstRingNormOfField_def {k : K} {g : RingSeminorm K} (hg1 : g 1 ≤ 1)
    (hg_k : g k ≠ 0) (hg_pm : IsPowMul g) (x : K) :
    normFromConst hg1 hg_k hg_pm x = seminormFromConst' hg1 hg_k hg_pm x

{K : Type u_1}
[Field K]
{k : K}
{g : RingSeminorm K}
(hg1 : g 1 ≤ 1)
(hg_k : g k ≠ 0)
(hg_pm : IsPowMul ⇑g)
(x : K)

(normFromConst hg1 hg_k hg_pm) x = seminormFromConst' hg1 hg_k hg_pm x


/-- The image of a 1-pre-hypercover by a functor. -/
@[simps]
def map : PreOneHypercover (F.obj X)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{X : C}
(E : CategoryTheory.PreOneHypercover X)
(F : CategoryTheory.Functor C D)
(i : E.I₀)


@[simp] theorem infiniteNeg_neg {x : ℝ*} : InfiniteNeg (-x) ↔ InfinitePos x


theorem cos_eq_iff_quadratic {z w : ℂ} :
    cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0

Complex.cos z = w ↔ Complex.exp (z * Complex.I) ^ 2 - 2 * w * Complex.exp (z * Complex.I) + 1 = 0


@[to_additive]
theorem prod_subtypeDomain_index [∀ i, Zero (β i)] [∀ (i) (x : β i), Decidable (x ≠ 0)]
    [CommMonoid γ] {v : Π₀ i, β i} {p : ι → Prop} [DecidablePred p] {h : ∀ i, β i → γ}
    (hp : ∀ x ∈ v.support, p x) : (v.subtypeDomain p).prod (fun i b => h i b) = v.prod h

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

((DFinsupp.subtypeDomain p v).prod fun i b => h (↑i) b) = v.prod h


lemma toNNReal_le_toNNReal_iff_of_pos {r p : ℝ} (hr : 0 < r) : r.toNNReal ≤ p.toNNReal ↔ r ≤ p


lemma precomp_surjective (F : ComposableArrows C (n + 1)) :
    ∃ (F₀ : ComposableArrows C n) (X₀ : C) (f₀ : X₀ ⟶ F₀.left), F = F₀.precomp f₀

(F : CategoryTheory.ComposableArrows C (n + 1))


@[to_additive (attr := simp)]
theorem bddBelow_inv : BddBelow s⁻¹ ↔ BddAbove s

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

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


theorem eLpNorm_add_lt_top {f g : α → E} (hf : Memℒp f p μ) (hg : Memℒp g p μ) :
    eLpNorm (f + g) p μ < ∞

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


theorem IsLittleO.isBigO (hgf : f =o[l] g) : f =O[l] g

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{f : α → E}
{g : α → F}
{l : Filter α}
(hgf : f =o[l] g)


/-- A closed subset of a Polish space is also Polish. -/
theorem _root_.IsClosed.polishSpace [TopologicalSpace α] [PolishSpace α] {s : Set α}
    (hs : IsClosed s) : PolishSpace s

{α : Type u_1}
[TopologicalSpace α]
[PolishSpace α]
{s : Set α}
(hs : IsClosed s)


@[to_additive]
theorem mul_iUnion₂ (s : Set α) (t : ∀ i, κ i → Set α) :
    (s * ⋃ (i) (j), t i j) = ⋃ (i) (j), s * t i j

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

s + ⋃ i, ⋃ j, t i j = ⋃ i, ⋃ j, s + t i j


theorem div2_bits_eq_tail (n : ℕ) : n.div2.bits = n.bits.tail


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

⦃φ ψ : (α →₀ M) →ₗ[R] N⦄

(h : ∀ (a : α) (b : M), φ (Finsupp.single a b) = ψ (Finsupp.single a b))


theorem map_natCast' {A} [AddMonoidWithOne A] [FunLike F A B] [AddMonoidHomClass F A B]
    (f : F) (h : f 1 = 1) :
    ∀ n : ℕ, f n = n

{B : Type u_4}
{F : Type u_5}
[AddMonoidWithOne B]
{A : Type u_6}
[AddMonoidWithOne A]
[FunLike F A B]
[AddMonoidHomClass F A B]
(f : F)
(h : f 1 = 1)
(n : ℕ)


lemma chainTopCoeff_add_chainBotCoeff :
    chainTopCoeff α β + chainBotCoeff α β = chainLength α β

{K : Type u_1}
{L : Type u_2}
[Field K]
[CharZero K]
[LieRing L]
[LieAlgebra K L]
[LieAlgebra.IsKilling K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
(α β : LieModule.Weight K (↥H) L)

LieModule.chainTopCoeff (⇑α) β + LieModule.chainBotCoeff (⇑α) β = LieAlgebra.IsKilling.chainLength α β


@[simp] theorem smul_cons {i : Int} : i * (x::xs : IntList) = i * x :: i * xs


@[simp] lemma mod_two_ne_zero : ¬n % 2 = 0 ↔ n % 2 = 1


theorem lt_min {a b c : α} (h₁ : a < b) (h₂ : a < c) : a < min b c

{α : Type u}
[LinearOrder α]
{a b c : α}
(h₁ : a < b)
(h₂ : a < c)


theorem mod_eq_of_lt {a b : Nat} (h : a < b) : a % b = a


@[simp]
theorem toNonUnitalRingHom_refl :
    (RingEquiv.refl R).toNonUnitalRingHom = NonUnitalRingHom.id R

{R : Type u_4}
[NonUnitalNonAssocSemiring R]


theorem sum_inl : Computable (@Sum.inl α β)

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


@[simp]
theorem N₂Γ₂_inv_app_f_f (X : Karoubi (ChainComplex C ℕ)) (n : ℕ) :
    (N₂Γ₂.inv.app X).f.f n =
      X.p.f n ≫ ((Γ₀.splitting X.X).cofan _).inj (Splitting.IndexSet.id (op [n]))

(X : CategoryTheory.Idempotents.Karoubi (ChainComplex C ℕ))

(AlgebraicTopology.DoldKan.N₂Γ₂.inv.app X).f.f n =
  X.p.f n ≫
    ((AlgebraicTopology.DoldKan.Γ₀.splitting X.X).cofan (Opposite.op [n])).inj
      (SimplicialObject.Splitting.IndexSet.id (Opposite.op [n]))


theorem map {v' : Valuation R Γ₀} (f : Γ₀ →*₀ Γ'₀) (hf : Monotone f) (inf : Injective f)
    (h : v.IsEquiv v') : (v.map f hf).IsEquiv (v'.map f hf)

{R : Type u_3}
{Γ₀ : Type u_4}
{Γ'₀ : Type u_5}
[Ring R]
[LinearOrderedCommMonoidWithZero Γ₀]
[LinearOrderedCommMonoidWithZero Γ'₀]
{v v' : Valuation R Γ₀}
(f : Γ₀ →*₀ Γ'₀)
(hf : Monotone ⇑f)
(inf : Function.Injective ⇑f)
(h : v.IsEquiv v')

(Valuation.map f hf v).IsEquiv (Valuation.map f hf v')


theorem hasSum_iff_tendsto_nat_of_summable_norm {f : ℕ → E} {a : E} (hf : Summable fun i => ‖f i‖) :
    HasSum f a ↔ Tendsto (fun n : ℕ => ∑ i ∈ range n, f i) atTop (𝓝 a)

{E : Type u_3}
[SeminormedAddCommGroup E]
{f : ℕ → E}
{a : E}
(hf : Summable fun i => ‖f i‖)

HasSum f a ↔ Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, f i) Filter.atTop (𝓝 a)


theorem ContDiffAt.congr_of_eventuallyEq (h : ContDiffAt 𝕜 n f x) (hg : f₁ =ᶠ[𝓝 x] f) :
    ContDiffAt 𝕜 n f₁ x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f f₁ : E → F}
{x : E}
{n : ℕ∞}
(h : ContDiffAt 𝕜 n f x)
(hg : f₁ =ᶠ[𝓝 x] f)


theorem integral_normed_smul {X} [NormedAddCommGroup X] [NormedSpace ℝ X]
    [CompleteSpace X] (z : X) : ∫ x, f.normed μ x • z ∂μ = z


theorem lim_lt {f : CauSeq α abs} {x : α} (h : f < CauSeq.const abs x) : lim f < x

{α : Type u_1}
[LinearOrderedField α]
[CauSeq.IsComplete α abs]
{f : CauSeq α abs}
{x : α}
(h : f < CauSeq.const abs x)


/-- The map `(x, y) ↦ (y, y⁻¹x)` sends `μ × ν` to `ν × μ`.
This is the function `S⁻¹R` in [Halmos, §59],
where `S` is the map `(x, y) ↦ (x, xy)` and `R` is `Prod.swap`. -/
@[to_additive measurePreserving_prod_neg_add_swap
"The map `(x, y) ↦ (y, - y + x)` sends `μ × ν` to `ν × μ`."]
theorem measurePreserving_prod_inv_mul_swap :
    MeasurePreserving (fun z : G × G => (z.2, z.2⁻¹ * z.1)) (μ.prod ν) (ν.prod μ)

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

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


@[reassoc]
lemma mapRightHomologyIso_inv_naturality [S₁.HasRightHomology] [S₂.HasRightHomology]
    [F.PreservesRightHomologyOf S₁] [F.PreservesRightHomologyOf S₂] :
    F.map (rightHomologyMap φ) ≫ (S₂.mapRightHomologyIso F).inv =
      (S₁.mapRightHomologyIso F).inv ≫ rightHomologyMap (F.mapShortComplex.map φ)

CategoryTheory.CategoryStruct.comp (F.map (CategoryTheory.ShortComplex.rightHomologyMap φ))
    (S₂.mapRightHomologyIso F).inv =
  CategoryTheory.CategoryStruct.comp (S₁.mapRightHomologyIso F).inv
    (CategoryTheory.ShortComplex.rightHomologyMap (F.mapShortComplex.map φ))


@[simp]
theorem invAct_act_eq (x y : R) : x ◃⁻¹ x ◃ y = y


/-- Given a function such that `f` and `x ^ (k + l) * f` are bounded for a suitable `l`, then
one can bound explicitly the integral of `x ^ k * f`. -/
lemma integral_pow_mul_le_of_le_of_pow_mul_le
    {μ : Measure D} [μ.HasTemperateGrowth] {f : D → E} {C₁ C₂ : ℝ} {k : ℕ}
    (hf : ∀ x, ‖f x‖ ≤ C₁) (h'f : ∀ x, ‖x‖ ^ (k + μ.integrablePower) * ‖f x‖ ≤ C₂) :
    ∫ x, ‖x‖ ^ k * ‖f x‖ ∂μ ≤ 2 ^ μ.integrablePower *
      (∫ x, (1 + ‖x‖) ^ (- (μ.integrablePower : ℝ)) ∂μ) * (C₁ + C₂)

(h'f : ∀ (x : D), ‖x‖ ^ (k + μ.integrablePower) * ‖f x‖ ≤ C₂)

∫ (x : D), ‖x‖ ^ k * ‖f x‖ ∂μ ≤ (2 ^ μ.integrablePower * ∫ (x : D), (1 + ‖x‖) ^ (-↑μ.integrablePower) ∂μ) * (C₁ + C₂)


theorem add {f g : ∀ i, E i} (hf : Memℓp f p) (hg : Memℓp g p) : Memℓp (f + g) p

{α : Type u_1}
{E : α → Type u_2}
{p : ℝ≥0∞}
[(i : α) → NormedAddCommGroup (E i)]
{f g : (i : α) → E i}
(hf : Memℓp f p)
(hg : Memℓp g p)


/-- All triangles in an orthocentric system have the same circumradius. -/
theorem OrthocentricSystem.exists_circumradius_eq {s : Set P} (ho : OrthocentricSystem s) :
    ∃ r : ℝ, ∀ t : Triangle ℝ P, Set.range t.points ⊆ s → t.circumradius = r

(ho : EuclideanGeometry.OrthocentricSystem s)

∃ r, ∀ (t : Affine.Triangle ℝ P), Set.range t.points ⊆ s → Affine.Simplex.circumradius t = r


theorem borel_eq_generateFrom_Ioo_rat :
    borel ℝ = .generateFrom (⋃ (a : ℚ) (b : ℚ) (_ : a < b), {Ioo (a : ℝ) (b : ℝ)})

borel ℝ = MeasurableSpace.generateFrom (⋃ a, ⋃ b, ⋃ (_ : a < b), {Set.Ioo ↑a ↑b})


theorem convex_iff_forall_pos :
    Convex 𝕜 s ↔
      ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s

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

Convex 𝕜 s ↔ ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s


theorem mem_lift_sets (hg : Monotone g) {s : Set β} : s ∈ f.lift g ↔ ∃ t ∈ f, s ∈ g t

{α : Type u_1}
{β : Type u_2}
{f : Filter α}
{g : Set α → Filter β}
(hg : Monotone g)
{s : Set β}


@[simp]
theorem invFunIdAssoc_hom_app (e : C ≌ D) (F : D ⥤ E) (X : D) :
    (invFunIdAssoc e F).hom.app X = F.map (e.counit.app X)

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

(e.invFunIdAssoc F).hom.app X = F.map (e.counit.app X)


theorem of_surjective (f : A →ₐ[R] B) (hf : Surjective f) : f.FiniteType

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommRing R]
[CommRing A]
[CommRing B]
[Algebra R A]
[Algebra R B]
(f : A →ₐ[R] B)
(hf : Function.Surjective ⇑f)


lemma compClosure_iff_self [h : Congruence r] {X Y : C} (f g : X ⟶ Y) :
    CompClosure r f g ↔ r f g

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(r : HomRel C)
[h : CategoryTheory.Congruence r]
{X Y : C}
(f g : X ⟶ Y)

CategoryTheory.Quotient.CompClosure r f g ↔ r f g


theorem testBit_mul_pow_two_add (a : Nat) {b i : Nat} (b_lt : b < 2^i) (j : Nat) :
    testBit (2 ^ i * a + b) j =
      if j < i then
        testBit b j
      else
        testBit a (j - i)

(a : Nat)
{b i : Nat}
(b_lt : b < 2 ^ i)
(j : Nat)

(2 ^ i * a + b).testBit j = if j < i then b.testBit j else a.testBit (j - i)


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

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

(CategoryTheory.tensorMonoidal C).μ X Y = CategoryTheory.tensor_μ C X Y


theorem disjoint_sum_right {a : Multiset α} {i : Multiset (Multiset α)} :
    Multiset.Disjoint a i.sum ↔ ∀ b ∈ i, Multiset.Disjoint a b

{α : Type u_3}
{a : Multiset α}
{i : Multiset (Multiset α)}

a.Disjoint i.sum ↔ ∀ b ∈ i, a.Disjoint b


lemma normSq_eq_norm_sq (z : ℂ) : normSq z = ‖z‖ ^ 2


@[norm_cast]
theorem coe_lt_coe : (a : α) < b ↔ a < b

{α : Type u_1}
[Lattice α]
[BoundedOrder α]
{a b : Complementeds α}


@[simp, nolint simpNF]
theorem LieIdeal.topEquiv_apply (x : (⊤ : LieIdeal R L)) : LieIdeal.topEquiv x = x

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(x : ↥⊤)


@[simp]
theorem morphismRestrict_appLE {X Y : Scheme.{u}} (f : X ⟶ Y) (U : Y.Opens) (V W e) :
    (f ∣_ U).appLE V W e = f.appLE (U.ι ''ᵁ V) ((f ⁻¹ᵁ U).ι ''ᵁ W)
      ((Set.image_subset _ e).trans (image_morphismRestrict_preimage f U V).le)

(W : (↑((TopologicalSpace.Opens.map f.val.base).obj U)).Opens)

(e : W ≤ (TopologicalSpace.Opens.map (f ∣_ U).val.base).obj V)

AlgebraicGeometry.Scheme.Hom.appLE (f ∣_ U) V W e =
  AlgebraicGeometry.Scheme.Hom.appLE f ((AlgebraicGeometry.Scheme.Hom.opensFunctor U.ι).obj V)
    ((AlgebraicGeometry.Scheme.Hom.opensFunctor ((TopologicalSpace.Opens.map f.val.base).obj U).ι).obj W) ⋯


theorem TendstoLocallyUniformlyOn.comp [TopologicalSpace γ] {t : Set γ}
    (h : TendstoLocallyUniformlyOn F f p s) (g : γ → α) (hg : MapsTo g t s)
    (cg : ContinuousOn g t) : TendstoLocallyUniformlyOn (fun n => F n ∘ g) (f ∘ g) p t

{α : Type u}
{β : Type v}
{γ : Type w}
{ι : Type x}
[UniformSpace β]
{F : ι → α → β}
{f : α → β}
{s : Set α}
{p : Filter ι}
[TopologicalSpace α]
[TopologicalSpace γ]
{t : Set γ}
(h : TendstoLocallyUniformlyOn F f p s)
(g : γ → α)
(hg : Set.MapsTo g t s)
(cg : ContinuousOn g t)


theorem image_neg_Ico : Neg.neg '' Ico a b = Ioc (-b) (-a)

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

Neg.neg '' Set.Ico a b = Set.Ioc (-b) (-a)


@[simp]
theorem product_add (s : Multiset α) : ∀ t u : Multiset β, s ×ˢ (t + u) = s ×ˢ t + s ×ˢ u

{α : Type u_1}
{β : Type v}
(s : Multiset α)
(t u : Multiset β)


theorem cthickening_eq_biUnion_closedBall {α : Type*} [PseudoMetricSpace α] [ProperSpace α]
    (E : Set α) (hδ : 0 ≤ δ) : cthickening δ E = ⋃ x ∈ closure E, closedBall x δ

{δ : ℝ}
{α : Type u_2}
[PseudoMetricSpace α]
[ProperSpace α]
(E : Set α)
(hδ : 0 ≤ δ)

Metric.cthickening δ E = ⋃ x ∈ closure E, Metric.closedBall x δ


theorem inf_le_of_le {b : β} (hb : b ∈ s) (h : f b ≤ a) : s.inf f ≤ a

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


/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData

(S : CategoryTheory.ShortComplex (ModuleCat R))


@[to_additive]
theorem div_def : s / t = (s ×ˢ t).image fun p : α × α => p.1 / p.2

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

s - t = Finset.image (fun p => p.1 - p.2) (s ×ˢ t)


theorem isCaratheodory_inter (h₁ : IsCaratheodory m s₁) (h₂ : IsCaratheodory m s₂) :
    IsCaratheodory m (s₁ ∩ s₂)

{α : Type u}
(m : MeasureTheory.OuterMeasure α)
{s₁ s₂ : Set α}
(h₁ : m.IsCaratheodory s₁)
(h₂ : m.IsCaratheodory s₂)


theorem UniformInducing.denseInducing {f : α → β} (h : UniformInducing f) (hd : DenseRange f) :
    DenseInducing f

{α : Type u}
{β : Type v}
[UniformSpace α]
[UniformSpace β]
{f : α → β}
(h : UniformInducing f)
(hd : DenseRange f)


@[reassoc (attr := simp)]
theorem monoLift_comp [Mono f] {T : C} (g : T ⟶ Y) (hg : g ≫ cokernel.π f = 0) :
    monoLift f g hg ≫ f = g

(hg : g ≫ CategoryTheory.Limits.cokernel.π f = 0)

CategoryTheory.Abelian.monoLift f g hg ≫ f = g


@[simp]
theorem im_imK : a.im.imK = a.imK

{R : Type u_3}
[CommRing R]
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])


lemma zero_le_ofNat (n : ℕ) : 0 ≤ ofNat n


theorem IsOpen.inter_closure (h : IsOpen s) : s ∩ closure t ⊆ closure (s ∩ t)

{X : Type u}
{s t : Set X}
[TopologicalSpace X]
(h : IsOpen s)


/-- `AlternatingMap.domDomCongr` as an equivalence.

This is declared separately because it does not work with dot notation. -/
@[simps apply symm_apply]
def domDomCongrEquiv (σ : ι ≃ ι') : M [⋀^ι]→ₗ[R] N ≃+ M [⋀^ι']→ₗ[R] N

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

(AlternatingMap.domDomCongrEquiv σ).symm f = AlternatingMap.domDomCongr σ.symm f


/-- If `|r| < 1`, then `n ^ k r ^ n` tends to zero for any natural `k`. -/
theorem tendsto_pow_const_mul_const_pow_of_abs_lt_one (k : ℕ) {r : ℝ} (hr : |r| < 1) :
    Tendsto (fun n ↦ (n : ℝ) ^ k * r ^ n : ℕ → ℝ) atTop (𝓝 0)

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


@[to_additive]
theorem Pi.monoidHom_injective {γ : Type w} [Nonempty I] [∀ i, MulOneClass (f i)] [MulOneClass γ]
    (g : ∀ i, γ →* f i) (hg : ∀ i, Function.Injective (g i)) :
    Function.Injective (Pi.monoidHom g)

(hg : ∀ (i : I), Function.Injective ⇑(g i))


@[to_additive (attr := simp)]
lemma finite_zpowers : (zpowers a : Set α).Finite ↔ IsOfFinOrder a

(↑(Subgroup.zpowers a)).Finite ↔ IsOfFinOrder a


/-- In the specific case of continuous alternating maps on spaces indexed by `Fin (n+1)`, where one
can build an element of `Π(i : Fin (n+1)), M i` using `cons`, one can express directly the
additivity of an alternating map along the first variable. -/
theorem vecCons_add (f : ContinuousAlternatingMap R M N (Fin (n + 1))) (m : Fin n → M) (x y : M) :
    f (vecCons (x + y) m) = f (vecCons x m) + f (vecCons y m)

{R : Type u_1}
{M : Type u_2}
{N : Type u_4}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[TopologicalSpace M]
[AddCommMonoid N]
[Module R N]
[TopologicalSpace N]
{n : ℕ}
(f : M [⋀^Fin (n + 1)]→L[R] N)
(m : Fin n → M)
(x y : M)

f (Matrix.vecCons (x + y) m) = f (Matrix.vecCons x m) + f (Matrix.vecCons y m)


theorem Q'_apply (m : M × R) : Q' Q m = Q m.1 - m.2 * m.2

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(Q : QuadraticForm R M)
(m : M × R)

(CliffordAlgebra.EquivEven.Q' Q) m = Q m.1 - m.2 * m.2


theorem map_natCast_smul [AddCommMonoid M] [AddCommMonoid M₂] {F : Type*} [FunLike F M M₂]
    [AddMonoidHomClass F M M₂] (f : F) (R S : Type*) [Semiring R] [Semiring S] [Module R M]
    [Module S M₂] (x : ℕ) (a : M) : f ((x : R) • a) = (x : S) • f a

{M : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M]
[AddCommMonoid M₂]
{F : Type u_9}
[FunLike F M M₂]
[AddMonoidHomClass F M M₂]
(f : F)
(R : Type u_10)
(S : Type u_11)
[Semiring R]
[Semiring S]
[Module R M]
[Module S M₂]
(x : ℕ)
(a : M)


/-- Reformulate in the `StructureGroupoid` namespace the compatibility condition of charts in a
charted space admitting a structure groupoid, to make it more easily accessible with dot
notation. -/
theorem StructureGroupoid.compatible {H : Type*} [TopologicalSpace H] (G : StructureGroupoid H)
    {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [HasGroupoid M G]
    {e e' : PartialHomeomorph M H} (he : e ∈ atlas H M) (he' : e' ∈ atlas H M) : e.symm ≫ₕ e' ∈ G

{H : Type u_5}
[TopologicalSpace H]
(G : StructureGroupoid H)
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
[HasGroupoid M G]
{e e' : PartialHomeomorph M H}
(he : e ∈ atlas H M)
(he' : e' ∈ atlas H M)


theorem Zlattice.module_free [IsZlattice K L] : Module.Free ℤ L

(K : Type u_1)
[NormedLinearOrderedField K]
[HasSolidNorm K]
[FloorRing K]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace K E]
[FiniteDimensional K E]
[ProperSpace E]
(L : AddSubgroup E)
[DiscreteTopology ↥L]
[IsZlattice K L]


theorem integral_sin_mul_sin_mul_cos_pow_eq (hn : 2 ≤ n) (hz : z ≠ 0) :
    (∫ x in (0 : ℝ)..π / 2, Complex.sin (2 * z * x) * sin x * (cos x : ℂ) ^ (n - 1)) =
      (n / (2 * z) * ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ n) -
        (n - 1) / (2 * z) *
          ∫ x in (0 : ℝ)..π / 2, Complex.cos (2 * z * x) * (cos x : ℂ) ^ (n - 2)

∫ (x : ℝ) in 0 ..π / 2, Complex.sin (2 * z * ↑x) * ↑(Real.sin x) * ↑(Real.cos x) ^ (n - 1) =
  (↑n / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(Real.cos x) ^ n) -
    (↑n - 1) / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(Real.cos x) ^ (n - 2)


@[aesop safe apply]
lemma differentiableAt_smoothingFn {x : ℝ} (hx : 1 < x) : DifferentiableAt ℝ ε x

DifferentiableAt ℝ AkraBazziRecurrence.smoothingFn x


protected theorem Tendsto.piecewise {l₁ : Filter α} {l₂ : Filter β} {f g : α → β} {s : Set α}
    [∀ x, Decidable (x ∈ s)] (h₀ : Tendsto f (l₁ ⊓ 𝓟 s) l₂) (h₁ : Tendsto g (l₁ ⊓ 𝓟 sᶜ) l₂) :
    Tendsto (piecewise s f g) l₁ l₂

{α : Type u}
{β : Type v}
{l₁ : Filter α}
{l₂ : Filter β}
{f g : α → β}
{s : Set α}
[(x : α) → Decidable (x ∈ s)]
(h₀ : Filter.Tendsto f (l₁ ⊓ 𝓟 s) l₂)
(h₁ : Filter.Tendsto g (l₁ ⊓ 𝓟 sᶜ) l₂)


theorem sin_eq_real_sin_iff_eq_or_add_eq_pi {θ : Angle} {ψ : ℝ} :
    sin θ = Real.sin ψ ↔ θ = ψ ∨ θ + ψ = π

θ.sin = Real.sin ψ ↔ θ = ↑ψ ∨ θ + ↑ψ = ↑π


/-- We say that `R` has the invariant basis number property if `(Fin n → R) ≃ₗ[R] (Fin m → R)`
    implies `n = m`. This gives rise to a well-defined notion of rank of a finitely generated free
    module. -/
class InvariantBasisNumber : Prop where
  /-- Any linear equiv between `Rⁿ` and `Rᵐ` guarantees `m = n`. -/
  eq_of_fin_equiv : ∀ {n m : ℕ}, ((Fin n → R) ≃ₗ[R] Fin m → R) → n = m

{R : Type u}
[Semiring R]
[self : InvariantBasisNumber R]
{n m : ℕ}


@[simp]
theorem toTrivSqZeroExt_ι [Module Rᵐᵒᵖ M] [IsCentralScalar R M] (x : M) :
    toTrivSqZeroExt (ι R x) = TrivSqZeroExt.inr x

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
[Module Rᵐᵒᵖ M]
[IsCentralScalar R M]
(x : M)

ExteriorAlgebra.toTrivSqZeroExt ((ExteriorAlgebra.ι R) x) = TrivSqZeroExt.inr x


lemma hom_ext {X : C} (S : Sieve X) (hS : S ∈ J X) {T : A}
    {x y : T ⟶ P.obj (Opposite.op X)}
    (h : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (_ : S f), x ≫ P.map f.op = y ≫ P.map f.op) :
    x = y

{J : CategoryTheory.GrothendieckTopology C}

(hP : ∀ ⦃X : C⦄ (E : J.OneHypercover X), H E → Nonempty (CategoryTheory.Limits.IsLimit (E.multifork P)))

(h :
  ∀ ⦃Y : C⦄ (f : Y ⟶ X),
    S.arrows f → CategoryTheory.CategoryStruct.comp x (P.map f.op) = CategoryTheory.CategoryStruct.comp y (P.map f.op))


lemma card_filter (p) [DecidablePred p] (s : Finset α) :
    (filter p s).card = ∑ a ∈ s, ite (p a) 1 0

{α : Type u_3}
(p : α → Prop)
[DecidablePred p]
(s : Finset α)

(Finset.filter p s).card = ∑ a ∈ s, if p a then 1 else 0


theorem norm_eq {f g : PadicSeq p} (h : ∀ k, padicNorm p (f k) = padicNorm p (g k)) :
    f.norm = g.norm

(h : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k))


/--
The discrete condensed object associated to an object of `C` is the constant sheaf at that object.
-/
@[simps!]
noncomputable def Condensed.discrete : C ⥤ Condensed.{u} C

[CategoryTheory.HasWeakSheafify (CategoryTheory.coherentTopology CompHaus) C]

(Condensed.discrete C).obj X =
  (CategoryTheory.presheafToSheaf (CategoryTheory.coherentTopology CompHaus) C).obj
    ((CategoryTheory.Functor.const CompHausᵒᵖ).obj X)


protected theorem le_tsub_of_add_le_left (ha : AddLECancellable a) (h : a + b ≤ c) : b ≤ c - a

{α : Type u_1}
[Preorder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b c : α}
(ha : AddLECancellable a)
(h : a + b ≤ c)


@[simp, norm_cast]
theorem coe_dual (s : NonemptyInterval α) : (dual s : Set αᵒᵈ) = ofDual ⁻¹' s

{α : Type u_1}
[PartialOrder α]
(s : NonemptyInterval α)

↑(NonemptyInterval.dual s) = ⇑OrderDual.ofDual ⁻¹' ↑s


theorem split_dropFun_lastFun {α α' : TypeVec (n + 1)} (f : α ⟹ α') :
    splitFun (dropFun f) (lastFun f) = f

TypeVec.splitFun (TypeVec.dropFun f) (TypeVec.lastFun f) = f


/-- The weighted homogeneous components of a weighted homogeneous polynomial. -/
theorem weightedHomogeneousComponent_of_mem [DecidableEq M] {m n : M}
    {p : MvPolynomial σ R} (h : p ∈ weightedHomogeneousSubmodule R w n) :
    weightedHomogeneousComponent w m p = if m = n then p else 0

(h : p ∈ MvPolynomial.weightedHomogeneousSubmodule R w n)

(MvPolynomial.weightedHomogeneousComponent w m) p = if m = n then p else 0


theorem Ico_subset_Ioo_left (h : a₁ < a₂) : Ico a₂ b ⊆ Ioo a₁ b

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


theorem isRat_inv_neg_one {α} [DivisionRing α] : {a : α} →
    IsInt a (.negOfNat (nat_lit 1)) → IsInt a⁻¹ (.negOfNat (nat_lit 1))

Mathlib.Meta.NormNum.IsInt a (Int.negOfNat 1) → Mathlib.Meta.NormNum.IsInt a⁻¹ (Int.negOfNat 1)


theorem fract_apply (m : E) : fract b m = m - floor b m

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
(b : Basis ι K E)
[FloorRing K]
[Fintype ι]
(m : E)

Zspan.fract b m = m - ↑(Zspan.floor b m)


@[simp]
protected theorem repr_self [DecidableEq ι] (b : OrthonormalBasis ι 𝕜 E) (i : ι) :
    b.repr (b i) = EuclideanSpace.single i (1 : 𝕜)

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
[DecidableEq ι]
(b : OrthonormalBasis ι 𝕜 E)
(i : ι)

b.repr (b i) = EuclideanSpace.single i 1


/-- Extra simp lemma that `dsimp` can use. `simp` will never use this. -/
@[to_additive "Extra simp lemma that `dsimp` can use. `simp` will never use this.",
  simp, nolint simpNF]
theorem mulRight_symm_apply (a : G) : ((Equiv.mulRight a).symm : G → G) = fun x => x * a⁻¹

⇑(Equiv.symm (Equiv.mulRight a)) = fun x => x * a⁻¹


@[simp] theorem equivCongr_symm {δ} (ab : α ≃ β) (cd : γ ≃ δ) :
    (ab.equivCongr cd).symm = ab.symm.equivCongr cd.symm

{α : Sort u}
{β : Sort v}
{γ : Sort w}
{δ : Sort u_1}
(ab : α ≃ β)
(cd : γ ≃ δ)


@[simp]
lemma image_subtype_val_Ici_Ioi {a : α} (b : Ici a) : Subtype.val '' Ioi b = Ioi b.1

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


theorem coeFn_sub (f g : Lp E p μ) : ⇑(f - g) =ᵐ[μ] f - g

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
(f g : ↥(MeasureTheory.Lp E p μ))


@[simp]
theorem neg_modEq_neg : -a ≡ -b [ZMOD n] ↔ a ≡ b [ZMOD n]


/-- The open neighborhoods of a point. See also `Opens` or `nhds`. -/
structure OpenNhdsOf (x : α) extends Opens α where
  /-- The point `x` belongs to every `U : TopologicalSpace.OpenNhdsOf x`. -/
  mem' : x ∈ carrier

{α : Type u_2}
[TopologicalSpace α]
{x : α}
(self : TopologicalSpace.OpenNhdsOf x)


theorem mem_support_cycleOf_iff' (hx : f x ≠ x) [DecidableEq α] [Fintype α] :
    y ∈ support (f.cycleOf x) ↔ SameCycle f x y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}
[DecidableRel f.SameCycle]
(hx : f x ≠ x)
[DecidableEq α]
[Fintype α]

y ∈ (f.cycleOf x).support ↔ f.SameCycle x y


/-- Any two ring homomorphisms from `ℚ` to a semiring are equal. If the codomain is a division ring,
then this lemma follows from `eq_ratCast`. -/
theorem RingHom.ext_rat {R : Type*} [Semiring R] [FunLike F ℚ R] [RingHomClass F ℚ R] (f g : F) :
    f = g

{F : Type u_1}
{R : Type u_5}
[Semiring R]
[FunLike F ℚ R]
[RingHomClass F ℚ R]
(f g : F)


theorem encard_union_add_encard_inter (s t : Set α) :
    (s ∪ t).encard + (s ∩ t).encard = s.encard + t.encard


theorem derivative_neg (f : R[X]) : derivative (-f) = -derivative f

Polynomial.derivative (-f) = -Polynomial.derivative f


@[simp]
theorem isBigOWith_norm_left : IsBigOWith c l (fun x => ‖f' x‖) g ↔ IsBigOWith c l f' g

{α : Type u_1}
{F : Type u_4}
{E' : Type u_6}
[Norm F]
[SeminormedAddCommGroup E']
{c : ℝ}
{g : α → F}
{f' : α → E'}
{l : Filter α}

Asymptotics.IsBigOWith c l (fun x => ‖f' x‖) g ↔ Asymptotics.IsBigOWith c l f' g


@[to_additive (attr := simp)]
theorem Ici_one : Ici (1 : α) = 1


/-- The sine of the angle between two vectors is 1 if and only if the angle is π / 2. -/
theorem sin_eq_one_iff_angle_eq_pi_div_two : sin (angle x y) = 1 ↔ angle x y = π / 2

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

Real.sin (InnerProductGeometry.angle x y) = 1 ↔ InnerProductGeometry.angle x y = π / 2


/-- Given two subgroups `H' ⊆ H`, there exists a left transversal to `H'` inside `H`. -/
@[to_additive "Given two subgroups `H' ⊆ H`, there exists a transversal to `H'` inside `H`"]
lemma exists_left_transversal_of_le {H' H : Subgroup G} (h : H' ≤ H) :
    ∃ S : Set G, S * H' = H ∧ Nat.card S * Nat.card H' = Nat.card H

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

∃ S, S + ↑H' = ↑H ∧ Nat.card ↑S * Nat.card ↥H' = Nat.card ↥H


lemma congr_v {z₁ z₂ : Cochain F G n} (h : z₁ = z₂) (p q : ℤ) (hpq : p + n = q) :
    z₁.v p q hpq = z₂.v p q hpq

{z₁ z₂ : CochainComplex.HomComplex.Cochain F G n}


/-- The **alternating series test** for antitone sequences. -/
theorem Antitone.tendsto_alternating_series_of_tendsto_zero (hfa : Antitone f)
    (hf0 : Tendsto f atTop (𝓝 0)) :
    ∃ l, Tendsto (fun n ↦ ∑ i ∈ range n, (-1) ^ i * f i) atTop (𝓝 l)

(hf0 : Filter.Tendsto f Filter.atTop (𝓝 0))

∃ l, Filter.Tendsto (fun n => ∑ i ∈ Finset.range n, (-1) ^ i * f i) Filter.atTop (𝓝 l)


@[to_additive (attr := simp)]
lemma mem_mulSpan :
    a ∈ mulSpan s ↔ ∃ ε : α → ℤ, (∀ a, ε a = -1 ∨ ε a = 0 ∨ ε a = 1) ∧ ∏ a in s, a ^ ε a = a

{α : Type u_1}
[AddCommGroup α]
[DecidableEq α]
[Fintype α]
{s : Finset α}
{a : α}

a ∈ s.addSpan ↔ ∃ ε, (∀ (a : α), ε a = -1 ∨ ε a = 0 ∨ ε a = 1) ∧ ∑ a ∈ s, ε a • a = a


lemma add_mem {x y} (hx : x ∈ I) (hy : y ∈ I) : x + y ∈ I

{R : Type u_1}
[NonUnitalNonAssocRing R]
(I : TwoSidedIdeal R)
{x y : R}
(hx : x ∈ I)
(hy : y ∈ I)


@[simp] theorem drop_zero (l : List α) : l.drop 0 = l


theorem isLittleO_pow_pow {m n : ℕ} (h : m < n) : (fun x : 𝕜 => x ^ n) =o[𝓝 0] fun x => x ^ m

{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
{m n : ℕ}
(h : m < n)


/-- If `f : X → Y` is Lipschitz in a neighborhood of each point `x : X`, then the Hausdorff
dimension of `range f` is at most the Hausdorff dimension of `X`. -/
theorem dimH_range_le_of_locally_lipschitzOn [SecondCountableTopology X] {f : X → Y}
    (hf : ∀ x : X, ∃ C : ℝ≥0, ∃ s ∈ 𝓝 x, LipschitzOnWith C f s) :
    dimH (range f) ≤ dimH (univ : Set X)

(hf : ∀ (x : X), ∃ C, ∃ s ∈ 𝓝 x, LipschitzOnWith C f s)


theorem hasFiniteIntegral_iff_edist (f : α → β) :
    HasFiniteIntegral f μ ↔ (∫⁻ a, edist (f a) 0 ∂μ) < ∞

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

MeasureTheory.HasFiniteIntegral f μ ↔ ∫⁻ (a : α), edist (f a) 0 ∂μ < ⊤


lemma Hom.toAlgHom_monomial (f : Generators.Hom P P') (v r) :
    f.toAlgHom (monomial v r) = r • v.prod (f.val · ^ ·)

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
{R' : Type u_1}
{S' : Type u_2}
[CommRing R']
[CommRing S']
[Algebra R' S']
{P' : Algebra.Generators R' S'}
[Algebra R R']
[Algebra S S']
(f : P.Hom P')
(v : P.vars →₀ ℕ)
(r : R)

f.toAlgHom ((MvPolynomial.monomial v) r) = r • v.prod fun x x_1 => f.val x ^ x_1


theorem mk.inj_left {α β : Type*} (a : α) : Function.Injective (Prod.mk a : β → α × β)


theorem eq_bot_iff_forall_lt (x : EReal) : x = ⊥ ↔ ∀ y : ℝ, x < (y : EReal)


theorem hasTrivialRadical_of_no_solvable_ideals (h : ∀ I : LieIdeal R L, IsSolvable R I → I = ⊥) :
    HasTrivialRadical R L

(h : ∀ (I : LieIdeal R L), LieAlgebra.IsSolvable R ↥↑I → I = ⊥)


/-- The order of the `0` power series is infinite. -/
@[simp]
theorem order_zero : order (0 : R⟦X⟧) = ⊤


theorem le_sup_inf : ∀ {x y z : α}, (x ⊔ y) ⊓ (x ⊔ z) ≤ x ⊔ y ⊓ z

{α : Type u}
[DistribLattice α]
{x y z : α}


protected theorem bijective (h : α ≃ᵤ β) : Function.Bijective h

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


@[simp]
theorem matches'_add (P Q : RegularExpression α) : (P + Q).matches' = P.matches' + Q.matches'

{α : Type u_1}
(P Q : RegularExpression α)


/-- A typeclass saying that `p : G × G ↦ p.1 - p.2` is a continuous function. This property
automatically holds for topological additive groups but it also holds, e.g., for `ℝ≥0`. -/
class ContinuousSub (G : Type*) [TopologicalSpace G] [Sub G] : Prop where
  continuous_sub : Continuous fun p : G × G => p.1 - p.2

{G : Type u_1}
[TopologicalSpace G]
[Sub G]
[self : ContinuousSub G]


lemma unit_map_one {X Y : Cᵒᵖ} (f : X ⟶ Y) : (unit R).map f (1 : R.obj X) = (1 : R.obj Y)

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

((PresheafOfModules.unit R).map f) 1 = 1


theorem IsLUB.biUnion_Iic_eq_Iic (a_lub : IsLUB s a) (a_mem : a ∈ s) : ⋃ x ∈ s, Iic x = Iic a

{α : Type v}
[LinearOrder α]
{s : Set α}
{a : α}
(a_lub : IsLUB s a)
(a_mem : a ∈ s)


@[to_additive min_neg_neg]
theorem min_inv_inv' (a b : α) : min a⁻¹ b⁻¹ = (max a b)⁻¹

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


theorem superFactorial_four_mul (n : ℕ) :
    sf (4 * n) = ((∏ i ∈ range (2 * n), (2 * i + 1) !) * 2 ^ n) ^ 2 * (2 * n) !

(4 * n).superFactorial = ((∏ i ∈ Finset.range (2 * n), (2 * i + 1).factorial) * 2 ^ n) ^ 2 * (2 * n).factorial


@[reassoc (attr := simp)]
theorem inv_naturality {U V : (Opens X)ᵒᵖ} (i : U ⟶ V) :
    X.presheaf.map i ≫ H.invApp (unop V) =
      H.invApp (unop U) ≫ Y.presheaf.map (opensFunctor f |>.op.map i)

{X Y : AlgebraicGeometry.LocallyRingedSpace}

[H : AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion f]

{U V : (TopologicalSpace.Opens ↑X.toTopCat)ᵒᵖ}

X.presheaf.map i ≫ AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.invApp f (Opposite.unop V) =
  AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.invApp f (Opposite.unop U) ≫
    Y.presheaf.map ((AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.opensFunctor f).op.map i)


@[simp, norm_cast]
theorem coe_sup_interval [Lattice α] (s t : NonemptyInterval α) :
    (↑(s ⊔ t) : Interval α) = ↑s ⊔ ↑t

{α : Type u_1}
[Lattice α]
(s t : NonemptyInterval α)


theorem mono_iff_cancel_zero {Q R : C} (f : Q ⟶ R) :
    Mono f ↔ ∀ (P : C) (g : P ⟶ Q), g ≫ f = 0 → g = 0

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Preadditive C]
{Q R : C}
(f : Q ⟶ R)

CategoryTheory.Mono f ↔ ∀ (P : C) (g : P ⟶ Q), g ≫ f = 0 → g = 0


protected theorem StrictMono.compares (hf : StrictMono f) {a b : α} {o : Ordering} :
    o.Compares (f a) (f b) ↔ o.Compares a b

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
(hf : StrictMono f)
{a b : α}
{o : Ordering}


/-- The constant functor `Jᵒᵖ ⥤ Cᵒᵖ` sending everything to `op X`
is (naturally isomorphic to) the opposite of the constant functor `J ⥤ C` sending everything to `X`.
-/
@[simps]
def opObjOp (X : C) : (const Jᵒᵖ).obj (op X) ≅ ((const J).obj X).op

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₂}
[CategoryTheory.Category.{v₂, u₂} C]
(X : C)
(j : Jᵒᵖ)

(CategoryTheory.Functor.const.opObjOp X).hom.app j = 𝟙 (((CategoryTheory.Functor.const Jᵒᵖ).obj (Opposite.op X)).obj j)


@[simp]
theorem polynomial_smul_apply' [CommSemiring R'] [Semiring S'] [Algebra R' S'] [SMul S' T']
    (p : R'[X]) (f : S' → T') (x : S') : (p • f) x = aeval x p • f x

(R' : Type u)
(S' : Type v)
(T' : Type w)
[CommSemiring R']
[Semiring S']
[Algebra R' S']
[SMul S' T']
(p : R'[X])
(f : S' → T')
(x : S')

(p • f) x = (Polynomial.aeval x) p • f x


theorem ContDiff.restrict_scalars (h : ContDiff 𝕜' n f) : ContDiff 𝕜 n f

(𝕜 : Type u_1)
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{n : ℕ∞}
{𝕜' : Type u_3}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormedSpace 𝕜' E]
[IsScalarTower 𝕜 𝕜' E]
[NormedSpace 𝕜' F]
[IsScalarTower 𝕜 𝕜' F]
(h : ContDiff 𝕜' n f)


@[simp]
theorem liftAddHom_apply [AddCommMonoid M] [AddCommMonoid N] (F : α → M →+ N) (f : α →₀ M) :
    (liftAddHom (α := α) (M := M) (N := N)) F f = f.sum fun x => F x

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
[AddCommMonoid M]
[AddCommMonoid N]
(F : α → M →+ N)
(f : α →₀ M)

(Finsupp.liftAddHom F) f = f.sum fun x => ⇑(F x)


@[simp] lemma add_left_inj (μ ν₁ ν₂ : Measure α) [SigmaFinite μ] :
    ν₁ + μ = ν₂ + μ ↔ ν₁ = ν₂

{α : Type u_1}
{m0 : MeasurableSpace α}
(μ ν₁ ν₂ : MeasureTheory.Measure α)
[MeasureTheory.SigmaFinite μ]

ν₁ + μ = ν₂ + μ ↔ ν₁ = ν₂


theorem range_const_subset {c : α} : (range fun _ : ι => c) ⊆ {c}


/-- The sum of two upper semicontinuous functions is upper semicontinuous. Formulated with an
explicit continuity assumption on addition, for application to `EReal`. The unprimed version of
the lemma uses `[ContinuousAdd]`. -/
theorem UpperSemicontinuousOn.add' {f g : α → γ} (hf : UpperSemicontinuousOn f s)
    (hg : UpperSemicontinuousOn g s)
    (hcont : ∀ x ∈ s, ContinuousAt (fun p : γ × γ => p.1 + p.2) (f x, g x)) :
    UpperSemicontinuousOn (fun z => f z + g z) s

(hcont : ∀ x ∈ s, ContinuousAt (fun p => p.1 + p.2) (f x, g x))


theorem relabel_id (t : L.Term α) : t.relabel id = t

{L : FirstOrder.Language}
{α : Type u'}
(t : L.Term α)

FirstOrder.Language.Term.relabel id t = t


lemma le_def {s t : Colex α} :
    s ≤ t ↔ ∀ ⦃a⦄, a ∈ ofColex s → a ∉ ofColex t → ∃ b, b ∈ ofColex t ∧ b ∉ ofColex s ∧ a ≤ b

{α : Type u_1}
[PartialOrder α]
{s t : Finset.Colex α}

s ≤ t ↔ ∀ ⦃a : α⦄, a ∈ s.ofColex → a ∉ t.ofColex → ∃ b ∈ t.ofColex, b ∉ s.ofColex ∧ a ≤ b


@[fun_prop]
theorem Continuous.div₀ (hf : Continuous f) (hg : Continuous g) (h₀ : ∀ x, g x ≠ 0) :
    Continuous (fun x => f x / g x)

{α : Type u_1}
{G₀ : Type u_3}
[GroupWithZero G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
[ContinuousMul G₀]
{f g : α → G₀}
[TopologicalSpace α]
(hf : Continuous f)
(hg : Continuous g)
(h₀ : ∀ (x : α), g x ≠ 0)


@[simp]
theorem mem_rcomap' (r : Rel α β) (l : Filter β) (s : Set α) :
    s ∈ l.rcomap' r ↔ ∃ t ∈ l, r.preimage t ⊆ s

{α : Type u}
{β : Type v}
(r : Rel α β)
(l : Filter β)
(s : Set α)

s ∈ Filter.rcomap' r l ↔ ∃ t ∈ l, r.preimage t ⊆ s


@[to_additive (attr := simp)] lemma mabs_inv (a : α) : |a⁻¹|ₘ = |a|ₘ

{α : Type u_1}
[Lattice α]
[Group α]
(a : α)


/-- A version of the global `continuous_inv` suitable for dot notation. -/
@[to_additive "A version of the global `continuous_neg` suitable for dot notation."]
theorem continuous_inv' (g : GroupTopology α) :
    haveI := g.toTopologicalSpace
    Continuous (Inv.inv : α → α)

{α : Type u}
[Group α]
(g : GroupTopology α)


theorem gronwallBound_ε0 (δ K x : ℝ) : gronwallBound δ K 0 x = δ * exp (K * x)

gronwallBound δ K 0 x = δ * rexp (K * x)


@[simp, norm_cast]
theorem coe_one : ((1 : RatFunc F) : LaurentSeries F) = 1


/-- Precomposition with a linear isometry preserves the operator norm. -/
theorem opNorm_comp_linearIsometryEquiv (f : F →SL[σ₂₃] G) (g : F' ≃ₛₗᵢ[σ₂'] F) :
    ‖f.comp g.toLinearIsometry.toContinuousLinearMap‖ = ‖f‖

{𝕜₂ : Type u_2}
{𝕜₃ : Type u_3}
{F : Type u_6}
{G : Type u_8}
[NormedAddCommGroup F]
[NormedAddCommGroup G]
[NontriviallyNormedField 𝕜₂]
[NontriviallyNormedField 𝕜₃]
[NormedSpace 𝕜₂ F]
[NormedSpace 𝕜₃ G]
{σ₂₃ : 𝕜₂ →+* 𝕜₃}
{𝕜₂' : Type u_11}
[NontriviallyNormedField 𝕜₂']
{F' : Type u_12}
[NormedAddCommGroup F']
[NormedSpace 𝕜₂' F']
{σ₂' : 𝕜₂' →+* 𝕜₂}
{σ₂'' : 𝕜₂ →+* 𝕜₂'}
{σ₂₃' : 𝕜₂' →+* 𝕜₃}
[RingHomInvPair σ₂' σ₂'']
[RingHomInvPair σ₂'' σ₂']
[RingHomCompTriple σ₂' σ₂₃ σ₂₃']
[RingHomCompTriple σ₂'' σ₂₃' σ₂₃]
[RingHomIsometric σ₂₃]
[RingHomIsometric σ₂']
[RingHomIsometric σ₂'']
[RingHomIsometric σ₂₃']
(f : F →SL[σ₂₃] G)
(g : F' ≃ₛₗᵢ[σ₂'] F)


theorem mk_surjective : Function.Surjective (@mk _ _ _ _ _ p)

{R : Type u_1}
{M : Type u_2}
[Ring R]
[AddCommGroup M]
[Module R M]
(p : Submodule R M)


theorem bounded_ge_inter_gt [LinearOrder α] (a : α) :
    Bounded (· ≥ ·) (s ∩ { b | b < a }) ↔ Bounded (· ≥ ·) s

{α : Type u_1}
{s : Set α}
[LinearOrder α]
(a : α)

Set.Bounded (fun x x_1 => x ≥ x_1) (s ∩ {b | b < a}) ↔ Set.Bounded (fun x x_1 => x ≥ x_1) s


@[simp]
lemma equivProdNatSmoothNumbers_apply' {p : ℕ} (hp : p.Prime) (x : ℕ × p.smoothNumbers) :
    equivProdNatSmoothNumbers hp x = p ^ x.1 * x.2

{p : ℕ}
(hp : Nat.Prime p)
(x : ℕ × ↑p.smoothNumbers)

↑((Nat.equivProdNatSmoothNumbers hp) x) = p ^ x.1 * ↑x.2


@[to_additive (attr := simp)]
theorem unop_bot : (⊥ : Subgroup Gᵐᵒᵖ).unop = ⊥


@[to_additive (attr := simp) coe_prodComm]
theorem coe_prodComm : ⇑(prodComm : M × N ≃* N × M) = Prod.swap

{M : Type u_5}
{N : Type u_6}
[MulOneClass M]
[MulOneClass N]


lemma factor_δ_spec {m n : ℕ} (f : ([m] : SimplexCategory) ⟶ [n+1]) (j : Fin (n+2))
    (hj : ∀ (k : Fin (m+1)), f.toOrderHom k ≠ j) :
    factor_δ f j ≫ δ j = f

(f : SimplexCategory.mk m ⟶ SimplexCategory.mk (n + 1))

(hj : ∀ (k : Fin (m + 1)), (SimplexCategory.Hom.toOrderHom f) k ≠ j)

SimplexCategory.factor_δ f j ≫ SimplexCategory.δ j = f


@[simp]
theorem exp_two_pi_mul_I : exp (2 * π * I) = 1

Complex.exp (2 * ↑Real.pi * Complex.I) = 1


theorem dedup_subset : ∀ l : List α, dedup l ⊆ l

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


@[to_additive]
protected theorem Inseparable.zpow {G : Type*} [DivInvMonoid G] [TopologicalSpace G]
    [ContinuousMul G] [ContinuousInv G] {x y : G} (h : Inseparable x y) (m : ℤ) :
    Inseparable (x ^ m) (y ^ m)

{G : Type u_1}
[DivInvMonoid G]
[TopologicalSpace G]
[ContinuousMul G]
[ContinuousInv G]
{x y : G}
(h : Inseparable x y)
(m : ℤ)


/-- Tensor product of two bimodule objects as a bimodule object. -/
@[simps]
noncomputable def tensorBimod {X Y Z : Mon_ C} (M : Bimod X Y) (N : Bimod Y Z) : Bimod X Z

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (CategoryTheory.MonoidalCategory.tensorLeft X)]

[(X : C) →
    CategoryTheory.Limits.PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁}
      (CategoryTheory.MonoidalCategory.tensorRight X)]

(M.tensorBimod N).X = Bimod.TensorBimod.X M N


theorem den_mul_self_eq_num (I : FractionalIdeal S P) :
    I.den • (I : Submodule R P) = Submodule.map (Algebra.linearMap R P) I.num

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

I.den • ↑I = Submodule.map (Algebra.linearMap R P) I.num


theorem IsConj.conjugatesOf_eq {a b : α} (ab : IsConj a b) : conjugatesOf a = conjugatesOf b

{α : Type u}
[Monoid α]
{a b : α}
(ab : IsConj a b)


@[simp]
theorem Coheyting.boundary_eq_bot (a : α) : ∂ a = ⊥

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


theorem eLpNorm_smul_measure_of_ne_top {p : ℝ≥0∞} (hp_ne_top : p ≠ ∞) {f : α → F} (c : ℝ≥0∞) :
    eLpNorm f p (c • μ) = c ^ (1 / p).toReal • eLpNorm f p μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{p : ℝ≥0∞}
(hp_ne_top : p ≠ ⊤)
{f : α → F}
(c : ℝ≥0∞)

MeasureTheory.eLpNorm f p (c • μ) = c ^ (1 / p).toReal • MeasureTheory.eLpNorm f p μ


@[to_additive (attr := fun_prop) ContinuousOn.norm]
theorem ContinuousOn.norm' {s : Set α} (h : ContinuousOn f s) : ContinuousOn (fun x => ‖f x‖) s

{α : Type u_3}
{E : Type u_6}
[SeminormedGroup E]
[TopologicalSpace α]
{f : α → E}
{s : Set α}
(h : ContinuousOn f s)


theorem mem_iInf {ι : Sort*} {S : ι → NonUnitalSubring R} {x : R} :
    (x ∈ ⨅ i, S i) ↔ ∀ i, x ∈ S i

{R : Type u}
[NonUnitalNonAssocRing R]
{ι : Sort u_2}
{S : ι → NonUnitalSubring R}
{x : R}


/-- If a function `f` is differentiable in a convex open set and continuous on its closure, and its
derivative converges to a limit `f'` at a point on the boundary, then `f` is differentiable there
with derivative `f'`. -/
theorem hasFDerivWithinAt_closure_of_tendsto_fderiv {f : E → F} {s : Set E} {x : E} {f' : E →L[ℝ] F}
    (f_diff : DifferentiableOn ℝ f s) (s_conv : Convex ℝ s) (s_open : IsOpen s)
    (f_cont : ∀ y ∈ closure s, ContinuousWithinAt f s y)
    (h : Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f')) :
    HasFDerivWithinAt f f' (closure s) x

(h : Filter.Tendsto (fun y => fderiv ℝ f y) (𝓝[s] x) (𝓝 f'))


lemma LocalRing.finrank_CotangentSpace_eq_one_iff [IsNoetherianRing R] [LocalRing R] [IsDomain R] :
    finrank (ResidueField R) (CotangentSpace R) = 1 ↔ DiscreteValuationRing R

{R : Type u_1}
[CommRing R]
[IsNoetherianRing R]
[LocalRing R]
[IsDomain R]

FiniteDimensional.finrank (LocalRing.ResidueField R) (LocalRing.CotangentSpace R) = 1 ↔ DiscreteValuationRing R


protected theorem Nodup.filterMap {f : α → Option β} (h : ∀ a a' b, b ∈ f a → b ∈ f a' → a = a') :
    Nodup l → Nodup (filterMap f l)

(h : ∀ (a a' : α), ∀ b ∈ f a, b ∈ f a' → a = a')


theorem HasFDerivAtFilter.const_add (hf : HasFDerivAtFilter f f' x L) (c : F) :
    HasFDerivAtFilter (fun y => c + f y) f' x L

{𝕜 : 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}
{L : Filter E}
(hf : HasFDerivAtFilter f f' x L)
(c : F)


@[to_additive]
lemma isCyclic_iff_exists_ofOrder_eq_natCard [Finite α] :
    IsCyclic α ↔ ∃ g : α, orderOf g = Nat.card α

IsCyclic α ↔ ∃ g, orderOf g = Nat.card α


/-- Symmetric version of **Fubini's Theorem**: For integrable functions on `α × β`,
  the Bochner integral of `f` is equal to the iterated Bochner integral.
  This version has the integrals on the right-hand side in the other order. -/
theorem integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.prod ν)) :
    ∫ z, f z ∂μ.prod ν = ∫ y, ∫ x, f (x, y) ∂μ ∂ν

(hf : MeasureTheory.Integrable f (μ.prod ν))

∫ (z : α × β), f z ∂μ.prod ν = ∫ (y : β), ∫ (x : α), f (x, y) ∂μ ∂ν


theorem cpow_conj (x : ℂ) (n : ℂ) (hx : x.arg ≠ π) : x ^ conj n = conj (conj x ^ n)

x ^ (starRingEnd ℂ) n = (starRingEnd ℂ) ((starRingEnd ℂ) x ^ n)


/-- To construct an isomorphism between forks,
it suffices to give an isomorphism between the cone points
and check that it commutes with the `ι` morphisms.
-/
@[simps]
def Fork.ext {s t : Fork f g} (i : s.pt ≅ t.pt) (w : i.hom ≫ t.ι = s.ι := by aesop_cat) :
    s ≅ t

(w : CategoryTheory.CategoryStruct.comp i.hom t.ι = s.ι := by aesop_cat)

(CategoryTheory.Limits.Fork.ext i w).hom = CategoryTheory.Limits.Fork.mkHom i.hom w


@[simp]
theorem coe_inf : ⇑(f ⊓ g) = ⇑f ⊓ ⇑g

{α : Type u_2}
{β : Type u_3}
[Bot α]
[SemilatticeInf β]
[OrderBot β]
(f g : BotHom α β)


theorem isCoprime_X_sub_C_of_isUnit_sub {R} [CommRing R] {a b : R} (h : IsUnit (a - b)) :
    IsCoprime (X - C a) (X - C b)

{R : Type u_1}
[CommRing R]
{a b : R}
(h : IsUnit (a - b))

IsCoprime (Polynomial.X - Polynomial.C a) (Polynomial.X - Polynomial.C b)


@[simp]
theorem char_tensor' (V W : FDRep k G) :
    character (Action.FunctorCategoryEquivalence.inverse.obj
    (Action.FunctorCategoryEquivalence.functor.obj V ⊗
     Action.FunctorCategoryEquivalence.functor.obj W)) = V.character * W.character

{k : Type u}
[Field k]
{G : Type u}
[Monoid G]
(V W : FDRep k G)

FDRep.character
    (Action.FunctorCategoryEquivalence.inverse.obj
      (Action.FunctorCategoryEquivalence.functor.obj V ⊗ Action.FunctorCategoryEquivalence.functor.obj W)) =
  V.character * W.character


lemma PosSMulReflectLE_iff_posSMulReflectLT : PosSMulReflectLE α β ↔ PosSMulReflectLT α β

{α : Type u_1}
{β : Type u_2}
[Semiring α]
[AddCommGroup β]
[Module α β]
[NoZeroSMulDivisors α β]
[PartialOrder α]
[PartialOrder β]


theorem blsub_le {o : Ordinal} {f : ∀ b < o, Ordinal} {a} : (∀ i h, f i h < a) → blsub o f ≤ a

{f : (b : Ordinal.{u_4}) → b < o → Ordinal.{max u_4 u_5}}

(∀ (i : Ordinal.{u_4}) (h : i < o), f i h < a) → o.blsub f ≤ a


theorem Real.nndist_eq (x y : ℝ) : nndist x y = Real.nnabs (x - y)


/-- When `S₁.g` and `S₂.g` are zero and we have chosen colimit cokernel coforks `c₁` and `c₂`
for `S₁.f` and `S₂.f` respectively, the action on left homology of a morphism `φ : S₁ ⟶ S₂` of
short complexes is given by the unique morphism `f : c₁.pt ⟶ c₂.pt` such that
`φ.τ₂ ≫ c₂.π = c₁.π ≫ f`. -/
@[simps]
def ofIsColimitCokernelCofork (φ : S₁ ⟶ S₂)
    (hg₁ : S₁.g = 0) (c₁ : CokernelCofork S₁.f) (hc₁ : IsColimit c₁)
    (hg₂ : S₂.g = 0) (c₂ : CokernelCofork S₂.f) (hc₂ : IsColimit c₂) (f : c₁.pt ⟶ c₂.pt)
    (comm : φ.τ₂ ≫ c₂.π = c₁.π ≫ f) :
    LeftHomologyMapData φ (LeftHomologyData.ofIsColimitCokernelCofork S₁ hg₁ c₁ hc₁)
      (LeftHomologyData.ofIsColimitCokernelCofork S₂ hg₂ c₂ hc₂)

(c₁ : CategoryTheory.Limits.CokernelCofork S₁.f)

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

(c₂ : CategoryTheory.Limits.CokernelCofork S₂.f)

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

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

(CategoryTheory.ShortComplex.LeftHomologyMapData.ofIsColimitCokernelCofork φ hg₁ c₁ hc₁ hg₂ c₂ hc₂ f comm).φH = f


protected theorem liftBeta {α : Sort u} {r : α → α → Prop} {β : Sort v}
    (f : α → β)
    (c : (a b : α) → r a b → f a = f b)
    (a : α)
    : lift f c (Quot.mk r a) = f a

{α : Sort u}
{r : α → α → Prop}
{β : Sort v}
(f : α → β)
(c : ∀ (a b : α), r a b → f a = f b)
(a : α)


/-- **Steinitz theorem**: an algebraic extension `E` of `F` has a
  primitive element (i.e. there is an `α ∈ E` such that `F⟮α⟯ = (⊤ : Subalgebra F E)`)
  if and only if there exist only finitely many intermediate fields between `E` and `F`. -/
theorem exists_primitive_element_iff_finite_intermediateField :
    (Algebra.IsAlgebraic F E ∧ ∃ α : E, F⟮α⟯ = ⊤) ↔ Finite (IntermediateField F E)

(F : Type u_1)
(E : Type u_2)
[Field F]
[Field E]
[Algebra F E]

(Algebra.IsAlgebraic F E ∧ ∃ α, F⟮α⟯ = ⊤) ↔ Finite (IntermediateField F E)


theorem sub_mem_iff_left (hy : y ∈ p) : x - y ∈ p ↔ x ∈ p

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
{module_M : Module R M}
(p : Submodule R M)
{x y : M}
(hy : y ∈ p)


@[to_additive single_lt_sum]
theorem single_lt_prod' {i j : ι} (hij : j ≠ i) (hi : i ∈ s) (hj : j ∈ s) (hlt : 1 < f j)
    (hle : ∀ k ∈ s, k ≠ i → 1 ≤ f k) : f i < ∏ k ∈ s, f k

{ι : Type u_1}
{M : Type u_4}
[OrderedCancelAddCommMonoid M]
{f : ι → M}
{s : Finset ι}
{i j : ι}
(hij : j ≠ i)
(hi : i ∈ s)
(hj : j ∈ s)
(hlt : 0 < f j)
(hle : ∀ k ∈ s, k ≠ i → 0 ≤ f k)


theorem absolutelyContinuous_of_eq (h : μ = ν) : μ ≪ ν

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ ν : MeasureTheory.Measure α}
(h : μ = ν)


@[simp]
theorem rpow_zero (x : ℝ) : x ^ (0 : ℝ) = 1


protected theorem mul_assoc (φ₁ φ₂ φ₃ : MvPowerSeries σ R) : φ₁ * φ₂ * φ₃ = φ₁ * (φ₂ * φ₃)

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
(φ₁ φ₂ φ₃ : MvPowerSeries σ R)

φ₁ * φ₂ * φ₃ = φ₁ * (φ₂ * φ₃)


@[simp]
theorem coe_restrictScalarsL : (restrictScalarsL 𝕜 E Fₗ 𝕜' 𝕜'' : (E →L[𝕜] Fₗ) →ₗ[𝕜''] E →L[𝕜'] Fₗ) =
    restrictScalarsₗ 𝕜 E Fₗ 𝕜' 𝕜''

{𝕜 : Type u_1}
{E : Type u_4}
{Fₗ : Type u_7}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup Fₗ]
[NontriviallyNormedField 𝕜]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 Fₗ]
{𝕜' : Type u_11}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜' 𝕜]
[NormedSpace 𝕜' E]
[IsScalarTower 𝕜' 𝕜 E]
[NormedSpace 𝕜' Fₗ]
[IsScalarTower 𝕜' 𝕜 Fₗ]
{𝕜'' : Type u_12}
[Ring 𝕜'']
[Module 𝕜'' Fₗ]
[ContinuousConstSMul 𝕜'' Fₗ]
[SMulCommClass 𝕜 𝕜'' Fₗ]
[SMulCommClass 𝕜' 𝕜'' Fₗ]

↑(ContinuousLinearMap.restrictScalarsL 𝕜 E Fₗ 𝕜' 𝕜'') = ContinuousLinearMap.restrictScalarsₗ 𝕜 E Fₗ 𝕜' 𝕜''


@[simp]
theorem coe_substructureReduct {S : L'.Substructure M} : (φ.substructureReduct S : Set M) = ↑S

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{L' : FirstOrder.Language}
[L'.Structure M]
(φ : L →ᴸ L')
[φ.IsExpansionOn M]
{S : L'.Substructure M}


/-- A **corner** of a set `A` in an abelian group is a triple of points of the form
`(x, y), (x + d, y), (x, y + d)`. It is **nontrivial** if `d ≠ 0`.

Here we define it as triples `(x₁, y₁), (x₂, y₁), (x₁, y₂)` where `x₁ + y₂ = x₂ + y₁` in order for
the definition to make sense in commutative monoids, the motivating example being `ℕ`. -/
@[mk_iff]
structure IsCorner (A : Set (G × G)) (x₁ y₁ x₂ y₂ : G) : Prop where
  fst_fst_mem : (x₁, y₁) ∈ A
  fst_snd_mem : (x₁, y₂) ∈ A
  snd_fst_mem : (x₂, y₁) ∈ A
  add_eq_add : x₁ + y₂ = x₂ + y₁

{G : Type u_1}
[AddCommMonoid G]
{A : Set (G × G)}
{x₁ y₁ x₂ y₂ : G}
(self : IsCorner A x₁ y₁ x₂ y₂)