@[simp]
theorem map_comp_comulAlgHom (f : F) :
    (Algebra.TensorProduct.map f f).comp (comulAlgHom R A) = (comulAlgHom R B).comp f

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
{F : Type u_4}
[CommSemiring R]
[Semiring A]
[Bialgebra R A]
[Semiring B]
[Bialgebra R B]
[FunLike F A B]
[BialgHomClass F R A B]
(f : F)

(Algebra.TensorProduct.map ↑f ↑f).comp (Bialgebra.comulAlgHom R A) = (Bialgebra.comulAlgHom R B).comp ↑f


theorem foldl_map' {α β : Type u} (g : α → β) (f : α → α → α) (f' : β → β → β) (a : α) (l : List α)
    (h : ∀ x y, f' (g x) (g y) = g (f x y)) :
    (l.map g).foldl f' (g a) = g (l.foldl f a)

(f : α → α → α)

(f' : β → β → β)

List.foldl f' (g a) (List.map g l) = g (List.foldl f a l)


theorem iSup_inf_eq (f : ι → α) (a : α) : (⨆ i, f i) ⊓ a = ⨆ i, f i ⊓ a

{α : Type u}
{ι : Sort w}
[Order.Frame α]
(f : ι → α)
(a : α)


theorem mem_piiUnionInter_of_measurableSet (m : ι → MeasurableSpace α) {S : Set ι} {i : ι}
    (hiS : i ∈ S) (s : Set α) (hs : MeasurableSet[m i] s) :
    s ∈ piiUnionInter (fun n => { s | MeasurableSet[m n] s }) S

{α : Type u_1}
{ι : Type u_2}
(m : ι → MeasurableSpace α)
{S : Set ι}
{i : ι}
(hiS : i ∈ S)
(s : Set α)
(hs : MeasurableSet s)

s ∈ piiUnionInter (fun n => {s | MeasurableSet s}) S


theorem list_get? : Primrec₂ (@List.get? α)


@[simp]
theorem sigmaCurry_zero [∀ i j, Zero (δ i j)] :
    sigmaCurry (0 : Π₀ (i : Σ _, _), δ i.1 i.2) = 0

{ι : Type u}
[DecidableEq ι]
{α : ι → Type u_2}
{δ : (i : ι) → α i → Type v}
[(i : ι) → (j : α i) → Zero (δ i j)]


@[fun_prop]
theorem HasFDerivAt.clm_apply (hc : HasFDerivAt c c' x) (hu : HasFDerivAt u u' x) :
    HasFDerivAt (fun y => (c y) (u y)) ((c x).comp u' + c'.flip (u x)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{G : Type u_4}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{x : E}
{H : Type u_6}
[NormedAddCommGroup H]
[NormedSpace 𝕜 H]
{c : E → G →L[𝕜] H}
{c' : E →L[𝕜] G →L[𝕜] H}
{u : E → G}
{u' : E →L[𝕜] G}
(hc : HasFDerivAt c c' x)
(hu : HasFDerivAt u u' x)


/-- The cardinality of the antidiagonal of `n` is `n+1`. -/
@[simp]
theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1

Multiset.card (Multiset.Nat.antidiagonal n) = n + 1


theorem not_measurable (v : VectorMeasure α M) {i : Set α} (hi : ¬MeasurableSet i) : v i = 0

{α : Type u_1}
{m : MeasurableSpace α}
{M : Type u_3}
[AddCommMonoid M]
[TopologicalSpace M]
(v : MeasureTheory.VectorMeasure α M)
{i : Set α}
(hi : ¬MeasurableSet i)


theorem changeForm_self_apply (x : CliffordAlgebra Q) : changeForm (Q' := Q)
    changeForm.zero_proof x = x

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{Q : QuadraticForm R M}
(x : CliffordAlgebra Q)


lemma essFiniteType_iff_exists_subalgebra : EssFiniteType R S ↔
    ∃ (S₀ : Subalgebra R S) (M : Submonoid S₀), FiniteType R S₀ ∧ IsLocalization M S

(R : Type u_1)
(S : Type u_2)
[CommRing R]
[CommRing S]
[Algebra R S]

Algebra.EssFiniteType R S ↔ ∃ S₀ M, Algebra.FiniteType R ↥S₀ ∧ IsLocalization M S


/-- We now define a long list of structures on ℕ+ induced by
 similar structures on ℕ. Most of these behave in a completely
 obvious way, but there are a few things to be said about
 subtraction, division and powers.
-/
-- Porting note: no `simp`  because simp can prove it
theorem mk_le_mk (n k : ℕ) (hn : 0 < n) (hk : 0 < k) : (⟨n, hn⟩ : ℕ+) ≤ ⟨k, hk⟩ ↔ n ≤ k


@[simp]
theorem mk_coe (S : Set L) (h₁ h₂ h₃ h₄) :
    ((⟨⟨⟨⟨S, h₁⟩, h₂⟩, h₃⟩, h₄⟩ : LieSubalgebra R L) : Set L) = S

(h₁ : ∀ {a b : L}, a ∈ S → b ∈ S → a + b ∈ S)

(h₃ :
  ∀ (c : R) {x : L},
    x ∈ { carrier := S, add_mem' := h₁, zero_mem' := h₂ }.carrier →
      c • x ∈ { carrier := S, add_mem' := h₁, zero_mem' := h₂ }.carrier)

(h₄ :
  ∀ {x y : L},
    x ∈ { carrier := S, add_mem' := h₁, zero_mem' := h₂, smul_mem' := h₃ }.carrier →
      y ∈ { carrier := S, add_mem' := h₁, zero_mem' := h₂, smul_mem' := h₃ }.carrier →
        ⁅x, y⁆ ∈ { carrier := S, add_mem' := h₁, zero_mem' := h₂, smul_mem' := h₃ }.carrier)

↑{ carrier := S, add_mem' := h₁, zero_mem' := h₂, smul_mem' := h₃, lie_mem' := h₄ } = S


@[to_additive (attr := simp, norm_cast)]
theorem coe_pow (x : H) (n : ℕ) : ((x ^ n : H) : G) = (x : G) ^ n

{G : Type u_1}
[Group G]
{S : Type u_6}
{H : S}
[SetLike S G]
[SubgroupClass S G]
(x : ↥H)
(n : ℕ)


@[simp]
theorem rank_real_complex : Module.rank ℝ ℂ = 2


/-- If `K / E / F` is a field extension tower, such that `E / F` is separable, then
`separableClosure F K` is equal to `separableClosure E K`. -/
theorem separableClosure.eq_restrictScalars_of_isSeparable [Algebra E K] [IsScalarTower F E K]
    [Algebra.IsSeparable F E] : separableClosure F K = (separableClosure E K).restrictScalars F

(F : Type u)
(E : Type v)
[Field F]
[Field E]
[Algebra F E]
(K : Type w)
[Field K]
[Algebra F K]
[Algebra E K]
[IsScalarTower F E K]
[Algebra.IsSeparable F E]

separableClosure F K = IntermediateField.restrictScalars F (separableClosure E K)


protected lemma AddContent.ext_iff (m m' : AddContent C) : m = m' ↔ ∀ s, m s = m' s

{α : Type u_1}
{C : Set (Set α)}
(m m' : MeasureTheory.AddContent C)


theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / √x) { x | exp 2 ≤ x }

AntitoneOn (fun x => Real.log x / √x) {x | Real.exp 2 ≤ x}


/-- Partial homeomorphisms, defined on open subsets of the space -/
-- Porting note(#5171): this linter isn't ported yet. @[nolint has_nonempty_instance]
structure PartialHomeomorph (X : Type*) (Y : Type*) [TopologicalSpace X]
  [TopologicalSpace Y] extends PartialEquiv X Y where
  open_source : IsOpen source
  open_target : IsOpen target
  continuousOn_toFun : ContinuousOn toFun source
  continuousOn_invFun : ContinuousOn invFun target

{X : Type u_7}
{Y : Type u_8}
[TopologicalSpace X]
[TopologicalSpace Y]
(self : PartialHomeomorph X Y)


protected theorem Periodic.zsmul [AddGroup α] (h : Periodic f c) (n : ℤ) : Periodic f (n • c)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c : α}
[AddGroup α]
(h : Function.Periodic f c)
(n : ℤ)


theorem Dvd.intro_left (c : α) (h : c * a = b) : a ∣ b

{α : Type u_1}
[CommSemigroup α]
{a b : α}
(c : α)
(h : c * a = b)


@[to_additive]
theorem elim_mul_mul [Mul γ] : Sum.elim (a * a') (b * b') = Sum.elim a b * Sum.elim a' b'

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(a a' : α → γ)
(b b' : β → γ)
[Mul γ]


theorem Periodic.zsmul_sub_eq [AddCommGroup α] (h : Periodic f c) (n : ℤ) :
    f (n • c - x) = f (-x)

{α : Type u_1}
{β : Type u_2}
{f : α → β}
{c x : α}
[AddCommGroup α]
(h : Function.Periodic f c)
(n : ℤ)


/-- Change a `Cone F` into a `Cocone F.op`. -/
@[simps]
def Cone.op (c : Cone F) : Cocone F.op

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{F : J ⥤ C}
(c : CategoryTheory.Limits.Cone F)


theorem div_sign : ∀ a b, a.div (sign b) = a * sign b


theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0)

(hf : MeasureTheory.LocallyIntegrable f μ)

∀ᵐ (x : α) ∂μ, Filter.Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0)


/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
with the same Lipschitz constant `K`. Then it is continuous on `s × t`.

The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
instead of continuity of `f` on subsets of the product space. -/
theorem continuousOn_prod_of_continuousOn_lipschitzOnWith [PseudoEMetricSpace α]
    [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
    (ha : ∀ a ∈ s, ContinuousOn (fun y => f (a, y)) t)
    (hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t)

(f : α × β → γ)


theorem Filter.HasBasis.equicontinuousWithinAt_iff_left {p : κ → Prop} {s : κ → Set X}
    {F : ι → X → α} {S : Set X} {x₀ : X} (hX : (𝓝[S] x₀).HasBasis p s) :
    EquicontinuousWithinAt F S x₀ ↔ ∀ U ∈ 𝓤 α, ∃ k, p k ∧ ∀ x ∈ s k, ∀ i, (F i x₀, F i x) ∈ U

{ι : Type u_1}
{κ : Type u_2}
{X : Type u_3}
{α : Type u_7}
[tX : TopologicalSpace X]
[uα : UniformSpace α]
{p : κ → Prop}
{s : κ → Set X}
{F : ι → X → α}
{S : Set X}
{x₀ : X}
(hX : (nhdsWithin x₀ S).HasBasis p s)

EquicontinuousWithinAt F S x₀ ↔ ∀ U ∈ uniformity α, ∃ k, p k ∧ ∀ x ∈ s k, ∀ (i : ι), (F i x₀, F i x) ∈ U


@[simp]
theorem insertRec_empty {C : AList β → Sort*} (H0 : C ∅)
    (IH : ∀ (a : α) (b : β a) (l : AList β), a ∉ l → C l → C (l.insert a b)) :
    @insertRec α β _ C H0 IH ∅ = H0

(IH : (a : α) → (b : β a) → (l : AList β) → a ∉ l → C l → C (AList.insert a b l))


@[to_additive]
theorem inter_smul_subset : (s₁ ∩ s₂) • t ⊆ s₁ • t ∩ s₂ • t

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{s₁ s₂ : Set α}
{t : Set β}


@[simp]
theorem append_inj_left {s s' : Sym α n} (t : Sym α n') : s.append t = s'.append t ↔ s = s'

{α : Type u_1}
{n n' : ℕ}
{s s' : Sym α n}
(t : Sym α n')


@[simp]
nonrec theorem lintegral_zero : lintegral (0 : α →ₘ[μ] ℝ≥0∞) = 0

{α : Type u_1}
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}


/-- A satellite configuration is a configuration of `N+1` points that shows up in the inductive
construction for the Besicovitch covering theorem. It depends on some parameter `τ ≥ 1`.

This is a family of balls (indexed by `i : Fin N.succ`, with center `c i` and radius `r i`) such
that the last ball intersects all the other balls (condition `inter`),
and given any two balls there is an order between them, ensuring that the first ball does not
contain the center of the other one, and the radius of the second ball can not be larger than
the radius of the first ball (up to a factor `τ`). This order corresponds to the order of choice
in the inductive construction: otherwise, the second ball would have been chosen before.
This is the condition `h`.

Finally, the last ball is chosen after all the other ones, meaning that `h` can be strengthened
by keeping only one side of the alternative in `hlast`.
-/
structure Besicovitch.SatelliteConfig (α : Type*) [MetricSpace α] (N : ℕ) (τ : ℝ) where
  c : Fin N.succ → α
  r : Fin N.succ → ℝ
  rpos : ∀ i, 0 < r i
  h : Pairwise fun i j =>
    r i ≤ dist (c i) (c j) ∧ r j ≤ τ * r i ∨ r j ≤ dist (c j) (c i) ∧ r i ≤ τ * r j
  hlast : ∀ i < last N, r i ≤ dist (c i) (c (last N)) ∧ r (last N) ≤ τ * r i
  inter : ∀ i < last N, dist (c i) (c (last N)) ≤ r i + r (last N)

(self : Besicovitch.SatelliteConfig α N τ)

i < Fin.last N → self.r i ≤ dist (self.c i) (self.c (Fin.last N)) ∧ self.r (Fin.last N) ≤ τ * self.r i


/-- If both `f` and `f ∘ φ` have unit speed (on `Icc 0 t` and `Icc 0 s` respectively)
and `φ` monotonically maps `Icc 0 s` onto `Icc 0 t`, then `φ` is the identity on `Icc 0 s`
-/
theorem unique_unit_speed_on_Icc_zero {s t : ℝ} (hs : 0 ≤ s) (ht : 0 ≤ t) {φ : ℝ → ℝ}
    (φm : MonotoneOn φ <| Icc 0 s) (φst : φ '' Icc 0 s = Icc 0 t)
    (hfφ : HasUnitSpeedOn (f ∘ φ) (Icc 0 s)) (hf : HasUnitSpeedOn f (Icc 0 t)) :
    EqOn φ id (Icc 0 s)

(hfφ : HasUnitSpeedOn (f ∘ φ) (Set.Icc 0 s))


@[to_additive]
theorem Equiv.multipliable_iff_of_mulSupport {g : γ → α} (e : mulSupport f ≃ mulSupport g)
    (he : ∀ x : mulSupport f, g (e x) = f x) : Multipliable f ↔ Multipliable g

(e : ↑(Function.support f) ≃ ↑(Function.support g))

(he : ∀ (x : ↑(Function.support f)), g ↑(e x) = f ↑x)


@[simp]
theorem comap_id : comap (ContinuousMap.id α) = FrameHom.id _

TopologicalSpace.Opens.comap (ContinuousMap.id α) = FrameHom.id (TopologicalSpace.Opens α)


theorem mul_neg_left (xs ys : IntList) : (-xs) * ys = -(xs * ys)


@[to_additive]
theorem mulAntidiagonal_mono_left (h : s₁ ⊆ s₂) : mulAntidiagonal s₁ t a ⊆ mulAntidiagonal s₂ t a

{α : Type u_1}
[Mul α]
{s₁ s₂ t : Set α}
{a : α}
(h : s₁ ⊆ s₂)

s₁.mulAntidiagonal t a ⊆ s₂.mulAntidiagonal t a


theorem AnalyticAt.aeval_polynomial (hf : AnalyticAt 𝕜 f z) (p : A[X]) :
    AnalyticAt 𝕜 (fun x ↦ aeval (f x) p) z

{𝕜 : Type u_1}
{E : Type u_2}
{A : Type u_3}
{B : Type u_4}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[CommSemiring A]
{z : E}
[NormedRing B]
[NormedAlgebra 𝕜 B]
[Algebra A B]
{f : E → B}
(hf : AnalyticAt 𝕜 f z)
(p : Polynomial A)

AnalyticAt 𝕜 (fun x => (Polynomial.aeval (f x)) p) z


theorem cons_subset {h : a ∉ s} : s.cons a h ⊆ t ↔ a ∈ t ∧ s ⊆ t

{α : Type u_1}
{s t : Finset α}
{a : α}
{h : a ∉ s}


theorem combo_sat (a) (w₁ : c₁.sat x₁) (b) (w₂ : c₂.sat x₂) :
    (combo a c₁ b c₂).sat (a * x₁ + b * x₂)

{c₁ c₂ : Lean.Omega.Constraint}
{x₁ x₂ : Int}
(a : Int)
(w₁ : c₁.sat x₁ = true)
(b : Int)
(w₂ : c₂.sat x₂ = true)

(Lean.Omega.Constraint.combo a c₁ b c₂).sat (a * x₁ + b * x₂) = true


theorem condexpIndL1_disjoint_union (hs : MeasurableSet s) (ht : MeasurableSet t) (hμs : μ s ≠ ∞)
    (hμt : μ t ≠ ∞) (hst : s ∩ t = ∅) (x : G) :
    condexpIndL1 hm μ (s ∪ t) x = condexpIndL1 hm μ s x + condexpIndL1 hm μ t x

{α : Type u_1}
{G : Type u_5}
[NormedAddCommGroup G]
{m m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s t : Set α}
[NormedSpace ℝ G]
{hm : m ≤ m0}
[MeasureTheory.SigmaFinite (μ.trim hm)]
(hs : MeasurableSet s)
(ht : MeasurableSet t)
(hμs : μ s ≠ ⊤)
(hμt : μ t ≠ ⊤)
(hst : s ∩ t = ∅)
(x : G)

MeasureTheory.condexpIndL1 hm μ (s ∪ t) x = MeasureTheory.condexpIndL1 hm μ s x + MeasureTheory.condexpIndL1 hm μ t x


lemma cfc_eval_C (r : R) (a : A) (ha : p a := by cfc_tac) :
    cfc (C r).eval a = algebraMap R A r

{R : Type u_1}
{A : Type u_2}
{p : A → Prop}
[CommSemiring R]
[StarRing R]
[MetricSpace R]
[TopologicalSemiring R]
[ContinuousStar R]
[TopologicalSpace A]
[Ring A]
[StarRing A]
[Algebra R A]
[ContinuousFunctionalCalculus R p]
(r : R)
(a : A)
(ha : p a := by cfc_tac)

cfc (fun a => Polynomial.eval a (Polynomial.C r)) a = (algebraMap R A) r


theorem tan_inj_of_lt_of_lt_pi_div_two {x y : ℝ} (hx₁ : -(π / 2) < x) (hx₂ : x < π / 2)
    (hy₁ : -(π / 2) < y) (hy₂ : y < π / 2) (hxy : tan x = tan y) : x = y

{x y : ℝ}
(hx₁ : -(Real.pi / 2) < x)
(hx₂ : x < Real.pi / 2)
(hy₁ : -(Real.pi / 2) < y)
(hy₂ : y < Real.pi / 2)
(hxy : Real.tan x = Real.tan y)


@[to_additive]
theorem card_zpowers_le (a : G) {k : ℕ} (k_pos : k ≠ 0)
    (ha : a ^ k = 1) : Fintype.card (Subgroup.zpowers a) ≤ k

{G : Type u_1}
[Group G]
[Fintype G]
(a : G)
{k : ℕ}
(k_pos : k ≠ 0)
(ha : a ^ k = 1)


/-- This lemma is for polynomials over a field. -/
theorem splits_iff (f : K[X]) :
    Splits i f ↔ f = 0 ∨ ∀ {g : L[X]}, Irreducible g → g ∣ f.map i → degree g = 1

{K : Type v}
{L : Type w}
[Field K]
[Field L]
(i : K →+* L)
(f : K[X])

Polynomial.Splits i f ↔ f = 0 ∨ ∀ {g : L[X]}, Irreducible g → g ∣ Polynomial.map i f → g.degree = 1


/-- Precomposing `f` with `Prod.snd` is continuous -/
theorem Continuous.snd' {f : Y → Z} (hf : Continuous f) : Continuous fun x : X × Y => f x.snd

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


@[to_additive]
theorem mul_inv_le_one_iff : b * a⁻¹ ≤ 1 ↔ b ≤ a

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


theorem trans [FiniteDimensional F K] [FiniteDimensional K A] : FiniteDimensional F A

(F : Type u_1)
(K : Type u_2)
(A : Type u_3)
[DivisionRing F]
[DivisionRing K]
[AddCommGroup A]
[Module F K]
[Module K A]
[Module F A]
[IsScalarTower F K A]
[FiniteDimensional F K]
[FiniteDimensional K A]


@[simp]
theorem stabilizerIsoEnd_apply (f : stabilizerSubmonoid M x) :
    (stabilizerIsoEnd M x) f = f

(f : ↥(MulAction.stabilizerSubmonoid M x))

(CategoryTheory.ActionCategory.stabilizerIsoEnd M x) f = f


@[simp]
theorem realize_equal {t₁ t₂ : L.Term α} {x : α → M} :
    (t₁.equal t₂).Realize x ↔ t₁.realize x = t₂.realize x

{L : FirstOrder.Language}
{M : Type w}
[L.Structure M]
{α : Type u'}
{t₁ t₂ : L.Term α}
{x : α → M}

(t₁.equal t₂).Realize x ↔ FirstOrder.Language.Term.realize x t₁ = FirstOrder.Language.Term.realize x t₂


theorem hasBasis_uniformity :
    𝓤[abv.uniformSpace].HasBasis ((0 : 𝕜) < ·) fun ε => { p : R × R | abv (p.2 - p.1) < ε }

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{R : Type u_2}
[CommRing R]
(abv : AbsoluteValue R 𝕜)

(𝓤 R).HasBasis (fun x => 0 < x) fun ε => {p | abv (p.2 - p.1) < ε}


lemma Iff.ne_right {α β : Sort*} {a b : α} {c d : β} : (a ≠ b ↔ c = d) → (a = b ↔ c ≠ d)

{α : Sort u_1}
{β : Sort u_2}
{a b : α}
{c d : β}


theorem Monotone.forall {P : β → α → Prop} (hP : ∀ x, Monotone (P x)) :
    Monotone fun y => ∀ x, P x y

{α : Type u}
{β : Type v}
[Preorder α]
{P : β → α → Prop}
(hP : ∀ (x : β), Monotone (P x))


theorem Irreducible.not_square (ha : Irreducible a) : ¬IsSquare a

{α : Type u_1}
[CommMonoid α]
{a : α}
(ha : Irreducible a)


theorem bind_assoc {α β} (l : List α) (f : α → List β) (g : β → List γ) :
    (l.bind f).bind g = l.bind fun x => (f x).bind g

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


theorem subset_interior_iff_nhds {V : Set X} : s ⊆ interior V ↔ ∀ x ∈ s, V ∈ 𝓝 x

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


/-- A homeomorphism `h : X ≃ₜ Y` lifts to a homeomorphism between subtypes corresponding to
predicates `p : X → Prop` and `q : Y → Prop` so long as `p = q ∘ h`. -/
@[simps!]
def subtype {p : X → Prop} {q : Y → Prop} (h : X ≃ₜ Y) (h_iff : ∀ x, p x ↔ q (h x)) :
    {x // p x} ≃ₜ {y // q y}

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{p : X → Prop}
{q : Y → Prop}
(h : X ≃ₜ Y)
(h_iff : ∀ (x : X), p x ↔ q (h x))
(b : { b // q b })


theorem Duplicate.elim_nil (h : x ∈+ []) : False

{α : Type u_1}
{x : α}
(h : List.Duplicate x [])


@[simp] lemma forget_map {X Y : RingCat} (f : X ⟶ Y) : (forget RingCat).map f = (f : X → Y)

(CategoryTheory.forget RingCat).map f = ⇑f


@[to_additive]
theorem continuousOn_const_smul_iff (c : G) :
    ContinuousOn (fun x => c • f x) s ↔ ContinuousOn f s

{α : Type u_2}
{β : Type u_3}
{G : Type u_4}
[TopologicalSpace α]
[AddGroup G]
[AddAction G α]
[ContinuousConstVAdd G α]
[TopologicalSpace β]
{f : β → α}
{s : Set β}
(c : G)

ContinuousOn (fun x => c +ᵥ f x) s ↔ ContinuousOn f s


@[to_additive (attr := simp) mod_addOrderOf_nsmul]
lemma pow_mod_orderOf (x : G) (n : ℕ) : x ^ (n % orderOf x) = x ^ n

{G : Type u_1}
[Monoid G]
(x : G)
(n : ℕ)


/-- The integrals along a decreasing approximating sequence to the indicator of a closed set
tend to the measure of the closed set. -/
lemma tendsto_lintegral_apprSeq [MeasurableSpace X] [OpensMeasurableSpace X]
    (μ : Measure X) [IsFiniteMeasure μ] :
    Tendsto (fun n ↦ ∫⁻ x, hF.apprSeq n x ∂μ) atTop (𝓝 ((μ : Measure X) F))

{X : Type u_1}
[TopologicalSpace X]
[HasOuterApproxClosed X]
{F : Set X}
(hF : IsClosed F)
[MeasurableSpace X]
[OpensMeasurableSpace X]
(μ : MeasureTheory.Measure X)
[MeasureTheory.IsFiniteMeasure μ]

Filter.Tendsto (fun n => ∫⁻ (x : X), ↑((hF.apprSeq n) x) ∂μ) Filter.atTop (𝓝 (μ F))


theorem hasFDerivAt_iff_tendsto :
    HasFDerivAt f f' x ↔ Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) (𝓝 x) (𝓝 0)

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{f' : E →L[𝕜] F}
{x : E}

HasFDerivAt f f' x ↔ Filter.Tendsto (fun x' => ‖x' - x‖⁻¹ * ‖f x' - f x - f' (x' - x)‖) (𝓝 x) (𝓝 0)


@[simp, nolint simpNF] -- Porting note: linter complains that LHS doesn't simplify
theorem preimage_compl [DecidableEq α] [DecidableEq β] [Fintype α] [Fintype β] {f : α → β}
    (s : Finset β) (hf : Function.Injective f) :
    preimage sᶜ f hf.injOn = (preimage s f hf.injOn)ᶜ

{α : Type u}
{β : Type v}
[DecidableEq α]
[DecidableEq β]
[Fintype α]
[Fintype β]
{f : α → β}
(s : Finset β)
(hf : Function.Injective f)


/-- The uniform space structure associated to an abelian group filter basis via the associated
topological abelian group structure is compatible with its group structure. -/
protected theorem uniformAddGroup : @UniformAddGroup G B.uniformSpace _

{G : Type u_1}
[AddCommGroup G]
(B : AddGroupFilterBasis G)


theorem card_pos [h : Nonempty α] : 0 < card α

{α : Type u_1}
[Fintype α]
[h : Nonempty α]


theorem eval₂_mul_eq_zero_of_left (q : R[X]) (hp : p.eval₂ f x = 0) : (p * q).eval₂ f x = 0

{R : Type u}
{S : Type v}
[Semiring R]
{p : R[X]}
[CommSemiring S]
(f : R →+* S)
(x : S)
(q : R[X])
(hp : Polynomial.eval₂ f x p = 0)


theorem eval_finset_sum (s : Finset ι) (g : ι → R[X]) (x : R) :
    (∑ i ∈ s, g i).eval x = ∑ i ∈ s, (g i).eval x

{R : Type u}
{ι : Type y}
[Semiring R]
(s : Finset ι)
(g : ι → R[X])
(x : R)

Polynomial.eval x (∑ i ∈ s, g i) = ∑ i ∈ s, Polynomial.eval x (g i)


theorem mapsTo' : MapsTo f s t ↔ f '' s ⊆ t

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


@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem image₂_nonempty_iff : (image₂ f s t).Nonempty ↔ s.Nonempty ∧ t.Nonempty

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

(Finset.image₂ f s t).Nonempty ↔ s.Nonempty ∧ t.Nonempty


lemma const_fin1_eq (x : α) : (fun _ : Fin 1 => x) = ![x]


theorem mem_span_image {m : M} {s : Set ι} : m ∈ span R (b '' s) ↔ ↑(b.repr m).support ⊆ s

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(b : Basis ι R M)
{m : M}
{s : Set ι}

m ∈ Submodule.span R (⇑b '' s) ↔ ↑(b.repr m).support ⊆ s


theorem disjointed_eq_inter_compl (f : ℕ → Set α) (n : ℕ) :
    disjointed f n = f n ∩ ⋂ i < n, (f i)ᶜ

disjointed f n = f n ∩ ⋂ i, ⋂ (_ : i < n), (f i)ᶜ


/-- To show a property is true on the even or odd part, it suffices to show it is true on the
scalars or vectors (respectively), closed under addition, and under left-multiplication by a pair
of vectors. -/
@[elab_as_elim]
theorem evenOdd_induction (n : ZMod 2) {motive : ∀ x, x ∈ evenOdd Q n → Prop}
    (range_ι_pow : ∀ (v) (h : v ∈ LinearMap.range (ι Q) ^ n.val),
        motive v (Submodule.mem_iSup_of_mem ⟨n.val, n.natCast_zmod_val⟩ h))
    (add : ∀ x y hx hy, motive x hx → motive y hy → motive (x + y) (Submodule.add_mem _ hx hy))
    (ι_mul_ι_mul :
      ∀ m₁ m₂ x hx,
        motive x hx →
          motive (ι Q m₁ * ι Q m₂ * x)
            (zero_add n ▸ SetLike.mul_mem_graded (ι_mul_ι_mem_evenOdd_zero Q m₁ m₂) hx))
    (x : CliffordAlgebra Q) (hx : x ∈ evenOdd Q n) : motive x hx

{motive : (x : CliffordAlgebra Q) → x ∈ CliffordAlgebra.evenOdd Q n → Prop}

(range_ι_pow : ∀ (v : CliffordAlgebra Q) (h : v ∈ LinearMap.range (CliffordAlgebra.ι Q) ^ n.val), motive v ⋯)

(add :
  ∀ (x y : CliffordAlgebra Q) (hx : x ∈ CliffordAlgebra.evenOdd Q n) (hy : y ∈ CliffordAlgebra.evenOdd Q n),
    motive x hx → motive y hy → motive (x + y) ⋯)

(ι_mul_ι_mul :
  ∀ (m₁ m₂ : M) (x : CliffordAlgebra Q) (hx : x ∈ CliffordAlgebra.evenOdd Q n),
    motive x hx → motive ((CliffordAlgebra.ι Q) m₁ * (CliffordAlgebra.ι Q) m₂ * x) ⋯)


theorem map_filterMap (f : α → Option β) (g : β → γ) (s : Multiset α) :
    map g (filterMap f s) = filterMap (fun x => (f x).map g) s

{α : Type u_1}
{β : Type v}
{γ : Type u_2}
(f : α → Option β)
(g : β → γ)
(s : Multiset α)

Multiset.map g (Multiset.filterMap f s) = Multiset.filterMap (fun x => Option.map g (f x)) s


@[to_additive] lemma mabs_of_le_one (h : a ≤ 1) : |a|ₘ = a⁻¹

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


/-- `ℂ` and `ℝ` are isomorphic as vector spaces over `ℚ`, or equivalently,
as additive groups. -/
theorem Complex.nonempty_linearEquiv_real : Nonempty (ℂ ≃ₗ[ℚ] ℝ)


lemma addZ_of_X_eq {P Q : Fin 3 → R} (hx : P x * Q z ^ 2 = Q x * P z ^ 2) : addZ P Q = 0

{R : Type u}
[CommRing R]
{P Q : Fin 3 → R}
(hx : P x * Q z ^ 2 = Q x * P z ^ 2)


protected theorem IsPredLimit.isMax (h : IsPredLimit a) : IsMax a

{α : Type u_1}
[PartialOrder α]
[PredOrder α]
{a : α}
[IsPredArchimedean α]
(h : Order.IsPredLimit a)


/-- A morphism between two objects `iter₁` and `iter₂` in the
category `Φ.Iteration ε j` of `j`th iterations of a functor `Φ`
equipped with a natural transformation `ε : 𝟭 C ⟶ Φ` consists of a natural
transformation `natTrans : iter₁.F ⟶ iter₂.F` which is compatible with the
isomorphisms `isoZero` and `isoSucc`. -/
structure Hom where
  /-- A natural transformation `iter₁.F ⟶ iter₂.F` -/
  natTrans : iter₁.F ⟶ iter₂.F
  natTrans_app_zero :
    natTrans.app ⟨⊥, bot_le⟩ = iter₁.isoZero.hom ≫ iter₂.isoZero.inv := by aesop_cat
  natTrans_app_succ (i : J) (hi : i < j) :
    natTrans.app ⟨wellOrderSucc i, wellOrderSucc_le hi⟩ = (iter₁.isoSucc i hi).hom ≫
      whiskerRight (natTrans.app ⟨i, hi.le⟩) _ ≫ (iter₂.isoSucc i hi).inv := by aesop_cat

{iter₁ iter₂ : CategoryTheory.Functor.Iteration ε j}

self.natTrans.app ⟨wellOrderSucc i, ⋯⟩ =
  CategoryTheory.CategoryStruct.comp (iter₁.isoSucc i hi).hom
    (CategoryTheory.CategoryStruct.comp (CategoryTheory.whiskerRight (self.natTrans.app ⟨i, ⋯⟩) Φ)
      (iter₂.isoSucc i hi).inv)


@[simp]
theorem eq_padic_norm' (q : ℚ) : padicNormE (q : ℚ_[p]) = padicNorm p q


@[simp] lemma map_id : map (OrderHom.id : α →o α) = ContinuousMap.id _

Topology.WithLowerSet.map OrderHom.id = ContinuousMap.id (Topology.WithLowerSet α)


theorem accessible {a : α} (h₁ : Subrelation q r) (ac : Acc r a) : Acc q a

{α : Sort u}
{r q : α → α → Prop}
{a : α}
(h₁ : Subrelation q r)
(ac : Acc r a)


theorem toSpanSingleton_apply (x : M₁) (r : R₁) : toSpanSingleton R₁ x r = r • x

(R₁ : Type u_1)
[Semiring R₁]
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
[TopologicalSpace R₁]
[ContinuousSMul R₁ M₁]
(x : M₁)
(r : R₁)

(ContinuousLinearMap.toSpanSingleton R₁ x) r = r • x


lemma cfcₙ_nonneg_iff (f : R → R) (a : A) (hf : ContinuousOn f (σₙ R a) := by cfc_cont_tac)
    (h0 : f 0 = 0 := by cfc_zero_tac) (ha : p a := by cfc_tac) :
    0 ≤ cfcₙ f a ↔ ∀ x ∈ σₙ R a, 0 ≤ f x

[∀ (α : Type u_1) [inst : Zero α] [inst_1 : TopologicalSpace α], StarOrderedRing C(α, R)₀]


@[simp] theorem sublist_nil {l : List α} : l <+ [] ↔ l = []


@[simp, nolint simpNF] -- `simpNF` incorrectly complains the LHS doesn't simplify.
theorem type_preimage_aux {α β : Type u} (r : α → α → Prop) [IsWellOrder α r] (f : β ≃ α) :
    @type _ (fun x y => r (f x) (f y)) (inferInstanceAs (IsWellOrder β (↑f ⁻¹'o r))) = type r

(Ordinal.type fun x y => r (f x) (f y)) = Ordinal.type r


theorem Adhesive.van_kampen' [Adhesive C] [Mono g] (H : IsPushout f g h i) : H.IsVanKampen

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
[CategoryTheory.Adhesive C]
[CategoryTheory.Mono g]
(H : CategoryTheory.IsPushout f g h i)


theorem StrictConvexOn.dual (hf : StrictConvexOn 𝕜 s f) : StrictConcaveOn 𝕜 s (toDual ∘ f)

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

StrictConcaveOn 𝕜 s (⇑OrderDual.toDual ∘ f)


/-- Given a homology map data for a morphism `φ`, this is the induced homology
map data for `a • φ`. -/
@[simps]
def smul (a : R) : HomologyMapData (a • φ) h₁ h₂

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


@[simp]
theorem image_const_sub_uIcc : (fun x => a - x) '' [[b, c]] = [[a - b, a - c]]

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


theorem codisjoint_assoc : Codisjoint (a ⊔ b) c ↔ Codisjoint a (b ⊔ c)

{α : Type u_1}
[SemilatticeSup α]
[OrderTop α]
{a b c : α}


theorem injective_valMinAbs {n : ℕ} : (valMinAbs : ZMod n → ℤ).Injective


/-- Given a localization map `f : R →+* S` for a submonoid `M ⊆ R` and a map of `CommSemiring`s
`g : R →+* P` such that `g(M) ⊆ Units P`, `f x = f y → g x = g y` for all `x y : R`. -/
theorem eq_of_eq {g : R →+* P} (hg : ∀ y : M, IsUnit (g y)) {x y}
    (h : (algebraMap R S) x = (algebraMap R S) y) : g x = g y


theorem LinearMap.continuousAt_zero_of_locally_bounded (f : E →ₛₗ[σ] F)
    (hf : ∀ s, IsVonNBounded 𝕜 s → IsVonNBounded 𝕜' (f '' s)) : ContinuousAt f 0

(hf : ∀ (s : Set E), Bornology.IsVonNBounded 𝕜 s → Bornology.IsVonNBounded 𝕜' (⇑f '' s))


theorem ringExpChar.eq (q : ℕ) [h : ExpChar R q] : ringExpChar R = q

(R : Type u)
[Semiring R]
(q : ℕ)
[h : ExpChar R q]


@[simp]
theorem top_prod_top : (⊤ : NonUnitalSubring R).prod (⊤ : NonUnitalSubring S) = ⊤

{R : Type u}
{S : Type v}
[NonUnitalNonAssocRing R]
[NonUnitalNonAssocRing S]


theorem eq_curry_iff (f : A ⊗ Y ⟶ X) (g : Y ⟶ A ⟶[C] X) : g = curry f ↔ uncurry g = f

(f : CategoryTheory.MonoidalCategory.tensorObj A Y ⟶ X)

g = CategoryTheory.MonoidalClosed.curry f ↔ CategoryTheory.MonoidalClosed.uncurry g = f


/-- If `x` is an accumulation point of a set `C` and `U` is a neighborhood of `x`,
then `x` is an accumulation point of `U ∩ C`. -/
theorem AccPt.nhds_inter {x : α} {U : Set α} (h_acc : AccPt x (𝓟 C)) (hU : U ∈ 𝓝 x) :
    AccPt x (𝓟 (U ∩ C))

{α : Type u_1}
[TopologicalSpace α]
{C : Set α}
{x : α}
{U : Set α}
(h_acc : AccPt x (𝓟 C))
(hU : U ∈ 𝓝 x)


theorem iterateFrobeniusEquiv_add_apply (x : R) : iterateFrobeniusEquiv R p (m + n) x =
    iterateFrobeniusEquiv R p m (iterateFrobeniusEquiv R p n x)

(R : Type u_1)
(p m n : ℕ)
[CommSemiring R]
[ExpChar R p]
[PerfectRing R p]
(x : R)

(iterateFrobeniusEquiv R p (m + n)) x = (iterateFrobeniusEquiv R p m) ((iterateFrobeniusEquiv R p n) x)


theorem one_def [One α] : (1 : Part α) = some 1


theorem condexpL2_indicator_ae_eq_smul (hm : m ≤ m0) (hs : MeasurableSet s) (hμs : μ s ≠ ∞)
    (x : E') :
    condexpL2 E' 𝕜 hm (indicatorConstLp 2 hs hμs x) =ᵐ[μ] fun a =>
      (condexpL2 ℝ ℝ hm (indicatorConstLp 2 hs hμs (1 : ℝ)) : α → ℝ) a • x

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

↑↑↑((MeasureTheory.condexpL2 E' 𝕜 hm) (MeasureTheory.indicatorConstLp 2 hs hμs x)) =ᵐ[μ] fun a =>
  ↑↑↑((MeasureTheory.condexpL2 ℝ ℝ hm) (MeasureTheory.indicatorConstLp 2 hs hμs 1)) a • x


/-- Use `Quotient.out` to create a functor out of the thin skeleton. -/
@[simps]
noncomputable def fromThinSkeleton : ThinSkeleton C ⥤ C

(C : Type u₁)
[CategoryTheory.Category.{v₁, u₁} C]
[Quiver.IsThin C]
{x y : CategoryTheory.ThinSkeleton C}

∀ (a : x ⟶ y),
  (CategoryTheory.ThinSkeleton.fromThinSkeleton C).map a =
    Quotient.recOnSubsingleton₂ (motive := fun x x_1 => (x ⟶ x_1) → (Quotient.out x ⟶ Quotient.out x_1)) x y
      (fun X Y f =>
        CategoryTheory.CategoryStruct.comp (Nonempty.some ⋯).hom
          (CategoryTheory.CategoryStruct.comp (Nonempty.some ⋯) (Nonempty.some ⋯).inv))
      a


theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht

(PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i))

(msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) ⋯ ≤ ∑' (i : ℕ), m (f i) ⋯)

(m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂)

(MeasureTheory.inducedOuterMeasure m P0 m0) s = ⨅ t, ⨅ (ht : P t), ⨅ (_ : s ⊆ t), m t ht


@[simp]
theorem lTensor_comp_mk (m : M) :
    f.lTensor M ∘ₗ TensorProduct.mk R M N m = TensorProduct.mk R M P m ∘ₗ f

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
{P : Type u_6}
[AddCommMonoid M]
[AddCommMonoid N]
[AddCommMonoid P]
[Module R M]
[Module R N]
[Module R P]
(f : N →ₗ[R] P)
(m : M)

LinearMap.lTensor M f ∘ₗ (TensorProduct.mk R M N) m = (TensorProduct.mk R M P) m ∘ₗ f


/-- The equivalence between `C` and `AsSmall C`. -/
@[simps]
def AsSmall.equiv : C ≌ AsSmall C

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


lemma mono_map'_of_injective [HasCoproduct (X ∘ ι)] [HasCoproduct X]
    [HasCoproduct (fun (k : ((Set.range ι)ᶜ : Set I)) => X k.1)] :
    Mono (Sigma.map' ι (fun j => 𝟙 ((X ∘ ι) j)))

[CategoryTheory.Limits.HasCoproduct (X ∘ ι)]

[CategoryTheory.Limits.HasCoproduct fun k => X ↑k]

CategoryTheory.Mono (CategoryTheory.Limits.Sigma.map' ι fun j => 𝟙 ((X ∘ ι) j))


theorem volume_set_coe_def (s : Set α) : (volume : Measure s) = comap ((↑) : s → α) volume

{α : Type u_2}
[MeasureTheory.MeasureSpace α]
(s : Set α)

MeasureTheory.volume = MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume


@[simp]
theorem factors_one [Nontrivial α] : factors (1 : Associates α) = 0

{α : Type u_1}
[CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α]
[Nontrivial α]


/-- The strong form of **Hindman's theorem**: in any finite cover of an FP-set, one the parts
contains an FP-set. -/
@[to_additive FS_partition_regular
      "The strong form of **Hindman's theorem**: in any finite cover of
      an FS-set, one the parts contains an FS-set."]
theorem FP_partition_regular {M} [Semigroup M] (a : Stream' M) (s : Set (Set M)) (sfin : s.Finite)
    (scov : FP a ⊆ ⋃₀ s) : ∃ c ∈ s, ∃ b : Stream' M, FP b ⊆ c

{M : Type u_1}
[AddSemigroup M]
(a : Stream' M)
(s : Set (Set M))
(sfin : s.Finite)
(scov : Hindman.FS a ⊆ ⋃₀ s)


theorem pow_iff_coprime (h : IsPrimitiveRoot ζ k) (h0 : 0 < k) (i : ℕ) :
    IsPrimitiveRoot (ζ ^ i) k ↔ i.Coprime k

{M : Type u_1}
[CommMonoid M]
{k : ℕ}
{ζ : M}
(h : IsPrimitiveRoot ζ k)
(h0 : 0 < k)
(i : ℕ)


theorem fpowerSeries_apply_zero (f : E →L[𝕜] F) (x : E) :
    f.fpowerSeries x 0 = ContinuousMultilinearMap.curry0 𝕜 _ (f x)

{𝕜 : Type u}
{E : Type v}
{F : Type w}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : E →L[𝕜] F)
(x : E)

f.fpowerSeries x 0 = ContinuousMultilinearMap.curry0 𝕜 E (f x)


theorem natDegree_eq_of_degree_eq_some {p : R[X]} {n : ℕ} (h : degree p = n) : natDegree p = n

{R : Type u}
[Semiring R]
{p : R[X]}
{n : ℕ}
(h : p.degree = ↑n)


theorem norm_pow_mul_le_seminorm (f : 𝓢(E, F)) (k : ℕ) (x₀ : E) :
    ‖x₀‖ ^ k * ‖f x₀‖ ≤ (SchwartzMap.seminorm 𝕜 k 0) f

(𝕜 : Type u_1)
{E : Type u_4}
{F : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
[NormedAddCommGroup F]
[NormedSpace ℝ F]
[NormedField 𝕜]
[NormedSpace 𝕜 F]
[SMulCommClass ℝ 𝕜 F]
(f : SchwartzMap E F)
(k : ℕ)
(x₀ : E)


/-- The inner product between a vector and a `π / 2` rotation of that vector is zero. -/
@[simp]
theorem inner_rotation_pi_div_two_right (x : V) : ⟪x, o.rotation (π / 2 : ℝ) x⟫ = 0

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


@[simp]
theorem preimage_coe_affineSpan_singleton (x : P) :
    ((↑) : affineSpan k ({x} : Set P) → P) ⁻¹' {x} = univ

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


theorem eq_C_of_natDegree_le_zero (h : natDegree p ≤ 0) : p = C (coeff p 0)

{R : Type u}
[Semiring R]
{p : R[X]}
(h : p.natDegree ≤ 0)


@[simp]
theorem ofVector_cons (a : α) (v : Vector α n) : ↑(Vector.cons a v) = a ::ₛ (↑v : Sym α n)

{α : Type u_1}
{n : ℕ}
(a : α)
(v : Mathlib.Vector α n)

Sym.ofVector (a ::ᵥ v) = a ::ₛ Sym.ofVector v


theorem iSup_range_of_eq_top : ⨆ i, (of L ι G f i).toHom.range = ⊤

[DirectedSystem G fun i j h => ⇑(f i j h)]

⨆ i, (FirstOrder.Language.DirectLimit.of L ι G f i).toHom.range = ⊤


theorem measurableSet_prod_of_nonempty {s : Set α} {t : Set β} (h : (s ×ˢ t).Nonempty) :
    MeasurableSet (s ×ˢ t) ↔ MeasurableSet s ∧ MeasurableSet t

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}
{s : Set α}
{t : Set β}
(h : (s ×ˢ t).Nonempty)


theorem mem_closure_iff_nhds_basis {p : ι → Prop} {s : ι → Set X} (h : (𝓝 x).HasBasis p s) :
    x ∈ closure t ↔ ∀ i, p i → ∃ y ∈ t, y ∈ s i

{X : Type u}
{ι : Sort w}
{x : X}
{t : Set X}
[TopologicalSpace X]
{p : ι → Prop}
{s : ι → Set X}
(h : (𝓝 x).HasBasis p s)

x ∈ closure t ↔ ∀ (i : ι), p i → ∃ y ∈ t, y ∈ s i


theorem ne_zero_of_mk'_ne_zero {x : R} {y : M} (hxy : IsLocalization.mk' S x y ≠ 0) : x ≠ 0

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
[IsLocalization M S]
{x : R}
{y : ↥M}
(hxy : IsLocalization.mk' S x y ≠ 0)


@[simp, norm_cast]
theorem coe_neg (f : CentroidHom α) : ⇑(-f) = -f

{α : Type u_5}
[NonUnitalNonAssocRing α]
(f : CentroidHom α)


/-- The chain rule.

Note that the function `h₂` is a function on an algebra. If you are looking for the chain rule
with `h₂` taking values in a vector space, use `HasDerivAt.scomp_of_eq`. -/
theorem HasDerivAt.comp_of_eq
    (hh₂ : HasDerivAt h₂ h₂' y) (hh : HasDerivAt h h' x) (hy : y = h x) :
    HasDerivAt (h₂ ∘ h) (h₂' * h') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
(x : 𝕜)
{𝕜' : Type u_1}
[NontriviallyNormedField 𝕜']
[NormedAlgebra 𝕜 𝕜']
{h : 𝕜 → 𝕜'}
{h₂ : 𝕜' → 𝕜'}
{h' h₂' y : 𝕜'}
(hh₂ : HasDerivAt h₂ h₂' y)
(hh : HasDerivAt h h' x)
(hy : y = h x)


@[simp]
theorem truncate_comp_wittVector_truncate {m : ℕ} (hm : n ≤ m) :
    (@truncate p _ n R _ m hm).comp (WittVector.truncate m) = WittVector.truncate n

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{n : ℕ}
{R : Type u_1}
[CommRing R]
{m : ℕ}
(hm : n ≤ m)

(TruncatedWittVector.truncate hm).comp (WittVector.truncate m) = WittVector.truncate n


@[simp, norm_cast]
theorem aemeasurable_coe_nnreal_real_iff {f : α → ℝ≥0} {μ : Measure α} :
    AEMeasurable (fun x => f x : α → ℝ) μ ↔ AEMeasurable f μ

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ≥0}
{μ : MeasureTheory.Measure α}

AEMeasurable (fun x => ↑(f x)) μ ↔ AEMeasurable f μ


/-- The image of a cocone in C under a functor G : C ⥤ D is a cocone in D. -/
@[simps!]
def mapCocone (c : Cocone F) : Cocone (F ⋙ H)

{J : Type u₁}
[CategoryTheory.Category.{v₁, u₁} J]
{C : Type u₃}
[CategoryTheory.Category.{v₃, u₃} C]
{D : Type u₄}
[CategoryTheory.Category.{v₄, u₄} D]
(H : C ⥤ D)
{F : J ⥤ C}
(c : CategoryTheory.Limits.Cocone F)


@[simp]
theorem pred_coe_bot : pred ↑(⊥ : α) = (⊥ : WithBot α)

{α : Type u_1}
[DecidableEq α]
[PartialOrder α]
[OrderBot α]
[PredOrder α]


theorem eq_C_of_degree_le_zero (h : degree p ≤ 0) : p = C (coeff p 0)

{R : Type u}
[Semiring R]
{p : R[X]}
(h : p.degree ≤ 0)


theorem lt_succ_iff_of_not_isMax (ha : ¬IsMax a) : b < succ a ↔ b ≤ a

{α : Type u_1}
[Preorder α]
[SuccOrder α]
{a b : α}
(ha : ¬IsMax a)


@[simp]
theorem AdditiveFunctor.forget_obj (F : C ⥤+ D) : (AdditiveFunctor.forget C D).obj F = F.1

{C : Type u_1}
{D : Type u_2}
[CategoryTheory.Category.{u_3, u_1} C]
[CategoryTheory.Category.{u_4, u_2} D]
[CategoryTheory.Preadditive C]
[CategoryTheory.Preadditive D]
(F : C ⥤+ D)

(CategoryTheory.AdditiveFunctor.forget C D).obj F = F.obj


/-- `Aᵀ` has orthogonal columns iff `A` has orthogonal rows. -/
@[simp]
theorem transpose_hasOrthogonalCols_iff_hasOrthogonalRows [Fintype n] :
    Aᵀ.HasOrthogonalCols ↔ A.HasOrthogonalRows

{α : Type u_1}
{n : Type u_2}
{m : Type u_3}
[Mul α]
[AddCommMonoid α]
(A : Matrix m n α)
[Fintype n]


lemma EdgeDisjointTriangles.map (f : α ↪ β) (hG : G.EdgeDisjointTriangles) :
    (G.map f).EdgeDisjointTriangles

{α : Type u_1}
{β : Type u_2}
{G : SimpleGraph α}
(f : α ↪ β)
(hG : G.EdgeDisjointTriangles)


/-- We verify that the biproduct in `ModuleCat R` is isomorphic to
the cartesian product of the underlying types:
-/
@[simps! hom_apply]
noncomputable def biprodIsoProd (M N : ModuleCat.{v} R) :
    (M ⊞ N : ModuleCat.{v} R) ≅ ModuleCat.of R (M × N)

(i : ↑(CategoryTheory.Limits.BinaryBiproduct.bicone M N).toCone.pt)

(M.biprodIsoProd N).hom i = (CategoryTheory.Limits.biprod.fst i, CategoryTheory.Limits.biprod.snd i)


@[to_additive (attr := simp)]
theorem coe_toHomUnits {G M : Type*} [Group G] [Monoid M] (f : G →* M) (g : G) :
    (f.toHomUnits g : M) = f g

{G : Type u_1}
{M : Type u_2}
[AddGroup G]
[AddMonoid M]
(f : G →+ M)
(g : G)


@[simp]
theorem support_sum_monomial_coeff (p : MvPolynomial σ R) :
    (∑ v ∈ p.support, monomial v (coeff v p)) = p

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

∑ v ∈ p.support, (MvPolynomial.monomial v) (MvPolynomial.coeff v p) = p


theorem mem_or_not_mem (φ : L.Sentence) : φ ∈ L.completeTheory M ∨ φ.not ∈ L.completeTheory M

(L : FirstOrder.Language)
(M : Type w)
[L.Structure M]
(φ : L.Sentence)

φ ∈ L.completeTheory M ∨ FirstOrder.Language.Formula.not φ ∈ L.completeTheory M


theorem ConcaveOn.lt_right_of_left_lt' (hf : ConcaveOn 𝕜 s f) {x y : E} {a b : 𝕜} (hx : x ∈ s)
    (hy : y ∈ s) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (hfx : f (a • x + b • y) < f x) :
    f y < f (a • x + b • y)

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[LinearOrderedCancelAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConcaveOn 𝕜 s f)
{x y : E}
{a b : 𝕜}
(hx : x ∈ s)
(hy : y ∈ s)
(ha : 0 < a)
(hb : 0 < b)
(hab : a + b = 1)
(hfx : f (a • x + b • y) < f x)


theorem count_le_count_of_le {a b p : Associates α} (hb : b ≠ 0) (hp : Irreducible p) (h : a ≤ b) :
    p.count a.factors ≤ p.count b.factors

[(p : Associates α) → Decidable (Irreducible p)]


theorem liftAddHom_symm_apply_apply [AddCommMonoid M] [AddCommMonoid N] (F : (α →₀ M) →+ N) (x : α)
    (y : M) : (liftAddHom (α := α) (M := M) (N := N)).symm F x y = F (single x y)

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

(Finsupp.liftAddHom.symm F x) y = F (Finsupp.single x y)


@[simp]
theorem add_halves (a : R) : a / 2 + a / 2 = a

{R : Type u_1}
[DivisionSemiring R]
[NeZero 2]
(a : R)


theorem CompleteLattice.Independent.supIndep' [CompleteLattice α] {f : ι → α} (s : Finset ι)
    (h : CompleteLattice.Independent f) : s.SupIndep f

{α : Type u_1}
{ι : Type u_3}
[CompleteLattice α]
{f : ι → α}
(s : Finset ι)
(h : CompleteLattice.Independent f)


protected theorem reverseAux_eq_reverse_append {u v w : V} (p : G.Walk u v) (q : G.Walk u w) :
    p.reverseAux q = p.reverse.append q

{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(p : G.Walk u v)
(q : G.Walk u w)


@[simp]
theorem sym_add [Add α] (a b : α) : sym (a + b) = sym a + sym b

SymAlg.sym (a + b) = SymAlg.sym a + SymAlg.sym b


theorem isWeaklyEisensteinAt : IsWeaklyEisensteinAt f 𝓟

{R : Type u}
[CommSemiring R]
{𝓟 : Ideal R}
{f : R[X]}
(hf : f.IsEisensteinAt 𝓟)


theorem surjective_of_epi_of_preservesPushout {X Y : C} (f : X ⟶ Y) [Epi f]
    [PreservesColimitsOfShape WalkingSpan (forget C)] : Function.Surjective f

[CategoryTheory.Limits.PreservesColimitsOfShape CategoryTheory.Limits.WalkingSpan (CategoryTheory.forget C)]


lemma not_even_iff : ¬ Even n ↔ n % 2 = 1


theorem cast_add_one_pos (n : ℕ) : 0 < (n : α) + 1

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


theorem Measurable.sumMap {_ : MeasurableSpace γ} {_ : MeasurableSpace δ} {f : α → β} {g : γ → δ}
    (hf : Measurable f) (hg : Measurable g) : Measurable (Sum.map f g)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{m : MeasurableSpace α}
{mβ : MeasurableSpace β}

∀ {x : MeasurableSpace γ} {x_1 : MeasurableSpace δ} {f : α → β} {g : γ → δ},
  Measurable f → Measurable g → Measurable (Sum.map f g)


/-- If `C` has colimits then any reflective subcategory has colimits. -/
theorem hasColimits_of_reflective (R : D ⥤ C) [Reflective R] [HasColimitsOfSize.{v, u} C] :
    HasColimitsOfSize.{v, u} D

[CategoryTheory.Limits.HasColimitsOfSize.{v, u, v₁, u₁} C]

CategoryTheory.Limits.HasColimitsOfSize.{v, u, v₂, u₂} D


/--
If `S` is an `R`-algebra with a surjection from a finitely-presented `R`-algebra `A`, such that
localized at a spanning set `{ r }` of elements of `A`, `Sᵣ` is finitely-presented, then
`S` is finitely presented.
This is almost `finitePresentation_ofLocalizationSpanTarget`. The difference is,
that here the set `t` generates the unit ideal of `A`, while in the general version,
it only generates a quotient of `A`.
-/
lemma finitePresentation_ofLocalizationSpanTarget_aux
    {R S A : Type*} [CommRing R] [CommRing S] [CommRing A] [Algebra R S] [Algebra R A]
    [Algebra.FinitePresentation R A] (f : A →ₐ[R] S) (hf : Function.Surjective f)
    (t : Finset A) (ht : Ideal.span (t : Set A) = ⊤)
    (H : ∀ g : t, Algebra.FinitePresentation R (Localization.Away (f g))) :
    Algebra.FinitePresentation R S

(H : ∀ (g : { x // x ∈ t }), Algebra.FinitePresentation R (Localization.Away (f ↑g)))


theorem map_comap_eq_self
    {f : A →ₐ[R] B} {S : Subalgebra R B} (h : S ≤ f.range) : (S.comap f).map f = S

{R : Type u_1}
{A : Type u_2}
{B : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
[Semiring B]
[Algebra R B]
{f : A →ₐ[R] B}
{S : Subalgebra R B}
(h : S ≤ f.range)

Subalgebra.map f (Subalgebra.comap f S) = S


@[simp, norm_cast]
theorem coe_pow (x : s) (n : ℕ) : ↑(x ^ n) = (x : R) ^ n

{R : Type u}
[Ring R]
(s : Subring R)
(x : ↥s)
(n : ℕ)


theorem not_mem_support_iff : n ∉ p.support ↔ p.coeff n = 0

{R : Type u}
{n : ℕ}
[Semiring R]
{p : R[X]}


@[simp]
theorem floor_one : ⌊(1 : α)⌋₊ = 1

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


theorem integrable_of_isFiniteMeasure [IsFiniteMeasure μ] (f : α →ₛ E) : Integrable f μ

{α : Type u_1}
{E : Type u_4}
[MeasurableSpace α]
[NormedAddCommGroup E]
{μ : MeasureTheory.Measure α}
[MeasureTheory.IsFiniteMeasure μ]
(f : MeasureTheory.SimpleFunc α E)


theorem mem_closed_iff (h : x ~ᵢ y) (hs : IsClosed s) : x ∈ s ↔ y ∈ s

{X : Type u_1}
[TopologicalSpace X]
{x y : X}
{s : Set X}
(h : x ~ᵢ y)
(hs : IsClosed s)


theorem cardinal_le_rank {ι : Type v} {v : ι → M}
    (hv : LinearIndependent R v) : #ι ≤ Module.rank R M

{R : Type u}
{M : Type v}
[Ring R]
[AddCommGroup M]
[Module R M]
[Nontrivial R]
{ι : Type v}
{v : ι → M}
(hv : LinearIndependent R v)


theorem lt_sup {ι : Type u} {f : ι → Ordinal.{max u v}} {a} : a < sup.{_, v} f ↔ ∃ i, a < f i

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


@[simp]
theorem mem_toNonUnitalSubring {S : NonUnitalSubalgebra R A} {x} :
    x ∈ S.toNonUnitalSubring ↔ x ∈ S

{R : Type u}
{A : Type v}
[CommRing R]
[NonUnitalNonAssocRing A]
[Module R A]
{S : NonUnitalSubalgebra R A}
{x : A}


@[to_additive]
theorem mem_inv_smul_finset_iff : b ∈ a⁻¹ • s ↔ a • b ∈ s

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[Group α]
[MulAction α β]
{s : Finset β}
{a : α}
{b : β}

b ∈ a⁻¹ • s ↔ a • b ∈ s


/-- A single function that is `Memℒp f p μ` is tight with respect to `μ`. -/
theorem Memℒp.exists_eLpNorm_indicator_compl_lt {β : Type*} [NormedAddCommGroup β] (hp_top : p ≠ ∞)
    {f : α → β} (hf : Memℒp f p μ) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ s : Set α, MeasurableSet s ∧ μ s < ∞ ∧ eLpNorm (sᶜ.indicator f) p μ < ε

{α : Type u_1}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
{β : Type u_5}
[NormedAddCommGroup β]
(hp_top : p ≠ ⊤)
{f : α → β}
(hf : MeasureTheory.Memℒp f p μ)
{ε : ℝ≥0∞}
(hε : ε ≠ 0)

∃ s, MeasurableSet s ∧ μ s < ⊤ ∧ MeasureTheory.eLpNorm (sᶜ.indicator f) p μ < ε


@[reassoc]
lemma naturality (i : op U' ⟶ op U) :
    Y.presheaf.map i ≫ f.app U = f.app U' ≫ X.presheaf.map ((Opens.map f.1.base).map i.unop).op

{X Y : AlgebraicGeometry.Scheme}
(f : X.Hom Y)
{U U' : Y.Opens}
(i : Opposite.op U' ⟶ Opposite.op U)

Y.presheaf.map i ≫ f.app U = f.app U' ≫ X.presheaf.map ((TopologicalSpace.Opens.map f.val.base).map i.unop).op


@[simp]
theorem bodd_neg (n : ℤ) : bodd (-n) = bodd n


@[simp] theorem getLeft_inl (h : (inl x : α ⊕ β).isLeft) : (inl x).getLeft h = x

{α : Type u_1}
{β : Type u_2}
{x : α}
(h : (Sum.inl x).isLeft = true)


theorem not_isDiag_of_mem_edgeFinset : e ∈ G.edgeFinset → ¬e.IsDiag

{V : Type u_1}
{G : SimpleGraph V}
{e : Sym2 V}
[Fintype ↑G.edgeSet]


@[simp]
theorem Ico_inter_Ico_consecutive (a b c : α) : Ico a b ∩ Ico b c = ∅

{α : Type u_2}
[PartialOrder α]
[LocallyFiniteOrder α]
[DecidableEq α]
(a b c : α)


/-- The first part of the third cosimplicial identity -/
@[reassoc]
theorem δ_comp_σ_self {n} {i : Fin (n + 1)} : X.δ (Fin.castSucc i) ≫ X.σ i = 𝟙 _

(X : CategoryTheory.CosimplicialObject C)

X.δ i.castSucc ≫ X.σ i = 𝟙 (X.obj (SimplexCategory.mk n))


lemma toAddMonoid_injective : Injective (toAddMonoid : (∀ i, β i →+ γ) → (⨁ i, β i) →+ γ)

{ι : Type v}
{β : ι → Type w}
[(i : ι) → AddCommMonoid (β i)]
[DecidableEq ι]
{γ : Type u₁}
[AddCommMonoid γ]


@[to_additive]
theorem mem_iSup_of_directed {S : ι → Subsemigroup M} (hS : Directed (· ≤ ·) S) {x : M} :
    (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i

(hS : Directed (fun x x_1 => x ≤ x_1) S)


theorem iteratedFDerivWithin_succ_apply_left {n : ℕ} (m : Fin (n + 1) → E) :
    (iteratedFDerivWithin 𝕜 (n + 1) f s x : (Fin (n + 1) → E) → F) m =
      (fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n f s) s x : E → E[×n]→L[𝕜] F) (m 0) (tail m)

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{s : Set E}
{f : E → F}
{x : E}
{n : ℕ}
(m : Fin (n + 1) → E)

(iteratedFDerivWithin 𝕜 (n + 1) f s x) m = ((fderivWithin 𝕜 (iteratedFDerivWithin 𝕜 n f s) s x) (m 0)) (Fin.tail m)


@[simp]
theorem mkUnits_eq {u : ℚ_[p]} (h : ‖u‖ = 1) : ((mkUnits h : ℤ_[p]) : ℚ_[p]) = u

{p : ℕ}
[hp : Fact (Nat.Prime p)]
{u : ℚ_[p]}
(h : ‖u‖ = 1)


theorem setToSimpleFunc_nonneg {m : MeasurableSpace α} (T : Set α → G' →L[ℝ] G'')
    (hT_nonneg : ∀ s x, 0 ≤ x → 0 ≤ T s x) (f : α →ₛ G') (hf : 0 ≤ f) :
    0 ≤ setToSimpleFunc T f

(hT_nonneg : ∀ (s : Set α) (x : G'), 0 ≤ x → 0 ≤ (T s) x)

0 ≤ MeasureTheory.SimpleFunc.setToSimpleFunc T f


@[simp]
theorem jacobson_eq_top_iff : jacobson I = ⊤ ↔ I = ⊤


/-- If `f` is integrable on a box `I` along `l`, then for any fixed subset `s` of `I` that can be
represented as a finite union of boxes, the integral sums of `f` over tagged prepartitions that
cover exactly `s` form a Cauchy “sequence” along `l`. -/
theorem cauchy_map_integralSum_toFilteriUnion (h : Integrable I l f vol) (π₀ : Prepartition I) :
    Cauchy ((l.toFilteriUnion I π₀).map (integralSum f vol))

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

Cauchy (Filter.map (BoxIntegral.integralSum f vol) (l.toFilteriUnion I π₀))


@[simp] theorem val_two {n : Nat} : (2 : Fin (n + 3)).val = 2


theorem prime_of_irreducible_absNorm_span {a : S} (ha : a ≠ 0)
    (hI : Irreducible (Ideal.absNorm (Ideal.span ({a} : Set S)))) : Prime a

(hI : Irreducible (Ideal.absNorm (Ideal.span {a})))


theorem pow_sup_pow_eq_top {m n : ℕ} (h : I ⊔ J = ⊤) : I ^ m ⊔ J ^ n = ⊤

{R : Type u}
[CommSemiring R]
{I J : Ideal R}
{m n : ℕ}
(h : I ⊔ J = ⊤)


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

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

(∃ r, 0 < r ∧ x = r • y) ↔ SameRay R x y


theorem AlgebraicIndependent.image {ι} {s : Set ι} {f : ι → A}
    (hs : AlgebraicIndependent R fun x : s => f x) :
    AlgebraicIndependent R fun x : f '' s => (x : A)

(hs : AlgebraicIndependent R fun x => f ↑x)


theorem inter_mem {s t : Set α} (hs : s ∈ f) (ht : t ∈ f) : s ∩ t ∈ f

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


theorem boundedSpace_induced_iff {α β : Type*} [Bornology β] {f : α → β} :
    @BoundedSpace α (Bornology.induced f) ↔ IsBounded (range f)

{α : Type u_5}
{β : Type u_6}
[Bornology β]
{f : α → β}

BoundedSpace α ↔ Bornology.IsBounded (Set.range f)


@[simp]
theorem bitwise_bit (f : Bool → Bool → Bool) (a m b n) :
    bitwise f (bit a m) (bit b n) = bit (f a b) (bitwise f m n)

(f : Bool → Bool → Bool)
(a : Bool)
(m : ℤ)
(b : Bool)
(n : ℤ)

Int.bitwise f (Int.bit a m) (Int.bit b n) = Int.bit (f a b) (Int.bitwise f m n)


protected theorem continuousOn : ContinuousOn e' e'.source

[TopologicalSpace (Bundle.TotalSpace F E)]

(e' : Trivialization F Bundle.TotalSpace.proj)


theorem toDual_injective : Injective b.toDual

{R : Type uR}
{M : Type uM}
{ι : Type uι}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[DecidableEq ι]
(b : Basis ι R M)


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

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


@[simp]
theorem ofBoolRing_toBoolRing (a : α) : ofBoolRing (toBoolRing a) = a


theorem mem_iff (s : Set β) (x : β) : x ∈ l s ↔ ∀ S : α, s ⊆ S → x ∈ S

{α : Type u_1}
{β : Type u_4}
[SetLike α β]
(l : LowerAdjoint SetLike.coe)
(s : Set β)
(x : β)

x ∈ l.toFun s ↔ ∀ (S : α), s ⊆ ↑S → x ∈ S


/-- Given a dense set `t`, then the range of `deriv f` is contained in the closure of the submodule
spanned by the image of `t`. -/
theorem range_deriv_subset_closure_span_image
    (f : 𝕜 → F) {t : Set 𝕜} (h : Dense t) :
    range (deriv f) ⊆ closure (Submodule.span 𝕜 (f '' t))

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
(f : 𝕜 → F)
{t : Set 𝕜}
(h : Dense t)

Set.range (deriv f) ⊆ closure ↑(Submodule.span 𝕜 (f '' t))


/-- Allows for more efficient code for `padicValNat` -/
@[csimp]
theorem padicValNat_eq_maxPowDiv : @padicValNat = @maxPowDiv


@[simp]
theorem unop_bot : (⊥ : Subalgebra R Aᵐᵒᵖ).unop = ⊥

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]


theorem sdiff_liminf (a : α) : a \ liminf u f = limsup (fun b => a \ u b) f

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

a \ Filter.liminf u f = Filter.limsup (fun b => a \ u b) f


lemma LeftTotal.rel_exists (h : LeftTotal R) :
    ((R ⇒ (· → ·)) ⇒ (· → ·)) (fun p => ∃i, p i) (fun q => ∃i, q i)

{α : Type u₁}
{β : Type u₂}
{R : α → β → Prop}
(h : Relator.LeftTotal R)

((R ⇒ fun x x_1 => x → x_1) ⇒ fun x x_1 => x → x_1) (fun p => ∃ i, p i) fun q => ∃ i, q i


private lemma aux (h : ∀ t ∈ 𝒜, a ∉ t) (ht : 𝒜.Shatters t) : a ∉ t

{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{t : Finset α}
{a : α}
(h : ∀ t ∈ 𝒜, a ∉ t)
(ht : 𝒜.Shatters t)


theorem pathGraph_two_eq_top : pathGraph 2 = ⊤


theorem dOne_comp_dZero : dOne A ∘ₗ dZero A = 0

{k G : Type u}
[CommRing k]
[Group G]
(A : Rep k G)

groupCohomology.dOne A ∘ₗ groupCohomology.dZero A = 0


theorem balancedCore_subset (s : Set E) : balancedCore 𝕜 s ⊆ s

{𝕜 : Type u_1}
{E : Type u_2}
[SeminormedRing 𝕜]
[SMul 𝕜 E]
(s : Set E)


/-- The *Euler Product* for a multiplicative arithmetic function `f` with values in a
complete normed commutative ring `R`: if `‖f ·‖` is summable, then
`∏' p : Nat.Primes, ∑' e, f (p ^ e) = ∑' n, f n`.
This version is stated in terms of `HasProd`. -/
nonrec theorem IsMultiplicative.eulerProduct_hasProd {f : ArithmeticFunction R}
    (hf : f.IsMultiplicative) (hsum : Summable (‖f ·‖)) :
    HasProd (fun p : Primes ↦ ∑' e, f (p ^ e)) (∑' n, f n)

{R : Type u_1}
[NormedCommRing R]
[CompleteSpace R]
{f : ArithmeticFunction R}
(hf : f.IsMultiplicative)
(hsum : Summable fun x => ‖f x‖)

HasProd (fun p => ∑' (e : ℕ), f (↑p ^ e)) (∑' (n : ℕ), f n)


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

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


/-- The stopped process of an adapted process with continuous paths is adapted. -/
theorem Adapted.stoppedProcess [MetrizableSpace ι] (hu : Adapted f u)
    (hu_cont : ∀ ω, Continuous fun i => u i ω) (hτ : IsStoppingTime f τ) :
    Adapted f (stoppedProcess u τ)

{u : ι → Ω → β}

(hu_cont : ∀ (ω : Ω), Continuous fun i => u i ω)

MeasureTheory.Adapted f (MeasureTheory.stoppedProcess u τ)


theorem tot : affineSpan k (range b) = ⊤

{ι : Type u_1}
{k : Type u_3}
{V : Type u_4}
{P : Type u_5}
[AddCommGroup V]
[AffineSpace V P]
[Ring k]
[Module k V]
(b : AffineBasis ι k P)


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

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


@[simp]
theorem sheafifyMap_id (P : Cᵒᵖ ⥤ D) : sheafifyMap J (𝟙 P) = 𝟙 (sheafify J P)

(J : CategoryTheory.GrothendieckTopology C)

CategoryTheory.sheafifyMap J (CategoryTheory.CategoryStruct.id P) =
  CategoryTheory.CategoryStruct.id (CategoryTheory.sheafify J P)


theorem padicValNat_prime_prime_pow {q : ℕ} [hp : Fact p.Prime] [hq : Fact q.Prime]
    (n : ℕ) (neq : p ≠ q) : padicValNat p (q ^ n) = 0

{p q : ℕ}
[hp : Fact (Nat.Prime p)]
[hq : Fact (Nat.Prime q)]
(n : ℕ)
(neq : p ≠ q)


theorem Mon_tensor_mul_one (M N : Mon_ C) :
    (M.X ⊗ N.X) ◁ ((λ_ (𝟙_ C)).inv ≫ (M.one ⊗ N.one)) ≫
        tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
      (ρ_ (M.X ⊗ N.X)).hom

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

(M.X ⊗ N.X) ◁ ((λ_ (𝟙_ C)).inv ≫ (M.one ⊗ N.one)) ≫ CategoryTheory.tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
  (ρ_ (M.X ⊗ N.X)).hom


theorem eq_singleton_or_nontrivial (ha : a ∈ s) : s = {a} ∨ s.Nontrivial

{α : Type u_1}
{s : Finset α}
{a : α}
(ha : a ∈ s)


@[to_additive (attr := simp)]
lemma inf'_one [SemilatticeInf β] (f : α → β) : inf' 1 one_nonempty f = f 1

{α : Type u_2}
{β : Type u_3}
[Zero α]
[SemilatticeInf β]
(f : α → β)


protected theorem congr {X Y : Ω → E} (hXY : X =ᵐ[ℙ] Y) : pdf X ℙ μ = pdf Y ℙ μ

{Ω : Type u_1}
{E : Type u_2}
[MeasurableSpace E]
{m : MeasurableSpace Ω}
{ℙ : MeasureTheory.Measure Ω}
{μ : MeasureTheory.Measure E}
{X Y : Ω → E}
(hXY : X =ᵐ[ℙ] Y)

MeasureTheory.pdf X ℙ μ = MeasureTheory.pdf Y ℙ μ


/-- An alternative constructor of `LTSeries` from a strictly monotone function. -/
@[simps]
def mk (length : ℕ) (toFun : Fin (length + 1) → α) (strictMono : StrictMono toFun) :
    LTSeries α

{α : Type u_1}
[Preorder α]
(length : ℕ)
(toFun : Fin (length + 1) → α)
(strictMono : StrictMono toFun)

∀ (a : Fin (length + 1)), (LTSeries.mk length toFun strictMono).toFun a = toFun a


@[ext]
theorem ext {A B : DifferentialObject S C} {f g : A ⟶ B} (w : f.f = g.f := by aesop_cat) : f = g

{A B : CategoryTheory.DifferentialObject S C}


theorem Nodup.of_append_right : Nodup (l₁ ++ l₂) → Nodup l₂


theorem CovBy.image (f : α ↪o β) (hab : a ⋖ b) (h : (range f).OrdConnected) : f a ⋖ f b

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
{a b : α}
(f : α ↪o β)
(hab : a ⋖ b)
(h : (Set.range ⇑f).OrdConnected)


@[to_additive]
theorem closure_toSubmonoid (S : Set G) :
    (closure S).toSubmonoid = Submonoid.closure (S ∪ S⁻¹)

(AddSubgroup.closure S).toAddSubmonoid = AddSubmonoid.closure (S ∪ -S)


lemma sq_eq_sq_iff_abs_eq_abs (a b : α) : a ^ 2 = b ^ 2 ↔ |a| = |b|

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


@[to_additive]
theorem continuousSMul_inf {t₁ t₂ : TopologicalSpace X} [@ContinuousSMul M X _ _ t₁]
    [@ContinuousSMul M X _ _ t₂] : @ContinuousSMul M X _ _ (t₁ ⊓ t₂)

{M : Type u_2}
{X : Type u_3}
[TopologicalSpace M]
[SMul M X]
{t₁ t₂ : TopologicalSpace X}
[ContinuousSMul M X]
[ContinuousSMul M X]


theorem iInf_biUnion (s : Finset γ) (t : γ → Finset α) (f : α → β) :
    ⨅ y ∈ s.biUnion t, f y = ⨅ (x ∈ s) (y ∈ t x), f y

{α : Type u_2}
{β : Type u_3}
{γ : Type u_4}
[CompleteLattice β]
[DecidableEq α]
(s : Finset γ)
(t : γ → Finset α)
(f : α → β)

⨅ y ∈ s.biUnion t, f y = ⨅ x ∈ s, ⨅ y ∈ t x, f y


theorem ofReal_cosh_ofReal_re (x : ℝ) : ((cosh x).re : ℂ) = cosh x


/-- Given `(S : Solution)`, we have that `λ ∣ (S.a + η ^ 2 * S.b)`. -/
lemma lambda_dvd_a_add_eta_sq_mul_b : λ ∣ (S.a + η ^ 2 * S.b)

(S : FermatLastTheoremForThreeGen.Solution hζ)

hζ.toInteger - 1 ∣ S.a + ↑⋯.unit ^ 2 * S.b


lemma monotone_castPred_comp (hf : ∀ a, f a ≠ last n) (hf₂ : Monotone f) :
    Monotone (fun a => castPred (f a) (hf a))

{n : ℕ}
{α : Type u_1}
[Preorder α]
{f : α → Fin (n + 1)}
(hf : ∀ (a : α), f a ≠ Fin.last n)
(hf₂ : Monotone f)


/-- The natural isomorphism `F(A ⨯ -) ≅ FA ⨯ F-`, provided each `prodComparison F A B` is an
isomorphism (as `B` changes).
-/
-- @[simps (config := { rhsMd := semireducible })] -- Porting note: no config for semireducible
@[simps]
def prodComparisonNatIso [HasBinaryProducts C] [HasBinaryProducts D] (A : C)
    [∀ B, IsIso (prodComparison F A B)] :
    prod.functor.obj A ⋙ F ≅ F ⋙ prod.functor.obj (F.obj A)

[∀ (B : C), CategoryTheory.IsIso (CategoryTheory.Limits.prodComparison F A B)]

(CategoryTheory.Limits.prodComparisonNatIso F A).hom = CategoryTheory.Limits.prodComparisonNatTrans F A


/-- Taking the involute of the product a list of $n$ vectors lifted via `ι` is equivalent to
premultiplying by ${-1}^n$. -/
theorem involute_prod_map_ι :
    ∀ l : List M, involute (l.map <| ι Q).prod = (-1 : R) ^ l.length • (l.map <| ι Q).prod

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

CliffordAlgebra.involute (List.map (⇑(CliffordAlgebra.ι Q)) l).prod =
  (-1) ^ l.length • (List.map (⇑(CliffordAlgebra.ι Q)) l).prod


theorem sumsq_nonneg (x : α → ℕ) : ∀ l, 0 ≤ sumsq l x

{α : Type u_1}
(x : α → ℕ)
(l : List (Poly α))


theorem EuclideanSpace.edist_eq {𝕜 : Type*} [RCLike 𝕜] {n : Type*} [Fintype n]
    (x y : EuclideanSpace 𝕜 n) : edist x y = (∑ i, edist (x i) (y i) ^ 2) ^ (1 / 2 : ℝ)

{𝕜 : Type u_8}
[RCLike 𝕜]
{n : Type u_9}
[Fintype n]
(x y : EuclideanSpace 𝕜 n)

edist x y = (∑ i : n, edist (x i) (y i) ^ 2) ^ (1 / 2)


/-- The scalar multiplication of two `C^n` functions at a point is `C^n` at this point. -/
theorem ContDiffAt.smul {f : E → 𝕜} {g : E → F} (hf : ContDiffAt 𝕜 n f x)
    (hg : ContDiffAt 𝕜 n g x) : ContDiffAt 𝕜 n (fun x => f x • g x) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type uE}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type uF}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{x : E}
{n : ℕ∞}
{f : E → 𝕜}
{g : E → F}
(hf : ContDiffAt 𝕜 n f x)
(hg : ContDiffAt 𝕜 n g x)


protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
    extChartAt (IB.prod 𝓘(𝕜, F)) x =
      (trivializationAt F E x.proj).toPartialEquiv ≫
        (extChartAt IB x.proj).prod (PartialEquiv.refl F)

[TopologicalSpace (Bundle.TotalSpace F E)]


lemma baseChange_ψ₂ : (W.baseChange B).ψ₂ = (W.baseChange A).ψ₂.map (mapRingHom f)

{R : Type r}
{S : Type s}
[CommRing R]
[CommRing S]
(W : WeierstrassCurve R)
[Algebra R S]
{A : Type u}
[CommRing A]
[Algebra R A]
[Algebra S A]
[IsScalarTower R S A]
{B : Type v}
[CommRing B]
[Algebra R B]
[Algebra S B]
[IsScalarTower R S B]
(f : A →ₐ[S] B)

(W.baseChange B).ψ₂ = Polynomial.map (Polynomial.mapRingHom ↑f) (W.baseChange A).ψ₂


lemma isClosed_iff_flat {F : Iic M.E} : M.subtypeClosure.IsClosed F ↔ M.Flat F

{α : Type u_2}
{M : Matroid α}
{F : ↑(Set.Iic M.E)}


theorem partNum_none_iff_s_none : g.partNums.get? n = none ↔ g.s.get? n = none

{α : Type u_1}
{g : GenContFract α}
{n : ℕ}


theorem Finset.measurableSet_biUnion {f : β → Set α} (s : Finset β)
    (h : ∀ b ∈ s, MeasurableSet (f b)) : MeasurableSet (⋃ b ∈ s, f b)

{α : Type u_1}
{β : Type u_2}
{m : MeasurableSpace α}
{f : β → Set α}
(s : Finset β)
(h : ∀ b ∈ s, MeasurableSet (f b))


theorem aestronglyMeasurable_exp_mul_sum {X : ι → Ω → ℝ} {s : Finset ι}
    (h_int : ∀ i ∈ s, AEStronglyMeasurable (fun ω => exp (t * X i ω)) μ) :
    AEStronglyMeasurable (fun ω => exp (t * (∑ i ∈ s, X i) ω)) μ

{X : ι → Ω → ℝ}

(h_int : ∀ i ∈ s, MeasureTheory.AEStronglyMeasurable (fun ω => rexp (t * X i ω)) μ)

MeasureTheory.AEStronglyMeasurable (fun ω => rexp (t * (∑ i ∈ s, X i) ω)) μ


theorem map_comap_le {S : L.Substructure N} {f : M →[L] N} : (S.comap f).map f ≤ S

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

FirstOrder.Language.Substructure.map f (FirstOrder.Language.Substructure.comap f S) ≤ S


theorem _root_.Prod.GameAdd.to_sym2 {a₁ a₂ b₁ b₂ : α} (h : Prod.GameAdd rα rα (a₁, b₁) (a₂, b₂)) :
    Sym2.GameAdd rα s(a₁, b₁) s(a₂, b₂)


theorem interedges_biUnion (s : Finset ι) (t : Finset κ) (f : ι → Finset α) (g : κ → Finset β) :
    interedges r (s.biUnion f) (t.biUnion g) =
      (s ×ˢ t).biUnion fun ab ↦ interedges r (f ab.1) (g ab.2)

{ι : Type u_2}
{κ : Type u_3}
{α : Type u_4}
{β : Type u_5}
(r : α → β → Prop)
[(a : α) → DecidablePred (r a)]
[DecidableEq α]
[DecidableEq β]
(s : Finset ι)
(t : Finset κ)
(f : ι → Finset α)
(g : κ → Finset β)

Rel.interedges r (s.biUnion f) (t.biUnion g) = (s ×ˢ t).biUnion fun ab => Rel.interedges r (f ab.1) (g ab.2)


/-- Eta rule for structured arrows. -/
@[simps!]
def eta (f : StructuredArrow S T) : f ≅ mk f.hom

(f : CategoryTheory.StructuredArrow S T)


/-- The subfunctor of `F` obtained by restricting to the eventual range at each index. -/
@[simps]
def toEventualRanges : J ⥤ Type v

{J : Type u}
[CategoryTheory.Category.{u_1, u} J]
(F : J ⥤ Type v)
[CategoryTheory.IsCofilteredOrEmpty J]
(j : J)

F.toEventualRanges.obj j = ↑(F.eventualRange j)


@[simp]
theorem inv_hom_id (f : X ⟶ Y) [I : IsIso f] : inv f ≫ f = 𝟙 Y

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

CategoryTheory.CategoryStruct.comp (CategoryTheory.inv f) f = CategoryTheory.CategoryStruct.id Y


theorem Icc_subset_segment : Icc x y ⊆ [x -[𝕜] y]

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
{x y : 𝕜}


theorem not_imp_of_and_not : a ∧ ¬b → ¬(a → b)


/-- Extensionality rule for congruence relations. -/
@[to_additive (attr := ext) "Extensionality rule for additive congruence relations."]
theorem ext {c d : Con M} (H : ∀ x y, c x y ↔ d x y) : c = d

{M : Type u_1}
[Mul M]
{c d : Con M}
(H : ∀ (x y : M), c x y ↔ d x y)


theorem of_mono_eq_zero {X Y : C} (f : X ⟶ Y) [Mono f] (h : f = 0) : IsZero X


theorem map_toOuterMeasure (hf : AEMeasurable f μ) :
    (μ.map f).toOuterMeasure = (OuterMeasure.map f μ.toOuterMeasure).trim

{α : Type u_1}
{β : Type u_2}
{m0 : MeasurableSpace α}
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{f : α → β}
(hf : AEMeasurable f μ)

(MeasureTheory.Measure.map f μ).toOuterMeasure = ((MeasureTheory.OuterMeasure.map f) μ.toOuterMeasure).trim


theorem eval₂_sum (p : T[X]) (g : ℕ → T → R[X]) (x : S) :
    (p.sum g).eval₂ f x = p.sum fun n a => (g n a).eval₂ f x

{R : Type u}
{S : Type v}
{T : Type w}
[Semiring R]
[Semiring S]
(f : R →+* S)
[Semiring T]
(p : T[X])
(g : ℕ → T → R[X])
(x : S)

Polynomial.eval₂ f x (p.sum g) = p.sum fun n a => Polynomial.eval₂ f x (g n a)


/-- An angle in a right-angled triangle expressed using `arctan`. -/
theorem angle_eq_arctan_of_angle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∠ p₁ p₂ p₃ = π / 2)
    (h0 : p₃ ≠ p₂) : ∠ p₂ p₃ p₁ = Real.arctan (dist p₁ p₂ / dist p₃ p₂)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
{p₁ p₂ p₃ : P}
(h : ∠ p₁ p₂ p₃ = π / 2)
(h0 : p₃ ≠ p₂)


theorem IsBigOWith.eventually_mul_div_cancel (h : IsBigOWith c l u v) : u / v * v =ᶠ[l] u

{α : Type u_1}
{𝕜 : Type u_15}
[NormedDivisionRing 𝕜]
{c : ℝ}
{l : Filter α}
{u v : α → 𝕜}
(h : Asymptotics.IsBigOWith c l u v)


theorem pbind_map (f : α → β) (x : Option α) (g : ∀ b : β, b ∈ x.map f → Option γ) :
    pbind (Option.map f x) g = x.pbind fun a h ↦ g (f a) (mem_map_of_mem _ h)

(g : (b : β) → b ∈ Option.map f x → Option γ)

(Option.map f x).pbind g = x.pbind fun a h => g (f a) ⋯


@[to_additive]
theorem inv_closure : ∀ s : Set G, (closure s)⁻¹ = closure s⁻¹

{G : Type w}
[TopologicalSpace G]
[InvolutiveInv G]
[ContinuousInv G]
(s : Set G)


@[simp] lemma supIrredLowerSet_apply (a : α) : supIrredLowerSet a = ⟨Iic a, supIrred_Iic _⟩

{α : Type u_1}
[PartialOrder α]
[Finite α]
(a : α)

OrderIso.supIrredLowerSet a = ⟨LowerSet.Iic a, ⋯⟩


@[to_additive]
theorem fixedBy_subset_fixedBy_zpow (g : G) (j : ℤ) :
    fixedBy α g ⊆ fixedBy α (g ^ j)

(α : Type u_1)
{G : Type u_2}
[Group G]
[MulAction G α]
(g : G)
(j : ℤ)

MulAction.fixedBy α g ⊆ MulAction.fixedBy α (g ^ j)


@[ext]
theorem ext {h h' : α ≃ᵤ β} (H : ∀ x, h x = h' x) : h = h'

{α : Type u}
{β : Type u_1}
[UniformSpace α]
[UniformSpace β]
{h h' : α ≃ᵤ β}
(H : ∀ (x : α), h x = h' x)


/-- The braiding isomorphism which swaps a binary coproduct. -/
@[simps]
def coprod.braiding (P Q : C) : P ⨿ Q ≅ Q ⨿ P

(CategoryTheory.Limits.coprod.braiding P Q).hom =
  CategoryTheory.Limits.coprod.desc CategoryTheory.Limits.coprod.inr CategoryTheory.Limits.coprod.inl


@[simp]
theorem map_toSubring : (p.toSubring T hp).map (Subring.subtype T) = p

{R : Type u}
[Ring R]
(p : R[X])
(T : Subring R)
(hp : ↑p.coeffs ⊆ ↑T)

Polynomial.map T.subtype (p.toSubring T hp) = p


theorem mul_le_mul_of_nonpos_of_nonneg [ExistsAddOfLE α] [MulPosMono α] [PosMulMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hac : a ≤ c) (hdb : d ≤ b) (hc : c ≤ 0) (hb : 0 ≤ b) : a * b ≤ c * d

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

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


theorem le_pred_castSucc_iff {a b : Fin (n + 1)} (ha : castSucc a ≠ 0) :
    b ≤ (castSucc a).pred ha ↔ b < a

{n : ℕ}
{a b : Fin (n + 1)}
(ha : a.castSucc ≠ 0)


/-- An affine combination is unaffected by changing the weights to the
corresponding indicator function and adding points to the set. -/
theorem affineCombination_indicator_subset (w : ι → k) (p : ι → P) {s₁ s₂ : Finset ι}
    (h : s₁ ⊆ s₂) :
    s₁.affineCombination k p w = s₂.affineCombination k p (Set.indicator (↑s₁) w)

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

(Finset.affineCombination k s₁ p) w = (Finset.affineCombination k s₂ p) ((↑s₁).indicator w)


/--
Proof by cases on an `Or`. If `a ∨ b`, and both `a` and `b` imply
proposition `c`, then `c` is true.
-/
theorem Or.elim {c : Prop} (h : Or a b) (left : a → c) (right : b → c) : c

{a b c : Prop}
(h : Or a b)
(left : a → c)
(right : b → c)


/-- The power series expansion of `Real.cosh`. -/
lemma hasSum_cosh (r : ℝ) : HasSum (fun n  ↦ r ^ (2 * n) / ↑(2 * n)!) (cosh r)

HasSum (fun n => r ^ (2 * n) / ↑(2 * n)!) (Real.cosh r)


theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂

{x₁ x₂ y₁ y₂ : SetTheory.PGame}
(hx₁ : x₁.Numeric)
(hx₂ : x₂.Numeric)
(hy₁ : y₁.Numeric)
(hy₂ : y₂.Numeric)
(hx : x₁ ≈ x₂)
(hy : y₁ ≈ y₂)


@[simp]
theorem toOuterMeasure_caratheodory : p.toOuterMeasure.caratheodory = ⊤


@[reassoc (attr := simp)]
theorem inv_hom_id_tensor' {V W X Y Z : C} (f : V ⟶ W) [IsIso f] (g : X ⟶ Y) (h : Y ⟶ Z) :
    (inv f ⊗ g) ≫ (f ⊗ h) = (𝟙 W ⊗ g) ≫ (𝟙 W ⊗ h)

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

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


@[simp]
theorem eval₂_mul_X : eval₂ f x (p * X) = eval₂ f x p * x

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

Polynomial.eval₂ f x (p * Polynomial.X) = Polynomial.eval₂ f x p * x


theorem not_not_intro {p : Prop} (h : p) : ¬ ¬ p


/-- An angle in a right-angled triangle expressed using `arctan`, version subtracting vectors. -/
theorem oangle_sub_left_eq_arctan_of_oangle_eq_pi_div_two {x y : V} (h : o.oangle x y = ↑(π / 2)) :
    o.oangle (x - y) x = Real.arctan (‖y‖ / ‖x‖)

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

o.oangle (x - y) x = ↑(Real.arctan (‖y‖ / ‖x‖))


theorem image_neg_Iic : Neg.neg '' Iic a = Ici (-a)

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


theorem hasDerivAt_id : HasDerivAt id 1 x

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


theorem map₂_map_left (f : γ → β → δ) (g : α → γ) :
    map₂ f (a.map g) b = map₂ (fun a b => f (g a) b) a b

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
{a : Option α}
{b : Option β}
(f : γ → β → δ)
(g : α → γ)

Option.map₂ f (Option.map g a) b = Option.map₂ (fun a b => f (g a) b) a b


theorem ofReal_inv_of_pos {x : ℝ} (hx : 0 < x) : ENNReal.ofReal x⁻¹ = (ENNReal.ofReal x)⁻¹


theorem Separable.of_mul_right {f g : R[X]} (h : (f * g).Separable) : g.Separable

{R : Type u}
[CommSemiring R]
{f g : R[X]}
(h : (f * g).Separable)


/-- If `i` is an `F`-algebra homomorphism from `E` to `K`, then `i x` is contained in
`separableClosure F K` if and only if `x` is contained in `separableClosure F E`. -/
theorem map_mem_separableClosure_iff (i : E →ₐ[F] K) {x : E} :
    i x ∈ separableClosure F K ↔ x ∈ separableClosure F E

{F : Type u}
{E : Type v}
[Field F]
[Field E]
[Algebra F E]
{K : Type w}
[Field K]
[Algebra F K]
(i : E →ₐ[F] K)
{x : E}


@[to_additive]
theorem mulSupport_mul_inv : (mulSupport fun x => f x * (g x)⁻¹) ⊆ mulSupport f ∪ mulSupport g

{α : Type u_1}
{G : Type u_9}
[SubtractionMonoid G]
(f g : α → G)

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


theorem perm_inv_on_of_perm_on_finset {s : Finset α} {f : Perm α} (h : ∀ x ∈ s, f x ∈ s) {y : α}
    (hy : y ∈ s) : f⁻¹ y ∈ s

{α : Type u}
{s : Finset α}
{f : Equiv.Perm α}
(h : ∀ x ∈ s, f x ∈ s)
{y : α}
(hy : y ∈ s)


@[simp]
theorem neg_ofLists (L R : List PGame) :
    -ofLists L R = ofLists (R.map fun x => -x) (L.map fun x => -x)

-SetTheory.PGame.ofLists L R = SetTheory.PGame.ofLists (List.map (fun x => -x) R) (List.map (fun x => -x) L)


/-- If the codomain of an injective linear map is finite dimensional, the domain must be as well. -/
theorem of_injective (f : V →ₗ[K] V₂) (w : Function.Injective f) [FiniteDimensional K V₂] :
    FiniteDimensional K V

{K : Type u}
{V : Type v}
[DivisionRing K]
[AddCommGroup V]
[Module K V]
{V₂ : Type v'}
[AddCommGroup V₂]
[Module K V₂]
(f : V →ₗ[K] V₂)
(w : Function.Injective ⇑f)
[FiniteDimensional K V₂]


lemma truncatedInf_union (hs : a ∈ upperClosure s) (ht : a ∈ upperClosure t) :
    truncatedInf (s ∪ t) a = truncatedInf s a ⊓ truncatedInf t a

{α : Type u_1}
[SemilatticeInf α]
[BoundedOrder α]
[DecidableRel fun x x_1 => x ≤ x_1]
{s t : Finset α}
{a : α}
[DecidableEq α]
(hs : a ∈ upperClosure ↑s)
(ht : a ∈ upperClosure ↑t)

(s ∪ t).truncatedInf a = s.truncatedInf a ⊓ t.truncatedInf a


/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F

(F : CategoryTheory.Functor Cᵒᵖ (Type w))

(hc : CategoryTheory.Limits.IsColimit c)

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Discrete.functor fun x => Opposite.op (X x)) F]

CategoryTheory.Presieve.IsSheafFor F (CategoryTheory.Presieve.ofArrows X c.inj)


@[to_additive le_max_of_two_nsmul_le_add]
theorem le_max_of_sq_le_mul {a b c : M} (h : a ^ 2 ≤ b * c) : a ≤ max b c

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

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


@[parity_simps] lemma even_mul : Even (m * n) ↔ Even m ∨ Even n


@[simp]
theorem eval₂_sub : (p - q).eval₂ f g = p.eval₂ f g - q.eval₂ f g

{R : Type u}
{S : Type v}
{σ : Type u_1}
[CommRing R]
(p : MvPolynomial σ R)
{q : MvPolynomial σ R}
[CommRing S]
(f : R →+* S)
(g : σ → S)

MvPolynomial.eval₂ f g (p - q) = MvPolynomial.eval₂ f g p - MvPolynomial.eval₂ f g q


/-- The `n`th element of a list -/
@[simp]
theorem getElem?_ofFn {n} (f : Fin n → α) (i) : (ofFn f)[i]? = ofFnNthVal f i

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


@[simp]
theorem empty.nonempty_embedding_iff :
    Nonempty (M ↪[Language.empty] N) ↔ Cardinal.lift.{w'} #M ≤ Cardinal.lift.{w} #N

{M : Type w}
{N : Type w'}
[FirstOrder.Language.empty.Structure M]
[FirstOrder.Language.empty.Structure N]

Nonempty (FirstOrder.Language.empty.Embedding M N) ↔ Cardinal.lift.{w', w} #M ≤ Cardinal.lift.{w, w'} #N


@[reassoc (attr := simp)]
lemma wideCospan.limitIsoPi_inv_comp_pi [Finite ι] (X : C) (j : ι) :
    (wideCospan.limitIsoPi ι X).inv ≫ WidePullback.π _ j = Pi.π _ j

(CategoryTheory.CechNerveTerminalFrom.wideCospan.limitIsoPi ι X).inv ≫
    CategoryTheory.Limits.WidePullback.π (fun x => CategoryTheory.Limits.terminal.from X) j =
  CategoryTheory.Limits.Pi.π (fun x => X) j


theorem IsPushout.IsVanKampen.isPullback_of_mono_left [Mono f] {H : IsPushout f g h i}
    (H' : H.IsVanKampen) : IsPullback f g h i

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{W X Y Z : C}
{f : W ⟶ X}
{g : W ⟶ Y}
{h : X ⟶ Z}
{i : Y ⟶ Z}
[CategoryTheory.Mono f]
{H : CategoryTheory.IsPushout f g h i}
(H' : H.IsVanKampen)


@[reassoc (attr := simp)]
theorem biprod.lift_fst {W X Y : C} [HasBinaryBiproduct X Y] (f : W ⟶ X) (g : W ⟶ Y) :
    biprod.lift f g ≫ biprod.fst = f

CategoryTheory.Limits.biprod.lift f g ≫ CategoryTheory.Limits.biprod.fst = f


lemma IsIntegralCurve.isIntegralCurveOn (h : IsIntegralCurve γ v) (s : Set ℝ) :
    IsIntegralCurveOn γ v s

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{H : Type u_2}
[TopologicalSpace H]
{I : ModelWithCorners ℝ E H}
{M : Type u_3}
[TopologicalSpace M]
[ChartedSpace H M]
[SmoothManifoldWithCorners I M]
{γ : ℝ → M}
{v : (x : M) → TangentSpace I x}
(h : IsIntegralCurve γ v)
(s : Set ℝ)


@[ext]
protected theorem ext {s t : NonemptyCompacts α} (h : (s : Set α) = t) : s = t

{s t : TopologicalSpace.NonemptyCompacts α}


/--
If `B` is a strict bicategory and `I` is a (1-)category, any functor (of 1-categories) `I ⥤ B` can
be promoted to a pseudofunctor from `LocallyDiscrete I` to `B`.
-/
@[simps]
def Functor.toPseudoFunctor (F : I ⥤ B) : Pseudofunctor (LocallyDiscrete I) B

{I : Type u₁}
[CategoryTheory.Category.{v₁, u₁} I]
{B : Type u₂}
[CategoryTheory.Bicategory B]
[CategoryTheory.Bicategory.Strict B]
(F : CategoryTheory.Functor I B)
(i : CategoryTheory.LocallyDiscrete I)

F.toPseudoFunctor.mapId i = CategoryTheory.eqToIso ⋯


lemma dblY_smul (P : Fin 3 → R) (u : R) : W'.dblY (u • P) = (u ^ 4) ^ 3 * W'.dblY P

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


protected theorem le_sup_right (f g : α →ₘ[μ] β) : g ≤ f ⊔ g

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


theorem cos_add_sin_I : cos x + sin x * I = exp (x * I)

Complex.cos x + Complex.sin x * Complex.I = Complex.exp (x * Complex.I)


@[norm_cast]
theorem mul_to_nat : ∀ m n, ((m * n : Num) : ℕ) = m * n


@[simp] -- Porting note: new attr
theorem cycleType_inv (σ : Perm α) : σ⁻¹.cycleType = σ.cycleType

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


/-- Consider a nonnegative function `φ` with integral one, decaying quickly enough at infinity.
Then suitable renormalizations of `φ` form a sequence of peak functions around any point:
`∫ (c ^ d * φ (c • (x₀ - x)) • g x` converges to `g x₀` as `c → ∞` if `g` is continuous at `x₀`
and integrable. -/
theorem tendsto_integral_comp_smul_smul_of_integrable'
    {φ : F → ℝ} (hφ : ∀ x, 0 ≤ φ x) (h'φ : ∫ x, φ x ∂μ = 1)
    (h : Tendsto (fun x ↦ ‖x‖ ^ finrank ℝ F * φ x) (cobounded F) (𝓝 0))
    {g : F → E} {x₀ : F} (hg : Integrable g μ) (h'g : ContinuousAt g x₀) :
    Tendsto (fun (c : ℝ) ↦ ∫ x, (c ^ (finrank ℝ F) * φ (c • (x₀ - x))) • g x ∂μ)
      atTop (𝓝 (g x₀))

(h : Filter.Tendsto (fun x => ‖x‖ ^ FiniteDimensional.finrank ℝ F * φ x) (Bornology.cobounded F) (𝓝 0))

Filter.Tendsto (fun c => ∫ (x : F), (c ^ FiniteDimensional.finrank ℝ F * φ (c • (x₀ - x))) • g x ∂μ) Filter.atTop
  (𝓝 (g x₀))


theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈ z) :
    Mem.other hb = a

{α : Type u_1}
{a : α}
{z : Sym2 α}
(ha : a ∈ z)
(hb : Sym2.Mem.other ha ∈ z)


theorem le_symmDiff_sup_left (a b : α) : b ≤ (a ∆ b) ⊔ a

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


/--
Given `[Estimator a ε]`
* we have `bound a e ≤ a.get`, and
* `improve a e` returns none iff `bound a e = a.get`,
  and otherwise it returns a strictly better bound.
-/
class Estimator [Preorder α] (a : Thunk α) (ε : Type*) extends EstimatorData a ε where
  /-- The calculated bounds are always lower bounds. -/
  bound_le e : bound e ≤ a.get
  /-- Calling `improve` either gives a strictly better bound,
  or a proof that the current bound is exact. -/
  improve_spec e : match improve e with
    | none => bound e = a.get
    | some e' => bound e < bound e'

{α : Type u_1}
[Preorder α]
{a : Thunk α}
{ε : Type u_3}
[self : Estimator a ε]
(e : ε)


@[rclike_simps, norm_cast]
theorem ofReal_ofNat (n : ℕ) [n.AtLeastTwo] :
    ((no_index (OfNat.ofNat n) : ℝ) : K) = OfNat.ofNat n

{K : Type u_1}
[RCLike K]
(n : ℕ)
[n.AtLeastTwo]


@[simp]
theorem eq_zero_iff {x : V} : e x = 0 ↔ x = 0

{𝕜 : Type u_1}
{V : Type u_2}
[NormedField 𝕜]
[AddCommGroup V]
[Module 𝕜 V]
(e : ENorm 𝕜 V)
{x : V}


/-- For every nonzero ideal `I` of `v`, `v^(val_v(I) + 1)` does not divide `∏_v v^(val_v(I))`. -/
theorem finprod_not_dvd (I : Ideal R) (hI : I ≠ 0) :
    ¬v.asIdeal ^ ((Associates.mk v.asIdeal).count (Associates.mk I).factors + 1) ∣
        ∏ᶠ v : HeightOneSpectrum R, v.maxPowDividing I

¬v.asIdeal ^ ((Associates.mk v.asIdeal).count (Associates.mk I).factors + 1) ∣
    ∏ᶠ (v : IsDedekindDomain.HeightOneSpectrum R), v.maxPowDividing I


theorem range_mkQ_comp (f : M →ₛₗ[τ₁₂] M₂) : f.range.mkQ.comp f = 0

{R : Type u_1}
{M : Type u_2}
{R₂ : Type u_3}
{M₂ : Type u_4}
[Ring R]
[Ring R₂]
[AddCommMonoid M]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
(f : M →ₛₗ[τ₁₂] M₂)


theorem nontrivial_of_exists_ne {x} (hx : x ∈ s) (h : ∃ y ∈ s, y ≠ x) : s.Nontrivial

{α : Type u}
{s : Set α}
{x : α}
(hx : x ∈ s)
(h : ∃ y ∈ s, y ≠ x)


@[reassoc (attr := simp)]
theorem pullbackRightPullbackFstIso_hom_snd :
    (pullbackRightPullbackFstIso f g f').hom ≫ pullback.snd _ _ =
      pullback.snd _ _ ≫ pullback.snd _ _

[CategoryTheory.Limits.HasPullback f' (CategoryTheory.Limits.pullback.fst f g)]

[CategoryTheory.Limits.HasPullback (f' ≫ f) g]

(CategoryTheory.Limits.pullbackRightPullbackFstIso f g f').hom ≫ CategoryTheory.Limits.pullback.snd (f' ≫ f) g =
  CategoryTheory.Limits.pullback.snd f' (CategoryTheory.Limits.pullback.fst f g) ≫
    CategoryTheory.Limits.pullback.snd f g


theorem dvd_iff_mod_eq_zero (m n : Nat) : m ∣ n ↔ n % m = 0


private theorem add_left' (f f' g : α →₂[μ] E) : ⟪f + f', g⟫ = inner f g + inner f' g

{α : Type u_1}
{E : Type u_2}
{𝕜 : Type u_4}
[RCLike 𝕜]
[MeasurableSpace α]
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
(f f' g : ↥(MeasureTheory.Lp E 2 μ))


theorem ιMulti_succ_curryLeft {n : ℕ} (m : M) :
    (ιMulti R n.succ).curryLeft m = (LinearMap.mulLeft R (ι R m)).compAlternatingMap (ιMulti R n)

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{n : ℕ}
(m : M)

(ExteriorAlgebra.ιMulti R n.succ).curryLeft m =
  (LinearMap.mulLeft R ((ExteriorAlgebra.ι R) m)).compAlternatingMap (ExteriorAlgebra.ιMulti R n)


theorem clog_zpow {b : ℕ} (hb : 1 < b) (z : ℤ) : clog b ((b : R) ^ z : R) = z

{R : Type u_1}
[LinearOrderedSemifield R]
[FloorSemiring R]
{b : ℕ}
(hb : 1 < b)
(z : ℤ)


@[simp] theorem rank_top' : Module.rank F (⊤ : IntermediateField F E) = Module.rank F E

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


theorem isIso_toPlus_of_isSheaf (hP : Presheaf.IsSheaf J P) : IsIso (J.toPlus P)

(J : CategoryTheory.GrothendieckTopology C)

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

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

[∀ (X : C), CategoryTheory.Limits.HasColimitsOfShape (J.Cover X)ᵒᵖ D]

(hP : CategoryTheory.Presheaf.IsSheaf J P)


/-- `LinearMap.prodMap` as a `RingHom` -/
@[simps]
def prodMapRingHom : (M →ₗ[R] M) × (M₂ →ₗ[R] M₂) →+* M × M₂ →ₗ[R] M × M₂

(R : Type u)
(M : Type v)
(M₂ : Type w)
[Semiring R]
[AddCommMonoid M]
[AddCommMonoid M₂]
[Module R M]
[Module R M₂]
(f : (M →ₗ[R] M) × (M₂ →ₗ[R] M₂))

(LinearMap.prodMapRingHom R M M₂) f = f.1.prodMap f.2


theorem toNat_monotoneOn : MonotoneOn toNat (Iio ℵ₀)

MonotoneOn (⇑Cardinal.toNat) (Set.Iio Cardinal.aleph0)


@[simp] theorem ForInStep.bindList_append [Monad m] [LawfulMonad m]
    (f : α → β → m (ForInStep β)) (s : ForInStep β) (l₁ l₂) :
    s.bindList f (l₁ ++ l₂) = s.bindList f l₁ >>= (·.bindList f l₂)

{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
[LawfulMonad m]
(f : α → β → m (ForInStep β))
(s : ForInStep β)
(l₁ l₂ : List α)

ForInStep.bindList f (l₁ ++ l₂) s = do
  let x ← ForInStep.bindList f l₁ s
  ForInStep.bindList f l₂ x


theorem IsEquivalent.tendsto_atBot [OrderTopology β] (huv : u ~[l] v) (hu : Tendsto u l atBot) :
    Tendsto v l atBot

{α : Type u_1}
{β : Type u_2}
[NormedLinearOrderedField β]
{u v : α → β}
{l : Filter α}
[OrderTopology β]
(huv : u ~[l] v)
(hu : Filter.Tendsto u l Filter.atBot)


@[to_additive index_mul_card]
theorem index_mul_card : H.index * Nat.card H = Nat.card G

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


@[simp]
theorem finsuppTensorFinsupp_symm_single (i : ι × κ) (m : M) (n : N) :
    (finsuppTensorFinsupp R S M N ι κ).symm (Finsupp.single i (m ⊗ₜ n)) =
      Finsupp.single i.1 m ⊗ₜ Finsupp.single i.2 n

(R : Type u_1)
(S : Type u_2)
(M : Type u_3)
(N : Type u_4)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid N]
[Module R N]
[Semiring S]
[Algebra R S]
[Module S M]
[IsScalarTower R S M]
(i : ι × κ)
(m : M)
(n : N)

(finsuppTensorFinsupp R S M N ι κ).symm (Finsupp.single i (m ⊗ₜ[R] n)) = Finsupp.single i.1 m ⊗ₜ[R] Finsupp.single i.2 n


@[reassoc (attr := simp)]
theorem biproduct.toSubtype_π (j : Subtype p) :
    biproduct.toSubtype f p ≫ biproduct.π (Subtype.restrict p f) j = biproduct.π f j

[CategoryTheory.Limits.HasBiproduct (Subtype.restrict p f)]

CategoryTheory.Limits.biproduct.toSubtype f p ≫ CategoryTheory.Limits.biproduct.π (Subtype.restrict p f) j =
  CategoryTheory.Limits.biproduct.π f ↑j


/-- A ring `R` is isomorphic to `R × S` when `S` is the zero ring -/
@[simps]
def prodZeroRing : R ≃+* R × S

(R : Type u_3)
(S : Type u_5)
[NonAssocSemiring R]
[NonAssocSemiring S]
[Subsingleton S]
(self : R × S)

(RingEquiv.prodZeroRing R S).symm self = self.1


/-- Vanishing of coefficients of powers of multivariate power series
when the constant coefficient is nilpotent
[N. Bourbaki, *Algebra {II}*, Chapter 4, §4, n°2, proposition 3][bourbaki1981] -/
theorem coeff_eq_zero_of_constantCoeff_nilpotent [DecidableEq σ]
    {f : MvPowerSeries σ R} {m : ℕ} (hf : constantCoeff σ R f ^ m = 0)
    {d : σ →₀ ℕ} {n : ℕ} (hn : m + degree d ≤ n) : coeff R d (f ^ n) = 0

(hf : (MvPowerSeries.constantCoeff σ R) f ^ m = 0)

{d : σ →₀ ℕ}


lemma hasColimitsOfShape : HasColimitsOfShape J AddCommGrp.{max u v w}

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


theorem disjoint_closure_right (h : SeparatedNhds s t) : Disjoint s (closure t)

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}
(h : SeparatedNhds s t)


@[simp] theorem add_one_lt_iff {n : Nat} {k : Fin (n + 2)} : k + 1 < k ↔ k = last _


theorem isAdjointPair_iff_compLeft_eq_compRight (f g : Module.End R M) :
    IsAdjointPair B F f g ↔ F.compLeft f = B.compRight g

{R : Type u_1}
{M : Type u_2}
[CommSemiring R]
[AddCommMonoid M]
[Module R M]
{B : LinearMap.BilinForm R M}
(F : LinearMap.BilinForm R M)
(f g : Module.End R M)

B.IsAdjointPair F f g ↔ F.compLeft f = B.compRight g


@[simp]
theorem map_eval_pi (f : ∀ i, Filter (α i)) [∀ i, NeBot (f i)] (i : ι) :
    map (eval i) (pi f) = f i

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

Filter.map (Function.eval i) (Filter.pi f) = f i


@[to_additive]
theorem hasProd_nat_add_iff {f : ℕ → G} (k : ℕ) :
    HasProd (fun n ↦ f (n + k)) g ↔ HasProd f (g * ∏ i ∈ range k, f i)

{G : Type u_2}
[CommGroup G]
{g : G}
[TopologicalSpace G]
[TopologicalGroup G]
{f : ℕ → G}
(k : ℕ)

HasProd (fun n => f (n + k)) g ↔ HasProd f (g * ∏ i ∈ Finset.range k, f i)


private lemma u₅_def : S.u₅ = -η ^ 2 * S.u₁ * S.u₂⁻¹

(S : FermatLastTheoremForThreeGen.Solution hζ)

FermatLastTheoremForThreeGen.Solution.u₅ S =
  -⋯.unit ^ 2 * FermatLastTheoremForThreeGen.Solution.u₁ S * (FermatLastTheoremForThreeGen.Solution.u₂ S)⁻¹


@[simp]
theorem coe_id : ⇑(InfTopHom.id α) = id


theorem leftInverse_iff_comp {f : α → β} {g : β → α} : LeftInverse f g ↔ f ∘ g = id

{α : Sort u_1}
{β : Sort u_2}
{f : α → β}
{g : β → α}


@[to_additive]
theorem map_symm_eq_iff_map_eq {H : Subgroup N} {e : G ≃* N} :
    H.map ↑e.symm = K ↔ K.map ↑e = H

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

Subgroup.map (↑e.symm) H = K ↔ Subgroup.map (↑e) K = H


@[simp]
theorem toOpen_res (U V : Opens (PrimeSpectrum.Top R)) (i : V ⟶ U) :
    toOpen R U ≫ (structureSheaf R).1.map i.op = toOpen R V

(U V : TopologicalSpace.Opens ↑(AlgebraicGeometry.PrimeSpectrum.Top R))

AlgebraicGeometry.StructureSheaf.toOpen R U ≫ (AlgebraicGeometry.Spec.structureSheaf R).val.map i.op =
  AlgebraicGeometry.StructureSheaf.toOpen R V


theorem HasFPowerSeriesAt.hasStrictFDerivAt (h : HasFPowerSeriesAt f p x) :
    HasStrictFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p 1)) x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{p : FormalMultilinearSeries 𝕜 E F}
{f : E → F}
{x : E}
(h : HasFPowerSeriesAt f p x)

HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p 1)) x


lemma FermatLastTheoremFor.mono (hmn : m ∣ n) (hm : FermatLastTheoremFor m) :
    FermatLastTheoremFor n

{m n : ℕ}
(hmn : m ∣ n)
(hm : FermatLastTheoremFor m)


@[simp, norm_cast]
theorem coe_intCast (z : ℤ) : ⇑(z : SlashInvariantForm Γ 0) = z


@[to_additive (attr := simp (default + 1))]
lemma le_inf_div [SemilatticeInf β] [OrderTop β] {s t : Finset α} {f : α → β} {a : β} :
    a ≤ inf (s / t) f ↔ ∀ x ∈ s, ∀ y ∈ t, a ≤ f (x / y)

{α : Type u_2}
{β : Type u_3}
[DecidableEq α]
[Div α]
[SemilatticeInf β]
[OrderTop β]
{s t : Finset α}
{f : α → β}
{a : β}

a ≤ (s / t).inf f ↔ ∀ x ∈ s, ∀ y ∈ t, a ≤ f (x / y)


@[simp, norm_cast]
theorem coe_mul (p q : ℚ≥0) : ((p * q : ℚ≥0) : ℚ) = p * q


/-- An auxiliary lemma used to prove that the same point can't belong to more than
`2 ^ Fintype.card ι` closed boxes of a prepartition. -/
theorem injOn_setOf_mem_Icc_setOf_lower_eq (x : ι → ℝ) :
    InjOn (fun J : Box ι => { i | J.lower i = x i }) { J | J ∈ π ∧ x ∈ Box.Icc J }

{ι : Type u_1}
{I : BoxIntegral.Box ι}
(π : BoxIntegral.Prepartition I)
(x : ι → ℝ)

Set.InjOn (fun J => {i | J.lower i = x i}) {J | J ∈ π ∧ x ∈ BoxIntegral.Box.Icc J}


theorem HasDerivAt.csin (hf : HasDerivAt f f' x) :
    HasDerivAt (fun x => Complex.sin (f x)) (Complex.cos (f x) * f') x

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


@[simp]
theorem Tape.move_right_nth {Γ} [Inhabited Γ] (T : Tape Γ) (i : ℤ) :
    (T.move Dir.right).nth i = T.nth (i + 1)

{Γ : Type u_1}
[Inhabited Γ]
(T : Turing.Tape Γ)
(i : ℤ)

(Turing.Tape.move Turing.Dir.right T).nth i = T.nth (i + 1)


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

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


@[reassoc]
lemma g_s (s : S.Splitting) : S.g ≫ s.s = 𝟙 _ - s.r ≫ S.f

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

CategoryTheory.CategoryStruct.comp S.g s.s =
  CategoryTheory.CategoryStruct.id S.X₂ - CategoryTheory.CategoryStruct.comp s.r S.f


theorem isBigOWith_inv (hc : 0 < c) : IsBigOWith c⁻¹ l f g ↔ ∀ᶠ x in l, c * ‖f x‖ ≤ ‖g x‖

{α : Type u_1}
{E : Type u_3}
{F : Type u_4}
[Norm E]
[Norm F]
{c : ℝ}
{f : α → E}
{g : α → F}
{l : Filter α}
(hc : 0 < c)

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


theorem _root_.Matrix.Nondegenerate.toLinearMap₂' {M : Matrix ι ι R₁} (h : M.Nondegenerate) :
    (Matrix.toLinearMap₂' R₁ M).SeparatingLeft (R := R₁)

{R₁ : Type u_2}
{ι : Type u_16}
[CommRing R₁]
[DecidableEq ι]
[Fintype ι]
{M : Matrix ι ι R₁}
(h : M.Nondegenerate)


theorem iInf_iSup_eq [CompletelyDistribLattice α] {f : ∀ a, κ a → α} :
    (⨅ a, ⨆ b, f a b) = ⨆ g : ∀ a, κ a, ⨅ a, f a (g a)

{α : Type u}
{ι : Sort w}
{κ : ι → Sort w'}
[CompletelyDistribLattice α]
{f : (a : ι) → κ a → α}


@[reassoc (attr := simp)]
lemma ι_mapBifunctorComp₂₃MapObjIso_inv (i₁ : I₁) (i₂ : I₂) (i₃ : I₃) (j : J)
    (h : r (i₁, i₂, i₃) = j) :
    ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h ≫
      (mapBifunctorComp₂₃MapObjIso F G₂₃ ρ₂₃ X₁ X₂ X₃).inv j =
      ιMapTrifunctorMapObj (bifunctorComp₂₃ F G₂₃) r X₁ X₂ X₃ i₁ i₂ i₃ j h

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

(G₂₃ : CategoryTheory.Functor C₂ (CategoryTheory.Functor C₃ C₂₃))

(ρ₂₃ : CategoryTheory.GradedObject.BifunctorComp₂₃IndexData r)

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

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

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

[(((CategoryTheory.GradedObject.mapBifunctor G₂₃ I₂ I₃).obj X₂).obj X₃).HasMap ρ₂₃.p]

[(((CategoryTheory.GradedObject.mapBifunctor F I₁ ρ₂₃.I₂₃).obj X₁).obj
        (CategoryTheory.GradedObject.mapBifunctorMapObj G₂₃ ρ₂₃.p X₂ X₃)).HasMap
    ρ₂₃.q]

[H : CategoryTheory.GradedObject.HasGoodTrifunctor₂₃Obj F G₂₃ ρ₂₃ X₁ X₂ X₃]

[((((CategoryTheory.GradedObject.mapTrifunctor (CategoryTheory.bifunctorComp₂₃ F G₂₃) I₁ I₂ I₃).obj X₁).obj X₂).obj
        X₃).HasMap
    r]

CategoryTheory.CategoryStruct.comp
    (CategoryTheory.GradedObject.ιMapBifunctorBifunctor₂₃MapObj F G₂₃ ρ₂₃ X₁ X₂ X₃ i₁ i₂ i₃ j h)
    ((CategoryTheory.GradedObject.mapBifunctorComp₂₃MapObjIso F G₂₃ ρ₂₃ X₁ X₂ X₃).inv j) =
  CategoryTheory.GradedObject.ιMapTrifunctorMapObj (CategoryTheory.bifunctorComp₂₃ F G₂₃) r X₁ X₂ X₃ i₁ i₂ i₃ j h


@[simp]
theorem constr_comp (f : M' →ₗ[R] M') (v : ι → M') :
    constr (M' := M') b S (f ∘ v) = f.comp (constr (M' := M') b S v)

{ι : Type u_1}
{R : Type u_3}
{M : Type u_6}
{M' : Type u_7}
[Semiring R]
[AddCommMonoid M]
[Module R M]
[AddCommMonoid M']
[Module R M']
(b : Basis ι R M)
(S : Type u_10)
[Semiring S]
[Module S M']
[SMulCommClass R S M']
(f : M' →ₗ[R] M')
(v : ι → M')

(b.constr S) (⇑f ∘ v) = f ∘ₗ (b.constr S) v


/-- The abelian image in a functor category can be calculated componentwise. -/
@[simps!]
def imageObjIso : (Abelian.image α).obj X ≅ Abelian.image (α.app X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type w}
[CategoryTheory.Category.{z, w} D]
[CategoryTheory.Abelian D]
{F G : CategoryTheory.Functor C D}
(α : F ⟶ G)
(X : C)

(CategoryTheory.Abelian.FunctorCategory.imageObjIso α X).hom =
  CategoryTheory.CategoryStruct.comp
    (CategoryTheory.Limits.kernelComparison (CategoryTheory.Limits.cokernel.π α)
      ((CategoryTheory.evaluation C D).obj X))
    (CategoryTheory.Limits.kernel.map ((CategoryTheory.Limits.cokernel.π α).app X)
      (CategoryTheory.Limits.cokernel.π (α.app X)) (CategoryTheory.CategoryStruct.id (G.obj X))
      (CategoryTheory.Limits.PreservesCokernel.iso ((CategoryTheory.evaluation C D).obj X) α).hom ⋯)


@[simp]
theorem univ_sum_single_apply [AddCommMonoid M] [Fintype α] (i : α) (m : M) :
    ∑ j : α, single i m j = m

{α : Type u_1}
{M : Type u_8}
[AddCommMonoid M]
[Fintype α]
(i : α)
(m : M)


theorem comp_surjective {f : A →ₐ[R] B} {g : B →ₐ[R] C} (hf : f.FiniteType) (hg : Surjective g) :
    (g.comp f).FiniteType

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


@[simp]
theorem prod_cons (i) (m : M i) (w : Word M) (h1 : m ≠ 1) (h2 : w.fstIdx ≠ some i) :
    prod (cons m w h2 h1) = of m * prod w

{ι : Type u_1}
{M : ι → Type u_2}
[(i : ι) → Monoid (M i)]
(i : ι)
(m : M i)
(w : Monoid.CoprodI.Word M)
(h1 : m ≠ 1)
(h2 : w.fstIdx ≠ some i)

(Monoid.CoprodI.Word.cons m w h2 h1).prod = Monoid.CoprodI.of m * w.prod


theorem map₂_sup_right : map₂ m f (g₁ ⊔ g₂) = map₂ m f g₁ ⊔ map₂ m f g₂

{α : Type u_1}
{β : Type u_3}
{γ : Type u_5}
{m : α → β → γ}
{f : Filter α}
{g₁ g₂ : Filter β}

Filter.map₂ m f (g₁ ⊔ g₂) = Filter.map₂ m f g₁ ⊔ Filter.map₂ m f g₂


theorem finiteType_ofLocalizationSpanTarget : OfLocalizationSpanTarget @FiniteType


theorem comap_map_eq_self {f : A →ₐ[R] B} {S : Subalgebra R A}
    (h : f ⁻¹' {0} ⊆ S) : (S.map f).comap f = S

{R : Type uR}
{A : Type uA}
{B : Type uB}
[CommSemiring R]
[Ring A]
[Algebra R A]
[Ring B]
[Algebra R B]
{f : A →ₐ[R] B}
{S : Subalgebra R A}
(h : ⇑f ⁻¹' {0} ⊆ ↑S)

Subalgebra.comap f (Subalgebra.map f S) = S


theorem eq_of_le_of_inf_le_of_le_sup (hxy : x ≤ y) (hinf : y ⊓ z ≤ x) (hsup : y ≤ x ⊔ z) :
    x = y

{α : Type u_1}
[Lattice α]
[IsModularLattice α]
{x y z : α}
(hxy : x ≤ y)
(hinf : y ⊓ z ≤ x)
(hsup : y ≤ x ⊔ z)


@[simp]
theorem quotQuotEquivQuotSup_symm_quotQuotMk (x : R) :
    (quotQuotEquivQuotSup I J).symm (Ideal.Quotient.mk (I ⊔ J) x) = quotQuotMk I J x

{R : Type u}
[CommRing R]
(I J : Ideal R)
(x : R)

(DoubleQuot.quotQuotEquivQuotSup I J).symm ((Ideal.Quotient.mk (I ⊔ J)) x) = (DoubleQuot.quotQuotMk I J) x


/-- Special case of `ContDiffBump.convolution_tendsto_right` where `g` is continuous,
  and the limit is taken only in the first function. -/
theorem convolution_tendsto_right_of_continuous {ι} {φ : ι → ContDiffBump (0 : G)} {l : Filter ι}
    (hφ : Tendsto (fun i => (φ i).rOut) l (𝓝 0)) (hg : Continuous g) (x₀ : G) :
    Tendsto (fun i => ((φ i).normed μ ⋆[lsmul ℝ ℝ, μ] g) x₀) l (𝓝 (g x₀))

(hφ : Filter.Tendsto (fun i => (φ i).rOut) l (𝓝 0))

Filter.Tendsto (fun i => ((φ i).normed μ ⋆[ContinuousLinearMap.lsmul ℝ ℝ, μ] g) x₀) l (𝓝 (g x₀))


theorem ofDigits_digits_append_digits {b m n : ℕ} :
    ofDigits b (digits b n ++ digits b m) = n + b ^ (digits b n).length * m

Nat.ofDigits b (b.digits n ++ b.digits m) = n + b ^ (b.digits n).length * m


theorem lt_length_drop (L : List α) {i j : Nat} (h : i + j < L.length) : j < (L.drop i).length

{α : Type u_1}
(L : List α)
{i j : Nat}
(h : i + j < L.length)


@[simp]
theorem map_const : p.map (Function.const α b) = pure b

{α : Type u_1}
{β : Type u_2}
(p : PMF α)
(b : β)

PMF.map (Function.const α b) p = PMF.pure b


theorem Antitone.mul_const_of_nonpos [ExistsAddOfLE α] [MulPosMono α]
    [CovariantClass α α (swap (· + ·)) (· ≤ ·)] [ContravariantClass α α (swap (· + ·)) (· ≤ ·)]
    (hf : Antitone f) (ha : a ≤ 0) : Monotone fun x => f x * a

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

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


theorem mem_of_subset_of_mem {s₁ s₂ : Set α} {a : α} (h : s₁ ⊆ s₂) : a ∈ s₁ → a ∈ s₂

{α : Type u}
{s₁ s₂ : Set α}
{a : α}
(h : s₁ ⊆ s₂)

a ∈ s₁ → a ∈ s₂


@[simp]
theorem functorCategoryMonoidalEquivalence.μ_app (A B : Action V G) :
    ((functorCategoryMonoidalEquivalence V G).μ A B).app PUnit.unit = 𝟙 _

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
(G : MonCat)
[CategoryTheory.MonoidalCategory V]
(A B : Action V G)

((Action.functorCategoryMonoidalEquivalence V G).μ A B).app PUnit.unit =
  𝟙
    ((CategoryTheory.MonoidalCategory.tensorObj ((Action.functorCategoryMonoidalEquivalence V G).obj A)
          ((Action.functorCategoryMonoidalEquivalence V G).obj B)).obj
      PUnit.unit)