/-- Arithmetic progressions can be pushed forward along bijective 2-Freiman homs. -/
@[to_additive "Arithmetic progressions can be pushed forward along bijective 2-Freiman homs."]
lemma IsMulFreimanHom.mulRothNumber_mono (hf : IsMulFreimanHom 2 A B f) (hf' : Set.BijOn f A B) :
    mulRothNumber B ≤ mulRothNumber A

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[CommMonoid α]
[CommMonoid β]
[DecidableEq β]
{A : Finset α}
{B : Finset β}
{f : α → β}
(hf : IsMulFreimanHom 2 (↑A) (↑B) f)
(hf' : Set.BijOn f ↑A ↑B)


@[simp]
theorem image.map_id [HasImageMap (𝟙 f)] : image.map (𝟙 f) = 𝟙 (image f.hom)

CategoryTheory.Limits.image.map (𝟙 f) = 𝟙 (CategoryTheory.Limits.image f.hom)


@[to_additive]
theorem mulIndicator_div (s : Set α) (f g : α → G) :
    (mulIndicator s fun a => f a / g a) = fun a => mulIndicator s f a / mulIndicator s g a

{α : Type u_1}
{G : Type u_6}
[Group G]
(s : Set α)
(f g : α → G)

(s.mulIndicator fun a => f a / g a) = fun a => s.mulIndicator f a / s.mulIndicator g a


theorem card_range_of_injective [Fintype α] {f : α → β} (hf : Injective f) [Fintype (range f)] :
    Fintype.card (range f) = Fintype.card α

{α : Type u}
{β : Type v}
[Fintype α]
{f : α → β}
(hf : Function.Injective f)
[Fintype ↑(Set.range f)]

Fintype.card ↑(Set.range f) = Fintype.card α


@[to_additive]
theorem Nonempty.mul : s.Nonempty → t.Nonempty → (s * t).Nonempty

s.Nonempty → t.Nonempty → (s + t).Nonempty


/-- Right translation preserves concavity. -/
theorem ConcaveOn.translate_right (hf : ConcaveOn 𝕜 s f) (c : E) :
    ConcaveOn 𝕜 ((fun z => c + z) ⁻¹' s) (f ∘ fun z => c + z)

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


lemma numeric_option_mul_option (ih : ∀ a, ArgsRel a (Args.P1 x y) → P124 a) (hx : IsOption x' x)
    (hy : IsOption y' y) : (x' * y').Numeric

(ih :
  ∀ (a : Surreal.Multiplication.Args),
    Surreal.Multiplication.ArgsRel a (Surreal.Multiplication.Args.P1 x y) → Surreal.Multiplication.P124 a)


@[norm_cast, simp]
theorem coe_add (f g : P →ᴬ[R] W) : ⇑(f + g) = f + g

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
[TopologicalSpace W]
[TopologicalAddGroup W]
(f g : P →ᴬ[R] W)


theorem Icc_ssubset_Icc_right (hI : a₂ ≤ b₂) (ha : a₂ ≤ a₁) (hb : b₁ < b₂) :
    Icc a₁ b₁ ⊂ Icc a₂ b₂

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
{a₁ a₂ b₁ b₂ : α}
(hI : a₂ ≤ b₂)
(ha : a₂ ≤ a₁)
(hb : b₁ < b₂)


protected theorem sub_eq_zero_of_le {n m : Nat} (h : n ≤ m) : n - m = 0


theorem preimage_range (i j : D.J) : 𝖣.ι j ⁻¹' Set.range (𝖣.ι i) = Set.range (D.f j i)

⇑(D.ι j) ⁻¹' Set.range ⇑(D.ι i) = Set.range ⇑(D.f j i)


protected theorem Monotone.Ioo (hf : Monotone f) (hg : Antitone g) :
    Antitone fun x => Ioo (f x) (g x)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{f g : α → β}
(hf : Monotone f)
(hg : Antitone g)


@[simp]
theorem codisjoint_hnot_hnot_right_iff : Codisjoint a (￢￢b) ↔ Codisjoint a b

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


theorem Certificate.of_combineHyps (ctx : Context) (c : PolyCnstr) (cs : Certificate) (h : (combineHyps c cs).denote ctx → False) : c.denote ctx → cs.denote ctx

(h : Nat.Linear.PolyCnstr.denote ctx (Nat.Linear.Certificate.combineHyps c cs) → False)

Nat.Linear.PolyCnstr.denote ctx c → Nat.Linear.Certificate.denote ctx cs


/-- If a word reduces to another word, then they have a common maximal reduction. -/
@[to_additive "If a word reduces to another word, then they have a common maximal reduction."]
theorem reduce.eq_of_red (H : Red L₁ L₂) : reduce L₁ = reduce L₂

{α : Type u}
{L₁ L₂ : List (α × Bool)}
[DecidableEq α]
(H : FreeGroup.Red L₁ L₂)

FreeGroup.reduce L₁ = FreeGroup.reduce L₂


private lemma exists_cube_associated :
    (∃ X, Associated (X ^ 3) S.x) ∧ (∃ Y, Associated (Y ^ 3) S.y) ∧
      ∃ Z, Associated (Z ^ 3) S.z

(S : FermatLastTheoremForThreeGen.Solution hζ)

(∃ X, Associated (X ^ 3) (FermatLastTheoremForThreeGen.Solution.x S)) ∧
  (∃ Y, Associated (Y ^ 3) (FermatLastTheoremForThreeGen.Solution.y S)) ∧
    ∃ Z, Associated (Z ^ 3) (FermatLastTheoremForThreeGen.Solution.z S)


@[simp]
theorem associator_hom_apply {X Y Z : Type u} {x : X} {y : Y} {z : Z} :
    ((α_ X Y Z).hom : (X ⊗ Y) ⊗ Z → X ⊗ Y ⊗ Z) ((x, y), z) = (x, (y, z))


theorem restrict_restriction (M : Matroid α) (R : Set α) (hR : R ⊆ M.E := by aesop_mat) :
    M ↾ R ≤r M

{α : Type u_1}
(M : Matroid α)
(R : Set α)
(hR : R ⊆ M.E := by aesop_mat)


theorem vsub_iUnion₂ (s : Set β) (t : ∀ i, κ i → Set β) :
    (s -ᵥ ⋃ (i) (j), t i j) = ⋃ (i) (j), s -ᵥ t i j

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

s -ᵥ ⋃ i, ⋃ j, t i j = ⋃ i, ⋃ j, s -ᵥ t i j


@[simp]
theorem toFinset_range [DecidableEq α] [Fintype β] (f : β → α) [Fintype (Set.range f)] :
    (Set.range f).toFinset = Finset.univ.image f

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[Fintype β]
(f : β → α)
[Fintype ↑(Set.range f)]

(Set.range f).toFinset = Finset.image f Finset.univ


@[to_additive sum_fiberwise_le_sum_of_sum_fiber_nonneg]
theorem prod_fiberwise_le_prod_of_one_le_prod_fiber' {t : Finset ι'} {g : ι → ι'} {f : ι → N}
    (h : ∀ y ∉ t, (1 : N) ≤ ∏ x ∈ s.filter fun x ↦ g x = y, f x) :
    (∏ y ∈ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x) ≤ ∏ x ∈ s, f x

(h : ∀ y ∉ t, 1 ≤ ∏ x ∈ Finset.filter (fun x => g x = y) s, f x)

∏ y ∈ t, ∏ x ∈ Finset.filter (fun x => g x = y) s, f x ≤ ∏ x ∈ s, f x


/-- A measure on a finite product space equals the product measure if they are equal on rectangles
  with as sides sets that generate the corresponding σ-algebras. -/
theorem pi_eq_generateFrom {C : ∀ i, Set (Set (α i))}
    (hC : ∀ i, generateFrom (C i) = by apply_assumption) (h2C : ∀ i, IsPiSystem (C i))
    (h3C : ∀ i, (μ i).FiniteSpanningSetsIn (C i)) {μν : Measure (∀ i, α i)}
    (h₁ : ∀ s : ∀ i, Set (α i), (∀ i, s i ∈ C i) → μν (pi univ s) = ∏ i, μ i (s i)) :
    Measure.pi μ = μν

{μ : (i : ι) → MeasureTheory.Measure (α i)}

(hC : ∀ (i : ι), MeasurableSpace.generateFrom (C i) = inst✝ i)

(h3C : (i : ι) → (μ i).FiniteSpanningSetsIn (C i))

{μν : MeasureTheory.Measure ((i : ι) → α i)}

(h₁ : ∀ (s : (i : ι) → Set (α i)), (∀ (i : ι), s i ∈ C i) → μν (Set.univ.pi s) = ∏ i : ι, (μ i) (s i))


theorem p_comm : p1 𝒰 f g ≫ f = p2 𝒰 f g ≫ g

[∀ (i : 𝒰.J), CategoryTheory.Limits.HasPullback (𝒰.map i ≫ f) g]

AlgebraicGeometry.Scheme.Pullback.p1 𝒰 f g ≫ f = AlgebraicGeometry.Scheme.Pullback.p2 𝒰 f g ≫ g


theorem mapDomain_sum {k' G' : Type*} [Semiring k'] {f : G → G'} {s : AddMonoidAlgebra k' G}
    {v : G → k' → k[G]} :
    mapDomain f (s.sum v) = s.sum fun a b => mapDomain f (v a b)

{k : Type u₁}
{G : Type u₂}
[Semiring k]
{k' : Type u_3}
{G' : Type u_4}
[Semiring k']
{f : G → G'}
{s : AddMonoidAlgebra k' G}
{v : G → k' → AddMonoidAlgebra k G}

AddMonoidAlgebra.mapDomain f (Finsupp.sum s v) = Finsupp.sum s fun a b => AddMonoidAlgebra.mapDomain f (v a b)


/-- A closed convex set is the intersection of the halfspaces containing it. -/
theorem iInter_halfspaces_eq (hs₁ : Convex ℝ s) (hs₂ : IsClosed s) :
    ⋂ l : E →L[ℝ] ℝ, { x | ∃ y ∈ s, l x ≤ l y } = s

{E : Type u_2}
[TopologicalSpace E]
[AddCommGroup E]
[TopologicalAddGroup E]
[Module ℝ E]
[ContinuousSMul ℝ E]
{s : Set E}
[LocallyConvexSpace ℝ E]
(hs₁ : Convex ℝ s)
(hs₂ : IsClosed s)


protected theorem coe_mul (x y : S) : (↑(x * y) : A) = ↑x * ↑y

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[Star A]
(S : NonUnitalStarSubalgebra R A)
(x y : ↥S)


/-- The nilpotency class of a nilpotent `G` is equal to the smallest `n` for which an ascending
central series reaches `G` in its `n`'th term. -/
theorem least_ascending_central_series_length_eq_nilpotencyClass :
    Nat.find ((nilpotent_iff_finite_ascending_central_series G).mp hG) =
    Group.nilpotencyClass G

{G : Type u_1}
[Group G]
[hG : Group.IsNilpotent G]


/--
Given the existence of the appropriate (possibly finite) products and equalizers, we know a limit of
`F` exists.
(This assumes the existence of all equalizers, which is technically stronger than needed.)
-/
theorem hasLimit_of_equalizer_and_product (F : J ⥤ C) [HasLimit (Discrete.functor F.obj)]
    [HasLimit (Discrete.functor fun f : Σp : J × J, p.1 ⟶ p.2 => F.obj f.1.2)] [HasEqualizers C] :
    HasLimit F

[CategoryTheory.Limits.HasLimit (CategoryTheory.Discrete.functor fun f => F.obj f.fst.2)]


theorem Ico_inr_inr : Ico (inr b₁ : α ⊕ β) (inr b₂) = (Ico b₁ b₂).map Embedding.inr

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(b₁ b₂ : β)

Finset.Ico (Sum.inr b₁) (Sum.inr b₂) = Finset.map Function.Embedding.inr (Finset.Ico b₁ b₂)


theorem StrictRestriction.restriction (h : N <r M) : N ≤r M

{α : Type u_1}
{M N : Matroid α}
(h : N.StrictRestriction M)


theorem max_mem_insert_bot_image_coe (s : Finset α) :
    s.max ∈ (insert ⊥ (s.image (↑)) : Finset (WithBot α))

{α : Type u_2}
[LinearOrder α]
(s : Finset α)

s.max ∈ insert ⊥ (Finset.image WithBot.some s)


/-- A configuration is nondegenerate if:
  1) there does not exist a line that passes through all of the points,
  2) there does not exist a point that is on all of the lines,
  3) there is at most one line through any two points,
  4) any two lines have at most one intersection point.
  Conditions 3 and 4 are equivalent. -/
class Nondegenerate : Prop where
  exists_point : ∀ l : L, ∃ p, p ∉ l
  exists_line : ∀ p, ∃ l : L, p ∉ l
  eq_or_eq : ∀ {p₁ p₂ : P} {l₁ l₂ : L}, p₁ ∈ l₁ → p₂ ∈ l₁ → p₁ ∈ l₂ → p₂ ∈ l₂ → p₁ = p₂ ∨ l₁ = l₂

[self : Configuration.Nondegenerate P L]


@[simp]
theorem intervalIntegrable_log (h : (0 : ℝ) ∉ [[a, b]]) : IntervalIntegrable log μ a b


theorem delayReflLeft_one (γ : Path x y) : delayReflLeft 1 γ = γ

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


@[simp]
lemma map_one_succ (j : ℕ) (hj : j + 1 < n + 1 + 1) :
    map F f 1 ⟨j + 1, hj⟩ (by simp [Fin.le_def]) = F.map' 0 j

(F : CategoryTheory.ComposableArrows C n)

CategoryTheory.ComposableArrows.Precomp.map F f 1 ⟨j + 1, hj⟩ ⋯ = F.map' 0 j ⋯ ⋯


theorem kerase_keys_subset (a) (l : List (Sigma β)) : (kerase a l).keys ⊆ l.keys

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


@[to_additive]
theorem measurePreserving_mul_left (μ : Measure G) [IsMulLeftInvariant μ] (g : G) :
    MeasurePreserving (g * ·) μ μ

{G : Type u_2}
[MeasurableSpace G]
[Mul G]
[MeasurableMul G]
(μ : MeasureTheory.Measure G)
[μ.IsMulLeftInvariant]
(g : G)

MeasureTheory.MeasurePreserving (fun x => g * x) μ μ


/-- The quaternion basis vectors within the algebra. -/
@[simps i j k]
def quaternionBasis : QuaternionAlgebra.Basis (CliffordAlgebra (Q c₁ c₂)) c₁ c₂

(CliffordAlgebraQuaternion.quaternionBasis c₁ c₂).j = (CliffordAlgebra.ι (CliffordAlgebraQuaternion.Q c₁ c₂)) (0, 1)


lemma eqToHom_eq_homOfLE {C} [Preorder C] {X Y : C} (e : X = Y) : eqToHom e = homOfLE e.le

{C : Type u_1}
[Preorder C]
{X Y : C}
(e : X = Y)

CategoryTheory.eqToHom e = CategoryTheory.homOfLE ⋯


protected theorem induction {p : (Π₀ i, β i) → Prop} (f : Π₀ i, β i) (h0 : p 0)
    (ha : ∀ (i b) (f : Π₀ i, β i), f i = 0 → b ≠ 0 → p f → p (single i b + f)) : p f

(ha : ∀ (i : ι) (b : β i) (f : Π₀ (i : ι), β i), f i = 0 → b ≠ 0 → p f → p (DFinsupp.single i b + f))


/-- A solution with `x = 1` is trivial. -/
theorem eq_one_of_x_eq_one (h₀ : d ≠ 0) {a : Solution₁ d} (ha : a.x = 1) : a = 1

{d : ℤ}
(h₀ : d ≠ 0)
{a : Pell.Solution₁ d}
(ha : a.x = 1)


theorem ack_injective_left (n : ℕ) : Function.Injective fun m => ack m n


lemma differentiableOn_negMulLog : DifferentiableOn ℝ negMulLog {0}ᶜ


theorem unitors_equal : (λ_ (𝟙_ C)).hom = (ρ_ (𝟙_ C)).hom

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

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


@[to_additive]
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {K : ι → Subgroup G} (hK : Directed (· ≤ ·) K)
    {x : G} : x ∈ (iSup K : Subgroup G) ↔ ∃ i, x ∈ K i

(hK : Directed (fun x x_1 => x ≤ x_1) K)


theorem encodePosNum_nonempty (n : PosNum) : encodePosNum n ≠ []


/-- The constructed pointwise right Kan extension
when `HasPointwiseRightKanExtension L F` holds. -/
@[simps]
noncomputable def pointwiseRightKanExtension : D ⥤ H

{C : Type u_1}
{D : Type u_2}
{H : Type u_3}
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Category.{u_5, u_2} D]
[CategoryTheory.Category.{u_6, u_3} H]
(L : CategoryTheory.Functor C D)
(F : CategoryTheory.Functor C H)
[L.HasPointwiseRightKanExtension F]
(Y : D)

(L.pointwiseRightKanExtension F).obj Y = CategoryTheory.Limits.limit ((CategoryTheory.StructuredArrow.proj Y L).comp F)


@[to_additive (attr := simp)]
theorem closure_empty : closure (∅ : Set M) = ⊥


/-- The non-commutative version of `Finset.prod_union` -/
@[to_additive "The non-commutative version of `Finset.sum_union`"]
theorem noncommProd_union_of_disjoint [DecidableEq α] {s t : Finset α} (h : Disjoint s t)
    (f : α → β) (comm : { x | x ∈ s ∪ t }.Pairwise fun a b => Commute (f a) (f b)) :
    noncommProd (s ∪ t) f comm =
      noncommProd s f (comm.mono <| coe_subset.2 subset_union_left) *
        noncommProd t f (comm.mono <| coe_subset.2 subset_union_right)

(comm : {x | x ∈ s ∪ t}.Pairwise fun a b => AddCommute (f a) (f b))

(s ∪ t).noncommSum f comm = s.noncommSum f ⋯ + t.noncommSum f ⋯


/-- In linear orders, frequent boundedness from above implies coboundedness for `≥`. -/
lemma IsCobounded.of_frequently_le {u : R} (freq_le : ∃ᶠ r in F, r ≤ u) :
    IsCobounded (· ≥ ·) F

{R : Type u_6}
{F : Filter R}
[LinearOrder R]
{u : R}
(freq_le : ∃ᶠ (r : R) in F, r ≤ u)

Filter.IsCobounded (fun x x_1 => x ≥ x_1) F


theorem le_inf_support_pow (degt0 : 0 ≤ degt 0) (degtm : ∀ a b, degt a + degt b ≤ degt (a + b))
    (n : ℕ) (f : R[A]) : n • f.support.inf degt ≤ (f ^ n).support.inf degt

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

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

(degtm : ∀ (a b : A), degt a + degt b ≤ degt (a + b))


protected theorem «forall» {p : WithTop α → Prop} : (∀ x, p x) ↔ p ⊤ ∧ ∀ x : α, p x

(∀ (x : WithTop α), p x) ↔ p ⊤ ∧ ∀ (x : α), p ↑x


theorem IsPrime.isRadical (H : IsPrime I) : I.IsRadical

{R : Type u}
[CommSemiring R]
{I : Ideal R}
(H : I.IsPrime)


theorem smul_finset_inter₀ (ha : a ≠ 0) : a • (s ∩ t) = a • s ∩ a • t

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[GroupWithZero α]
[MulAction α β]
{s t : Finset β}
{a : α}
(ha : a ≠ 0)


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


theorem eLpNorm'_congr_nnnorm_ae {f g : α → F} (hfg : ∀ᵐ x ∂μ, ‖f x‖₊ = ‖g x‖₊) :
    eLpNorm' f q μ = eLpNorm' g q μ

{α : Type u_1}
{F : Type u_3}
{m0 : MeasurableSpace α}
{q : ℝ}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup F]
{f g : α → F}
(hfg : ∀ᵐ (x : α) ∂μ, ‖f x‖₊ = ‖g x‖₊)

MeasureTheory.eLpNorm' f q μ = MeasureTheory.eLpNorm' g q μ


@[simp, mfld_simps]
theorem trivializationAt_source (x : M) :
    (trivializationAt E (TangentSpace I) x).source =
      π E (TangentSpace I) ⁻¹' (chartAt H x).source

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_4}
[TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H)
(M : Type u_6)
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
(x : M)

(trivializationAt E (TangentSpace I) x).source = Bundle.TotalSpace.proj ⁻¹' (chartAt H x).source


theorem union_comm_of_disjoint {s₁ s₂ : Finmap β} : Disjoint s₁ s₂ → s₁ ∪ s₂ = s₂ ∪ s₁

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{s₁ s₂ : Finmap β}


lemma cyclesMap_comm [S₁.HasLeftHomology] [S₂.HasLeftHomology] :
    cyclesMap φ ≫ h₂.cyclesIso.hom = h₁.cyclesIso.hom ≫ γ.φK

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.ShortComplex.cyclesMap φ) h₂.cyclesIso.hom =
  CategoryTheory.CategoryStruct.comp h₁.cyclesIso.hom γ.φK


@[simp]
theorem ListBlank.tail_mk {Γ} [Inhabited Γ] (l : List Γ) :
    ListBlank.tail (ListBlank.mk l) = ListBlank.mk l.tail

{Γ : Type u_1}
[Inhabited Γ]
(l : List Γ)

(Turing.ListBlank.mk l).tail = Turing.ListBlank.mk l.tail


lemma comap_restrict (μ : Measure β) (s : Set β) :
    (μ.restrict s).comap f = (μ.comap f).restrict (f ⁻¹' s)

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
{m1 : MeasurableSpace β}
{f : α → β}
(hf : MeasurableEmbedding f)
(μ : MeasureTheory.Measure β)
(s : Set β)

MeasureTheory.Measure.comap f (μ.restrict s) = (MeasureTheory.Measure.comap f μ).restrict (f ⁻¹' s)


@[simp]
theorem coe_restrictScalars (p : Seminorm 𝕜' E) : (p.restrictScalars 𝕜 : E → ℝ) = p

(𝕜 : Type u_3)
{E : Type u_7}
{𝕜' : Type u_13}
[NormedField 𝕜]
[SeminormedRing 𝕜']
[NormedAlgebra 𝕜 𝕜']
[NormOneClass 𝕜']
[AddCommGroup E]
[Module 𝕜' E]
[SMul 𝕜 E]
[IsScalarTower 𝕜 𝕜' E]
(p : Seminorm 𝕜' E)


/-- If `X` is a compact space, then a locally finite family of sets of `X` can have only finitely
many nonempty elements. -/
theorem LocallyFinite.finite_nonempty_of_compact [CompactSpace X] {f : ι → Set X}
    (hf : LocallyFinite f) : { i | (f i).Nonempty }.Finite

{X : Type u}
{ι : Type u_1}
[TopologicalSpace X]
[CompactSpace X]
{f : ι → Set X}
(hf : LocallyFinite f)


/-- The constant-function embedding, as a ring hom.  -/
@[simps]
def constRingHom [NonAssocSemiring Y] : Y →+* LocallyConstant X Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[NonAssocSemiring Y]
(y : Y)

LocallyConstant.constRingHom y = LocallyConstant.const X y


protected theorem StrictAntiOn.antitoneOn (hf : StrictAntiOn f s) : AntitoneOn f s

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


@[simp]
theorem W.dest_mk (p : P (W P)) : W.dest (W.mk p) = p


@[simp]
theorem deleteEdges_empty_eq : G'.deleteEdges ∅ = G'

{V : Type u}
{G : SimpleGraph V}
{G' : G.Subgraph}


theorem closure_subset {t : Set R} (ht : IsSubring t) : s ⊆ t → closure s ⊆ t

{R : Type u}
[Ring R]
{s t : Set R}
(ht : IsSubring t)


theorem nonempty [Mn : Nonempty M] (h : M ≅[L] N) : Nonempty N

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
[Mn : Nonempty M]
(h : L.ElementarilyEquivalent M N)


@[simp]
theorem sUnion_subset_iff {s : Set (Set α)} {t : Set α} : ⋃₀s ⊆ t ↔ ∀ t' ∈ s, t' ⊆ t

{α : Type u_1}
{s : Set (Set α)}
{t : Set α}


@[to_additive (attr := simp)]
theorem closure_empty : closure (∅ : Set M) = ⊥


theorem rightInvOn (h : SpectrumRestricts a f) : (spectrum S a).RightInvOn f (algebraMap R S)

{R : Type u_3}
{S : Type u_4}
{A : Type u_5}
[Semifield R]
[Semifield S]
[Ring A]
[Algebra R S]
[Algebra R A]
[Algebra S A]
{a : A}
{f : S → R}
(h : SpectrumRestricts a f)

Set.RightInvOn f (⇑(algebraMap R S)) (spectrum S a)


@[simp]
theorem id_comp (f : α →. β) : (PFun.id β).comp f = f

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


/-- An auxiliary definition to be used in the proof of the fact that
`J.diagramFunctor D X` preserves limits. -/
@[simps]
def coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation {X : C} {K : Type max v u}
    [SmallCategory K] {F : K ⥤ Cᵒᵖ ⥤ D} {W : J.Cover X} (i : W.Arrow)
    (E : Cone (F ⋙ J.diagramFunctor D X ⋙ (evaluation (J.Cover X)ᵒᵖ D).obj (op W))) :
    Cone (F ⋙ (evaluation _ _).obj (op i.Y))

{J : CategoryTheory.GrothendieckTopology C}

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

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

(E :
  CategoryTheory.Limits.Cone
    (F ⋙ J.diagramFunctor D X ⋙ (CategoryTheory.evaluation (J.Cover X)ᵒᵖ D).obj (Opposite.op W)))

(CategoryTheory.GrothendieckTopology.coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation i E).pt = E.pt


@[measurability]
theorem Measurable.im (hf : Measurable f) : Measurable fun x => RCLike.im (f x)

{α : Type u_1}
{𝕜 : Type u_2}
[RCLike 𝕜]
{m : MeasurableSpace α}
{f : α → 𝕜}
(hf : Measurable f)


theorem inner_add_right (x y z : F) : ⟪x, y + z⟫ = ⟪x, y⟫ + ⟪x, z⟫

{𝕜 : Type u_1}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup F]
[Module 𝕜 F]
[c : InnerProductSpace.Core 𝕜 F]
(x y z : F)


@[local simp]
theorem transitionMap_map_mul {m n : ℕ} (hmn : m ≤ n) (x y : R ⧸ (I ^ n • ⊤ : Ideal R)) :
    transitionMap I R hmn (x * y) = transitionMap I R hmn x * transitionMap I R hmn y

{R : Type u_1}
[CommRing R]
(I : Ideal R)
{m n : ℕ}
(hmn : m ≤ n)
(x : R ⧸ I ^ n • ⊤)
(y : R ⧸ I ^ n • ⊤)

(AdicCompletion.transitionMap I R hmn) (x * y) =
  (AdicCompletion.transitionMap I R hmn) x * (AdicCompletion.transitionMap I R hmn) y


@[simp]
theorem monoidalClosed_uncurry
    {M N P : ModuleCat.{u} R} (f : N ⟶ M ⟶[ModuleCat.{u} R] P) (x : M) (y : N) :
    MonoidalClosed.uncurry f (x ⊗ₜ[R] y) =
      @DFunLike.coe _ _ _ LinearMap.instFunLike (f y) x

{R : Type u}
[CommRing R]
{M N P : ModuleCat R}
(f : N ⟶ (CategoryTheory.ihom M).obj P)
(x : ↑M)
(y : ↑N)

(CategoryTheory.MonoidalClosed.uncurry f) (x ⊗ₜ[R] y) = (f y) x


/-- An equivalence between `Finmap β` and pairs `(keys : Finset α, lookup : ∀ a, Option (β a))` such
that `(lookup a).isSome ↔ a ∈ keys`. -/
@[simps apply_coe_fst apply_coe_snd]
def keysLookupEquiv :
    Finmap β ≃ { f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1 }

{α : Type u}
{β : α → Type v}
[DecidableEq α]
(s : Finmap β)
(i : α)

(↑(Finmap.keysLookupEquiv s)).2 i = Finmap.lookup i s


/-- The higher `Tor` groups for `X` and `Y` are zero if `Y` is projective. -/
lemma isZero_Tor_succ_of_projective (X Y : C) [Projective Y] (n : ℕ) :
    IsZero (((Tor C (n + 1)).obj X).obj Y)

CategoryTheory.Limits.IsZero (((CategoryTheory.Tor C (n + 1)).obj X).obj Y)


theorem without_one_mul {M : Type*} [MulOneClass M] {a b : M} (h : 1 * a = b) : a = b

{M : Type u_1}
[MulOneClass M]
{a b : M}
(h : 1 * a = b)


theorem Monotone.union [Preorder β] {f g : β → Set α} (hf : Monotone f) (hg : Monotone g) :
    Monotone fun x => f x ∪ g x

{α : Type u_1}
{β : Type u_2}
[Preorder β]
{f g : β → Set α}
(hf : Monotone f)
(hg : Monotone g)


theorem nsmul_toReal_eq_mul {n : ℕ} (h : n ≠ 0) {θ : Angle} :
    (n • θ).toReal = n * θ.toReal ↔ θ.toReal ∈ Set.Ioc (-π / n) (π / n)

(n • θ).toReal = ↑n * θ.toReal ↔ θ.toReal ∈ Set.Ioc (-π / ↑n) (π / ↑n)


theorem principal_add_ord {c : Cardinal} (hc : ℵ₀ ≤ c) : Ordinal.Principal (· + ·) c.ord

Ordinal.Principal (fun x x_1 => x + x_1) c.ord


theorem _root_.Function.Injective.encard_image (hf : f.Injective) (s : Set α) :
    (f '' s).encard = s.encard

{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
(s : Set α)


theorem IsMaxOn.iSup_eq (hx₀ : x₀ ∈ s) (h : IsMaxOn f s x₀) : ⨆ x : s, f x = f x₀

{α : Type u}
{β : Type v}
[ConditionallyCompleteLinearOrder α]
{f : β → α}
{s : Set β}
{x₀ : β}
(hx₀ : x₀ ∈ s)
(h : IsMaxOn f s x₀)


theorem Measurable.dite [∀ x, Decidable (x ∈ s)] {f : s → β} (hf : Measurable f)
    {g : (sᶜ : Set α) → β} (hg : Measurable g) (hs : MeasurableSet s) :
    Measurable fun x => if hx : x ∈ s then f ⟨x, hx⟩ else g ⟨x, hx⟩

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
[(x : α) → Decidable (x ∈ s)]
{f : ↑s → β}
(hf : Measurable f)
{g : ↑sᶜ → β}
(hg : Measurable g)
(hs : MeasurableSet s)


@[fun_prop]
theorem HasFDerivWithinAt.mul' (ha : HasFDerivWithinAt a a' s x) (hb : HasFDerivWithinAt b b' s x) :
    HasFDerivWithinAt (fun y => a y * b y) (a x • b' + a'.smulRight (b x)) s x

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


@[to_additive]
lemma mulSupport_prod (s : Finset ι) (f : ι → α → β) :
    mulSupport (fun x ↦ ∏ i ∈ s, f i x) ⊆ ⋃ i ∈ s, mulSupport (f i)

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

(Function.support fun x => ∑ i ∈ s, f i x) ⊆ ⋃ i ∈ s, Function.support (f i)


theorem dvd_choose_add (hp : Prime p) (hap : a < p) (hbp : b < p) (h : p ≤ a + b) :
    p ∣ choose (a + b) a

{p a b : ℕ}
(hp : Nat.Prime p)
(hap : a < p)
(hbp : b < p)
(h : p ≤ a + b)


/-- Two left invariant measures integrate in the same way continuous compactly supported functions,
up to the scalar `haarScalarFactor μ' μ`. See also
`measure_isMulInvariant_eq_smul_of_isCompact_closure`, which gives the same result for compact
sets, and `measure_isHaarMeasure_eq_smul_of_isOpen` for open sets. -/
@[to_additive integral_isAddLeftInvariant_eq_smul_of_hasCompactSupport
"Two left invariant measures integrate in the same way continuous compactly supported functions,
up to the scalar `addHaarScalarFactor μ' μ`. See also
`measure_isAddInvariant_eq_smul_of_isCompact_closure`, which gives the same result for compact
sets, and `measure_isAddHaarMeasure_eq_smul_of_isOpen` for open sets."]
theorem integral_isMulLeftInvariant_eq_smul_of_hasCompactSupport
    (μ' μ : Measure G) [IsHaarMeasure μ] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ']
    {f : G → ℝ} (hf : Continuous f) (h'f : HasCompactSupport f) :
    ∫ x, f x ∂μ' = ∫ x, f x ∂(haarScalarFactor μ' μ • μ)

∫ (x : G), f x ∂μ' = ∫ (x : G), f x ∂μ'.addHaarScalarFactor μ • μ


theorem DifferentiableOn.dist (hf : DifferentiableOn ℝ f s) (hg : DifferentiableOn ℝ g s)
    (hne : ∀ x ∈ s, f x ≠ g x) : DifferentiableOn ℝ (fun y => dist (f y) (g y)) s

(𝕜 : Type u_1)
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[NormedSpace ℝ E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{f g : G → E}
{s : Set G}
(hf : DifferentiableOn ℝ f s)
(hg : DifferentiableOn ℝ g s)
(hne : ∀ x ∈ s, f x ≠ g x)


theorem PosSemidef.fromBlocks₂₂ [Fintype m] [Fintype n] [DecidableEq n] (A : Matrix m m 𝕜)
    (B : Matrix m n 𝕜) {D : Matrix n n 𝕜} (hD : D.PosDef) [Invertible D] :
    (fromBlocks A B Bᴴ D).PosSemidef ↔ (A - B * D⁻¹ * Bᴴ).PosSemidef

{m : Type u_2}
{n : Type u_3}
{𝕜 : Type u_5}
[CommRing 𝕜]
[PartialOrder 𝕜]
[StarRing 𝕜]
[StarOrderedRing 𝕜]
[Fintype m]
[Fintype n]
[DecidableEq n]
(A : Matrix m m 𝕜)
(B : Matrix m n 𝕜)
{D : Matrix n n 𝕜}
(hD : D.PosDef)
[Invertible D]

(Matrix.fromBlocks A B B.conjTranspose D).PosSemidef ↔ (A - B * D⁻¹ * B.conjTranspose).PosSemidef


theorem coe_sup : ↑(p ⊔ p') = (p + p' : Set M)

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


theorem factor_mk_eq {α : Type*} (r s : α → α → Prop) (h : ∀ x y, r x y → s x y) :
    factor r s h ∘ Quot.mk _ = Quot.mk _

{α : Type u_4}
(r s : α → α → Prop)
(h : ∀ (x y : α), r x y → s x y)

Quot.factor r s h ∘ Quot.mk r = Quot.mk s


theorem mul_inf_le_inf_mul_of_nonneg [OrderTop R] (s : Finset ι) (ha : ∀ i ∈ s, 0 ≤ a i)
    (hb : ∀ i ∈ s, 0 ≤ b i) : s.inf a * s.inf b ≤ s.inf (a * b)

{ι : Type u_1}
{R : Type u_2}
[LinearOrderedSemiring R]
{a b : ι → R}
[OrderTop R]
(s : Finset ι)
(ha : ∀ i ∈ s, 0 ≤ a i)
(hb : ∀ i ∈ s, 0 ≤ b i)


/-- `TStructure C` is the type of t-structures on the (pre)triangulated category `C`. -/
structure TStructure where
  /-- the predicate of objects that are `≤ n` for `n : ℤ`. -/
  LE (n : ℤ) : C → Prop
  /-- the predicate of objects that are `≥ n` for `n : ℤ`. -/
  GE (n : ℤ) : C → Prop
  LE_closedUnderIsomorphisms (n : ℤ) : ClosedUnderIsomorphisms (LE n) := by infer_instance
  GE_closedUnderIsomorphisms (n : ℤ) : ClosedUnderIsomorphisms (GE n) := by infer_instance
  LE_shift (n a n' : ℤ) (h : a + n' = n) (X : C) (hX : LE n X) : LE n' (X⟦a⟧)
  GE_shift (n a n' : ℤ) (h : a + n' = n) (X : C) (hX : GE n X) : GE n' (X⟦a⟧)
  zero' ⦃X Y : C⦄ (f : X ⟶ Y) (hX : LE 0 X) (hY : GE 1 Y) : f = 0
  LE_zero_le : LE 0 ≤ LE 1
  GE_one_le : GE 1 ≤ GE 0
  exists_triangle_zero_one (A : C) : ∃ (X Y : C) (_ : LE 0 X) (_ : GE 1 Y)
    (f : X ⟶ A) (g : A ⟶ Y) (h : Y ⟶ X⟦(1 : ℤ)⟧), Triangle.mk f g h ∈ distTriang C

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

(self : CategoryTheory.Triangulated.TStructure C)

self.GE n' ((CategoryTheory.shiftFunctor C a).obj X)


lemma mul_inv_eq_iff_eq_mul₀ (hb : b ≠ 0) : a * b⁻¹ = c ↔ a = c * b

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


/-- If n is odd, then the Dihedral group of order $2n$ has $n(n+3)$ pairs (represented as
$n + n + n + n*n$) of commuting elements. -/
@[simps]
def OddCommuteEquiv (hn : Odd n) : { p : DihedralGroup n × DihedralGroup n // Commute p.1 p.2 } ≃
    ZMod n ⊕ ZMod n ⊕ ZMod n ⊕ ZMod n × ZMod n

∀ (x : ZMod n ⊕ ZMod n ⊕ ZMod n ⊕ ZMod n × ZMod n),
  (DihedralGroup.OddCommuteEquiv hn).symm x =
    match x with
    | Sum.inl i => ⟨(DihedralGroup.sr i, DihedralGroup.r 0), ⋯⟩
    | Sum.inr (Sum.inl j) => ⟨(DihedralGroup.r 0, DihedralGroup.sr j), ⋯⟩
    | Sum.inr (Sum.inr (Sum.inl k)) =>
      ⟨(DihedralGroup.sr (↑(ZMod.unitOfCoprime 2 ⋯)⁻¹ * k), DihedralGroup.sr (↑(ZMod.unitOfCoprime 2 ⋯)⁻¹ * k)), ⋯⟩
    | Sum.inr (Sum.inr (Sum.inr (i, j))) => ⟨(DihedralGroup.r i, DihedralGroup.r j), ⋯⟩


theorem hasFDerivWithinAt_of_mem_nhds (h : s ∈ 𝓝 x) :
    HasFDerivWithinAt f f' s x ↔ HasFDerivAt f f' x

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


/-- If `A` is essentially in the image of a reflective functor `i`, then `η_A` is an isomorphism.
This gives that the "witness" for `A` being in the essential image can instead be given as the
reflection of `A`, with the isomorphism as `η_A`.

(For any `B` in the reflective subcategory, we automatically have that `ε_B` is an iso.)
-/
theorem Functor.essImage.unit_isIso [Reflective i] {A : C} (h : A ∈ i.essImage) :
    IsIso ((reflectorAdjunction i).unit.app A)

{C : Type u₁}
{D : Type u₂}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Category.{v₂, u₂} D]
{i : CategoryTheory.Functor D C}
[CategoryTheory.Reflective i]
{A : C}
(h : A ∈ i.essImage)

CategoryTheory.IsIso ((CategoryTheory.reflectorAdjunction i).unit.app A)


/-- (Impl) The key property defining the map `λ : TL ⟶ L`. -/
theorem commuting (j : J) : (T : C ⥤ C).map (c.ι.app j) ≫ lambda c t = (D.obj j).a ≫ c.ι.app j

{D : CategoryTheory.Functor J T.Algebra}

(c : CategoryTheory.Limits.Cocone (D.comp T.forget))

[CategoryTheory.Limits.PreservesColimit (D.comp T.forget) T.toFunctor]

CategoryTheory.CategoryStruct.comp (T.map (c.ι.app j)) (CategoryTheory.Monad.ForgetCreatesColimits.lambda c t) =
  CategoryTheory.CategoryStruct.comp (D.obj j).a (c.ι.app j)


@[instance]
theorem coprodᵢ_neBot [∀ i, Nonempty (α i)] [Nonempty ι] (f : ∀ i, Filter (α i))
    [H : ∀ i, NeBot (f i)] : NeBot (Filter.coprodᵢ f)

{ι : Type u_1}
{α : ι → Type u_2}
[∀ (i : ι), Nonempty (α i)]
[Nonempty ι]
(f : (i : ι) → Filter (α i))
[H : ∀ (i : ι), (f i).NeBot]


theorem nthRemainder_spec (n : ℕ) (x y : 𝕎 k) : (x * y).coeff (n + 1) =
    x.coeff (n + 1) * y.coeff 0 ^ p ^ (n + 1) + y.coeff (n + 1) * x.coeff 0 ^ p ^ (n + 1) +
    nthRemainder p n (truncateFun (n + 1) x) (truncateFun (n + 1) y)

(p : ℕ)
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[CommRing k]
[CharP k p]
(n : ℕ)
(x y : WittVector p k)

(x * y).coeff (n + 1) =
  x.coeff (n + 1) * y.coeff 0 ^ p ^ (n + 1) + y.coeff (n + 1) * x.coeff 0 ^ p ^ (n + 1) +
    WittVector.nthRemainder p n (WittVector.truncateFun (n + 1) x) (WittVector.truncateFun (n + 1) y)


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


theorem ysq_dvd_yy (n) : yn a1 n * yn a1 n ∣ yn a1 (n * yn a1 n)

Pell.yn a1 n * Pell.yn a1 n ∣ Pell.yn a1 (n * Pell.yn a1 n)


theorem continuousOn_isOpen_of_generateFrom {β : Type*} {s : Set α} {T : Set (Set β)} {f : α → β}
    (h : ∀ t ∈ T, IsOpen (s ∩ f ⁻¹' t)) :
    @ContinuousOn α β _ (.generateFrom T) f s

{α : Type u_1}
[TopologicalSpace α]
{β : Type u_7}
{s : Set α}
{T : Set (Set β)}
{f : α → β}
(h : ∀ t ∈ T, IsOpen (s ∩ f ⁻¹' t))


theorem Differentiable.finset_prod (hd : ∀ i ∈ u, Differentiable 𝕜 (f i)) :
    Differentiable 𝕜 (∏ i ∈ u, f i ·)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{ι : Type u_2}
{𝔸' : Type u_3}
[NormedCommRing 𝔸']
[NormedAlgebra 𝕜 𝔸']
{u : Finset ι}
{f : ι → 𝕜 → 𝔸'}
(hd : ∀ i ∈ u, Differentiable 𝕜 (f i))

Differentiable 𝕜 fun x => ∏ i ∈ u, f i x


/-- Shows that the partial denominators `bᵢ` correspond to an integer. -/
theorem exists_int_eq_of_partDen {b : K}
    (nth_partDen_eq : (of v).partDens.get? n = some b) : ∃ z : ℤ, b = (z : K)

(nth_partDen_eq : (GenContFract.of v).partDens.get? n = some b)


@[simp, mfld_simps]
theorem coe_coordChange (i j : ι) : Z.toFiberBundleCore.coordChange i j b = Z.coordChange i j b

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

Z.toFiberBundleCore.coordChange i j b = ⇑(Z.coordChange i j b)


/-- If `A` is a topological module over a commutative `R` with trivial star and compatible actions,
then `star` is a continuous linear equivalence. -/
@[simps!]
def starL' (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [TrivialStar R] [AddCommMonoid A]
    [StarAddMonoid A] [Module R A] [StarModule R A] [TopologicalSpace A] [ContinuousStar A] :
    A ≃L[R] A

(R : Type u_1)
{A : Type u_2}
[CommSemiring R]
[StarRing R]
[TrivialStar R]
[AddCommMonoid A]
[StarAddMonoid A]
[Module R A]
[StarModule R A]
[TopologicalSpace A]
[ContinuousStar A]


lemma rank_le_finrank_engel (x : L) :
    rank K L ≤ finrank K (engel K x)

(K : Type u_7)
{L : Type u_8}
[Field K]
[LieRing L]
[LieAlgebra K L]
[Module.Finite K L]
(x : L)

LieAlgebra.rank K L ≤ FiniteDimensional.finrank K ↥(LieSubalgebra.engel K x)


lemma degree_norm_smul_basis [IsDomain R] (p q : R[X]) :
    (Algebra.norm R[X] <| p • (1 : W.CoordinateRing) + q • mk W Y).degree =
      max (2 • p.degree) (2 • q.degree + 3)

{R : Type u}
[CommRing R]
(W : WeierstrassCurve.Affine R)
[IsDomain R]
(p q : R[X])

((Algebra.norm R[X]) (p • 1 + q • (WeierstrassCurve.Affine.CoordinateRing.mk W) Y)).degree =
  max (2 • p.degree) (2 • q.degree + 3)


@[to_additive (attr := simp)]
lemma continuousOn_inv_iff : ContinuousOn f⁻¹ s ↔ ContinuousOn f s

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[InvolutiveInv G]
[ContinuousInv G]
[TopologicalSpace α]
{f : α → G}
{s : Set α}


theorem sub_lt_of_abs_sub_lt_left (h : |a - b| < c) : b - c < a

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b c : α}
(h : |a - b| < c)


theorem Ideal.irreducible_map_of_irreducible_minpoly (hI : IsMaximal I) (hI' : I ≠ ⊥)
    (hx : (conductor R x).comap (algebraMap R S) ⊔ I = ⊤) (hx' : IsIntegral R x)
    (hf : Irreducible (Polynomial.map (Ideal.Quotient.mk I) (minpoly R x))) :
    Irreducible (I.map (algebraMap R S))

(hx : Ideal.comap (algebraMap R S) (conductor R x) ⊔ I = ⊤)

Irreducible (Ideal.map (algebraMap R S) I)


theorem IsMaximal.exists_inv {I : Ideal α} (hI : I.IsMaximal) {x} (hx : x ∉ I) :
    ∃ y, ∃ i ∈ I, y * x + i = 1

{α : Type u}
[Semiring α]
{I : Ideal α}
(hI : I.IsMaximal)
{x : α}
(hx : x ∉ I)


theorem isClosed_infty : IsClosed ({∞} : Set (OnePoint X))


theorem Commute.mul_zpow {A B : M} (h : Commute A B) : ∀ i : ℤ, (A * B) ^ i = A ^ i * B ^ i

{n' : Type u_1}
[DecidableEq n']
[Fintype n']
{R : Type u_2}
[CommRing R]
{A B : Matrix n' n' R}
(h : Commute A B)
(i : ℤ)


/-- If a subalgebra is contained in a finite-dimensional
subalgebra with the same dimension, they are equal. -/
theorem _root_.Subalgebra.eq_of_le_of_finrank_eq (h_finrank : finrank K F = finrank K E) : F = E

(h_finrank : FiniteDimensional.finrank K ↥F = FiniteDimensional.finrank K ↥E)


/-- The isomorphism between `(lift F _ _).obj WithTerminal.star` with `Z`. -/
@[simps!]
def liftStar {D : Type*} [Category D] {Z : D} (F : C ⥤ D) (M : ∀ x : C, F.obj x ⟶ Z)
    (hM : ∀ (x y : C) (f : x ⟶ y), F.map f ≫ M y = M x) : (lift F M hM).obj star ≅ Z

(hM : ∀ (x y : C) (f : x ⟶ y), CategoryTheory.CategoryStruct.comp (F.map f) (M y) = M x)

(CategoryTheory.WithTerminal.liftStar F M hM).hom = CategoryTheory.CategoryStruct.id Z


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


theorem perm_comp_forall₂ {l u v} (hlu : Perm l u) (huv : Forall₂ r u v) :
    (Forall₂ r ∘r Perm) l v

{α : Type u_1}
{β : Type u_2}
{r : α → β → Prop}
{l u : List α}
{v : List β}
(hlu : l.Perm u)
(huv : List.Forall₂ r u v)

Relation.Comp (List.Forall₂ r) List.Perm l v


@[simp] theorem get?_eq_getElem? (l : List α) (i : Nat) : l.get? i = l[i]?


/-- A prepartition of `I : BoxIntegral.Box ι` is a finite set of pairwise disjoint subboxes of
`I`. -/
structure Prepartition (I : Box ι) where
  /-- The underlying set of boxes -/
  boxes : Finset (Box ι)
  /-- Each box is a sub-box of `I` -/
  le_of_mem' : ∀ J ∈ boxes, J ≤ I
  /-- The boxes in a prepartition are pairwise disjoint. -/
  pairwiseDisjoint : Set.Pairwise (↑boxes) (Disjoint on ((↑) : Box ι → Set (ι → ℝ)))

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(self : BoxIntegral.Prepartition I)

(↑self.boxes).Pairwise (Disjoint on BoxIntegral.Box.toSet)


lemma naturality_apply {P Q : PresheafOfModules R} (f : P ⟶ Q)
    {X Y : Cᵒᵖ} (g : X ⟶ Y) (x : P.obj X) :
    f.app Y (P.map g x) = Q.map g (f.app X x)

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

(PresheafOfModules.Hom.app f Y) ((P.map g) x) = (Q.map g) ((PresheafOfModules.Hom.app f X) x)


@[simp]
theorem pmul_zeta (f : ArithmeticFunction R) : f.pmul ↑ζ = f

{R : Type u_1}
[NonAssocSemiring R]
(f : ArithmeticFunction R)


@[simp]
lemma mk_le_mk {x y : PGame.{u}} {hx hy} : mk x hx ≤ mk y hy ↔ x ≤ y

{x y : SetTheory.PGame}
{hx : x.Numeric}
{hy : y.Numeric}

Surreal.mk x hx ≤ Surreal.mk y hy ↔ x ≤ y


theorem coeff_zero_one : coeff R 0 (1 : R⟦X⟧) = 1


theorem pointwise_smul_le_iff₀ {a : α} (ha : a ≠ 0) {S T : AddSubgroup A} :
    a • S ≤ T ↔ S ≤ a⁻¹ • T

{α : Type u_1}
{A : Type u_3}
[AddGroup A]
[GroupWithZero α]
[DistribMulAction α A]
{a : α}
(ha : a ≠ 0)
{S T : AddSubgroup A}

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


theorem writtenInExtChartAt_chartAt_symm {x : M} {y : E} (h : y ∈ (extChartAt I x).target) :
    writtenInExtChartAt I I (chartAt H x x) (chartAt H x).symm y = y

{𝕜 : Type u_1}
{E : Type u_2}
{M : Type u_3}
{H : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[TopologicalSpace H]
[TopologicalSpace M]
(I : ModelWithCorners 𝕜 E H)
[ChartedSpace H M]
{x : M}
{y : E}
(h : y ∈ (extChartAt I x).target)

writtenInExtChartAt I I (↑(chartAt H x) x) (↑(chartAt H x).symm) y = y


@[simp]
theorem compl_range_some (α : Type*) : (range (some : α → Option α))ᶜ = {none}


theorem eq_empty_of_subset_empty {s : Set α} : s ⊆ ∅ → s = ∅

s ⊆ ∅ → s = ∅


theorem mul_I_im (z : ℂ) : (z * I).im = z.re


/-- Closure of a subsemiring `S` equals `S`. -/
theorem closure_eq (s : Subsemiring R) : closure (s : Set R) = s

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


theorem lift_normNoninc {N : Type*} [SeminormedAddCommGroup N] (S : AddSubgroup M)
    (f : NormedAddGroupHom M N) (hf : ∀ s ∈ S, f s = 0) (fb : f.NormNoninc) :
    (lift S f hf).NormNoninc

{M : Type u_1}
[SeminormedAddCommGroup M]
{N : Type u_3}
[SeminormedAddCommGroup N]
(S : AddSubgroup M)
(f : NormedAddGroupHom M N)
(hf : ∀ s ∈ S, f s = 0)
(fb : f.NormNoninc)

(NormedAddGroupHom.lift S f hf).NormNoninc


/-- A `LocallyConvexSpace` is a topological semimodule over an ordered semiring in which convex
neighborhoods of a point form a neighborhood basis at that point. -/
class LocallyConvexSpace (𝕜 E : Type*) [OrderedSemiring 𝕜] [AddCommMonoid E] [Module 𝕜 E]
    [TopologicalSpace E] : Prop where
  convex_basis : ∀ x : E, (𝓝 x).HasBasis (fun s : Set E => s ∈ 𝓝 x ∧ Convex 𝕜 s) id

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

(𝓝 x).HasBasis (fun s => s ∈ 𝓝 x ∧ Convex 𝕜 s) id


/-- Given a predicate on two naturals `P : ℕ → ℕ → Prop`, `P a b` is true for all `a < b` if
`P (a + 1) (a + 1)` is true for all `a`, `P 0 (b + 1)` is true for all `b` and for all
`a < b`, `P (a + 1) b` is true and `P a (b + 1)` is true implies `P (a + 1) (b + 1)` is true. -/
@[elab_as_elim]
theorem diag_induction (P : ℕ → ℕ → Prop) (ha : ∀ a, P (a + 1) (a + 1)) (hb : ∀ b, P 0 (b + 1))
    (hd : ∀ a b, a < b → P (a + 1) b → P a (b + 1) → P (a + 1) (b + 1)) : ∀ a b, a < b → P a b


theorem union_subset (hs : s ⊆ u) : t ⊆ u → s ∪ t ⊆ u

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


lemma sqrt_mul_sqrt_lt_succ' (n : ℕ) : sqrt n ^ 2 < n + 1


theorem foldl_rev (f : Fin n → α → α) (x) :
    foldl n (fun x i => f i.rev x) x = foldr n f x

{n : Nat}
{α : Sort u_1}
(f : Fin n → α → α)
(x : α)

Fin.foldl n (fun x i => f i.rev x) x = Fin.foldr n f x


lemma lt_one_add [One α] [AddZeroClass α] [PartialOrder α] [ZeroLEOneClass α]
    [NeZero (1 : α)] [CovariantClass α α (swap (·+·)) (·<·)] (a : α) : a < 1 + a

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


@[simp]
theorem opRingEquiv_symm_monomial (n : ℕ) (r : Rᵐᵒᵖ) :
    (opRingEquiv R).symm (monomial n r) = op (monomial n (unop r))

{R : Type u_1}
[Semiring R]
(n : ℕ)
(r : Rᵐᵒᵖ)

(Polynomial.opRingEquiv R).symm ((Polynomial.monomial n) r) =
  MulOpposite.op ((Polynomial.monomial n) (MulOpposite.unop r))


theorem add_sub_self_left (a b : Nat) : (a + b) - a = b


protected theorem mul_pos (a b : ℤ√d) (a0 : 0 < a) (b0 : 0 < b) : 0 < a * b

{d : ℕ}
[dnsq : Zsqrtd.Nonsquare d]
(a b : ℤ√↑d)
(a0 : 0 < a)
(b0 : 0 < b)


lemma add_succ_lt_add (hab : a < b) (hcd : c < d) : a + c + 1 < b + d

{a b c d : ℕ}
(hab : a < b)
(hcd : c < d)


@[simp]
theorem limUnder_nhds_id (x : X) : @limUnder _ _ _ ⟨x⟩ (𝓝 x) id = x

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


/-- If a function is continuous on a set `s` containing a compact set `k`, then it is bounded on
some open neighborhood of `k` in `s`. -/
theorem exists_isOpen_isBounded_image_inter_of_isCompact_of_continuousOn [TopologicalSpace β]
    {k s : Set β} {f : β → α} (hk : IsCompact k) (hks : k ⊆ s) (hf : ContinuousOn f s) :
    ∃ t, k ⊆ t ∧ IsOpen t ∧ IsBounded (f '' (t ∩ s))

{α : Type u}
{β : Type v}
[PseudoMetricSpace α]
[TopologicalSpace β]
{k s : Set β}
{f : β → α}
(hk : IsCompact k)
(hks : k ⊆ s)
(hf : ContinuousOn f s)

∃ t, k ⊆ t ∧ IsOpen t ∧ Bornology.IsBounded (f '' (t ∩ s))


/-- The quotient valuation on `R / J` has support `(supp v) / J` if `J ⊆ supp v`. -/
theorem supp_quot {J : Ideal R} (hJ : J ≤ supp v) :
    supp (v.onQuot hJ) = (supp v).map (Ideal.Quotient.mk J)

{R : Type u_1}
{Γ₀ : Type u_2}
[CommRing R]
[LinearOrderedAddCommMonoidWithTop Γ₀]
(v : AddValuation R Γ₀)
{J : Ideal R}
(hJ : J ≤ v.supp)

(v.onQuot hJ).supp = Ideal.map (Ideal.Quotient.mk J) v.supp


@[simp]
theorem isPartition_single_iff (h : J ≤ I) : IsPartition (single I J h) ↔ J = I

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
(h : J ≤ I)

(BoxIntegral.Prepartition.single I J h).IsPartition ↔ J = I


/-- A language equivalence maps the symbols of one language to symbols of another bijectively. -/
structure LEquiv (L L' : Language) where
  toLHom : L →ᴸ L'
  invLHom : L' →ᴸ L
  left_inv : invLHom.comp toLHom = LHom.id L
  right_inv : toLHom.comp invLHom = LHom.id L'

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

self.invLHom.comp self.toLHom = FirstOrder.Language.LHom.id L


@[simps]
instance whiskerRight (X Y Z : C) [MonoidalCoherence X Y] :
    MonoidalCoherence (X ⊗ Z) (Y ⊗ Z)

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


lemma isWeaklyRegular_cons_iff' (r : R) (rs : List R) :
    IsWeaklyRegular M (r :: rs) ↔
      IsSMulRegular M r ∧
        IsWeaklyRegular (QuotSMulTop r M)
          (rs.map (Ideal.Quotient.mk (Ideal.span {r})))

{R : Type u_1}
(M : Type u_3)
[CommRing R]
[AddCommGroup M]
[Module R M]
(r : R)
(rs : List R)

RingTheory.Sequence.IsWeaklyRegular M (r :: rs) ↔
  IsSMulRegular M r ∧
    RingTheory.Sequence.IsWeaklyRegular (QuotSMulTop r M) (List.map (⇑(Ideal.Quotient.mk (Ideal.span {r}))) rs)


protected theorem min_eq_left {a b : Nat} (h : a ≤ b) : min a b = a


theorem two_zsmul_eq_iff {ψ θ : Angle} : (2 : ℤ) • ψ = (2 : ℤ) • θ ↔ ψ = θ ∨ ψ = θ + ↑π

2 • ψ = 2 • θ ↔ ψ = θ ∨ ψ = θ + ↑π


theorem sdiff_le_iff_left : a \ b ≤ b ↔ a ≤ b

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


theorem Ioo_pred_right_eq_insert (h : a < b) : Ioo (pred a) b = insert a (Ioo a b)

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}
[NoMinOrder α]
(h : a < b)

Set.Ioo (Order.pred a) b = insert a (Set.Ioo a b)


@[to_additive (attr := simp)]
theorem colimit_inv_mk_eq (x : Σ j, F.obj j) : (G.mk.{v, u} F x)⁻¹ = G.mk F ⟨x.1, x.2⁻¹⟩

{J : Type v}
[CategoryTheory.SmallCategory J]
[CategoryTheory.IsFiltered J]
(F : J ⥤ AddGrp)
(x : (j : J) × ↑(F.obj j))

-AddGrp.FilteredColimits.G.mk F x = AddGrp.FilteredColimits.G.mk F ⟨x.fst, -x.snd⟩


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

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

↑(Subsemigroup.toAddSubsemigroup S) = ⇑Additive.toMul ⁻¹' ↑S


@[simp]
theorem iInf_coe {ι} (p : ι → Submodule R M) : (↑(⨅ i, p i) : Set M) = ⋂ i, ↑(p i)

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


/-- The composition of a `C^n` function on a domain with a `C^n` function is `C^n`. -/
theorem ContDiff.comp_contDiffOn {s : Set E} {g : F → G} {f : E → F} (hg : ContDiff 𝕜 n g)
    (hf : ContDiffOn 𝕜 n f s) : ContDiffOn 𝕜 n (g ∘ f) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type uG}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{n : ℕ∞}
{s : Set E}
{g : F → G}
{f : E → F}
(hg : ContDiff 𝕜 n g)
(hf : ContDiffOn 𝕜 n f s)


/-- The restriction of the pushforward measure is the pushforward of the restriction. For a version
assuming only `AEMeasurable`, see `restrict_map_of_aemeasurable`. -/
theorem restrict_map {f : α → β} (hf : Measurable f) {s : Set β} (hs : MeasurableSet s) :
    (μ.map f).restrict s = (μ.restrict <| f ⁻¹' s).map f

{α : Type u_2}
{β : Type u_3}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{f : α → β}
(hf : Measurable f)
{s : Set β}
(hs : MeasurableSet s)

(MeasureTheory.Measure.map f μ).restrict s = MeasureTheory.Measure.map f (μ.restrict (f ⁻¹' s))


theorem totalDegree_le_degrees_card (p : MvPolynomial σ R) :
    p.totalDegree ≤ Multiset.card p.degrees

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


@[simp] theorem erase_replicate_ne [LawfulBEq α] {a b : α} (h : !b == a) :
    (replicate n a).erase b = replicate n a

{α : Type u_1}
[BEq α]
{n : Nat}
[LawfulBEq α]
{a b : α}
(h : (!b == a) = true)

(List.replicate n a).erase b = List.replicate n a


lemma IsCompact.elim_nhds_subcover_nhdsSet' (hs : IsCompact s) (U : ∀ x ∈ s, Set X)
    (hU : ∀ x hx, U x hx ∈ 𝓝 x) : ∃ t : Finset s, (⋃ x ∈ t, U x.1 x.2) ∈ 𝓝ˢ s

(hU : ∀ (x : X) (hx : x ∈ s), U x hx ∈ 𝓝 x)

∃ t, ⋃ x ∈ t, U ↑x ⋯ ∈ 𝓝ˢ s


lemma truncatedSup_union_right (hs : a ∉ lowerClosure s) (ht : a ∈ lowerClosure t) :
    truncatedSup (s ∪ t) a = truncatedSup t a

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s t : Finset α}
{a : α}
[DecidableEq α]
(hs : a ∉ lowerClosure ↑s)
(ht : a ∈ lowerClosure ↑t)

(s ∪ t).truncatedSup a = t.truncatedSup a


lemma δ_leftShift (a n' m' : ℤ) (hn' : n + a = n') (m : ℤ) (hm' : m + a = m') :
    δ n' m' (γ.leftShift a n' hn') = a.negOnePow • (δ n m γ).leftShift a m' hm'

(γ : CochainComplex.HomComplex.Cochain K L n)

CochainComplex.HomComplex.δ n' m' (γ.leftShift a n' hn') =
  a.negOnePow • (CochainComplex.HomComplex.δ n m γ).leftShift a m' hm'


@[simp]
theorem alephIdx_le {a b} : alephIdx a ≤ alephIdx b ↔ a ≤ b


@[to_additive]
theorem unop_iSup (S : ι → Subgroup Gᵐᵒᵖ) : (iSup S).unop = ⨆ i, (S i).unop

{ι : Sort u_1}
{G : Type u_2}
[Group G]
(S : ι → Subgroup Gᵐᵒᵖ)


/-- If a monotone sequence `u` is such that `u n / n` tends to a limit `l` along subsequences with
exponential growth rate arbitrarily close to `1`, then `u n / n` tends to `l`. -/
theorem tendsto_div_of_monotone_of_exists_subseq_tendsto_div (u : ℕ → ℝ) (l : ℝ)
    (hmono : Monotone u)
    (hlim : ∀ a : ℝ, 1 < a → ∃ c : ℕ → ℕ, (∀ᶠ n in atTop, (c (n + 1) : ℝ) ≤ a * c n) ∧
      Tendsto c atTop atTop ∧ Tendsto (fun n => u (c n) / c n) atTop (𝓝 l)) :
    Tendsto (fun n => u n / n) atTop (𝓝 l)

(hlim :
  ∀ (a : ℝ),
    1 < a →
      ∃ c,
        (∀ᶠ (n : ℕ) in Filter.atTop, ↑(c (n + 1)) ≤ a * ↑(c n)) ∧
          Filter.Tendsto c Filter.atTop Filter.atTop ∧ Filter.Tendsto (fun n => u (c n) / ↑(c n)) Filter.atTop (𝓝 l))

Filter.Tendsto (fun n => u n / ↑n) Filter.atTop (𝓝 l)


@[simp]
theorem norm_pow (z : ℤ_[p]) : ∀ n : ℕ, ‖z ^ n‖ = ‖z‖ ^ n

{p : ℕ}
[Fact (Nat.Prime p)]
(z : ℤ_[p])
(n : ℕ)


theorem isOpen_implies_isOpen_iff : (∀ s, IsOpen[t₁] s → IsOpen[t₂] s) ↔ t₂ ≤ t₁

{α : Type u_1}
{t₁ t₂ : TopologicalSpace α}

(∀ (s : Set α), IsOpen s → IsOpen s) ↔ t₂ ≤ t₁


theorem iUnion_univ_pi_of_monotone {ι ι' : Type*} [LinearOrder ι'] [Nonempty ι'] [Finite ι]
    {α : ι → Type*} {s : ∀ i, ι' → Set (α i)} (hs : ∀ i, Monotone (s i)) :
    ⋃ j : ι', pi univ (fun i => s i j) = pi univ fun i => ⋃ j, s i j

{ι : Type u_1}
{ι' : Type u_2}
[LinearOrder ι']
[Nonempty ι']
[Finite ι]
{α : ι → Type u_3}
{s : (i : ι) → ι' → Set (α i)}
(hs : ∀ (i : ι), Monotone (s i))

(⋃ j, Set.univ.pi fun i => s i j) = Set.univ.pi fun i => ⋃ j, s i j


theorem HasFDerivWithinAt.hasDerivWithinAt {f' : 𝕜 →L[𝕜] F} :
    HasFDerivWithinAt f f' s x → HasDerivWithinAt f (f' 1) s x

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


/-- Given a subset `s` of a set `t`, of sizes at most and at least `n` respectively, there exists a
set `u` of size `n` which is both a superset of `s` and a subset of `t`. -/
lemma exists_subsuperset_card_eq (hst : s ⊆ t) (hsn : s.card ≤ n) (hnt : n ≤ t.card) :
    ∃ u, s ⊆ u ∧ u ⊆ t ∧ card u = n

{α : Type u_1}
{s t : Finset α}
{n : ℕ}
(hst : s ⊆ t)
(hsn : s.card ≤ n)
(hnt : n ≤ t.card)


@[simp]
theorem lapply_apply (i : ι) (f : Π₀ i, M i) : (lapply i : (Π₀ i, M i) →ₗ[R] _) f = f i

{ι : Type u_1}
{R : Type u_2}
{M : ι → Type u_4}
[Semiring R]
[(i : ι) → AddCommMonoid (M i)]
[(i : ι) → Module R (M i)]
(i : ι)
(f : Π₀ (i : ι), M i)


/-- Constructs an isomorphism of frames from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : Frm.{u}} (e : α ≃o β) : α ≅ β


protected theorem sub_le_sub_left (h : n ≤ m) (k : Nat) : k - m ≤ k - n


theorem not_lt_of_ge {a b : α} (h : a ≥ b) : ¬a < b

{α : Type u}
[Preorder α]
{a b : α}
(h : a ≥ b)


@[simp]
theorem comp_toHom (hnp : N ≃[L] P) (hmn : M ≃[L] N) :
    (hnp.comp hmn).toHom = hnp.toHom.comp hmn.toHom

{L : FirstOrder.Language}
{M : Type w}
{N : Type w'}
[L.Structure M]
[L.Structure N]
{P : Type u_1}
[L.Structure P]
(hnp : L.Equiv N P)
(hmn : L.Equiv M N)


@[simp] theorem length_zipWith (f : α → β → γ) (l₁ l₂) :
    length (zipWith f l₁ l₂) = min (length l₁) (length l₂)

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

(List.zipWith f l₁ l₂).length = min l₁.length l₂.length


/-- A functorial version of `SimplicialObject.Augmented.rightOp`. -/
@[simps]
def simplicialToCosimplicialAugmented :
    (SimplicialObject.Augmented C)ᵒᵖ ⥤ CosimplicialObject.Augmented Cᵒᵖ

(X : (CategoryTheory.SimplicialObject.Augmented C)ᵒᵖ)

(CategoryTheory.simplicialToCosimplicialAugmented C).obj X = (Opposite.unop X).rightOp


theorem pointReflection_apply (x y : P) : (pointReflection 𝕜 x) y = x -ᵥ y +ᵥ x

{𝕜 : Type u_1}
{V : Type u_2}
{P : Type u_10}
[NormedField 𝕜]
[SeminormedAddCommGroup V]
[NormedSpace 𝕜 V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
(x y : P)

(AffineIsometryEquiv.pointReflection 𝕜 x) y = x -ᵥ y +ᵥ x


theorem isCobounded_le_of_bot [Preorder α] [OrderBot α] {f : Filter α} : f.IsCobounded (· ≤ ·)

{α : Type u_1}
[Preorder α]
[OrderBot α]
{f : Filter α}

Filter.IsCobounded (fun x x_1 => x ≤ x_1) f


theorem leftUnitor_inv_hom {X : Action V G} : Hom.hom (λ_ X).inv = (λ_ X.V).inv

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

(CategoryTheory.MonoidalCategory.leftUnitor X).inv.hom = (CategoryTheory.MonoidalCategory.leftUnitor X.V).inv


nonrec theorem ContMDiffAt.smul {f : M → 𝕜} {g : M → V} (hf : ContMDiffAt I 𝓘(𝕜) n f x)
    (hg : ContMDiffAt I 𝓘(𝕜, V) n g x) : ContMDiffAt I 𝓘(𝕜, V) n (fun p => f p • g p) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{x : M}
{n : ℕ∞}
{V : Type u_18}
[NormedAddCommGroup V]
[NormedSpace 𝕜 V]
{f : M → 𝕜}
{g : M → V}
(hf : ContMDiffAt I 𝓘(𝕜, 𝕜) n f x)
(hg : ContMDiffAt I 𝓘(𝕜, V) n g x)


@[simp]
theorem map_comp_apply (f : T →+* R) (g : R →+* S) (x : GL n T) :
    (map g).comp (map f) x = map g (map f x)

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[CommRing R]
{S : Type u_1}
{T : Type u_2}
[CommRing S]
[CommRing T]
(f : T →+* R)
(g : R →+* S)
(x : GL n T)

((Matrix.GeneralLinearGroup.map g).comp (Matrix.GeneralLinearGroup.map f)) x =
  (Matrix.GeneralLinearGroup.map g) ((Matrix.GeneralLinearGroup.map f) x)


/-- The `ε`-`δ` definition of `BoxIntegral.HasIntegral`. -/
theorem hasIntegral_iff : HasIntegral I l f vol y ↔
    ∀ ε > (0 : ℝ), ∃ r : ℝ≥0 → ℝⁿ → Ioi (0 : ℝ), (∀ c, l.RCond (r c)) ∧
      ∀ c π, l.MemBaseSet I c (r c) π → IsPartition π → dist (integralSum f vol π) y ≤ ε

{ι : Type u}
{E : Type v}
{F : Type w}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
{I : BoxIntegral.Box ι}
[Fintype ι]
{l : BoxIntegral.IntegrationParams}
{f : (ι → ℝ) → E}
{vol : ι →ᵇᵃ[⊤] E →L[ℝ] F}
{y : F}

BoxIntegral.HasIntegral I l f vol y ↔
  ∀ ε > 0,
    ∃ r,
      (∀ (c : ℝ≥0), l.RCond (r c)) ∧
        ∀ (c : ℝ≥0) (π : BoxIntegral.TaggedPrepartition I),
          l.MemBaseSet I c (r c) π → π.IsPartition → dist (BoxIntegral.integralSum f vol π) y ≤ ε


/-- Functor translating a functor into the category of commutative monoid objects
to a commutative monoid object in the functor category
-/
@[simps!]
def inverse : (C ⥤ CommMon_ D) ⥤ CommMon_ (C ⥤ D)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
[CategoryTheory.MonoidalCategory D]
[CategoryTheory.BraidedCategory D]
(F : C ⥤ CommMon_ D)
(X : C)

(CategoryTheory.Monoidal.CommMonFunctorCategoryEquivalence.inverse.obj F).one.app X = (F.obj X).one


theorem support_sdiff_support_subset_support_add [DecidableEq σ] (p q : MvPolynomial σ R) :
    p.support \ q.support ⊆ (p + q).support

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
[DecidableEq σ]
(p q : MvPolynomial σ R)


/-- The left homology map data associated to the identity morphism of a short complex. -/
@[simps]
def id (h : S.LeftHomologyData) : LeftHomologyMapData (𝟙 S) h h

(CategoryTheory.ShortComplex.LeftHomologyMapData.id h).φH = CategoryTheory.CategoryStruct.id h.H


theorem eq_id_of_epi {x : SimplexCategory} (i : x ⟶ x) [Epi i] : i = 𝟙 _

{x : SimplexCategory}
(i : x ⟶ x)
[CategoryTheory.Epi i]


@[to_additive]
theorem smul_closedBall'' : a • closedBall b r = closedBall (a • b) r

{E : Type u_6}
[SeminormedAddCommGroup E]
{a b : E}
{r : ℝ}

a +ᵥ Metric.closedBall b r = Metric.closedBall (a +ᵥ b) r


lemma memL1_limitProcess_densityProcess (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) {s : Set β} (hs : MeasurableSet s) :
    Memℒp ((countableFiltration γ).limitProcess
      (fun n x ↦ densityProcess κ ν n a x s) (ν a)) 1 (ν a)

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

MeasureTheory.Memℒp
  (MeasureTheory.Filtration.limitProcess (fun n x => κ.densityProcess ν n a x s)
    (ProbabilityTheory.countableFiltration γ) (ν a))
  1 (ν a)


theorem HasLimits.has_limits_of_shape {C : Type u} [Category.{v} C] [HasLimits C] (J : Type v)
    [Category.{v} J] : HasLimitsOfShape J C

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


theorem ite_ae_eq_of_measure_compl_zero {γ} (f : α → γ) (g : α → γ)
    (s : Set α) [DecidablePred (· ∈ s)] (hs_zero : μ sᶜ = 0) :
    (fun x => ite (x ∈ s) (f x) (g x)) =ᵐ[μ] f

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{γ : Type u_5}
(f g : α → γ)
(s : Set α)
[DecidablePred fun x => x ∈ s]
(hs_zero : μ sᶜ = 0)

(fun x => if x ∈ s then f x else g x) =ᵐ[μ] f


theorem uniqueDiffWithinAt_Iio (a : ℝ) : UniqueDiffWithinAt ℝ (Iio a) a


/-- A nonzero continuous linear functional is open. -/
protected theorem isOpenMap_of_ne_zero [TopologicalSpace R] [DivisionRing R] [ContinuousSub R]
    [AddCommGroup M] [TopologicalSpace M] [ContinuousAdd M] [Module R M] [ContinuousSMul R M]
    (f : M →L[R] R) (hf : f ≠ 0) : IsOpenMap f

{R : Type u_1}
{M : Type u_2}
[TopologicalSpace R]
[DivisionRing R]
[ContinuousSub R]
[AddCommGroup M]
[TopologicalSpace M]
[ContinuousAdd M]
[Module R M]
[ContinuousSMul R M]
(f : M →L[R] R)
(hf : f ≠ 0)


/-- The induced algebra morphism from the quotient by the kernel is injective. -/
theorem kerLiftAlg_injective (f : A →ₐ[R₁] B) : Function.Injective (kerLiftAlg f)

{R₁ : Type u_1}
{A : Type u_3}
{B : Type u_4}
[CommSemiring R₁]
[CommRing A]
[Algebra R₁ A]
[Semiring B]
[Algebra R₁ B]
(f : A →ₐ[R₁] B)


/-- `reverse` is a no-op over `CliffordAlgebraComplex.Q`. -/
theorem reverse_apply (x : CliffordAlgebra Q) : reverse (R := ℝ) x = x

(x : CliffordAlgebra CliffordAlgebraComplex.Q)


theorem dist_next_apply_le_of_le {f₁ f₂ : FunSpace v} {n : ℕ} {d : ℝ}
    (h : ∀ t, dist (f₁ t) (f₂ t) ≤ (v.L * |t.1 - v.t₀|) ^ n / n ! * d) (t : Icc v.tMin v.tMax) :
    dist (next f₁ t) (next f₂ t) ≤ (v.L * |t.1 - v.t₀|) ^ (n + 1) / (n + 1)! * d

(h : ∀ (t : ↑(Set.Icc v.tMin v.tMax)), dist (f₁.toFun t) (f₂.toFun t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * d)

dist (f₁.next.toFun t) (f₂.next.toFun t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ (n + 1) / ↑(n + 1)! * d


@[simp]
theorem prime_nth_prime (n : ℕ) : Prime (nth Prime n)


@[simp]
theorem mersenne_le_mersenne {p q : ℕ} : mersenne p ≤ mersenne q ↔ p ≤ q


@[simp]
protected lemma smul_comp {n₁ n₂ n₁₂ : ℤ} (k : R) (z₁ : Cochain F G n₁) (z₂ : Cochain G K n₂)
    (h : n₁ + n₂ = n₁₂) : (k • z₁).comp z₂ h = k • (z₁.comp z₂ h)

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

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


theorem closure_smul₀ {E} [Zero E] [MulActionWithZero G₀ E] [TopologicalSpace E] [T1Space E]
    [ContinuousConstSMul G₀ E] (c : G₀) (s : Set E) : closure (c • s) = c • closure s

{G₀ : Type u_4}
[GroupWithZero G₀]
{E : Type u_5}
[Zero E]
[MulActionWithZero G₀ E]
[TopologicalSpace E]
[T1Space E]
[ContinuousConstSMul G₀ E]
(c : G₀)
(s : Set E)


@[simp]
theorem zero_comp (g : β →co γ) : (0 : C₀(γ, δ)).comp g = 0

{β : Type v}
{γ : Type w}
{δ : Type u_2}
[TopologicalSpace β]
[TopologicalSpace γ]
[TopologicalSpace δ]
[Zero δ]
(g : CocompactMap β γ)


lemma polynomialY_eq : W.polynomialY =
    C 2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2

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

W.polynomialY =
  MvPolynomial.C 2 * MvPolynomial.X 1 * MvPolynomial.X 2 + MvPolynomial.C W.a₁ * MvPolynomial.X 0 * MvPolynomial.X 2 +
    MvPolynomial.C W.a₃ * MvPolynomial.X 2 ^ 2


theorem closure_union (s t : Set R) : closure (s ∪ t) = closure s ⊔ closure t

Subring.closure (s ∪ t) = Subring.closure s ⊔ Subring.closure t


theorem LieIdeal.lowerCentralSeries_map_eq (k : ℕ) {f : L →ₗ⁅R⁆ L'} (h : Function.Surjective f) :
    LieIdeal.map f (lowerCentralSeries R L L k) = lowerCentralSeries R L' L' k

{R : Type u}
{L : Type v}
{L' : Type w}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(k : ℕ)
{f : L →ₗ⁅R⁆ L'}
(h : Function.Surjective ⇑f)

LieIdeal.map f (LieModule.lowerCentralSeries R L L k) = LieModule.lowerCentralSeries R L' L' k


theorem continuous_pi_iff : Continuous f ↔ ∀ i, Continuous fun a => f a i

{X : Type u}
{ι : Type u_5}
{π : ι → Type u_6}
[TopologicalSpace X]
[T : (i : ι) → TopologicalSpace (π i)]
{f : X → (i : ι) → π i}

Continuous f ↔ ∀ (i : ι), Continuous fun a => f a i


theorem DifferentiableOn.differentiableAt (h : DifferentiableOn 𝕜 f s) (hs : s ∈ 𝓝 x) :
    DifferentiableAt 𝕜 f x

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


@[simp]
protected theorem add_tsub_tsub_cancel (hac : AddLECancellable (a - c)) (h : c ≤ a) :
    a + b - (a - c) = b + c

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


@[simp]
theorem mem_vadd_const_affineSegment {x y z : V} (p : P) :
    z +ᵥ p ∈ affineSegment R (x +ᵥ p) (y +ᵥ p) ↔ z ∈ affineSegment R x y

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


lemma epi_iff_surjective_up_to_refinements (f : X ⟶ Y) :
    Epi f ↔ ∀ ⦃A : C⦄ (y : A ⟶ Y),
      ∃ (A' : C) (π : A' ⟶ A) (_ : Epi π) (x : A' ⟶ X), π ≫ y = x ≫ f

{C : Type u_2}
[CategoryTheory.Category.{u_1, u_2} C]
[CategoryTheory.Abelian C]
{X Y : C}
(f : X ⟶ Y)

CategoryTheory.Epi f ↔
  ∀ ⦃A : C⦄ (y : A ⟶ Y),
    ∃ A' π,
      ∃ (_ : CategoryTheory.Epi π), ∃ x, CategoryTheory.CategoryStruct.comp π y = CategoryTheory.CategoryStruct.comp x f


@[to_additive]
theorem tendsto_inv_nhdsWithin_Iio_inv {a : H} : Tendsto Inv.inv (𝓝[<] a⁻¹) (𝓝[>] a)

{H : Type x}
[TopologicalSpace H]
[OrderedAddCommGroup H]
[ContinuousNeg H]
{a : H}

Filter.Tendsto Neg.neg (𝓝[<] (-a)) (𝓝[>] a)


@[to_additive]
theorem StrictMonoOn.inv (hf : StrictMonoOn f s) : StrictAntiOn (fun x => (f x)⁻¹) s

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

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


theorem map_id_eq : map (𝟭 C) = 𝟭 (ThinSkeleton C)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[Quiver.IsThin C]

CategoryTheory.ThinSkeleton.map (CategoryTheory.Functor.id C) =
  CategoryTheory.Functor.id (CategoryTheory.ThinSkeleton C)


theorem surjective_onto_image {f : α → β} {s : Set α} : Surjective (imageFactorization f s)

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

Function.Surjective (Set.imageFactorization f s)


@[simp] theorem top_mul (hm : m ≠ 0) : ⊤ * m = ⊤


@[simp]
theorem exp_lt_one_iff {x : ℝ} : exp x < 1 ↔ x < 0


@[simp]
theorem nhdsWithin_Ioc_eq_nhdsWithin_Ioi {a b : α} (h : a < b) : 𝓝[Ioc a b] a = 𝓝[>] a

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIciTopology α]
{a b : α}
(h : a < b)


@[simp] theorem gcd_gcd_self_left_right (m n : Nat) : gcd (gcd n m) m = gcd n m


theorem Lex.noMaxOrder' [Preorder ι] [∀ i, LT (β i)] (i : ι) [NoMaxOrder (β i)] :
    NoMaxOrder (Lex (∀ i, β i))

{ι : Type u_1}
{β : ι → Type u_2}
[Preorder ι]
[(i : ι) → LT (β i)]
(i : ι)
[NoMaxOrder (β i)]


@[simp]
theorem mul_inv_cancel_left₀ (h : a ≠ 0) (b : G₀) : a * (a⁻¹ * b) = b

{G₀ : Type u}
[GroupWithZero G₀]
{a : G₀}
(h : a ≠ 0)
(b : G₀)


@[to_additive (attr := simp)]
theorem mulSupport_mulIndicator :
    Function.mulSupport (s.mulIndicator f) = s ∩ Function.mulSupport f

{α : Type u_1}
{M : Type u_4}
[One M]
{s : Set α}
{f : α → M}


@[simp]
theorem norm_conjTranspose [StarAddMonoid α] [NormedStarGroup α] (A : Matrix m n α) : ‖Aᴴ‖ = ‖A‖

{m : Type u_3}
{n : Type u_4}
{α : Type u_5}
[Fintype m]
[Fintype n]
[SeminormedAddCommGroup α]
[StarAddMonoid α]
[NormedStarGroup α]
(A : Matrix m n α)


/-- Given a set `A` and a set `B` inside it, we can shrink `A` to any appropriate size, and keep `B`
inside it. -/
@[deprecated exists_subsuperset_card_eq (since := "2024-06-23")]
theorem exists_intermediate_set {A B : Finset α} (i : ℕ) (h₁ : i + card B ≤ card A) (h₂ : B ⊆ A) :
    ∃ C : Finset α, B ⊆ C ∧ C ⊆ A ∧ card C = i + card B

{α : Type u_1}
{A B : Finset α}
(i : ℕ)
(h₁ : i + B.card ≤ A.card)
(h₂ : B ⊆ A)

∃ C, B ⊆ C ∧ C ⊆ A ∧ C.card = i + B.card


lemma Antivary.mul_right₀ (hg₁ : 0 ≤ g₁) (hg₂ : 0 ≤ g₂) (h₁ : Antivary f g₁) (h₂ : Antivary f g₂) :
    Antivary f (g₁ * g₂)

{ι : Type u_1}
{α : Type u_2}
{β : Type u_3}
[LinearOrderedSemiring α]
[LinearOrderedSemiring β]
{f : ι → α}
{g₁ g₂ : ι → β}
(hg₁ : 0 ≤ g₁)
(hg₂ : 0 ≤ g₂)
(h₁ : Antivary f g₁)
(h₂ : Antivary f g₂)


@[simp, norm_cast] theorem intCast_mul (a b : Int) :
    ((a * b : Int) : Rat) = (a : Rat) * (b : Rat)


theorem IsCycle.exists_zpow_eq : IsCycle f → f x ≠ x → f y ≠ y → ∃ i : ℤ, (f ^ i) x = y

{α : Type u_2}
{f : Equiv.Perm α}
{x y : α}

f.IsCycle → f x ≠ x → f y ≠ y → ∃ i, (f ^ i) x = y


theorem Perm.foldl_eq' {f : β → α → β} {l₁ l₂ : List α} (p : l₁ ~ l₂)
    (comm : ∀ x ∈ l₁, ∀ y ∈ l₁, ∀ (z), f (f z x) y = f (f z y) x)
    (init) : foldl f init l₁ = foldl f init l₂

{f : β → α → β}

(comm : ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₁ → ∀ (z : β), f (f z x) y = f (f z y) x)

List.foldl f init l₁ = List.foldl f init l₂


@[simp, mfld_simps]
theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(e : PartialEquiv α β)
(e' : PartialEquiv β γ)

(e.trans e').target = e'.target ∩ ↑e'.symm ⁻¹' e.target


nonrec theorem Infinitesimal.not_infinite {x : ℝ*} (h : Infinitesimal x) : ¬Infinite x


@[to_additive]
theorem eq_symm_comp {α : Type*} (e : M ≃* N) (f : α → M) (g : α → N) :
    f = e.symm ∘ g ↔ e ∘ f = g

{M : Type u_6}
{N : Type u_7}
[Mul M]
[Mul N]
{α : Type u_12}
(e : M ≃* N)
(f : α → M)
(g : α → N)


theorem mem_antidiagonalTuple {n : ℕ} {k : ℕ} {x : Fin k → ℕ} :
    x ∈ antidiagonalTuple k n ↔ ∑ i, x i = n

x ∈ Finset.Nat.antidiagonalTuple k n ↔ ∑ i : Fin k, x i = n


/-- **The Jordan decomposition theorem**: Given a signed measure `s`, there exists a pair of
mutually singular measures `μ` and `ν` such that `s = μ - ν`. In this case, the measures `μ`
and `ν` are given by `s.toJordanDecomposition.posPart` and
`s.toJordanDecomposition.negPart` respectively.

Note that we use `MeasureTheory.JordanDecomposition.toSignedMeasure` to represent the
signed measure corresponding to
`s.toJordanDecomposition.posPart - s.toJordanDecomposition.negPart`. -/
@[simp]
theorem toSignedMeasure_toJordanDecomposition (s : SignedMeasure α) :
    s.toJordanDecomposition.toSignedMeasure = s

{α : Type u_1}
[MeasurableSpace α]
(s : MeasureTheory.SignedMeasure α)


{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
(f : α → E)
(g : α → F)


protected theorem IsPrefix.sublist (h : l₁ <+: l₂) : l₁ <+ l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁ <+: l₂ → l₁ <+ l₂


@[to_additive (attr := simp)]
theorem mulEquivOfQuotient_symm_mk' (x y) :
    (mulEquivOfQuotient f).symm (f.mk' x y) = (monoidOf S).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).symm (f.mk' x y) = (AddLocalization.addMonoidOf S).mk' x y


@[simp]
theorem IsTerminal.comp_from {Z : C} (t : IsTerminal Z) {X Y : C} (f : X ⟶ Y) :
    f ≫ t.from Y = t.from X

(t : CategoryTheory.Limits.IsTerminal Z)


@[to_additive]
theorem lt_mul_of_lt_of_one_lt' [CovariantClass α α (· * ·) (· ≤ ·)] {a b c : α} (hbc : b < c)
    (ha : 1 < a) :
    b < c * a

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


@[to_additive]
theorem subset_interior_smul_right : s • interior t ⊆ interior (s • t)

{α : Type u}
{β : Type v}
[TopologicalSpace β]
[AddGroup α]
[AddAction α β]
[ContinuousConstVAdd α β]
{s : Set α}
{t : Set β}


theorem lt_add_one_of_le {n m : Nat} : n ≤ m → n < m + 1


@[measurability]
theorem measurable_log : Measurable log


/-- The range of `toSpanSingleton x` is the span of `x`. -/
theorem span_singleton_eq_range (x : M) : (R ∙ x) = range (toSpanSingleton R M x)

(R : Type u_1)
(M : Type u_4)
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x : M)

Submodule.span R {x} = LinearMap.range (LinearMap.toSpanSingleton R M x)


@[simp]
theorem mem_one (x : List α) : x ∈ (1 : Language α) ↔ x = []


theorem natSepDegree_X_sub_C_pow {x : F} {n : ℕ} :
    ((X - C x) ^ n).natSepDegree = if n = 0 then 0 else 1

((Polynomial.X - Polynomial.C x) ^ n).natSepDegree = if n = 0 then 0 else 1


@[to_additive (attr := simp)]
theorem le_inv_mul_iff_mul_le : b ≤ a⁻¹ * c ↔ a * b ≤ c

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


lemma descSigma_ext_iff {K : HomologicalComplex C c}
    (x y : Σ (α : G ⟶ K), Homotopy (φ ≫ α) 0) :
    x = y ↔ x.1 = y.1 ∧ (∀ (i j : ι) (_ : c.Rel j i), x.2.hom i j = y.2.hom i j)

(x y : (α : G ⟶ K) × Homotopy (φ ≫ α) 0)

x = y ↔ x.fst = y.fst ∧ ∀ (i j : ι), c.Rel j i → x.snd.hom i j = y.snd.hom i j


/-- `AddMonoidAlgebra.grade` describe an internally graded algebra. -/
theorem grade.isInternal : DirectSum.IsInternal (grade R : ι → Submodule R _)

{ι : Type u_2}
{R : Type u_3}
[DecidableEq ι]
[AddMonoid ι]
[CommSemiring R]


/-- The image of `R` in `S` is linearly disjoint with any other submodules. -/
theorem one_left : (1 : Submodule R S).LinearDisjoint N

{R : Type u}
{S : Type v}
[CommSemiring R]
[Semiring S]
[Algebra R S]
(N : Submodule R S)


@[simp]
theorem mem_toSubsemiring {S : StarSubsemiring R} {x} : x ∈ S.toSubsemiring ↔ x ∈ S

{R : Type v}
[NonAssocSemiring R]
[StarRing R]
{S : StarSubsemiring R}
{x : R}


/-- `OrderRingHom α β` is the type of order-preserving semiring isomorphisms between `α` and `β`.

When possible, instead of parametrizing results over `(f : OrderRingIso α β)`,
you should parametrize over `(F : Type*) [OrderRingIsoClass F α β] (f : F)`.

When you extend this structure, make sure to extend `OrderRingIsoClass`. -/
structure OrderRingIso (α β : Type*) [Mul α] [Mul β] [Add α] [Add β] [LE α] [LE β] extends
  α ≃+* β where
  /-- The proposition that the function preserves the order bijectively. -/
  map_le_map_iff' {a b : α} : toFun a ≤ toFun b ↔ a ≤ b

{α : Type u_6}
{β : Type u_7}
[Mul α]
[Mul β]
[Add α]
[Add β]
[LE α]
[LE β]
(self : α ≃+*o β)
{a b : α}


@[simp]
lemma leftUnitor_hom_app (F : J ⥤ C) (j : J) :
    (λ_ F).hom.app j = (λ_ (F.obj j)).hom

{J : Type u_1}
{C : Type u_2}
[CategoryTheory.Category.{u_3, u_1} J]
[CategoryTheory.Category.{u_4, u_2} C]
[CategoryTheory.ChosenFiniteProducts C]
(F : CategoryTheory.Functor J C)
(j : J)

(CategoryTheory.MonoidalCategory.leftUnitor F).hom.app j = (CategoryTheory.MonoidalCategory.leftUnitor (F.obj j)).hom


theorem approximates_deriv_on_open_nhds (hf : HasStrictFDerivAt f (f' : E →L[𝕜] F) a) :
    ∃ s : Set E, a ∈ s ∧ IsOpen s ∧
      ApproximatesLinearOn f (f' : E →L[𝕜] F) s (‖(f'.symm : F →L[𝕜] E)‖₊⁻¹ / 2)

{𝕜 : 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}
{a : E}
(hf : HasStrictFDerivAt f (↑f') a)

∃ s, a ∈ s ∧ IsOpen s ∧ ApproximatesLinearOn f (↑f') s (‖↑f'.symm‖₊⁻¹ / 2)


theorem commProb_eq_one_iff [h : Nonempty M] :
    commProb M = 1 ↔ Commutative ((· * ·) : M → M → M)

{M : Type u_1}
[Mul M]
[Finite M]
[h : Nonempty M]

commProb M = 1 ↔ Commutative fun x x_1 => x * x_1


/-- If `a ≠ 0` then the cosine zeta function is entire. -/
lemma differentiable_cosZeta_of_ne_zero {a : UnitAddCircle} (ha : a ≠ 0) :
    Differentiable ℂ (cosZeta a)

Differentiable ℂ (HurwitzZeta.cosZeta a)


/-- Coercion to functions as a monoid homomorphism to `Function.End G`. -/
@[simps (config := .asFn)]
def toEnd : (G →+c[a, a] G) →* Function.End G


protected theorem MonotoneOn.Ico (hf : MonotoneOn f s) (hg : AntitoneOn g s) :
    AntitoneOn (fun x => Ico (f x) (g x)) s

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

AntitoneOn (fun x => Set.Ico (f x) (g x)) s


/-- `val_v(v) = 1`, when `v` is regarded as a fractional ideal. -/
theorem count_self : count K v (v.asIdeal : FractionalIdeal R⁰ K) = 1

(v : IsDedekindDomain.HeightOneSpectrum R)

FractionalIdeal.count K v ↑v.asIdeal = 1


/-- The **Sauer-Shelah lemma**. -/
lemma card_shatterer_le_sum_vcDim [Fintype α] :
    𝒜.shatterer.card ≤ ∑ k ∈ Iic 𝒜.vcDim, (Fintype.card α).choose k

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

𝒜.shatterer.card ≤ ∑ k ∈ Finset.Iic 𝒜.vcDim, (Fintype.card α).choose k


/--
The equivalence between `IrreducibleCloseds α` and `{x : Set α // IsClosed x ∧ IsIrreducible x }`.
-/
@[simps apply symm_apply]
def equivSubtype' : IrreducibleCloseds α ≃ { x : Set α // IsClosed x ∧ IsIrreducible x }

(a : TopologicalSpace.IrreducibleCloseds α)

TopologicalSpace.IrreducibleCloseds.equivSubtype' a = ⟨a.carrier, ⋯⟩


/-- Bijection between a submonoid `H` and its opposite. -/
@[to_additive (attr := simps!) "Bijection between an additive submonoid `H` and its opposite."]
def equivOp (H : Submonoid M) : H ≃ H.op

{M : Type u_2}
[AddZeroClass M]
(H : AddSubmonoid M)
(a : { a // (fun x => x ∈ H) a })


@[reassoc]
theorem tensor_id_comp_id_tensor (f : W ⟶ X) (g : Y ⟶ Z) : (g ⊗ 𝟙 W) ≫ (𝟙 Z ⊗ f) = g ⊗ f

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.MonoidalCategory.tensorHom g (CategoryTheory.CategoryStruct.id W))
    (CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.CategoryStruct.id Z) f) =
  CategoryTheory.MonoidalCategory.tensorHom g f


{α : Type u_1}
[PartialOrder α]
[BoundedOrder α]
[IsSimpleOrder α]
[DecidableEq α]


/-- Continuity of `(x, y) ↦ x ^ y` as a function on `ℝ × ℂ`. -/
theorem continuousAt_ofReal_cpow (x : ℝ) (y : ℂ) (h : 0 < y.re ∨ x ≠ 0) :
    ContinuousAt (fun p => (p.1 : ℂ) ^ p.2 : ℝ × ℂ → ℂ) (x, y)

ContinuousAt (fun p => ↑p.1 ^ p.2) (x, y)


theorem Ioc_eq_finset_subtype : Ioc a b = (Ioc (a : ℕ) b).subtype fun n : ℕ => 0 < n

Finset.Ioc a b = Finset.subtype (fun n => 0 < n) (Finset.Ioc ↑a ↑b)


theorem Convex.combo_closure_interior_mem_interior {s : Set E} (hs : Convex 𝕜 s) {x y : E}
    (hx : x ∈ closure s) (hy : y ∈ interior s) {a b : 𝕜} (ha : 0 ≤ a) (hb : 0 < b)
    (hab : a + b = 1) : a • x + b • y ∈ interior s

{𝕜 : Type u_2}
{E : Type u_3}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[TopologicalSpace E]
[TopologicalAddGroup E]
[ContinuousConstSMul 𝕜 E]
{s : Set E}
(hs : Convex 𝕜 s)
{x y : E}
(hx : x ∈ closure s)
(hy : y ∈ interior s)
{a b : 𝕜}
(ha : 0 ≤ a)
(hb : 0 < b)
(hab : a + b = 1)


theorem sum_le_of_monotoneOn_Icc (f : α → E) {s : Set α} {m n : ℕ} {u : ℕ → α}
    (hu : MonotoneOn u (Icc m n)) (us : ∀ i ∈ Icc m n, u i ∈ s) :
    (∑ i ∈ Finset.Ico m n, edist (f (u (i + 1))) (f (u i))) ≤ eVariationOn f s

{α : Type u_1}
[LinearOrder α]
{E : Type u_2}
[PseudoEMetricSpace E]
(f : α → E)
{s : Set α}
{m n : ℕ}
{u : ℕ → α}
(hu : MonotoneOn u (Set.Icc m n))
(us : ∀ i ∈ Set.Icc m n, u i ∈ s)

∑ i ∈ Finset.Ico m n, edist (f (u (i + 1))) (f (u i)) ≤ eVariationOn f s


lemma eventually_log_b_mul_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < log (b i * n)

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

∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), 0 < Real.log (b i * ↑n)


@[to_additive (attr := simp, to_additive) (reorder := 5 6) smul_apply]
theorem pow_apply [∀ i, Pow (f i) β] (x : ∀ i, f i) (b : β) (i : I) : (x ^ b) i = x i ^ b

{I : Type u}
{β : Type u_2}
{f : I → Type v₁}
[(i : I) → VAdd β (f i)]
(b : β)
(x : (i : I) → f i)
(i : I)


/-- Seminorm-balls containing the origin are absorbent. -/
protected theorem absorbent_closedBall (hpr : p x < r) : Absorbent 𝕜 (closedBall p x r)

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


theorem tendsto_verticalIntegral (hb : 0 < b.re) (c : ℝ) :
    Tendsto (verticalIntegral b c) atTop (𝓝 0)

Filter.Tendsto (GaussianFourier.verticalIntegral b c) Filter.atTop (𝓝 0)


@[simp]
theorem exists_iff_ne_zero {p : G₀ → Prop} : (∃ u : G₀ˣ, p u) ↔ ∃ x ≠ 0, p x

{G₀ : Type u_3}
[GroupWithZero G₀]
{p : G₀ → Prop}


/-- The functor `ComposableArrows C m ⥤ ComposableArrows C n` obtained by precomposition with
a functor `Fin (n + 1) ⥤ Fin (m + 1)`. -/
@[simps!]
def whiskerLeftFunctor (Φ : Fin (n + 1) ⥤ Fin (m + 1)) :
    ComposableArrows C m ⥤ ComposableArrows C n

(Φ : CategoryTheory.Functor (Fin (n + 1)) (Fin (m + 1)))

(F : CategoryTheory.ComposableArrows C m)

∀ {X Y : Fin (n + 1)} (f : X ⟶ Y),
  ((CategoryTheory.ComposableArrows.whiskerLeftFunctor Φ).obj F).map f = F.map (Φ.map f)


theorem mem_circle_iff_normSq {z : ℂ} : z ∈ circle ↔ normSq z = 1


@[to_additive]
theorem smoothAt_finprod
    (lf : LocallyFinite fun i ↦ mulSupport <| f i) (h : ∀ i, SmoothAt I' I (f i) x₀) :
    SmoothAt I' I (fun x ↦ ∏ᶠ i, f i x) x₀

(lf : LocallyFinite fun i => Function.mulSupport (f i))

SmoothAt I' I (fun x => ∏ᶠ (i : ι), f i x) x₀


theorem u_csInf (gc : GaloisConnection l u) {s : Set β} (hne : s.Nonempty) (hbdd : BddBelow s) :
    u (sInf s) = ⨅ x : s, u x

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
[ConditionallyCompleteLattice β]
{l : α → β}
{u : β → α}
(gc : GaloisConnection l u)
{s : Set β}
(hne : s.Nonempty)
(hbdd : BddBelow s)


@[to_additive]
theorem ball_div_one : ball 1 δ / s = thickening δ s⁻¹

{E : Type u_1}
[SeminormedAddCommGroup E]
(δ : ℝ)
(s : Set E)

Metric.ball 0 δ - s = Metric.thickening δ (-s)


theorem add_one_le_of_lt {a b : Int} (H : a < b) : a + 1 ≤ b


/-- `id x = x`, as a `@[simp]` lemma. -/
@[simp] theorem id_eq (a : α) : Eq (id a) a


/-- If a function defined on a topological group has compact support, then either
the function is trivial or the group is locally compact. -/
@[to_additive
      "If a function defined on a topological additive group has compact support,
      then either the function is trivial or the group is locally compact."]
theorem HasCompactSupport.eq_zero_or_locallyCompactSpace_of_group
    [TopologicalSpace α] [Zero α] [T1Space α]
    {f : G → α} (hf : HasCompactSupport f) (h'f : Continuous f) :
    f = 0 ∨ LocallyCompactSpace G

{G : Type w}
{α : Type u}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
[TopologicalSpace α]
[Zero α]
[T1Space α]
{f : G → α}
(hf : HasCompactSupport f)
(h'f : Continuous f)


@[simp]
theorem IccExtend_left (f : Icc a b → β) : IccExtend h f a = f ⟨a, left_mem_Icc.2 h⟩

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a b : α}
(h : a ≤ b)
(f : ↑(Set.Icc a b) → β)


@[simp]
theorem lift_comp_ι (g : CliffordAlgebra Q →ₐ[R] A) :
    lift Q ⟨g.toLinearMap.comp (ι Q), comp_ι_sq_scalar _⟩ = g

{R : Type u_1}
[CommRing R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
{A : Type u_3}
[Semiring A]
[Algebra R A]
(g : CliffordAlgebra Q →ₐ[R] A)

(CliffordAlgebra.lift Q) ⟨g.toLinearMap ∘ₗ CliffordAlgebra.ι Q, ⋯⟩ = g


@[simp]
theorem preimage_inl_range_inr : Sum.inl ⁻¹' range (Sum.inr : β → α ⊕ β) = ∅


theorem mkDerivation_monomial (f : σ → A) (s : σ →₀ ℕ) (r : R) :
    mkDerivation R f (monomial s r) =
      r • s.sum fun i k => monomial (s - Finsupp.single i 1) (k : R) • f i

{σ : Type u_1}
(R : Type u_2)
{A : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[Module (MvPolynomial σ R) A]
[IsScalarTower R (MvPolynomial σ R) A]
(f : σ → A)
(s : σ →₀ ℕ)
(r : R)

(MvPolynomial.mkDerivation R f) ((MvPolynomial.monomial s) r) =
  r • s.sum fun i k => (MvPolynomial.monomial (s - Finsupp.single i 1)) ↑k • f i


/-- The box product is commutative up to isomorphism. `Equiv.prodComm` as a graph isomorphism. -/
@[simps!]
def boxProdComm : G □ H ≃g H □ G

{α : Type u_1}
{β : Type u_2}
(G : SimpleGraph α)
(H : SimpleGraph β)

∀ (a : α × β), (G.boxProdComm H) a = a.swap


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

(CategoryTheory.ShortComplex.LeftHomologyMapData.zero h₁ h₂).φH = 0


theorem eval_nodal_not_at_node [Nontrivial R] [NoZeroDivisors R] {x : R}
    (hx : ∀ i ∈ s, x ≠ v i) : eval x (nodal s v) ≠ 0

{R : Type u_1}
[CommRing R]
{ι : Type u_2}
{s : Finset ι}
{v : ι → R}
[Nontrivial R]
[NoZeroDivisors R]
{x : R}
(hx : ∀ i ∈ s, x ≠ v i)

Polynomial.eval x (Lagrange.nodal s v) ≠ 0


lemma ConcaveOn.smul_convexOn' (hf : ConcaveOn 𝕜 s f) (hg : ConvexOn 𝕜 s g)
    (hf₀ : ∀ ⦃x⦄, x ∈ s → f x ≤ 0) (hg₀ : ∀ ⦃x⦄, x ∈ s → 0 ≤ g x) (hfg : AntivaryOn f g s) :
    ConcaveOn 𝕜 s (f • g)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[LinearOrderedCommRing 𝕜]
[LinearOrderedCommRing E]
[LinearOrderedAddCommGroup F]
[Module 𝕜 E]
[Module 𝕜 F]
[Module E F]
[IsScalarTower 𝕜 E F]
[SMulCommClass 𝕜 E F]
[OrderedSMul 𝕜 F]
[OrderedSMul E F]
{s : Set 𝕜}
{f : 𝕜 → E}
{g : 𝕜 → F}
(hf : ConcaveOn 𝕜 s f)
(hg : ConvexOn 𝕜 s g)
(hf₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → f x ≤ 0)
(hg₀ : ∀ ⦃x : 𝕜⦄, x ∈ s → 0 ≤ g x)
(hfg : AntivaryOn f g s)


@[simp]
theorem rTensorHomEquivHomRTensor_apply (x : (M →ₗ[R] P) ⊗[R] Q) :
    rTensorHomEquivHomRTensor R M P Q x = rTensorHomToHomRTensor R M P Q x

{R : Type u}
{M : Type v₁}
{P : Type v₃}
{Q : Type v₄}
[CommRing R]
[AddCommGroup M]
[AddCommGroup P]
[AddCommGroup Q]
[Module R M]
[Module R P]
[Module R Q]
[Module.Free R M]
[Module.Finite R M]
(x : TensorProduct R (M →ₗ[R] P) Q)

(rTensorHomEquivHomRTensor R M P Q) x = (TensorProduct.rTensorHomToHomRTensor R M P Q) x


theorem toNat_add_nat {a : Int} (ha : 0 ≤ a) (n : Nat) : (a + n).toNat = a.toNat + n


@[reassoc (attr := simp)]
lemma XIsoOfEq_hom_comp_XIsoOfEq_hom (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι}
    (h₁₂ : p₁ = p₂) (h₂₃ : p₂ = p₃) :
    (K.XIsoOfEq h₁₂).hom ≫ (K.XIsoOfEq h₂₃).hom = (K.XIsoOfEq (h₁₂.trans h₂₃)).hom

(K.XIsoOfEq h₁₂).hom ≫ (K.XIsoOfEq h₂₃).hom = (K.XIsoOfEq ⋯).hom


theorem continuous_comp (hfc : Continuous f) (hgc : Continuous g) : Continuous (g.comp f)

(hfc : OmegaCompletePartialOrder.Continuous f)

(hgc : OmegaCompletePartialOrder.Continuous g)


theorem le_of_not_le {a b : α} : ¬a ≤ b → b ≤ a

¬a ≤ b → b ≤ a


theorem HasFiniteIntegral.left_of_add_measure {f : α → β} (h : HasFiniteIntegral f (μ + ν)) :
    HasFiniteIntegral f μ

(h : MeasureTheory.HasFiniteIntegral f (μ + ν))


/-- If a simplicial object `X` in an additive category is split,
then `PInfty` vanishes on all the summands of `X _[n]` which do
not correspond to the identity of `[n]`. -/
theorem cofan_inj_comp_PInfty_eq_zero {X : SimplicialObject C} (s : SimplicialObject.Splitting X)
    {n : ℕ} (A : SimplicialObject.Splitting.IndexSet (op [n])) (hA : ¬A.EqId) :
    (s.cofan _).inj A ≫ PInfty.f n = 0

(A : SimplicialObject.Splitting.IndexSet (Opposite.op [n]))

(s.cofan (Opposite.op [n])).inj A ≫ AlgebraicTopology.DoldKan.PInfty.f n = 0


theorem subset_singleton_iff' {s : Finset α} {a : α} : s ⊆ {a} ↔ ∀ b ∈ s, b = a


@[simp]
theorem apply (n : ℕ) (f : C(I, ℝ)) (x : I) :
    bernsteinApproximation n f x = ∑ k : Fin (n + 1), f k/ₙ * bernstein n k x

(bernsteinApproximation n f) x = ∑ k : Fin (n + 1), f k/ₙ * (bernstein n ↑k) x


theorem bot_prime [IsDomain α] : (⊥ : Ideal α).IsPrime


theorem cos_le_one_div_sqrt_sq_add_one {x : ℝ} (hx1 : -(3 * π / 2) ≤ x) (hx2 : x ≤ 3 * π / 2) :
    cos x ≤ (1 : ℝ) / √(x ^ 2 + 1)


@[simp]
theorem comp_f : (f ≫ g).1 = f.1 ≫ g.1

{V₀ V₁ V₂ : CategoryTheory.Endofunctor.Coalgebra F}

(CategoryTheory.CategoryStruct.comp f g).f = CategoryTheory.CategoryStruct.comp f.f g.f


@[simp]
theorem mk_apply (m : M) (n : N) : mk R M N m n = m ⊗ₜ n

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

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


theorem expand_expand (f : R[X]) : expand R p (expand R q f) = expand R (p * q) f

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

(Polynomial.expand R p) ((Polynomial.expand R q) f) = (Polynomial.expand R (p * q)) f


theorem coe_nnreal_eq (r : ℝ≥0) : (r : ℝ≥0∞) = ENNReal.ofReal r


@[to_additive]
theorem tprod_tprod_eq_mulSingle (f : β → γ → α) (b : β) (c : γ) (hfb : ∀ b' ≠ b, f b' c = 1)
    (hfc : ∀ b', ∀ c' ≠ c, f b' c' = 1) : ∏' (b') (c'), f b' c' = f b c

(f : β → γ → α)


theorem exists_right_move_equiv_iff_fuzzy_zero : (∃ j, G.moveRight j ≈ 0) ↔ G ‖ 0


theorem symm_apply_eq_mk_continuousLinearEquivAt_symm (e : Trivialization F (π F E)) [e.IsLinear R]
    (b : B) (hb : b ∈ e.baseSet) (z : F) :
    e.toPartialHomeomorph.symm ⟨b, z⟩ = ⟨b, (e.continuousLinearEquivAt R b hb).symm z⟩

[TopologicalSpace (Bundle.TotalSpace F E)]

(e : Trivialization F Bundle.TotalSpace.proj)

↑e.symm (b, z) = { proj := b, snd := (Trivialization.continuousLinearEquivAt R e b hb).symm z }


/-- The image of an element `p` of `FreeAddMonoid (R × Π i, s i)` in the `PiTensorProduct` is
equal to the sum of `a • ⨂ₜ[R] i, m i` over all the entries `(a, m)` of `p`.
-/
lemma _root_.FreeAddMonoid.toPiTensorProduct (p : FreeAddMonoid (R × Π i, s i)) :
    AddCon.toQuotient (c := addConGen (PiTensorProduct.Eqv R s)) p =
    List.sum (List.map (fun x ↦ x.1 • ⨂ₜ[R] i, x.2 i) p)

(p : FreeAddMonoid (R × ((i : ι) → s i)))

↑p = (List.map (fun x => x.1 • ⨂ₜ[R] (i : ι), x.2 i) p).sum


theorem mem_normalizer_iff' (x : L) : x ∈ H.normalizer ↔ ∀ y : L, y ∈ H → ⁅y, x⁆ ∈ H

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
(x : L)


@[to_additive]
theorem pow_comp [Monoid γ] [ContinuousMul γ] (f : C(β, γ)) (n : ℕ) (g : C(α, β)) :
    (f ^ n).comp g = f.comp g ^ n

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[TopologicalSpace α]
[TopologicalSpace β]
[TopologicalSpace γ]
[Monoid γ]
[ContinuousMul γ]
(f : C(β, γ))
(n : ℕ)
(g : C(α, β))


theorem top_prod (s : NonUnitalSubring S) :
    (⊤ : NonUnitalSubring R).prod s = s.comap (NonUnitalRingHom.snd R S)

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
(s : NonUnitalSubring S)

⊤.prod s = NonUnitalSubring.comap (NonUnitalRingHom.snd R S) s


@[to_additive]
lemma mulSupport_sup [SemilatticeSup M] (f g : α → M) :
    mulSupport (fun x ↦ f x ⊔ g x) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_2}
{M : Type u_4}
[Zero M]
[SemilatticeSup M]
(f g : α → M)

(Function.support fun x => f x ⊔ g x) ⊆ Function.support f ∪ Function.support g


lemma isSheafStonean
    [∀ Y, HasLimitsOfShape (StructuredArrow Y Stonean.toCompHaus.{u}.op) A] :
    Presheaf.IsSheaf (coherentTopology Stonean)
    (Stonean.toCompHaus.op ⋙ X.val)

[∀ (Y : CompHausᵒᵖ), CategoryTheory.Limits.HasLimitsOfShape (CategoryTheory.StructuredArrow Y Stonean.toCompHaus.op) A]

CategoryTheory.Presheaf.IsSheaf (CategoryTheory.coherentTopology Stonean) (Stonean.toCompHaus.op ⋙ X.val)


@[simp]
theorem continuousMultilinearCurryFin1_symm_apply (f : G →L[𝕜] G') (v : Fin 1 → G) :
    (continuousMultilinearCurryFin1 𝕜 G G').symm f v = f (v 0)

{𝕜 : Type u}
{G : Type wG}
{G' : Type wG'}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
[NormedAddCommGroup G']
[NormedSpace 𝕜 G']
(f : G →L[𝕜] G')
(v : Fin 1 → G)

((continuousMultilinearCurryFin1 𝕜 G G').symm f) v = f (v 0)


/-- The universal property that a derivation `d : M.Derivation φ` must
satisfy so that the presheaf of modules `M` can be considered as the presheaf of
(relative) differentials of a presheaf of commutative rings `φ : S ⟶ F.op ⋙ R`. -/
structure Universal where
  /-- An absolyte derivation of `M'` descends as a morphism `M ⟶ M'`. -/
  desc {M' : PresheafOfModules (R ⋙ forget₂ CommRingCat RingCat)}
    (d' : M'.Derivation φ) : M ⟶ M'
  fac {M' : PresheafOfModules (R ⋙ forget₂ CommRingCat RingCat)}
    (d' : M'.Derivation φ) : d.postcomp (desc d') = d' := by aesop_cat
  postcomp_injective {M' : PresheafOfModules (R ⋙ forget₂ CommRingCat RingCat)}
    (φ φ' : M ⟶ M') (h : d.postcomp φ = d.postcomp φ') : φ = φ' := by aesop_cat

{M : PresheafOfModules (R ⋙ CategoryTheory.forget₂ CommRingCat RingCat)}

{M' : PresheafOfModules (R ⋙ CategoryTheory.forget₂ CommRingCat RingCat)}

∀ (φ_1 φ' : M ⟶ M'), d.postcomp φ_1 = d.postcomp φ' → φ_1 = φ'


theorem zero_le_add_left_neg (x : PGame) : 0 ≤ -x + x


/-- A conditionally complete lattice is a lattice in which
every nonempty subset which is bounded above has a supremum, and
every nonempty subset which is bounded below has an infimum.
Typical examples are real numbers or natural numbers.

To differentiate the statements from the corresponding statements in (unconditional)
complete lattices, we prefix sInf and subₛ by a c everywhere. The same statements should
hold in both worlds, sometimes with additional assumptions of nonemptiness or
boundedness. -/
class ConditionallyCompleteLattice (α : Type*) extends Lattice α, SupSet α, InfSet α where
  /-- `a ≤ sSup s` for all `a ∈ s`. -/
  le_csSup : ∀ s a, BddAbove s → a ∈ s → a ≤ sSup s
  /-- `sSup s ≤ a` for all `a ∈ upperBounds s`. -/
  csSup_le : ∀ s a, Set.Nonempty s → a ∈ upperBounds s → sSup s ≤ a
  /-- `sInf s ≤ a` for all `a ∈ s`. -/
  csInf_le : ∀ s a, BddBelow s → a ∈ s → sInf s ≤ a
  /-- `a ≤ sInf s` for all `a ∈ lowerBounds s`. -/
  le_csInf : ∀ s a, Set.Nonempty s → a ∈ lowerBounds s → a ≤ sInf s

{α : Type u_5}
[self : ConditionallyCompleteLattice α]
(s : Set α)
(a : α)


/-- Let `K/F` be an algebraic extension of fields and `L` a field in which all the minimal
polynomial over `F` of elements of `K` splits. Then, for `x ∈ K`, the images of `x` by the
`F`-algebra morphisms from `K` to `L` are exactly the roots in `L` of the minimal polynomial
of `x` over `F`. -/
theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly_of_splits {F K : Type*} (L : Type*)
    [Field F] [Field K] [Field L] [Algebra F L] [Algebra F K]
    (hA : ∀ x : K, (minpoly F x).Splits (algebraMap F L))
    [Algebra.IsAlgebraic F K] (x : K) :
    (Set.range fun (ψ : K →ₐ[F] L) => ψ x) = (minpoly F x).rootSet L

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

(Set.range fun ψ => ψ x) = (minpoly F x).rootSet L


@[simp]
theorem not_isMin [NoMinOrder α] (a : α) : ¬IsMin a

{α : Type u_1}
[Preorder α]
[NoMinOrder α]
(a : α)


theorem associated_gcd_right_iff [GCDMonoid α] {x y : α} : Associated y (gcd x y) ↔ y ∣ x

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


@[simp]
theorem abs_I : Complex.abs I = 1


theorem sup_eq_lsub_iff_succ {ι : Type u} (f : ι → Ordinal.{max u v}) :
    sup.{_, v} f = lsub.{_, v} f ↔ ∀ a < lsub.{_, v} f, succ a < lsub.{_, v} f

Ordinal.sup f = Ordinal.lsub f ↔ ∀ a < Ordinal.lsub f, Order.succ a < Ordinal.lsub f


@[to_additive]
lemma Subgroup.tendsto_coe_cofinite_of_discrete [T2Space G] (H : Subgroup G) [DiscreteTopology H] :
    Tendsto ((↑) : H → G) cofinite (cocompact _)

{G : Type u_1}
[Group G]
[TopologicalSpace G]
[TopologicalGroup G]
[T2Space G]
(H : Subgroup G)
[DiscreteTopology ↥H]

Filter.Tendsto Subtype.val Filter.cofinite (Filter.cocompact G)


@[simp]
lemma mk_singleton_self (x : R) : mk (Ideal.span {x}) x = 0

(Ideal.Quotient.mk (Ideal.span {x})) x = 0


lemma restrictSubtype_dual' (hM : M.E = E) : (M.restrictSubtype E)✶ = M✶.restrictSubtype E

{α : Type u_1}
{E : Set α}
{M : Matroid α}
(hM : M.E = E)


/-- A point `c` belongs the perpendicular bisector of `[p₁, p₂] iff `p₂ -ᵥ p₁` is orthogonal to
`c -ᵥ midpoint ℝ p₁ p₂`. -/
theorem mem_perpBisector_iff_inner_eq_zero' :
    c ∈ perpBisector p₁ p₂ ↔ ⟪p₂ -ᵥ p₁, c -ᵥ midpoint ℝ p₁ p₂⟫ = 0

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{c p₁ p₂ : P}

c ∈ AffineSubspace.perpBisector p₁ p₂ ↔ ⟪p₂ -ᵥ p₁, c -ᵥ midpoint ℝ p₁ p₂⟫_ℝ = 0


@[simp]
protected theorem symm_preimage_preimage (e : M₁ ≃SL[σ₁₂] M₂) (s : Set M₂) :
    e.symm ⁻¹' (e ⁻¹' s) = s

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


@[simp]
theorem tprod_nil (μ : ∀ i, Measure (π i)) : Measure.tprod [] μ = dirac PUnit.unit

(μ : (i : δ) → MeasureTheory.Measure (π i))

MeasureTheory.Measure.tprod [] μ = MeasureTheory.Measure.dirac PUnit.unit


/-- An isomorphism of graphs induces an equivalence of edge sets. -/
@[simps]
def mapEdgeSet : G.edgeSet ≃ G'.edgeSet

{V : Type u_1}
{W : Type u_2}
{G : SimpleGraph V}
{G' : SimpleGraph W}
(f : G ≃g G')
(e : ↑G'.edgeSet)

f.mapEdgeSet.symm e = SimpleGraph.Hom.mapEdgeSet (RelIso.toRelEmbedding f.symm).toRelHom e


/-- Characterization of multiplicative identity -/
theorem one_def [Nonempty N] : (1 : HomotopyGroup N X x) = ⟦const⟧

{N : Type u_1}
{X : Type u_2}
[TopologicalSpace X]
{x : X}
[DecidableEq N]
[Nonempty N]


theorem exists_surjective_iff {α β : Sort*} :
    (∃ f : α → β, Surjective f) ↔ Nonempty (α → β) ∧ Nonempty (β ↪ α)

(∃ f, Function.Surjective f) ↔ Nonempty (α → β) ∧ Nonempty (β ↪ α)


theorem exists_pos_left (h : SameRay R x y) (hx : x ≠ 0) (hy : y ≠ 0) :
    ∃ r : R, 0 < r ∧ r • x = y

{R : Type u_1}
[LinearOrderedField R]
{M : Type u_2}
[AddCommGroup M]
[Module R M]
{x y : M}
(h : SameRay R x y)
(hx : x ≠ 0)
(hy : y ≠ 0)


/-- For subgroups generated by a single element, see the simpler `zpow_induction_left`. -/
@[to_additive (attr := elab_as_elim)
  "For additive subgroups generated by a single element, see the simpler
  `zsmul_induction_left`."]
theorem closure_induction_left {p : (x : G) → x ∈ closure s → Prop} (one : p 1 (one_mem _))
    (mul_left : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy → p (x * y) (mul_mem (subset_closure hx) hy))
    (mul_left_inv : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy →
      p (x⁻¹ * y) (mul_mem (inv_mem (subset_closure hx)) hy))
    {x : G} (h : x ∈ closure s) : p x h

{p : (x : G) → x ∈ AddSubgroup.closure s → Prop}

(mul_left : ∀ (x : G) (hx : x ∈ s) (y : G) (hy : y ∈ AddSubgroup.closure s), p y hy → p (x + y) ⋯)

(mul_left_inv : ∀ (x : G) (hx : x ∈ s) (y : G) (hy : y ∈ AddSubgroup.closure s), p y hy → p (-x + y) ⋯)


theorem Unbounded.mono (hst : s ⊆ t) (hs : Unbounded r s) : Unbounded r t

{α : Type u_1}
{r : α → α → Prop}
{s t : Set α}
(hst : s ⊆ t)
(hs : Set.Unbounded r s)


/-- Shifting by `i` and shifting by `j` forms an equivalence when `i + j = 0`. -/
@[simps]
def shiftEquiv' (i j : A) (h : i + j = 0) : C ≌ C

(C : Type u)
{A : Type u_1}
[CategoryTheory.Category.{v, u} C]
[AddGroup A]
[CategoryTheory.HasShift C A]
(i j : A)
(h : i + j = 0)

(CategoryTheory.shiftEquiv' C i j h).functor = CategoryTheory.shiftFunctor C i


theorem Balanced.inter (hA : Balanced 𝕜 A) (hB : Balanced 𝕜 B) : Balanced 𝕜 (A ∩ B)

{𝕜 : Type u_1}
{E : Type u_3}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
{A B : Set E}
(hA : Balanced 𝕜 A)
(hB : Balanced 𝕜 B)


theorem const_smul_mem_Lp (c : 𝕜) (f : Lp E p μ) : c • (f : α →ₘ[μ] E) ∈ Lp E p μ

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{𝕜 : Type u_5}
[NormedRing 𝕜]
[Module 𝕜 E]
[BoundedSMul 𝕜 E]
(c : 𝕜)
(f : ↥(MeasureTheory.Lp E p μ))


lemma isClosed_iff_derivedSet_subset (A : Set X) : IsClosed A ↔ derivedSet A ⊆ A

{X : Type u_1}
[TopologicalSpace X]
(A : Set X)


theorem finiteType {f : A →+* B} (hf : f.Finite) : FiniteType f

{A : Type u_1}
{B : Type u_2}
[CommRing A]
[CommRing B]
{f : A →+* B}
(hf : f.Finite)


@[simp]
theorem augment_X_zero (C : ChainComplex V ℕ) {X : V} (f : C.X 0 ⟶ X) (w : C.d 1 0 ≫ f = 0) :
    (augment C f w).X 0 = X


@[simp, norm_cast] lemma coe_mul (f g : α →+* α) : ⇑(f * g) = f ∘ g

∀ {x : NonAssocSemiring α} (f g : α →+* α), ⇑(f * g) = ⇑f ∘ ⇑g


@[simp]
theorem dualDual_symm_apply (a : αᵒᵈᵒᵈ) : (dualDual α).symm a = ofDual (ofDual a)

(OrderIso.dualDual α).symm a = OrderDual.ofDual (OrderDual.ofDual a)


@[simp]
theorem take_take {s : Stream' α} : ∀ {m n}, (s.take n).take m = s.take (min n m)

List.take m (Stream'.take n s) = Stream'.take (min n m) s


@[simp]
theorem _root_.Submodule.toAddSubgroup_toZModSubmodule (S : Submodule (ZMod n) M) :
    toZModSubmodule n S.toAddSubgroup = S

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

(AddSubgroup.toZModSubmodule n) S.toAddSubgroup = S


theorem of_pow : ∀ n : ℕ, Irrational (x ^ n) → Irrational x


theorem isCobounded_ge_of_top [Preorder α] [OrderTop α] {f : Filter α} : f.IsCobounded (· ≥ ·)

{α : Type u_1}
[Preorder α]
[OrderTop α]
{f : Filter α}

Filter.IsCobounded (fun x x_1 => x ≥ x_1) f


/-- If a family is convex independent, so is any subfamily indexed by a subtype of the index type.
-/
protected theorem ConvexIndependent.subtype {p : ι → E} (hc : ConvexIndependent 𝕜 p) (s : Set ι) :
    ConvexIndependent 𝕜 fun i : s => p i

{𝕜 : Type u_1}
{E : Type u_2}
{ι : Type u_3}
[OrderedSemiring 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{p : ι → E}
(hc : ConvexIndependent 𝕜 p)
(s : Set ι)


/-- The composition of morphisms of snake inputs. -/
@[simps]
def comp (f : Hom S₁ S₂) (g : Hom S₂ S₃) : Hom S₁ S₃

{S₁ S₂ S₃ : CategoryTheory.ShortComplex.SnakeInput C}

(f.comp g).f₃ = CategoryTheory.CategoryStruct.comp f.f₃ g.f₃


@[simp]
theorem zero_rpow {x : ℝ} (h : x ≠ 0) : (0 : ℝ≥0) ^ x = 0


@[to_additive] lemma mabs_le' : |a|ₘ ≤ b ↔ a ≤ b ∧ a⁻¹ ≤ b

{α : Type u_1}
[Lattice α]
[Group α]
{a b : α}


theorem cauchy_series_of_le_geometric {C : ℝ} {u : ℕ → α} {r : ℝ} (hr : r < 1)
    (h : ∀ n, ‖u n‖ ≤ C * r ^ n) : CauchySeq fun n ↦ ∑ k ∈ range n, u k

{α : Type u_1}
[SeminormedAddCommGroup α]
{C : ℝ}
{u : ℕ → α}
{r : ℝ}
(hr : r < 1)
(h : ∀ (n : ℕ), ‖u n‖ ≤ C * r ^ n)

CauchySeq fun n => ∑ k ∈ Finset.range n, u k


@[to_additive (attr := simp)]
theorem coe_bot : ((⊥ : Submonoid M) : Set M) = {1}


lemma rnDeriv_restrict (μ ν : Measure α) [HaveLebesgueDecomposition μ ν] [SigmaFinite ν]
    {s : Set α} (hs : MeasurableSet s) :
    (μ.restrict s).rnDeriv ν =ᵐ[ν] s.indicator (μ.rnDeriv ν)

{α : Type u_1}
{m : MeasurableSpace α}
(μ ν : MeasureTheory.Measure α)
[μ.HaveLebesgueDecomposition ν]
[MeasureTheory.SigmaFinite ν]
{s : Set α}
(hs : MeasurableSet s)


@[to_additive (attr := aesop safe 20 apply (rule_sets := [Measurable]))]
protected theorem mul [Mul β] [ContinuousMul β] (hf : AEStronglyMeasurable f μ)
    (hg : AEStronglyMeasurable g μ) : AEStronglyMeasurable (f * g) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

(hg : MeasureTheory.AEStronglyMeasurable g μ)

MeasureTheory.AEStronglyMeasurable (f * g) μ


theorem dist_lt_iff (C0 : (0 : ℝ) < C) : dist f g < C ↔ ∀ x : α, dist (f x) (g x) < C

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[CompactSpace α]
[MetricSpace β]
{f g : C(α, β)}
{C : ℝ}
(C0 : 0 < C)

dist f g < C ↔ ∀ (x : α), dist (f x) (g x) < C


theorem LDL.lowerInv_triangular {i j : n} (hij : i < j) : LDL.lowerInv hS i j = 0

{𝕜 : Type u_1}
[RCLike 𝕜]
{n : Type u_2}
[LinearOrder n]
[IsWellOrder n fun x x_1 => x < x_1]
[LocallyFiniteOrderBot n]
{S : Matrix n n 𝕜}
[Fintype n]
(hS : S.PosDef)
{i j : n}
(hij : i < j)


/-- The homology data on a short complex equipped with a splitting. -/
@[simps]
noncomputable def homologyData [HasZeroObject C] (s : S.Splitting) : S.HomologyData

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


theorem exp_inj_of_neg_pi_lt_of_le_pi {x y : ℂ} (hx₁ : -π < x.im) (hx₂ : x.im ≤ π) (hy₁ : -π < y.im)
    (hy₂ : y.im ≤ π) (hxy : exp x = exp y) : x = y

{x y : ℂ}
(hx₁ : -Real.pi < x.im)
(hx₂ : x.im ≤ Real.pi)
(hy₁ : -Real.pi < y.im)
(hy₂ : y.im ≤ Real.pi)
(hxy : Complex.exp x = Complex.exp y)