theorem nhdsWithin_pos_comap_mul_left {x : 𝕜} (hx : 0 < x) :
    comap (x * ·) (𝓝[>] 0) = 𝓝[>] 0

{𝕜 : Type u_1}
[LinearOrderedField 𝕜]
[TopologicalSpace 𝕜]
[OrderTopology 𝕜]
{x : 𝕜}
(hx : 0 < x)


theorem unit_left (a : α) (u : αˣ) : multiplicity (u : α) a = ⊤

{α : Type u_1}
[Monoid α]
[DecidableRel fun x x_1 => x ∣ x_1]
(a : α)
(u : αˣ)


theorem qsmul_eq_C_mul (a : ℚ) (f : R[X]) : a • f = Polynomial.C (a : R) * f

{R : Type u}
[DivisionRing R]
(a : ℚ)
(f : R[X])


@[simp]
theorem dimH_image (e : X ≃ᵢ Y) (s : Set X) : dimH (e '' s) = dimH s

{X : Type u_2}
{Y : Type u_3}
[EMetricSpace X]
[EMetricSpace Y]
(e : X ≃ᵢ Y)
(s : Set X)


theorem not_equiv_zero_const_of_nonzero {q : ℚ} (hq : q ≠ 0) : ¬const (padicNorm p) q ≈ 0

{p : ℕ}
[Fact (Nat.Prime p)]
{q : ℚ}
(hq : q ≠ 0)


/-- The function `(b * exp x + c) / (x ^ n)` tends to `+∞` at `+∞`, for any natural number
`n` and any real numbers `b` and `c` such that `b` is positive. -/
theorem tendsto_mul_exp_add_div_pow_atTop (b c : ℝ) (n : ℕ) (hb : 0 < b) :
    Tendsto (fun x => (b * exp x + c) / x ^ n) atTop atTop

Filter.Tendsto (fun x => (b * Real.exp x + c) / x ^ n) Filter.atTop Filter.atTop


@[simp]
theorem unsym_add [Add α] (a b : αˢʸᵐ) : unsym (a + b) = unsym a + unsym b

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


@[simp]
lemma smul_eq (P : Fin 3 → R) {u : R} (hu : IsUnit u) : (⟦u • P⟧ : PointClass R) = ⟦P⟧

{R : Type u}
[CommRing R]
(P : Fin 3 → R)
{u : R}
(hu : IsUnit u)

⟦u • P⟧ = ⟦P⟧


theorem map_map (g : F →ₗ[𝕜] G) (f : E →ₗ[𝕜] F) (S : ConvexCone 𝕜 E) :
    (S.map f).map g = S.map (g.comp f)

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
{G : Type u_4}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[AddCommMonoid G]
[Module 𝕜 E]
[Module 𝕜 F]
[Module 𝕜 G]
(g : F →ₗ[𝕜] G)
(f : E →ₗ[𝕜] F)
(S : ConvexCone 𝕜 E)

ConvexCone.map g (ConvexCone.map f S) = ConvexCone.map (g ∘ₗ f) S


/-- Alternative definition of star-convexity, using division. -/
theorem starConvex_iff_div : StarConvex 𝕜 x s ↔ ∀ ⦃y⦄, y ∈ s →
    ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → 0 < a + b → (a / (a + b)) • x + (b / (a + b)) • y ∈ s

{𝕜 : Type u_1}
{E : Type u_2}
[LinearOrderedField 𝕜]
[AddCommGroup E]
[Module 𝕜 E]
{x : E}
{s : Set E}

StarConvex 𝕜 x s ↔ ∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → 0 < a + b → (a / (a + b)) • x + (b / (a + b)) • y ∈ s


@[simp]
theorem swap_mem_divisorsAntidiagonal_aux {x : ℕ × ℕ} :
    x.snd * x.fst = n ∧ ¬n = 0 ↔ x ∈ divisorsAntidiagonal n

x.2 * x.1 = n ∧ ¬n = 0 ↔ x ∈ n.divisorsAntidiagonal


theorem eleven_dvd_of_palindrome (p : (digits 10 n).Palindrome) (h : Even (digits 10 n).length) :
    11 ∣ n

{n : ℕ}
(p : (Nat.digits 10 n).Palindrome)
(h : Even (Nat.digits 10 n).length)


/-- Composition of morphisms between quivers. -/
@[simps]
def comp {U : Type*} [Quiver U] {V : Type*} [Quiver V] {W : Type*} [Quiver W]
    (F : Prefunctor U V) (G : Prefunctor V W) : Prefunctor U W

{U : Type u_1}
[Quiver U]
{V : Type u_2}
[Quiver V]
{W : Type u_3}
[Quiver W]
(F : U ⥤q V)
(G : V ⥤q W)

∀ {X Y : U} (f : X ⟶ Y), (F ⋙q G).map f = G.map (F.map f)


theorem derivFamily_lt_ord {ι} {f : ι → Ordinal → Ordinal} {c} (hc : IsRegular c) (hι : #ι < c)
    (hc' : c ≠ ℵ₀) (hf : ∀ (i), ∀ b < c.ord, f i b < c.ord) {a} :
    a < c.ord → derivFamily.{u, u} f a < c.ord

(hf : ∀ (i : ι), ∀ b < c.ord, f i b < c.ord)

a < c.ord → Ordinal.derivFamily f a < c.ord


theorem prime_unique_of_minimal (J : Ideal (Localization I.primeCompl)) [J.IsPrime] :
    J = LocalRing.maximalIdeal (Localization I.primeCompl)

{R : Type u_1}
[CommSemiring R]
{I : Ideal R}
[hI : I.IsPrime]
(hMin : I ∈ minimalPrimes R)
(J : Ideal (Localization I.primeCompl))
[J.IsPrime]


theorem diff_sublist : ∀ l₁ l₂ : List α, l₁.diff l₂ <+ l₁

{α : Type u_1}
[BEq α]
[LawfulBEq α]
(l₁ l₂ : List α)


@[simp]
lemma coreflection_image_eq :
    P.coreflection i '' (range P.coroot) = range P.coroot

{ι : Type u_1}
{R : Type u_2}
{M : Type u_3}
{N : Type u_4}
[CommRing R]
[AddCommGroup M]
[Module R M]
[AddCommGroup N]
[Module R N]
(P : RootPairing ι R M N)
(i : ι)

⇑(P.coreflection i) '' Set.range ⇑P.coroot = Set.range ⇑P.coroot


/-- The Bernstein approximations
```
∑ k : Fin (n+1), f (k/n : ℝ) * n.choose k * x^k * (1-x)^(n-k)
```
for a continuous function `f : C([0,1], ℝ)` converge uniformly to `f` as `n` tends to infinity.

This is the proof given in [Richard Beals' *Analysis, an introduction*][beals-analysis], §7D,
and reproduced on wikipedia.
-/
theorem bernsteinApproximation_uniform (f : C(I, ℝ)) :
    Tendsto (fun n : ℕ => bernsteinApproximation n f) atTop (𝓝 f)

Filter.Tendsto (fun n => bernsteinApproximation n f) Filter.atTop (𝓝 f)


theorem Ioo_union_Ioo' (h₁ : c < b) (h₂ : a < d) : Ioo a b ∪ Ioo c d = Ioo (min a c) (max b d)

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

Set.Ioo a b ∪ Set.Ioo c d = Set.Ioo (min a c) (max b d)


theorem Ico_eq_finset_subtype : Ico a b = (Ico (a : ℕ) b).subtype fun n : ℕ => 0 < n

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


lemma withDensity_inv_same₀ {μ : Measure α} {f : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) (hf_ne_zero : ∀ᵐ x ∂μ, f x ≠ 0) (hf_ne_top : ∀ᵐ x ∂μ, f x ≠ ∞) :
    (μ.withDensity f).withDensity (fun x ↦ (f x)⁻¹) = μ

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{f : α → ℝ≥0∞}
(hf : AEMeasurable f μ)
(hf_ne_zero : ∀ᵐ (x : α) ∂μ, f x ≠ 0)
(hf_ne_top : ∀ᵐ (x : α) ∂μ, f x ≠ ⊤)

((μ.withDensity f).withDensity fun x => (f x)⁻¹) = μ


/-- Same as `Monotone.covariant_of_const`, but with the constant on the other side of
the operator.  E.g., `∀ (m : ℕ), Monotone f → Monotone (fun n ↦ f (n + m))`. -/
theorem Monotone.covariant_of_const' {μ : N → N → N} [CovariantClass N N (swap μ) (· ≤ ·)]
    (hf : Monotone f) (m : N) : Monotone (f <| μ · m)

[CovariantClass N N (Function.swap μ) fun x x_1 => x ≤ x_1]


@[to_additive]
theorem smul_finset_union : a • (s₁ ∪ s₂) = a • s₁ ∪ a • s₂

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s₁ s₂ : Finset β}
{a : α}


theorem all_balance' {P l x r} : @All α P (balance' l x r) ↔ All P l ∧ P x ∧ All P r

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

Ordnode.All P (l.balance' x r) ↔ Ordnode.All P l ∧ P x ∧ Ordnode.All P r


protected lemma symm (hr : ∀ (a : α) (b : β), r₁₂ a b → r₂₁ b a) :
    RightTotal r₁₂ → LeftTotal r₂₁

Relator.RightTotal r₁₂ → Relator.LeftTotal r₂₁


theorem eq_interpolate_of_eval_eq {f : F[X]} (hvs : Set.InjOn v s) (degree_f_lt : f.degree < s.card)
    (eval_f : ∀ i ∈ s, f.eval (v i) = r i) : f = interpolate s v r

(eval_f : ∀ i ∈ s, Polynomial.eval (v i) f = r i)


theorem HasStrictDerivAt.const_mul (c : 𝔸) (hd : HasStrictDerivAt d d' x) :
    HasStrictDerivAt (fun y => c * d y) (c * d') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{x : 𝕜}
{𝔸 : Type u_3}
[NormedRing 𝔸]
[NormedAlgebra 𝕜 𝔸]
{d : 𝕜 → 𝔸}
{d' : 𝔸}
(c : 𝔸)
(hd : HasStrictDerivAt d d' x)


/-- Adding a point in the affine span of a set does not change whether that set is coplanar. -/
theorem coplanar_insert_iff_of_mem_affineSpan {s : Set P} {p : P} (h : p ∈ affineSpan k s) :
    Coplanar k (insert p s) ↔ Coplanar k s

{k : Type u_1}
{V : Type u_2}
{P : Type u_3}
[DivisionRing k]
[AddCommGroup V]
[Module k V]
[AffineSpace V P]
{s : Set P}
{p : P}
(h : p ∈ affineSpan k s)


theorem mem_lookup_union_middle {a} {b : β a} {s₁ s₂ s₃ : Finmap β} :
    b ∈ lookup a (s₁ ∪ s₃) → a ∉ s₂ → b ∈ lookup a (s₁ ∪ s₂ ∪ s₃)

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

b ∈ Finmap.lookup a (s₁ ∪ s₃) → a ∉ s₂ → b ∈ Finmap.lookup a (s₁ ∪ s₂ ∪ s₃)


@[simp]
theorem map_lie (f : M →ₗ⁅R,L⁆ N) (x : L) (m : M) : f ⁅x, m⁆ = ⁅x, f m⁆

{R : Type u}
{L : Type v}
{M : Type w}
{N : Type w₁}
[CommRing R]
[LieRing L]
[AddCommGroup M]
[AddCommGroup N]
[Module R M]
[Module R N]
[LieRingModule L M]
[LieRingModule L N]
(f : M →ₗ⁅R,L⁆ N)
(x : L)
(m : M)


@[simp]
theorem top_sub {a : WithTop α} : (⊤ : WithTop α) - a = ⊤

{α : Type u_1}
[LinearOrderedAddCommGroup α]
{a : WithTop α}


@[to_additive]
theorem Filter.Tendsto.zpow {α} {l : Filter α} {f : α → G} {x : G} (hf : Tendsto f l (𝓝 x))
    (z : ℤ) : Tendsto (fun x => f x ^ z) l (𝓝 (x ^ z))

{G : Type w}
[TopologicalSpace G]
[Group G]
[TopologicalGroup G]
{α : Type u_1}
{l : Filter α}
{f : α → G}
{x : G}
(hf : Filter.Tendsto f l (𝓝 x))
(z : ℤ)

Filter.Tendsto (fun x => f x ^ z) l (𝓝 (x ^ z))


lemma GrowsPolynomially.of_isTheta {f g : ℝ → ℝ} (hg : GrowsPolynomially g) (hf : f =Θ[atTop] g)
    (hf' : ∀ᶠ x in atTop, 0 ≤ f x) : GrowsPolynomially f

(hg : AkraBazziRecurrence.GrowsPolynomially g)

(hf' : ∀ᶠ (x : ℝ) in Filter.atTop, 0 ≤ f x)


theorem lpMeasSubgroup_coe {m _ : MeasurableSpace α} {μ : Measure α} {f : lpMeasSubgroup F m p μ} :
    (f : _ → _) = (f : Lp F p μ)

{α : Type u_1}
{F : Type u_3}
{p : ℝ≥0∞}
[NormedAddCommGroup F]
{m : MeasurableSpace α}

∀ {x : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : ↥(MeasureTheory.lpMeasSubgroup F m p μ)}, ↑↑↑f = ↑↑↑f


theorem IsPrime.multiset_prod_mem_iff_exists_mem {I : Ideal R} (hI : I.IsPrime) (s : Multiset R) :
    s.prod ∈ I ↔ ∃ p ∈ s, p ∈ I

{R : Type u}
[CommSemiring R]
{I : Ideal R}
(hI : I.IsPrime)
(s : Multiset R)


/-- A prefunctor from a quiver `B` to a bicategory `C` can be lifted to a pseudofunctor from
`free_bicategory B` to `C`.
-/
@[simps]
def lift : Pseudofunctor (FreeBicategory B) C

{B : Type u₁}
[Quiver B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : B ⥤q C)

∀ {a b c : CategoryTheory.FreeBicategory B} (f : a ⟶ b) (g : b ⟶ c),
  (CategoryTheory.FreeBicategory.lift F).mapComp f g =
    CategoryTheory.Iso.refl
      ({ obj := F.obj, map := fun {X Y} => CategoryTheory.FreeBicategory.liftHom F,
            map₂ := fun {a b} {f g} => Quot.lift (CategoryTheory.FreeBicategory.liftHom₂ F) ⋯, map₂_id := ⋯,
            map₂_comp := ⋯ }.map
        (CategoryTheory.CategoryStruct.comp f g))


@[norm_cast] -- @[simp] -- Porting note (#10618): simp can prove this
theorem intCast_inj {m n : ℤ} {R : Type*} [Ring R] [CharZero R] : (↑m : R[X]) = ↑n ↔ m = n

{m n : ℤ}
{R : Type u_1}
[Ring R]
[CharZero R]


theorem mul_inverse_cancel_right (x y : M₀) (h : IsUnit x) : y * x * inverse x = y

{M₀ : Type u_2}
[MonoidWithZero M₀]
(x y : M₀)
(h : IsUnit x)


@[simp, norm_cast]
theorem coe_Ioi (a : α) : (Ioi a : Set α) = Set.Ioi a

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


lemma smul_eq_zero_of_right (a : M) {b : A} (h : b = 0) : a • b = 0

{M : Type u_1}
{A : Type u_4}
[Zero A]
[SMulZeroClass M A]
(a : M)
{b : A}
(h : b = 0)


theorem piiUnionInter_mono_left {π π' : ι → Set (Set α)} (h_le : ∀ i, π i ⊆ π' i) (S : Set ι) :
    piiUnionInter π S ⊆ piiUnionInter π' S

{α : Type u_1}
{ι : Type u_2}
{π π' : ι → Set (Set α)}
(h_le : ∀ (i : ι), π i ⊆ π' i)
(S : Set ι)


@[simp]
theorem reverse_isTrail_iff {u v : V} (p : G.Walk u v) : p.reverse.IsTrail ↔ p.IsTrail

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


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

{G : CommGrp}
{H : Type u}
[CommGroup H]
(f : ↑G →* H)


@[simp]
theorem dual_Ioo : Ioo (toDual a) (toDual b) = ofDual ⁻¹' Ioo b a

Set.Ioo (OrderDual.toDual a) (OrderDual.toDual b) = ⇑OrderDual.ofDual ⁻¹' Set.Ioo b a


theorem filter_le_le_eq_Icc [DecidablePred fun j => a ≤ j ∧ j ≤ b] :
    (univ.filter fun j => a ≤ j ∧ j ≤ b) = Icc a b

{α : Type u_2}
[Preorder α]
[LocallyFiniteOrder α]
(a b : α)
[Fintype α]
[DecidablePred fun j => a ≤ j ∧ j ≤ b]

Finset.filter (fun j => a ≤ j ∧ j ≤ b) Finset.univ = Finset.Icc a b


theorem map_eq_setLIntegral_pdf {m : MeasurableSpace Ω} (X : Ω → E) (ℙ : Measure Ω)
    (μ : Measure E := by volume_tac) [hX : HasPDF X ℙ μ] {s : Set E}
    (hs : MeasurableSet s) : map X ℙ s = ∫⁻ x in s, pdf X ℙ μ x ∂μ

(μ : MeasureTheory.Measure E := by volume_tac)

(MeasureTheory.Measure.map X ℙ) s = ∫⁻ (x : E) in s, MeasureTheory.pdf X ℙ μ x ∂μ


@[simp]
theorem id_pow (n : ℕ) : (id : M →ₗ[R] M) ^ n = id

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
(n : ℕ)


@[simp]
theorem getElem_finRange {n : ℕ} {i : ℕ} (h) :
    (finRange n)[i] = ⟨i, length_finRange n ▸ h⟩

{n i : ℕ}
(h : i < (List.finRange n).length)


theorem log_lt_log_iff (hx : 0 < x) (hy : 0 < y) : log x < log y ↔ x < y


@[simp]
theorem append_add :
    ∀ {m} (v : Vector3 α m) {n} (w : Vector3 α n) (i : Fin2 n), (v +-+ w) (add i m) = w i

{α : Type u_1}
{m : ℕ}
(v : Vector3 α m)
{n : ℕ}
(w : Vector3 α n)
(i : Fin2 n)


@[to_additive (attr := simp)]
theorem singletonMonoidHom_apply (a : α) : singletonMonoidHom a = {a}

{α : Type u_2}
[DecidableEq α]
[MulOneClass α]
(a : α)


@[to_additive]
theorem smul_finset_inter_subset : a • (s₁ ∩ s₂) ⊆ a • s₁ ∩ a • s₂

{α : Type u_2}
{β : Type u_3}
[DecidableEq β]
[VAdd α β]
{s₁ s₂ : Finset β}
{a : α}


@[simp]
lemma imaginaryPart_ofReal (r : ℝ) : ℑ (r : ℂ) = 0


@[simp]
theorem isLimitForkOfKernelFork_lift {c : KernelFork (f - g)} (i : IsLimit c) (s : Fork f g) :
    (isLimitForkOfKernelFork i).lift s = i.lift (kernelForkOfFork s)

{c : CategoryTheory.Limits.KernelFork (f - g)}

(CategoryTheory.Preadditive.isLimitForkOfKernelFork i).lift s = i.lift (CategoryTheory.Preadditive.kernelForkOfFork s)


/-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
theorem continuous_integral_integral :
    Continuous fun f : α × β →₁[μ.prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ

{α : Type u_1}
{β : Type u_3}
{E : Type u_6}
[MeasurableSpace α]
[MeasurableSpace β]
{μ : MeasureTheory.Measure α}
{ν : MeasureTheory.Measure β}
[NormedAddCommGroup E]
[MeasureTheory.SFinite ν]
[NormedSpace ℝ E]
[MeasureTheory.SFinite μ]

Continuous fun f => ∫ (x : α), ∫ (y : β), ↑↑f (x, y) ∂ν ∂μ


@[simp]
protected theorem coe_toBasis_repr (b : OrthonormalBasis ι 𝕜 E) :
    b.toBasis.equivFun = b.repr.toLinearEquiv

{ι : Type u_1}
{𝕜 : Type u_3}
[RCLike 𝕜]
{E : Type u_4}
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
[Fintype ι]
(b : OrthonormalBasis ι 𝕜 E)


protected theorem max_assoc : ∀ (a b c : Nat), max (max a b) c = max a (max b c)


@[to_additive]
theorem prod_update_of_mem [DecidableEq α] {s : Finset α} {i : α} (h : i ∈ s) (f : α → β) (b : β) :
    ∏ x ∈ s, Function.update f i b x = b * ∏ x ∈ s \ singleton i, f x

{α : Type u_3}
{β : Type u_4}
[AddCommMonoid β]
[DecidableEq α]
{s : Finset α}
{i : α}
(h : i ∈ s)
(f : α → β)
(b : β)

∑ x ∈ s, Function.update f i b x = b + ∑ x ∈ s \ {i}, f x


protected theorem equiv_comm {x y : PGame} : (x ≈ y) ↔ (y ≈ x)


theorem _root_.Module.End_isUnit_apply_inv_apply_of_isUnit
    {f : Module.End R M} (h : IsUnit f) (x : M) :
    f (h.unit.inv x) = x

{R : Type u_1}
{M : Type u_5}
[Semiring R]
[AddCommMonoid M]
[Module R M]
{f : Module.End R M}
(h : IsUnit f)
(x : M)


@[simp]
theorem mem_join {a S} : a ∈ @join α S ↔ ∃ s ∈ S, a ∈ s

{α : Type u_1}
{a : α}
{S : Multiset (Multiset α)}


@[simp]
theorem toLex_ofNat [NatCast α] (n : ℕ) [n.AtLeastTwo] :
    (toLex (no_index (OfNat.ofNat n : α))) = OfNat.ofNat n

{α : Type u_1}
[NatCast α]
(n : ℕ)
[n.AtLeastTwo]


@[to_additive]
theorem MeasurableSet.const_smul {G α : Type*} [Group G] [MulAction G α] [MeasurableSpace G]
    [MeasurableSpace α] [MeasurableSMul G α] {s : Set α} (hs : MeasurableSet s) (a : G) :
    MeasurableSet (a • s)

{G : Type u_1}
{α : Type u_2}
[AddGroup G]
[AddAction G α]
[MeasurableSpace G]
[MeasurableSpace α]
[MeasurableVAdd G α]
{s : Set α}
(hs : MeasurableSet s)
(a : G)


@[simp]
theorem inf'_cons {b : β} {hb : b ∉ s} :
    (cons b s hb).inf' (nonempty_cons hb) f = f b ⊓ s.inf' H f

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

(Finset.cons b s hb).inf' ⋯ f = f b ⊓ s.inf' H f


theorem limit_isSheaf [HasLimits C] {X : TopCat} (F : J ⥤ Presheaf.{v} C X)
    (H : ∀ j, (F.obj j).IsSheaf) : (limit F).IsSheaf

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{J : Type v}
[CategoryTheory.SmallCategory J]
[CategoryTheory.Limits.HasLimits C]
{X : TopCat}
(F : J ⥤ TopCat.Presheaf C X)
(H : ∀ (j : J), (F.obj j).IsSheaf)


theorem nonneg (i : ι) (x : X) : 0 ≤ f i x

{ι : Type u}
{X : Type v}
[TopologicalSpace X]
{s : Set X}
(f : BumpCovering ι X s)
(i : ι)
(x : X)


theorem relIso_enum' {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} [IsWellOrder α r]
    [IsWellOrder β s] (f : r ≃r s) (o : Ordinal) :
    ∀ (hr : o < type r) (hs : o < type s), f (enum r o hr) = enum s o hs

{α β : Type u}
{r : α → α → Prop}
{s : β → β → Prop}
[IsWellOrder α r]
[IsWellOrder β s]
(f : r ≃r s)
(o : Ordinal.{u})
(hr : o < Ordinal.type r)
(hs : o < Ordinal.type s)

f (Ordinal.enum r o hr) = Ordinal.enum s o hs


theorem div_modByMonic_unique {f g} (q r : R[X]) (hg : Monic g)
    (h : r + g * q = f ∧ degree r < degree g) : f /ₘ g = q ∧ f %ₘ g = r

(h : r + g * q = f ∧ r.degree < g.degree)


theorem root_exists (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0)
    (ha₂ : a₂.coeff 0 ≠ 0) : ∃ b : k, (succNthDefiningPoly p n a₁ a₂ bs).IsRoot b

(p : ℕ)
[hp : Fact (Nat.Prime p)]
{k : Type u_1}
[Field k]
[CharP k p]
[IsAlgClosed k]
(n : ℕ)
(a₁ a₂ : WittVector p k)
(bs : Fin (n + 1) → k)
(ha₁ : a₁.coeff 0 ≠ 0)
(ha₂ : a₂.coeff 0 ≠ 0)

∃ b, (WittVector.RecursionMain.succNthDefiningPoly p n a₁ a₂ bs).IsRoot b


@[simp]
theorem ι_range_map_map (f : M →ₗ[R] N) :
    Submodule.map (AlgHom.toLinearMap (map f)) (LinearMap.range (ι R (M := M))) =
    Submodule.map (ι R) (LinearMap.range f)

{R : Type u1}
[CommRing R]
{M : Type u2}
[AddCommGroup M]
[Module R M]
{N : Type u4}
[AddCommGroup N]
[Module R N]
(f : M →ₗ[R] N)

Submodule.map (ExteriorAlgebra.map f).toLinearMap (LinearMap.range (ExteriorAlgebra.ι R)) =
  Submodule.map (ExteriorAlgebra.ι R) (LinearMap.range f)


/--
Given a profinite set `S` and a closed embedding `S → (I → Bool)`, the `ℤ`-module
`LocallyConstant C ℤ` is free.
-/
theorem Nobeling_aux : Module.Free ℤ (LocallyConstant S ℤ)

{I : Type u}
[LinearOrder I]
[IsWellOrder I fun x x_1 => x < x_1]
{S : Profinite}
{ι : ↑S.toTop → I → Bool}
(hι : ClosedEmbedding ι)

Module.Free ℤ (LocallyConstant ↑S.toTop ℤ)


@[simp]
theorem lift_of (i x) : lift G f P g Hg (of G f i x) = g i x

(Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), (g j) ((f i j hij) x) = (g i) x)

(AddCommGroup.DirectLimit.lift G f P g Hg) ((AddCommGroup.DirectLimit.of G f i) x) = (g i) x


@[to_additive]
theorem tendsto_mulIndicator_biUnion_finset {ι} [One β] (s : ι → Set α) (f : α → β) (a : α) :
    Tendsto (fun n : Finset ι => mulIndicator (⋃ i ∈ n, s i) f a) atTop
      (pure <| mulIndicator (iUnion s) f a)

{α : Type u_1}
{β : Type u_2}
{ι : Type u_5}
[Zero β]
(s : ι → Set α)
(f : α → β)
(a : α)

Filter.Tendsto (fun n => (⋃ i ∈ n, s i).indicator f a) Filter.atTop (pure ((Set.iUnion s).indicator f a))


lemma le_dual_inv_aux (hIJ : I * J ≤ 1) :
    J ≤ dual A K I

(A : Type u_1)
(K : Type u_2)
{L : Type u}
{B : Type u_3}
[CommRing A]
[Field K]
[CommRing B]
[Field L]
[Algebra A K]
[Algebra B L]
[Algebra A B]
[Algebra K L]
[Algebra A L]
[IsScalarTower A K L]
[IsScalarTower A B L]
[IsDomain A]
[IsFractionRing A K]
[IsIntegralClosure B A L]
[IsFractionRing B L]
[FiniteDimensional K L]
[Algebra.IsSeparable K L]
[IsIntegrallyClosed A]
[IsDedekindDomain B]
{I J : FractionalIdeal B⁰ L}
(hI : I ≠ 0)
(hIJ : I * J ≤ 1)


lemma ShortExact.injective_f (hS : S.ShortExact) :
    Function.Injective ((forget₂ C Ab).map S.f)

Function.Injective ⇑((CategoryTheory.forget₂ C Ab).map S.f)


theorem dvd_C_mul (ha : a ≠ 0) : p ∣ Polynomial.C a * q ↔ p ∣ q

{R : Type u}
{a : R}
[Field R]
{p q : R[X]}
(ha : a ≠ 0)


/-- An element of `MonoidAlgebra k G` is in the subalgebra generated by its support. -/
theorem mem_span_support (f : MonoidAlgebra k G) :
    f ∈ Submodule.span k (of k G '' (f.support : Set G))

{k : Type u₁}
{G : Type u₂}
[Semiring k]
[MulOneClass G]
(f : MonoidAlgebra k G)

f ∈ Submodule.span k (⇑(MonoidAlgebra.of k G) '' ↑f.support)


@[to_additive]
theorem mul_eq_map₂ [Mul β] (f g : α →ₛ β) : f * g = (pair f g).map fun p : β × β => p.1 * p.2

{α : Type u_1}
{β : Type u_2}
[MeasurableSpace α]
[Add β]
(f g : MeasureTheory.SimpleFunc α β)

f + g = MeasureTheory.SimpleFunc.map (fun p => p.1 + p.2) (f.pair g)


lemma atomistic (hS : BooleanGenerators S) (a : α) (ha : a ≤ sSup S) : ∃ T ⊆ S, a = sSup T

(hS : IsCompactlyGenerated.BooleanGenerators S)


theorem prime_iff_card_units (p : ℕ) [Fintype (ZMod p)ˣ] :
    p.Prime ↔ Fintype.card (ZMod p)ˣ = p - 1

Nat.Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1


theorem LiftP_PredLast_iff {β} (P : β → Prop) (x : F (α ::: β)) :
    LiftP' (PredLast' _ P) x ↔ LiftP (PredLast _ P) x

{n : ℕ}
{F : TypeVec.{u} (n + 1) → Type u_1}
[MvFunctor F]
[LawfulMvFunctor F]
{α : TypeVec.{u} n}
{β : Type u}
(P : β → Prop)
(x : F (α ::: β))

MvFunctor.LiftP' (α.PredLast' P) x ↔ MvFunctor.LiftP (α.PredLast P) x


theorem right_nonuniformWitnesses_subset (h : ¬G.IsUniform ε s t) :
    (G.nonuniformWitnesses ε s t).2 ⊆ t

{α : Type u_1}
{𝕜 : Type u_2}
[LinearOrderedField 𝕜]
(G : SimpleGraph α)
[DecidableRel G.Adj]
{ε : 𝕜}
{s t : Finset α}
(h : ¬G.IsUniform ε s t)


/-- Pull a submonoid back to an opposite submonoid along `MulOpposite.unop`-/
@[to_additive (attr := simps) "Pull an additive submonoid back to an opposite submonoid along
`AddOpposite.unop`"]
protected def op (x : Submonoid M) : Submonoid Mᵐᵒᵖ

{M : Type u_2}
[AddZeroClass M]
(x : AddSubmonoid M)


theorem Iio_inter_Ici : Iio a ∩ Ici b = Ico b a


theorem isRat_zpow_neg {α : Type*} [DivisionRing α] {a : α} {b : ℤ} {nb : ℕ}
    {num : ℤ} {den : ℕ}
    (pb : IsInt b (Int.negOfNat nb)) (pe' : IsRat ((a^nb)⁻¹) num den) :
    IsRat (a^b) num den

(pb : Mathlib.Meta.NormNum.IsInt b (Int.negOfNat nb))

(pe' : Mathlib.Meta.NormNum.IsRat (a ^ nb)⁻¹ num den)

Mathlib.Meta.NormNum.IsRat (a ^ b) num den


/-- A natural transformation between functors `Karoubi C ⥤ D` is determined
by its value on objects coming from `C`. -/
theorem natTrans_eq {F G : Karoubi C ⥤ D} (φ : F ⟶ G) (P : Karoubi C) :
    φ.app P = F.map (decompId_i P) ≫ φ.app P.X ≫ G.map (decompId_p P)

{F G : CategoryTheory.Functor (CategoryTheory.Idempotents.Karoubi C) D}

(P : CategoryTheory.Idempotents.Karoubi C)

φ.app P =
  CategoryTheory.CategoryStruct.comp (F.map P.decompId_i)
    (CategoryTheory.CategoryStruct.comp (φ.app { X := P.X, p := CategoryTheory.CategoryStruct.id P.X, idem := ⋯ })
      (G.map P.decompId_p))


/-- Product of two equivalences. If `α₁ ≃ α₂` and `β₁ ≃ β₂`, then `α₁ × β₁ ≃ α₂ × β₂`. This is
`Prod.map` as an equivalence. -/
-- Porting note: in Lean 3 there was also a @[congr] tag
@[simps (config := .asFn) apply]
def prodCongr (e₁ : α₁ ≃ α₂) (e₂ : β₁ ≃ β₂) : α₁ × β₁ ≃ α₂ × β₂

{α₁ : Type u_1}
{α₂ : Type u_2}
{β₁ : Type u_3}
{β₂ : Type u_4}
(e₁ : α₁ ≃ α₂)
(e₂ : β₁ ≃ β₂)


@[ext]
theorem Derivation.liftKaehlerDifferential_unique (f f' : Ω[S⁄R] →ₗ[S] M)
    (hf : f.compDer (KaehlerDifferential.D R S) = f'.compDer (KaehlerDifferential.D R S)) :
    f = f'


@[simp] lemma last_snoc' (p : RelSeries r) (newLast : α) (rel : r p.last newLast) :
    p.snoc newLast rel (Fin.last (p.length + 1)) = newLast

{α : Type u_1}
{r : Rel α α}
(p : RelSeries r)
(newLast : α)
(rel : r p.last newLast)

(p.snoc newLast rel).toFun (Fin.last (p.length + 1)) = newLast


theorem isCycle_swap_mul_aux₂ {α : Type*} [DecidableEq α] :
    ∀ (n : ℤ) {b x : α} {f : Perm α} (_ : (swap x (f x) * f) b ≠ b) (_ : (f ^ n) (f x) = b),
      ∃ i : ℤ, ((swap x (f x) * f) ^ i) (f x) = b

{α : Type u_4}
[DecidableEq α]
(n : ℤ)
{b x : α}
{f : Equiv.Perm α}

(Equiv.swap x (f x) * f) b ≠ b → (f ^ n) (f x) = b → ∃ i, ((Equiv.swap x (f x) * f) ^ i) (f x) = b


@[simp]
theorem iteratedDerivWithin_one {x : 𝕜} (h : UniqueDiffWithinAt 𝕜 s x) :
    iteratedDerivWithin 1 f s x = derivWithin f s x

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


lemma supSum_union_add_supSum_infs (𝒜 ℬ : Finset (Finset α)) :
    supSum (𝒜 ∪ ℬ) + supSum (𝒜 ⊼ ℬ) = supSum 𝒜 + supSum ℬ

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

AhlswedeZhang.supSum (𝒜 ∪ ℬ) + AhlswedeZhang.supSum (𝒜 ⊼ ℬ) = AhlswedeZhang.supSum 𝒜 + AhlswedeZhang.supSum ℬ


/-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
  Fubini's theorem is measurable.
  This version has `f` in curried form. -/
theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SFinite ν] ⦃f : α → β → E⦄
    (hf : StronglyMeasurable (uncurry f)) : StronglyMeasurable fun x => ∫ y, f x y ∂ν

⦃f : α → β → E⦄

(hf : MeasureTheory.StronglyMeasurable (Function.uncurry f))

MeasureTheory.StronglyMeasurable fun x => ∫ (y : β), f x y ∂ν


theorem efixedPoint_mem' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
    (hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
    efixedPoint' f hsc hsf hf x hxs hx ∈ s

(hf : ContractingWith K (Set.MapsTo.restrict f s s hsf))

ContractingWith.efixedPoint' f hsc hsf hf x hxs hx ∈ s


lemma one_lt_succ_succ (n : ℕ) : 1 < n.succ.succ


theorem formPerm_ext_iff {x y x' y' : α} {l l' : List α} (hd : Nodup (x :: y :: l))
    (hd' : Nodup (x' :: y' :: l')) :
    formPerm (x :: y :: l) = formPerm (x' :: y' :: l') ↔ (x :: y :: l) ~r (x' :: y' :: l')

{α : Type u_1}
[DecidableEq α]
{x y x' y' : α}
{l l' : List α}
(hd : (x :: y :: l).Nodup)
(hd' : (x' :: y' :: l').Nodup)


theorem IsPrenex.induction_on_all_not {P : ∀ {n}, L.BoundedFormula α n → Prop}
    {φ : L.BoundedFormula α n} (h : IsPrenex φ)
    (hq : ∀ {m} {ψ : L.BoundedFormula α m}, ψ.IsQF → P ψ)
    (ha : ∀ {m} {ψ : L.BoundedFormula α (m + 1)}, P ψ → P ψ.all)
    (hn : ∀ {m} {ψ : L.BoundedFormula α m}, P ψ → P ψ.not) : P φ

{P : {n : ℕ} → L.BoundedFormula α n → Prop}

(hq : ∀ {m : ℕ} {ψ : L.BoundedFormula α m}, ψ.IsQF → P ψ)

(ha : ∀ {m : ℕ} {ψ : L.BoundedFormula α (m + 1)}, P ψ → P ψ.all)

(hn : ∀ {m : ℕ} {ψ : L.BoundedFormula α m}, P ψ → P ψ.not)


/-- Casting a `Homotopy p₀ p₁` to a `Homotopy q₀ q₁` where `p₀ = q₀` and `p₁ = q₁`. -/
@[simps!]
def cast {p₀ p₁ q₀ q₁ : Path x₀ x₁} (F : Homotopy p₀ p₁) (h₀ : p₀ = q₀) (h₁ : p₁ = q₁) :
    Homotopy q₀ q₁

{X : Type u}
[TopologicalSpace X]
{x₀ x₁ : X}
{p₀ p₁ q₀ q₁ : Path x₀ x₁}
(F : p₀.Homotopy p₁)
(h₀ : p₀ = q₀)
(h₁ : p₁ = q₁)
(a : ↑I × ↑I)


theorem LiftRelO.swap (R : α → β → Prop) (C) :
    swap (LiftRelO R C) = LiftRelO (swap R) (swap C)

(C : Stream'.WSeq α → Stream'.WSeq β → Prop)

Function.swap (Stream'.WSeq.LiftRelO R C) = Stream'.WSeq.LiftRelO (Function.swap R) (Function.swap C)


theorem geom_sum₂_comm {α : Type u} [CommSemiring α] (x y : α) (n : ℕ) :
    ∑ i ∈ range n, x ^ i * y ^ (n - 1 - i) = ∑ i ∈ range n, y ^ i * x ^ (n - 1 - i)

∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i) = ∑ i ∈ Finset.range n, y ^ i * x ^ (n - 1 - i)


theorem norm_derivWithin_eq_norm_fderivWithin : ‖derivWithin f s x‖ = ‖fderivWithin 𝕜 f s x‖

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


theorem isQuasiSeparated_univ_iff {α : Type*} [TopologicalSpace α] :
    IsQuasiSeparated (Set.univ : Set α) ↔ QuasiSeparatedSpace α

IsQuasiSeparated Set.univ ↔ QuasiSeparatedSpace α


/-- The edist to a set depends continuously on the point -/
@[continuity]
theorem continuous_infEdist : Continuous fun x => infEdist x s

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

Continuous fun x => EMetric.infEdist x s


@[to_additive (attr := simp)]
theorem smul_mem_ae (c : G) {s : Set α} : c • s ∈ ae μ ↔ s ∈ ae μ

[MeasureTheory.VAddInvariantMeasure G α μ]

c +ᵥ s ∈ MeasureTheory.ae μ ↔ s ∈ MeasureTheory.ae μ


theorem wcovBy_of_eq_or_eq (hab : a ≤ b) (h : ∀ c, a ≤ c → c ≤ b → c = a ∨ c = b) : a ⩿ b

(h : ∀ (c : α), a ≤ c → c ≤ b → c = a ∨ c = b)


@[simp]
theorem coeff_succ_X_mul (n : ℕ) (φ : R⟦X⟧) : coeff R (n + 1) (X * φ) = coeff R n φ

{R : Type u_1}
[Semiring R]
(n : ℕ)
(φ : PowerSeries R)

(PowerSeries.coeff R (n + 1)) (PowerSeries.X * φ) = (PowerSeries.coeff R n) φ


@[to_additive of_forall_le_norm]
lemma DiscreteTopology.of_forall_le_norm' (hpos : 0 < r) (hr : ∀ x : E, x ≠ 1 → r ≤ ‖x‖) :
    DiscreteTopology E

{E : Type u_6}
[SeminormedAddGroup E]
{r : ℝ}
(hpos : 0 < r)
(hr : ∀ (x : E), x ≠ 0 → r ≤ ‖x‖)


/-- A class registering that either `α` is countable or `β` is a countably generated
measurable space. -/
class CountableOrCountablyGenerated (α β : Type*) [MeasurableSpace α] [MeasurableSpace β] : Prop :=
  countableOrCountablyGenerated : Countable α ∨ MeasurableSpace.CountablyGenerated β

[self : MeasurableSpace.CountableOrCountablyGenerated α β]


@[to_additive (attr := simp)]
theorem inv_eq_empty : s⁻¹ = ∅ ↔ s = ∅

{α : Type u_2}
[DecidableEq α]
[Neg α]
{s : Finset α}


@[simp]
theorem functorCategoryMonoidalEquivalence.inverse_map {A B : SingleObj G ⥤ V} (f : A ⟶ B) :
    (functorCategoryMonoidalEquivalenceInverse _ _).map f =
      FunctorCategoryEquivalence.inverse.map f

(V : Type (u + 1))
[CategoryTheory.LargeCategory V]
(G : MonCat)
[CategoryTheory.MonoidalCategory V]
{A B : CategoryTheory.SingleObj ↑G ⥤ V}
(f : A ⟶ B)

(Action.functorCategoryMonoidalEquivalenceInverse V G).map f = Action.FunctorCategoryEquivalence.inverse.map f


@[simp]
lemma toColumns₂_apply (A : Matrix m (n₁ ⊕ n₂) R) (i : m) (j : n₂) :
    (toColumns₂ A) i j = A i (Sum.inr j)

{R : Type u_1}
{m : Type u_2}
{n₁ : Type u_6}
{n₂ : Type u_7}
(A : Matrix m (n₁ ⊕ n₂) R)
(i : m)
(j : n₂)


theorem lt_of_lt_mul_of_le_one_of_nonneg_left [PosMulMono α] (h : a < b * c) (hc : c ≤ 1)
    (hb : 0 ≤ b) : a < b

{α : Type u_1}
{a b c : α}
[MulOneClass α]
[Zero α]
[Preorder α]
[PosMulMono α]
(h : a < b * c)
(hc : c ≤ 1)
(hb : 0 ≤ b)


@[simp]
theorem iUnion_single (h : J ≤ I) : (single I J h).iUnion = J

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

(BoxIntegral.Prepartition.single I J h).iUnion = ↑J


/-- If `F i → f` in `L1`, then `∫ x, F i x ∂μ → ∫ x, f x ∂μ`. -/
theorem tendsto_integral_of_L1 {ι} (f : α → G) (hfi : Integrable f μ) {F : ι → α → G} {l : Filter ι}
    (hFi : ∀ᶠ i in l, Integrable (F i) μ)
    (hF : Tendsto (fun i => ∫⁻ x, ‖F i x - f x‖₊ ∂μ) l (𝓝 0)) :
    Tendsto (fun i => ∫ x, F i x ∂μ) l (𝓝 <| ∫ x, f x ∂μ)

(hFi : ∀ᶠ (i : ι) in l, MeasureTheory.Integrable (F i) μ)

(hF : Filter.Tendsto (fun i => ∫⁻ (x : α), ↑‖F i x - f x‖₊ ∂μ) l (𝓝 0))

Filter.Tendsto (fun i => ∫ (x : α), F i x ∂μ) l (𝓝 (∫ (x : α), f x ∂μ))


theorem fract_eq_iff {a b : α} : fract a = b ↔ 0 ≤ b ∧ b < 1 ∧ ∃ z : ℤ, a - b = z

{α : Type u_2}
[LinearOrderedRing α]
[FloorRing α]
{a b : α}

Int.fract a = b ↔ 0 ≤ b ∧ b < 1 ∧ ∃ z, a - b = ↑z


lemma indicator_const_smul_apply (s : Set α) (r : R) (f : α → M) (a : α) :
    indicator s (r • f ·) a = r • indicator s f a

{α : Type u_1}
{R : Type u_2}
{M : Type u_3}
[Zero M]
[SMulZeroClass R M]
(s : Set α)
(r : R)
(f : α → M)
(a : α)

s.indicator (fun x => r • f x) a = r • s.indicator f a


lemma restrict_comp
    {M₂ M₃ : Type*} [AddCommMonoid M₂] [AddCommMonoid M₃] [Module R M₂] [Module R M₃]
    {p : Submodule R M} {p₂ : Submodule R M₂} {p₃ : Submodule R M₃}
    {f : M →ₗ[R] M₂} {g : M₂ →ₗ[R] M₃}
    (hf : MapsTo f p p₂) (hg : MapsTo g p₂ p₃) (hfg : MapsTo (g ∘ₗ f) p p₃ := hg.comp hf) :
    (g ∘ₗ f).restrict hfg = (g.restrict hg) ∘ₗ (f.restrict hf)

(hfg : Set.MapsTo ⇑(g ∘ₗ f) ↑p ↑p₃ := ⋯)

(g ∘ₗ f).restrict hfg = g.restrict hg ∘ₗ f.restrict hf


theorem eval_one_cyclotomic_not_prime_pow {R : Type*} [Ring R] {n : ℕ}
    (h : ∀ {p : ℕ}, p.Prime → ∀ k : ℕ, p ^ k ≠ n) : eval 1 (cyclotomic n R) = 1

(h : ∀ {p : ℕ}, Nat.Prime p → ∀ (k : ℕ), p ^ k ≠ n)

Polynomial.eval 1 (Polynomial.cyclotomic n R) = 1


theorem of_succ {Y : C} {n q : ℕ} {φ : Y ⟶ X _[n + 1]} (v : HigherFacesVanish (q + 1) φ) :
    HigherFacesVanish q φ

(v : AlgebraicTopology.DoldKan.HigherFacesVanish (q + 1) φ)


lemma Spec.locallyRingedSpaceObj_presheaf' (R : Type u) [CommRing R] :
    (Spec.locallyRingedSpaceObj <| CommRingCat.of R).presheaf = (structureSheaf R).1

(AlgebraicGeometry.Spec.locallyRingedSpaceObj (CommRingCat.of R)).presheaf =
  (AlgebraicGeometry.Spec.structureSheaf R).val


/--
**Bertrand's Postulate**: For any positive natural number, there is a prime which is greater than
it, but no more than twice as large.
-/
theorem exists_prime_lt_and_le_two_mul (n : ℕ) (hn0 : n ≠ 0) :
    ∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n


theorem single_inv (d : ℤ) {α : F} (hα : α ≠ 0) :
    single (-d) (α⁻¹ : F) = (single (d : ℤ) (α : F))⁻¹

{F : Type u}
[Field F]
(d : ℤ)
{α : F}
(hα : α ≠ 0)

(HahnSeries.single (-d)) α⁻¹ = ((HahnSeries.single d) α)⁻¹


/-- In a monoid, an element `a` divides an element `b` iff `a` divides all
    associates of `b`. -/
theorem dvd_mul_right : a ∣ b * u ↔ a ∣ b

{α : Type u_1}
[Monoid α]
{a b : α}
{u : αˣ}


lemma MonotoneOn.mapsTo_Iic (h : MonotoneOn f (Iic b)) : MapsTo f (Iic b) (Iic (f b))

{α : Type u_1}
{β : Type u_2}
{f : α → β}
[Preorder α]
[Preorder β]
{b : α}
(h : MonotoneOn f (Set.Iic b))

Set.MapsTo f (Set.Iic b) (Set.Iic (f b))


@[simp]
theorem mem_disjUnion (H : Disjoint π₁.iUnion π₂.iUnion) :
    J ∈ π₁.disjUnion π₂ H ↔ J ∈ π₁ ∨ J ∈ π₂

{ι : Type u_1}
{I J : BoxIntegral.Box ι}
{π₁ π₂ : BoxIntegral.Prepartition I}
(H : Disjoint π₁.iUnion π₂.iUnion)


@[simp]
theorem id_def (X : Discrete α) : ULift.up (PLift.up (Eq.refl X.as)) = 𝟙 X

{α : Type u₁}
(X : CategoryTheory.Discrete α)

{ down := { down := ⋯ } } = CategoryTheory.CategoryStruct.id X


@[simp]
theorem MonoidWithZero.inverse_apply {M : Type*} [CommMonoidWithZero M] (a : M) :
    MonoidWithZero.inverse a = Ring.inverse a

{M : Type u_8}
[CommMonoidWithZero M]
(a : M)


theorem apply_mono (μ : ProbabilityMeasure Ω) {s₁ s₂ : Set Ω} (h : s₁ ⊆ s₂) : μ s₁ ≤ μ s₂

(μ : MeasureTheory.ProbabilityMeasure Ω)


theorem map_comap_eq_self_of_surjective {f : L →ₐ[K] L'} (hf : Function.Surjective f)
    (S : IntermediateField K L') : (S.comap f).map f = S

{K : Type u_1}
{L : Type u_2}
{L' : Type u_3}
[Field K]
[Field L]
[Field L']
[Algebra K L]
[Algebra K L']
{f : L →ₐ[K] L'}
(hf : Function.Surjective ⇑f)
(S : IntermediateField K L')

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


@[simp]
theorem some_add [AddCommMonoid M] (f g : Option α →₀ M) : (f + g).some = f.some + g.some

{α : Type u_1}
{M : Type u_5}
[AddCommMonoid M]
(f g : Option α →₀ M)


theorem isBigOWith_sub (x : E) :
    IsBigOWith ‖f‖ l (fun x' => f (x' - x)) fun x' => x' - x

{𝕜 : Type u_1}
{𝕜₂ : Type u_2}
{E : Type u_4}
{F : Type u_5}
[SeminormedAddCommGroup E]
[SeminormedAddCommGroup F]
[NontriviallyNormedField 𝕜]
[NontriviallyNormedField 𝕜₂]
[NormedSpace 𝕜 E]
[NormedSpace 𝕜₂ F]
{σ₁₂ : 𝕜 →+* 𝕜₂}
[RingHomIsometric σ₁₂]
(f : E →SL[σ₁₂] F)
(l : Filter E)
(x : E)

Asymptotics.IsBigOWith ‖f‖ l (fun x' => f (x' - x)) fun x' => x' - x


/-- A local diffeomorphism on `s` is differentiable on `s`. -/
lemma IsLocalDiffeomorphOn.mdifferentiableOn (hf : IsLocalDiffeomorphOn I J n f s) (hn : 1 ≤ n) :
    MDifferentiableOn I J f s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{F : Type u_3}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{H : Type u_4}
[TopologicalSpace H]
{G : Type u_5}
[TopologicalSpace G]
{I : ModelWithCorners 𝕜 E H}
{J : ModelWithCorners 𝕜 F G}
{M : Type u_6}
[TopologicalSpace M]
[ChartedSpace H M]
{N : Type u_7}
[TopologicalSpace N]
[ChartedSpace G N]
{n : ℕ∞}
{f : M → N}
{s : Set M}
(hf : IsLocalDiffeomorphOn I J n f s)
(hn : 1 ≤ n)


@[to_additive sum_le_sum]
lemma Forall₂.prod_le_prod' [Preorder M] [CovariantClass M M (Function.swap (· * ·)) (· ≤ ·)]
    [CovariantClass M M (· * ·) (· ≤ ·)] {l₁ l₂ : List M} (h : Forall₂ (· ≤ ·) l₁ l₂) :
    l₁.prod ≤ l₂.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]

(h : List.Forall₂ (fun x x_1 => x ≤ x_1) l₁ l₂)


theorem image₂_inter_union_subset_union :
    image₂ f (s ∩ s') (t ∪ t') ⊆ image₂ f s t ∪ image₂ f s' t'

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

Finset.image₂ f (s ∩ s') (t ∪ t') ⊆ Finset.image₂ f s t ∪ Finset.image₂ f s' t'


theorem map_toNonUnitalSubsemiring {S : NonUnitalSubalgebra R A} {f : F} :
    (map f S).toNonUnitalSubsemiring = S.toNonUnitalSubsemiring.map (f : A →ₙ+* B)

{F : Type v'}
{R : Type u}
{A : Type v}
{B : Type w}
[CommSemiring R]
[NonUnitalNonAssocSemiring A]
[NonUnitalNonAssocSemiring B]
[Module R A]
[Module R B]
[FunLike F A B]
[NonUnitalAlgHomClass F R A B]
{S : NonUnitalSubalgebra R A}
{f : F}

(NonUnitalSubalgebra.map f S).toNonUnitalSubsemiring = NonUnitalSubsemiring.map (↑f) S.toNonUnitalSubsemiring


@[simp] theorem getLeft?_map (f : α → β) (g : γ → δ) (x : α ⊕ γ) :
    (x.map f g).getLeft? = x.getLeft?.map f

{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{δ : Type u_4}
(f : α → β)
(g : γ → δ)
(x : α ⊕ γ)

(Sum.map f g x).getLeft? = Option.map f x.getLeft?


private theorem liftFun_antisymmRel (f : α →o β) :
    ((AntisymmRel.setoid α (· ≤ ·)).r ⇒ (AntisymmRel.setoid β (· ≤ ·)).r) f f

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α →o β)


theorem Set.hasSeparatingCover_empty_right (s : Set X) : HasSeparatingCover s ∅

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


/-- The closed thickening of the empty set is empty. -/
@[simp]
theorem cthickening_empty (δ : ℝ) : cthickening δ (∅ : Set α) = ∅

{α : Type u}
[PseudoEMetricSpace α]
(δ : ℝ)


theorem opRingEquiv_symm_C_mul_X_pow (r : Rᵐᵒᵖ) (n : ℕ) :
    (opRingEquiv R).symm (C r * X ^ n : Rᵐᵒᵖ[X]) = op (C (unop r) * X ^ n)

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

(Polynomial.opRingEquiv R).symm (Polynomial.C r * Polynomial.X ^ n) =
  MulOpposite.op (Polynomial.C (MulOpposite.unop r) * Polynomial.X ^ n)


theorem mk_compl_eq_mk_compl_finite_same {α : Type u} [Finite α] {s t : Set α} (h : #s = #t) :
    #(sᶜ : Set α) = #(tᶜ : Set α)

{α : Type u}
[Finite α]
{s t : Set α}
(h : #↑s = #↑t)


@[simp, rclike_simps]
theorem mul_re : ∀ z w : K, re (z * w) = re z * re w - im z * im w

RCLike.re (z * w) = RCLike.re z * RCLike.re w - RCLike.im z * RCLike.im w


/-- If you rotate a triangle, you get another triangle.
Given a triangle of the form:
```
      f       g       h
  X  ───> Y  ───> Z  ───> X⟦1⟧
```
applying `rotate` gives a triangle of the form:
```
      g       h        -f⟦1⟧'
  Y  ───> Z  ───>  X⟦1⟧ ───> Y⟦1⟧
```
-/
@[simps!]
def Triangle.rotate (T : Triangle C) : Triangle C

(T : CategoryTheory.Pretriangulated.Triangle C)


@[simp] lemma coroot_eq_iff (α β : Weight K H L) :
    coroot α = coroot β ↔ α = β

{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]
(α β : LieModule.Weight K (↥H) L)

LieAlgebra.IsKilling.coroot α = LieAlgebra.IsKilling.coroot β ↔ α = β


protected theorem CPolynomialAt.continuousAt (hf : CPolynomialAt 𝕜 f x) : ContinuousAt f x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f : E → F}
{x : E}
(hf : CPolynomialAt 𝕜 f x)


/-- A non-trivial `cons` walk is representable as a `concat` walk. -/
theorem exists_cons_eq_concat {u v w : V} (h : G.Adj u v) (p : G.Walk v w) :
    ∃ (x : V) (q : G.Walk u x) (h' : G.Adj x w), cons h p = q.concat h'

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

∃ x q, ∃ (h' : G.Adj x w), SimpleGraph.Walk.cons h p = q.concat h'


@[simp] theorem getLastD_cons (a b l) : @getLastD α (b::l) a = getLastD l b


lemma densityProcess_def (κ : Kernel α (γ × β)) (ν : Kernel α γ) (n : ℕ) (a : α) (s : Set β) :
    (fun t ↦ densityProcess κ ν n a t s)
      = fun t ↦ (κ a (countablePartitionSet n t ×ˢ s) / ν a (countablePartitionSet n t)).toReal

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

(fun t => κ.densityProcess ν n a t s) = fun t =>
  ((κ a) (MeasurableSpace.countablePartitionSet n t ×ˢ s) / (ν a) (MeasurableSpace.countablePartitionSet n t)).toReal


theorem nonempty_of_ncard_ne_zero (hs : s.ncard ≠ 0) : s.Nonempty

{α : Type u_1}
{s : Set α}
(hs : s.ncard ≠ 0)


protected theorem zero {f : ∀ b < (0 : Ordinal), Ordinal} : IsFundamentalSequence 0 0 f

{f : (b : Ordinal.{u_2}) → b < 0 → Ordinal.{u_2}}


theorem norm_int_le_one (z : ℤ) : ‖(z : ℚ_[p])‖ ≤ 1

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


lemma tsub_tsub_eq_min (a b : α) : a - (a - b) = min a b

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


theorem pos_add_limZero {f g : CauSeq α abs} : Pos f → LimZero g → Pos (f + g)

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


theorem toProdMulOpposite_injective :
    Function.Injective (toProdMulOpposite : 𝓜(𝕜, A) → (A →L[𝕜] A) × (A →L[𝕜] A)ᵐᵒᵖ)

{𝕜 : Type u_1}
{A : Type u_2}
[NontriviallyNormedField 𝕜]
[NonUnitalNormedRing A]
[NormedSpace 𝕜 A]
[SMulCommClass 𝕜 A A]
[IsScalarTower 𝕜 A A]


@[simp]
lemma normEDS_three : normEDS b c d 3 = c


private theorem exists_lt_mul_omega' {o : Ordinal} ⦃a⦄ (h : a < o * ω) :
    ∃ i : ℕ, a < o * ↑i + o

{o : Ordinal.{u_1}}
⦃a : Ordinal.{u_1}⦄
(h : a < o * ω)


/-- An angle in a right-angled triangle expressed using `arcsin`. -/
theorem oangle_left_eq_arcsin_of_oangle_eq_pi_div_two {p₁ p₂ p₃ : P} (h : ∡ p₁ p₂ p₃ = ↑(π / 2)) :
    ∡ p₃ p₁ p₂ = Real.arcsin (dist p₃ p₂ / dist p₁ p₃)

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

∡ p₃ p₁ p₂ = ↑(Real.arcsin (dist p₃ p₂ / dist p₁ p₃))


theorem ofPowerSeries_injective : Function.Injective (ofPowerSeries Γ R)

{Γ : Type u_1}
{R : Type u_2}
[Semiring R]
[StrictOrderedSemiring Γ]

Function.Injective ⇑(HahnSeries.ofPowerSeries Γ R)


@[simp]
theorem map_id {f : CostructuredArrow S T} : (map (𝟙 T)).obj f = f

{f : CategoryTheory.CostructuredArrow S T}

(CategoryTheory.CostructuredArrow.map (CategoryTheory.CategoryStruct.id T)).obj f = f


theorem lt_one_iff_le_zero {x : WithBot ℕ} : x < 1 ↔ x ≤ 0


@[to_additive (attr := simp)]
lemma prod_erase [DecidableEq M] (ha : a ∈ l) : a * (l.erase a).prod = l.prod

{M : Type u_4}
[CommMonoid M]
{a : M}
{l : List M}
[DecidableEq M]
(ha : a ∈ l)


/-- If the angle between two vectors is 0, the inner product equals the product of the norms. -/
theorem inner_eq_mul_norm_of_angle_eq_zero {x y : V} (h : angle x y = 0) : ⟪x, y⟫ = ‖x‖ * ‖y‖

(h : InnerProductGeometry.angle x y = 0)


theorem add_tprodCoeff' (z₁ z₂ : R) (f : Π i, s i) :
    tprodCoeff R z₁ f + tprodCoeff R z₂ f = tprodCoeff R (z₁ + z₂) f

{ι : Type u_1}
{R : Type u_4}
[CommSemiring R]
{s : ι → Type u_7}
[(i : ι) → AddCommMonoid (s i)]
[(i : ι) → Module R (s i)]
(z₁ z₂ : R)
(f : (i : ι) → s i)

PiTensorProduct.tprodCoeff R z₁ f + PiTensorProduct.tprodCoeff R z₂ f = PiTensorProduct.tprodCoeff R (z₁ + z₂) f


/-- This lemma is specifically designed to be used backwards, whence the specialisation to `Fin n`
as the indexing type doesn't matter in practice. The more general forward direction lemma here is
`Fintype.card_piFinset`. -/
lemma card_piFinset_const {α : Type*} (s : Finset α) (n : ℕ) :
    (piFinset fun _ : Fin n ↦ s).card = s.card ^ n

(Fintype.piFinset fun x => s).card = s.card ^ n


@[simp]
theorem domCongr_symm [AddCommMonoid M] (e : α ≃ β) :
    (Finsupp.domCongr e).symm = (Finsupp.domCongr e.symm : (β →₀ M) ≃+ (α →₀ M))

{α : Type u_1}
{β : Type u_2}
{M : Type u_5}
[AddCommMonoid M]
(e : α ≃ β)

(Finsupp.domCongr e).symm = Finsupp.domCongr e.symm


@[to_additive (attr := simp)]
theorem mk_mul_of_mem (a : α) (hb : b ∈ s) : (mk (a * b) : α ⧸ s) = mk a

{α : Type u_1}
[Group α]
{s : Subgroup α}
{b : α}
(a : α)
(hb : b ∈ s)


theorem lpTrimToLpMeas_ae_eq (hm : m ≤ m0) (f : Lp F p (μ.trim hm)) :
    lpTrimToLpMeas F 𝕜 p μ hm f =ᵐ[μ] f

(f : ↥(MeasureTheory.Lp F p (μ.trim hm)))

↑↑↑(MeasureTheory.lpTrimToLpMeas F 𝕜 p μ hm f) =ᵐ[μ] ↑↑f


@[simp]
theorem coe_refl : ⇑(refl : A₁ ≃ₐ[R] A₁) = id

{R : Type uR}
{A₁ : Type uA₁}
[CommSemiring R]
[Semiring A₁]
[Algebra R A₁]


theorem realPart_apply_coe (a : A) : (ℜ a : A) = (2 : ℝ)⁻¹ • (a + star a)

{A : Type u_1}
[AddCommGroup A]
[Module ℂ A]
[StarAddMonoid A]
[StarModule ℂ A]
(a : A)


theorem getVert_of_length_le {u v} (w : G.Walk u v) {i : ℕ} (hi : w.length ≤ i) :
    w.getVert i = v

{V : Type u}
{G : SimpleGraph V}
{u v : V}
(w : G.Walk u v)
{i : ℕ}
(hi : w.length ≤ i)


protected theorem Subsingleton.monotoneOn (h : s.Subsingleton) : MonotoneOn f s

{α : Type u}
{β : Type v}
{s : Set α}
[Preorder α]
[Preorder β]
(f : α → β)
(h : s.Subsingleton)


theorem take_succ (n : ℕ) (s : Stream' α) : take (succ n) s = head s::take n (tail s)

Stream'.take n.succ s = s.head :: Stream'.take n s.tail


@[deprecated (since := "2023-12-25")]
lemma maps_image_to (f : α → β) (g : γ → α) (s : Set γ) (t : Set β) :
    MapsTo f (g '' s) t ↔ MapsTo (f ∘ g) s t

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

Set.MapsTo f (g '' s) t ↔ Set.MapsTo (f ∘ g) s t


@[to_additive (attr := simp)]
lemma prod_map_erase [DecidableEq α] (f : α → M) {a} :
    ∀ {l : List α}, a ∈ l → f a * ((l.erase a).map f).prod = (l.map f).prod

{α : Type u_2}
{M : Type u_4}
[CommMonoid M]
[DecidableEq α]
(f : α → M)
{a : α}
{l : List α}

a ∈ l → f a * (List.map f (l.erase a)).prod = (List.map f l).prod


@[to_additive]
theorem image_smul_comm [DecidableEq β] [DecidableEq γ] [SMul α β] [SMul α γ] (f : β → γ) (a : α)
    (s : Finset β) : (∀ b, f (a • b) = a • f b) → (a • s).image f = a • s.image f

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

(∀ (b : β), f (a • b) = a • f b) → Finset.image f (a • s) = a • Finset.image f s


@[simp] lemma sub_apply {f g : E →WOT[𝕜] F} (x : E) : (f - g) x = f x - g x

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[RCLike 𝕜]
[AddCommGroup E]
[TopologicalSpace E]
[Module 𝕜 E]
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f g : E →WOT[𝕜]F}
(x : E)


theorem unique_single [Unique α] (x : α →₀ M) : x = single default (x default)

{α : Type u_1}
{M : Type u_5}
[Zero M]
[Unique α]
(x : α →₀ M)


/-- Constructor for a closure operator using the weaker idempotency axiom: `f (f x) ≤ f x`. -/
@[simps]
def mk' (f : α → α) (hf₁ : Monotone f) (hf₂ : ∀ x, x ≤ f x) (hf₃ : ∀ x, f (f x) ≤ f x) :
    ClosureOperator α

{α : Type u_1}
[PartialOrder α]
(f : α → α)
(hf₁ : Monotone f)
(hf₂ : ∀ (x : α), x ≤ f x)
(hf₃ : ∀ (x : α), f (f x) ≤ f x)
(x : α)

(ClosureOperator.mk' f hf₁ hf₂ hf₃).IsClosed x = (f x = x)


@[to_additive, field_simps]
theorem div_mul_eq_mul_div : a / b * c = a * c / b

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


@[simp]
theorem _root_.Polynomial.toLaurent_comp_C : toLaurent (R := R) ∘ Polynomial.C = C

⇑Polynomial.toLaurent ∘ ⇑Polynomial.C = ⇑LaurentPolynomial.C


/-- The Gamma function does not vanish on `ℂ` (except at non-positive integers, where the function
is mathematically undefined and we set it to `0` by convention). -/
theorem Gamma_ne_zero {s : ℂ} (hs : ∀ m : ℕ, s ≠ -m) : Gamma s ≠ 0


theorem cauchy_iff {F : Filter G} :
    @Cauchy G B.uniformSpace F ↔
      F.NeBot ∧ ∀ U ∈ B, ∃ M ∈ F, ∀ᵉ (x ∈ M) (y ∈ M), y - x ∈ U

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

Cauchy F ↔ F.NeBot ∧ ∀ U ∈ B, ∃ M ∈ F, ∀ x ∈ M, ∀ y ∈ M, y - x ∈ U


theorem max_choice (a b : α) : max a b = a ∨ max a b = b


theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ) :
    Supermartingale (-f) ℱ μ

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

(hf : MeasureTheory.Submartingale f ℱ μ)


theorem preservesMonomorphisms_of_adjunction {F : C ⥤ D} {G : D ⥤ C} (adj : F ⊣ G) :
    PreservesMonomorphisms G

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
{F : C ⥤ D}
{G : D ⥤ C}
(adj : F ⊣ G)


@[simp]
theorem compl_inf : (x ⊓ y)ᶜ = xᶜ ⊔ yᶜ

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


nonrec theorem HasStrictDerivAt.prod (hf₁ : HasStrictDerivAt f₁ f₁' x)
    (hf₂ : HasStrictDerivAt f₂ f₂' x) : HasStrictDerivAt (fun x => (f₁ x, f₂ x)) (f₁', f₂') x

{𝕜 : Type u}
[NontriviallyNormedField 𝕜]
{F : Type v}
[NormedAddCommGroup F]
[NormedSpace 𝕜 F]
{f₁ : 𝕜 → F}
{f₁' : F}
{x : 𝕜}
{G : Type w}
[NormedAddCommGroup G]
[NormedSpace 𝕜 G]
{f₂ : 𝕜 → G}
{f₂' : G}
(hf₁ : HasStrictDerivAt f₁ f₁' x)
(hf₂ : HasStrictDerivAt f₂ f₂' x)


/-- A commutative algebra is finitely generated if and only if it is a quotient
of a polynomial ring whose variables are indexed by a finset. -/
theorem iff_quotient_mvPolynomial :
    FiniteType R S ↔
      ∃ (s : Finset S) (f : MvPolynomial { x // x ∈ s } R →ₐ[R] S), Surjective f

{R : Type uR}
{S : Type uS}
[CommSemiring R]
[CommSemiring S]
[Algebra R S]

Algebra.FiniteType R S ↔ ∃ s f, Function.Surjective ⇑f


theorem Wrepr_equiv (x : q.P.W) : Wequiv (Wrepr x) x

{F : Type u → Type u}
[q : QPF F]
(x : (QPF.P F).W)


@[simp]
theorem cast_natAdd_zero {n n' : Nat} (i : Fin n) (h : 0 + n = n') :
    cast h (natAdd 0 i) = cast ((Nat.zero_add _).symm.trans h) i

Fin.cast h (Fin.natAdd 0 i) = Fin.cast ⋯ i


/-- A smooth (semi)ring is a topological (semi)ring. This is not an instance for technical reasons,
see note [Design choices about smooth algebraic structures]. -/
theorem topologicalSemiring_of_smooth [Semiring R] [SmoothRing I R] : TopologicalSemiring R

{𝕜 : Type u_1}
{R : Type u_2}
{E : Type u_3}
{H : Type u_4}
[TopologicalSpace R]
[TopologicalSpace H]
[NontriviallyNormedField 𝕜]
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
[ChartedSpace H R]
(I : ModelWithCorners 𝕜 E H)
[Semiring R]
[SmoothRing I R]


theorem one_div_neg_one_eq_neg_one : (1 : K) / -1 = -1

{K : Type u_3}
[DivisionMonoid K]
[HasDistribNeg K]


theorem val_mul_of_lt {n : ℕ} {a b : ZMod n} (h : a.val * b.val < n) :
    (a * b).val = a.val * b.val


theorem induction_on_adjoin_fg (P : IntermediateField F E → Prop) (base : P ⊥)
    (ih : ∀ (K : IntermediateField F E) (x : E), P K → P (K⟮x⟯.restrictScalars F))
    (K : IntermediateField F E) (hK : K.FG) : P K

(ih : ∀ (K : IntermediateField F E) (x : E), P K → P (IntermediateField.restrictScalars F (↥K)⟮x⟯))


@[simp] lemma multiplesAddHom_symm_apply (f : ℕ →+ β) : (multiplesAddHom β).symm f = f 1

(β : Type u_2)
[AddCommMonoid β]
(f : ℕ →+ β)


theorem smul_algebra_smul_comm (r : R) (a : A) (m : M) : a • r • m = r • a • m

{R : Type u_1}
[CommSemiring R]
{A : Type u_2}
[Semiring A]
[Algebra R A]
{M : Type u_3}
[AddCommMonoid M]
[Module A M]
[Module R M]
[IsScalarTower R A M]
(r : R)
(a : A)
(m : M)


/-- Any two countable dense, nonempty linear orders without endpoints are order isomorphic. -/
theorem iso_of_countable_dense [Countable α] [DenselyOrdered α] [NoMinOrder α] [NoMaxOrder α]
    [Nonempty α] [Countable β] [DenselyOrdered β] [NoMinOrder β] [NoMaxOrder β] [Nonempty β] :
    Nonempty (α ≃o β)

(α : Type u_1)
(β : Type u_2)
[LinearOrder α]
[LinearOrder β]
[Countable α]
[DenselyOrdered α]
[NoMinOrder α]
[NoMaxOrder α]
[Nonempty α]
[Countable β]
[DenselyOrdered β]
[NoMinOrder β]
[NoMaxOrder β]
[Nonempty β]


theorem wordProd_surjective : Surjective cs.wordProd

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


@[to_additive] -- Porting note (#10618): `simp` can prove it
theorem mem_ball_one_iff : a ∈ ball (1 : E) r ↔ ‖a‖ < r

{E : Type u_6}
[SeminormedAddGroup E]
{a : E}
{r : ℝ}


@[simp]
theorem comp_id (f : HeytingHom α β) : f.comp (HeytingHom.id α) = f

{α : Type u_2}
{β : Type u_3}
[HeytingAlgebra α]
[HeytingAlgebra β]
(f : HeytingHom α β)


@[simp]
theorem zpow_le_iff_le (hx : 1 < a) : a ^ m ≤ a ^ n ↔ m ≤ n

{α : Type u_1}
[LinearOrderedSemifield α]
{a : α}
{m n : ℤ}
(hx : 1 < a)


@[to_additive max_add_add_le_max_add_max]
theorem max_mul_mul_le_max_mul_max' : max (a * b) (c * d) ≤ max a c * max b d

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

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


/-- The forward direction of a homeomorphism, as a bundled continuous map. -/
@[simps]
def toContinuousMap (e : α ≃ₜ β) : C(α, β)

{α : Type u_1}
{β : Type u_2}
[TopologicalSpace α]
[TopologicalSpace β]
(e : α ≃ₜ β)
(a : α)


theorem card_Ioi : (Ioi a).card = (∏ i, (Ici (a i)).card) - 1

{ι : Type u_1}
{α : ι → Type u_2}
[Fintype ι]
[DecidableEq ι]
[(i : ι) → DecidableEq (α i)]
[(i : ι) → PartialOrder (α i)]
[(i : ι) → LocallyFiniteOrderTop (α i)]
(a : (i : ι) → α i)

(Finset.Ioi a).card = ∏ i : ι, (Finset.Ici (a i)).card - 1


@[simp]
theorem ofLE_comp_map (cond : LEComap f A B) (h : B ≤ B') :
    ofLE h ∘ map f cond = map f (cond.mono le_rfl h)

{X : Type u_2}
{Y : Type u_3}
[TopologicalSpace X]
[TopologicalSpace Y]
{f : C(X, Y)}
{A : DiscreteQuotient X}
{B B' : DiscreteQuotient Y}
(cond : DiscreteQuotient.LEComap f A B)
(h : B ≤ B')

DiscreteQuotient.ofLE h ∘ DiscreteQuotient.map f cond = DiscreteQuotient.map f ⋯


@[simp]
theorem cons_zero_zero : cons 0 (0 : Fin n →₀ M) = 0


@[simp]
theorem erase_single {a : α} {b : M} : erase a (single a b) = 0

{α : Type u_1}
{M : Type u_5}
[Zero M]
{a : α}
{b : M}

Finsupp.erase a (Finsupp.single a b) = 0


protected lemma le_of_eq (hab : a = b) : a ≤ b


lemma chainLength_of_isZero (hα : α.IsZero) : chainLength α β = 0

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

LieAlgebra.IsKilling.chainLength α β = 0


@[to_additive prod_mono_right]
theorem prod_mono_right (K : Subgroup G) : Monotone fun t : Subgroup N => K.prod t

{G : Type u_1}
[Group G]
{N : Type u_5}
[Group N]
(K : Subgroup G)


@[simp, reassoc]
theorem t'_snd_snd (i j k : 𝒰.J) :
    t' 𝒰 f g i j k ≫ pullback.snd _ _ ≫ pullback.snd _ _ =
      pullback.fst _ _ ≫ pullback.fst _ _ ≫ pullback.fst _ _

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

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


theorem Duplicate.mem (h : x ∈+ l) : x ∈ l

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


nonrec theorem _root_.Set.RightInvOn.filter_map_Iic {f : α → β} {g : β → α}
    (hfg : RightInvOn g f t) : RightInvOn (map g) (map f) (Iic <| 𝓟 t)

{α : Type u}
{β : Type v}
{t : Set β}
{f : α → β}
{g : β → α}
(hfg : Set.RightInvOn g f t)

Set.RightInvOn (Filter.map g) (Filter.map f) (Set.Iic (𝓟 t))


/-- A solution with `x > 1` must have `y ≠ 0`. -/
theorem y_ne_zero_of_one_lt_x {a : Solution₁ d} (ha : 1 < a.x) : a.y ≠ 0

{d : ℤ}
{a : Pell.Solution₁ d}
(ha : 1 < a.x)


/-- Conjugate a map `f : α → α` by an equivalence `α ≃ β`. -/
@[simps! apply] def conj (e : α ≃ β) : (α → α) ≃ (β → β)

{α : Sort u}
{β : Sort v}
(e : α ≃ β)
(f : α → α)

∀ (a : β), e.conj f a = e (f (e.symm a))


/-- `if ... then ... else` characterization of an indexed set of vectors being orthonormal.  (Inner
product equals Kronecker delta.) -/
theorem orthonormal_iff_ite [DecidableEq ι] {v : ι → E} :
    Orthonormal 𝕜 v ↔ ∀ i j, ⟪v i, v j⟫ = if i = j then (1 : 𝕜) else (0 : 𝕜)

{𝕜 : Type u_1}
{E : Type u_2}
[RCLike 𝕜]
[NormedAddCommGroup E]
[InnerProductSpace 𝕜 E]
{ι : Type u_4}
[DecidableEq ι]
{v : ι → E}

Orthonormal 𝕜 v ↔ ∀ (i j : ι), ⟪v i, v j⟫_𝕜 = if i = j then 1 else 0


lemma iInter₂_congr {s t : ∀ i, κ i → Set α} (h : ∀ i j, s i j = t i j) :
    ⋂ (i) (j), s i j = ⋂ (i) (j), t i j

(h : ∀ (i : ι) (j : κ i), s i j = t i j)


theorem basisFun_toBasis : (basisFun ι 𝕜).toBasis = PiLp.basisFun _ 𝕜 ι

(ι : Type u_1)
(𝕜 : Type u_3)
[RCLike 𝕜]
[Fintype ι]

(EuclideanSpace.basisFun ι 𝕜).toBasis = PiLp.basisFun 2 𝕜 ι


@[simp]
theorem default_def : (default : M₁ →SL[σ₁₂] M₂) = 0

{R₁ : Type u_1}
{R₂ : Type u_2}
[Semiring R₁]
[Semiring R₂]
{σ₁₂ : R₁ →+* R₂}
{M₁ : Type u_4}
[TopologicalSpace M₁]
[AddCommMonoid M₁]
{M₂ : Type u_6}
[TopologicalSpace M₂]
[AddCommMonoid M₂]
[Module R₁ M₁]
[Module R₂ M₂]


@[simp, norm_cast]
theorem coe_sub' (f g : M →SL[σ₁₂] M₂) : ⇑(f - g) = f - g

{R : Type u_1}
[Ring R]
{R₂ : Type u_2}
[Ring R₂]
{M : Type u_4}
[TopologicalSpace M]
[AddCommGroup M]
{M₂ : Type u_5}
[TopologicalSpace M₂]
[AddCommGroup M₂]
[Module R M]
[Module R₂ M₂]
{σ₁₂ : R →+* R₂}
[TopologicalAddGroup M₂]
(f g : M →SL[σ₁₂] M₂)


@[simp]
lemma variableChange_j : (E.variableChange C).j = E.j

{R : Type u}
[CommRing R]
(E : EllipticCurve R)
(C : WeierstrassCurve.VariableChange R)


theorem IsGreatest.unique (Ha : IsGreatest s a) (Hb : IsGreatest s b) : a = b

{α : Type u}
[PartialOrder α]
{s : Set α}
{a b : α}
(Ha : IsGreatest s a)
(Hb : IsGreatest s b)


theorem rank_le_index_mul_rank [hG : Group.FG G] [FiniteIndex H] :
    Group.rank H ≤ H.index * Group.rank G

{G : Type u_1}
[Group G]
(H : Subgroup G)
[hG : Group.FG G]
[H.FiniteIndex]


@[to_additive (attr := measurability)]
theorem _root_.Multiset.aestronglyMeasurable_prod' (l : Multiset (α → M))
    (hl : ∀ f ∈ l, AEStronglyMeasurable f μ) : AEStronglyMeasurable l.prod μ

(hl : ∀ f ∈ l, MeasureTheory.AEStronglyMeasurable f μ)


/-- **Helly's theorem** for finite families of convex sets in its classical form.

If `F` is a family of `n` convex sets in a vector space of finite dimension `d`, with `n ≥ d + 1`,
and any `d + 1` sets of `F` intersect nontrivially, then all sets of `F` intersect nontrivially. -/
theorem helly_theorem {F : ι → Set E} {s : Finset ι}
    (h_card : finrank 𝕜 E + 1 ≤ s.card)
    (h_convex : ∀ i ∈ s, Convex 𝕜 (F i))
    (h_inter : ∀ I ⊆ s, I.card = finrank 𝕜 E + 1 → (⋂ i ∈ I, F i).Nonempty) :
    (⋂ i ∈ s, F i).Nonempty

(h_card : FiniteDimensional.finrank 𝕜 E + 1 ≤ s.card)

(h_inter : ∀ I ⊆ s, I.card = FiniteDimensional.finrank 𝕜 E + 1 → (⋂ i ∈ I, F i).Nonempty)


theorem ofSigmaCofork_ι_app_right (c : Cofork I.fstSigmaMap I.sndSigmaMap) (b) :
    (ofSigmaCofork I c).ι.app (WalkingMultispan.right b) = (Sigma.ι I.right b : _) ≫ c.π

(I : CategoryTheory.Limits.MultispanIndex C)

(c : CategoryTheory.Limits.Cofork I.fstSigmaMap I.sndSigmaMap)

(CategoryTheory.Limits.Multicofork.ofSigmaCofork I c).ι.app (CategoryTheory.Limits.WalkingMultispan.right b) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.Limits.Sigma.ι I.right b) c.π


/-- Universe lift functor for commutative groups. -/
@[to_additive (attr := simps)
  "Universe lift functor for additive commutative groups."]
def uliftFunctor : CommGrp.{u} ⥤ CommGrp.{max u v}

CommGrp.uliftFunctor.map f =
  CommGrp.ofHom (MulEquiv.ulift.symm.toMonoidHom.comp (MonoidHom.comp f MulEquiv.ulift.toMonoidHom))


@[to_additive (attr := elab_as_elim)]
theorem closure_induction_left {s : Set M} {p : (m : M) → m ∈ closure s → Prop}
    (one : p 1 (one_mem _))
    (mul_left : ∀ x (hx : x ∈ s), ∀ (y) hy, p y hy → p (x * y) (mul_mem (subset_closure hx) hy))
    {x : M} (h : x ∈ closure s) :
    p x h

{p : (m : M) → m ∈ Submonoid.closure s → Prop}

(mul_left : ∀ (x : M) (hx : x ∈ s) (y : M) (hy : y ∈ Submonoid.closure s), p y hy → p (x * y) ⋯)


theorem contains (c) : ∀ {s}, Valid s → (s.contains c ↔ c ∈ s.toString.1)

s.Valid → (s.contains c = true ↔ c ∈ s.toString.data)


/-- An `AddLeftCancelSemigroup` is an additive semigroup such that
`a + b = a + c` implies `b = c`. -/
@[ext]
class AddLeftCancelSemigroup (G : Type u) extends AddSemigroup G where
  protected add_left_cancel : ∀ a b c : G, a + b = a + c → b = c

{G : Type u}
[self : AddLeftCancelSemigroup G]
(a b c : G)


theorem withDensity_tsum {ι : Type*} [Countable ι] {f : ι → α → ℝ≥0∞} (h : ∀ i, Measurable (f i)) :
    μ.withDensity (∑' n, f n) = sum fun n => μ.withDensity (f n)

{α : Type u_1}
{m0 : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{ι : Type u_2}
[Countable ι]
{f : ι → α → ℝ≥0∞}
(h : ∀ (i : ι), Measurable (f i))

μ.withDensity (∑' (n : ι), f n) = MeasureTheory.Measure.sum fun n => μ.withDensity (f n)


/-- If the `q i` are pairwise coprime, a `∏ i, q i`-torsion module is the internal direct sum of
its `q i`-torsion submodules. -/
theorem torsionBy_isInternal {q : ι → R} (hq : (S : Set ι).Pairwise <| (IsCoprime on q))
    (hM : Module.IsTorsionBy R M <| ∏ i ∈ S, q i) :
    DirectSum.IsInternal fun i : S => torsionBy R M <| q i

(hM : Module.IsTorsionBy R M (∏ i ∈ S, q i))

DirectSum.IsInternal fun i => Submodule.torsionBy R M (q ↑i)


theorem eventually_cocardinal_ne (x : α) : ∀ᶠ a in cocardinal α hreg, a ≠ x

{α : Type u}
{c : Cardinal.{u}}
{hreg : c.IsRegular}
(x : α)

∀ᶠ (a : α) in Filter.cocardinal α hreg, a ≠ x


/-- Given a short exact short complex `S : HomologicalComplex C c`, and degrees `i` and `j`
such that `c.Rel i j`, this is the snake diagram whose four lines are respectively
obtained by applying the functors `homologyFunctor C c i`, `opcyclesFunctor C c i`,
`cyclesFunctor C c j`, `homologyFunctor C c j` to `S`. Applying the snake lemma to this
gives the homology sequence of `S`. -/
@[simps]
noncomputable def snakeInput : ShortComplex.SnakeInput C

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

(HomologicalComplex.HomologySequence.snakeInput hS i j hij).v₀₁ =
  S.mapNatTrans (HomologicalComplex.natTransHomologyι C c i)


lemma setIntegral_density (hκν : fst κ ≤ ν) [IsFiniteKernel ν]
    (a : α) {s : Set β} (hs : MeasurableSet s) {A : Set γ} (hA : MeasurableSet A) :
    ∫ x in A, density κ ν a x s ∂(ν a) = (κ a (A ×ˢ s)).toReal

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

∫ (x : γ) in A, κ.density ν a x s ∂ν a = ((κ a) (A ×ˢ s)).toReal


@[simp]
theorem coe_toSubsemiring (S : StarSubsemiring R) : (S.toSubsemiring : Set R) = S

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


@[simp]
theorem BilinForm.toMatrix'_toBilin' (M : Matrix n n R₂) :
    BilinForm.toMatrix' (Matrix.toBilin' M) = M

{R₂ : Type u_5}
[CommSemiring R₂]
{n : Type u_11}
[Fintype n]
[DecidableEq n]
(M : Matrix n n R₂)

LinearMap.BilinForm.toMatrix' (Matrix.toBilin' M) = M


@[simp]
theorem eval₂_mul : ∀ {p}, (p * q).eval₂ f g = p.eval₂ f g * q.eval₂ f g

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

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


theorem filter_inter (s t : Finset α) : filter p s ∩ t = filter p (s ∩ t)

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

Finset.filter p s ∩ t = Finset.filter p (s ∩ t)


/-- We can upgrade `e.functor` to a monoidal functor from `C` to `D` with the transported structure.
-/
@[simps!]
def toTransported (e : C ≌ D) : MonoidalFunctor C (Transported e)

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.MonoidalCategory C]
{D : Type u₂}
[CategoryTheory.Category.{v₂, u₂} D]
(e : C ≌ D)

(CategoryTheory.Monoidal.toTransported e).toFunctor = e.functor


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

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


theorem getElem?_lt
    (a : Array α) {i : Nat} (h : i < a.size) : a[i]? = some (a[i])

{α : Type u_1}
(a : Array α)
{i : Nat}
(h : i < a.size)


@[simp] lemma lowerClosure_eq :
    ↑(lowerClosure s) = s ↔ IsLowerSet s


@[simp]
theorem toLin'_mul : toLin' (A * B) = (toLin' A).comp (toLin' B)

{n : Type u}
[DecidableEq n]
[Fintype n]
{α : Type v}
[CommRing α]
[StarRing α]
(A B : ↥(Matrix.unitaryGroup n α))

Matrix.UnitaryGroup.toLin' (A * B) = Matrix.UnitaryGroup.toLin' A ∘ₗ Matrix.UnitaryGroup.toLin' B


/-- The binary cofan whose point is `coprod F G`. -/
@[simps!]
def binaryCoproductCocone : BinaryCofan F G

(F G : CategoryTheory.Functor C (Type w))

∀ (x : CategoryTheory.Discrete CategoryTheory.Limits.WalkingPair),
  (CategoryTheory.FunctorToTypes.binaryCoproductCocone F G).ι.app x =
    match x.as with
    | CategoryTheory.Limits.WalkingPair.left => CategoryTheory.FunctorToTypes.coprod.inl
    | CategoryTheory.Limits.WalkingPair.right => CategoryTheory.FunctorToTypes.coprod.inr


/-- Create an isomorphism between arrows,
by providing isomorphisms between the domains and codomains,
and a proof that the square commutes. -/
@[simps!]
def isoMk {f g : Arrow T} (l : f.left ≅ g.left) (r : f.right ≅ g.right)
    (h : l.hom ≫ g.hom = f.hom ≫ r.hom := by aesop_cat) : f ≅ g

(h : CategoryTheory.CategoryStruct.comp l.hom g.hom = CategoryTheory.CategoryStruct.comp f.hom r.hom := by aesop_cat)

(CategoryTheory.Arrow.isoMk l r h).hom.left = l.hom


/-- The number of times an irreducible factor `p` appears in `normalizedFactors x` is defined by
the number of times it divides `x`. This is a slightly more general version of
`UniqueFactorizationMonoid.count_normalizedFactors_eq` that allows `p = 0`.

See also `multiplicity_eq_count_normalizedFactors` if `n` is given by `multiplicity p x`.
-/
theorem count_normalizedFactors_eq' [DecidableEq R] {p x : R} (hp : p = 0 ∨ Irreducible p)
    (hnorm : normalize p = p) {n : ℕ} (hle : p ^ n ∣ x) (hlt : ¬p ^ (n + 1) ∣ x) :
    (normalizedFactors x).count p = n

{R : Type u_2}
[CancelCommMonoidWithZero R]
[UniqueFactorizationMonoid R]
[NormalizationMonoid R]
[DecidableEq R]
{p x : R}
(hp : p = 0 ∨ Irreducible p)
(hnorm : normalize p = p)
{n : ℕ}
(hle : p ^ n ∣ x)
(hlt : ¬p ^ (n + 1) ∣ x)

Multiset.count p (UniqueFactorizationMonoid.normalizedFactors x) = n


theorem cond_decide_mod_two (x : ℕ) [d : Decidable (x % 2 = 1)] :
    cond (@decide (x % 2 = 1) d) 1 0 = x % 2

(bif decide (x % 2 = 1) then 1 else 0) = x % 2


theorem not_cutExpand_zero [IsIrrefl α r] (s) : ¬CutExpand r s 0

{α : Type u_1}
{r : α → α → Prop}
[IsIrrefl α r]
(s : Multiset α)


/-- Given an open cover `{ Zᵢ }` of `Z`, then `X ×[Z] Y` is covered by `Xᵢ ×[Zᵢ] Yᵢ`, where
  `Xᵢ = X ×[Z] Zᵢ` and `Yᵢ = Y ×[Z] Zᵢ` is the preimage of `Zᵢ` in `X` and `Y`. -/
@[simps! J obj map]
def openCoverOfBase (𝒰 : OpenCover Z) (f : X ⟶ Z) (g : Y ⟶ Z) : OpenCover (pullback f g)

{X Y Z : AlgebraicGeometry.Scheme}
(𝒰 : Z.OpenCover)
(f : X ⟶ Z)
(g : Y ⟶ Z)
(i : 𝒰.J)

(AlgebraicGeometry.Scheme.Pullback.openCoverOfBase 𝒰 f g).map i =
  CategoryTheory.Limits.pullback.map (CategoryTheory.Limits.pullback.snd f (𝒰.map i))
    (CategoryTheory.Limits.pullback.snd g (𝒰.map i)) f g (CategoryTheory.Limits.pullback.fst f (𝒰.map i))
    (CategoryTheory.Limits.pullback.fst g (𝒰.map i)) (𝒰.map i) ⋯ ⋯


/-- The special case of the first simplicial identity -/
@[reassoc]
theorem δ_comp_δ_self {n} {i : Fin (n + 2)} : δ i ≫ δ (Fin.castSucc i) = δ i ≫ δ i.succ

SimplexCategory.δ i ≫ SimplexCategory.δ i.castSucc = SimplexCategory.δ i ≫ SimplexCategory.δ i.succ


theorem geom_series_succ (x : R) (h : ‖x‖ < 1) : ∑' i : ℕ, x ^ (i + 1) = ∑' i : ℕ, x ^ i - 1

{R : Type u_4}
[NormedRing R]
[CompleteSpace R]
(x : R)
(h : ‖x‖ < 1)


/-- Given three points not equal to `p`, the angle between the first and the third at `p` minus
the angle between the second and the third equals the angle between the first and the second. -/
@[simp]
theorem oangle_sub_right {p p₁ p₂ p₃ : P} (hp₁ : p₁ ≠ p) (hp₂ : p₂ ≠ p) (hp₃ : p₃ ≠ p) :
    ∡ p₁ p p₃ - ∡ p₂ p p₃ = ∡ p₁ p p₂

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


theorem cardinal_iInter_mem {s : ι → Set α} (hic : #ι < c) :
    (⋂ i, s i) ∈ l ↔ ∀ i, s i ∈ l

{ι α : Type u}
{c : Cardinal.{u}}
{l : Filter α}
[CardinalInterFilter l c]
{s : ι → Set α}
(hic : #ι < c)


theorem unop_inf (S₁ S₂ : Subalgebra R Aᵐᵒᵖ) : (S₁ ⊓ S₂).unop = S₁.unop ⊓ S₂.unop

{R : Type u_2}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
(S₁ S₂ : Subalgebra R Aᵐᵒᵖ)


@[simp]
theorem Fork.app_zero_eq_ι (t : Fork f g) : t.π.app zero = t.ι

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

t.π.app CategoryTheory.Limits.WalkingParallelPair.zero = t.ι


lemma predAbove_left_monotone (i : Fin (n + 1)) : Monotone fun p ↦ predAbove p i


theorem Subset.trans {s₁ s₂ s₃ : Finset α} : s₁ ⊆ s₂ → s₂ ⊆ s₃ → s₁ ⊆ s₃

s₁ ⊆ s₂ → s₂ ⊆ s₃ → s₁ ⊆ s₃


@[to_additive (attr := ext)]
theorem CancelMonoid.ext {M : Type*} ⦃m₁ m₂ : CancelMonoid M⦄
    (h_mul : (letI := m₁; HMul.hMul : M → M → M) = (letI := m₂; HMul.hMul : M → M → M)) :
    m₁ = m₂

{M : Type u_1}
⦃m₁ m₂ : CancelMonoid M⦄
(h_mul : HMul.hMul = HMul.hMul)


theorem dense_iff {s : Set α} : Dense s ↔ ∀ x, ∀ r > 0, (ball x r ∩ s).Nonempty

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

Dense s ↔ ∀ (x : α), ∀ r > 0, (Metric.ball x r ∩ s).Nonempty


@[simp]
theorem extremePoints_empty : (∅ : Set E).extremePoints 𝕜 = ∅

{𝕜 : Type u_1}
{E : Type u_2}
[OrderedSemiring 𝕜]
[AddCommMonoid E]
[SMul 𝕜 E]


theorem lowerCentralSeries_antitone : Antitone (lowerCentralSeries G)


theorem fourierCoeffOn_eq_integral {a b : ℝ} (f : ℝ → E) (n : ℤ) (hab : a < b) :
    fourierCoeffOn hab f n =
      (1 / (b - a)) • ∫ x in a..b, fourier (-n) (x : AddCircle (b - a)) • f x

{E : Type}
[NormedAddCommGroup E]
[NormedSpace ℂ E]
{a b : ℝ}
(f : ℝ → E)
(n : ℤ)
(hab : a < b)

fourierCoeffOn hab f n = (1 / (b - a)) • ∫ (x : ℝ) in a..b, (fourier (-n)) ↑x • f x


private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P))

(IH : ∀ (Q : Ideal S), Q.IsMaximal → (algebraMap R (S ⧸ Q)).IsIntegral)


theorem integrable_withDensity_iff_integrable_coe_smul {f : α → ℝ≥0} (hf : Measurable f)
    {g : α → E} :
    Integrable g (μ.withDensity fun x => f x) ↔ Integrable (fun x => (f x : ℝ) • g x) μ

{α : Type u_1}
{m : MeasurableSpace α}
{μ : MeasureTheory.Measure α}
{E : Type u_5}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{f : α → ℝ≥0}
(hf : Measurable f)
{g : α → E}

MeasureTheory.Integrable g (μ.withDensity fun x => ↑(f x)) ↔ MeasureTheory.Integrable (fun x => ↑(f x) • g x) μ


theorem tan_lt_tan_of_nonneg_of_lt_pi_div_two {x y : ℝ} (hx₁ : 0 ≤ x) (hy₂ : y < π / 2)
    (hxy : x < y) : tan x < tan y

{x y : ℝ}
(hx₁ : 0 ≤ x)
(hy₂ : y < Real.pi / 2)
(hxy : x < y)


theorem range_mem_map : range m ∈ map m f

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


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

{α : Type u_1}
[LE α]
{a : α}
(h : IsTop a)


theorem norm_p_pow (n : ℕ) : ‖(p : ℤ_[p]) ^ n‖ = (p : ℝ) ^ (-n : ℤ)


/-- A polynomial has zero separable degree if and only if it is constant. -/
theorem natSepDegree_eq_zero_iff : f.natSepDegree = 0 ↔ f.natDegree = 0


@[simp]
theorem inf'_lt_iff : s.inf' H f < a ↔ ∃ i ∈ s, f i < a

{α : Type u_2}
{ι : Type u_5}
[LinearOrder α]
{s : Finset ι}
(H : s.Nonempty)
{f : ι → α}
{a : α}


lemma image_compl (h : X ≃ₜ Y) (s : Set X) : h '' (sᶜ) = (h '' s)ᶜ

{X : Type u_1}
{Y : Type u_2}
[TopologicalSpace X]
[TopologicalSpace Y]
(h : X ≃ₜ Y)
(s : Set X)


/-- If the vector field `v` vanishes at `x₀`, then the constant curve at `x₀`
is a global integral curve of `v`. -/
lemma isIntegralCurve_const {x : M} (h : v x = 0) : IsIntegralCurve (fun _ ↦ x) v

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


/-- The mates equivalence commutes with this composition, essentially by `mateEquiv_vcomp`. -/
theorem mateEquiv_conjugateEquiv_vcomp
    (α : G ⋙ L₂ ⟶ L₁ ⋙ H) (β : L₃ ⟶ L₂) :
    (mateEquiv adj₁ adj₃) (leftAdjointSquareConjugate.vcomp α β) =
      rightAdjointSquareConjugate.vcomp (mateEquiv adj₁ adj₂ α) (conjugateEquiv adj₂ adj₃ β)

{A : Type u₁}
{B : Type u₂}
{C : Type u₃}
{D : Type u₄}
[CategoryTheory.Category.{v₁, u₁} A]
[CategoryTheory.Category.{v₂, u₂} B]
[CategoryTheory.Category.{v₃, u₃} C]
[CategoryTheory.Category.{v₄, u₄} D]
{G : CategoryTheory.Functor A C}
{H : CategoryTheory.Functor B D}
{L₁ : CategoryTheory.Functor A B}
{R₁ : CategoryTheory.Functor B A}
{L₂ : CategoryTheory.Functor C D}
{R₂ : CategoryTheory.Functor D C}
{L₃ : CategoryTheory.Functor C D}
{R₃ : CategoryTheory.Functor D C}
(adj₁ : L₁ ⊣ R₁)
(adj₂ : L₂ ⊣ R₂)
(adj₃ : L₃ ⊣ R₃)
(α : G.comp L₂ ⟶ L₁.comp H)
(β : L₃ ⟶ L₂)

(CategoryTheory.mateEquiv adj₁ adj₃) (CategoryTheory.leftAdjointSquareConjugate.vcomp α β) =
  CategoryTheory.rightAdjointSquareConjugate.vcomp ((CategoryTheory.mateEquiv adj₁ adj₂) α)
    ((CategoryTheory.conjugateEquiv adj₂ adj₃) β)


@[to_additive]
theorem prod_comm {s : Finset γ} {t : Finset α} {f : γ → α → β} :
    (∏ x ∈ s, ∏ y ∈ t, f x y) = ∏ y ∈ t, ∏ x ∈ s, f x y

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

∑ x ∈ s, ∑ y ∈ t, f x y = ∑ y ∈ t, ∑ x ∈ s, f x y


theorem LinearMap.rank_le_of_surjective (f : M →ₗ[R] M₁) (h : Surjective f) :
    Module.rank R M₁ ≤ Module.rank R M

{R : Type u}
{M M₁ : Type v}
[Ring R]
[AddCommGroup M]
[AddCommGroup M₁]
[Module R M]
[Module R M₁]
(f : M →ₗ[R] M₁)
(h : Function.Surjective ⇑f)


/-- If `𝒪` satisfies `v.integers 𝒪` where `v` is a valuation on a field, then `𝒪`
is a valuation ring. -/
theorem of_integers : ValuationRing 𝒪

{𝒪 : Type u}
{K : Type v}
{Γ : Type w}
[CommRing 𝒪]
[IsDomain 𝒪]
[Field K]
[Algebra 𝒪 K]
[LinearOrderedCommGroupWithZero Γ]
(v : Valuation K Γ)
(hh : v.Integers 𝒪)


/--
A typeclass describing the property that explicit pullbacks along inclusion maps into disjoint
unions is stable under the property `P`.
-/
class HasExplicitPullbacksOfInclusions [HasExplicitFiniteCoproducts.{0} P] : Prop where
  hasProp : ∀ {X Y Z : CompHausLike P} (f : Z ⟶ X ⨿ Y), HasExplicitPullback coprod.inl f

[self : CompHausLike.HasExplicitPullbacksOfInclusions P]


theorem inner_le_Lp_mul_Lq_tsum' {f g : ι → ℝ≥0} {p q : ℝ} (hpq : p.IsConjExponent q)
    (hf : Summable fun i => f i ^ p) (hg : Summable fun i => g i ^ q) :
    ∑' i, f i * g i ≤ (∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q)

{ι : Type u}
{f g : ι → ℝ≥0}
{p q : ℝ}
(hpq : p.IsConjExponent q)
(hf : Summable fun i => f i ^ p)
(hg : Summable fun i => g i ^ q)


@[to_additive]
theorem smul_le_smul_right : f₁ ≤ f₂ → f₁ • g ≤ f₂ • g

{α : Type u_2}
{β : Type u_3}
[VAdd α β]
{f₁ f₂ : Filter α}
{g : Filter β}

f₁ ≤ f₂ → f₁ +ᵥ g ≤ f₂ +ᵥ g


@[simp]
theorem Gamma_mem (N : ℕ) (γ : SL(2, ℤ)) : γ ∈ Gamma N ↔ ((↑ₘγ 0 0 : ℤ) : ZMod N) = 1 ∧
    ((↑ₘγ 0 1 : ℤ) : ZMod N) = 0 ∧ ((↑ₘγ 1 0 : ℤ) : ZMod N) = 0 ∧ ((↑ₘγ 1 1 : ℤ) : ZMod N) = 1

γ ∈ CongruenceSubgroup.Gamma N ↔ ↑(↑γ 0 0) = 1 ∧ ↑(↑γ 0 1) = 0 ∧ ↑(↑γ 1 0) = 0 ∧ ↑(↑γ 1 1) = 1


theorem Fmla.subsumes_self (f : Fmla) : f.subsumes f


/-- Equality of linear maps out of an adic completion can be checked on Cauchy sequences. -/
@[ext]
theorem map_ext'' {f g : AdicCompletion I M →ₗ[R] N}
    (h : f.comp (AdicCompletion.mk I M) = g.comp (AdicCompletion.mk I M)) :
    f = g

(h : f ∘ₗ AdicCompletion.mk I M = g ∘ₗ AdicCompletion.mk I M)


@[simp]
theorem mkDerivation_X (f : σ → A) (i : σ) : mkDerivation R f (X i) = f i

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

(MvPolynomial.mkDerivation R f) (MvPolynomial.X i) = f i


/-- See also `Irreducible.isRelPrime_iff_not_dvd`. -/
theorem Irreducible.coprime_iff_not_dvd {p n : R} (hp : Irreducible p) :
    IsCoprime p n ↔ ¬p ∣ n

{R : Type u}
[CommRing R]
[IsBezout R]
{p n : R}
(hp : Irreducible p)


theorem append_eq_append : List.append l₁ l₂ = l₁ ++ l₂

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.append l₂ = l₁ ++ l₂


theorem sum_nat_mod (s : Multiset ℕ) (n : ℕ) : s.sum % n = (s.map (· % n)).sum % n

s.sum % n = (Multiset.map (fun x => x % n) s).sum % n


theorem scaleRoots_aeval_eq_zero [Algebra R A] {p : R[X]} {a : A} {r : R} (ha : aeval a p = 0) :
    aeval (algebraMap R A r * a) (scaleRoots p r) = 0

{R : Type u_1}
{A : Type u_3}
[CommSemiring R]
[Semiring A]
[Algebra R A]
{p : Polynomial R}
{a : A}
{r : R}
(ha : (Polynomial.aeval a) p = 0)

(Polynomial.aeval ((algebraMap R A) r * a)) (p.scaleRoots r) = 0


@[simp]
theorem comap_coeSubmodule :
    (LieSubmodule.toSubmodule (comap f J)) = (LieSubmodule.toSubmodule J).comap (f : L →ₗ[R] L')

{R : Type u}
{L : Type v}
{L' : Type w₂}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
[LieRing L']
[LieAlgebra R L']
(f : L →ₗ⁅R⁆ L')
(J : LieIdeal R L')

↑(LieIdeal.comap f J) = Submodule.comap ↑f ↑J


theorem vector_head {n} : Computable (@Vector.head α n)


theorem le_mk_of_comm {B A : C} {X : Subobject B} {f : A ⟶ B} [Mono f] (g : (X : C) ⟶ A)
    (w : g ≫ f = X.arrow) : X ≤ mk f

(g : CategoryTheory.Subobject.underlying.obj X ⟶ A)

(w : CategoryTheory.CategoryStruct.comp g f = X.arrow)


theorem norm_one : norm (1 : PadicSeq p) = 1


lemma isLocallySurjective_of_whisker (hH : CoverPreserving J K H)
    [H.IsCoverDense K] [IsLocallySurjective J (whiskerLeft H.op f)] : IsLocallySurjective K f

(J : CategoryTheory.GrothendieckTopology C)

(K : CategoryTheory.GrothendieckTopology D)

(hH : CategoryTheory.CoverPreserving J K H)

[CategoryTheory.Presheaf.IsLocallySurjective J (CategoryTheory.whiskerLeft H.op f)]


theorem union_sdiff_right (s t : Finset α) : (s ∪ t) \ t = s \ t

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


theorem map_congr [Functor m] {x : m α} {f g : α → β} (h : ∀ a, f a = g a) : (f <$> x : m β) = g <$> x

{m : Type u_1 → Type u_2}
{α β : Type u_1}
[Functor m]
{x : m α}
{f g : α → β}
(h : ∀ (a : α), f a = g a)


/-- A category with pullbacks and a small detecting set is well-powered. -/
theorem wellPowered_of_isDetecting [HasPullbacks C] {𝒢 : Set C} [Small.{v₁} 𝒢]
    (h𝒢 : IsDetecting 𝒢) : WellPowered C

{C : Type u₁}
[CategoryTheory.Category.{v₁, u₁} C]
[CategoryTheory.Limits.HasPullbacks C]
{𝒢 : Set C}
[Small.{v₁, u₁} ↑𝒢]
(h𝒢 : CategoryTheory.IsDetecting 𝒢)


lemma card_filter_piFinset_const_eq_of_mem (s : Finset κ) (i : ι) {x : κ} (hx : x ∈ s) :
    ((piFinset fun _ ↦ s).filter fun f ↦ f i = x).card = s.card ^ (card ι - 1)

{ι : Type u_4}
{κ : Type u_5}
[DecidableEq ι]
[DecidableEq κ]
[Fintype ι]
(s : Finset κ)
(i : ι)
{x : κ}
(hx : x ∈ s)

(Finset.filter (fun f => f i = x) (Fintype.piFinset fun x => s)).card = s.card ^ (Fintype.card ι - 1)


@[to_additive (attr := simp)]
lemma inv_univ [Fintype α] : (univ : Finset α)⁻¹ = univ

{α : Type u_2}
[DecidableEq α]
[InvolutiveInv α]
[Fintype α]


/-- The limit of a diagram `F : J ⥤ K ⥤ C` is isomorphic to the functor given by
the individual limits on objects. -/
@[simps!]
def limitIsoFlipCompLim [HasLimitsOfShape J C] (F : J ⥤ K ⥤ C) : limit F ≅ F.flip ⋙ lim

(CategoryTheory.Limits.limitIsoFlipCompLim F).inv.app X = (CategoryTheory.Limits.limitObjIsoLimitCompEvaluation F X).inv


theorem toNonAssocSemiring_injective :
    Function.Injective (@toNonAssocSemiring R)


theorem Injective.of_comp_right {g : γ → α} (I : Injective (f ∘ g)) (hg : Surjective g) :
    Injective f

{α : Sort u_1}
{β : Sort u_2}
{γ : Sort u_3}
{f : α → β}
{g : γ → α}
(I : Function.Injective (f ∘ g))
(hg : Function.Surjective g)


@[to_additive]
lemma orbitRel.quotient_eq_of_quotient_subgroup_eq' {H : Subgroup G} {a b : α}
    (h : (Quotient.mk'' a : orbitRel.Quotient H α) = Quotient.mk'' b) :
    (Quotient.mk'' a : orbitRel.Quotient G α) = Quotient.mk'' b

{G : Type u_1}
{α : Type u_2}
[Group G]
[MulAction G α]
{H : Subgroup G}
{a b : α}
(h : Quotient.mk'' a = Quotient.mk'' b)


@[to_additive]
theorem IsCyclic.of_exponent_eq_card [CommGroup α] [Fintype α] (h : exponent α = Fintype.card α) :
    IsCyclic α

(h : Monoid.exponent α = Fintype.card α)


/-- The map of a Gaussian distribution by addition of a constant is a Gaussian. -/
lemma gaussianReal_map_add_const (y : ℝ) :
    (gaussianReal μ v).map (· + y) = gaussianReal (μ + y) v

MeasureTheory.Measure.map (fun x => x + y) (ProbabilityTheory.gaussianReal μ v) =
  ProbabilityTheory.gaussianReal (μ + y) v


theorem IsConnected.isPreconnected {s : Set α} (h : IsConnected s) : IsPreconnected s

{α : Type u}
[TopologicalSpace α]
{s : Set α}
(h : IsConnected s)


/-- The functor `Sigma.map` applied to a composition is a composition of functors. -/
@[simps!]
def mapComp (f : K → J) (g : J → I) : map (fun x ↦ C (g x)) f ⋙ (map C g : _) ≅ map C (g ∘ f)

[(i : I) → CategoryTheory.Category.{v₁, u₁} (C i)]

(CategoryTheory.Sigma.mapComp C f g).hom.app X = CategoryTheory.CategoryStruct.id ⟨g (f X.fst), X.snd⟩


lemma inter_indicator_one : (s ∩ t).indicator (1 : ι → M₀) = s.indicator 1 * t.indicator 1

{ι : Type u_1}
{M₀ : Type u_4}
[MulZeroOneClass M₀]
{s t : Set ι}

(s ∩ t).indicator 1 = s.indicator 1 * t.indicator 1


@[simp]
theorem preimage_const_add_Ici : (fun x => a + x) ⁻¹' Ici b = Ici (b - a)

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

(fun x => a + x) ⁻¹' Set.Ici b = Set.Ici (b - a)


@[simp]
theorem lift_comp : (lift hg).comp (algebraMap R S) = g

{R : Type u_1}
[CommSemiring R]
{M : Submonoid R}
{S : Type u_2}
[CommSemiring S]
[Algebra R S]
{P : Type u_3}
[CommSemiring P]
[IsLocalization M S]
{g : R →+* P}
(hg : ∀ (y : ↥M), IsUnit (g ↑y))

(IsLocalization.lift hg).comp (algebraMap R S) = g


protected theorem sub {B₁ B₂ : BilinForm R₁ M₁} (hB₁ : B₁.IsAlt) (hB₂ : B₂.IsAlt) :
    (B₁ - B₂).IsAlt

{R₁ : Type u_3}
{M₁ : Type u_4}
[CommRing R₁]
[AddCommGroup M₁]
[Module R₁ M₁]
{B₁ B₂ : LinearMap.BilinForm R₁ M₁}
(hB₁ : B₁.IsAlt)
(hB₂ : B₂.IsAlt)


@[to_additive]
theorem finprod_eq_finset_prod_of_mulSupport_subset (f : α → M) {s : Finset α}
    (h : mulSupport f ⊆ (s : Set α)) : ∏ᶠ i, f i = ∏ i ∈ s, f i

{α : Type u_1}
{M : Type u_5}
[CommMonoid M]
(f : α → M)
{s : Finset α}
(h : Function.mulSupport f ⊆ ↑s)


lemma exists_walk_of_edist_eq_coe {k : ℕ} (h : G.edist u v = k) :
    ∃ p : G.Walk u v, p.length = k

{V : Type u_1}
{G : SimpleGraph V}
{u v : V}
{k : ℕ}
(h : G.edist u v = ↑k)


@[simp]
theorem multichoose_one_right' (r : R) : multichoose r 1 = r ^ 1

{R : Type u_1}
[AddCommMonoid R]
[Pow R ℕ]
[BinomialRing R]
(r : R)


lemma BddBelow.smul_of_nonpos (ha : a ≤ 0) (hs : BddBelow s) : BddAbove (a • s)

{α : Type u_1}
{β : Type u_2}
[OrderedRing α]
[OrderedAddCommGroup β]
[Module α β]
[PosSMulMono α β]
{s : Set β}
{a : α}
(ha : a ≤ 0)
(hs : BddBelow s)


theorem prod_lipschitzWith_equiv [PseudoEMetricSpace α] [PseudoEMetricSpace β] :
    LipschitzWith 1 (WithLp.equiv p (α × β))

(p : ℝ≥0∞)
(α : Type u_2)
(β : Type u_3)
[hp : Fact (1 ≤ p)]
[PseudoEMetricSpace α]
[PseudoEMetricSpace β]

LipschitzWith 1 ⇑(WithLp.equiv p (α × β))


@[ext]
theorem gradedMonoid_eq_of_cast {a b : GradedMonoid fun n => ⨂[R] _ : Fin n, M} (h : a.fst = b.fst)
    (h2 : cast R M h a.snd = b.snd) : a = b

{a b : GradedMonoid fun n => ⨂[R] (x : Fin n), M}

(h2 : (TensorPower.cast R M h) a.snd = b.snd)


@[to_additive]
theorem pairwise_aedisjoint_of_aedisjoint_forall_ne_one {G α : Type*} [Group G] [MulAction G α]
    [MeasurableSpace α] {μ : Measure α} {s : Set α}
    (h_ae_disjoint : ∀ g ≠ (1 : G), AEDisjoint μ (g • s) s)
    (h_qmp : ∀ g : G, QuasiMeasurePreserving (g • ·) μ μ) :
    Pairwise (AEDisjoint μ on fun g : G => g • s)

(h_ae_disjoint : ∀ (g : G), g ≠ 1 → MeasureTheory.AEDisjoint μ (g • s) s)

(h_qmp : ∀ (g : G), MeasureTheory.Measure.QuasiMeasurePreserving (fun x => g • x) μ μ)

Pairwise (MeasureTheory.AEDisjoint μ on fun g => g • s)


theorem orderedInsert_count [DecidableEq α] (L : List α) (a b : α) :
    count a (L.orderedInsert r b) = count a L + if a = b then 1 else 0

{α : Type u}
(r : α → α → Prop)
[DecidableRel r]
[DecidableEq α]
(L : List α)
(a b : α)

List.count a (List.orderedInsert r b L) = List.count a L + if a = b then 1 else 0


@[simp]
theorem map_Ioi (f : α ≃o β) (a : α) : map f (Ioi a) = Ioi (f a)

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
(f : α ≃o β)
(a : α)

(UpperSet.map f) (UpperSet.Ioi a) = UpperSet.Ioi (f a)


@[to_additive le_prod_iff]
theorem le_prod_iff {s : Subsemigroup M} {t : Subsemigroup N} {u : Subsemigroup (M × N)} :
    u ≤ s.prod t ↔ u.map (fst M N) ≤ s ∧ u.map (snd M N) ≤ t

{M : Type u_1}
{N : Type u_2}
[Mul M]
[Mul N]
{s : Subsemigroup M}
{t : Subsemigroup N}
{u : Subsemigroup (M × N)}

u ≤ s.prod t ↔ Subsemigroup.map (MulHom.fst M N) u ≤ s ∧ Subsemigroup.map (MulHom.snd M N) u ≤ t


/-- The image of the normalizer is equal to the normalizer of the image of a bijective
  function. -/
@[to_additive
      "The image of the normalizer is equal to the normalizer of the image of a bijective
        function."]
theorem map_normalizer_eq_of_bijective (H : Subgroup G) {f : G →* N} (hf : Function.Bijective f) :
    H.normalizer.map f = (H.map f).normalizer

{G : Type u_1}
[AddGroup G]
{N : Type u_5}
[AddGroup N]
(H : AddSubgroup G)
{f : G →+ N}
(hf : Function.Bijective ⇑f)

AddSubgroup.map f H.normalizer = (AddSubgroup.map f H).normalizer


theorem int_not_isCoprime_helper (x y : ℤ) (d : ℕ) (hd : Int.gcd x y = d)
    (h : Nat.beq d 1 = false) : ¬ IsCoprime x y

(x y : ℤ)
(d : ℕ)
(hd : x.gcd y = d)
(h : d.beq 1 = false)


theorem rel_act_of_rel_of_rel_act (ab : r a b) (rr : r c (μ m a)) : r c (μ m b)

{M : Type u_1}
{N : Type u_2}
{μ : M → N → N}
{r : N → N → Prop}
[CovariantClass M N μ r]
[IsTrans N r]
(m : M)
{a b c : N}
(ab : r a b)
(rr : r c (μ m a))


/-- Non-unital algebra homomorphisms from `A` into a unital `R`-algebra `C` lift uniquely to
`Unitization R A →ₐ[R] C`. This is the universal property of the unitization. -/
@[simps! apply symm_apply apply_apply]
def lift : (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)


lemma sup'_Iic (a : α) : (Iic a).sup' nonempty_Iic id = a

{α : Type u_2}
[SemilatticeSup α]
[LocallyFiniteOrderBot α]
(a : α)


@[simp, norm_cast]
theorem cast_bit0 [AddGroupWithOne α] : ∀ n : ZNum, (n.bit0 : α) = (n : α) + n

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


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

(SupHom.id α).withBot = SupBotHom.id (WithBot α)


@[norm_cast]
theorem SimpleFunc.integral_L1_eq_integral (f : α →₁ₛ[μ] E) :
    L1.integral (f : α →₁[μ] E) = SimpleFunc.integral f

(f : ↥(MeasureTheory.Lp.simpleFunc E 1 μ))

MeasureTheory.L1.integral ↑f = MeasureTheory.L1.SimpleFunc.integral f


@[refl]
protected theorem refl (x : M) : x ≡ x [SMOD U]

{R : Type u_1}
[Ring R]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
{U : Submodule R M}
(x : M)


/-- Swapping the factors of a cartesian product of categories twice is naturally isomorphic
to the identity functor.
-/
@[simps]
def symmetry : swap C D ⋙ swap D C ≅ 𝟭 (C × D)

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

(CategoryTheory.Prod.symmetry C D).hom.app X = CategoryTheory.CategoryStruct.id X


@[simp]
theorem monomial_smul_single (i : ℕ) (r : R) (j : ℕ) (m : M) :
    monomial i r • single R j m = single R (i + j) (r • m)

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(i : ℕ)
(r : R)
(j : ℕ)
(m : M)

(Polynomial.monomial i) r • (PolynomialModule.single R j) m = (PolynomialModule.single R (i + j)) (r • m)


/-- The sheafification functor is left adjoint to the forgetful functor. -/
@[simps! unit_app counit_app_val]
noncomputable def plusPlusAdjunction : plusPlusSheaf J D ⊣ sheafToPresheaf J D

(J : CategoryTheory.GrothendieckTopology C)

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

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

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

[(X : C) → CategoryTheory.Limits.PreservesColimitsOfShape (J.Cover X)ᵒᵖ (CategoryTheory.forget D)]

((CategoryTheory.plusPlusAdjunction J D).counit.app Y).val = J.sheafifyLift (CategoryTheory.CategoryStruct.id Y.val) ⋯


@[simp, norm_cast]
theorem coe_one : ((1 : s) : R) = (1 : R)

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


@[simp]
theorem zero_im : (0 : ℂ).im = 0


theorem Finite.image {s : Set α} (f : α → β) (hs : s.Finite) : (f '' s).Finite

{α : Type u}
{β : Type v}
{s : Set α}
(f : α → β)
(hs : s.Finite)


@[measurability, fun_prop]
theorem measurable_fderiv : Measurable (fderiv 𝕜 f)

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


theorem contMDiffOn_const : ContMDiffOn I I' n (fun _ : M => c) s

{𝕜 : Type u_1}
[NontriviallyNormedField 𝕜]
{E : Type u_2}
[NormedAddCommGroup E]
[NormedSpace 𝕜 E]
{H : Type u_3}
[TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H}
{M : Type u_4}
[TopologicalSpace M]
[ChartedSpace H M]
{E' : Type u_5}
[NormedAddCommGroup E']
[NormedSpace 𝕜 E']
{H' : Type u_6}
[TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'}
{M' : Type u_7}
[TopologicalSpace M']
[ChartedSpace H' M']
{s : Set M}
{n : ℕ∞}
{c : M'}


@[simp]
theorem rootSpace_zero_eq (H : LieSubalgebra R L) [H.IsCartanSubalgebra] [IsNoetherian R L] :
    rootSpace H 0 = H.toLieSubmodule

(R : Type u_1)
(L : Type u_2)
[CommRing R]
[LieRing L]
[LieAlgebra R L]
(H : LieSubalgebra R L)
[H.IsCartanSubalgebra]
[IsNoetherian R L]

LieAlgebra.rootSpace H 0 = H.toLieSubmodule


@[to_additive (attr := simp)]
theorem MonoidHom.toMulHom_coe [MulOneClass M] [MulOneClass N] (f : M →* N) :
    f.toMulHom.toFun = f

{M : Type u_4}
{N : Type u_5}
[AddZeroClass M]
[AddZeroClass N]
(f : M →+ N)


@[simp] lemma map_add_left_Icc (a b c : α) :
    (Icc a b).map (addLeftEmbedding c) = Icc (c + a) (c + b)

{α : Type u_2}
[OrderedCancelAddCommMonoid α]
[ExistsAddOfLE α]
[LocallyFiniteOrder α]
(a b c : α)

Finset.map (addLeftEmbedding c) (Finset.Icc a b) = Finset.Icc (c + a) (c + b)


/-- `mulEquivEnd` as an isomorphism between endomorphism monoids. -/
@[simps!]
noncomputable def mulEquivEnd (X : C) :
    End X ≃* End (f.obj X)

{C : Type u}
[CategoryTheory.Category.{v, u} C]
{D : Type u'}
[CategoryTheory.Category.{v', u'} D]
{f : CategoryTheory.Functor C D}
(hf : f.FullyFaithful)
(X : C)

∀ (f_1 : f.obj X ⟶ f.obj X), (hf.mulEquivEnd X).symm f_1 = hf.preimage f_1


theorem sInf_adj_of_nonempty {s : Set (SimpleGraph V)} (hs : s.Nonempty) :
    (sInf s).Adj a b ↔ ∀ G ∈ s, Adj G a b

{V : Type u}
{a b : V}
{s : Set (SimpleGraph V)}
(hs : s.Nonempty)


theorem eq_trans₃ (p : (a:α) = b) (p₁ : a = a') (p₂ : b = b') : a' = b'


/-- The counit for the equivalence `Mon_ (C ⥤ D) ≌ C ⥤ Mon_ D`.
-/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (C ⥤ Mon_ D)

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

∀ (X_1 : C), ((CategoryTheory.Monoidal.MonFunctorCategoryEquivalence.counitIso.inv.app X).app X_1).hom = 𝟙 (X.obj X_1).X


@[simp, norm_cast]
theorem coe_diff (x y : ZFSet.{u}) : ↑(x \ y) = (x : Class.{u}) \ y


theorem sigmaLift_nonempty :
    (sigmaLift f a b).Nonempty ↔ ∃ h : a.1 = b.1, (f (h ▸ a.2) b.2).Nonempty

{f : ⦃i : ι⦄ → α i → β i → Finset (γ i)}

(Finset.sigmaLift f a b).Nonempty ↔ ∃ (h : a.fst = b.fst), (f (h ▸ a.snd) b.snd).Nonempty


theorem dual_involutive : Function.Involutive (dual : Matroid α → Matroid α)


lemma weightSpace_neg_add_chainBot :
    weightSpace M (-α + chainBot α β : L → R) = ⊥

{R : Type u_1}
{L : Type u_2}
[CommRing R]
[LieRing L]
[LieAlgebra R L]
{M : Type u_3}
[AddCommGroup M]
[Module R M]
[LieRingModule L M]
[LieModule R L M]
[LieAlgebra.IsNilpotent R L]
[NoZeroSMulDivisors ℤ R]
[NoZeroSMulDivisors R M]
[IsNoetherian R M]
(α : L → R)
(β : LieModule.Weight R L M)
(hα : α ≠ 0)

LieModule.weightSpace M (-α + ⇑(LieModule.chainBot α β)) = ⊥


@[reassoc]
lemma homologyFunctor_shiftMap
    {K L : CochainComplex C ℤ} {n : ℤ} (f : K ⟶ L⟦n⟧) (a a' : ℤ) (h : n + a = a') :
    (homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap
      ((quotient _ _).map f ≫ ((quotient _ _).commShiftIso n).hom.app _) a a' h =
        (homologyFunctorFactors _ _ a).hom.app K ≫
          (HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap f a a' h ≫
            (homologyFunctorFactors _ _ a').inv.app L

(f : K ⟶ (CategoryTheory.shiftFunctor (CochainComplex C ℤ) n).obj L)

(HomotopyCategory.homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap
    ((HomotopyCategory.quotient C (ComplexShape.up ℤ)).map f ≫
      ((HomotopyCategory.quotient C (ComplexShape.up ℤ)).commShiftIso n).hom.app L)
    a a' h =
  (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) a).hom.app K ≫
    (HomologicalComplex.homologyFunctor C (ComplexShape.up ℤ) 0).shiftMap f a a' h ≫
      (HomotopyCategory.homologyFunctorFactors C (ComplexShape.up ℤ) a').inv.app L


theorem nodup_permutations'Aux_of_not_mem (s : List α) (x : α) (hx : x ∉ s) :
    Nodup (permutations'Aux x s)

{α : Type u_1}
(s : List α)
(x : α)
(hx : x ∉ s)


theorem widePullback_ext' {B : C} {ι : Type w} [Nonempty ι] {X : ι → C}
    (f : ∀ j : ι, X j ⟶ B) [HasWidePullback.{w} B X f]
    [PreservesLimit (wideCospan B X f) (forget C)] (x y : ↑(widePullback B X f))
    (h : ∀ j, π f j x = π f j y) : x = y

[CategoryTheory.Limits.HasWidePullback B X f]

[CategoryTheory.Limits.PreservesLimit (CategoryTheory.Limits.WidePullbackShape.wideCospan B X f)
    (CategoryTheory.forget C)]

(x y : (CategoryTheory.forget C).obj (CategoryTheory.Limits.widePullback B X f))

(h : ∀ (j : ι), (CategoryTheory.Limits.WidePullback.π f j) x = (CategoryTheory.Limits.WidePullback.π f j) y)


@[simp]
theorem toWithTop_top' {h : Decidable (⊤ : PartENat).Dom} : toWithTop ⊤ = ⊤


/-- That $\operatorname{im}(q^* : (V/W)^* \to V^*) = \operatorname{ann}(W)$. -/
theorem range_dualMap_mkQ_eq (W : Submodule R M) :
    LinearMap.range W.mkQ.dualMap = W.dualAnnihilator

{R : Type u_1}
{M : Type u_2}
[CommRing R]
[AddCommGroup M]
[Module R M]
(W : Submodule R M)


@[to_additive add_const]
theorem StrictAnti.mul_const' (hf : StrictAnti f) (c : α) : StrictAnti fun x => f x * c

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


protected theorem inj (f : α ≃. β) {a₁ a₂ : α} {b : β} (h₁ : b ∈ f a₁) (h₂ : b ∈ f a₂) :
    a₁ = a₂

{α : Type u}
{β : Type v}
(f : α ≃. β)
{a₁ a₂ : α}
{b : β}
(h₁ : b ∈ f a₁)
(h₂ : b ∈ f a₂)


theorem Nat.ble_succ_eq_true : {n m : Nat} → Eq (Nat.ble n m) true → Eq (Nat.ble n (succ m)) true

Eq (n.ble m) true → Eq (n.ble m.succ) true


lemma hasEigenvalue_zero_tfae (φ : Module.End K M) :
    List.TFAE [
      Module.End.HasEigenvalue φ 0,
      IsRoot (minpoly K φ) 0,
      constantCoeff φ.charpoly = 0,
      LinearMap.det φ = 0,
      ⊥ < ker φ,
      ∃ (m : M), m ≠ 0 ∧ φ m = 0 ]

{K : Type u_2}
{M : Type u_3}
[Field K]
[AddCommGroup M]
[Module K M]
[Module.Finite K M]
(φ : Module.End K M)

[φ.HasEigenvalue 0, (minpoly K φ).IsRoot 0, Polynomial.constantCoeff (LinearMap.charpoly φ) = 0, LinearMap.det φ = 0,
    ⊥ < LinearMap.ker φ, ∃ m, m ≠ 0 ∧ φ m = 0].TFAE


theorem LinearMap.BilinForm.isSkewAdjoint_bracket {f g : Module.End R M}
    (hf : f ∈ B.skewAdjointSubmodule) (hg : g ∈ B.skewAdjointSubmodule) :
    ⁅f, g⁆ ∈ B.skewAdjointSubmodule

(hf : f ∈ LinearMap.skewAdjointSubmodule B)

(hg : g ∈ LinearMap.skewAdjointSubmodule B)

⁅f, g⁆ ∈ LinearMap.skewAdjointSubmodule B


protected theorem tsum_mul_le_mul_norm' {p q : ℝ≥0∞} (hpq : p.toReal.IsConjExponent q.toReal)
    (f : lp E p) (g : lp E q) : ∑' i, ‖f i‖ * ‖g i‖ ≤ ‖f‖ * ‖g‖


@[simp]
lemma star_pos_iff {x : R} : 0 < star x ↔ 0 < x

{R : Type u}
[NonUnitalSemiring R]
[PartialOrder R]
[StarRing R]
[StarOrderedRing R]
{x : R}


@[simp]
lemma sheafValGluedMk_val (j : D.J) : F.val.map (D.ι j).op (D.sheafValGluedMk s h) = s j

{F : CategoryTheory.Sheaf AlgebraicGeometry.Scheme.zariskiTopology (Type v)}

(s : (j : D.J) → F.val.obj (Opposite.op (D.U j)))

(h : ∀ (i j : D.J), F.val.map (D.f i j).op (s i) = F.val.map ((D.f j i).op ≫ (D.t i j).op) (s j))


/-- A dependent version of `Submodule.closure_induction`. -/
@[elab_as_elim]
theorem closure_induction' {p : ∀ x, x ∈ span R s → Prop}
    (zero : p 0 (Submodule.zero_mem _))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (Submodule.add_mem _ ‹_› ‹_›))
    (smul_mem : ∀ (r x) (h : x ∈ s), p (r • x) (Submodule.smul_mem _ _ <| subset_span h)) {x}
    (hx : x ∈ span R s) : p x hx

{p : (x : M) → x ∈ Submodule.span R s → Prop}

(add : ∀ (x : M) (hx : x ∈ Submodule.span R s) (y : M) (hy : y ∈ Submodule.span R s), p x hx → p y hy → p (x + y) ⋯)

(smul_mem : ∀ (r : R) (x : M) (h : x ∈ s), p (r • x) ⋯)


theorem or_iff_not_imp_right : a ∨ b ↔ (¬b → a)

a ∨ b ↔ ¬b → a


theorem classes_ker_subset_fiber_set {β : Type*} (f : α → β) :
    (Setoid.ker f).classes ⊆ Set.range fun y => { x | f x = y }

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

(Setoid.ker f).classes ⊆ Set.range fun y => {x | f x = y}


@[simp]
theorem sdiff_get_eq [SDiff α] (a b : Part α) (hab : Dom (a \ b)) :
    (a \ b).get hab = a.get (left_dom_of_sdiff_dom hab) \ b.get (right_dom_of_sdiff_dom hab)

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


@[simp]
lemma Ioo_inl_inr : Ioo (inlₗ a) (inrₗ b) = ((Ioi a).disjSum (Iio b)).map toLex.toEmbedding

{α : Type u_1}
{β : Type u_2}
[Preorder α]
[Preorder β]
[OrderTop α]
[OrderBot β]
[LocallyFiniteOrder α]
[LocallyFiniteOrder β]
(a : α)
(b : β)

Finset.Ioo (Sum.inlₗ a) (Sum.inrₗ b) = Finset.map toLex.toEmbedding ((Finset.Ioi a).disjSum (Finset.Iio b))


/-- A prefunctor from a quiver `B` to a bicategory `C` can be lifted to a pseudofunctor from
`free_bicategory B` to `C`.
-/
@[simps]
def lift : Pseudofunctor (FreeBicategory B) C

{B : Type u₁}
[Quiver B]
{C : Type u₂}
[CategoryTheory.Bicategory C]
(F : B ⥤q C)

∀ (a : B), (CategoryTheory.FreeBicategory.lift F).obj a = F.obj a


theorem polar_univ (h : SeparatingRight B) : B.polar Set.univ = {(0 : F)}

{𝕜 : Type u_1}
{E : Type u_2}
{F : Type u_3}
[NontriviallyNormedField 𝕜]
[AddCommMonoid E]
[AddCommMonoid F]
[Module 𝕜 E]
[Module 𝕜 F]
(B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜)
(h : B.SeparatingRight)


@[simp] theorem pure_def : pure = @some α


@[higher_order snd_comp_snd]
theorem comp_snd {α β₀ β₁ β₂} (g : β₀ → β₁) (g' : β₁ → β₂) (x : F α β₀) :
    snd g' (snd g x) = snd (g' ∘ g) x

{F : Type u₀ → Type u₁ → Type u₂}
[Bifunctor F]
[LawfulBifunctor F]
{α : Type u₀}
{β₀ β₁ β₂ : Type u₁}
(g : β₀ → β₁)
(g' : β₁ → β₂)
(x : F α β₀)

Bifunctor.snd g' (Bifunctor.snd g x) = Bifunctor.snd (g' ∘ g) x


theorem all_def {p : α → Bool} (as : Array α) : as.all p = as.data.all p

{α : Type u_1}
{p : α → Bool}
(as : Array α)


theorem einfsep_ne_top_iff : s.einfsep ≠ ∞ ↔ s.Nontrivial

{α : Type u_1}
[PseudoMetricSpace α]
{s : Set α}


@[simp]
theorem lintegral_of_isEmpty {α} [MeasurableSpace α] [IsEmpty α] (μ : Measure α) (f : α → ℝ≥0∞) :
    ∫⁻ x, f x ∂μ = 0

{α : Type u_5}
[MeasurableSpace α]
[IsEmpty α]
(μ : MeasureTheory.Measure α)
(f : α → ℝ≥0∞)


protected theorem continuous_iff {Y : Type*} [TopologicalSpace Y] {f : X → Y}
    (hS : RestrictGenTopology S) :
    Continuous f ↔ ∀ s ∈ S, ContinuousOn f s

{X : Type u_1}
[TopologicalSpace X]
{S : Set (Set X)}
{Y : Type u_2}
[TopologicalSpace Y]
{f : X → Y}
(hS : RestrictGenTopology S)