@[simp] theorem continuousWithinAt_lift₂ {f : X → Y → Z}
    {hf : ∀ a b c d, (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d}
    {s : Set (SeparationQuotient X × SeparationQuotient Y)} {x : X} {y : Y} :
    ContinuousWithinAt (uncurry <| lift₂ f hf) s (mk x, mk y) ↔
      ContinuousWithinAt (uncurry f) (Prod.map mk mk ⁻¹' s) (x, y)

{hf : ∀ (a : X) (b : Y) (c : X) (d : Y), (a ~ᵢ c) → (b ~ᵢ d) → f a b = f c d}

ContinuousWithinAt (Function.uncurry (SeparationQuotient.lift₂ f hf)) s
    (SeparationQuotient.mk x, SeparationQuotient.mk y) ↔
  ContinuousWithinAt (Function.uncurry f) (Prod.map SeparationQuotient.mk SeparationQuotient.mk ⁻¹' s) (x, y)


theorem mem_map_of_mem (g : α → β) (h : a ∈ x) : g a ∈ Option.map g x

{α : Type u_1}
{β : Type u_2}
{a : α}
{x : Option α}
(g : α → β)
(h : a ∈ x)


theorem mul_continuousOn {f g : ℝ → A} (hf : IntervalIntegrable f μ a b)
    (hg : ContinuousOn g [[a, b]]) : IntervalIntegrable (fun x => f x * g x) μ a b

{A : Type u_5}
[NormedRing A]
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
{f g : ℝ → A}
(hf : IntervalIntegrable f μ a b)
(hg : ContinuousOn g [[a, b]])


@[fun_prop]
lemma continuous_toNNReal : Continuous (toNNReal (X := X))


/-- The *identity principle* for analytic functions: If two analytic functions on a normed space
coincide in a neighborhood of a point `z₀`, then they coincide everywhere.
For a one-dimensional version assuming only that the functions coincide at some points
arbitrarily close to `z₀`, see `eq_of_frequently_eq`. -/
theorem eq_of_eventuallyEq {f g : E → F} [PreconnectedSpace E] (hf : AnalyticOn 𝕜 f univ)
    (hg : AnalyticOn 𝕜 g univ) {z₀ : E} (hfg : f =ᶠ[𝓝 z₀] g) : f = g

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E → F}
[PreconnectedSpace E]
(hf : AnalyticOn 𝕜 f Set.univ)
(hg : AnalyticOn 𝕜 g Set.univ)
{z₀ : E}
(hfg : f =ᶠ[𝓝 z₀] g)


theorem Indep.ssubset_ground [h : RkPos M✶] (hI : M.Indep I) : I ⊂ M.E

{α : Type u_1}
{M : Matroid α}
{I : Set α}
[h : M✶.RkPos]
(hI : M.Indep I)


theorem mkOfClosure_sets {s : Set (Set α)} {hs : { t | MeasurableSet[generateFrom s] t } = s} :
    MeasurableSpace.mkOfClosure s hs = generateFrom s

{α : Type u_1}
{s : Set (Set α)}
{hs : {t | MeasurableSet t} = s}

MeasurableSpace.mkOfClosure s hs = MeasurableSpace.generateFrom s


theorem exists_root [IsAlgClosed k] (p : k[X]) (hp : p.degree ≠ 0) : ∃ x, IsRoot p x

{k : Type u}
[Field k]
[IsAlgClosed k]
(p : k[X])
(hp : p.degree ≠ 0)


lemma δ_shape (hnm : ¬ n + 1 = m) (z : Cochain F G n) : δ n m z = 0

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


theorem Ioc_union_Ioi (h : c ≤ max a b) : Ioc a b ∪ Ioi c = Ioi (min a c)

{α : Type u_1}
[LinearOrder α]
{a b c : α}
(h : c ≤ max a b)

Set.Ioc a b ∪ Set.Ioi c = Set.Ioi (min a c)


theorem _root_.Function.Injective.sOppSide_map_iff {s : AffineSubspace R P} {x y : P}
    {f : P →ᵃ[R] P'} (hf : Function.Injective f) :
    (s.map f).SOppSide (f x) (f y) ↔ s.SOppSide x y

{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[StrictOrderedCommRing R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
{s : AffineSubspace R P}
{x y : P}
{f : P →ᵃ[R] P'}
(hf : Function.Injective ⇑f)

(AffineSubspace.map f s).SOppSide (f x) (f y) ↔ s.SOppSide x y


@[simp]
theorem destutter_eq_self_iff : ∀ l : List α, l.destutter R = l ↔ l.Chain' R

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

List.destutter R l = l ↔ List.Chain' R l


theorem val_add (a b : Fin n) : (a + b).val = (a.val + b.val) % n


theorem ae_restrict_of_ae {s : Set α} {p : α → Prop} (h : ∀ᵐ x ∂μ, p x) : ∀ᵐ x ∂μ.restrict s, p x

{α : Type u_2}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{s : Set α}
{p : α → Prop}
(h : ∀ᵐ (x : α) ∂μ, p x)


theorem WCovBy.le_of_lt (hab : a ⩿ b) (hcb : c < b) : c ≤ a

{α : Type u_1}
[LinearOrder α]
{a b c : α}
(hab : a ⩿ b)
(hcb : c < b)


@[to_additive]
theorem mul_union : s * (t₁ ∪ t₂) = s * t₁ ∪ s * t₂

{α : Type u_2}
[DecidableEq α]
[Add α]
{s t₁ t₂ : Finset α}


/-- Given groups `G H` with `G` acting on `A`, `G` acts by
  multiplicative automorphisms on `A → H`. -/
@[simps!]
def mulAutArrow {G A H} [Group G] [MulAction G A] [Monoid H] : G →* MulAut (A → H)

{G : Type u_1}
{A : Type u_2}
{H : Type u_3}
[Group G]
[MulAction G A]
[Monoid H]
(x : G)

∀ (a : A → H) (a_1 : A), (mulAutArrow x) a a_1 = (x • a) a_1


/-- The generalized index of the lattice generated by `I` in the lattice generated by
`𝓞 K` is equal to the norm of the ideal `I`. The result is stated in terms of base change
determinant and is the translation of `NumberField.det_basisOfFractionalIdeal_eq_absNorm` in
`ℝ^r₁ × ℂ^r₂`. This is useful, in particular, to prove that the family obtained from
the `ℤ`-basis of `I` is actually an `ℝ`-basis of `ℝ^r₁ × ℂ^r₂`, see
`fractionalIdealLatticeBasis`. -/
theorem det_basisOfFractionalIdeal_eq_norm
    (e : (ChooseBasisIndex ℤ (𝓞 K)) ≃ (ChooseBasisIndex ℤ I)) :
    |Basis.det (latticeBasis K) ((mixedEmbedding K ∘ (basisOfFractionalIdeal K I) ∘ e))| =
      FractionalIdeal.absNorm I.1

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

(e : Module.Free.ChooseBasisIndex ℤ (NumberField.RingOfIntegers K) ≃ Module.Free.ChooseBasisIndex ℤ ↥↑↑I)

|(NumberField.mixedEmbedding.latticeBasis K).det
      (⇑(NumberField.mixedEmbedding K) ∘ ⇑(NumberField.basisOfFractionalIdeal K I) ∘ ⇑e)| =
  ↑(FractionalIdeal.absNorm ↑I)


/-- If `a` is accessible under `rα` and `b` is accessible under `rβ`, then `(a, b)` is
  accessible under `Prod.GameAdd rα rβ`. Notice that `Prod.lexAccessible` requires the
  stronger condition `∀ b, Acc rβ b`. -/
theorem Acc.prod_gameAdd (ha : Acc rα a) (hb : Acc rβ b) :
    Acc (Prod.GameAdd rα rβ) (a, b)

{α : Type u_1}
{β : Type u_2}
{rα : α → α → Prop}
{rβ : β → β → Prop}
{a : α}
{b : β}
(ha : Acc rα a)
(hb : Acc rβ b)


theorem ConvexOn.openSegment_subset_strict_epigraph (hf : ConvexOn 𝕜 s f) (p q : E × β)
    (hp : p.1 ∈ s ∧ f p.1 < p.2) (hq : q.1 ∈ s ∧ f q.1 ≤ q.2) :
    openSegment 𝕜 p q ⊆ { p : E × β | p.1 ∈ s ∧ f p.1 < p.2 }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_5}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[OrderedCancelAddCommMonoid β]
[Module 𝕜 E]
[Module 𝕜 β]
[OrderedSMul 𝕜 β]
{s : Set E}
{f : E → β}
(hf : ConvexOn 𝕜 s f)
(p q : E × β)
(hp : p.1 ∈ s ∧ f p.1 < p.2)
(hq : q.1 ∈ s ∧ f q.1 ≤ q.2)

openSegment 𝕜 p q ⊆ {p | p.1 ∈ s ∧ f p.1 < p.2}


@[norm_cast] lemma ofReal_nsmul (n : ℕ) (r : ℝ) : ↑(n • r) = n • (r : ℂ)


theorem exists_measurable_superset_ae_eq (h : NullMeasurableSet s μ) :
    ∃ t ⊇ s, MeasurableSet t ∧ t =ᵐ[μ] s

(h : MeasureTheory.NullMeasurableSet s μ)


@[to_additive]
theorem prod_mul_tprod_subtype_compl [T2Space α] {f : β → α} (hf : Multipliable f) (s : Finset β) :
    (∏ x ∈ s, f x) * ∏' x : { x // x ∉ s }, f x = ∏' x, f x

{α : Type u_1}
{β : Type u_2}
[AddCommGroup α]
[UniformSpace α]
[UniformAddGroup α]
[CompleteSpace α]
[T2Space α]
{f : β → α}
(hf : Summable f)
(s : Finset β)

∑ x ∈ s, f x + ∑' (x : { x // x ∉ s }), f ↑x = ∑' (x : β), f x


/-- The cosine of the angle between three points is 1 if and only if the angle is 0. -/
nonrec theorem cos_eq_one_iff_angle_eq_zero {p₁ p₂ p₃ : P} :
    Real.cos (∠ p₁ p₂ p₃) = 1 ↔ ∠ p₁ p₂ p₃ = 0

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

Real.cos (EuclideanGeometry.angle p₁ p₂ p₃) = 1 ↔ EuclideanGeometry.angle p₁ p₂ p₃ = 0


/-- Turn a primitive root μ into a member of the `rootsOfUnity` subgroup. -/
@[simps!]
def IsPrimitiveRoot.toRootsOfUnity {μ : M} {n : ℕ+} (h : IsPrimitiveRoot μ n) : rootsOfUnity n M

{M : Type u_1}
[CommMonoid M]
{μ : M}
{n : ℕ+}
(h : IsPrimitiveRoot μ ↑n)


lemma HasRightKanExtension.mk (F' : D ⥤ H) {L : C ⥤ D} {F : C ⥤ H} (α : L ⋙ F' ⟶ F)
    [F'.IsRightKanExtension α] : HasRightKanExtension L F

{C : Type u_1}
{H : Type u_3}
{D : Type u_5}
[CategoryTheory.Category.{u_9, u_1} C]
[CategoryTheory.Category.{u_8, u_3} H]
[CategoryTheory.Category.{u_7, u_5} D]
(F' : CategoryTheory.Functor D H)
{L : CategoryTheory.Functor C D}
{F : CategoryTheory.Functor C H}
(α : L.comp F' ⟶ F)
[F'.IsRightKanExtension α]


theorem map_nhds_of_mem (hf : Inducing f) (x : X) (h : range f ∈ 𝓝 (f x)) :
    (𝓝 x).map f = 𝓝 (f x)

{X : Type u_1}
{Y : Type u_2}
{f : X → Y}
[TopologicalSpace X]
[TopologicalSpace Y]
(hf : Inducing f)
(x : X)
(h : Set.range f ∈ 𝓝 (f x))


protected theorem map_le_map_iff (f : F) {p p'} : map f p ≤ map f p' ↔ p ≤ p' ⊔ ker f

{R : Type u_1}
{R₂ : Type u_2}
{M : Type u_4}
{M₂ : Type u_5}
[Semiring R]
[Semiring R₂]
[AddCommGroup M]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{τ₁₂ : R →+* R₂}
[RingHomSurjective τ₁₂]
{F : Type u_8}
[FunLike F M M₂]
[SemilinearMapClass F τ₁₂ M M₂]
(f : F)
{p p' : Submodule R M}

Submodule.map f p ≤ Submodule.map f p' ↔ p ≤ p' ⊔ LinearMap.ker f


/-- The square of the cosine of `π / 6` is `3 / 4` (this is sometimes more convenient than the
result for cosine itself). -/
theorem sq_cos_pi_div_six : cos (π / 6) ^ 2 = 3 / 4


theorem hasBasis_pure (x : α) :
    (pure x : Filter α).HasBasis (fun _ : Unit => True) fun _ => {x}

(pure x).HasBasis (fun x => True) fun x_1 => {x}


@[to_additive (attr := simp, nolint simpNF)]
theorem mem_map_iff_mem {f : M →ₙ* N} (hf : Function.Injective f) {S : Subsemigroup M} {x : M} :
    f x ∈ S.map f ↔ x ∈ S

{M : Type u_1}
{N : Type u_2}
[Add M]
[Add N]
{f : AddHom M N}
(hf : Function.Injective ⇑f)
{S : AddSubsemigroup M}
{x : M}


lemma zero_mem_spectrum_inr (R S : Type*) {A : Type*} [CommSemiring R]
    [CommRing S] [Nontrivial S] [NonUnitalRing A] [Algebra R S] [Module S A] [IsScalarTower S A A]
    [SMulCommClass S A A] [Module R A] [IsScalarTower R S A] (a : A) :
    0 ∈ spectrum R (a : Unitization S A)

(R : Type u_3)
(S : Type u_4)
{A : Type u_5}
[CommSemiring R]
[CommRing S]
[Nontrivial S]
[NonUnitalRing A]
[Algebra R S]
[Module S A]
[IsScalarTower S A A]
[SMulCommClass S A A]
[Module R A]
[IsScalarTower R S A]
(a : A)


theorem finite_or_infiniteRk (M : Matroid α) : FiniteRk M ∨ InfiniteRk M


@[simp] lemma lt_mul_self_iff : ∀ {n : ℕ}, n < n * n ↔ 1 < n


theorem monic_monomial_eq (m) :
    monomial m (1 : R) = (m.prod fun n e => X n ^ e : MvPolynomial σ R)

{R : Type u}
{σ : Type u_1}
[CommSemiring R]
(m : σ →₀ ℕ)

(MvPolynomial.monomial m) 1 = m.prod fun n e => MvPolynomial.X n ^ e


@[simp] lemma GradedRing.projZeroRingHom'_apply_coe (a : 𝒜 0) :
    GradedRing.projZeroRingHom' 𝒜 a = a

{ι : Type u_1}
{A : Type u_3}
{σ : Type u_4}
[Semiring A]
[DecidableEq ι]
[CanonicallyOrderedAddCommMonoid ι]
[SetLike σ A]
[AddSubmonoidClass σ A]
(𝒜 : ι → σ)
[GradedRing 𝒜]
(a : ↥(𝒜 0))


@[simp]
lemma image_coe_Ioo (x y : ℝ) : Real.toEReal '' Ioo x y = Ioo ↑x ↑y

Real.toEReal '' Set.Ioo x y = Set.Ioo ↑x ↑y


@[simp] theorem run_pure [Monad m] (x : α) : run (pure x : ExceptT ε m α) = pure (Except.ok x)

{m : Type u_1 → Type u_2}
{α ε : Type u_1}
[Monad m]
(x : α)


@[simp]
theorem unmop_id_mop {X : C} : (𝟙 (mop X)).unmop = 𝟙 X

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


theorem principal_iff_principal_swap {op : Ordinal → Ordinal → Ordinal} {o : Ordinal} :
    Principal op o ↔ Principal (Function.swap op) o

{op : Ordinal.{u_1} → Ordinal.{u_1} → Ordinal.{u_1}}

Ordinal.Principal op o ↔ Ordinal.Principal (Function.swap op) o


theorem measurable_to_prop {f : α → Prop} (h : MeasurableSet (f ⁻¹' {True})) : Measurable f

{α : Type u_1}
[MeasurableSpace α]
{f : α → Prop}
(h : MeasurableSet (f ⁻¹' {True}))


theorem integrable_comp_div_iff (g : ℝ → F) {R : ℝ} (hR : R ≠ 0) :
    (Integrable fun x => g (x / R)) ↔ Integrable g

{F : Type u_1}
[NormedAddCommGroup F]
(g : ℝ → F)
{R : ℝ}
(hR : R ≠ 0)

MeasureTheory.Integrable (fun x => g (x / R)) MeasureTheory.volume ↔ MeasureTheory.Integrable g MeasureTheory.volume


/-- A graded version of `Monoid`

Like `Monoid.npow`, this has an optional `GMonoid.gnpow` field to allow definitional control of
natural powers of a graded monoid. -/
class GMonoid [AddMonoid ι] extends GMul A, GOne A where
  /-- Multiplication by `one` on the left is the identity -/
  one_mul (a : GradedMonoid A) : 1 * a = a
  /-- Multiplication by `one` on the right is the identity -/
  mul_one (a : GradedMonoid A) : a * 1 = a
  /-- Multiplication is associative -/
  mul_assoc (a b c : GradedMonoid A) : a * b * c = a * (b * c)
  /-- Optional field to allow definitional control of natural powers -/
  gnpow : ∀ (n : ℕ) {i}, A i → A (n • i) := GMonoid.gnpowRec
  /-- The zeroth power will yield 1 -/
  gnpow_zero' : ∀ a : GradedMonoid A, GradedMonoid.mk _ (gnpow 0 a.snd) = 1 := by
    apply_gmonoid_gnpowRec_zero_tac
  /-- Successor powers behave as expected -/
  gnpow_succ' :
    ∀ (n : ℕ) (a : GradedMonoid A),
      (GradedMonoid.mk _ <| gnpow n.succ a.snd) = ⟨_, gnpow n a.snd⟩ * a := by
    apply_gmonoid_gnpowRec_succ_tac

{ι : Type u_1}
{A : ι → Type u_2}
[AddMonoid ι]
[self : GradedMonoid.GMonoid A]
(a : GradedMonoid A)


theorem DifferentiableOn.diffContOnCl_ball {U : Set E} {c : E} {R : ℝ} (hf : DifferentiableOn 𝕜 f U)
    (hc : closedBall c R ⊆ U) : DiffContOnCl 𝕜 f (ball c R)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜 F]
{f : E → F}
{U : Set E}
{c : E}
{R : ℝ}
(hf : DifferentiableOn 𝕜 f U)
(hc : Metric.closedBall c R ⊆ U)


/-- The functor on homological complexes induced by the identity functor is
isomorphic to the identity functor. -/
@[simps!]
def Functor.mapHomologicalComplexIdIso (c : ComplexShape ι) :
    (𝟭 W₁).mapHomologicalComplex c ≅ 𝟭 _

((CategoryTheory.Functor.mapHomologicalComplexIdIso W₁ c).inv.app X).f i = 𝟙 (X.X i)


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

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


instance isTrichotomous (r : α → α → Prop) [IsTrichotomous α r] :
    IsTrichotomous (List α) (Lex r)

{α : Type u}
(r : α → α → Prop)
[IsTrichotomous α r]

∀ (x x_1 : List α), List.Lex r x x_1 ∨ x = x_1 ∨ List.Lex r x_1 x


/-- Restricting a chart of `M` to an open subset `s` yields a chart in the maximal atlas of `s`.

NB. We cannot deduce membership in `atlas H s` in general: by definition, this atlas contains
precisely the restriction of each preferred chart at `x ∈ s` --- whereas `atlas H M`
can contain more charts than these. -/
lemma StructureGroupoid.restriction_in_maximalAtlas {e : PartialHomeomorph M H}
    (he : e ∈ atlas H M) {s : Opens M} (hs : Nonempty s) {G : StructureGroupoid H} [HasGroupoid M G]
    [ClosedUnderRestriction G] : e.subtypeRestr hs ∈ G.maximalAtlas s

{H : Type u}
{M : Type u_2}
[TopologicalSpace H]
[TopologicalSpace M]
[ChartedSpace H M]
{e : PartialHomeomorph M H}
(he : e ∈ atlas H M)
{s : TopologicalSpace.Opens M}
(hs : Nonempty ↥s)
{G : StructureGroupoid H}
[HasGroupoid M G]
[ClosedUnderRestriction G]

e.subtypeRestr hs ∈ StructureGroupoid.maximalAtlas (↥s) G


theorem id_apply (x : M) : @id R M _ _ _ x = x

{R : Type u_1}
{M : Type u_9}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(x : M)


@[to_additive indicator_diff]
theorem mulIndicator_diff' (h : s ⊆ t) (f : α → G) :
    mulIndicator (t \ s) f = mulIndicator t f / mulIndicator s f

{α : Type u_1}
{G : Type u_6}
[AddGroup G]
{s t : Set α}
(h : s ⊆ t)
(f : α → G)

(t \ s).indicator f = t.indicator f - s.indicator f


@[measurability, fun_prop]
theorem Measurable.ennreal_toReal {f : α → ℝ≥0∞} (hf : Measurable f) :
    Measurable fun x => ENNReal.toReal (f x)

{α : Type u_1}
[MeasurableSpace α]
{f : α → ℝ≥0∞}
(hf : Measurable f)


@[simp]
theorem inf_toNonUnitalSubsemiring (S T : NonUnitalSubalgebra R A) :
    (S ⊓ T).toNonUnitalSubsemiring = S.toNonUnitalSubsemiring ⊓ T.toNonUnitalSubsemiring

{R : Type u}
{A : Type v}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[Module R A]
[IsScalarTower R A A]
[SMulCommClass R A A]
(S T : NonUnitalSubalgebra R A)


@[to_additive (attr := simp)]
theorem mul_iff [CommMonoid M] {x y : M} : IsUnit (x * y) ↔ IsUnit x ∧ IsUnit y

{M : Type u_1}
[AddCommMonoid M]
{x y : M}

IsAddUnit (x + y) ↔ IsAddUnit x ∧ IsAddUnit y


@[simp]
theorem finsuppTensorFinsupp'_apply_apply (f : ι →₀ R) (g : κ →₀ R) (a : ι) (b : κ) :
    finsuppTensorFinsupp' R ι κ (f ⊗ₜ[R] g) (a, b) = f a * g b

(R : Type u_1)
(ι : Type u_5)
(κ : Type u_6)
[CommSemiring R]
(f : ι →₀ R)
(g : κ →₀ R)
(a : ι)
(b : κ)

((finsuppTensorFinsupp' R ι κ) (f ⊗ₜ[R] g)) (a, b) = f a * g b


theorem aeSeq_n_eq_fun_n_ae [Countable ι] (hf : ∀ i, AEMeasurable (f i) μ)
    (hp : ∀ᵐ x ∂μ, p x fun n => f n x) (n : ι) : aeSeq hf p n =ᵐ[μ] f n

{f : ι → α → β}

(hp : ∀ᵐ (x : α) ∂μ, p x fun n => f n x)


@[to_additive]
protected lemma div_mul_cancel_right (h : IsUnit b) (a : α) : b / (a * b) = a⁻¹

{α : Type u}
[SubtractionMonoid α]
{b : α}
(h : IsAddUnit b)
(a : α)


/-- For all `ε > 0`, we can partition the remainders of any family of polynomials `A`
into classes, where all remainders in a class are close together. -/
theorem exists_partition_polynomial (n : ℕ) {ε : ℝ} (hε : 0 < ε) {b : Fq[X]} (hb : b ≠ 0)
    (A : Fin n → Fq[X]) : ∃ t : Fin n → Fin (Fintype.card Fq ^ ⌈-log ε / log (Fintype.card Fq)⌉₊),
      ∀ i₀ i₁ : Fin n, t i₀ = t i₁ →
        (cardPowDegree (A i₁ % b - A i₀ % b) : ℝ) < cardPowDegree b • ε

{Fq : Type u_1}
[Fintype Fq]
[Field Fq]
(n : ℕ)
{ε : ℝ}
(hε : 0 < ε)
{b : Polynomial Fq}
(hb : b ≠ 0)
(A : Fin n → Polynomial Fq)

∃ t, ∀ (i₀ i₁ : Fin n), t i₀ = t i₁ → ↑(Polynomial.cardPowDegree (A i₁ % b - A i₀ % b)) < Polynomial.cardPowDegree b • ε


theorem tendsto_abs_tan_of_cos_eq_zero {x : ℝ} (hx : cos x = 0) :
    Tendsto (fun x => abs (tan x)) (𝓝[≠] x) atTop

Filter.Tendsto (fun x => |Real.tan x|) (nhdsWithin x {x}ᶜ) Filter.atTop


theorem lintegral_add_left' {f : α → ℝ≥0∞} (hf : AEMeasurable f μ) (g : α → ℝ≥0∞) :
    ∫⁻ a, f a + g a ∂μ = ∫⁻ a, f a ∂μ + ∫⁻ a, g a ∂μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : AEMeasurable f μ)
(g : α → ℝ≥0∞)

∫⁻ (a : α), f a + g a ∂μ = ∫⁻ (a : α), f a ∂μ + ∫⁻ (a : α), g a ∂μ


/-- If a point lies in the affine span of two points, those three points are collinear. -/
theorem collinear_insert_of_mem_affineSpan_pair {p₁ p₂ p₃ : P} (h : p₁ ∈ line[k, p₂, p₃]) :
    Collinear k ({p₁, p₂, p₃} : Set P)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{p₁ p₂ p₃ : P}
(h : p₁ ∈ affineSpan k {p₂, p₃})


@[simp]
theorem iUnion_Ico_right [NoMaxOrder α] (a : α) : ⋃ b, Ico a b = Ici a

{α : Type v}
[Preorder α]
[NoMaxOrder α]
(a : α)


/-- **Dirichlet's test** for monotone sequences. -/
theorem Monotone.cauchySeq_series_mul_of_tendsto_zero_of_bounded (hfa : Monotone f)
    (hf0 : Tendsto f atTop (𝓝 0)) (hgb : ∀ n, ‖∑ i ∈ range n, z i‖ ≤ b) :
    CauchySeq fun n ↦ ∑ i ∈ range n, f i • z i

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

(hgb : ∀ (n : ℕ), ‖∑ i ∈ Finset.range n, z i‖ ≤ b)

CauchySeq fun n => ∑ i ∈ Finset.range n, f i • z i


@[simp] lemma Multiset.coe_mem {x : m} : ↑x ∈ m

{α : Type u_1}
[DecidableEq α]
{m : Multiset α}
{x : m.ToType}


@[ext]
protected theorem ext (h : ∀ s, s ∈ f ↔ s ∈ g) : f = g

{α : Type u}
{f g : Filter α}
(h : ∀ (s : Set α), s ∈ f ↔ s ∈ g)


@[simp]
theorem coe_notMemRangeEquiv_symm (k : ℕ) :
    ((notMemRangeEquiv k).symm : ℕ → { n // n ∉ range k }) = fun j => ⟨j + k, by simp⟩

⇑(notMemRangeEquiv k).symm = fun j => ⟨j + k, ⋯⟩


@[to_additive (attr := simp) prod_apply]
theorem prod_apply (f : M →ₙ* N) (g : M →ₙ* P) (x) : f.prod g x = (f x, g x)

{M : Type u_5}
{N : Type u_6}
{P : Type u_7}
[Add M]
[Add N]
[Add P]
(f : AddHom M N)
(g : AddHom M P)
(x : M)


@[to_additive card_nsmul_le_sum]
theorem pow_card_le_prod (s : Finset ι) (f : ι → N) (n : N) (h : ∀ x ∈ s, n ≤ f x) :
    n ^ s.card ≤ s.prod f

{ι : Type u_1}
{N : Type u_5}
[OrderedAddCommMonoid N]
(s : Finset ι)
(f : ι → N)
(n : N)
(h : ∀ x ∈ s, n ≤ f x)


@[simp]
theorem cast_ofZNum [AddGroupWithOne α] (n : ZNum) : (ofZNum n : α) = Int.toNat n

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


theorem Code.Ok.zero {c} (h : Code.Ok c) {v} :
    Turing.eval step (stepNormal c Cont.halt v) = Cfg.halt <$> Code.eval c v

{c : Turing.ToPartrec.Code}
(h : c.Ok)
{v : List ℕ}

Turing.eval Turing.ToPartrec.step (Turing.ToPartrec.stepNormal c Turing.ToPartrec.Cont.halt v) =
  Turing.ToPartrec.Cfg.halt <$> c.eval v


@[simp]
theorem bicategoricalComp_refl {f g h : a ⟶ b} (η : f ⟶ g) (θ : g ⟶ h) : η ⊗≫ θ = η ≫ θ

{B : Type u}
[CategoryTheory.Bicategory B]
{a b : B}
{f g h : a ⟶ b}
(η : f ⟶ g)
(θ : g ⟶ h)

η ⊗≫ θ = η ≫ θ


theorem isCountablySpanning_spanningSets (μ : Measure α) [SigmaFinite μ] :
    IsCountablySpanning (range (spanningSets μ))

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

IsCountablySpanning (Set.range (MeasureTheory.spanningSets μ))


nonrec theorem congr_arg (f : MultilinearMap R M₁ M₂) {x y : ∀ i, M₁ i} (h : x = y) : f x = f y

{R : Type uR}
{ι : Type uι}
{M₁ : ι → Type v₁}
{M₂ : Type v₂}
[Semiring R]
[(i : ι) → AddCommMonoid (M₁ i)]
[AddCommMonoid M₂]
[(i : ι) → Module R (M₁ i)]
[Module R M₂]
(f : MultilinearMap R M₁ M₂)
{x y : (i : ι) → M₁ i}
(h : x = y)


/-- Angles are translation invariant -/
@[simp]
theorem angle_const_vadd (v : V) (p₁ p₂ p₃ : P) : ∠ (v +ᵥ p₁) (v +ᵥ p₂) (v +ᵥ p₃) = ∠ p₁ p₂ p₃

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[InnerProductSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]
(v : V)
(p₁ p₂ p₃ : P)

EuclideanGeometry.angle (v +ᵥ p₁) (v +ᵥ p₂) (v +ᵥ p₃) = EuclideanGeometry.angle p₁ p₂ p₃


@[simp]
theorem add_eq_sup : K + K' = K ⊔ K'

{R : Type u}
{L : Type v}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(K K' : LieSubalgebra R L)


@[norm_cast, simp]
theorem sup_coe_toSubmodule :
    (↑(N ⊔ N') : Submodule R M) = (N : Submodule R M) ⊔ (N' : Submodule R M)

{R : Type u}
{L : Type v}
{M : Type w}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
(N N' : LieSubmodule R L M)


lemma set_smul_le_iff (p : Submodule R M) :
    s • N ≤ p ↔
    ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p

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


/-- Exactness of `S.X₂.homology i ⟶ S.X₃.homology i ⟶ S.X₁.homology j`. -/
lemma homology_exact₃ : (ShortComplex.mk _ _ (comp_δ hS i j hij)).Exact

{S : CategoryTheory.ShortComplex (HomologicalComplex C c)}

(CategoryTheory.ShortComplex.mk (HomologicalComplex.homologyMap S.g i) (hS.δ i j hij) ⋯).Exact


@[to_additive (attr := simp)]
theorem sup_apply (x : E) : (p ⊔ q) x = p x ⊔ q x

{E : Type u_4}
[AddGroup E]
(p q : AddGroupSeminorm E)
(x : E)


theorem degree_eq_iff_natDegree_eq_of_pos {p : R[X]} {n : ℕ} (hn : 0 < n) :
    p.degree = n ↔ p.natDegree = n

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


theorem inf_sdiff_eq_bot_iff (hz : z ≤ y) (hx : x ≤ y) : z ⊓ y \ x = ⊥ ↔ z ≤ x

{α : Type u}
{x y z : α}
[GeneralizedBooleanAlgebra α]
(hz : z ≤ y)
(hx : x ≤ y)


theorem IsCompactOperator.continuous_comp {f : M₁ → M₂} (hf : IsCompactOperator f) {g : M₂ → M₃}
    (hg : Continuous g) : IsCompactOperator (g ∘ f)

{M₁ : Type u_4}
{M₂ : Type u_5}
{M₃ : Type u_6}
[TopologicalSpace M₁]
[TopologicalSpace M₂]
[TopologicalSpace M₃]
[AddCommMonoid M₁]
{f : M₁ → M₂}
(hf : IsCompactOperator f)
{g : M₂ → M₃}
(hg : Continuous g)


theorem degree_eq_sum_if_adj [AddCommMonoidWithOne R] (i : V) :
    (G.degree i : R) = ∑ j : V, if G.Adj i j then 1 else 0

{V : Type u_1}
(R : Type u_2)
[Fintype V]
(G : SimpleGraph V)
[DecidableRel G.Adj]
[AddCommMonoidWithOne R]
(i : V)

↑(G.degree i) = ∑ j : V, if G.Adj i j then 1 else 0


/-- If `0 ⟶ X₁ ⟶ X₂ ⟶ X₃` is an exact sequence of homological complex, then
`0 ⟶ X₁.cycles i ⟶ X₂.cycles i ⟶ X₃.cycles i` is exact. This lemma states
the exactness at `X₂.cycles i`, while the fact that `X₁.cycles i ⟶ X₂.cycles i`
is a mono is an instance. -/
lemma cycles_left_exact (S : ShortComplex (HomologicalComplex C c)) (hS : S.Exact) [Mono S.f]
    (i : ι) [S.X₁.HasHomology i] [S.X₂.HasHomology i] [S.X₃.HasHomology i] :
    (ShortComplex.mk (cyclesMap S.f i) (cyclesMap S.g i)
      (by rw [← cyclesMap_comp, S.zero, cyclesMap_zero])).Exact

(S : CategoryTheory.ShortComplex (HomologicalComplex C c))

(CategoryTheory.ShortComplex.mk (HomologicalComplex.cyclesMap S.f i) (HomologicalComplex.cyclesMap S.g i) ⋯).Exact


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

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


lemma card_parts_le : h.finpartition.parts.card ≤ r

{V : Type u_1}
[Fintype V]
[DecidableEq V]
{G : SimpleGraph V}
[DecidableRel G.Adj]
{r : ℕ}
(h : G.IsTuranMaximal r)


@[simp]
theorem cospanCompIso_hom_app_left : (cospanCompIso F f g).hom.app WalkingCospan.left = 𝟙 _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : C ⥤ D)
{X Y Z : C}
(f : X ⟶ Z)
(g : Y ⟶ Z)

(CategoryTheory.Limits.cospanCompIso F f g).hom.app CategoryTheory.Limits.WalkingCospan.left =
  𝟙 ((CategoryTheory.Limits.cospan f g ⋙ F).obj CategoryTheory.Limits.WalkingCospan.left)


theorem Integrable.add' {f g : α → β} (hf : Integrable f μ) (hg : Integrable g μ) :
    HasFiniteIntegral (f + g) μ

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

MeasureTheory.HasFiniteIntegral (f + g) μ


@[simp] lemma sum_comp_equiv {ι ι' : Type*} (e : ι' ≃ ι) (m : ι → Measure α) :
    sum (m ∘ e) = sum m

{α : Type u_1}
{m0 : MeasurableSpace α}
{ι : Type u_8}
{ι' : Type u_9}
(e : ι' ≃ ι)
(m : ι → MeasureTheory.Measure α)

MeasureTheory.Measure.sum (m ∘ ⇑e) = MeasureTheory.Measure.sum m


/-- A non-unital algebra homomorphism from `A` into a unital `R`-algebra `C` lifts to a unital
algebra homomorphism from the unitization into `C`. This is extended to an `Equiv` in
`Unitization.lift` and that should be used instead. This declaration only exists for performance
reasons. -/
@[simps]
def _root_.NonUnitalAlgHom.toAlgHom (φ : A →ₙₐ[R] C) : Unitization R A →ₐ[R] C

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[NonUnitalSemiring A]
[Module R A]
[SMulCommClass R A A]
[IsScalarTower R A A]
{C : Type u_5}
[Semiring C]
[Algebra R C]
(φ : A →ₙₐ[R] C)
(x : Unitization R A)

φ.toAlgHom x = (algebraMap R C) x.fst + φ x.snd


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


theorem encard_eq_one : s.encard = 1 ↔ ∃ x, s = {x}


@[simp]
theorem coe_comp (φ₁ : B →ₐ[R] C) (φ₂ : A →ₐ[R] B) : ⇑(φ₁.comp φ₂) = φ₁ ∘ φ₂

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

⇑(φ₁.comp φ₂) = ⇑φ₁ ∘ ⇑φ₂


lemma symm_Λ₀_eq (s : ℂ) :
    P.symm.Λ₀ s = P.symm.Λ s + (1 / s) • P.g₀ + (P.ε⁻¹ / (P.k - s)) • P.f₀

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
(P : WeakFEPair E)
(s : ℂ)

P.symm.Λ₀ s = P.symm.Λ s + (1 / s) • P.g₀ + (P.ε⁻¹ / (↑P.k - s)) • P.f₀


theorem limsup_le_of_le {f : Filter β} {u : β → α} {a}
    (hf : f.IsCoboundedUnder (· ≤ ·) u := by isBoundedDefault)
    (h : ∀ᶠ n in f, u n ≤ a) : limsup u f ≤ a

(hf : Filter.IsCoboundedUnder (fun x x_1 => x ≤ x_1) f u := by isBoundedDefault)


@[simp] lemma supIrredLowerSet_symm_apply (s : {s : LowerSet α // SupIrred s}) [Fintype s] :
    supIrredLowerSet.symm s = (s.1 : Set α).toFinset.sup id

{α : Type u_1}
[SemilatticeSup α]
[OrderBot α]
[Finite α]
(s : { s // SupIrred s })
[Fintype ↥↑s]

OrderIso.supIrredLowerSet.symm s = (↑↑s).toFinset.sup id


/-- See `tsub_add_eq_add_tsub` for the equality. -/
theorem add_tsub_le_tsub_add : a + b - c ≤ a - c + b

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


theorem mem_of_mem_head? {x : α} {l : List α} (h : x ∈ l.head?) : x ∈ l

{α : Type u}
{x : α}
{l : List α}
(h : x ∈ l.head?)


lemma piecewise_congr {f f' g g' : ∀ i, π i} (hf : ∀ i ∈ s, f i = f' i)
    (hg : ∀ i ∉ s, g i = g' i) : s.piecewise f g = s.piecewise f' g'

{ι : Type u_1}
{π : ι → Sort u_2}
(s : Finset ι)
[(j : ι) → Decidable (j ∈ s)]
{f f' g g' : (i : ι) → π i}
(hf : ∀ i ∈ s, f i = f' i)
(hg : ∀ i ∉ s, g i = g' i)


theorem proj_coe (t : Icc v.tMin v.tMax) : v.proj t = t

{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
(v : PicardLindelof E)
(t : ↑(Set.Icc v.tMin v.tMax))


theorem continuous_coe_real : Continuous ((↑) : ℚ → ℝ)


theorem WithSeminorms.continuous_seminorm {p : SeminormFamily 𝕜 E ι} (hp : WithSeminorms p)
    (i : ι) : Continuous (p i)

{𝕜 : Type u_1}
{E : Type u_5}
{ι : Type u_8}
[NormedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
[Nonempty ι]
[t : TopologicalSpace E]
{p : SeminormFamily 𝕜 E ι}
(hp : WithSeminorms p)
(i : ι)


theorem pentagon_bimod {V W X Y Z : Mon_ C} (M : Bimod V W) (N : Bimod W X) (P : Bimod X Y)
    (Q : Bimod Y Z) :
    whiskerRight (associatorBimod M N P).hom Q ≫
      (associatorBimod M (N.tensorBimod P) Q).hom ≫
        whiskerLeft M (associatorBimod N P Q).hom =
      (associatorBimod (M.tensorBimod N) P Q).hom ≫
        (associatorBimod M N (P.tensorBimod Q)).hom

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

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

Bimod.whiskerRight (M.associatorBimod N P).hom Q ≫
    (M.associatorBimod (N.tensorBimod P) Q).hom ≫ M.whiskerLeft (N.associatorBimod P Q).hom =
  ((M.tensorBimod N).associatorBimod P Q).hom ≫ (M.associatorBimod N (P.tensorBimod Q)).hom


theorem sin_sq : sin x ^ 2 = 1 - cos x ^ 2


/-- The functor from a category to its thin skeleton. -/
@[simps]
def toThinSkeleton : C ⥤ ThinSkeleton C

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

(CategoryTheory.toThinSkeleton C).obj a = Quotient.mk' a


theorem mem_insert_of_mem {y z : ZFSet} (x) (h : z ∈ y) : z ∈ insert x y


@[to_additive]
theorem le_comap_map {f : F} : S ≤ (S.map f).comap f

{M : Type u_1}
{N : Type u_2}
[AddZeroClass M]
[AddZeroClass N]
(S : AddSubmonoid M)
{F : Type u_4}
[FunLike F M N]
[mc : AddMonoidHomClass F M N]
{f : F}

S ≤ AddSubmonoid.comap f (AddSubmonoid.map f S)


@[simp] theorem realize_eqZero [CommRing K] [CompatibleRing K] (n : ℕ)
    (v : Empty → K) : (Formula.Realize (eqZero n) v) ↔ ((n : K) = 0)

{K : Type u_1}
[CommRing K]
[FirstOrder.Ring.CompatibleRing K]
(n : ℕ)
(v : Empty → K)

FirstOrder.Language.Formula.Realize (FirstOrder.Field.eqZero n) v ↔ ↑n = 0


@[simp] lemma rootSystem_coroot_apply (α) : (rootSystem H).coroot α = coroot α

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

(LieAlgebra.IsKilling.rootSystem H).coroot α = LieAlgebra.IsKilling.coroot ↑α


theorem head_eq_destruct (s : Seq α) : head.{u} s = Prod.fst.{u} <$> destruct.{u} s


protected theorem div_eq_iff_eq_mul_right {a b c : Nat} (H : 0 < b) (H' : b ∣ a) :
    a / b = c ↔ a = b * c


@[to_additive]
theorem sum_restrict_of_ac (h : IsFundamentalDomain G s μ) (hν : ν ≪ μ) :
    (sum fun g : G => ν.restrict (g • s)) = ν

[MeasureTheory.VAddInvariantMeasure G α μ]

(h : MeasureTheory.IsAddFundamentalDomain G s μ)

(hν : ν ≪ μ)

(MeasureTheory.Measure.sum fun g => ν.restrict (g +ᵥ s)) = ν


lemma distinguished_cocone_triangle {X Y : D} (f : X ⟶ Y) :
    ∃ (Z : D) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧),
      Triangle.mk f g h ∈ L.essImageDistTriang

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

∃ Z g h, CategoryTheory.Pretriangulated.Triangle.mk f g h ∈ L.essImageDistTriang


theorem MulPosMono.toMulPosReflectLT [MulPosMono α] : MulPosReflectLT α

{α : Type u_1}
[Mul α]
[Zero α]
[LinearOrder α]
[MulPosMono α]


theorem think_equiv (s : WSeq α) : think s ~ʷ s


/-- **Structure theorem of finitely generated abelian groups** : Any finitely generated abelian
group is the product of a power of `ℤ` and a direct sum of some `ZMod (p i ^ e i)` for some
prime powers `p i ^ e i`. -/
theorem equiv_free_prod_directSum_zmod [hG : AddGroup.FG G] :
    ∃ (n : ℕ) (ι : Type) (_ : Fintype ι) (p : ι → ℕ) (_ : ∀ i, Nat.Prime <| p i) (e : ι → ℕ),
      Nonempty <| G ≃+ (Fin n →₀ ℤ) × ⨁ i : ι, ZMod (p i ^ e i)

(G : Type u)
[AddCommGroup G]
[hG : AddGroup.FG G]

∃ n ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ (Fin n →₀ ℤ) × ⨁ (i : ι), ZMod (p i ^ e i))


@[simp]
theorem LinearMap.toMatrix_symm : (LinearMap.toMatrix v₁ v₂).symm = Matrix.toLin v₁ v₂

{R : Type u_1}
[CommSemiring R]
{m : Type u_3}
{n : Type u_4}
[Fintype n]
[Finite m]
[DecidableEq n]
{M₁ : Type u_5}
{M₂ : Type u_6}
[AddCommMonoid M₁]
[AddCommMonoid M₂]
[Module R M₁]
[Module R M₂]
(v₁ : Basis n R M₁)
(v₂ : Basis m R M₂)


theorem isIso_unop_iff {X Y : Cᵒᵖ} (f : X ⟶ Y) : IsIso f.unop ↔ IsIso f

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

CategoryTheory.IsIso f.unop ↔ CategoryTheory.IsIso f


theorem map_mem_closure₂ {f : X → Y → Z} {x : X} {y : Y} {s : Set X} {t : Set Y} {u : Set Z}
    (hf : Continuous (uncurry f)) (hx : x ∈ closure s) (hy : y ∈ closure t)
    (h : ∀ a ∈ s, ∀ b ∈ t, f a b ∈ u) : f x y ∈ closure u

{X : Type u}
{Y : Type v}
{Z : Type u_1}
[TopologicalSpace X]
[TopologicalSpace Y]
[TopologicalSpace Z]
{f : X → Y → Z}
{x : X}
{y : Y}
{s : Set X}
{t : Set Y}
{u : Set Z}
(hf : Continuous (Function.uncurry f))
(hx : x ∈ closure s)
(hy : y ∈ closure t)
(h : ∀ a ∈ s, ∀ b ∈ t, f a b ∈ u)


lemma slope_lt_right_deriv (hfc : StrictConcaveOn ℝ S f) (hx : x ∈ S) (hy : y ∈ S) (hxy : x < y)
    (hfd : DifferentiableWithinAt ℝ f (Ioi x) x) :
    slope f x y < derivWithin f (Ioi x) x

(hfd : DifferentiableWithinAt ℝ f (Set.Ioi x) x)

slope f x y < derivWithin f (Set.Ioi x) x


theorem Bornology.IsBounded.reProdIm (hs : IsBounded s) (ht : IsBounded t) : IsBounded (s ×ℂ t)

{s t : Set ℝ}
(hs : Bornology.IsBounded s)
(ht : Bornology.IsBounded t)


/-- The empty set is concyclic. -/
theorem concyclic_empty : Concyclic (∅ : Set P)

{V : Type u_1}
{P : Type u_2}
[NormedAddCommGroup V]
[NormedSpace ℝ V]
[MetricSpace P]
[NormedAddTorsor V P]


theorem chain_range_succ (r : ℕ → ℕ → Prop) (n a : ℕ) :
    Chain r a (range n.succ) ↔ r a 0 ∧ ∀ m < n, r m m.succ

List.Chain r a (List.range n.succ) ↔ r a 0 ∧ ∀ m < n, r m m.succ


@[to_additive]
protected theorem div_div_div_comm (hbc : Commute b c) (hbd : Commute b⁻¹ d) (hcd : Commute c⁻¹ d) :
    a / b / (c / d) = a / c / (b / d)

{G : Type u_1}
[DivisionMonoid G]
{a b c d : G}
(hbc : Commute b c)
(hbd : Commute b⁻¹ d)
(hcd : Commute c⁻¹ d)


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

(P : CategoryTheory.Idempotents.Karoubi (HomologicalComplex C (ComplexShape.down α)))

(((CategoryTheory.Idempotents.karoubiChainComplexEquivalence C α).functor.obj P).X n).p = P.p.f n


theorem C_apply : (C a : MvPolynomial σ R) = monomial 0 a

{R : Type u}
{σ : Type u_1}
{a : R}
[CommSemiring R]

MvPolynomial.C a = (MvPolynomial.monomial 0) a


theorem coe_comp (g : β → γ) (f : α → β) : ((g ∘ f : α → γ) : α →. γ) = (g : β →. γ).comp f

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


/-- The `p`-adic norm of `p` is `p⁻¹` if `p` is prime.

See also `padicNorm.padicNorm_p` for a version assuming `1 < p`. -/
@[simp]
theorem padicNorm_p_of_prime [Fact p.Prime] : padicNorm p p = (p : ℚ)⁻¹


lemma equation_iff (x y : R) :
    W.Equation x y ↔ y ^ 2 + W.a₁ * x * y + W.a₃ * y = x ^ 3 + W.a₂ * x ^ 2 + W.a₄ * x + W.a₆

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


@[simp]
theorem coords_apply (q : P) (i : ι) : b.coords q i = b.coord i q

{ι : 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)
(q : P)
(i : ι)


theorem inf'_eq_inf {s : Finset β} (H : s.Nonempty) (f : β → α) : s.inf' H f = s.inf f

{α : Type u_2}
{β : Type u_3}
[SemilatticeInf α]
[OrderTop α]
{s : Finset β}
(H : s.Nonempty)
(f : β → α)


theorem append_insert (a : α) (t : Vector3 α m) (v : Vector3 α n) (i : Fin2 (n + 1))
    (e : (n + 1) + m = (n + m) + 1) :
    insert a (t +-+ v) (Eq.recOn e (i.add m)) = Eq.recOn e (t +-+ insert a v i)

{α : Type u_1}
{m n : ℕ}
(a : α)
(t : Vector3 α m)
(v : Vector3 α n)
(i : Fin2 (n + 1))
(e : n + 1 + m = n + m + 1)

Vector3.insert a (t.append v) (Eq.recOn e (i.add m)) = Eq.recOn e (t.append (Vector3.insert a v i))


@[simp]
theorem untop_coe (x : α) (h : (x : WithTop α) ≠ ⊤ := coe_ne_top) : (x : WithTop α).untop h = x

{α : Type u_1}
(x : α)
(h : ↑x ≠ ⊤ := ⋯)


@[to_additive (attr := simp)]
theorem coe_id' {G : Type _} [CommGroup G] :
    @DFunLike.coe (G →* G) G (fun _ ↦ G) MonoidHom.instFunLike
      (CategoryStruct.id (X := CommGrp.of G)) = id


theorem finsetSum_iSup_of_monotone {α} {ι} [Preorder ι] [IsDirected ι (· ≤ ·)]
    {s : Finset α} {f : α → ι → ℝ≥0∞} (hf : ∀ a, Monotone (f a)) :
    (∑ a ∈ s, iSup (f a)) = ⨆ n, ∑ a ∈ s, f a n

{α : Type u_4}
{ι : Type u_5}
[Preorder ι]
[IsDirected ι fun x x_1 => x ≤ x_1]
{s : Finset α}
{f : α → ι → ℝ≥0∞}
(hf : ∀ (a : α), Monotone (f a))

∑ a ∈ s, iSup (f a) = ⨆ n, ∑ a ∈ s, f a n


theorem card_algHom_adjoin_integral (h : IsIntegral F α) (h_sep : IsSeparable F α)
    (h_splits : (minpoly F α).Splits (algebraMap F K)) :
    @Fintype.card (F⟮α⟯ →ₐ[F] K) (fintypeOfAlgHomAdjoinIntegral F h) = (minpoly F α).natDegree

(h_splits : Polynomial.Splits (algebraMap F K) (minpoly F α))

Fintype.card (↥F⟮α⟯ →ₐ[F] K) = (minpoly F α).natDegree


@[to_additive norm_le_pi_norm]
lemma norm_le_pi_norm' (i : ι) : ‖f i‖ ≤ ‖f‖

{ι : Type u_1}
{π : ι → Type u_4}
[Fintype ι]
[(i : ι) → SeminormedGroup (π i)]
(f : (i : ι) → π i)
(i : ι)


theorem sub_def {n} (x y : BitVec n) : x - y = .ofNat n ((2^n - y.toNat) + x.toNat)

x - y = BitVec.ofNat n (2 ^ n - y.toNat + x.toNat)


theorem sum_divisors_eq_sum_properDivisors_add_self :
    ∑ i ∈ divisors n, i = (∑ i ∈ properDivisors n, i) + n

∑ i ∈ n.divisors, i = ∑ i ∈ n.properDivisors, i + n


/--
The closure of a singleton `{a}` in the Scott topology is the right-closed left-infinite interval
`(-∞,a]`.
-/
@[simp] lemma closure_singleton : closure {a} = Iic a

{α : Type u_1}
[Preorder α]
[TopologicalSpace α]
[Topology.IsScott α]
{a : α}


/-- The category of commutative squares in a category. -/
structure Square where
  /-- the top-left object -/
  {X₁ : C}
  /-- the top-right object -/
  {X₂ : C}
  /-- the bottom-left object -/
  {X₃ : C}
  /-- the bottom-right object -/
  {X₄ : C}
  /-- the top morphism -/
  f₁₂ : X₁ ⟶ X₂
  /-- the left morphism -/
  f₁₃ : X₁ ⟶ X₃
  /-- the right morphism -/
  f₂₄ : X₂ ⟶ X₄
  /-- the bottom morphism -/
  f₃₄ : X₃ ⟶ X₄
  fac : f₁₂ ≫ f₂₄ = f₁₃ ≫ f₃₄

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

CategoryTheory.CategoryStruct.comp self.f₁₂ self.f₂₄ = CategoryTheory.CategoryStruct.comp self.f₁₃ self.f₃₄


/-- For `m < n`, `(n, m)` is in the transitive closure of a relation `~` for `n ≠ m` if `i ~ pred i`
  for all `i` between `n` and `m`. -/
theorem transGen_of_pred_of_gt (r : α → α → Prop) {n m : α} (h : ∀ i ∈ Ioc m n, r i (pred i))
    (hnm : m < n) : TransGen r n m

(h : ∀ i ∈ Set.Ioc m n, r i (Order.pred i))


@[reassoc (attr := simp)]
theorem inr_biprodComparison' : biprod.inr ≫ biprodComparison' F X Y = F.map biprod.inr

[CategoryTheory.Limits.HasBinaryBiproduct (F.obj X) (F.obj Y)]

CategoryTheory.Limits.biprod.inr ≫ F.biprodComparison' X Y = F.map CategoryTheory.Limits.biprod.inr


@[simp]
theorem aroots_X_sub_C [CommRing S] [IsDomain S] [Algebra T S]
    (r : T) : aroots (X - C r) S = {algebraMap T S r}

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]
(r : T)

(Polynomial.X - Polynomial.C r).aroots S = {(algebraMap T S) r}


theorem le_mul_right (a : Ordinal) {b : Ordinal} (hb : 0 < b) : a ≤ b * a

(a : Ordinal.{u_4})
{b : Ordinal.{u_4}}
(hb : 0 < b)


@[to_additive (attr := mono)]
theorem div_subset_div : s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ / t₁ ⊆ s₂ / t₂

{α : Type u_2}
[DecidableEq α]
[Div α]
{s₁ s₂ t₁ t₂ : Finset α}

s₁ ⊆ s₂ → t₁ ⊆ t₂ → s₁ / t₁ ⊆ s₂ / t₂


@[continuity]
theorem continuous_sqrt : Continuous (√· : ℝ → ℝ)


lemma autAdjoinRootXPowSubC_root (η) :
    autAdjoinRootXPowSubC hn a η (root _) = ((η : Kˣ) : K) • root _

{K : Type u}
[Field K]
{n : ℕ}
(hn : 0 < n)
(a : K)
(η : ↥(rootsOfUnity ⟨n, hn⟩ K))

((autAdjoinRootXPowSubC hn a) η) (AdjoinRoot.root (Polynomial.X ^ n - Polynomial.C a)) =
  ↑↑η • AdjoinRoot.root (Polynomial.X ^ n - Polynomial.C a)


lemma epi_iff_isIso_inl (hc : IsColimit c) : Epi f ↔ IsIso c.inl

{c : CategoryTheory.Limits.PushoutCocone f f}

(hc : CategoryTheory.Limits.IsColimit c)

CategoryTheory.Epi f ↔ CategoryTheory.IsIso c.inl


theorem smul_sup (a : M) (S T : Subring R) : a • (S ⊔ T) = a • S ⊔ a • T

{M : Type u_1}
{R : Type u_2}
[Monoid M]
[Ring R]
[MulSemiringAction M R]
(a : M)
(S T : Subring R)


/-- Flipping a complex of complexes over the diagonal, as an equivalence of categories. -/
@[simps]
def flipEquivalence :
    HomologicalComplex₂ C c₁ c₂ ≌ HomologicalComplex₂ C c₂ c₁

(HomologicalComplex₂.flipEquivalence C c₁ c₂).functor = HomologicalComplex₂.flipFunctor C c₁ c₂


theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v

{R : Type u_1}
{R₁ : Type u_2}
{M : Type u_5}
{M₁ : Type u_6}
{n : Type u_19}
[CommSemiring R]
[CommSemiring R₁]
[AddCommMonoid M₁]
[Module R₁ M₁]
[AddCommMonoid M]
[Module R M]
{I₁ I₁' : R₁ →+* R}
(B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M)
{v : n → M₁}


theorem Gamma1_is_congruence (N : ℕ+) : IsCongruenceSubgroup (Gamma1 N)


@[simp]
theorem sUnion_pair {x y : ZFSet.{u}} : ⋃₀ ({x, y} : ZFSet.{u}) = x ∪ y


/-- Forget the cone structure and obtain just the cone point. -/
@[simps]
def forget : Cone F ⥤ C

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

(CategoryTheory.Limits.Cones.forget F).obj t = t.pt


theorem isPiSystem_Icc (f : ι → α) (g : ι' → α) :
    @IsPiSystem α { S | ∃ i j, f i ≤ g j ∧ Icc (f i) (g j) = S }

{α : Type u_1}
{ι : Sort u_2}
{ι' : Sort u_3}
[LinearOrder α]
(f : ι → α)
(g : ι' → α)

IsPiSystem {S | ∃ i j, f i ≤ g j ∧ Set.Icc (f i) (g j) = S}


theorem lt_of_mul_lt_mul_left {a b c : Int} (w : a * b < a * c) (h : 0 ≤ a) : b < c


@[to_additive (attr := simp)]
theorem prod_insertNone (f : Option α → M) (s : Finset α) :
    ∏ x ∈ insertNone s, f x = f none * ∏ x ∈ s, f (some x)

{α : Type u_1}
{M : Type u_2}
[CommMonoid M]
(f : Option α → M)
(s : Finset α)

∏ x ∈ Finset.insertNone s, f x = f none * ∏ x ∈ s, f (some x)


protected theorem dvd_iff_dvd_of_dvd_sub {a b c : Int} (H : a ∣ b - c) : a ∣ b ↔ a ∣ c


@[to_additive (attr := simp)]
theorem coe_one : ((1 : NonemptyInterval α) : Set α) = 1


@[simp]
theorem encode_list_cons (a : α) (l : List α) :
    encode (a :: l) = succ (pair (encode a) (encode l))

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

Encodable.encode (a :: l) = (Nat.pair (Encodable.encode a) (Encodable.encode l)).succ


protected theorem symm {s t : Subtype p} (h : s ≈ t) : t ≈ s

{α : Sort u_1}
{p : α → Prop}
[Setoid α]
{s t : Subtype p}
(h : s ≈ t)


@[to_additive]
theorem mk_eq_mk {w₁ w₂ : FreeMonoid (M ⊕ N)} : mk w₁ = mk w₂ ↔ coprodCon M N w₁ w₂

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{w₁ w₂ : FreeMonoid (M ⊕ N)}

Monoid.Coprod.mk w₁ = Monoid.Coprod.mk w₂ ↔ (Monoid.coprodCon M N) w₁ w₂


@[csimp] private theorem fixF_eq_fixFC : @fixF = @fixFC


@[to_additive (attr := simp)]
theorem comap_bot' (f : F) : (⊥ : Submonoid N).comap f = mker f

{M : Type u_1}
{N : Type u_2}
[MulOneClass M]
[MulOneClass N]
{F : Type u_5}
[FunLike F M N]
[mc : MonoidHomClass F M N]
(f : F)


@[simp]
theorem fst_subset_fst_iff : c.fst ⊆ d.fst ↔ c ≤ d

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


theorem eventually_nhdsSet_iUnion₂ {ι : Sort*} {p : ι → Prop} {s : ι → Set X} {P : X → Prop} :
    (∀ᶠ x in 𝓝ˢ (⋃ (i) (_ : p i), s i), P x) ↔ ∀ i, p i → ∀ᶠ x in 𝓝ˢ (s i), P x

{X : Type u_1}
[TopologicalSpace X]
{ι : Sort u_3}
{p : ι → Prop}
{s : ι → Set X}
{P : X → Prop}

(∀ᶠ (x : X) in 𝓝ˢ (⋃ i, ⋃ (_ : p i), s i), P x) ↔ ∀ (i : ι), p i → ∀ᶠ (x : X) in 𝓝ˢ (s i), P x


theorem mul_le_of_le_one_of_le' [PosMulMono α] [MulPosMono α] (ha : a ≤ 1) (bc : b ≤ c) (a0 : 0 ≤ a)
    (c0 : 0 ≤ c) : a * b ≤ c

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
[MulPosMono α]
(ha : a ≤ 1)
(bc : b ≤ c)
(a0 : 0 ≤ a)
(c0 : 0 ≤ c)


@[reassoc (attr := simp, nolint simpNF)]
theorem Sigma.eqToHom_comp_ι {J : Type*} (f : J → C) [HasCoproduct f] {j j' : J} (w : j = j') :
    eqToHom (by simp [w]) ≫ Sigma.ι f j' = Sigma.ι f j

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{J : Type u_1}
(f : J → C)
[CategoryTheory.Limits.HasCoproduct f]
{j j' : J}
(w : j = j')

CategoryTheory.eqToHom ⋯ ≫ CategoryTheory.Limits.Sigma.ι f j' = CategoryTheory.Limits.Sigma.ι f j


theorem edist_indicatorConstLp_eq_nnnorm {t : Set α} {ht : MeasurableSet t} {hμt : μ t ≠ ∞} :
    edist (indicatorConstLp p hs hμs c) (indicatorConstLp p ht hμt c) =
      ‖indicatorConstLp p (hs.symmDiff ht) (measure_symmDiff_ne_top hμs hμt) c‖₊

{α : Type u_1}
{E : Type u_2}
{m0 : MeasurableSpace α}
{p : ℝ≥0∞}
{μ : MeasureTheory.Measure α}
[NormedAddCommGroup E]
{s : Set α}
{hs : MeasurableSet s}
{hμs : μ s ≠ ⊤}
{c : E}
{t : Set α}
{ht : MeasurableSet t}
{hμt : μ t ≠ ⊤}

edist (MeasureTheory.indicatorConstLp p hs hμs c) (MeasureTheory.indicatorConstLp p ht hμt c) =
  ↑‖MeasureTheory.indicatorConstLp p ⋯ ⋯ c‖₊


theorem Multiset.card_toFinset : m.toFinset.card = Multiset.card m.dedup

{α : Type u_1}
[DecidableEq α]
(m : Multiset α)


/-- `Fin.natAdd` as an `OrderEmbedding`.

`natAddOrderEmb n i` adds `n` to `i` "on the left". -/
@[simps! apply toEmbedding]
def natAddOrderEmb (n) : Fin m ↪o Fin (n + m)

(Fin.natAddOrderEmb n).toEmbedding = { toFun := Fin.natAdd n, inj' := ⋯ }


theorem small_congr {α : Type*} {β : Type*} (e : α ≃ β) : Small.{w} α ↔ Small.{w} β

{α : Type u_1}
{β : Type u_2}
(e : α ≃ β)


theorem setIntegral_nonneg_of_ae_restrict (hf : 0 ≤ᵐ[μ.restrict s] f) : 0 ≤ ∫ x in s, f x ∂μ

{X : Type u_1}
[MeasurableSpace X]
{μ : MeasureTheory.Measure X}
{f : X → ℝ}
{s : Set X}
(hf : 0 ≤ᵐ[μ.restrict s] f)


@[simp, fun_prop]
theorem differentiableAt_id : DifferentiableAt 𝕜 id x

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{x : E}


/-- `Finsupp α M`, denoted `α →₀ M`, is the type of functions `f : α → M` such that
  `f x = 0` for all but finitely many `x`. -/
structure Finsupp (α : Type*) (M : Type*) [Zero M] where
  /-- The support of a finitely supported function (aka `Finsupp`). -/
  support : Finset α
  /-- The underlying function of a bundled finitely supported function (aka `Finsupp`). -/
  toFun : α → M
  /-- The witness that the support of a `Finsupp` is indeed the exact locus where its
  underlying function is nonzero. -/
  mem_support_toFun : ∀ a, a ∈ support ↔ toFun a ≠ 0

{α : Type u_13}
{M : Type u_14}
[Zero M]
(self : α →₀ M)
(a : α)


@[simp]
theorem moebius_mul_log_eq_vonMangoldt : (μ : ArithmeticFunction ℝ) * log = Λ

↑ArithmeticFunction.moebius * ArithmeticFunction.log = ArithmeticFunction.vonMangoldt


/-- The natural paring of `B.dualSubmodule N` and `N`. -/
-- TODO: Show that this is perfect when `N` is a lattice and `B` is nondegenerate.
@[simps]
noncomputable
def dualSubmoduleToDual [NoZeroSMulDivisors R S] (N : Submodule R M) :
    B.dualSubmodule N →ₗ[R] Module.Dual R N

{R : Type u_1}
{S : Type u_2}
{M : Type u_3}
[CommRing R]
[Field S]
[AddCommGroup M]
[Algebra R S]
[Module R M]
[Module S M]
[IsScalarTower R S M]
(B : LinearMap.BilinForm S M)
[NoZeroSMulDivisors R S]
(N : Submodule R M)
(x : ↥(B.dualSubmodule N))
(y : ↥N)

((B.dualSubmoduleToDual N) x) y = B.dualSubmoduleParing x y


@[to_additive]
theorem TopologicalGroup.of_nhds_one' {G : Type u} [Group G] [TopologicalSpace G]
    (hmul : Tendsto (uncurry ((· * ·) : G → G → G)) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))
    (hinv : Tendsto (fun x : G => x⁻¹) (𝓝 1) (𝓝 1))
    (hleft : ∀ x₀ : G, 𝓝 x₀ = map (fun x => x₀ * x) (𝓝 1))
    (hright : ∀ x₀ : G, 𝓝 x₀ = map (fun x => x * x₀) (𝓝 1)) : TopologicalGroup G

(hmul : Filter.Tendsto (Function.uncurry fun x x_1 => x * x_1) (𝓝 1 ×ˢ 𝓝 1) (𝓝 1))

(hinv : Filter.Tendsto (fun x => x⁻¹) (𝓝 1) (𝓝 1))

(hleft : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x₀ * x) (𝓝 1))

(hright : ∀ (x₀ : G), 𝓝 x₀ = Filter.map (fun x => x * x₀) (𝓝 1))


theorem one_add_one_eq_two [AddMonoidWithOne R] : 1 + 1 = (2 : R)


lemma add_sq_le : (a + b) ^ 2 ≤ 2 * (a ^ 2 + b ^ 2)

{R : Type u_3}
[LinearOrderedSemiring R]
{a b : R}
[ExistsAddOfLE R]


@[to_additive]
protected lemma inv_mul_cancel (h : Commute a b) : a⁻¹ * b * a = b

{G : Type u_1}
[AddGroup G]
{a b : G}
(h : AddCommute a b)


lemma exactAt_single_obj (A : C) (i : ι) (hi : i ≠ j) :
    ExactAt ((single C c j).obj A) i

((HomologicalComplex.single C c j).obj A).ExactAt i


theorem lex_def {r : α → α → Prop} {s : N → N → Prop} {a b : α →₀ N} :
    Finsupp.Lex r s a b ↔ ∃ j, (∀ d, r d j → a d = b d) ∧ s (a j) (b j)

{α : Type u_1}
{N : Type u_2}
[Zero N]
{r : α → α → Prop}
{s : N → N → Prop}
{a b : α →₀ N}

Finsupp.Lex r s a b ↔ ∃ j, (∀ (d : α), r d j → a d = b d) ∧ s (a j) (b j)


theorem eq_zero_of_vecMul_eq_zero [DecidableEq m] {M : Matrix m m A} (hM : M.det ≠ 0) {v : m → A}
    (hv : v ᵥ* M = 0) : v = 0

{m : Type u_1}
{A : Type u_3}
[Fintype m]
[CommRing A]
[IsDomain A]
[DecidableEq m]
{M : Matrix m m A}
(hM : M.det ≠ 0)
{v : m → A}
(hv : Matrix.vecMul v M = 0)


@[simp]
theorem mem_mk {S : Subring K} {x : K} (h) : x ∈ (⟨S, h⟩ : Subfield K) ↔ x ∈ S

{K : Type u}
[DivisionRing K]
{S : Subring K}
{x : K}
(h : ∀ x ∈ S.carrier, x⁻¹ ∈ S.carrier)

x ∈ { toSubring := S, inv_mem' := h } ↔ x ∈ S


@[mono]
theorem toSubMulAction_strictMono :
    StrictMono (toSubMulAction : Submodule R M → SubMulAction R M)

{R : Type u}
{M : Type v}
[Semiring R]
[AddCommMonoid M]
[Module R M]


@[to_additive (attr := measurability)]
protected theorem smul_const {𝕜} [TopologicalSpace 𝕜] [SMul 𝕜 β] [ContinuousSMul 𝕜 β] {f : α → 𝕜}
    (hf : AEStronglyMeasurable f μ) (c : β) : AEStronglyMeasurable (fun x => f x • c) μ

(hf : MeasureTheory.AEStronglyMeasurable f μ)

MeasureTheory.AEStronglyMeasurable (fun x => f x +ᵥ c) μ


/--
A constructor for lax monoidal functors whose axioms are described by `tensorHom` instead of
`whiskerLeft` and `whiskerRight`.
-/
@[simps]
def LaxMonoidalFunctor.ofTensorHom (F : C ⥤ D)
    /- unit morphism -/
    (ε : 𝟙_ D ⟶ F.obj (𝟙_ C))
    /- tensorator -/
    (μ : ∀ X Y : C, F.obj X ⊗ F.obj Y ⟶ F.obj (X ⊗ Y))
    (μ_natural :
      ∀ {X Y X' Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y'),
        (F.map f ⊗ F.map g) ≫ μ Y Y' = μ X X' ≫ F.map (f ⊗ g) := by
      aesop_cat)
    /- associativity of the tensorator -/
    (associativity :
      ∀ X Y Z : C,
        (μ X Y ⊗ 𝟙 (F.obj Z)) ≫ μ (X ⊗ Y) Z ≫ F.map (α_ X Y Z).hom =
          (α_ (F.obj X) (F.obj Y) (F.obj Z)).hom ≫ (𝟙 (F.obj X) ⊗ μ Y Z) ≫ μ X (Y ⊗ Z) := by
      aesop_cat)
    /- unitality -/
    (left_unitality :
      ∀ X : C, (λ_ (F.obj X)).hom = (ε ⊗ 𝟙 (F.obj X)) ≫ μ (𝟙_ C) X ≫ F.map (λ_ X).hom := by
        aesop_cat)
    (right_unitality :
      ∀ X : C, (ρ_ (F.obj X)).hom = (𝟙 (F.obj X) ⊗ ε) ≫ μ X (𝟙_ C) ≫ F.map (ρ_ X).hom := by
        aesop_cat) :
        LaxMonoidalFunctor C D

(μ :
  (X Y : C) →
    CategoryTheory.MonoidalCategory.tensorObj (F.obj X) (F.obj Y) ⟶
      F.obj (CategoryTheory.MonoidalCategory.tensorObj X Y))

(μ_natural :
  ∀ {X Y X' Y' : C} (f : X ⟶ Y) (g : X' ⟶ Y'),
    CategoryTheory.MonoidalCategory.tensorHom (F.map f) (F.map g) ≫ μ Y Y' =
      μ X X' ≫ F.map (CategoryTheory.MonoidalCategory.tensorHom f g) := by
  aesop_cat)

(associativity :
  ∀ (X Y Z : C),
    CategoryTheory.MonoidalCategory.tensorHom (μ X Y) (𝟙 (F.obj Z)) ≫
        μ (CategoryTheory.MonoidalCategory.tensorObj X Y) Z ≫
          F.map (CategoryTheory.MonoidalCategory.associator X Y Z).hom =
      (CategoryTheory.MonoidalCategory.associator (F.obj X) (F.obj Y) (F.obj Z)).hom ≫
        CategoryTheory.MonoidalCategory.tensorHom (𝟙 (F.obj X)) (μ Y Z) ≫
          μ X (CategoryTheory.MonoidalCategory.tensorObj Y Z) := by
  aesop_cat)

(left_unitality :
  ∀ (X : C),
    (CategoryTheory.MonoidalCategory.leftUnitor (F.obj X)).hom =
      CategoryTheory.MonoidalCategory.tensorHom ε (𝟙 (F.obj X)) ≫
        μ (𝟙_ C) X ≫ F.map (CategoryTheory.MonoidalCategory.leftUnitor X).hom := by
  aesop_cat)

(right_unitality :
  ∀ (X : C),
    (CategoryTheory.MonoidalCategory.rightUnitor (F.obj X)).hom =
      CategoryTheory.MonoidalCategory.tensorHom (𝟙 (F.obj X)) ε ≫
        μ X (𝟙_ C) ≫ F.map (CategoryTheory.MonoidalCategory.rightUnitor X).hom := by
  aesop_cat)

(CategoryTheory.LaxMonoidalFunctor.ofTensorHom F ε μ μ_natural associativity left_unitality right_unitality).μ X Y =
  μ X Y


protected theorem le_of_add_le_add_left [ContravariantClass α α (· + ·) (· ≤ ·)] (ha : a ≠ ⊥)
    (h : a + b ≤ a + c) : b ≤ c

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


theorem measurableSet_sSup {ms : Set (MeasurableSpace α)} {s : Set α} :
    MeasurableSet[sSup ms] s ↔
      GenerateMeasurable { s : Set α | ∃ m ∈ ms, MeasurableSet[m] s } s

{α : Type u_1}
{ms : Set (MeasurableSpace α)}
{s : Set α}

MeasurableSet s ↔ MeasurableSpace.GenerateMeasurable {s | ∃ m ∈ ms, MeasurableSet s} s


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

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


/-- This is the first barycentric form of the Lagrange interpolant. -/
theorem eval_interpolate_not_at_node (hx : ∀ i ∈ s, x ≠ v i) :
    eval x (interpolate s v r) =
      eval x (nodal s v) * ∑ i ∈ s, nodalWeight s v i * (x - v i)⁻¹ * r i

{F : Type u_1}
[Field F]
{ι : Type u_2}
[DecidableEq ι]
{s : Finset ι}
{v : ι → F}
(r : ι → F)
{x : F}
(hx : ∀ i ∈ s, x ≠ v i)

Polynomial.eval x ((Lagrange.interpolate s v) r) =
  Polynomial.eval x (Lagrange.nodal s v) * ∑ i ∈ s, Lagrange.nodalWeight s v i * (x - v i)⁻¹ * r i


theorem Additive.isAddSubmonoid_iff {s : Set M} :
    @IsAddSubmonoid (Additive M) _ s ↔ IsSubmonoid s


theorem id_map {α : TypeVec n} : ∀ x : P α, TypeVec.id <$$> x = x

{n : ℕ}
(P : MvPFunctor.{u} n)
{α : TypeVec.{u} n}
(x : ↑P α)


@[simp]
theorem countP_False {s : Multiset α} : countP (fun _ => False) s = 0


theorem IsSeparator.isDetector [Balanced C] {G : C} : IsSeparator G → IsDetector G

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

CategoryTheory.IsSeparator G → CategoryTheory.IsDetector G


@[simp]
theorem spanCompIso_app_right : (spanCompIso F f g).app WalkingSpan.right = Iso.refl _

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(F : C ⥤ D)
{X Y Z : C}
(f : X ⟶ Y)
(g : X ⟶ Z)

(CategoryTheory.Limits.spanCompIso F f g).app CategoryTheory.Limits.WalkingSpan.right =
  CategoryTheory.Iso.refl ((CategoryTheory.Limits.span f g ⋙ F).obj CategoryTheory.Limits.WalkingSpan.right)


theorem toLex_strictMono : StrictMono (@toLex (α ⊕ β))

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


@[simp]
theorem NormedAddGroupHom.norm_completion (f : NormedAddGroupHom G H) : ‖f.completion‖ = ‖f‖

{G : Type u_1}
[SeminormedAddCommGroup G]
{H : Type u_2}
[SeminormedAddCommGroup H]
(f : NormedAddGroupHom G H)


theorem type_le_iff' {α β} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] : type r ≤ type s ↔ Nonempty (r ↪r s)

{α β : Type u_3}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]

Ordinal.type r ≤ Ordinal.type s ↔ Nonempty (r ↪r s)


theorem sign_eq_one_iff_pos (a : Int) : sign a = 1 ↔ 0 < a


@[continuity]
protected theorem continuous (h : M ≃ₘ^n⟮I, I'⟯ M') : Continuous h

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{E' : Type u_3}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H : Type u_5}
[TopologicalSpace H]
{H' : Type u_6}
[TopologicalSpace H']
{I : ModelWithCorners 𝕜 E H}
{I' : ModelWithCorners 𝕜 E' H'}
{M : Type u_9}
[TopologicalSpace M]
[ChartedSpace H M]
{M' : Type u_10}
[TopologicalSpace M']
[ChartedSpace H' M']
{n : ℕ∞}
(h : M ≃ₘ^n⟮I, I'⟯ M')


theorem colimit_exists_rep (x : colimit (C := SheafedSpace C) F) :
    ∃ (i : J) (y : F.obj i), (colimit.ι F i).base y = x

(F : CategoryTheory.Functor J (AlgebraicGeometry.SheafedSpace C))

(x : ↑↑(CategoryTheory.Limits.colimit F).toPresheafedSpace)

∃ i y, (CategoryTheory.Limits.colimit.ι F i).base y = x


theorem self_mem_flag (b : Basis (Fin n) R M) {i : Fin n} {k : Fin (n + 1)} (h : i.castSucc < k) :
    b i ∈ b.flag k

{R : Type u_1}
{M : Type u_2}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{n : ℕ}
(b : Basis (Fin n) R M)
{i : Fin n}
{k : Fin (n + 1)}
(h : i.castSucc < k)


@[simp]
lemma map_π_liftedConeElement (i : I) :
    A.map (limit.π (F ⋙ π A) i) (liftedConeElement F) = (F.obj i).snd

(F : CategoryTheory.Functor I A.Elements)

A.map (CategoryTheory.Limits.limit.π (F.comp (CategoryTheory.CategoryOfElements.π A)) i)
    (CategoryTheory.CategoryOfElements.CreatesLimitsAux.liftedConeElement F) =
  (F.obj i).snd


@[to_additive]
theorem IsWF.min_smul [LinearOrder G] [LinearOrder P] [SMul G P] [IsOrderedCancelSMul G P]
    {s : Set G} {t : Set P} (hs : s.IsWF) (ht : t.IsWF) (hsn : s.Nonempty) (htn : t.Nonempty) :
    (hs.smul ht).min (hsn.smul htn) = hs.min hsn • ht.min htn

{G : Type u_1}
{P : Type u_2}
[LinearOrder G]
[LinearOrder P]
[SMul G P]
[IsOrderedCancelSMul G P]
{s : Set G}
{t : Set P}
(hs : s.IsWF)
(ht : t.IsWF)
(hsn : s.Nonempty)
(htn : t.Nonempty)


theorem max'_erase_ne_self {s : Finset α} (s0 : (s.erase x).Nonempty) : (s.erase x).max' s0 ≠ x

{α : Type u_2}
[LinearOrder α]
{x : α}
{s : Finset α}
(s0 : (s.erase x).Nonempty)


lemma exists_mul_self' (x : ℕ) : (∃ n, n ^ 2 = x) ↔ sqrt x ^ 2 = x


/-- The congruence relation used to localize a `CommMonoid` at a submonoid can be expressed
equivalently as an infimum (see `Localization.r`) or explicitly
(see `Localization.r'`). -/
@[to_additive AddLocalization.r_eq_r'
    "The additive congruence relation used to localize an `AddCommMonoid` at a submonoid can be
expressed equivalently as an infimum (see `AddLocalization.r`) or explicitly
(see `AddLocalization.r'`)."]
theorem r_eq_r' : r S = r' S

{M : Type u_1}
[CommMonoid M]
(S : Submonoid M)


theorem isClosed_iff_zeroLocus (Z : Set (PrimeSpectrum R)) : IsClosed Z ↔ ∃ s, Z = zeroLocus s

{R : Type u}
[CommSemiring R]
(Z : Set (PrimeSpectrum R))

IsClosed Z ↔ ∃ s, Z = PrimeSpectrum.zeroLocus s


@[to_additive (attr := gcongr)]
lemma mulEnergy_mono (hs : s₁ ⊆ s₂) (ht : t₁ ⊆ t₂) : Eₘ[s₁, t₁] ≤ Eₘ[s₂, t₂]

{α : Type u_1}
[DecidableEq α]
[Add α]
{s₁ s₂ t₁ t₂ : Finset α}
(hs : s₁ ⊆ s₂)
(ht : t₁ ⊆ t₂)


/-- A functor to an `R`-linear category lifts to a functor from its `R`-linear completion.
-/
@[simps]
def lift (F : C ⥤ D) : Free R C ⥤ D

(R : Type u_1)
[CommRing R]
{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u}
[CategoryTheory.Category.{v, u} D]
[CategoryTheory.Preadditive D]
[CategoryTheory.Linear R D]
(F : C ⥤ D)
(X : CategoryTheory.Free R C)

(CategoryTheory.Free.lift R F).obj X = F.obj X


theorem hyperoperation_two_two_eq_four (n : ℕ) : hyperoperation (n + 1) 2 2 = 4


/-- If `f` is a monotone function from `ℤ` to a preorder and `x` lies between `f n` and
  `f (n + 1)`, then `x` doesn't lie in the range of `f`. -/
theorem Monotone.ne_of_lt_of_lt_int {f : ℤ → α} (hf : Monotone f) (n : ℤ) {x : α} (h1 : f n < x)
    (h2 : x < f (n + 1)) (a : ℤ) : f a ≠ x

{α : Type u}
[Preorder α]
{f : ℤ → α}
(hf : Monotone f)
(n : ℤ)
{x : α}
(h1 : f n < x)
(h2 : x < f (n + 1))
(a : ℤ)


lemma Y_eq_of_Y_ne' {P Q : Fin 3 → F} (hP : W.Equation P) (hQ : W.Equation Q)
    (hx : P x * Q z ^ 2 = Q x * P z ^ 2) (hy : P y * Q z ^ 3 ≠ W.negY Q * P z ^ 3) :
    P y * Q z ^ 3 = Q y * P z ^ 3


/-- The functor `Comma L R₁ ⥤ Comma L R₃` induced by the composition of the natural transformations
    `r : R₁ ⟶ R₂` and `r' : R₂ ⟶ R₃` is naturally isomorphic to the composition of the functors
    induced by these natural transformations. -/
@[simps!]
def mapRightComp (r : R₁ ⟶ R₂) (r' : R₂ ⟶ R₃) :
    mapRight L (r ≫ r') ≅ mapRight L r ⋙ mapRight L r'

{A : Type u₁}
[CategoryTheory.Category.{v₁, u₁} A]
{B : Type u₂}
[CategoryTheory.Category.{v₂, u₂} B]
{T : Type u₃}
[CategoryTheory.Category.{v₃, u₃} T]
(L : CategoryTheory.Functor A T)
{R₁ R₂ R₃ : CategoryTheory.Functor B T}
(r : R₁ ⟶ R₂)
(r' : R₂ ⟶ R₃)
(X : CategoryTheory.Comma L R₁)

((CategoryTheory.Comma.mapRightComp L r r').inv.app X).right = CategoryTheory.CategoryStruct.id X.right


@[simp]
theorem rTensor_tmul (m : M) (n : N) : f.rTensor M (n ⊗ₜ m) = f n ⊗ₜ m

{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)
(n : N)

(LinearMap.rTensor M f) (n ⊗ₜ[R] m) = f n ⊗ₜ[R] m


@[simp]
theorem coe_quotQuotToQuotSupₐ : ⇑(quotQuotToQuotSupₐ R I J) = quotQuotToQuotSup I J

(R : Type u)
{A : Type u_1}
[CommSemiring R]
[CommRing A]
[Algebra R A]
(I J : Ideal A)

⇑(DoubleQuot.quotQuotToQuotSupₐ R I J) = ⇑(DoubleQuot.quotQuotToQuotSup I J)


theorem lTensor_mul (f g : N ≃ₗ[R] N) : (f * g).lTensor M = f.lTensor M * g.lTensor M

{R : Type u_1}
[CommSemiring R]
(M : Type u_4)
{N : Type u_5}
[AddCommMonoid M]
[AddCommMonoid N]
[Module R M]
[Module R N]
(f g : N ≃ₗ[R] N)

LinearEquiv.lTensor M (f * g) = LinearEquiv.lTensor M f * LinearEquiv.lTensor M g


/-- `IsCountablyGenerated f` means `f = generate s` for some countable `s`. -/
class IsCountablyGenerated (f : Filter α) : Prop where
  /-- There exists a countable set that generates the filter. -/
  out : ∃ s : Set (Set α), s.Countable ∧ f = generate s

{α : Type u_1}
{f : Filter α}
[self : f.IsCountablyGenerated]

∃ s, s.Countable ∧ f = Filter.generate s


lemma lift'_zero (f : α →* β) : lift' f (0 : WithZero α) = 0

{α : Type u_1}
{β : Type u_2}
[MulOneClass α]
[MulZeroOneClass β]
(f : α →* β)


/-- The function `ContinuousLinearMap.smulRight`, associating to a continuous linear map
`f : E → 𝕜` and a scalar `c : F` the tensor product `f ⊗ c` as a continuous linear map from `E` to
`F`, is a bounded bilinear map. -/
theorem isBoundedBilinearMap_smulRight :
    IsBoundedBilinearMap 𝕜 fun p =>
      (ContinuousLinearMap.smulRight : (E →L[𝕜] 𝕜) → F → E →L[𝕜] F) p.1 p.2

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]

IsBoundedBilinearMap 𝕜 fun p => p.1.smulRight p.2


theorem has_good_supp_iff {α : Type u} (x : F α) :
    (∀ p, Liftp p x ↔ ∀ u ∈ supp x, p u) ↔
      ∃ a f, abs ⟨a, f⟩ = x ∧ ∀ a' f', abs ⟨a', f'⟩ = x → f '' univ ⊆ f' '' univ

{F : Type u → Type u}
[q : QPF F]
{α : Type u}
(x : F α)

(∀ (p : α → Prop), Functor.Liftp p x ↔ ∀ u ∈ Functor.supp x, p u) ↔
  ∃ a f,
    QPF.abs ⟨a, f⟩ = x ∧
      ∀ (a' : (QPF.P F).A) (f' : (QPF.P F).B a' → α), QPF.abs ⟨a', f'⟩ = x → f '' Set.univ ⊆ f' '' Set.univ


@[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
    no_index (OfNat.ofNat n : ℚ≥0) = (OfNat.ofNat n : α)

{α : Type u_3}
[DivisionSemiring α]
(n : ℕ)
[n.AtLeastTwo]


theorem map_preimage (f : α →ₛ β) (g : β → γ) (s : Set γ) :
    f.map g ⁻¹' s = f ⁻¹' ↑(f.range.filter fun b => g b ∈ s)

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[MeasurableSpace α]
(f : MeasureTheory.SimpleFunc α β)
(g : β → γ)
(s : Set γ)

↑(MeasureTheory.SimpleFunc.map g f) ⁻¹' s = ↑f ⁻¹' ↑(Finset.filter (fun b => g b ∈ s) f.range)


/-- If a `RingHom` maps all units and all factors of an element `a` into a submonoid `s`, then it
also maps `a` into that submonoid. -/
theorem ringHom_mem_submonoid_of_factors_subset_of_units_subset {R S : Type*} [CommRing R]
    [IsDomain R] [IsPrincipalIdealRing R] [Semiring S] (f : R →+* S) (s : Submonoid S) (a : R)
    (ha : a ≠ 0) (h : ∀ b ∈ factors a, f b ∈ s) (hf : ∀ c : Rˣ, f c ∈ s) : f a ∈ s

(h : ∀ b ∈ PrincipalIdealRing.factors a, f b ∈ s)


@[to_additive]
lemma orderOf_eq [Group G] (a : G) {x y : G} (h : SemiconjBy a x y) : orderOf x = orderOf y

{G : Type u_1}
[Group G]
(a : G)
{x y : G}
(h : SemiconjBy a x y)


/-- An alternative phrasing of the explicit equalizer condition, using more categorical language. -/
theorem equalizerCondition_iff_isIso_lift (P : Cᵒᵖ ⥤ Type*) : EqualizerCondition P ↔
    ∀ (X B : C) (π : X ⟶ B) [EffectiveEpi π] [HasPullback π π],
      IsIso (equalizer.lift (P.map π.op) (equalizerCondition_w' P π))

(P : CategoryTheory.Functor Cᵒᵖ (Type u_4))

CategoryTheory.regularTopology.EqualizerCondition P ↔
  ∀ (X B : C) (π : X ⟶ B) [inst : CategoryTheory.EffectiveEpi π] [inst : CategoryTheory.Limits.HasPullback π π],
    CategoryTheory.IsIso (CategoryTheory.Limits.equalizer.lift (P.map π.op) ⋯)


theorem ncard_singleton_inter (a : α) (s : Set α) : ({a} ∩ s).ncard ≤ 1


theorem MetricSpace.replaceBornology_eq {α} [m : MetricSpace α] [B : Bornology α]
    (H : ∀ s, @IsBounded _ B s ↔ @IsBounded _ PseudoMetricSpace.toBornology s) :
    MetricSpace.replaceBornology _ H = m

(H : ∀ (s : Set α), Bornology.IsBounded s ↔ Bornology.IsBounded s)


/-- If a function is interval integrable with respect to a given measure `μ` on `a..b` then
  it is integrable on `uIoc a b` with respect to `μ`. -/
theorem IntervalIntegrable.def' (h : IntervalIntegrable f μ a b) : IntegrableOn f (Ι a b) μ

{E : Type u_3}
[NormedAddCommGroup E]
{f : ℝ → E}
{a b : ℝ}
{μ : MeasureTheory.Measure ℝ}
(h : IntervalIntegrable f μ a b)


@[simp]
theorem Units.inv_neg
    [ZeroLEOneClass α] [NeZero (R := α) 1] [MulPosMono α] [PosMulMono α]
    {u : αˣ} : ↑u⁻¹ < (0 : α) ↔ ↑u < (0 : α)

{α : Type u}
[Semiring α]
[LinearOrder α]
[ZeroLEOneClass α]
[NeZero 1]
[MulPosMono α]
[PosMulMono α]
{u : αˣ}


/-- The composition of two local trivializations is the trivialization change Z.triv_change i j. -/
theorem localTrivAsPartialEquiv_trans (i j : ι) :
    (Z.localTrivAsPartialEquiv i).symm.trans (Z.localTrivAsPartialEquiv j) ≈
      (Z.trivChange i j).toPartialEquiv

{ι : Type u_1}
{B : Type u_2}
{F : Type u_3}
[TopologicalSpace B]
[TopologicalSpace F]
(Z : FiberBundleCore ι B F)
(i j : ι)


/-- `f` is continuously differentiable if it is cont. differentiable at
each `x ∈ mulTSupport f`. -/
@[to_additive "`f` is continuously differentiable if it is continuously
differentiable at each `x ∈ tsupport f`."]
theorem contMDiff_of_mulTSupport [One M'] {f : M → M'}
    (hf : ∀ x ∈ mulTSupport f, ContMDiffAt I I' n f x) : ContMDiff I I' n f

(hf : ∀ x ∈ tsupport f, ContMDiffAt I I' n f x)


theorem isAntichain_and_greatest_iff : IsAntichain (· ≤ ·) s ∧ IsGreatest s a ↔ s = {a}

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

IsAntichain (fun x x_1 => x ≤ x_1) s ∧ IsGreatest s a ↔ s = {a}


theorem num_mul_dvd (x y : RatFunc K) : num (x * y) ∣ num x * num y

{K : Type u}
[Field K]
(x y : RatFunc K)


/-- The unit isomorphism of the equivalence
`Karoubi (HomologicalComplex C c) ≌ HomologicalComplex (Karoubi C) c`. -/
@[simps]
def unitIso : 𝟭 (Karoubi (HomologicalComplex C c)) ≅ functor ⋙ inverse

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

(CategoryTheory.Idempotents.KaroubiHomologicalComplexEquivalence.unitIso.hom.app P).f.f n = P.p.f n


/-- A category is `MonoidalPreadditive` if tensoring is additive in both factors.

Note we don't `extend Preadditive C` here, as `Abelian C` already extends it,
and we'll need to have both typeclasses sometimes.
-/
class MonoidalPreadditive : Prop where
  whiskerLeft_zero : ∀ {X Y Z : C}, X ◁ (0 : Y ⟶ Z) = 0 := by aesop_cat
  zero_whiskerRight : ∀ {X Y Z : C}, (0 : Y ⟶ Z) ▷ X = 0 := by aesop_cat
  whiskerLeft_add : ∀ {X Y Z : C} (f g : Y ⟶ Z), X ◁ (f + g) = X ◁ f + X ◁ g := by aesop_cat
  add_whiskerRight : ∀ {X Y Z : C} (f g : Y ⟶ Z), (f + g) ▷ X = f ▷ X + g ▷ X := by aesop_cat

[self : CategoryTheory.MonoidalPreadditive C]

CategoryTheory.MonoidalCategory.whiskerLeft X 0 = 0


theorem verschiebung_frobenius_comm [CharP R p] :
    Function.Commute (verschiebung : 𝕎 R → 𝕎 R) frobenius

{p : ℕ}
{R : Type u_1}
[hp : Fact (Nat.Prime p)]
[CommRing R]
[CharP R p]


/-- The gaussian pdf is positive when the variance is not zero. -/
lemma gaussianPDFReal_pos (μ : ℝ) (v : ℝ≥0) (x : ℝ) (hv : v ≠ 0) : 0 < gaussianPDFReal μ v x

0 < ProbabilityTheory.gaussianPDFReal μ v x


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

{s t : TopologicalSpace.IrreducibleCloseds α}


theorem IsGLB.ciInf_set_eq {s : Set β} {f : β → α} (H : IsGLB (f '' s) a) (Hne : s.Nonempty) :
    ⨅ i : s, f i = a

{α : Type u_1}
{β : Type u_2}
[ConditionallyCompleteLattice α]
{a : α}
{s : Set β}
{f : β → α}
(H : IsGLB (f '' s) a)
(Hne : s.Nonempty)


theorem le_congr_left {x₁ x₂ y : PGame} (hx : x₁ ≈ x₂) : x₁ ≤ y ↔ x₂ ≤ y

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

x₁ ≤ y ↔ x₂ ≤ y


/-- Any category with products and equalizers has all limits.

See <https://stacks.math.columbia.edu/tag/002N>.
-/
theorem has_limits_of_hasEqualizers_and_products [HasProducts.{w} C] [HasEqualizers C] :
    HasLimitsOfSize.{w, w} C

{C : Type u}
[CategoryTheory.Category.{v, u} C]
[CategoryTheory.Limits.HasProducts C]
[CategoryTheory.Limits.HasEqualizers C]

CategoryTheory.Limits.HasLimitsOfSize.{w, w, v, u} C


theorem lt_nmul_iff₃' :
    d < a ⨳ (b ⨳ c) ↔
      ∃ a' < a, ∃ b' < b, ∃ c' < c,
        d ♯ a' ⨳ (b' ⨳ c) ♯ a' ⨳ (b ⨳ c') ♯ a ⨳ (b' ⨳ c') ≤
          a' ⨳ (b ⨳ c) ♯ a ⨳ (b' ⨳ c) ♯ a ⨳ (b ⨳ c') ♯ a' ⨳ (b' ⨳ c')


@[simp]
theorem boundary_zero : c.boundary 0 = 0


theorem insert_subset_iff : insert a s ⊆ t ↔ a ∈ t ∧ s ⊆ t


theorem DifferentiableWithinAt.hasFDerivWithinAt (h : DifferentiableWithinAt 𝕜 f s x) :
    HasFDerivWithinAt f (fderivWithin 𝕜 f s x) s x

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


lemma coe_ne_coe : (p : ℝ≥0∞) ≠ q ↔ p ≠ q

↑p ≠ ↑q ↔ p ≠ q


/-- The equivalence between `C` and its monoidal opposite's monoidal opposite. -/
@[simps!] def MonoidalOpposite.mopMopEquivalence : Cᴹᵒᵖᴹᵒᵖ ≌ C

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

(CategoryTheory.MonoidalOpposite.mopMopEquivalence C).counitIso.hom.app X = 𝟙 X


@[to_additive (attr := simp)]
theorem unsym_one [One α] : unsym (1 : αˢʸᵐ) = 1


theorem prime_iff_prime_int {p : ℕ} : p.Prime ↔ _root_.Prime (p : ℤ)


theorem nonzeroMinimum_eq_of_nonzero {xs : List Nat} (h : xs.nonzeroMinimum ≠ 0) :
    ∃ x ∈ xs, xs.nonzeroMinimum = x


theorem universalHom_unique (φ : R[S⁻¹] →+* T) (huniv : ∀ r : R, φ (numeratorHom r) = f r) :
    φ = universalHom f fS hf

(huniv : ∀ (r : R), φ (OreLocalization.numeratorHom r) = f r)

φ = OreLocalization.universalHom f fS hf


theorem _root_.minpoly.degree_le (x : L) [FiniteDimensional K L] :
    (minpoly K x).degree ≤ finrank K L

{K : Type u}
[Field K]
{L : Type u_3}
[Field L]
[Algebra K L]
(x : L)
[FiniteDimensional K L]

(minpoly K x).degree ≤ ↑(FiniteDimensional.finrank K L)


/-- Interpreting the legs of a cocone as a costructured arrow, interpreting this arrow as an arrow
    over the cocone point, and finally forgetting the arrow is the same as just applying the
    functor the cocone was over. -/
@[simps!]
def Cocone.toCostructuredArrowCompToOverCompForget {F : J ⥤ C} (c : Cocone F) :
    c.toCostructuredArrow ⋙ CostructuredArrow.toOver _ _ ⋙ Over.forget _ ≅ F

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

c.toCostructuredArrowCompToOverCompForget.inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)


/-- This structure permits to define a fiber bundle when trivializations are given as local
equivalences but there is not yet a topology on the total space. The total space is hence given a
topology in such a way that there is a fiber bundle structure for which the partial equivalences
are also partial homeomorphisms and hence local trivializations. -/
-- Porting note (#5171): was @[nolint has_nonempty_instance]
structure FiberPrebundle where
  pretrivializationAtlas : Set (Pretrivialization F (π F E))
  pretrivializationAt : B → Pretrivialization F (π F E)
  mem_base_pretrivializationAt : ∀ x : B, x ∈ (pretrivializationAt x).baseSet
  pretrivialization_mem_atlas : ∀ x : B, pretrivializationAt x ∈ pretrivializationAtlas
  continuous_trivChange : ∀ e, e ∈ pretrivializationAtlas → ∀ e', e' ∈ pretrivializationAtlas →
    ContinuousOn (e ∘ e'.toPartialEquiv.symm) (e'.target ∩ e'.toPartialEquiv.symm ⁻¹' e.source)
  totalSpaceMk_inducing : ∀ b : B, Inducing (pretrivializationAt b ∘ TotalSpace.mk b)

{B : Type u_2}
{F : Type u_3}
{E : B → Type u_5}
[TopologicalSpace B]
[TopologicalSpace F]
[(x : B) → TopologicalSpace (E x)]
(self : FiberPrebundle F E)
(b : B)

Inducing (↑(self.pretrivializationAt b) ∘ Bundle.TotalSpace.mk b)


nonrec theorem comp {f : β → σ} {g : α → β} (hf : Computable f) (hg : Computable g) :
    Computable fun a => f (g a)

{α : Type u_1}
{β : Type u_2}
{σ : Type u_4}
[Primcodable α]
[Primcodable β]
[Primcodable σ]
{f : β → σ}
{g : α → β}
(hf : Computable f)
(hg : Computable g)


theorem aeval_coe_eq_smeval {R : Type*} [CommSemiring R] {S : Type*} [Semiring S] [Algebra R S]
    (x : S) : ⇑(aeval x) = fun (p : R[X]) => p.smeval x

{R : Type u_1}
[CommSemiring R]
{S : Type u_2}
[Semiring S]
[Algebra R S]
(x : S)

⇑(Polynomial.aeval x) = fun p => p.smeval x


theorem dvd_gcd_mul_of_dvd_mul [GCDMonoid α] {m n k : α} (H : k ∣ m * n) : k ∣ gcd k m * n

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{m n k : α}
(H : k ∣ m * n)


theorem rotate_reverse (l : List α) (n : ℕ) :
    l.reverse.rotate n = (l.rotate (l.length - n % l.length)).reverse


@[simp, norm_cast]
theorem coe_le_coe : (p : E → ℝ) ≤ q ↔ p ≤ q

{E : Type u_4}
[AddGroup E]
{p q : NonarchAddGroupSeminorm E}

⇑p ≤ ⇑q ↔ p ≤ q


protected theorem add_le_add_iff_right [LE α] [CovariantClass α α (swap (· + ·)) (· ≤ ·)]
    [ContravariantClass α α (swap (· + ·)) (· ≤ ·)] (ha : a ≠ ⊤) : b + a ≤ c + a ↔ b ≤ c

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


@[deprecated Fin.ext_iff (since := "2024-02-20")]
theorem eq_iff_veq (a b : Fin n) : a = b ↔ a.1 = b.1


theorem Antitone.convex_le (hf : Antitone f) (r : β) : Convex 𝕜 { x | f x ≤ r }

{𝕜 : Type u_1}
{E : Type u_2}
{β : Type u_4}
[OrderedSemiring 𝕜]
[LinearOrderedAddCommMonoid E]
[OrderedAddCommMonoid β]
[Module 𝕜 E]
[OrderedSMul 𝕜 E]
{f : E → β}
(hf : Antitone f)
(r : β)


/-- An equivalence of groups, from the center of the special linear group to the roots of unity. -/
@[simps]
def center_equiv_rootsOfUnity' (i : n) :
    center (SpecialLinearGroup n R) ≃* rootsOfUnity (Fintype.card n).toPNat' R

(A : ↥(Subgroup.center (Matrix.SpecialLinearGroup n R)))

(Matrix.SpecialLinearGroup.center_equiv_rootsOfUnity' i) A = rootsOfUnity.mkOfPowEq (↑↑A i i) ⋯


/-- A scalar multiplication is cancellative if it is pointwise injective on the left and right. -/
@[to_additive]
class IsCancelSMul (G P : Type*) [SMul G P] : Prop where
  protected left_cancel : ∀ (a : G) (b c : P), a • b = a • c → b = c
  protected right_cancel : ∀ (a b : G) (c : P), a • c = b • c → a = b

{G : Type u_3}
{P : Type u_4}
[SMul G P]
[self : IsCancelSMul G P]
(a b : G)
(c : P)


@[simp, norm_cast]
theorem coe_max (x y : ℝ) : ((max x y : ℝ) : ℝ*) = max ↑x ↑y


theorem primeFactorsList_sublist_right {n k : ℕ} (h : k ≠ 0) :
    n.primeFactorsList <+ (n * k).primeFactorsList

n.primeFactorsList.Sublist (n * k).primeFactorsList


theorem UInt32.toNat_mod (x y : UInt32) : (x % y).toNat = x.toNat % y.toNat


theorem toMultiset_zero : toMultiset (0 : α →₀ ℕ) = 0


/-- If `f : R → ℝ` is a nonzero, nonnegative, multiplicatively bounded function, then `f 1 ≠ 0`. -/
theorem map_one_ne_zero (f_ne_zero : f ≠ 0) (f_nonneg : 0 ≤ f)
    (f_mul : ∀ x y : R, f (x * y) ≤ c * f x * f y) : f 1 ≠ 0

(f_mul : ∀ (x y : R), f (x * y) ≤ c * f x * f y)


theorem nhdsWithin_Ioi_neBot' {a b : α} (H₁ : (Ioi a).Nonempty) (H₂ : a ≤ b) :
    NeBot (𝓝[Ioi a] b)

{α : Type u_1}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[DenselyOrdered α]
{a b : α}
(H₁ : (Set.Ioi a).Nonempty)
(H₂ : a ≤ b)


@[simp]
theorem rootSet_C [CommRing S] [IsDomain S] [Algebra T S] (a : T) : (C a).rootSet S = ∅

{S : Type v}
{T : Type w}
[CommRing T]
[CommRing S]
[IsDomain S]
[Algebra T S]
(a : T)


@[simp]
theorem nndist_lineMap_left (p₁ p₂ : P) (c : 𝕜) :
    nndist (lineMap p₁ p₂ c) p₁ = ‖c‖₊ * nndist p₁ p₂

{V : Type u_2}
{P : Type u_3}
[SeminormedAddCommGroup V]
[PseudoMetricSpace P]
[NormedAddTorsor V P]
{𝕜 : Type u_6}
[NormedField 𝕜]
[NormedSpace 𝕜 V]
(p₁ p₂ : P)
(c : 𝕜)

nndist ((AffineMap.lineMap p₁ p₂) c) p₁ = ‖c‖₊ * nndist p₁ p₂


theorem ne_not {a b : Bool} : a ≠ !b ↔ a = b


@[simp]
theorem commutator_coe_linear_map : ↑⁅D1, D2⁆ = ⁅(D1 : Module.End R A), (D2 : Module.End R A)⁆

{R : Type u_1}
[CommRing R]
{A : Type u_2}
[CommRing A]
[Algebra R A]
{D1 D2 : Derivation R A A}


theorem mem_closure_iff {s : Set R} {x} :
    x ∈ closure s ↔ x ∈ AddSubmonoid.closure (Subsemigroup.closure s : Set R)

{R : Type u}
[NonUnitalNonAssocSemiring R]
{s : Set R}
{x : R}

x ∈ NonUnitalSubsemiring.closure s ↔ x ∈ AddSubmonoid.closure ↑(Subsemigroup.closure s)


theorem cosh_sub : cosh (x - y) = cosh x * cosh y - sinh x * sinh y

Real.cosh (x - y) = Real.cosh x * Real.cosh y - Real.sinh x * Real.sinh y


@[to_additive (attr := simp)]
theorem lift_id (x) : f.lift f.map_units x = x

{M : Type u_1}
[CommMonoid M]
{S : Submonoid M}
{N : Type u_2}
[CommMonoid N]
(f : S.LocalizationMap N)
(x : N)


@[simp] lemma map_fst_prod : Measure.map Prod.fst (μ.prod ν) = (ν univ) • μ

{α : Type u_1}
{β : Type u_3}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[MeasureTheory.SFinite ν]

MeasureTheory.Measure.map Prod.fst (μ.prod ν) = ν Set.univ • μ


{α : Type u}
{β : Type v}
[TopologicalSpace α]
[SeminormedAddCommGroup β]
(f : BoundedContinuousFunction α β)
{x : α}


@[simp]
theorem tan_ofReal_im (x : ℝ) : (tan x).im = 0


theorem head (hab : r a b) (hbc : TransGen r b c) : TransGen r a c

{α : Type u_1}
{r : α → α → Prop}
{a b c : α}
(hab : r a b)
(hbc : Relation.TransGen r b c)


theorem cond {c : α → Bool} {f : α → σ} {g : α → σ} (hc : Primrec c) (hf : Primrec f)
    (hg : Primrec g) : Primrec fun a => bif (c a) then (f a) else (g a)

{α : Type u_1}
{σ : Type u_5}
[Primcodable α]
[Primcodable σ]
{c : α → Bool}
{f g : α → σ}
(hc : Primrec c)
(hf : Primrec f)
(hg : Primrec g)

Primrec fun a => bif c a then f a else g a


theorem partition_eq_of_isConj {σ τ : Perm α} : IsConj σ τ ↔ σ.partition = τ.partition

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


/-- Pointwise, the multiplicative indicators of closed δ-thickenings of a set eventually coincide
with the multiplicative indicator of the set as δ tends to zero. -/
@[to_additive "Pointwise, the indicators of closed δ-thickenings of a set eventually coincide
with the indicator of the set as δ tends to zero."]
lemma mulIndicator_cthickening_eventually_eq_mulIndicator_closure (f : α → β) (E : Set α) (x : α) :
    ∀ᶠ δ in 𝓝 (0 : ℝ),
      (Metric.cthickening δ E).mulIndicator f x = (closure E).mulIndicator f x

{α : Type u_1}
[PseudoEMetricSpace α]
{β : Type u_2}
[One β]
(f : α → β)
(E : Set α)
(x : α)

∀ᶠ (δ : ℝ) in 𝓝 0, (Metric.cthickening δ E).mulIndicator f x = (closure E).mulIndicator f x


nonrec theorem HasIntegral.add (h : HasIntegral I l f vol y) (h' : HasIntegral I l g vol y') :
    HasIntegral I l (f + g) vol (y + y')

(h : BoxIntegral.HasIntegral I l f vol y)

(h' : BoxIntegral.HasIntegral I l g vol y')

BoxIntegral.HasIntegral I l (f + g) vol (y + y')


theorem init_eq_of_concat_eq {a b : α} {l₁ l₂ : List α} : concat l₁ a = concat l₂ b → l₁ = l₂

{α : Type u_1}
{a b : α}
{l₁ l₂ : List α}


theorem inv_hom_id : inv P Q L ≫ hom P Q L = 𝟙 _

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

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

Bimod.AssociatorBimod.inv P Q L ≫ Bimod.AssociatorBimod.hom P Q L = 𝟙 (P.tensorBimod (Q.tensorBimod L)).X


/-- A multiple of the difference between two points (reversed) lies in their `vectorSpan`. -/
theorem smul_vsub_rev_mem_vectorSpan_pair (r : k) (p₁ p₂ : P) :
    r • (p₂ -ᵥ p₁) ∈ vectorSpan k ({p₁, p₂} : Set P)

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
(r : k)
(p₁ p₂ : P)


@[simp]
theorem liftAux_id : liftAux (RingHom.id K) j p = j

{K : Type u_1}
{M : Type u_3}
[CommSemiring K]
[CommSemiring M]
(j : K →+* M)
(p : ℕ)
[ExpChar M p]
[PerfectRing M p]

PerfectRing.liftAux (RingHom.id K) j p = ⇑j


@[reassoc]
theorem prod_rightUnitor_inv_naturality [HasBinaryProducts C] (f : X ⟶ Y) :
    (prod.rightUnitor X).inv ≫ prod.map f (𝟙 _) = f ≫ (prod.rightUnitor Y).inv

(CategoryTheory.Limits.prod.rightUnitor X).inv ≫ CategoryTheory.Limits.prod.map f (𝟙 (⊤_ C)) =
  f ≫ (CategoryTheory.Limits.prod.rightUnitor Y).inv


@[simp]
theorem derivWithin_univ : derivWithin f univ = deriv f

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : 𝕜 → F}


theorem comp_add_left (hf : IntervalIntegrable f volume a b) (c : ℝ) :
    IntervalIntegrable (fun x => f (c + x)) volume (a - c) (b - c)

(hf : IntervalIntegrable f MeasureTheory.volume a b)

IntervalIntegrable (fun x => f (c + x)) MeasureTheory.volume (a - c) (b - c)


theorem tendsto_pure_nhds (f : α → X) (a : α) : Tendsto f (pure a) (𝓝 (f a))

{X : Type u}
{α : Type u_1}
[TopologicalSpace X]
(f : α → X)
(a : α)


theorem merge {f g : α →. σ} (hf : Partrec f) (hg : Partrec g)
    (H : ∀ (a), ∀ x ∈ f a, ∀ y ∈ g a, x = y) :
    ∃ k : α →. σ, Partrec k ∧ ∀ a x, x ∈ k a ↔ x ∈ f a ∨ x ∈ g a

(H : ∀ (a : α), ∀ x ∈ f a, ∀ y ∈ g a, x = y)

∃ k, Partrec k ∧ ∀ (a : α) (x : σ), x ∈ k a ↔ x ∈ f a ∨ x ∈ g a


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

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

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


theorem smulTower_leftMulMatrix_algebraMap_eq (x : S) (i j k) :
    leftMulMatrix (b.smulTower c) (algebraMap _ _ x) (i, k) (j, k) = leftMulMatrix b x i j

{R : Type u_1}
{S : Type u_2}
{T : Type u_3}
[CommRing R]
[CommRing S]
[Ring T]
[Algebra R S]
[Algebra S T]
[Algebra R T]
[IsScalarTower R S T]
{m : Type u_4}
{n : Type u_5}
[Fintype m]
[Fintype n]
[DecidableEq m]
[DecidableEq n]
(b : Basis m R S)
(c : Basis n S T)
(x : S)
(i j : m)
(k : n)

(Algebra.leftMulMatrix (b.smulTower c)) ((algebraMap S T) x) (i, k) (j, k) = (Algebra.leftMulMatrix b) x i j


theorem one_lt_card_support_of_ne_one {f : Perm α} (h : f ≠ 1) : 1 < f.support.card

{α : Type u_1}
[DecidableEq α]
[Fintype α]
{f : Equiv.Perm α}
(h : f ≠ 1)


theorem empty_definable_iff :
    (∅ : Set M).Definable L s ↔ ∃ φ : L.Formula α, s = setOf φ.Realize

{M : Type w}
{L : FirstOrder.Language}
[L.Structure M]
{α : Type u₁}
{s : Set (α → M)}

∅.Definable L s ↔ ∃ φ, s = setOf φ.Realize


theorem isLocallyInjective_iff_isOpenMap {f : X → Y} :
    IsLocallyInjective f ↔ IsOpenMap (toPullbackDiag f)

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
{f : X → Y}


/-- A *tree* is a connected acyclic graph. -/
@[mk_iff]
structure IsTree : Prop where
  /-- Graph is connected. -/
  protected isConnected : G.Connected
  /-- Graph is acyclic. -/
  protected IsAcyclic : G.IsAcyclic


/-- The product map of two `C^n` functions within a set at a point is `C^n`
within the product set at the product point. -/
theorem ContDiffAt.prod_map {f : E → F} {g : E' → F'} {x : E} {y : E'} (hf : ContDiffAt 𝕜 n f x)
    (hg : ContDiffAt 𝕜 n g y) : ContDiffAt 𝕜 n (Prod.map f g) (x, y)

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


/-- The contrapositive of this result is very useful, taking `x` to be the element of `H`
corresponding to a root `α` under the identification between `H` and `H^*` provided by the Killing
form. -/
lemma eq_zero_of_apply_eq_zero_of_mem_corootSpace
    (x : H) (α : H → K) (hαx : α x = 0) (hx : x ∈ corootSpace α) :
    x = 0

{K : Type u_2}
{L : Type u_3}
[LieRing L]
[Field K]
[LieAlgebra K L]
[FiniteDimensional K L]
{H : LieSubalgebra K L}
[H.IsCartanSubalgebra]
[LieModule.IsTriangularizable K (↥H) L]
[LieAlgebra.IsKilling K L]
[CharZero K]
(x : ↥H)
(α : ↥H → K)
(hαx : α x = 0)
(hx : x ∈ LieAlgebra.corootSpace α)


/-- `x` is an accumulation point of a set `C` iff
there are points near `x` in `C` and different from `x`. -/
theorem accPt_iff_frequently (x : X) (C : Set X) : AccPt x (𝓟 C) ↔ ∃ᶠ y in 𝓝 x, y ≠ x ∧ y ∈ C

{X : Type u}
[TopologicalSpace X]
(x : X)
(C : Set X)

AccPt x (𝓟 C) ↔ ∃ᶠ (y : X) in 𝓝 x, y ≠ x ∧ y ∈ C


/-- The chosen binary product on `J ⥤ C`. -/
@[simps]
def chosenProd : J ⥤ C

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

(F₁.chosenProd F₂).obj j = CategoryTheory.MonoidalCategory.tensorObj (F₁.obj j) (F₂.obj j)


theorem formPerm_pow_apply_head (x : α) (l : List α) (h : Nodup (x :: l)) (n : ℕ) :
    (formPerm (x :: l) ^ n) x =
      (x :: l).get ⟨(n % (x :: l).length), (Nat.mod_lt _ (Nat.zero_lt_succ _))⟩

{α : Type u_1}
[DecidableEq α]
(x : α)
(l : List α)
(h : (x :: l).Nodup)
(n : ℕ)

((x :: l).formPerm ^ n) x = (x :: l).get ⟨n % (x :: l).length, ⋯⟩


@[simp]
lemma homologyMap_zero : homologyMap (0 : K ⟶ L) i = 0


theorem Base.inter_basis_iff_compl_inter_basis_dual (hB : M.Base B) (hX : X ⊆ M.E := by aesop_mat) :
    M.Basis (B ∩ X) X ↔ M✶.Basis ((M.E \ B) ∩ (M.E \ X)) (M.E \ X)

{α : Type u_1}
{M : Matroid α}
{B X : Set α}
(hB : M.Base B)
(hX : X ⊆ M.E := by aesop_mat)

M.Basis (B ∩ X) X ↔ M✶.Basis (M.E \ B ∩ (M.E \ X)) (M.E \ X)


@[to_additive]
lemma mul_prod_Iio_eq_prod_Iic (a : α) : f a * ∏ x ∈ Iio a, f x = ∏ x ∈ Iic a, f x

{α : Type u_1}
{M : Type u_2}
[PartialOrder α]
[AddCommMonoid M]
{f : α → M}
[LocallyFiniteOrderBot α]
(a : α)

f a + ∑ x ∈ Finset.Iio a, f x = ∑ x ∈ Finset.Iic a, f x


@[simp]
theorem coeff_comp_monomial (n : ℕ) : (coeff R n).comp (monomial R n) = LinearMap.id

PowerSeries.coeff R n ∘ₗ PowerSeries.monomial R n = LinearMap.id


/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def Functor.mapHomologicalComplex (F : W₁ ⥤ W₂) [F.PreservesZeroMorphisms] (c : ComplexShape ι) :
    HomologicalComplex W₁ c ⥤ HomologicalComplex W₂ c

∀ {X Y : HomologicalComplex W₁ c} (f : X ⟶ Y) (i : ι), ((F.mapHomologicalComplex c).map f).f i = F.map (f.f i)


protected theorem continuousAt (hf : IsLocalHomeomorphOn f s) {x : X} (hx : x ∈ s) :
    ContinuousAt f x

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : X → Y}
{s : Set X}
(hf : IsLocalHomeomorphOn f s)
{x : X}
(hx : x ∈ s)


theorem IsLUB.mem_lowerBounds_of_tendsto [Preorder γ] [TopologicalSpace γ] [OrderClosedTopology γ]
    {f : α → γ} {s : Set α} {a : α} {b : γ} (hf : AntitoneOn f s) (ha : IsLUB s a)
    (hb : Tendsto f (𝓝[s] a) (𝓝 b)) : b ∈ lowerBounds (f '' s)

{α : Type u_1}
{γ : Type u_3}
[TopologicalSpace α]
[LinearOrder α]
[OrderTopology α]
[Preorder γ]
[TopologicalSpace γ]
[OrderClosedTopology γ]
{f : α → γ}
{s : Set α}
{a : α}
{b : γ}
(hf : AntitoneOn f s)
(ha : IsLUB s a)
(hb : Filter.Tendsto f (𝓝[s] a) (𝓝 b))


/-- `someVector` is nonzero. -/
@[simp]
theorem someVector_ne_zero (x : Module.Ray R M) : x.someVector ≠ 0

{R : Type u_1}
[StrictOrderedCommSemiring R]
{M : Type u_2}
[AddCommMonoid M]
[Module R M]
(x : Module.Ray R M)


/-- If `P` is a monic polynomial that splits, then `coeff P 0` equals the product of the roots. -/
theorem prod_roots_eq_coeff_zero_of_monic_of_split {P : K[X]} (hmo : P.Monic)
    (hP : P.Splits (RingHom.id K)) : coeff P 0 = (-1) ^ P.natDegree * P.roots.prod

(hP : Polynomial.Splits (RingHom.id K) P)

P.coeff 0 = (-1) ^ P.natDegree * P.roots.prod


@[simp]
theorem quotientEquiv.symm_apply [Fintype ι] (x : fundamentalDomain b) :
    (quotientEquiv b).symm x = Submodule.Quotient.mk ↑x

{E : Type u_1}
{ι : Type u_2}
{K : Type u_3}
[NormedLinearOrderedField K]
[NormedAddCommGroup E]
[NormedSpace K E]
(b : Basis ι K E)
[FloorRing K]
[Fintype ι]
(x : ↑(Zspan.fundamentalDomain b))

(Zspan.quotientEquiv b).symm x = Submodule.Quotient.mk ↑x


theorem aeval_natCast (n : ℕ) : aeval x (n : R[X]) = n

{R : Type u}
{A : Type z}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(x : A)
(n : ℕ)


@[simp]
theorem arg_inv_coe_angle (x : ℂ) : (arg x⁻¹ : Real.Angle) = -arg x


theorem cast_ascFactorial : (a.ascFactorial b : S) = (ascPochhammer S b).eval (a : S)

↑(a.ascFactorial b) = Polynomial.eval (↑a) (ascPochhammer S b)


theorem ennrealRatEmbed_encode (q : ℚ) :
    ennrealRatEmbed (Encodable.encode q) = Real.toNNReal q

MeasureTheory.SimpleFunc.ennrealRatEmbed (Encodable.encode q) = ↑(↑q).toNNReal


@[simp]
theorem map_op_one :
    map (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ) : A →ₗ[R] Aᵐᵒᵖ) (1 : Submodule R A) = 1

{R : Type u}
[CommSemiring R]
{A : Type v}
[Semiring A]
[Algebra R A]

Submodule.map (↑(MulOpposite.opLinearEquiv R)) 1 = 1


@[ext]
theorem ListBlank.ext {Γ} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} :
    (∀ i, L₁.nth i = L₂.nth i) → L₁ = L₂

{Γ : Type u_1}
[i : Inhabited Γ]
{L₁ L₂ : Turing.ListBlank Γ}

(∀ (i_1 : ℕ), L₁.nth i_1 = L₂.nth i_1) → L₁ = L₂


@[simp]
theorem x_mul (a b : Solution₁ d) : (a * b).x = a.x * b.x + d * (a.y * b.y)


theorem multiset_Ico_map_mod (n a : ℕ) :
    (Multiset.Ico n (n + a)).map (· % a) = Multiset.range a

Multiset.map (fun x => x % a) (Multiset.Ico n (n + a)) = Multiset.range a


/-- The simple reflections of `W` generate `W` as a group. -/
theorem subgroup_closure_range_simple : Subgroup.closure (range cs.simple) = ⊤

{B : Type u_1}
{W : Type u_3}
[Group W]
{M : CoxeterMatrix B}
(cs : CoxeterSystem M W)

Subgroup.closure (Set.range cs.simple) = ⊤


/-- Symmetric statement to `Set.image_image2_antidistrib_right`. -/
theorem image_image2_right_anticomm {f : α → β' → γ} {g : β → β'} {f' : β → α → δ} {g' : δ → γ}
    (h_right_anticomm : ∀ a b, f a (g b) = g' (f' b a)) :
    image2 f s (t.image g) = (image2 f' t s).image g'

{f : α → β' → γ}

{f' : β → α → δ}

(h_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a))

Set.image2 f s (g '' t) = g' '' Set.image2 f' t s


{α : Type u}
{x y : α}
[BooleanAlgebra α]


protected theorem Antitone.measurable [LinearOrder β] [OrderClosedTopology β] {f : β → α}
    (hf : Antitone f) : Measurable f

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[MeasurableSpace α]
[BorelSpace α]
[TopologicalSpace β]
[MeasurableSpace β]
[BorelSpace β]
[LinearOrder α]
[OrderTopology α]
[SecondCountableTopology α]
[LinearOrder β]
[OrderClosedTopology β]
{f : β → α}
(hf : Antitone f)


theorem sups_assoc : s ⊻ t ⊻ u = s ⊻ (t ⊻ u)

{α : Type u_2}
[DecidableEq α]
[SemilatticeSup α]
(s t u : Finset α)


/--
If a series ``a₀ -r→ a₁ -r→ ... -r→ aₙ``, then `a₀ -r→ a₁ -r→ ... -r→ aₙ₋₁` is
another series -/
@[simps]
def eraseLast (p : RelSeries r) : RelSeries r

{α : Type u_1}
{r : Rel α α}
(p : RelSeries r)


@[to_additive]
private lemma devosMulRel_of_le (mul : (x.1 * x.2).card ≤ (y.1 * y.2).card)
    (hadd : y.1.card + y.2.card < x.1.card + x.2.card) : DevosMulRel x y


/-- `legendreSym p (-2)` is given by `χ₈' p`. -/
theorem at_neg_two : legendreSym p (-2) = χ₈' p

{p : ℕ}
[Fact (Nat.Prime p)]
(hp : p ≠ 2)


theorem TensorProduct.isTensorProduct : IsTensorProduct (TensorProduct.mk R M N)

(R : Type u_1)
[CommSemiring R]
(M : Type u_4)
[AddCommMonoid M]
[Module R M]
(N : Type u_8)
[AddCommMonoid N]
[Module R N]


theorem gcd_pow_right_dvd_pow_gcd [GCDMonoid α] {a b : α} {k : ℕ} :
    gcd a (b ^ k) ∣ gcd a b ^ k

{α : Type u_1}
[CancelCommMonoidWithZero α]
[GCDMonoid α]
{a b : α}
{k : ℕ}


@[simp]
theorem get_cons_succ (a : α) (v : Vector α n) (i : Fin n) : get (a ::ᵥ v) i.succ = get v i

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


/-- The oriented angle between two vectors is zero or `π` if and only if the first vector is zero
or the second is a multiple of the first. -/
theorem oangle_eq_zero_or_eq_pi_iff_right_eq_smul {x y : V} :
    o.oangle x y = 0 ∨ o.oangle x y = π ↔ x = 0 ∨ ∃ r : ℝ, y = r • x

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

o.oangle x y = 0 ∨ o.oangle x y = ↑π ↔ x = 0 ∨ ∃ r, y = r • x


theorem dite_eq_iff' : dite P A B = c ↔ (∀ h, A h = c) ∧ ∀ h, B h = c

{α : Sort u_1}
{P : Prop}
[Decidable P]
{c : α}
{A : P → α}
{B : ¬P → α}

dite P A B = c ↔ (∀ (h : P), A h = c) ∧ ∀ (h : ¬P), B h = c


@[reassoc (attr := simp)]
theorem colimitObjIsoColimitCompEvaluation_inv_colimit_map [HasColimitsOfShape J C] (F : J ⥤ K ⥤ C)
    {i j : K} (f : i ⟶ j) :
    (colimitObjIsoColimitCompEvaluation _ _).inv ≫ (colimit F).map f =
      colimMap (whiskerLeft _ ((evaluation _ _).map f)) ≫
        (colimitObjIsoColimitCompEvaluation _ _).inv

(CategoryTheory.Limits.colimitObjIsoColimitCompEvaluation F i).inv ≫ (CategoryTheory.Limits.colimit F).map f =
  CategoryTheory.Limits.colimMap (CategoryTheory.whiskerLeft F ((CategoryTheory.evaluation K C).map f)) ≫
    (CategoryTheory.Limits.colimitObjIsoColimitCompEvaluation F j).inv


/-- Congruence relations are transitive. -/
@[to_additive "Additive congruence relations are transitive."]
protected theorem trans {x y z} : c x y → c y z → c x z

{M : Type u_1}
[Add M]
(c : AddCon M)
{x y z : M}


theorem eventuallyLE_congr {f f' g g' : α → β} (hf : f =ᶠ[l] f') (hg : g =ᶠ[l] g') :
    f ≤ᶠ[l] g ↔ f' ≤ᶠ[l] g'

{α : Type u}
{β : Type v}
[LE β]
{l : Filter α}
{f f' g g' : α → β}
(hf : f =ᶠ[l] f')
(hg : g =ᶠ[l] g')


@[to_additive sum_le_sum]
lemma prod_le_prod' [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] {l : List ι} {f g : ι → M} (h : ∀ i ∈ l, f i ≤ g i) :
    (l.map f).prod ≤ (l.map g).prod

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

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


theorem coe_toDualTopEquiv_eq [LE α] :
    (WithBot.toDualTopEquiv : WithBot αᵒᵈ → (WithTop α)ᵒᵈ) = toDual ∘ WithBot.ofDual

⇑WithBot.toDualTopEquiv = ⇑OrderDual.toDual ∘ ⇑WithBot.ofDual


lemma tendsto_integral_density_of_monotone (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) (seq : ℕ → Set β) (hseq : Monotone seq) (hseq_iUnion : ⋃ i, seq i = univ)
    (hseq_meas : ∀ m, MeasurableSet (seq m)) :
    Tendsto (fun m ↦ ∫ x, density κ ν a x (seq m) ∂(ν a)) atTop (𝓝 (κ a univ).toReal)

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

(hseq_meas : ∀ (m : ℕ), MeasurableSet (seq m))

Filter.Tendsto (fun m => ∫ (x : γ), κ.density ν a x (seq m) ∂ν a) Filter.atTop (𝓝 ((κ a) Set.univ).toReal)


theorem WF.mk' [BEq α] [Hashable α] (h) : (Buckets.mk n h : Buckets α β).WF

{α : Type u_1}
{β : Type u_2}
{n : Nat}
[BEq α]
[Hashable α]
(h : 0 < n)


theorem QuotientGroup.card_preimage_mk (s : Subgroup G) (t : Set (G ⧸ s)) :
    Nat.card (QuotientGroup.mk ⁻¹' t) = Nat.card s * Nat.card t

{G : Type u}
[Group G]
(s : Subgroup G)
(t : Set (G ⧸ s))

Nat.card ↑(QuotientGroup.mk ⁻¹' t) = Nat.card ↥s * Nat.card ↑t


@[simp]
theorem fullSubcategoryInclusion_obj_lift_obj (F : C ⥤ D) (hF : ∀ X, P (F.obj X)) {X : C} :
    (fullSubcategoryInclusion P).obj ((FullSubcategory.lift P F hF).obj X) = F.obj X

{C : Type u₁}
[CategoryTheory.Category.{v, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(P : D → Prop)
(F : CategoryTheory.Functor C D)
(hF : ∀ (X : C), P (F.obj X))
{X : C}

(CategoryTheory.fullSubcategoryInclusion P).obj ((CategoryTheory.FullSubcategory.lift P F hF).obj X) = F.obj X


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


theorem Filter.Eventually.union {p : X → Prop} (hs : ∀ᶠ x in 𝓝ˢ s, p x) (ht : ∀ᶠ x in 𝓝ˢ t, p x) :
    ∀ᶠ x in 𝓝ˢ (s ∪ t), p x

{X : Type u_1}
[TopologicalSpace X]
{s t : Set X}
{p : X → Prop}
(hs : ∀ᶠ (x : X) in 𝓝ˢ s, p x)
(ht : ∀ᶠ (x : X) in 𝓝ˢ t, p x)


theorem w_map_wMk {α β : TypeVec n} (g : α ⟹ β) (a : P.A) (f' : P.drop.B a ⟹ α)
    (f : P.last.B a → P.W α) : g <$$> P.wMk a f' f = P.wMk a (g ⊚ f') fun i => g <$$> f i

{n : ℕ}
(P : MvPFunctor.{u} (n + 1))
{α β : TypeVec.{u} n}
(g : α.Arrow β)
(a : P.A)
(f' : (P.drop.B a).Arrow α)
(f : P.last.B a → P.W α)

MvFunctor.map g (P.wMk a f' f) = P.wMk a (TypeVec.comp g f') fun i => MvFunctor.map g (f i)


protected theorem mul_nonneg (a b : ℤ√d) : 0 ≤ a → 0 ≤ b → 0 ≤ a * b


theorem eq_singleton_iff_nonempty_unique_mem {s : Finset α} {a : α} :
    s = {a} ↔ s.Nonempty ∧ ∀ x ∈ s, x = a


theorem ppow_succ' {f : ArithmeticFunction R} {k : ℕ} : f.ppow (k + 1) = f.pmul (f.ppow k)

{R : Type u_1}
[Semiring R]
{f : ArithmeticFunction R}
{k : ℕ}


theorem isPredLimitRecOn_limit (hs : ∀ a, ¬IsMin a → C (pred a)) (hl : ∀ a, IsPredLimit a → C a)
    (hb : IsPredLimit b) : @isPredLimitRecOn α _ _ C b hs hl = hl b hb

(hs : (a : α) → ¬IsMin a → C (Order.pred a))

(hl : (a : α) → Order.IsPredLimit a → C a)

Order.isPredLimitRecOn b hs hl = hl b hb


@[simp] lemma iteratedFDerivComponent_apply {α : Type*} [Fintype α]
    (f : ContinuousMultilinearMap 𝕜 E₁ G) {s : Set ι} (e : α ≃ s) [DecidablePred (· ∈ s)]
    (v : ∀ i : {a : ι // a ∉ s}, E₁ i) (w : α → (∀ i, E₁ i)) :
    f.iteratedFDerivComponent e v w =
      f (fun j ↦ if h : j ∈ s then w (e.symm ⟨j, h⟩) j else v ⟨j, h⟩)

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

((f.iteratedFDerivComponent e) v) w = f fun j => if h : j ∈ s then w (e.symm ⟨j, h⟩) j else v ⟨j, h⟩


/-- The second projection functor `ShortComplex C ⥤ C`. -/
@[simps]
def π₂ : ShortComplex C ⥤ C

∀ {X Y : CategoryTheory.ShortComplex C} (f : X ⟶ Y), CategoryTheory.ShortComplex.π₂.map f = f.τ₂


theorem finprod_eq_zero {M₀ : Type*} [CommMonoidWithZero M₀] (f : α → M₀) (x : α) (hx : f x = 0)
    (hf : (mulSupport f).Finite) : ∏ᶠ x, f x = 0

{α : Type u_1}
{M₀ : Type u_7}
[CommMonoidWithZero M₀]
(f : α → M₀)
(x : α)
(hx : f x = 0)
(hf : (Function.mulSupport f).Finite)


theorem not_gt_iff_eq (h : a ≤ b) : ¬a < b ↔ b = a

{α : Type u_2}
[PartialOrder α]
{a b : α}
(h : a ≤ b)