theorem LocallyFinite.option_elim' (hf : LocallyFinite f) (s : Set X) :
    LocallyFinite (Option.elim' s f)

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


@[to_additive add_const]
theorem AntitoneOn.mul_const' [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : AntitoneOn f s)
    (a : α) :
    AntitoneOn (fun x => f x * a) s

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


/-- A section over a compact open of a scheme is nilpotent if and only if its associated
basic open is empty. -/
lemma Scheme.isNilpotent_iff_basicOpen_eq_bot_of_isCompact {X : Scheme.{u}}
    {U : X.Opens} (hU : IsCompact (U : Set X)) (f : Γ(X, U)) :
    IsNilpotent f ↔ X.basicOpen f = ⊥

{X : AlgebraicGeometry.Scheme}
{U : X.Opens}
(hU : IsCompact ↑U)
(f : ↑Γ(X, U))


/-- If a `Finset` is a subset of the image of a `Set` under `f`,
then it is equal to the `Finset.image` of a `Finset` subset of that `Set`. -/
theorem subset_image_iff [DecidableEq β] {s : Set α} {t : Finset β} {f : α → β} :
    ↑t ⊆ f '' s ↔ ∃ s' : Finset α, ↑s' ⊆ s ∧ s'.image f = t

{α : Type u_1}
{β : Type u_2}
[DecidableEq β]
{s : Set α}
{t : Finset β}
{f : α → β}

↑t ⊆ f '' s ↔ ∃ s', ↑s' ⊆ s ∧ Finset.image f s' = t


@[to_additive]
theorem le_mulRothNumber_product (s : Finset α) (t : Finset β) :
    mulRothNumber s * mulRothNumber t ≤ mulRothNumber (s ×ˢ t)

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

addRothNumber s * addRothNumber t ≤ addRothNumber (s ×ˢ t)


theorem CondIndepSets.condIndep'
    {p1 p2 : Set (Set Ω)} (hp1m : ∀ s ∈ p1, MeasurableSet s) (hp2m : ∀ s ∈ p2, MeasurableSet s)
    (hp1 : IsPiSystem p1) (hp2 : IsPiSystem p2) (hyp : CondIndepSets m' hm' p1 p2 μ) :
    CondIndep m' (generateFrom p1) (generateFrom p2) hm' μ

(hyp : ProbabilityTheory.CondIndepSets m' hm' p1 p2 μ)

ProbabilityTheory.CondIndep m' (MeasurableSpace.generateFrom p1) (MeasurableSpace.generateFrom p2) hm' μ


theorem mem_iff {U : R} : U ∈ unitary R ↔ star U * U = 1 ∧ U * star U = 1

{R : Type u_1}
[Monoid R]
[StarMul R]
{U : R}


@[simp, norm_cast]
theorem of_intCast [AddGroupWithOne α] (n : ℤ) : ((n : ZNum) : α) = n

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


theorem const_inj {x y : β} : (const x : CauSeq β abv) = const y ↔ x = y

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
{x y : β}

CauSeq.const abv x = CauSeq.const abv y ↔ x = y


/-- A generalization of the **Matrix determinant lemma** -/
theorem det_add_mul {A : Matrix m m α} (U : Matrix m n α)
    (V : Matrix n m α) (hA : IsUnit A.det) :
    (A + U * V).det = A.det * (1 + V * A⁻¹ * U).det

{m : Type u_2}
{n : Type u_3}
{α : Type u_4}
[Fintype m]
[Fintype n]
[DecidableEq m]
[DecidableEq n]
[CommRing α]
{A : Matrix m m α}
(U : Matrix m n α)
(V : Matrix n m α)
(hA : IsUnit A.det)


nonrec theorem le_of_forall_pos_le_add {a b : ℝ≥0} (h : ∀ ε, 0 < ε → a ≤ b + ε) : a ≤ b

{a b : ℝ≥0}
(h : ∀ (ε : ℝ≥0), 0 < ε → a ≤ b + ε)


/-- The topological closure of a normal subgroup is normal. -/
@[to_additive "The topological closure of a normal additive subgroup is normal."]
theorem Subgroup.is_normal_topologicalClosure {G : Type*} [TopologicalSpace G] [Group G]
    [TopologicalGroup G] (N : Subgroup G) [N.Normal] : (Subgroup.topologicalClosure N).Normal

{G : Type u_1}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(N : AddSubgroup G)
[N.Normal]


@[simp]
theorem mem_treesOfNumNodesEq {x : Tree Unit} {n : ℕ} :
    x ∈ treesOfNumNodesEq n ↔ x.numNodes = n

x ∈ Tree.treesOfNumNodesEq n ↔ x.numNodes = n


theorem Nodup.add_iff (d₁ : Nodup s) (d₂ : Nodup t) : Nodup (s + t) ↔ Disjoint s t

{α : Type u_1}
{s t : Multiset α}
(d₁ : s.Nodup)
(d₂ : t.Nodup)


theorem rel_foldr : ((R ⇒ P ⇒ P) ⇒ P ⇒ Forall₂ R ⇒ P) foldr foldr

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{R : α → β → Prop}
{P : γ → δ → Prop}

((R ⇒ P ⇒ P) ⇒ P ⇒ List.Forall₂ R ⇒ P) List.foldr List.foldr


@[simp]
protected theorem Complex.inner (w z : ℂ) : ⟪w, z⟫_ℝ = (conj w * z).re


/-- If `f : ℝ → ℝ` is convex on `S` and right-differentiable at `x ∈ S`, then the slope of any
secant line with left endpoint at `x` is bounded below by the right derivative of `f` at `x`. -/
lemma le_slope_of_hasDerivWithinAt_Ioi (hfc : ConvexOn ℝ S f)
    (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y) (hf' : HasDerivWithinAt f f' (Ioi x) x) :
    f' ≤ slope f x y

(hf' : HasDerivWithinAt f f' (Set.Ioi x) x)


protected theorem biUnion (h : IsPartition π) (hi : ∀ J ∈ π, IsPartition (πi J)) :
    IsPartition (π.biUnion πi)

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


@[simp]
theorem edist_ofDual (a b : Xᵒᵈ) : edist (ofDual a) (ofDual b) = edist a b

edist (OrderDual.ofDual a) (OrderDual.ofDual b) = edist a b


@[to_additive]
theorem commute_subtype_of_commute
    (hcomm : Pairwise fun i j : ι => ∀ x y : G, x ∈ H i → y ∈ H j → Commute x y) (i j : ι)
    (hne : i ≠ j) :
    ∀ (x : H i) (y : H j), Commute ((H i).subtype x) ((H j).subtype y)

(hcomm : Pairwise fun i j => ∀ (x y : G), x ∈ H i → y ∈ H j → AddCommute x y)

AddCommute ((H i).subtype x) ((H j).subtype y)


@[gcongr]
theorem Icc_subset_Icc_left (h : a₁ ≤ a₂) : Icc a₂ b ⊆ Icc a₁ b

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


/-- Let `f : ℝ → ℝ` be a differentiable function. If `f' ≤ C`, then `f` grows at most as fast
as `C * x`, i.e., `f y - f x ≤ C * (y - x)` whenever `x ≤ y`. -/
theorem image_sub_le_mul_sub_of_deriv_le {f : ℝ → ℝ} (hf : Differentiable ℝ f) {C}
    (le_hf' : ∀ x, deriv f x ≤ C) ⦃x y⦄ (hxy : x ≤ y) : f y - f x ≤ C * (y - x)

{f : ℝ → ℝ}
(hf : Differentiable ℝ f)
{C : ℝ}
(le_hf' : ∀ (x : ℝ), deriv f x ≤ C)
⦃x y : ℝ⦄
(hxy : x ≤ y)


theorem idealOfSet_isMaximal_iff (s : Opens X) :
    (idealOfSet 𝕜 (s : Set X)).IsMaximal ↔ IsCoatom s

{X : Type u_1}
(𝕜 : Type u_2)
[RCLike 𝕜]
[TopologicalSpace X]
[CompactSpace X]
[T2Space X]
(s : TopologicalSpace.Opens X)

(ContinuousMap.idealOfSet 𝕜 ↑s).IsMaximal ↔ IsCoatom s


@[simp]
theorem toAdd_ofAdd (x : α) : toAdd (ofAdd x) = x

Multiplicative.toAdd (Multiplicative.ofAdd x) = x


/-- An n-ary version of `Set.mul_subset_mul`. -/
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) :
    (t.map f₁).prod ⊆ (t.map f₂).prod

{ι : Type u_1}
{α : Type u_2}
[AddCommMonoid α]
(t : List ι)
(f₁ f₂ : ι → Set α)
(hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)

(List.map f₁ t).sum ⊆ (List.map f₂ t).sum


/-- If two unoriented angles are equal, and the signs of the corresponding oriented angles are
equal, then the oriented angles are equal (even in degenerate cases). -/
theorem oangle_eq_of_angle_eq_of_sign_eq {w x y z : V}
    (h : InnerProductGeometry.angle w x = InnerProductGeometry.angle y z)
    (hs : (o.oangle w x).sign = (o.oangle y z).sign) : o.oangle w x = o.oangle y z

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


theorem IciExtend_apply (f : Ici a → β) (x : α) : IciExtend f x = f ⟨max a x, le_max_left _ _⟩

{α : Type u_1}
{β : Type u_2}
[LinearOrder α]
{a : α}
(f : ↑(Set.Ici a) → β)
(x : α)


theorem lintegral_mul_le_Lp_mul_Lq_of_ne_zero_of_eq_top {p q : ℝ} (hp0_lt : 0 < p) (hq0 : 0 ≤ q)
    {f g : α → ℝ≥0∞} (hf_top : ∫⁻ a, f a ^ p ∂μ = ⊤) (hg_nonzero : (∫⁻ a, g a ^ q ∂μ) ≠ 0) :
    (∫⁻ a, (f * g) a ∂μ) ≤ (∫⁻ a, f a ^ p ∂μ) ^ (1 / p) * (∫⁻ a, g a ^ q ∂μ) ^ (1 / q)

(hg_nonzero : ∫⁻ (a : α), g a ^ q ∂μ ≠ 0)


@[to_additive (attr := simp)]
lemma mem_iff_toUnits_mem_units (H : Subgroup G) (x : G) : toUnits x ∈ H.units ↔ x ∈ H

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


theorem Prime.dvd_mul_of_dvd_ne {p1 p2 n : ℕ} (h_neq : p1 ≠ p2) (pp1 : Prime p1) (pp2 : Prime p2)
    (h1 : p1 ∣ n) (h2 : p2 ∣ n) : p1 * p2 ∣ n

{p1 p2 n : ℕ}
(h_neq : p1 ≠ p2)
(pp1 : Nat.Prime p1)
(pp2 : Nat.Prime p2)
(h1 : p1 ∣ n)
(h2 : p2 ∣ n)


/-- **First moment method**. The minimum of an integrable function is smaller than its mean. -/
theorem exists_le_setAverage (hμ : μ s ≠ 0) (hμ₁ : μ s ≠ ∞) (hf : IntegrableOn f s μ) :
    ∃ x ∈ s, f x ≤ ⨍ a in s, f a ∂μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{f : α → ℝ}
(hμ : μ s ≠ 0)
(hμ₁ : μ s ≠ ⊤)
(hf : MeasureTheory.IntegrableOn f s μ)


theorem pushforward_cover_iff_cover_pullback [G.Full] [G.Faithful] {X : C} (S : Sieve X) :
    K _ (S.functorPushforward G) ↔ ∃ T : K (G.obj X), T.val.functorPullback G = S

(K : CategoryTheory.GrothendieckTopology D)

K.sieves (G.obj X) (CategoryTheory.Sieve.functorPushforward G S) ↔ ∃ T, CategoryTheory.Sieve.functorPullback G ↑T = S


theorem differentiable_pi : Differentiable 𝕜 Φ ↔ ∀ i, Differentiable 𝕜 fun x => Φ x i

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{ι : Type u_6}
[Fintype ι]
{F' : ι → Type u_7}
[(i : ι) → NormedAddCommGroup (F' i)]
[(i : ι) → NormedSpace 𝕜 (F' i)]
{Φ : E → (i : ι) → F' i}

Differentiable 𝕜 Φ ↔ ∀ (i : ι), Differentiable 𝕜 fun x => Φ x i


@[simp]
lemma biUnion_nonempty : (s.biUnion t).Nonempty ↔ ∃ x ∈ s, (t x).Nonempty

{α : Type u_1}
{β : Type u_2}
{s : Finset α}
{t : α → Finset β}
[DecidableEq β]


@[to_additive]
theorem leftInverse_inv_mul_mul_right (c : G) :
    Function.LeftInverse (fun x ↦ c⁻¹ * x) fun x ↦ c * x

Function.LeftInverse (fun x => c⁻¹ * x) fun x => c * x


lemma measurableEmbedding_embeddingReal (Ω : Type*) [MeasurableSpace Ω] [StandardBorelSpace Ω] :
    MeasurableEmbedding (embeddingReal Ω)

(Ω : Type u_2)
[MeasurableSpace Ω]
[StandardBorelSpace Ω]


theorem drop_eq_nil_of_le {as : List α} {i : Nat} (h : as.length ≤ i) : as.drop i = []

{α : Type u}
{as : List α}
{i : Nat}
(h : as.length ≤ i)


@[simp]
theorem lift_pred (o : Ordinal.{v}) : lift.{u} (pred o) = pred (lift.{u} o)

Ordinal.lift.{u, v} o.pred = (Ordinal.lift.{u, v} o).pred


@[to_additive]
theorem prod_map_prod_map (m : Multiset β) (n : Multiset γ) {f : β → γ → α} :
    prod (m.map fun a => prod <| n.map fun b => f a b) =
      prod (n.map fun b => prod <| m.map fun a => f a b)

{α : Type u_3}
{β : Type u_4}
{γ : Type u_5}
[AddCommMonoid α]
(m : Multiset β)
(n : Multiset γ)
{f : β → γ → α}

(Multiset.map (fun a => (Multiset.map (fun b => f a b) n).sum) m).sum =
  (Multiset.map (fun b => (Multiset.map (fun a => f a b) m).sum) n).sum


@[to_additive]
lemma prod_map_le_prod (f : α → α) (h : ∀ x, x ∈ s → f x ≤ x) : (s.map f).prod ≤ s.prod

{α : Type u_2}
[OrderedAddCommMonoid α]
{s : Multiset α}
(f : α → α)
(h : ∀ x ∈ s, f x ≤ x)


lemma mem_closure_iff_forall_mem_flat (X : Set α) (hX : X ⊆ M.E := by aesop_mat) :
    e ∈ M.closure X ↔ ∀ F, M.Flat F → X ⊆ F → e ∈ F

{α : Type u_2}
{M : Matroid α}
{e : α}
(X : Set α)
(hX : X ⊆ M.E := by aesop_mat)

e ∈ M.closure X ↔ ∀ (F : Set α), M.Flat F → X ⊆ F → e ∈ F


theorem inducing_pullbackTotalSpaceEmbedding (f : B' → B) :
    Inducing (@pullbackTotalSpaceEmbedding B F E B' f)

[TopologicalSpace (Bundle.TotalSpace F E)]


@[simp]
theorem eq_rec_inj {a a' : α} (h : a = a') {C : α → Type*} (x y : C a) :
    (Eq.ndrec x h : C a') = Eq.ndrec y h ↔ x = y

{α : Sort u_1}
{a a' : α}
(h : a = a')
{C : α → Type u_3}
(x y : C a)


/-- The identification `- ⊗ X = mop (unmop X ⊗ -)` as a natural isomorphism. -/
@[simps!]
def MonoidalOpposite.tensorRightIso (X : Cᴹᵒᵖ) :
    tensorRight X ≅ unmopFunctor C ⋙ tensorLeft (unmop X) ⋙ mopFunctor C

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

∀ (X_1 : Cᴹᵒᵖ), (X.tensorRightIso.inv.app X_1).unmop = 𝟙 (CategoryTheory.MonoidalCategory.tensorObj X.unmop X_1.unmop)


theorem card_commonNeighbors_le_degree_left [DecidableRel G.Adj] (v w : V) :
    Fintype.card (G.commonNeighbors v w) ≤ G.degree v

{V : Type u_1}
(G : SimpleGraph V)
[Fintype V]
[DecidableRel G.Adj]
(v w : V)

Fintype.card ↑(G.commonNeighbors v w) ≤ G.degree v


/-- If `s ⊆ t`, then the diameter of `s` is bounded by that of `t`, provided `t` is bounded. -/
theorem diam_mono {s t : Set α} (h : s ⊆ t) (ht : IsBounded t) : diam s ≤ diam t

{α : Type u}
[PseudoMetricSpace α]
{s t : Set α}
(h : s ⊆ t)
(ht : Bornology.IsBounded t)


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

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


theorem map_update_sum {α : Type*} [DecidableEq ι] (t : Finset α) (i : ι) (g : α → M₁ i)
    (m : ∀ i, M₁ i) : f (update m i (∑ a ∈ t, g a)) = ∑ a ∈ t, f (update m i (g a))

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

f (Function.update m i (∑ a ∈ t, g a)) = ∑ a ∈ t, f (Function.update m i (g a))


lemma basicOpen_pow {n : ℕ} (h : 0 < n) : X.basicOpen (f ^ n) = X.basicOpen f

(X : AlgebraicGeometry.Scheme)
{U : X.Opens}
(f : ↑(X.presheaf.obj (Opposite.op U)))
{n : ℕ}
(h : 0 < n)


@[simp]
theorem coe_toCoalgEquiv : ⇑(e : A ≃ₐ[R] B) = e

{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]
(e : A ≃ₐc[R] B)


@[simp]
theorem irrational_rat_div_iff : Irrational (q / x) ↔ q ≠ 0 ∧ Irrational x

Irrational (↑q / x) ↔ q ≠ 0 ∧ Irrational x


theorem isPrime_iff_mem_or_mem [IsProper I] : IsPrime I ↔ ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I

{P : Type u_1}
[SemilatticeInf P]
{I : Order.Ideal P}
[I.IsProper]

I.IsPrime ↔ ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I


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

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

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


@[simp, norm_cast]
lemma AddMonoidHom.coe_toMultiplicative'' [AddZeroClass α] [MulOneClass β] (f : α →+ Additive β) :
    ⇑(toMultiplicative'' f) = toMul ∘ f ∘ toAdd

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

⇑(AddMonoidHom.toMultiplicative'' f) = ⇑Additive.toMul ∘ ⇑f ∘ ⇑Multiplicative.toAdd


@[to_additive (attr := continuity) continuous_norm]
theorem continuous_norm' : Continuous fun a : E => ‖a‖


@[reassoc]
theorem map_π_preserves_coequalizer_inv_colimMap {X' Y' : D} (f' g' : X' ⟶ Y')
    [HasCoequalizer f' g'] (p : G.obj X ⟶ X') (q : G.obj Y ⟶ Y') (wf : G.map f ≫ q = p ≫ f')
    (wg : G.map g ≫ q = p ≫ g') :
    G.map (coequalizer.π f g) ≫
        (PreservesCoequalizer.iso G f g).inv ≫
          colimMap (parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) =
      q ≫ coequalizer.π f' g'

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

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.parallelPair f g) G]

G.map (CategoryTheory.Limits.coequalizer.π f g) ≫
    (CategoryTheory.Limits.PreservesCoequalizer.iso G f g).inv ≫
      CategoryTheory.Limits.colimMap (CategoryTheory.Limits.parallelPairHom (G.map f) (G.map g) f' g' p q wf wg) =
  q ≫ CategoryTheory.Limits.coequalizer.π f' g'


theorem Filter.EventuallyEq.contMDiffAt_iff (h₁ : f₁ =ᶠ[𝓝 x] f) :
    ContMDiffAt I I' n f₁ x ↔ ContMDiffAt I I' n f x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{f f₁ : M → M'}
{x : M}
{n : ℕ∞}
(h₁ : f₁ =ᶠ[𝓝 x] f)


theorem norm_integral_le_of_norm_le_const {f : ℂ → E} {c : ℂ} {R C : ℝ} (hR : 0 ≤ R)
    (hf : ∀ z ∈ sphere c R, ‖f z‖ ≤ C) : ‖∮ z in C(c, R), f z‖ ≤ 2 * π * R * C

(hf : ∀ z ∈ Metric.sphere c R, ‖f z‖ ≤ C)

‖∮ (z : ℂ) in C(c, R), f z‖ ≤ 2 * π * R * C


theorem Tendsto.atBot_mul_atBot (hf : Tendsto f l atBot) (hg : Tendsto g l atBot) :
    Tendsto (fun x => f x * g x) l atTop

{α : Type u_3}
{β : Type u_4}
[OrderedRing α]
{l : Filter β}
{f g : β → α}
(hf : Filter.Tendsto f l Filter.atBot)
(hg : Filter.Tendsto g l Filter.atBot)

Filter.Tendsto (fun x => f x * g x) l Filter.atTop


theorem nonzero_mem_of_bot_lt {p : Submodule R M} (bot_lt : ⊥ < p) : ∃ a : p, a ≠ 0

{R : Type u_1}
{M : Type u_3}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{p : Submodule R M}
(bot_lt : ⊥ < p)


@[simp]
theorem inter_cons_of_mem (l₁ : List α) (h : a ∈ l₂) : (a :: l₁) ∩ l₂ = a :: l₁ ∩ l₂

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


theorem _root_.MeasurableSet.exists_isOpen_diff_lt [OuterRegular μ] {A : Set α}
    (hA : MeasurableSet A) (hA' : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < ∞ ∧ μ (U \ A) < ε

{α : Type u_1}
[MeasurableSpace α]
[TopologicalSpace α]
{μ : MeasureTheory.Measure α}
[μ.OuterRegular]
{A : Set α}
(hA : MeasurableSet A)
(hA' : μ A ≠ ⊤)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ U ⊇ A, IsOpen U ∧ μ U < ⊤ ∧ μ (U \ A) < ε


/-- Euler's reflection formula for the real Gamma function. -/
theorem Gamma_mul_Gamma_one_sub (s : ℝ) : Gamma s * Gamma (1 - s) = π / sin (π * s)

Real.Gamma s * Real.Gamma (1 - s) = π / Real.sin (π * s)


theorem associated_mul_isUnit_right_iff {β : Type*} [Monoid β] {a b u : β} (hu : IsUnit u) :
    Associated a (b * u) ↔ Associated a b

{β : Type u_5}
[Monoid β]
{a b u : β}
(hu : IsUnit u)


@[simp] theorem trunc_trunc_pow (f : R⟦X⟧) (n a : ℕ) :
    trunc n ((trunc n f : R⟦X⟧) ^ a) = trunc n (f ^ a)

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

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


theorem pos (x : Ioo (0 : α) 1) : 0 < (x : α)

{α : Type u_1}
[StrictOrderedSemiring α]
(x : ↑(Set.Ioo 0 1))


theorem hasDerivAt_norm_rpow (x : ℝ) {p : ℝ} (hp : 1 < p) :
    HasDerivAt (fun x : ℝ ↦ ‖x‖ ^ p) (p * ‖x‖ ^ (p - 2) * x) x

HasDerivAt (fun x => ‖x‖ ^ p) (p * ‖x‖ ^ (p - 2) * x) x


/-- The closure (as a submodule) of the graph is equal to the graph of the closure
  (as a `LinearPMap`). -/
theorem IsClosable.graph_closure_eq_closure_graph {f : E →ₗ.[R] F} (hf : f.IsClosable) :
    f.graph.topologicalClosure = f.closure.graph

{R : Type u_1}
{E : Type u_2}
{F : Type u_3}
[CommRing R]
[AddCommGroup E]
[AddCommGroup F]
[Module R E]
[Module R F]
[TopologicalSpace E]
[TopologicalSpace F]
[ContinuousAdd E]
[ContinuousAdd F]
[TopologicalSpace R]
[ContinuousSMul R E]
[ContinuousSMul R F]
{f : E →ₗ.[R] F}
(hf : f.IsClosable)


theorem infs_assoc : s ⊼ t ⊼ u = s ⊼ (t ⊼ u)

{α : Type u_2}
[SemilatticeInf α]
(s t u : Set α)


/-- If `f` is `O(x ^ (-b))` at infinity, then so is the function
`fun x ↦ ‖f.restrict (Icc (x + R) (x + S))‖` for any fixed `R` and `S`. -/
theorem isBigO_norm_Icc_restrict_atTop {f : C(ℝ, E)} {b : ℝ} (hb : 0 < b)
    (hf : f =O[atTop] fun x : ℝ => |x| ^ (-b)) (R S : ℝ) :
    (fun x : ℝ => ‖f.restrict (Icc (x + R) (x + S))‖) =O[atTop] fun x : ℝ => |x| ^ (-b)

(hf : ⇑f =O[Filter.atTop] fun x => |x| ^ (-b))

(fun x => ‖ContinuousMap.restrict (Set.Icc (x + R) (x + S)) f‖) =O[Filter.atTop] fun x => |x| ^ (-b)


theorem map_pointwise_vadd (f : P₁ →ᵃ[k] P₂) (v : V₁) (s : AffineSubspace k P₁) :
    (v +ᵥ s).map f = f.linear v +ᵥ s.map f

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

AffineSubspace.map f (v +ᵥ s) = f.linear v +ᵥ AffineSubspace.map f s


@[simp]
theorem toEuclideanLin_piLp_equiv_symm (A : Matrix m n 𝕜) (x : n → 𝕜) :
    Matrix.toEuclideanLin A ((WithLp.equiv _ _).symm x) =
      (WithLp.equiv _ _).symm (Matrix.toLin' A x)

{𝕜 : Type u_3}
[RCLike 𝕜]
{m : Type u_8}
{n : Type u_9}
[Fintype n]
[DecidableEq n]
(A : Matrix m n 𝕜)
(x : n → 𝕜)

(Matrix.toEuclideanLin A) ((WithLp.equiv 2 ((i : n) → (fun x => 𝕜) i)).symm x) =
  (WithLp.equiv 2 (m → 𝕜)).symm ((Matrix.toLin' A) x)


theorem isIso_of_source_target_iso_zero {X Y : C} (f : X ⟶ Y) (i : X ≅ 0) (j : Y ≅ 0) :
    IsIso f


@[simp, norm_cast]
theorem coe_add (f g : CauSeq β abv) : ⇑(f + g) = (f : ℕ → β) + g

{α : Type u_1}
{β : Type u_2}
[LinearOrderedField α]
[Ring β]
{abv : β → α}
[IsAbsoluteValue abv]
(f g : CauSeq β abv)


@[simp]
theorem invFun_algebraMap (M : Matrix n n R) : invFun R A n (M.map (algebraMap R A)) = 1 ⊗ₜ M

(R : Type u)
[CommSemiring R]
(A : Type v)
[Semiring A]
[Algebra R A]
(n : Type w)
[DecidableEq n]
[Fintype n]
(M : Matrix n n R)

MatrixEquivTensor.invFun R A n (M.map ⇑(algebraMap R A)) = 1 ⊗ₜ[R] M


@[simp]
theorem range_sigmaMk (i : ι) : range (Sigma.mk i : α i → Sigma α) = Sigma.fst ⁻¹' {i}

{ι : Type u_1}
{α : ι → Type u_3}
(i : ι)

Set.range (Sigma.mk i) = Sigma.fst ⁻¹' {i}


@[to_additive LipschitzWith.nnorm_le_mul]
theorem LipschitzWith.nnorm_le_mul' {f : E → F} {K : ℝ≥0} (h : LipschitzWith K f) (hf : f 1 = 1)
    (x) : ‖f x‖₊ ≤ K * ‖x‖₊

{E : Type u_3}
{F : Type u_4}
[SeminormedAddGroup E]
[SeminormedAddGroup F]
{f : E → F}
{K : ℝ≥0}
(h : LipschitzWith K f)
(hf : f 0 = 0)
(x : E)

‖f x‖₊ ≤ K * ‖x‖₊


@[fun_prop]
theorem ContinuousLinearMap.hasFDerivAt_of_bilinear {f : G' → E} {g : G' → F} {f' : G' →L[𝕜] E}
    {g' : G' →L[𝕜] F} {x : G'} (hf : HasFDerivAt f f' x) (hg : HasFDerivAt g g' x) :
    HasFDerivAt (fun y => B (f y) (g y)) (B.precompR G' (f x) g' + B.precompL G' f' (g x)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{G' : Type u_5}
[NormedAddCommGroup G']
[NormedSpace 𝕜 G']
(B : E →L[𝕜] F →L[𝕜] G)
{f : G' → E}
{g : G' → F}
{f' : G' →L[𝕜] E}
{g' : G' →L[𝕜] F}
{x : G'}
(hf : HasFDerivAt f f' x)
(hg : HasFDerivAt g g' x)

HasFDerivAt (fun y => (B (f y)) (g y))
  (((ContinuousLinearMap.precompR G' B) (f x)) g' + ((ContinuousLinearMap.precompL G' B) f') (g x)) x


@[to_additive]
theorem le_mul_of_le_left : a ≤ b → a ≤ b * c

{α : Type u}
[CanonicallyOrderedAddCommMonoid α]
{a b c : α}


theorem to_isMonoidHom (f : R →+* S) : IsMonoidHom f

{R : Type u_1}
{S : Type u_2}
[NonAssocSemiring R]
[NonAssocSemiring S]
(f : R →+* S)


@[deprecated drop_take_succ_eq_cons_getElem (since := "2024-06-11")]
theorem drop_take_succ_eq_cons_get (L : List α) (i : Fin L.length) :
    (L.take (i + 1)).drop i = [get L i]

{α : Type u_1}
(L : List α)
(i : Fin L.length)

List.drop (↑i) (List.take (↑i + 1) L) = [L.get i]


theorem then_eq_lt {o₁ o₂ : Ordering} : o₁.then o₂ = lt ↔ o₁ = lt ∨ o₁ = eq ∧ o₂ = lt

o₁.then o₂ = Ordering.lt ↔ o₁ = Ordering.lt ∨ o₁ = Ordering.eq ∧ o₂ = Ordering.lt


/-- **Diaconescu's theorem**: excluded middle from choice, Function extensionality and propositional extensionality. -/
theorem em (p : Prop) : p ∨ ¬p


lemma quasiIsoAt_iff_comp_left (φ : K ⟶ L) (φ' : L ⟶ M) (i : ι) [K.HasHomology i]
    [L.HasHomology i] [M.HasHomology i]
    [hφ : QuasiIsoAt φ i] :
    QuasiIsoAt (φ ≫ φ') i ↔ QuasiIsoAt φ' i


/-- Theorem for normalizing the bit vector literal representation. -/
-- TODO: This needs more usage data to assess which direction the simp should go.
@[simp, bv_toNat] theorem ofNat_eq_ofNat : @OfNat.ofNat (BitVec n) i _ = .ofNat n i


theorem IsCompact.adherence_nhdset {f : Filter X} (hs : IsCompact s) (hf₂ : f ≤ 𝓟 s)
    (ht₁ : IsOpen t) (ht₂ : ∀ x ∈ s, ClusterPt x f → x ∈ t) : t ∈ f

{X : Type u}
[TopologicalSpace X]
{s t : Set X}
{f : Filter X}
(hs : IsCompact s)
(hf₂ : f ≤ 𝓟 s)
(ht₁ : IsOpen t)
(ht₂ : ∀ x ∈ s, ClusterPt x f → x ∈ t)


theorem inv_pow_lt_inv_pow_of_lt (a1 : 1 < a) {m n : ℕ} (mn : m < n) : (a ^ n)⁻¹ < (a ^ m)⁻¹

{α : Type u_2}
[LinearOrderedSemifield α]
{a : α}
(a1 : 1 < a)
{m n : ℕ}
(mn : m < n)


/-- The identity language homomorphism. -/
@[simps]
protected def id (L : Language) : L →ᴸ L

(L : FirstOrder.Language)
(_n : ℕ)
(a : L.Relations _n)

(FirstOrder.Language.LHom.id L).onRelation a = id a


theorem indexesValues_eq_filter_enum (p : α → Prop) [DecidablePred p] (as : List α) :
    indexesValues p as = filter (p ∘ Prod.snd) (enum as)

{α : Type u}
(p : α → Prop)
[DecidablePred p]
(as : List α)

List.indexesValues (fun b => decide (p b)) as = List.filter ((fun b => decide (p b)) ∘ Prod.snd) as.enum


theorem zneg_toZNumNeg (n : Num) : -n.toZNumNeg = n.toZNum


/-- Given a Borel-measurable set in a Polish space, there exists a finer Polish topology making
it clopen. This is in fact an equivalence, see `isClopenable_iff_measurableSet`. -/
theorem _root_.MeasurableSet.isClopenable [PolishSpace α] [MeasurableSpace α] [BorelSpace α]
    {s : Set α} (hs : MeasurableSet s) : IsClopenable s

{α : Type u_1}
[TopologicalSpace α]
[PolishSpace α]
[MeasurableSpace α]
[BorelSpace α]
{s : Set α}
(hs : MeasurableSet s)


theorem isOpen_iff_mem_nhds : IsOpen s ↔ ∀ x ∈ s, s ∈ 𝓝 x

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


@[simps]
instance hasForgetToFinPartOrd : HasForget₂ FinBoolAlg FinPartOrd

CategoryTheory.HasForget₂.forget₂.map f =
  let_fun this :=
    ↑(let_fun this := f;
      this);
  this


@[simp]
theorem decode_option_succ [Encodable α] (n) :
    (decode (succ n) : Option (Option α)) = (decode n).map some

Encodable.decode n.succ = Option.map some (Encodable.decode n)


@[to_additive]
theorem OneHom.comp_apply [One M] [One N] [One P] (g : OneHom N P) (f : OneHom M N) (x : M) :
    g.comp f x = g (f x)

{M : Type u_4}
{N : Type u_5}
{P : Type u_6}
[Zero M]
[Zero N]
[Zero P]
(g : ZeroHom N P)
(f : ZeroHom M N)
(x : M)


theorem left_dom_of_union_dom [Union α] {a b : Part α} (hab : Dom (a ∪ b)) : a.Dom

{α : Type u_1}
[Union α]
{a b : Part α}
(hab : (a ∪ b).Dom)


theorem of_surjective [CommSemiring R] [LocalRing R] [CommSemiring S] [Nontrivial S] (f : R →+* S)
    [IsLocalRingHom f] (hf : Function.Surjective f) : LocalRing S

{R : Type u_1}
{S : Type u_2}
[CommSemiring R]
[LocalRing R]
[CommSemiring S]
[Nontrivial S]
(f : R →+* S)
[IsLocalRingHom f]
(hf : Function.Surjective ⇑f)


theorem not_inj_iff : ∀ {x y : Bool}, (!x) = (!y) ↔ x = y


theorem hom_inv_id : hom P ≫ inv P = 𝟙 _

Bimod.RightUnitorBimod.hom P ≫ Bimod.RightUnitorBimod.inv P = 𝟙 (Bimod.TensorBimod.X P (Bimod.regular S))


@[to_additive]
theorem le_of_mul_le_left : a * b ≤ c → a ≤ c


theorem prod_injective : Injective
    (fun w => w.prod φ : NormalWord d → HNNExtension G A B φ)

(d : HNNExtension.NormalWord.TransversalPair G A B)

Function.Injective fun w => HNNExtension.NormalWord.ReducedWord.prod φ w.toReducedWord


theorem comp_ι_sq_zero (g : ExteriorAlgebra R M →ₐ[R] A) (m : M) : g (ι R m) * g (ι R m) = 0

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{A : Type u_1}
[Semiring A]
[Algebra R A]
(g : ExteriorAlgebra R M →ₐ[R] A)
(m : M)

g ((ExteriorAlgebra.ι R) m) * g ((ExteriorAlgebra.ι R) m) = 0


lemma isContinuous_comp' {F₁ : C ⥤ D} {F₂ : D ⥤ E} {F₁₂ : C ⥤ E}
    (e : F₁ ⋙ F₂ ≅ F₁₂) (J : GrothendieckTopology C)
    (K : GrothendieckTopology D) (L : GrothendieckTopology E)
    [Functor.IsContinuous.{t} F₁ J K] [Functor.IsContinuous.{t} F₂ K L] :
    Functor.IsContinuous.{t} F₁₂ J L

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

(L : CategoryTheory.GrothendieckTopology E)


theorem Ico_coe_coe : Ico (a : WithBot α) b = (Ico a b).map Embedding.some

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

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


@[to_additive]
lemma haarScalarFactor_eq_mul (μ' μ ν : Measure G)
    [IsHaarMeasure μ] [IsHaarMeasure ν] [IsFiniteMeasureOnCompacts μ'] [IsMulLeftInvariant μ'] :
    haarScalarFactor μ' ν = haarScalarFactor μ' μ * haarScalarFactor μ ν

μ'.haarScalarFactor ν = μ'.haarScalarFactor μ * μ.haarScalarFactor ν


/--
If the image of the `(fixedBy α g)ᶜ` set by the pointwise action of `h: G`
is disjoint from `(fixedBy α g)ᶜ`, then `g` and `h` cannot commute.
-/
@[to_additive "If the image of the `(fixedBy α g)ᶜ` set by the pointwise action of `h: G`
is disjoint from `(fixedBy α g)ᶜ`, then `g` and `h` cannot commute."]
theorem not_commute_of_disjoint_movedBy_preimage {g h : G} (ne_one : g ≠ 1)
    (disjoint : Disjoint (fixedBy α g)ᶜ (h • (fixedBy α g)ᶜ)) : ¬Commute g h

(disjoint : Disjoint (MulAction.fixedBy α g)ᶜ (h • (MulAction.fixedBy α g)ᶜ))


@[simp]
theorem mk_lift [FormallySmooth R A] (I : Ideal B) (hI : IsNilpotent I)
    (g : A →ₐ[R] B ⧸ I) (x : A) : Ideal.Quotient.mk I (FormallySmooth.lift I hI g x) = g x

{R : Type u}
[CommSemiring R]
{A : Type u}
[Semiring A]
[Algebra R A]
{B : Type u}
[CommRing B]
[Algebra R B]
[Algebra.FormallySmooth R A]
(I : Ideal B)
(hI : IsNilpotent I)
(g : A →ₐ[R] B ⧸ I)
(x : A)

(Ideal.Quotient.mk I) ((Algebra.FormallySmooth.lift I hI g) x) = g x


lemma intSpanEquivQuotAddOrderOf_apply_self (a : A) :
    intSpanEquivQuotAddOrderOf a ⟨a, Submodule.mem_span_singleton_self a⟩ =
    Submodule.Quotient.mk 1

(CharacterModule.intSpanEquivQuotAddOrderOf a) ⟨a, ⋯⟩ = Submodule.Quotient.mk 1


@[simp]
theorem prodCongrRight_apply (a : α₁) (b : β₁) : prodCongrRight e (a, b) = (a, e a b)

{α₁ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_1}
(e : α₁ → β₁ ≃ β₂)
(a : α₁)
(b : β₁)

(Equiv.prodCongrRight e) (a, b) = (a, (e a) b)


@[simp]
theorem of_subsingleton [Subsingleton A] (a : A) : spectrum R a = ∅

{R : Type u}
{A : Type v}
[CommSemiring R]
[Ring A]
[Algebra R A]
[Subsingleton A]
(a : A)


theorem norm_sq_re_conj_add (x : K) : ‖conj x + x‖ ^ 2 = re (conj x + x) ^ 2

‖(starRingEnd K) x + x‖ ^ 2 = RCLike.re ((starRingEnd K) x + x) ^ 2


@[to_additive]
theorem le_iff_forall_one_lt_lt_mul' : a ≤ b ↔ ∀ ε, 1 < ε → a < b * ε

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

[ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1]


theorem map_eq_cons [DecidableEq α] (f : α → β) (s : Multiset α) (t : Multiset β) (b : β) :
    (∃ a ∈ s, f a = b ∧ (s.erase a).map f = t) ↔ s.map f = b ::ₘ t

{α : Type u_1}
{β : Type v}
[DecidableEq α]
(f : α → β)
(s : Multiset α)
(t : Multiset β)
(b : β)

(∃ a ∈ s, f a = b ∧ Multiset.map f (s.erase a) = t) ↔ Multiset.map f s = b ::ₘ t


lemma mem_primeFactors_of_ne_zero (hn : n ≠ 0) : p ∈ n.primeFactors ↔ p.Prime ∧ p ∣ n

p ∈ n.primeFactors ↔ Nat.Prime p ∧ p ∣ n


theorem setLIntegral_nnnorm_condexpL2_indicator_le (hm : m ≤ m0) (hs : MeasurableSet s)
    (hμs : μ s ≠ ∞) (x : E') {t : Set α} (ht : MeasurableSet[m] t) (hμt : μ t ≠ ∞) :
    ∫⁻ a in t, ‖(condexpL2 E' 𝕜 hm (indicatorConstLp 2 hs hμs x) : α → E') a‖₊ ∂μ ≤
    μ (s ∩ t) * ‖x‖₊

{α : Type u_1}
{E' : Type u_3}
{𝕜 : Type u_7}
[RCLike 𝕜]
[NormedAddCommGroup E']
[InnerProductSpace 𝕜 E']
[CompleteSpace E']
[NormedSpace ℝ E']
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
(hm : m ≤ m0)
(hs : MeasurableSet s)
(hμs : μ s ≠ ⊤)
(x : E')
{t : Set α}
(ht : MeasurableSet t)
(hμt : μ t ≠ ⊤)

∫⁻ (a : α) in t, ↑‖↑↑↑((MeasureTheory.condexpL2 E' 𝕜 hm) (MeasureTheory.indicatorConstLp 2 hs hμs x)) a‖₊ ∂μ ≤
  μ (s ∩ t) * ↑‖x‖₊


lemma isNilpotent_C_mul_pow_X_of_isNilpotent (n : ℕ) (hnil : IsNilpotent r) :
    IsNilpotent ((C r) * X ^ n)

{R : Type u_1}
{r : R}
[Semiring R]
(n : ℕ)
(hnil : IsNilpotent r)

IsNilpotent (Polynomial.C r * Polynomial.X ^ n)


/-- A `EuclideanDomain` is a non-trivial commutative ring with a division and a remainder,
  satisfying `b * (a / b) + a % b = a`.
  The definition of a Euclidean domain usually includes a valuation function `R → ℕ`.
  This definition is slightly generalised to include a well founded relation
  `r` with the property that `r (a % b) b`, instead of a valuation.  -/
class EuclideanDomain (R : Type u) extends CommRing R, Nontrivial R where
  /-- A division function (denoted `/`) on `R`.
    This satisfies the property `b * (a / b) + a % b = a`, where `%` denotes `remainder`. -/
  protected quotient : R → R → R
  /-- Division by zero should always give zero by convention. -/
  protected quotient_zero : ∀ a, quotient a 0 = 0
  /-- A remainder function (denoted `%`) on `R`.
    This satisfies the property `b * (a / b) + a % b = a`, where `/` denotes `quotient`. -/
  protected remainder : R → R → R
  /-- The property that links the quotient and remainder functions.
    This allows us to compute GCDs and LCMs. -/
  protected quotient_mul_add_remainder_eq : ∀ a b, b * quotient a b + remainder a b = a
  /-- A well-founded relation on `R`, satisfying `r (a % b) b`.
    This ensures that the GCD algorithm always terminates. -/
  protected r : R → R → Prop
  /-- The relation `r` must be well-founded.
    This ensures that the GCD algorithm always terminates. -/
  r_wellFounded : WellFounded r
  /-- The relation `r` satisfies `r (a % b) b`. -/
  protected remainder_lt : ∀ (a) {b}, b ≠ 0 → r (remainder a b) b
  /-- An additional constraint on `r`. -/
  mul_left_not_lt : ∀ (a) {b}, b ≠ 0 → ¬r (a * b) a


/-- A natural number not divible by `p` has absolute value 1. -/
lemma mulRingNorm_eq_one_of_not_dvd {m : ℕ} (hpm : ¬ p ∣ m) : f m = 1

(hmin : ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m)


/-- If `x` is not an isolated point of a topological space, then the closure of `{x}ᶜ` is the whole
space. -/
-- Porting note (#10618): was a `@[simp]` lemma but `simp` can prove it
theorem closure_compl_singleton (x : X) [NeBot (𝓝[≠] x)] : closure {x}ᶜ = (univ : Set X)

{X : Type u}
[TopologicalSpace X]
(x : X)
[(𝓝[≠] x).NeBot]


theorem image2_upperBounds_upperBounds_subset :
    image2 f (upperBounds s) (upperBounds t) ⊆ upperBounds (image2 f s t)

{f : α → β → γ}

(h₀ : ∀ (b : β), Monotone (Function.swap f b))

Set.image2 f (upperBounds s) (upperBounds t) ⊆ upperBounds (Set.image2 f s t)


/-- A product of a function `f : Fin 0 → β` is `1` because `Fin 0` is empty -/
@[to_additive "A sum of a function `f : Fin 0 → β` is `0` because `Fin 0` is empty"]
theorem prod_univ_zero [CommMonoid β] (f : Fin 0 → β) : ∏ i, f i = 1

{β : Type u_2}
[CommMonoid β]
(f : Fin 0 → β)


/-- The dual of a concept lattice is isomorphic to the concept lattice of the dual context. -/
@[simps]
def swapEquiv : (Concept α β r)ᵒᵈ ≃o Concept β α (Function.swap r)

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}

∀ (a : (Concept α β r)ᵒᵈ), Concept.swapEquiv a = (Concept.swap ∘ ⇑OrderDual.ofDual) a


theorem iCondIndepSets.condIndepSets {s : ι → Set (Set Ω)}
    (h_indep : iCondIndepSets m' hm' s μ) {i j : ι} (hij : i ≠ j) :
    CondIndepSets m' hm' (s i) (s j) μ

(h_indep : ProbabilityTheory.iCondIndepSets m' hm' s μ)

ProbabilityTheory.CondIndepSets m' hm' (s i) (s j) μ


/-- Multivariate quotients of polynomial functors.
-/
class MvQPF {n : ℕ} (F : TypeVec.{u} n → Type*) extends MvFunctor F where
  P : MvPFunctor.{u} n
  abs : ∀ {α}, P α → F α
  repr : ∀ {α}, F α → P α
  abs_repr : ∀ {α} (x : F α), abs (repr x) = x
  abs_map : ∀ {α β} (f : α ⟹ β) (p : P α), abs (f <$$> p) = f <$$> abs p

{n : ℕ}
{F : TypeVec.{u} n → Type u_1}
[self : MvQPF F]
{α β : TypeVec.{u} n}
(f : α ⟹ β)
(p : ↑(MvQPF.P F) α)

MvQPF.abs (f <$$> p) = f <$$> MvQPF.abs p


theorem mul_left_distrib [Distrib α] (x : Holor α ds₁) (y : Holor α ds₂) (z : Holor α ds₂) :
    x ⊗ (y + z) = x ⊗ y + x ⊗ z

{α : Type}
{ds₁ ds₂ : List ℕ}
[Distrib α]
(x : Holor α ds₁)
(y z : Holor α ds₂)


@[simp]
lemma rpow_eq_zero (hx : 0 ≤ x) (hy : y ≠ 0) : x ^ y = 0 ↔ x = 0


lemma FinitaryExtensive.mono_ι [FinitaryExtensive C] {ι : Type*} [Finite ι] {F : Discrete ι ⥤ C}
    {c : Cocone F} (hc : IsColimit c) (i : Discrete ι) :
    Mono (c.ι.app i)

{F : CategoryTheory.Functor (CategoryTheory.Discrete ι) C}

(hc : CategoryTheory.Limits.IsColimit c)


/-- Bijection between a subring `S` and its opposite. -/
@[simps!]
def addEquivOp (S : Subring R) : S ≃+ S.op

(a : { a // (fun x => x ∈ S.toSubmonoid) a })


@[to_additive]
theorem orderOf_mul_dvd_lcm (h : Commute x y) :
    orderOf (x * y) ∣ Nat.lcm (orderOf x) (orderOf y)

{G : Type u_1}
[AddMonoid G]
{x y : G}
(h : AddCommute x y)

addOrderOf (x + y) ∣ (addOrderOf x).lcm (addOrderOf y)


theorem mem_filterBasis_iff {U : Set α} : U ∈ h.filterBasis ↔ ∃ i, p i ∧ s i = U

{α : Type u_1}
{ι : Sort u_4}
{p : ι → Prop}
{s : ι → Set α}
(h : Filter.IsBasis p s)
{U : Set α}


@[to_additive (attr := simp)]
theorem ofLeftInverse_symm_apply {f : G →* N} {g : N →* G} (h : Function.LeftInverse g f)
    (x : f.range) : (ofLeftInverse h).symm x = g x

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
{f : G →+ N}
{g : N →+ G}
(h : Function.LeftInverse ⇑g ⇑f)
(x : ↥f.range)

(AddMonoidHom.ofLeftInverse h).symm x = g ↑x


theorem le_comap_map : f ≤ comap m (map m f)

{α : Type u}
{β : Type v}
{f : Filter α}
{m : α → β}


@[to_additive (attr := simp)] theorem swap_inl (x : M) : swap M N (inl x) = inr x

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
(x : M)

(Monoid.Coprod.swap M N) (Monoid.Coprod.inl x) = Monoid.Coprod.inr x


theorem UInt64.toNat_add (x y : UInt64) : (x + y).toNat = (x.toNat + y.toNat) % UInt64.size


@[simp]
theorem lie_module_bracket_apply (x : L) (m : ⨁ i, M i) (i : ι) : ⁅x, m⁆ i = ⁅x, m i⁆

{ι : Type v}
{L : Type w₁}
{M : ι → Type w}
[LieRing L]
[(i : ι) → AddCommGroup (M i)]
[(i : ι) → LieRingModule L (M i)]
(x : L)
(m : DirectSum ι fun i => M i)
(i : ι)


@[simp]
theorem range_one : range 1 = {0}


@[simp]
theorem icisSupHom_apply (a : α) : icisSupHom a = Ici a

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


@[reassoc (attr := simp)]
theorem HasColimit.isoOfNatIso_hom_desc {F G : J ⥤ C} [HasColimit F] [HasColimit G] (t : Cocone G)
    (w : F ≅ G) :
    (HasColimit.isoOfNatIso w).hom ≫ colimit.desc G t =
      colimit.desc F ((Cocones.precompose w.hom).obj _)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{F G : J ⥤ C}
[CategoryTheory.Limits.HasColimit F]
[CategoryTheory.Limits.HasColimit G]
(t : CategoryTheory.Limits.Cocone G)
(w : F ≅ G)

(CategoryTheory.Limits.HasColimit.isoOfNatIso w).hom ≫ CategoryTheory.Limits.colimit.desc G t =
  CategoryTheory.Limits.colimit.desc F ((CategoryTheory.Limits.Cocones.precompose w.hom).obj t)


theorem IsRegular.cof_eq {c : Cardinal} (H : c.IsRegular) : c.ord.cof = c


/-- A map defined on a sigma type (a.k.a. the disjoint union of an indexed family of topological
spaces) is inducing iff its restriction to each component is inducing and each the image of each
component under `f` can be separated from the images of all other components by an open set. -/
theorem inducing_sigma {f : Sigma σ → X} :
    Inducing f ↔ (∀ i, Inducing (f ∘ Sigma.mk i)) ∧
      (∀ i, ∃ U, IsOpen U ∧ ∀ x, f x ∈ U ↔ x.1 = i)

{X : Type u}
{ι : Type u_5}
{σ : ι → Type u_7}
[(i : ι) → TopologicalSpace (σ i)]
[TopologicalSpace X]
{f : Sigma σ → X}

Inducing f ↔ (∀ (i : ι), Inducing (f ∘ Sigma.mk i)) ∧ ∀ (i : ι), ∃ U, IsOpen U ∧ ∀ (x : Sigma σ), f x ∈ U ↔ x.fst = i


theorem HasDerivAt.div_const (hc : HasDerivAt c c' x) (d : 𝕜') :
    HasDerivAt (fun x => c x / d) (c' / d) x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝕜' : Type u_2}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{c : 𝕜 → 𝕜'}
{c' : 𝕜'}
(hc : HasDerivAt c c' x)
(d : 𝕜')


@[simp]
theorem forget₂_coalgebra_obj (X : BialgebraCat R) :
    (forget₂ (BialgebraCat R) (CoalgebraCat R)).obj X = CoalgebraCat.of R X

{R : Type u}
[CommRing R]
(X : BialgebraCat R)

(CategoryTheory.forget₂ (BialgebraCat R) (CoalgebraCat R)).obj X = CoalgebraCat.of R ↑X.toBundled


@[simp] lemma div_intCast_im (z : ℂ) (n : ℤ) : (z / n).im = z.im / n


theorem omegaLimit_eq_iInter : ω f ϕ s = ⋂ u : ↥f.sets, closure (image2 ϕ u s)

{τ : Type u_1}
{α : Type u_2}
{β : Type u_3}
[TopologicalSpace β]
(f : Filter τ)
(ϕ : τ → α → β)
(s : Set α)

omegaLimit f ϕ s = ⋂ u, closure (Set.image2 ϕ (↑u) s)


@[simp]
theorem isMax_ofDual_iff {a : αᵒᵈ} : IsMax (ofDual a) ↔ IsMin a


theorem of_think_terminates {s : Computation α} : Terminates (think s) → Terminates s


@[simp]
theorem ofBijective_apply [RingHomInvPair σ₁₂ σ₂₁] [RingHomInvPair σ₂₁ σ₁₂] {hf} (x : M) :
    ofBijective f hf x = f x

{R : Type u_1}
{R₂ : Type u_3}
{M : Type u_5}
{M₂ : Type u_7}
[Semiring R]
[Semiring R₂]
[AddCommMonoid M]
[AddCommMonoid M₂]
{module_M : Module R M}
{module_M₂ : Module R₂ M₂}
{σ₁₂ : R →+* R₂}
{σ₂₁ : R₂ →+* R}
(f : M →ₛₗ[σ₁₂] M₂)
[RingHomInvPair σ₁₂ σ₂₁]
[RingHomInvPair σ₂₁ σ₁₂]
{hf : Function.Bijective ⇑f}
(x : M)


/-- Not mixed characteristic implies equal characteristic. -/
theorem of_not_mixedCharZero [CharZero R] (h : ∀ p > 0, ¬MixedCharZero R p) :
    ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)

(R : Type u_1)
[CommRing R]
[CharZero R]
(h : ∀ p > 0, ¬MixedCharZero R p)
(I : Ideal R)


@[simp]
theorem symm_dual_id : OrderHom.dual.symm OrderHom.id = (OrderHom.id : α →o α)

OrderHom.dual.symm OrderHom.id = OrderHom.id


/-- Pythagorean theorem, vector inner product form. -/
theorem norm_add_sq_eq_norm_sq_add_norm_sq_real {x y : F} (h : ⟪x, y⟫_ℝ = 0) :
    ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖

{F : Type u_3}
[NormedAddCommGroup F]
[InnerProductSpace ℝ F]
{x y : F}
(h : ⟪x, y⟫_ℝ = 0)


theorem wSameSide_vadd_right_iff {s : AffineSubspace R P} {x y : P} {v : V} (hv : v ∈ s.direction) :
    s.WSameSide x (v +ᵥ y) ↔ s.WSameSide x y

{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{s : AffineSubspace R P}
{x y : P}
{v : V}
(hv : v ∈ s.direction)


/-- The Hausdorff distances from `s` to `t` and from `t` to `s` coincide. -/
theorem hausdorffDist_comm : hausdorffDist s t = hausdorffDist t s

{α : Type u}
[PseudoMetricSpace α]
{s t : Set α}

Metric.hausdorffDist s t = Metric.hausdorffDist t s


theorem inclusion.injective {x y : Subgraph G} (h : x ≤ y) : Function.Injective (inclusion h)

{V : Type u}
{G : SimpleGraph V}
{x y : G.Subgraph}
(h : x ≤ y)


lemma isUnramified_smul_iff :
    IsUnramified k (σ • w) ↔ IsUnramified k w

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
{σ : K ≃ₐ[k] K}
{w : NumberField.InfinitePlace K}

NumberField.InfinitePlace.IsUnramified k (σ • w) ↔ NumberField.InfinitePlace.IsUnramified k w


@[reassoc]
lemma evaluation_naturality {V : Opens Y} (x : (Opens.map f.1.base).obj V) :
    Y.evaluation ⟨f.val.base x, x.property⟩ ≫ residueFieldMap f x.val =
      f.val.c.app (op V) ≫ X.evaluation x

{X Y : AlgebraicGeometry.LocallyRingedSpace}

{V : TopologicalSpace.Opens ↑Y.toTopCat}

(x : ↥((TopologicalSpace.Opens.map f.val.base).obj V))

Y.evaluation ⟨f.val.base ↑x, ⋯⟩ ≫ AlgebraicGeometry.LocallyRingedSpace.residueFieldMap f ↑x =
  f.val.c.app (Opposite.op V) ≫ X.evaluation x


/-- A variant of `of_isColimit` that is more useful with `apply`. -/
theorem of_isColimit' (w : CommSq f g inl inr) (h : Limits.IsColimit w.cocone) :
    IsPushout f g inl inr

(h : CategoryTheory.Limits.IsColimit w.cocone)


theorem coe_nonneg (x : Ico (0 : α) 1) : 0 ≤ (x : α)

{α : Type u_1}
[OrderedSemiring α]
(x : ↑(Set.Ico 0 1))


theorem negOfNat_add (m n : Nat) : negOfNat m + negOfNat n = negOfNat (m + n)

Int.negOfNat m + Int.negOfNat n = Int.negOfNat (m + n)


theorem colorable_chromaticNumber {m : ℕ} (hc : G.Colorable m) :
    G.Colorable (ENat.toNat G.chromaticNumber)

{V : Type u}
{G : SimpleGraph V}
{m : ℕ}
(hc : G.Colorable m)


@[measurability]
protected theorem iUnion [Countable ι] {s : ι → Set α}
    (h : ∀ i, AEMeasurable f (μ.restrict (s i))) : AEMeasurable f (μ.restrict (⋃ i, s i))

(h : ∀ (i : ι), AEMeasurable f (μ.restrict (s i)))


/-- If `n ≠ m`, then `(cyclotomic n ℚ)` and `(cyclotomic m ℚ)` are coprime. -/
theorem cyclotomic.isCoprime_rat {n m : ℕ} (h : n ≠ m) :
    IsCoprime (cyclotomic n ℚ) (cyclotomic m ℚ)

IsCoprime (Polynomial.cyclotomic n ℚ) (Polynomial.cyclotomic m ℚ)


@[simp]
theorem killCompl_rename_app (p : MvPolynomial σ R) : killCompl hf (rename f p) = p

{σ : Type u_1}
{τ : Type u_2}
{R : Type u_4}
[CommSemiring R]
{f : σ → τ}
(hf : Function.Injective f)
(p : MvPolynomial σ R)

(MvPolynomial.killCompl hf) ((MvPolynomial.rename f) p) = p


lemma quasiIso_map_iff_of_preservesLeftHomology
    [F.PreservesLeftHomologyOf S₁] [F.PreservesLeftHomologyOf S₂]
    [F.ReflectsIsomorphisms] :
    QuasiIso (F.mapShortComplex.map φ) ↔ QuasiIso φ

CategoryTheory.ShortComplex.QuasiIso (F.mapShortComplex.map φ) ↔ CategoryTheory.ShortComplex.QuasiIso φ


theorem comp_apply (φ₁ : B →ₐ[R] C) (φ₂ : A →ₐ[R] B) (p : A) : φ₁.comp φ₂ p = φ₁ (φ₂ p)

{R : Type u}
{A : Type v}
{B : Type w}
{C : Type u₁}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Semiring C]
[Algebra R A]
[Algebra R B]
[Algebra R C]
(φ₁ : B →ₐ[R] C)
(φ₂ : A →ₐ[R] B)
(p : A)


@[simp]
theorem coe_mk (f : P →ᵃ[R] Q) (h) : ((⟨f, h⟩ : P →ᴬ[R] Q) : P → Q) = f

{R : Type u_1}
{V : Type u_2}
{W : Type u_3}
{P : Type u_4}
{Q : Type u_5}
[Ring R]
[AddCommGroup V]
[Module R V]
[TopologicalSpace P]
[AddTorsor V P]
[AddCommGroup W]
[Module R W]
[TopologicalSpace Q]
[AddTorsor W Q]
(f : P →ᵃ[R] Q)
(h : Continuous f.toFun)


@[to_additive]
theorem prod_finset_coe (f : α → β) (s : Finset α) : (∏ i : (s : Set α), f i) = ∏ i ∈ s, f i

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


theorem image_biUnion [DecidableEq γ] {f : α → β} {s : Finset α} {t : β → Finset γ} :
    (s.image f).biUnion t = s.biUnion fun a => t (f a)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq β]
[DecidableEq γ]
{f : α → β}
{s : Finset α}
{t : β → Finset γ}

(Finset.image f s).biUnion t = s.biUnion fun a => t (f a)


@[simp]
lemma IsNilpotent.pow_iff_pos {n} {S : Type*} [MonoidWithZero S] {x : S}
    (hn : n ≠ 0) : IsNilpotent (x ^ n) ↔ IsNilpotent x

{n : ℕ}
{S : Type u_3}
[MonoidWithZero S]
{x : S}
(hn : n ≠ 0)


theorem ContinuousWithinAt.closure_le [TopologicalSpace β] {f g : β → α} {s : Set β} {x : β}
    (hx : x ∈ closure s) (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x)
    (h : ∀ y ∈ s, f y ≤ g y) : f x ≤ g x

{α : Type u}
{β : Type v}
[TopologicalSpace α]
[Preorder α]
[t : OrderClosedTopology α]
[TopologicalSpace β]
{f g : β → α}
{s : Set β}
{x : β}
(hx : x ∈ closure s)
(hf : ContinuousWithinAt f s x)
(hg : ContinuousWithinAt g s x)
(h : ∀ y ∈ s, f y ≤ g y)


@[to_additive (attr := measurability)]
protected theorem Measurable.oneLePart : Measurable fun x ↦ oneLePart (f x)

{α : Type u_1}
{β : Type u_2}
[Lattice α]
[AddGroup α]
[MeasurableSpace α]
[MeasurableSpace β]
{f : β → α}
(hf : Measurable f)
[MeasurableSup α]


theorem not_limZero_of_pos {f : CauSeq α abs} : Pos f → ¬LimZero f

{α : Type u_1}
[LinearOrderedField α]
{f : CauSeq α abs}


theorem ConvexCone.pointed_of_nonempty_of_isClosed (K : ConvexCone ℝ H) (ne : (K : Set H).Nonempty)
    (hc : IsClosed (K : Set H)) : K.Pointed

{H : Type u_5}
[NormedAddCommGroup H]
[InnerProductSpace ℝ H]
(K : ConvexCone ℝ H)
(ne : (↑K).Nonempty)
(hc : IsClosed ↑K)


@[simp]
theorem singleton_inj : ({a} : Finset α) = {b} ↔ a = b


protected lemma lt_or_le (a b : Fin n) : a < b ∨ b ≤ a


@[simp]
protected theorem fderiv :
    fderiv 𝕜 (fun x => p.eval x) x = smulRight (1 : 𝕜 →L[𝕜] 𝕜) (p.derivative.eval x)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
(p : 𝕜[X])

fderiv 𝕜 (fun x => Polynomial.eval x p) x =
  ContinuousLinearMap.smulRight 1 (Polynomial.eval x (Polynomial.derivative p))


theorem splits_of_splits_of_dvd {f g : K[X]} (hf0 : f ≠ 0) (hf : Splits i f) (hgf : g ∣ f) :
    Splits i g

{K : Type v}
{L : Type w}
[Field K]
[Field L]
(i : K →+* L)
{f g : K[X]}
(hf0 : f ≠ 0)
(hf : Polynomial.Splits i f)
(hgf : g ∣ f)


@[gcongr]
lemma div_lt_div_of_pos_left (ha : 0 < a) (hc : 0 < c) (h : c < b) : a / b < a / c

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


theorem numeratorHom_inj (hS : S ≤ nonZeroDivisorsRight R) :
    Function.Injective (numeratorHom : R → R[S⁻¹])

{R : Type u_1}
[Ring R]
{S : Submonoid R}
[OreLocalization.OreSet S]
(hS : S ≤ nonZeroDivisorsRight R)


lemma Y_eq_iff' {P Q : Fin 3 → F} (hPz : P z ≠ 0) (hQz : Q z ≠ 0) :
    P y * Q z ^ 3 = W.negY Q * P z ^ 3 ↔
      P y / P z ^ 3 = W.toAffine.negY (Q x / Q z ^ 2) (Q y / Q z ^ 3)

{F : Type v}
[Field F]
{W : WeierstrassCurve.Jacobian F}
{P Q : Fin 3 → F}
(hPz : P z ≠ 0)
(hQz : Q z ≠ 0)


theorem not_terminates_iff {s : Seq α} : ¬s.Terminates ↔ ∀ n, (s.get? n).isSome

¬s.Terminates ↔ ∀ (n : ℕ), (s.get? n).isSome = true


theorem fderivWithin.comp {g : F → G} {t : Set F} (hg : DifferentiableWithinAt 𝕜 g t (f x))
    (hf : DifferentiableWithinAt 𝕜 f s x) (h : MapsTo f s t) (hxs : UniqueDiffWithinAt 𝕜 s x) :
    fderivWithin 𝕜 (g ∘ f) s x = (fderivWithin 𝕜 g t (f x)).comp (fderivWithin 𝕜 f s x)


@[to_additive]
theorem comp_mulIndicator_const (c : M) (f : M → N) (hf : f 1 = 1) :
    (fun x => f (s.mulIndicator (fun _ => c) x)) = s.mulIndicator fun _ => f c

{α : Type u_1}
{M : Type u_4}
{N : Type u_5}
[One M]
[One N]
{s : Set α}
(c : M)
(f : M → N)
(hf : f 1 = 1)

(fun x => f (s.mulIndicator (fun x => c) x)) = s.mulIndicator fun x => f c


theorem support_update_ne_zero (f : Π₀ i, β i) (i : ι) {b : β i} (h : b ≠ 0) :
    support (f.update i b) = insert i f.support

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

(DFinsupp.update i f b).support = insert i f.support


lemma hasLeftExtension_iff_of_iso₂ : HasLeftKanExtension L F ↔ HasLeftKanExtension L F'

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_7, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_9, u_5} D]
(L : CategoryTheory.Functor C D)
{F F' : CategoryTheory.Functor C H}
(iso₂ : F ≅ F')

L.HasLeftKanExtension F ↔ L.HasLeftKanExtension F'


@[simp] lemma reflect_one_X : reflect 1 (X : R[X]) = 1


theorem mem_ofFn {n} (f : Fin n → α) (a : α) : a ∈ ofFn f ↔ a ∈ Set.range f

{α : Type u}
{n : ℕ}
(f : Fin n → α)
(a : α)


theorem cauchy_complete_ℒp [CompleteSpace E] (hp : 1 ≤ p) {f : ℕ → α → E}
    (hf : ∀ n, Memℒp (f n) p μ) {B : ℕ → ℝ≥0∞} (hB : ∑' i, B i ≠ ∞)
    (h_cau : ∀ N n m : ℕ, N ≤ n → N ≤ m → eLpNorm (f n - f m) p μ < B N) :
    ∃ (f_lim : α → E), Memℒp f_lim p μ ∧
      atTop.Tendsto (fun n => eLpNorm (f n - f_lim) p μ) (𝓝 0)

(hf : ∀ (n : ℕ), MeasureTheory.Memℒp (f n) p μ)

{B : ℕ → ℝ≥0∞}

(h_cau : ∀ (N n m : ℕ), N ≤ n → N ≤ m → MeasureTheory.eLpNorm (f n - f m) p μ < B N)

∃ f_lim,
  MeasureTheory.Memℒp f_lim p μ ∧ Filter.Tendsto (fun n => MeasureTheory.eLpNorm (f n - f_lim) p μ) Filter.atTop (𝓝 0)


@[simp]
theorem mapRange_apply {f : M →+ N} (hf : Continuous f) {s : Set α} : v.mapRange f hf s = f (v s)

{α : Type u_1}
[MeasurableSpace α]
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(v : MeasureTheory.VectorMeasure α M)
{N : Type u_4}
[AddCommMonoid N]
[TopologicalSpace N]
{f : M →+ N}
(hf : Continuous ⇑f)
{s : Set α}


theorem comp_liftAddHom [AddCommMonoid M] [AddCommMonoid N] [AddCommMonoid P] (g : N →+ P)
    (f : α → M →+ N) :
    g.comp ((liftAddHom (α := α) (M := M) (N := N)) f) =
      (liftAddHom (α := α) (M := M) (N := P)) fun a => g.comp (f a)

{α : Type u_1}
{M : Type u_8}
{N : Type u_10}
{P : Type u_11}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
(g : N →+ P)
(f : α → M →+ N)

g.comp (Finsupp.liftAddHom f) = Finsupp.liftAddHom fun a => g.comp (f a)


theorem zipWith_distrib_drop : (zipWith f l l').drop n = zipWith f (l.drop n) (l'.drop n)

∀ {α : Type u_1} {α_1 : Type u_2} {α_2 : Type u_3} {f : α → α_1 → α_2} {l : List α} {l' : List α_1} {n : Nat},
  List.drop n (List.zipWith f l l') = List.zipWith f (List.drop n l) (List.drop n l')


theorem generator_submoduleImage_dvd_of_mem {N O : Submodule R M} (hNO : N ≤ O) (ϕ : O →ₗ[R] R)
    [(ϕ.submoduleImage N).IsPrincipal] {x : M} (hx : x ∈ N) :
    generator (ϕ.submoduleImage N) ∣ ϕ ⟨x, hNO hx⟩

{R : Type u}
{M : Type v}
[AddCommGroup M]
[CommRing R]
[Module R M]
{N O : Submodule R M}
(hNO : N ≤ O)
(ϕ : ↥O →ₗ[R] R)
[(ϕ.submoduleImage N).IsPrincipal]
{x : M}
(hx : x ∈ N)

Submodule.IsPrincipal.generator (ϕ.submoduleImage N) ∣ ϕ ⟨x, ⋯⟩


theorem to_eq (h : IsZero X) (f : X ⟶ Y) : h.to_ Y = f

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


lemma lt_succ_sqrt (n : ℕ) : n < succ (sqrt n) * succ (sqrt n)


theorem toReal_eq_toReal_iff' {x y : ℝ≥0∞} (hx : x ≠ ⊤) (hy : y ≠ ⊤) :
    x.toReal = y.toReal ↔ x = y


@[simp] lemma ceilRoot_one_right (hn : n ≠ 0) : ceilRoot n 1 = 1


/-- An equivalence between `Bool × ℕ` and `ℕ`, by mapping `(true, x)` to `2 * x + 1` and
`(false, x)` to `2 * x`. -/
@[simps]
def boolProdNatEquivNat : Bool × ℕ ≃ ℕ

∀ (a : ℕ), Equiv.boolProdNatEquivNat.symm a = a.boddDiv2


theorem generateFrom_le {s : Set (Set α)} {m : MeasurableSpace α}
    (h : ∀ t ∈ s, MeasurableSet[m] t) : generateFrom s ≤ m

{α : Type u_1}
{s : Set (Set α)}
{m : MeasurableSpace α}
(h : ∀ t ∈ s, MeasurableSet t)


theorem mk_finset_of_fintype [Fintype α] : #(Finset α) = 2 ^ Fintype.card α

Cardinal.mk (Finset α) = 2 ^ Fintype.card α


theorem monotone_mul_right_of_nonneg [MulPosMono α]
    (ha : 0 ≤ a) : Monotone fun x => x * a

{α : Type u}
[Semiring α]
[Preorder α]
{a : α}
[MulPosMono α]
(ha : 0 ≤ a)


@[to_additive]
theorem mulSupport_mulSingle_disjoint {b' : B} (hb : b ≠ 1) (hb' : b' ≠ 1) {i j : A} :
    Disjoint (mulSupport (mulSingle i b)) (mulSupport (mulSingle j b')) ↔ i ≠ j

{A : Type u_1}
{B : Type u_2}
[DecidableEq A]
[One B]
{b b' : B}
(hb : b ≠ 1)
(hb' : b' ≠ 1)
{i j : A}

Disjoint (Function.mulSupport (Pi.mulSingle i b)) (Function.mulSupport (Pi.mulSingle j b')) ↔ i ≠ j


theorem Iic_iInf₂ (f : ∀ i, κ i → α) : Iic (⨅ (i) (j), f i j) = ⋂ (i) (j), Iic (f i j)

{α : Type u_1}
{ι : Sort u_4}
{κ : ι → Sort u_7}
[CompleteLattice α]
(f : (i : ι) → κ i → α)

Set.Iic (⨅ i, ⨅ j, f i j) = ⋂ i, ⋂ j, Set.Iic (f i j)


/-- Multiplication by a `u : Mˣ` on the left doesn't affect `IsUnit`. -/
@[to_additive (attr := simp)
"Addition of a `u : AddUnits M` on the left doesn't affect `IsAddUnit`."]
theorem Units.isUnit_units_mul {M : Type*} [Monoid M] (u : Mˣ) (a : M) :
    IsUnit (↑u * a) ↔ IsUnit a

{M : Type u_3}
[AddMonoid M]
(u : AddUnits M)
(a : M)


@[to_additive]
theorem prod_finset_sum_index {γ : Type w} {α : Type x} [∀ i, AddCommMonoid (β i)]
    [∀ (i) (x : β i), Decidable (x ≠ 0)] [CommMonoid γ] {s : Finset α} {g : α → Π₀ i, β i}
    {h : ∀ i, β i → γ} (h_zero : ∀ i, h i 0 = 1)
    (h_add : ∀ i b₁ b₂, h i (b₁ + b₂) = h i b₁ * h i b₂) :
    (∏ i ∈ s, (g i).prod h) = (∑ i ∈ s, g i).prod h

(h_add : ∀ (i : ι) (b₁ b₂ : β i), h i (b₁ + b₂) = h i b₁ + h i b₂)

∑ i ∈ s, (g i).sum h = (∑ i ∈ s, g i).sum h


/-- The functorial map taking `ψ : A →⋆ₐ[ℂ] B` to a continuous function
`characterSpace ℂ B → characterSpace ℂ A` obtained by pre-composition with `ψ`. -/
@[simps]
noncomputable def compContinuousMap (ψ : A →⋆ₐ[𝕜] B) :
    C(characterSpace 𝕜 B, characterSpace 𝕜 A)

{A : Type u_1}
{B : Type u_2}
{𝕜 : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedRing A]
[NormedAlgebra 𝕜 A]
[CompleteSpace A]
[StarRing A]
[NormedRing B]
[NormedAlgebra 𝕜 B]
[CompleteSpace B]
[StarRing B]
(ψ : A →⋆ₐ[𝕜] B)
(φ : ↑(WeakDual.characterSpace 𝕜 B))

(WeakDual.CharacterSpace.compContinuousMap ψ) φ =
  WeakDual.CharacterSpace.equivAlgHom.symm ((WeakDual.CharacterSpace.equivAlgHom φ).comp ψ.toAlgHom)


@[simp]
theorem mem_op {x : Rᵐᵒᵖ} {S : Subring R} : x ∈ S.op ↔ x.unop ∈ S

{R : Type u_2}
[Ring R]
{x : Rᵐᵒᵖ}
{S : Subring R}


@[simp]
theorem codeSupp_fix (f k) :
    codeSupp (Code.fix f) k = trStmts₁ (trNormal (Code.fix f) k) ∪ codeSupp f (Cont'.fix f k)

(f : Turing.ToPartrec.Code)
(k : Turing.PartrecToTM2.Cont')

Turing.PartrecToTM2.codeSupp f.fix k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal f.fix k) ∪
    Turing.PartrecToTM2.codeSupp f (Turing.PartrecToTM2.Cont'.fix f k)


lemma filter_inj' : s.filter p = s.filter q ↔ ∀ ⦃a⦄, a ∈ s → (p a ↔ q a)

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

Finset.filter p s = Finset.filter q s ↔ ∀ ⦃a : α⦄, a ∈ s → (p a ↔ q a)


/-- Given a map `f : N → M` and an equivalence relation `r` on `β`, the equivalence relation
    induced on `α` by `f` equals the kernel of `r`'s quotient map composed with `f`. -/
theorem comap_eq {f : α → β} {r : Setoid β} : comap f r = ker (@Quotient.mk'' _ r ∘ f)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{r : Setoid β}

Setoid.comap f r = Setoid.ker (Quotient.mk'' ∘ f)


/-- Alias for `Or.inr`. -/
theorem Or.intro_right (a : Prop) (h : b) : Or a b


theorem eq_top_of_isUnit_mem {x} (hx : x ∈ I) (h : IsUnit x) : I = ⊤

{α : Type u}
[Semiring α]
(I : Ideal α)
{x : α}
(hx : x ∈ I)
(h : IsUnit x)


@[simp]
theorem map_obj_hom : ((map f).obj U).hom = U.hom ≫ f

{T : Type u₁}
[CategoryTheory.Category.{v₁, u₁} T]
{X Y : T}
{f : X ⟶ Y}
{U : CategoryTheory.Over X}

((CategoryTheory.Over.map f).obj U).hom = CategoryTheory.CategoryStruct.comp U.hom f


theorem algebraicIndependent_empty_type [IsEmpty ι] [Nontrivial A] : AlgebraicIndependent K x

{ι : Type u_1}
{K : Type u_4}
{A : Type u_5}
{x : ι → A}
[CommRing A]
[Field K]
[Algebra K A]
[IsEmpty ι]
[Nontrivial A]


@[to_additive (attr := simp)]
theorem swap_mul [Mul M] [Mul N] (p q : M × N) : (p * q).swap = p.swap * q.swap

{M : Type u_5}
{N : Type u_6}
[Mul M]
[Mul N]
(p q : M × N)


@[simp]
theorem sSup_insert {a : α} {s : Set α} : sSup (insert a s) = a ⊔ sSup s

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


lemma Quasicategory.hornFilling {S : SSet} [Quasicategory S] ⦃n : ℕ⦄ ⦃i : Fin (n+1)⦄
    (h0 : 0 < i) (hn : i < Fin.last n)
    (σ₀ : Λ[n, i] ⟶ S) : ∃ σ : Δ[n] ⟶ S, σ₀ = hornInclusion n i ≫ σ

{S : SSet}
[S.Quasicategory]
⦃n : ℕ⦄
⦃i : Fin (n + 1)⦄
(h0 : 0 < i)
(hn : i < Fin.last n)
(σ₀ : SSet.horn n i ⟶ S)

∃ σ, σ₀ = CategoryTheory.CategoryStruct.comp (SSet.hornInclusion n i) σ


@[reassoc]
theorem pentagon_inv_inv_hom (W X Y Z : C) :
    (α_ W (X ⊗ Y) Z).inv ≫ ((α_ W X Y).inv ⊗ 𝟙 Z) ≫ (α_ (W ⊗ X) Y Z).hom =
      (𝟙 W ⊗ (α_ X Y Z).hom) ≫ (α_ W X (Y ⊗ Z)).inv

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
[CategoryTheory.MonoidalCategory C]
(W X Y Z : C)

(CategoryTheory.MonoidalCategory.associator W (CategoryTheory.MonoidalCategory.tensorObj X Y) Z).inv ≫
    CategoryTheory.MonoidalCategory.tensorHom (CategoryTheory.MonoidalCategory.associator W X Y).inv (𝟙 Z) ≫
      (CategoryTheory.MonoidalCategory.associator (CategoryTheory.MonoidalCategory.tensorObj W X) Y Z).hom =
  CategoryTheory.MonoidalCategory.tensorHom (𝟙 W) (CategoryTheory.MonoidalCategory.associator X Y Z).hom ≫
    (CategoryTheory.MonoidalCategory.associator W X (CategoryTheory.MonoidalCategory.tensorObj Y Z)).inv


@[simp]
theorem liftOn_mk {L : Sort _} (f : ℕ × K → L) (hf : ∀ x y, R K p x y → f x = f y) (x : ℕ × K) :
    (mk K p x).liftOn f hf = f x

(hf : ∀ (x y : ℕ × K), PerfectClosure.R K p x y → f x = f y)

(PerfectClosure.mk K p x).liftOn f hf = f x


/-- The product of an antitone function and a strictly antitone function is strictly antitone. -/
@[to_additive add_strictAnti "The sum of an antitone function and a strictly antitone function is
strictly antitone."]
theorem AntitoneOn.mul_strictAnti' [CovariantClass α α (· * ·) (· < ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] {f g : β → α} (hf : AntitoneOn f s)
    (hg : StrictAntiOn g s) :
    StrictAntiOn (fun x => f x * g 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 finsuppTensorFinsupp'_symm_single_eq_single_one_tmul (i : ι × κ) (r : R) :
    (finsuppTensorFinsupp' R ι κ).symm (Finsupp.single i r) =
      Finsupp.single i.1 1 ⊗ₜ Finsupp.single i.2 r

(R : Type u_1)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]
(i : ι × κ)
(r : R)

(finsuppTensorFinsupp' R ι κ).symm (Finsupp.single i r) = Finsupp.single i.1 1 ⊗ₜ[R] Finsupp.single i.2 r


theorem ringQuot_mkAlgHom_freeAlgebra_ι_eq_ι (m : M) :
    RingQuot.mkAlgHom R (Rel R M) (FreeAlgebra.ι R m) = ι R m

(R : Type u_1)
[CommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(m : M)

(RingQuot.mkAlgHom R (TensorAlgebra.Rel R M)) (FreeAlgebra.ι R m) = (TensorAlgebra.ι R) m


theorem iUnion_Icc_add_zsmul : ⋃ n : ℤ, Icc (a + n • p) (a + (n + 1) • p) = univ

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

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


theorem eventually_ge_nhds (hab : b < a) : ∀ᶠ x in 𝓝 a, b ≤ x

{α : Type u}
[TopologicalSpace α]
[LinearOrder α]
[ClosedIicTopology α]
{a b : α}
(hab : b < a)


lemma leftpad_suffix (n : ℕ) (c : Char) : ∀ s, IsSuffix s (leftpad n c s)


theorem Finset.trop_inf [LinearOrder R] [OrderTop R] (s : Finset S) (f : S → R) :
    trop (s.inf f) = ∑ i ∈ s, trop (f i)

{R : Type u_1}
{S : Type u_2}
[LinearOrder R]
[OrderTop R]
(s : Finset S)
(f : S → R)

Tropical.trop (s.inf f) = ∑ i ∈ s, Tropical.trop (f i)


theorem listToPath_pathToList {x : SingleObj α} (p : Path (star α) x) :
    listToPath (pathToList p) = p.cast rfl ext

(p : Quiver.Path (Quiver.SingleObj.star α) x)

Quiver.SingleObj.listToPath (Quiver.SingleObj.pathToList p) = Quiver.Path.cast ⋯ ⋯ p


/-- `single` as a linear map -/
@[simps]
def single.linearMap (a : Γ) : V →ₗ[R] HahnSeries Γ V

{Γ : Type u_1}
{R : Type u_2}
[PartialOrder Γ]
[Semiring R]
{V : Type u_3}
[AddCommMonoid V]
[Module R V]
(a : Γ)

∀ (a_1 : V), (HahnSeries.single.linearMap a) a_1 = (↑(HahnSeries.single.addMonoidHom a)).toFun a_1


@[to_additive]
protected lemma eq_inv_mul_iff_mul_eq (h : IsUnit b) : a = b⁻¹ * c ↔ b * a = c

{α : Type u}
[DivisionMonoid α]
{a b c : α}
(h : IsUnit b)


@[simp]
theorem Ioi_mem_nhdsSet_Ici_iff : Ioi a ∈ 𝓝ˢ (Ici b) ↔ a < b

{α : Type u_1}
[LinearOrder α]
[TopologicalSpace α]
[OrderClosedTopology α]
{a b : α}


@[to_additive succ_nsmul'] lemma pow_succ' (a : M) : ∀ n, a ^ (n + 1) = a * a ^ n

{M : Type u_2}
[AddMonoid M]
(a : M)
(n : ℕ)


lemma stieltjesOfMeasurableRat_eq (hf : Measurable f) (a : α) (r : ℚ) :
    stieltjesOfMeasurableRat f hf a r = toRatCDF f a r

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℚ → ℝ}
(hf : Measurable f)
(a : α)
(r : ℚ)

↑(ProbabilityTheory.stieltjesOfMeasurableRat f hf a) ↑r = ProbabilityTheory.toRatCDF f a r


protected theorem tsub_eq_of_eq_add_rev (hb : AddLECancellable b) (h : a = b + c) : a - b = c

{α : Type u_1}
[PartialOrder α]
[AddCommSemigroup α]
[Sub α]
[OrderedSub α]
{a b c : α}
(hb : AddLECancellable b)
(h : a = b + c)


theorem isUnit_or_eq_zero_of_separable_expand {f : F[X]} (n : ℕ) (hp : 0 < p)
    (hf : (expand F (p ^ n) f).Separable) : IsUnit f ∨ n = 0

(hf : ((Polynomial.expand F (p ^ n)) f).Separable)


theorem Or.neg_resolve_left  (h : Or (Not a) b) (ha : a) : b

{a b : Prop}
(h : Or (Not a) b)
(ha : a)


theorem frequently_curry_prod_iff {α β : Type*} {l : Filter α} {m : Filter β}
    (s : Set α) (t : Set β) : (∃ᶠ x in l.curry m, x ∈ s ×ˢ t) ↔ sᶜ ∉ l ∧ tᶜ ∉ m

{α : Type u_4}
{β : Type u_5}
{l : Filter α}
{m : Filter β}
(s : Set α)
(t : Set β)

(∃ᶠ (x : α × β) in l.curry m, x ∈ s ×ˢ t) ↔ sᶜ ∉ l ∧ tᶜ ∉ m


@[simp] lemma zmultiplesAddHom_apply (x : β) (n : ℤ) : zmultiplesAddHom β x n = n • x

(β : Type u_4)
[AddCommGroup β]
(x : β)
(n : ℤ)


@[trans]
lemma ssubset_trans [IsTrans α (· ⊂ ·)] {a b c : α} : a ⊂ b → b ⊂ c → a ⊂ c

{α : Type u}
[HasSSubset α]
[IsTrans α fun x x_1 => x ⊂ x_1]
{a b c : α}


theorem differentiable_arctan : Differentiable ℝ arctan


lemma rel_π₂ (i₁ : I₁) {i₂ i₂' : I₂} (h : c₂.Rel i₂ i₂') :
    c₁₂.Rel (π c₁ c₂ c₁₂ ⟨i₁, i₂⟩) (π c₁ c₂ c₁₂ ⟨i₁, i₂'⟩)

{I₁ : Type u_1}
{I₂ : Type u_2}
{I₁₂ : Type u_3}
(c₁ : ComplexShape I₁)
{c₂ : ComplexShape I₂}
(c₁₂ : ComplexShape I₁₂)
[TotalComplexShape c₁ c₂ c₁₂]
(i₁ : I₁)
{i₂ i₂' : I₂}
(h : c₂.Rel i₂ i₂')

c₁₂.Rel (c₁.π c₂ c₁₂ (i₁, i₂)) (c₁.π c₂ c₁₂ (i₁, i₂'))


theorem ofReal_le_ennnorm (r : ℝ) : ENNReal.ofReal r ≤ ‖r‖₊


theorem monotone_rpow_of_nonneg {z : ℝ} (h : 0 ≤ z) : Monotone fun x : ℝ≥0 => x ^ z


/-- Two families of seminorms `p` and `q` on the same space generate the same topology
if each `p i` is bounded by some `C • Finset.sup s q` and vice-versa.

We formulate these boundedness assumptions as `Seminorm.IsBounded q p LinearMap.id` (and
vice-versa) to reuse the API. Furthermore, we don't actually state it as an equality of topologies
but as a way to deduce `WithSeminorms q` from `WithSeminorms p`, since this should be more
useful in practice. -/
protected theorem congr {p : SeminormFamily 𝕜 E ι} {q : SeminormFamily 𝕜 E ι'}
    [t : TopologicalSpace E] (hp : WithSeminorms p) (hpq : Seminorm.IsBounded p q LinearMap.id)
    (hqp : Seminorm.IsBounded q p LinearMap.id) : WithSeminorms q


theorem not_irreducible_of_not_unit_dvdNotUnit [CommMonoidWithZero α] {p q : α} (hp : ¬IsUnit p)
    (h : DvdNotUnit p q) : ¬Irreducible q

{α : Type u_1}
[CommMonoidWithZero α]
{p q : α}
(hp : ¬IsUnit p)
(h : DvdNotUnit p q)


@[to_additive]
lemma mem_ofUnits_iff_toUnits_mem (H : Subgroup Gˣ) (x : G) : x ∈ H.ofUnits ↔ (toUnits x) ∈ H

{G : Type u_2}
[Group G]
(H : Subgroup Gˣ)
(x : G)


theorem uIcc_eq [LocallyFiniteOrder α] [LocallyFiniteOrder β]
    [DecidableRel ((· ≤ ·) : α × β → α × β → Prop)] (p q : α × β) :
    Finset.uIcc p q = Finset.uIcc p.1 q.1 ×ˢ Finset.uIcc p.2 q.2

{α : Type u_1}
{β : Type u_2}
[Lattice α]
[Lattice β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
[DecidableRel fun x x_1 => x ≤ x_1]
(p q : α × β)


theorem contMDiffAt_symm_of_mem_maximalAtlas {x : H} (h : e ∈ maximalAtlas I M)
    (hx : x ∈ e.target) : ContMDiffAt I I n e.symm x

(h : e ∈ SmoothManifoldWithCorners.maximalAtlas I M)


theorem bind_map (f : α → β) (g : β → List γ) (l : List α) : (map f l).bind g = l.bind (fun a => g (f a))

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

(List.map f l).bind g = l.bind fun a => g (f a)


/-- If a family of sets is countable then so is the algebra of sets generated by it. -/
theorem countable_generateSetAlgebra (h : 𝒜.Countable) :
    (generateSetAlgebra 𝒜).Countable

{α : Type u_1}
{𝒜 : Set (Set α)}
(h : 𝒜.Countable)


lemma NNReal.dist_eq (a b : ℝ≥0) : dist a b = |(a : ℝ) - b|


theorem arg_expMapCircle {x : ℝ} (h₁ : -π < x) (h₂ : x ≤ π) : arg (expMapCircle x) = x


@[fun_prop]
theorem ContinuousOn.log (hf : ContinuousOn f s) (h₀ : ∀ x ∈ s, f x ≠ 0) :
    ContinuousOn (fun x => log (f x)) s

{α : Type u_1}
[TopologicalSpace α]
{f : α → ℝ}
{s : Set α}
(hf : ContinuousOn f s)
(h₀ : ∀ x ∈ s, f x ≠ 0)

ContinuousOn (fun x => Real.log (f x)) s


theorem UniqueDiffOn.image {f' : E → E →L[𝕜] F} (hs : UniqueDiffOn 𝕜 s)
    (hf' : ∀ x ∈ s, HasFDerivWithinAt f (f' x) s x) (hd : ∀ x ∈ s, DenseRange (f' x)) :
    UniqueDiffOn 𝕜 (f '' s)


/-- Over a characteristic-zero division ring, the centroids given by
two subsets of the points of a simplex are equal if and only if those
faces are given by the same subset of points. -/
@[simp]
theorem centroid_eq_iff [CharZero k] {n : ℕ} (s : Simplex k P n) {fs₁ fs₂ : Finset (Fin (n + 1))}
    {m₁ m₂ : ℕ} (h₁ : fs₁.card = m₁ + 1) (h₂ : fs₂.card = m₂ + 1) :
    fs₁.centroid k s.points = fs₂.centroid k s.points ↔ fs₁ = fs₂

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
[CharZero k]
{n : ℕ}
(s : Affine.Simplex k P n)
{fs₁ fs₂ : Finset (Fin (n + 1))}
{m₁ m₂ : ℕ}
(h₁ : fs₁.card = m₁ + 1)
(h₂ : fs₂.card = m₂ + 1)

Finset.centroid k fs₁ s.points = Finset.centroid k fs₂ s.points ↔ fs₁ = fs₂


protected theorem lt_add_right (c : Nat) (h : a < b) : a < b + c


theorem sup_assoc (a b c : α) : a ⊔ b ⊔ c = a ⊔ (b ⊔ c)

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


/-- This is also available as `_root_.div_eq_mul_inv`, using the
`Semifield` instance defined below.
-/
protected theorem div_eq_mul_inv [IsDedekindDomain A] (I J : FractionalIdeal A⁰ K) :
    I / J = I * J⁻¹

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


@[simp]
theorem coe_homothetyUnitsMulHom_eq_homothetyHom_coe (p : P) :
    ((↑) : (P ≃ᵃ[R] P) → P →ᵃ[R] P) ∘ homothetyUnitsMulHom p =
      AffineMap.homothetyHom p ∘ ((↑) : Rˣ → R)

{R : Type u_10}
{V : Type u_11}
{P : Type u_12}
[CommRing R]
[AddCommGroup V]
[Module R V]
[AffineSpace V P]
(p : P)

AffineEquiv.toAffineMap ∘ ⇑(AffineEquiv.homothetyUnitsMulHom p) = ⇑(AffineMap.homothetyHom p) ∘ Units.val


lemma _root_.Set.leftInvOn_id (s : Set α) : LeftInvOn id id s


@[simp]
theorem ceil_zero : ⌈(0 : α)⌉₊ = 0

{α : Type u_2}
[LinearOrderedSemiring α]
[FloorSemiring α]


theorem Matrix.coe_mulVecLin [Fintype n] (M : Matrix m n R) :
    (M.mulVecLin : _ → _) = M.mulVec

{R : Type u_1}
[CommSemiring R]
{m : Type u_4}
{n : Type u_5}
[Fintype n]
(M : Matrix m n R)


theorem le_cof_type [IsWellOrder α r] {c} : c ≤ cof (type r) ↔ ∀ S, Unbounded r S → c ≤ #S

{α : Type u_1}
{r : α → α → Prop}
[IsWellOrder α r]
{c : Cardinal.{u_1}}

c ≤ (Ordinal.type r).cof ↔ ∀ (S : Set α), Set.Unbounded r S → c ≤ #↑S


/-- The natural isomorphism `shortComplexFunctor C c j ≅ shortComplexFunctor' C c i j k`
when `c.prev j = i` and `c.next j = k`. -/
@[simps!]
noncomputable def natIsoSc' (i j k : ι) (hi : c.prev j = i) (hk : c.next j = k) :
    shortComplexFunctor C c j ≅ shortComplexFunctor' C c i j k

((HomologicalComplex.natIsoSc' C c i j k hi hk).hom.app X).τ₃ = (X.XIsoOfEq hk).hom


/-- If `E / F` is algebraic, then the `Field.finSepDegree F E` is equal to `Field.sepDegree F E`
as a natural number. This means that the cardinality of `Field.Emb F E` and the degree of
`(separableClosure F E) / F` are both finite or infinite, and when they are finite, they
coincide. -/
theorem finSepDegree_eq [Algebra.IsAlgebraic F E] :
    finSepDegree F E = Cardinal.toNat (sepDegree F E)

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

Field.finSepDegree F E = Cardinal.toNat (Field.sepDegree F E)


theorem map_sInf' (hf : RightOrdContinuous f) (s : Set α) : f (sInf s) = sInf (f '' s)

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


theorem measure_spanningSets_lt_top (μ : Measure α) [SigmaFinite μ] (i : ℕ) :
    μ (spanningSets μ i) < ∞

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


/-- If a module has a finite dimension, all bases are indexed by a finite type. -/
theorem Basis.nonempty_fintype_index_of_rank_lt_aleph0 {ι : Type*} (b : Basis ι R M)
    (h : Module.rank R M < ℵ₀) : Nonempty (Fintype ι)

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[StrongRankCondition R]
{ι : Type u_1}
(b : Basis ι R M)
(h : Module.rank R M < ℵ₀)


theorem isCoseparating_proj_preimage {𝒢 : Set C} (h𝒢 : IsCoseparating 𝒢) :
    IsCoseparating ((proj S T).obj ⁻¹' 𝒢)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(S : D)
(T : CategoryTheory.Functor C D)
{𝒢 : Set C}
(h𝒢 : CategoryTheory.IsCoseparating 𝒢)

CategoryTheory.IsCoseparating ((CategoryTheory.StructuredArrow.proj S T).obj ⁻¹' 𝒢)


theorem mem_conjugatesOfSet_iff {x : G} : x ∈ conjugatesOfSet s ↔ ∃ a ∈ s, IsConj a x

{G : Type u_1}
[Group G]
{s : Set G}
{x : G}

x ∈ Group.conjugatesOfSet s ↔ ∃ a ∈ s, IsConj a x


/-- Because of `coeff_hermite_of_odd_add`, every nonzero coefficient is described as follows. -/
theorem coeff_hermite_explicit :
    ∀ n k : ℕ, coeff (hermite (2 * n + k)) k = (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k

(Polynomial.hermite (2 * n + k)).coeff k = (-1) ^ n * ↑(2 * n - 1).doubleFactorial * ↑((2 * n + k).choose k)


theorem ImageMap.map_uniq_aux {f g : Arrow C} [HasImage f.hom] [HasImage g.hom] {sq : f ⟶ g}
    (map : image f.hom ⟶ image g.hom)
    (map_ι : map ≫ image.ι g.hom = image.ι f.hom ≫ sq.right := by aesop_cat)
    (map' : image f.hom ⟶ image g.hom)
    (map_ι' : map' ≫ image.ι g.hom = image.ι f.hom ≫ sq.right) : (map = map')

(map : CategoryTheory.Limits.image f.hom ⟶ CategoryTheory.Limits.image g.hom)

(map_ι : map ≫ CategoryTheory.Limits.image.ι g.hom = CategoryTheory.Limits.image.ι f.hom ≫ sq.right := by aesop_cat)

(map' : CategoryTheory.Limits.image f.hom ⟶ CategoryTheory.Limits.image g.hom)

(map_ι' : map' ≫ CategoryTheory.Limits.image.ι g.hom = CategoryTheory.Limits.image.ι f.hom ≫ sq.right)


@[to_additive]
theorem map_mul_right_ae (μ : Measure G) [IsMulRightInvariant μ] (x : G) :
    Filter.map (fun h => h * x) (ae μ) = ae μ

{G : Type u_2}
[MeasurableSpace G]
[Group G]
[MeasurableMul G]
(μ : MeasureTheory.Measure G)
[μ.IsMulRightInvariant]
(x : G)

Filter.map (fun h => h * x) (MeasureTheory.ae μ) = MeasureTheory.ae μ


@[to_additive (attr := simp)]
theorem OrderIso.mulRight_symm (a : α) : (OrderIso.mulRight a).symm = OrderIso.mulRight a⁻¹

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


theorem max_max_max_comm : max (max a b) (max c d) = max (max a c) (max b d)

{α : Type u}
[LinearOrder α]
(a b c d : α)


/-- The union of finitely many Gδ sets is a Gδ set, bounded indexed union version. -/
theorem IsGδ.biUnion {s : Set ι} (hs : s.Finite) {f : ι → Set X} (h : ∀ i ∈ s, IsGδ (f i)) :
    IsGδ (⋃ i ∈ s, f i)

{X : Type u_1}
{ι : Type u_3}
[TopologicalSpace X]
{s : Set ι}
(hs : s.Finite)
{f : ι → Set X}
(h : ∀ i ∈ s, IsGδ (f i))


theorem Minpoly.toAdjoin_apply' (a : AdjoinRoot (minpoly R x)) :
    Minpoly.toAdjoin R x a =
      liftHom (minpoly R x) (⟨x, self_mem_adjoin_singleton R x⟩ : adjoin R ({x} : Set S))
        (by simp [← Subalgebra.coe_eq_zero, aeval_subalgebra_coe]) a

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{x : S}
(a : AdjoinRoot (minpoly R x))

(AdjoinRoot.Minpoly.toAdjoin R x) a = (AdjoinRoot.liftHom (minpoly R x) ⟨x, ⋯⟩ ⋯) a


/-- The top `IntermediateField` is isomorphic to the field.

This is the intermediate field version of `Subalgebra.topEquiv`. -/
@[simps!]
def topEquiv : (⊤ : IntermediateField F E) ≃ₐ[F] E

{F : Type u_1}
[Field F]
{E : Type u_2}
[Field E]
[Algebra F E]

∀ (a : E), ↑(IntermediateField.topEquiv.symm a) = ↑((↑↑Subalgebra.topEquiv).symm a)


/-- If `μ` on `G ⧸ Γ` satisfies `QuotientMeasureEqMeasurePreimage` relative to a both left- and
  right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a left-invariant
  measure. -/
@[to_additive "If `μ` on `G ⧸ Γ` satisfies `AddQuotientMeasureEqMeasurePreimage` relative to a both
  left- and right-invariant measure on `G` and `Γ` is a normal subgroup, then `μ` is a
  left-invariant measure."]
lemma MeasureTheory.QuotientMeasureEqMeasurePreimage.mulInvariantMeasure_quotient
    [hasFun : HasFundamentalDomain Γ.op G ν] [QuotientMeasureEqMeasurePreimage ν μ] :
    μ.IsMulLeftInvariant

[hasFun : MeasureTheory.HasFundamentalDomain (↥Γ.op) G ν]


@[simp]
theorem lift_unique (f : X → A) (g : FreeAlgebra R X →ₐ[R] A) :
    (g : FreeAlgebra R X → A) ∘ ι R = f ↔ g = lift R f

{R : Type u_1}
[CommSemiring R]
{X : Type u_2}
{A : Type u_3}
[Semiring A]
[Algebra R A]
(f : X → A)
(g : FreeAlgebra R X →ₐ[R] A)

⇑g ∘ FreeAlgebra.ι R = f ↔ g = (FreeAlgebra.lift R) f


{α : Type u}
[PseudoEMetricSpace α]
{x : α}
{ε : ℝ≥0∞}


{α : Type u_1}
[Preorder α]
{s : UpperSet α}
{a : α}


theorem adjoin_le_equalizer (φ₁ φ₂ : A →ₐ[R] B) {s : Set A} (h : s.EqOn φ₁ φ₂) :
    adjoin R s ≤ equalizer φ₁ φ₂

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Semiring A]
[Semiring B]
[Algebra R A]
[Algebra R B]
(φ₁ φ₂ : A →ₐ[R] B)
{s : Set A}
(h : Set.EqOn (⇑φ₁) (⇑φ₂) s)

Algebra.adjoin R s ≤ AlgHom.equalizer φ₁ φ₂


theorem let_val_congr {α : Sort u} {β : Sort v} {a a' : α}
    (b : α → β) (h : a = a') : (let x := a; b x) = (let x := a'; b x)

(let x := a;
  b x) =
  let x := a';
  b x


theorem fderivWithin_of_isOpen (hs : IsOpen s) (hx : x ∈ s) : fderivWithin 𝕜 f s x = fderiv 𝕜 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}
(hs : IsOpen s)
(hx : x ∈ s)


/-- The dependent version of `MultilinearMap.domDomCongrLinearEquiv`. -/
@[simps apply symm_apply]
def domDomCongrLinearEquiv' {ι' : Type*} (σ : ι ≃ ι') :
    MultilinearMap R M₁ M₂ ≃ₗ[S] MultilinearMap R (fun i => M₁ (σ.symm i)) M₂

(R : Type uR)
(S : Type uS)
{ι : Type uι}
(M₁ : ι → Type v₁)
(M₂ : Type v₂)
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[(i : ι) → Module R (M₁ i)]
[AddCommMonoid M₂]
[Module R M₂]
[Semiring S]
[Module S M₂]
[SMulCommClass R S M₂]
{ι' : Type u_1}
(σ : ι ≃ ι')
(f : MultilinearMap R M₁ M₂)

(MultilinearMap.domDomCongrLinearEquiv' R S M₁ M₂ σ) f =
  { toFun := ⇑f ∘ ⇑(Equiv.piCongrLeft' M₁ σ).symm, map_add' := ⋯, map_smul' := ⋯ }


theorem M.default_consistent [Inhabited F.A] : ∀ n, Agree (default : CofixA F n) default

(F : PFunctor.{u})
[Inhabited F.A]
(n : ℕ)


theorem mk'_one (x) : mk' S x (1 : M) = algebraMap R S x

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
(S : Type u_2)
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
(x : R)

IsLocalization.mk' S x 1 = (algebraMap R S) x


lemma ext₃' (h₁ : S.P T.obj₁) (h₂ : S.P T.obj₂) :
    CategoryTheory.isoClosure S.P T.obj₃

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

(S : CategoryTheory.Triangulated.Subcategory C)

(T : CategoryTheory.Pretriangulated.Triangle C)

(hT : T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles)


@[simp]
theorem rightUnitor_hom_f (X : Center C) : Hom.f (ρ_ X).hom = (ρ_ X.1).hom

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


lemma upperSet_le_scott : upperSet α ≤ scott α


/-- This replaces `(g•z).re = a/c + *` in the standard theory with the following novel identity:
  `g • z = (a c + b d) / (c^2 + d^2) + (d z - c) / ((c^2 + d^2) (c z + d))`
  which does not need to be decomposed depending on whether `c = 0`. -/
theorem smul_eq_lcRow0_add {p : Fin 2 → ℤ} (hp : IsCoprime (p 0) (p 1)) (hg : (↑ₘg) 1 = p) :
    ↑(g • z) =
      (lcRow0 p ↑(g : SL(2, ℝ)) : ℂ) / ((p 0 : ℂ) ^ 2 + (p 1 : ℂ) ^ 2) +
        ((p 1 : ℂ) * z - p 0) / (((p 0 : ℂ) ^ 2 + (p 1 : ℂ) ^ 2) * (p 0 * z + p 1))

{g : SL(2, ℤ)}
(z : ℍ)
{p : Fin 2 → ℤ}
(hp : IsCoprime (p 0) (p 1))
(hg : ↑g 1 = p)

↑(g • z) =
  ↑((ModularGroup.lcRow0 p) ↑((Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) g)) / (↑(p 0) ^ 2 + ↑(p 1) ^ 2) +
    (↑(p 1) * ↑z - ↑(p 0)) / ((↑(p 0) ^ 2 + ↑(p 1) ^ 2) * (↑(p 0) * ↑z + ↑(p 1)))


theorem Context.evalList_sort_cons
  (ctx : Context α)
  (h : Commutative ctx.op)
  (x : Nat)
  (xs : List Nat)
  : evalList α ctx (sort (x :: xs)) = evalList α ctx (x :: sort xs)

{α : Sort u_1}
(ctx : Lean.Data.AC.Context α)
(h : Std.Commutative ctx.op)
(x : Nat)
(xs : List Nat)

Lean.Data.AC.evalList α ctx (Lean.Data.AC.sort (x :: xs)) = Lean.Data.AC.evalList α ctx (x :: Lean.Data.AC.sort xs)


lemma normalClosure_def : normalClosure F K L = ⨆ f : K →ₐ[F] L, f.fieldRange

(F : Type u_1)
(K : Type u_2)
(L : Type u_3)
[Field F]
[Field K]
[Field L]
[Algebra F K]
[Algebra F L]


protected theorem NullMeasurable.measurable' (h : NullMeasurable f μ) :
    @Measurable (NullMeasurableSpace α μ) β _ _ f

{α : Type u_2}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{f : α → β}
{μ : MeasureTheory.Measure α}
(h : MeasureTheory.NullMeasurable f μ)


theorem IsLocalization.mk' (h₁ : Localization.StrictUniversalPropertyFixedTarget L W D)
    (h₂ : Localization.StrictUniversalPropertyFixedTarget L W W.Localization) :
    IsLocalization L W

(h₁ : CategoryTheory.Localization.StrictUniversalPropertyFixedTarget L W D)

(h₂ : CategoryTheory.Localization.StrictUniversalPropertyFixedTarget L W W.Localization)


theorem lift_iInf_of_map_univ {f : ι → Filter α} {g : Set α → Filter β}
    (hg : ∀ s t, g (s ∩ t) = g s ⊓ g t) (hg' : g univ = ⊤) :
    (iInf f).lift g = ⨅ i, (f i).lift g

(hg : ∀ (s t : Set α), g (s ∩ t) = g s ⊓ g t)


theorem isClosed_iff {s : Set (CofiniteTopology X)} : IsClosed s ↔ s = univ ∨ s.Finite

{X : Type u}
{s : Set (CofiniteTopology X)}


theorem hasSum_real_toNNReal_of_nonneg {f : α → ℝ} (hf_nonneg : ∀ n, 0 ≤ f n) (hf : Summable f) :
    HasSum (fun n => Real.toNNReal (f n)) (Real.toNNReal (∑' n, f n))

{α : Type u_1}
{f : α → ℝ}
(hf_nonneg : ∀ (n : α), 0 ≤ f n)
(hf : Summable f)

HasSum (fun n => (f n).toNNReal) (∑' (n : α), f n).toNNReal


/-- A version of `Homeomorph.mulRight a⁻¹ b` that is defeq to `b / a`. -/
@[to_additive (attr := simps! (config := { simpRhs := true }))
  "A version of `Homeomorph.addRight (-a) b` that is defeq to `b - a`. "]
def Homeomorph.divRight (x : G) : G ≃ₜ G

{G : Type w}
[AddGroup G]
[TopologicalSpace G]
[TopologicalAddGroup G]
(x b : G)


theorem replicate_subset_singleton (n : ℕ) (a : α) : replicate n a ⊆ {a}


/-- The coercion from a non-unital `R`-algebra `A` to its unitization `Unitization R A`
realized as a non-unital algebra homomorphism. -/
@[simps]
def inrNonUnitalAlgHom (R A : Type*) [CommSemiring R] [NonUnitalSemiring A] [Module R A] :
    A →ₙₐ[R] Unitization R A

(R : Type u_1)
(A : Type u_2)
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
(a : A)

(Unitization.inrNonUnitalAlgHom R A) a = ↑a


/-- If the restriction of a global section to each member of an open cover is zero, then it is
globally zero. -/
lemma zero_of_zero_cover {X : Scheme.{u}} {U : X.Opens} (s : Γ(X, U)) (𝒰 : X.OpenCover)
    (h : ∀ i : 𝒰.J, (𝒰.map i).app U s = 0) : s = 0

(h : ∀ (i : 𝒰.J), (AlgebraicGeometry.Scheme.Hom.app (𝒰.map i) U) s = 0)


/-- The linear map from `⨂[𝕜] i, Eᵢ` to `ContinuousMultilinearMap 𝕜 E F →L[𝕜] F` sending
`x` in `⨂[𝕜] i, Eᵢ` to the map `f ↦ f.lift x`.
-/
@[simps!]
noncomputable def toDualContinuousMultilinearMap : (⨂[𝕜] i, E i) →ₗ[𝕜]
    ContinuousMultilinearMap 𝕜 E F →L[𝕜] F

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

∀ (a : ContinuousMultilinearMap 𝕜 E F),
  ((PiTensorProduct.toDualContinuousMultilinearMap F) x) a = (PiTensorProduct.lift a.toMultilinearMap) x


@[simp]
theorem ListBlank.append_mk {Γ} [Inhabited Γ] (l₁ l₂ : List Γ) :
    ListBlank.append l₁ (ListBlank.mk l₂) = ListBlank.mk (l₁ ++ l₂)

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

Turing.ListBlank.append l₁ (Turing.ListBlank.mk l₂) = Turing.ListBlank.mk (l₁ ++ l₂)


theorem mem_inf_of_inter {f g : Filter α} {s t u : Set α} (hs : s ∈ f) (ht : t ∈ g)
    (h : s ∩ t ⊆ u) : u ∈ f ⊓ g

{α : Type u}
{f g : Filter α}
{s t u : Set α}
(hs : s ∈ f)
(ht : t ∈ g)
(h : s ∩ t ⊆ u)


theorem mk'_mem_incidenceSet_right_iff : s(a, b) ∈ G.incidenceSet b ↔ G.Adj a b

{V : Type u}
(G : SimpleGraph V)
{a b : V}


theorem eq_zero_iff_dvd (x y : R) : Ideal.Quotient.mk (Ideal.span ({x} : Set R)) y = 0 ↔ x ∣ y

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


@[to_additive]
theorem norm_mul_le (x y : FreeGroup α) : norm (x * y) ≤ norm x + norm y

{α : Type u}
[DecidableEq α]
(x y : FreeAddGroup α)


theorem prod_lift'_lift' {f₁ : Filter α₁} {f₂ : Filter α₂} {g₁ : Set α₁ → Set β₁}
    {g₂ : Set α₂ → Set β₂} (hg₁ : Monotone g₁) (hg₂ : Monotone g₂) :
    f₁.lift' g₁ ×ˢ f₂.lift' g₂ = f₁.lift fun s => f₂.lift' fun t => g₁ s ×ˢ g₂ t

{α₁ : Type u_5}
{α₂ : Type u_6}
{β₁ : Type u_7}
{β₂ : Type u_8}
{f₁ : Filter α₁}
{f₂ : Filter α₂}
{g₁ : Set α₁ → Set β₁}
{g₂ : Set α₂ → Set β₂}
(hg₁ : Monotone g₁)
(hg₂ : Monotone g₂)


theorem isPiSystem_measurableCylinders : IsPiSystem (measurableCylinders α)

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


@[simp, norm_cast]
theorem coe_top : ((⊤ : Regular α) : α) = ⊤


/-- `ContinuousAlternatingMap.pi` as a `LinearEquiv`. -/
@[simps (config := { simpRhs := true })]
def piLinearEquiv {ι' : Type*} {M' : ι' → Type*} [∀ i, AddCommMonoid (M' i)]
    [∀ i, TopologicalSpace (M' i)] [∀ i, ContinuousAdd (M' i)] [∀ i, Module R (M' i)]
    [∀ i, Module A (M' i)] [∀ i, SMulCommClass A R (M' i)] [∀ i, ContinuousConstSMul R (M' i)] :
    (∀ i, M [⋀^ι]→L[A] M' i) ≃ₗ[R] M [⋀^ι]→L[A] ∀ i, M' i

[∀ (i : ι'), ContinuousConstSMul R (M' i)]

∀ (a : M [⋀^ι]→L[A] ((i : ι') → M' i)) (i : ι'),
  ContinuousAlternatingMap.piLinearEquiv.symm a i = (ContinuousLinearMap.proj i).compContinuousAlternatingMap a


theorem epi_iff_surjective {X Y : CompHaus.{u}} (f : X ⟶ Y) : Epi f ↔ Function.Surjective f

CategoryTheory.Epi f ↔ Function.Surjective ⇑f


theorem max_eq_left_of_lt {a b : α} (h : b < a) : max a b = a

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


@[to_additive]
theorem finiteIndex_iInf {ι : Type*} [Finite ι] {f : ι → Subgroup G}
    (hf : ∀ i, (f i).FiniteIndex) : (⨅ i, f i).FiniteIndex

{G : Type u_1}
[Group G]
{ι : Type u_3}
[Finite ι]
{f : ι → Subgroup G}
(hf : ∀ (i : ι), (f i).FiniteIndex)


/-- If `E / F` is an algebraic extension, `F` is separably closed,
then `E / F` is purely inseparable. -/
theorem Algebra.IsAlgebraic.isPurelyInseparable_of_isSepClosed [Algebra.IsAlgebraic F E]
    [IsSepClosed F] : IsPurelyInseparable F E

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
[Algebra.IsAlgebraic F E]
[IsSepClosed F]


theorem StableUnderBaseChange.mk {P : MorphismProperty C} [HasPullbacks C] [RespectsIso P]
    (hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S) (_ : P g), P (pullback.fst f g)) :
    StableUnderBaseChange P

(hP₂ : ∀ (X Y S : C) (f : X ⟶ S) (g : Y ⟶ S), P g → P (CategoryTheory.Limits.pullback.fst f g))


/-- The `nonsing_inv` of `A` is a right inverse. -/
@[simp]
theorem mul_nonsing_inv (h : IsUnit A.det) : A * A⁻¹ = 1

{n : Type u'}
{α : Type v}
[Fintype n]
[DecidableEq n]
[CommRing α]
(A : Matrix n n α)
(h : IsUnit A.det)


/-- Given `F : WalkingSpan ⥤ C`, which is really the same as `span (F.map fst) (F.map snd)`,
    and a cocone on `F`, we get a pushout cocone on `F.map fst` and `F.map snd`. -/
@[simps]
def PushoutCocone.ofCocone {F : WalkingSpan ⥤ C} (t : Cocone F) :
    PushoutCocone (F.map fst) (F.map snd)

{F : CategoryTheory.Limits.WalkingSpan ⥤ C}

(CategoryTheory.Limits.PushoutCocone.ofCocone t).ι = (CategoryTheory.Limits.diagramIsoSpan F).inv ≫ t.ι


/-- If `E / F` is algebraic, then an intermediate field of `E / F` contains the
separable closure of `F` in `E` if and only if `E` is purely inseparable over it. -/
theorem separableClosure_le_iff [Algebra.IsAlgebraic F E] (L : IntermediateField F E) :
    separableClosure F E ≤ L ↔ IsPurelyInseparable L E

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
[Algebra.IsAlgebraic F E]
(L : IntermediateField F E)

separableClosure F E ≤ L ↔ IsPurelyInseparable (↥L) E


/-- Composition of triangle morphisms gives a triangle morphism.
-/
@[simps]
def TriangleMorphism.comp (f : TriangleMorphism T₁ T₂) (g : TriangleMorphism T₂ T₃) :
    TriangleMorphism T₁ T₃

{T₁ T₂ T₃ : CategoryTheory.Pretriangulated.Triangle C}

(f : CategoryTheory.Pretriangulated.TriangleMorphism T₁ T₂)

(g : CategoryTheory.Pretriangulated.TriangleMorphism T₂ T₃)


theorem pi_univ_Ioc_update_right {x y : ∀ i, α i} {i₀ : ι} {m : α i₀} (hm : m ≤ y i₀) :
    (pi univ fun i ↦ Ioc (x i) (update y i₀ m i)) =
      { z | z i₀ ≤ m } ∩ pi univ fun i ↦ Ioc (x i) (y i)

{ι : Type u_1}
{α : ι → Type u_2}
[(i : ι) → Preorder (α i)]
[DecidableEq ι]
{x y : (i : ι) → α i}
{i₀ : ι}
{m : α i₀}
(hm : m ≤ y i₀)

(Set.univ.pi fun i => Set.Ioc (x i) (Function.update y i₀ m i)) =
  {z | z i₀ ≤ m} ∩ Set.univ.pi fun i => Set.Ioc (x i) (y i)


lemma nndist_pi_def (f g : ∀ b, π b) : nndist f g = sup univ fun b => nndist (f b) (g b)

{β : Type u_2}
{π : β → Type u_3}
[Fintype β]
[(b : β) → PseudoMetricSpace (π b)]
(f g : (b : β) → π b)

nndist f g = Finset.univ.sup fun b => nndist (f b) (g b)


@[simp]
theorem toMul_sum (s : Finset ι) (f : ι → Additive α) :
    toMul (∑ i ∈ s, f i) = ∏ i ∈ s, toMul (f i)

{ι : Type u_1}
{α : Type u_3}
[CommMonoid α]
(s : Finset ι)
(f : ι → Additive α)

Additive.toMul (∑ i ∈ s, f i) = ∏ i ∈ s, Additive.toMul (f i)


theorem tendsto_swap4_prod {h : Filter γ} {k : Filter δ} :
    Tendsto (fun p : (α × β) × γ × δ => ((p.1.1, p.2.1), (p.1.2, p.2.2))) ((f ×ˢ g) ×ˢ (h ×ˢ k))
      ((f ×ˢ h) ×ˢ (g ×ˢ k))

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{f : Filter α}
{g : Filter β}
{h : Filter γ}
{k : Filter δ}

Filter.Tendsto (fun p => ((p.1.1, p.2.1), p.1.2, p.2.2)) ((f ×ˢ g) ×ˢ h ×ˢ k) ((f ×ˢ h) ×ˢ g ×ˢ k)


/-- A version of the **Hahn-Banach theorem**: given disjoint convex sets `s`, `t` where `s` is open,
there is a continuous linear functional which separates them. -/
theorem geometric_hahn_banach_open (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) (ht : Convex ℝ t)
    (disj : Disjoint s t) : ∃ (f : E →L[ℝ] ℝ) (u : ℝ), (∀ a ∈ s, f a < u) ∧ ∀ b ∈ t, u ≤ f b

{E : Type u_2}
[TopologicalSpace E]
[AddCommGroup E]
[TopologicalAddGroup E]
[Module ℝ E]
[ContinuousSMul ℝ E]
{s t : Set E}
(hs₁ : Convex ℝ s)
(hs₂ : IsOpen s)
(ht : Convex ℝ t)
(disj : Disjoint s t)

∃ f u, (∀ a ∈ s, f a < u) ∧ ∀ b ∈ t, u ≤ f b


theorem chromaticNumber_eq_zero_of_isempty (G : SimpleGraph V) [IsEmpty V] :
    G.chromaticNumber = 0

{V : Type u}
(G : SimpleGraph V)
[IsEmpty V]


/-- For `κ' := map κ (Prod.map (id : β → β) e) (measurable_id.prod_map he.measurable)`, the
hypothesis `hη` is `fst κ' ⊗ₖ η = κ'`. The conclusion of the lemma is
`fst κ ⊗ₖ borelMarkovFromReal Ω η = comapRight (fst κ' ⊗ₖ η) _`. -/
lemma compProd_fst_borelMarkovFromReal_eq_comapRight_compProd
    (κ : Kernel α (β × Ω)) [IsSFiniteKernel κ] (η : Kernel (α × β) ℝ) [IsSFiniteKernel η]
    (hη : (fst (map κ (Prod.map (id : β → β) (embeddingReal Ω))
        (measurable_id.prod_map (measurableEmbedding_embeddingReal Ω).measurable))) ⊗ₖ η
      = map κ (Prod.map (id : β → β) (embeddingReal Ω))
        (measurable_id.prod_map (measurableEmbedding_embeddingReal Ω).measurable)) :
    fst κ ⊗ₖ borelMarkovFromReal Ω η
      = comapRight (fst (map κ (Prod.map (id : β → β) (embeddingReal Ω))
          (measurable_id.prod_map (measurableEmbedding_embeddingReal Ω).measurable)) ⊗ₖ η)
        (MeasurableEmbedding.id.prod_mk (measurableEmbedding_embeddingReal Ω))

(κ : ProbabilityTheory.Kernel α (β × Ω))

(η : ProbabilityTheory.Kernel (α × β) ℝ)

(hη :
  (κ.map (Prod.map id (MeasureTheory.embeddingReal Ω)) ⋯).fst ⊗ₖ η =
    κ.map (Prod.map id (MeasureTheory.embeddingReal Ω)) ⋯)

κ.fst ⊗ₖ ProbabilityTheory.Kernel.borelMarkovFromReal Ω η =
  ((κ.map (Prod.map id (MeasureTheory.embeddingReal Ω)) ⋯).fst ⊗ₖ η).comapRight ⋯


theorem transvection_mul_transvection_same (h : i ≠ j) (c d : R) :
    transvection i j c * transvection i j d = transvection i j (c + d)

{n : Type u_1}
{R : Type u₂}
[DecidableEq n]
[CommRing R]
(i j : n)
[Fintype n]
(h : i ≠ j)
(c d : R)

Matrix.transvection i j c * Matrix.transvection i j d = Matrix.transvection i j (c + d)


theorem seq_mem_seq {f : Filter (α → β)} {g : Filter α} {s : Set (α → β)} {t : Set α} (hs : s ∈ f)
    (ht : t ∈ g) : s.seq t ∈ f.seq g

{α : Type u}
{β : Type v}
{f : Filter (α → β)}
{g : Filter α}
{s : Set (α → β)}
{t : Set α}
(hs : s ∈ f)
(ht : t ∈ g)


theorem nonempty_iso_symm (X Y : C) : Nonempty (X ≅ Y) ↔ Nonempty (Y ≅ X)

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


theorem Monic.of_mul_monic_right (hq : q.Monic) (hpq : (p * q).Monic) : p.Monic

{R : Type u}
[Semiring R]
{p q : R[X]}
(hq : q.Monic)
(hpq : (p * q).Monic)


/-- If the multiplication is smooth, then it is continuous. This is not an instance for technical
reasons, see note [Design choices about smooth algebraic structures]. -/
@[to_additive "If the addition is smooth, then it is continuous. This is not an instance for
technical reasons, see note [Design choices about smooth algebraic structures]."]
theorem continuousMul_of_smooth : ContinuousMul G

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{H : Type u_2}
[TopologicalSpace H]
{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
(I : ModelWithCorners 𝕜 E H)
{G : Type u_4}
[Mul G]
[TopologicalSpace G]
[ChartedSpace H G]
[SmoothMul I G]


theorem mem_mk_left (x y : α) : x ∈ s(x, y)


theorem exists_mem_image {f : α → β} {s : Set α} {p : β → Prop} :
    (∃ y ∈ f '' s, p y) ↔ ∃ x ∈ s, p (f x)

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


theorem StableUnderBaseChange.pullback_fst_app_top
    (hP : StableUnderBaseChange P) (hP' : RespectsIso P)
    {X Y S : Scheme} [IsAffine X] [IsAffine Y] [IsAffine S] (f : X ⟶ S) (g : Y ⟶ S)
    (H : P (g.app ⊤)) : P ((pullback.fst f g).app ⊤)

(P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop)

(hP : RingHom.StableUnderBaseChange fun {R S} [CommRing R] [CommRing S] => P)

(hP' : RingHom.RespectsIso fun {R S} [CommRing R] [CommRing S] => P)

(H : P (AlgebraicGeometry.Scheme.Hom.app g ⊤))

P (AlgebraicGeometry.Scheme.Hom.app (CategoryTheory.Limits.pullback.fst f g) ⊤)


theorem eraseIdx_insertNth' {v : Vector α (n + 1)} :
    ∀ {i : Fin (n + 1)} {j : Fin (n + 2)},
      eraseIdx (j.succAbove i) (insertNth a j v) = insertNth a (i.predAbove j) (eraseIdx i v)

{n : ℕ}
{α : Type u_1}
{a : α}
{v : Mathlib.Vector α (n + 1)}
{i : Fin (n + 1)}
{j : Fin (n + 2)}

Mathlib.Vector.eraseIdx (j.succAbove i) (Mathlib.Vector.insertNth a j v) =
  Mathlib.Vector.insertNth a (i.predAbove j) (Mathlib.Vector.eraseIdx i v)


theorem of_one : (of 1 : FreeAbelianGroup α) = 1


theorem mk_finsupp_of_infinite (α β : Type u) [Infinite α] [Zero β] [Nontrivial β] :
    #(α →₀ β) = max #α #β


theorem mul_mem_nonunits_left [CommMonoid α] : a ∈ nonunits α → a * b ∈ nonunits α


/-- All `FunLike`s are finite if their domain and codomain are.

Non-dependent version of `DFunLike.finite` that might be easier to infer.
Can't be an instance because it can cause infinite loops.
-/
theorem FunLike.finite [Finite α] [Finite γ] : Finite G

(G : Sort u_2)
{α : Sort u_3}
{γ : Sort u_4}
[FunLike G α γ]
[Finite α]
[Finite γ]


theorem ext_get?_iff' {l₁ l₂ : List α} : l₁ = l₂ ↔
    ∀ n < max l₁.length l₂.length, l₁.get? n = l₂.get? n

l₁ = l₂ ↔ ∀ (n : ℕ), n < max l₁.length l₂.length → l₁.get? n = l₂.get? n


@[simp] theorem repr_smul (g : G) (b : Basis ι R M) :
    (g • b).repr = (DistribMulAction.toLinearEquiv _ _ g).symm.trans b.repr

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{G : Type u_10}
[Group G]
[DistribMulAction G M]
[SMulCommClass G R M]
(g : G)
(b : Basis ι R M)

(g • b).repr = (DistribMulAction.toLinearEquiv R M g).symm ≪≫ₗ b.repr


/-- Construct a unit associated to the place `w₁`. The family, for `w₁ ≠ w₀`, formed by the
image by the `logEmbedding` of these units is `ℝ`-linearly independent, see
`unitLattice_span_eq_top`. -/
theorem exists_unit (w₁ : InfinitePlace K) :
    ∃ u : (𝓞 K)ˣ, ∀ w : InfinitePlace K, w ≠ w₁ → Real.log (w u) < 0

(K : Type u_1)
[Field K]
[NumberField K]
(w₁ : NumberField.InfinitePlace K)

∃ u, ∀ (w : NumberField.InfinitePlace K), w ≠ w₁ → Real.log (w ((algebraMap (𝓞 K) K) ↑u)) < 0


/--
A complete atomic Boolean algebra is a complete Boolean algebra
that is also completely distributive.

We take iSup_iInf_eq as the definition here,
and prove later on that this implies atomicity.
-/
-- We do not directly extend `CompletelyDistribLattice` to avoid having the `hnot` field
-- We do not directly extend `CompleteBooleanAlgebra` to avoid having the `inf_sSup_le_iSup_inf` and
-- `iInf_sup_le_sup_sInf` fields
class CompleteAtomicBooleanAlgebra (α : Type u) extends CompleteLattice α, BooleanAlgebra α where
  protected iInf_iSup_eq {ι : Type u} {κ : ι → Type u} (f : ∀ a, κ a → α) :
    (⨅ a, ⨆ b, f a b) = ⨆ g : ∀ a, κ a, ⨅ a, f a (g a)

{α : Type u}
[self : CompleteAtomicBooleanAlgebra α]
{ι : Type u}
{κ : ι → Type u}
(f : (a : ι) → κ a → α)


@[simp]
theorem coe_mulEquiv_refl : (RingEquiv.refl R : R ≃* R) = MulEquiv.refl R


@[nontriviality]
theorem Subsingleton.conformalAt [Subsingleton X] (f : X → Y) (x : X) : ConformalAt f x

{X : Type u_1}
{Y : Type u_2}
[NormedAddCommGroup X]
[NormedAddCommGroup Y]
[NormedSpace ℝ X]
[NormedSpace ℝ Y]
[Subsingleton X]
(f : X → Y)
(x : X)


theorem isIrreducible (s : IrreducibleCloseds α) : IsIrreducible (s : Set α)

(s : TopologicalSpace.IrreducibleCloseds α)


@[to_additive]
theorem le_ciInf_mul [CovariantClass α α (Function.swap (· * ·)) (· ≤ ·)] {a : α} {g : ι → α}
    {h : α} (H : ∀ i, a ≤ g i * h) : a ≤ iInf g * h

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


theorem Pi.uniformContinuous_precomp' (φ : ι' → ι) :
    UniformContinuous (fun (f : (∀ i, α i)) (j : ι') ↦ f (φ j))

{ι : Type u_1}
{ι' : Type u_2}
(α : ι → Type u)
[U : (i : ι) → UniformSpace (α i)]
(φ : ι' → ι)


theorem upperCrossingTime_mono (hnm : n ≤ m) :
    upperCrossingTime a b f N n ω ≤ upperCrossingTime a b f N m ω

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

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


theorem condIndep_of_condIndep_of_le_right {m' m₁ m₂ m₃ : MeasurableSpace Ω}
    {mΩ : MeasurableSpace Ω} [StandardBorelSpace Ω] [Nonempty Ω]
    {hm' : m' ≤ mΩ} {μ : Measure Ω} [IsFiniteMeasure μ]
    (h_indep : CondIndep m' m₁ m₂ hm' μ) (h32 : m₃ ≤ m₂) :
    CondIndep m' m₁ m₃ hm' μ

(h_indep : ProbabilityTheory.CondIndep m' m₁ m₂ hm' μ)

ProbabilityTheory.CondIndep m' m₁ m₃ hm' μ


@[to_additive]
theorem symm_comp_ofMulEquivOfLocalizations_apply' {k : P ≃* N} (x) :
    k ((f.ofMulEquivOfLocalizations k.symm).toMap x) = f.toMap x

{M : Type u_1}
[AddCommMonoid M]
{S : AddSubmonoid M}
{N : Type u_2}
[AddCommMonoid N]
{P : Type u_3}
[AddCommMonoid P]
(f : S.LocalizationMap N)
{k : P ≃+ N}
(x : M)

k ((f.ofAddEquivOfLocalizations k.symm).toMap x) = f.toMap x


@[simp]
theorem sin_pi_div_eight : sin (π / 8) = √(2 - √2) / 2


/-- Note that `0 : 0 →qᵢ Q` alone would not be well-typed as the RHS. -/
@[simp]
theorem Isometry.proj_comp_single_of_ne [Fintype ι] [DecidableEq ι]
    {i j : ι} (h : i ≠ j) (Q : QuadraticMap R (Mᵢ i) P) :
    (proj i Q).comp (single _ j) = (0 : 0 →qᵢ Q).comp (ofEq (Pi.single_eq_of_ne h.symm _))

{ι : Type u_1}
{R : Type u_2}
{P : Type u_7}
{Mᵢ : ι → Type u_8}
[CommSemiring R]
[(i : ι) → AddCommMonoid (Mᵢ i)]
[AddCommMonoid P]
[(i : ι) → Module R (Mᵢ i)]
[Module R P]
[Fintype ι]
[DecidableEq ι]
{i j : ι}
(h : i ≠ j)
(Q : QuadraticMap R (Mᵢ i) P)

(QuadraticMap.Isometry.proj i Q).comp (QuadraticMap.Isometry.single (Pi.single i Q) j) =
  QuadraticMap.Isometry.comp 0 (QuadraticMap.Isometry.ofEq ⋯)


/-- The identification `mop X ⊗ - = mop (- ⊗ X)` as a natural isomorphism. -/
@[simps!]
def MonoidalOpposite.tensorLeftMopIso (X : C) :
    tensorLeft (mop X) ≅ unmopFunctor C ⋙ tensorRight X ⋙ mopFunctor C

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

∀ (X_1 : Cᴹᵒᵖ),
  ((CategoryTheory.MonoidalOpposite.tensorLeftMopIso X).inv.app X_1).unmop =
    𝟙 (CategoryTheory.MonoidalCategory.tensorObj X_1.unmop X)


theorem lt_add_right (n m : ℕ+) : n < n + m


theorem lt_iff : x < y ↔ x.1 < y.1 ∧ x.2 ≤ y.2 ∨ x.1 ≤ y.1 ∧ x.2 < y.2

{α : Type u_2}
{β : Type u_3}
[Preorder α]
[Preorder β]
{x y : α × β}


/-- Radon-Nikodym derivative of the scalar multiple of a measure.
See also `rnDeriv_smul_left_of_ne_top'`, which requires sigma-finite `ν` and `μ`. -/
theorem rnDeriv_smul_left_of_ne_top (ν μ : Measure α) [IsFiniteMeasure ν]
    [ν.HaveLebesgueDecomposition μ] {r : ℝ≥0∞} (hr : r ≠ ∞) :
    (r • ν).rnDeriv μ =ᵐ[μ] r • ν.rnDeriv μ

{α : Type u_1}
{m : MeasurableSpace α}
(ν μ : MeasureTheory.Measure α)
[MeasureTheory.IsFiniteMeasure ν]
[ν.HaveLebesgueDecomposition μ]
{r : ℝ≥0∞}
(hr : r ≠ ⊤)


theorem ne_insert_of_not_mem {s : Set α} (t : Set α) {a : α} : a ∉ s → s ≠ insert a t

{α : Type u}
{s : Set α}
(t : Set α)
{a : α}


theorem isThreeCycle_isConj (h5 : 5 ≤ Fintype.card α) {σ τ : alternatingGroup α}
    (hσ : IsThreeCycle (σ : Perm α)) (hτ : IsThreeCycle (τ : Perm α)) : IsConj σ τ

{α : Type u_1}
[Fintype α]
[DecidableEq α]
(h5 : 5 ≤ Fintype.card α)
{σ τ : ↥(alternatingGroup α)}
(hσ : (↑σ).IsThreeCycle)
(hτ : (↑τ).IsThreeCycle)


theorem inf_limsup (a : α) : a ⊓ limsup u f = limsup (fun x => a ⊓ u x) f

{α : Type u_1}
{β : Type u_2}
[CompleteDistribLattice α]
{f : Filter β}
{u : β → α}
(a : α)

a ⊓ Filter.limsup u f = Filter.limsup (fun x => a ⊓ u x) f


theorem Nodup.mem_erase_iff [DecidableEq α] {a b : α} {l} (d : Nodup l) :
    a ∈ l.erase b ↔ a ≠ b ∧ a ∈ l

{α : Type u_1}
[DecidableEq α]
{a b : α}
{l : Multiset α}
(d : l.Nodup)