theorem Tendsto.eventually_forall_le_atBot [Preorder β] {l : Filter α}
    {p : β → Prop} {f : α → β} (hf : Tendsto f l atBot) (h_evtl : ∀ᶠ x in atBot, p x) :
    ∀ᶠ x in l, ∀ y, y ≤ f x → p y

(h_evtl : ∀ᶠ (x : β) in Filter.atBot, p x)


@[simp]
theorem zeroIsoTerminal_inv [HasTerminal C] : zeroIsoTerminal.inv = (0 : ⊤_ C ⟶ 0)


/-- A subring `S` of `R` determines a subring `S.op` of the opposite ring `Rᵐᵒᵖ`. -/
@[simps]
def opEquiv : Subring R ≃o Subring Rᵐᵒᵖ


theorem Finset.centerMass_mem_convexHull (t : Finset ι) {w : ι → R} (hw₀ : ∀ i ∈ t, 0 ≤ w i)
    (hws : 0 < ∑ i ∈ t, w i) {z : ι → E} (hz : ∀ i ∈ t, z i ∈ s) :
    t.centerMass w z ∈ convexHull R s

{R : Type u_1}
{E : Type u_3}
{ι : Type u_5}
[LinearOrderedField R]
[AddCommGroup E]
[Module R E]
{s : Set E}
(t : Finset ι)
{w : ι → R}
(hw₀ : ∀ i ∈ t, 0 ≤ w i)
(hws : 0 < ∑ i ∈ t, w i)
{z : ι → E}
(hz : ∀ i ∈ t, z i ∈ s)


/-- Algebra equivalences between `Algebra`s are the same as (isomorphic to) isomorphisms in
`AlgebraCat`. -/
@[simps]
def algEquivIsoAlgebraIso {X Y : Type u} [Ring X] [Ring Y] [Algebra R X] [Algebra R Y] :
    (X ≃ₐ[R] Y) ≅ AlgebraCat.of R X ≅ AlgebraCat.of R Y

{R : Type u}
[CommRing R]
{X Y : Type u}
[Ring X]
[Ring Y]
[Algebra R X]
[Algebra R Y]
(e : X ≃ₐ[R] Y)

algEquivIsoAlgebraIso.hom e = e.toAlgebraIso


@[to_additive] lemma pow_inv_comm (a : G) (m n : ℕ) : a⁻¹ ^ m * a ^ n = a ^ n * a⁻¹ ^ m

{G : Type u_1}
[Group G]
(a : G)
(m n : ℕ)


@[simp] lemma comap_id {G : SimpleGraph V} : G.comap id = G


@[simp]
theorem deleteEdges_deleteEdges (s s' : Set (Sym2 V)) :
    (G.deleteEdges s).deleteEdges s' = G.deleteEdges (s ∪ s')

{V : Type u}
{G : SimpleGraph V}
(s s' : Set (Sym2 V))


@[simp]
theorem expMapCircle_add (x y : ℝ) : expMapCircle (x + y) = expMapCircle x * expMapCircle y


@[to_additive]
theorem HasProd.hasProd_compl_iff {s : Set β} (hf : HasProd (f ∘ (↑) : s → α) a₁) :
    HasProd (f ∘ (↑) : ↑sᶜ → α) a₂ ↔ HasProd f (a₁ * a₂)

{α : Type u_1}
{β : Type u_2}
[CommGroup α]
[TopologicalSpace α]
[TopologicalGroup α]
{f : β → α}
{a₁ a₂ : α}
{s : Set β}
(hf : HasProd (f ∘ Subtype.val) a₁)

HasProd (f ∘ Subtype.val) a₂ ↔ HasProd f (a₁ * a₂)


/-- If `C` is cofiltered, and we have a functor `L : C ⥤ D` with a right adjoint,
then `D` is cofiltered.
-/
theorem of_left_adjoint {L : C ⥤ D} {R : D ⥤ C} (h : L ⊣ R) : IsCofiltered D

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.IsCofiltered C]
{D : Type u₁}
[CategoryTheory.Category.{v₁, u₁} D]
{L : CategoryTheory.Functor C D}
{R : CategoryTheory.Functor D C}
(h : L ⊣ R)


@[simp]
theorem mapAccumr₂_snoc (f : α → β → σ → σ × φ) (x : α) (y : β) :
    mapAccumr₂ f (xs.snoc x) (ys.snoc y) c
    = let q := f x y c
      let r := mapAccumr₂ f xs ys q.1
      (r.1, r.2.snoc q.2)

{α : Type}
{n : ℕ}
{β : Type}
(xs : Mathlib.Vector α n)
(ys : Mathlib.Vector β n)
{σ φ : Type}
{c : σ}
(f : α → β → σ → σ × φ)
(x : α)
(y : β)

Mathlib.Vector.mapAccumr₂ f (xs.snoc x) (ys.snoc y) c =
  let q := f x y c;
  let r := Mathlib.Vector.mapAccumr₂ f xs ys q.1;
  (r.1, r.2.snoc q.2)


@[simp]
theorem diag_multiset_sum [AddCommMonoid α] (s : Multiset (Matrix n n α)) :
    diag s.sum = (s.map diag).sum

{n : Type u_3}
{α : Type v}
[AddCommMonoid α]
(s : Multiset (Matrix n n α))

s.sum.diag = (Multiset.map Matrix.diag s).sum


protected theorem ne_iff_lt_or_gt {a b : Int} : a ≠ b ↔ a < b ∨ b < a


theorem rcons_injective {i : ι} : Function.Injective (rcons (d := d) i)

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


lemma polyCharpolyAux_map_eq_toMatrix_charpoly (x : L) :
    (polyCharpolyAux φ b bₘ).map (MvPolynomial.eval (b.repr x)) =
      (toMatrix bₘ bₘ (φ x)).charpoly

{R : Type u_1}
{L : Type u_2}
{M : Type u_3}
{ι : Type u_5}
{ιM : Type u_7}
[CommRing R]
[AddCommGroup L]
[Module R L]
[AddCommGroup M]
[Module R M]
(φ : L →ₗ[R] Module.End R M)
[Fintype ι]
[Fintype ιM]
[DecidableEq ι]
[DecidableEq ιM]
(b : Basis ι R L)
(bₘ : Basis ιM R M)
(x : L)

Polynomial.map (MvPolynomial.eval ⇑(b.repr x)) (φ.polyCharpolyAux b bₘ) = ((LinearMap.toMatrix bₘ bₘ) (φ x)).charpoly


theorem congr_f {S₁ S₂ : Split C} {Φ₁ Φ₂ : S₁ ⟶ S₂} (h : Φ₁ = Φ₂) (n : ℕ) : Φ₁.f n = Φ₂.f n

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
{S₁ S₂ : SimplicialObject.Split C}
{Φ₁ Φ₂ : S₁ ⟶ S₂}
(h : Φ₁ = Φ₂)
(n : ℕ)


@[simp]
theorem coe_ne_infty (x : X) : (x : OnePoint X) ≠ ∞


theorem nhds_bot' : 𝓝 (⊥ : EReal) = ⨅ a : ℝ, 𝓟 (Iio ↑a)


theorem pi_zero : pi (fun _ ↦ 0 : (i : ι) → P1 →ᵃ[k] φv i) = 0

{k : Type u_2}
{V1 : Type u_3}
{P1 : Type u_4}
[Ring k]
[AddCommGroup V1]
[AffineSpace V1 P1]
[Module k V1]
{ι : Type u_9}
{φv : ι → Type u_10}
[(i : ι) → AddCommGroup (φv i)]
[(i : ι) → Module k (φv i)]


/-- A set is contained in its `spanPoints`. -/
theorem subset_spanPoints (s : Set P) : s ⊆ spanPoints k s

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


@[to_additive MeasureTheory.pairwise_disjoint_addFundamentalInterior]
theorem pairwise_disjoint_fundamentalInterior :
    Pairwise (Disjoint on fun g : G => g • fundamentalInterior G s)

(G : Type u_1)
{α : Type u_3}
[AddGroup G]
[AddAction G α]
(s : Set α)

Pairwise (Disjoint on fun g => g +ᵥ MeasureTheory.addFundamentalInterior G s)


/-- The functor `(S, F ⋙ G) ⥤ (S, G)`. -/
@[simps!]
def pre (S : D) (F : B ⥤ C) (G : C ⥤ D) : StructuredArrow S (F ⋙ G) ⥤ StructuredArrow S G

(X : CategoryTheory.Comma (CategoryTheory.Functor.fromPUnit S) (F.comp G))

((CategoryTheory.StructuredArrow.pre S F G).obj X).left = X.left


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

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


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

{M : Type u_1}
[DivisionMonoid M]
{a : M}
(ha : a ∈ Set.center M)


theorem expand_WF [BEq α] [Hashable α] {buckets : Buckets α β} (H : buckets.WF) :
    (expand sz buckets).buckets.WF

{buckets : Batteries.HashMap.Imp.Buckets α β}


@[simp] theorem ofFinset_E [DecidableEq α] (E : Set α) Indep indep_empty indep_subset indep_aug
    subset_ground : (IndepMatroid.ofFinset
      E Indep indep_empty indep_subset indep_aug subset_ground).E = E

(indep_subset : ∀ ⦃I J : Finset α⦄, Indep J → I ⊆ J → Indep I)

(indep_aug : ∀ ⦃I J : Finset α⦄, Indep I → Indep J → I.card < J.card → ∃ e ∈ J, e ∉ I ∧ Indep (insert e I))

(subset_ground : ∀ ⦃I : Finset α⦄, Indep I → ↑I ⊆ E)


/-- `|a - b| < n` if `0 ≤ a < n` and `0 ≤ b < n`. -/
theorem abs_sub_lt_of_nonneg_of_lt {a b n : α} (a_nonneg : 0 ≤ a) (a_lt_n : a < n)
    (b_nonneg : 0 ≤ b) (b_lt_n : b < n) : |a - b| < n

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a b n : α}
(a_nonneg : 0 ≤ a)
(a_lt_n : a < n)
(b_nonneg : 0 ≤ b)
(b_lt_n : b < n)


@[to_additive (attr := simp)] theorem MonoidHom.comp_id_commGrp
    {G : CommGrp.{u}} {H : Type u} [CommGroup H] (f : G →* H) : f.comp (𝟙 G) = f

{G : AddCommGrp}
{H : Type u}
[AddCommGroup H]
(f : ↑G →+ H)


theorem compMeasurable_eq_mk (g : β → γ) (hg : Measurable g) (f : α →ₘ[μ] β) :
    compMeasurable g hg f =
    mk (g ∘ f) (hg.comp_aemeasurable f.aemeasurable).aestronglyMeasurable

MeasureTheory.AEEqFun.compMeasurable g hg f = MeasureTheory.AEEqFun.mk (g ∘ ↑f) ⋯


/-- Two points in a projective space are dependent if and only if they are equal. -/
@[simp]
theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v

{K : Type u_2}
{V : Type u_3}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
(u v : ℙ K V)

Projectivization.Dependent ![u, v] ↔ u = v


@[simp]
lemma isQuasiregular_zero : IsQuasiregular 0


@[simp]
theorem edgeSet_subset_setOf_not_isDiag : G.edgeSet ⊆ {e | ¬e.IsDiag}


theorem exp_bound' {x : ℂ} {n : ℕ} (hx : abs x / n.succ ≤ 1 / 2) :
    abs (exp x - ∑ m ∈ range n, x ^ m / m.factorial) ≤ abs x ^ n / n.factorial * 2

{x : ℂ}
{n : ℕ}
(hx : Complex.abs x / ↑n.succ ≤ 1 / 2)

Complex.abs (Complex.exp x - ∑ m ∈ Finset.range n, x ^ m / ↑m.factorial) ≤ Complex.abs x ^ n / ↑n.factorial * 2


/-- A Fraïssé class is a nonempty, isomorphism-invariant, essentially countable class of structures
satisfying the hereditary, joint embedding, and amalgamation properties. -/
class IsFraisse : Prop where
  is_nonempty : K.Nonempty
  FG : ∀ M : Bundled.{w} L.Structure, M ∈ K → Structure.FG L M
  is_equiv_invariant : ∀ M N : Bundled.{w} L.Structure, Nonempty (M ≃[L] N) → (M ∈ K ↔ N ∈ K)
  is_essentially_countable : (Quotient.mk' '' K).Countable
  hereditary : Hereditary K
  jointEmbedding : JointEmbedding K
  amalgamation : Amalgamation K

{K : Set (CategoryTheory.Bundled L.Structure)}

[self : FirstOrder.Language.IsFraisse K]


theorem exists_chain_of_le_chainHeight {n : ℕ} (hn : ↑n ≤ s.chainHeight) :
    ∃ l ∈ s.subchain, length l = n

{α : Type u_1}
[LT α]
(s : Set α)
{n : ℕ}
(hn : ↑n ≤ s.chainHeight)


theorem prod_mk_mem_compRel {a b c : α} {s t : Set (α × α)} (h₁ : (a, c) ∈ s) (h₂ : (c, b) ∈ t) :
    (a, b) ∈ s ○ t

{α : Type ua}
{a b c : α}
{s t : Set (α × α)}
(h₁ : (a, c) ∈ s)
(h₂ : (c, b) ∈ t)


@[measurability]
protected theorem const_smul {𝕜} [TopologicalSpace 𝕜] [AddMonoid β] [Monoid 𝕜]
    [DistribMulAction 𝕜 β] [ContinuousSMul 𝕜 β] (hf : FinStronglyMeasurable f μ) (c : 𝕜) :
    FinStronglyMeasurable (c • f) μ

(hf : MeasureTheory.FinStronglyMeasurable f μ)

MeasureTheory.FinStronglyMeasurable (c • f) μ


theorem Fintype.card_equiv [Fintype α] [Fintype β] (e : α ≃ β) :
    Fintype.card (α ≃ β) = (Fintype.card α)!

{α : Type u_1}
{β : Type u_2}
[DecidableEq α]
[DecidableEq β]
[Fintype α]
[Fintype β]
(e : α ≃ β)


theorem card_Ioo : (Ioo a b).card = if h : a.1 = b.1 then (Ioo (h.rec a.2) b.2).card else 0

{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
[(i : ι) → Preorder (α i)]
[(i : ι) → LocallyFiniteOrder (α i)]
(a b : (i : ι) × α i)

(Finset.Ioo a b).card = if h : a.fst = b.fst then (Finset.Ioo (h ▸ a.snd) b.snd).card else 0


@[continuity, fun_prop]
theorem continuous_quot_lift {f : X → Y} (hr : ∀ a b, r a b → f a = f b) (h : Continuous f) :
    Continuous (Quot.lift f hr : Quot r → Y)

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{r : X → X → Prop}
{f : X → Y}
(hr : ∀ (a b : X), r a b → f a = f b)
(h : Continuous f)


theorem posMulReflectLE_iff_mulPosReflectLE : PosMulReflectLE α ↔ MulPosReflectLE α

{α : Type u_1}
[Mul α]
[IsSymmOp α α fun x x_1 => x * x_1]
[Zero α]
[Preorder α]


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

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

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


/-- The equivalence `Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α`. -/
@[simps!]
def karoubiCochainComplexEquivalence :
    Karoubi (CochainComplex C α) ≌ CochainComplex (Karoubi C) α

(C : Type u_1)
[CategoryTheory.Category.{u_4, u_1} C]
[CategoryTheory.Preadditive C]
(α : Type u_3)
[AddRightCancelSemigroup α]
[One α]

(CategoryTheory.Idempotents.karoubiCochainComplexEquivalence C α).counitIso.hom = CategoryTheory.eqToHom ⋯


theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α

TopologicalSpace.IsSeparable Set.univ ↔ TopologicalSpace.SeparableSpace α


theorem destutter'_ne_nil : l.destutter' R a ≠ []

{α : Type u_1}
(l : List α)
(R : α → α → Prop)
[DecidableRel R]
{a : α}


/-- If `S : ComposableArrows C (n + 2)` is such that the first two arrows form
an exact sequence and that the tail `S.δ₀` is exact, then `S` is also exact.
See `ShortComplex.SnakeInput.snake_lemma` in `Algebra.Homology.ShortComplex.SnakeLemma`
for a use of this lemma. -/
lemma exact_of_δ₀ {S : ComposableArrows C (n + 2)}
    (h : (mk₂ (S.map' 0 1) (S.map' 1 2)).Exact) (h₀ : S.δ₀.Exact) : S.Exact

{S : CategoryTheory.ComposableArrows C (n + 2)}

(h : (CategoryTheory.ComposableArrows.mk₂ (S.map' 0 1 ⋯ ⋯) (S.map' 1 2 ⋯ ⋯)).Exact)


theorem all_node4L {P l x m y r} :
    @All α P (node4L l x m y r) ↔ All P l ∧ P x ∧ All P m ∧ P y ∧ All P r

{α : Type u_1}
{P : α → Prop}
{l : Ordnode α}
{x : α}
{m : Ordnode α}
{y : α}
{r : Ordnode α}

Ordnode.All P (l.node4L x m y r) ↔ Ordnode.All P l ∧ P x ∧ Ordnode.All P m ∧ P y ∧ Ordnode.All P r


theorem geometric_hahn_banach_closed_point (hs₁ : Convex ℝ s) (hs₂ : IsClosed s) (disj : x ∉ s) :
    ∃ (f : E →L[ℝ] ℝ) (u : ℝ), (∀ a ∈ s, f a < u) ∧ u < f x

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


theorem compl_antitone : Antitone (compl : α → α)


/-- Taking duals distributes over products. -/
@[simps!]
def dualProdDualEquivDual : (Module.Dual R M × Module.Dual R M') ≃ₗ[R] Module.Dual R (M × M')

(R : Type uR)
(M : Type uM)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
(M' : Type uM')
[AddCommMonoid M']
[Module R M']
(f : (M →ₗ[R] R) × (M' →ₗ[R] R))
(a : M × M')

((Module.dualProdDualEquivDual R M M') f) a = f.1 a.1 + f.2 a.2


{α : Type u}
[SemilatticeInf α]
[OrderBot α]
(a : α)


/-- Consider a point `x` at which a set `s` has density zero, with respect to closed balls. Then it
also has density zero with respect to any measurable set `t`: the proportion of points in `s`
belonging to a rescaled copy `{x} + r • t` of `t` tends to zero as `r` tends to zero. -/
theorem tendsto_addHaar_inter_smul_zero_of_density_zero (s : Set E) (x : E)
    (h : Tendsto (fun r => μ (s ∩ closedBall x r) / μ (closedBall x r)) (𝓝[>] 0) (𝓝 0)) (t : Set E)
    (ht : MeasurableSet t) (h''t : μ t ≠ ∞) :
    Tendsto (fun r : ℝ => μ (s ∩ ({x} + r • t)) / μ ({x} + r • t)) (𝓝[>] 0) (𝓝 0)

(h : Filter.Tendsto (fun r => μ (s ∩ Metric.closedBall x r) / μ (Metric.closedBall x r)) (𝓝[>] 0) (𝓝 0))

Filter.Tendsto (fun r => μ (s ∩ ({x} + r • t)) / μ ({x} + r • t)) (𝓝[>] 0) (𝓝 0)


theorem extremallyDisconnected_of_homeo {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
    [ExtremallyDisconnected X] (e : X ≃ₜ Y) : ExtremallyDisconnected Y

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
[ExtremallyDisconnected X]
(e : X ≃ₜ Y)


theorem ofOption {f : α → Option β} (hf : Computable f) : Partrec fun a => (f a : Part β)

{α : Type u_1}
{β : Type u_2}
[Primcodable α]
[Primcodable β]
{f : α → Option β}
(hf : Computable f)


theorem comp_injective (f : α → β) (e : F) : Function.Injective (e ∘ f) ↔ Function.Injective f

{F : Sort u_2}
{α : Sort u_3}
{β : Sort u_4}
{γ : Sort u_5}
[iF : EquivLike F β γ]
(f : α → β)
(e : F)

Function.Injective (⇑e ∘ f) ↔ Function.Injective f


protected theorem half_lt_self (hz : a ≠ 0) (ht : a ≠ ∞) : a / 2 < a


@[simp]
theorem cast_addNat {n : Nat} (m : Nat) (i : Fin n) :
    cast (Nat.add_comm ..) (addNat i m) = natAdd m i

Fin.cast ⋯ (i.addNat m) = Fin.natAdd m i


theorem Filter.eventually_nhdsSet_prod_iff {p : X × Y → Prop} :
    (∀ᶠ q in 𝓝ˢ (s ×ˢ t), p q) ↔
      ∀ x ∈ s, ∀ y ∈ t,
          ∃ px : X → Prop, (∀ᶠ x' in 𝓝 x, px x') ∧ ∃ py : Y → Prop, (∀ᶠ y' in 𝓝 y, py y') ∧
            ∀ {x : X}, px x → ∀ {y : Y}, py y → p (x, y)

{X : Type u_5}
{Y : Type u_6}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set X}
{t : Set Y}
{p : X × Y → Prop}

(∀ᶠ (q : X × Y) in 𝓝ˢ (s ×ˢ t), p q) ↔
  ∀ x ∈ s,
    ∀ y ∈ t,
      ∃ px,
        (∀ᶠ (x' : X) in 𝓝 x, px x') ∧ ∃ py, (∀ᶠ (y' : Y) in 𝓝 y, py y') ∧ ∀ {x : X}, px x → ∀ {y : Y}, py y → p (x, y)


@[simp]
theorem erase_sub (a : α) (f₁ f₂ : α →₀ G) : erase a (f₁ - f₂) = erase a f₁ - erase a f₂

{α : Type u_1}
{G : Type u_9}
[AddGroup G]
(a : α)
(f₁ f₂ : α →₀ G)

Finsupp.erase a (f₁ - f₂) = Finsupp.erase a f₁ - Finsupp.erase a f₂


@[simp]
theorem symm_trans_self (e : α ≃+*o β) : e.symm.trans e = OrderRingIso.refl β

{α : Type u_2}
{β : Type u_3}
[Mul α]
[Add α]
[LE α]
[Mul β]
[Add β]
[LE β]
(e : α ≃+*o β)


theorem tsub_div (a b c : α) : (a - b) / c = a / c - b / c

{α : Type u_1}
[CanonicallyLinearOrderedSemifield α]
[Sub α]
[OrderedSub α]
(a b c : α)


/-- See also `smul_ae`. -/
@[to_additive "See also `vadd_ae`."]
theorem tendsto_smul_ae (c : G) : Filter.Tendsto (c • ·) (ae μ) (ae μ)

[MeasureTheory.VAddInvariantMeasure G α μ]

Filter.Tendsto (fun x => c +ᵥ x) (MeasureTheory.ae μ) (MeasureTheory.ae μ)


protected theorem mul_lt_mul_of_neg_right {a b c : Int} (h : b < a) (hc : c < 0) : a * c < b * c


/-- **Hermite-Minkowski Theorem**. A nontrivial number field has discriminant greater than `2`. -/
theorem abs_discr_gt_two (h : 1 < finrank ℚ K) : 2 < |discr K|

{K : Type u_1}
[Field K]
[NumberField K]
(h : 1 < FiniteDimensional.finrank ℚ K)


/-- A preorder is a reflexive, transitive relation `≤` with `a < b` defined in the obvious way. -/
class Preorder (α : Type u) extends LE α, LT α where
  le_refl : ∀ a : α, a ≤ a
  le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c
  lt := fun a b => a ≤ b ∧ ¬b ≤ a
  lt_iff_le_not_le : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl

{α : Type u}
[self : Preorder α]
(a : α)


lemma two_ne_zero' [OfNat α 2] [NeZero (2 : α)] : (2 : α) ≠ 0

(α : Type u_2)
[Zero α]
[OfNat α 2]
[NeZero 2]


protected theorem Monotone.IccExtend (hf : Monotone f) : Monotone (IccExtend h f)

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


theorem lt_nfpFamily {a b} : a < nfpFamily.{u, v} f b ↔ ∃ l, a < List.foldr f b l

{f : ι → Ordinal.{max u v} → Ordinal.{max u v}}

a < Ordinal.nfpFamily f b ↔ ∃ l, a < List.foldr f b l


/-- In a join of sublists, taking the slice between the indices `A` and `B - 1` gives back the
original sublist of index `i` if `A` is the sum of the lengths of sublists of index `< i`, and
`B` is the sum of the lengths of sublists of index `≤ i`. -/
lemma drop_take_succ_join_eq_getElem (L : List (List α)) (i : Nat) (h : i < L.length) :
    (L.join.take ((L.map length).take (i + 1)).sum).drop ((L.map length).take i).sum = L[i]

{α : Type u_2}
(L : List (List α))
(i : ℕ)
(h : i < L.length)

List.drop (List.take i (List.map List.length L)).sum
    (List.take (List.take (i + 1) (List.map List.length L)).sum L.join) =
  L[i]


@[simp]
theorem cons_vecMulVec (x : α) (v : Fin m → α) (w : n' → α) :
    vecMulVec (vecCons x v) w = vecCons (x • w) (vecMulVec v w)

{α : Type u}
{m : ℕ}
{n' : Type uₙ}
[NonUnitalNonAssocSemiring α]
(x : α)
(v : Fin m → α)
(w : n' → α)

Matrix.vecMulVec (Matrix.vecCons x v) w = Matrix.vecCons (x • w) (Matrix.vecMulVec v w)


/-- If an element `a` divides another element `b` in a ring, `a` divides the sum of `b` and another
element `c` iff `a` divides `c`. -/
theorem dvd_add_right (h : a ∣ b) : a ∣ b + c ↔ a ∣ c

{α : Type u_1}
[NonUnitalRing α]
{a b c : α}
(h : a ∣ b)


/-- A version of `Set.mem_finset_prod` with a simpler RHS for products over a Fintype. -/
@[to_additive " A version of `Set.mem_finset_sum` with a simpler RHS for sums over a Fintype. "]
theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (_ : ∀ i, g i ∈ f i), ∏ i, g i = a

{ι : Type u_1}
{α : Type u_2}
[AddCommMonoid α]
[Fintype ι]
(f : ι → Set α)
(a : α)

a ∈ ∑ i : ι, f i ↔ ∃ g, ∃ (_ : ∀ (i : ι), g i ∈ f i), ∑ i : ι, g i = a


theorem comap_iInf {ι : Sort*} (f : R →+* S) (s : ι → Subring S) :
    (iInf s).comap f = ⨅ i, (s i).comap f

{R : Type u}
{S : Type v}
[Ring R]
[Ring S]
{ι : Sort u_1}
(f : R →+* S)
(s : ι → Subring S)

Subring.comap f (iInf s) = ⨅ i, Subring.comap f (s i)


@[simp] lemma mk_pow (i : NumDenSameDeg 𝒜 x) (n : ℕ) : mk (i ^ n) = mk i ^ n

(i : HomogeneousLocalization.NumDenSameDeg 𝒜 x)

HomogeneousLocalization.mk (i ^ n) = HomogeneousLocalization.mk i ^ n


@[simp]
theorem lift_le_nat_iff {a : Cardinal.{u}} {n : ℕ} : lift.{v} a ≤ n ↔ a ≤ n


theorem mem_of_promises {a} (p : s ~> a) : a ∈ s

{α : Type u}
(s : Computation α)
[h : s.Terminates]
{a : α}
(p : s.Promises a)


@[deprecated Nat.le_sub_iff_add_le (since := "2024-02-19")]
protected theorem add_le_to_le_sub (n : Nat) (h : m ≤ k) : n + m ≤ k ↔ n ≤ k - m


theorem erase_le_erase {s t : Multiset α} (a : α) (h : s ≤ t) : s.erase a ≤ t.erase a

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


/-- The inverse of a block-triangular matrix is block-triangular. -/
theorem blockTriangular_inv_of_blockTriangular [LinearOrder α] [Invertible M]
    (hM : BlockTriangular M b) : BlockTriangular M⁻¹ b

{α : Type u_1}
{m : Type u_3}
{R : Type v}
[CommRing R]
{M : Matrix m m R}
{b : m → α}
[DecidableEq m]
[Fintype m]
[LinearOrder α]
[Invertible M]
(hM : M.BlockTriangular b)


theorem span_int_eq_addSubgroup_closure {M : Type*} [AddCommGroup M] (s : Set M) :
    (span ℤ s).toAddSubgroup = AddSubgroup.closure s

{M : Type u_9}
[AddCommGroup M]
(s : Set M)

(Submodule.span ℤ s).toAddSubgroup = AddSubgroup.closure s


nonrec theorem SmoothAt.prod_mk {f : M → M'} {g : M → N'} (hf : SmoothAt I I' f x)
    (hg : SmoothAt I J' g x) : SmoothAt I (I'.prod J') (fun x => (f x, g x)) 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' : Type u_14}
[NormedAddCommGroup F']
[NormedSpace 𝕜 F']
{G' : Type u_15}
[TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'}
{N' : Type u_16}
[TopologicalSpace N']
[ChartedSpace G' N']
{x : M}
{f : M → M'}
{g : M → N'}
(hf : SmoothAt I I' f x)
(hg : SmoothAt I J' g x)


/-- The image under a ring homomorphism of the `NonUnitalSubring` generated by a set equals
the `NonUnitalSubring` generated by the image of the set. -/
theorem map_closure (f : R →ₙ+* S) (s : Set R) : (closure s).map f = closure (f '' s)

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]
(f : R →ₙ+* S)
(s : Set R)

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


/-- If there is a solution then there is a minimal one. -/
lemma Solution.exists_minimal : ∃ (S₁ : Solution hζ), S₁.isMinimal

(S : FermatLastTheoremForThreeGen.Solution hζ)


@[simp]
lemma tilted_zero_measure (f : α → ℝ) : (0 : Measure α).tilted f = 0

{α : Type u_1}
{mα : MeasurableSpace α}
(f : α → ℝ)


/-- Let `{x | p x}` be a subsemigroup of a commutative monoid `M`. Let `f : M → N` be a map
such that `f 1 = 1` and `f` is submultiplicative on `{x | p x}`, i.e.,
`p x → p y → f (x * y) ≤ f x * f y`. Let `g i`, `i ∈ s`, be a finite family of elements of `M` such
that `∀ i ∈ s, p (g i)`. Then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_of_subadditive_on_pred]
theorem le_prod_of_submultiplicative_on_pred (f : M → N) (p : M → Prop) (h_one : f 1 = 1)
    (h_mul : ∀ x y, p x → p y → f (x * y) ≤ f x * f y) (hp_mul : ∀ x y, p x → p y → p (x * y))
    (g : ι → M) {s : Finset ι} (hs : ∀ i ∈ s, p (g i)) : f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

(h_mul : ∀ (x y : M), p x → p y → f (x + y) ≤ f x + f y)

(hp_mul : ∀ (x y : M), p x → p y → p (x + y))


@[simp]
theorem projIic_self (b : α) : projIic b b = ⟨b, le_rfl⟩


@[to_additive]
theorem exponent_eq_zero_iff_range_orderOf_infinite (h : ∀ g : G, 0 < orderOf g) :
    exponent G = 0 ↔ (Set.range (orderOf : G → ℕ)).Infinite

{G : Type u}
[Monoid G]
(h : ∀ (g : G), 0 < orderOf g)

Monoid.exponent G = 0 ↔ (Set.range orderOf).Infinite


theorem incMatrix_apply_eq_zero_iff : G.incMatrix R a e = 0 ↔ e ∉ G.incidenceSet a

{R : Type u_1}
{α : Type u_2}
(G : SimpleGraph α)
[MulZeroOneClass R]
{a : α}
{e : Sym2 α}
[Nontrivial R]

SimpleGraph.incMatrix R G a e = 0 ↔ e ∉ G.incidenceSet a


@[to_additive]
theorem tprod_comm {f : β → γ → α} (h : Multipliable (Function.uncurry f)) :
    ∏' (c) (b), f b c = ∏' (b) (c), f b c

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[CommGroup α]
[UniformSpace α]
[UniformGroup α]
[CompleteSpace α]
[T0Space α]
{f : β → γ → α}
(h : Multipliable (Function.uncurry f))


theorem Irreducible.coprime_pow_of_not_dvd {p a : R} (m : ℕ) (hp : Irreducible p) (h : ¬p ∣ a) :
    IsCoprime a (p ^ m)

{R : Type u}
[CommRing R]
[IsBezout R]
{p a : R}
(m : ℕ)
(hp : Irreducible p)
(h : ¬p ∣ a)


theorem all_iff_forall_prop : (all l fun a => p a) ↔ ∀ a ∈ l, p a

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

(l.all fun a => decide (p a)) = true ↔ ∀ (a : α), a ∈ l → p a


@[simp]
theorem _root_.Pi.orthonormalBasis_repr {η : Type*} [Fintype η] {ι : η → Type*}
    [∀ i, Fintype (ι i)] {𝕜 : Type*} [RCLike 𝕜] {E : η → Type*} [∀ i, NormedAddCommGroup (E i)]
    [∀ i, InnerProductSpace 𝕜 (E i)] (B : ∀ i, OrthonormalBasis (ι i) 𝕜 (E i)) (x : (i : η ) → E i)
    (j : (i : η) × (ι i)) :
    (Pi.orthonormalBasis B).repr x j = (B j.fst).repr (x j.fst) j.snd

(B : (i : η) → OrthonormalBasis (ι i) 𝕜 (E i))


/-- For finite intervals, see: `intervalIntegral.integral_deriv_mul_eq_sub`. -/
theorem integral_Ioi_deriv_mul_eq_sub
    (hu : ∀ x ∈ Ioi a, HasDerivAt u (u' x) x) (hv : ∀ x ∈ Ioi a, HasDerivAt v (v' x) x)
    (huv : IntegrableOn (u' * v + u * v') (Ioi a))
    (h_zero : Tendsto (u * v) (𝓝[>] a) (𝓝 a')) (h_infty : Tendsto (u * v) atTop (𝓝 b')) :
    ∫ (x : ℝ) in Ioi a, u' x * v x + u x * v' x = b' - a'

(hu : ∀ x ∈ Set.Ioi a, HasDerivAt u (u' x) x)

(hv : ∀ x ∈ Set.Ioi a, HasDerivAt v (v' x) x)

(huv : MeasureTheory.IntegrableOn (u' * v + u * v') (Set.Ioi a) MeasureTheory.volume)

(h_zero : Filter.Tendsto (u * v) (𝓝[>] a) (𝓝 a'))

(h_infty : Filter.Tendsto (u * v) Filter.atTop (𝓝 b'))

∫ (x : ℝ) in Set.Ioi a, u' x * v x + u x * v' x = b' - a'


@[simps]
def Triangle.homMk (A B : Triangle C)
    (hom₁ : A.obj₁ ⟶ B.obj₁) (hom₂ : A.obj₂ ⟶ B.obj₂) (hom₃ : A.obj₃ ⟶ B.obj₃)
    (comm₁ : A.mor₁ ≫ hom₂ = hom₁ ≫ B.mor₁ := by aesop_cat)
    (comm₂ : A.mor₂ ≫ hom₃ = hom₂ ≫ B.mor₂ := by aesop_cat)
    (comm₃ : A.mor₃ ≫ hom₁⟦1⟧' = hom₃ ≫ B.mor₃ := by aesop_cat) :
    A ⟶ B

(A B : CategoryTheory.Pretriangulated.Triangle C)

(comm₃ : A.mor₃ ≫ (CategoryTheory.shiftFunctor C 1).map hom₁ = hom₃ ≫ B.mor₃ := by aesop_cat)

(A.homMk B hom₁ hom₂ hom₃ comm₁ comm₂ comm₃).hom₃ = hom₃


theorem coeFn_pair (f : α →ₘ[μ] β) (g : α →ₘ[μ] γ) : f.pair g =ᵐ[μ] fun x => (f x, g x)

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


theorem eq_id_of_mono {x : SimplexCategory} (i : x ⟶ x) [Mono i] : i = 𝟙 _

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


lemma prod_fac₁ [W₂.ContainsIdentities] :
    W₁.Q ⋙ prodLift₁ F hF = curry.obj F

{W₁ : CategoryTheory.MorphismProperty C₁}

{W₂ : CategoryTheory.MorphismProperty C₂}

(F : CategoryTheory.Functor (C₁ × C₂) E)

W₁.Q.comp (CategoryTheory.Localization.StrictUniversalPropertyFixedTarget.prodLift₁ F hF) = CategoryTheory.curry.obj F


theorem linearization_single (X : Action (Type u) (MonCat.of G)) (g : G) (x : X.V) (r : k) :
    ((linearization k G).obj X).ρ g (Finsupp.single x r) = Finsupp.single (X.ρ g x) r

{k G : Type u}
[CommRing k]
[Monoid G]
(X : Action (Type u) (MonCat.of G))
(g : G)
(x : X.V)
(r : k)

(((Rep.linearization k G).obj X).ρ g) (Finsupp.single x r) = Finsupp.single (X.ρ g x) r


@[fun_prop]
theorem ContinuousOn.star (hf : ContinuousOn f s) : ContinuousOn (fun x => star (f x)) s

{α : Type u_1}
{R : Type u_2}
[TopologicalSpace R]
[Star R]
[ContinuousStar R]
[TopologicalSpace α]
{f : α → R}
{s : Set α}
(hf : ContinuousOn f s)


@[to_additive]
theorem Group.covariant_swap_iff_contravariant_swap [Group N] :
    Covariant N N (swap (· * ·)) r ↔ Contravariant N N (swap (· * ·)) r

{N : Type u_2}
{r : N → N → Prop}
[Group N]

Covariant N N (Function.swap fun x x_1 => x * x_1) r ↔ Contravariant N N (Function.swap fun x x_1 => x * x_1) r


theorem lt_sq_of_sqrt_lt (h : √x < y) : x < y ^ 2


/-- The minimal distance from `x` to `s` is bounded by the distance from `y` to `s`, modulo
the distance between `x` and `y`. -/
theorem infDist_le_infDist_add_dist : infDist x s ≤ infDist y s + dist x y

{α : Type u}
[PseudoMetricSpace α]
{s : Set α}
{x y : α}

Metric.infDist x s ≤ Metric.infDist y s + dist x y


theorem nndist_conj_comm (z w : ℂ) : nndist (conj z) w = nndist z (conj w)

nndist ((starRingEnd ℂ) z) w = nndist z ((starRingEnd ℂ) w)


theorem tendsto_logb_atTop_of_base_lt_one : Tendsto (logb b) atTop atBot

Filter.Tendsto (Real.logb b) Filter.atTop Filter.atBot


/-- Biproducts are unique up to isomorphism. This already follows because bilimits are limits,
    but in the case of biproducts we can give an isomorphism with particularly nice definitional
    properties, namely that `biproduct.lift b.π` and `biproduct.desc b.ι` are inverses of each
    other. -/
@[simps]
def biproduct.uniqueUpToIso (f : J → C) [HasBiproduct f] {b : Bicone f} (hb : b.IsBilimit) :
    b.pt ≅ ⨁ f

(CategoryTheory.Limits.biproduct.uniqueUpToIso f hb).hom = CategoryTheory.Limits.biproduct.lift b.π


theorem IsPrimePow.dvd {n m : ℕ} (hn : IsPrimePow n) (hm : m ∣ n) (hm₁ : m ≠ 1) : IsPrimePow m


/-- The natural category equivalence between `R`-coalgebras and comonoid objects in the
category of `R`-modules. -/
@[simps]
noncomputable def comonEquivalence : CoalgebraCat R ≌ Comon_ (ModuleCat R)

(CoalgebraCat.comonEquivalence R).unitIso =
  CategoryTheory.NatIso.ofComponents
    (fun x => CategoryTheory.Iso.refl ((CategoryTheory.Functor.id (CoalgebraCat R)).obj x)) ⋯


/-- If `f` is a family of mutually independent random variables (`iIndepFun m f μ`) and `S, T` are
two disjoint finite index sets, then the tuple formed by `f i` for `i ∈ S` is independent of the
tuple `(f i)_i` for `i ∈ T`. -/
theorem iIndepFun.indepFun_finset [IsMarkovKernel κ] (S T : Finset ι) (hST : Disjoint S T)
    (hf_Indep : iIndepFun m f κ μ) (hf_meas : ∀ i, Measurable (f i)) :
    IndepFun (fun a (i : S) => f i a) (fun a (i : T) => f i a) κ μ

(hf_Indep : ProbabilityTheory.Kernel.iIndepFun m f κ μ)

ProbabilityTheory.Kernel.IndepFun (fun a i => f (↑i) a) (fun a i => f (↑i) a) κ μ


theorem isPreconnected_closed_iff {s : Set α} :
    IsPreconnected s ↔ ∀ t t', IsClosed t → IsClosed t' →
      s ⊆ t ∪ t' → (s ∩ t).Nonempty → (s ∩ t').Nonempty → (s ∩ (t ∩ t')).Nonempty

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

IsPreconnected s ↔
  ∀ (t t' : Set α),
    IsClosed t → IsClosed t' → s ⊆ t ∪ t' → (s ∩ t).Nonempty → (s ∩ t').Nonempty → (s ∩ (t ∩ t')).Nonempty


theorem StableUnderCobaseChange.unop {P : MorphismProperty Cᵒᵖ} (hP : StableUnderCobaseChange P) :
    StableUnderBaseChange P.unop

{P : CategoryTheory.MorphismProperty Cᵒᵖ}


theorem exists_get?_of_mem {s : WSeq α} {a} (h : a ∈ s) : ∃ n, some a ∈ get? s n

{α : Type u}
{s : Stream'.WSeq α}
{a : α}
(h : a ∈ s)


@[simp] lemma support_mul' (f g : ι → M₀) : support (f * g) = support f ∩ support g

{ι : Type u_1}
{M₀ : Type u_4}
[MulZeroClass M₀]
[NoZeroDivisors M₀]
(f g : ι → M₀)

Function.support (f * g) = Function.support f ∩ Function.support g


@[simp]
theorem equivProdOfSurjectiveOfIsCompl_toLinearEquiv {f : E →L[𝕜] F} {g : E →L[𝕜] G}
    (hf : range f = ⊤) (hg : range g = ⊤) (hfg : IsCompl (ker f) (ker g)) :
    (equivProdOfSurjectiveOfIsCompl f g hf hg hfg).toLinearEquiv =
      LinearMap.equivProdOfSurjectiveOfIsCompl f g hf hg hfg

(hfg : IsCompl (LinearMap.ker f) (LinearMap.ker g))

(f.equivProdOfSurjectiveOfIsCompl g hf hg hfg).toLinearEquiv = (↑f).equivProdOfSurjectiveOfIsCompl (↑g) hf hg hfg


theorem Ioo_ofDual (a b : αᵒᵈ) : Ioo (ofDual a) (ofDual b) = (Ioo b a).map ofDual.toEmbedding

{α : Type u_1}
[Preorder α]
[LocallyFiniteOrder α]
(a b : αᵒᵈ)

Finset.Ioo (OrderDual.ofDual a) (OrderDual.ofDual b) = Finset.map OrderDual.ofDual.toEmbedding (Finset.Ioo b a)


protected theorem neg_le_of_neg_le {a b : Int} (h : -a ≤ b) : -b ≤ a


theorem apriori_dist_iterate_fixedPoint_le (x n) :
    dist (f^[n] x) (fixedPoint f hf) ≤ dist x (f x) * (K : ℝ) ^ n / (1 - K)

{α : Type u_1}
[MetricSpace α]
{K : ℝ≥0}
{f : α → α}
(hf : ContractingWith K f)
[Nonempty α]
[CompleteSpace α]
(x : α)
(n : ℕ)

dist (f^[n] x) (ContractingWith.fixedPoint f hf) ≤ dist x (f x) * ↑K ^ n / (1 - ↑K)


@[simp]
theorem equivOfEquiv_algebraMap (hSR : S ≃+* R) (s : S) :
    equivOfEquiv L M hSR (algebraMap S L s) = algebraMap R M (hSR s)

{R : Type u}
{S : Type u_3}
(L : Type v)
(M : Type w)
[CommRing R]
[CommRing S]
[Field L]
[Field M]
[Algebra R M]
[NoZeroSMulDivisors R M]
[IsAlgClosure R M]
[Algebra S L]
[NoZeroSMulDivisors S L]
[IsAlgClosure S L]
(hSR : S ≃+* R)
(s : S)

(IsAlgClosure.equivOfEquiv L M hSR) ((algebraMap S L) s) = (algebraMap R M) (hSR s)


lemma dist_pi_lt_iff {f g : ∀ b, π b} {r : ℝ} (hr : 0 < r) :
    dist f g < r ↔ ∀ b, dist (f b) (g b) < r

{β : Type u_2}
{π : β → Type u_3}
[Fintype β]
[(b : β) → PseudoMetricSpace (π b)]
{f g : (b : β) → π b}
{r : ℝ}
(hr : 0 < r)

dist f g < r ↔ ∀ (b : β), dist (f b) (g b) < r


theorem coe_fn_injective : @Function.Injective (A →ₗc[R] B) (A → B) (↑)

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[AddCommMonoid A]
[Module R A]
[AddCommMonoid B]
[Module R B]
[CoalgebraStruct R A]
[CoalgebraStruct R B]


lemma eq_true_intro {a : Prop} (h : a) : a = True


@[reassoc]
theorem tensor_left_unitality (X₁ X₂ : C) :
    (λ_ (X₁ ⊗ X₂)).hom =
      ((λ_ (𝟙_ C)).inv ▷ (X₁ ⊗ X₂)) ≫
        tensor_μ C (𝟙_ C, 𝟙_ C) (X₁, X₂) ≫ ((λ_ X₁).hom ⊗ (λ_ X₂).hom)

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

(λ_ (X₁ ⊗ X₂)).hom =
  (λ_ (𝟙_ C)).inv ▷ (X₁ ⊗ X₂) ≫ CategoryTheory.tensor_μ C (𝟙_ C, 𝟙_ C) (X₁, X₂) ≫ ((λ_ X₁).hom ⊗ (λ_ X₂).hom)


/-- The `SatisfiesM p x` predicate is monotonic in `p`. -/
theorem imp [Functor m] [LawfulFunctor m] {x : m α}
    (h : SatisfiesM p x) (H : ∀ {a}, p a → q a) : SatisfiesM q x

{m : Type u_1 → Type u_2}
{α : Type u_1}
{p q : α → Prop}
[Functor m]
[LawfulFunctor m]
{x : m α}
(h : SatisfiesM p x)
(H : ∀ {a : α}, p a → q a)


/-- A quaternionic basis on `A` is equivalent to a map from the quaternion algebra to `A`. -/
@[simps]
def lift : Basis A c₁ c₂ ≃ (ℍ[R,c₁,c₂] →ₐ[R] A)

{R : Type u_1}
{A : Type u_2}
[CommRing R]
[Ring A]
[Algebra R A]
{c₁ c₂ : R}
(q : QuaternionAlgebra.Basis A c₁ c₂)


@[simp] theorem smul_imK : (s • a).imK = s • a.imK

{S : Type u_1}
{R : Type u_3}
{c₁ c₂ : R}
(a : ℍ[R,c₁,c₂])
[SMul S R]
(s : S)


theorem cocycle_snd_snd (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ t' 𝒰 f g j k i ≫ t' 𝒰 f g k i j ≫ pullback.snd _ _ ≫ pullback.snd _ _ =
      pullback.snd _ _ ≫ pullback.snd _ _

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

AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g i j k ≫
    AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g j k i ≫
      AlgebraicGeometry.Scheme.Pullback.t' 𝒰 f g k i j ≫
        CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
            (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
          CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map k) =
  CategoryTheory.Limits.pullback.snd (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i j)
      (AlgebraicGeometry.Scheme.Pullback.fV 𝒰 f g i k) ≫
    CategoryTheory.Limits.pullback.snd (CategoryTheory.Limits.pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map k)


/-- A more general version of `finprod_mem_union` that requires `s ∩ mulSupport f` and
`t ∩ mulSupport f` rather than `s` and `t` to be finite. -/
@[to_additive
      "A more general version of `finsum_mem_union` that requires `s ∩ support f` and
      `t ∩ support f` rather than `s` and `t` to be finite."]
theorem finprod_mem_union' (hst : Disjoint s t) (hs : (s ∩ mulSupport f).Finite)
    (ht : (t ∩ mulSupport f).Finite) : ∏ᶠ i ∈ s ∪ t, f i = (∏ᶠ i ∈ s, f i) * ∏ᶠ i ∈ t, f i

(hs : (s ∩ Function.mulSupport f).Finite)

(ht : (t ∩ Function.mulSupport f).Finite)

∏ᶠ (i : α) (_ : i ∈ s ∪ t), f i = (∏ᶠ (i : α) (_ : i ∈ s), f i) * ∏ᶠ (i : α) (_ : i ∈ t), f i


@[simp]
theorem star_def : (Star.star : ℂ → ℂ) = conj


@[simp] theorem natAbs_negSucc (n : Nat) : natAbs -[n+1] = n.succ


theorem dropSlice_zero₂ : ∀ n l, @dropSlice α n 0 l = l


/-- The inclusion of the left factor into the sum of two languages. -/
@[simps]
protected def sumInl : L →ᴸ L.sum L'

{L : FirstOrder.Language}
{L' : FirstOrder.Language}
(_n : ℕ)
(val : L.Relations _n)

FirstOrder.Language.LHom.sumInl.onRelation val = Sum.inl val


/-- If `M ⊕ N` embeds into `M`, for `M` noetherian over `R`, then `N` is trivial. -/
@[simps!]
def IsNoetherian.equivPUnitOfProdInjective (f : M × N →ₗ[R] M)
    (i : Injective f) : N ≃ₗ[R] PUnit.{w + 1}

{R : Type u_1}
{M : Type u_2}
{N : Type w}
[Ring R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
[IsNoetherian R M]
(f : M × N →ₗ[R] M)
(i : Function.Injective ⇑f)

∀ (x : PUnit.{w + 1}), (IsNoetherian.equivPUnitOfProdInjective f i).symm x = 0


/-- The space of constant maps is equivalent to the space of maps that are alternating with respect
to an empty family. -/
@[simps]
def constLinearEquivOfIsEmpty [IsEmpty ι] : N'' ≃ₗ[R'] (M'' [⋀^ι]→ₗ[R'] N'')

{ι : Type u_7}
{R' : Type u_10}
{M'' : Type u_11}
{N'' : Type u_13}
[CommSemiring R']
[AddCommMonoid M'']
[AddCommMonoid N'']
[Module R' M'']
[Module R' N'']
[IsEmpty ι]
(f : M'' [⋀^ι]→ₗ[R'] N'')

AlternatingMap.constLinearEquivOfIsEmpty.symm f = f 0


@[simp]
theorem leadingCoeff_X_pow_add_C {n : ℕ} (hn : 0 < n) {r : R} :
    (X ^ n + C r).leadingCoeff = 1

{R : Type u}
[Semiring R]
{n : ℕ}
(hn : 0 < n)
{r : R}

(Polynomial.X ^ n + Polynomial.C r).leadingCoeff = 1


theorem moebius_ne_zero_iff_eq_or {n : ℕ} : μ n ≠ 0 ↔ μ n = 1 ∨ μ n = -1

ArithmeticFunction.moebius n ≠ 0 ↔ ArithmeticFunction.moebius n = 1 ∨ ArithmeticFunction.moebius n = -1


/-- Constant as a continuous bounded function. -/
@[simps! (config := .asFn)] -- Porting note: Changed `simps` to `simps!`
def const (b : β) : α →ᵇ β

(α : Type u)
{β : Type v}
[TopologicalSpace α]
[PseudoMetricSpace β]
(b : β)

⇑(BoundedContinuousFunction.const α b) = fun x => b


@[simp]
theorem iInter_star {ι : Sort*} [Star α] (s : ι → Set α) : (⋂ i, s i)⋆ = ⋂ i, (s i)⋆

{α : Type u_1}
{ι : Sort u_2}
[Star α]
(s : ι → Set α)


@[reassoc]
theorem biproduct.matrix_desc [Fintype K] {f : J → C} {g : K → C}
    (m : ∀ j k, f j ⟶ g k) {P} (x : ∀ k, g k ⟶ P) :
    biproduct.matrix m ≫ biproduct.desc x = biproduct.desc fun j => ∑ k, m j k ≫ x k

CategoryTheory.Limits.biproduct.matrix m ≫ CategoryTheory.Limits.biproduct.desc x =
  CategoryTheory.Limits.biproduct.desc fun j => ∑ k : K, m j k ≫ x k


theorem StrictMonoOn.eq_iff_eq (hf : StrictMonoOn f s) {a b : α} (ha : a ∈ s) (hb : b ∈ s) :
    f a = f b ↔ a = b

{α : Type u}
{β : Type v}
[LinearOrder α]
[Preorder β]
{f : α → β}
{s : Set α}
(hf : StrictMonoOn f s)
{a b : α}
(ha : a ∈ s)
(hb : b ∈ s)


theorem monomorphisms.infer_property [hf : Mono f] : (monomorphisms C) f

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


@[to_additive (attr := simp)]
theorem restrict_mrange (f : M →* N) : mrange (f.restrict S) = S.map f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(S : AddSubmonoid M)
(f : M →+ N)

AddMonoidHom.mrange (f.restrict S) = AddSubmonoid.map f S


theorem mul_integral_upcrossingsBefore_le_integral_pos_part_aux [IsFiniteMeasure μ]
    (hf : Submartingale f ℱ μ) (hab : a < b) :
    (b - a) * μ[upcrossingsBefore a b f N] ≤ μ[fun ω => (f N ω - a)⁺]

{f : ℕ → Ω → ℝ}

(hf : MeasureTheory.Submartingale f ℱ μ)

(b - a) * ∫ (x : Ω), ↑(MeasureTheory.upcrossingsBefore a b f N x) ∂μ ≤ ∫ (x : Ω), (fun ω => (f N ω - a)⁺) x ∂μ


lemma cos_half {x : ℝ} (hl : -π ≤ x) (hr : x ≤ π) : cos (x / 2) = sqrt ((1 + cos x) / 2)

{x : ℝ}
(hl : -Real.pi ≤ x)
(hr : x ≤ Real.pi)

Real.cos (x / 2) = √((1 + Real.cos x) / 2)


@[simp] theorem map_map (h : β → γ) (g : α → β) (x : Option α) :
    (x.map g).map h = x.map (h ∘ g)

{β : Type u_1}
{γ : Type u_2}
{α : Type u_3}
(h : β → γ)
(g : α → β)
(x : Option α)

Option.map h (Option.map g x) = Option.map (h ∘ g) x


@[simp]
lemma tilted_of_not_aemeasurable (hf : ¬ AEMeasurable f μ) : μ.tilted f = 0

{α : Type u_1}
{mα : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ}
(hf : ¬AEMeasurable f μ)


lemma Monotone.frequently_ge_map_of_frequently_ge {f : R → S} (f_incr : Monotone f)
    {l : R} (freq_ge : ∃ᶠ x in F, l ≤ x) :
    ∃ᶠ x' in F.map f, f l ≤ x'

{R : Type u_6}
{S : Type u_7}
{F : Filter R}
[LinearOrder R]
[LinearOrder S]
{f : R → S}
(f_incr : Monotone f)
{l : R}
(freq_ge : ∃ᶠ (x : R) in F, l ≤ x)


@[simp]
theorem equivAddCircle_apply_mk (hp : p ≠ 0) (hq : q ≠ 0) (x : 𝕜) :
    equivAddCircle p q hp hq (x : 𝕜) = (x * (p⁻¹ * q) : 𝕜)

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
(p q : 𝕜)
(hp : p ≠ 0)
(hq : q ≠ 0)
(x : 𝕜)

(AddCircle.equivAddCircle p q hp hq) ↑x = ↑(x * (p⁻¹ * q))


@[simp]
theorem equivOfRoot_map (pb : PowerBasis A S) (e : S ≃ₐ[A] S') (h₁ h₂) :
    pb.equivOfRoot (pb.map e) h₁ h₂ = e

(h₁ : (Polynomial.aeval pb.gen) (minpoly A (pb.map e).gen) = 0)

(h₂ : (Polynomial.aeval (pb.map e).gen) (minpoly A pb.gen) = 0)


@[simp]
theorem iterate_mem_periodicOrbit (hx : x ∈ periodicPts f) (n : ℕ) :
    f^[n] x ∈ periodicOrbit f x

{α : Type u_1}
{f : α → α}
{x : α}
(hx : x ∈ Function.periodicPts f)
(n : ℕ)


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

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


/-- A linear independent family of `finrank K V` vectors forms a basis. -/
@[simps! repr_apply]
noncomputable def basisOfLinearIndependentOfCardEqFinrank {ι : Type*} [Nonempty ι] [Fintype ι]
    {b : ι → V} (lin_ind : LinearIndependent K b) (card_eq : Fintype.card ι = finrank K V) :
    Basis ι K V

(card_eq : Fintype.card ι = FiniteDimensional.finrank K V)

∀ (a : V),
  (basisOfLinearIndependentOfCardEqFinrank lin_ind card_eq).repr a =
    lin_ind.repr ((LinearMap.codRestrict (Submodule.span K (Set.range b)) LinearMap.id ⋯) a)


theorem linearIndependent_cols_of_invertible (A : Matrix m m K) [Invertible A] :
    LinearIndependent K (fun i ↦ Aᵀ i)

{m : Type u}
[DecidableEq m]
{K : Type u_3}
[Field K]
[Fintype m]
(A : Matrix m m K)
[Invertible A]

LinearIndependent K fun i => A.transpose i


lemma _root_.MeasurableEmbedding.withDensity_ofReal_comap_apply_eq_integral_abs_deriv_mul'
    {f : ℝ → ℝ} (hf : MeasurableEmbedding f) {s : Set ℝ} (hs : MeasurableSet s)
    {f' : ℝ → ℝ} (hf' : ∀ x, HasDerivAt f (f' x) x)
    {g : ℝ → ℝ} (hg : 0 ≤ᵐ[volume] g) (hg_int : Integrable g) :
    (volume.withDensity (fun x ↦ ENNReal.ofReal (g x))).comap f s
      = ENNReal.ofReal (∫ x in s, |f' x| * g (f x))

(hf' : ∀ (x : ℝ), HasDerivAt f (f' x) x)

(hg_int : MeasureTheory.Integrable g MeasureTheory.volume)

(MeasureTheory.Measure.comap f (MeasureTheory.volume.withDensity fun x => ENNReal.ofReal (g x))) s =
  ENNReal.ofReal (∫ (x : ℝ) in s, |f' x| * g (f x))


protected theorem IsLowerSet.interior (h : IsLowerSet s) : IsLowerSet (interior s)

{α : Type u_1}
[TopologicalSpace α]
[Preorder α]
[HasUpperLowerClosure α]
{s : Set α}
(h : IsLowerSet s)


theorem LiftRel.imp {R S : α → β → Prop} (H : ∀ {a b}, R a b → S a b) (s t) :
    LiftRel R s t → LiftRel S s t

{α : Type u}
{β : Type v}
{R S : α → β → Prop}
(H : ∀ {a : α} {b : β}, R a b → S a b)
(s : Computation α)
(t : Computation β)

Computation.LiftRel R s t → Computation.LiftRel S s t


@[simp]
theorem ack_two (n : ℕ) : ack 2 n = 2 * n + 3


theorem integralNormalization_support {f : R[X]} :
    (integralNormalization f).support ⊆ f.support


@[reassoc (attr := simp)]
theorem imageMonoIsoSource_hom_self [Mono f] : (imageMonoIsoSource f).hom ≫ f = image.ι f

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

(CategoryTheory.Limits.imageMonoIsoSource f).hom ≫ f = CategoryTheory.Limits.image.ι f


theorem comap_cobounded_le_iff [Bornology β] {f : α → β} :
    (cobounded β).comap f ≤ cobounded α ↔ ∀ ⦃s⦄, IsBounded s → IsBounded (f '' s)

∀ {x : Bornology α} [inst : Bornology β] {f : α → β},
  Filter.comap f (Bornology.cobounded β) ≤ Bornology.cobounded α ↔
    ∀ ⦃s : Set α⦄, Bornology.IsBounded s → Bornology.IsBounded (f '' s)


@[simp]
lemma Hom.comp_eq_comp {X Y Z : WalkingMultispan fst snd}
    (f : X ⟶ Y) (g : Y ⟶ Z) : Hom.comp f g = f ≫ g

{X Y Z : CategoryTheory.Limits.WalkingMultispan fst snd}

CategoryTheory.Limits.WalkingMultispan.Hom.comp f g = CategoryTheory.CategoryStruct.comp f g


theorem getElem?_modifyNth (f : α → α) :
    ∀ n (l : List α) m, (modifyNth f n l)[m]? = (fun a => if n = m then f a else a) <$> l[m]?

{α : Type u_1}
(f : α → α)
(n : Nat)
(l : List α)
(m : Nat)

(List.modifyNth f n l)[m]? = (fun a => if n = m then f a else a) <$> l[m]?


theorem sSup_eq_iSup' (s : Set α) : sSup s = ⨆ a : s, (a : α)


@[simp]
theorem _root_.AffineEquiv.wOppSide_map_iff {s : AffineSubspace R P} {x y : P} (f : P ≃ᵃ[R] P') :
    (s.map ↑f).WOppSide (f x) (f y) ↔ s.WOppSide x y

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

(AffineSubspace.map (↑f) s).WOppSide (f x) (f y) ↔ s.WOppSide x y


/-- A continuous function is monotone with respect to the specialization preorders on the domain and
the codomain. -/
theorem Continuous.specialization_monotone (hf : Continuous f) : Monotone f

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


theorem UniqueMDiffOn.eq (U : UniqueMDiffOn I s) (hx : x ∈ s) (h : HasMFDerivWithinAt I I' f s x f')
    (h₁ : HasMFDerivWithinAt I I' f s x f₁') : f' = f₁'

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


/-- The norm of the sum of two vectors equals the norm of their difference if and only if
the angle between them is π/2. -/
theorem norm_add_eq_norm_sub_iff_angle_eq_pi_div_two (x y : V) :
    ‖x + y‖ = ‖x - y‖ ↔ angle x y = π / 2

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

‖x + y‖ = ‖x - y‖ ↔ InnerProductGeometry.angle x y = π / 2


protected lemma isNilpotent_sum {ι : Type*} {s : Finset ι} {f : ι → R}
    (hnp : ∀ i ∈ s, IsNilpotent (f i)) (h_comm : ∀ i j, i ∈ s → j ∈ s → Commute (f i) (f j)) :
    IsNilpotent (∑ i ∈ s, f i)

(h_comm : ∀ (i j : ι), i ∈ s → j ∈ s → Commute (f i) (f j))


@[simp]
theorem reflect_eq_zero_iff {N : ℕ} {f : R[X]} : reflect N (f : R[X]) = 0 ↔ f = 0

{R : Type u_1}
[Semiring R]
{N : ℕ}
{f : Polynomial R}


@[simp] theorem decide_false_eq {b : Bool} [Decidable (false = b)] : decide (false = b) = !b


@[to_additive]
theorem prod_set' [CommGroup α] (v : Vector α n) (i : Fin n) (a : α) :
    (v.set i a).toList.prod = v.toList.prod * (v.get i)⁻¹ * a

{n : ℕ}
{α : Type u_1}
[AddCommGroup α]
(v : Mathlib.Vector α n)
(i : Fin n)
(a : α)

(v.set i a).toList.sum = v.toList.sum + -v.get i + a


@[to_additive (attr := simp)]
theorem closure_inv (s : Set G) : closure s⁻¹ = closure s

AddSubgroup.closure (-s) = AddSubgroup.closure s


theorem PairwiseDisjoint.elim' (hs : s.PairwiseDisjoint f) {i j : ι} (hi : i ∈ s) (hj : j ∈ s)
    (h : f i ⊓ f j ≠ ⊥) : i = j

{α : Type u_1}
{ι : Type u_4}
[SemilatticeInf α]
[OrderBot α]
{s : Set ι}
{f : ι → α}
(hs : s.PairwiseDisjoint f)
{i j : ι}
(hi : i ∈ s)
(hj : j ∈ s)
(h : f i ⊓ f j ≠ ⊥)


theorem codeSupp_supports {S c k} (H : codeSupp c k ⊆ S) : Supports (codeSupp c k) S

(H : Turing.PartrecToTM2.codeSupp c k ⊆ S)

Turing.PartrecToTM2.Supports (Turing.PartrecToTM2.codeSupp c k) S


@[simp]
theorem sup_eq_zero_iff {ι : Type u} {f : ι → Ordinal.{max u v}} :
    sup.{_, v} f = 0 ↔ ∀ i, f i = 0


/-- The product of two monotone functions is monotone. -/
@[to_additive add "The sum of two monotone functions is monotone."]
theorem MonotoneOn.mul' [CovariantClass α α (· * ·) (· ≤ ·)]
    [CovariantClass α α (swap (· * ·)) (· ≤ ·)] (hf : MonotoneOn f s) (hg : MonotoneOn g s) :
    MonotoneOn (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]


/-- `M[1/f] = 0` if and only if `D(f) ∩ Supp M = 0`. -/
lemma LocalizedModule.subsingleton_iff_disjoint {f : R} :
    Subsingleton (LocalizedModule (.powers f) M) ↔
      Disjoint ↑(PrimeSpectrum.basicOpen f) (Module.support R M)

{R : Type u_1}
{M : Type u_3}
[CommRing R]
[AddCommGroup M]
[Module R M]
{f : R}

Subsingleton (LocalizedModule (Submonoid.powers f) M) ↔ Disjoint (↑(PrimeSpectrum.basicOpen f)) (Module.support R M)


@[fun_prop]
theorem DifferentiableWithinAt.add (hf : DifferentiableWithinAt 𝕜 f s x)
    (hg : DifferentiableWithinAt 𝕜 g s x) : DifferentiableWithinAt 𝕜 (fun y => f y + g y) s x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
{x : E}
{s : Set E}
(hf : DifferentiableWithinAt 𝕜 f s x)
(hg : DifferentiableWithinAt 𝕜 g s x)


lemma map_comp_cotangentComplex (f : Hom P P') :
    CotangentSpace.map f ∘ₗ P.cotangentComplex =
      P'.cotangentComplex.restrictScalars S ∘ₗ Cotangent.map f

{R : Type u}
{S : Type v}
[CommRing R]
[CommRing S]
[Algebra R S]
{P : Algebra.Generators R S}
{R' : Type u'}
{S' : Type v'}
[CommRing R']
[CommRing S']
[Algebra R' S']
{P' : Algebra.Generators R' S'}
[Algebra R R']
[Algebra S S']
[Algebra R S']
[IsScalarTower R R' S']
[IsScalarTower R S S']
(f : P.Hom P')

Algebra.Generators.CotangentSpace.map f ∘ₗ P.cotangentComplex =
  ↑S P'.cotangentComplex ∘ₗ Algebra.Generators.Cotangent.map f


lemma StrictAnti.image_Ioo_subset (h : StrictAnti f) : f '' Ioo a b ⊆ Ioo (f b) (f a)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{a b : α}
(h : StrictAnti f)


theorem multinomial_eq (f : α →₀ ℕ) : f.multinomial = Nat.multinomial f.support f

f.multinomial = Nat.multinomial f.support ⇑f


@[simp] theorem measurableSet_inl_image {s : Set α} :
    MeasurableSet (Sum.inl '' s : Set (α ⊕ β)) ↔ MeasurableSet s

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{s : Set α}

MeasurableSet (Sum.inl '' s) ↔ MeasurableSet s


theorem norm_compContinuous_linearIsometryEquiv (g : ContinuousMultilinearMap 𝕜 E₁ G)
    (f : ∀ i, E i ≃ₗᵢ[𝕜] E₁ i) :
    ‖g.compContinuousLinearMap fun i => (f i : E i →L[𝕜] E₁ i)‖ = ‖g‖

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

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

‖g.compContinuousLinearMap fun i =>
      ↑{ toLinearEquiv := (f i).toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }‖ =
  ‖g‖


theorem derivWithin_of_isOpen (hs : IsOpen s) (hx : x ∈ s) : derivWithin f s x = deriv f x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}
{x : 𝕜}
{s : Set 𝕜}
(hs : IsOpen s)
(hx : x ∈ s)


/-- The split epi which appears in the factorisation `decompId P`. -/
@[simps]
def decompId_p (P : Karoubi C) : (P.X : Karoubi C) ⟶ P

(P : CategoryTheory.Idempotents.Karoubi C)


theorem comap_eval_surjective : (Submodule.comap (eval K V)).Surjective

(K : Type uK)
(V : Type uV)
[CommRing K]
[AddCommGroup V]
[Module K V]
[Module.Free K V]

Function.Surjective (Submodule.comap (Module.Dual.eval K V))


/-- The `i`-th element of a list coincides with the `i`-th element of any of its prefixes of
length `> i`. Version designed to rewrite from the small list to the big list. -/
@[deprecated getElem_take (since := "2024-06-12")]
theorem get_take' (L : List α) {j i} :
    get (L.take j) i =
    get L ⟨i.1, Nat.lt_of_lt_of_le i.2 (length_take_le' _ _)⟩

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


theorem monotone_comap {f : M →[L] N} : Monotone (comap f)

{L : FirstOrder.Language}
{M : Type w}
{N : Type u_1}
[L.Structure M]
[L.Structure N]
{f : L.Hom M N}


/-- If `f` is a polynomial over a field, and `a : K` satisfies `f' a ≠ 0`,
then `f / (X - a)` is coprime with `X - a`.
Note that we do not assume `f a = 0`, because `f / (X - a) = (f - f a) / (X - a)`. -/
theorem isCoprime_of_is_root_of_eval_derivative_ne_zero {K : Type*} [Field K] (f : K[X]) (a : K)
    (hf' : f.derivative.eval a ≠ 0) : IsCoprime (X - C a : K[X]) (f /ₘ (X - C a))

(hf' : Polynomial.eval a (Polynomial.derivative f) ≠ 0)

IsCoprime (Polynomial.X - Polynomial.C a) (f /ₘ (Polynomial.X - Polynomial.C a))


@[simp]
theorem mem_insert_iff {x y z : ZFSet.{u}} : x ∈ insert y z ↔ x = y ∨ x ∈ z


/-- The product of a family of partial equivalences, as a partial equivalence on the pi type. -/
@[simps (config := mfld_cfg) apply source target]
protected def pi (ei : ∀ i, PartialEquiv (αi i) (βi i)) : PartialEquiv (∀ i, αi i) (∀ i, βi i)

(ei : (i : ι) → PartialEquiv (αi i) (βi i))

(PartialEquiv.pi ei).source = Set.univ.pi fun i => (ei i).source


@[simp]
theorem withBot_id : (InfHom.id α).withBot = InfHom.id _

(InfHom.id α).withBot = InfHom.id (WithBot α)


@[simp] theorem getElem_mapIdx (a : Array α) (f : Fin a.size → α → β) (i : Nat)
    (h : i < (mapIdx a f).size) :
    haveI : i < a.size := by simp_all
    (a.mapIdx f)[i] = f ⟨i, this⟩ a[i]

{α : Type u_1}
{β : Type u_2}
(a : Array α)
(f : Fin a.size → α → β)
(i : Nat)
(h : i < (a.mapIdx f).size)


lemma swap_integral (f : X → E × F) : (∫ x, f x ∂μ).swap = ∫ x, (f x).swap ∂μ

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

(∫ (x : X), f x ∂μ).swap = ∫ (x : X), (f x).swap ∂μ


protected theorem le_of_lt_or_eq : ∀ {x y : Bool}, x < y ∨ x = y → x ≤ y


@[simp]
theorem perm_permutations_iff {s t : List α} : permutations s ~ permutations t ↔ s ~ t

s.permutations.Perm t.permutations ↔ s.Perm t


theorem dist_triangle4_left (x₁ y₁ x₂ y₂ : α) :
    dist x₂ y₂ ≤ dist x₁ y₁ + (dist x₁ x₂ + dist y₁ y₂)

{α : Type u}
[PseudoMetricSpace α]
(x₁ y₁ x₂ y₂ : α)


theorem card_commutator_closureCommutatorRepresentatives :
    Nat.card (commutator (closureCommutatorRepresentatives G)) = Nat.card (commutator G)

Nat.card ↥(commutator ↥(closureCommutatorRepresentatives G)) = Nat.card ↥(commutator G)


lemma withSeminorms : WithSeminorms (seminormFamily 𝕜 E F)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]

WithSeminorms (ContinuousLinearMapWOT.seminormFamily 𝕜 E F)


@[rclike_simps, norm_cast]
theorem ofReal_zpow (r : ℝ) (n : ℤ) : ((r ^ n : ℝ) : K) = (r : K) ^ n

{K : Type u_1}
[RCLike K]
(r : ℝ)
(n : ℤ)


theorem normAtPlace_real (w : InfinitePlace K) (c : ℝ) :
    normAtPlace w ((fun _ ↦ c, fun _ ↦ c) : (E K)) = |c|

{K : Type u_1}
[Field K]
(w : NumberField.InfinitePlace K)
(c : ℝ)

(NumberField.mixedEmbedding.normAtPlace w) (fun x => c, fun x => ↑c) = |c|


@[simp]
theorem comp_hom_app {X Y Z : TopCat.{w}} (f : X ⟶ Y) (g : Y ⟶ Z) (ℱ : X.Presheaf C) (U) :
    (comp f g ℱ).hom.app U = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{X Y Z : TopCat}
(f : X ⟶ Y)
(g : Y ⟶ Z)
(ℱ : TopCat.Presheaf C X)
(U : (TopologicalSpace.Opens ↑Z)ᵒᵖ)

(TopCat.Presheaf.Pushforward.comp f g ℱ).hom.app U = 𝟙 (((TopCat.Presheaf.pushforward C (f ≫ g)).obj ℱ).obj U)


theorem IicSnd_ac_fst (r : ℝ) : ρ.IicSnd r ≪ ρ.fst

{α : Type u_1}
{mα : MeasurableSpace α}
(ρ : MeasureTheory.Measure (α × ℝ))
(r : ℝ)


@[simp]
theorem map_bot : (⊥ : Ideal R).map f = ⊥

{R : Type u}
{S : Type v}
{F : Type u_1}
[Semiring R]
[Semiring S]
[FunLike F R S]
[rc : RingHomClass F R S]
{f : F}


@[simp]
theorem map_app (f : Q₁ →qᵢ Q₂) (m : M₁) : Q₂ (f m) = Q₁ m

{R : Type u_2}
{M₁ : Type u_4}
{M₂ : Type u_5}
{N : Type u_8}
[CommSemiring R]
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[AddCommMonoid N]
[Module R M₁]
[Module R M₂]
[Module R N]
{Q₁ : QuadraticMap R M₁ N}
{Q₂ : QuadraticMap R M₂ N}
(f : Q₁ →qᵢ Q₂)
(m : M₁)


@[to_additive (attr := simp 1001)]
-- porting note (#10618): increase priority because `simp` can prove this
theorem dist_self_div_right (a b : E) : dist a (a / b) = ‖b‖

{E : Type u_3}
[SeminormedCommGroup E]
(a b : E)


theorem eq_zero_or_one (I : FractionalIdeal K⁰ L) : I = 0 ∨ I = 1

{K : Type u_4}
{L : Type u_5}
[Field K]
[Field L]
[Algebra K L]
[IsFractionRing K L]
(I : FractionalIdeal K⁰ L)


theorem other_mem {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other h ∈ z

{α : Type u_1}
{a : α}
{z : Sym2 α}
(h : a ∈ z)


@[to_additive]
theorem mul_subset_iff_left : s * t ⊆ u ↔ ∀ a ∈ s, a • t ⊆ u


/-- A discrete category is equivalent to its opposite category. -/
@[simps! functor_obj_as inverse_obj]
protected def opposite (α : Type u₁) : (Discrete α)ᵒᵖ ≌ Discrete α

(α : Type u₁)
(X : (CategoryTheory.Discrete α)ᵒᵖ)

((CategoryTheory.Discrete.opposite α).functor.obj X).as = (Opposite.unop X).as


@[simp]
theorem toFinset_inter (l l' : List α) : (l ∩ l').toFinset = l.toFinset ∩ l'.toFinset

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


lemma strictMono_div_right_of_pos {b : EReal} (h : 0 < b) (h' : b ≠ ⊤) :
    StrictMono fun a ↦ a / b


theorem inv_card_commutator_le_commProb : (↑(Nat.card (commutator G)))⁻¹ ≤ commProb G

(↑(Nat.card ↥(commutator G)))⁻¹ ≤ commProb G


private theorem free_and_finite :
    Module.Free R (MultilinearMap R M₁ M₂) ∧ Module.Finite R (MultilinearMap R M₁ M₂)

{ι : Type u_1}
{R : Type u_2}
{M₂ : Type u_3}
{M₁ : ι → Type u_4}
[Finite ι]
[CommRing R]
[AddCommGroup M₂]
[Module R M₂]
[Module.Finite R M₂]
[Module.Free R M₂]
[(i : ι) → AddCommGroup (M₁ i)]
[(i : ι) → Module R (M₁ i)]
[∀ (i : ι), Module.Finite R (M₁ i)]
[∀ (i : ι), Module.Free R (M₁ i)]


theorem forall₂_take : ∀ (n) {l₁ l₂}, Forall₂ R l₁ l₂ → Forall₂ R (take n l₁) (take n l₂)

{α : Type u_1}
{β : Type u_2}
{R : α → β → Prop}
(n : ℕ)
{l₁ : List α}
{l₂ : List β}

List.Forall₂ R l₁ l₂ → List.Forall₂ R (List.take n l₁) (List.take n l₂)


protected theorem mul_neg_of_pos_of_neg {a b : Int} (ha : 0 < a) (hb : b < 0) : a * b < 0


theorem MeasurableSpace.measurableSet_injective : Injective (@MeasurableSet α)


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

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

Set.Ico a₁ b₁ ⊆ Set.Ico a₂ b₂ ↔ a₂ ≤ a₁ ∧ b₁ ≤ b₂


@[to_additive (attr := continuity)]
theorem continuous_zpow : ∀ z : ℤ, Continuous fun a : G => a ^ z

{G : Type w}
[TopologicalSpace G]
[AddGroup G]
[TopologicalAddGroup G]
(z : ℤ)


@[simp]
theorem comp_smul [LinearMap.CompatibleSMul N₂ N₃ S R] (hₗ : N₂ →L[R] N₃) (c : S)
    (fₗ : M →L[R] N₂) : hₗ.comp (c • fₗ) = c • hₗ.comp fₗ

{R : Type u_1}
{S : Type u_4}
[Semiring R]
[Monoid S]
{M : Type u_6}
[TopologicalSpace M]
[AddCommMonoid M]
[Module R M]
{N₂ : Type u_9}
[TopologicalSpace N₂]
[AddCommMonoid N₂]
[Module R N₂]
{N₃ : Type u_10}
[TopologicalSpace N₃]
[AddCommMonoid N₃]
[Module R N₃]
[DistribMulAction S N₃]
[SMulCommClass R S N₃]
[ContinuousConstSMul S N₃]
[DistribMulAction S N₂]
[ContinuousConstSMul S N₂]
[SMulCommClass R S N₂]
[LinearMap.CompatibleSMul N₂ N₃ S R]
(hₗ : N₂ →L[R] N₃)
(c : S)
(fₗ : M →L[R] N₂)


theorem rootMultiplicity_mul {p q : R[X]} {x : R} (hpq : p * q ≠ 0) :
    rootMultiplicity x (p * q) = rootMultiplicity x p + rootMultiplicity x q

{R : Type u}
[CommRing R]
[IsDomain R]
{p q : R[X]}
{x : R}
(hpq : p * q ≠ 0)

Polynomial.rootMultiplicity x (p * q) = Polynomial.rootMultiplicity x p + Polynomial.rootMultiplicity x q


@[to_additive (attr := simp, norm_cast)]
theorem coe_inv (x : H) : (x⁻¹).1 = x.1⁻¹

{G : Type u_1}
[AddGroup G]
{S : Type u_6}
{H : S}
[SetLike S G]
[AddSubgroupClass S G]
(x : ↥H)


theorem tendsto_iff_forall_eval_tendsto {l : Filter α} {f : α → WeakBilin B} {x : WeakBilin B}
    (hB : Function.Injective B) :
    Tendsto f l (𝓝 x) ↔ ∀ y, Tendsto (fun i => B (f i) y) l (𝓝 (B x y))

{α : Type u_1}
{𝕜 : Type u_2}
{E : Type u_5}
{F : Type u_6}
[TopologicalSpace 𝕜]
[CommSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
[AddCommMonoid F]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
{l : Filter α}
{f : α → WeakBilin B}
{x : WeakBilin B}
(hB : Function.Injective ⇑B)

Filter.Tendsto f l (𝓝 x) ↔ ∀ (y : F), Filter.Tendsto (fun i => (B (f i)) y) l (𝓝 ((B x) y))


/-- The restriction of scalars by a ring morphism that is the identity identify to the
identity functor. -/
@[simps! hom_app inv_app]
def restrictScalarsId' : ModuleCat.restrictScalars.{v} f ≅ 𝟭 _

{R : Type u₁}
[Ring R]
(f : R →+* R)
(hf : f = RingHom.id R)
(X : ModuleCat R)

(ModuleCat.restrictScalarsId' f hf).hom.app X = (ModuleCat.restrictScalarsId'App f hf X).hom


@[simp]
theorem symmDiff_symmDiff_self' : a ∆ b ∆ a = b

{α : Type u_2}
[GeneralizedBooleanAlgebra α]
(a b : α)


theorem Stable.exists_pow_smul_eq_of_ge : ∃ n₀, ∀ n ≥ n₀, F.N n = I ^ (n - n₀) • F.N n₀

{R M : Type u}
[CommRing R]
[AddCommGroup M]
[Module R M]
{I : Ideal R}
{F : I.Filtration M}
(h : F.Stable)


/-- A realization of a stochastic process with bounded upcrossings and bounded liminfs is
convergent.

We use the spelling `< ∞` instead of the standard `≠ ∞` in the assumptions since it is not as easy
to change `<` to `≠` under binders. -/
theorem tendsto_of_uncrossing_lt_top (hf₁ : liminf (fun n => (‖f n ω‖₊ : ℝ≥0∞)) atTop < ∞)
    (hf₂ : ∀ a b : ℚ, a < b → upcrossings a b f ω < ∞) :
    ∃ c, Tendsto (fun n => f n ω) atTop (𝓝 c)

{f : ℕ → Ω → ℝ}

(hf₁ : Filter.liminf (fun n => ↑‖f n ω‖₊) Filter.atTop < ⊤)

(hf₂ : ∀ (a b : ℚ), a < b → MeasureTheory.upcrossings (↑a) (↑b) f ω < ⊤)

∃ c, Filter.Tendsto (fun n => f n ω) Filter.atTop (𝓝 c)


theorem sub_algebraMap {B : Type*} [CommRing B] [Algebra A B] {x : B} (hx : IsIntegral A x)
    (a : A) : minpoly A (x - algebraMap A B a) = (minpoly A x).comp (X + C a)

{A : Type u_1}
[Field A]
{B : Type u_3}
[CommRing B]
[Algebra A B]
{x : B}
(hx : IsIntegral A x)
(a : A)

minpoly A (x - (algebraMap A B) a) = (minpoly A x).comp (Polynomial.X + Polynomial.C a)


theorem mem_cons_of_mem (y : α) {a : α} {l : List α} : a ∈ l → a ∈ y :: l

{α : Type u_1}
(y : α)
{a : α}
{l : List α}


theorem closedBall_eq_biInter_ball (x r) : closedBall p x r = ⋂ ρ > r, ball p x ρ

{𝕜 : Type u_3}
{E : Type u_7}
[SeminormedRing 𝕜]
[AddCommGroup E]
[SMul 𝕜 E]
(p : Seminorm 𝕜 E)
(x : E)
(r : ℝ)

p.closedBall x r = ⋂ ρ, ⋂ (_ : ρ > r), p.ball x ρ


@[to_additive]
theorem div_le_inv_mul_iff [CovariantClass α α (swap (· * ·)) (· ≤ ·)] :
    a / b ≤ a⁻¹ * b ↔ a ≤ b

[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]


@[continuity]
theorem Continuous.matrix_dotProduct [Fintype n] [Mul R] [AddCommMonoid R] [ContinuousAdd R]
    [ContinuousMul R] {A : X → n → R} {B : X → n → R} (hA : Continuous A) (hB : Continuous B) :
    Continuous fun x => dotProduct (A x) (B x)

{X : Type u_1}
{n : Type u_5}
{R : Type u_8}
[TopologicalSpace X]
[TopologicalSpace R]
[Fintype n]
[Mul R]
[AddCommMonoid R]
[ContinuousAdd R]
[ContinuousMul R]
{A B : X → n → R}
(hA : Continuous A)
(hB : Continuous B)


theorem _root_.continuous_coe_real_ereal : Continuous ((↑) : ℝ → EReal)


/-- Typeclass for purely inseparable field extensions: an algebraic extension `E / F` is purely
inseparable if and only if the minimal polynomial of every element of `E ∖ F` is not separable. -/
class IsPurelyInseparable : Prop where
  isIntegral : Algebra.IsIntegral F E
  inseparable' (x : E) : IsSeparable F x → x ∈ (algebraMap F E).range

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
[self : IsPurelyInseparable F E]


lemma unitization_nnnorm_inr (x : A) : ‖(WithLp.equiv 1 (Unitization 𝕜 A)).symm x‖₊ = ‖x‖₊

{𝕜 : Type u_1}
{A : Type u_2}
[NormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
(x : A)

‖(WithLp.equiv 1 (Unitization 𝕜 A)).symm ↑x‖₊ = ‖x‖₊


@[to_additive (attr := simp)]
lemma coe_id {X : MonCat} : (𝟙 X : X → X) = id


@[to_additive (attr := simp)]
theorem smul_finset_univ [Fintype β] : a • (univ : Finset β) = univ

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[AddGroup α]
[AddAction α β]
{a : α}
[Fintype β]


theorem factors_right_of_factors_add {X Y : C} {P : Subobject Y} (f g : X ⟶ Y)
    (w : P.Factors (f + g)) (wf : P.Factors f) : P.Factors g

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Preadditive C]
{X Y : C}
{P : CategoryTheory.Subobject Y}
(f g : X ⟶ Y)
(w : P.Factors (f + g))
(wf : P.Factors f)


@[reassoc (attr := simp, nolint unusedHavesSuffices)]
lemma Exact.comp_descToInjective
    (hS : S.Exact) {J : C} (f : S.X₂ ⟶ J) [Injective J] (hf : S.f ≫ f = 0) :
    S.g ≫ hS.descToInjective f hf = f

(hf : CategoryTheory.CategoryStruct.comp S.f f = 0)

CategoryTheory.CategoryStruct.comp S.g (hS.descToInjective f hf) = f


@[simp]
theorem coe_toContinuousMultilinearMap : ⇑f.toContinuousMultilinearMap = f

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


theorem one_le_pow_of_one_le (H : 1 ≤ a) : ∀ n : ℕ, 1 ≤ a ^ n

{R : Type u_3}
[OrderedSemiring R]
{a : R}
(H : 1 ≤ a)
(n : ℕ)


theorem Computable.equiv₂ (α β) [Denumerable α] [Denumerable β] :
    (Denumerable.equiv₂ α β).Computable

(α : Type u_1)
(β : Type u_2)
[Denumerable α]
[Denumerable β]


@[simp]
theorem finrank_euclideanSpace :
    FiniteDimensional.finrank 𝕜 (EuclideanSpace 𝕜 ι) = Fintype.card ι

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
[Fintype ι]


/-- If `A`, `B`, `C`, `D` are cospherical and `P` is on both lines `AB` and `CD`, then
`AP * BP = CP * DP`. -/
theorem mul_dist_eq_mul_dist_of_cospherical {a b c d p : P} (h : Cospherical ({a, b, c, d} : Set P))
    (hapb : ∃ k₁ : ℝ, k₁ ≠ 1 ∧ b -ᵥ p = k₁ • (a -ᵥ p))
    (hcpd : ∃ k₂ : ℝ, k₂ ≠ 1 ∧ d -ᵥ p = k₂ • (c -ᵥ p)) :
    dist a p * dist b p = dist c p * dist d p

(h : EuclideanGeometry.Cospherical {a, b, c, d})

(hapb : ∃ k₁, k₁ ≠ 1 ∧ b -ᵥ p = k₁ • (a -ᵥ p))

(hcpd : ∃ k₂, k₂ ≠ 1 ∧ d -ᵥ p = k₂ • (c -ᵥ p))


@[to_additive]
theorem mul_subset_closure (hs : s ⊆ u) (ht : t ⊆ u) : s * t ⊆ Submonoid.closure u

{M : Type u_3}
[Monoid M]
{s t u : Set M}
(hs : s ⊆ u)
(ht : t ⊆ u)


protected theorem mul_comm_div : a / b * c = a * (c / b)


/-- The function `evenKernel a - L` has exponential decay at `+∞`, where `L = 1` if
`a = 0` and `L = 0` otherwise. -/
lemma isBigO_atTop_evenKernel_sub (a : UnitAddCircle) : ∃ p : ℝ, 0 < p ∧
    (evenKernel a · - (if a = 0 then 1 else 0)) =O[atTop] (rexp <| -p * ·)

∃ p, 0 < p ∧ (fun x => HurwitzZeta.evenKernel a x - if a = 0 then 1 else 0) =O[Filter.atTop] fun x => rexp (-p * x)


@[simp]
theorem blockDiag'_neg [AddGroup α] (M : Matrix (Σi, m' i) (Σi, n' i) α) :
    blockDiag' (-M) = -blockDiag' M

(M : Matrix ((i : o) × m' i) ((i : o) × n' i) α)


theorem descFactorial_le_pow (n : ℕ) : ∀ k : ℕ, n.descFactorial k ≤ n ^ k


theorem HasStrictDerivAt.cosh (hf : HasStrictDerivAt f f' x) :
    HasStrictDerivAt (fun x => Real.cosh (f x)) (Real.sinh (f x) * f') x

{f : ℝ → ℝ}
{f' x : ℝ}
(hf : HasStrictDerivAt f f' x)


lemma lt_rpow_inv_iff_of_pos (hx : 0 ≤ x) (hy : 0 ≤ y) (hz : 0 < z) : x < y ^ z⁻¹ ↔ x ^ z < y


lemma sSup_eq_zero' : sSup s = 0 ↔ s = ∅ ∨ s = {0}


@[simp]
protected theorem mod_zero (n : Num) : n % 0 = n


@[to_additive LinearOrderedAddCommGroup.add_lt_add_left]
theorem LinearOrderedCommGroup.mul_lt_mul_left' (a b : α) (h : a < b) (c : α) : c * a < c * b

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


theorem splitOnP.go_acc (xs acc : List α) :
    splitOnP.go p xs acc = modifyHead (acc.reverse ++ ·) (splitOnP p xs)

{α : Type u}
(p : α → Bool)
(xs acc : List α)

List.splitOnP.go p xs acc = List.modifyHead (fun x => acc.reverse ++ x) (List.splitOnP p xs)


theorem image_subset_image₂_right (ha : a ∈ s) : t.image (fun b => f a b) ⊆ image₂ f s t

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
[DecidableEq γ]
{f : α → β → γ}
{s : Finset α}
{t : Finset β}
{a : α}
(ha : a ∈ s)

Finset.image (fun b => f a b) t ⊆ Finset.image₂ f s t


lemma Algebra.intTrace_eq_of_isLocalization
    (x : B) :
    algebraMap A Aₘ (Algebra.intTrace A B x) = Algebra.intTrace Aₘ Bₘ (algebraMap B Bₘ x)

[IsLocalization (Algebra.algebraMapSubmonoid B M) Bₘ]

(algebraMap A Aₘ) ((Algebra.intTrace A B) x) = (Algebra.intTrace Aₘ Bₘ) ((algebraMap B Bₘ) x)


/-- The image under a monotone function on a set `t` of a subset which has an upper bound in `t`
  is bounded above. -/
theorem map_bddAbove (Hf : MonotoneOn f t) (Hst : s ⊆ t) :
    (upperBounds s ∩ t).Nonempty → BddAbove (f '' s)

{α : Type u}
{β : Type v}
[Preorder α]
[Preorder β]
{f : α → β}
{s t : Set α}
(Hf : MonotoneOn f t)
(Hst : s ⊆ t)


/-- **Ruzsa's covering lemma** for sets. See also `Finset.exists_subset_mul_div`. -/
@[to_additive "**Ruzsa's covering lemma**. Version for sets. For finsets,
see `Finset.exists_subset_add_sub`."]
lemma exists_subset_mul_div (hs : s.Finite) (ht' : t.Finite) (ht : t.Nonempty) :
    ∃ u : Set α, Nat.card u * Nat.card t ≤ Nat.card (s * t) ∧ s ⊆ u * t / t ∧ u.Finite

{α : Type u_1}
[AddCommGroup α]
{s t : Set α}
(hs : s.Finite)
(ht' : t.Finite)
(ht : t.Nonempty)

∃ u, Nat.card ↑u * Nat.card ↑t ≤ Nat.card ↑(s + t) ∧ s ⊆ u + t - t ∧ u.Finite


@[simp]
theorem norm_coe_mul (x : ℝ) (t : ℝ) :
    ‖(↑(t * x) : AddCircle (t * p))‖ = |t| * ‖(x : AddCircle p)‖


@[measurability, fun_prop]
theorem measurable_deriv [MeasurableSpace 𝕜] [OpensMeasurableSpace 𝕜] [MeasurableSpace F]
    [BorelSpace F] (f : 𝕜 → F) : Measurable (deriv f)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
[CompleteSpace F]
[MeasurableSpace 𝕜]
[OpensMeasurableSpace 𝕜]
[MeasurableSpace F]
[BorelSpace F]
(f : 𝕜 → F)


theorem pos_of_mem_properDivisors {m : ℕ} (h : m ∈ n.properDivisors) : 0 < m


theorem birkhoffSum_succ (f : α → α) (g : α → M) (n : ℕ) (x : α) :
    birkhoffSum f g (n + 1) x = birkhoffSum f g n x + g (f^[n] x)

{α : Type u_1}
{M : Type u_2}
[AddCommMonoid M]
(f : α → α)
(g : α → M)
(n : ℕ)
(x : α)


theorem toProd_injective : Injective (toProd : NonemptyInterval α → α × α)


@[simp] theorem eq_false_or_eq_true_self : ∀(b : Bool), (b = false ∨ b = true) ↔ True


@[to_additive]
theorem le_iff {c d : Con M} : c ≤ d ↔ (c : Submonoid (M × M)) ≤ d

{M : Type u_1}
[AddZeroClass M]
{c d : AddCon M}

c ≤ d ↔ ↑c ≤ ↑d


/-- See Note [no_index around OfNat.ofNat] -/
@[simp]
lemma cpow_ofNat (x : ℂ) (n : ℕ) [n.AtLeastTwo] :
    x ^ (no_index (OfNat.ofNat n) : ℂ) = x ^ (OfNat.ofNat n : ℕ)


theorem X_def (s : σ) : X s = monomial R (single s 1) 1

{σ : Type u_1}
{R : Type u_2}
[Semiring R]
(s : σ)

MvPowerSeries.X s = (MvPowerSeries.monomial R (Finsupp.single s 1)) 1


theorem mellin_comp_mul_left (f : ℝ → E) (s : ℂ) {a : ℝ} (ha : 0 < a) :
    mellin (fun t => f (a * t)) s = (a : ℂ) ^ (-s) • mellin f s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(f : ℝ → E)
(s : ℂ)
{a : ℝ}
(ha : 0 < a)

mellin (fun t => f (a * t)) s = ↑a ^ (-s) • mellin f s


lemma eLpNorm_density_le (hκν : fst κ ≤ ν) (a : α) (s : Set β) :
    eLpNorm (fun x ↦ density κ ν a x s) 1 (ν a) ≤ ν a univ

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

MeasureTheory.eLpNorm (fun x => κ.density ν a x s) 1 (ν a) ≤ (ν a) Set.univ


theorem map_id' {f : α → α} (H : ∀ x : α, f x = x) (o) : map f o = o

{α : Type u_1}
{f : α → α}
(H : ∀ (x : α), f x = x)
(o : Part α)


/-- For a nonzero element `f` in an algebra `S` over a principal ideal domain `R` that is finite and
free as an `R`-module, the norm of `f` relative to `R` is associated to the product of the Smith
coefficients of the ideal generated by `f`. -/
theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf : f ≠ 0) :
    Associated (Algebra.norm R f) (∏ i, smithCoeffs b _ (span_singleton_eq_bot.not.2 hf) i)

{R : Type u_1}
{S : Type u_2}
{ι : Type u_3}
[CommRing R]
[IsDomain R]
[IsPrincipalIdealRing R]
[CommRing S]
[IsDomain S]
[Algebra R S]
[Fintype ι]
(b : Basis ι R S)
{f : S}
(hf : f ≠ 0)

Associated ((Algebra.norm R) f) (∏ i : ι, Ideal.smithCoeffs b (Ideal.span {f}) ⋯ i)


theorem length_permutationsAux :
    ∀ ts is : List α, length (permutationsAux ts is) + is.length ! = (length ts + length is)!

(ts.permutationsAux is).length + is.length ! = (ts.length + is.length)!


@[to_additive]
lemma prod_fiberwise [DecidableEq κ] (g : ι → κ) (f : ι → α) :
    ∏ j, ∏ i : {i // g i = j}, f i = ∏ i, f i

{ι : Type u_6}
{κ : Type u_7}
{α : Type u_8}
[Fintype ι]
[Fintype κ]
[AddCommMonoid α]
[DecidableEq κ]
(g : ι → κ)
(f : ι → α)

∑ j : κ, ∑ i : { i // g i = j }, f ↑i = ∑ i : ι, f i


lemma mem_stabilizer_mk_iff (φ : K →+* ℂ) (σ : K ≃ₐ[k] K) :
    σ ∈ Stab (mk φ) ↔ σ = 1 ∨ ComplexEmbedding.IsConj φ σ

{k : Type u_1}
[Field k]
{K : Type u_2}
[Field K]
[Algebra k K]
(φ : K →+* ℂ)
(σ : K ≃ₐ[k] K)

σ ∈ MulAction.stabilizer (K ≃ₐ[k] K) (NumberField.InfinitePlace.mk φ) ↔ σ = 1 ∨ NumberField.ComplexEmbedding.IsConj φ σ


lemma ArtinianObject.subobject_lt_wellFounded (X : C) [ArtinianObject X] :
    WellFounded ((· < ·) : Subobject X → Subobject X → Prop)

{C : Type u_1}
[CategoryTheory.Category.{u_2, u_1} C]
(X : C)
[CategoryTheory.ArtinianObject X]


theorem conj_ofNat (n : ℕ) [n.AtLeastTwo] : conj (no_index (OfNat.ofNat n : ℂ)) = OfNat.ofNat n

(starRingEnd ℂ) (OfNat.ofNat n) = OfNat.ofNat n


theorem dist_mul_right (n k m : ℕ) : dist (n * k) (m * k) = dist n m * k


(K : Type u_1)
[Field K]
[NumberField K]


@[simp]
theorem restrictScalars_normal {E : IntermediateField K L} :
    Normal F (E.restrictScalars F) ↔ Normal F E

{F : Type u_1}
{K : Type u_2}
{L : Type u_3}
[Field F]
[Field K]
[Field L]
[Algebra F L]
[Algebra K L]
[Algebra F K]
[IsScalarTower F K L]
{E : IntermediateField K L}

Normal F ↥(IntermediateField.restrictScalars F E) ↔ Normal F ↥E


@[refl]
protected theorem refl [Monoid α] (x : α) : x ~ᵤ x


theorem openSegment_subset_iff_segment_subset (hx : x ∈ s) (hy : y ∈ s) :
    openSegment 𝕜 x y ⊆ s ↔ [x -[𝕜] y] ⊆ s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[Module 𝕜 E]
{s : Set E}
{x y : E}
(hx : x ∈ s)
(hy : y ∈ s)


theorem cast_pos {n : ℕ} : IsNat (a : R) n → a = n.rawCast + 0

{R : Type u_1}
[CommSemiring R]
{a : R}
{n : ℕ}

Mathlib.Meta.NormNum.IsNat a n → a = n.rawCast + 0


@[simp]
theorem rightUnitor_inv_hom (X : Mon_ C) : (ρ_ X).inv.hom = (ρ_ X.X).inv

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


@[to_additive (attr := simp)]
theorem preimage_inv (s : Finset α) : s.preimage (·⁻¹) inv_injective.injOn = s⁻¹

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


@[simp]
lemma partialSups_le_iff {f : ℕ → α} {n : ℕ} {a : α} : partialSups f n ≤ a ↔ ∀ k ≤ n, f k ≤ a

{α : Type u_1}
[SemilatticeSup α]
{f : ℕ → α}
{n : ℕ}
{a : α}

(partialSups f) n ≤ a ↔ ∀ k ≤ n, f k ≤ a


theorem fourierIntegral_smul_const (e : AddChar 𝕜 𝕊) (μ : Measure V)
    (L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜) (f : V → E) (r : ℂ) :
    fourierIntegral e μ L (r • f) = r • fourierIntegral e μ L f

{𝕜 : Type u_1}
[CommRing 𝕜]
{V : Type u_2}
[AddCommGroup V]
[Module 𝕜 V]
[MeasurableSpace V]
{W : Type u_3}
[AddCommGroup W]
[Module 𝕜 W]
{E : Type u_4}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(e : AddChar 𝕜 ↥𝕊)
(μ : MeasureTheory.Measure V)
(L : V →ₗ[𝕜] W →ₗ[𝕜] 𝕜)
(f : V → E)
(r : ℂ)

VectorFourier.fourierIntegral e μ L (r • f) = r • VectorFourier.fourierIntegral e μ L f


lemma _root_.CovBy.card_multiset (h : s ⋖ t) : card s ⋖ card t

{α : Type u_1}
{s t : Multiset α}
(h : s ⋖ t)


/-- If `f : S₁ →ₐ[R] S₂` is a morphism of `R`-algebras, then so is `MvPolynomial.map f`. -/
@[simps!]
def mapAlgHom [CommSemiring S₂] [Algebra R S₁] [Algebra R S₂] (f : S₁ →ₐ[R] S₂) :
    MvPolynomial σ S₁ →ₐ[R] MvPolynomial σ S₂

{R : Type u}
{S₁ : Type v}
{S₂ : Type w}
{σ : Type u_1}
[CommSemiring R]
[CommSemiring S₁]
[CommSemiring S₂]
[Algebra R S₁]
[Algebra R S₂]
(f : S₁ →ₐ[R] S₂)
(p : MvPolynomial σ S₁)

(MvPolynomial.mapAlgHom f) p = MvPolynomial.eval₂ (MvPolynomial.C.comp ↑f) MvPolynomial.X p


@[simp]
theorem coe_nil : ↑(@Sym.nil α) = (0 : Multiset α)


theorem mk_elim (hnd : l.Nodup) (h : ∀ i, i ∈ l) (v : TProd α l) : TProd.mk l (v.elim' h) = v

{ι : Type u}
{α : ι → Type v}
{l : List ι}
[DecidableEq ι]
(hnd : l.Nodup)
(h : ∀ (i : ι), i ∈ l)
(v : List.TProd α l)

List.TProd.mk l (List.TProd.elim' h v) = v


protected theorem map_eq_mapAccumr :
    map f xs = (mapAccumr (fun x (_ : Unit) ↦ ((), f x)) xs ()).snd

{α : Type u_2}
{n : ℕ}
{xs : Mathlib.Vector α n}

∀ {α_1 : Type u_1} {f : α → α_1}, Mathlib.Vector.map f xs = (Mathlib.Vector.mapAccumr (fun x x_1 => ((), f x)) xs ()).2


@[simp, norm_cast]
theorem coe_mul_unitClosedBall [NonUnitalSeminormedRing 𝕜] (x y : closedBall (0 : 𝕜) 1) :
    ↑(x * y) = (x * y : 𝕜)

{𝕜 : Type u_1}
[NonUnitalSeminormedRing 𝕜]
(x y : ↑(Metric.closedBall 0 1))


/-- A product can be partitioned into a product of products, each equivalent under a setoid. -/
@[to_additive "A sum can be partitioned into a sum of sums, each equivalent under a setoid."]
theorem prod_partition (R : Setoid α) [DecidableRel R.r] :
    ∏ x ∈ s, f x = ∏ xbar ∈ s.image Quotient.mk'', ∏ y ∈ s.filter (⟦·⟧ = xbar), f y

{α : Type u_3}
{β : Type u_4}
{s : Finset α}
{f : α → β}
[AddCommMonoid β]
(R : Setoid α)
[DecidableRel Setoid.r]

∑ x ∈ s, f x = ∑ xbar ∈ Finset.image Quotient.mk'' s, ∑ y ∈ Finset.filter (fun x => ⟦x⟧ = xbar) s, f y


@[simp]
theorem mem_substructureReduct {x : M} {S : L'.Substructure M} :
    x ∈ φ.substructureReduct S ↔ x ∈ S

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


theorem affineSpan_eq_top_of_nonempty_interior {s : Set V}
    (hs : (interior <| convexHull ℝ s).Nonempty) : affineSpan ℝ s = ⊤

(hs : (interior ((convexHull ℝ) s)).Nonempty)


@[simp]
theorem mk''_eq_coe (l : List α) : Quotient.mk'' l = (l : Cycle α)


/-- If `f` has a computable right-inverse, then the quotient by its kernel is equivalent to its
domain. -/
@[simps]
def quotientKerEquivOfRightInverse (g : β → α) (hf : Function.RightInverse g f) :
    Quotient (ker f) ≃ β

{α : Type u_1}
{β : Type u_2}
(f : α → β)
(g : β → α)
(hf : Function.RightInverse g f)
(a : Quotient (Setoid.ker f))

(Setoid.quotientKerEquivOfRightInverse f g hf) a = a.liftOn' f ⋯


theorem isCauSeq_abs {f : ℕ → ℂ} (hf : IsCauSeq Complex.abs f) :
    IsCauSeq abs' (Complex.abs ∘ f)

{f : ℕ → ℂ}
(hf : IsCauSeq (⇑Complex.abs) f)


@[simp]
theorem pred_eq_pred_iff : pred a = pred b ↔ a = b

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a b : α}
[NoMinOrder α]


/-- A functor `G : C ⥤ D` sends bicones over `F` to bicones over `G.obj ∘ F` functorially. -/
@[simps]
def functoriality (G : C ⥤ D) [Functor.PreservesZeroMorphisms G] :
    Bicone F ⥤ Bicone (G.obj ∘ F)

((CategoryTheory.Limits.Bicones.functoriality F G).obj A).pt = G.obj A.pt


@[parity_simps] lemma even_add_one : Even (n + 1) ↔ ¬Even n


@[simp]
theorem domRestrict_apply (f : M →ₛₗ[σ₁₂] M₂) (p : Submodule R M) (x : p) :
    f.domRestrict p 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 R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
(f : M →ₛₗ[σ₁₂] M₂)
(p : Submodule R M)
(x : ↥p)


lemma LSeries.convolution_one_eq_convolution_zeta {R : Type*} [Semiring R] (f : ℕ → R) :
    f ⍟ (1 : ℕ → R) = f ⍟ ((ArithmeticFunction.zeta ·) : ℕ → R)

f ⍟ 1 = f ⍟ fun x => ↑(ArithmeticFunction.zeta x)


theorem bot_of_map_eq_bot {I : LieIdeal R L} (h₁ : Function.Injective f) (h₂ : I.map f = ⊥) :
    I = ⊥

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


@[to_additive IsAddUnit.exists_neg]
lemma IsUnit.exists_right_inv (h : IsUnit a) : ∃ b, a * b = 1

{M : Type u_1}
[Monoid M]
{a : M}
(h : IsUnit a)


theorem coe_T_zpow (n : ℤ) : ↑ₘ(T ^ n) = !![1, n; 0, 1]


/-- Given `f : NormedAddGroupHom G H` for some complete `G`, if every element `x` of the image of
an isometric immersion `j : NormedAddGroupHom K H` has a preimage under `f` whose norm is at most
`C*‖x‖` then the same holds for elements of the (topological) closure of this image with constant
`C+ε` instead of `C`, for any positive `ε`.
This is useful in particular if `j` is the inclusion of a normed group into its completion
(in this case the closure is the full target group).
-/
theorem controlled_closure_range_of_complete {f : NormedAddGroupHom G H} {K : Type*}
    [SeminormedAddCommGroup K] {j : NormedAddGroupHom K H} (hj : ∀ x, ‖j x‖ = ‖x‖) {C ε : ℝ}
    (hC : 0 < C) (hε : 0 < ε) (hyp : ∀ k, ∃ g, f g = j k ∧ ‖g‖ ≤ C * ‖k‖) :
    f.SurjectiveOnWith j.range.topologicalClosure (C + ε)

(hyp : ∀ (k : K), ∃ g, f g = j k ∧ ‖g‖ ≤ C * ‖k‖)


@[simp]
theorem dlookup_kunion_left {a} {l₁ l₂ : List (Sigma β)} (h : a ∈ l₁.keys) :
    dlookup a (kunion l₁ l₂) = dlookup a l₁

{α : Type u}
{β : α → Type v}
[DecidableEq α]
{a : α}
{l₁ l₂ : List (Sigma β)}
(h : a ∈ l₁.keys)

List.dlookup a (l₁.kunion l₂) = List.dlookup a l₁


@[simp, nolint simpNF] -- Porting note (#11215): TODO: `simpNF` claims that
-- this lemma doesn't simplify LHS
theorem measurableSet_inf {m₁ m₂ : MeasurableSpace α} {s : Set α} :
    MeasurableSet[m₁ ⊓ m₂] s ↔ MeasurableSet[m₁] s ∧ MeasurableSet[m₂] s

{α : Type u_1}
{m₁ m₂ : MeasurableSpace α}
{s : Set α}

MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s


theorem sumElim_inl_inr : LHom.sumInl.sumElim LHom.sumInr = LHom.id (L.sum L')

{L : FirstOrder.Language}
{L' : FirstOrder.Language}

FirstOrder.Language.LHom.sumInl.sumElim FirstOrder.Language.LHom.sumInr = FirstOrder.Language.LHom.id (L.sum L')


@[mono, gcongr]
theorem sdiff_subset_sdiff (hst : s ⊆ t) (hvu : v ⊆ u) : s \ u ⊆ t \ v

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


theorem IsWF.min_le_min_of_subset {hs : s.IsWF} {hsn : s.Nonempty} {ht : t.IsWF} {htn : t.Nonempty}
    (hst : s ⊆ t) : ht.min htn ≤ hs.min hsn

{α : Type u_2}
[LinearOrder α]
{s t : Set α}
{hs : s.IsWF}
{hsn : s.Nonempty}
{ht : t.IsWF}
{htn : t.Nonempty}
(hst : s ⊆ t)


@[simp]
theorem trop_smul {α : Type*} [SMul α R] (x : R) (n : α) : trop (n • x) = trop x ^ n

{R : Type u}
{α : Type u_1}
[SMul α R]
(x : R)
(n : α)

Tropical.trop (n • x) = Tropical.trop x ^ n


theorem isOpen_prod_iff {s : Set (X × Y)} :
    IsOpen s ↔ ∀ a b, (a, b) ∈ s →
      ∃ u v, IsOpen u ∧ IsOpen v ∧ a ∈ u ∧ b ∈ v ∧ u ×ˢ v ⊆ s

{X : Type u}
{Y : Type v}
[TopologicalSpace X]
[TopologicalSpace Y]
{s : Set (X × Y)}

IsOpen s ↔ ∀ (a : X) (b : Y), (a, b) ∈ s → ∃ u v, IsOpen u ∧ IsOpen v ∧ a ∈ u ∧ b ∈ v ∧ u ×ˢ v ⊆ s


lemma comp_eq_const_iff (b : β) (f : α → β) {g : β → γ} (hg : Injective g) :
    g ∘ f = Function.const _ (g b) ↔ f = Function.const _ b

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(b : β)
(f : α → β)
{g : β → γ}
(hg : Function.Injective g)

g ∘ f = Function.const α (g b) ↔ f = Function.const α b


/-- Construct an object of the category `(Δ ↓ F)` from a cone on `F`. This is part of an
    equivalence, see `Cone.equivCostructuredArrow`. -/
@[simps]
def Cone.toCostructuredArrow (F : J ⥤ C) : Cone F ⥤ CostructuredArrow (const J) F

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
(F : CategoryTheory.Functor J C)

∀ {X Y : CategoryTheory.Limits.Cone F} (f : X ⟶ Y),
  (CategoryTheory.Limits.Cone.toCostructuredArrow F).map f = CategoryTheory.CostructuredArrow.homMk f.hom ⋯


@[to_additive (attr := measurability)]
protected theorem inv [Inv β] [ContinuousInv β] (hf : StronglyMeasurable f) :
    StronglyMeasurable f⁻¹

(hf : MeasureTheory.StronglyMeasurable f)


theorem SurjOn.union (h₁ : SurjOn f s t₁) (h₂ : SurjOn f s t₂) : SurjOn f s (t₁ ∪ t₂)

{α : Type u_1}
{β : Type u_2}
{s : Set α}
{t₁ t₂ : Set β}
{f : α → β}
(h₁ : Set.SurjOn f s t₁)
(h₂ : Set.SurjOn f s t₂)


@[simp]
theorem toMul_symm_eq : (@toMul α).symm = ofMul


/-- Right unit cancellation `X ⊗ 1 ≅ X` in `Dial C`. -/
@[simps!] def rightUnitor (X : Dial C) : tensorObj X tensorUnit ≅ X

X.rightUnitor.hom.F =
  CategoryTheory.Limits.prod.lift CategoryTheory.Limits.prod.snd
    (CategoryTheory.Limits.terminal.from ((X.src ⨯ ⊤_ C) ⨯ X.tgt))


lemma chainBotCoeff_le_chainLength : chainBotCoeff α β ≤ chainLength α β

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

LieModule.chainBotCoeff (⇑α) β ≤ LieAlgebra.IsKilling.chainLength α β


lemma convexHull_vadd (x : E) (s : Set E) : convexHull 𝕜 (x +ᵥ s) = x +ᵥ convexHull 𝕜 s

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedRing 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
(x : E)
(s : Set E)

(convexHull 𝕜) (x +ᵥ s) = x +ᵥ (convexHull 𝕜) s


theorem IsPushout.map_iff {D : Type*} [Category D] (F : C ⥤ D) [PreservesColimit (span f g) F]
    [ReflectsColimit (span f g) F] (e : f ≫ h = g ≫ i) :
    IsPushout (F.map f) (F.map g) (F.map h) (F.map i) ↔ IsPushout f g h i

[CategoryTheory.Limits.PreservesColimit (CategoryTheory.Limits.span f g) F]

[CategoryTheory.Limits.ReflectsColimit (CategoryTheory.Limits.span f g) F]

CategoryTheory.IsPushout (F.map f) (F.map g) (F.map h) (F.map i) ↔ CategoryTheory.IsPushout f g h i


theorem _root_.MeasureTheory.Integrable.integral_condDistrib (hX : AEMeasurable X μ)
    (hY : AEMeasurable Y μ) (hf_int : Integrable f (μ.map fun a => (X a, Y a))) :
    Integrable (fun a => ∫ y, f (X a, y) ∂condDistrib Y X μ (X a)) μ

(hf_int : MeasureTheory.Integrable f (MeasureTheory.Measure.map (fun a => (X a, Y a)) μ))

MeasureTheory.Integrable (fun a => ∫ (y : Ω), f (X a, y) ∂(ProbabilityTheory.condDistrib Y X μ) (X a)) μ


/-- Left-regular multiplication on `R` is equivalent to `R`-regularity of `R` itself. -/
theorem isLeftRegular_iff [Mul R] {a : R} : IsLeftRegular a ↔ IsSMulRegular R a


@[to_additive]
theorem comap_sup_comap_le (H K : Subgroup N) (f : G →* N) :
    comap f H ⊔ comap f K ≤ comap f (H ⊔ K)

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(H K : Subgroup N)
(f : G →* N)

Subgroup.comap f H ⊔ Subgroup.comap f K ≤ Subgroup.comap f (H ⊔ K)


lemma map_prod_map {α' : Type*} [MeasurableSpace α'] {β' : Type*} [MeasurableSpace β']
    {f : α → α'} {g : β → β'}  (f_mble : Measurable f) (g_mble : Measurable g) :
    (μ.map f).prod (ν.map g) = (μ.prod ν).map (Prod.map f g)

{α : Type u_1}
[MeasurableSpace α]
{β : Type u_2}
[MeasurableSpace β]
(μ : MeasureTheory.FiniteMeasure α)
(ν : MeasureTheory.FiniteMeasure β)
{α' : Type u_3}
[MeasurableSpace α']
{β' : Type u_4}
[MeasurableSpace β']
{f : α → α'}
{g : β → β'}
(f_mble : Measurable f)
(g_mble : Measurable g)


theorem continuousOn_face_Icc {X} [TopologicalSpace X] {n} {f : (Fin (n + 1) → ℝ) → X}
    {I : Box (Fin (n + 1))} (h : ContinuousOn f (Box.Icc I)) {i : Fin (n + 1)} {x : ℝ}
    (hx : x ∈ Icc (I.lower i) (I.upper i)) :
    ContinuousOn (f ∘ i.insertNth x) (Box.Icc (I.face i))

(h : ContinuousOn f (BoxIntegral.Box.Icc I))

(hx : x ∈ Set.Icc (I.lower i) (I.upper i))

ContinuousOn (f ∘ i.insertNth x) (BoxIntegral.Box.Icc (I.face i))


@[simp]
theorem top_left (X : C) : ((⊤ : MonoOver X) : C) = X

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


/-- If a function has a finite power series on a ball, then so does its derivative. -/
protected theorem HasFiniteFPowerSeriesOnBall.fderiv
    (h : HasFiniteFPowerSeriesOnBall f p x (n + 1) r) :
    HasFiniteFPowerSeriesOnBall (fderiv 𝕜 f) p.derivSeries x n r


theorem hasStrictDerivAt_arsinh (x : ℝ) : HasStrictDerivAt arsinh (√(1 + x ^ 2))⁻¹ x

HasStrictDerivAt Real.arsinh (√(1 + x ^ 2))⁻¹ x


theorem exists_rat_lt (x : α) : ∃ q : ℚ, (q : α) < x

{α : Type u_1}
[LinearOrderedField α]
[Archimedean α]
(x : α)


@[to_additive]
theorem center_le_centralizer (S) : center M ≤ centralizer S

{M : Type u_1}
[AddSemigroup M]
(S : Set M)

AddSubsemigroup.center M ≤ AddSubsemigroup.centralizer S


@[simp]
theorem cliqueFinset_eq_empty_iff : G.cliqueFinset n = ∅ ↔ G.CliqueFree n

{α : Type u_1}
{G : SimpleGraph α}
[Fintype α]
[DecidableEq α]
[DecidableRel G.Adj]
{n : ℕ}


@[reassoc (attr := simp)]
theorem δ_naturality {X' X : SimplicialObject C} (f : X ⟶ X') {n : ℕ} (i : Fin (n + 2)) :
    X.δ i ≫ f.app (op [n]) = f.app (op [n + 1]) ≫ X'.δ i

{X' X : CategoryTheory.SimplicialObject C}

X.δ i ≫ f.app (Opposite.op (SimplexCategory.mk n)) = f.app (Opposite.op (SimplexCategory.mk (n + 1))) ≫ X'.δ i


@[simp]
theorem preimage_emetric_closedBall (h : α ≃ᵢ β) (x : β) (r : ℝ≥0∞) :
    h ⁻¹' EMetric.closedBall x r = EMetric.closedBall (h.symm x) r

{α : Type u}
{β : Type v}
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]
(h : α ≃ᵢ β)
(x : β)
(r : ℝ≥0∞)

⇑h ⁻¹' EMetric.closedBall x r = EMetric.closedBall (h.symm x) r


@[simp]
theorem gcd_union (s₁ s₂ : Multiset α) : (s₁ ∪ s₂).gcd = GCDMonoid.gcd s₁.gcd s₂.gcd

{α : Type u_1}
[CancelCommMonoidWithZero α]
[NormalizedGCDMonoid α]
[DecidableEq α]
(s₁ s₂ : Multiset α)


theorem integral_compProd :
    ∀ {f : β × γ → E} (_ : Integrable f ((κ ⊗ₖ η) a)),
      ∫ z, f z ∂(κ ⊗ₖ η) a = ∫ x, ∫ y, f (x, y) ∂η (a, x) ∂κ a

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

MeasureTheory.Integrable f ((κ ⊗ₖ η) a) → ∫ (z : β × γ), f z ∂(κ ⊗ₖ η) a = ∫ (x : β), ∫ (y : γ), f (x, y) ∂η (a, x) ∂κ a


theorem lintegral_comp [MeasurableSpace β] {f : β → ℝ≥0∞} {g : α → β} (hf : Measurable f)
    (hg : Measurable g) : lintegral μ (f ∘ g) = ∫⁻ a, f a ∂map g μ

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

MeasureTheory.lintegral μ (f ∘ g) = ∫⁻ (a : β), f a ∂MeasureTheory.Measure.map g μ


theorem tan_pi_div_two_sub (x : ℂ) : tan (π / 2 - x) = (tan x)⁻¹

Complex.tan (↑Real.pi / 2 - x) = (Complex.tan x)⁻¹


@[simp]
theorem supIndep_pair [DecidableEq ι] {i j : ι} (hij : i ≠ j) :
    ({i, j} : Finset ι).SupIndep f ↔ Disjoint (f i) (f j)

{α : Type u_1}
{ι : Type u_3}
[Lattice α]
[OrderBot α]
{f : ι → α}
[DecidableEq ι]
{i j : ι}
(hij : i ≠ j)

{i, j}.SupIndep f ↔ Disjoint (f i) (f j)


/-- The counit isomorphism of the equivalence -/
@[simps]
def counitIso : inverse C ⋙ toKaroubi (Karoubi C) ≅ 𝟭 (Karoubi (Karoubi C))

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

((CategoryTheory.Idempotents.KaroubiKaroubi.counitIso C).inv.app P).f.f = P.p.f


/-- A natural isomorphism between the functor `map (𝟭 C)` and `𝟭 (WithTerminal C)`. -/
@[simps!]
def mapId (C : Type*) [Category C] : map (𝟭 C) ≅ 𝟭 (WithTerminal C)

(C : Type u_1)
[CategoryTheory.Category.{u_2, u_1} C]
(X : CategoryTheory.WithTerminal C)

(CategoryTheory.WithTerminal.mapId C).hom.app X =
  (match X with
    | CategoryTheory.WithTerminal.of x => CategoryTheory.Iso.refl (CategoryTheory.WithTerminal.of x)
    | CategoryTheory.WithTerminal.star => CategoryTheory.Iso.refl CategoryTheory.WithTerminal.star).hom


theorem Basis.basis_restrict_of_subset (hI : M.Basis I X) (hXY : X ⊆ Y) : (M ↾ Y).Basis I X

{α : Type u_1}
{M : Matroid α}
{I X Y : Set α}
(hI : M.Basis I X)
(hXY : X ⊆ Y)


theorem norm_integral_le_of_norm_le {f : α → G} {g : α → ℝ} (hg : Integrable g μ)
    (h : ∀ᵐ x ∂μ, ‖f x‖ ≤ g x) : ‖∫ x, f x ∂μ‖ ≤ ∫ x, g x ∂μ

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
[NormedSpace ℝ G]
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → G}
{g : α → ℝ}
(hg : MeasureTheory.Integrable g μ)
(h : ∀ᵐ (x : α) ∂μ, ‖f x‖ ≤ g x)


theorem reduce_v : ∀ u : XgcdType, u.reduce.v = u.v


theorem Ici_prod (x : α × β) : Ici x = Ici x.1 ×ˢ Ici x.2

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(x : α × β)

UpperSet.Ici x = UpperSet.Ici x.1 ×ˢ UpperSet.Ici x.2


@[simp]
theorem swap_inf [Inf α] [Inf β] (p q : α × β) : (p ⊓ q).swap = p.swap ⊓ q.swap

(α : Type u)
(β : Type v)
[Inf α]
[Inf β]
(p q : α × β)


@[simp]
theorem sup_fst (c d : Concept α β r) : (c ⊔ d).fst = extentClosure r (c.snd ∩ d.snd)

{α : Type u_2}
{β : Type u_3}
{r : α → β → Prop}
(c d : Concept α β r)

(c ⊔ d).toProd.1 = extentClosure r (c.toProd.2 ∩ d.toProd.2)


lemma NonUnitalStarRingHom.map_le_map_of_map_star (f : R →⋆ₙ+* S) {x y : R} (hxy : x ≤ y) :
    f x ≤ f y

{R : Type u_2}
{S : Type u_3}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
[NonUnitalSemiring S]
[PartialOrder S]
[StarRing S]
[StarOrderedRing S]
(f : R →⋆ₙ+* S)
{x y : R}
(hxy : x ≤ y)


/-- If `f b = 1` for all `b ∈ t`, then the product of `f a` with `a ∈ s` is the same as the
product of `f a` with `a ∈ s ∖ t`. -/
@[to_additive "If `f b = 0` for all `b ∈ t`, then the sum of `f a` with `a ∈ s` is the same as the
sum of `f a` with `a ∈ s ∖ t`."]
lemma tprod_setElem_eq_tprod_setElem_diff {f : β → α} (s t : Set β)
    (hf₀ : ∀ b ∈ t, f b = 1) :
    ∏' a : s, f a = ∏' a : (s \ t : Set β), f a

{α : Type u_1}
{β : Type u_2}
[CommMonoid α]
[TopologicalSpace α]
{f : β → α}
(s t : Set β)
(hf₀ : ∀ b ∈ t, f b = 1)

∏' (a : ↑s), f ↑a = ∏' (a : ↑(s \ t)), f ↑a


lemma LeftHomologyMapData.quasiIso_map_iff
    [(F.mapShortComplex.obj S₁).HasHomology]
    [(F.mapShortComplex.obj S₂).HasHomology]
    [hl₁.IsPreservedBy F] [hl₂.IsPreservedBy F] :
    QuasiIso (F.mapShortComplex.map φ) ↔ IsIso (F.map ψl.φH)

(ψl : CategoryTheory.ShortComplex.LeftHomologyMapData φ hl₁ hl₂)

CategoryTheory.ShortComplex.QuasiIso (F.mapShortComplex.map φ) ↔ CategoryTheory.IsIso (F.map ψl.φH)


theorem norm_integral_le_of_norm_le_const {a b C : ℝ} {f : ℝ → E} (h : ∀ x ∈ Ι a b, ‖f x‖ ≤ C) :
    ‖∫ x in a..b, f x‖ ≤ C * |b - a|

{E : Type u_3}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{a b C : ℝ}
{f : ℝ → E}
(h : ∀ x ∈ Ι a b, ‖f x‖ ≤ C)


theorem sum_apply₀ (f : ι → Measure α) {s : Set α} (hs : NullMeasurableSet s (sum f)) :
    sum f s = ∑' i, f i s

(hs : MeasureTheory.NullMeasurableSet s (MeasureTheory.Measure.sum f))

(MeasureTheory.Measure.sum f) s = ∑' (i : ι), (f i) s


/-- Lift a monoid homomorphism `f : G →* Function.End α` to a monoid homomorphism
`f : G →* Equiv.Perm α`. -/
@[simps!]
def _root_.MonoidHom.toHomPerm {G : Type*} [Group G] (f : G →* Function.End α) : G →* Perm α

{α : Type u}
{G : Type u_1}
[Group G]
(f : G →* Function.End α)


@[continuity, fun_prop]
theorem Continuous.zpow₀ (hf : Continuous f) (m : ℤ) (h0 : ∀ a, f a ≠ 0 ∨ 0 ≤ m) :
    Continuous fun x => f x ^ m

{G₀ : Type u_3}
[GroupWithZero G₀]
[TopologicalSpace G₀]
[HasContinuousInv₀ G₀]
[ContinuousMul G₀]
{X : Type u_4}
[TopologicalSpace X]
{f : X → G₀}
(hf : Continuous f)
(m : ℤ)
(h0 : ∀ (a : X), f a ≠ 0 ∨ 0 ≤ m)


/-- An orthogonal family forms an independent family of subspaces; that is, any collection of
elements each from a different subspace in the family is linearly independent. In particular, the
pairwise intersections of elements of the family are 0. -/
theorem OrthogonalFamily.independent {V : ι → Submodule 𝕜 E}
    (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) :
    CompleteLattice.Independent V

(hV : OrthogonalFamily 𝕜 (fun i => ↥(V i)) fun i => (V i).subtypeₗᵢ)


/-- A property of ring homs is local if it is preserved by localizations and compositions, and for
each `{ r }` that spans `S`, we have `P (R →+* S) ↔ ∀ r, P (R →+* Sᵣ)`. -/
structure RingHom.PropertyIsLocal : Prop where
  LocalizationPreserves : RingHom.LocalizationPreserves @P
  OfLocalizationSpanTarget : RingHom.OfLocalizationSpanTarget @P
  StableUnderComposition : RingHom.StableUnderComposition @P
  HoldsForLocalizationAway : RingHom.HoldsForLocalizationAway @P

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


/-- Coercing a `Matrix.SpecialLinearGroup` via `GL_pos` and `GL` is the same as coercing straight to
a matrix. -/
@[simp]
theorem coe_GLPos_coe_GL_coe_matrix (g : SpecialLinearGroup n R) :
    (↑(↑(↑g : GLPos n R) : GL n R) : Matrix n n R) = ↑g

{n : Type u}
[DecidableEq n]
[Fintype n]
{R : Type v}
[LinearOrderedCommRing R]
(g : Matrix.SpecialLinearGroup n R)

↑↑(Matrix.SpecialLinearGroup.toGLPos g) = ↑g


theorem bind₂_monomial (f : R →+* MvPolynomial σ S) (d : σ →₀ ℕ) (r : R) :
    bind₂ f (monomial d r) = f r * monomial d 1

{σ : Type u_1}
{R : Type u_3}
{S : Type u_4}
[CommSemiring R]
[CommSemiring S]
(f : R →+* MvPolynomial σ S)
(d : σ →₀ ℕ)
(r : R)

(MvPolynomial.bind₂ f) ((MvPolynomial.monomial d) r) = f r * (MvPolynomial.monomial d) 1


lemma negOnePow_eq_iff (n₁ n₂ : ℤ) :
    n₁.negOnePow = n₂.negOnePow ↔ Even (n₁ - n₂)


/-- A Fraïssé class is a nonempty, isomorphism-invariant, essentially countable class of structures
satisfying the hereditary, joint embedding, and amalgamation properties. -/
class IsFraisse : Prop where
  is_nonempty : K.Nonempty
  FG : ∀ M : Bundled.{w} L.Structure, M ∈ K → Structure.FG L M
  is_equiv_invariant : ∀ M N : Bundled.{w} L.Structure, Nonempty (M ≃[L] N) → (M ∈ K ↔ N ∈ K)
  is_essentially_countable : (Quotient.mk' '' K).Countable
  hereditary : Hereditary K
  jointEmbedding : JointEmbedding K
  amalgamation : Amalgamation K

{K : Set (CategoryTheory.Bundled L.Structure)}

[self : FirstOrder.Language.IsFraisse K]

(M : CategoryTheory.Bundled L.Structure)

M ∈ K → FirstOrder.Language.Structure.FG L ↑M


@[to_additive]
theorem ciSup_div (hf : BddAbove (range f)) (a : G) : (⨆ i, f i) / a = ⨆ i, f i / a

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


theorem ncard_strictMono [Finite α] : @StrictMono (Set α) _ _ _ ncard


/--
The functor taking `(E : ℰ) (c : Cᵒᵖ)` to the homset `(A.obj C ⟶ E)`. It is shown in `L_adjunction`
that this functor has a left adjoint (provided `E` has colimits) given by taking colimits over
categories of elements.
In the case where `ℰ = Cᵒᵖ ⥤ Type u` and `A = yoneda`, this functor is isomorphic to the identity.

Defined as in [MM92], Chapter I, Section 5, Theorem 2.
-/
@[simps!]
def restrictedYoneda : ℰ ⥤ Cᵒᵖ ⥤ Type v₁

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{ℰ : Type u₂}
[CategoryTheory.Category.{v₁, u₂} ℰ]
(A : CategoryTheory.Functor C ℰ)

∀ {X Y : ℰ} (f : X ⟶ Y) (X_1 : Cᵒᵖ) (a : (CategoryTheory.yoneda.obj X).obj (A.op.obj X_1)),
  ((CategoryTheory.Presheaf.restrictedYoneda A).map f).app X_1 a = CategoryTheory.CategoryStruct.comp a f


/-- If `X` is a zero object, `Y ≅ X ⊞ Y` for any `Y`. -/
@[simps]
def isoZeroBiprod {X Y : C} [HasBinaryBiproduct X Y] (hY : IsZero X) : Y ≅ X ⊞ Y

(CategoryTheory.Limits.isoZeroBiprod hY).inv = CategoryTheory.Limits.biprod.snd


@[simp]
theorem untop'_coe {α} (d x : α) : untop' d x = x


theorem integral_re_add_im {f : X → 𝕜} (hf : Integrable f μ) :
    ((∫ x, RCLike.re (f x) ∂μ : ℝ) : 𝕜) + (∫ x, RCLike.im (f x) ∂μ : ℝ) * RCLike.I =
      ∫ x, f x ∂μ

{X : Type u_1}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{𝕜 : Type u_5}
[RCLike 𝕜]
{f : X → 𝕜}
(hf : MeasureTheory.Integrable f μ)

↑(∫ (x : X), RCLike.re (f x) ∂μ) + ↑(∫ (x : X), RCLike.im (f x) ∂μ) * RCLike.I = ∫ (x : X), f x ∂μ


lemma lift_snd :
    (Cochain.ofHom (lift φ α β eq)).comp (snd φ) (zero_add 0) = β

(α : CochainComplex.HomComplex.Cocycle K F 1)

(β : CochainComplex.HomComplex.Cochain K G 0)

(eq : CochainComplex.HomComplex.δ 0 1 β + (↑α).comp (CochainComplex.HomComplex.Cochain.ofHom φ) ⋯ = 0)

(CochainComplex.HomComplex.Cochain.ofHom (CochainComplex.mappingCone.lift φ α β eq)).comp
    (CochainComplex.mappingCone.snd φ) ⋯ =
  β


theorem not_infinite_of_exists_st {x : ℝ*} : (∃ r : ℝ, IsSt x r) → ¬Infinite x


@[to_additive LipschitzWith.norm_le_mul]
theorem LipschitzWith.norm_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‖


theorem upperCentralSeries_eq_top_iff_nilpotencyClass_le {n : ℕ} :
    upperCentralSeries G n = ⊤ ↔ Group.nilpotencyClass G ≤ n

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